@nulogy/components 16.0.0 → 16.0.1
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 +1733 -587
- package/dist/main.js.map +1 -1
- package/dist/main.module.js +1732 -586
- 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 +3 -3
- package/dist/src/BottomSheet/BottomSheet.parts.js +6 -5
- package/dist/src/BottomSheet/BottomSheet.styled.d.ts +4 -4
- 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.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.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 +6 -16
- 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/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/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/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 +1 -1
- 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/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/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.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.js +5 -10
- package/dist/src/Modal/Modal.story.js +10 -40
- 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.js +2 -1
- package/dist/src/Navigation/components/AppSwitcher/parts/Link.js +2 -2
- 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 +1 -1
- 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/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/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 +1 -1
- 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/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/NavigationMenuItem.js +9 -18
- 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.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.js +2 -3
- package/dist/src/Summary/Summary.story.d.ts +2 -3
- package/dist/src/Summary/Summary.story.js +3 -11
- package/dist/src/Summary/SummaryContext.js +4 -3
- package/dist/src/Summary/SummaryDivider.d.ts +1 -2
- package/dist/src/Summary/SummaryDivider.js +2 -2
- package/dist/src/Summary/SummaryItem.js +2 -4
- package/dist/src/Switcher/Switch.js +2 -1
- package/dist/src/Switcher/Switcher.js +2 -2
- 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.js +2 -3
- 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.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/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 +6 -7
- 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 +5 -6
- 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/components/BackLink.d.ts +2 -2
- 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 +2 -2
- 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/placeholder.d.ts +1 -2
- package/dist/src/utils/story/placeholder.js +2 -7
- package/dist/src/utils/story/resizable.d.ts +1 -1
- package/dist/src/utils/story/resizable.js +5 -8
- package/dist/src/utils/ts/FocusManager.js +7 -6
- 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 +22 -24
|
@@ -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
|
};
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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 ReactResizeDetector from "react-resize-detector";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
@@ -24,31 +24,21 @@ const themeColorObject = {
|
|
|
24
24
|
};
|
|
25
25
|
const MediumNavBar = ({ menuData, environment, logo, showNulogyLogo, subtext, ...props }) => {
|
|
26
26
|
const { t } = useTranslation();
|
|
27
|
-
return (
|
|
28
|
-
environment && React.createElement(EnvironmentBanner, null, environment),
|
|
29
|
-
React.createElement("header", { ...props },
|
|
30
|
-
React.createElement(NavBarBackground, { backgroundColor: "white", height: NAVBAR_HEIGHT },
|
|
31
|
-
logo,
|
|
32
|
-
React.createElement(Flex, { justifyContent: "space-between", alignContent: "flex-end", flexGrow: 1, ml: "x3", alignItems: "center" },
|
|
33
|
-
menuData.primaryMenu && (React.createElement(DesktopMenu, { themeColorObject: themeColorObject, "aria-label": t("primary navigation"), menuType: "primary", menuData: menuData.primaryMenu })),
|
|
34
|
-
React.createElement(Flex, { justifySelf: "flex-end", alignItems: "center" },
|
|
35
|
-
menuData.secondaryMenu && (React.createElement(DesktopMenu, { themeColorObject: themeColorObject, "aria-label": t("secondary navigation"), menuType: "secondary", menuData: menuData.secondaryMenu })),
|
|
36
|
-
showNulogyLogo && (React.createElement(Box, { pl: "x3" },
|
|
37
|
-
React.createElement(NulogyLogoContainer, { height: NAVBAR_HEIGHT, subText: subtext })))))))));
|
|
27
|
+
return (_jsxs(_Fragment, { children: [environment && _jsx(EnvironmentBanner, { children: environment }), _jsx("header", { ...props, children: _jsxs(NavBarBackground, { backgroundColor: "white", height: NAVBAR_HEIGHT, children: [logo, _jsxs(Flex, { justifyContent: "space-between", alignContent: "flex-end", flexGrow: 1, ml: "x3", alignItems: "center", children: [menuData.primaryMenu && (_jsx(DesktopMenu, { themeColorObject: themeColorObject, "aria-label": t("primary navigation"), menuType: "primary", menuData: menuData.primaryMenu })), _jsxs(Flex, { justifySelf: "flex-end", alignItems: "center", children: [menuData.secondaryMenu && (_jsx(DesktopMenu, { themeColorObject: themeColorObject, "aria-label": t("secondary navigation"), menuType: "secondary", menuData: menuData.secondaryMenu })), showNulogyLogo && (_jsx(Box, { pl: "x3", children: _jsx(NulogyLogoContainer, { height: NAVBAR_HEIGHT, subText: subtext }) }))] })] })] }) })] }));
|
|
38
28
|
};
|
|
39
29
|
const SelectNavBarBasedOnWidth = ({ width, defaultOpen, breakpointUpper, brandingLinkHref = "/", brandingLinkTo, brandingLinkComponent, logoSrc, ...props }) => {
|
|
40
30
|
const currentWidth = width || (typeof window !== "undefined" && window.innerWidth);
|
|
41
|
-
const logo = (
|
|
31
|
+
const logo = (_jsx(BrandLogoContainer, { logoSrc: logoSrc, brandingLinkHref: brandingLinkHref, brandingLinkTo: brandingLinkTo, brandingLinkComponent: brandingLinkComponent, subtext: props.subtext }));
|
|
42
32
|
if (currentWidth >= numberFromDimension(breakpointUpper)) {
|
|
43
|
-
return
|
|
33
|
+
return _jsx(MediumNavBar, { logo: logo, showNulogyLogo: logoSrc, ...props });
|
|
44
34
|
}
|
|
45
35
|
else {
|
|
46
|
-
return (
|
|
36
|
+
return (_jsx(SmallNavBar, { width: currentWidth, defaultOpen: defaultOpen, themeColorObject: themeColorObject, navBarHeight: NAVBAR_HEIGHT, logo: logo, showNulogyLogo: logoSrc, ...props }));
|
|
47
37
|
}
|
|
48
38
|
};
|
|
49
39
|
const BaseNavBar = ({ environment, breakpointUpper = "medium", ...props }) => {
|
|
50
40
|
const { breakpoints } = useTheme();
|
|
51
|
-
return (
|
|
41
|
+
return (_jsx(ReactResizeDetector, { handleWidth: true, children: ({ width }) => (_jsx(SelectNavBarBasedOnWidth, { breakpointUpper: breakpoints[breakpointUpper] || breakpointUpper, width: width, environment: environment, ...props })) }));
|
|
52
42
|
};
|
|
53
43
|
/** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
|
|
54
44
|
const NavBar = styled(BaseNavBar)({});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import type { StoryObj } from "@storybook/react";
|
|
3
2
|
import { BrandedNavBar as NDSBrandedNavBar } from "./index";
|
|
4
3
|
declare const _default: {
|
|
@@ -7,46 +6,46 @@ declare const _default: {
|
|
|
7
6
|
export default _default;
|
|
8
7
|
type Story = StoryObj<typeof NDSBrandedNavBar>;
|
|
9
8
|
export declare const _BrandedNavBar: {
|
|
10
|
-
():
|
|
9
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
story: {
|
|
12
11
|
name: string;
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
14
|
export declare const WithACompanyLogo: {
|
|
16
|
-
():
|
|
15
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
17
16
|
story: {
|
|
18
17
|
name: string;
|
|
19
18
|
};
|
|
20
19
|
};
|
|
21
20
|
export declare const WithAppName: {
|
|
22
|
-
():
|
|
21
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
23
22
|
story: {
|
|
24
23
|
name: string;
|
|
25
24
|
};
|
|
26
25
|
};
|
|
27
26
|
export declare const WithACompanyLogoAndAppName: {
|
|
28
|
-
():
|
|
27
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
29
28
|
story: {
|
|
30
29
|
name: string;
|
|
31
30
|
};
|
|
32
31
|
};
|
|
33
32
|
export declare const WithEnvironmentBanner: Story;
|
|
34
33
|
export declare const WithIcon: {
|
|
35
|
-
():
|
|
34
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
36
35
|
story: {
|
|
37
36
|
name: string;
|
|
38
37
|
};
|
|
39
38
|
};
|
|
40
|
-
export declare const WithPrimaryAndSecondarySubMenus: () =>
|
|
41
|
-
export declare const WithExternalLinks: () =>
|
|
39
|
+
export declare const WithPrimaryAndSecondarySubMenus: () => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare const WithExternalLinks: () => import("react/jsx-runtime").JSX.Element;
|
|
42
41
|
export declare const WithReactRouter: {
|
|
43
|
-
():
|
|
42
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
44
43
|
story: {
|
|
45
44
|
name: string;
|
|
46
45
|
};
|
|
47
46
|
};
|
|
48
47
|
export declare const WithHamburgerMenu: {
|
|
49
|
-
():
|
|
48
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
50
49
|
parameters: {
|
|
51
50
|
viewport: {
|
|
52
51
|
defaultViewport: string;
|
|
@@ -56,9 +55,9 @@ export declare const WithHamburgerMenu: {
|
|
|
56
55
|
};
|
|
57
56
|
};
|
|
58
57
|
};
|
|
59
|
-
export declare const CustomRendering: () =>
|
|
58
|
+
export declare const CustomRendering: () => import("react/jsx-runtime").JSX.Element;
|
|
60
59
|
export declare const CustomRenderingInHamburger: {
|
|
61
|
-
():
|
|
60
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
62
61
|
parameters: {
|
|
63
62
|
viewport: {
|
|
64
63
|
defaultViewport: string;
|
|
@@ -68,9 +67,9 @@ export declare const CustomRenderingInHamburger: {
|
|
|
68
67
|
};
|
|
69
68
|
};
|
|
70
69
|
};
|
|
71
|
-
export declare const CustomMenuTriggers: () =>
|
|
70
|
+
export declare const CustomMenuTriggers: () => import("react/jsx-runtime").JSX.Element;
|
|
72
71
|
export declare const CustomMenuTriggersInHamburger: {
|
|
73
|
-
():
|
|
72
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
74
73
|
parameters: {
|
|
75
74
|
viewport: {
|
|
76
75
|
defaultViewport: string;
|