@transferwise/components 0.0.0-experimental-c1f5b0b → 0.0.0-experimental-fe160ab
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/Calendar/Calendar.constants.js +10 -0
- package/build/Calendar/Calendar.constants.js.map +1 -0
- package/build/Calendar/Calendar.constants.mjs +8 -0
- package/build/Calendar/Calendar.constants.mjs.map +1 -0
- package/build/Calendar/Calendar.js +116 -16
- package/build/Calendar/Calendar.js.map +1 -1
- package/build/Calendar/Calendar.messages.js +12 -0
- package/build/Calendar/Calendar.messages.js.map +1 -1
- package/build/Calendar/Calendar.messages.mjs +12 -0
- package/build/Calendar/Calendar.messages.mjs.map +1 -1
- package/build/Calendar/Calendar.mjs +117 -17
- package/build/Calendar/Calendar.mjs.map +1 -1
- package/build/Calendar/DateHeader/DateHeader.js +5 -1
- package/build/Calendar/DateHeader/DateHeader.js.map +1 -1
- package/build/Calendar/DateHeader/DateHeader.mjs +5 -1
- package/build/Calendar/DateHeader/DateHeader.mjs.map +1 -1
- package/build/Calendar/DayCalendar/DayCalendar.js +20 -2
- package/build/Calendar/DayCalendar/DayCalendar.js.map +1 -1
- package/build/Calendar/DayCalendar/DayCalendar.mjs +20 -2
- package/build/Calendar/DayCalendar/DayCalendar.mjs.map +1 -1
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.js +60 -19
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.js.map +1 -1
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.mjs +60 -19
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.mjs.map +1 -1
- package/build/Calendar/MonthCalendar/MonthCalendar.js +6 -0
- package/build/Calendar/MonthCalendar/MonthCalendar.js.map +1 -1
- package/build/Calendar/MonthCalendar/MonthCalendar.mjs +6 -0
- package/build/Calendar/MonthCalendar/MonthCalendar.mjs.map +1 -1
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.js +8 -3
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.js.map +1 -1
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.mjs +8 -3
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.mjs.map +1 -1
- package/build/Calendar/TableLink/TableLink.js +91 -0
- package/build/Calendar/TableLink/TableLink.js.map +1 -0
- package/build/Calendar/TableLink/TableLink.mjs +87 -0
- package/build/Calendar/TableLink/TableLink.mjs.map +1 -0
- package/build/Calendar/YearCalendar/Table/YearCalendarTable.js +8 -3
- package/build/Calendar/YearCalendar/Table/YearCalendarTable.js.map +1 -1
- package/build/Calendar/YearCalendar/Table/YearCalendarTable.mjs +8 -3
- package/build/Calendar/YearCalendar/Table/YearCalendarTable.mjs.map +1 -1
- package/build/Calendar/YearCalendar/YearCalendar.js +7 -0
- package/build/Calendar/YearCalendar/YearCalendar.js.map +1 -1
- package/build/Calendar/YearCalendar/YearCalendar.mjs +7 -0
- package/build/Calendar/YearCalendar/YearCalendar.mjs.map +1 -1
- package/build/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.js +33 -0
- package/build/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.js.map +1 -0
- package/build/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.mjs +31 -0
- package/build/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.mjs.map +1 -0
- package/build/Calendar/_helpers/isDateDisabled/isDateDisabled.js +40 -0
- package/build/Calendar/_helpers/isDateDisabled/isDateDisabled.js.map +1 -0
- package/build/Calendar/_helpers/isDateDisabled/isDateDisabled.mjs +38 -0
- package/build/Calendar/_helpers/isDateDisabled/isDateDisabled.mjs.map +1 -0
- package/build/DateLookup/DateLookup.js +20 -9
- package/build/DateLookup/DateLookup.js.map +1 -1
- package/build/DateLookup/DateLookup.mjs +20 -9
- package/build/DateLookup/DateLookup.mjs.map +1 -1
- package/build/i18n/en.json +4 -0
- package/build/i18n/en.json.js +4 -0
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +4 -0
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/index.js +2 -2
- package/build/index.mjs +1 -1
- package/build/main.css +8798 -4478
- package/build/styles/Accordion/Accordion.css +21 -23
- package/build/styles/AvatarLayout/AvatarLayout.css +11 -11
- package/build/styles/AvatarView/AvatarView.css +3 -3
- package/build/styles/AvatarView/Dot/Dot.css +3 -3
- package/build/styles/Button/Button.css +6 -6
- package/build/styles/Button/LegacyButton/LegacyButton.css +9 -3
- package/build/styles/Calendar/Calendar.css +119 -45
- package/build/styles/Calendar/TableLink/TableLink.css +115 -0
- package/build/styles/Carousel/Carousel.css +27 -28
- package/build/styles/CheckboxButton/CheckboxButton.css +15 -10
- package/build/styles/Chips/Chip/Chip.css +29 -26
- 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 +15 -9
- package/build/styles/DefinitionList/DefinitionList.css +83 -0
- package/build/styles/Dimmer/Dimmer.css +19 -9
- package/build/styles/Divider/Divider.css +7 -8
- package/build/styles/Drawer/Drawer.css +15 -16
- 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 +12 -13
- package/build/styles/FlowNavigation/AnimatedLabel/AnimatedLabel.css +5 -5
- package/build/styles/FlowNavigation/FlowNavigation.css +46 -25
- package/build/styles/Header/Header.css +9 -11
- package/build/styles/Image/Image.css +7 -7
- package/build/styles/Info/Info.css +1 -1
- package/build/styles/Inputs/Input/Input.css +25 -24
- 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 +2 -4
- package/build/styles/Inputs/SelectInput/OptionContent/SelectInputOptionContent.css +4 -4
- package/build/styles/Inputs/SelectInput/Options/SelectInputOptions.css +12 -17
- package/build/styles/Inputs/SelectInput/Popover/SelectInputPopover.css +4 -4
- package/build/styles/Inputs/SelectInput/SelectInput.css +49 -56
- package/build/styles/Inputs/TextArea/TextArea.css +27 -26
- package/build/styles/InstructionsList/InstructionsList.css +5 -5
- package/build/styles/Link/Link.css +8 -2
- package/build/styles/ListItem/ListItem.css +35 -38
- 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 +14 -15
- package/build/styles/MoneyInput/MoneyInput.css +20 -10
- package/build/styles/Nudge/Nudge.css +77 -49
- package/build/styles/PhoneNumberInput/PhoneNumberInput.css +9 -3
- package/build/styles/Popover/Popover.css +10 -13
- package/build/styles/Progress/Progress.css +3 -3
- package/build/styles/ProgressBar/ProgressBar.css +4 -4
- package/build/styles/PromoCard/PromoCard.css +42 -28
- package/build/styles/Prompt/ActionPrompt/ActionPrompt.css +9 -9
- package/build/styles/Prompt/CriticalBanner/CriticalBanner.css +23 -23
- package/build/styles/Prompt/InfoPrompt/InfoPrompt.css +15 -15
- package/build/styles/Prompt/InlinePrompt/InlinePrompt.css +6 -5
- package/build/styles/Prompt/PrimitivePrompt/PrimitivePrompt.css +8 -10
- package/build/styles/RadioGroup/RadioGroup.css +1 -1
- package/build/styles/Section/Section.css +6 -6
- package/build/styles/SegmentedControl/SegmentedControl.css +15 -18
- package/build/styles/SlidingPanel/SlidingPanel.css +40 -9
- package/build/styles/Snackbar/Snackbar.css +35 -21
- package/build/styles/Stepper/Stepper.css +15 -9
- package/build/styles/Sticky/Sticky.css +2 -2
- package/build/styles/Switch/Switch.css +7 -5
- package/build/styles/Table/Table.css +57 -60
- package/build/styles/Tabs/Tabs.css +14 -18
- package/build/styles/Tile/Tile.css +12 -12
- package/build/styles/Tooltip/Tooltip.css +2 -2
- package/build/styles/Typeahead/Typeahead.css +52 -40
- package/build/styles/Upload/Upload.css +10 -11
- package/build/styles/UploadInput/UploadButton/UploadButton.css +19 -20
- package/build/styles/UploadInput/UploadInput.css +4 -4
- package/build/styles/UploadInput/UploadItem/UploadItem.css +44 -45
- package/build/styles/_deprecated/ActionButton/ActionButton.css +6 -8
- 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 -8
- package/build/styles/_deprecated/Card/Card.css +18 -27
- 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 +19 -6
- package/build/styles/_deprecated/NavigationOptionsList/NavigationOptionsList.css +8 -3
- package/build/styles/_deprecated/OverlayHeader/OverlayHeader.css +6 -7
- package/build/styles/_deprecated/Select/Select.css +104 -57
- package/build/styles/_deprecated/Summary/Summary.css +30 -19
- package/build/styles/common/BaseCard/BaseCard.css +7 -3
- package/build/styles/common/BottomSheet/BottomSheet.css +18 -30
- 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 +44 -42
- package/build/styles/common/Panel/Panel.css +7 -7
- package/build/styles/css/accordion.css +52 -24
- package/build/styles/css/alerts.css +124 -56
- package/build/styles/css/badge.css +30 -20
- package/build/styles/css/breadcrumbs.css +4 -6
- package/build/styles/css/button-groups.css +258 -114
- package/build/styles/css/buttons.css +94 -49
- package/build/styles/css/chevron.css +6 -0
- package/build/styles/css/circles.css +76 -38
- package/build/styles/css/close.css +4 -1
- package/build/styles/css/column-layout.css +59 -37
- package/build/styles/css/currency-flags.css +17 -4
- package/build/styles/css/decision.css +12 -14
- package/build/styles/css/dropdowns.css +209 -58
- package/build/styles/css/droppable.css +38 -43
- package/build/styles/css/flex.css +136 -40
- package/build/styles/css/footer.css +14 -15
- package/build/styles/css/grid.css +1434 -381
- package/build/styles/css/input-groups.css +546 -252
- package/build/styles/css/link-callout.css +8 -2
- package/build/styles/css/list-group.css +92 -57
- package/build/styles/css/loaders.css +11 -11
- package/build/styles/css/media.css +34 -10
- package/build/styles/css/modals.css +59 -49
- package/build/styles/css/navbar.css +811 -371
- package/build/styles/css/navs.css +124 -59
- package/build/styles/css/neptune-social-media.css +44 -4
- package/build/styles/css/neptune.css +7118 -3155
- package/build/styles/css/panels.css +243 -143
- package/build/styles/css/popovers.css +295 -114
- package/build/styles/css/process.css +77 -64
- package/build/styles/css/progress-bars.css +21 -11
- package/build/styles/css/select.css +52 -20
- package/build/styles/css/sequences.css +219 -99
- package/build/styles/css/table.css +43 -48
- package/build/styles/css/tick.css +10 -10
- package/build/styles/css/tooltip.css +82 -49
- package/build/styles/css/utilities.css +40 -12
- package/build/styles/css/wells.css +16 -16
- package/build/styles/main.css +8798 -4478
- package/build/styles/styles/less/accordion.css +52 -24
- package/build/styles/styles/less/alerts.css +124 -56
- package/build/styles/styles/less/badge.css +30 -20
- package/build/styles/styles/less/breadcrumbs.css +4 -6
- package/build/styles/styles/less/button-groups.css +258 -114
- package/build/styles/styles/less/buttons.css +94 -49
- package/build/styles/styles/less/chevron.css +6 -0
- package/build/styles/styles/less/circles.css +76 -38
- package/build/styles/styles/less/close.css +4 -1
- package/build/styles/styles/less/column-layout.css +59 -37
- package/build/styles/styles/less/currency-flags.css +17 -4
- package/build/styles/styles/less/decision.css +12 -14
- package/build/styles/styles/less/dropdowns.css +209 -58
- package/build/styles/styles/less/droppable.css +38 -43
- package/build/styles/styles/less/flex.css +136 -40
- package/build/styles/styles/less/footer.css +14 -15
- package/build/styles/styles/less/forms/bootstrap-forms.css +348 -178
- package/build/styles/styles/less/forms/checkbox-radio.css +56 -29
- package/build/styles/styles/less/grid.css +1434 -381
- package/build/styles/styles/less/input-groups.css +546 -252
- package/build/styles/styles/less/link-callout.css +8 -2
- package/build/styles/styles/less/list-group.css +92 -57
- package/build/styles/styles/less/loaders.css +11 -11
- package/build/styles/styles/less/media.css +34 -10
- package/build/styles/styles/less/modals.css +59 -49
- package/build/styles/styles/less/navbar.css +811 -371
- package/build/styles/styles/less/navs.css +124 -59
- package/build/styles/styles/less/neptune-social-media.css +44 -4
- package/build/styles/styles/less/neptune.css +7118 -3155
- package/build/styles/styles/less/panels.css +243 -143
- package/build/styles/styles/less/popovers.css +295 -114
- package/build/styles/styles/less/process.css +77 -64
- package/build/styles/styles/less/progress-bars.css +21 -11
- package/build/styles/styles/less/select.css +52 -20
- package/build/styles/styles/less/sequences.css +219 -99
- package/build/styles/styles/less/table.css +43 -48
- package/build/styles/styles/less/tick.css +10 -10
- package/build/styles/styles/less/tooltip.css +82 -49
- package/build/styles/styles/less/utilities.css +40 -12
- package/build/styles/styles/less/wells.css +16 -16
- package/build/types/Calendar/Calendar.constants.d.ts +2 -0
- package/build/types/Calendar/Calendar.constants.d.ts.map +1 -0
- package/build/types/Calendar/Calendar.d.ts +16 -3
- package/build/types/Calendar/Calendar.d.ts.map +1 -1
- package/build/types/Calendar/Calendar.messages.d.ts +20 -0
- package/build/types/Calendar/Calendar.messages.d.ts.map +1 -1
- package/build/types/Calendar/Calendar.types.d.ts +32 -0
- package/build/types/Calendar/Calendar.types.d.ts.map +1 -0
- package/build/types/Calendar/DateHeader/DateHeader.d.ts +2 -0
- package/build/types/Calendar/DateHeader/DateHeader.d.ts.map +1 -1
- package/build/types/Calendar/DayCalendar/DayCalendar.d.ts +7 -1
- package/build/types/Calendar/DayCalendar/DayCalendar.d.ts.map +1 -1
- package/build/types/Calendar/DayCalendar/Table/DayCalendarTable.d.ts +6 -0
- package/build/types/Calendar/DayCalendar/Table/DayCalendarTable.d.ts.map +1 -1
- package/build/types/Calendar/MonthCalendar/MonthCalendar.d.ts +1 -0
- package/build/types/Calendar/MonthCalendar/MonthCalendar.d.ts.map +1 -1
- package/build/types/Calendar/MonthCalendar/Table/MonthCalendarTable.d.ts +2 -1
- package/build/types/Calendar/MonthCalendar/Table/MonthCalendarTable.d.ts.map +1 -1
- package/build/types/Calendar/{tableLink → TableLink}/TableLink.d.ts +5 -1
- package/build/types/Calendar/TableLink/TableLink.d.ts.map +1 -0
- package/build/types/Calendar/TableLink/index.d.ts.map +1 -0
- package/build/types/Calendar/YearCalendar/Table/YearCalendarTable.d.ts +2 -1
- package/build/types/Calendar/YearCalendar/Table/YearCalendarTable.d.ts.map +1 -1
- package/build/types/Calendar/YearCalendar/YearCalendar.d.ts +1 -0
- package/build/types/Calendar/YearCalendar/YearCalendar.d.ts.map +1 -1
- package/build/types/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.d.ts +3 -0
- package/build/types/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.d.ts.map +1 -0
- package/build/types/Calendar/_helpers/index.d.ts +3 -0
- package/build/types/Calendar/_helpers/index.d.ts.map +1 -0
- package/build/types/Calendar/_helpers/isDateDisabled/isDateDisabled.d.ts +3 -0
- package/build/types/Calendar/_helpers/isDateDisabled/isDateDisabled.d.ts.map +1 -0
- package/build/types/Calendar/index.d.ts +1 -0
- package/build/types/Calendar/index.d.ts.map +1 -1
- package/build/types/DateLookup/DateLookup.d.ts +24 -5
- package/build/types/DateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/DateLookup/index.d.ts +1 -0
- package/build/types/DateLookup/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/test-utils/index.d.ts +8 -0
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Accordion/Accordion.css +21 -23
- package/src/Accordion/Accordion.less +4 -3
- package/src/AvatarLayout/AvatarLayout.css +11 -11
- package/src/AvatarView/AvatarView.css +3 -3
- package/src/AvatarView/Dot/Dot.css +3 -3
- package/src/Button/Button.css +6 -6
- package/src/Button/LegacyButton/LegacyButton.css +9 -3
- package/src/Button/LegacyButton/LegacyButton.less +3 -1
- package/src/Calendar/Calendar.constants.ts +5 -0
- package/src/Calendar/Calendar.css +119 -45
- package/src/Calendar/Calendar.disabledDates.test.tsx +593 -0
- package/src/Calendar/Calendar.less +5 -35
- package/src/Calendar/Calendar.messages.ts +21 -0
- package/src/Calendar/Calendar.test.tsx +310 -28
- package/src/Calendar/Calendar.tsx +159 -18
- package/src/Calendar/Calendar.types.ts +35 -0
- package/src/Calendar/DateHeader/DateHeader.tsx +6 -0
- package/src/Calendar/DayCalendar/DayCalendar.tsx +39 -1
- package/src/Calendar/DayCalendar/Table/DayCalendarTable.tsx +67 -27
- package/src/Calendar/MonthCalendar/MonthCalendar.tsx +8 -0
- package/src/Calendar/MonthCalendar/Table/MonthCalendarTable.tsx +15 -3
- package/src/Calendar/TableLink/TableLink.css +115 -0
- package/src/Calendar/TableLink/TableLink.less +68 -0
- package/src/Calendar/TableLink/TableLink.tsx +112 -0
- package/src/Calendar/YearCalendar/Table/YearCalendarTable.tsx +15 -3
- package/src/Calendar/YearCalendar/YearCalendar.tsx +9 -0
- package/src/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.test.ts +98 -0
- package/src/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.ts +45 -0
- package/src/Calendar/_helpers/index.ts +2 -0
- package/src/Calendar/_helpers/isDateDisabled/isDateDisabled.test.ts +169 -0
- package/src/Calendar/_helpers/isDateDisabled/isDateDisabled.ts +59 -0
- package/src/Calendar/_stories/Calendar.accessibility.docs.mdx +118 -0
- package/src/Calendar/_stories/Calendar.story.tsx +138 -4
- package/src/Calendar/_stories/Calendar.test.story.tsx +114 -0
- package/src/Calendar/index.ts +7 -0
- package/src/Carousel/Carousel.css +27 -28
- package/src/CheckboxButton/CheckboxButton.css +15 -10
- package/src/CheckboxButton/CheckboxButton.less +4 -4
- package/src/Chips/Chip/Chip.css +29 -26
- package/src/Chips/Chip/Chip.less +3 -5
- package/src/Container/Container.css +5 -5
- package/src/DateInput/DateInput.css +4 -4
- package/src/DateLookup/DateLookup.css +1 -1
- package/src/DateLookup/DateLookup.disabledDates.test.tsx +293 -0
- package/src/DateLookup/DateLookup.test.tsx +34 -37
- package/src/DateLookup/DateLookup.tsx +37 -13
- package/src/DateLookup/DateTrigger/DateTrigger.css +15 -9
- package/src/DateLookup/DateTrigger/DateTrigger.less +2 -1
- package/src/DateLookup/_stories/DateLookup.accessibility.docs.mdx +108 -0
- package/src/DateLookup/_stories/DateLookup.story.tsx +124 -2
- package/src/DateLookup/index.ts +6 -0
- package/src/Decision/Decision.less +2 -0
- package/src/DefinitionList/DefinitionList.css +83 -0
- package/src/DefinitionList/DefinitionList.less +3 -1
- package/src/Dimmer/Dimmer.css +19 -9
- package/src/Dimmer/Dimmer.less +3 -2
- package/src/Divider/Divider.css +7 -8
- package/src/Drawer/Drawer.css +15 -16
- 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/ExpressiveMoneyInput.css +11 -11
- package/src/Field/Field.css +12 -13
- package/src/FlowNavigation/AnimatedLabel/AnimatedLabel.css +5 -5
- package/src/FlowNavigation/FlowNavigation.css +46 -25
- package/src/Header/Header.css +9 -11
- package/src/Image/Image.css +7 -7
- package/src/Info/Info.css +1 -1
- package/src/Inputs/Input/Input.css +25 -24
- 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 +2 -4
- package/src/Inputs/SelectInput/OptionContent/SelectInputOptionContent.css +4 -4
- package/src/Inputs/SelectInput/Options/SelectInputOptions.css +12 -17
- package/src/Inputs/SelectInput/Popover/SelectInputPopover.css +4 -4
- package/src/Inputs/SelectInput/SelectInput.css +49 -56
- package/src/Inputs/TextArea/TextArea.css +27 -26
- package/src/InstructionsList/InstructionsList.css +5 -5
- package/src/Link/Link.css +8 -2
- package/src/Link/Link.less +3 -3
- package/src/ListItem/ListItem.css +35 -38
- package/src/ListItem/ListItem.grid.css +7 -7
- package/src/Loader/Loader.css +31 -31
- package/src/Logo/Logo.css +2 -2
- package/src/Modal/Modal.css +14 -15
- package/src/MoneyInput/MoneyInput.css +20 -10
- package/src/MoneyInput/MoneyInput.less +3 -2
- package/src/Nudge/Nudge.css +77 -49
- package/src/Nudge/Nudge.less +8 -0
- package/src/PhoneNumberInput/PhoneNumberInput.css +9 -3
- package/src/PhoneNumberInput/PhoneNumberInput.less +3 -1
- package/src/Popover/Popover.css +10 -13
- package/src/Progress/Progress.css +3 -3
- package/src/ProgressBar/ProgressBar.css +4 -4
- package/src/PromoCard/PromoCard.css +42 -28
- package/src/PromoCard/PromoCard.less +32 -24
- package/src/Prompt/ActionPrompt/ActionPrompt.css +9 -9
- package/src/Prompt/CriticalBanner/CriticalBanner.css +23 -23
- package/src/Prompt/InfoPrompt/InfoPrompt.css +15 -15
- package/src/Prompt/InlinePrompt/InlinePrompt.css +6 -5
- package/src/Prompt/PrimitivePrompt/PrimitivePrompt.css +8 -10
- package/src/RadioGroup/RadioGroup.css +1 -1
- package/src/Section/Section.css +6 -6
- package/src/SegmentedControl/SegmentedControl.css +15 -18
- package/src/SlidingPanel/SlidingPanel.css +40 -9
- package/src/SlidingPanel/SlidingPanel.less +4 -4
- package/src/Snackbar/Snackbar.css +35 -21
- package/src/Snackbar/Snackbar.less +9 -3
- package/src/Stepper/Stepper.css +15 -9
- package/src/Stepper/Stepper.less +1 -1
- package/src/Sticky/Sticky.css +2 -2
- package/src/Sticky/Sticky.less +4 -1
- package/src/Switch/Switch.css +7 -5
- package/src/Table/Table.css +57 -60
- package/src/Tabs/Tabs.css +14 -18
- package/src/Tabs/Tabs.less +1 -0
- package/src/Tile/Tile.css +12 -12
- package/src/Tooltip/Tooltip.css +2 -2
- package/src/Typeahead/Typeahead.css +52 -40
- package/src/Typeahead/Typeahead.less +3 -2
- package/src/Upload/Upload.css +10 -11
- package/src/UploadInput/UploadButton/UploadButton.css +19 -20
- package/src/UploadInput/UploadInput.css +4 -4
- package/src/UploadInput/UploadItem/UploadItem.css +44 -45
- package/src/_deprecated/ActionButton/ActionButton.css +6 -8
- package/src/_deprecated/Alert/Alert.css +2 -2
- package/src/_deprecated/Avatar/Avatar.css +65 -65
- package/src/_deprecated/Avatar/Avatar.less +1 -0
- package/src/_deprecated/Badge/Badge.css +12 -8
- package/src/_deprecated/Badge/Badge.less +13 -13
- package/src/_deprecated/Card/Card.css +18 -27
- package/src/_deprecated/Card/Card.less +2 -1
- package/src/_deprecated/CriticalBanner/CriticalCommsBanner.css +7 -7
- package/src/_deprecated/LegacyListItem/LegacyListItem.css +1 -1
- package/src/_deprecated/NavigationOption/NavigationOption.css +19 -6
- package/src/_deprecated/NavigationOption/NavigationOption.less +4 -3
- package/src/_deprecated/NavigationOptionsList/NavigationOptionsList.css +8 -3
- package/src/_deprecated/NavigationOptionsList/NavigationOptionsList.less +3 -1
- package/src/_deprecated/OverlayHeader/OverlayHeader.css +6 -7
- package/src/_deprecated/Select/Select.css +104 -57
- package/src/_deprecated/Select/Select.less +11 -10
- package/src/_deprecated/Summary/Summary.css +30 -19
- package/src/_deprecated/Summary/Summary.less +8 -1
- package/src/common/BaseCard/BaseCard.css +7 -3
- package/src/common/BaseCard/BaseCard.less +5 -0
- package/src/common/BottomSheet/BottomSheet.css +18 -30
- 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 +44 -42
- package/src/common/Option/Option.less +10 -8
- package/src/common/Panel/Panel.css +7 -7
- package/src/i18n/en.json +4 -0
- package/src/index.ts +3 -2
- package/src/main.css +8798 -4478
- package/src/styles/less/accordion.css +52 -24
- package/src/styles/less/alerts.css +124 -56
- package/src/styles/less/badge.css +30 -20
- package/src/styles/less/breadcrumbs.css +4 -6
- package/src/styles/less/button-groups.css +258 -114
- package/src/styles/less/buttons.css +94 -49
- package/src/styles/less/buttons.less +10 -2
- package/src/styles/less/chevron.css +6 -0
- package/src/styles/less/circles.css +76 -38
- package/src/styles/less/close.css +4 -1
- package/src/styles/less/column-layout.css +59 -37
- package/src/styles/less/currency-flags.css +17 -4
- package/src/styles/less/decision.css +12 -14
- package/src/styles/less/dropdowns.css +209 -58
- package/src/styles/less/droppable.css +38 -43
- package/src/styles/less/flex.css +136 -40
- package/src/styles/less/footer.css +14 -15
- package/src/styles/less/forms/bootstrap-forms.css +348 -178
- package/src/styles/less/forms/checkbox-radio.css +56 -29
- package/src/styles/less/grid.css +1434 -381
- package/src/styles/less/input-groups.css +546 -252
- package/src/styles/less/link-callout.css +8 -2
- package/src/styles/less/list-group.css +92 -57
- package/src/styles/less/loaders.css +11 -11
- package/src/styles/less/media.css +34 -10
- package/src/styles/less/mixins/_logical-properties.less +2 -2
- package/src/styles/less/mixins/_physical-properties.less +5 -77
- package/src/styles/less/modals.css +59 -49
- package/src/styles/less/navbar.css +811 -371
- package/src/styles/less/navs.css +124 -59
- package/src/styles/less/neptune-social-media.css +44 -4
- package/src/styles/less/neptune-social-media.less +18 -4
- package/src/styles/less/neptune.css +7118 -3155
- package/src/styles/less/panels.css +243 -143
- package/src/styles/less/popovers.css +295 -114
- package/src/styles/less/process.css +77 -64
- package/src/styles/less/progress-bars.css +21 -11
- package/src/styles/less/progress-bars.less +6 -1
- package/src/styles/less/select.css +52 -20
- package/src/styles/less/sequences.css +219 -99
- package/src/styles/less/table.css +43 -48
- package/src/styles/less/tick.css +10 -10
- package/src/styles/less/tooltip.css +82 -49
- package/src/styles/less/utilities.css +40 -12
- package/src/styles/less/wells.css +16 -16
- package/build/Calendar/tableLink/TableLink.js +0 -61
- package/build/Calendar/tableLink/TableLink.js.map +0 -1
- package/build/Calendar/tableLink/TableLink.mjs +0 -57
- package/build/Calendar/tableLink/TableLink.mjs.map +0 -1
- package/build/types/Calendar/tableLink/TableLink.d.ts.map +0 -1
- package/build/types/Calendar/tableLink/index.d.ts.map +0 -1
- package/src/Calendar/tableLink/TableLink.tsx +0 -77
- /package/build/types/Calendar/{tableLink → TableLink}/index.d.ts +0 -0
- /package/src/Calendar/{tableLink → TableLink}/index.ts +0 -0
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: center;
|
|
25
25
|
overflow: hidden;
|
|
26
|
-
min-
|
|
27
|
-
min-
|
|
28
|
-
padding-
|
|
29
|
-
padding-
|
|
26
|
+
min-height: 32px;
|
|
27
|
+
min-height: var(--size-32);
|
|
28
|
+
padding-bottom: 16px;
|
|
29
|
+
padding-bottom: var(--size-16);
|
|
30
30
|
}
|
|
31
31
|
.carousel__card,
|
|
32
32
|
.carousel__card:hover,
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
.carousel__card {
|
|
41
41
|
display: block;
|
|
42
42
|
position: relative;
|
|
43
|
-
text-align:
|
|
43
|
+
text-align: left;
|
|
44
44
|
border: none;
|
|
45
45
|
overflow: hidden;
|
|
46
46
|
background: rgba(134,167,189,0.10196);
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
}
|
|
54
54
|
@media (min-width: 1160px) {
|
|
55
55
|
.carousel__card {
|
|
56
|
-
min-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
min-width: 280px;
|
|
57
|
+
width: 280px;
|
|
58
|
+
height: 280px;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
@media (min-width: 840px) {
|
|
@@ -63,23 +63,22 @@
|
|
|
63
63
|
overflow: visible;
|
|
64
64
|
}
|
|
65
65
|
.carousel {
|
|
66
|
-
margin
|
|
67
|
-
margin
|
|
68
|
-
margin-inline: calc(-1 * var(--size-8));
|
|
66
|
+
margin: 0 calc(-1 * 8px);
|
|
67
|
+
margin: 0 calc(-1 * var(--size-8));
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
@media (max-width: 1159.98px) {
|
|
72
71
|
.carousel__card {
|
|
73
|
-
min-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
min-width: 242px;
|
|
73
|
+
width: 242px;
|
|
74
|
+
height: 242px;
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
77
|
@media (max-width: 839.98px) {
|
|
79
78
|
.carousel__card {
|
|
80
|
-
min-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
min-width: 336px;
|
|
80
|
+
width: 336px;
|
|
81
|
+
height: 336px;
|
|
83
82
|
scroll-snap-stop: always;
|
|
84
83
|
}
|
|
85
84
|
}
|
|
@@ -95,7 +94,7 @@
|
|
|
95
94
|
background-color: var(--color-background-neutral-hover);
|
|
96
95
|
}
|
|
97
96
|
.carousel__card-content {
|
|
98
|
-
|
|
97
|
+
height: 100%;
|
|
99
98
|
font-weight: normal;
|
|
100
99
|
padding: 24px;
|
|
101
100
|
padding: var(--size-24);
|
|
@@ -103,16 +102,16 @@
|
|
|
103
102
|
.carousel__indicators {
|
|
104
103
|
display: flex;
|
|
105
104
|
justify-content: center;
|
|
106
|
-
padding-
|
|
107
|
-
padding-
|
|
105
|
+
padding-top: 8px;
|
|
106
|
+
padding-top: var(--size-8);
|
|
108
107
|
gap: 8px;
|
|
109
108
|
gap: var(--size-8);
|
|
110
109
|
}
|
|
111
110
|
.carousel__indicator {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
width: 12px;
|
|
112
|
+
width: var(--size-12);
|
|
113
|
+
height: 12px;
|
|
114
|
+
height: var(--size-12);
|
|
116
115
|
border-radius: 8px;
|
|
117
116
|
border-radius: var(--size-8);
|
|
118
117
|
background: #c9cbce;
|
|
@@ -124,12 +123,12 @@
|
|
|
124
123
|
transition: all 0.1s;
|
|
125
124
|
}
|
|
126
125
|
.carousel__indicator:hover {
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
width: 16px;
|
|
127
|
+
width: var(--size-16);
|
|
129
128
|
}
|
|
130
129
|
.carousel__indicator--selected,
|
|
131
130
|
.carousel__indicator--selected:hover {
|
|
132
131
|
background: var(--color-interactive-primary);
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
width: 24px;
|
|
133
|
+
width: var(--size-24);
|
|
135
134
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
.np-checkbox-button input[type="checkbox"] {
|
|
2
2
|
position: absolute;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
width: 24px;
|
|
4
|
+
width: var(--size-24);
|
|
5
|
+
height: 24px;
|
|
6
|
+
height: var(--size-24);
|
|
7
7
|
opacity: 0;
|
|
8
8
|
}
|
|
9
9
|
.np-checkbox-button input[type="checkbox"]:not(:disabled) {
|
|
@@ -14,20 +14,25 @@
|
|
|
14
14
|
pointer-events: none;
|
|
15
15
|
}
|
|
16
16
|
.checkbox .np-checkbox-button input[type="checkbox"] {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
top: 0;
|
|
18
|
+
left: 0;
|
|
19
19
|
margin: 0;
|
|
20
20
|
}
|
|
21
|
+
[dir="rtl"] .checkbox .np-checkbox-button input[type="checkbox"] {
|
|
22
|
+
right: 0;
|
|
23
|
+
left: auto;
|
|
24
|
+
left: initial;
|
|
25
|
+
}
|
|
21
26
|
.np-tw-checkbox-indeterminate {
|
|
22
27
|
position: relative;
|
|
23
28
|
}
|
|
24
29
|
.np-tw-checkbox-indeterminate::after {
|
|
25
30
|
content: "";
|
|
26
31
|
position: absolute;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
width: 12px;
|
|
33
|
+
height: 2px;
|
|
34
|
+
top: 55%;
|
|
35
|
+
left: 50%;
|
|
31
36
|
background: #ffffff;
|
|
32
37
|
background: var(--color-background-screen);
|
|
33
38
|
transform: translate(-50%, -50%);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import (reference) "./../styles/variables/neptune-tokens.less";
|
|
2
|
+
@import (reference) "./../styles/less/mixins/_logical-properties.less";
|
|
2
3
|
|
|
3
4
|
.np-checkbox-button {
|
|
4
5
|
input[type="checkbox"] {
|
|
@@ -13,8 +14,7 @@
|
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
.tw-checkbox-check,
|
|
17
|
-
.np-tw-checkbox-indeterminate {
|
|
17
|
+
.tw-checkbox-check, .np-tw-checkbox-indeterminate {
|
|
18
18
|
pointer-events: none;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
.checkbox .np-checkbox-button {
|
|
23
23
|
input[type="checkbox"] {
|
|
24
24
|
top: 0;
|
|
25
|
-
left
|
|
25
|
+
.left(0);
|
|
26
26
|
|
|
27
27
|
margin: 0;
|
|
28
28
|
}
|
|
@@ -47,4 +47,4 @@
|
|
|
47
47
|
background-color: var(--color-interactive-negative);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}
|
package/src/Chips/Chip/Chip.css
CHANGED
|
@@ -6,32 +6,36 @@
|
|
|
6
6
|
border-radius: var(--size-16);
|
|
7
7
|
color: #5d7079;
|
|
8
8
|
color: var(--color-content-secondary);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
margin-
|
|
12
|
-
margin-
|
|
13
|
-
padding
|
|
14
|
-
padding
|
|
15
|
-
padding-inline: var(--size-12);
|
|
9
|
+
height: 32px;
|
|
10
|
+
height: var(--size-32);
|
|
11
|
+
margin-right: 8px;
|
|
12
|
+
margin-right: var(--size-8);
|
|
13
|
+
padding: 0 12px;
|
|
14
|
+
padding: 0 var(--size-12);
|
|
16
15
|
transition: color 0.15s ease-in-out, border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
|
|
17
16
|
}
|
|
18
17
|
@media (max-width: 320px) {
|
|
19
18
|
.np-chip {
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
height: 40px;
|
|
20
|
+
height: var(--size-40);
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
.np-chip:hover {
|
|
25
24
|
cursor: pointer;
|
|
26
25
|
}
|
|
27
26
|
.np-chip .np-chip-label {
|
|
28
|
-
padding-
|
|
27
|
+
padding-top: 2px;
|
|
29
28
|
}
|
|
30
29
|
.np-chip .np-close-button {
|
|
31
30
|
pointer-events: auto;
|
|
32
31
|
}
|
|
33
32
|
.np-chip:last-child {
|
|
34
|
-
margin-
|
|
33
|
+
margin-right: 0;
|
|
34
|
+
}
|
|
35
|
+
[dir="rtl"] .np-chip:last-child {
|
|
36
|
+
margin-left: 0;
|
|
37
|
+
margin-right: 0;
|
|
38
|
+
margin-right: initial;
|
|
35
39
|
}
|
|
36
40
|
.np-chip:active {
|
|
37
41
|
background-color: #0081ba;
|
|
@@ -87,9 +91,8 @@
|
|
|
87
91
|
font-weight: 600;
|
|
88
92
|
font-weight: var(--font-weight-semi-bold);
|
|
89
93
|
color: var(--color-interactive-primary);
|
|
90
|
-
padding
|
|
91
|
-
padding
|
|
92
|
-
padding-inline: var(--size-16);
|
|
94
|
+
padding: 0 16px;
|
|
95
|
+
padding: 0 var(--size-16);
|
|
93
96
|
border-color: #c9cbce;
|
|
94
97
|
border-color: var(--color-interactive-secondary);
|
|
95
98
|
}
|
|
@@ -106,8 +109,8 @@
|
|
|
106
109
|
border-color: var(--color-interactive-secondary-active);
|
|
107
110
|
}
|
|
108
111
|
.np-theme-personal .np-chip .np-close-button {
|
|
109
|
-
margin-
|
|
110
|
-
margin-
|
|
112
|
+
margin-right: calc(8px * -1);
|
|
113
|
+
margin-right: calc(var(--size-8) * -1);
|
|
111
114
|
border-radius: inherit;
|
|
112
115
|
}
|
|
113
116
|
.np-theme-personal .np-chip .np-close-button,
|
|
@@ -135,24 +138,24 @@
|
|
|
135
138
|
position: relative;
|
|
136
139
|
}
|
|
137
140
|
.np-theme-personal .np-chip.np-chip--removable .np-text-body-default-bold {
|
|
138
|
-
padding-
|
|
139
|
-
padding-
|
|
141
|
+
padding-right: 24px;
|
|
142
|
+
padding-right: var(--size-24);
|
|
140
143
|
}
|
|
141
144
|
@media (max-width: 320px) {
|
|
142
145
|
.np-theme-personal .np-chip.np-chip--removable .np-text-body-default-bold {
|
|
143
|
-
padding-
|
|
144
|
-
padding-
|
|
146
|
+
padding-right: 48px;
|
|
147
|
+
padding-right: var(--size-48);
|
|
145
148
|
}
|
|
146
149
|
}
|
|
147
150
|
.np-theme-personal .np-chip.np-chip--removable .np-close-button {
|
|
148
151
|
justify-content: flex-end;
|
|
149
|
-
|
|
150
|
-
|
|
152
|
+
top: 0;
|
|
153
|
+
left: 0;
|
|
151
154
|
position: absolute;
|
|
152
|
-
padding-
|
|
153
|
-
padding-
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
padding-right: 8px;
|
|
156
|
+
padding-right: var(--size-8);
|
|
157
|
+
height: 100%;
|
|
158
|
+
width: 100%;
|
|
156
159
|
}
|
|
157
160
|
.np-theme-personal .np-chip:has(.disabled, :disabled):focus-visible {
|
|
158
161
|
outline: none;
|
package/src/Chips/Chip/Chip.less
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import (reference) "./../../styles/variables/neptune-tokens.less";
|
|
2
|
+
@import (reference) "./../../styles/less/mixins/_logical-properties.less";
|
|
2
3
|
@import (reference) "./../../styles/less/ring.less";
|
|
3
4
|
|
|
4
5
|
.np-chip {
|
|
@@ -9,10 +10,7 @@
|
|
|
9
10
|
height: var(--size-32);
|
|
10
11
|
margin-right: var(--size-8);
|
|
11
12
|
padding: 0 var(--size-12);
|
|
12
|
-
transition:
|
|
13
|
-
color 0.15s ease-in-out,
|
|
14
|
-
border-color 0.15s ease-in-out,
|
|
15
|
-
background-color 0.15s ease-in-out;
|
|
13
|
+
transition: color 0.15s ease-in-out, border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
|
|
16
14
|
|
|
17
15
|
@media (--screen-400-zoom) {
|
|
18
16
|
height: var(--size-40);
|
|
@@ -31,7 +29,7 @@
|
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
&:last-child {
|
|
34
|
-
margin
|
|
32
|
+
.margin(right, 0);
|
|
35
33
|
}
|
|
36
34
|
|
|
37
35
|
&:active {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
--wds-container-width-standard: 1160px;
|
|
5
5
|
--wds-container-width-narrow: 840px;
|
|
6
6
|
--wds-container-width-compact: 600px;
|
|
7
|
-
|
|
7
|
+
width: 100%;
|
|
8
8
|
margin-inline: auto;
|
|
9
9
|
padding-inline: 16px;
|
|
10
10
|
padding-inline: var(--wds-container-padding-inline);
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
.wds-container--standard {
|
|
28
|
-
max-
|
|
28
|
+
max-width: var(--wds-container-width-standard);
|
|
29
29
|
}
|
|
30
30
|
.wds-container--narrow {
|
|
31
|
-
max-
|
|
31
|
+
max-width: var(--wds-container-width-narrow);
|
|
32
32
|
}
|
|
33
33
|
.wds-container--compact {
|
|
34
|
-
max-
|
|
34
|
+
max-width: var(--wds-container-width-compact);
|
|
35
35
|
}
|
|
36
36
|
.wds-container--fluid {
|
|
37
|
-
max-
|
|
37
|
+
max-width: var(--wds-container-width-fluid);
|
|
38
38
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
.tw-date label {
|
|
2
|
-
|
|
2
|
+
width: 100%;
|
|
3
3
|
}
|
|
4
4
|
.tw-date .tw-date--year label {
|
|
5
|
-
margin-
|
|
5
|
+
margin-bottom: 0;
|
|
6
6
|
}
|
|
7
7
|
.tw-date .tw-date--year,
|
|
8
8
|
.tw-date .tw-date--month,
|
|
9
9
|
.tw-date .tw-date--day {
|
|
10
|
-
margin-
|
|
10
|
+
margin-bottom: 0;
|
|
11
11
|
}
|
|
12
12
|
@media (min-width: 600px) {
|
|
13
13
|
.np-theme-personal .tw-date label {
|
|
14
|
-
margin-
|
|
14
|
+
margin-bottom: 0;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { mockMatchMedia, mockResizeObserver, render, screen, userEvent } from '../test-utils';
|
|
2
|
+
import DateLookup from './DateLookup';
|
|
3
|
+
import type { DisabledRules } from '../Calendar/Calendar.types';
|
|
4
|
+
|
|
5
|
+
import { act } from 'react';
|
|
6
|
+
|
|
7
|
+
const user = userEvent.setup({ advanceTimers: jest.advanceTimersByTimeAsync });
|
|
8
|
+
|
|
9
|
+
mockMatchMedia();
|
|
10
|
+
mockResizeObserver();
|
|
11
|
+
|
|
12
|
+
const initialValue = new Date(2024, 6, 1);
|
|
13
|
+
|
|
14
|
+
const weekendRules: DisabledRules = {
|
|
15
|
+
weekdays: ['sat', 'sun'],
|
|
16
|
+
reason: 'We are closed on weekends.',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const bankHolidayRules: DisabledRules = {
|
|
20
|
+
dates: [new Date(2024, 6, 4)],
|
|
21
|
+
reason: 'Bank holiday.',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
describe('DateLookup - disabled dates', () => {
|
|
25
|
+
beforeEach(() => {
|
|
26
|
+
jest.useFakeTimers();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
afterEach(async () => {
|
|
30
|
+
await jest.runOnlyPendingTimersAsync();
|
|
31
|
+
jest.useRealTimers();
|
|
32
|
+
jest.clearAllMocks();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const openDateLookup = async () => {
|
|
36
|
+
await user.click(screen.getByRole('button'));
|
|
37
|
+
await act(async () => {
|
|
38
|
+
await jest.runOnlyPendingTimersAsync();
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
describe('panel behavior with rule-disabled dates', () => {
|
|
43
|
+
it('does NOT close when a rule-disabled date is clicked', async () => {
|
|
44
|
+
render(
|
|
45
|
+
<DateLookup value={initialValue} disabledRules={bankHolidayRules} onChange={jest.fn()} />,
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
await openDateLookup();
|
|
49
|
+
const holiday = screen.getByLabelText(/^4 July 2024/u);
|
|
50
|
+
await user.click(holiday);
|
|
51
|
+
|
|
52
|
+
expect(screen.getByRole('dialog')).toBeInTheDocument();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('closes when an enabled date is clicked', async () => {
|
|
56
|
+
const handleChange = jest.fn();
|
|
57
|
+
render(
|
|
58
|
+
<DateLookup
|
|
59
|
+
value={initialValue}
|
|
60
|
+
disabledRules={bankHolidayRules}
|
|
61
|
+
onChange={handleChange}
|
|
62
|
+
/>,
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
await openDateLookup();
|
|
66
|
+
const enabledDate = screen.getByLabelText(/^3 July 2024/u);
|
|
67
|
+
await user.click(enabledDate);
|
|
68
|
+
|
|
69
|
+
await act(async () => {
|
|
70
|
+
await jest.runOnlyPendingTimersAsync();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
expect(screen.queryByRole('dialog')).not.toBeInTheDocument();
|
|
74
|
+
expect(handleChange).toHaveBeenCalledWith(new Date(2024, 6, 3));
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
describe('panel behavior with out-of-range dates', () => {
|
|
79
|
+
const minDate = new Date(2024, 6, 3);
|
|
80
|
+
const maxDate = new Date(2024, 6, 25);
|
|
81
|
+
|
|
82
|
+
it('does NOT close when an out-of-range date is clicked', async () => {
|
|
83
|
+
render(
|
|
84
|
+
<DateLookup
|
|
85
|
+
value={new Date(2024, 6, 5)}
|
|
86
|
+
min={minDate}
|
|
87
|
+
max={maxDate}
|
|
88
|
+
onChange={jest.fn()}
|
|
89
|
+
/>,
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
await openDateLookup();
|
|
93
|
+
await user.click(screen.getByRole('button', { name: /^1 July 2024/u }));
|
|
94
|
+
|
|
95
|
+
expect(screen.getByRole('dialog')).toBeInTheDocument();
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it('does NOT call onChange when an out-of-range date is clicked', async () => {
|
|
99
|
+
const handleChange = jest.fn();
|
|
100
|
+
render(
|
|
101
|
+
<DateLookup
|
|
102
|
+
value={new Date(2024, 6, 5)}
|
|
103
|
+
min={minDate}
|
|
104
|
+
max={maxDate}
|
|
105
|
+
onChange={handleChange}
|
|
106
|
+
/>,
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
await openDateLookup();
|
|
110
|
+
await user.click(screen.getByRole('button', { name: /^1 July 2024/u }));
|
|
111
|
+
|
|
112
|
+
expect(handleChange).not.toHaveBeenCalled();
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
describe('prop threading', () => {
|
|
117
|
+
it('renders rule-disabled dates with aria-disabled in the calendar', async () => {
|
|
118
|
+
render(<DateLookup value={initialValue} disabledRules={weekendRules} onChange={jest.fn()} />);
|
|
119
|
+
|
|
120
|
+
await openDateLookup();
|
|
121
|
+
|
|
122
|
+
const saturday = screen.getByLabelText(/^6 July 2024/u);
|
|
123
|
+
expect(saturday).toHaveAttribute('aria-disabled', 'true');
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it('renders out-of-range dates with aria-disabled in the calendar', async () => {
|
|
127
|
+
render(
|
|
128
|
+
<DateLookup
|
|
129
|
+
value={new Date(2024, 6, 5)}
|
|
130
|
+
min={new Date(2024, 6, 3)}
|
|
131
|
+
max={new Date(2024, 6, 25)}
|
|
132
|
+
onChange={jest.fn()}
|
|
133
|
+
/>,
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
await openDateLookup();
|
|
137
|
+
|
|
138
|
+
const outOfRangeDate = screen.getByRole('button', { name: /^1 July 2024/u });
|
|
139
|
+
expect(outOfRangeDate).toHaveAttribute('aria-disabled', 'true');
|
|
140
|
+
expect(outOfRangeDate).toBeEnabled();
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it('renders InlinePrompt with disabledRules reason text', async () => {
|
|
144
|
+
render(<DateLookup value={initialValue} disabledRules={weekendRules} onChange={jest.fn()} />);
|
|
145
|
+
|
|
146
|
+
await openDateLookup();
|
|
147
|
+
|
|
148
|
+
expect(screen.getByText('We are closed on weekends.')).toBeInTheDocument();
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
it('renders previous month button as disabled when min is in the current month', async () => {
|
|
152
|
+
render(
|
|
153
|
+
<DateLookup value={new Date(2024, 6, 5)} min={new Date(2024, 6, 1)} onChange={jest.fn()} />,
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
await openDateLookup();
|
|
157
|
+
|
|
158
|
+
expect(screen.getByRole('button', { name: /previous month/iu })).toBeDisabled();
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
it('renders next month button as disabled when max is in the current month', async () => {
|
|
162
|
+
render(
|
|
163
|
+
<DateLookup
|
|
164
|
+
value={new Date(2024, 6, 5)}
|
|
165
|
+
max={new Date(2024, 6, 31)}
|
|
166
|
+
onChange={jest.fn()}
|
|
167
|
+
/>,
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
await openDateLookup();
|
|
171
|
+
|
|
172
|
+
expect(screen.getByRole('button', { name: /next month/iu })).toBeDisabled();
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
describe('InlinePrompt for out-of-range dates', () => {
|
|
177
|
+
const minDate = new Date(2024, 6, 3);
|
|
178
|
+
const maxDate = new Date(2024, 6, 25);
|
|
179
|
+
|
|
180
|
+
it('shows negative prompt with boundary dates when out-of-range date is clicked', async () => {
|
|
181
|
+
render(
|
|
182
|
+
<DateLookup
|
|
183
|
+
value={new Date(2024, 6, 5)}
|
|
184
|
+
min={minDate}
|
|
185
|
+
max={maxDate}
|
|
186
|
+
onChange={jest.fn()}
|
|
187
|
+
/>,
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
await openDateLookup();
|
|
191
|
+
await user.click(screen.getByRole('button', { name: /^1 July 2024/u }));
|
|
192
|
+
|
|
193
|
+
// The prompt renders inside a portal so query from document
|
|
194
|
+
const prompt = document.querySelector('.wds-inline-prompt');
|
|
195
|
+
expect(prompt).toBeInTheDocument();
|
|
196
|
+
expect(prompt).toHaveClass('wds-prompt--negative');
|
|
197
|
+
expect(prompt).toHaveTextContent(
|
|
198
|
+
'Please select a date between 3 July 2024 and 25 July 2024.',
|
|
199
|
+
);
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
it('shows boundary message (not disabledRules reason) when out-of-range date is clicked', async () => {
|
|
203
|
+
render(
|
|
204
|
+
<DateLookup
|
|
205
|
+
value={new Date(2024, 6, 5)}
|
|
206
|
+
min={minDate}
|
|
207
|
+
max={maxDate}
|
|
208
|
+
disabledRules={weekendRules}
|
|
209
|
+
onChange={jest.fn()}
|
|
210
|
+
/>,
|
|
211
|
+
);
|
|
212
|
+
|
|
213
|
+
await openDateLookup();
|
|
214
|
+
// July 27 is beyond max
|
|
215
|
+
await user.click(screen.getByRole('button', { name: /^27 July 2024/u }));
|
|
216
|
+
|
|
217
|
+
const prompt = document.querySelector('.wds-inline-prompt');
|
|
218
|
+
expect(prompt).toHaveTextContent(
|
|
219
|
+
'Please select a date between 3 July 2024 and 25 July 2024.',
|
|
220
|
+
);
|
|
221
|
+
expect(prompt).not.toHaveTextContent('We are closed on weekends.');
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
describe('onDateSelect', () => {
|
|
226
|
+
it('fires with isEnabled: false when navigating to a rule-disabled date', async () => {
|
|
227
|
+
const handleDateSelect = jest.fn();
|
|
228
|
+
render(
|
|
229
|
+
<DateLookup
|
|
230
|
+
value={new Date(2024, 6, 5)}
|
|
231
|
+
disabledRules={weekendRules}
|
|
232
|
+
onChange={jest.fn()}
|
|
233
|
+
onDateSelect={handleDateSelect}
|
|
234
|
+
/>,
|
|
235
|
+
);
|
|
236
|
+
|
|
237
|
+
await openDateLookup();
|
|
238
|
+
await user.keyboard('{ArrowRight}');
|
|
239
|
+
|
|
240
|
+
expect(handleDateSelect).toHaveBeenCalledWith(
|
|
241
|
+
expect.objectContaining({
|
|
242
|
+
date: new Date(2024, 6, 6),
|
|
243
|
+
isEnabled: false,
|
|
244
|
+
}),
|
|
245
|
+
);
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
it('fires with isEnabled: false when clicking an out-of-range date', async () => {
|
|
249
|
+
const handleDateSelect = jest.fn();
|
|
250
|
+
render(
|
|
251
|
+
<DateLookup
|
|
252
|
+
value={new Date(2024, 6, 5)}
|
|
253
|
+
min={new Date(2024, 6, 3)}
|
|
254
|
+
max={new Date(2024, 6, 25)}
|
|
255
|
+
onChange={jest.fn()}
|
|
256
|
+
onDateSelect={handleDateSelect}
|
|
257
|
+
/>,
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
await openDateLookup();
|
|
261
|
+
await user.click(screen.getByRole('button', { name: /^1 July 2024/u }));
|
|
262
|
+
|
|
263
|
+
expect(handleDateSelect).toHaveBeenCalledWith(
|
|
264
|
+
expect.objectContaining({
|
|
265
|
+
date: new Date(2024, 6, 1),
|
|
266
|
+
isEnabled: false,
|
|
267
|
+
}),
|
|
268
|
+
);
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
it('fires with isEnabled: true when clicking an enabled date', async () => {
|
|
272
|
+
const handleDateSelect = jest.fn();
|
|
273
|
+
render(
|
|
274
|
+
<DateLookup
|
|
275
|
+
value={new Date(2024, 6, 5)}
|
|
276
|
+
disabledRules={weekendRules}
|
|
277
|
+
onChange={jest.fn()}
|
|
278
|
+
onDateSelect={handleDateSelect}
|
|
279
|
+
/>,
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
await openDateLookup();
|
|
283
|
+
await user.click(screen.getByLabelText(/^3 July 2024/u));
|
|
284
|
+
|
|
285
|
+
expect(handleDateSelect).toHaveBeenCalledWith(
|
|
286
|
+
expect.objectContaining({
|
|
287
|
+
date: new Date(2024, 6, 3),
|
|
288
|
+
isEnabled: true,
|
|
289
|
+
}),
|
|
290
|
+
);
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
});
|