@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,80 +1,47 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useTheme } from "styled-components";
|
|
3
3
|
import { Text, Box, Flex, Heading3 } from "..";
|
|
4
4
|
export default {
|
|
5
5
|
title: "Tokens",
|
|
6
6
|
};
|
|
7
7
|
const Palette = ({ colour, name }) => {
|
|
8
|
-
return (
|
|
9
|
-
React.createElement(Box, { mr: "x2", mb: "x2", boxShadow: "medium", overflow: "hidden", borderRadius: "small" },
|
|
10
|
-
React.createElement(Box, { pt: { extraSmall: "x4", small: "x8" }, pb: { extraSmall: "x4", small: "x8" }, mb: "x1", bg: colour }),
|
|
11
|
-
React.createElement(Text, { mb: "half", px: "x1" }, name),
|
|
12
|
-
React.createElement(Text, { fontSize: "small", px: "x1", pb: "x1" }, colour))));
|
|
8
|
+
return (_jsx(Box, { width: { extraSmall: 1, small: 1 / 6 }, children: _jsxs(Box, { mr: "x2", mb: "x2", boxShadow: "medium", overflow: "hidden", borderRadius: "small", children: [_jsx(Box, { pt: { extraSmall: "x4", small: "x8" }, pb: { extraSmall: "x4", small: "x8" }, mb: "x1", bg: colour }), _jsx(Text, { mb: "half", px: "x1", children: name }), _jsx(Text, { fontSize: "small", px: "x1", pb: "x1", children: colour })] }) }));
|
|
13
9
|
};
|
|
14
10
|
export const Colors = () => {
|
|
15
11
|
const theme = useTheme();
|
|
16
|
-
return (
|
|
12
|
+
return (_jsx(Flex, { flexWrap: "wrap", children: Object.keys(theme.colors).map((color) => (_jsx(Palette, { colour: theme.colors[color], name: color }, color))) }));
|
|
17
13
|
};
|
|
18
14
|
export const FontSizes = () => {
|
|
19
15
|
const theme = useTheme();
|
|
20
|
-
return (
|
|
21
|
-
fontSize,
|
|
22
|
-
": ",
|
|
23
|
-
theme.fontSizes[fontSize])))));
|
|
16
|
+
return (_jsx(Box, { children: Object.keys(theme.fontSizes).map((fontSize) => (_jsxs(Text, { mb: "x2", fontSize: fontSize, children: [fontSize, ": ", theme.fontSizes[fontSize]] }, fontSize))) }));
|
|
24
17
|
};
|
|
25
18
|
export const LineHeights = () => {
|
|
26
19
|
const theme = useTheme();
|
|
27
|
-
return (
|
|
28
|
-
React.createElement(Heading3, null, lineHeight),
|
|
29
|
-
React.createElement(Box, { mb: "x1" },
|
|
30
|
-
React.createElement(Text, { lineHeight: lineHeight }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit."),
|
|
31
|
-
React.createElement(Text, { lineHeight: lineHeight }, "Maecenas at urna egestas, dignissim risus ut, posuere lorem. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.")))))));
|
|
20
|
+
return (_jsx(Box, { maxWidth: "500px", children: Object.keys(theme.lineHeights).map((lineHeight) => (_jsxs(_Fragment, { children: [_jsx(Heading3, { children: lineHeight }), _jsxs(Box, { mb: "x1", children: [_jsx(Text, { lineHeight: lineHeight, children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }), _jsx(Text, { lineHeight: lineHeight, children: "Maecenas at urna egestas, dignissim risus ut, posuere lorem. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus." })] })] }))) }));
|
|
32
21
|
};
|
|
33
22
|
export const FontWeights = () => {
|
|
34
23
|
const theme = useTheme();
|
|
35
|
-
return (
|
|
36
|
-
fontWeight,
|
|
37
|
-
": ",
|
|
38
|
-
theme.fontWeights[fontWeight])))));
|
|
24
|
+
return (_jsx(Box, { children: Object.keys(theme.fontWeights).map((fontWeight) => (_jsxs(Text, { mb: "x2", fontWeight: fontWeight, children: [fontWeight, ": ", theme.fontWeights[fontWeight]] }, fontWeight))) }));
|
|
39
25
|
};
|
|
40
26
|
export const SpaceAndSize = () => {
|
|
41
27
|
const theme = useTheme();
|
|
42
|
-
return (
|
|
43
|
-
React.createElement(Flex, { width: "80px", justifyContent: "flex-end", mr: "x1" },
|
|
44
|
-
React.createElement(Box, { bg: "lightGrey", height: space, width: space })),
|
|
45
|
-
React.createElement(Text, null,
|
|
46
|
-
space,
|
|
47
|
-
" (",
|
|
48
|
-
theme.space[space],
|
|
49
|
-
")"))))));
|
|
28
|
+
return (_jsx(Box, { children: Object.keys(theme.space).map((space) => (_jsxs(Flex, { mb: "x2", alignItems: "center", width: "300px", children: [_jsx(Flex, { width: "80px", justifyContent: "flex-end", mr: "x1", children: _jsx(Box, { bg: "lightGrey", height: space, width: space }) }), _jsxs(Text, { children: [space, " (", theme.space[space], ")"] })] }, space))) }));
|
|
50
29
|
};
|
|
51
30
|
export const Font = () => {
|
|
52
31
|
const theme = useTheme();
|
|
53
|
-
return (
|
|
54
|
-
font,
|
|
55
|
-
": ",
|
|
56
|
-
theme.fonts[font])))));
|
|
32
|
+
return (_jsx(Box, { children: Object.keys(theme.fonts).map((font) => (_jsxs(Text, { mb: "x2", fontFamily: font, children: [font, ": ", theme.fonts[font]] }, font))) }));
|
|
57
33
|
};
|
|
58
34
|
export const Shadows = () => {
|
|
59
35
|
const theme = useTheme();
|
|
60
|
-
return (
|
|
61
|
-
shadow,
|
|
62
|
-
": ",
|
|
63
|
-
theme.shadows[shadow])))));
|
|
36
|
+
return (_jsx(Box, { children: Object.keys(theme.shadows).map((shadow) => (_jsxs(Box, { mb: "x2", p: "x1", borderRadius: "small", boxShadow: shadow, children: [shadow, ": ", theme.shadows[shadow]] }, shadow))) }));
|
|
64
37
|
};
|
|
65
38
|
export const Radii = () => {
|
|
66
39
|
const theme = useTheme();
|
|
67
|
-
return (
|
|
68
|
-
radius,
|
|
69
|
-
": ",
|
|
70
|
-
theme.radii[radius])))));
|
|
40
|
+
return (_jsx(Flex, { maxWidth: "300px", flexDirection: "column", alignItems: "center", children: Object.keys(theme.radii).map((radius) => (_jsxs(Flex, { mb: "x2", p: "x1", borderRadius: radius, bg: "blue", color: "white", size: radius === "circle" ? "200px" : "100%", alignItems: "center", justifyContent: "center", children: [radius, ": ", theme.radii[radius]] }, radius))) }));
|
|
71
41
|
};
|
|
72
42
|
export const Breakpoints = () => {
|
|
73
43
|
const theme = useTheme();
|
|
74
|
-
return (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
breakpoint,
|
|
78
|
-
": ",
|
|
79
|
-
theme.breakpoints[breakpoint])))));
|
|
44
|
+
return (_jsx(Box, { children: Object.keys(theme.breakpoints)
|
|
45
|
+
.filter((bp) => bp !== "map")
|
|
46
|
+
.map((breakpoint) => (_jsxs(Text, { mb: "x2", children: [breakpoint, ": ", theme.breakpoints[breakpoint]] }, breakpoint))) }));
|
|
80
47
|
};
|
|
@@ -16,4 +16,4 @@ export interface TooltipProps {
|
|
|
16
16
|
/** Child element that triggers the tooltip */
|
|
17
17
|
children?: React.ReactNode;
|
|
18
18
|
}
|
|
19
|
-
export default function Tooltip({ showDelay, defaultOpen, placement, maxWidth, className, tooltip, children, }: TooltipProps):
|
|
19
|
+
export default function Tooltip({ showDelay, defaultOpen, placement, maxWidth, className, tooltip, children, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
3
|
import { Tooltip as BaseTooltip, TooltipContent, TooltipTrigger, TooltipProvider, } from "./components/TooltipComponents";
|
|
4
4
|
import { getPlacementProps } from "./helpers";
|
|
5
5
|
export default function Tooltip({ showDelay = "100", defaultOpen = false, placement = "bottom", maxWidth = "24em", className, tooltip, children, }) {
|
|
6
6
|
const delayDuration = typeof showDelay === "string" ? parseInt(showDelay, 10) : showDelay;
|
|
7
7
|
const { side, align } = getPlacementProps(placement);
|
|
8
|
-
return (
|
|
9
|
-
React.createElement(BaseTooltip, { defaultOpen: defaultOpen, delayDuration: delayDuration, supportMobileTap: true },
|
|
10
|
-
React.createElement(TooltipTrigger, { asChild: true, "data-testid": "nds-tooltip-trigger" }, children),
|
|
11
|
-
React.createElement(TooltipPrimitive.Portal, null,
|
|
12
|
-
React.createElement(TooltipContent, { side: side, align: align, className: className, maxWidth: maxWidth }, tooltip)))));
|
|
8
|
+
return (_jsx(TooltipProvider, { children: _jsxs(BaseTooltip, { defaultOpen: defaultOpen, delayDuration: delayDuration, supportMobileTap: true, children: [_jsx(TooltipTrigger, { asChild: true, "data-testid": "nds-tooltip-trigger", children: children }), _jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipContent, { side: side, align: align, className: className, maxWidth: maxWidth, children: tooltip }) })] }) }));
|
|
13
9
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { Box, Button, DescriptionDetails, DescriptionList, DescriptionTerm, Divider, Flex, Icon, Link, StatusIndicator, Text, Tooltip, } from "../index";
|
|
3
4
|
export default {
|
|
@@ -8,122 +9,46 @@ export default {
|
|
|
8
9
|
},
|
|
9
10
|
};
|
|
10
11
|
export const Default = {
|
|
11
|
-
render: () => (
|
|
12
|
-
React.createElement(Tooltip, { tooltip: "I am a Tooltip!" },
|
|
13
|
-
React.createElement(Button, { "data-testid": "tooltip-trigger" }, "Button")))),
|
|
12
|
+
render: () => (_jsx(Flex, { p: "x8", children: _jsx(Tooltip, { tooltip: "I am a Tooltip!", children: _jsx(Button, { "data-testid": "tooltip-trigger", children: "Button" }) }) })),
|
|
14
13
|
};
|
|
15
14
|
export const WithWrappedText = {
|
|
16
|
-
render: () => (
|
|
17
|
-
React.createElement(Tooltip, { placement: "bottom", tooltip: "I am a Tooltip! I have very long text, and my default max-width is 24em (based on 14px font-size), which is equal to 336px, or approximately 45 characters.", defaultOpen: true },
|
|
18
|
-
React.createElement(Button, null, " Button ")))),
|
|
15
|
+
render: () => (_jsx(Flex, { p: "x8", children: _jsx(Tooltip, { placement: "bottom", tooltip: "I am a Tooltip! I have very long text, and my default max-width is 24em (based on 14px font-size), which is equal to 336px, or approximately 45 characters.", defaultOpen: true, children: _jsx(Button, { children: " Button " }) }) })),
|
|
19
16
|
name: "with wrapped text",
|
|
20
17
|
};
|
|
21
18
|
export const WithCustomMaxWidth = {
|
|
22
|
-
render: (args) => (
|
|
23
|
-
React.createElement(Tooltip, { ...args, placement: "bottom", tooltip: "I am a Tooltip! I have very long text, but I have a smaller maxWidth prop that causes me to wrap frequently.", maxWidth: "128px", defaultOpen: true },
|
|
24
|
-
React.createElement(Button, null, " Button ")))),
|
|
19
|
+
render: (args) => (_jsx(Flex, { p: "x8", children: _jsx(Tooltip, { ...args, placement: "bottom", tooltip: "I am a Tooltip! I have very long text, but I have a smaller maxWidth prop that causes me to wrap frequently.", maxWidth: "128px", defaultOpen: true, children: _jsx(Button, { children: " Button " }) }) })),
|
|
25
20
|
name: "with custom maxWidth",
|
|
26
21
|
};
|
|
27
22
|
export const WithPlacement = {
|
|
28
|
-
render: () => (
|
|
29
|
-
React.createElement(Flex, { my: "x6", mx: "x8", justifyContent: "space-around" },
|
|
30
|
-
React.createElement(Tooltip, { placement: "top-start", tooltip: "top-start", defaultOpen: true },
|
|
31
|
-
React.createElement(Button, null, "Tooltip trigger")),
|
|
32
|
-
React.createElement(Tooltip, { placement: "top", tooltip: "top", defaultOpen: true },
|
|
33
|
-
React.createElement(Button, null, "Tooltip trigger")),
|
|
34
|
-
React.createElement(Tooltip, { placement: "top-end", tooltip: "top-end", defaultOpen: true },
|
|
35
|
-
React.createElement(Button, null, "Tooltip trigger"))),
|
|
36
|
-
React.createElement(Flex, { my: "x6", mx: "x8", justifyContent: "space-around" },
|
|
37
|
-
React.createElement(Tooltip, { placement: "left-start", tooltip: "left-start", defaultOpen: true },
|
|
38
|
-
React.createElement(Button, null, "Tooltip trigger")),
|
|
39
|
-
React.createElement(Tooltip, { placement: "left", tooltip: "left", defaultOpen: true },
|
|
40
|
-
React.createElement(Button, null, "Tooltip trigger")),
|
|
41
|
-
React.createElement(Tooltip, { placement: "left-end", tooltip: "left-end", defaultOpen: true },
|
|
42
|
-
React.createElement(Button, null, "Tooltip trigger"))),
|
|
43
|
-
React.createElement(Flex, { my: "x6", mx: "x8", justifyContent: "space-around" },
|
|
44
|
-
React.createElement(Tooltip, { placement: "right-start", tooltip: "right-start", defaultOpen: true },
|
|
45
|
-
React.createElement(Button, null, "Tooltip trigger")),
|
|
46
|
-
React.createElement(Tooltip, { placement: "right", tooltip: "right", defaultOpen: true },
|
|
47
|
-
React.createElement(Button, null, "Tooltip trigger")),
|
|
48
|
-
React.createElement(Tooltip, { placement: "right-end", tooltip: "right-end", defaultOpen: true },
|
|
49
|
-
React.createElement(Button, null, "Tooltip trigger"))),
|
|
50
|
-
React.createElement(Flex, { my: "x6", mx: "x8", justifyContent: "space-around" },
|
|
51
|
-
React.createElement(Tooltip, { placement: "bottom-start", tooltip: "bottom-start", defaultOpen: true },
|
|
52
|
-
React.createElement(Button, null, "Tooltip trigger")),
|
|
53
|
-
React.createElement(Tooltip, { placement: "bottom", tooltip: "bottom", defaultOpen: true },
|
|
54
|
-
React.createElement(Button, null, "Tooltip trigger")),
|
|
55
|
-
React.createElement(Tooltip, { placement: "bottom-end", tooltip: "bottom-end", defaultOpen: true },
|
|
56
|
-
React.createElement(Button, null, "Tooltip trigger"))))),
|
|
23
|
+
render: () => (_jsxs(_Fragment, { children: [_jsxs(Flex, { my: "x6", mx: "x8", justifyContent: "space-around", children: [_jsx(Tooltip, { placement: "top-start", tooltip: "top-start", defaultOpen: true, children: _jsx(Button, { children: "Tooltip trigger" }) }), _jsx(Tooltip, { placement: "top", tooltip: "top", defaultOpen: true, children: _jsx(Button, { children: "Tooltip trigger" }) }), _jsx(Tooltip, { placement: "top-end", tooltip: "top-end", defaultOpen: true, children: _jsx(Button, { children: "Tooltip trigger" }) })] }), _jsxs(Flex, { my: "x6", mx: "x8", justifyContent: "space-around", children: [_jsx(Tooltip, { placement: "left-start", tooltip: "left-start", defaultOpen: true, children: _jsx(Button, { children: "Tooltip trigger" }) }), _jsx(Tooltip, { placement: "left", tooltip: "left", defaultOpen: true, children: _jsx(Button, { children: "Tooltip trigger" }) }), _jsx(Tooltip, { placement: "left-end", tooltip: "left-end", defaultOpen: true, children: _jsx(Button, { children: "Tooltip trigger" }) })] }), _jsxs(Flex, { my: "x6", mx: "x8", justifyContent: "space-around", children: [_jsx(Tooltip, { placement: "right-start", tooltip: "right-start", defaultOpen: true, children: _jsx(Button, { children: "Tooltip trigger" }) }), _jsx(Tooltip, { placement: "right", tooltip: "right", defaultOpen: true, children: _jsx(Button, { children: "Tooltip trigger" }) }), _jsx(Tooltip, { placement: "right-end", tooltip: "right-end", defaultOpen: true, children: _jsx(Button, { children: "Tooltip trigger" }) })] }), _jsxs(Flex, { my: "x6", mx: "x8", justifyContent: "space-around", children: [_jsx(Tooltip, { placement: "bottom-start", tooltip: "bottom-start", defaultOpen: true, children: _jsx(Button, { children: "Tooltip trigger" }) }), _jsx(Tooltip, { placement: "bottom", tooltip: "bottom", defaultOpen: true, children: _jsx(Button, { children: "Tooltip trigger" }) }), _jsx(Tooltip, { placement: "bottom-end", tooltip: "bottom-end", defaultOpen: true, children: _jsx(Button, { children: "Tooltip trigger" }) })] })] })),
|
|
57
24
|
name: "with placement",
|
|
58
25
|
};
|
|
59
26
|
export const WithLinkPassedIn = {
|
|
60
|
-
render: (args) => (
|
|
61
|
-
React.createElement(Button, null, " Button "))),
|
|
27
|
+
render: (args) => (_jsx(Tooltip, { ...args, placement: "bottom", tooltip: _jsx(Link, { href: "/", children: " Link " }), defaultOpen: true, children: _jsx(Button, { children: " Button " }) })),
|
|
62
28
|
name: "with Link passed in",
|
|
63
29
|
};
|
|
64
30
|
export const WithButtonPassedIn = {
|
|
65
|
-
render: (args) => (
|
|
66
|
-
React.createElement(Button, null, " Button "))),
|
|
31
|
+
render: (args) => (_jsx(Tooltip, { ...args, placement: "bottom", tooltip: _jsx(Button, { href: "/", children: " Button " }), defaultOpen: true, children: _jsx(Button, { children: " Button " }) })),
|
|
67
32
|
name: "with Button passed in",
|
|
68
33
|
};
|
|
69
34
|
export const WithCustomShowDelay = {
|
|
70
|
-
render: (args) => (
|
|
71
|
-
React.createElement(Button, null, " Button "))),
|
|
35
|
+
render: (args) => (_jsx(Tooltip, { ...args, placement: "bottom", tooltip: "Tooltip", showDelay: "1000", children: _jsx(Button, { children: " Button " }) })),
|
|
72
36
|
name: "with custom showDelay",
|
|
73
37
|
};
|
|
74
38
|
export const WithOtherFocusableElements = {
|
|
75
|
-
render: () => (
|
|
76
|
-
React.createElement(Tooltip, { placement: "bottom", tooltip: "Tooltip" },
|
|
77
|
-
React.createElement(Button, null, " Button ")),
|
|
78
|
-
React.createElement(Tooltip, { placement: "bottom", tooltip: "Tooltip" },
|
|
79
|
-
React.createElement(Link, { href: "/" }, " Link ")),
|
|
80
|
-
React.createElement(Tooltip, { placement: "bottom", tooltip: "Tooltip" },
|
|
81
|
-
React.createElement(Text, { mr: "x2", inline: true, bg: "blue" }, "Inline Text")),
|
|
82
|
-
React.createElement(Tooltip, { placement: "bottom", tooltip: "Tooltip" },
|
|
83
|
-
React.createElement(Box, { width: "200px", bg: "blue" }, "Box width 200px")),
|
|
84
|
-
React.createElement(Tooltip, { placement: "bottom", tooltip: "Tooltip" },
|
|
85
|
-
React.createElement(Box, { bg: "blue" }, "Box")))),
|
|
39
|
+
render: () => (_jsxs(_Fragment, { children: [_jsx(Tooltip, { placement: "bottom", tooltip: "Tooltip", children: _jsx(Button, { children: " Button " }) }), _jsx(Tooltip, { placement: "bottom", tooltip: "Tooltip", children: _jsx(Link, { href: "/", children: " Link " }) }), _jsx(Tooltip, { placement: "bottom", tooltip: "Tooltip", children: _jsx(Text, { mr: "x2", inline: true, bg: "blue", children: "Inline Text" }) }), _jsx(Tooltip, { placement: "bottom", tooltip: "Tooltip", children: _jsx(Box, { width: "200px", bg: "blue", children: "Box width 200px" }) }), _jsx(Tooltip, { placement: "bottom", tooltip: "Tooltip", children: _jsx(Box, { bg: "blue", children: "Box" }) })] })),
|
|
86
40
|
name: "with other focusable elements",
|
|
87
41
|
};
|
|
88
42
|
export const OpenByDefault = {
|
|
89
|
-
render: (args) => (
|
|
90
|
-
React.createElement(Button, null, "Hover me"))),
|
|
43
|
+
render: (args) => (_jsx(Tooltip, { ...args, tooltip: "I am an open Tooltip!", defaultOpen: true, children: _jsx(Button, { children: "Hover me" }) })),
|
|
91
44
|
name: "open by default",
|
|
92
45
|
};
|
|
93
46
|
export const WithCustomComponent = {
|
|
94
|
-
render: (args) => (
|
|
95
|
-
React.createElement(CustomComponent, null))),
|
|
47
|
+
render: (args) => (_jsx(Tooltip, { ...args, tooltip: "See me on hover!", defaultOpen: true, children: _jsx(CustomComponent, {}) })),
|
|
96
48
|
};
|
|
97
|
-
const CustomComponent = React.forwardRef((props, forwardedRef) => (
|
|
98
|
-
|
|
99
|
-
const CustomTooltip = () => (React.createElement(Flex, { flexDirection: "column", width: "320px", p: "x1_5" },
|
|
100
|
-
React.createElement(Text, { fontSize: "smaller", fontWeight: "medium", textTransform: "uppercase", color: "midGrey" }, "Purchase Order"),
|
|
101
|
-
React.createElement(Text, { color: "darkGrey" }, "PO 12389"),
|
|
102
|
-
React.createElement(Divider, null),
|
|
103
|
-
React.createElement(DescriptionList, null,
|
|
104
|
-
React.createElement(DescriptionTerm, null, "Customer"),
|
|
105
|
-
React.createElement(DescriptionDetails, null, "Nulogy"),
|
|
106
|
-
React.createElement(DescriptionTerm, null,
|
|
107
|
-
React.createElement(Text, { display: "inline-flex", alignItems: "end" },
|
|
108
|
-
"Order number",
|
|
109
|
-
React.createElement(Icon, { icon: "info", size: "x3", paddingLeft: "half" }))),
|
|
110
|
-
React.createElement(DescriptionDetails, null,
|
|
111
|
-
React.createElement(Link, { href: "/customer-details" }, "P12-90381-2039")),
|
|
112
|
-
React.createElement(DescriptionTerm, null, "Status"),
|
|
113
|
-
React.createElement(DescriptionDetails, null,
|
|
114
|
-
React.createElement(StatusIndicator, { type: "success" }, "Paid")),
|
|
115
|
-
React.createElement(DescriptionTerm, null, "Amount"),
|
|
116
|
-
React.createElement(DescriptionDetails, null, "$202.12"),
|
|
117
|
-
React.createElement(DescriptionTerm, null, "Amount after exchange"),
|
|
118
|
-
React.createElement(DescriptionDetails, null,
|
|
119
|
-
React.createElement(Flex, { as: "span", alignItems: "center", gap: "half" },
|
|
120
|
-
"US $202.12 ",
|
|
121
|
-
React.createElement(Icon, { icon: "arrowForward", color: "midGrey" }),
|
|
122
|
-
" CA $287.43")))));
|
|
49
|
+
const CustomComponent = React.forwardRef((props, forwardedRef) => (_jsx("span", { ref: forwardedRef, ...props, children: _jsx(Text, { inline: true, children: "This component uses the forwardedRef from the Tooltip wrapping it" }) })));
|
|
50
|
+
const CustomTooltip = () => (_jsxs(Flex, { flexDirection: "column", width: "320px", p: "x1_5", children: [_jsx(Text, { fontSize: "smaller", fontWeight: "medium", textTransform: "uppercase", color: "midGrey", children: "Purchase Order" }), _jsx(Text, { color: "darkGrey", children: "PO 12389" }), _jsx(Divider, {}), _jsxs(DescriptionList, { children: [_jsx(DescriptionTerm, { children: "Customer" }), _jsx(DescriptionDetails, { children: "Nulogy" }), _jsx(DescriptionTerm, { children: _jsxs(Text, { display: "inline-flex", alignItems: "end", children: ["Order number", _jsx(Icon, { icon: "info", size: "x3", paddingLeft: "half" })] }) }), _jsx(DescriptionDetails, { children: _jsx(Link, { href: "/customer-details", children: "P12-90381-2039" }) }), _jsx(DescriptionTerm, { children: "Status" }), _jsx(DescriptionDetails, { children: _jsx(StatusIndicator, { type: "success", children: "Paid" }) }), _jsx(DescriptionTerm, { children: "Amount" }), _jsx(DescriptionDetails, { children: "$202.12" }), _jsx(DescriptionTerm, { children: "Amount after exchange" }), _jsx(DescriptionDetails, { children: _jsxs(Flex, { as: "span", alignItems: "center", gap: "half", children: ["US $202.12 ", _jsx(Icon, { icon: "arrowForward", color: "midGrey" }), " CA $287.43"] }) })] })] }));
|
|
123
51
|
export const WithCustomTooltip = {
|
|
124
|
-
render: () => (
|
|
125
|
-
React.createElement(Text, { fontSize: "small", color: "darkGrey" }, "You can embed custom components in the tooltip"),
|
|
126
|
-
React.createElement(Tooltip, { maxWidth: "340px", tooltip: React.createElement(CustomTooltip, null), defaultOpen: true },
|
|
127
|
-
React.createElement(Icon, { icon: "info", size: "x3", color: "darkGrey" })))),
|
|
52
|
+
render: () => (_jsxs(Flex, { alignItems: "center", gap: "half", children: [_jsx(Text, { fontSize: "small", color: "darkGrey", children: "You can embed custom components in the tooltip" }), _jsx(Tooltip, { maxWidth: "340px", tooltip: _jsx(CustomTooltip, {}), defaultOpen: true, children: _jsx(Icon, { icon: "info", size: "x3", color: "darkGrey" }) })] })),
|
|
128
53
|
name: "with custom tooltip",
|
|
129
54
|
};
|
|
@@ -5,7 +5,7 @@ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
|
5
5
|
type TooltipProps = TooltipPrimitive.TooltipProps & {
|
|
6
6
|
supportMobileTap?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare function Tooltip({ children, ...props }: TooltipProps):
|
|
8
|
+
declare function Tooltip({ children, ...props }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
declare namespace Tooltip {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
4
|
import { styled, keyframes, useTheme } from "styled-components";
|
|
@@ -21,12 +22,11 @@ const TooltipProvider = TooltipPrimitive.Provider;
|
|
|
21
22
|
function Tooltip({ children, ...props }) {
|
|
22
23
|
const [open, setOpen] = React.useState(props.defaultOpen ?? false);
|
|
23
24
|
const hasHover = useHasHover();
|
|
24
|
-
return (
|
|
25
|
-
React.createElement(TooltipTriggerContext.Provider, { value: {
|
|
25
|
+
return (_jsx(TooltipPrimitive.Root, { delayDuration: !hasHover && props.supportMobileTap ? 0 : props.delayDuration, onOpenChange: setOpen, open: open, children: _jsx(TooltipTriggerContext.Provider, { value: {
|
|
26
26
|
open,
|
|
27
27
|
setOpen,
|
|
28
28
|
supportMobileTap: props.supportMobileTap ?? false,
|
|
29
|
-
}
|
|
29
|
+
}, children: children }) }));
|
|
30
30
|
}
|
|
31
31
|
Tooltip.displayName = TooltipPrimitive.Root.displayName;
|
|
32
32
|
const TooltipTrigger = React.forwardRef(({ children, ...props }, ref) => {
|
|
@@ -42,7 +42,7 @@ const TooltipTrigger = React.forwardRef(({ children, ...props }, ref) => {
|
|
|
42
42
|
onClickProp?.(e);
|
|
43
43
|
}
|
|
44
44
|
}, [setOpen, hasHover, supportMobileTap, onClickProp]);
|
|
45
|
-
return (
|
|
45
|
+
return (_jsx(TooltipPrimitive.Trigger, { ref: ref, ...props, onClick: onClick, children: children }));
|
|
46
46
|
});
|
|
47
47
|
TooltipTrigger.displayName = TooltipPrimitive.Trigger.displayName;
|
|
48
48
|
const slideUpAndFade = keyframes `
|
|
@@ -120,9 +120,7 @@ const StyledArrow = styled(TooltipPrimitive.Arrow)(({ theme }) => ({
|
|
|
120
120
|
}));
|
|
121
121
|
const TooltipContent = React.forwardRef(({ sideOffset = 4, children, ...props }, ref) => {
|
|
122
122
|
const theme = useTheme();
|
|
123
|
-
return (
|
|
124
|
-
children,
|
|
125
|
-
React.createElement(StyledArrow, { width: theme.space.x1_5, height: theme.space.x0_75 })));
|
|
123
|
+
return (_jsxs(StyledContent, { ref: ref, sideOffset: sideOffset, ...props, children: [children, _jsx(StyledArrow, { width: theme.space.x1_5, height: theme.space.x0_75 })] }));
|
|
126
124
|
});
|
|
127
125
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
128
126
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -7,7 +7,7 @@ import { PageTitle } from "./components/PageTitle";
|
|
|
7
7
|
export interface TopBarProps {
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
-
export default function Root({ children }: TopBarProps):
|
|
10
|
+
export default function Root({ children }: TopBarProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare const TopBar: {
|
|
12
12
|
Root: typeof Root;
|
|
13
13
|
PageTitle: typeof PageTitle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { BackLink } from "./components/BackLink";
|
|
3
3
|
import { Menu } from "./components/Menu";
|
|
4
4
|
import { MenuItem } from "./components/MenuItem";
|
|
@@ -6,9 +6,7 @@ import { MenuItemLink } from "./components/MenuItemLink";
|
|
|
6
6
|
import { PageTitle } from "./components/PageTitle";
|
|
7
7
|
import { Header, Navigation, NavigationItemsList } from "./TopBar.styled";
|
|
8
8
|
export default function Root({ children }) {
|
|
9
|
-
return (
|
|
10
|
-
React.createElement(Navigation, null,
|
|
11
|
-
React.createElement(NavigationItemsList, null, children))));
|
|
9
|
+
return (_jsx(Header, { children: _jsx(Navigation, { children: _jsx(NavigationItemsList, { children: children }) }) }));
|
|
12
10
|
}
|
|
13
11
|
export const TopBar = {
|
|
14
12
|
Root,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
2
|
import { MaxWidthProps } from "styled-system";
|
|
3
3
|
import { StyledBackLink } from "../TopBar.styled";
|
|
4
4
|
interface BackLinkProps extends MaxWidthProps, ComponentProps<typeof StyledBackLink> {
|
|
5
5
|
}
|
|
6
|
-
export declare function BackLink({ children, maxWidth, ...props }: BackLinkProps):
|
|
6
|
+
export declare function BackLink({ children, maxWidth, ...props }: BackLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box } from "../../Box";
|
|
3
3
|
import useMediaQuery from "../../hooks/useMediaQuery";
|
|
4
4
|
import { Icon } from "../../Icon";
|
|
@@ -12,8 +12,5 @@ const BACK_LINK_MAX_WIDTH = {
|
|
|
12
12
|
};
|
|
13
13
|
export function BackLink({ children, maxWidth = BACK_LINK_MAX_WIDTH, ...props }) {
|
|
14
14
|
const md = useMediaQuery("phoneLandscape");
|
|
15
|
-
return (
|
|
16
|
-
React.createElement(StyledBackLink, { ...props, "data-testid": "topbar-back-link" },
|
|
17
|
-
React.createElement(Icon, { icon: "arrowBack" }),
|
|
18
|
-
md && (React.createElement(Text, { maxWidth: maxWidth, textOverflow: "ellipsis", overflow: "hidden", fontSize: "small" }, children)))));
|
|
15
|
+
return (_jsx(Box, { as: "li", flex: "1 1", children: _jsxs(StyledBackLink, { ...props, "data-testid": "topbar-back-link", children: [_jsx(Icon, { icon: "arrowBack" }), md && (_jsx(Text, { maxWidth: maxWidth, textOverflow: "ellipsis", overflow: "hidden", fontSize: "small", children: children }))] }) }));
|
|
19
16
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { DialogContent } from "@reach/dialog";
|
|
2
3
|
import { AnimatePresence } from "framer-motion";
|
|
3
4
|
import React from "react";
|
|
@@ -41,14 +42,9 @@ export function Menu({ children, defaultOpened = false, ...props }) {
|
|
|
41
42
|
}
|
|
42
43
|
setShowMenu((s) => !s);
|
|
43
44
|
}
|
|
44
|
-
return (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
setAnimationComplete(true);
|
|
50
|
-
}
|
|
51
|
-
}, onDismiss: close },
|
|
52
|
-
React.createElement(DialogContent, { "data-testid": "topbar-menu", "data-visible": animationComplete ? true : undefined, "aria-label": props["aria-label"] ?? t("menu options") },
|
|
53
|
-
React.createElement(MenuItemList, null, children)))))));
|
|
45
|
+
return (_jsxs(Flex, { justifyContent: "flex-end", as: "li", color: "black", flex: "1 1", children: [_jsx(MenuButton, { onClick: toggle, "data-testid": "topbar-menu-button", children: _jsx(Icon, { size: "x3", color: "midGrey", icon: showMenu ? "close" : "apps" }) }), _jsx(AnimatePresence, { children: showMenu && (_jsx(Overlay, { "data-testid": "topbar-menu-overlay", "data-visible": animationComplete ? "true" : undefined, initial: "hidden", animate: "visible", exit: "exit", variants: blurVariants, isOpen: showMenu, onAnimationComplete: () => {
|
|
46
|
+
if (showMenu) {
|
|
47
|
+
setAnimationComplete(true);
|
|
48
|
+
}
|
|
49
|
+
}, onDismiss: close, children: _jsx(DialogContent, { "data-testid": "topbar-menu", "data-visible": animationComplete ? true : undefined, "aria-label": props["aria-label"] ?? t("menu options"), children: _jsx(MenuItemList, { children: children }) }) })) })] }));
|
|
54
50
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare function MenuItem({ children }: React.PropsWithChildren<{}>):
|
|
2
|
+
export declare function MenuItem({ children }: React.PropsWithChildren<{}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { StyledMenuItem } from "../TopBar.styled";
|
|
3
3
|
const fadeInVariants = {
|
|
4
4
|
hidden: {
|
|
@@ -23,5 +23,5 @@ const fadeInVariants = {
|
|
|
23
23
|
},
|
|
24
24
|
};
|
|
25
25
|
export function MenuItem({ children }) {
|
|
26
|
-
return (
|
|
26
|
+
return (_jsx(StyledMenuItem, { "data-testid": "topbar-menu-item", initial: "hidden", animate: "visible", exit: "hidden", variants: fadeInVariants, children: children }));
|
|
27
27
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IconName } from "@nulogy/icons";
|
|
2
|
-
import
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
3
|
import { TileLink } from "../TopBar.styled";
|
|
4
4
|
export interface MenuItemLinkProps extends ComponentProps<typeof TileLink> {
|
|
5
5
|
title: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
icon: IconName;
|
|
8
8
|
}
|
|
9
|
-
export declare function MenuItemLink({ description, title, icon, ...props }: MenuItemLinkProps):
|
|
9
|
+
export declare function MenuItemLink({ description, title, icon, ...props }: MenuItemLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { motion } from "framer-motion";
|
|
2
|
-
import React from "react";
|
|
3
3
|
import { Flex } from "../../Flex";
|
|
4
4
|
import { Icon } from "../../Icon";
|
|
5
5
|
import { Text } from "../../Type";
|
|
6
6
|
import { TileLink } from "../TopBar.styled";
|
|
7
7
|
const MotionText = motion(Text);
|
|
8
8
|
export function MenuItemLink({ description, title, icon, ...props }) {
|
|
9
|
-
return (
|
|
10
|
-
React.createElement(Icon, { icon: icon, size: "x3" }),
|
|
11
|
-
React.createElement(Flex, { flexDirection: "column", justifyContent: "center" },
|
|
12
|
-
React.createElement(MotionText, { fontWeight: "medium", fontSize: "md", lineHeight: "base" }, title),
|
|
13
|
-
React.createElement(MotionText, { fontSize: "xs" }, description))));
|
|
9
|
+
return (_jsxs(TileLink, { ...props, children: [_jsx(Icon, { icon: icon, size: "x3" }), _jsxs(Flex, { flexDirection: "column", justifyContent: "center", children: [_jsx(MotionText, { fontWeight: "medium", fontSize: "md", lineHeight: "base", children: title }), _jsx(MotionText, { fontSize: "xs", children: description })] })] }));
|
|
14
10
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
2
|
import { StyledPageTitle } from "../TopBar.styled";
|
|
3
|
-
export declare function PageTitle({ children, ...props }: ComponentProps<typeof StyledPageTitle>):
|
|
3
|
+
export declare function PageTitle({ children, ...props }: ComponentProps<typeof StyledPageTitle>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { StyledPageTitle } from "../TopBar.styled";
|
|
3
3
|
export function PageTitle({ children, ...props }) {
|
|
4
|
-
return (
|
|
4
|
+
return (_jsx(StyledPageTitle, { "data-testid": "topbar-page-title", ...props, children: children }));
|
|
5
5
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
declare const _default: {
|
|
3
2
|
parameters: {
|
|
4
3
|
layout: string;
|
|
@@ -14,6 +13,6 @@ declare const _default: {
|
|
|
14
13
|
title: string;
|
|
15
14
|
};
|
|
16
15
|
export default _default;
|
|
17
|
-
export declare const WithNoLabel: () =>
|
|
18
|
-
export declare const WithACustomMaxWidth: () =>
|
|
19
|
-
export declare const WithARouterLink: () =>
|
|
16
|
+
export declare const WithNoLabel: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const WithACustomMaxWidth: () => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const WithARouterLink: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Link, BrowserRouter } from "react-router-dom";
|
|
3
3
|
import { TopBar } from "../TopBar";
|
|
4
4
|
import { legacy as theme } from "../../theme/theme";
|
|
@@ -18,23 +18,11 @@ export default {
|
|
|
18
18
|
},
|
|
19
19
|
title: "Components/TopBar/BackLink",
|
|
20
20
|
};
|
|
21
|
-
export const WithNoLabel = () => (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
large: "12ch",
|
|
30
|
-
extraLarge: "16ch",
|
|
31
|
-
} }, "Cycle counts"),
|
|
32
|
-
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
33
|
-
React.createElement(TopBar.Menu, null, menuItems.map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
|
|
34
|
-
React.createElement(TopBar.MenuItemLink, { ...props })))))));
|
|
35
|
-
export const WithARouterLink = () => (React.createElement(BrowserRouter, null,
|
|
36
|
-
React.createElement(TopBar.Root, null,
|
|
37
|
-
React.createElement(Link, { component: TopBar.BackLink, to: "/cycle-counts" }, "Cycle counts"),
|
|
38
|
-
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
39
|
-
React.createElement(TopBar.Menu, null, menuItems.map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
|
|
40
|
-
React.createElement(TopBar.MenuItemLink, { ...props }))))))));
|
|
21
|
+
export const WithNoLabel = () => (_jsxs(TopBar.Root, { children: [_jsx(TopBar.BackLink, { href: "/cycle-counts" }), _jsx(TopBar.PageTitle, { children: "Cycle count #3992" }), _jsx(TopBar.Menu, { children: menuItems.map((props) => (_jsx(TopBar.MenuItem, { ...props }, props.title))) })] }));
|
|
22
|
+
export const WithACustomMaxWidth = () => (_jsxs(TopBar.Root, { children: [_jsx(TopBar.BackLink, { href: "/cycle-counts", maxWidth: {
|
|
23
|
+
small: "10ch",
|
|
24
|
+
medium: "8ch",
|
|
25
|
+
large: "12ch",
|
|
26
|
+
extraLarge: "16ch",
|
|
27
|
+
}, children: "Cycle counts" }), _jsx(TopBar.PageTitle, { children: "Cycle count #3992" }), _jsx(TopBar.Menu, { children: menuItems.map((props) => (_jsx(TopBar.MenuItem, { children: _jsx(TopBar.MenuItemLink, { ...props }) }, props.title))) })] }));
|
|
28
|
+
export const WithARouterLink = () => (_jsx(BrowserRouter, { children: _jsxs(TopBar.Root, { children: [_jsx(Link, { component: TopBar.BackLink, to: "/cycle-counts", children: "Cycle counts" }), _jsx(TopBar.PageTitle, { children: "Cycle count #3992" }), _jsx(TopBar.Menu, { children: menuItems.map((props) => (_jsx(TopBar.MenuItem, { children: _jsx(TopBar.MenuItemLink, { ...props }) }, props.title))) })] }) }));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
declare const _default: {
|
|
3
2
|
parameters: {
|
|
4
3
|
layout: string;
|
|
@@ -15,8 +14,8 @@ declare const _default: {
|
|
|
15
14
|
title: string;
|
|
16
15
|
};
|
|
17
16
|
export default _default;
|
|
18
|
-
export declare const withDefaultOpenMenu: () =>
|
|
19
|
-
export declare const WithOneMenuItem: () =>
|
|
20
|
-
export declare const WithTwoItems: () =>
|
|
21
|
-
export declare const WithThreeItems: () =>
|
|
22
|
-
export declare const WithRouterLinks: () =>
|
|
17
|
+
export declare const withDefaultOpenMenu: () => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const WithOneMenuItem: () => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const WithTwoItems: () => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const WithThreeItems: () => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const WithRouterLinks: () => import("react/jsx-runtime").JSX.Element;
|