@transferwise/components 0.0.0-experimental-db6cf60 → 0.0.0-experimental-4678400
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 +1 -1
- package/build/Body/Body.js.map +1 -1
- package/build/Body/Body.mjs +1 -1
- 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/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/Header/Header.js +8 -57
- package/build/Header/Header.js.map +1 -1
- package/build/Header/Header.mjs +9 -58
- package/build/Header/Header.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 +1 -1
- package/build/Stepper/Stepper.js.map +1 -1
- package/build/Stepper/Stepper.mjs +1 -1
- 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/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/index.js +0 -2
- package/build/index.js.map +1 -1
- package/build/index.mjs +0 -1
- package/build/index.mjs.map +1 -1
- package/build/main.css +8673 -2355
- package/build/styles/Accordion/Accordion.css +7 -6
- package/build/styles/Body/Body.css +1 -1
- package/build/styles/Calendar/Calendar.css +11 -4
- package/build/styles/Calendar/TableLink/TableLink.css +11 -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/Header/Header.css +0 -46
- package/build/styles/Inputs/Input/Input.css +69 -57
- package/build/styles/Inputs/TextArea/TextArea.css +69 -57
- 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 +4 -43
- 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 +4 -2
- 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 +22 -44
- 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 +22 -44
- package/build/styles/css/dropdowns.css +39 -54
- package/build/styles/css/droppable.css +28 -6
- package/build/styles/css/footer.css +41 -10
- package/build/styles/css/input-groups.css +205 -162
- package/build/styles/css/list-group.css +1 -42
- package/build/styles/css/modals.css +1 -1
- package/build/styles/css/navbar.css +66 -81
- package/build/styles/css/navs.css +8 -8
- package/build/styles/css/neptune-addons.css +15 -0
- package/build/styles/css/neptune-core.css +5887 -524
- package/build/styles/css/neptune.css +8348 -1945
- package/build/styles/css/panels.css +2 -2
- package/build/styles/css/popovers.css +39 -56
- 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 +8673 -2355
- package/build/styles/props/neptune-tokens.css +805 -3
- package/build/styles/styles/less/accordion.css +22 -44
- 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 +22 -44
- package/build/styles/styles/less/dropdowns.css +39 -54
- 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 +205 -162
- package/build/styles/styles/less/list-group.css +1 -42
- package/build/styles/styles/less/modals.css +1 -1
- package/build/styles/styles/less/navbar.css +66 -81
- 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 +5887 -524
- package/build/styles/styles/less/neptune.css +8348 -1945
- package/build/styles/styles/less/panels.css +2 -2
- package/build/styles/styles/less/popovers.css +39 -56
- 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/ExpressiveMoneyInput/AmountInput/AmountInput.d.ts.map +1 -1
- package/build/types/Header/Header.d.ts +4 -31
- package/build/types/Header/Header.d.ts.map +1 -1
- package/build/types/Header/index.d.ts +1 -2
- package/build/types/Header/index.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/build/types/index.d.ts +1 -3
- package/build/types/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/Accordion/Accordion.css +7 -6
- package/src/Accordion/Accordion.less +7 -6
- package/src/Body/Body.css +1 -1
- package/src/Body/Body.less +1 -1
- package/src/Body/Body.test.tsx +4 -4
- package/src/Body/Body.tsx +2 -2
- package/src/Calendar/Calendar.css +11 -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 +11 -4
- package/src/Calendar/TableLink/TableLink.less +14 -4
- package/src/Calendar/TableLink/TableLink.tsx +1 -1
- 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/Decision/Decision.css +4 -3
- package/src/Decision/Decision.less +4 -3
- package/src/DefinitionList/_stories/DefinitionList.story.tsx +1 -1
- package/src/Display/_stories/Display.story.tsx +20 -6
- 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/FlowNavigation/AnimatedLabel/AnimatedLabel.tsx +1 -1
- package/src/Header/Header.css +0 -46
- package/src/Header/Header.less +1 -63
- package/src/Header/Header.test.tsx +1 -133
- package/src/Header/Header.tsx +11 -107
- package/src/Header/_stories/Header.story.tsx +2 -97
- package/src/Header/_stories/Header.test.story.tsx +0 -32
- package/src/Header/index.ts +1 -2
- package/src/Inputs/Input/Input.css +69 -57
- package/src/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.tsx +2 -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 +2 -2
- package/src/Inputs/SelectInput/_stories/SelectInput.story.tsx +1 -1
- package/src/Inputs/TextArea/TextArea.css +69 -57
- package/src/Inputs/_common.less +16 -10
- package/src/Label/Label.css +3 -0
- package/src/Label/Label.less +8 -0
- package/src/Label/Label.tsx +1 -1
- 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/Nudge/Nudge.css +3 -3
- package/src/Nudge/Nudge.less +3 -3
- package/src/PocketSurface/_stories/PocketSurface.story.tsx +2 -2
- package/src/Popover/Popover.css +4 -43
- package/src/Popover/Popover.less +2 -2
- package/src/ProgressBar/ProgressBar.css +3 -2
- package/src/ProgressBar/ProgressBar.less +12 -11
- 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 +1 -1
- package/src/Table/Header/TableHeader.tsx +1 -1
- package/src/Table/StatusText/TableStatusText.test.tsx +5 -5
- package/src/Table/Table.css +18 -8
- package/src/Table/Table.less +20 -9
- package/src/Tabs/Tab/Tab.tsx +1 -1
- package/src/Tabs/Tabs.css +3 -3
- package/src/Tabs/Tabs.less +3 -3
- 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/Tile/Tile.css +4 -3
- package/src/Tile/Tile.less +4 -3
- package/src/Typeahead/Typeahead.css +4 -2
- package/src/Typeahead/Typeahead.less +2 -1
- package/src/Typeahead/TypeaheadOption/TypeaheadOption.tsx +2 -2
- package/src/Upload/Steps/UploadImageStep/UploadImageStep.tsx +2 -2
- package/src/UploadInput/UploadInput.css +1 -1
- package/src/UploadInput/UploadInput.less +7 -4
- 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.tsx +2 -2
- 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/index.ts +1 -3
- package/src/main.css +8673 -2355
- package/src/main.less +3 -3
- package/src/styles/less/accordion.css +22 -44
- 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 +81 -235
- 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 +22 -44
- package/src/styles/less/decision.less +2 -2
- package/src/styles/less/dropdowns.css +39 -54
- 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 +205 -162
- package/src/styles/less/input-groups.less +23 -9
- package/src/styles/less/list-group.css +1 -42
- 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 +66 -81
- 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 +5887 -524
- package/src/styles/less/neptune.bundle.less +4 -0
- package/src/styles/less/neptune.css +8348 -1945
- package/src/styles/less/panels.css +2 -2
- package/src/styles/less/panels.less +2 -2
- package/src/styles/less/popovers.css +39 -56
- 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/CardContainer/CardContainer.js +0 -30
- package/build/CardContainer/CardContainer.js.map +0 -1
- package/build/CardContainer/CardContainer.mjs +0 -26
- package/build/CardContainer/CardContainer.mjs.map +0 -1
- package/build/Header/HeaderActionButton.js +0 -70
- package/build/Header/HeaderActionButton.js.map +0 -1
- package/build/Header/HeaderActionButton.mjs +0 -65
- package/build/Header/HeaderActionButton.mjs.map +0 -1
- package/build/styles/CardContainer/CardContainer.css +0 -78
- 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/build/types/CardContainer/CardContainer.d.ts +0 -8
- package/build/types/CardContainer/CardContainer.d.ts.map +0 -1
- package/build/types/CardContainer/CardContainer.types.d.ts +0 -32
- package/build/types/CardContainer/CardContainer.types.d.ts.map +0 -1
- package/build/types/CardContainer/_stories/helpers.d.ts +0 -3
- package/build/types/CardContainer/_stories/helpers.d.ts.map +0 -1
- package/build/types/CardContainer/index.d.ts +0 -3
- package/build/types/CardContainer/index.d.ts.map +0 -1
- package/build/types/Header/HeaderActionButton.d.ts +0 -53
- package/build/types/Header/HeaderActionButton.d.ts.map +0 -1
- package/src/CardContainer/CardContainer.css +0 -78
- package/src/CardContainer/CardContainer.less +0 -111
- package/src/CardContainer/CardContainer.test.tsx +0 -103
- package/src/CardContainer/CardContainer.tsx +0 -36
- package/src/CardContainer/CardContainer.types.ts +0 -36
- package/src/CardContainer/_stories/CardContainer.story.tsx +0 -99
- package/src/CardContainer/_stories/CardContainer.test.story.tsx +0 -375
- package/src/CardContainer/_stories/CardContainer.withHeader.story.tsx +0 -149
- package/src/CardContainer/_stories/helpers.tsx +0 -50
- package/src/CardContainer/index.ts +0 -2
- package/src/Header/HeaderActionButton.tsx +0 -125
- 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
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { clsx } from 'clsx';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
const CardContainer = /*#__PURE__*/forwardRef(({
|
|
6
|
-
spotlight,
|
|
7
|
-
children,
|
|
8
|
-
as: Element = 'section',
|
|
9
|
-
className,
|
|
10
|
-
...props
|
|
11
|
-
}, ref) => {
|
|
12
|
-
return /*#__PURE__*/jsxs(Element, {
|
|
13
|
-
ref: ref,
|
|
14
|
-
className: clsx('wds-card-container', spotlight && `wds-card-container--${spotlight}`, className),
|
|
15
|
-
...props,
|
|
16
|
-
children: [children, spotlight === 'inactive' && /*#__PURE__*/jsx("svg", {
|
|
17
|
-
"aria-hidden": "true",
|
|
18
|
-
className: "wds-card-container__border",
|
|
19
|
-
children: /*#__PURE__*/jsx("rect", {})
|
|
20
|
-
})]
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
CardContainer.displayName = 'CardContainer';
|
|
24
|
-
|
|
25
|
-
export { CardContainer as default };
|
|
26
|
-
//# sourceMappingURL=CardContainer.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardContainer.mjs","sources":["../../src/CardContainer/CardContainer.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport type { CardContainerProps } from './CardContainer.types';\n\n/**\n * A bounded surface that groups related content. It has no slots of its own: compose a `Header`\n * and any other content as children, and the card stacks them with no gap between them.\n */\nconst CardContainer = forwardRef<HTMLElement, CardContainerProps>(\n ({ spotlight, children, as: Element = 'section', className, ...props }, ref) => {\n return (\n <Element\n ref={ref as React.Ref<HTMLElement & HTMLDivElement>}\n className={clsx(\n 'wds-card-container',\n spotlight && `wds-card-container--${spotlight}`,\n className,\n )}\n {...props}\n >\n {children}\n\n {spotlight === 'inactive' && (\n <svg aria-hidden=\"true\" className=\"wds-card-container__border\">\n <rect />\n </svg>\n )}\n </Element>\n );\n },\n);\n\nCardContainer.displayName = 'CardContainer';\n\nexport default CardContainer;\n"],"names":["CardContainer","forwardRef","spotlight","children","as","Element","className","props","ref","_jsxs","clsx","_jsx","displayName"],"mappings":";;;;AASA,MAAMA,aAAa,gBAAGC,UAAU,CAC9B,CAAC;EAAEC,SAAS;EAAEC,QAAQ;EAAEC,EAAE,EAAEC,OAAO,GAAG,SAAS;EAAEC,SAAS;EAAE,GAAGC;AAAK,CAAE,EAAEC,GAAG,KAAI;EAC7E,oBACEC,IAAA,CAACJ,OAAO,EAAA;AACNG,IAAAA,GAAG,EAAEA,GAA+C;AACpDF,IAAAA,SAAS,EAAEI,IAAI,CACb,oBAAoB,EACpBR,SAAS,IAAI,CAAA,oBAAA,EAAuBA,SAAS,CAAA,CAAE,EAC/CI,SAAS,CACT;AAAA,IAAA,GACEC,KAAK;AAAAJ,IAAAA,QAAA,GAERA,QAAQ,EAERD,SAAS,KAAK,UAAU,iBACvBS,GAAA,CAAA,KAAA,EAAA;AAAK,MAAA,aAAA,EAAY,MAAM;AAACL,MAAAA,SAAS,EAAC,4BAA4B;MAAAH,QAAA,eAC5DQ,GAAA,CAAA,MAAA,EAAA,EAAK;AACP,KAAK,CACN;AAAA,GACM,CAAC;AAEd,CAAC;AAGHX,aAAa,CAACY,WAAW,GAAG,eAAe;;"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var Button_resolver = require('../Button/Button.resolver.js');
|
|
7
|
-
var IconButton = require('../IconButton/IconButton.js');
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
|
|
10
|
-
const BUTTON_PRIORITY = {
|
|
11
|
-
action: 'secondary',
|
|
12
|
-
actionSecondary: 'secondary-neutral'
|
|
13
|
-
};
|
|
14
|
-
const ICON_BUTTON_PRIORITY = {
|
|
15
|
-
action: 'secondary',
|
|
16
|
-
actionSecondary: 'tertiary'
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Tells a `HeaderActionButton` object apart from any other node passed to an action slot.
|
|
20
|
-
* Every button action has a `label` or an `icon`, which no React element, portal or array does.
|
|
21
|
-
*/
|
|
22
|
-
const isHeaderActionButton = value => typeof value === 'object' && value !== null && ! /*#__PURE__*/React.isValidElement(value) && !Array.isArray(value) && ('label' in value || 'icon' in value);
|
|
23
|
-
/** Renders a `HeaderActionButton` at the emphasis of the slot it was passed to. */
|
|
24
|
-
const HeaderActionButtonComponent = function HeaderActionButton({
|
|
25
|
-
action: {
|
|
26
|
-
label,
|
|
27
|
-
icon,
|
|
28
|
-
'aria-label': ariaLabel,
|
|
29
|
-
'data-testid': dataTestId,
|
|
30
|
-
href,
|
|
31
|
-
target,
|
|
32
|
-
onClick,
|
|
33
|
-
disabled
|
|
34
|
-
},
|
|
35
|
-
slot
|
|
36
|
-
}) {
|
|
37
|
-
if (label === undefined) {
|
|
38
|
-
return /*#__PURE__*/jsxRuntime.jsx(IconButton.default, {
|
|
39
|
-
size: 32,
|
|
40
|
-
priority: ICON_BUTTON_PRIORITY[slot],
|
|
41
|
-
"aria-label": ariaLabel,
|
|
42
|
-
href: href,
|
|
43
|
-
target: target,
|
|
44
|
-
disabled: disabled,
|
|
45
|
-
"data-testid": dataTestId,
|
|
46
|
-
onClick: onClick,
|
|
47
|
-
children: icon
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
return /*#__PURE__*/jsxRuntime.jsx(Button_resolver.default, {
|
|
51
|
-
v2: true,
|
|
52
|
-
size: "sm",
|
|
53
|
-
priority: BUTTON_PRIORITY[slot],
|
|
54
|
-
"aria-label": ariaLabel,
|
|
55
|
-
href: href,
|
|
56
|
-
target: target,
|
|
57
|
-
disabled: disabled,
|
|
58
|
-
addonEnd: icon ? {
|
|
59
|
-
type: 'icon',
|
|
60
|
-
value: icon
|
|
61
|
-
} : undefined,
|
|
62
|
-
"data-testid": dataTestId,
|
|
63
|
-
onClick: onClick,
|
|
64
|
-
children: label
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
exports.default = HeaderActionButtonComponent;
|
|
69
|
-
exports.isHeaderActionButton = isHeaderActionButton;
|
|
70
|
-
//# sourceMappingURL=HeaderActionButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderActionButton.js","sources":["../../src/Header/HeaderActionButton.tsx"],"sourcesContent":["import { isValidElement, type MouseEventHandler, type ReactNode } from 'react';\n\nimport Button from '../Button';\nimport type { ButtonPriority, ButtonProps } from '../Button/Button.types';\nimport IconButton, { type IconButtonProps } from '../IconButton';\n\n/** The action slot a `HeaderActionButton` was passed to, which is what determines its emphasis. */\nexport type HeaderActionSlot = 'action' | 'actionSecondary';\n\ntype HeaderActionButtonBase = Pick<ButtonProps, 'href' | 'target' | 'disabled'> & {\n /**\n * `HTMLElement` rather than a narrower target, because an action is a `button` or an `a`\n * depending on whether `href` is set.\n * @default undefined\n */\n onClick?: MouseEventHandler<HTMLElement>;\n\n /**\n * Rendered after `label`, or as the only content of an unlabelled action.\n * Size it yourself — 16px is expected in both cases.\n * @default undefined\n */\n icon?: ReactNode;\n 'data-testid'?: string;\n};\n\n/** An action with a visible label, rendered as a small button. */\ntype HeaderLabelledActionButton = HeaderActionButtonBase & {\n label: ButtonProps['children'];\n /** @default undefined */\n 'aria-label'?: string;\n};\n\n/**\n * An action with no visible label, rendered as a 32px icon button. The icon is\n * the only thing on screen and `aria-label` is the only accessible name, so\n * both are required.\n */\ntype HeaderIconActionButton = HeaderActionButtonBase & {\n label?: never;\n icon: ReactNode;\n 'aria-label': string;\n};\n\n/**\n * An action the `Header` renders as a button. With a `label` it is a small `Button`; without\n * one, a 32px `IconButton`, which requires both an `icon` and an `aria-label`. Emphasis is not\n * part of the object — it comes from the slot the action is passed to.\n */\nexport type HeaderActionButton = HeaderLabelledActionButton | HeaderIconActionButton;\n\nconst BUTTON_PRIORITY = {\n action: 'secondary',\n actionSecondary: 'secondary-neutral',\n} as const satisfies Record<HeaderActionSlot, ButtonPriority>;\n\nconst ICON_BUTTON_PRIORITY = {\n action: 'secondary',\n actionSecondary: 'tertiary',\n} as const satisfies Record<HeaderActionSlot, IconButtonProps['priority']>;\n\n/**\n * Tells a `HeaderActionButton` object apart from any other node passed to an action slot.\n * Every button action has a `label` or an `icon`, which no React element, portal or array does.\n */\nexport const isHeaderActionButton = (value: unknown): value is HeaderActionButton =>\n typeof value === 'object' &&\n value !== null &&\n !isValidElement(value) &&\n !Array.isArray(value) &&\n ('label' in value || 'icon' in value);\n\n/** Renders a `HeaderActionButton` at the emphasis of the slot it was passed to. */\nconst HeaderActionButtonComponent = function HeaderActionButton({\n action: {\n label,\n icon,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestId,\n href,\n target,\n onClick,\n disabled,\n },\n slot,\n}: {\n action: HeaderActionButton;\n slot: HeaderActionSlot;\n}) {\n if (label === undefined) {\n return (\n <IconButton\n size={32}\n priority={ICON_BUTTON_PRIORITY[slot]}\n aria-label={ariaLabel}\n href={href}\n target={target}\n disabled={disabled}\n data-testid={dataTestId}\n onClick={onClick}\n >\n {icon}\n </IconButton>\n );\n }\n\n return (\n <Button\n v2\n size=\"sm\"\n priority={BUTTON_PRIORITY[slot]}\n aria-label={ariaLabel}\n href={href}\n target={target}\n disabled={disabled}\n addonEnd={icon ? { type: 'icon', value: icon } : undefined}\n data-testid={dataTestId}\n onClick={onClick}\n >\n {label}\n </Button>\n );\n};\n\nexport default HeaderActionButtonComponent;\n"],"names":["BUTTON_PRIORITY","action","actionSecondary","ICON_BUTTON_PRIORITY","isHeaderActionButton","value","isValidElement","Array","isArray","HeaderActionButtonComponent","HeaderActionButton","label","icon","ariaLabel","dataTestId","href","target","onClick","disabled","slot","undefined","_jsx","IconButton","size","priority","children","Button","v2","addonEnd","type"],"mappings":";;;;;;;;;AAmDA,MAAMA,eAAe,GAAG;AACtBC,EAAAA,MAAM,EAAE,WAAW;AACnBC,EAAAA,eAAe,EAAE;CAC0C;AAE7D,MAAMC,oBAAoB,GAAG;AAC3BF,EAAAA,MAAM,EAAE,WAAW;AACnBC,EAAAA,eAAe,EAAE;CACuD;AAE1E;;;AAGG;AACI,MAAME,oBAAoB,GAAIC,KAAc,IACjD,OAAOA,KAAK,KAAK,QAAQ,IACzBA,KAAK,KAAK,IAAI,IACd,eAACC,oBAAc,CAACD,KAAK,CAAC,IACtB,CAACE,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,KACpB,OAAO,IAAIA,KAAK,IAAI,MAAM,IAAIA,KAAK;AAEtC;AACA,MAAMI,2BAA2B,GAAG,SAASC,kBAAkBA,CAAC;AAC9DT,EAAAA,MAAM,EAAE;IACNU,KAAK;IACLC,IAAI;AACJ,IAAA,YAAY,EAAEC,SAAS;AACvB,IAAA,aAAa,EAAEC,UAAU;IACzBC,IAAI;IACJC,MAAM;IACNC,OAAO;AACPC,IAAAA;GACD;AACDC,EAAAA;AAAI,CAIL,EAAA;EACC,IAAIR,KAAK,KAAKS,SAAS,EAAE;IACvB,oBACEC,cAAA,CAACC,kBAAU,EAAA;AACTC,MAAAA,IAAI,EAAE,EAAG;AACTC,MAAAA,QAAQ,EAAErB,oBAAoB,CAACgB,IAAI,CAAE;AACrC,MAAA,YAAA,EAAYN,SAAU;AACtBE,MAAAA,IAAI,EAAEA,IAAK;AACXC,MAAAA,MAAM,EAAEA,MAAO;AACfE,MAAAA,QAAQ,EAAEA,QAAS;AACnB,MAAA,aAAA,EAAaJ,UAAW;AACxBG,MAAAA,OAAO,EAAEA,OAAQ;AAAAQ,MAAAA,QAAA,EAEhBb;AAAI,KACK,CAAC;AAEjB,EAAA;EAEA,oBACES,cAAA,CAACK,uBAAM,EAAA;IACLC,EAAE,EAAA,IAAA;AACFJ,IAAAA,IAAI,EAAC,IAAI;AACTC,IAAAA,QAAQ,EAAExB,eAAe,CAACmB,IAAI,CAAE;AAChC,IAAA,YAAA,EAAYN,SAAU;AACtBE,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,MAAM,EAAEA,MAAO;AACfE,IAAAA,QAAQ,EAAEA,QAAS;IACnBU,QAAQ,EAAEhB,IAAI,GAAG;AAAEiB,MAAAA,IAAI,EAAE,MAAM;AAAExB,MAAAA,KAAK,EAAEO;AAAI,KAAE,GAAGQ,SAAU;AAC3D,IAAA,aAAA,EAAaN,UAAW;AACxBG,IAAAA,OAAO,EAAEA,OAAQ;AAAAQ,IAAAA,QAAA,EAEhBd;AAAK,GACA,CAAC;AAEb;;;"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { isValidElement } from 'react';
|
|
2
|
-
import Button from '../Button/Button.resolver.mjs';
|
|
3
|
-
import IconButton from '../IconButton/IconButton.mjs';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
const BUTTON_PRIORITY = {
|
|
7
|
-
action: 'secondary',
|
|
8
|
-
actionSecondary: 'secondary-neutral'
|
|
9
|
-
};
|
|
10
|
-
const ICON_BUTTON_PRIORITY = {
|
|
11
|
-
action: 'secondary',
|
|
12
|
-
actionSecondary: 'tertiary'
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Tells a `HeaderActionButton` object apart from any other node passed to an action slot.
|
|
16
|
-
* Every button action has a `label` or an `icon`, which no React element, portal or array does.
|
|
17
|
-
*/
|
|
18
|
-
const isHeaderActionButton = value => typeof value === 'object' && value !== null && ! /*#__PURE__*/isValidElement(value) && !Array.isArray(value) && ('label' in value || 'icon' in value);
|
|
19
|
-
/** Renders a `HeaderActionButton` at the emphasis of the slot it was passed to. */
|
|
20
|
-
const HeaderActionButtonComponent = function HeaderActionButton({
|
|
21
|
-
action: {
|
|
22
|
-
label,
|
|
23
|
-
icon,
|
|
24
|
-
'aria-label': ariaLabel,
|
|
25
|
-
'data-testid': dataTestId,
|
|
26
|
-
href,
|
|
27
|
-
target,
|
|
28
|
-
onClick,
|
|
29
|
-
disabled
|
|
30
|
-
},
|
|
31
|
-
slot
|
|
32
|
-
}) {
|
|
33
|
-
if (label === undefined) {
|
|
34
|
-
return /*#__PURE__*/jsx(IconButton, {
|
|
35
|
-
size: 32,
|
|
36
|
-
priority: ICON_BUTTON_PRIORITY[slot],
|
|
37
|
-
"aria-label": ariaLabel,
|
|
38
|
-
href: href,
|
|
39
|
-
target: target,
|
|
40
|
-
disabled: disabled,
|
|
41
|
-
"data-testid": dataTestId,
|
|
42
|
-
onClick: onClick,
|
|
43
|
-
children: icon
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return /*#__PURE__*/jsx(Button, {
|
|
47
|
-
v2: true,
|
|
48
|
-
size: "sm",
|
|
49
|
-
priority: BUTTON_PRIORITY[slot],
|
|
50
|
-
"aria-label": ariaLabel,
|
|
51
|
-
href: href,
|
|
52
|
-
target: target,
|
|
53
|
-
disabled: disabled,
|
|
54
|
-
addonEnd: icon ? {
|
|
55
|
-
type: 'icon',
|
|
56
|
-
value: icon
|
|
57
|
-
} : undefined,
|
|
58
|
-
"data-testid": dataTestId,
|
|
59
|
-
onClick: onClick,
|
|
60
|
-
children: label
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export { HeaderActionButtonComponent as default, isHeaderActionButton };
|
|
65
|
-
//# sourceMappingURL=HeaderActionButton.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderActionButton.mjs","sources":["../../src/Header/HeaderActionButton.tsx"],"sourcesContent":["import { isValidElement, type MouseEventHandler, type ReactNode } from 'react';\n\nimport Button from '../Button';\nimport type { ButtonPriority, ButtonProps } from '../Button/Button.types';\nimport IconButton, { type IconButtonProps } from '../IconButton';\n\n/** The action slot a `HeaderActionButton` was passed to, which is what determines its emphasis. */\nexport type HeaderActionSlot = 'action' | 'actionSecondary';\n\ntype HeaderActionButtonBase = Pick<ButtonProps, 'href' | 'target' | 'disabled'> & {\n /**\n * `HTMLElement` rather than a narrower target, because an action is a `button` or an `a`\n * depending on whether `href` is set.\n * @default undefined\n */\n onClick?: MouseEventHandler<HTMLElement>;\n\n /**\n * Rendered after `label`, or as the only content of an unlabelled action.\n * Size it yourself — 16px is expected in both cases.\n * @default undefined\n */\n icon?: ReactNode;\n 'data-testid'?: string;\n};\n\n/** An action with a visible label, rendered as a small button. */\ntype HeaderLabelledActionButton = HeaderActionButtonBase & {\n label: ButtonProps['children'];\n /** @default undefined */\n 'aria-label'?: string;\n};\n\n/**\n * An action with no visible label, rendered as a 32px icon button. The icon is\n * the only thing on screen and `aria-label` is the only accessible name, so\n * both are required.\n */\ntype HeaderIconActionButton = HeaderActionButtonBase & {\n label?: never;\n icon: ReactNode;\n 'aria-label': string;\n};\n\n/**\n * An action the `Header` renders as a button. With a `label` it is a small `Button`; without\n * one, a 32px `IconButton`, which requires both an `icon` and an `aria-label`. Emphasis is not\n * part of the object — it comes from the slot the action is passed to.\n */\nexport type HeaderActionButton = HeaderLabelledActionButton | HeaderIconActionButton;\n\nconst BUTTON_PRIORITY = {\n action: 'secondary',\n actionSecondary: 'secondary-neutral',\n} as const satisfies Record<HeaderActionSlot, ButtonPriority>;\n\nconst ICON_BUTTON_PRIORITY = {\n action: 'secondary',\n actionSecondary: 'tertiary',\n} as const satisfies Record<HeaderActionSlot, IconButtonProps['priority']>;\n\n/**\n * Tells a `HeaderActionButton` object apart from any other node passed to an action slot.\n * Every button action has a `label` or an `icon`, which no React element, portal or array does.\n */\nexport const isHeaderActionButton = (value: unknown): value is HeaderActionButton =>\n typeof value === 'object' &&\n value !== null &&\n !isValidElement(value) &&\n !Array.isArray(value) &&\n ('label' in value || 'icon' in value);\n\n/** Renders a `HeaderActionButton` at the emphasis of the slot it was passed to. */\nconst HeaderActionButtonComponent = function HeaderActionButton({\n action: {\n label,\n icon,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestId,\n href,\n target,\n onClick,\n disabled,\n },\n slot,\n}: {\n action: HeaderActionButton;\n slot: HeaderActionSlot;\n}) {\n if (label === undefined) {\n return (\n <IconButton\n size={32}\n priority={ICON_BUTTON_PRIORITY[slot]}\n aria-label={ariaLabel}\n href={href}\n target={target}\n disabled={disabled}\n data-testid={dataTestId}\n onClick={onClick}\n >\n {icon}\n </IconButton>\n );\n }\n\n return (\n <Button\n v2\n size=\"sm\"\n priority={BUTTON_PRIORITY[slot]}\n aria-label={ariaLabel}\n href={href}\n target={target}\n disabled={disabled}\n addonEnd={icon ? { type: 'icon', value: icon } : undefined}\n data-testid={dataTestId}\n onClick={onClick}\n >\n {label}\n </Button>\n );\n};\n\nexport default HeaderActionButtonComponent;\n"],"names":["BUTTON_PRIORITY","action","actionSecondary","ICON_BUTTON_PRIORITY","isHeaderActionButton","value","isValidElement","Array","isArray","HeaderActionButtonComponent","HeaderActionButton","label","icon","ariaLabel","dataTestId","href","target","onClick","disabled","slot","undefined","_jsx","IconButton","size","priority","children","Button","v2","addonEnd","type"],"mappings":";;;;;AAmDA,MAAMA,eAAe,GAAG;AACtBC,EAAAA,MAAM,EAAE,WAAW;AACnBC,EAAAA,eAAe,EAAE;CAC0C;AAE7D,MAAMC,oBAAoB,GAAG;AAC3BF,EAAAA,MAAM,EAAE,WAAW;AACnBC,EAAAA,eAAe,EAAE;CACuD;AAE1E;;;AAGG;AACI,MAAME,oBAAoB,GAAIC,KAAc,IACjD,OAAOA,KAAK,KAAK,QAAQ,IACzBA,KAAK,KAAK,IAAI,IACd,eAACC,cAAc,CAACD,KAAK,CAAC,IACtB,CAACE,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,KACpB,OAAO,IAAIA,KAAK,IAAI,MAAM,IAAIA,KAAK;AAEtC;AACA,MAAMI,2BAA2B,GAAG,SAASC,kBAAkBA,CAAC;AAC9DT,EAAAA,MAAM,EAAE;IACNU,KAAK;IACLC,IAAI;AACJ,IAAA,YAAY,EAAEC,SAAS;AACvB,IAAA,aAAa,EAAEC,UAAU;IACzBC,IAAI;IACJC,MAAM;IACNC,OAAO;AACPC,IAAAA;GACD;AACDC,EAAAA;AAAI,CAIL,EAAA;EACC,IAAIR,KAAK,KAAKS,SAAS,EAAE;IACvB,oBACEC,GAAA,CAACC,UAAU,EAAA;AACTC,MAAAA,IAAI,EAAE,EAAG;AACTC,MAAAA,QAAQ,EAAErB,oBAAoB,CAACgB,IAAI,CAAE;AACrC,MAAA,YAAA,EAAYN,SAAU;AACtBE,MAAAA,IAAI,EAAEA,IAAK;AACXC,MAAAA,MAAM,EAAEA,MAAO;AACfE,MAAAA,QAAQ,EAAEA,QAAS;AACnB,MAAA,aAAA,EAAaJ,UAAW;AACxBG,MAAAA,OAAO,EAAEA,OAAQ;AAAAQ,MAAAA,QAAA,EAEhBb;AAAI,KACK,CAAC;AAEjB,EAAA;EAEA,oBACES,GAAA,CAACK,MAAM,EAAA;IACLC,EAAE,EAAA,IAAA;AACFJ,IAAAA,IAAI,EAAC,IAAI;AACTC,IAAAA,QAAQ,EAAExB,eAAe,CAACmB,IAAI,CAAE;AAChC,IAAA,YAAA,EAAYN,SAAU;AACtBE,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,MAAM,EAAEA,MAAO;AACfE,IAAAA,QAAQ,EAAEA,QAAS;IACnBU,QAAQ,EAAEhB,IAAI,GAAG;AAAEiB,MAAAA,IAAI,EAAE,MAAM;AAAExB,MAAAA,KAAK,EAAEO;AAAI,KAAE,GAAGQ,SAAU;AAC3D,IAAA,aAAA,EAAaN,UAAW;AACxBG,IAAAA,OAAO,EAAEA,OAAQ;AAAAQ,IAAAA,QAAA,EAEhBd;AAAK,GACA,CAAC;AAEb;;"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
.wds-card-container {
|
|
2
|
-
/**
|
|
3
|
-
* There is no shadow or elevation token in @transferwise/neptune-tokens, so the active
|
|
4
|
-
* spotlight's resting shadow is component-scoped for now, the way PromoCard scopes
|
|
5
|
-
* `--Card-box-shadow`. The value is the "Module shadow" effect style from Figma: `#0e0f0c` at
|
|
6
|
-
* 4%, kept literal so it doesn't drift with a theme's tokens. Collapses to a token reference
|
|
7
|
-
* once one is minted.
|
|
8
|
-
*/
|
|
9
|
-
--CardContainer-shadow-color: rgba(14, 15, 12, 0.04);
|
|
10
|
-
--CardContainer-shadow: 0 2px 12px var(--CardContainer-shadow-color), 0 2px 32px var(--CardContainer-shadow-color);
|
|
11
|
-
--CardContainer-background-color: var(--color-background-screen);
|
|
12
|
-
--CardContainer-border-color: var(--color-border-neutral);
|
|
13
|
-
--CardContainer-border-radius: var(--radius-large);
|
|
14
|
-
--CardContainer-padding-block: var(--size-8);
|
|
15
|
-
--CardContainer-padding-inline: var(--size-16);
|
|
16
|
-
--CardContainer-header-spacing: var(--size-8);
|
|
17
|
-
background-color: var(--CardContainer-background-color);
|
|
18
|
-
border: 1px solid var(--CardContainer-border-color);
|
|
19
|
-
border-radius: var(--CardContainer-border-radius);
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
padding-block: var(--CardContainer-padding-block);
|
|
24
|
-
padding-inline: var(--CardContainer-padding-inline);
|
|
25
|
-
inline-size: 100%;
|
|
26
|
-
}
|
|
27
|
-
@media (min-width: 840px) {
|
|
28
|
-
.wds-card-container {
|
|
29
|
-
--CardContainer-padding-block: var(--size-16);
|
|
30
|
-
--CardContainer-padding-inline: var(--size-24);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
.wds-card-container > .np-header {
|
|
34
|
-
align-items: center;
|
|
35
|
-
border-block-end: 0;
|
|
36
|
-
grid-template-rows: minmax(var(--size-32), auto);
|
|
37
|
-
margin: 0;
|
|
38
|
-
padding: 0;
|
|
39
|
-
}
|
|
40
|
-
.wds-card-container > .np-header:not(:last-child) {
|
|
41
|
-
margin-block-end: var(--CardContainer-header-spacing);
|
|
42
|
-
}
|
|
43
|
-
.wds-card-container > .np-header.np-header--with-actions > .np-header__title {
|
|
44
|
-
align-items: center;
|
|
45
|
-
display: grid;
|
|
46
|
-
min-block-size: var(--size-32);
|
|
47
|
-
}
|
|
48
|
-
.wds-card-container--active {
|
|
49
|
-
--CardContainer-background-color: var(--color-background-elevated);
|
|
50
|
-
--CardContainer-border-color: color-mix(in srgb, var(--color-border-neutral) 25%, transparent);
|
|
51
|
-
}
|
|
52
|
-
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--bright-green):not(.np-theme-personal--forest-green):not(.np-theme-business--dark):not(.np-theme-business--bright-green):not(.np-theme-business--forest-green):not(.np-theme-platform--forest-green) .wds-card-container--active {
|
|
53
|
-
box-shadow: var(--CardContainer-shadow);
|
|
54
|
-
}
|
|
55
|
-
.wds-card-container--inactive {
|
|
56
|
-
--CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
|
|
57
|
-
--CardContainer-border-color: transparent;
|
|
58
|
-
position: relative;
|
|
59
|
-
}
|
|
60
|
-
.wds-card-container__border {
|
|
61
|
-
block-size: calc(100% + 2px);
|
|
62
|
-
inset: -1px;
|
|
63
|
-
pointer-events: none;
|
|
64
|
-
position: absolute;
|
|
65
|
-
inline-size: calc(100% + 2px);
|
|
66
|
-
}
|
|
67
|
-
.wds-card-container__border rect {
|
|
68
|
-
--CardContainer-border-dash-size: calc(var(--size-12) * 0.5);
|
|
69
|
-
fill: none;
|
|
70
|
-
block-size: calc(100% - 1px);
|
|
71
|
-
rx: calc(var(--CardContainer-border-radius) - 0.5px);
|
|
72
|
-
ry: calc(var(--CardContainer-border-radius) - 0.5px);
|
|
73
|
-
stroke: var(--color-border-neutral);
|
|
74
|
-
stroke-dasharray: var(--CardContainer-border-dash-size) var(--CardContainer-border-dash-size);
|
|
75
|
-
inline-size: calc(100% - 1px);
|
|
76
|
-
x: 0.5px;
|
|
77
|
-
y: 0.5px;
|
|
78
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { CardContainerProps } from './CardContainer.types';
|
|
2
|
-
/**
|
|
3
|
-
* A bounded surface that groups related content. It has no slots of its own: compose a `Header`
|
|
4
|
-
* and any other content as children, and the card stacks them with no gap between them.
|
|
5
|
-
*/
|
|
6
|
-
declare const CardContainer: import("react").ForwardRefExoticComponent<CardContainerProps & import("react").RefAttributes<HTMLElement>>;
|
|
7
|
-
export default CardContainer;
|
|
8
|
-
//# sourceMappingURL=CardContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardContainer.d.ts","sourceRoot":"","sources":["../../../src/CardContainer/CardContainer.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;GAGG;AACH,QAAA,MAAM,aAAa,4GAsBlB,CAAC;AAIF,eAAe,aAAa,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Highlights the card, matching `ListItem`'s `spotlight`.
|
|
4
|
-
*
|
|
5
|
-
* - `active` — live content the user can act on. Raised, with a soft shadow and a hairline border.
|
|
6
|
-
* - `inactive` — a feature the user has not set up yet. Recessed, with a dashed stroke.
|
|
7
|
-
*
|
|
8
|
-
* Without a spotlight the card is flat, with a solid stroke, for content that is present but not
|
|
9
|
-
* actionable.
|
|
10
|
-
*/
|
|
11
|
-
export type CardContainerSpotlight = 'active' | 'inactive';
|
|
12
|
-
export interface CardContainerProps extends HTMLAttributes<HTMLElement> {
|
|
13
|
-
/**
|
|
14
|
-
* Highlights the card as live content (`active`) or as a feature not set up yet (`inactive`).
|
|
15
|
-
* Leave unset for a flat card.
|
|
16
|
-
* @default undefined
|
|
17
|
-
*/
|
|
18
|
-
spotlight?: CardContainerSpotlight;
|
|
19
|
-
/**
|
|
20
|
-
* Content, stacked with no gap. A `Header` is spaced from the content after it.
|
|
21
|
-
* @default undefined
|
|
22
|
-
*/
|
|
23
|
-
children?: ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* Element rendered as the root.
|
|
26
|
-
* @default 'section'
|
|
27
|
-
*/
|
|
28
|
-
as?: 'section' | 'div' | 'article';
|
|
29
|
-
className?: string;
|
|
30
|
-
'data-testid'?: string;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=CardContainer.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardContainer.types.d.ts","sourceRoot":"","sources":["../../../src/CardContainer/CardContainer.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD;;;;;;;;GAQG;AACH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE3D,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,WAAW,CAAC;IACrE;;;;OAIG;IACH,SAAS,CAAC,EAAE,sBAAsB,CAAC;IAEnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,EAAE,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;IAEnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/CardContainer/_stories/helpers.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,mCAKzB,CAAC;AAEF,eAAO,MAAM,SAAS,mCAoCrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/CardContainer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { type MouseEventHandler, type ReactNode } from 'react';
|
|
2
|
-
import type { ButtonProps } from '../Button/Button.types';
|
|
3
|
-
/** The action slot a `HeaderActionButton` was passed to, which is what determines its emphasis. */
|
|
4
|
-
export type HeaderActionSlot = 'action' | 'actionSecondary';
|
|
5
|
-
type HeaderActionButtonBase = Pick<ButtonProps, 'href' | 'target' | 'disabled'> & {
|
|
6
|
-
/**
|
|
7
|
-
* `HTMLElement` rather than a narrower target, because an action is a `button` or an `a`
|
|
8
|
-
* depending on whether `href` is set.
|
|
9
|
-
* @default undefined
|
|
10
|
-
*/
|
|
11
|
-
onClick?: MouseEventHandler<HTMLElement>;
|
|
12
|
-
/**
|
|
13
|
-
* Rendered after `label`, or as the only content of an unlabelled action.
|
|
14
|
-
* Size it yourself — 16px is expected in both cases.
|
|
15
|
-
* @default undefined
|
|
16
|
-
*/
|
|
17
|
-
icon?: ReactNode;
|
|
18
|
-
'data-testid'?: string;
|
|
19
|
-
};
|
|
20
|
-
/** An action with a visible label, rendered as a small button. */
|
|
21
|
-
type HeaderLabelledActionButton = HeaderActionButtonBase & {
|
|
22
|
-
label: ButtonProps['children'];
|
|
23
|
-
/** @default undefined */
|
|
24
|
-
'aria-label'?: string;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* An action with no visible label, rendered as a 32px icon button. The icon is
|
|
28
|
-
* the only thing on screen and `aria-label` is the only accessible name, so
|
|
29
|
-
* both are required.
|
|
30
|
-
*/
|
|
31
|
-
type HeaderIconActionButton = HeaderActionButtonBase & {
|
|
32
|
-
label?: never;
|
|
33
|
-
icon: ReactNode;
|
|
34
|
-
'aria-label': string;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* An action the `Header` renders as a button. With a `label` it is a small `Button`; without
|
|
38
|
-
* one, a 32px `IconButton`, which requires both an `icon` and an `aria-label`. Emphasis is not
|
|
39
|
-
* part of the object — it comes from the slot the action is passed to.
|
|
40
|
-
*/
|
|
41
|
-
export type HeaderActionButton = HeaderLabelledActionButton | HeaderIconActionButton;
|
|
42
|
-
/**
|
|
43
|
-
* Tells a `HeaderActionButton` object apart from any other node passed to an action slot.
|
|
44
|
-
* Every button action has a `label` or an `icon`, which no React element, portal or array does.
|
|
45
|
-
*/
|
|
46
|
-
export declare const isHeaderActionButton: (value: unknown) => value is HeaderActionButton;
|
|
47
|
-
/** Renders a `HeaderActionButton` at the emphasis of the slot it was passed to. */
|
|
48
|
-
declare const HeaderActionButtonComponent: ({ action: { label, icon, "aria-label": ariaLabel, "data-testid": dataTestId, href, target, onClick, disabled, }, slot, }: {
|
|
49
|
-
action: HeaderActionButton;
|
|
50
|
-
slot: HeaderActionSlot;
|
|
51
|
-
}) => import("react").JSX.Element;
|
|
52
|
-
export default HeaderActionButtonComponent;
|
|
53
|
-
//# sourceMappingURL=HeaderActionButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderActionButton.d.ts","sourceRoot":"","sources":["../../../src/Header/HeaderActionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/E,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1E,mGAAmG;AACnG,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,iBAAiB,CAAC;AAE5D,KAAK,sBAAsB,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC,GAAG;IAChF;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAEzC;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,kEAAkE;AAClE,KAAK,0BAA0B,GAAG,sBAAsB,GAAG;IACzD,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAC/B,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,KAAK,sBAAsB,GAAG,sBAAsB,GAAG;IACrD,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,GAAG,sBAAsB,CAAC;AAYrF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,kBAKxB,CAAC;AAExC,mFAAmF;AACnF,QAAA,MAAM,2BAA2B,GAA+B,0HAY7D;IACD,MAAM,EAAE,kBAAkB,CAAC;IAC3B,IAAI,EAAE,gBAAgB,CAAC;CACxB,gCAkCA,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
.wds-card-container {
|
|
2
|
-
/**
|
|
3
|
-
* There is no shadow or elevation token in @transferwise/neptune-tokens, so the active
|
|
4
|
-
* spotlight's resting shadow is component-scoped for now, the way PromoCard scopes
|
|
5
|
-
* `--Card-box-shadow`. The value is the "Module shadow" effect style from Figma: `#0e0f0c` at
|
|
6
|
-
* 4%, kept literal so it doesn't drift with a theme's tokens. Collapses to a token reference
|
|
7
|
-
* once one is minted.
|
|
8
|
-
*/
|
|
9
|
-
--CardContainer-shadow-color: rgba(14, 15, 12, 0.04);
|
|
10
|
-
--CardContainer-shadow: 0 2px 12px var(--CardContainer-shadow-color), 0 2px 32px var(--CardContainer-shadow-color);
|
|
11
|
-
--CardContainer-background-color: var(--color-background-screen);
|
|
12
|
-
--CardContainer-border-color: var(--color-border-neutral);
|
|
13
|
-
--CardContainer-border-radius: var(--radius-large);
|
|
14
|
-
--CardContainer-padding-block: var(--size-8);
|
|
15
|
-
--CardContainer-padding-inline: var(--size-16);
|
|
16
|
-
--CardContainer-header-spacing: var(--size-8);
|
|
17
|
-
background-color: var(--CardContainer-background-color);
|
|
18
|
-
border: 1px solid var(--CardContainer-border-color);
|
|
19
|
-
border-radius: var(--CardContainer-border-radius);
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
padding-block: var(--CardContainer-padding-block);
|
|
24
|
-
padding-inline: var(--CardContainer-padding-inline);
|
|
25
|
-
inline-size: 100%;
|
|
26
|
-
}
|
|
27
|
-
@media (min-width: 840px) {
|
|
28
|
-
.wds-card-container {
|
|
29
|
-
--CardContainer-padding-block: var(--size-16);
|
|
30
|
-
--CardContainer-padding-inline: var(--size-24);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
.wds-card-container > .np-header {
|
|
34
|
-
align-items: center;
|
|
35
|
-
border-block-end: 0;
|
|
36
|
-
grid-template-rows: minmax(var(--size-32), auto);
|
|
37
|
-
margin: 0;
|
|
38
|
-
padding: 0;
|
|
39
|
-
}
|
|
40
|
-
.wds-card-container > .np-header:not(:last-child) {
|
|
41
|
-
margin-block-end: var(--CardContainer-header-spacing);
|
|
42
|
-
}
|
|
43
|
-
.wds-card-container > .np-header.np-header--with-actions > .np-header__title {
|
|
44
|
-
align-items: center;
|
|
45
|
-
display: grid;
|
|
46
|
-
min-block-size: var(--size-32);
|
|
47
|
-
}
|
|
48
|
-
.wds-card-container--active {
|
|
49
|
-
--CardContainer-background-color: var(--color-background-elevated);
|
|
50
|
-
--CardContainer-border-color: color-mix(in srgb, var(--color-border-neutral) 25%, transparent);
|
|
51
|
-
}
|
|
52
|
-
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--bright-green):not(.np-theme-personal--forest-green):not(.np-theme-business--dark):not(.np-theme-business--bright-green):not(.np-theme-business--forest-green):not(.np-theme-platform--forest-green) .wds-card-container--active {
|
|
53
|
-
box-shadow: var(--CardContainer-shadow);
|
|
54
|
-
}
|
|
55
|
-
.wds-card-container--inactive {
|
|
56
|
-
--CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
|
|
57
|
-
--CardContainer-border-color: transparent;
|
|
58
|
-
position: relative;
|
|
59
|
-
}
|
|
60
|
-
.wds-card-container__border {
|
|
61
|
-
block-size: calc(100% + 2px);
|
|
62
|
-
inset: -1px;
|
|
63
|
-
pointer-events: none;
|
|
64
|
-
position: absolute;
|
|
65
|
-
inline-size: calc(100% + 2px);
|
|
66
|
-
}
|
|
67
|
-
.wds-card-container__border rect {
|
|
68
|
-
--CardContainer-border-dash-size: calc(var(--size-12) * 0.5);
|
|
69
|
-
fill: none;
|
|
70
|
-
block-size: calc(100% - 1px);
|
|
71
|
-
rx: calc(var(--CardContainer-border-radius) - 0.5px);
|
|
72
|
-
ry: calc(var(--CardContainer-border-radius) - 0.5px);
|
|
73
|
-
stroke: var(--color-border-neutral);
|
|
74
|
-
stroke-dasharray: var(--CardContainer-border-dash-size) var(--CardContainer-border-dash-size);
|
|
75
|
-
inline-size: calc(100% - 1px);
|
|
76
|
-
x: 0.5px;
|
|
77
|
-
y: 0.5px;
|
|
78
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
.wds-card-container {
|
|
2
|
-
/**
|
|
3
|
-
* There is no shadow or elevation token in @transferwise/neptune-tokens, so the active
|
|
4
|
-
* spotlight's resting shadow is component-scoped for now, the way PromoCard scopes
|
|
5
|
-
* `--Card-box-shadow`. The value is the "Module shadow" effect style from Figma: `#0e0f0c` at
|
|
6
|
-
* 4%, kept literal so it doesn't drift with a theme's tokens. Collapses to a token reference
|
|
7
|
-
* once one is minted.
|
|
8
|
-
*/
|
|
9
|
-
--CardContainer-shadow-color: rgb(14 15 12 / 4%);
|
|
10
|
-
--CardContainer-shadow:
|
|
11
|
-
0 2px 12px var(--CardContainer-shadow-color), 0 2px 32px var(--CardContainer-shadow-color);
|
|
12
|
-
--CardContainer-background-color: var(--color-background-screen);
|
|
13
|
-
--CardContainer-border-color: var(--color-border-neutral);
|
|
14
|
-
--CardContainer-border-radius: var(--radius-large);
|
|
15
|
-
--CardContainer-padding-block: var(--size-8);
|
|
16
|
-
--CardContainer-padding-inline: var(--size-16);
|
|
17
|
-
--CardContainer-header-spacing: var(--size-8);
|
|
18
|
-
|
|
19
|
-
background-color: var(--CardContainer-background-color);
|
|
20
|
-
border: 1px solid var(--CardContainer-border-color);
|
|
21
|
-
border-radius: var(--CardContainer-border-radius);
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
padding: var(--CardContainer-padding-block) var(--CardContainer-padding-inline);
|
|
26
|
-
width: 100%;
|
|
27
|
-
|
|
28
|
-
@media (--screen-md) {
|
|
29
|
-
--CardContainer-padding-block: var(--size-16);
|
|
30
|
-
--CardContainer-padding-inline: var(--size-24);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// A `Header` composed into the card gives up its own group border and spacing for the card's.
|
|
34
|
-
// It is the only child spaced from the content after it; everything else stacks flush.
|
|
35
|
-
// Its title row is at least as tall as the 32px action buttons, so cards side by side line up
|
|
36
|
-
// their titles and content whether or not their headers have actions, or have stacked them.
|
|
37
|
-
> .np-header {
|
|
38
|
-
align-items: center;
|
|
39
|
-
border-bottom: 0;
|
|
40
|
-
grid-template-rows: minmax(var(--size-32), auto);
|
|
41
|
-
margin: 0;
|
|
42
|
-
padding: 0;
|
|
43
|
-
|
|
44
|
-
&:not(:last-child) {
|
|
45
|
-
margin-bottom: var(--CardContainer-header-spacing);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// With an action corner the header is a wrapping flex row, so the title sets its own row.
|
|
49
|
-
&.np-header--with-actions > .np-header__title {
|
|
50
|
-
align-items: center;
|
|
51
|
-
display: grid;
|
|
52
|
-
min-height: var(--size-32);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&--active {
|
|
57
|
-
--CardContainer-background-color: var(--color-background-elevated);
|
|
58
|
-
// The raised surface's shadow already separates it, so its border is a softer hairline.
|
|
59
|
-
--CardContainer-border-color: color-mix(in srgb, var(--color-border-neutral) 25%, transparent);
|
|
60
|
-
|
|
61
|
-
// The shadow is only designed for the light themes. Every theme root has `np-theme-personal`,
|
|
62
|
-
// so a light theme is one without any of the dark or green theme classes.
|
|
63
|
-
.np-theme-personal:not(
|
|
64
|
-
.np-theme-personal--dark,
|
|
65
|
-
.np-theme-personal--bright-green,
|
|
66
|
-
.np-theme-personal--forest-green,
|
|
67
|
-
.np-theme-business--dark,
|
|
68
|
-
.np-theme-business--bright-green,
|
|
69
|
-
.np-theme-business--forest-green,
|
|
70
|
-
.np-theme-platform--forest-green
|
|
71
|
-
)
|
|
72
|
-
& {
|
|
73
|
-
box-shadow: var(--CardContainer-shadow);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&--inactive {
|
|
78
|
-
--CardContainer-background-color: color-mix(
|
|
79
|
-
in srgb,
|
|
80
|
-
var(--color-background-neutral) 25%,
|
|
81
|
-
transparent
|
|
82
|
-
);
|
|
83
|
-
--CardContainer-border-color: transparent;
|
|
84
|
-
|
|
85
|
-
position: relative;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// Same treatment as ListItem's inactive spotlight: CSS `dashed` borders have a browser-chosen
|
|
89
|
-
// dash length, so the 6px/6px dashes are an SVG stroke that sits over the transparent border.
|
|
90
|
-
&__border {
|
|
91
|
-
height: calc(100% + 2px);
|
|
92
|
-
inset: -1px;
|
|
93
|
-
pointer-events: none;
|
|
94
|
-
position: absolute;
|
|
95
|
-
width: calc(100% + 2px);
|
|
96
|
-
|
|
97
|
-
rect {
|
|
98
|
-
--CardContainer-border-dash-size: calc(var(--size-12) * 0.5);
|
|
99
|
-
|
|
100
|
-
fill: none;
|
|
101
|
-
height: calc(100% - 1px);
|
|
102
|
-
rx: calc(var(--CardContainer-border-radius) - 0.5px);
|
|
103
|
-
ry: calc(var(--CardContainer-border-radius) - 0.5px);
|
|
104
|
-
stroke: var(--color-border-neutral);
|
|
105
|
-
stroke-dasharray: var(--CardContainer-border-dash-size) var(--CardContainer-border-dash-size);
|
|
106
|
-
width: calc(100% - 1px);
|
|
107
|
-
x: 0.5px;
|
|
108
|
-
y: 0.5px;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|