@dfds-ui/react-components 2.2.0-alpha.b94ad8b5 → 2.2.0-alpha.c2f773c5
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/accordion/Accordion.d.ts +2 -2
- package/accordion/Accordion.js +66 -47
- package/accordion/AccordionContent.d.ts +1 -1
- package/accordion/AccordionContent.js +13 -6
- package/accordion/AccordionSmall.d.ts +2 -2
- package/accordion/AccordionSmall.js +51 -37
- package/app-bar/AppBar.d.ts +3 -3
- package/app-bar/AppBar.js +54 -40
- package/app-bar/AppBarContext.d.ts +3 -3
- package/app-bar/AppBarContext.js +7 -6
- package/app-bar/AppBarDrawer.d.ts +2 -2
- package/app-bar/AppBarDrawer.js +14 -7
- package/app-bar/AppBarIconButton.d.ts +2 -2
- package/app-bar/AppBarIconButton.js +11 -6
- package/app-bar/AppBarItem.d.ts +3 -3
- package/app-bar/AppBarItem.js +71 -56
- package/app-bar/AppBarListItem.d.ts +11 -11
- package/assertions/banner/Banner.d.ts +3 -3
- package/assertions/banner/Banner.js +65 -51
- package/assertions/banner/BannerAction.d.ts +1 -1
- package/assertions/banner/BannerAction.js +10 -5
- package/assertions/banner/BannerTypography.js +9 -4
- package/assertions/toast/Toast.d.ts +1 -1
- package/assertions/toast/Toast.js +28 -17
- package/assertions/toast/Toaster.d.ts +2 -2
- package/assertions/toast/Toaster.js +52 -56
- package/badge/Badge.d.ts +1 -1
- package/badge/Badge.js +17 -9
- package/button/BadgeIcon.d.ts +1 -1
- package/button/BadgeIcon.js +18 -16
- package/button/BaseButton.d.ts +6 -6
- package/button/BaseButton.js +1 -1
- package/button/Button.d.ts +4 -4
- package/button/Button.js +38 -30
- package/button/IconButton.d.ts +1 -1
- package/button/IconButton.js +20 -13
- package/button/LinkButton.d.ts +1 -1
- package/button/LinkButton.js +9 -4
- package/button/button-style.d.ts +7 -7
- package/button-stack/ButtonStack.d.ts +3 -3
- package/button-stack/ButtonStack.js +27 -19
- package/card/Card.d.ts +2 -2
- package/card/Card.js +49 -35
- package/card/CardActions.js +13 -6
- package/card/CardContent.d.ts +1 -1
- package/card/CardContent.js +19 -9
- package/card/CardMedia.d.ts +2 -2
- package/card/CardMedia.js +15 -6
- package/card/CardPriceTag.d.ts +1 -1
- package/card/CardPriceTag.js +22 -4
- package/card/CardTitle.d.ts +1 -1
- package/card/CardTitle.js +25 -15
- package/chip/Chip.d.ts +4 -4
- package/chip/Chip.js +22 -13
- package/cjs/accordion/Accordion.d.ts +2 -2
- package/cjs/accordion/Accordion.js +60 -47
- package/cjs/accordion/AccordionContent.d.ts +1 -1
- package/cjs/accordion/AccordionContent.js +7 -6
- package/cjs/accordion/AccordionSmall.d.ts +2 -2
- package/cjs/accordion/AccordionSmall.js +44 -36
- package/cjs/app-bar/AppBar.d.ts +3 -3
- package/cjs/app-bar/AppBar.js +51 -41
- package/cjs/app-bar/AppBarContext.d.ts +3 -3
- package/cjs/app-bar/AppBarContext.js +5 -4
- package/cjs/app-bar/AppBarDrawer.d.ts +2 -2
- package/cjs/app-bar/AppBarDrawer.js +8 -8
- package/cjs/app-bar/AppBarIconButton.d.ts +2 -2
- package/cjs/app-bar/AppBarIconButton.js +7 -7
- package/cjs/app-bar/AppBarItem.d.ts +3 -3
- package/cjs/app-bar/AppBarItem.js +63 -54
- package/cjs/app-bar/AppBarListItem.d.ts +11 -11
- package/cjs/app-bar/AppBarListItem.js +1 -2
- package/cjs/assertions/banner/Banner.d.ts +3 -3
- package/cjs/assertions/banner/Banner.js +56 -49
- package/cjs/assertions/banner/BannerAction.d.ts +1 -1
- package/cjs/assertions/banner/BannerAction.js +5 -4
- package/cjs/assertions/banner/BannerTypography.js +9 -7
- package/cjs/assertions/toast/Toast.d.ts +1 -1
- package/cjs/assertions/toast/Toast.js +22 -17
- package/cjs/assertions/toast/Toaster.d.ts +2 -2
- package/cjs/assertions/toast/Toaster.js +36 -28
- package/cjs/badge/Badge.d.ts +1 -1
- package/cjs/badge/Badge.js +11 -7
- package/cjs/button/BadgeIcon.d.ts +1 -1
- package/cjs/button/BadgeIcon.js +19 -17
- package/cjs/button/BaseButton.d.ts +6 -6
- package/cjs/button/BaseButton.js +3 -5
- package/cjs/button/Button.d.ts +4 -4
- package/cjs/button/Button.js +31 -29
- package/cjs/button/IconButton.d.ts +1 -1
- package/cjs/button/IconButton.js +15 -14
- package/cjs/button/LinkButton.d.ts +1 -1
- package/cjs/button/LinkButton.js +6 -6
- package/cjs/button/button-style.d.ts +7 -7
- package/cjs/button/button-style.js +8 -15
- package/cjs/button-stack/ButtonStack.d.ts +3 -3
- package/cjs/button-stack/ButtonStack.js +19 -17
- package/cjs/card/Card.d.ts +2 -2
- package/cjs/card/Card.js +39 -29
- package/cjs/card/CardActions.js +7 -7
- package/cjs/card/CardContent.d.ts +1 -1
- package/cjs/card/CardContent.js +13 -9
- package/cjs/card/CardMedia.d.ts +2 -2
- package/cjs/card/CardMedia.js +9 -6
- package/cjs/card/CardPriceTag.d.ts +1 -1
- package/cjs/card/CardPriceTag.js +16 -4
- package/cjs/card/CardTitle.d.ts +1 -1
- package/cjs/card/CardTitle.js +16 -12
- package/cjs/chip/Chip.d.ts +4 -4
- package/cjs/chip/Chip.js +18 -15
- package/cjs/common/LockBodyScroll.d.ts +2 -2
- package/cjs/common/LockBodyScroll.js +15 -11
- package/cjs/common/arrow.d.ts +2 -2
- package/cjs/common/emotionCloneElement.js +1 -2
- package/cjs/common/intent.d.ts +1 -1
- package/cjs/common/polymorphic.d.ts +3 -3
- package/cjs/common/polymorphic.js +9 -5
- package/cjs/common/useOnClickOutside.d.ts +1 -1
- package/cjs/common/utils.d.ts +3 -3
- package/cjs/counter/Counter.d.ts +1 -1
- package/cjs/counter/Counter.js +50 -43
- package/cjs/counter/PluralCounter.d.ts +1 -1
- package/cjs/counter/PluralCounter.js +13 -11
- package/cjs/data-table/DataTable.d.ts +1 -1
- package/cjs/data-table/DataTable.js +46 -38
- package/cjs/date-range-picker/DateRangePicker.d.ts +5 -5
- package/cjs/date-range-picker/DateRangePicker.js +276 -207
- package/cjs/date-range-picker/DateRangePicker.styles.d.ts +6 -0
- package/cjs/date-range-picker/DateRangePicker.styles.js +14 -0
- package/cjs/divider/Divider.d.ts +2 -2
- package/cjs/divider/Divider.js +6 -6
- package/cjs/drawer/Drawer.d.ts +4 -4
- package/cjs/drawer/Drawer.js +11 -9
- package/cjs/dropdown-menu/Dropdown.d.ts +2 -2
- package/cjs/dropdown-menu/Dropdown.js +34 -29
- package/cjs/dropdown-menu/DropdownContext.d.ts +4 -4
- package/cjs/dropdown-menu/DropdownContext.js +7 -8
- package/cjs/dropdown-menu/MenuCheckbox.js +24 -23
- package/cjs/dropdown-menu/MenuItem.d.ts +2 -2
- package/cjs/dropdown-menu/MenuItem.js +30 -28
- package/cjs/dropdown-menu/MenuTitle.js +15 -12
- package/cjs/elevation/index.d.ts +2 -2
- package/cjs/elevation/index.js +1 -2
- package/cjs/flexbox/FlexBox.d.ts +5 -5
- package/cjs/flexbox/FlexBox.js +2 -4
- package/cjs/footer/Footer.d.ts +2 -2
- package/cjs/footer/Footer.js +13 -9
- package/cjs/forms/assistive-text/AssistiveText.d.ts +3 -3
- package/cjs/forms/assistive-text/AssistiveText.js +1 -2
- package/cjs/forms/asterisk/Asterisk.js +5 -4
- package/cjs/forms/checkbox/Checkbox.d.ts +4 -4
- package/cjs/forms/checkbox/Checkbox.js +41 -36
- package/cjs/forms/checkbox/ExampleControlComponent.d.ts +1 -1
- package/cjs/forms/checkbox/ExampleControlComponent.js +7 -7
- package/cjs/forms/email-field/EmailField.d.ts +1 -1
- package/cjs/forms/email-field/EmailField.js +7 -7
- package/cjs/forms/error-text/ErrorText.d.ts +3 -3
- package/cjs/forms/error-text/ErrorText.js +1 -2
- package/cjs/forms/field/Field.d.ts +1 -1
- package/cjs/forms/field/Field.js +10 -6
- package/cjs/forms/index.d.ts +3 -3
- package/cjs/forms/input/Input.d.ts +2 -2
- package/cjs/forms/input/Input.js +23 -21
- package/cjs/forms/input/InputComposition.d.ts +11 -11
- package/cjs/forms/input/InputComposition.js +39 -33
- package/cjs/forms/label/Label.d.ts +1 -1
- package/cjs/forms/label/Label.js +6 -3
- package/cjs/forms/number-field/NumberField.d.ts +1 -1
- package/cjs/forms/number-field/NumberField.js +7 -7
- package/cjs/forms/password-field/PasswordField.js +12 -12
- package/cjs/forms/radio/Radio.d.ts +3 -3
- package/cjs/forms/radio/Radio.js +23 -22
- package/cjs/forms/reactselect/ReactSelect.d.ts +12 -12
- package/cjs/forms/reactselect/ReactSelect.js +74 -65
- package/cjs/forms/searchable-select/AsyncSearchableSelect.d.ts +2 -2
- package/cjs/forms/searchable-select/AsyncSearchableSelect.js +47 -38
- package/cjs/forms/select/Select.d.ts +3 -3
- package/cjs/forms/select/Select.js +33 -30
- package/cjs/forms/select-field/SelectField.d.ts +2 -2
- package/cjs/forms/select-field/SelectField.js +33 -29
- package/cjs/forms/switch/Switch.d.ts +2 -2
- package/cjs/forms/switch/Switch.js +41 -35
- package/cjs/forms/tel-field/TelField.d.ts +1 -1
- package/cjs/forms/tel-field/TelField.js +7 -7
- package/cjs/forms/text-field/TextField.d.ts +3 -3
- package/cjs/forms/text-field/TextField.js +42 -39
- package/cjs/global-styles/GlobalStyles.js +3 -2
- package/cjs/global-styles/ResetStyles.js +2 -1
- package/cjs/global-styles/sanitize.d.ts +1 -1
- package/cjs/global-styles/sanitize.js +2 -3
- package/cjs/grid/Column.d.ts +1 -1
- package/cjs/grid/Column.js +7 -7
- package/cjs/grid/Container.d.ts +2 -2
- package/cjs/grid/Container.js +34 -29
- package/cjs/hero/Hero.d.ts +2 -2
- package/cjs/hero/Hero.js +42 -22
- package/cjs/hero/stripes.d.ts +2 -2
- package/cjs/hero/stripes.js +177 -162
- package/cjs/ie-banner/IEBanner.d.ts +1 -1
- package/cjs/ie-banner/IEBanner.js +13 -8
- package/cjs/layout/LayoutLegacy.js +2 -1
- package/cjs/lists/FeatureList.d.ts +7 -7
- package/cjs/lists/FeatureList.js +16 -13
- package/cjs/lists/ListAddon.d.ts +1 -1
- package/cjs/lists/ListAddon.js +10 -7
- package/cjs/lists/ListDivider.d.ts +1 -1
- package/cjs/lists/ListDivider.js +6 -6
- package/cjs/lists/ListIcon.d.ts +2 -2
- package/cjs/lists/ListIcon.js +6 -6
- package/cjs/lists/ListItem.d.ts +2 -2
- package/cjs/lists/ListItem.js +7 -6
- package/cjs/lists/ListText.d.ts +3 -3
- package/cjs/lists/ListText.js +6 -6
- package/cjs/lists/ListTextGroup.d.ts +1 -1
- package/cjs/lists/ListTextGroup.js +6 -6
- package/cjs/lists/ListTitle.js +6 -6
- package/cjs/loader/DfdsLoader.d.ts +1 -1
- package/cjs/loader/DfdsLoader.js +29 -23
- package/cjs/loader/Loader.d.ts +1 -1
- package/cjs/loader/Loader.js +9 -3
- package/cjs/localization/LocaleFlag.d.ts +1 -1
- package/cjs/localization/LocaleFlag.js +5 -4
- package/cjs/localization/locales.d.ts +2 -2
- package/cjs/localization/locales.js +3 -6
- package/cjs/logo/Logo.d.ts +1 -1
- package/cjs/logo/Logo.js +12 -9
- package/cjs/media/index.js +1 -2
- package/cjs/menu/Menu.d.ts +1 -1
- package/cjs/menu/Menu.js +27 -20
- package/cjs/mobile-stepper/MobileStepper.d.ts +1 -1
- package/cjs/mobile-stepper/MobileStepper.js +17 -15
- package/cjs/nav-bar/NavBar.d.ts +9 -9
- package/cjs/nav-bar/NavBar.js +34 -24
- package/cjs/nav-menu/NavMenuItem.d.ts +1 -1
- package/cjs/nav-menu/NavMenuItem.js +13 -11
- package/cjs/pagination/Pagination.d.ts +2 -2
- package/cjs/pagination/Pagination.js +50 -38
- package/cjs/pagination/Pagination.styles.d.ts +6 -6
- package/cjs/pagination/Pagination.styles.js +6 -12
- package/cjs/popper/Popper.d.ts +2 -2
- package/cjs/popper/Popper.js +21 -17
- package/cjs/progress-bar/ProgressBar.d.ts +1 -1
- package/cjs/progress-bar/ProgressBar.js +3 -3
- package/cjs/schedule/ScheduleItem.d.ts +8 -8
- package/cjs/schedule/ScheduleItem.js +11 -8
- package/cjs/schedule/ScheduleList.d.ts +3 -3
- package/cjs/schedule/ScheduleList.js +10 -11
- package/cjs/side-sheet/SideSheet.d.ts +4 -4
- package/cjs/side-sheet/SideSheet.js +41 -33
- package/cjs/side-sheet/SideSheetCloseButton.d.ts +1 -1
- package/cjs/side-sheet/SideSheetCloseButton.js +6 -6
- package/cjs/side-sheet/SideSheetContent.d.ts +1 -1
- package/cjs/side-sheet/SideSheetContent.js +10 -7
- package/cjs/side-sheet/SideSheetFooter.d.ts +1 -1
- package/cjs/side-sheet/SideSheetFooter.js +10 -7
- package/cjs/side-sheet/SideSheetHeader.d.ts +1 -1
- package/cjs/side-sheet/SideSheetHeader.js +10 -7
- package/cjs/side-sheet/SideSheetHeadline.d.ts +1 -1
- package/cjs/side-sheet/SideSheetHeadline.js +6 -5
- package/cjs/site-layout/SiteLayout.d.ts +11 -11
- package/cjs/site-layout/SiteLayout.js +30 -19
- package/cjs/skeleton/Skeleton.d.ts +1 -1
- package/cjs/skeleton/Skeleton.js +6 -6
- package/cjs/social-media-link-list/SocialMediaLinkList.d.ts +7 -7
- package/cjs/social-media-link-list/SocialMediaLinkList.js +64 -58
- package/cjs/spinner/Spinner.d.ts +7 -7
- package/cjs/spinner/Spinner.js +13 -13
- package/cjs/step/Step.d.ts +1 -1
- package/cjs/step/Step.js +29 -20
- package/cjs/step/Step.styles.d.ts +4 -4
- package/cjs/step/Step.styles.js +4 -8
- package/cjs/step/StepButton.d.ts +2 -2
- package/cjs/step/StepButton.js +30 -27
- package/cjs/step/StepContent.d.ts +1 -1
- package/cjs/step/StepContent.js +12 -10
- package/cjs/step/StepContext.d.ts +1 -1
- package/cjs/step/StepContext.js +1 -2
- package/cjs/step/StepLabel.d.ts +1 -1
- package/cjs/step/StepLabel.js +9 -7
- package/cjs/stepper/Stepper.d.ts +1 -1
- package/cjs/stepper/Stepper.js +12 -10
- package/cjs/stepper/StepperContext.d.ts +1 -1
- package/cjs/stepper/StepperContext.js +1 -2
- package/cjs/stepper-feedback-message/StepperFeedbackMessage.js +10 -7
- package/cjs/styles/media.d.ts +1 -1
- package/cjs/styles/media.js +2 -4
- package/cjs/styles/style-helpers.d.ts +1 -1
- package/cjs/styles/theme.d.ts +1 -1
- package/cjs/styles/theme.js +2 -4
- package/cjs/surface/Surface.d.ts +6 -6
- package/cjs/surface/Surface.js +20 -14
- package/cjs/tab/Tab.d.ts +3 -3
- package/cjs/tab/Tab.js +9 -8
- package/cjs/tab/TabPanel.d.ts +2 -2
- package/cjs/tab/TabPanel.js +7 -7
- package/cjs/tab/Tabs.d.ts +3 -3
- package/cjs/tab/Tabs.js +32 -31
- package/cjs/tab/TabsContext.d.ts +3 -3
- package/cjs/tab/TabsContext.js +7 -8
- package/cjs/table/Table.d.ts +2 -2
- package/cjs/table/Table.js +15 -15
- package/cjs/table/TableBody.d.ts +1 -1
- package/cjs/table/TableBody.js +8 -9
- package/cjs/table/TableDataCell.d.ts +1 -1
- package/cjs/table/TableDataCell.js +9 -10
- package/cjs/table/TableHead.d.ts +2 -2
- package/cjs/table/TableHead.js +10 -12
- package/cjs/table/TableHeaderCell.d.ts +3 -3
- package/cjs/table/TableHeaderCell.js +9 -10
- package/cjs/table/TableRow.d.ts +1 -1
- package/cjs/table/TableRow.js +9 -10
- package/cjs/test/Test.js +5 -4
- package/cjs/tooltip/Tooltip.d.ts +3 -3
- package/cjs/tooltip/Tooltip.js +30 -24
- package/cjs/typography/Headlines.d.ts +36 -36
- package/cjs/typography/Headlines.js +25 -31
- package/cjs/typography/Text.d.ts +2 -2
- package/cjs/typography/Text.js +2 -3
- package/common/LockBodyScroll.d.ts +2 -2
- package/common/LockBodyScroll.js +20 -10
- package/common/arrow.d.ts +2 -2
- package/common/intent.d.ts +1 -1
- package/common/polymorphic.d.ts +3 -3
- package/common/polymorphic.js +9 -3
- package/common/use-media.js +2 -2
- package/common/useOnClickOutside.d.ts +1 -1
- package/common/utils.d.ts +3 -3
- package/counter/Counter.d.ts +1 -1
- package/counter/Counter.js +50 -42
- package/counter/PluralCounter.d.ts +1 -1
- package/counter/PluralCounter.js +20 -11
- package/data-table/DataTable.d.ts +1 -1
- package/data-table/DataTable.js +53 -40
- package/date-range-picker/DateRangePicker.d.ts +5 -5
- package/date-range-picker/DateRangePicker.js +319 -238
- package/date-range-picker/DateRangePicker.styles.d.ts +6 -0
- package/date-range-picker/DateRangePicker.styles.js +9 -0
- package/divider/Divider.d.ts +2 -2
- package/divider/Divider.js +10 -5
- package/drawer/Drawer.d.ts +4 -4
- package/drawer/Drawer.js +16 -7
- package/dropdown-menu/Dropdown.d.ts +2 -2
- package/dropdown-menu/Dropdown.js +42 -31
- package/dropdown-menu/DropdownContext.d.ts +4 -4
- package/dropdown-menu/DropdownContext.js +5 -4
- package/dropdown-menu/MenuCheckbox.js +24 -17
- package/dropdown-menu/MenuItem.d.ts +2 -2
- package/dropdown-menu/MenuItem.js +26 -18
- package/dropdown-menu/MenuTitle.js +14 -11
- package/elevation/index.d.ts +2 -2
- package/flexbox/FlexBox.d.ts +5 -5
- package/flexbox/FlexBox.js +2 -2
- package/footer/Footer.d.ts +2 -2
- package/footer/Footer.js +12 -7
- package/forms/assistive-text/AssistiveText.d.ts +3 -3
- package/forms/asterisk/Asterisk.js +4 -2
- package/forms/checkbox/Checkbox.d.ts +4 -4
- package/forms/checkbox/Checkbox.js +49 -39
- package/forms/checkbox/ExampleControlComponent.d.ts +1 -1
- package/forms/checkbox/ExampleControlComponent.js +15 -8
- package/forms/email-field/EmailField.d.ts +1 -1
- package/forms/email-field/EmailField.js +9 -4
- package/forms/error-text/ErrorText.d.ts +3 -3
- package/forms/field/Field.d.ts +1 -1
- package/forms/field/Field.js +9 -4
- package/forms/index.d.ts +3 -3
- package/forms/input/Input.d.ts +2 -2
- package/forms/input/Input.js +29 -22
- package/forms/input/InputComposition.d.ts +11 -11
- package/forms/input/InputComposition.js +40 -28
- package/forms/label/Label.d.ts +1 -1
- package/forms/label/Label.js +12 -4
- package/forms/number-field/NumberField.d.ts +1 -1
- package/forms/number-field/NumberField.js +10 -5
- package/forms/password-field/PasswordField.js +17 -11
- package/forms/radio/Radio.d.ts +3 -3
- package/forms/radio/Radio.js +29 -22
- package/forms/reactselect/ReactSelect.d.ts +12 -12
- package/forms/reactselect/ReactSelect.js +71 -63
- package/forms/searchable-select/AsyncSearchableSelect.d.ts +2 -2
- package/forms/searchable-select/AsyncSearchableSelect.js +51 -39
- package/forms/select/Select.d.ts +3 -3
- package/forms/select/Select.js +40 -32
- package/forms/select-field/SelectField.d.ts +2 -2
- package/forms/select-field/SelectField.js +38 -29
- package/forms/switch/Switch.d.ts +2 -2
- package/forms/switch/Switch.js +52 -40
- package/forms/tel-field/TelField.d.ts +1 -1
- package/forms/tel-field/TelField.js +9 -4
- package/forms/text-field/TextField.d.ts +3 -3
- package/forms/text-field/TextField.js +49 -40
- package/global-styles/GlobalStyles.js +3 -3
- package/global-styles/ResetStyles.js +2 -2
- package/global-styles/sanitize.d.ts +1 -1
- package/grid/Column.d.ts +1 -1
- package/grid/Column.js +14 -7
- package/grid/Container.d.ts +2 -2
- package/grid/Container.js +41 -35
- package/hero/Hero.d.ts +2 -2
- package/hero/Hero.js +42 -20
- package/hero/stripes.d.ts +2 -2
- package/hero/stripes.js +176 -160
- package/ie-banner/IEBanner.d.ts +1 -1
- package/ie-banner/IEBanner.js +14 -8
- package/layout/LayoutLegacy.js +2 -2
- package/lists/FeatureList.d.ts +7 -7
- package/lists/FeatureList.js +21 -11
- package/lists/ListAddon.d.ts +1 -1
- package/lists/ListAddon.js +13 -6
- package/lists/ListDivider.d.ts +1 -1
- package/lists/ListDivider.js +10 -5
- package/lists/ListIcon.d.ts +2 -2
- package/lists/ListIcon.js +10 -5
- package/lists/ListItem.d.ts +2 -2
- package/lists/ListItem.js +13 -6
- package/lists/ListText.d.ts +3 -3
- package/lists/ListText.js +10 -5
- package/lists/ListTextGroup.d.ts +1 -1
- package/lists/ListTextGroup.js +10 -5
- package/lists/ListTitle.js +10 -5
- package/loader/DfdsLoader.d.ts +1 -1
- package/loader/DfdsLoader.js +26 -20
- package/loader/Loader.d.ts +1 -1
- package/loader/Loader.js +8 -2
- package/localization/LocaleFlag.d.ts +1 -1
- package/localization/LocaleFlag.js +10 -5
- package/localization/locales.d.ts +2 -2
- package/logo/Logo.d.ts +1 -1
- package/logo/Logo.js +14 -7
- package/menu/Menu.d.ts +1 -1
- package/menu/Menu.js +30 -17
- package/mobile-stepper/MobileStepper.d.ts +1 -1
- package/mobile-stepper/MobileStepper.js +26 -18
- package/nav-bar/NavBar.d.ts +9 -9
- package/nav-bar/NavBar.js +41 -23
- package/nav-menu/NavMenuItem.d.ts +1 -1
- package/nav-menu/NavMenuItem.js +12 -10
- package/package.json +16 -18
- package/pagination/Pagination.d.ts +2 -2
- package/pagination/Pagination.js +53 -35
- package/pagination/Pagination.styles.d.ts +6 -6
- package/popper/Popper.d.ts +2 -2
- package/popper/Popper.js +27 -17
- package/progress-bar/ProgressBar.d.ts +1 -1
- package/progress-bar/ProgressBar.js +2 -2
- package/schedule/ScheduleItem.d.ts +8 -8
- package/schedule/ScheduleItem.js +9 -4
- package/schedule/ScheduleList.d.ts +3 -3
- package/schedule/ScheduleList.js +16 -10
- package/side-sheet/SideSheet.d.ts +4 -4
- package/side-sheet/SideSheet.js +47 -34
- package/side-sheet/SideSheetCloseButton.d.ts +1 -1
- package/side-sheet/SideSheetCloseButton.js +10 -5
- package/side-sheet/SideSheetContent.d.ts +1 -1
- package/side-sheet/SideSheetContent.js +17 -8
- package/side-sheet/SideSheetFooter.d.ts +1 -1
- package/side-sheet/SideSheetFooter.js +17 -8
- package/side-sheet/SideSheetHeader.d.ts +1 -1
- package/side-sheet/SideSheetHeader.js +17 -8
- package/side-sheet/SideSheetHeadline.d.ts +1 -1
- package/side-sheet/SideSheetHeadline.js +5 -4
- package/site-layout/SiteLayout.d.ts +11 -11
- package/site-layout/SiteLayout.js +31 -12
- package/skeleton/Skeleton.d.ts +1 -1
- package/skeleton/Skeleton.js +10 -5
- package/social-media-link-list/SocialMediaLinkList.d.ts +7 -7
- package/social-media-link-list/SocialMediaLinkList.js +69 -55
- package/spinner/Spinner.d.ts +7 -7
- package/spinner/Spinner.js +17 -10
- package/step/Step.d.ts +1 -1
- package/step/Step.js +34 -20
- package/step/Step.styles.d.ts +4 -4
- package/step/StepButton.d.ts +2 -2
- package/step/StepButton.js +27 -19
- package/step/StepContent.d.ts +1 -1
- package/step/StepContent.js +11 -9
- package/step/StepContext.d.ts +1 -1
- package/step/StepLabel.d.ts +1 -1
- package/step/StepLabel.js +8 -6
- package/stepper/Stepper.d.ts +1 -1
- package/stepper/Stepper.js +13 -11
- package/stepper/StepperContext.d.ts +1 -1
- package/stepper-feedback-message/StepperFeedbackMessage.js +9 -6
- package/styles/media.d.ts +1 -1
- package/styles/style-helpers.d.ts +1 -1
- package/styles/theme.d.ts +1 -1
- package/surface/Surface.d.ts +6 -6
- package/surface/Surface.js +17 -14
- package/tab/Tab.d.ts +3 -3
- package/tab/Tab.js +18 -11
- package/tab/TabPanel.d.ts +2 -2
- package/tab/TabPanel.js +6 -5
- package/tab/Tabs.d.ts +3 -3
- package/tab/Tabs.js +46 -39
- package/tab/TabsContext.d.ts +3 -3
- package/tab/TabsContext.js +5 -4
- package/table/Table.d.ts +2 -2
- package/table/Table.js +20 -13
- package/table/TableBody.d.ts +1 -1
- package/table/TableBody.js +13 -7
- package/table/TableDataCell.d.ts +1 -1
- package/table/TableDataCell.js +14 -8
- package/table/TableHead.d.ts +2 -2
- package/table/TableHead.js +10 -8
- package/table/TableHeaderCell.d.ts +3 -3
- package/table/TableHeaderCell.js +14 -8
- package/table/TableRow.d.ts +1 -1
- package/table/TableRow.js +11 -10
- package/test/Test.js +4 -2
- package/tooltip/Tooltip.d.ts +3 -3
- package/tooltip/Tooltip.js +33 -23
- package/typography/Headlines.d.ts +36 -36
- package/typography/Headlines.js +24 -17
- package/typography/Text.d.ts +2 -2
- package/cjs/date-range-picker/DatePickerDefaultStyles.d.ts +0 -2
- package/cjs/date-range-picker/DatePickerDefaultStyles.js +0 -19
- package/cjs/date-range-picker/DatePickerDfdsStyles.d.ts +0 -2
- package/cjs/date-range-picker/DatePickerDfdsStyles.js +0 -11
- package/date-range-picker/DatePickerDefaultStyles.d.ts +0 -2
- package/date-range-picker/DatePickerDefaultStyles.js +0 -12
- package/date-range-picker/DatePickerDfdsStyles.d.ts +0 -2
- package/date-range-picker/DatePickerDfdsStyles.js +0 -4
package/button/LinkButton.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2
7
|
import * as React from 'react';
|
|
3
8
|
import Button from './Button';
|
|
4
9
|
import { theme } from '@dfds-ui/theme';
|
|
5
10
|
import { css } from '@emotion/react';
|
|
6
|
-
import { jsx as
|
|
11
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
7
12
|
export var LinkButton = function LinkButton(props) {
|
|
8
|
-
return
|
|
13
|
+
return _jsx(Button, _objectSpread({
|
|
9
14
|
as: "a",
|
|
10
15
|
variation: "link",
|
|
11
16
|
iconSpacing: theme.spacing.xxs,
|
|
12
17
|
tabIndex: props.disabled ? -1 : 0,
|
|
13
|
-
css: /*#__PURE__*/css("&:focus{color:", theme.colors.secondary.dark, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:LinkButton;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
18
|
+
css: /*#__PURE__*/css("&:focus{color:", theme.colors.secondary.dark, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:LinkButton;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idXR0b24vTGlua0J1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBaUJZIiwiZmlsZSI6Ii4uLy4uL3NyYy9idXR0b24vTGlua0J1dHRvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyBSZWFjdCBmcm9tICdyZWFjdCdcbmltcG9ydCBCdXR0b24sIHsgQnV0dG9uUHJvcHMgfSBmcm9tICcuL0J1dHRvbidcbmltcG9ydCB7IHRoZW1lIH0gZnJvbSAnQGRmZHMtdWkvdGhlbWUnXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuZXhwb3J0IHR5cGUgTGlua0J1dHRvblByb3BzID0gUmVhY3QuUHJvcHNXaXRob3V0UmVmPFJlYWN0LkpTWC5JbnRyaW5zaWNFbGVtZW50c1snYSddPiAmXG4gIEJ1dHRvblByb3BzICYge1xuICAgIGhyZWY/OiBzdHJpbmdcbiAgICB0YXJnZXQ/OiBzdHJpbmdcbiAgfVxuXG5leHBvcnQgY29uc3QgTGlua0J1dHRvbiA9IChwcm9wczogTGlua0J1dHRvblByb3BzKSA9PiAoXG4gIDxCdXR0b25cbiAgICBhcz1cImFcIlxuICAgIHZhcmlhdGlvbj1cImxpbmtcIlxuICAgIGljb25TcGFjaW5nPXt0aGVtZS5zcGFjaW5nLnh4c31cbiAgICB0YWJJbmRleD17cHJvcHMuZGlzYWJsZWQgPyAtMSA6IDB9XG4gICAgY3NzPXtjc3NgXG4gICAgICAmOmZvY3VzIHtcbiAgICAgICAgY29sb3I6ICR7dGhlbWUuY29sb3JzLnNlY29uZGFyeS5kYXJrfTtcbiAgICAgIH1cbiAgICBgfVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbilcblxuZXhwb3J0IGRlZmF1bHQgTGlua0J1dHRvblxuIl19 */")
|
|
14
19
|
}, props));
|
|
15
20
|
};
|
|
16
21
|
export default LinkButton;
|
package/button/button-style.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const baseButtonStyle: import("@emotion/
|
|
2
|
-
export declare const primaryButtonStyles: import("@emotion/
|
|
3
|
-
export declare const secondaryButtonStyles: import("@emotion/
|
|
4
|
-
export declare const outlinedButtonStyles: import("@emotion/
|
|
5
|
-
export declare const textButtonStyles: import("@emotion/
|
|
6
|
-
export declare const dangerButtonStyles: import("@emotion/
|
|
7
|
-
export declare const linkButtonStyles: import("@emotion/
|
|
1
|
+
export declare const baseButtonStyle: import("@emotion/utils").SerializedStyles;
|
|
2
|
+
export declare const primaryButtonStyles: import("@emotion/utils").SerializedStyles;
|
|
3
|
+
export declare const secondaryButtonStyles: import("@emotion/utils").SerializedStyles;
|
|
4
|
+
export declare const outlinedButtonStyles: import("@emotion/utils").SerializedStyles;
|
|
5
|
+
export declare const textButtonStyles: import("@emotion/utils").SerializedStyles;
|
|
6
|
+
export declare const dangerButtonStyles: import("@emotion/utils").SerializedStyles;
|
|
7
|
+
export declare const linkButtonStyles: import("@emotion/utils").SerializedStyles;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
3
|
+
type Alignment = 'left' | 'right' | 'center';
|
|
4
|
+
type ButtonStackProps = {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
align?: Alignment;
|
|
7
7
|
orientation?: Orientation;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
var _excluded = ["align", "orientation", "reverse", "className", "children"];
|
|
2
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
3
|
-
function
|
|
4
|
-
function
|
|
5
|
-
function
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
6
11
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
7
12
|
import React from 'react';
|
|
8
13
|
import { css } from '@emotion/react';
|
|
9
14
|
import emotionCloneElement from '../common/emotionCloneElement';
|
|
10
15
|
import { media } from '@dfds-ui/theme';
|
|
11
|
-
import { jsx as
|
|
16
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
12
17
|
// TODO: Reafctor into the theme
|
|
13
18
|
var space = 8;
|
|
14
19
|
var containerStyles = function containerStyles(_ref) {
|
|
@@ -31,20 +36,23 @@ var ButtonStack = function ButtonStack(_ref3) {
|
|
|
31
36
|
className = _ref3.className,
|
|
32
37
|
children = _ref3.children,
|
|
33
38
|
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
34
|
-
return
|
|
35
|
-
className: className
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
return _jsx("div", {
|
|
40
|
+
className: className,
|
|
41
|
+
children: _jsx("div", _objectSpread(_objectSpread({
|
|
42
|
+
css: containerStyles({
|
|
43
|
+
orientation: orientation,
|
|
44
|
+
align: align,
|
|
45
|
+
reverse: reverse
|
|
46
|
+
})
|
|
47
|
+
}, rest), {}, {
|
|
48
|
+
children: React.Children.map(children, function (child) {
|
|
49
|
+
return /*#__PURE__*/React.isValidElement(child) ? emotionCloneElement(child, {
|
|
50
|
+
css: [child.props.css, orientation === 'horizontal' ? horizontalStyles({
|
|
51
|
+
align: align
|
|
52
|
+
}) : verticalItemStyles]
|
|
53
|
+
}) : child;
|
|
54
|
+
})
|
|
55
|
+
}))
|
|
56
|
+
});
|
|
49
57
|
};
|
|
50
58
|
export default ButtonStack;
|
package/card/Card.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { SurfaceType } from '../surface';
|
|
3
3
|
export declare const CardContext: React.Context<{}>;
|
|
4
|
-
export
|
|
4
|
+
export type CardContextType = {
|
|
5
5
|
cardSize: 's' | 'm' | 'l' | 'xl';
|
|
6
6
|
cardVariant: 'outline' | 'fill' | 'surface';
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type CardProps = {
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
size: 's' | 'm' | 'l' | 'xl';
|
|
11
11
|
variant: 'outline' | 'fill' | 'surface';
|
package/card/Card.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
import _styled from "@emotion/styled/base";
|
|
2
3
|
var _excluded = ["children", "media", "variant", "size", "ratio", "className", "surface"];
|
|
3
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0;
|
|
4
|
-
function
|
|
5
|
-
function
|
|
6
|
-
function
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
9
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
11
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
7
12
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
13
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
14
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++)
|
|
11
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0)
|
|
15
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
17
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
18
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
14
19
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
@@ -19,7 +24,7 @@ import { useDimensions } from '@dfds-ui/hooks';
|
|
|
19
24
|
import cx from 'classnames';
|
|
20
25
|
import { css } from '@emotion/react';
|
|
21
26
|
import { useSurfaceContext, MaybeSurfaceProvider } from '../surface';
|
|
22
|
-
import { jsx as
|
|
27
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
23
28
|
export var CardContext = /*#__PURE__*/React.createContext({});
|
|
24
29
|
var CardContainer = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
25
30
|
target: "elatgin3"
|
|
@@ -86,11 +91,11 @@ var Card = function Card(_ref) {
|
|
|
86
91
|
media = _ref.media,
|
|
87
92
|
variant = _ref.variant,
|
|
88
93
|
size = _ref.size,
|
|
89
|
-
_ref$ratio = _ref.ratio
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
contentRatio = _ref$
|
|
93
|
-
mediaRatio = _ref$
|
|
94
|
+
_ref$ratio = _ref.ratio,
|
|
95
|
+
_ref$ratio2 = _ref$ratio === void 0 ? [1, 1] : _ref$ratio,
|
|
96
|
+
_ref$ratio3 = _slicedToArray(_ref$ratio2, 2),
|
|
97
|
+
contentRatio = _ref$ratio3[0],
|
|
98
|
+
mediaRatio = _ref$ratio3[1],
|
|
94
99
|
className = _ref.className,
|
|
95
100
|
surfaceProp = _ref.surface,
|
|
96
101
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -107,32 +112,41 @@ var Card = function Card(_ref) {
|
|
|
107
112
|
var _useState3 = useState(size),
|
|
108
113
|
_useState4 = _slicedToArray(_useState3, 1),
|
|
109
114
|
cardSize = _useState4[0];
|
|
110
|
-
return
|
|
115
|
+
return _jsx(CardContext.Provider, {
|
|
111
116
|
value: {
|
|
112
117
|
cardVariant: cardVariant,
|
|
113
118
|
cardSize: cardSize
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
119
|
+
},
|
|
120
|
+
children: _jsx(MaybeSurfaceProvider, {
|
|
121
|
+
surface: surfaceProp,
|
|
122
|
+
children: _jsxs(CardContainer, _objectSpread(_objectSpread({
|
|
123
|
+
css: /*#__PURE__*/css("background-color:", backgroundColor, ";color:", textColors.primary, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:Card;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jYXJkL0NhcmQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXNNa0IiLCJmaWxlIjoiLi4vLi4vc3JjL2NhcmQvQ2FyZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBAd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2YXJpYW50PXt2YXJpYW50fVxuICAgICAgICAgIHJlZj17cmVmfVxuICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ0NhcmRDb250YWluZXInLCBjbGFzc05hbWUpfVxuICAgICAgICAgIHsuLi5yZXN0fVxuICAgICAgICA+XG4gICAgICAgICAge21lZGlhICYmIChcbiAgICAgICAgICAgIDxNZWRpYUNvbnRhaW5lciByYXRpbz17bWVkaWFSYXRpbyAvIChtZWRpYVJhdGlvICsgY29udGVudFJhdGlvKX0+XG4gICAgICAgICAgICAgIDxNZWRpYUNvbnRlbnQgc2l6ZT17c2l6ZX0gdmFyaWFudD17dmFyaWFudH0gY2xhc3NOYW1lPVwiTWVkaWFDb250ZW50XCIgey4uLnJlc3R9PlxuICAgICAgICAgICAgICAgIHttZWRpYX1cbiAgICAgICAgICAgICAgPC9NZWRpYUNvbnRlbnQ+XG4gICAgICAgICAgICA8L01lZGlhQ29udGFpbmVyPlxuICAgICAgICAgICl9XG4gICAgICAgICAge2NoaWxkcmVuICYmIChcbiAgICAgICAgICAgIDxDYXJkQ29udGVudFxuICAgICAgICAgICAgICBjbGFzc05hbWU9XCJDYXJkQ29udGVudFwiXG4gICAgICAgICAgICAgIHZhcmlhbnQ9e3ZhcmlhbnR9XG4gICAgICAgICAgICAgIHNpemU9e3NpemV9XG4gICAgICAgICAgICAgIHdpZHRoPXt3aWR0aH1cbiAgICAgICAgICAgICAgcmV2ZXJzZT17cmVzdC5yZXZlcnNlID09IHRydWV9XG4gICAgICAgICAgICAgIHJhdGlvPXtjb250ZW50UmF0aW8gLyAobWVkaWFSYXRpbyArIGNvbnRlbnRSYXRpbyl9XG4gICAgICAgICAgICAgIHsuLi5yZXN0fVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgICAgICA8L0NhcmRDb250ZW50PlxuICAgICAgICAgICl9XG4gICAgICAgIDwvQ2FyZENvbnRhaW5lcj5cbiAgICAgIDwvTWF5YmVTdXJmYWNlUHJvdmlkZXI+XG4gICAgPC9DYXJkQ29udGV4dC5Qcm92aWRlcj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBDYXJkXG4iXX0= */"),
|
|
124
|
+
size: size,
|
|
125
|
+
variant: variant,
|
|
126
|
+
ref: ref,
|
|
127
|
+
className: cx('CardContainer', className)
|
|
128
|
+
}, rest), {}, {
|
|
129
|
+
children: [media && _jsx(MediaContainer, {
|
|
130
|
+
ratio: mediaRatio / (mediaRatio + contentRatio),
|
|
131
|
+
children: _jsx(MediaContent, _objectSpread(_objectSpread({
|
|
132
|
+
size: size,
|
|
133
|
+
variant: variant,
|
|
134
|
+
className: "MediaContent"
|
|
135
|
+
}, rest), {}, {
|
|
136
|
+
children: media
|
|
137
|
+
}))
|
|
138
|
+
}), children && _jsx(CardContent, _objectSpread(_objectSpread({
|
|
139
|
+
className: "CardContent",
|
|
140
|
+
variant: variant,
|
|
141
|
+
size: size,
|
|
142
|
+
width: width,
|
|
143
|
+
reverse: rest.reverse == true,
|
|
144
|
+
ratio: contentRatio / (mediaRatio + contentRatio)
|
|
145
|
+
}, rest), {}, {
|
|
146
|
+
children: children
|
|
147
|
+
}))]
|
|
148
|
+
}))
|
|
149
|
+
})
|
|
150
|
+
});
|
|
137
151
|
};
|
|
138
152
|
export default Card;
|
package/card/CardActions.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
import _styled from "@emotion/styled/base";
|
|
2
3
|
var _excluded = ["children"];
|
|
3
|
-
function
|
|
4
|
-
function
|
|
5
|
-
function
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
6
11
|
import React from 'react';
|
|
7
12
|
import { FlexBox } from '../flexbox';
|
|
8
13
|
import { theme } from '@dfds-ui/theme';
|
|
9
|
-
import { jsx as
|
|
14
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
10
15
|
var ActionContainer = /*#__PURE__*/_styled(FlexBox, process.env.NODE_ENV === "production" ? {
|
|
11
16
|
target: "e190c4pk0"
|
|
12
17
|
} : {
|
|
@@ -16,8 +21,10 @@ var ActionContainer = /*#__PURE__*/_styled(FlexBox, process.env.NODE_ENV === "pr
|
|
|
16
21
|
var CardActions = function CardActions(_ref) {
|
|
17
22
|
var children = _ref.children,
|
|
18
23
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
-
return
|
|
24
|
+
return _jsx(ActionContainer, _objectSpread(_objectSpread({
|
|
20
25
|
className: "CardActions"
|
|
21
|
-
}, rest),
|
|
26
|
+
}, rest), {}, {
|
|
27
|
+
children: children
|
|
28
|
+
}));
|
|
22
29
|
};
|
|
23
30
|
export default CardActions;
|
package/card/CardContent.d.ts
CHANGED
package/card/CardContent.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
import _styled from "@emotion/styled/base";
|
|
2
3
|
var _excluded = ["children", "color"];
|
|
3
|
-
function
|
|
4
|
-
function
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
11
|
import React from 'react';
|
|
6
12
|
import { theme } from '@dfds-ui/theme';
|
|
7
13
|
import { Text } from '@dfds-ui/typography';
|
|
8
|
-
import { jsx as
|
|
14
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
9
15
|
var ContentContainer = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
10
16
|
target: "e13iposs1"
|
|
11
17
|
} : {
|
|
@@ -24,11 +30,15 @@ var CardContent = function CardContent(_ref) {
|
|
|
24
30
|
var children = _ref.children,
|
|
25
31
|
color = _ref.color,
|
|
26
32
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
return _jsx(ContentContainer, _objectSpread(_objectSpread({}, rest), {}, {
|
|
34
|
+
children: _jsx(Content, {
|
|
35
|
+
color: color,
|
|
36
|
+
children: _jsx(Text, {
|
|
37
|
+
as: "div",
|
|
38
|
+
styledAs: 'body',
|
|
39
|
+
children: children
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
}));
|
|
33
43
|
};
|
|
34
44
|
export default CardContent;
|
package/card/CardMedia.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type CardMediaProps = {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
/**
|
|
5
5
|
* Media component to be displayed
|
|
@@ -14,6 +14,6 @@ export declare type CardMediaProps = {
|
|
|
14
14
|
*/
|
|
15
15
|
className?: string;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type AspectRatio = '2:1' | '3:2';
|
|
18
18
|
declare const CardMedia: FunctionComponent<CardMediaProps>;
|
|
19
19
|
export default CardMedia;
|
package/card/CardMedia.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
import _styled from "@emotion/styled/base";
|
|
2
3
|
var _excluded = ["children", "media", "aspectRatio"];
|
|
3
|
-
function
|
|
4
|
-
function
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
11
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
6
12
|
import React from 'react';
|
|
7
|
-
import { jsx as
|
|
13
|
+
import { jsxs as _jsxs, jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
8
14
|
function toPercent(_ref) {
|
|
9
15
|
var aspectRatio = _ref.aspectRatio;
|
|
10
16
|
return aspectRatio === '3:2' ? '66.6667%' : '50.00%';
|
|
@@ -34,8 +40,11 @@ var CardMedia = function CardMedia(_ref2) {
|
|
|
34
40
|
_ref2$aspectRatio = _ref2.aspectRatio,
|
|
35
41
|
aspectRatio = _ref2$aspectRatio === void 0 ? '2:1' : _ref2$aspectRatio,
|
|
36
42
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
return _jsx(MediaContainer, _objectSpread(_objectSpread({}, rest), {}, {
|
|
44
|
+
children: _jsxs(AspectWrapper, {
|
|
45
|
+
aspectRatio: aspectRatio,
|
|
46
|
+
children: [media, children]
|
|
47
|
+
})
|
|
48
|
+
}));
|
|
40
49
|
};
|
|
41
50
|
export default CardMedia;
|
package/card/CardPriceTag.d.ts
CHANGED
package/card/CardPriceTag.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
import _styled from "@emotion/styled/base";
|
|
2
3
|
var _excluded = ["price", "topText", "bottomText", "currency"];
|
|
3
|
-
function
|
|
4
|
-
function
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
11
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
6
12
|
import React from 'react';
|
|
7
|
-
import { jsx as
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
8
14
|
var Wrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
9
15
|
target: "eci6nyw5"
|
|
10
16
|
} : {
|
|
@@ -89,6 +95,18 @@ var CardPriceTag = function CardPriceTag(_ref) {
|
|
|
89
95
|
bottomText = _ref.bottomText,
|
|
90
96
|
currency = _ref.currency,
|
|
91
97
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
92
|
-
return
|
|
98
|
+
return _jsx(Wrapper, _objectSpread(_objectSpread({}, rest), {}, {
|
|
99
|
+
children: _jsxs(Content, {
|
|
100
|
+
children: [_jsx(From, {
|
|
101
|
+
children: topText
|
|
102
|
+
}), _jsx(Currency, {
|
|
103
|
+
children: currency
|
|
104
|
+
}), _jsx(Price, {
|
|
105
|
+
children: price
|
|
106
|
+
}), _jsx(Info, {
|
|
107
|
+
children: bottomText
|
|
108
|
+
})]
|
|
109
|
+
})
|
|
110
|
+
}));
|
|
93
111
|
};
|
|
94
112
|
export default CardPriceTag;
|
package/card/CardTitle.d.ts
CHANGED