@nulogy/components 16.0.0 → 16.0.2
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/dist/locales/ja_JP.json +63 -0
- package/dist/main.js +1778 -646
- package/dist/main.js.map +1 -1
- package/dist/main.module.js +1777 -645
- package/dist/main.module.js.map +1 -1
- package/dist/src/Alert/Alert.d.ts +1 -1
- package/dist/src/Alert/Alert.js +3 -8
- package/dist/src/Alert/Alert.story.d.ts +1 -1
- package/dist/src/Alert/Alert.story.js +3 -9
- package/dist/src/Alert/CloseButton.d.ts +1 -1
- package/dist/src/Alert/CloseButton.js +2 -3
- package/dist/src/AppTag/AppTag.d.ts +1 -2
- package/dist/src/AppTag/AppTag.js +2 -6
- package/dist/src/AppTag/components/NulogyLogo.d.ts +1 -1
- package/dist/src/AppTag/components/NulogyLogo.js +2 -3
- package/dist/src/AppTag/stories/AppTag.story.d.ts +2 -3
- package/dist/src/AppTag/stories/AppTag.story.js +6 -8
- package/dist/src/AppTag/stories/AppTag.usecases.story.d.ts +5 -6
- package/dist/src/AppTag/stories/AppTag.usecases.story.js +12 -58
- package/dist/src/AsyncSelect/AsyncSelect.graphql.story.d.ts +1 -2
- package/dist/src/AsyncSelect/AsyncSelect.graphql.story.js +4 -4
- package/dist/src/AsyncSelect/AsyncSelect.js +21 -23
- package/dist/src/AsyncSelect/AsyncSelect.story.d.ts +9 -10
- package/dist/src/AsyncSelect/AsyncSelect.story.js +11 -14
- package/dist/src/AsyncSelect/AsyncSelectComponents.d.ts +8 -9
- package/dist/src/AsyncSelect/AsyncSelectComponents.js +9 -19
- package/dist/src/Banner/Banner.d.ts +2 -2
- package/dist/src/Banner/Banner.js +2 -2
- package/dist/src/Banner/Banner.story.d.ts +6 -7
- package/dist/src/Banner/Banner.story.js +7 -24
- package/dist/src/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/src/BottomSheet/BottomSheet.js +3 -17
- package/dist/src/BottomSheet/BottomSheet.parts.d.ts +5 -5
- package/dist/src/BottomSheet/BottomSheet.parts.js +6 -5
- package/dist/src/BottomSheet/BottomSheet.styled.d.ts +12 -8
- package/dist/src/BottomSheet/BottomSheetProvider.d.ts +1 -1
- package/dist/src/BottomSheet/BottomSheetProvider.js +2 -2
- package/dist/src/BottomSheet/stories/BottomSheet.actions.story.d.ts +3 -4
- package/dist/src/BottomSheet/stories/BottomSheet.actions.story.js +4 -9
- package/dist/src/BottomSheet/stories/BottomSheet.content.story.d.ts +3 -4
- package/dist/src/BottomSheet/stories/BottomSheet.content.story.js +4 -11
- package/dist/src/BottomSheet/stories/BottomSheet.features.story.d.ts +5 -6
- package/dist/src/BottomSheet/stories/BottomSheet.features.story.js +12 -42
- package/dist/src/BottomSheet/stories/BottomSheet.parts.story.d.ts +2 -3
- package/dist/src/BottomSheet/stories/BottomSheet.parts.story.js +3 -23
- package/dist/src/BottomSheet/stories/BottomSheet.story.d.ts +2 -3
- package/dist/src/BottomSheet/stories/BottomSheet.story.js +3 -5
- package/dist/src/Box/Box.d.ts +12 -13
- package/dist/src/Box/Box.story.d.ts +12 -13
- package/dist/src/Box/Box.story.js +14 -32
- package/dist/src/BrandedNavBar/BrandLogoContainer.d.ts +1 -1
- package/dist/src/BrandedNavBar/BrandLogoContainer.js +2 -5
- package/dist/src/BrandedNavBar/DesktopMenu.d.ts +3 -1
- package/dist/src/BrandedNavBar/DesktopMenu.js +6 -9
- package/dist/src/BrandedNavBar/MenuTrigger.d.ts +1 -1
- package/dist/src/BrandedNavBar/MenuTrigger.js +12 -12
- package/dist/src/BrandedNavBar/MenuTriggerButton.js +7 -8
- package/dist/src/BrandedNavBar/MobileMenu.d.ts +1 -1
- package/dist/src/BrandedNavBar/MobileMenu.js +8 -24
- package/dist/src/BrandedNavBar/NavBar.d.ts +1 -1
- package/dist/src/BrandedNavBar/NavBar.js +8 -18
- package/dist/src/BrandedNavBar/NavBar.story.d.ts +13 -14
- package/dist/src/BrandedNavBar/NavBar.story.js +27 -42
- package/dist/src/BrandedNavBar/NavBarDropdownMenu.js +34 -39
- package/dist/src/BrandedNavBar/NulogyLogo.d.ts +1 -2
- package/dist/src/BrandedNavBar/NulogyLogo.js +2 -14
- package/dist/src/BrandedNavBar/NulogyLogoContainer.d.ts +1 -2
- package/dist/src/BrandedNavBar/NulogyLogoContainer.js +2 -5
- package/dist/src/BrandedNavBar/SmallNavBar.js +9 -17
- package/dist/src/BrandedNavBar/SmallNavBar.story.d.ts +6 -7
- package/dist/src/BrandedNavBar/SmallNavBar.story.js +10 -16
- package/dist/src/BrandedNavBar/SubMenuTrigger.d.ts +1 -1
- package/dist/src/BrandedNavBar/SubMenuTrigger.js +4 -5
- package/dist/src/BrandedNavBar/SubMenuTriggerButton.js +2 -4
- package/dist/src/BrandedNavBar/renderSubMenuItems.js +5 -10
- package/dist/src/Branding/Branding.d.ts +1 -2
- package/dist/src/Branding/Branding.js +5 -10
- package/dist/src/Branding/Branding.story.d.ts +1 -2
- package/dist/src/Branding/Branding.story.js +2 -77
- package/dist/src/Branding/LettermarkLogo.d.ts +1 -2
- package/dist/src/Branding/LettermarkLogo.js +2 -3
- package/dist/src/Branding/WordmarkLogo.d.ts +1 -1
- package/dist/src/Branding/WordmarkLogo.js +2 -10
- package/dist/src/Breadcrumbs/Breadcrumbs.d.ts +1 -2
- package/dist/src/Breadcrumbs/Breadcrumbs.js +4 -5
- package/dist/src/Breadcrumbs/Breadcrumbs.story.d.ts +3 -4
- package/dist/src/Breadcrumbs/Breadcrumbs.story.js +4 -16
- package/dist/src/Button/Button.js +2 -4
- package/dist/src/Button/Button.story.d.ts +9 -10
- package/dist/src/Button/Button.story.js +10 -26
- package/dist/src/Button/CloseButton.js +2 -2
- package/dist/src/Button/ControlIcon.js +2 -2
- package/dist/src/Button/ControlIcon.story.d.ts +3 -4
- package/dist/src/Button/ControlIcon.story.js +4 -4
- package/dist/src/Button/DangerButton.d.ts +3 -1
- package/dist/src/Button/IconicButton.js +13 -17
- package/dist/src/Button/IconicButton.story.d.ts +15 -16
- package/dist/src/Button/IconicButton.story.js +16 -31
- package/dist/src/Button/PrimaryButton.d.ts +3 -1
- package/dist/src/Button/QuietButton.d.ts +3 -1
- package/dist/src/ButtonGroup/ButtonGroup.story.d.ts +5 -6
- package/dist/src/ButtonGroup/ButtonGroup.story.js +6 -43
- package/dist/src/Card/Card.d.ts +1 -2
- package/dist/src/Card/Card.js +2 -2
- package/dist/src/Card/Card.story.d.ts +4 -5
- package/dist/src/Card/Card.story.js +6 -39
- package/dist/src/Checkbox/Checkbox.js +3 -6
- package/dist/src/Checkbox/Checkbox.story.d.ts +11 -12
- package/dist/src/Checkbox/Checkbox.story.js +13 -26
- package/dist/src/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/src/Checkbox/CheckboxGroup.js +3 -11
- package/dist/src/Checkbox/CheckboxGroup.story.d.ts +6 -7
- package/dist/src/Checkbox/CheckboxGroup.story.js +7 -25
- package/dist/src/DatePickers/DatePicker.js +3 -2
- package/dist/src/DatePickers/MonthPicker.js +3 -2
- package/dist/src/DatePickers/WeekPicker.js +4 -7
- package/dist/src/DatePickers/custom/MonthPickerHeader.d.ts +1 -2
- package/dist/src/DatePickers/custom/MonthPickerHeader.js +2 -5
- package/dist/src/DatePickers/shared/components/BasePicker.js +3 -5
- package/dist/src/DatePickers/shared/components/DatePickerHeader.d.ts +2 -2
- package/dist/src/DatePickers/shared/components/DatePickerHeader.js +3 -9
- package/dist/src/DatePickers/shared/components/DatePickerInput.js +2 -1
- package/dist/src/DatePickers/stories/DatePicker.story.d.ts +4 -4
- package/dist/src/DatePickers/stories/DatePicker.story.js +6 -7
- package/dist/src/DatePickers/stories/MonthPicker.story.d.ts +6 -7
- package/dist/src/DatePickers/stories/MonthPicker.story.js +8 -7
- package/dist/src/DatePickers/stories/WeekPicker.story.d.ts +8 -9
- package/dist/src/DatePickers/stories/WeekPicker.story.js +10 -11
- package/dist/src/DateRange/DateRange.js +12 -17
- package/dist/src/DateRange/DateRange.story.d.ts +12 -13
- package/dist/src/DateRange/DateRange.story.js +14 -20
- package/dist/src/DateRange/EndTime.d.ts +5 -7
- package/dist/src/DateRange/StartTime.d.ts +5 -7
- package/dist/src/Decorations/index.d.ts +1 -2
- package/dist/src/Decorations/index.js +2 -4
- package/dist/src/DescriptionList/DescriptionList.d.ts +1 -2
- package/dist/src/DescriptionList/DescriptionList.js +2 -4
- package/dist/src/DescriptionList/DescriptionListContext.d.ts +2 -2
- package/dist/src/DescriptionList/DescriptionListContext.js +3 -2
- package/dist/src/DescriptionList/stories/DescriptionList.column.story.d.ts +3 -4
- package/dist/src/DescriptionList/stories/DescriptionList.column.story.js +7 -26
- package/dist/src/DescriptionList/stories/DescriptionList.group-min-width.story.js +2 -8
- package/dist/src/DescriptionList/stories/DescriptionList.layout.story.d.ts +3 -4
- package/dist/src/DescriptionList/stories/DescriptionList.layout.story.js +4 -30
- package/dist/src/DescriptionList/stories/DescriptionList.playground.story.js +83 -148
- package/dist/src/DescriptionList/stories/DescriptionList.sizing.story.d.ts +3 -4
- package/dist/src/DescriptionList/stories/DescriptionList.sizing.story.js +5 -44
- package/dist/src/DescriptionList/stories/DescriptionList.spanning.story.d.ts +3 -4
- package/dist/src/DescriptionList/stories/DescriptionList.spanning.story.js +5 -59
- package/dist/src/DescriptionList/stories/fixtures.d.ts +3 -3
- package/dist/src/DescriptionList/stories/fixtures.js +2 -27
- package/dist/src/Divider/Divider.story.d.ts +4 -4
- package/dist/src/Divider/Divider.story.js +5 -17
- package/dist/src/DropdownMenu/DropdownMenu.js +10 -10
- package/dist/src/DropdownMenu/DropdownMenu.story.d.ts +12 -13
- package/dist/src/DropdownMenu/DropdownMenu.story.js +13 -45
- package/dist/src/DropdownMenu/DropdownMenuContainer.d.ts +1 -1
- package/dist/src/DropdownMenu/DropdownText.d.ts +2 -2
- package/dist/src/FieldLabel/FieldLabel.d.ts +1 -2
- package/dist/src/FieldLabel/FieldLabel.js +2 -10
- package/dist/src/FieldLabel/FieldLabel.story.d.ts +7 -8
- package/dist/src/FieldLabel/FieldLabel.story.js +12 -32
- package/dist/src/FieldLabel/HelpText.d.ts +1 -1
- package/dist/src/FieldLabel/MaybeFieldLabel.d.ts +1 -2
- package/dist/src/FieldLabel/MaybeFieldLabel.js +2 -2
- package/dist/src/FieldLabel/RequirementText.d.ts +1 -2
- package/dist/src/FieldLabel/RequirementText.js +2 -2
- package/dist/src/Flex/Flex.story.d.ts +18 -19
- package/dist/src/Flex/Flex.story.js +23 -122
- package/dist/src/Form/Form.d.ts +1 -1
- package/dist/src/Form/Form.js +2 -4
- package/dist/src/Form/Form.story.d.ts +6 -7
- package/dist/src/Form/Form.story.js +7 -59
- package/dist/src/Form/FormSection.d.ts +1 -1
- package/dist/src/Form/FormSection.js +2 -4
- package/dist/src/Icon/Icon.d.ts +6 -2
- package/dist/src/Icon/Icon.js +5 -5
- package/dist/src/Icon/Icon.story.d.ts +6 -7
- package/dist/src/Icon/Icon.story.js +8 -37
- package/dist/src/Icon/LoadingIcon.js +2 -11
- package/dist/src/Input/Input.js +3 -4
- package/dist/src/Input/Input.story.d.ts +11 -12
- package/dist/src/Input/Input.story.js +24 -55
- package/dist/src/Input/InputField.js +5 -13
- package/dist/src/Input/Prefix.d.ts +1 -2
- package/dist/src/Input/Prefix.js +2 -3
- package/dist/src/Input/Suffix.d.ts +1 -2
- package/dist/src/Input/Suffix.js +2 -3
- package/dist/src/Layout/ApplicationFrame.d.ts +2 -2
- package/dist/src/Layout/ApplicationFrame.js +2 -6
- package/dist/src/Layout/ApplicationFrame.story.d.ts +1 -2
- package/dist/src/Layout/ApplicationFrame.story.js +2 -2
- package/dist/src/Layout/Header.d.ts +2 -2
- package/dist/src/Layout/Header.js +2 -13
- package/dist/src/Layout/Header.story.d.ts +10 -11
- package/dist/src/Layout/Header.story.js +12 -52
- package/dist/src/Layout/Page.applicationFrame.story.d.ts +2 -3
- package/dist/src/Layout/Page.applicationFrame.story.js +7 -14
- package/dist/src/Layout/Page.d.ts +2 -2
- package/dist/src/Layout/Page.js +4 -6
- package/dist/src/Layout/Page.story.d.ts +1 -2
- package/dist/src/Layout/Page.story.js +15 -28
- package/dist/src/Layout/Sidebar.d.ts +1 -1
- package/dist/src/Layout/Sidebar.js +4 -16
- package/dist/src/Layout/Sidebar.story.d.ts +10 -11
- package/dist/src/Layout/Sidebar.story.js +17 -88
- package/dist/src/Link/Link.d.ts +1 -1
- package/dist/src/Link/Link.js +3 -6
- package/dist/src/Link/Link.story.d.ts +10 -11
- package/dist/src/Link/Link.story.js +11 -12
- package/dist/src/List/List.story.d.ts +5 -6
- package/dist/src/List/List.story.js +6 -21
- package/dist/src/LoadingAnimation/LoadingAnimation.d.ts +1 -1
- package/dist/src/LoadingAnimation/LoadingAnimation.js +2 -21
- package/dist/src/LoadingAnimation/LoadingAnimation.story.d.ts +4 -5
- package/dist/src/LoadingAnimation/LoadingAnimation.story.js +5 -22
- package/dist/src/MaybeTooltip/MaybeTooltip.d.ts +1 -2
- package/dist/src/MaybeTooltip/MaybeTooltip.js +3 -3
- package/dist/src/MaybeTooltip/MaybeTooltip.story.d.ts +1 -2
- package/dist/src/MaybeTooltip/MaybeTooltip.story.js +4 -5
- package/dist/src/MiniTooltip/index.d.ts +2 -2
- package/dist/src/MiniTooltip/index.js +3 -7
- package/dist/src/Modal/Modal.d.ts +5 -3
- package/dist/src/Modal/Modal.js +7 -12
- package/dist/src/Modal/Modal.story.d.ts +1 -23
- package/dist/src/Modal/Modal.story.js +10 -40
- package/dist/src/Modal/ModalCloseButton.d.ts +4 -2
- package/dist/src/Modal/ModalContent.d.ts +1 -1
- package/dist/src/NDSProvider/ComponentVariantContext.d.ts +1 -1
- package/dist/src/NDSProvider/ComponentVariantContext.js +3 -2
- package/dist/src/NDSProvider/FeatureFlagsContext.d.ts +1 -1
- package/dist/src/NDSProvider/FeatureFlagsContext.js +3 -2
- package/dist/src/NDSProvider/GlobalStylesComposer.d.ts +1 -1
- package/dist/src/NDSProvider/GlobalStylesComposer.js +3 -6
- package/dist/src/NDSProvider/LocaleContext.d.ts +1 -1
- package/dist/src/NDSProvider/LocaleContext.js +2 -1
- package/dist/src/NDSProvider/NDSProvider.d.ts +1 -1
- package/dist/src/NDSProvider/NDSProvider.js +3 -7
- package/dist/src/NDSProvider/renderWithNDSProvider.spec-utils.js +2 -2
- package/dist/src/NavBarSearch/NavBarSearch.d.ts +1 -1
- package/dist/src/NavBarSearch/NavBarSearch.js +2 -5
- package/dist/src/Navigation/Navigation.d.ts +1 -1
- package/dist/src/Navigation/Navigation.js +2 -2
- package/dist/src/Navigation/components/AppSwitcher/NulogyAppSwitcher.d.ts +1 -1
- package/dist/src/Navigation/components/AppSwitcher/NulogyAppSwitcher.js +3 -12
- package/dist/src/Navigation/components/AppSwitcher/parts/Item.d.ts +3 -1
- package/dist/src/Navigation/components/AppSwitcher/parts/Item.js +2 -1
- package/dist/src/Navigation/components/AppSwitcher/parts/Link.js +2 -2
- package/dist/src/Navigation/components/AppSwitcher/parts/index.d.ts +15 -7
- package/dist/src/Navigation/components/DesktopNav/DesktopNav.d.ts +1 -2
- package/dist/src/Navigation/components/DesktopNav/DesktopNav.js +3 -30
- package/dist/src/Navigation/components/DesktopNav/parts/MoreMenuItem.d.ts +6 -2
- package/dist/src/Navigation/components/DesktopNav/parts/MoreMenuItem.js +2 -2
- package/dist/src/Navigation/components/EnvironmentBanner/EnvironmentBanner.d.ts +1 -1
- package/dist/src/Navigation/components/EnvironmentBanner/EnvironmentBanner.js +2 -3
- package/dist/src/Navigation/components/MenuSubItem/MenuSubItem.d.ts +1 -2
- package/dist/src/Navigation/components/MenuSubItem/MenuSubItem.js +5 -13
- package/dist/src/Navigation/components/MenuSubItem/parts/styled.d.ts +17 -5
- package/dist/src/Navigation/components/MobileNav/MobileNav.d.ts +1 -2
- package/dist/src/Navigation/components/MobileNav/MobileNav.js +2 -29
- package/dist/src/Navigation/components/MobileNav/parts/MobileMenuItem.js +11 -27
- package/dist/src/Navigation/components/MobileNav/parts/styled.d.ts +10 -4
- package/dist/src/Navigation/components/NulogyLogo/NulogyLogo.d.ts +1 -2
- package/dist/src/Navigation/components/NulogyLogo/NulogyLogo.js +8 -10
- package/dist/src/Navigation/components/NulogyLogo/SvgNulogyLogo.d.ts +2 -2
- package/dist/src/Navigation/components/NulogyLogo/SvgNulogyLogo.js +2 -9
- package/dist/src/Navigation/components/UserMenu/UserMenu.d.ts +6 -2
- package/dist/src/Navigation/components/UserMenu/parts/Header.d.ts +1 -2
- package/dist/src/Navigation/components/UserMenu/parts/Header.js +2 -6
- package/dist/src/Navigation/components/UserMenu/parts/Item.js +5 -7
- package/dist/src/Navigation/components/UserMenu/parts/MobileItem.js +6 -10
- package/dist/src/Navigation/components/UserMenu/parts/styled.d.ts +6 -2
- package/dist/src/Navigation/components/shared/NavigationLogo.d.ts +1 -1
- package/dist/src/Navigation/components/shared/NavigationLogo.js +2 -2
- package/dist/src/Navigation/components/shared/NavigationLogoLink.d.ts +1 -2
- package/dist/src/Navigation/components/shared/NavigationLogoLink.js +2 -2
- package/dist/src/Navigation/components/shared/NavigationMenuContent.d.ts +5 -1
- package/dist/src/Navigation/components/shared/NavigationMenuItem.d.ts +3 -1
- package/dist/src/Navigation/components/shared/NavigationMenuItem.js +9 -18
- package/dist/src/Navigation/components/shared/components.d.ts +35 -9
- package/dist/src/Navigation/stories/Navigation.appSwitcher.story.d.ts +4 -5
- package/dist/src/Navigation/stories/Navigation.appSwitcher.story.js +10 -30
- package/dist/src/Navigation/stories/Navigation.logos.story.d.ts +9 -10
- package/dist/src/Navigation/stories/Navigation.logos.story.js +11 -70
- package/dist/src/Navigation/stories/Navigation.mobileVisibility.story.d.ts +5 -6
- package/dist/src/Navigation/stories/Navigation.mobileVisibility.story.js +12 -38
- package/dist/src/Navigation/stories/Navigation.navigationMenus.story.d.ts +5 -6
- package/dist/src/Navigation/stories/Navigation.navigationMenus.story.js +17 -70
- package/dist/src/Navigation/stories/Navigation.navigationMenus.subMenus.story.d.ts +3 -4
- package/dist/src/Navigation/stories/Navigation.navigationMenus.subMenus.story.js +4 -4
- package/dist/src/Navigation/stories/Navigation.story.d.ts +3 -4
- package/dist/src/Navigation/stories/Navigation.story.js +16 -36
- package/dist/src/Navigation/stories/Navigation.userMenu.story.d.ts +5 -6
- package/dist/src/Navigation/stories/Navigation.userMenu.story.js +40 -71
- package/dist/src/Navigation/stories/fixtures/logos/CustomLogo2.d.ts +2 -2
- package/dist/src/Navigation/stories/fixtures/logos/CustomLogo2.js +2 -13
- package/dist/src/Navigation/stories/fixtures/logos/CustomLogo3.d.ts +2 -2
- package/dist/src/Navigation/stories/fixtures/logos/CustomLogo3.js +2 -29
- package/dist/src/Navigation/stories/fixtures/logos/Customlogo1.d.ts +2 -2
- package/dist/src/Navigation/stories/fixtures/logos/Customlogo1.js +2 -3
- package/dist/src/Overlay/Overlay.story.d.ts +2 -3
- package/dist/src/Overlay/Overlay.story.js +3 -9
- package/dist/src/Pagination/NextButton.d.ts +1 -1
- package/dist/src/Pagination/NextButton.js +2 -4
- package/dist/src/Pagination/Pagination.d.ts +2 -2
- package/dist/src/Pagination/Pagination.js +23 -26
- package/dist/src/Pagination/Pagination.story.d.ts +6 -7
- package/dist/src/Pagination/Pagination.story.js +12 -44
- package/dist/src/Pagination/PaginationCount.d.ts +1 -2
- package/dist/src/Pagination/PaginationCount.js +2 -2
- package/dist/src/Pagination/PreviousButton.d.ts +1 -1
- package/dist/src/Pagination/PreviousButton.js +2 -4
- package/dist/src/Popper/Popper.js +25 -26
- package/dist/src/Radio/Radio.js +3 -9
- package/dist/src/Radio/Radio.story.d.ts +12 -14
- package/dist/src/Radio/Radio.story.js +8 -16
- package/dist/src/Radio/RadioGroup.d.ts +1 -1
- package/dist/src/Radio/RadioGroup.js +3 -8
- package/dist/src/Radio/RadioGroup.story.d.ts +6 -7
- package/dist/src/Radio/RadioGroup.story.js +7 -28
- package/dist/src/RangeContainer/RangeContainer.d.ts +1 -1
- package/dist/src/RangeContainer/RangeContainer.js +2 -9
- package/dist/src/RangeContainer/RangeContainer.story.d.ts +1 -2
- package/dist/src/RangeContainer/RangeContainer.story.js +2 -2
- package/dist/src/Select/MenuList.d.ts +1 -2
- package/dist/src/Select/MenuList.js +10 -10
- package/dist/src/Select/Select.js +18 -20
- package/dist/src/Select/Select.story.d.ts +24 -24
- package/dist/src/Select/Select.story.fixture.d.ts +2 -3
- package/dist/src/Select/Select.story.fixture.js +4 -8
- package/dist/src/Select/Select.story.js +29 -52
- package/dist/src/Select/SelectComponents.d.ts +7 -8
- package/dist/src/Select/SelectComponents.js +8 -15
- package/dist/src/Select/SelectOption.d.ts +1 -1
- package/dist/src/Select/SelectOption.js +2 -3
- package/dist/src/SortingTable/SortingTable.d.ts +1 -2
- package/dist/src/SortingTable/SortingTable.js +4 -3
- package/dist/src/SortingTable/SortingTable.story.d.ts +1 -2
- package/dist/src/SortingTable/SortingTable.story.js +2 -2
- package/dist/src/StatusIndicator/StatusIndicator.story.d.ts +10 -11
- package/dist/src/StatusIndicator/StatusIndicator.story.js +11 -51
- package/dist/src/Summary/Summary.d.ts +1 -2
- package/dist/src/Summary/Summary.js +4 -5
- package/dist/src/Summary/Summary.story.d.ts +2 -3
- package/dist/src/Summary/Summary.story.js +3 -11
- package/dist/src/Summary/SummaryContext.d.ts +3 -1
- package/dist/src/Summary/SummaryContext.js +6 -5
- package/dist/src/Summary/SummaryDivider.d.ts +1 -2
- package/dist/src/Summary/SummaryDivider.js +2 -2
- package/dist/src/Summary/SummaryItem.d.ts +1 -1
- package/dist/src/Summary/SummaryItem.js +4 -6
- package/dist/src/Switcher/Switch.js +2 -1
- package/dist/src/Switcher/Switcher.d.ts +2 -2
- package/dist/src/Switcher/Switcher.js +4 -4
- package/dist/src/Switcher/Switcher.story.d.ts +3 -4
- package/dist/src/Switcher/Switcher.story.js +5 -17
- package/dist/src/Table/BaseTable.d.ts +2 -2
- package/dist/src/Table/BaseTable.js +2 -5
- package/dist/src/Table/SortingColumnHeader.d.ts +1 -1
- package/dist/src/Table/SortingColumnHeader.js +2 -4
- package/dist/src/Table/StatefulTable.d.ts +1 -1
- package/dist/src/Table/StatefulTable.js +3 -4
- package/dist/src/Table/Table.d.ts +1 -2
- package/dist/src/Table/Table.js +2 -2
- package/dist/src/Table/TableBody.d.ts +2 -2
- package/dist/src/Table/TableBody.js +8 -13
- package/dist/src/Table/TableCell.d.ts +1 -1
- package/dist/src/Table/TableCell.js +3 -3
- package/dist/src/Table/TableFoot.d.ts +1 -2
- package/dist/src/Table/TableFoot.js +8 -8
- package/dist/src/Table/TableHead.d.ts +1 -2
- package/dist/src/Table/TableHead.js +3 -4
- package/dist/src/Table/addExpandableControl.js +3 -3
- package/dist/src/Table/addSelectableControl.js +4 -4
- package/dist/src/Table/stories/BaseTable.story.d.ts +7 -8
- package/dist/src/Table/stories/BaseTable.story.js +15 -24
- package/dist/src/Table/stories/CustomContent.story.d.ts +2 -3
- package/dist/src/Table/stories/CustomContent.story.js +89 -116
- package/dist/src/Table/stories/Density.story.d.ts +2 -3
- package/dist/src/Table/stories/Density.story.js +3 -3
- package/dist/src/Table/stories/Table.story.js +6 -13
- package/dist/src/Table/stories/TableWithCustomSorting.story.d.ts +1 -2
- package/dist/src/Table/stories/TableWithCustomSorting.story.js +5 -4
- package/dist/src/Table/stories/TableWithExpandableRows.story.d.ts +2 -3
- package/dist/src/Table/stories/TableWithExpandableRows.story.js +4 -5
- package/dist/src/Table/stories/TableWithFiltering.story.d.ts +2 -3
- package/dist/src/Table/stories/TableWithFiltering.story.js +7 -6
- package/dist/src/Table/stories/TableWithSelectableRows.story.d.ts +2 -3
- package/dist/src/Table/stories/TableWithSelectableRows.story.js +3 -3
- package/dist/src/Table/stories/TableWithServerSidePagination.story.d.ts +1 -2
- package/dist/src/Table/stories/TableWithServerSidePagination.story.js +3 -4
- package/dist/src/Tabs/Tab.js +2 -1
- package/dist/src/Tabs/TabScrollIndicator.d.ts +1 -1
- package/dist/src/Tabs/TabScrollIndicator.js +4 -5
- package/dist/src/Tabs/TabScrollIndicators.d.ts +1 -1
- package/dist/src/Tabs/TabScrollIndicators.js +5 -8
- package/dist/src/Tabs/Tabs.d.ts +2 -2
- package/dist/src/Tabs/Tabs.js +3 -6
- package/dist/src/Tabs/Tabs.story.d.ts +9 -10
- package/dist/src/Tabs/Tabs.story.js +11 -60
- package/dist/src/Textarea/Textarea.js +3 -5
- package/dist/src/Textarea/Textarea.story.d.ts +9 -10
- package/dist/src/Textarea/Textarea.story.js +11 -12
- package/dist/src/TimePicker/TimePicker.d.ts +1 -1
- package/dist/src/TimePicker/TimePicker.js +10 -14
- package/dist/src/TimePicker/TimePicker.story.d.ts +10 -11
- package/dist/src/TimePicker/TimePicker.story.js +13 -14
- package/dist/src/TimePicker/TimePickerInput.d.ts +3 -1
- package/dist/src/TimeRange/TimeRange.d.ts +3 -2
- package/dist/src/TimeRange/TimeRange.js +5 -4
- package/dist/src/TimeRange/TimeRange.story.d.ts +5 -6
- package/dist/src/TimeRange/TimeRange.story.js +7 -9
- package/dist/src/Toast/Toast.d.ts +1 -2
- package/dist/src/Toast/Toast.js +3 -3
- package/dist/src/Toast/Toast.story.d.ts +7 -8
- package/dist/src/Toast/Toast.story.js +18 -39
- package/dist/src/ToastContainer/ToastContainer.d.ts +1 -2
- package/dist/src/ToastContainer/ToastContainer.js +3 -2
- package/dist/src/ToastContainer/ToastContainer.story.d.ts +1 -2
- package/dist/src/ToastContainer/ToastContainer.story.js +26 -51
- package/dist/src/ToastContainer/ToastFunction.js +8 -9
- package/dist/src/Toggle/Toggle.js +2 -5
- package/dist/src/Toggle/Toggle.story.d.ts +8 -9
- package/dist/src/Toggle/Toggle.story.js +10 -14
- package/dist/src/Toggle/ToggleButton.js +7 -8
- package/dist/src/Tokens/Tokens.story.d.ts +9 -10
- package/dist/src/Tokens/Tokens.story.js +13 -46
- package/dist/src/Tooltip/Tooltip.d.ts +1 -1
- package/dist/src/Tooltip/Tooltip.js +2 -6
- package/dist/src/Tooltip/Tooltip.story.js +14 -89
- package/dist/src/Tooltip/components/TooltipComponents.d.ts +1 -1
- package/dist/src/Tooltip/components/TooltipComponents.js +5 -7
- package/dist/src/TopBar/TopBar.d.ts +1 -1
- package/dist/src/TopBar/TopBar.js +2 -4
- package/dist/src/TopBar/TopBar.styled.d.ts +16 -15
- package/dist/src/TopBar/components/BackLink.d.ts +3 -1
- package/dist/src/TopBar/components/BackLink.js +2 -5
- package/dist/src/TopBar/components/Menu.d.ts +1 -1
- package/dist/src/TopBar/components/Menu.js +6 -10
- package/dist/src/TopBar/components/MenuItem.d.ts +1 -1
- package/dist/src/TopBar/components/MenuItem.js +2 -2
- package/dist/src/TopBar/components/MenuItemLink.d.ts +3 -1
- package/dist/src/TopBar/components/MenuItemLink.js +2 -6
- package/dist/src/TopBar/components/PageTitle.d.ts +2 -2
- package/dist/src/TopBar/components/PageTitle.js +2 -2
- package/dist/src/TopBar/stories/TopBar.backButton.story.d.ts +3 -4
- package/dist/src/TopBar/stories/TopBar.backButton.story.js +9 -21
- package/dist/src/TopBar/stories/TopBar.menu.story.d.ts +5 -6
- package/dist/src/TopBar/stories/TopBar.menu.story.js +6 -27
- package/dist/src/TopBar/stories/TopBar.story.d.ts +3 -4
- package/dist/src/TopBar/stories/TopBar.story.js +4 -38
- package/dist/src/TruncatedText/TruncatedText.d.ts +1 -2
- package/dist/src/TruncatedText/TruncatedText.js +3 -3
- package/dist/src/TruncatedText/TruncatedText.story.d.ts +9 -10
- package/dist/src/TruncatedText/TruncatedText.story.js +10 -17
- package/dist/src/TruncatedText/components/TruncatedTextFillWidth.d.ts +1 -2
- package/dist/src/TruncatedText/components/TruncatedTextFillWidth.js +3 -3
- package/dist/src/TruncatedText/components/TruncatedTextMaxCharacters.d.ts +1 -2
- package/dist/src/TruncatedText/components/TruncatedTextMaxCharacters.js +2 -3
- package/dist/src/Type/Headings.d.ts +8 -8
- package/dist/src/Type/Headings.story.d.ts +3 -4
- package/dist/src/Type/Headings.story.js +4 -12
- package/dist/src/Type/Text.story.d.ts +6 -7
- package/dist/src/Type/Text.story.js +7 -24
- package/dist/src/Type/Typography.story.d.ts +2 -3
- package/dist/src/Type/Typography.story.js +3 -204
- package/dist/src/Validation/InlineValidation.d.ts +1 -1
- package/dist/src/Validation/InlineValidation.js +2 -7
- package/dist/src/Validation/InlineValidation.story.d.ts +4 -5
- package/dist/src/Validation/InlineValidation.story.js +5 -10
- package/dist/src/Validation/mapErrorsToList.d.ts +1 -2
- package/dist/src/Validation/mapErrorsToList.js +2 -2
- package/dist/src/VerticalDivider/VerticalDivider.story.d.ts +2 -2
- package/dist/src/VerticalDivider/VerticalDivider.story.js +3 -9
- package/dist/src/VisualTests/Select.story.d.ts +6 -7
- package/dist/src/VisualTests/Select.story.js +7 -15
- package/dist/src/VisualTests/WithSpace.story.d.ts +18 -19
- package/dist/src/VisualTests/WithSpace.story.js +19 -39
- package/dist/src/i18n.js +4 -0
- package/dist/src/locale.story.d.ts +1 -2
- package/dist/src/locale.story.js +8 -7
- package/dist/src/locales.const.d.ts +5 -0
- package/dist/src/locales.const.js +7 -1
- package/dist/src/pages/ErrorPage.story.d.ts +4 -5
- package/dist/src/pages/ErrorPage.story.js +5 -31
- package/dist/src/pages/LoginPage.story.d.ts +5 -6
- package/dist/src/pages/LoginPage.story.js +6 -55
- package/dist/src/theme/NDSThemeProvider.d.ts +1 -2
- package/dist/src/theme/NDSThemeProvider.js +2 -3
- package/dist/src/utils/DetectOutsideClick.d.ts +1 -1
- package/dist/src/utils/DetectOutsideClick.js +2 -1
- package/dist/src/utils/ScrollIndicators.d.ts +1 -1
- package/dist/src/utils/ScrollIndicators.js +7 -13
- package/dist/src/utils/story/dashed.d.ts +1 -3
- package/dist/src/utils/story/placeholder.d.ts +1 -2
- package/dist/src/utils/story/placeholder.js +2 -7
- package/dist/src/utils/story/resizable.d.ts +5 -3
- package/dist/src/utils/story/resizable.js +5 -8
- package/dist/src/utils/ts/FocusManager.d.ts +1 -1
- package/dist/src/utils/ts/FocusManager.js +9 -8
- package/dist/src/utils/useWindowDimension.story.d.ts +1 -2
- package/dist/src/utils/useWindowDimension.story.js +2 -14
- package/dist/src/utils/withMenuState.js +2 -1
- package/dist/vite.config.js +2 -0
- package/package.json +32 -35
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { Box } from "../../Box";
|
|
3
4
|
import { Button, QuietButton, PrimaryButton } from "../../Button";
|
|
@@ -7,7 +8,7 @@ import { Placeholder } from "../../utils/story/placeholder";
|
|
|
7
8
|
import { BottomSheetParts as BottomSheet } from "../BottomSheet.parts";
|
|
8
9
|
export default {
|
|
9
10
|
title: "Components/BottomSheet/Parts",
|
|
10
|
-
decorators: [(storyFn) =>
|
|
11
|
+
decorators: [(storyFn) => _jsx("div", { style: { width: "800px", height: "800px" }, children: storyFn() })],
|
|
11
12
|
parameters: {
|
|
12
13
|
chromatic: { delay: 3000 },
|
|
13
14
|
},
|
|
@@ -20,26 +21,5 @@ export const RenderedUsingCompositionalAPI = () => {
|
|
|
20
21
|
function close() {
|
|
21
22
|
setIsOpen(false);
|
|
22
23
|
}
|
|
23
|
-
return (
|
|
24
|
-
React.createElement(Button, { onClick: open }, "Open Sheet"),
|
|
25
|
-
React.createElement(BottomSheet.Root, { isOpen: isOpen, onClose: close },
|
|
26
|
-
React.createElement(BottomSheet.Overlay, { closeOnClick: true },
|
|
27
|
-
React.createElement(BottomSheet.Sheet, { "aria-label": "Example Sheet" },
|
|
28
|
-
React.createElement(BottomSheet.ContentContainer, null,
|
|
29
|
-
React.createElement(Box, { width: { small: "100%", medium: 704 }, margin: "0 auto" },
|
|
30
|
-
React.createElement(BottomSheet.Header, null,
|
|
31
|
-
React.createElement(BottomSheet.Title, null, "Title"),
|
|
32
|
-
React.createElement(BottomSheet.HelpText, null,
|
|
33
|
-
React.createElement(React.Fragment, null,
|
|
34
|
-
"Help text can further explain the purpose and content of the BottomSheet",
|
|
35
|
-
" ",
|
|
36
|
-
React.createElement(Link, { href: "#story" }, "Learn more")))),
|
|
37
|
-
React.createElement(Box, { px: "x3", py: "x4" },
|
|
38
|
-
React.createElement(Placeholder, null))),
|
|
39
|
-
React.createElement(BottomSheet.Footer, null,
|
|
40
|
-
React.createElement(Flex, { justifyContent: "space-between" },
|
|
41
|
-
React.createElement(Button, { onClick: close }, "Close"),
|
|
42
|
-
React.createElement(Flex, { gap: "x2" },
|
|
43
|
-
React.createElement(QuietButton, null, "Secondary action"),
|
|
44
|
-
React.createElement(PrimaryButton, { onClick: close }, "Primary action"))))))))));
|
|
24
|
+
return (_jsxs(Box, { children: [_jsx(Button, { onClick: open, children: "Open Sheet" }), _jsx(BottomSheet.Root, { isOpen: isOpen, onClose: close, children: _jsx(BottomSheet.Overlay, { closeOnClick: true, children: _jsx(BottomSheet.Sheet, { "aria-label": "Example Sheet", children: _jsxs(BottomSheet.ContentContainer, { children: [_jsxs(Box, { width: { small: "100%", medium: 704 }, margin: "0 auto", children: [_jsxs(BottomSheet.Header, { children: [_jsx(BottomSheet.Title, { children: "Title" }), _jsx(BottomSheet.HelpText, { children: _jsxs(_Fragment, { children: ["Help text can further explain the purpose and content of the BottomSheet", " ", _jsx(Link, { href: "#story", children: "Learn more" })] }) })] }), _jsx(Box, { px: "x3", py: "x4", children: _jsx(Placeholder, {}) })] }), _jsx(BottomSheet.Footer, { children: _jsxs(Flex, { justifyContent: "space-between", children: [_jsx(Button, { onClick: close, children: "Close" }), _jsxs(Flex, { gap: "x2", children: [_jsx(QuietButton, { children: "Secondary action" }), _jsx(PrimaryButton, { onClick: close, children: "Primary action" })] })] }) })] }) }) }) })] }));
|
|
45
25
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
declare const _default: {
|
|
3
2
|
title: string;
|
|
4
|
-
decorators: ((storyFn: any) =>
|
|
3
|
+
decorators: ((storyFn: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
5
4
|
parameters: {
|
|
6
5
|
chromatic: {
|
|
7
6
|
delay: number;
|
|
@@ -9,4 +8,4 @@ declare const _default: {
|
|
|
9
8
|
};
|
|
10
9
|
};
|
|
11
10
|
export default _default;
|
|
12
|
-
export declare const BasicUsage: () =>
|
|
11
|
+
export declare const BasicUsage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { Button } from "../../Button";
|
|
3
4
|
import { Placeholder } from "../../utils/story/placeholder";
|
|
4
5
|
import BottomSheet from "../BottomSheet";
|
|
5
6
|
export default {
|
|
6
7
|
title: "Components/BottomSheet",
|
|
7
|
-
decorators: [(storyFn) =>
|
|
8
|
+
decorators: [(storyFn) => _jsx("div", { style: { width: "800px", height: "800px" }, children: storyFn() })],
|
|
8
9
|
parameters: {
|
|
9
10
|
chromatic: { delay: 3000 },
|
|
10
11
|
},
|
|
11
12
|
};
|
|
12
13
|
export const BasicUsage = () => {
|
|
13
14
|
const [isOpen, setIsOpen] = React.useState(true);
|
|
14
|
-
return (
|
|
15
|
-
React.createElement(Button, { onClick: () => setIsOpen(true) }, "Open Sheet"),
|
|
16
|
-
React.createElement(BottomSheet, { title: "Edit Profile", isOpen: isOpen, onClose: () => setIsOpen(false) },
|
|
17
|
-
React.createElement(Placeholder, null))));
|
|
15
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => setIsOpen(true), children: "Open Sheet" }), _jsx(BottomSheet, { title: "Edit Profile", isOpen: isOpen, onClose: () => setIsOpen(false), children: _jsx(Placeholder, {}) })] }));
|
|
18
16
|
};
|
package/dist/src/Box/Box.d.ts
CHANGED
|
@@ -7,15 +7,15 @@ export interface BoxProps extends StyledProps, ComponentPropsWithRef<"div"> {
|
|
|
7
7
|
declare const Box: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, BoxProps>> & string;
|
|
8
8
|
export interface AnimatedBoxProps extends MotionProps, Omit<BoxProps, "onAnimationStart" | "onDrag" | "onDragStart" | "onDragEnd" | "style" | "transition"> {
|
|
9
9
|
}
|
|
10
|
-
export declare const AnimatedBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<{
|
|
11
|
-
children?: import("react").ReactNode
|
|
12
|
-
slot?: string;
|
|
13
|
-
title?: string;
|
|
10
|
+
export declare const AnimatedBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
|
|
11
|
+
children?: import("react").ReactNode;
|
|
14
12
|
property?: string;
|
|
15
13
|
color?: string;
|
|
16
14
|
content?: string;
|
|
17
15
|
translate?: "yes" | "no";
|
|
18
16
|
hidden?: boolean;
|
|
17
|
+
slot?: string;
|
|
18
|
+
title?: string;
|
|
19
19
|
defaultChecked?: boolean;
|
|
20
20
|
defaultValue?: string | number | readonly string[];
|
|
21
21
|
suppressContentEditableWarning?: boolean;
|
|
@@ -24,7 +24,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
24
24
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters";
|
|
25
25
|
autoFocus?: boolean;
|
|
26
26
|
className?: string;
|
|
27
|
-
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
27
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only";
|
|
28
28
|
contextMenu?: string;
|
|
29
29
|
dir?: string;
|
|
30
30
|
draggable?: boolean | "true" | "false";
|
|
@@ -32,7 +32,6 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
32
32
|
id?: string;
|
|
33
33
|
lang?: string;
|
|
34
34
|
nonce?: string;
|
|
35
|
-
placeholder?: string;
|
|
36
35
|
spellCheck?: boolean | "true" | "false";
|
|
37
36
|
tabIndex?: number;
|
|
38
37
|
radioGroup?: string;
|
|
@@ -56,7 +55,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
56
55
|
results?: number;
|
|
57
56
|
security?: string;
|
|
58
57
|
unselectable?: "off" | "on";
|
|
59
|
-
inputMode?: "search" | "
|
|
58
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
60
59
|
is?: string;
|
|
61
60
|
exportparts?: string;
|
|
62
61
|
part?: string;
|
|
@@ -72,7 +71,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
72
71
|
"aria-colindextext"?: string;
|
|
73
72
|
"aria-colspan"?: number;
|
|
74
73
|
"aria-controls"?: string;
|
|
75
|
-
"aria-current"?: boolean | "
|
|
74
|
+
"aria-current"?: boolean | "page" | "time" | "true" | "false" | "step" | "location" | "date";
|
|
76
75
|
"aria-describedby"?: string;
|
|
77
76
|
"aria-description"?: string;
|
|
78
77
|
"aria-details"?: string;
|
|
@@ -82,7 +81,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
82
81
|
"aria-expanded"?: boolean | "true" | "false";
|
|
83
82
|
"aria-flowto"?: string;
|
|
84
83
|
"aria-grabbed"?: boolean | "true" | "false";
|
|
85
|
-
"aria-haspopup"?: boolean | "
|
|
84
|
+
"aria-haspopup"?: boolean | "grid" | "dialog" | "menu" | "true" | "false" | "listbox" | "tree";
|
|
86
85
|
"aria-hidden"?: boolean | "true" | "false";
|
|
87
86
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
88
87
|
"aria-keyshortcuts"?: string;
|
|
@@ -99,7 +98,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
99
98
|
"aria-posinset"?: number;
|
|
100
99
|
"aria-pressed"?: boolean | "true" | "false" | "mixed";
|
|
101
100
|
"aria-readonly"?: boolean | "true" | "false";
|
|
102
|
-
"aria-relevant"?: "
|
|
101
|
+
"aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
|
|
103
102
|
"aria-required"?: boolean | "true" | "false";
|
|
104
103
|
"aria-roledescription"?: string;
|
|
105
104
|
"aria-rowcount"?: number;
|
|
@@ -250,9 +249,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
250
249
|
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
251
250
|
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
252
251
|
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
253
|
-
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
254
252
|
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
255
|
-
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
256
253
|
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
257
254
|
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
258
255
|
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
@@ -272,5 +269,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
272
269
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement>;
|
|
273
270
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement>;
|
|
274
271
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement>;
|
|
275
|
-
} & MotionProps & import("react").RefAttributes<HTMLDivElement>,
|
|
272
|
+
} & MotionProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
273
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
274
|
+
}, AnimatedBoxProps>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
|
|
276
275
|
export default Box;
|
|
@@ -1,71 +1,70 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
declare const _default: {
|
|
3
2
|
title: string;
|
|
4
3
|
};
|
|
5
4
|
export default _default;
|
|
6
|
-
export declare const _Box: () =>
|
|
5
|
+
export declare const _Box: () => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export declare const WithATextColour: {
|
|
8
|
-
():
|
|
7
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
story: {
|
|
10
9
|
name: string;
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
export declare const WithABackgroundColour: {
|
|
14
|
-
():
|
|
13
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
story: {
|
|
16
15
|
name: string;
|
|
17
16
|
};
|
|
18
17
|
};
|
|
19
18
|
export declare const WithASetWidth: {
|
|
20
|
-
():
|
|
19
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
story: {
|
|
22
21
|
name: string;
|
|
23
22
|
};
|
|
24
23
|
};
|
|
25
24
|
export declare const WithAResponsiveWidth: {
|
|
26
|
-
():
|
|
25
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
27
26
|
story: {
|
|
28
27
|
name: string;
|
|
29
28
|
};
|
|
30
29
|
};
|
|
31
30
|
export declare const WithPadding: {
|
|
32
|
-
():
|
|
31
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
33
32
|
story: {
|
|
34
33
|
name: string;
|
|
35
34
|
};
|
|
36
35
|
};
|
|
37
36
|
export declare const WithMargin: {
|
|
38
|
-
():
|
|
37
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
39
38
|
story: {
|
|
40
39
|
name: string;
|
|
41
40
|
};
|
|
42
41
|
};
|
|
43
42
|
export declare const WithAShadow: {
|
|
44
|
-
():
|
|
43
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
45
44
|
story: {
|
|
46
45
|
name: string;
|
|
47
46
|
};
|
|
48
47
|
};
|
|
49
48
|
export declare const WithABackgroundImage: {
|
|
50
|
-
():
|
|
49
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
51
50
|
story: {
|
|
52
51
|
name: string;
|
|
53
52
|
};
|
|
54
53
|
};
|
|
55
54
|
export declare const WithHoverTransition: {
|
|
56
|
-
():
|
|
55
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
57
56
|
story: {
|
|
58
57
|
name: string;
|
|
59
58
|
};
|
|
60
59
|
};
|
|
61
60
|
export declare const WithTransform: {
|
|
62
|
-
():
|
|
61
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
63
62
|
story: {
|
|
64
63
|
name: string;
|
|
65
64
|
};
|
|
66
65
|
};
|
|
67
66
|
export declare const WithAnimation: {
|
|
68
|
-
():
|
|
67
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
69
68
|
story: {
|
|
70
69
|
name: string;
|
|
71
70
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
2
3
|
import { styled } from "styled-components";
|
|
3
4
|
import { Button } from "../Button";
|
|
4
5
|
import { Box, Flex } from "../index";
|
|
@@ -6,53 +7,36 @@ import { AnimatedBox } from "./Box";
|
|
|
6
7
|
export default {
|
|
7
8
|
title: "Components/Box",
|
|
8
9
|
};
|
|
9
|
-
export const _Box = () =>
|
|
10
|
-
export const WithATextColour = () => (
|
|
10
|
+
export const _Box = () => _jsx(Box, { p: "x3", children: "Hello World" });
|
|
11
|
+
export const WithATextColour = () => (_jsx(Flex, { p: "x3", color: "blue", children: "Hello World" }));
|
|
11
12
|
WithATextColour.story = {
|
|
12
13
|
name: "With a text colour",
|
|
13
14
|
};
|
|
14
|
-
export const WithABackgroundColour = () => (
|
|
15
|
+
export const WithABackgroundColour = () => (_jsx(Box, { p: "x3", color: "white", bg: "blue", children: "Hello World" }));
|
|
15
16
|
WithABackgroundColour.story = {
|
|
16
17
|
name: "With a background colour",
|
|
17
18
|
};
|
|
18
|
-
export const WithASetWidth = () => (
|
|
19
|
+
export const WithASetWidth = () => (_jsx(Box, { p: "x3", width: 1 / 2, bg: "whiteGrey", children: "Half Width" }));
|
|
19
20
|
WithASetWidth.story = {
|
|
20
21
|
name: "With a set width",
|
|
21
22
|
};
|
|
22
|
-
export const WithAResponsiveWidth = () => (
|
|
23
|
+
export const WithAResponsiveWidth = () => (_jsx(Box, { p: "x3", width: { extraSmall: 1, small: 1 / 2, medium: 1 / 4 }, bg: "whiteGrey", children: "Full width on extra small screens, 1/2 width on small and 1/4 width on medium" }));
|
|
23
24
|
WithAResponsiveWidth.story = {
|
|
24
25
|
name: "With a responsive width",
|
|
25
26
|
};
|
|
26
|
-
export const WithPadding = () => (
|
|
27
|
-
React.createElement(Box, { m: "x1", p: "x3", bg: "whiteGrey" }, "Padding"),
|
|
28
|
-
React.createElement(Box, { m: "x1", p: "x3", bg: "whiteGrey" }, "Padding top"),
|
|
29
|
-
React.createElement(Box, { m: "x1", pr: "x3", bg: "whiteGrey" }, "Padding right"),
|
|
30
|
-
React.createElement(Box, { m: "x1", pb: "x3", bg: "whiteGrey" }, "Padding bottom"),
|
|
31
|
-
React.createElement(Box, { m: "x1", pl: "x3", bg: "whiteGrey" }, "Padding left"),
|
|
32
|
-
React.createElement(Box, { m: "x1", px: "x3", bg: "whiteGrey" }, "Padding x"),
|
|
33
|
-
React.createElement(Box, { m: "x1", py: "x3", bg: "whiteGrey" }, "Padding y")));
|
|
27
|
+
export const WithPadding = () => (_jsxs(Box, { p: "x2", children: [_jsx(Box, { m: "x1", p: "x3", bg: "whiteGrey", children: "Padding" }), _jsx(Box, { m: "x1", p: "x3", bg: "whiteGrey", children: "Padding top" }), _jsx(Box, { m: "x1", pr: "x3", bg: "whiteGrey", children: "Padding right" }), _jsx(Box, { m: "x1", pb: "x3", bg: "whiteGrey", children: "Padding bottom" }), _jsx(Box, { m: "x1", pl: "x3", bg: "whiteGrey", children: "Padding left" }), _jsx(Box, { m: "x1", px: "x3", bg: "whiteGrey", children: "Padding x" }), _jsx(Box, { m: "x1", py: "x3", bg: "whiteGrey", children: "Padding y" })] }));
|
|
34
28
|
WithPadding.story = {
|
|
35
29
|
name: "With padding",
|
|
36
30
|
};
|
|
37
|
-
export const WithMargin = () => (
|
|
38
|
-
React.createElement(Box, { m: "x3", bg: "whiteGrey" }, "Margin"),
|
|
39
|
-
React.createElement(Box, { mt: "x3", bg: "whiteGrey" }, "Margin top"),
|
|
40
|
-
React.createElement(Box, { mr: "x3", bg: "whiteGrey" }, "Margin right"),
|
|
41
|
-
React.createElement(Box, { mb: "x3", bg: "whiteGrey" }, "Margin bottom"),
|
|
42
|
-
React.createElement(Box, { ml: "x3", bg: "whiteGrey" }, "Margin left"),
|
|
43
|
-
React.createElement(Box, { mx: "x3", bg: "whiteGrey" }, "Margin x"),
|
|
44
|
-
React.createElement(Box, { my: "x3", bg: "whiteGrey" }, "Margin y")));
|
|
31
|
+
export const WithMargin = () => (_jsxs(Box, { p: "x3", children: [_jsx(Box, { m: "x3", bg: "whiteGrey", children: "Margin" }), _jsx(Box, { mt: "x3", bg: "whiteGrey", children: "Margin top" }), _jsx(Box, { mr: "x3", bg: "whiteGrey", children: "Margin right" }), _jsx(Box, { mb: "x3", bg: "whiteGrey", children: "Margin bottom" }), _jsx(Box, { ml: "x3", bg: "whiteGrey", children: "Margin left" }), _jsx(Box, { mx: "x3", bg: "whiteGrey", children: "Margin x" }), _jsx(Box, { my: "x3", bg: "whiteGrey", children: "Margin y" })] }));
|
|
45
32
|
WithMargin.story = {
|
|
46
33
|
name: "With margin",
|
|
47
34
|
};
|
|
48
|
-
export const WithAShadow = () => (
|
|
49
|
-
React.createElement(Box, { p: "x1", mb: "x2", boxShadow: "small" }, "Small shadow"),
|
|
50
|
-
React.createElement(Box, { p: "x3", mb: "x2", boxShadow: "medium" }, "Medium shadow"),
|
|
51
|
-
React.createElement(Box, { p: "x6", mb: "x2", boxShadow: "large" }, "Large shadow")));
|
|
35
|
+
export const WithAShadow = () => (_jsxs(_Fragment, { children: [_jsx(Box, { p: "x1", mb: "x2", boxShadow: "small", children: "Small shadow" }), _jsx(Box, { p: "x3", mb: "x2", boxShadow: "medium", children: "Medium shadow" }), _jsx(Box, { p: "x6", mb: "x2", boxShadow: "large", children: "Large shadow" })] }));
|
|
52
36
|
WithAShadow.story = {
|
|
53
37
|
name: "With a shadow",
|
|
54
38
|
};
|
|
55
|
-
export const WithABackgroundImage = () => (
|
|
39
|
+
export const WithABackgroundImage = () => (_jsx(Box, { p: "x1", mb: "x2", backgroundImage: "linear-gradient(0deg, #E1EBFA, #216BEB)", children: "Gradient" }));
|
|
56
40
|
WithABackgroundImage.story = {
|
|
57
41
|
name: "With a background image",
|
|
58
42
|
};
|
|
@@ -61,11 +45,11 @@ const HoverableBox = styled(Box)({
|
|
|
61
45
|
backgroundColor: "blue",
|
|
62
46
|
},
|
|
63
47
|
});
|
|
64
|
-
export const WithHoverTransition = () => (
|
|
48
|
+
export const WithHoverTransition = () => (_jsx(HoverableBox, { p: "x1", mb: "x2", bg: "red", marginLeft: "50px", mt: "50px", color: "white", height: "40px", width: "200px", transition: "background-color 0.5s linear", children: "Transition" }));
|
|
65
49
|
WithHoverTransition.story = {
|
|
66
50
|
name: "With hover transition",
|
|
67
51
|
};
|
|
68
|
-
export const WithTransform = () => (
|
|
52
|
+
export const WithTransform = () => (_jsx(Box, { p: "x1", mb: "x2", bg: "red", marginLeft: "50px", mt: "50px", color: "white", height: "40px", width: "200px", transform: "rotate(90deg)", children: "Rotated" }));
|
|
69
53
|
WithTransform.story = {
|
|
70
54
|
name: "with transform",
|
|
71
55
|
};
|
|
@@ -76,9 +60,7 @@ export const WithAnimation = () => {
|
|
|
76
60
|
closed: { opacity: 0, x: "-100%" },
|
|
77
61
|
};
|
|
78
62
|
const handleClick = () => setIsOpen(!isOpen);
|
|
79
|
-
return (
|
|
80
|
-
React.createElement(Button, { onClick: handleClick }, "Animate!"),
|
|
81
|
-
React.createElement(AnimatedBox, { p: "x1", mb: "x2", bg: "red", marginLeft: "50px", mt: "50px", color: "white", height: "40px", width: "200px", animate: isOpen ? "open" : "closed", variants: variants, transition: { duration: 2 } }, "Animated")));
|
|
63
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: handleClick, children: "Animate!" }), _jsx(AnimatedBox, { p: "x1", mb: "x2", bg: "red", marginLeft: "50px", mt: "50px", color: "white", height: "40px", width: "200px", animate: isOpen ? "open" : "closed", variants: variants, transition: { duration: 2 }, children: "Animated" })] }));
|
|
82
64
|
};
|
|
83
65
|
WithAnimation.story = {
|
|
84
66
|
name: "with animation",
|
|
@@ -7,6 +7,6 @@ export type BrandLogoContainerProps = {
|
|
|
7
7
|
brandingLinkComponent?: React.ElementType;
|
|
8
8
|
subtext?: string;
|
|
9
9
|
};
|
|
10
|
-
declare const BrandLogoContainer: ({ logoSrc, brandingLinkHref, brandingLinkTo, brandingLinkComponent, subtext, }: BrandLogoContainerProps) =>
|
|
10
|
+
declare const BrandLogoContainer: ({ logoSrc, brandingLinkHref, brandingLinkTo, brandingLinkComponent, subtext, }: BrandLogoContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
/** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
|
|
12
12
|
export default BrandLogoContainer;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box } from "../Box";
|
|
3
3
|
import { Link } from "../Link";
|
|
4
4
|
import { Branding } from "../Branding";
|
|
5
5
|
const MAX_LOGO_WIDTH = "184px";
|
|
6
6
|
const MAX_LOGO_HEIGHT = "36px";
|
|
7
7
|
const BrandLogoContainer = ({ logoSrc, brandingLinkHref, brandingLinkTo, brandingLinkComponent, subtext, }) => {
|
|
8
|
-
return (
|
|
9
|
-
React.createElement(Link, { "aria-label": "Home", href: brandingLinkHref, to: brandingLinkTo, as: brandingLinkComponent, underline: false, variant: "desktop", style: { display: "block" } },
|
|
10
|
-
logoSrc && React.createElement("img", { src: logoSrc, style: { maxWidth: MAX_LOGO_WIDTH, maxHeight: MAX_LOGO_HEIGHT }, alt: "" }),
|
|
11
|
-
!logoSrc && React.createElement(Branding, { size: subtext ? "small" : "medium", logoColor: "blue", subtext: subtext }))));
|
|
8
|
+
return (_jsx(Box, { maxWidth: MAX_LOGO_WIDTH, maxHeight: MAX_LOGO_HEIGHT, children: _jsxs(Link, { "aria-label": "Home", href: brandingLinkHref, to: brandingLinkTo, as: brandingLinkComponent, underline: false, variant: "desktop", style: { display: "block" }, children: [logoSrc && _jsx("img", { src: logoSrc, style: { maxWidth: MAX_LOGO_WIDTH, maxHeight: MAX_LOGO_HEIGHT }, alt: "" }), !logoSrc && _jsx(Branding, { size: subtext ? "small" : "medium", logoColor: "blue", subtext: subtext })] }) }));
|
|
12
9
|
};
|
|
13
10
|
/** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
|
|
14
11
|
export default BrandLogoContainer;
|
|
@@ -7,5 +7,7 @@ export type DesktopMenuProps = {
|
|
|
7
7
|
themeColorObject: any;
|
|
8
8
|
};
|
|
9
9
|
/** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
|
|
10
|
-
declare const DesktopMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<DesktopMenuProps & React.RefAttributes<HTMLElement>,
|
|
10
|
+
declare const DesktopMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<DesktopMenuProps & React.RefAttributes<HTMLElement>, "ref"> & {
|
|
11
|
+
ref?: React.Ref<HTMLElement>;
|
|
12
|
+
}, never>> & string & Omit<React.ForwardRefExoticComponent<DesktopMenuProps & React.RefAttributes<HTMLElement>>, keyof React.Component<any, {}, any>>;
|
|
11
13
|
export default DesktopMenu;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { styled } from "styled-components";
|
|
3
4
|
import { Icon } from "../Icon";
|
|
@@ -43,8 +44,7 @@ const Nav = styled.nav({
|
|
|
43
44
|
display: "flex",
|
|
44
45
|
alignItems: "center",
|
|
45
46
|
});
|
|
46
|
-
const renderMenuTrigger = (menuItem, themeColorObject, layer, menuType) => (
|
|
47
|
-
React.createElement(MenuTrigger, { menuType: menuType, name: menuItem.name, "aria-label": menuItem.ariaLabel, menuData: menuItem.items, trigger: menuItem.trigger, layer: layer, ...themeColorObject })));
|
|
47
|
+
const renderMenuTrigger = (menuItem, themeColorObject, layer, menuType) => (_jsx("div", { children: _jsx(MenuTrigger, { menuType: menuType, name: menuItem.name, "aria-label": menuItem.ariaLabel, menuData: menuItem.items, trigger: menuItem.trigger, layer: layer, ...themeColorObject }) }, menuItem.key ?? menuItem.name));
|
|
48
48
|
const renderMenuLink = (menuItem, themeColorObject) => {
|
|
49
49
|
const linkProps = {
|
|
50
50
|
href: menuItem.href,
|
|
@@ -52,13 +52,10 @@ const renderMenuLink = (menuItem, themeColorObject) => {
|
|
|
52
52
|
as: menuItem.as,
|
|
53
53
|
target: menuItem.openInNew ? "_blank" : undefined,
|
|
54
54
|
};
|
|
55
|
-
return (
|
|
56
|
-
React.createElement(MenuLink, { ...linkProps, ...themeColorObject },
|
|
57
|
-
menuItem.name,
|
|
58
|
-
menuItem.openInNew && React.createElement(Icon, { size: "x2", icon: "openInNew" }))));
|
|
55
|
+
return (_jsx("div", { children: _jsxs(MenuLink, { ...linkProps, ...themeColorObject, children: [menuItem.name, menuItem.openInNew && _jsx(Icon, { size: "x2", icon: "openInNew" })] }) }, menuItem.key ?? menuItem.name));
|
|
59
56
|
};
|
|
60
|
-
const renderCustom = (menuItem, _themeColorObject, layer) => (
|
|
61
|
-
const renderText = (menuItem, themeColorObject) => (
|
|
57
|
+
const renderCustom = (menuItem, _themeColorObject, layer) => (_jsx("div", { children: menuItem.render({ size: "medium", layer }) }, menuItem.key ?? menuItem.name));
|
|
58
|
+
const renderText = (menuItem, themeColorObject) => (_jsx(MenuText, { ...themeColorObject, children: menuItem.name }, menuItem.key ?? menuItem.name));
|
|
62
59
|
const getRenderFunction = (menuItem) => {
|
|
63
60
|
if (menuItem.items) {
|
|
64
61
|
return renderMenuTrigger;
|
|
@@ -72,7 +69,7 @@ const getRenderFunction = (menuItem) => {
|
|
|
72
69
|
return renderText;
|
|
73
70
|
};
|
|
74
71
|
const renderMenuItem = (menuItem, themeColorObject, layer, menuType) => getRenderFunction(menuItem)(menuItem, themeColorObject, layer, menuType);
|
|
75
|
-
const BaseDesktopMenu = React.forwardRef(({ menuData, menuType, themeColorObject, ...props }, ref) => (
|
|
72
|
+
const BaseDesktopMenu = React.forwardRef(({ menuData, menuType, themeColorObject, ...props }, ref) => (_jsx(Nav, { ...props, ref: ref, children: menuData.map((menuItem) => renderMenuItem(menuItem, themeColorObject, 0, menuType)) })));
|
|
76
73
|
/** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
|
|
77
74
|
const DesktopMenu = styled(BaseDesktopMenu)({
|
|
78
75
|
"& > div": {
|
|
@@ -14,6 +14,6 @@ export type MenuTriggerProps = {
|
|
|
14
14
|
layer: number;
|
|
15
15
|
menuType: MenuType;
|
|
16
16
|
};
|
|
17
|
-
declare const MenuTrigger: ({ menuData, name, color, hoverColor, hoverBackground, "aria-label": ariaLabel, trigger, layer, menuType, ...props }: MenuTriggerProps) =>
|
|
17
|
+
declare const MenuTrigger: ({ menuData, name, color, hoverColor, hoverBackground, "aria-label": ariaLabel, trigger, layer, menuType, ...props }: MenuTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
/** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
|
|
19
19
|
export default MenuTrigger;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import NavBarDropdownMenu from "./NavBarDropdownMenu";
|
|
3
3
|
import SubMenuTrigger from "./SubMenuTrigger";
|
|
4
4
|
import renderSubMenuItems from "./renderSubMenuItems";
|
|
@@ -17,7 +17,7 @@ const MenuTrigger = ({ menuData, name, color, hoverColor, hoverBackground, "aria
|
|
|
17
17
|
name,
|
|
18
18
|
"aria-label": ariaLabel,
|
|
19
19
|
};
|
|
20
|
-
return (
|
|
20
|
+
return (_jsx(NavBarDropdownMenu, { ...props, placement: "bottom-start", modifiers: {
|
|
21
21
|
flip: { behavior: ["bottom"] },
|
|
22
22
|
setPopperWidth: {
|
|
23
23
|
enabled: true,
|
|
@@ -29,17 +29,17 @@ const MenuTrigger = ({ menuData, name, color, hoverColor, hoverBackground, "aria
|
|
|
29
29
|
boundariesElement: "viewport",
|
|
30
30
|
},
|
|
31
31
|
}, trigger: () => {
|
|
32
|
-
const defaultRender = () =>
|
|
32
|
+
const defaultRender = () => _jsx(MenuTriggerButton, { ...triggerProps });
|
|
33
33
|
return trigger ? trigger({ size: "medium", defaultRender, layer }) : defaultRender();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
}, children: ({ closeMenu }) => (_jsx("ul", { style: {
|
|
35
|
+
listStyle: "none",
|
|
36
|
+
margin: "0",
|
|
37
|
+
padding: "0",
|
|
38
|
+
minWidth: dropdownMinWidth,
|
|
39
|
+
}, children: renderSubMenuItems(menuData, (e) => {
|
|
40
|
+
closeMenu(e);
|
|
41
|
+
e.stopPropagation();
|
|
42
|
+
}, SubMenuTrigger, layer + 1, menuType) })) }));
|
|
43
43
|
};
|
|
44
44
|
/** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
|
|
45
45
|
export default MenuTrigger;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { styled } from "styled-components";
|
|
3
4
|
import { themeGet } from "@styled-system/theme-get";
|
|
@@ -29,14 +30,12 @@ const StyledButton = styled.button(({ color = "white", hoverColor = "lightBlue",
|
|
|
29
30
|
opacity: ".5",
|
|
30
31
|
},
|
|
31
32
|
}));
|
|
32
|
-
const MenuTriggerButton = React.forwardRef(({ name, color, hoverColor, hoverBackground, ...props }, ref) => (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
right: "8px",
|
|
39
|
-
}, icon: "downArrow", color: themeGet(`colors.${color}`, color)(color), size: "20px", p: "2px" }))));
|
|
33
|
+
const MenuTriggerButton = React.forwardRef(({ name, color, hoverColor, hoverBackground, ...props }, ref) => (_jsxs(StyledButton, { color: color, hoverColor: hoverColor, hoverBackground: hoverBackground, ref: ref, ...props, children: [name, _jsx(Icon, { style: {
|
|
34
|
+
position: "absolute",
|
|
35
|
+
top: "52%",
|
|
36
|
+
transform: "translateY(-50%)",
|
|
37
|
+
right: "8px",
|
|
38
|
+
}, icon: "downArrow", color: themeGet(`colors.${color}`, color)(color), size: "20px", p: "2px" })] })));
|
|
40
39
|
MenuTriggerButton.displayName = "MenuTriggerButton";
|
|
41
40
|
/** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
|
|
42
41
|
export default MenuTriggerButton;
|
|
@@ -16,5 +16,5 @@ type BaseMobileMenuProps = {
|
|
|
16
16
|
showNulogyLogo?: boolean;
|
|
17
17
|
};
|
|
18
18
|
/** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
|
|
19
|
-
declare const MobileMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<BaseMobileMenuProps, never>> & string & Omit<({ menuData, closeMenu, subtext, themeColorObject, showNulogyLogo, ...props }: BaseMobileMenuProps) =>
|
|
19
|
+
declare const MobileMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<BaseMobileMenuProps, never>> & string & Omit<({ menuData, closeMenu, subtext, themeColorObject, showNulogyLogo, ...props }: BaseMobileMenuProps) => import("react/jsx-runtime").JSX.Element, keyof React.Component<any, {}, any>>;
|
|
20
20
|
export default MobileMenu;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { styled } from "styled-components";
|
|
3
3
|
import { display } from "styled-system";
|
|
4
4
|
import { Text } from "../Type";
|
|
@@ -71,19 +71,13 @@ const renderMenuLink = (menuItem, linkOnClick, themeColorObject, layer) => {
|
|
|
71
71
|
target: menuItem.openInNew ? "_blank" : undefined,
|
|
72
72
|
};
|
|
73
73
|
const topLevel = layer === 0;
|
|
74
|
-
return (
|
|
75
|
-
menuItem.name,
|
|
76
|
-
menuItem.openInNew && React.createElement(Icon, { size: topLevel ? "x3" : "x2", icon: "openInNew" }))) : (React.createElement(DropdownLink, { ...sharedLinkProps },
|
|
77
|
-
menuItem.name,
|
|
78
|
-
menuItem.openInNew && React.createElement(Icon, { size: topLevel ? "x3" : "x2", icon: "openInNew" })))));
|
|
74
|
+
return (_jsx("li", { children: topLevel ? (_jsxs(TopLevelLink, { ...sharedLinkProps, children: [menuItem.name, menuItem.openInNew && _jsx(Icon, { size: topLevel ? "x3" : "x2", icon: "openInNew" })] })) : (_jsxs(DropdownLink, { ...sharedLinkProps, children: [menuItem.name, menuItem.openInNew && _jsx(Icon, { size: topLevel ? "x3" : "x2", icon: "openInNew" })] })) }, menuItem.key ?? menuItem.name));
|
|
79
75
|
};
|
|
80
|
-
const renderCustom = (menuItem, linkOnClick, themeColorObject, layer) => (
|
|
81
|
-
const renderSubMenu = (menuItem, linkOnClick, themeColorObject, layer) => (
|
|
82
|
-
React.createElement(SubMenu, { menuItem: menuItem, layer: layer, themeColorObject: themeColorObject, linkOnClick: linkOnClick })));
|
|
76
|
+
const renderCustom = (menuItem, linkOnClick, themeColorObject, layer) => (_jsx("li", { children: menuItem.render({ size: "small", onItemClick: linkOnClick, layer }) }, menuItem.key ?? menuItem.name));
|
|
77
|
+
const renderSubMenu = (menuItem, linkOnClick, themeColorObject, layer) => (_jsx("li", { style: { display: "block" }, children: _jsx(SubMenu, { menuItem: menuItem, layer: layer, themeColorObject: themeColorObject, linkOnClick: linkOnClick }) }, menuItem.key ?? menuItem.name));
|
|
83
78
|
const renderText = (menuItem, linkOnClick, themeColorObject, layer) => {
|
|
84
79
|
const MenuText = layer === 0 ? TopLevelText : DropdownText;
|
|
85
|
-
return (
|
|
86
|
-
React.createElement(MenuText, { pl: getPaddingLeft(layer), mb: "x1" }, menuItem.name)));
|
|
80
|
+
return (_jsx("li", { children: _jsx(MenuText, { pl: getPaddingLeft(layer), mb: "x1", children: menuItem.name }) }, menuItem.key ?? menuItem.name));
|
|
87
81
|
};
|
|
88
82
|
const getRenderFunction = (menuItem) => {
|
|
89
83
|
if (menuItem.items) {
|
|
@@ -104,12 +98,10 @@ const renderMenuItems = (menuItems, linkOnClick, themeColorObject, layer) => men
|
|
|
104
98
|
return render(menuItem, linkOnClick, themeColorObject, layer);
|
|
105
99
|
});
|
|
106
100
|
const renderTopLayerMenuItems = (menuData, linkOnClick, themeColorObject) => renderMenuItems(menuData, linkOnClick, themeColorObject, 0);
|
|
107
|
-
const getSubMenuHeading = (layer, name) => layer === 0 ? (
|
|
101
|
+
const getSubMenuHeading = (layer, name) => layer === 0 ? (_jsx(TopLevelText, { as: "h3", mb: "x1", children: name })) : (_jsx(DropdownText, { mb: "x1", pl: getPaddingLeft(layer), children: name }));
|
|
108
102
|
const SubMenu = ({ menuItem, linkOnClick, themeColorObject, layer }) => {
|
|
109
103
|
const defaultRender = () => getSubMenuHeading(layer, menuItem.name);
|
|
110
|
-
return (
|
|
111
|
-
menuItem.trigger ? menuItem.trigger({ size: "small", defaultRender, layer }) : defaultRender(),
|
|
112
|
-
React.createElement(SubMenuItemsList, null, renderMenuItems(menuItem.items, linkOnClick, themeColorObject, layer + 1))));
|
|
104
|
+
return (_jsxs(_Fragment, { children: [menuItem.trigger ? menuItem.trigger({ size: "small", defaultRender, layer }) : defaultRender(), _jsx(SubMenuItemsList, { children: renderMenuItems(menuItem.items, linkOnClick, themeColorObject, layer + 1) })] }));
|
|
113
105
|
};
|
|
114
106
|
const Menu = styled.ul(({ theme }) => ({
|
|
115
107
|
listStyle: "none",
|
|
@@ -129,15 +121,7 @@ const Nav = styled.nav(({ backgroundColor }) => ({
|
|
|
129
121
|
});
|
|
130
122
|
const BaseMobileMenu = ({ menuData, closeMenu, subtext, themeColorObject, showNulogyLogo, ...props }) => {
|
|
131
123
|
useScrollLock();
|
|
132
|
-
return (
|
|
133
|
-
React.createElement(BrandingWrap, null,
|
|
134
|
-
React.createElement(BrandingText, { logoColor: themeColorObject?.logoColor })),
|
|
135
|
-
React.createElement(Menu, null,
|
|
136
|
-
menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject),
|
|
137
|
-
menuData.secondaryMenu && renderTopLayerMenuItems(menuData.secondaryMenu, closeMenu, themeColorObject)),
|
|
138
|
-
showNulogyLogo && (React.createElement(Flex, { textAlign: "center", borderTop: borderStyle, height: "40px", alignItems: "center", justifyContent: "center" },
|
|
139
|
-
React.createElement(NulogyLogo, null),
|
|
140
|
-
subtext && (React.createElement(Text, { fontSize: "8px", lineHeight: "0", color: "darkGrey", fontWeight: "medium", textTransform: "uppercase", letterSpacing: ".5px" }, subtext))))));
|
|
124
|
+
return (_jsxs(Nav, { backgroundColor: themeColorObject && themeColorObject.background, ...props, children: [_jsx(BrandingWrap, { children: _jsx(BrandingText, { logoColor: themeColorObject?.logoColor }) }), _jsxs(Menu, { children: [menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject), menuData.secondaryMenu && renderTopLayerMenuItems(menuData.secondaryMenu, closeMenu, themeColorObject)] }), showNulogyLogo && (_jsxs(Flex, { textAlign: "center", borderTop: borderStyle, height: "40px", alignItems: "center", justifyContent: "center", children: [_jsx(NulogyLogo, {}), subtext && (_jsx(Text, { fontSize: "8px", lineHeight: "0", color: "darkGrey", fontWeight: "medium", textTransform: "uppercase", letterSpacing: ".5px", children: subtext }))] }))] }));
|
|
141
125
|
};
|
|
142
126
|
/** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
|
|
143
127
|
const MobileMenu = styled(BaseMobileMenu)(display);
|
|
@@ -11,5 +11,5 @@ type BaseNavBarProps = {
|
|
|
11
11
|
logoSrc?: string;
|
|
12
12
|
};
|
|
13
13
|
/** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
|
|
14
|
-
declare const NavBar: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<BaseNavBarProps, never>> & string & Omit<({ environment, breakpointUpper, ...props }: BaseNavBarProps) =>
|
|
14
|
+
declare const NavBar: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<BaseNavBarProps, never>> & string & Omit<({ environment, breakpointUpper, ...props }: BaseNavBarProps) => import("react/jsx-runtime").JSX.Element, keyof React.Component<any, {}, any>>;
|
|
15
15
|
export default NavBar;
|