@dfds-ui/react-components 0.9.7-alpha.15e38892 → 0.9.7-alpha.1c844f2a
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 +97 -0
- package/accordion/Accordion.js +120 -0
- package/accordion/AccordionContent.d.ts +13 -0
- package/accordion/AccordionContent.js +24 -0
- package/accordion/AccordionSmall.d.ts +55 -0
- package/accordion/AccordionSmall.js +89 -0
- package/accordion/index.d.ts +3 -0
- package/accordion/index.js +3 -0
- package/app-bar/AppBar.d.ts +12 -0
- package/app-bar/AppBar.js +215 -0
- package/app-bar/AppBarContext.d.ts +10 -0
- package/app-bar/AppBarContext.js +46 -0
- package/app-bar/AppBarDrawer.d.ts +3 -0
- package/app-bar/AppBarDrawer.js +40 -0
- package/app-bar/AppBarIconButton.d.ts +10 -0
- package/app-bar/AppBarIconButton.js +40 -0
- package/app-bar/AppBarItem.d.ts +21 -0
- package/app-bar/AppBarItem.js +197 -0
- package/app-bar/AppBarListItem.d.ts +15 -0
- package/app-bar/AppBarListItem.js +19 -0
- package/app-bar/index.d.ts +7 -0
- package/app-bar/index.js +7 -0
- package/assertions/banner/Banner.d.ts +52 -0
- package/assertions/banner/Banner.js +173 -0
- package/assertions/banner/BannerAction.d.ts +18 -0
- package/assertions/banner/BannerAction.js +49 -0
- package/assertions/banner/BannerActionContext.d.ts +12 -0
- package/assertions/banner/BannerActionContext.js +25 -0
- package/assertions/banner/BannerTypography.d.ts +7 -0
- package/assertions/banner/BannerTypography.js +44 -0
- package/assertions/banner/index.d.ts +4 -0
- package/assertions/banner/index.js +4 -0
- package/assertions/index.d.ts +2 -0
- package/assertions/index.js +2 -0
- package/assertions/toast/Toast.d.ts +11 -0
- package/assertions/toast/Toast.js +104 -0
- package/assertions/toast/Toaster.d.ts +18 -0
- package/assertions/toast/Toaster.js +196 -0
- package/assertions/toast/index.d.ts +2 -0
- package/assertions/toast/index.js +2 -0
- package/badge/Badge.d.ts +26 -0
- package/badge/Badge.js +48 -0
- package/badge/index.d.ts +2 -0
- package/badge/index.js +2 -0
- package/button/BadgeIcon.d.ts +6 -0
- package/button/BadgeIcon.js +29 -0
- package/button/BaseButton.d.ts +14 -0
- package/button/BaseButton.js +25 -0
- package/button/Button.d.ts +18 -0
- package/button/Button.js +181 -0
- package/button/IconButton.d.ts +58 -0
- package/button/IconButton.js +165 -0
- package/button/LinkButton.d.ts +8 -0
- package/button/LinkButton.js +17 -0
- package/button/button-style.d.ts +7 -0
- package/button/button-style.js +19 -0
- package/button/index.d.ts +7 -0
- package/button/index.js +8 -0
- package/button-stack/ButtonStack.d.ts +11 -0
- package/button-stack/ButtonStack.js +62 -0
- package/button-stack/index.d.ts +1 -0
- package/button-stack/index.js +1 -0
- package/card/Card.d.ts +18 -0
- package/card/Card.js +191 -0
- package/card/CardActions.d.ts +4 -0
- package/card/CardActions.js +31 -0
- package/card/CardContent.d.ts +13 -0
- package/card/CardContent.js +42 -0
- package/card/CardMedia.d.ts +18 -0
- package/card/CardMedia.js +52 -0
- package/card/CardPriceTag.d.ts +24 -0
- package/card/CardPriceTag.js +113 -0
- package/card/CardTitle.d.ts +18 -0
- package/card/CardTitle.js +48 -0
- package/card/index.d.ts +6 -0
- package/card/index.js +6 -0
- package/chip/Chip.d.ts +19 -0
- package/chip/Chip.js +153 -0
- package/chip/index.d.ts +2 -0
- package/chip/index.js +2 -0
- package/cjs/accordion/Accordion.d.ts +97 -0
- package/cjs/accordion/Accordion.js +142 -0
- package/cjs/accordion/AccordionContent.d.ts +13 -0
- package/cjs/accordion/AccordionContent.js +38 -0
- package/cjs/accordion/AccordionSmall.d.ts +55 -0
- package/cjs/accordion/AccordionSmall.js +112 -0
- package/cjs/accordion/index.d.ts +3 -0
- package/cjs/accordion/index.js +44 -0
- package/cjs/app-bar/AppBar.d.ts +12 -0
- package/cjs/app-bar/AppBar.js +238 -0
- package/cjs/app-bar/AppBarContext.d.ts +10 -0
- package/cjs/app-bar/AppBarContext.js +65 -0
- package/cjs/app-bar/AppBarDrawer.d.ts +3 -0
- package/cjs/app-bar/AppBarDrawer.js +57 -0
- package/cjs/app-bar/AppBarIconButton.d.ts +10 -0
- package/cjs/app-bar/AppBarIconButton.js +52 -0
- package/cjs/app-bar/AppBarItem.d.ts +21 -0
- package/cjs/app-bar/AppBarItem.js +224 -0
- package/cjs/app-bar/AppBarListItem.d.ts +15 -0
- package/cjs/app-bar/AppBarListItem.js +27 -0
- package/cjs/app-bar/index.d.ts +7 -0
- package/cjs/app-bar/index.js +67 -0
- package/cjs/assertions/banner/Banner.d.ts +52 -0
- package/cjs/assertions/banner/Banner.js +164 -0
- package/cjs/assertions/banner/BannerAction.d.ts +18 -0
- package/cjs/assertions/banner/BannerAction.js +64 -0
- package/cjs/assertions/banner/BannerActionContext.d.ts +12 -0
- package/cjs/assertions/banner/BannerActionContext.js +44 -0
- package/cjs/assertions/banner/BannerTypography.d.ts +7 -0
- package/cjs/assertions/banner/BannerTypography.js +58 -0
- package/cjs/assertions/banner/index.d.ts +4 -0
- package/cjs/assertions/banner/index.js +60 -0
- package/cjs/assertions/index.d.ts +2 -0
- package/cjs/assertions/index.js +31 -0
- package/cjs/assertions/toast/Toast.d.ts +11 -0
- package/cjs/assertions/toast/Toast.js +110 -0
- package/cjs/assertions/toast/Toaster.d.ts +18 -0
- package/cjs/assertions/toast/Toaster.js +193 -0
- package/cjs/assertions/toast/index.d.ts +2 -0
- package/cjs/assertions/toast/index.js +33 -0
- package/cjs/badge/Badge.d.ts +26 -0
- package/cjs/badge/Badge.js +61 -0
- package/cjs/badge/index.d.ts +2 -0
- package/cjs/badge/index.js +32 -0
- package/cjs/button/BadgeIcon.d.ts +6 -0
- package/cjs/button/BadgeIcon.js +44 -0
- package/cjs/button/BaseButton.d.ts +14 -0
- package/cjs/button/BaseButton.js +39 -0
- package/cjs/button/Button.d.ts +18 -0
- package/cjs/button/Button.js +169 -0
- package/cjs/button/IconButton.d.ts +58 -0
- package/cjs/button/IconButton.js +166 -0
- package/cjs/button/LinkButton.d.ts +8 -0
- package/cjs/button/LinkButton.js +34 -0
- package/cjs/button/button-style.d.ts +7 -0
- package/cjs/button/button-style.js +35 -0
- package/cjs/button/index.d.ts +7 -0
- package/cjs/button/index.js +88 -0
- package/cjs/button-stack/ButtonStack.d.ts +11 -0
- package/cjs/button-stack/ButtonStack.js +84 -0
- package/cjs/button-stack/index.d.ts +1 -0
- package/cjs/button-stack/index.js +15 -0
- package/cjs/card/Card.d.ts +18 -0
- package/cjs/card/Card.js +193 -0
- package/cjs/card/CardActions.d.ts +4 -0
- package/cjs/card/CardActions.js +45 -0
- package/cjs/card/CardContent.d.ts +13 -0
- package/cjs/card/CardContent.js +53 -0
- package/cjs/card/CardMedia.d.ts +18 -0
- package/cjs/card/CardMedia.js +64 -0
- package/cjs/card/CardPriceTag.d.ts +24 -0
- package/cjs/card/CardPriceTag.js +120 -0
- package/cjs/card/CardTitle.d.ts +18 -0
- package/cjs/card/CardTitle.js +58 -0
- package/cjs/card/index.d.ts +6 -0
- package/cjs/card/index.js +55 -0
- package/cjs/chip/Chip.d.ts +19 -0
- package/cjs/chip/Chip.js +159 -0
- package/cjs/chip/index.d.ts +2 -0
- package/cjs/chip/index.js +32 -0
- package/cjs/common/LockBodyScroll.d.ts +25 -0
- package/cjs/common/LockBodyScroll.js +84 -0
- package/cjs/common/arrow.d.ts +6 -0
- package/cjs/common/arrow.js +50 -0
- package/cjs/common/emotionCloneElement.d.ts +2 -0
- package/cjs/common/emotionCloneElement.js +25 -0
- package/cjs/common/intent.d.ts +3 -0
- package/cjs/common/intent.js +41 -0
- package/cjs/common/miniMoize.d.ts +1 -0
- package/cjs/common/miniMoize.js +38 -0
- package/cjs/common/polymorphic.d.ts +25 -0
- package/cjs/common/polymorphic.js +40 -0
- package/cjs/common/use-media.d.ts +1 -0
- package/cjs/common/use-media.js +53 -0
- package/cjs/common/useOnClickOutside.d.ts +3 -0
- package/cjs/common/useOnClickOutside.js +55 -0
- package/cjs/common/utils.d.ts +3 -0
- package/cjs/common/utils.js +30 -0
- package/cjs/counter/Counter.d.ts +26 -0
- package/cjs/counter/Counter.js +168 -0
- package/cjs/counter/PluralCounter.d.ts +13 -0
- package/cjs/counter/PluralCounter.js +94 -0
- package/cjs/counter/index.d.ts +2 -0
- package/cjs/counter/index.js +23 -0
- package/cjs/data-table/DataTable.d.ts +10 -0
- package/cjs/data-table/DataTable.js +119 -0
- package/cjs/data-table/index.d.ts +1 -0
- package/cjs/data-table/index.js +18 -0
- package/cjs/date-range-picker/DatePickerDefaultStyles.d.ts +2 -0
- package/cjs/date-range-picker/DatePickerDefaultStyles.js +23 -0
- package/cjs/date-range-picker/DatePickerDfdsStyles.d.ts +2 -0
- package/cjs/date-range-picker/DatePickerDfdsStyles.js +14 -0
- package/cjs/date-range-picker/DateRangePicker.d.ts +33 -0
- package/cjs/date-range-picker/DateRangePicker.js +345 -0
- package/cjs/date-range-picker/index.d.ts +1 -0
- package/cjs/date-range-picker/index.js +15 -0
- package/cjs/divider/Divider.d.ts +22 -0
- package/cjs/divider/Divider.js +57 -0
- package/cjs/divider/index.d.ts +1 -0
- package/cjs/divider/index.js +18 -0
- package/cjs/drawer/Drawer.d.ts +31 -0
- package/cjs/drawer/Drawer.js +64 -0
- package/cjs/drawer/index.d.ts +1 -0
- package/cjs/drawer/index.js +18 -0
- package/cjs/dropdown-menu/Dropdown.d.ts +46 -0
- package/cjs/dropdown-menu/Dropdown.js +189 -0
- package/cjs/dropdown-menu/DropdownContext.d.ts +12 -0
- package/cjs/dropdown-menu/DropdownContext.js +44 -0
- package/cjs/dropdown-menu/MenuCheckbox.d.ts +34 -0
- package/cjs/dropdown-menu/MenuCheckbox.js +72 -0
- package/cjs/dropdown-menu/MenuItem.d.ts +45 -0
- package/cjs/dropdown-menu/MenuItem.js +196 -0
- package/cjs/dropdown-menu/MenuTitle.d.ts +14 -0
- package/cjs/dropdown-menu/MenuTitle.js +63 -0
- package/cjs/dropdown-menu/index.d.ts +5 -0
- package/cjs/dropdown-menu/index.js +61 -0
- package/cjs/elevation/index.d.ts +3 -0
- package/cjs/elevation/index.js +59 -0
- package/cjs/flexbox/FlexBox.d.ts +98 -0
- package/cjs/flexbox/FlexBox.js +63 -0
- package/cjs/flexbox/index.d.ts +1 -0
- package/cjs/flexbox/index.js +18 -0
- package/cjs/footer/Footer.d.ts +6 -0
- package/cjs/footer/Footer.js +48 -0
- package/cjs/footer/index.d.ts +1 -0
- package/cjs/footer/index.js +15 -0
- package/cjs/forms/assistive-text/AssistiveText.d.ts +7 -0
- package/cjs/forms/assistive-text/AssistiveText.js +23 -0
- package/cjs/forms/asterisk/Asterisk.d.ts +2 -0
- package/cjs/forms/asterisk/Asterisk.js +30 -0
- package/cjs/forms/checkbox/Checkbox.d.ts +39 -0
- package/cjs/forms/checkbox/Checkbox.js +144 -0
- package/cjs/forms/checkbox/ExampleControlComponent.d.ts +10 -0
- package/cjs/forms/checkbox/ExampleControlComponent.js +54 -0
- package/cjs/forms/checkbox/index.d.ts +1 -0
- package/cjs/forms/checkbox/index.js +15 -0
- package/cjs/forms/email-field/EmailField.d.ts +6 -0
- package/cjs/forms/email-field/EmailField.js +32 -0
- package/cjs/forms/error-text/ErrorText.d.ts +7 -0
- package/cjs/forms/error-text/ErrorText.js +45 -0
- package/cjs/forms/field/Field.d.ts +10 -0
- package/cjs/forms/field/Field.js +75 -0
- package/cjs/forms/index.d.ts +21 -0
- package/cjs/forms/index.js +151 -0
- package/cjs/forms/input/Input.d.ts +19 -0
- package/cjs/forms/input/Input.js +168 -0
- package/cjs/forms/input/InputComposition.d.ts +43 -0
- package/cjs/forms/input/InputComposition.js +164 -0
- package/cjs/forms/label/Label.d.ts +10 -0
- package/cjs/forms/label/Label.js +63 -0
- package/cjs/forms/number-field/NumberField.d.ts +6 -0
- package/cjs/forms/number-field/NumberField.js +44 -0
- package/cjs/forms/password-field/PasswordField.d.ts +4 -0
- package/cjs/forms/password-field/PasswordField.js +78 -0
- package/cjs/forms/radio/Radio.d.ts +35 -0
- package/cjs/forms/radio/Radio.js +105 -0
- package/cjs/forms/reactselect/ReactSelect.d.ts +25 -0
- package/cjs/forms/reactselect/ReactSelect.js +181 -0
- package/cjs/forms/searchable-select/AsyncSearchableSelect.d.ts +6 -0
- package/cjs/forms/searchable-select/AsyncSearchableSelect.js +107 -0
- package/cjs/forms/select/Select.d.ts +16 -0
- package/cjs/forms/select/Select.js +133 -0
- package/cjs/forms/select-field/SelectField.d.ts +17 -0
- package/cjs/forms/select-field/SelectField.js +122 -0
- package/cjs/forms/switch/Switch.d.ts +13 -0
- package/cjs/forms/switch/Switch.js +157 -0
- package/cjs/forms/tel-field/TelField.d.ts +6 -0
- package/cjs/forms/tel-field/TelField.js +32 -0
- package/cjs/forms/text-field/TextField.d.ts +26 -0
- package/cjs/forms/text-field/TextField.js +132 -0
- package/cjs/global-styles/GlobalStyles.d.ts +2 -0
- package/cjs/global-styles/GlobalStyles.js +97 -0
- package/cjs/global-styles/sanitize.d.ts +1 -0
- package/cjs/global-styles/sanitize.js +21 -0
- package/cjs/grid/Column.d.ts +9 -0
- package/cjs/grid/Column.js +43 -0
- package/cjs/grid/Container.d.ts +14 -0
- package/cjs/grid/Container.js +113 -0
- package/cjs/grid/index.d.ts +2 -0
- package/cjs/grid/index.js +23 -0
- package/cjs/hero/Hero.d.ts +10 -0
- package/cjs/hero/Hero.js +175 -0
- package/cjs/hero/index.d.ts +1 -0
- package/cjs/hero/index.js +15 -0
- package/cjs/hero/stripes.d.ts +6 -0
- package/cjs/hero/stripes.js +183 -0
- package/cjs/ie-banner/IEBanner.d.ts +11 -0
- package/cjs/ie-banner/IEBanner.js +82 -0
- package/cjs/ie-banner/index.d.ts +1 -0
- package/cjs/ie-banner/index.js +15 -0
- package/cjs/index.d.ts +42 -0
- package/cjs/index.js +589 -0
- package/cjs/layout/LayoutLegacy.d.ts +1 -0
- package/cjs/layout/LayoutLegacy.js +71 -0
- package/cjs/lists/FeatureList.d.ts +24 -0
- package/cjs/lists/FeatureList.js +57 -0
- package/cjs/lists/ListAddon.d.ts +11 -0
- package/cjs/lists/ListAddon.js +41 -0
- package/cjs/lists/ListDivider.d.ts +4 -0
- package/cjs/lists/ListDivider.js +42 -0
- package/cjs/lists/ListIcon.d.ts +18 -0
- package/cjs/lists/ListIcon.js +62 -0
- package/cjs/lists/ListItem.d.ts +46 -0
- package/cjs/lists/ListItem.js +84 -0
- package/cjs/lists/ListText.d.ts +39 -0
- package/cjs/lists/ListText.js +82 -0
- package/cjs/lists/ListTextGroup.d.ts +15 -0
- package/cjs/lists/ListTextGroup.js +44 -0
- package/cjs/lists/ListTitle.d.ts +3 -0
- package/cjs/lists/ListTitle.js +48 -0
- package/cjs/lists/index.d.ts +8 -0
- package/cjs/lists/index.js +71 -0
- package/cjs/loader/Loader.d.ts +5 -0
- package/cjs/loader/Loader.js +70 -0
- package/cjs/loader/index.d.ts +1 -0
- package/cjs/loader/index.js +15 -0
- package/cjs/localization/LocaleFlag.d.ts +13 -0
- package/cjs/localization/LocaleFlag.js +50 -0
- package/cjs/localization/index.d.ts +2 -0
- package/cjs/localization/index.js +31 -0
- package/cjs/localization/locales.d.ts +34 -0
- package/cjs/localization/locales.js +236 -0
- package/cjs/logo/Logo.d.ts +10 -0
- package/cjs/logo/Logo.js +56 -0
- package/cjs/logo/index.d.ts +1 -0
- package/cjs/logo/index.js +18 -0
- package/cjs/media/index.d.ts +2 -0
- package/cjs/media/index.js +11 -0
- package/cjs/menu/Menu.d.ts +7 -0
- package/cjs/menu/Menu.js +100 -0
- package/cjs/menu/index.d.ts +2 -0
- package/cjs/menu/index.js +32 -0
- package/cjs/nav-bar/NavBar.d.ts +35 -0
- package/cjs/nav-bar/NavBar.js +185 -0
- package/cjs/nav-bar/index.d.ts +2 -0
- package/cjs/nav-bar/index.js +32 -0
- package/cjs/nav-menu/NavMenuItem.d.ts +10 -0
- package/cjs/nav-menu/NavMenuItem.js +60 -0
- package/cjs/nav-menu/index.d.ts +1 -0
- package/cjs/nav-menu/index.js +15 -0
- package/cjs/pagination/Pagination.d.ts +44 -0
- package/cjs/pagination/Pagination.js +130 -0
- package/cjs/pagination/Pagination.styles.d.ts +2 -0
- package/cjs/pagination/Pagination.styles.js +18 -0
- package/cjs/pagination/index.d.ts +1 -0
- package/cjs/pagination/index.js +18 -0
- package/cjs/popper/Popper.d.ts +29 -0
- package/cjs/popper/Popper.js +92 -0
- package/cjs/popper/index.d.ts +1 -0
- package/cjs/popper/index.js +15 -0
- package/cjs/progress-bar/ProgressBar.d.ts +7 -0
- package/cjs/progress-bar/ProgressBar.js +65 -0
- package/cjs/progress-bar/index.d.ts +2 -0
- package/cjs/progress-bar/index.js +32 -0
- package/cjs/schedule/ScheduleItem.d.ts +21 -0
- package/cjs/schedule/ScheduleItem.js +39 -0
- package/cjs/schedule/ScheduleList.d.ts +11 -0
- package/cjs/schedule/ScheduleList.js +44 -0
- package/cjs/schedule/index.d.ts +2 -0
- package/cjs/schedule/index.js +23 -0
- package/cjs/side-sheet/SideSheet.d.ts +57 -0
- package/cjs/side-sheet/SideSheet.js +207 -0
- package/cjs/side-sheet/SideSheetCloseButton.d.ts +13 -0
- package/cjs/side-sheet/SideSheetCloseButton.js +56 -0
- package/cjs/side-sheet/SideSheetContent.d.ts +7 -0
- package/cjs/side-sheet/SideSheetContent.js +39 -0
- package/cjs/side-sheet/SideSheetFooter.d.ts +7 -0
- package/cjs/side-sheet/SideSheetFooter.js +39 -0
- package/cjs/side-sheet/SideSheetHeader.d.ts +9 -0
- package/cjs/side-sheet/SideSheetHeader.js +46 -0
- package/cjs/side-sheet/SideSheetHeadline.d.ts +7 -0
- package/cjs/side-sheet/SideSheetHeadline.js +30 -0
- package/cjs/side-sheet/index.d.ts +4 -0
- package/cjs/side-sheet/index.js +52 -0
- package/cjs/site-layout/SiteLayout.d.ts +36 -0
- package/cjs/site-layout/SiteLayout.js +141 -0
- package/cjs/site-layout/index.d.ts +2 -0
- package/cjs/site-layout/index.js +32 -0
- package/cjs/skeleton/Skeleton.d.ts +6 -0
- package/cjs/skeleton/Skeleton.js +53 -0
- package/cjs/skeleton/index.d.ts +1 -0
- package/cjs/skeleton/index.js +18 -0
- package/cjs/social-media-link-list/SocialMediaLinkList.d.ts +26 -0
- package/cjs/social-media-link-list/SocialMediaLinkList.js +116 -0
- package/cjs/social-media-link-list/index.d.ts +1 -0
- package/cjs/social-media-link-list/index.js +18 -0
- package/cjs/spinner/Spinner.d.ts +15 -0
- package/cjs/spinner/Spinner.js +114 -0
- package/cjs/spinner/index.d.ts +2 -0
- package/cjs/spinner/index.js +32 -0
- package/cjs/stepper/Step.d.ts +9 -0
- package/cjs/stepper/Step.js +93 -0
- package/cjs/stepper/Stepper.d.ts +15 -0
- package/cjs/stepper/Stepper.js +94 -0
- package/cjs/stepper/index.d.ts +2 -0
- package/cjs/stepper/index.js +33 -0
- package/cjs/styles/index.d.ts +3 -0
- package/cjs/styles/index.js +41 -0
- package/cjs/styles/media.d.ts +21 -0
- package/cjs/styles/media.js +48 -0
- package/cjs/styles/rem.d.ts +1 -0
- package/cjs/styles/rem.js +13 -0
- package/cjs/styles/style-helpers.d.ts +1 -0
- package/cjs/styles/style-helpers.js +25 -0
- package/cjs/styles/theme.d.ts +39 -0
- package/cjs/styles/theme.js +20 -0
- package/cjs/surface/Surface.d.ts +30 -0
- package/cjs/surface/Surface.js +113 -0
- package/cjs/surface/index.d.ts +1 -0
- package/cjs/surface/index.js +18 -0
- package/cjs/tab/Tab.d.ts +11 -0
- package/cjs/tab/Tab.js +74 -0
- package/cjs/tab/TabPanel.d.ts +7 -0
- package/cjs/tab/TabPanel.js +38 -0
- package/cjs/tab/Tabs.d.ts +11 -0
- package/cjs/tab/Tabs.js +179 -0
- package/cjs/tab/TabsContext.d.ts +14 -0
- package/cjs/tab/TabsContext.js +46 -0
- package/cjs/tab/index.d.ts +4 -0
- package/cjs/tab/index.js +50 -0
- package/cjs/tab/typings.d.js +1 -0
- package/cjs/table/Table.d.ts +22 -0
- package/cjs/table/Table.js +64 -0
- package/cjs/table/TableBody.d.ts +9 -0
- package/cjs/table/TableBody.js +34 -0
- package/cjs/table/TableDataCell.d.ts +14 -0
- package/cjs/table/TableDataCell.js +47 -0
- package/cjs/table/TableHead.d.ts +14 -0
- package/cjs/table/TableHead.js +54 -0
- package/cjs/table/TableHeaderCell.d.ts +15 -0
- package/cjs/table/TableHeaderCell.js +49 -0
- package/cjs/table/TableRow.d.ts +17 -0
- package/cjs/table/TableRow.js +57 -0
- package/cjs/table/index.d.ts +6 -0
- package/cjs/table/index.js +83 -0
- package/cjs/test/Test.d.ts +8 -0
- package/cjs/test/Test.js +20 -0
- package/cjs/tooltip/Tooltip.d.ts +12 -0
- package/cjs/tooltip/Tooltip.js +75 -0
- package/cjs/tooltip/index.d.ts +1 -0
- package/cjs/tooltip/index.js +15 -0
- package/cjs/types/global.d.js +1 -0
- package/cjs/typography/Headlines.d.ts +70 -0
- package/cjs/typography/Headlines.js +117 -0
- package/cjs/typography/Text.d.ts +4 -0
- package/cjs/typography/Text.js +29 -0
- package/cjs/typography/index.d.ts +2 -0
- package/cjs/typography/index.js +31 -0
- package/common/LockBodyScroll.d.ts +25 -0
- package/common/LockBodyScroll.js +72 -0
- package/common/arrow.d.ts +6 -0
- package/common/arrow.js +46 -0
- package/common/emotionCloneElement.d.ts +2 -0
- package/common/emotionCloneElement.js +20 -0
- package/common/intent.d.ts +3 -0
- package/common/intent.js +33 -0
- package/common/miniMoize.d.ts +1 -0
- package/common/miniMoize.js +31 -0
- package/common/polymorphic.d.ts +25 -0
- package/common/polymorphic.js +33 -0
- package/common/use-media.d.ts +1 -0
- package/common/use-media.js +57 -0
- package/common/useOnClickOutside.d.ts +3 -0
- package/common/useOnClickOutside.js +46 -0
- package/common/utils.d.ts +3 -0
- package/common/utils.js +26 -0
- package/counter/Counter.d.ts +26 -0
- package/counter/Counter.js +158 -0
- package/counter/PluralCounter.d.ts +13 -0
- package/counter/PluralCounter.js +78 -0
- package/counter/index.d.ts +2 -0
- package/counter/index.js +2 -0
- package/data-table/DataTable.d.ts +10 -0
- package/data-table/DataTable.js +112 -0
- package/data-table/index.d.ts +1 -0
- package/data-table/index.js +1 -0
- package/date-range-picker/DatePickerDefaultStyles.d.ts +2 -0
- package/date-range-picker/DatePickerDefaultStyles.js +14 -0
- package/date-range-picker/DatePickerDfdsStyles.d.ts +2 -0
- package/date-range-picker/DatePickerDfdsStyles.js +4 -0
- package/date-range-picker/DateRangePicker.d.ts +33 -0
- package/date-range-picker/DateRangePicker.js +351 -0
- package/date-range-picker/index.d.ts +1 -0
- package/date-range-picker/index.js +1 -0
- package/divider/Divider.d.ts +22 -0
- package/divider/Divider.js +47 -0
- package/divider/index.d.ts +1 -0
- package/divider/index.js +1 -0
- package/drawer/Drawer.d.ts +31 -0
- package/drawer/Drawer.js +51 -0
- package/drawer/index.d.ts +1 -0
- package/drawer/index.js +1 -0
- package/dropdown-menu/Dropdown.d.ts +46 -0
- package/dropdown-menu/Dropdown.js +176 -0
- package/dropdown-menu/DropdownContext.d.ts +12 -0
- package/dropdown-menu/DropdownContext.js +25 -0
- package/dropdown-menu/MenuCheckbox.d.ts +34 -0
- package/dropdown-menu/MenuCheckbox.js +60 -0
- package/dropdown-menu/MenuItem.d.ts +45 -0
- package/dropdown-menu/MenuItem.js +181 -0
- package/dropdown-menu/MenuTitle.d.ts +14 -0
- package/dropdown-menu/MenuTitle.js +50 -0
- package/dropdown-menu/index.d.ts +5 -0
- package/dropdown-menu/index.js +5 -0
- package/elevation/index.d.ts +3 -0
- package/elevation/index.js +52 -0
- package/flexbox/FlexBox.d.ts +98 -0
- package/flexbox/FlexBox.js +55 -0
- package/flexbox/index.d.ts +1 -0
- package/flexbox/index.js +1 -0
- package/footer/Footer.d.ts +6 -0
- package/footer/Footer.js +36 -0
- package/footer/index.d.ts +1 -0
- package/footer/index.js +1 -0
- package/forms/assistive-text/AssistiveText.d.ts +7 -0
- package/forms/assistive-text/AssistiveText.js +14 -0
- package/forms/asterisk/Asterisk.d.ts +2 -0
- package/forms/asterisk/Asterisk.js +17 -0
- package/forms/checkbox/Checkbox.d.ts +39 -0
- package/forms/checkbox/Checkbox.js +153 -0
- package/forms/checkbox/ExampleControlComponent.d.ts +10 -0
- package/forms/checkbox/ExampleControlComponent.js +46 -0
- package/forms/checkbox/index.d.ts +1 -0
- package/forms/checkbox/index.js +1 -0
- package/forms/email-field/EmailField.d.ts +6 -0
- package/forms/email-field/EmailField.js +19 -0
- package/forms/error-text/ErrorText.d.ts +7 -0
- package/forms/error-text/ErrorText.js +37 -0
- package/forms/field/Field.d.ts +10 -0
- package/forms/field/Field.js +64 -0
- package/forms/index.d.ts +21 -0
- package/forms/index.js +18 -0
- package/forms/input/Input.d.ts +19 -0
- package/forms/input/Input.js +172 -0
- package/forms/input/InputComposition.d.ts +43 -0
- package/forms/input/InputComposition.js +154 -0
- package/forms/label/Label.d.ts +10 -0
- package/forms/label/Label.js +54 -0
- package/forms/number-field/NumberField.d.ts +6 -0
- package/forms/number-field/NumberField.js +31 -0
- package/forms/password-field/PasswordField.d.ts +4 -0
- package/forms/password-field/PasswordField.js +64 -0
- package/forms/radio/Radio.d.ts +35 -0
- package/forms/radio/Radio.js +112 -0
- package/forms/reactselect/ReactSelect.d.ts +25 -0
- package/forms/reactselect/ReactSelect.js +179 -0
- package/forms/searchable-select/AsyncSearchableSelect.d.ts +6 -0
- package/forms/searchable-select/AsyncSearchableSelect.js +91 -0
- package/forms/select/Select.d.ts +16 -0
- package/forms/select/Select.js +127 -0
- package/forms/select-field/SelectField.d.ts +17 -0
- package/forms/select-field/SelectField.js +104 -0
- package/forms/switch/Switch.d.ts +13 -0
- package/forms/switch/Switch.js +159 -0
- package/forms/tel-field/TelField.d.ts +6 -0
- package/forms/tel-field/TelField.js +19 -0
- package/forms/text-field/TextField.d.ts +26 -0
- package/forms/text-field/TextField.js +111 -0
- package/global-styles/GlobalStyles.d.ts +2 -0
- package/global-styles/GlobalStyles.js +76 -0
- package/global-styles/sanitize.d.ts +1 -0
- package/global-styles/sanitize.js +12 -0
- package/grid/Column.d.ts +9 -0
- package/grid/Column.js +31 -0
- package/grid/Container.d.ts +14 -0
- package/grid/Container.js +100 -0
- package/grid/index.d.ts +2 -0
- package/grid/index.js +2 -0
- package/hero/Hero.d.ts +10 -0
- package/hero/Hero.js +128 -0
- package/hero/index.d.ts +1 -0
- package/hero/index.js +1 -0
- package/hero/stripes.d.ts +6 -0
- package/hero/stripes.js +171 -0
- package/ie-banner/IEBanner.d.ts +11 -0
- package/ie-banner/IEBanner.js +70 -0
- package/ie-banner/index.d.ts +1 -0
- package/ie-banner/index.js +1 -0
- package/index.d.ts +42 -0
- package/index.js +42 -0
- package/layout/LayoutLegacy.d.ts +1 -0
- package/layout/LayoutLegacy.js +55 -0
- package/lists/FeatureList.d.ts +24 -0
- package/lists/FeatureList.js +43 -0
- package/lists/ListAddon.d.ts +11 -0
- package/lists/ListAddon.js +31 -0
- package/lists/ListDivider.d.ts +4 -0
- package/lists/ListDivider.js +30 -0
- package/lists/ListIcon.d.ts +18 -0
- package/lists/ListIcon.js +52 -0
- package/lists/ListItem.d.ts +46 -0
- package/lists/ListItem.js +66 -0
- package/lists/ListText.d.ts +39 -0
- package/lists/ListText.js +70 -0
- package/lists/ListTextGroup.d.ts +15 -0
- package/lists/ListTextGroup.js +32 -0
- package/lists/ListTitle.d.ts +3 -0
- package/lists/ListTitle.js +37 -0
- package/lists/index.d.ts +8 -0
- package/lists/index.js +8 -0
- package/loader/Loader.d.ts +5 -0
- package/loader/Loader.js +57 -0
- package/loader/index.d.ts +1 -0
- package/loader/index.js +1 -0
- package/localization/LocaleFlag.d.ts +13 -0
- package/localization/LocaleFlag.js +31 -0
- package/localization/index.d.ts +2 -0
- package/localization/index.js +2 -0
- package/localization/locales.d.ts +34 -0
- package/localization/locales.js +226 -0
- package/logo/Logo.d.ts +10 -0
- package/logo/Logo.js +38 -0
- package/logo/index.d.ts +1 -0
- package/logo/index.js +1 -0
- package/media/index.d.ts +2 -0
- package/media/index.js +2 -0
- package/menu/Menu.d.ts +7 -0
- package/menu/Menu.js +84 -0
- package/menu/index.d.ts +2 -0
- package/menu/index.js +2 -0
- package/nav-bar/NavBar.d.ts +35 -0
- package/nav-bar/NavBar.js +172 -0
- package/nav-bar/index.d.ts +2 -0
- package/nav-bar/index.js +2 -0
- package/nav-menu/NavMenuItem.d.ts +10 -0
- package/nav-menu/NavMenuItem.js +51 -0
- package/nav-menu/index.d.ts +1 -0
- package/nav-menu/index.js +1 -0
- package/package.json +9 -9
- package/pagination/Pagination.d.ts +44 -0
- package/pagination/Pagination.js +120 -0
- package/pagination/Pagination.styles.d.ts +2 -0
- package/pagination/Pagination.styles.js +8 -0
- package/pagination/index.d.ts +1 -0
- package/pagination/index.js +1 -0
- package/popper/Popper.d.ts +29 -0
- package/popper/Popper.js +79 -0
- package/popper/index.d.ts +1 -0
- package/popper/index.js +1 -0
- package/progress-bar/ProgressBar.d.ts +7 -0
- package/progress-bar/ProgressBar.js +61 -0
- package/progress-bar/index.d.ts +2 -0
- package/progress-bar/index.js +2 -0
- package/schedule/ScheduleItem.d.ts +21 -0
- package/schedule/ScheduleItem.js +24 -0
- package/schedule/ScheduleList.d.ts +11 -0
- package/schedule/ScheduleList.js +31 -0
- package/schedule/index.d.ts +2 -0
- package/schedule/index.js +2 -0
- package/side-sheet/SideSheet.d.ts +57 -0
- package/side-sheet/SideSheet.js +187 -0
- package/side-sheet/SideSheetCloseButton.d.ts +13 -0
- package/side-sheet/SideSheetCloseButton.js +40 -0
- package/side-sheet/SideSheetContent.d.ts +7 -0
- package/side-sheet/SideSheetContent.js +23 -0
- package/side-sheet/SideSheetFooter.d.ts +7 -0
- package/side-sheet/SideSheetFooter.js +23 -0
- package/side-sheet/SideSheetHeader.d.ts +9 -0
- package/side-sheet/SideSheetHeader.js +27 -0
- package/side-sheet/SideSheetHeadline.d.ts +7 -0
- package/side-sheet/SideSheetHeadline.js +14 -0
- package/side-sheet/index.d.ts +4 -0
- package/side-sheet/index.js +4 -0
- package/site-layout/SiteLayout.d.ts +36 -0
- package/site-layout/SiteLayout.js +124 -0
- package/site-layout/index.d.ts +2 -0
- package/site-layout/index.js +2 -0
- package/skeleton/Skeleton.d.ts +6 -0
- package/skeleton/Skeleton.js +44 -0
- package/skeleton/index.d.ts +1 -0
- package/skeleton/index.js +1 -0
- package/social-media-link-list/SocialMediaLinkList.d.ts +26 -0
- package/social-media-link-list/SocialMediaLinkList.js +101 -0
- package/social-media-link-list/index.d.ts +1 -0
- package/social-media-link-list/index.js +1 -0
- package/spinner/Spinner.d.ts +15 -0
- package/spinner/Spinner.js +89 -0
- package/spinner/index.d.ts +2 -0
- package/spinner/index.js +2 -0
- package/stepper/Step.d.ts +9 -0
- package/stepper/Step.js +76 -0
- package/stepper/Stepper.d.ts +15 -0
- package/stepper/Stepper.js +97 -0
- package/stepper/index.d.ts +2 -0
- package/stepper/index.js +2 -0
- package/styles/index.d.ts +3 -0
- package/styles/index.js +3 -0
- package/styles/media.d.ts +21 -0
- package/styles/media.js +41 -0
- package/styles/rem.d.ts +1 -0
- package/styles/rem.js +5 -0
- package/styles/style-helpers.d.ts +1 -0
- package/styles/style-helpers.js +17 -0
- package/styles/theme.d.ts +39 -0
- package/styles/theme.js +9 -0
- package/surface/Surface.d.ts +30 -0
- package/surface/Surface.js +84 -0
- package/surface/index.d.ts +1 -0
- package/surface/index.js +1 -0
- package/tab/Tab.d.ts +11 -0
- package/tab/Tab.js +70 -0
- package/tab/TabPanel.d.ts +7 -0
- package/tab/TabPanel.js +27 -0
- package/tab/Tabs.d.ts +11 -0
- package/tab/Tabs.js +173 -0
- package/tab/TabsContext.d.ts +14 -0
- package/tab/TabsContext.js +24 -0
- package/tab/index.d.ts +4 -0
- package/tab/index.js +4 -0
- package/tab/typings.d.js +0 -0
- package/table/Table.d.ts +22 -0
- package/table/Table.js +46 -0
- package/table/TableBody.d.ts +9 -0
- package/table/TableBody.js +19 -0
- package/table/TableDataCell.d.ts +14 -0
- package/table/TableDataCell.js +34 -0
- package/table/TableHead.d.ts +14 -0
- package/table/TableHead.js +35 -0
- package/table/TableHeaderCell.d.ts +15 -0
- package/table/TableHeaderCell.js +37 -0
- package/table/TableRow.d.ts +17 -0
- package/table/TableRow.js +40 -0
- package/table/index.d.ts +6 -0
- package/table/index.js +6 -0
- package/test/Test.d.ts +8 -0
- package/test/Test.js +6 -0
- package/tooltip/Tooltip.d.ts +12 -0
- package/tooltip/Tooltip.js +64 -0
- package/tooltip/index.d.ts +1 -0
- package/tooltip/index.js +1 -0
- package/types/global.d.js +0 -0
- package/typography/Headlines.d.ts +70 -0
- package/typography/Headlines.js +97 -0
- package/typography/Text.d.ts +4 -0
- package/typography/Text.js +19 -0
- package/typography/index.d.ts +2 -0
- package/typography/index.js +2 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.useStepperContext = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _core = require("@material-ui/core");
|
|
11
|
+
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
|
+
|
|
14
|
+
const _excluded = ["children", "initialStep"];
|
|
15
|
+
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
|
|
20
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
+
|
|
22
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
+
|
|
24
|
+
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."); }
|
|
25
|
+
|
|
26
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
|
+
|
|
28
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
29
|
+
|
|
30
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
31
|
+
|
|
32
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
|
+
|
|
34
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
35
|
+
|
|
36
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
37
|
+
|
|
38
|
+
const StepperContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
39
|
+
|
|
40
|
+
const useStepperContext = () => {
|
|
41
|
+
const context = (0, _react.useContext)(StepperContext);
|
|
42
|
+
|
|
43
|
+
if (context === undefined) {
|
|
44
|
+
throw new Error('useStepperContext must be used within a StepperProvider');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return context;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
exports.useStepperContext = useStepperContext;
|
|
51
|
+
|
|
52
|
+
const StepperProvider = _ref => {
|
|
53
|
+
let children = _ref.children,
|
|
54
|
+
initialStep = _ref.initialStep,
|
|
55
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
56
|
+
|
|
57
|
+
const _useState = (0, _react.useState)([]),
|
|
58
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
59
|
+
steps = _useState2[0],
|
|
60
|
+
setSteps = _useState2[1];
|
|
61
|
+
|
|
62
|
+
const _useState3 = (0, _react.useState)(initialStep || 0),
|
|
63
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
64
|
+
activeIndex = _useState4[0],
|
|
65
|
+
setActiveIndex = _useState4[1];
|
|
66
|
+
|
|
67
|
+
const activeStep = steps[activeIndex];
|
|
68
|
+
const setStep = (0, _react.useCallback)(newStep => setSteps(prevSteps => [...prevSteps, newStep]), []);
|
|
69
|
+
const setNext = (0, _react.useCallback)(() => setActiveIndex(prevIndex => prevIndex + 1), []);
|
|
70
|
+
const setBack = (0, _react.useCallback)(() => setActiveIndex(prevIndex => prevIndex - 1), []);
|
|
71
|
+
const setReset = (0, _react.useCallback)(() => setActiveIndex(0), []);
|
|
72
|
+
return (0, _react2.jsx)(StepperContext.Provider, {
|
|
73
|
+
value: {
|
|
74
|
+
setStep,
|
|
75
|
+
activeStep,
|
|
76
|
+
setNext,
|
|
77
|
+
setBack,
|
|
78
|
+
setReset,
|
|
79
|
+
setActiveIndex
|
|
80
|
+
}
|
|
81
|
+
}, (0, _react2.jsx)(_core.Stepper, _extends({
|
|
82
|
+
style: {
|
|
83
|
+
padding: 0
|
|
84
|
+
}
|
|
85
|
+
}, props, {
|
|
86
|
+
connector: (0, _react2.jsx)(_react.default.Fragment, null),
|
|
87
|
+
orientation: "vertical",
|
|
88
|
+
activeStep: activeIndex
|
|
89
|
+
}), children));
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
var _default = /*#__PURE__*/(0, _react.memo)(StepperProvider);
|
|
93
|
+
|
|
94
|
+
exports.default = _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Step", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _Step.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "Stepper", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _Stepper.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "useStepperContext", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _Stepper.useStepperContext;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var _Step = _interopRequireDefault(require("./Step"));
|
|
26
|
+
|
|
27
|
+
var _Stepper = _interopRequireWildcard(require("./Stepper"));
|
|
28
|
+
|
|
29
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
30
|
+
|
|
31
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
32
|
+
|
|
33
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "legacyMedia", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _media.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "legacyGenerateMedia", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _media.legacyGenerateMedia;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "theme", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _theme.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "visuallyHidden", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _styleHelpers.visuallyHidden;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
var _media = _interopRequireWildcard(require("./media"));
|
|
32
|
+
|
|
33
|
+
var _theme = _interopRequireDefault(require("./theme"));
|
|
34
|
+
|
|
35
|
+
var _styleHelpers = require("./style-helpers");
|
|
36
|
+
|
|
37
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
38
|
+
|
|
39
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
40
|
+
|
|
41
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const defaultBreakPoints: {
|
|
2
|
+
xl: number;
|
|
3
|
+
lg: number;
|
|
4
|
+
md: number;
|
|
5
|
+
sm: number;
|
|
6
|
+
xs: number;
|
|
7
|
+
};
|
|
8
|
+
declare type BreakPoint = keyof typeof defaultBreakPoints | number;
|
|
9
|
+
export declare function legacyGenerateMedia(breakPoints: typeof defaultBreakPoints): {
|
|
10
|
+
lt: (breakPoint: BreakPoint) => string;
|
|
11
|
+
gt: (breakPoint: BreakPoint) => string;
|
|
12
|
+
bt: (firstBreakpoint: BreakPoint, secondBreakpoint: BreakPoint) => string;
|
|
13
|
+
tablet: () => string;
|
|
14
|
+
};
|
|
15
|
+
export declare const legacyMedia: {
|
|
16
|
+
lt: (breakPoint: BreakPoint) => string;
|
|
17
|
+
gt: (breakPoint: BreakPoint) => string;
|
|
18
|
+
bt: (firstBreakpoint: BreakPoint, secondBreakpoint: BreakPoint) => string;
|
|
19
|
+
tablet: () => string;
|
|
20
|
+
};
|
|
21
|
+
export default legacyMedia;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.legacyGenerateMedia = legacyGenerateMedia;
|
|
7
|
+
exports.default = exports.legacyMedia = void 0;
|
|
8
|
+
// ***
|
|
9
|
+
// DEPRECATED use media from ./media
|
|
10
|
+
// ***
|
|
11
|
+
// breakpoint used in DFDS-DIRECT
|
|
12
|
+
const defaultBreakPoints = {
|
|
13
|
+
xl: 1260,
|
|
14
|
+
lg: 992,
|
|
15
|
+
md: 768,
|
|
16
|
+
sm: 576,
|
|
17
|
+
xs: 575
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
function legacyGenerateMedia(breakPoints) {
|
|
21
|
+
const toInt = breakPoint => {
|
|
22
|
+
return typeof breakPoint === 'number' ? breakPoint : breakPoints[breakPoint];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const lessThan = breakPoint => `
|
|
26
|
+
@media (max-width: ${toInt(breakPoint) - 1}px)`;
|
|
27
|
+
|
|
28
|
+
const greaterThan = breakPoint => `
|
|
29
|
+
@media (min-width: ${toInt(breakPoint) + 1}px)`;
|
|
30
|
+
|
|
31
|
+
const between = (firstBreakpoint, secondBreakpoint) => `
|
|
32
|
+
@media (min-width: ${toInt(firstBreakpoint)}px) and (max-width: ${toInt(secondBreakpoint)}px)`;
|
|
33
|
+
|
|
34
|
+
const tablet = () => `
|
|
35
|
+
@media (min-width: ${breakPoints.sm + 1}px) and (max-width: ${breakPoints.md}px)`;
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
lt: lessThan,
|
|
39
|
+
gt: greaterThan,
|
|
40
|
+
bt: between,
|
|
41
|
+
tablet
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const legacyMedia = legacyGenerateMedia(defaultBreakPoints);
|
|
46
|
+
exports.legacyMedia = legacyMedia;
|
|
47
|
+
var _default = legacyMedia;
|
|
48
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const rem: (targetPixelValue: number, base?: number) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.rem = void 0;
|
|
7
|
+
|
|
8
|
+
// replacement for the rem function from polished
|
|
9
|
+
const rem = (targetPixelValue, base = 16) => {
|
|
10
|
+
return `${targetPixelValue / base}rem`;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
exports.rem = rem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const visuallyHidden: () => import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.visuallyHidden = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
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)."; }
|
|
11
|
+
|
|
12
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
|
+
name: "2jmk7x",
|
|
14
|
+
styles: "border:0;clip:rect(0 0 0 0);height:auto;margin:0;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap"
|
|
15
|
+
} : {
|
|
16
|
+
name: "1nihf9n-visuallyHidden",
|
|
17
|
+
styles: "border:0;clip:rect(0 0 0 0);height:auto;margin:0;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;label:visuallyHidden;",
|
|
18
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdHlsZXMvc3R5bGUtaGVscGVycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHdUMiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL3N0eWxlcy9zdHlsZS1oZWxwZXJzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbi8vIGh0dHBzOi8vemVsbHdrLmNvbS9ibG9nL2hpZGUtY29udGVudC1hY2Nlc3NpYmx5L1xuZXhwb3J0IGNvbnN0IHZpc3VhbGx5SGlkZGVuID0gKCkgPT4gY3NzYFxuICBib3JkZXI6IDA7XG4gIGNsaXA6IHJlY3QoMCAwIDAgMCk7XG4gIGhlaWdodDogYXV0bztcbiAgbWFyZ2luOiAwO1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICBwYWRkaW5nOiAwO1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHdpZHRoOiAxcHg7XG4gIHdoaXRlLXNwYWNlOiBub3dyYXA7XG5gXG4iXX0= */",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// https://zellwk.com/blog/hide-content-accessibly/
|
|
23
|
+
const visuallyHidden = () => _ref;
|
|
24
|
+
|
|
25
|
+
exports.visuallyHidden = visuallyHidden;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const theme: {
|
|
2
|
+
colors: {
|
|
3
|
+
yesGreen: string;
|
|
4
|
+
cautionAmber: string;
|
|
5
|
+
noRed: string;
|
|
6
|
+
linkBlue: string;
|
|
7
|
+
linkHover: string;
|
|
8
|
+
actionBlue: string;
|
|
9
|
+
actionHover: string;
|
|
10
|
+
actionMedium: string;
|
|
11
|
+
actionLight: string;
|
|
12
|
+
primaryOrange: string;
|
|
13
|
+
primaryHover: string;
|
|
14
|
+
uiEnabled: string;
|
|
15
|
+
uiDisabled: string;
|
|
16
|
+
textGrey: string;
|
|
17
|
+
textMedium: string;
|
|
18
|
+
textLight: string;
|
|
19
|
+
groupBlue: string;
|
|
20
|
+
groupMedium: string;
|
|
21
|
+
groupLight: string;
|
|
22
|
+
backgroundGrey: string;
|
|
23
|
+
white: string;
|
|
24
|
+
whiteHover: string;
|
|
25
|
+
};
|
|
26
|
+
fontFamily: string;
|
|
27
|
+
spacing: {
|
|
28
|
+
xxs: string;
|
|
29
|
+
xs: string;
|
|
30
|
+
s: string;
|
|
31
|
+
m: string;
|
|
32
|
+
l: string;
|
|
33
|
+
xl: string;
|
|
34
|
+
xxl: string;
|
|
35
|
+
};
|
|
36
|
+
uiRoundness: string;
|
|
37
|
+
};
|
|
38
|
+
export declare type ThemeInterface = typeof theme;
|
|
39
|
+
export default theme;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.theme = void 0;
|
|
7
|
+
|
|
8
|
+
var _colors = require("@dfds-ui/colors");
|
|
9
|
+
|
|
10
|
+
var _spacing = require("@dfds-ui/spacing");
|
|
11
|
+
|
|
12
|
+
const theme = {
|
|
13
|
+
colors: _colors.colors,
|
|
14
|
+
fontFamily: 'DFDS, Verdana, system-ui, Arial, "Helvetica Neue", Helvetica, sans-serif',
|
|
15
|
+
spacing: _spacing.spacing,
|
|
16
|
+
uiRoundness: '2px'
|
|
17
|
+
};
|
|
18
|
+
exports.theme = theme;
|
|
19
|
+
var _default = theme;
|
|
20
|
+
exports.default = _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { theme } from '@dfds-ui/theme';
|
|
3
|
+
export declare type SurfaceType = keyof typeof theme.colors.surface;
|
|
4
|
+
export declare type SurfaceContextType = {
|
|
5
|
+
surface: SurfaceType;
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
textColors: {
|
|
8
|
+
primary: string;
|
|
9
|
+
secondary: string;
|
|
10
|
+
disabled: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare function getTextColors(surface: SurfaceType): {
|
|
14
|
+
primary: string;
|
|
15
|
+
secondary: string;
|
|
16
|
+
disabled: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function getBackgroundColor(surface: SurfaceType): string;
|
|
19
|
+
export declare const SurfaceContext: React.Context<SurfaceContextType | undefined>;
|
|
20
|
+
export declare const SurfaceProvider: React.FC<{
|
|
21
|
+
surface: SurfaceType;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function MaybeSurfaceProvider({ surface, ...rest }: React.PropsWithChildren<{
|
|
24
|
+
surface?: SurfaceType;
|
|
25
|
+
}>): JSX.Element;
|
|
26
|
+
export declare const useSurfaceContext: (surface?: "main" | "dark" | "primary" | "secondary" | "inverted" | "tertiary" | undefined) => SurfaceContextType;
|
|
27
|
+
export declare const Surface: React.FC<{
|
|
28
|
+
surface: SurfaceType;
|
|
29
|
+
className?: string;
|
|
30
|
+
}>;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTextColors = getTextColors;
|
|
7
|
+
exports.getBackgroundColor = getBackgroundColor;
|
|
8
|
+
exports.MaybeSurfaceProvider = MaybeSurfaceProvider;
|
|
9
|
+
exports.Surface = exports.useSurfaceContext = exports.SurfaceProvider = exports.SurfaceContext = void 0;
|
|
10
|
+
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
|
|
13
|
+
var _theme = require("@dfds-ui/theme");
|
|
14
|
+
|
|
15
|
+
var _react2 = require("@emotion/react");
|
|
16
|
+
|
|
17
|
+
const _excluded = ["surface"],
|
|
18
|
+
_excluded2 = ["surface", "children"];
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
+
|
|
26
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
27
|
+
|
|
28
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
+
|
|
30
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
+
|
|
32
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
33
|
+
|
|
34
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
35
|
+
|
|
36
|
+
function createSurfaceContextValue(surface) {
|
|
37
|
+
return {
|
|
38
|
+
surface,
|
|
39
|
+
backgroundColor: getBackgroundColor(surface),
|
|
40
|
+
textColors: getTextColors(surface)
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function getTextColors(surface) {
|
|
45
|
+
if (surface === 'inverted') {
|
|
46
|
+
return _theme.theme.colors.text.light;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return _theme.theme.colors.text.dark;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function getBackgroundColor(surface) {
|
|
53
|
+
return _theme.theme.colors.surface[surface];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const SurfaceContext = /*#__PURE__*/_react.default.createContext(undefined);
|
|
57
|
+
|
|
58
|
+
exports.SurfaceContext = SurfaceContext;
|
|
59
|
+
|
|
60
|
+
const SurfaceProvider = ({
|
|
61
|
+
children,
|
|
62
|
+
surface
|
|
63
|
+
}) => (0, _react2.jsx)(SurfaceContext.Provider, {
|
|
64
|
+
value: {
|
|
65
|
+
surface,
|
|
66
|
+
backgroundColor: getBackgroundColor(surface),
|
|
67
|
+
textColors: getTextColors(surface)
|
|
68
|
+
}
|
|
69
|
+
}, children);
|
|
70
|
+
|
|
71
|
+
exports.SurfaceProvider = SurfaceProvider;
|
|
72
|
+
|
|
73
|
+
function MaybeSurfaceProvider(_ref) {
|
|
74
|
+
let surface = _ref.surface,
|
|
75
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
76
|
+
|
|
77
|
+
return surface ? (0, _react2.jsx)(SurfaceProvider, _extends({
|
|
78
|
+
surface: surface
|
|
79
|
+
}, rest)) : (0, _react2.jsx)(_react.Fragment, rest);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const useSurfaceContext = surface => {
|
|
83
|
+
const context = _react.default.useContext(SurfaceContext); // if the consumer of the hook provides it's own surface we return that
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
if (surface !== undefined) {
|
|
87
|
+
return createSurfaceContextValue(surface);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (context === undefined) {
|
|
91
|
+
return _objectSpread(_objectSpread({}, createSurfaceContextValue('main')), {}, {
|
|
92
|
+
backgroundColor: 'transparent'
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return context;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
exports.useSurfaceContext = useSurfaceContext;
|
|
100
|
+
|
|
101
|
+
const Surface = _ref2 => {
|
|
102
|
+
let surface = _ref2.surface,
|
|
103
|
+
children = _ref2.children,
|
|
104
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
105
|
+
|
|
106
|
+
return (0, _react2.jsx)(SurfaceProvider, {
|
|
107
|
+
surface: surface
|
|
108
|
+
}, (0, _react2.jsx)("div", _extends({
|
|
109
|
+
css: /*#__PURE__*/(0, _react2.css)("background-color:", getBackgroundColor(surface), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:Surface;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdXJmYWNlL1N1cmZhY2UudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlFZ0IiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL3N1cmZhY2UvU3VyZmFjZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgRnJhZ21lbnQgfSBmcm9tICdyZWFjdCdcbmltcG9ydCB7IHRoZW1lIH0gZnJvbSAnQGRmZHMtdWkvdGhlbWUnXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuZXhwb3J0IHR5cGUgU3VyZmFjZVR5cGUgPSBrZXlvZiB0eXBlb2YgdGhlbWUuY29sb3JzLnN1cmZhY2VcblxuZXhwb3J0IHR5cGUgU3VyZmFjZUNvbnRleHRUeXBlID0ge1xuICBzdXJmYWNlOiBTdXJmYWNlVHlwZVxuICBiYWNrZ3JvdW5kQ29sb3I6IHN0cmluZ1xuICB0ZXh0Q29sb3JzOiB7XG4gICAgcHJpbWFyeTogc3RyaW5nXG4gICAgc2Vjb25kYXJ5OiBzdHJpbmdcbiAgICBkaXNhYmxlZDogc3RyaW5nXG4gIH1cbn1cblxuZnVuY3Rpb24gY3JlYXRlU3VyZmFjZUNvbnRleHRWYWx1ZShzdXJmYWNlOiBTdXJmYWNlVHlwZSkge1xuICByZXR1cm4ge1xuICAgIHN1cmZhY2UsXG4gICAgYmFja2dyb3VuZENvbG9yOiBnZXRCYWNrZ3JvdW5kQ29sb3Ioc3VyZmFjZSksXG4gICAgdGV4dENvbG9yczogZ2V0VGV4dENvbG9ycyhzdXJmYWNlKSxcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gZ2V0VGV4dENvbG9ycyhzdXJmYWNlOiBTdXJmYWNlVHlwZSkge1xuICBpZiAoc3VyZmFjZSA9PT0gJ2ludmVydGVkJykge1xuICAgIHJldHVybiB0aGVtZS5jb2xvcnMudGV4dC5saWdodFxuICB9XG4gIHJldHVybiB0aGVtZS5jb2xvcnMudGV4dC5kYXJrXG59XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRCYWNrZ3JvdW5kQ29sb3Ioc3VyZmFjZTogU3VyZmFjZVR5cGUpIHtcbiAgcmV0dXJuIHRoZW1lLmNvbG9ycy5zdXJmYWNlW3N1cmZhY2VdXG59XG5cbmV4cG9ydCBjb25zdCBTdXJmYWNlQ29udGV4dCA9IFJlYWN0LmNyZWF0ZUNvbnRleHQ8U3VyZmFjZUNvbnRleHRUeXBlIHwgdW5kZWZpbmVkPih1bmRlZmluZWQpXG5cbmV4cG9ydCBjb25zdCBTdXJmYWNlUHJvdmlkZXI6IFJlYWN0LkZDPHsgc3VyZmFjZTogU3VyZmFjZVR5cGUgfT4gPSAoeyBjaGlsZHJlbiwgc3VyZmFjZSB9KSA9PiAoXG4gIDxTdXJmYWNlQ29udGV4dC5Qcm92aWRlclxuICAgIHZhbHVlPXt7IHN1cmZhY2UsIGJhY2tncm91bmRDb2xvcjogZ2V0QmFja2dyb3VuZENvbG9yKHN1cmZhY2UpLCB0ZXh0Q29sb3JzOiBnZXRUZXh0Q29sb3JzKHN1cmZhY2UpIH19XG4gID5cbiAgICB7Y2hpbGRyZW59XG4gIDwvU3VyZmFjZUNvbnRleHQuUHJvdmlkZXI+XG4pXG5cbmV4cG9ydCBmdW5jdGlvbiBNYXliZVN1cmZhY2VQcm92aWRlcih7IHN1cmZhY2UsIC4uLnJlc3QgfTogUmVhY3QuUHJvcHNXaXRoQ2hpbGRyZW48eyBzdXJmYWNlPzogU3VyZmFjZVR5cGUgfT4pIHtcbiAgcmV0dXJuIHN1cmZhY2UgPyA8U3VyZmFjZVByb3ZpZGVyIHN1cmZhY2U9e3N1cmZhY2V9IHsuLi5yZXN0fSAvPiA6IDxGcmFnbWVudCB7Li4ucmVzdH0gLz5cbn1cblxuZXhwb3J0IGNvbnN0IHVzZVN1cmZhY2VDb250ZXh0ID0gKHN1cmZhY2U/OiBTdXJmYWNlVHlwZSkgPT4ge1xuICBjb25zdCBjb250ZXh0ID0gUmVhY3QudXNlQ29udGV4dChTdXJmYWNlQ29udGV4dClcbiAgLy8gaWYgdGhlIGNvbnN1bWVyIG9mIHRoZSBob29rIHByb3ZpZGVzIGl0J3Mgb3duIHN1cmZhY2Ugd2UgcmV0dXJuIHRoYXRcbiAgaWYgKHN1cmZhY2UgIT09IHVuZGVmaW5lZCkge1xuICAgIHJldHVybiBjcmVhdGVTdXJmYWNlQ29udGV4dFZhbHVlKHN1cmZhY2UpXG4gIH1cbiAgaWYgKGNvbnRleHQgPT09IHVuZGVmaW5lZCkge1xuICAgIHJldHVybiB7IC4uLmNyZWF0ZVN1cmZhY2VDb250ZXh0VmFsdWUoJ21haW4nKSwgYmFja2dyb3VuZENvbG9yOiAndHJhbnNwYXJlbnQnIH1cbiAgfVxuICByZXR1cm4gY29udGV4dFxufVxuXG5leHBvcnQgY29uc3QgU3VyZmFjZTogUmVhY3QuRkM8eyBzdXJmYWNlOiBTdXJmYWNlVHlwZTsgY2xhc3NOYW1lPzogc3RyaW5nIH0+ID0gKHsgc3VyZmFjZSwgY2hpbGRyZW4sIC4uLnJlc3QgfSkgPT4ge1xuICByZXR1cm4gKFxuICAgIDxTdXJmYWNlUHJvdmlkZXIgc3VyZmFjZT17c3VyZmFjZX0+XG4gICAgICA8ZGl2XG4gICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICR7Z2V0QmFja2dyb3VuZENvbG9yKHN1cmZhY2UpfTtcbiAgICAgICAgYH1cbiAgICAgICAgey4uLnJlc3R9XG4gICAgICA+XG4gICAgICAgIHtjaGlsZHJlbn1cbiAgICAgIDwvZGl2PlxuICAgIDwvU3VyZmFjZVByb3ZpZGVyPlxuICApXG59XG4iXX0= */")
|
|
110
|
+
}, rest), children));
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
exports.Surface = Surface;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Surface';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _Surface = require("./Surface");
|
|
8
|
+
|
|
9
|
+
Object.keys(_Surface).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _Surface[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _Surface[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
package/cjs/tab/Tab.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type Index = number | string;
|
|
3
|
+
export declare type TabProps = {
|
|
4
|
+
active?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
transparent?: boolean;
|
|
7
|
+
index: Index;
|
|
8
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
9
|
+
};
|
|
10
|
+
declare const Tab: React.FC<TabProps>;
|
|
11
|
+
export default Tab;
|