@transferwise/components 46.165.4 → 46.166.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Body/Body.js +2 -2
- package/build/Body/Body.js.map +1 -1
- package/build/Body/Body.mjs +2 -2
- package/build/Body/Body.mjs.map +1 -1
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.js +1 -1
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.js.map +1 -1
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.mjs +1 -1
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.mjs.map +1 -1
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.js +1 -1
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.js.map +1 -1
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.mjs +1 -1
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.mjs.map +1 -1
- package/build/Calendar/TableLink/TableLink.js +1 -1
- package/build/Calendar/TableLink/TableLink.js.map +1 -1
- package/build/Calendar/TableLink/TableLink.mjs +1 -1
- package/build/Calendar/TableLink/TableLink.mjs.map +1 -1
- package/build/Display/Display.js +3 -1
- package/build/Display/Display.js.map +1 -1
- package/build/Display/Display.mjs +3 -1
- package/build/Display/Display.mjs.map +1 -1
- package/build/ExpressiveMoneyInput/AmountInput/AmountInput.js +1 -1
- package/build/ExpressiveMoneyInput/AmountInput/AmountInput.js.map +1 -1
- package/build/ExpressiveMoneyInput/AmountInput/AmountInput.mjs +1 -1
- package/build/ExpressiveMoneyInput/AmountInput/AmountInput.mjs.map +1 -1
- package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.js +1 -1
- package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.js.map +1 -1
- package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.mjs +1 -1
- package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.mjs.map +1 -1
- package/build/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.js +2 -2
- package/build/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.js.map +1 -1
- package/build/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.mjs +2 -2
- package/build/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.mjs.map +1 -1
- package/build/Inputs/SelectInput/Option/SelectInputOption.js +1 -1
- package/build/Inputs/SelectInput/Option/SelectInputOption.js.map +1 -1
- package/build/Inputs/SelectInput/Option/SelectInputOption.mjs +1 -1
- package/build/Inputs/SelectInput/Option/SelectInputOption.mjs.map +1 -1
- package/build/Inputs/SelectInput/OptionContent/SelectInputOptionContent.js +3 -3
- package/build/Inputs/SelectInput/OptionContent/SelectInputOptionContent.js.map +1 -1
- package/build/Inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs +3 -3
- package/build/Inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs.map +1 -1
- package/build/Inputs/SelectInput/Popover/SelectInputPopover.js +2 -2
- package/build/Inputs/SelectInput/Popover/SelectInputPopover.js.map +1 -1
- package/build/Inputs/SelectInput/Popover/SelectInputPopover.mjs +2 -2
- package/build/Inputs/SelectInput/Popover/SelectInputPopover.mjs.map +1 -1
- package/build/Label/Label.js +1 -1
- package/build/Label/Label.js.map +1 -1
- package/build/Label/Label.mjs +1 -1
- package/build/Label/Label.mjs.map +1 -1
- package/build/Stepper/Stepper.js +3 -2
- package/build/Stepper/Stepper.js.map +1 -1
- package/build/Stepper/Stepper.mjs +3 -2
- package/build/Stepper/Stepper.mjs.map +1 -1
- package/build/Table/Header/TableHeader.js +1 -1
- package/build/Table/Header/TableHeader.js.map +1 -1
- package/build/Table/Header/TableHeader.mjs +1 -1
- package/build/Table/Header/TableHeader.mjs.map +1 -1
- package/build/Tabs/Tab/Tab.js +1 -1
- package/build/Tabs/Tab/Tab.js.map +1 -1
- package/build/Tabs/Tab/Tab.mjs +1 -1
- package/build/Tabs/Tab/Tab.mjs.map +1 -1
- package/build/Tag/Tag.js +1 -1
- package/build/Tag/Tag.js.map +1 -1
- package/build/Tag/Tag.mjs +1 -1
- package/build/Tag/Tag.mjs.map +1 -1
- package/build/Title/Title.js +2 -2
- package/build/Title/Title.js.map +1 -1
- package/build/Title/Title.mjs +2 -2
- package/build/Title/Title.mjs.map +1 -1
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.js +5 -5
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.js.map +1 -1
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs +5 -5
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs.map +1 -1
- package/build/Typeahead/TypeaheadOption/TypeaheadOption.js +2 -2
- package/build/Typeahead/TypeaheadOption/TypeaheadOption.js.map +1 -1
- package/build/Typeahead/TypeaheadOption/TypeaheadOption.mjs +2 -2
- package/build/Typeahead/TypeaheadOption/TypeaheadOption.mjs.map +1 -1
- package/build/Upload/Steps/UploadImageStep/UploadImageStep.js +2 -2
- package/build/Upload/Steps/UploadImageStep/UploadImageStep.js.map +1 -1
- package/build/Upload/Steps/UploadImageStep/UploadImageStep.mjs +2 -2
- package/build/Upload/Steps/UploadImageStep/UploadImageStep.mjs.map +1 -1
- package/build/_deprecated/ActionButton/ActionButton.js +1 -1
- package/build/_deprecated/ActionButton/ActionButton.js.map +1 -1
- package/build/_deprecated/ActionButton/ActionButton.mjs +1 -1
- package/build/_deprecated/ActionButton/ActionButton.mjs.map +1 -1
- package/build/_deprecated/Avatar/Avatar.js +1 -1
- package/build/_deprecated/Avatar/Avatar.js.map +1 -1
- package/build/_deprecated/Avatar/Avatar.mjs +1 -1
- package/build/_deprecated/Avatar/Avatar.mjs.map +1 -1
- package/build/_deprecated/Select/Select.js +2 -2
- package/build/_deprecated/Select/Select.js.map +1 -1
- package/build/_deprecated/Select/Select.mjs +2 -2
- package/build/_deprecated/Select/Select.mjs.map +1 -1
- package/build/common/PropsValues/typography.js +6 -0
- package/build/common/PropsValues/typography.js.map +1 -1
- package/build/common/PropsValues/typography.mjs +6 -0
- package/build/common/PropsValues/typography.mjs.map +1 -1
- package/build/main.css +9097 -1964
- package/build/styles/Accordion/Accordion.css +7 -6
- package/build/styles/Body/Body.css +2 -1
- package/build/styles/Calendar/Calendar.css +5 -4
- package/build/styles/Calendar/TableLink/TableLink.css +5 -4
- package/build/styles/Chips/Chip/Chip.css +5 -3
- package/build/styles/Decision/Decision.css +4 -3
- package/build/styles/Emphasis/Emphasis.css +1 -1
- package/build/styles/ExpressiveMoneyInput/AmountInput/AmountInput.css +2 -1
- package/build/styles/ExpressiveMoneyInput/ExpressiveMoneyInput.css +2 -1
- package/build/styles/Inputs/Input/Input.css +98 -24
- package/build/styles/Inputs/TextArea/TextArea.css +98 -24
- package/build/styles/Label/Label.css +3 -0
- package/build/styles/Markup/Markup.css +2 -2
- package/build/styles/MoneyInput/MoneyInput.css +9 -6
- package/build/styles/Nudge/Nudge.css +3 -3
- package/build/styles/Popover/Popover.css +30 -7
- package/build/styles/ProgressBar/ProgressBar.css +3 -2
- package/build/styles/Prompt/PrimitivePrompt/PrimitivePrompt.css +2 -1
- package/build/styles/Snackbar/Snackbar.css +1 -1
- package/build/styles/Table/Table.css +18 -8
- package/build/styles/Tabs/Tabs.css +3 -3
- package/build/styles/Tag/Tag.css +1 -1
- package/build/styles/Tile/Tile.css +4 -3
- package/build/styles/Typeahead/Typeahead.css +12 -29
- package/build/styles/UploadInput/UploadInput.css +1 -1
- package/build/styles/_deprecated/ActionButton/ActionButton.css +3 -4
- package/build/styles/_deprecated/Avatar/Avatar.css +2 -2
- package/build/styles/_deprecated/CriticalBanner/CriticalCommsBanner.css +2 -1
- package/build/styles/_deprecated/Select/Select.css +49 -14
- package/build/styles/_deprecated/Summary/Summary.css +2 -2
- package/build/styles/common/Circle/Circle.css +1 -1
- package/build/styles/common/Option/Option.css +4 -4
- package/build/styles/css/accordion.css +53 -11
- package/build/styles/css/badge.css +2 -2
- package/build/styles/css/button-groups.css +29 -6
- package/build/styles/css/buttons.css +35 -11
- package/build/styles/css/decision.css +53 -11
- package/build/styles/css/dropdowns.css +65 -18
- package/build/styles/css/droppable.css +28 -6
- package/build/styles/css/footer.css +41 -10
- package/build/styles/css/input-groups.css +249 -117
- package/build/styles/css/list-group.css +28 -8
- package/build/styles/css/modals.css +1 -1
- package/build/styles/css/navbar.css +92 -45
- package/build/styles/css/navs.css +8 -8
- package/build/styles/css/neptune-addons.css +15 -0
- package/build/styles/css/neptune-core.css +6230 -525
- package/build/styles/css/neptune.css +8790 -1768
- package/build/styles/css/panels.css +2 -2
- package/build/styles/css/popovers.css +64 -20
- package/build/styles/css/progress-bars.css +2 -2
- package/build/styles/css/sequences.css +14 -9
- package/build/styles/css/table.css +7 -7
- package/build/styles/css/tooltip.css +28 -6
- package/build/styles/less/legacy-variables.less +3 -3
- package/build/styles/less/neptune-tokens.less +0 -48
- package/build/styles/main.css +9097 -1964
- package/build/styles/props/neptune-tokens.css +805 -3
- package/build/styles/styles/less/accordion.css +53 -11
- package/build/styles/styles/less/badge.css +2 -2
- package/build/styles/styles/less/button-groups.css +29 -6
- package/build/styles/styles/less/buttons.css +35 -11
- package/build/styles/styles/less/decision.css +53 -11
- package/build/styles/styles/less/dropdowns.css +65 -18
- package/build/styles/styles/less/droppable.css +28 -6
- package/build/styles/styles/less/footer.css +41 -10
- package/build/styles/styles/less/forms/bootstrap-forms.css +153 -100
- package/build/styles/styles/less/forms/checkbox-radio.css +3 -3
- package/build/styles/styles/less/input-groups.css +249 -117
- package/build/styles/styles/less/list-group.css +28 -8
- package/build/styles/styles/less/modals.css +1 -1
- package/build/styles/styles/less/navbar.css +92 -45
- package/build/styles/styles/less/navs.css +8 -8
- package/build/styles/styles/less/neptune-addons.css +15 -0
- package/build/styles/styles/less/neptune-core.css +6230 -525
- package/build/styles/styles/less/neptune.css +8790 -1768
- package/build/styles/styles/less/panels.css +2 -2
- package/build/styles/styles/less/popovers.css +64 -20
- package/build/styles/styles/less/progress-bars.css +2 -2
- package/build/styles/styles/less/sequences.css +14 -9
- package/build/styles/styles/less/table.css +7 -7
- package/build/styles/styles/less/tooltip.css +28 -6
- package/build/types/Body/Body.d.ts +2 -2
- package/build/types/Body/Body.d.ts.map +1 -1
- package/build/types/Display/Display.d.ts.map +1 -1
- package/build/types/ExpressiveMoneyInput/AmountInput/AmountInput.d.ts.map +1 -1
- package/build/types/IconButton/IconButton.d.ts +1 -1
- package/build/types/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.d.ts.map +1 -1
- package/build/types/Inputs/SelectInput/Popover/SelectInputPopover.d.ts.map +1 -1
- package/build/types/MoneyInput/MoneyInput.d.ts +1 -1
- package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/Stepper/Stepper.d.ts.map +1 -1
- package/build/types/Tabs/Tab/Tab.d.ts.map +1 -1
- package/build/types/Title/Title.d.ts +2 -2
- package/build/types/Typeahead/TypeaheadInput/TypeaheadInput.d.ts.map +1 -1
- package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts +1 -1
- package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts.map +1 -1
- package/build/types/UploadInput/UploadItem/UploadItemLink.d.ts +1 -1
- package/build/types/_deprecated/Select/Select.d.ts.map +1 -1
- package/build/types/common/PropsValues/typography.d.ts +13 -1
- package/build/types/common/PropsValues/typography.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/Accordion/Accordion.css +7 -6
- package/src/Accordion/Accordion.less +7 -6
- package/src/Body/Body.css +2 -1
- package/src/Body/Body.less +2 -1
- package/src/Body/Body.test.tsx +13 -4
- package/src/Body/Body.tsx +4 -3
- package/src/Body/_stories/Body.test.story.tsx +42 -0
- package/src/Button/_stories/Button.test.story.tsx +1 -0
- package/src/Calendar/Calendar.css +5 -4
- package/src/Calendar/DayCalendar/Table/DayCalendarTable.tsx +2 -2
- package/src/Calendar/MonthCalendar/Table/MonthCalendarTable.tsx +1 -1
- package/src/Calendar/TableLink/TableLink.css +5 -4
- package/src/Calendar/TableLink/TableLink.less +5 -4
- package/src/Calendar/TableLink/TableLink.tsx +1 -1
- package/src/Calendar/_stories/Calendar.test.story.tsx +34 -0
- package/src/Chips/Chip/Chip.css +5 -3
- package/src/Chips/Chip/Chip.less +3 -2
- package/src/CircularButton/_stories/CircularButton.story.tsx +6 -16
- package/src/DateInput/_stories/DateInput.rtl.test.story.tsx +46 -0
- package/src/DateInput/_stories/DateInput.story.tsx +1 -0
- package/src/Decision/Decision.css +4 -3
- package/src/Decision/Decision.less +4 -3
- package/src/Decision/_stories/Decision.test.story.tsx +1 -0
- package/src/DefinitionList/_stories/DefinitionList.story.tsx +1 -1
- package/src/DefinitionList/_stories/DefinitionList.test.story.tsx +1 -1
- package/src/Display/Display.test.tsx +43 -0
- package/src/Display/Display.tsx +11 -1
- package/src/Display/_stories/Display.story.tsx +36 -21
- package/src/Display/_stories/Display.test.story.tsx +108 -0
- package/src/Emphasis/Emphasis.css +1 -1
- package/src/Emphasis/Emphasis.less +1 -1
- package/src/ExpressiveMoneyInput/AmountInput/AmountInput.css +2 -1
- package/src/ExpressiveMoneyInput/AmountInput/AmountInput.less +2 -1
- package/src/ExpressiveMoneyInput/AmountInput/AmountInput.tsx +1 -4
- package/src/ExpressiveMoneyInput/ExpressiveMoneyInput.css +2 -1
- package/src/ExpressiveMoneyInput/_stories/ExpressiveMoneyInput.rtl.test.story.tsx +1 -0
- package/src/Field/_stories/Field.test.story.tsx +1 -0
- package/src/FlowNavigation/AnimatedLabel/AnimatedLabel.tsx +1 -1
- package/src/Header/_stories/Header.test.story.tsx +1 -1
- package/src/InputWithDisplayFormat/_stories/InputWithDisplayFormat.test.story.tsx +1 -0
- package/src/Inputs/Input/Input.css +98 -24
- package/src/Inputs/InputGroup/_stories/InputGroup.test.story.tsx +1 -0
- package/src/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.tsx +4 -2
- package/src/Inputs/SelectInput/Option/SelectInputOption.tsx +1 -1
- package/src/Inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx +3 -3
- package/src/Inputs/SelectInput/Popover/SelectInputPopover.tsx +6 -2
- package/src/Inputs/SelectInput/_stories/SelectInput.rtl.test.story.tsx +1 -0
- package/src/Inputs/SelectInput/_stories/SelectInput.story.tsx +1 -1
- package/src/Inputs/TextArea/TextArea.css +98 -24
- package/src/Inputs/TextArea/_stories/TextArea.test.story.tsx +1 -0
- package/src/Inputs/_common.less +16 -10
- package/src/InstructionsList/_stories/InstructionsList.test.story.tsx +2 -1
- package/src/Label/Label.css +3 -0
- package/src/Label/Label.less +8 -0
- package/src/Label/Label.tsx +1 -1
- package/src/Label/_stories/Label.test.story.tsx +1 -0
- package/src/ListItem/_stories/ListItem.rtl.test.story.tsx +1 -6
- package/src/Markup/Markup.css +2 -2
- package/src/Markup/Markup.less +2 -2
- package/src/MoneyInput/MoneyInput.css +9 -6
- package/src/MoneyInput/MoneyInput.less +10 -7
- package/src/MoneyInput/_stories/MoneyInput.rtl.test.story.tsx +3 -1
- package/src/Nudge/Nudge.css +3 -3
- package/src/Nudge/Nudge.less +3 -3
- package/src/PhoneNumberInput/_stories/PhoneNumberInput.rtl.test.story.tsx +1 -1
- package/src/PocketSurface/_stories/PocketSurface.story.tsx +2 -2
- package/src/Popover/Popover.css +30 -7
- package/src/Popover/Popover.less +2 -2
- package/src/ProgressBar/ProgressBar.css +3 -2
- package/src/ProgressBar/ProgressBar.less +12 -11
- package/src/ProgressBar/_stories/ProgressBar.test.story.tsx +1 -0
- package/src/Prompt/ActionPrompt/_stories/ActionPrompt.test.story.tsx +1 -0
- package/src/Prompt/CriticalBanner/_stories/CriticalBanner.test.story.tsx +1 -0
- package/src/Prompt/InfoPrompt/_stories/InfoPrompt.test.story.tsx +1 -0
- package/src/Prompt/InlinePrompt/_stories/InlinePrompt.test.story.tsx +1 -0
- package/src/Prompt/PrimitivePrompt/PrimitivePrompt.css +2 -1
- package/src/Prompt/PrimitivePrompt/PrimitivePrompt.less +2 -1
- package/src/SentimentSurface/_stories/SentimentSurface.story.tsx +1 -1
- package/src/Snackbar/Snackbar.css +1 -1
- package/src/Snackbar/Snackbar.less +1 -1
- package/src/Stepper/Stepper.tsx +4 -2
- package/src/Table/Header/TableHeader.tsx +1 -1
- package/src/Table/StatusText/TableStatusText.test.tsx +20 -5
- package/src/Table/Table.css +18 -8
- package/src/Table/Table.less +20 -9
- package/src/Table/_stories/Table.test.story.tsx +24 -13
- package/src/Tabs/Tab/Tab.tsx +11 -5
- package/src/Tabs/Tabs.css +3 -3
- package/src/Tabs/Tabs.less +3 -3
- package/src/Tabs/_stories/Tabs.test.story.tsx +1 -1
- package/src/Tag/Tag.css +1 -1
- package/src/Tag/Tag.less +1 -1
- package/src/Tag/Tag.tsx +1 -1
- package/src/Tag/_stories/Tag.story.tsx +1 -1
- package/src/TextareaWithDisplayFormat/_stories/TextareaWithDisplayFormat.test.story.tsx +1 -0
- package/src/Tile/Tile.css +4 -3
- package/src/Tile/Tile.less +4 -3
- package/src/Title/Title.test.tsx +22 -3
- package/src/Title/Title.tsx +2 -2
- package/src/Typeahead/Typeahead.css +12 -29
- package/src/Typeahead/Typeahead.less +11 -33
- package/src/Typeahead/TypeaheadInput/TypeaheadInput.tsx +5 -5
- package/src/Typeahead/TypeaheadOption/TypeaheadOption.tsx +2 -2
- package/src/Typeahead/_stories/Typeahead.rtl.test.story.tsx +1 -1
- package/src/Typeahead/_stories/Typeahead.test.story.tsx +65 -0
- package/src/Upload/Steps/UploadImageStep/UploadImageStep.tsx +4 -2
- package/src/Upload/_stories/Upload.rtl.test.story.tsx +1 -0
- package/src/UploadInput/UploadInput.css +1 -1
- package/src/UploadInput/UploadInput.less +7 -4
- package/src/UploadInput/_stories/UploadInput.test.story.tsx +1 -0
- package/src/_deprecated/ActionButton/ActionButton.css +3 -4
- package/src/_deprecated/ActionButton/ActionButton.less +4 -5
- package/src/_deprecated/ActionButton/ActionButton.tsx +1 -1
- package/src/_deprecated/Avatar/Avatar.css +2 -2
- package/src/_deprecated/Avatar/Avatar.less +2 -2
- package/src/_deprecated/Avatar/Avatar.tsx +1 -1
- package/src/_deprecated/CriticalBanner/CriticalCommsBanner.css +2 -1
- package/src/_deprecated/CriticalBanner/CriticalCommsBanner.less +2 -1
- package/src/_deprecated/NavigationOption/_stories/NavigationOption.story.tsx +6 -6
- package/src/_deprecated/Select/Select.css +49 -14
- package/src/_deprecated/Select/Select.less +14 -10
- package/src/_deprecated/Select/Select.test.tsx +16 -0
- package/src/_deprecated/Select/Select.tsx +6 -1
- package/src/_deprecated/Summary/Summary.css +2 -2
- package/src/_deprecated/Summary/Summary.less +2 -2
- package/src/common/Circle/Circle.css +1 -1
- package/src/common/Circle/Circle.less +1 -1
- package/src/common/Option/Option.css +4 -4
- package/src/common/Option/Option.less +4 -4
- package/src/common/PropsValues/typography.ts +20 -1
- package/src/main.css +9097 -1964
- package/src/main.less +3 -2
- package/src/styles/less/accordion.css +53 -11
- package/src/styles/less/addons/_background-utilities.less +5 -0
- package/src/styles/less/badge.css +2 -2
- package/src/styles/less/badge.less +2 -2
- package/src/styles/less/button-groups.css +29 -6
- package/src/styles/less/button-groups.less +3 -2
- package/src/styles/less/buttons.css +35 -11
- package/src/styles/less/buttons.less +7 -7
- package/src/styles/less/core/_fonts.less +7 -75
- package/src/styles/less/core/_scaffolding.less +4 -4
- package/src/styles/less/core/_typography-utilities.less +3 -3
- package/src/styles/less/core/_typography.less +91 -236
- package/src/styles/less/core/fonts/_fonts-ar.less +86 -0
- package/src/styles/less/core/fonts/_fonts-base.less +99 -0
- package/src/styles/less/core/fonts/_fonts-he.less +8 -0
- package/src/styles/less/core/fonts/_fonts-ja.less +4247 -0
- package/src/styles/less/core/fonts/_fonts-ko.less +1079 -0
- package/src/styles/less/core/fonts/_fonts-th.less +8 -0
- package/src/styles/less/core/fonts/_fonts-zh.less +872 -0
- package/src/styles/less/decision.css +53 -11
- package/src/styles/less/decision.less +2 -2
- package/src/styles/less/dropdowns.css +65 -18
- package/src/styles/less/dropdowns.less +8 -7
- package/src/styles/less/droppable.css +28 -6
- package/src/styles/less/droppable.less +4 -4
- package/src/styles/less/footer.css +41 -10
- package/src/styles/less/footer.less +4 -3
- package/src/styles/less/forms/bootstrap-forms.css +153 -100
- package/src/styles/less/forms/bootstrap-forms.less +85 -72
- package/src/styles/less/forms/checkbox-radio.css +3 -3
- package/src/styles/less/forms/checkbox-radio.less +3 -3
- package/src/styles/less/input-groups.css +249 -117
- package/src/styles/less/input-groups.less +23 -9
- package/src/styles/less/list-group.css +28 -8
- package/src/styles/less/list-group.less +8 -5
- package/src/styles/less/mixins/_reset-text.less +1 -1
- package/src/styles/less/mixins/_text-emphasis.less +7 -1
- package/src/styles/less/modals.css +1 -1
- package/src/styles/less/modals.less +1 -1
- package/src/styles/less/navbar.css +92 -45
- package/src/styles/less/navbar.less +19 -19
- package/src/styles/less/navs.css +8 -8
- package/src/styles/less/navs.less +8 -8
- package/src/styles/less/neptune-addons.css +15 -0
- package/src/styles/less/neptune-core.css +6230 -525
- package/src/styles/less/neptune.bundle.less +4 -0
- package/src/styles/less/neptune.css +8790 -1768
- package/src/styles/less/panels.css +2 -2
- package/src/styles/less/panels.less +2 -2
- package/src/styles/less/popovers.css +64 -20
- package/src/styles/less/popovers.less +7 -7
- package/src/styles/less/progress-bars.css +2 -2
- package/src/styles/less/progress-bars.less +2 -2
- package/src/styles/less/sequences.css +14 -9
- package/src/styles/less/sequences.less +15 -10
- package/src/styles/less/table.css +7 -7
- package/src/styles/less/table.less +7 -7
- package/src/styles/less/tooltip.css +28 -6
- package/src/styles/less/tooltip.less +1 -1
- package/src/styles/variables/legacy-variables.less +3 -3
- package/build/styles/fonts/inter-cyrillic-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/inter-cyrillic-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/inter-greek-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/inter-greek-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/inter-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/inter-latin-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/rubik/rubik-body-cyrillic-330-normal.woff2 +0 -0
- package/build/styles/fonts/rubik/rubik-body-cyrillic-600-normal.woff2 +0 -0
- package/build/styles/fonts/rubik/rubik-body-cyrillic-ext-330-normal.woff2 +0 -0
- package/build/styles/fonts/rubik/rubik-body-cyrillic-ext-600-normal.woff2 +0 -0
- package/build/styles/fonts/rubik/rubik-cyrillic-900-normal.woff2 +0 -0
- package/build/styles/fonts/rubik/rubik-cyrillic-ext-900-normal.woff2 +0 -0
- package/src/styles/fonts/inter-cyrillic-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/inter-cyrillic-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/inter-greek-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/inter-greek-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/inter-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/inter-latin-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/rubik/rubik-body-cyrillic-330-normal.woff2 +0 -0
- package/src/styles/fonts/rubik/rubik-body-cyrillic-600-normal.woff2 +0 -0
- package/src/styles/fonts/rubik/rubik-body-cyrillic-ext-330-normal.woff2 +0 -0
- package/src/styles/fonts/rubik/rubik-body-cyrillic-ext-600-normal.woff2 +0 -0
- package/src/styles/fonts/rubik/rubik-cyrillic-900-normal.woff2 +0 -0
- package/src/styles/fonts/rubik/rubik-cyrillic-ext-900-normal.woff2 +0 -0
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
&.np-accordion-item--dark {
|
|
19
19
|
.media-body,
|
|
20
|
-
.np-text-title-body
|
|
20
|
+
.np-text-title-body,
|
|
21
|
+
.wds-text-title-body {
|
|
21
22
|
color: @color-navy-content-primary;
|
|
22
23
|
}
|
|
23
24
|
}
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
|
|
36
37
|
.np-option {
|
|
37
38
|
.np-option__title {
|
|
38
|
-
font-weight: var(--font-weight-
|
|
39
|
+
font-weight: var(--wds-font-weight-body-bold);
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -57,15 +58,15 @@
|
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
.decision__title {
|
|
60
|
-
font-size: var(--font-size-
|
|
61
|
+
font-size: var(--wds-font-size-title-body);
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
.np-option {
|
|
64
65
|
.np-option__title {
|
|
65
66
|
margin-bottom: 0;
|
|
66
|
-
font-size: var(--font-size-
|
|
67
|
-
letter-spacing: var(--letter-spacing-
|
|
68
|
-
line-height: var(--line-height-
|
|
67
|
+
font-size: var(--wds-font-size-title-body);
|
|
68
|
+
letter-spacing: var(--wds-letter-spacing-title-body);
|
|
69
|
+
line-height: var(--wds-line-height-title-body);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
.circle-sm {
|
package/src/Body/Body.css
CHANGED
package/src/Body/Body.less
CHANGED
package/src/Body/Body.test.tsx
CHANGED
|
@@ -9,7 +9,10 @@ describe('Body', () => {
|
|
|
9
9
|
const copy = screen.getByText('Test');
|
|
10
10
|
expect(copy).toBeInTheDocument();
|
|
11
11
|
expect(copy.tagName).toBe('DIV');
|
|
12
|
-
expect(copy).toHaveClass(
|
|
12
|
+
expect(copy).toHaveClass(
|
|
13
|
+
`np-text-${Typography.BODY_DEFAULT}`,
|
|
14
|
+
`wds-text-${Typography.BODY_DEFAULT}`,
|
|
15
|
+
);
|
|
13
16
|
});
|
|
14
17
|
|
|
15
18
|
it('enforces tag via `as` prop', () => {
|
|
@@ -17,7 +20,10 @@ describe('Body', () => {
|
|
|
17
20
|
const copy = screen.getByText('Test');
|
|
18
21
|
expect(copy).toBeInTheDocument();
|
|
19
22
|
expect(copy.tagName).toBe('P');
|
|
20
|
-
expect(copy).toHaveClass(
|
|
23
|
+
expect(copy).toHaveClass(
|
|
24
|
+
`np-text-${Typography.BODY_DEFAULT}`,
|
|
25
|
+
`wds-text-${Typography.BODY_DEFAULT}`,
|
|
26
|
+
);
|
|
21
27
|
});
|
|
22
28
|
|
|
23
29
|
it('supports native HTML attrs', () => {
|
|
@@ -35,7 +41,7 @@ describe('Body', () => {
|
|
|
35
41
|
it('renders newlines as line breaks when preserveNewlines is true', () => {
|
|
36
42
|
render(<Body preserveNewlines>{'Line 1.\nLine 2'}</Body>);
|
|
37
43
|
const copy = screen.getByText(/Line 1\.\s*Line 2/);
|
|
38
|
-
expect(copy).toHaveClass('np-text--pre-line');
|
|
44
|
+
expect(copy).toHaveClass('np-text--pre-line', 'wds-text--pre-line');
|
|
39
45
|
expect(copy).toHaveTextContent('Line 1.');
|
|
40
46
|
expect(copy).toHaveTextContent('Line 2');
|
|
41
47
|
});
|
|
@@ -47,6 +53,9 @@ describe('Body', () => {
|
|
|
47
53
|
const copy = screen.getByText('Test');
|
|
48
54
|
expect(copy).toBeInTheDocument();
|
|
49
55
|
expect(copy.tagName).toBe('DIV');
|
|
50
|
-
expect(copy).toHaveClass(
|
|
56
|
+
expect(copy).toHaveClass(
|
|
57
|
+
`np-text-${Typography.BODY_DEFAULT}`,
|
|
58
|
+
`wds-text-${Typography.BODY_DEFAULT}`,
|
|
59
|
+
);
|
|
51
60
|
});
|
|
52
61
|
});
|
package/src/Body/Body.tsx
CHANGED
|
@@ -33,7 +33,7 @@ const Body = forwardRef(function Body(
|
|
|
33
33
|
| null
|
|
34
34
|
>,
|
|
35
35
|
) {
|
|
36
|
-
const
|
|
36
|
+
const bodyType = bodyTypes.has(type) ? type : DEFAULT_TYPE;
|
|
37
37
|
return (
|
|
38
38
|
<Element
|
|
39
39
|
{...props}
|
|
@@ -41,8 +41,9 @@ const Body = forwardRef(function Body(
|
|
|
41
41
|
// See: https://fettblog.eu/typescript-react-generic-forward-refs/
|
|
42
42
|
ref={reference}
|
|
43
43
|
className={clsx(
|
|
44
|
-
`np-text-${
|
|
45
|
-
|
|
44
|
+
`np-text-${bodyType}`,
|
|
45
|
+
`wds-text-${bodyType}`,
|
|
46
|
+
preserveNewlines && 'np-text--pre-line wds-text--pre-line',
|
|
46
47
|
className,
|
|
47
48
|
)}
|
|
48
49
|
/>
|
|
@@ -5,6 +5,7 @@ import Container from '../../Container';
|
|
|
5
5
|
import Title from '../../Title';
|
|
6
6
|
import { Typography } from '../../common/PropsValues/typography';
|
|
7
7
|
import { withVariantConfig } from '../../../.storybook/helpers';
|
|
8
|
+
import { useRtlDiffI18n, withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
8
9
|
|
|
9
10
|
export default {
|
|
10
11
|
title: 'Typography/Body/Tests',
|
|
@@ -88,3 +89,44 @@ export const HyphenationMobile: Story = {
|
|
|
88
89
|
...HyphenationTest,
|
|
89
90
|
...withVariantConfig(['mobile'], HyphenationTest),
|
|
90
91
|
};
|
|
92
|
+
|
|
93
|
+
const rtlDiffBodyLarge = withRTLDiff({
|
|
94
|
+
i18n: {
|
|
95
|
+
secondParagraph: {
|
|
96
|
+
en: "Set up a transfer in a few minutes from your phone or computer. We'll keep you updated at every step, so you always know where your money is.",
|
|
97
|
+
ar: 'أعدّ تحويلك في بضع دقائق من هاتفك أو حاسوبك. سنبقيك على اطلاع في كل خطوة، لتعرف دائمًا أين أموالك.',
|
|
98
|
+
he: 'הגדירו העברה תוך כמה דקות מהטלפון או מהמחשב. נעדכן אתכם בכל שלב, כך שתמיד תדעו איפה הכסף שלכם.',
|
|
99
|
+
},
|
|
100
|
+
paragraph: {
|
|
101
|
+
en: "Send money abroad at the real exchange rate, with low, transparent fees. You'll always see what you pay upfront, and your recipient gets the money quickly and securely.",
|
|
102
|
+
ar: 'أرسل الأموال إلى الخارج بسعر الصرف الحقيقي ومع رسوم منخفضة وشفافة. سترى دائمًا ما تدفعه مقدمًا، ويحصل المستلم على أمواله بسرعة وأمان.',
|
|
103
|
+
he: 'שלחו כסף לחו״ל בשער החליפין האמיתי, עם עמלות נמוכות ושקופות. תמיד תראו מראש כמה אתם משלמים, והנמען יקבל את הכסף במהירות ובבטחה.',
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Two body large paragraphs in RTL and LTR, for the RTL Typography docs page.
|
|
110
|
+
* Hidden from the sidebar, tests and Chromatic.
|
|
111
|
+
*/
|
|
112
|
+
export const RTLDiffBodyLarge: Story = {
|
|
113
|
+
tags: ['!dev', '!test'],
|
|
114
|
+
render: function Render() {
|
|
115
|
+
const i18n = useRtlDiffI18n();
|
|
116
|
+
return (
|
|
117
|
+
<>
|
|
118
|
+
<Body as="p" type={Typography.BODY_LARGE}>
|
|
119
|
+
{i18n.paragraph}
|
|
120
|
+
</Body>
|
|
121
|
+
<Body as="p" type={Typography.BODY_LARGE}>
|
|
122
|
+
{i18n.secondParagraph}
|
|
123
|
+
</Body>
|
|
124
|
+
</>
|
|
125
|
+
);
|
|
126
|
+
},
|
|
127
|
+
...rtlDiffBodyLarge,
|
|
128
|
+
parameters: {
|
|
129
|
+
...rtlDiffBodyLarge.parameters,
|
|
130
|
+
chromatic: { ...rtlDiffBodyLarge.parameters.chromatic, disableSnapshot: true },
|
|
131
|
+
},
|
|
132
|
+
};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
border: transparent;
|
|
8
8
|
border-radius: var(--radius-small);
|
|
9
9
|
background-color: transparent;
|
|
10
|
-
font-weight: var(--font-weight-
|
|
10
|
+
font-weight: var(--wds-font-weight-title-screen);
|
|
11
11
|
color: var(--color-content-primary);
|
|
12
12
|
}
|
|
13
13
|
@media (max-width: 320px) {
|
|
@@ -89,10 +89,11 @@
|
|
|
89
89
|
text-decoration-color: var(--color-content-tertiary);
|
|
90
90
|
}
|
|
91
91
|
.wds-Calendar__option--day {
|
|
92
|
-
|
|
92
|
+
--circleSize: var(--size-40);
|
|
93
|
+
block-size: var(--circleSize);
|
|
94
|
+
line-height: var(--circleSize);
|
|
95
|
+
inline-size: var(--circleSize);
|
|
93
96
|
border-radius: var(--radius-full);
|
|
94
|
-
line-height: var(--size-40);
|
|
95
|
-
inline-size: var(--size-40);
|
|
96
97
|
padding: 0;
|
|
97
98
|
display: inline-flex;
|
|
98
99
|
align-items: center;
|
|
@@ -134,8 +134,8 @@ class DayCalendarTable extends PureComponent<DayCalendarTableProps> {
|
|
|
134
134
|
key={day}
|
|
135
135
|
className={
|
|
136
136
|
index > 4
|
|
137
|
-
? 'text-xs-center np-text-body-default'
|
|
138
|
-
: 'text-xs-center np-text-body-default-bold'
|
|
137
|
+
? 'text-xs-center np-text-body-default wds-text-body-default'
|
|
138
|
+
: 'text-xs-center np-text-body-default-bold wds-text-body-default-bold'
|
|
139
139
|
}
|
|
140
140
|
>
|
|
141
141
|
<span className="hidden-xs">
|
|
@@ -76,7 +76,7 @@ const MonthCalendarTable = ({
|
|
|
76
76
|
})();
|
|
77
77
|
|
|
78
78
|
return (
|
|
79
|
-
<table className="table table-condensed table-bordered tw-date-lookup-calendar np-text-body-default-bold m-b-0">
|
|
79
|
+
<table className="table table-condensed table-bordered tw-date-lookup-calendar np-text-body-default-bold wds-text-body-default-bold m-b-0">
|
|
80
80
|
<thead className="sr-only">
|
|
81
81
|
<tr>
|
|
82
82
|
<th colSpan={COLS}>{placeholder}</th>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
border: transparent;
|
|
8
8
|
border-radius: var(--radius-small);
|
|
9
9
|
background-color: transparent;
|
|
10
|
-
font-weight: var(--font-weight-
|
|
10
|
+
font-weight: var(--wds-font-weight-title-screen);
|
|
11
11
|
color: var(--color-content-primary);
|
|
12
12
|
}
|
|
13
13
|
@media (max-width: 320px) {
|
|
@@ -89,10 +89,11 @@
|
|
|
89
89
|
text-decoration-color: var(--color-content-tertiary);
|
|
90
90
|
}
|
|
91
91
|
.wds-Calendar__option--day {
|
|
92
|
-
|
|
92
|
+
--circleSize: var(--size-40);
|
|
93
|
+
block-size: var(--circleSize);
|
|
94
|
+
line-height: var(--circleSize);
|
|
95
|
+
inline-size: var(--circleSize);
|
|
93
96
|
border-radius: var(--radius-full);
|
|
94
|
-
line-height: var(--size-40);
|
|
95
|
-
inline-size: var(--size-40);
|
|
96
97
|
padding: 0;
|
|
97
98
|
display: inline-flex;
|
|
98
99
|
align-items: center;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
border: transparent;
|
|
12
12
|
border-radius: var(--radius-small);
|
|
13
13
|
background-color: transparent;
|
|
14
|
-
font-weight: var(--font-weight-
|
|
14
|
+
font-weight: var(--wds-font-weight-title-screen);
|
|
15
15
|
color: var(--color-content-primary);
|
|
16
16
|
|
|
17
17
|
&:focus {
|
|
@@ -51,10 +51,11 @@
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.wds-Calendar__option--day {
|
|
54
|
-
|
|
54
|
+
--circleSize: var(--size-40);
|
|
55
|
+
height: var(--circleSize);
|
|
56
|
+
line-height: var(--circleSize);
|
|
57
|
+
width: var(--circleSize);
|
|
55
58
|
border-radius: var(--radius-full);
|
|
56
|
-
line-height: var(--size-40);
|
|
57
|
-
width: var(--size-40);
|
|
58
59
|
padding: 0;
|
|
59
60
|
display: inline-flex;
|
|
60
61
|
align-items: center;
|
|
@@ -96,7 +96,7 @@ const TableLink = ({
|
|
|
96
96
|
aria-pressed={active}
|
|
97
97
|
className={clsx(
|
|
98
98
|
`wds-Calendar__option--${type}`,
|
|
99
|
-
`tw-date-lookup-${type}-option np-text-body-default-bold`,
|
|
99
|
+
`tw-date-lookup-${type}-option np-text-body-default-bold wds-text-body-default-bold`,
|
|
100
100
|
{ active: !!active },
|
|
101
101
|
{ today: !!today },
|
|
102
102
|
{ disabled: !!isUnavailable },
|
|
@@ -166,6 +166,7 @@ export const RTLDiff: Story = {
|
|
|
166
166
|
});
|
|
167
167
|
},
|
|
168
168
|
...withRTLDiff({
|
|
169
|
+
fixedRows: { heights: 'auto' },
|
|
169
170
|
i18n: {
|
|
170
171
|
disabledReason: {
|
|
171
172
|
en: 'Weekends and specific dates are unavailable.',
|
|
@@ -174,3 +175,36 @@ export const RTLDiff: Story = {
|
|
|
174
175
|
},
|
|
175
176
|
}),
|
|
176
177
|
};
|
|
178
|
+
|
|
179
|
+
const rtlDiffDayView = withRTLDiff({
|
|
180
|
+
i18n: {
|
|
181
|
+
disabledReason: {
|
|
182
|
+
en: 'Weekends and specific dates are unavailable.',
|
|
183
|
+
ar: 'عطلات نهاية الأسبوع وتواريخ محددة غير متاحة.',
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Day view only, for the RTL Layout docs page. Hidden from the sidebar, tests and Chromatic,
|
|
190
|
+
* as `RTLDiff` already covers it.
|
|
191
|
+
*/
|
|
192
|
+
export const RTLDiffDayView: Story = {
|
|
193
|
+
tags: ['!dev', '!test'],
|
|
194
|
+
render: () => {
|
|
195
|
+
const i18n = useRtlDiffI18n();
|
|
196
|
+
return (
|
|
197
|
+
<Calendar
|
|
198
|
+
value={selectedDate}
|
|
199
|
+
min={minDate}
|
|
200
|
+
max={maxDate}
|
|
201
|
+
disabledRules={{ ...disabledRulesRtl, reason: i18n.disabledReason }}
|
|
202
|
+
/>
|
|
203
|
+
);
|
|
204
|
+
},
|
|
205
|
+
...rtlDiffDayView,
|
|
206
|
+
parameters: {
|
|
207
|
+
...rtlDiffDayView.parameters,
|
|
208
|
+
chromatic: { ...rtlDiffDayView.parameters.chromatic, disableSnapshot: true },
|
|
209
|
+
},
|
|
210
|
+
};
|
package/src/Chips/Chip/Chip.css
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
border-color: var(--color-sentiment-negative-active) !important;
|
|
71
71
|
}
|
|
72
72
|
.np-theme-personal .np-chip {
|
|
73
|
-
font-weight: var(--font-weight-
|
|
73
|
+
font-weight: var(--wds-font-weight-body-bold);
|
|
74
74
|
color: var(--color-interactive-primary);
|
|
75
75
|
padding-block: 0;
|
|
76
76
|
padding-inline: var(--size-16);
|
|
@@ -114,11 +114,13 @@
|
|
|
114
114
|
.np-theme-personal .np-chip.np-chip--removable {
|
|
115
115
|
position: relative;
|
|
116
116
|
}
|
|
117
|
-
.np-theme-personal .np-chip.np-chip--removable .np-text-body-default-bold
|
|
117
|
+
.np-theme-personal .np-chip.np-chip--removable .np-text-body-default-bold,
|
|
118
|
+
.np-theme-personal .np-chip.np-chip--removable .wds-text-body-default-bold {
|
|
118
119
|
padding-inline-end: var(--size-24);
|
|
119
120
|
}
|
|
120
121
|
@media (max-width: 320px) {
|
|
121
|
-
.np-theme-personal .np-chip.np-chip--removable .np-text-body-default-bold
|
|
122
|
+
.np-theme-personal .np-chip.np-chip--removable .np-text-body-default-bold,
|
|
123
|
+
.np-theme-personal .np-chip.np-chip--removable .wds-text-body-default-bold {
|
|
122
124
|
padding-inline-end: var(--size-48);
|
|
123
125
|
}
|
|
124
126
|
}
|
package/src/Chips/Chip/Chip.less
CHANGED
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
.np-theme-personal & {
|
|
93
|
-
font-weight: var(--font-weight-
|
|
93
|
+
font-weight: var(--wds-font-weight-body-bold);
|
|
94
94
|
color: var(--color-interactive-primary);
|
|
95
95
|
padding: 0 var(--size-16);
|
|
96
96
|
border-color: var(--color-interactive-secondary);
|
|
@@ -137,7 +137,8 @@
|
|
|
137
137
|
&.np-chip--removable {
|
|
138
138
|
position: relative;
|
|
139
139
|
|
|
140
|
-
.np-text-body-default-bold
|
|
140
|
+
.np-text-body-default-bold,
|
|
141
|
+
.wds-text-body-default-bold {
|
|
141
142
|
padding-right: var(--size-24);
|
|
142
143
|
|
|
143
144
|
@media (--screen-400-zoom) {
|
|
@@ -232,13 +232,8 @@ export const SentimentAwareness: Story = {
|
|
|
232
232
|
style={{ display: 'flex', alignItems: 'center', padding: '8px 0', gap: '8px' }}
|
|
233
233
|
>
|
|
234
234
|
<div
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
fontSize: '11px',
|
|
238
|
-
fontWeight: 'bold',
|
|
239
|
-
textAlign: 'left',
|
|
240
|
-
paddingLeft: '8px',
|
|
241
|
-
}}
|
|
235
|
+
className="wds-text-body-default-bold p-l-1 text-align-left"
|
|
236
|
+
style={{ width: '12ch' }}
|
|
242
237
|
>
|
|
243
238
|
{sentiment} (base)
|
|
244
239
|
</div>
|
|
@@ -246,7 +241,7 @@ export const SentimentAwareness: Story = {
|
|
|
246
241
|
<div
|
|
247
242
|
key={button.label}
|
|
248
243
|
style={{
|
|
249
|
-
width: '
|
|
244
|
+
width: '13ch',
|
|
250
245
|
display: 'flex',
|
|
251
246
|
justifyContent: 'center',
|
|
252
247
|
}}
|
|
@@ -270,13 +265,8 @@ export const SentimentAwareness: Story = {
|
|
|
270
265
|
style={{ display: 'flex', alignItems: 'center', padding: '8px 0', gap: '8px' }}
|
|
271
266
|
>
|
|
272
267
|
<div
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
fontSize: '11px',
|
|
276
|
-
fontWeight: 'bold',
|
|
277
|
-
textAlign: 'left',
|
|
278
|
-
paddingLeft: '8px',
|
|
279
|
-
}}
|
|
268
|
+
className="wds-text-body-default-bold p-l-1 text-align-left"
|
|
269
|
+
style={{ width: '12ch' }}
|
|
280
270
|
>
|
|
281
271
|
{sentiment} (elevated)
|
|
282
272
|
</div>
|
|
@@ -284,7 +274,7 @@ export const SentimentAwareness: Story = {
|
|
|
284
274
|
<div
|
|
285
275
|
key={button.label}
|
|
286
276
|
style={{
|
|
287
|
-
width: '
|
|
277
|
+
width: '13ch',
|
|
288
278
|
display: 'flex',
|
|
289
279
|
justifyContent: 'center',
|
|
290
280
|
}}
|
|
@@ -49,6 +49,52 @@ export const Sizes: Story = {
|
|
|
49
49
|
},
|
|
50
50
|
...withRTLDiff({
|
|
51
51
|
renderAs: 'iframe',
|
|
52
|
+
fixedRows: { heights: [6, 7, 9] },
|
|
53
|
+
i18n: {
|
|
54
|
+
dayLabel: { en: 'Day', ar: 'اليوم' },
|
|
55
|
+
monthLabel: { en: 'Month', ar: 'الشهر' },
|
|
56
|
+
yearLabel: { en: 'Year', ar: 'السنة' },
|
|
57
|
+
},
|
|
58
|
+
}),
|
|
59
|
+
};
|
|
60
|
+
export const MobileSizes: Story = {
|
|
61
|
+
render: () => {
|
|
62
|
+
const i18n = useRtlDiffI18n();
|
|
63
|
+
return (
|
|
64
|
+
<>
|
|
65
|
+
<DateInput
|
|
66
|
+
size="sm"
|
|
67
|
+
dayLabel={i18n.dayLabel}
|
|
68
|
+
monthLabel={i18n.monthLabel}
|
|
69
|
+
yearLabel={i18n.yearLabel}
|
|
70
|
+
onChange={fn()}
|
|
71
|
+
/>
|
|
72
|
+
<DateInput
|
|
73
|
+
size="md"
|
|
74
|
+
dayLabel={i18n.dayLabel}
|
|
75
|
+
monthLabel={i18n.monthLabel}
|
|
76
|
+
yearLabel={i18n.yearLabel}
|
|
77
|
+
onChange={fn()}
|
|
78
|
+
/>
|
|
79
|
+
<DateInput
|
|
80
|
+
size="lg"
|
|
81
|
+
dayLabel={i18n.dayLabel}
|
|
82
|
+
monthLabel={i18n.monthLabel}
|
|
83
|
+
yearLabel={i18n.yearLabel}
|
|
84
|
+
onChange={fn()}
|
|
85
|
+
/>
|
|
86
|
+
<DateInput
|
|
87
|
+
mode="month-year"
|
|
88
|
+
monthLabel={i18n.monthLabel}
|
|
89
|
+
yearLabel={i18n.yearLabel}
|
|
90
|
+
onChange={fn()}
|
|
91
|
+
/>
|
|
92
|
+
</>
|
|
93
|
+
);
|
|
94
|
+
},
|
|
95
|
+
...withRTLDiff({
|
|
96
|
+
viewport: 'smallMobile',
|
|
97
|
+
fixedRows: { heights: [13, 16, 21] },
|
|
52
98
|
i18n: {
|
|
53
99
|
dayLabel: { en: 'Day', ar: 'اليوم' },
|
|
54
100
|
monthLabel: { en: 'Month', ar: 'الشهر' },
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
.np-decision .decision {
|
|
2
2
|
display: flex;
|
|
3
3
|
}
|
|
4
|
-
.np-decision__tile--small .np-text-title-subsection
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
.np-decision__tile--small .np-text-title-subsection,
|
|
5
|
+
.np-decision__tile--small .wds-text-title-subsection {
|
|
6
|
+
font-size: var(--wds-font-size-body-large);
|
|
7
|
+
line-height: var(--wds-line-height-body-large);
|
|
7
8
|
}
|
|
8
9
|
.np-decision:not(.flex-column) {
|
|
9
10
|
gap: var(--size-24);
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
&__tile--small {
|
|
7
|
-
.np-text-title-subsection
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
.np-text-title-subsection,
|
|
8
|
+
.wds-text-title-subsection {
|
|
9
|
+
font-size: var(--wds-font-size-body-large);
|
|
10
|
+
line-height: var(--wds-line-height-body-large);
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -222,7 +222,7 @@ export const RTLDiff: Story = {
|
|
|
222
222
|
);
|
|
223
223
|
},
|
|
224
224
|
...withRTLDiff({
|
|
225
|
-
fixedRows: { heights:
|
|
225
|
+
fixedRows: { heights: 'auto' },
|
|
226
226
|
i18n: {
|
|
227
227
|
fullName: { en: 'Full name', ar: 'الاسم الكامل' },
|
|
228
228
|
customerName: { en: 'Alice Smith', ar: 'أليس سميث' },
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Typography } from '../common';
|
|
2
|
+
import { render, screen } from '../test-utils';
|
|
3
|
+
|
|
4
|
+
import Display from '.';
|
|
5
|
+
|
|
6
|
+
describe('Display', () => {
|
|
7
|
+
it('testing default state', () => {
|
|
8
|
+
render(<Display>Test</Display>);
|
|
9
|
+
const copy = screen.getByText('Test');
|
|
10
|
+
expect(copy.tagName).toBe('H1');
|
|
11
|
+
expect(copy).toHaveClass(
|
|
12
|
+
'np-display',
|
|
13
|
+
`np-text-${Typography.DISPLAY_LARGE}`,
|
|
14
|
+
`wds-text-${Typography.DISPLAY_LARGE}`,
|
|
15
|
+
);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('renders both typography classes for the given type', () => {
|
|
19
|
+
render(<Display type={Typography.DISPLAY_NUMBER_MEDIUM}>Test</Display>);
|
|
20
|
+
expect(screen.getByText('Test')).toHaveClass(
|
|
21
|
+
`np-text-${Typography.DISPLAY_NUMBER_MEDIUM}`,
|
|
22
|
+
`wds-text-${Typography.DISPLAY_NUMBER_MEDIUM}`,
|
|
23
|
+
);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('renders only the legacy class for display-extra-large, which has no locale-aware style', () => {
|
|
27
|
+
render(<Display type={Typography.DISPLAY_EXTRA_LARGE}>Test</Display>);
|
|
28
|
+
const copy = screen.getByText('Test');
|
|
29
|
+
expect(copy).toHaveClass(`np-text-${Typography.DISPLAY_EXTRA_LARGE}`);
|
|
30
|
+
expect(copy).not.toHaveClass(`wds-text-${Typography.DISPLAY_EXTRA_LARGE}`);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('enforces tag via `as` prop and merges `className`', () => {
|
|
34
|
+
render(
|
|
35
|
+
<Display as="h3" className="custom">
|
|
36
|
+
Test
|
|
37
|
+
</Display>,
|
|
38
|
+
);
|
|
39
|
+
const copy = screen.getByText('Test');
|
|
40
|
+
expect(copy.tagName).toBe('H3');
|
|
41
|
+
expect(copy).toHaveClass('custom', `wds-text-${Typography.DISPLAY_LARGE}`);
|
|
42
|
+
});
|
|
43
|
+
});
|
package/src/Display/Display.tsx
CHANGED
|
@@ -18,7 +18,17 @@ function Display({
|
|
|
18
18
|
id,
|
|
19
19
|
}: DisplayProps) {
|
|
20
20
|
return (
|
|
21
|
-
<Heading
|
|
21
|
+
<Heading
|
|
22
|
+
id={id}
|
|
23
|
+
className={clsx(
|
|
24
|
+
'np-display',
|
|
25
|
+
`np-text-${type}`,
|
|
26
|
+
// display-extra-large has no locale-aware equivalent
|
|
27
|
+
type !== Typography.DISPLAY_EXTRA_LARGE && `wds-text-${type}`,
|
|
28
|
+
'text-primary',
|
|
29
|
+
className,
|
|
30
|
+
)}
|
|
31
|
+
>
|
|
22
32
|
{children}
|
|
23
33
|
</Heading>
|
|
24
34
|
);
|