@transferwise/components 46.159.2 → 46.160.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ExpressiveMoneyInput/Chevron/Chevron.js +10 -2
- package/build/ExpressiveMoneyInput/Chevron/Chevron.js.map +1 -1
- package/build/ExpressiveMoneyInput/Chevron/Chevron.mjs +11 -3
- package/build/ExpressiveMoneyInput/Chevron/Chevron.mjs.map +1 -1
- package/build/ListItem/ListItem.js +6 -5
- package/build/ListItem/ListItem.js.map +1 -1
- package/build/ListItem/ListItem.mjs +6 -5
- package/build/ListItem/ListItem.mjs.map +1 -1
- package/build/ListItem/Navigation/ListItemNavigation.js +1 -0
- package/build/ListItem/Navigation/ListItemNavigation.js.map +1 -1
- package/build/ListItem/Navigation/ListItemNavigation.mjs +1 -0
- package/build/ListItem/Navigation/ListItemNavigation.mjs.map +1 -1
- package/build/ProcessIndicator/ProcessIndicator.js +1 -1
- package/build/ProcessIndicator/ProcessIndicator.js.map +1 -1
- package/build/ProcessIndicator/ProcessIndicator.mjs +1 -1
- package/build/ProcessIndicator/ProcessIndicator.mjs.map +1 -1
- package/build/Prompt/CriticalBanner/CriticalBanner.js +10 -1
- package/build/Prompt/CriticalBanner/CriticalBanner.js.map +1 -1
- package/build/Prompt/CriticalBanner/CriticalBanner.mjs +10 -1
- package/build/Prompt/CriticalBanner/CriticalBanner.mjs.map +1 -1
- package/build/common/Panel/Panel.js +13 -25
- package/build/common/Panel/Panel.js.map +1 -1
- package/build/common/Panel/Panel.mjs +10 -22
- package/build/common/Panel/Panel.mjs.map +1 -1
- package/build/common/Panel/Panel.positionUtils.js +68 -0
- package/build/common/Panel/Panel.positionUtils.js.map +1 -0
- package/build/common/Panel/Panel.positionUtils.mjs +63 -0
- package/build/common/Panel/Panel.positionUtils.mjs.map +1 -0
- package/build/common/PropsValues/position.js +0 -25
- package/build/common/PropsValues/position.js.map +1 -1
- package/build/common/PropsValues/position.mjs +1 -24
- package/build/common/PropsValues/position.mjs.map +1 -1
- package/build/main.css +4370 -7983
- package/build/styles/Accordion/Accordion.css +23 -21
- package/build/styles/AvatarLayout/AvatarLayout.css +11 -11
- package/build/styles/AvatarView/AvatarView.css +11 -3
- package/build/styles/AvatarView/Dot/Dot.css +11 -3
- package/build/styles/Button/Button.css +6 -6
- package/build/styles/Button/LegacyButton/LegacyButton.css +3 -9
- package/build/styles/Calendar/Calendar.css +9 -8
- package/build/styles/Calendar/TableLink/TableLink.css +8 -7
- package/build/styles/Carousel/Carousel.css +28 -27
- package/build/styles/CheckboxButton/CheckboxButton.css +13 -15
- package/build/styles/Chips/Chip/Chip.css +26 -29
- package/build/styles/Container/Container.css +5 -5
- package/build/styles/DateInput/DateInput.css +4 -4
- package/build/styles/DateLookup/DateLookup.css +1 -1
- package/build/styles/DateLookup/DateTrigger/DateTrigger.css +9 -15
- package/build/styles/DefinitionList/DefinitionList.css +12 -23
- package/build/styles/Dimmer/Dimmer.css +9 -19
- package/build/styles/Divider/Divider.css +8 -7
- package/build/styles/Drawer/Drawer.css +16 -15
- package/build/styles/DropFade/DropFade.css +2 -2
- package/build/styles/ExpressiveMoneyInput/AmountInput/AmountInput.css +4 -4
- package/build/styles/ExpressiveMoneyInput/Chevron/Chevron.css +5 -5
- package/build/styles/ExpressiveMoneyInput/ExpressiveMoneyInput.css +11 -11
- package/build/styles/Field/Field.css +13 -12
- package/build/styles/FlowNavigation/AnimatedLabel/AnimatedLabel.css +5 -5
- package/build/styles/FlowNavigation/FlowNavigation.css +23 -44
- package/build/styles/Header/Header.css +11 -9
- package/build/styles/Image/Image.css +7 -7
- package/build/styles/Info/Info.css +1 -1
- package/build/styles/Inputs/Input/Input.css +24 -25
- package/build/styles/Inputs/InputGroup/InputGroup.css +13 -13
- package/build/styles/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +10 -10
- package/build/styles/Inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +7 -7
- package/build/styles/Inputs/SelectInput/ClearButton/SelectInputClearButton.css +6 -6
- package/build/styles/Inputs/SelectInput/ItemView/SelectInputItemView.css +4 -4
- package/build/styles/Inputs/SelectInput/Option/SelectInputOption.css +4 -2
- package/build/styles/Inputs/SelectInput/OptionContent/SelectInputOptionContent.css +4 -4
- package/build/styles/Inputs/SelectInput/Options/SelectInputOptions.css +17 -12
- package/build/styles/Inputs/SelectInput/Popover/SelectInputPopover.css +4 -4
- package/build/styles/Inputs/SelectInput/SelectInput.css +56 -49
- package/build/styles/Inputs/TextArea/TextArea.css +26 -27
- package/build/styles/InstructionsList/InstructionsList.css +5 -5
- package/build/styles/Link/Link.css +2 -8
- package/build/styles/ListItem/ListItem.css +38 -35
- package/build/styles/ListItem/ListItem.grid.css +7 -7
- package/build/styles/Loader/Loader.css +31 -31
- package/build/styles/Logo/Logo.css +2 -2
- package/build/styles/Modal/Modal.css +15 -14
- package/build/styles/MoneyInput/MoneyInput.css +10 -20
- package/build/styles/Nudge/Nudge.css +53 -115
- package/build/styles/PhoneNumberInput/PhoneNumberInput.css +3 -9
- package/build/styles/Popover/Popover.css +13 -10
- package/build/styles/Progress/Progress.css +3 -3
- package/build/styles/ProgressBar/ProgressBar.css +4 -4
- package/build/styles/PromoCard/PromoCard.css +28 -42
- package/build/styles/Prompt/ActionPrompt/ActionPrompt.css +9 -9
- package/build/styles/Prompt/CriticalBanner/CriticalBanner.css +57 -23
- package/build/styles/Prompt/InfoPrompt/InfoPrompt.css +15 -15
- package/build/styles/Prompt/InlinePrompt/InlinePrompt.css +5 -6
- package/build/styles/Prompt/PrimitivePrompt/PrimitivePrompt.css +10 -8
- package/build/styles/RadioGroup/RadioGroup.css +1 -1
- package/build/styles/Section/Section.css +6 -6
- package/build/styles/SegmentedControl/SegmentedControl.css +18 -15
- package/build/styles/SlidingPanel/SlidingPanel.css +17 -31
- package/build/styles/Snackbar/Snackbar.css +21 -35
- package/build/styles/Stepper/Stepper.css +9 -12
- package/build/styles/Sticky/Sticky.css +2 -2
- package/build/styles/Switch/Switch.css +5 -4
- package/build/styles/Table/Table.css +60 -57
- package/build/styles/Tabs/Tabs.css +18 -14
- package/build/styles/Tile/Tile.css +12 -12
- package/build/styles/Tooltip/Tooltip.css +2 -2
- package/build/styles/Typeahead/Typeahead.css +42 -54
- package/build/styles/Upload/Upload.css +11 -10
- package/build/styles/UploadInput/UploadButton/UploadButton.css +20 -19
- package/build/styles/UploadInput/UploadInput.css +4 -4
- package/build/styles/UploadInput/UploadItem/UploadItem.css +49 -49
- package/build/styles/_deprecated/ActionButton/ActionButton.css +8 -6
- package/build/styles/_deprecated/Alert/Alert.css +2 -2
- package/build/styles/_deprecated/Avatar/Avatar.css +65 -65
- package/build/styles/_deprecated/Badge/Badge.css +12 -14
- package/build/styles/_deprecated/Card/Card.css +27 -18
- package/build/styles/_deprecated/CriticalBanner/CriticalCommsBanner.css +7 -7
- package/build/styles/_deprecated/LegacyListItem/LegacyListItem.css +1 -1
- package/build/styles/_deprecated/NavigationOption/NavigationOption.css +6 -19
- package/build/styles/_deprecated/NavigationOptionsList/NavigationOptionsList.css +3 -8
- package/build/styles/_deprecated/Select/Select.css +57 -104
- package/build/styles/_deprecated/Summary/Summary.css +19 -30
- package/build/styles/common/BaseCard/BaseCard.css +3 -7
- package/build/styles/common/BottomSheet/BottomSheet.css +30 -18
- package/build/styles/common/Circle/Circle.css +10 -10
- package/build/styles/common/CloseButton/CloseButton.css +36 -36
- package/build/styles/common/LiveRegion/LiveRegion.css +1 -1
- package/build/styles/common/Option/Option.css +42 -44
- package/build/styles/common/Panel/Panel.css +19 -11
- package/build/styles/css/accordion.css +27 -46
- package/build/styles/css/alerts.css +56 -124
- package/build/styles/css/badge.css +20 -30
- package/build/styles/css/breadcrumbs.css +6 -4
- package/build/styles/css/button-groups.css +116 -254
- package/build/styles/css/buttons.css +50 -95
- package/build/styles/css/chevron.css +3 -0
- package/build/styles/css/circles.css +38 -76
- package/build/styles/css/close.css +1 -4
- package/build/styles/css/column-layout.css +38 -60
- package/build/styles/css/currency-flags.css +4 -17
- package/build/styles/css/decision.css +14 -12
- package/build/styles/css/dropdowns.css +59 -210
- package/build/styles/css/droppable.css +43 -38
- package/build/styles/css/flex.css +40 -136
- package/build/styles/css/footer.css +15 -14
- package/build/styles/css/grid.css +383 -1430
- package/build/styles/css/input-groups.css +254 -542
- package/build/styles/css/link-callout.css +2 -8
- package/build/styles/css/list-group.css +57 -92
- package/build/styles/css/loaders.css +11 -11
- package/build/styles/css/media.css +10 -34
- package/build/styles/css/modals.css +49 -59
- package/build/styles/css/navbar.css +372 -812
- package/build/styles/css/navs.css +59 -124
- package/build/styles/css/neptune-addons.css +687 -1234
- package/build/styles/css/neptune-core.css +123 -229
- package/build/styles/css/neptune-social-media.css +9 -33
- package/build/styles/css/neptune.css +3060 -6498
- package/build/styles/css/panels.css +143 -243
- package/build/styles/css/popovers.css +114 -295
- package/build/styles/css/process.css +79 -86
- package/build/styles/css/progress-bars.css +13 -19
- package/build/styles/css/select.css +21 -53
- package/build/styles/css/sequences.css +99 -219
- package/build/styles/css/table.css +48 -43
- package/build/styles/css/tick.css +14 -11
- package/build/styles/css/tooltip.css +49 -82
- package/build/styles/css/utilities.css +12 -40
- package/build/styles/css/wells.css +16 -16
- package/build/styles/main.css +4370 -7983
- package/build/styles/styles/less/accordion.css +27 -46
- package/build/styles/styles/less/alerts.css +56 -124
- package/build/styles/styles/less/badge.css +20 -30
- package/build/styles/styles/less/breadcrumbs.css +6 -4
- package/build/styles/styles/less/button-groups.css +116 -254
- package/build/styles/styles/less/buttons.css +50 -95
- package/build/styles/styles/less/chevron.css +3 -0
- package/build/styles/styles/less/circles.css +38 -76
- package/build/styles/styles/less/close.css +1 -4
- package/build/styles/styles/less/column-layout.css +38 -60
- package/build/styles/styles/less/currency-flags.css +4 -17
- package/build/styles/styles/less/decision.css +14 -12
- package/build/styles/styles/less/dropdowns.css +59 -210
- package/build/styles/styles/less/droppable.css +43 -38
- package/build/styles/styles/less/flex.css +40 -136
- package/build/styles/styles/less/footer.css +15 -14
- package/build/styles/styles/less/forms/bootstrap-forms.css +180 -344
- package/build/styles/styles/less/forms/checkbox-radio.css +29 -56
- package/build/styles/styles/less/grid.css +383 -1430
- package/build/styles/styles/less/input-groups.css +254 -542
- package/build/styles/styles/less/link-callout.css +2 -8
- package/build/styles/styles/less/list-group.css +57 -92
- package/build/styles/styles/less/loaders.css +11 -11
- package/build/styles/styles/less/media.css +10 -34
- package/build/styles/styles/less/modals.css +49 -59
- package/build/styles/styles/less/navbar.css +372 -812
- package/build/styles/styles/less/navs.css +59 -124
- package/build/styles/styles/less/neptune-addons.css +687 -1234
- package/build/styles/styles/less/neptune-core.css +123 -229
- package/build/styles/styles/less/neptune-social-media.css +9 -33
- package/build/styles/styles/less/neptune.css +3060 -6498
- package/build/styles/styles/less/panels.css +143 -243
- package/build/styles/styles/less/popovers.css +114 -295
- package/build/styles/styles/less/process.css +79 -86
- package/build/styles/styles/less/progress-bars.css +13 -19
- package/build/styles/styles/less/select.css +21 -53
- package/build/styles/styles/less/sequences.css +99 -219
- package/build/styles/styles/less/table.css +48 -43
- package/build/styles/styles/less/tick.css +14 -11
- package/build/styles/styles/less/tooltip.css +49 -82
- package/build/styles/styles/less/utilities.css +12 -40
- package/build/styles/styles/less/wells.css +16 -16
- package/build/types/ExpressiveMoneyInput/Chevron/Chevron.d.ts.map +1 -1
- package/build/types/ListItem/ListItem.d.ts.map +1 -1
- package/build/types/Prompt/CriticalBanner/CriticalBanner.d.ts +6 -1
- package/build/types/Prompt/CriticalBanner/CriticalBanner.d.ts.map +1 -1
- package/build/types/common/Panel/Panel.d.ts +1 -1
- package/build/types/common/Panel/Panel.d.ts.map +1 -1
- package/build/types/common/Panel/Panel.positionUtils.d.ts +7 -0
- package/build/types/common/Panel/Panel.positionUtils.d.ts.map +1 -0
- package/build/types/common/PropsValues/position.d.ts +0 -13
- package/build/types/common/PropsValues/position.d.ts.map +1 -1
- package/build/types/common/ResponsivePanel/ResponsivePanel.d.ts +1 -1
- package/package.json +8 -8
- package/src/Accordion/Accordion.css +23 -21
- package/src/Accordion/Accordion.less +3 -4
- package/src/AvatarLayout/AvatarLayout.css +11 -11
- package/src/AvatarView/AvatarView.css +11 -3
- package/src/AvatarView/Dot/Dot.css +11 -3
- package/src/AvatarView/Dot/Dot.less +7 -1
- package/src/Button/Button.css +6 -6
- package/src/Button/LegacyButton/LegacyButton.css +3 -9
- package/src/Button/LegacyButton/LegacyButton.less +1 -3
- package/src/Button/_stories/Button.test.story.tsx +1 -1
- package/src/Calendar/Calendar.css +9 -8
- package/src/Calendar/TableLink/TableLink.css +8 -7
- package/src/Carousel/Carousel.css +28 -27
- package/src/Checkbox/_stories/Checkbox.story.tsx +1 -1
- package/src/Checkbox/_stories/Checkbox.test.story.tsx +3 -2
- package/src/CheckboxButton/CheckboxButton.css +13 -15
- package/src/CheckboxButton/CheckboxButton.less +8 -4
- package/src/Chevron/_stories/Chevron.test.story.tsx +2 -2
- package/src/Chips/Chip/Chip.css +26 -29
- package/src/Chips/Chip/Chip.less +5 -3
- package/src/Container/Container.css +5 -5
- package/src/DateInput/DateInput.css +4 -4
- package/src/DateLookup/DateLookup.css +1 -1
- package/src/DateLookup/DateTrigger/DateTrigger.css +9 -15
- package/src/DateLookup/DateTrigger/DateTrigger.less +1 -2
- package/src/Decision/Decision.less +0 -2
- package/src/DefinitionList/DefinitionList.css +12 -23
- package/src/DefinitionList/DefinitionList.less +2 -4
- package/src/Dimmer/Dimmer.css +9 -19
- package/src/Dimmer/Dimmer.less +2 -3
- package/src/Divider/Divider.css +8 -7
- package/src/Drawer/Drawer.css +16 -15
- package/src/DropFade/DropFade.css +2 -2
- package/src/ExpressiveMoneyInput/AmountInput/AmountInput.css +4 -4
- package/src/ExpressiveMoneyInput/Chevron/Chevron.css +5 -5
- package/src/ExpressiveMoneyInput/Chevron/Chevron.tsx +8 -3
- package/src/ExpressiveMoneyInput/ExpressiveMoneyInput.css +11 -11
- package/src/Field/Field.css +13 -12
- package/src/FlowNavigation/AnimatedLabel/AnimatedLabel.css +5 -5
- package/src/FlowNavigation/FlowNavigation.css +23 -44
- package/src/Header/Header.css +11 -9
- package/src/Header/_stories/Header.test.story.tsx +1 -1
- package/src/Image/Image.css +7 -7
- package/src/Info/Info.css +1 -1
- package/src/Info/_stories/Info.rtl.test.story.tsx +35 -10
- package/src/Info/_stories/Info.story.tsx +1 -1
- package/src/Inputs/Input/Input.css +24 -25
- package/src/Inputs/InputGroup/InputGroup.css +13 -13
- package/src/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +10 -10
- package/src/Inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +7 -7
- package/src/Inputs/SelectInput/ClearButton/SelectInputClearButton.css +6 -6
- package/src/Inputs/SelectInput/ItemView/SelectInputItemView.css +4 -4
- package/src/Inputs/SelectInput/Option/SelectInputOption.css +4 -2
- package/src/Inputs/SelectInput/OptionContent/SelectInputOptionContent.css +4 -4
- package/src/Inputs/SelectInput/Options/SelectInputOptions.css +17 -12
- package/src/Inputs/SelectInput/Popover/SelectInputPopover.css +4 -4
- package/src/Inputs/SelectInput/SelectInput.css +56 -49
- package/src/Inputs/SelectInput/_stories/SelectInput.test.story.tsx +1 -1
- package/src/Inputs/TextArea/TextArea.css +26 -27
- package/src/InstructionsList/InstructionsList.css +5 -5
- package/src/Link/Link.css +2 -8
- package/src/Link/Link.less +3 -3
- package/src/ListItem/ListItem.css +38 -35
- package/src/ListItem/ListItem.grid.css +7 -7
- package/src/ListItem/ListItem.tsx +8 -5
- package/src/ListItem/Navigation/ListItemNavigation.test.tsx +13 -0
- package/src/ListItem/Navigation/ListItemNavigation.tsx +1 -1
- package/src/ListItem/_stories/subcomponents.tsx +1 -1
- package/src/Loader/Loader.css +31 -31
- package/src/Loader/_stories/Loader.test.story.tsx +23 -0
- package/src/Logo/Logo.css +2 -2
- package/src/Modal/Modal.css +15 -14
- package/src/MoneyInput/MoneyInput.css +10 -20
- package/src/MoneyInput/MoneyInput.less +2 -3
- package/src/MoneyInput/_stories/MoneyInput.rtl.test.story.tsx +1 -1
- package/src/Nudge/Nudge.css +53 -115
- package/src/Nudge/Nudge.less +4 -12
- package/src/Nudge/_stories/Nudge.test.story.tsx +29 -12
- package/src/PhoneNumberInput/PhoneNumberInput.css +3 -9
- package/src/PhoneNumberInput/PhoneNumberInput.less +1 -3
- package/src/PhoneNumberInput/_stories/{PhoneNumberInput.test.story.tsx → PhoneNumberInput.rtl.test.story.tsx} +18 -10
- package/src/Popover/Popover.css +13 -10
- package/src/ProcessIndicator/ProcessIndicator.tsx +1 -1
- package/src/ProcessIndicator/_stories/ProcessIndicator.test.story.tsx +32 -0
- package/src/Progress/Progress.css +3 -3
- package/src/ProgressBar/ProgressBar.css +4 -4
- package/src/ProgressBar/_stories/ProgressBar.test.story.tsx +33 -19
- package/src/PromoCard/PromoCard.css +28 -42
- package/src/PromoCard/PromoCard.less +24 -32
- package/src/Prompt/ActionPrompt/ActionPrompt.css +9 -9
- package/src/Prompt/CriticalBanner/CriticalBanner.css +57 -23
- package/src/Prompt/CriticalBanner/CriticalBanner.less +45 -0
- package/src/Prompt/CriticalBanner/CriticalBanner.test.tsx +26 -3
- package/src/Prompt/CriticalBanner/CriticalBanner.tsx +15 -1
- package/src/Prompt/CriticalBanner/_stories/CriticalBanner.accessibility.docs.mdx +4 -1
- package/src/Prompt/CriticalBanner/_stories/CriticalBanner.story.tsx +52 -0
- package/src/Prompt/CriticalBanner/_stories/CriticalBanner.test.story.tsx +22 -1
- package/src/Prompt/InfoPrompt/InfoPrompt.css +15 -15
- package/src/Prompt/InlinePrompt/InlinePrompt.css +5 -6
- package/src/Prompt/PrimitivePrompt/PrimitivePrompt.css +10 -8
- package/src/RadioGroup/RadioGroup.css +1 -1
- package/src/Section/Section.css +6 -6
- package/src/SegmentedControl/SegmentedControl.css +18 -15
- package/src/SlidingPanel/SlidingPanel.css +17 -31
- package/src/SlidingPanel/SlidingPanel.less +12 -4
- package/src/SlidingPanel/_stories/SlidingPanel.rtl.test.story.tsx +4 -3
- package/src/Snackbar/Snackbar.css +21 -35
- package/src/Snackbar/Snackbar.less +3 -9
- package/src/Snackbar/_stories/Snackbar.rtl.test.story.tsx +14 -16
- package/src/Snackbar/_stories/Snackbar.story.tsx +1 -1
- package/src/Snackbar/_stories/Snackbar.test.story.tsx +1 -1
- package/src/StatusIcon/_stories/StatusIcon.test.story.tsx +12 -4
- package/src/Stepper/Stepper.css +9 -12
- package/src/Stepper/Stepper.less +1 -1
- package/src/Sticky/Sticky.css +2 -2
- package/src/Switch/Switch.css +5 -4
- package/src/Table/Table.css +60 -57
- package/src/Tabs/Tabs.css +18 -14
- package/src/Tabs/Tabs.less +0 -1
- package/src/Tile/Tile.css +12 -12
- package/src/Tooltip/Tooltip.css +2 -2
- package/src/Typeahead/Typeahead.css +42 -54
- package/src/Typeahead/Typeahead.less +2 -3
- package/src/Upload/Upload.css +11 -10
- package/src/UploadInput/UploadButton/UploadButton.css +20 -19
- package/src/UploadInput/UploadInput.css +4 -4
- package/src/UploadInput/UploadItem/UploadItem.css +49 -49
- package/src/UploadInput/UploadItem/UploadItem.less +7 -6
- package/src/UploadInput/_stories/UploadInput.test.story.tsx +1 -1
- package/src/_deprecated/ActionButton/ActionButton.css +8 -6
- package/src/_deprecated/Alert/Alert.css +2 -2
- package/src/_deprecated/Avatar/Avatar.css +65 -65
- package/src/_deprecated/Avatar/Avatar.less +0 -1
- package/src/_deprecated/Badge/Badge.css +12 -14
- package/src/_deprecated/Badge/Badge.less +11 -18
- package/src/_deprecated/Card/Card.css +27 -18
- package/src/_deprecated/Card/Card.less +1 -2
- package/src/_deprecated/CriticalBanner/CriticalCommsBanner.css +7 -7
- package/src/_deprecated/CriticalBanner/_stories/CriticalCommsBanner.test.story.tsx +0 -16
- package/src/_deprecated/LegacyListItem/LegacyListItem.css +1 -1
- package/src/_deprecated/NavigationOption/NavigationOption.css +6 -19
- package/src/_deprecated/NavigationOption/NavigationOption.less +3 -4
- package/src/_deprecated/NavigationOptionsList/NavigationOptionsList.css +3 -8
- package/src/_deprecated/NavigationOptionsList/NavigationOptionsList.less +1 -3
- package/src/_deprecated/OverlayHeader/_stories/OverlayHeader.test.story.tsx +15 -0
- package/src/_deprecated/Select/Select.css +57 -104
- package/src/_deprecated/Select/Select.less +10 -11
- package/src/_deprecated/Summary/Summary.css +19 -30
- package/src/_deprecated/Summary/Summary.less +1 -8
- package/src/common/BaseCard/BaseCard.css +3 -7
- package/src/common/BaseCard/BaseCard.less +0 -5
- package/src/common/BottomSheet/BottomSheet.css +30 -18
- package/src/common/Circle/Circle.css +10 -10
- package/src/common/CloseButton/CloseButton.css +36 -36
- package/src/common/LiveRegion/LiveRegion.css +1 -1
- package/src/common/Option/Option.css +42 -44
- package/src/common/Option/Option.less +8 -10
- package/src/common/Panel/Panel.css +19 -11
- package/src/common/Panel/Panel.less +27 -9
- package/src/common/Panel/Panel.positionUtils.ts +79 -0
- package/src/common/Panel/Panel.test.tsx +40 -0
- package/src/common/Panel/Panel.tsx +13 -24
- package/src/common/Panel/_stories/Panel.rtl.test.story.tsx +110 -0
- package/src/common/PropsValues/position.ts +0 -50
- package/src/main.css +4370 -7983
- package/src/styles/less/accordion.css +27 -46
- package/src/styles/less/addons/_spacing-utilities.less +4 -4
- package/src/styles/less/alerts.css +56 -124
- package/src/styles/less/badge.css +20 -30
- package/src/styles/less/breadcrumbs.css +6 -4
- package/src/styles/less/button-groups.css +116 -254
- package/src/styles/less/buttons.css +50 -95
- package/src/styles/less/buttons.less +3 -11
- package/src/styles/less/chevron.css +3 -0
- package/src/styles/less/chevron.less +4 -0
- package/src/styles/less/circles.css +38 -76
- package/src/styles/less/close.css +1 -4
- package/src/styles/less/column-layout.css +38 -60
- package/src/styles/less/currency-flags.css +4 -17
- package/src/styles/less/decision.css +14 -12
- package/src/styles/less/dropdowns.css +59 -210
- package/src/styles/less/droppable.css +43 -38
- package/src/styles/less/flex.css +40 -136
- package/src/styles/less/footer.css +15 -14
- package/src/styles/less/forms/bootstrap-forms.css +180 -344
- package/src/styles/less/forms/checkbox-radio.css +29 -56
- package/src/styles/less/grid.css +383 -1430
- package/src/styles/less/input-groups.css +254 -542
- package/src/styles/less/link-callout.css +2 -8
- package/src/styles/less/list-group.css +57 -92
- package/src/styles/less/loaders.css +11 -11
- package/src/styles/less/media.css +10 -34
- package/src/styles/less/mixins/_logical-properties-IE-friendly.less +1 -0
- package/src/styles/less/mixins/_logical-properties-modern-browsers.less +80 -41
- package/src/styles/less/mixins/_logical-properties.less +3 -3
- package/src/styles/less/modals.css +49 -59
- package/src/styles/less/navbar.css +372 -812
- package/src/styles/less/navs.css +59 -124
- package/src/styles/less/neptune-addons.css +687 -1234
- package/src/styles/less/neptune-core.css +123 -229
- package/src/styles/less/neptune-social-media.css +9 -33
- package/src/styles/less/neptune.css +3060 -6498
- package/src/styles/less/panels.css +143 -243
- package/src/styles/less/popovers.css +114 -295
- package/src/styles/less/process.css +79 -86
- package/src/styles/less/process.less +13 -6
- package/src/styles/less/progress-bars.css +13 -19
- package/src/styles/less/select.css +21 -53
- package/src/styles/less/sequences.css +99 -219
- package/src/styles/less/table.css +48 -43
- package/src/styles/less/tick.css +14 -11
- package/src/styles/less/tick.less +7 -3
- package/src/styles/less/tooltip.css +49 -82
- package/src/styles/less/utilities.css +12 -40
- package/src/styles/less/wells.css +16 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
|
|
3
|
-
import { withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
3
|
+
import { useRtlDiffI18n, withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
4
4
|
import ProgressBar from '..';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
@@ -12,22 +12,36 @@ export default {
|
|
|
12
12
|
type Story = StoryObj<typeof ProgressBar>;
|
|
13
13
|
|
|
14
14
|
export const RTLDiff: Story = {
|
|
15
|
-
render: () =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
render: () => {
|
|
16
|
+
const i18n = useRtlDiffI18n();
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
<ProgressBar
|
|
20
|
+
id="progress-bar-with-description"
|
|
21
|
+
title={i18n.title1}
|
|
22
|
+
description={i18n.description}
|
|
23
|
+
progress={{ value: 50, max: 100 }}
|
|
24
|
+
textEnd={i18n.textEnd1}
|
|
25
|
+
/>
|
|
26
|
+
<ProgressBar
|
|
27
|
+
id="progress-bar-without-description"
|
|
28
|
+
title={i18n.title2}
|
|
29
|
+
progress={{ value: 800, max: 1000 }}
|
|
30
|
+
textEnd={i18n.textEnd2}
|
|
31
|
+
/>
|
|
32
|
+
</>
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
...withRTLDiff({
|
|
36
|
+
i18n: {
|
|
37
|
+
title1: { ltr: 'Send 5,550 GBP', rtl: 'أرسل ٥٬٥٥٠ جنيه إسترليني' },
|
|
38
|
+
description: {
|
|
39
|
+
ltr: 'You have 3 days to reach your goal.',
|
|
40
|
+
rtl: 'لديك ٣ أيام للوصول إلى هدفك.',
|
|
41
|
+
},
|
|
42
|
+
textEnd1: { ltr: '200 GBP to go', rtl: '٢٠٠ جنيه إسترليني متبقي' },
|
|
43
|
+
title2: { ltr: 'Total limit', rtl: 'الحد الإجمالي' },
|
|
44
|
+
textEnd2: { ltr: '200 GBP remaining', rtl: '٢٠٠ جنيه إسترليني متبقي' },
|
|
45
|
+
},
|
|
46
|
+
}),
|
|
33
47
|
};
|
|
@@ -17,43 +17,34 @@
|
|
|
17
17
|
.np-Card-image {
|
|
18
18
|
transform: scale(var(--Card-image-scale)) translateY(var(--Card-image-translate));
|
|
19
19
|
transition: transform 0.5s ease-in-out;
|
|
20
|
-
margin: 0
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
margin-block: 0;
|
|
21
|
+
margin-inline: auto;
|
|
22
|
+
inline-size: 100%;
|
|
23
|
+
block-size: auto;
|
|
24
|
+
inline-size: calc(100% + 48px);
|
|
25
|
+
inline-size: calc(100% + var(--size-48));
|
|
26
|
+
inset-inline-start: calc(24px * -1);
|
|
27
|
+
inset-inline-start: calc(var(--size-24) * -1);
|
|
27
28
|
position: relative;
|
|
28
29
|
}
|
|
29
|
-
[dir="rtl"] .np-Card-image {
|
|
30
|
-
left: auto;
|
|
31
|
-
right: calc(24px * -1);
|
|
32
|
-
right: calc(var(--size-24) * -1);
|
|
33
|
-
}
|
|
34
30
|
.np-Card-description {
|
|
35
31
|
color: #5d7079;
|
|
36
32
|
color: var(--color-content-secondary);
|
|
37
33
|
}
|
|
38
34
|
.np-Card-indicator {
|
|
39
35
|
position: absolute;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
inset-inline-end: 8px;
|
|
37
|
+
inset-inline-end: var(--size-8);
|
|
38
|
+
inset-block-end: 8px;
|
|
39
|
+
inset-block-end: var(--size-8);
|
|
44
40
|
display: flex;
|
|
45
41
|
gap: 4px;
|
|
46
42
|
gap: var(--size-4);
|
|
47
43
|
}
|
|
48
|
-
[dir="rtl"] .np-Card-indicator {
|
|
49
|
-
right: auto;
|
|
50
|
-
left: 8px;
|
|
51
|
-
left: var(--size-8);
|
|
52
|
-
}
|
|
53
44
|
.np-Card-indicatorText {
|
|
54
45
|
display: inline-block;
|
|
55
46
|
vertical-align: middle;
|
|
56
|
-
text-align:
|
|
47
|
+
text-align: start;
|
|
57
48
|
background: var(--Card-indicator-text-background-color);
|
|
58
49
|
padding: 16px;
|
|
59
50
|
padding: var(--size-16);
|
|
@@ -130,12 +121,12 @@
|
|
|
130
121
|
outline: none;
|
|
131
122
|
}
|
|
132
123
|
.np-Card--link .np-Card-titleLink::after {
|
|
133
|
-
content:
|
|
124
|
+
content: "";
|
|
134
125
|
display: block;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
126
|
+
inline-size: 100%;
|
|
127
|
+
block-size: 100%;
|
|
128
|
+
inset-inline-start: 0;
|
|
129
|
+
inset-block-start: 0;
|
|
139
130
|
position: absolute;
|
|
140
131
|
z-index: 10;
|
|
141
132
|
}
|
|
@@ -149,23 +140,18 @@
|
|
|
149
140
|
border-radius: 9999px;
|
|
150
141
|
border-radius: var(--radius-full);
|
|
151
142
|
display: flex;
|
|
152
|
-
|
|
153
|
-
|
|
143
|
+
block-size: 40px;
|
|
144
|
+
block-size: var(--size-40);
|
|
154
145
|
position: absolute;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
146
|
+
inset-inline-end: 8px;
|
|
147
|
+
inset-inline-end: var(--size-8);
|
|
148
|
+
inset-block-start: 8px;
|
|
149
|
+
inset-block-start: var(--size-8);
|
|
150
|
+
inline-size: 40px;
|
|
151
|
+
inline-size: var(--size-40);
|
|
161
152
|
justify-content: center;
|
|
162
153
|
align-items: center;
|
|
163
154
|
}
|
|
164
|
-
[dir="rtl"] .np-Card--checked.is-checked .np-Card-check {
|
|
165
|
-
right: auto;
|
|
166
|
-
left: 8px;
|
|
167
|
-
left: var(--size-8);
|
|
168
|
-
}
|
|
169
155
|
.np-Card--checked.is-checked:focus-visible:not(.is-disabled):not(:disabled) {
|
|
170
156
|
box-shadow: none;
|
|
171
157
|
}
|
|
@@ -174,7 +160,7 @@
|
|
|
174
160
|
flex-direction: column;
|
|
175
161
|
gap: 24px;
|
|
176
162
|
gap: var(--size-24);
|
|
177
|
-
|
|
163
|
+
inline-size: 100%;
|
|
178
164
|
}
|
|
179
165
|
@media (min-width: 840px) {
|
|
180
166
|
.np-CardGroup {
|
|
@@ -182,5 +168,5 @@
|
|
|
182
168
|
}
|
|
183
169
|
}
|
|
184
170
|
.np-CardGroup .np-Card.np-Card--promoCard {
|
|
185
|
-
max-
|
|
171
|
+
max-inline-size: 100%;
|
|
186
172
|
}
|
|
@@ -12,31 +12,26 @@
|
|
|
12
12
|
--Card-max-width: 358px;
|
|
13
13
|
|
|
14
14
|
&.is-disabled {
|
|
15
|
-
opacity: .45;
|
|
15
|
+
opacity: 0.45;
|
|
16
16
|
filter: grayscale(1);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
&-image {
|
|
21
21
|
transform: scale(var(--Card-image-scale)) translateY(var(--Card-image-translate));
|
|
22
|
-
transition: transform .5s ease-in-out;
|
|
22
|
+
transition: transform 0.5s ease-in-out;
|
|
23
23
|
margin: 0 auto;
|
|
24
24
|
width: 100%;
|
|
25
25
|
height: auto;
|
|
26
26
|
width: calc(100% + var(--size-48)); // Ensures we have 100% width to parent
|
|
27
27
|
left: calc(var(--size-24) * -1);
|
|
28
28
|
position: relative;
|
|
29
|
-
|
|
30
|
-
[dir="rtl"] & {
|
|
31
|
-
left: auto;
|
|
32
|
-
right: calc(var(--size-24) * -1);
|
|
33
|
-
}
|
|
34
29
|
}
|
|
35
30
|
|
|
36
31
|
&-description {
|
|
37
32
|
color: var(--color-content-secondary);
|
|
38
33
|
}
|
|
39
|
-
|
|
34
|
+
|
|
40
35
|
&-indicator {
|
|
41
36
|
position: absolute;
|
|
42
37
|
right: var(--size-8);
|
|
@@ -44,11 +39,6 @@
|
|
|
44
39
|
display: flex;
|
|
45
40
|
gap: var(--size-4);
|
|
46
41
|
|
|
47
|
-
[dir="rtl"] & {
|
|
48
|
-
right: auto;
|
|
49
|
-
left: var(--size-8);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
42
|
&Text {
|
|
53
43
|
display: inline-block;
|
|
54
44
|
vertical-align: middle;
|
|
@@ -57,7 +47,7 @@
|
|
|
57
47
|
padding: var(--size-16);
|
|
58
48
|
border-radius: 100px;
|
|
59
49
|
}
|
|
60
|
-
|
|
50
|
+
|
|
61
51
|
&Icon .tw-icon {
|
|
62
52
|
color: var(--Card-indicator-icon-color);
|
|
63
53
|
|
|
@@ -67,19 +57,26 @@
|
|
|
67
57
|
}
|
|
68
58
|
}
|
|
69
59
|
}
|
|
70
|
-
|
|
60
|
+
|
|
71
61
|
&--checked,
|
|
72
62
|
&--link {
|
|
73
63
|
color: currentColor;
|
|
74
64
|
cursor: pointer;
|
|
75
65
|
box-shadow: none;
|
|
76
66
|
transform: scale(1);
|
|
77
|
-
transition:
|
|
67
|
+
transition:
|
|
68
|
+
box-shadow 0.2s ease-in-out,
|
|
69
|
+
transform 0.5s ease-in-out;
|
|
78
70
|
|
|
79
|
-
// Defines a box shadow for the Card component that is only applied
|
|
80
|
-
// when it is a child of an element with the class np-theme-personal
|
|
71
|
+
// Defines a box shadow for the Card component that is only applied
|
|
72
|
+
// when it is a child of an element with the class np-theme-personal
|
|
81
73
|
// and does not have the class `'np-theme-personal--(dark|bright-green|forest-green)'`.
|
|
82
|
-
.np-theme-personal:not(
|
|
74
|
+
.np-theme-personal:not(
|
|
75
|
+
.np-theme-personal--dark,
|
|
76
|
+
.np-theme-personal--bright-green,
|
|
77
|
+
.np-theme-personal--forest-green
|
|
78
|
+
)
|
|
79
|
+
& {
|
|
83
80
|
--Card-box-shadow: 0px 20px var(--size-40) 0px var(--color-background-neutral);
|
|
84
81
|
--Card-check-color: var(--color-interactive-accent);
|
|
85
82
|
}
|
|
@@ -87,25 +84,25 @@
|
|
|
87
84
|
&.is-disabled {
|
|
88
85
|
cursor: not-allowed;
|
|
89
86
|
}
|
|
90
|
-
|
|
87
|
+
|
|
91
88
|
// Removes all animations for users who prefer reduced motion
|
|
92
89
|
@media (prefers-reduced-motion: reduce) {
|
|
93
90
|
transition: none;
|
|
94
91
|
}
|
|
95
|
-
|
|
92
|
+
|
|
96
93
|
&:hover:not(.is-disabled, :disabled, .is-checked, :focus-within) {
|
|
97
94
|
--Card-image-scale: 1.1;
|
|
98
95
|
box-shadow: var(--Card-box-shadow);
|
|
99
96
|
}
|
|
100
|
-
|
|
101
|
-
&:active:not(.is-disabled, :disabled, .is-checked) {
|
|
97
|
+
|
|
98
|
+
&:active:not(.is-disabled, :disabled, .is-checked) {
|
|
102
99
|
--Card-background-color: var(--color-background-neutral-active);
|
|
103
100
|
--Card-image-scale: 1.1;
|
|
104
101
|
--Card-image-translate: var(--size-8);
|
|
105
102
|
transform: scale(98%);
|
|
106
103
|
box-shadow: var(--Card-box-shadow);
|
|
107
104
|
|
|
108
|
-
// Required as --color-background-elevated isn't present within the
|
|
105
|
+
// Required as --color-background-elevated isn't present within the
|
|
109
106
|
// bright-green theme
|
|
110
107
|
.np-theme-personal--bright-green & {
|
|
111
108
|
--Card-background-color: var(--color-background-neutral);
|
|
@@ -135,7 +132,7 @@
|
|
|
135
132
|
}
|
|
136
133
|
|
|
137
134
|
&::after {
|
|
138
|
-
content:
|
|
135
|
+
content: "";
|
|
139
136
|
display: block;
|
|
140
137
|
width: 100%;
|
|
141
138
|
height: 100%;
|
|
@@ -150,7 +147,7 @@
|
|
|
150
147
|
&--checked {
|
|
151
148
|
&.is-checked {
|
|
152
149
|
box-shadow: 0 0 0 var(--size-4) var(--color-interactive-primary);
|
|
153
|
-
|
|
150
|
+
|
|
154
151
|
.np-Card-check {
|
|
155
152
|
color: var(--Card-check-color);
|
|
156
153
|
background: var(--Card-check-background-color);
|
|
@@ -163,13 +160,8 @@
|
|
|
163
160
|
width: var(--size-40);
|
|
164
161
|
justify-content: center;
|
|
165
162
|
align-items: center;
|
|
166
|
-
|
|
167
|
-
[dir="rtl"] & {
|
|
168
|
-
right: auto;
|
|
169
|
-
left: var(--size-8);
|
|
170
|
-
}
|
|
171
163
|
}
|
|
172
|
-
|
|
164
|
+
|
|
173
165
|
&:focus-visible:not(.is-disabled, :disabled) {
|
|
174
166
|
box-shadow: none;
|
|
175
167
|
}
|
|
@@ -6,26 +6,26 @@
|
|
|
6
6
|
--Prompt-border-radius: var(--radius-large);
|
|
7
7
|
}
|
|
8
8
|
.wds-action-prompt--media-image {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
inline-size: 48px;
|
|
10
|
+
inline-size: var(--size-48);
|
|
11
|
+
block-size: 48px;
|
|
12
|
+
block-size: var(--size-48);
|
|
13
13
|
-o-object-fit: contain;
|
|
14
14
|
object-fit: contain;
|
|
15
15
|
}
|
|
16
16
|
@media (max-width: 599.98px) {
|
|
17
17
|
.wds-action-prompt .wds-action-prompt__action {
|
|
18
|
-
|
|
18
|
+
inline-size: 100%;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
@media (max-width: 599.98px) {
|
|
22
22
|
.wds-action-prompt--with-two-actions .wds-action-prompt__action {
|
|
23
23
|
flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
|
|
24
|
-
min-
|
|
25
|
-
min-
|
|
24
|
+
min-inline-size: -moz-fit-content;
|
|
25
|
+
min-inline-size: fit-content;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
.wds-action-prompt__content {
|
|
29
|
-
max-
|
|
30
|
-
max-
|
|
29
|
+
max-inline-size: calc(48px * 10);
|
|
30
|
+
max-inline-size: calc(var(--size-48) * 10);
|
|
31
31
|
}
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
background: var(--critical-banner-background);
|
|
20
20
|
}
|
|
21
21
|
.wds-critical-banner--media-image {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
inline-size: 48px;
|
|
23
|
+
inline-size: var(--size-48);
|
|
24
|
+
block-size: 48px;
|
|
25
|
+
block-size: var(--size-48);
|
|
26
26
|
-o-object-fit: contain;
|
|
27
27
|
object-fit: contain;
|
|
28
28
|
}
|
|
@@ -31,23 +31,23 @@
|
|
|
31
31
|
-webkit-line-clamp: 8;
|
|
32
32
|
line-clamp: 8;
|
|
33
33
|
-webkit-box-orient: vertical;
|
|
34
|
-
max-
|
|
34
|
+
max-block-size: 192px;
|
|
35
35
|
overflow: hidden;
|
|
36
36
|
transition: max-height var(--critical-banner-duration) var(--critical-banner-easing);
|
|
37
37
|
}
|
|
38
38
|
.wds-critical-banner--collapsed .wds-critical-banner__title {
|
|
39
39
|
-webkit-line-clamp: 2;
|
|
40
40
|
line-clamp: 2;
|
|
41
|
-
max-
|
|
41
|
+
max-block-size: 48px;
|
|
42
42
|
}
|
|
43
43
|
.wds-critical-banner__description {
|
|
44
|
-
max-
|
|
44
|
+
max-block-size: 30vh;
|
|
45
45
|
opacity: 1;
|
|
46
46
|
overflow: hidden;
|
|
47
47
|
transition: max-height var(--critical-banner-duration) var(--critical-banner-easing), opacity var(--critical-banner-duration) var(--critical-banner-easing);
|
|
48
48
|
}
|
|
49
49
|
.wds-critical-banner--collapsed .wds-critical-banner__description--with-title {
|
|
50
|
-
max-
|
|
50
|
+
max-block-size: 0;
|
|
51
51
|
opacity: 0;
|
|
52
52
|
}
|
|
53
53
|
.wds-critical-banner--collapsed .wds-critical-banner__description:not(.wds-critical-banner__description--with-title) {
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
justify-content: center;
|
|
73
73
|
align-items: flex-start;
|
|
74
74
|
text-align: start;
|
|
75
|
-
min-
|
|
76
|
-
max-
|
|
77
|
-
|
|
75
|
+
min-inline-size: 0;
|
|
76
|
+
max-inline-size: 480px;
|
|
77
|
+
block-size: 100%;
|
|
78
78
|
}
|
|
79
79
|
.wds-critical-banner--collapsed .wds-critical-banner__title,
|
|
80
80
|
.wds-critical-banner--collapsed .wds-critical-banner__description {
|
|
@@ -95,22 +95,22 @@
|
|
|
95
95
|
.wds-critical-banner .wds-prompt__actions-wrapper {
|
|
96
96
|
grid-column-start: 2;
|
|
97
97
|
grid-column-end: 3;
|
|
98
|
-
max-
|
|
98
|
+
max-block-size: 200px;
|
|
99
99
|
opacity: 1;
|
|
100
100
|
overflow: visible;
|
|
101
101
|
}
|
|
102
102
|
@container (max-width: 600px) {
|
|
103
103
|
.wds-critical-banner .wds-prompt__actions-wrapper {
|
|
104
104
|
grid-column: span 3;
|
|
105
|
-
|
|
105
|
+
inline-size: 100%;
|
|
106
106
|
}
|
|
107
107
|
.wds-critical-banner .wds-prompt__actions-wrapper .wds-Button {
|
|
108
108
|
flex: 1 1 100%;
|
|
109
|
-
|
|
109
|
+
inline-size: 100%;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
.wds-critical-banner--collapsed .wds-prompt__actions-wrapper {
|
|
113
|
-
max-
|
|
113
|
+
max-block-size: 0;
|
|
114
114
|
opacity: 0;
|
|
115
115
|
overflow: hidden;
|
|
116
116
|
pointer-events: none;
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
@container (max-width: 600px) {
|
|
119
119
|
.wds-critical-banner--with-two-actions .wds-prompt__actions-wrapper .wds-Button {
|
|
120
120
|
flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
|
|
121
|
-
min-
|
|
122
|
-
min-
|
|
121
|
+
min-inline-size: -moz-fit-content;
|
|
122
|
+
min-inline-size: fit-content;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
.wds-critical-banner-overhang-query {
|
|
@@ -139,22 +139,51 @@
|
|
|
139
139
|
)
|
|
140
140
|
100% 0 / var(--critical-banner-mobile-overhang-size)
|
|
141
141
|
var(--critical-banner-mobile-overhang-size) no-repeat;
|
|
142
|
-
margin-
|
|
143
|
-
margin-
|
|
142
|
+
margin-block-end: 32px;
|
|
143
|
+
margin-block-end: var(--critical-banner-mobile-overhang-size);
|
|
144
144
|
}
|
|
145
145
|
.wds-critical-banner-overhang-query .wds-critical-banner-overhang::after {
|
|
146
146
|
content: "";
|
|
147
147
|
position: absolute;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
inset-inline-end: 0;
|
|
149
|
+
inset-block-end: calc(-1 * var(--critical-banner-mobile-overhang-size));
|
|
150
|
+
inset-inline-start: 0;
|
|
151
|
+
block-size: var(--critical-banner-mobile-overhang-size);
|
|
152
152
|
pointer-events: none;
|
|
153
153
|
background: var(--critical-banner-background);
|
|
154
154
|
-webkit-mask: var(--critical-banner-overhang-mask);
|
|
155
155
|
mask: var(--critical-banner-overhang-mask);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
+
.wds-critical-banner__entry-mask {
|
|
159
|
+
display: grid;
|
|
160
|
+
grid-template-rows: 1fr;
|
|
161
|
+
overflow: visible;
|
|
162
|
+
}
|
|
163
|
+
.wds-critical-banner__entry-mask--animated {
|
|
164
|
+
grid-template-rows: 0fr;
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
animation: wds-critical-banner-reveal-height 400ms cubic-bezier(0.3, 0, 0.1, 1) 500ms both, wds-critical-banner-release-overflow 1ms linear 899ms both;
|
|
167
|
+
}
|
|
168
|
+
.wds-critical-banner__entry-track {
|
|
169
|
+
min-block-size: 0;
|
|
170
|
+
}
|
|
171
|
+
@keyframes wds-critical-banner-reveal-height {
|
|
172
|
+
from {
|
|
173
|
+
grid-template-rows: 0fr;
|
|
174
|
+
}
|
|
175
|
+
to {
|
|
176
|
+
grid-template-rows: 1fr;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
@keyframes wds-critical-banner-release-overflow {
|
|
180
|
+
from {
|
|
181
|
+
overflow: hidden;
|
|
182
|
+
}
|
|
183
|
+
to {
|
|
184
|
+
overflow: visible;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
158
187
|
@media (prefers-reduced-motion: reduce) {
|
|
159
188
|
.wds-critical-banner__description,
|
|
160
189
|
.wds-critical-banner__title,
|
|
@@ -162,4 +191,9 @@
|
|
|
162
191
|
.wds-critical-banner__toggle {
|
|
163
192
|
transition: none !important;
|
|
164
193
|
}
|
|
194
|
+
.wds-critical-banner__entry-mask--animated {
|
|
195
|
+
animation: none;
|
|
196
|
+
grid-template-rows: 1fr;
|
|
197
|
+
overflow: visible;
|
|
198
|
+
}
|
|
165
199
|
}
|
|
@@ -193,6 +193,45 @@
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
.wds-critical-banner__entry-mask {
|
|
197
|
+
display: grid;
|
|
198
|
+
grid-template-rows: 1fr;
|
|
199
|
+
overflow: visible;
|
|
200
|
+
|
|
201
|
+
// Clip only during the reveal, then release overflow so actions remain visible.
|
|
202
|
+
&--animated {
|
|
203
|
+
grid-template-rows: 0fr;
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
animation:
|
|
206
|
+
wds-critical-banner-reveal-height 400ms cubic-bezier(0.3, 0, 0.1, 1) 500ms both,
|
|
207
|
+
wds-critical-banner-release-overflow 1ms linear 899ms both;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.wds-critical-banner__entry-track {
|
|
212
|
+
min-height: 0;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@keyframes wds-critical-banner-reveal-height {
|
|
216
|
+
from {
|
|
217
|
+
grid-template-rows: 0fr;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
to {
|
|
221
|
+
grid-template-rows: 1fr;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@keyframes wds-critical-banner-release-overflow {
|
|
226
|
+
from {
|
|
227
|
+
overflow: hidden;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
to {
|
|
231
|
+
overflow: visible;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
196
235
|
// Reduced motion support
|
|
197
236
|
@media (prefers-reduced-motion: reduce) {
|
|
198
237
|
.wds-critical-banner__description,
|
|
@@ -201,4 +240,10 @@
|
|
|
201
240
|
.wds-critical-banner__toggle {
|
|
202
241
|
transition: none !important;
|
|
203
242
|
}
|
|
243
|
+
|
|
244
|
+
.wds-critical-banner__entry-mask--animated {
|
|
245
|
+
animation: none;
|
|
246
|
+
grid-template-rows: 1fr;
|
|
247
|
+
overflow: visible;
|
|
248
|
+
}
|
|
204
249
|
}
|
|
@@ -15,7 +15,7 @@ describe('CriticalBanner', () => {
|
|
|
15
15
|
resetLiveRegionAnnouncementQueue();
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
it('
|
|
18
|
+
it('applies mobile overhang classes by default', () => {
|
|
19
19
|
const { container } = render(
|
|
20
20
|
<CriticalBanner {...defaultProps} data-testid="critical-banner" />,
|
|
21
21
|
);
|
|
@@ -23,7 +23,30 @@ describe('CriticalBanner', () => {
|
|
|
23
23
|
expect(screen.getByTestId('critical-banner')).toBeInTheDocument();
|
|
24
24
|
expect(container.querySelector('.wds-critical-banner-overhang')).toBeInTheDocument();
|
|
25
25
|
expect(container.querySelector('.wds-critical-banner-overhang-query')).toBeInTheDocument();
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('applies the entry animation by default', () => {
|
|
29
|
+
const { container } = render(
|
|
30
|
+
<CriticalBanner {...defaultProps} data-testid="critical-banner" />,
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
expect(screen.getByTestId('critical-banner')).toBeInTheDocument();
|
|
34
|
+
expect(
|
|
35
|
+
container.querySelector('.wds-critical-banner__entry-mask--animated'),
|
|
36
|
+
).toBeInTheDocument();
|
|
37
|
+
expect(container.querySelector('.wds-critical-banner__entry-track')).toBeInTheDocument();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('can render without the entry animation', () => {
|
|
41
|
+
const { container } = render(
|
|
42
|
+
<CriticalBanner {...defaultProps} animateEntry={false} data-testid="critical-banner" />,
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
expect(screen.getByTestId('critical-banner')).toBeInTheDocument();
|
|
46
|
+
expect(container.querySelector('.wds-critical-banner__entry-mask')).toBeInTheDocument();
|
|
47
|
+
expect(
|
|
48
|
+
container.querySelector('.wds-critical-banner__entry-mask--animated'),
|
|
49
|
+
).not.toBeInTheDocument();
|
|
50
|
+
expect(container.querySelector('.wds-critical-banner__entry-track')).toBeInTheDocument();
|
|
28
51
|
});
|
|
29
52
|
});
|
|
@@ -24,6 +24,11 @@ export type CriticalBannerProps = {
|
|
|
24
24
|
label: ButtonProps['children'];
|
|
25
25
|
};
|
|
26
26
|
sentiment?: Exclude<PrimitivePromptProps['sentiment'], 'proposition'>;
|
|
27
|
+
/**
|
|
28
|
+
* Controls whether the banner plays its entry animation 500ms after mounting.
|
|
29
|
+
* Expand and collapse animations are unaffected.
|
|
30
|
+
*/
|
|
31
|
+
animateEntry?: boolean;
|
|
27
32
|
/**
|
|
28
33
|
* Controls whether the description and actions are visible, as a controlled component.
|
|
29
34
|
* When collapsed with a title, only the title is shown.
|
|
@@ -53,6 +58,7 @@ export const CriticalBanner = ({
|
|
|
53
58
|
media = {},
|
|
54
59
|
action,
|
|
55
60
|
actionSecondary,
|
|
61
|
+
animateEntry = true,
|
|
56
62
|
expanded: expandedProp,
|
|
57
63
|
onToggle,
|
|
58
64
|
id,
|
|
@@ -179,7 +185,15 @@ export const CriticalBanner = ({
|
|
|
179
185
|
actionSecondaryLabel: actionSecondary?.label,
|
|
180
186
|
})}
|
|
181
187
|
>
|
|
182
|
-
<div className="wds-critical-banner-overhang-query">
|
|
188
|
+
<div className="wds-critical-banner-overhang-query">
|
|
189
|
+
<div
|
|
190
|
+
className={clsx('wds-critical-banner__entry-mask', {
|
|
191
|
+
'wds-critical-banner__entry-mask--animated': animateEntry,
|
|
192
|
+
})}
|
|
193
|
+
>
|
|
194
|
+
<div className="wds-critical-banner__entry-track">{bannerSurface}</div>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
183
197
|
</LiveRegion>
|
|
184
198
|
);
|
|
185
199
|
};
|
|
@@ -66,7 +66,10 @@ Screen readers announce the banner content whenever:
|
|
|
66
66
|
|
|
67
67
|
## Reduced Motion
|
|
68
68
|
|
|
69
|
-
`CriticalBanner` respects the user's reduced motion preference. When reduced motion is on, the component does not show
|
|
69
|
+
`CriticalBanner` respects the user's reduced motion preference. When reduced motion is on, the component does not show:
|
|
70
|
+
|
|
71
|
+
- the entry animation that reveals the banner from above when it first appears
|
|
72
|
+
- the collapse and expand animation used when the user toggles the banner content
|
|
70
73
|
|
|
71
74
|
The same content is still rendered and announced. Reduced motion only removes the visual movement.
|
|
72
75
|
|