@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,10 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import DescriptionList from "../DescriptionList";
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
5
4
|
component: typeof DescriptionList;
|
|
6
5
|
};
|
|
7
6
|
export default _default;
|
|
8
|
-
export declare const Density: () =>
|
|
9
|
-
export declare const FontSize: () =>
|
|
10
|
-
export declare const LineHeight: () =>
|
|
7
|
+
export declare const Density: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const FontSize: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const LineHeight: () => 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 { Flex } from "../../Flex";
|
|
3
3
|
import { Heading1, Text } from "../../Type";
|
|
4
4
|
import DescriptionList from "../DescriptionList";
|
|
@@ -7,46 +7,7 @@ export default {
|
|
|
7
7
|
title: "Components/DescriptionList/Sizing",
|
|
8
8
|
component: DescriptionList,
|
|
9
9
|
};
|
|
10
|
-
const SizingDemo = ({ title, description, children, }) => (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
children));
|
|
15
|
-
export const Density = () => (React.createElement(SizingDemo, { title: "Density" },
|
|
16
|
-
React.createElement(Flex, { gap: "x4" },
|
|
17
|
-
React.createElement(Flex, { flexDirection: "column", gap: "x2", flex: 1 },
|
|
18
|
-
React.createElement(Text, { as: "h4", fontWeight: "bold" }, "Compact"),
|
|
19
|
-
React.createElement(DescriptionList, { layout: "stacked", density: "compact" },
|
|
20
|
-
React.createElement(SampleContent, null))),
|
|
21
|
-
React.createElement(Flex, { flexDirection: "column", gap: "x2", flex: 1 },
|
|
22
|
-
React.createElement(Text, { as: "h4", fontWeight: "bold" }, "Medium"),
|
|
23
|
-
React.createElement(DescriptionList, { layout: "stacked", density: "medium" },
|
|
24
|
-
React.createElement(SampleContent, null))),
|
|
25
|
-
React.createElement(Flex, { flexDirection: "column", gap: "x2", flex: 1 },
|
|
26
|
-
React.createElement(Text, { as: "h4", fontWeight: "bold" }, "Relaxed"),
|
|
27
|
-
React.createElement(DescriptionList, { layout: "stacked", density: "relaxed" },
|
|
28
|
-
React.createElement(SampleContent, null))))));
|
|
29
|
-
export const FontSize = () => (React.createElement(SizingDemo, { title: "Font Size" },
|
|
30
|
-
React.createElement(Flex, { gap: "x4", flexDirection: { extraSmall: "column", small: "row" } },
|
|
31
|
-
React.createElement(Flex, { flexDirection: "column", gap: "x2", flex: 1 },
|
|
32
|
-
React.createElement(Text, { as: "h4", fontWeight: "bold" }, "Small"),
|
|
33
|
-
React.createElement(DescriptionList, { layout: "stacked", fontSize: "small", lineHeight: "smallTextBase" },
|
|
34
|
-
React.createElement(SampleContent, null))),
|
|
35
|
-
React.createElement(Flex, { flexDirection: "column", gap: "x2", flex: 1 },
|
|
36
|
-
React.createElement(Text, { as: "h4", fontWeight: "bold" }, "Medium (Default)"),
|
|
37
|
-
React.createElement(DescriptionList, { layout: "stacked" },
|
|
38
|
-
React.createElement(SampleContent, null))),
|
|
39
|
-
React.createElement(Flex, { flexDirection: "column", gap: "x2", flex: 1 },
|
|
40
|
-
React.createElement(Text, { as: "h4", fontWeight: "bold" }, "Large"),
|
|
41
|
-
React.createElement(DescriptionList, { layout: "stacked", fontSize: "large", lineHeight: "heading3" },
|
|
42
|
-
React.createElement(SampleContent, null))))));
|
|
43
|
-
export const LineHeight = () => (React.createElement(SizingDemo, { title: "Line Height" },
|
|
44
|
-
React.createElement(Flex, { gap: "x4", flexDirection: { extraSmall: "column", small: "row" } },
|
|
45
|
-
React.createElement(Flex, { flexDirection: "column", gap: "x2", flex: 1 },
|
|
46
|
-
React.createElement(Text, { as: "h4", fontWeight: "bold" }, "Base"),
|
|
47
|
-
React.createElement(DescriptionList, { layout: "stacked", lineHeight: "base" },
|
|
48
|
-
React.createElement(SampleContent, null))),
|
|
49
|
-
React.createElement(Flex, { flexDirection: "column", gap: "x2", flex: 1 },
|
|
50
|
-
React.createElement(Text, { as: "h4", fontWeight: "bold" }, "Base Relaxed"),
|
|
51
|
-
React.createElement(DescriptionList, { layout: "stacked", lineHeight: "baseRelaxed" },
|
|
52
|
-
React.createElement(SampleContent, null))))));
|
|
10
|
+
const SizingDemo = ({ title, description, children, }) => (_jsxs(Flex, { flexDirection: "column", gap: "x4", children: [_jsxs(Flex, { flexDirection: "column", gap: "x1", children: [_jsx(Heading1, { compact: true, children: title }), description && _jsx(Text, { fontSize: "sm", children: description })] }), children] }));
|
|
11
|
+
export const Density = () => (_jsx(SizingDemo, { title: "Density", children: _jsxs(Flex, { gap: "x4", children: [_jsxs(Flex, { flexDirection: "column", gap: "x2", flex: 1, children: [_jsx(Text, { as: "h4", fontWeight: "bold", children: "Compact" }), _jsx(DescriptionList, { layout: "stacked", density: "compact", children: _jsx(SampleContent, {}) })] }), _jsxs(Flex, { flexDirection: "column", gap: "x2", flex: 1, children: [_jsx(Text, { as: "h4", fontWeight: "bold", children: "Medium" }), _jsx(DescriptionList, { layout: "stacked", density: "medium", children: _jsx(SampleContent, {}) })] }), _jsxs(Flex, { flexDirection: "column", gap: "x2", flex: 1, children: [_jsx(Text, { as: "h4", fontWeight: "bold", children: "Relaxed" }), _jsx(DescriptionList, { layout: "stacked", density: "relaxed", children: _jsx(SampleContent, {}) })] })] }) }));
|
|
12
|
+
export const FontSize = () => (_jsx(SizingDemo, { title: "Font Size", children: _jsxs(Flex, { gap: "x4", flexDirection: { extraSmall: "column", small: "row" }, children: [_jsxs(Flex, { flexDirection: "column", gap: "x2", flex: 1, children: [_jsx(Text, { as: "h4", fontWeight: "bold", children: "Small" }), _jsx(DescriptionList, { layout: "stacked", fontSize: "small", lineHeight: "smallTextBase", children: _jsx(SampleContent, {}) })] }), _jsxs(Flex, { flexDirection: "column", gap: "x2", flex: 1, children: [_jsx(Text, { as: "h4", fontWeight: "bold", children: "Medium (Default)" }), _jsx(DescriptionList, { layout: "stacked", children: _jsx(SampleContent, {}) })] }), _jsxs(Flex, { flexDirection: "column", gap: "x2", flex: 1, children: [_jsx(Text, { as: "h4", fontWeight: "bold", children: "Large" }), _jsx(DescriptionList, { layout: "stacked", fontSize: "large", lineHeight: "heading3", children: _jsx(SampleContent, {}) })] })] }) }));
|
|
13
|
+
export const LineHeight = () => (_jsx(SizingDemo, { title: "Line Height", children: _jsxs(Flex, { gap: "x4", flexDirection: { extraSmall: "column", small: "row" }, children: [_jsxs(Flex, { flexDirection: "column", gap: "x2", flex: 1, children: [_jsx(Text, { as: "h4", fontWeight: "bold", children: "Base" }), _jsx(DescriptionList, { layout: "stacked", lineHeight: "base", children: _jsx(SampleContent, {}) })] }), _jsxs(Flex, { flexDirection: "column", gap: "x2", flex: 1, children: [_jsx(Text, { as: "h4", fontWeight: "bold", children: "Base Relaxed" }), _jsx(DescriptionList, { layout: "stacked", lineHeight: "baseRelaxed", children: _jsx(SampleContent, {}) })] })] }) }));
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import DescriptionList from "../DescriptionList";
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
5
4
|
component: typeof DescriptionList;
|
|
6
5
|
};
|
|
7
6
|
export default _default;
|
|
8
|
-
export declare const ColumnSpanning: () =>
|
|
9
|
-
export declare const RowSpanning: () =>
|
|
10
|
-
export declare const ColumnAndRowSpanning: () =>
|
|
7
|
+
export declare const ColumnSpanning: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const RowSpanning: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const ColumnAndRowSpanning: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
2
3
|
import { Checkbox } from "../../Checkbox";
|
|
3
4
|
import { Flex } from "../../Flex";
|
|
4
5
|
import { Heading1 } from "../../Type";
|
|
@@ -12,68 +13,13 @@ export default {
|
|
|
12
13
|
};
|
|
13
14
|
export const ColumnSpanning = () => {
|
|
14
15
|
const [outlined, setOutlined] = useState(true);
|
|
15
|
-
return (
|
|
16
|
-
React.createElement(Flex, { flexDirection: "row", alignItems: "baseline", gap: "half" },
|
|
17
|
-
React.createElement(Heading1, { compact: true }, "Column Spanning"),
|
|
18
|
-
React.createElement(VerticalDivider, null),
|
|
19
|
-
React.createElement(Checkbox, { labelText: "Show group outline", checked: outlined, onChange: () => setOutlined(!outlined) })),
|
|
20
|
-
React.createElement(Flex, { flexDirection: "column", gap: "x2" },
|
|
21
|
-
React.createElement(DescriptionList, { layout: "stacked", columns: 2 },
|
|
22
|
-
React.createElement(DescriptionGroup, null,
|
|
23
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 1"),
|
|
24
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "Value 1")),
|
|
25
|
-
React.createElement(DescriptionGroup, null,
|
|
26
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 2"),
|
|
27
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "Value 2")),
|
|
28
|
-
React.createElement(DescriptionGroup, { columnSpan: 3 },
|
|
29
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 3"),
|
|
30
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "This value is very long and it will span 3 columns"))))));
|
|
16
|
+
return (_jsxs(Flex, { flexDirection: "column", gap: "x4", children: [_jsxs(Flex, { flexDirection: "row", alignItems: "baseline", gap: "half", children: [_jsx(Heading1, { compact: true, children: "Column Spanning" }), _jsx(VerticalDivider, {}), _jsx(Checkbox, { labelText: "Show group outline", checked: outlined, onChange: () => setOutlined(!outlined) })] }), _jsx(Flex, { flexDirection: "column", gap: "x2", children: _jsxs(DescriptionList, { layout: "stacked", columns: 2, children: [_jsxs(DescriptionGroup, { children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 1" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "Value 1" })] }), _jsxs(DescriptionGroup, { children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 2" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "Value 2" })] }), _jsxs(DescriptionGroup, { columnSpan: 3, children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 3" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "This value is very long and it will span 3 columns" })] })] }) })] }));
|
|
31
17
|
};
|
|
32
18
|
export const RowSpanning = () => {
|
|
33
19
|
const [outlined, setOutlined] = useState(true);
|
|
34
|
-
return (
|
|
35
|
-
React.createElement(Flex, { flexDirection: "row", alignItems: "baseline", gap: "half" },
|
|
36
|
-
React.createElement(Heading1, { compact: true }, "Row Spanning"),
|
|
37
|
-
React.createElement(VerticalDivider, null),
|
|
38
|
-
React.createElement(Checkbox, { labelText: "Show group outline", checked: outlined, onChange: () => setOutlined(!outlined) })),
|
|
39
|
-
React.createElement(DescriptionList, { layout: "stacked", columns: 3 },
|
|
40
|
-
React.createElement(DescriptionGroup, null,
|
|
41
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 1"),
|
|
42
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "Value 1")),
|
|
43
|
-
React.createElement(DescriptionGroup, null,
|
|
44
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 2"),
|
|
45
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "Value 2")),
|
|
46
|
-
React.createElement(DescriptionGroup, { rowSpan: 3 },
|
|
47
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 3"),
|
|
48
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "This value is very long and it will span 3 rows")),
|
|
49
|
-
React.createElement(DescriptionGroup, null,
|
|
50
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 4"),
|
|
51
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "Value 4")))));
|
|
20
|
+
return (_jsxs(Flex, { flexDirection: "column", gap: "x2", children: [_jsxs(Flex, { flexDirection: "row", alignItems: "baseline", gap: "half", children: [_jsx(Heading1, { compact: true, children: "Row Spanning" }), _jsx(VerticalDivider, {}), _jsx(Checkbox, { labelText: "Show group outline", checked: outlined, onChange: () => setOutlined(!outlined) })] }), _jsxs(DescriptionList, { layout: "stacked", columns: 3, children: [_jsxs(DescriptionGroup, { children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 1" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "Value 1" })] }), _jsxs(DescriptionGroup, { children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 2" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "Value 2" })] }), _jsxs(DescriptionGroup, { rowSpan: 3, children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 3" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "This value is very long and it will span 3 rows" })] }), _jsxs(DescriptionGroup, { children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 4" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "Value 4" })] })] })] }));
|
|
52
21
|
};
|
|
53
22
|
export const ColumnAndRowSpanning = () => {
|
|
54
23
|
const [outlined, setOutlined] = useState(true);
|
|
55
|
-
return (
|
|
56
|
-
React.createElement(Flex, { flexDirection: "row", alignItems: "baseline", gap: "half" },
|
|
57
|
-
React.createElement(Heading1, { compact: true }, "Column and Row Spanning"),
|
|
58
|
-
React.createElement(VerticalDivider, null),
|
|
59
|
-
React.createElement(Checkbox, { labelText: "Show group outline", checked: outlined, onChange: () => setOutlined(!outlined) })),
|
|
60
|
-
React.createElement(DescriptionList, { layout: "stacked", columns: 3 },
|
|
61
|
-
React.createElement(DescriptionGroup, null,
|
|
62
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 1"),
|
|
63
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "Value 1")),
|
|
64
|
-
React.createElement(DescriptionGroup, null,
|
|
65
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 2"),
|
|
66
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "Value 2")),
|
|
67
|
-
React.createElement(DescriptionGroup, null,
|
|
68
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 3"),
|
|
69
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "Value 3")),
|
|
70
|
-
React.createElement(DescriptionGroup, { rowSpan: 2, columnSpan: 2 },
|
|
71
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 4"),
|
|
72
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "This value spans both rows and columns")),
|
|
73
|
-
React.createElement(DescriptionGroup, null,
|
|
74
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 5"),
|
|
75
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "Value 5")),
|
|
76
|
-
React.createElement(DescriptionGroup, null,
|
|
77
|
-
React.createElement(OutlinedDt, { "$outlined": outlined }, "Key 6"),
|
|
78
|
-
React.createElement(OutlinedDd, { "$outlined": outlined }, "Value 6")))));
|
|
24
|
+
return (_jsxs(Flex, { flexDirection: "column", gap: "x2", children: [_jsxs(Flex, { flexDirection: "row", alignItems: "baseline", gap: "half", children: [_jsx(Heading1, { compact: true, children: "Column and Row Spanning" }), _jsx(VerticalDivider, {}), _jsx(Checkbox, { labelText: "Show group outline", checked: outlined, onChange: () => setOutlined(!outlined) })] }), _jsxs(DescriptionList, { layout: "stacked", columns: 3, children: [_jsxs(DescriptionGroup, { children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 1" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "Value 1" })] }), _jsxs(DescriptionGroup, { children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 2" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "Value 2" })] }), _jsxs(DescriptionGroup, { children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 3" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "Value 3" })] }), _jsxs(DescriptionGroup, { rowSpan: 2, columnSpan: 2, children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 4" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "This value spans both rows and columns" })] }), _jsxs(DescriptionGroup, { children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 5" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "Value 5" })] }), _jsxs(DescriptionGroup, { children: [_jsx(OutlinedDt, { "$outlined": outlined, children: "Key 6" }), _jsx(OutlinedDd, { "$outlined": outlined, children: "Value 6" })] })] })] }));
|
|
79
25
|
};
|
|
@@ -14,4 +14,4 @@ export declare const OutlinedDd: import("styled-components/dist/types").IStyledC
|
|
|
14
14
|
export declare const DashedBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(Record<string, unknown> & {
|
|
15
15
|
children?: React.ReactNode | undefined;
|
|
16
16
|
}) | (Omit<Record<string, unknown>, "ref"> & React.RefAttributes<React.Component<Record<string, unknown>, any, any>>), import("styled-components/dist/types").BaseObject>> & (string & (Omit<React.ComponentClass<Record<string, unknown>, any>, keyof React.Component<any, {}, any>> | Omit<React.FunctionComponent<Record<string, unknown>>, keyof React.Component<any, {}, any>>));
|
|
17
|
-
export declare const SampleContent: () =>
|
|
17
|
+
export declare const SampleContent: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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 { transparentize } from "polished";
|
|
4
4
|
import { Box } from "../../Box";
|
|
@@ -29,29 +29,4 @@ export const OutlinedDd = styled(DescriptionDetails)(({ $outlined, $highlighted,
|
|
|
29
29
|
transition: "background-color 0.25s ease-in-out",
|
|
30
30
|
}));
|
|
31
31
|
export const DashedBox = dashed(Box);
|
|
32
|
-
export const SampleContent = () => (
|
|
33
|
-
React.createElement(DescriptionGroup, null,
|
|
34
|
-
React.createElement(DescriptionTerm, null, "Customer"),
|
|
35
|
-
React.createElement(DescriptionDetails, null, "Nulogy")),
|
|
36
|
-
React.createElement(DescriptionGroup, null,
|
|
37
|
-
React.createElement(DescriptionTerm, null,
|
|
38
|
-
React.createElement(Text, { display: "inline-flex", alignItems: "center" },
|
|
39
|
-
"Order number",
|
|
40
|
-
React.createElement(Tooltip, { tooltip: "The unique identifier assigned to this order when it was placed by the customer." },
|
|
41
|
-
React.createElement(Icon, { icon: "info", size: "x3", paddingLeft: "half" })))),
|
|
42
|
-
React.createElement(DescriptionDetails, null,
|
|
43
|
-
React.createElement(Link, { href: "/customer-details" }, "P12-90381-2039"))),
|
|
44
|
-
React.createElement(DescriptionGroup, null,
|
|
45
|
-
React.createElement(DescriptionTerm, null, "Status"),
|
|
46
|
-
React.createElement(DescriptionDetails, null,
|
|
47
|
-
React.createElement(StatusIndicator, { type: "success" }, "Paid"))),
|
|
48
|
-
React.createElement(DescriptionGroup, null,
|
|
49
|
-
React.createElement(DescriptionTerm, null, "Amount"),
|
|
50
|
-
React.createElement(DescriptionDetails, null, "$202.12")),
|
|
51
|
-
React.createElement(DescriptionGroup, null,
|
|
52
|
-
React.createElement(DescriptionTerm, null, "Amount after exchange"),
|
|
53
|
-
React.createElement(DescriptionDetails, null,
|
|
54
|
-
React.createElement(Flex, { as: "span", alignItems: "center", gap: "half" },
|
|
55
|
-
"US $202.12 ",
|
|
56
|
-
React.createElement(Icon, { icon: "arrowForward", color: "midGrey" }),
|
|
57
|
-
" CA $287.43")))));
|
|
32
|
+
export const SampleContent = () => (_jsxs(_Fragment, { children: [_jsxs(DescriptionGroup, { children: [_jsx(DescriptionTerm, { children: "Customer" }), _jsx(DescriptionDetails, { children: "Nulogy" })] }), _jsxs(DescriptionGroup, { children: [_jsx(DescriptionTerm, { children: _jsxs(Text, { display: "inline-flex", alignItems: "center", children: ["Order number", _jsx(Tooltip, { tooltip: "The unique identifier assigned to this order when it was placed by the customer.", children: _jsx(Icon, { icon: "info", size: "x3", paddingLeft: "half" }) })] }) }), _jsx(DescriptionDetails, { children: _jsx(Link, { href: "/customer-details", children: "P12-90381-2039" }) })] }), _jsxs(DescriptionGroup, { children: [_jsx(DescriptionTerm, { children: "Status" }), _jsx(DescriptionDetails, { children: _jsx(StatusIndicator, { type: "success", children: "Paid" }) })] }), _jsxs(DescriptionGroup, { children: [_jsx(DescriptionTerm, { children: "Amount" }), _jsx(DescriptionDetails, { children: "$202.12" })] }), _jsxs(DescriptionGroup, { children: [_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"] }) })] })] }));
|
|
@@ -4,7 +4,7 @@ declare const _default: {
|
|
|
4
4
|
component: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, import("./Divider").DividerProps>> & string;
|
|
5
5
|
};
|
|
6
6
|
export default _default;
|
|
7
|
-
export declare const Default: () =>
|
|
8
|
-
export declare const Secondary: () =>
|
|
9
|
-
export declare const WithCustomColourAndSpacing: () =>
|
|
10
|
-
export declare const WithCustomProperties: () =>
|
|
7
|
+
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Secondary: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const WithCustomColourAndSpacing: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const WithCustomProperties: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from "../Type";
|
|
3
3
|
import { Divider } from ".";
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Divider",
|
|
6
6
|
component: Divider,
|
|
7
7
|
};
|
|
8
|
-
export const Default = () => (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export const Secondary = () => (React.createElement("div", null,
|
|
13
|
-
React.createElement(Text, null, "Section A"),
|
|
14
|
-
React.createElement(Divider, { secondary: true }),
|
|
15
|
-
React.createElement(Text, null, "Section B")));
|
|
16
|
-
export const WithCustomColourAndSpacing = () => (React.createElement("div", null,
|
|
17
|
-
React.createElement(Text, null, "Section A"),
|
|
18
|
-
React.createElement(Divider, { borderColor: "darkBlue", my: "x1" }),
|
|
19
|
-
React.createElement(Text, null, "Section B")));
|
|
20
|
-
export const WithCustomProperties = () => (React.createElement("div", null,
|
|
21
|
-
React.createElement(Text, null, "Section A"),
|
|
22
|
-
React.createElement(Divider, { borderColor: "none", height: "2px", backgroundImage: "linear-gradient(90deg, hsl(292deg 100% 97%) 0%, hsl(329deg 100% 19%) 17%, hsl(343deg 100% 36%) 33%, hsl(0deg 100% 50%) 50%, hsl(345deg 100% 69%) 67%, hsl(325deg 100% 84%) 83%, hsl(292deg 100% 97%) 100%);" }),
|
|
23
|
-
React.createElement(Text, null, "Section B")));
|
|
8
|
+
export const Default = () => (_jsxs("div", { children: [_jsx(Text, { children: "Section A" }), _jsx(Divider, {}), _jsx(Text, { children: "Section B" })] }));
|
|
9
|
+
export const Secondary = () => (_jsxs("div", { children: [_jsx(Text, { children: "Section A" }), _jsx(Divider, { secondary: true }), _jsx(Text, { children: "Section B" })] }));
|
|
10
|
+
export const WithCustomColourAndSpacing = () => (_jsxs("div", { children: [_jsx(Text, { children: "Section A" }), _jsx(Divider, { borderColor: "darkBlue", my: "x1" }), _jsx(Text, { children: "Section B" })] }));
|
|
11
|
+
export const WithCustomProperties = () => (_jsxs("div", { children: [_jsx(Text, { children: "Section A" }), _jsx(Divider, { borderColor: "none", height: "2px", backgroundImage: "linear-gradient(90deg, hsl(292deg 100% 97%) 0%, hsl(329deg 100% 19%) 17%, hsl(343deg 100% 36%) 33%, hsl(0deg 100% 50%) 50%, hsl(345deg 100% 69%) 67%, hsl(325deg 100% 84%) 83%, hsl(292deg 100% 97%) 100%);" }), _jsx(Text, { children: "Section B" })] }));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import React, { useMemo } from "react";
|
|
2
3
|
import propTypes from "@styled-system/prop-types";
|
|
3
4
|
import { IconicButton } from "../Button";
|
|
@@ -12,25 +13,24 @@ const transformPropsToModifiers = ({ boundariesElement }) => ({
|
|
|
12
13
|
...DEFAULT_POPPER_MODIFIERS,
|
|
13
14
|
boundariesElement,
|
|
14
15
|
});
|
|
15
|
-
const DropdownMenu = React.forwardRef(({ trigger = () =>
|
|
16
|
+
const DropdownMenu = React.forwardRef(({ trigger = () => _jsx(IconicButton, { icon: "more" }), children, showArrow = true, variant, disabled, defaultOpen, backgroundColor = "white", placement = "bottom-start", className, id, boundariesElement = "viewport", showDelay = "100", hideDelay = "200", openAriaLabel, closeAriaLabel, openOnHover = false, ...props }, ref) => {
|
|
16
17
|
const spaceProps = getSubset(props, propTypes.space);
|
|
17
18
|
const restProps = omitSubset(props, propTypes.space);
|
|
18
19
|
const modifiers = useMemo(() => {
|
|
19
20
|
return transformPropsToModifiers({ boundariesElement });
|
|
20
21
|
}, [boundariesElement]);
|
|
21
22
|
const componentVariant = useComponentVariant(variant);
|
|
22
|
-
return (
|
|
23
|
+
return (_jsx(Popper, { trigger: React.cloneElement(trigger(), {
|
|
23
24
|
type: "button",
|
|
24
25
|
disabled: disabled ? true : null,
|
|
25
26
|
"aria-haspopup": true,
|
|
26
27
|
...spaceProps,
|
|
27
|
-
}), showDelay: showDelay, hideDelay: hideDelay, popperPlacement: placement, defaultOpen: defaultOpen, showArrow: showArrow, openOnClick: !openOnHover, ref: ref, openOnHover: openOnHover, modifiers: modifiers, backgroundColor: backgroundColor, borderColor: backgroundColor, openAriaLabel: openAriaLabel, closeAriaLabel: closeAriaLabel
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
}))));
|
|
28
|
+
}), showDelay: showDelay, hideDelay: hideDelay, popperPlacement: placement, defaultOpen: defaultOpen, showArrow: showArrow, openOnClick: !openOnHover, ref: ref, openOnHover: openOnHover, modifiers: modifiers, backgroundColor: backgroundColor, borderColor: backgroundColor, openAriaLabel: openAriaLabel, closeAriaLabel: closeAriaLabel, children: _jsx(DropdownMenuContainer, { className: className, id: id, backgroundColor: backgroundColor, showArrow: showArrow, ...restProps, children: typeof children === "function"
|
|
29
|
+
? children
|
|
30
|
+
: React.Children.map(children, (child) => {
|
|
31
|
+
if (React.isValidElement(child)) {
|
|
32
|
+
return React.cloneElement(child, { size: componentVariant, ...child.props }, child.props.children);
|
|
33
|
+
}
|
|
34
|
+
}) }) }));
|
|
35
35
|
});
|
|
36
36
|
export default DropdownMenu;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
declare const _default: {
|
|
3
2
|
title: string;
|
|
4
3
|
chromatic: {
|
|
@@ -7,53 +6,53 @@ declare const _default: {
|
|
|
7
6
|
};
|
|
8
7
|
export default _default;
|
|
9
8
|
export declare const _DropdownMenu: {
|
|
10
|
-
():
|
|
9
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
story: {
|
|
12
11
|
name: string;
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
14
|
export declare const WithCustomTrigger: {
|
|
16
|
-
():
|
|
15
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
17
16
|
story: {
|
|
18
17
|
name: string;
|
|
19
18
|
};
|
|
20
19
|
};
|
|
21
20
|
export declare const WithCustomColors: {
|
|
22
|
-
():
|
|
21
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
23
22
|
story: {
|
|
24
23
|
name: string;
|
|
25
24
|
};
|
|
26
25
|
};
|
|
27
26
|
export declare const WithButtonClosingMenu: {
|
|
28
|
-
():
|
|
27
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
29
28
|
story: {
|
|
30
29
|
name: string;
|
|
31
30
|
};
|
|
32
31
|
};
|
|
33
|
-
export declare const WithCustomLink: () =>
|
|
34
|
-
export declare const WithCustomText: () =>
|
|
32
|
+
export declare const WithCustomLink: () => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const WithCustomText: () => import("react/jsx-runtime").JSX.Element;
|
|
35
34
|
export declare const SetToDefaultOpen: {
|
|
36
|
-
():
|
|
35
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
37
36
|
story: {
|
|
38
37
|
name: string;
|
|
39
38
|
};
|
|
40
39
|
};
|
|
41
40
|
export declare const WithSubmenu: {
|
|
42
|
-
():
|
|
41
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
43
42
|
story: {
|
|
44
43
|
name: string;
|
|
45
44
|
};
|
|
46
45
|
};
|
|
47
|
-
export declare const WithVisitedLinks: () =>
|
|
46
|
+
export declare const WithVisitedLinks: () => import("react/jsx-runtime").JSX.Element;
|
|
48
47
|
export declare const SetToDisabled: {
|
|
49
|
-
():
|
|
48
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
50
49
|
story: {
|
|
51
50
|
name: string;
|
|
52
51
|
};
|
|
53
52
|
};
|
|
54
|
-
export declare const WithConditionallyRenderedMenuItems: () =>
|
|
53
|
+
export declare const WithConditionallyRenderedMenuItems: () => import("react/jsx-runtime").JSX.Element;
|
|
55
54
|
export declare const WithRenderProps: {
|
|
56
|
-
():
|
|
55
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
57
56
|
story: {
|
|
58
57
|
name: string;
|
|
59
58
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { DropdownMenu, DropdownLink, DropdownButton, DropdownItem, DropdownText, Button, Flex, Text, Icon, } from "../index";
|
|
3
3
|
const customColors = {
|
|
4
4
|
color: "white",
|
|
@@ -11,75 +11,43 @@ export default {
|
|
|
11
11
|
diffThreshold: 0.4,
|
|
12
12
|
},
|
|
13
13
|
};
|
|
14
|
-
export const _DropdownMenu = () => (
|
|
15
|
-
React.createElement(DropdownLink, { href: "/never_been" }, "Dropdown Link"),
|
|
16
|
-
React.createElement(DropdownButton, { onClick: () => { } }, "Dropdown Button")));
|
|
14
|
+
export const _DropdownMenu = () => (_jsxs(DropdownMenu, { openAriaLabel: "open dropdown", closeAriaLabel: "close dropdown", children: [_jsx(DropdownLink, { href: "/never_been", children: "Dropdown Link" }), _jsx(DropdownButton, { onClick: () => { }, children: "Dropdown Button" })] }));
|
|
17
15
|
_DropdownMenu.story = {
|
|
18
16
|
name: "DropdownMenu",
|
|
19
17
|
};
|
|
20
|
-
export const WithCustomTrigger = () => (
|
|
21
|
-
React.createElement(DropdownLink, { href: "/never_been" }, "Dropdown Link"),
|
|
22
|
-
React.createElement(DropdownButton, { onClick: () => { } }, "Dropdown Button")));
|
|
18
|
+
export const WithCustomTrigger = () => (_jsxs(DropdownMenu, { openAriaLabel: "open dropdown", closeAriaLabel: "close dropdown", trigger: () => _jsx(Button, { children: "Custom Trigger" }), children: [_jsx(DropdownLink, { href: "/never_been", children: "Dropdown Link" }), _jsx(DropdownButton, { onClick: () => { }, children: "Dropdown Button" })] }));
|
|
23
19
|
WithCustomTrigger.story = {
|
|
24
20
|
name: "with custom trigger",
|
|
25
21
|
};
|
|
26
|
-
export const WithCustomColors = () => (
|
|
27
|
-
React.createElement(DropdownLink, { href: "/never_been", ...customColors }, "Dropdown Link"),
|
|
28
|
-
React.createElement(DropdownButton, { onClick: () => { }, ...customColors }, "Dropdown Button")));
|
|
22
|
+
export const WithCustomColors = () => (_jsxs(DropdownMenu, { defaultOpen: true, backgroundColor: "blackBlue", openAriaLabel: "open dropdown", closeAriaLabel: "close dropdown", children: [_jsx(DropdownLink, { href: "/never_been", ...customColors, children: "Dropdown Link" }), _jsx(DropdownButton, { onClick: () => { }, ...customColors, children: "Dropdown Button" })] }));
|
|
29
23
|
WithCustomColors.story = {
|
|
30
24
|
name: "with custom colors",
|
|
31
25
|
};
|
|
32
|
-
export const WithButtonClosingMenu = () => (
|
|
26
|
+
export const WithButtonClosingMenu = () => (_jsx(DropdownMenu, { openAriaLabel: "open dropdown", closeAriaLabel: "close dropdown", children: ({ closeMenu }) => _jsx(DropdownButton, { onClick: closeMenu, children: "Dropdown Button" }) }));
|
|
33
27
|
WithButtonClosingMenu.story = {
|
|
34
28
|
name: "with button closing menu",
|
|
35
29
|
};
|
|
36
|
-
export const WithCustomLink = () => (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export const WithCustomText = () => (React.createElement(DropdownMenu, { defaultOpen: true },
|
|
40
|
-
React.createElement(DropdownText, null, "Custom Text")));
|
|
41
|
-
export const SetToDefaultOpen = () => (React.createElement(DropdownMenu, { defaultOpen: true, openAriaLabel: "open dropdown", closeAriaLabel: "close dropdown" },
|
|
42
|
-
React.createElement(DropdownLink, { href: "/never_been" }, "Dropdown Link"),
|
|
43
|
-
React.createElement(DropdownButton, { onClick: () => { } }, "Dropdown Button"),
|
|
44
|
-
React.createElement(DropdownItem, null,
|
|
45
|
-
React.createElement("a", { href: "/never_been", style: { textDecoration: "none" } }, "Custom Link Component")),
|
|
46
|
-
React.createElement(DropdownText, null, "Custom Text")));
|
|
30
|
+
export const WithCustomLink = () => (_jsx(DropdownMenu, { defaultOpen: true, openAriaLabel: "open dropdown", closeAriaLabel: "close dropdown", children: _jsx(DropdownItem, { children: _jsx("a", { href: "/never_been", children: "Custom Link Component" }) }) }));
|
|
31
|
+
export const WithCustomText = () => (_jsx(DropdownMenu, { defaultOpen: true, children: _jsx(DropdownText, { children: "Custom Text" }) }));
|
|
32
|
+
export const SetToDefaultOpen = () => (_jsxs(DropdownMenu, { defaultOpen: true, openAriaLabel: "open dropdown", closeAriaLabel: "close dropdown", children: [_jsx(DropdownLink, { href: "/never_been", children: "Dropdown Link" }), _jsx(DropdownButton, { onClick: () => { }, children: "Dropdown Button" }), _jsx(DropdownItem, { children: _jsx("a", { href: "/never_been", style: { textDecoration: "none" }, children: "Custom Link Component" }) }), _jsx(DropdownText, { children: "Custom Text" })] }));
|
|
47
33
|
SetToDefaultOpen.story = {
|
|
48
34
|
name: "set to defaultOpen",
|
|
49
35
|
};
|
|
50
|
-
export const WithSubmenu = () => (
|
|
51
|
-
React.createElement(DropdownLink, { href: "/never_been" }, "Dropdown Link"),
|
|
52
|
-
React.createElement(DropdownButton, { onClick: () => { } }, "Dropdown Button"),
|
|
53
|
-
React.createElement(DropdownMenu, { trigger: () => (React.createElement(DropdownButton, null,
|
|
54
|
-
React.createElement(Flex, { justifyContent: "space-between" },
|
|
55
|
-
React.createElement(Text, null, "Submenu"),
|
|
56
|
-
React.createElement(Icon, { icon: "rightArrow", title: "right arrow" })))), placement: "left-start", showArrow: false, openOnHover: true, openAriaLabel: "open sub dropdown", closeAriaLabel: "close sub dropdown" },
|
|
57
|
-
React.createElement(DropdownButton, { onClick: () => { } }, "Inner Dropdown Button"),
|
|
58
|
-
React.createElement(DropdownText, null, " Inner Custom Text"))));
|
|
36
|
+
export const WithSubmenu = () => (_jsxs(DropdownMenu, { openAriaLabel: "open dropdown", closeAriaLabel: "close dropdown", children: [_jsx(DropdownLink, { href: "/never_been", children: "Dropdown Link" }), _jsx(DropdownButton, { onClick: () => { }, children: "Dropdown Button" }), _jsxs(DropdownMenu, { trigger: () => (_jsx(DropdownButton, { children: _jsxs(Flex, { justifyContent: "space-between", children: [_jsx(Text, { children: "Submenu" }), _jsx(Icon, { icon: "rightArrow", title: "right arrow" })] }) })), placement: "left-start", showArrow: false, openOnHover: true, openAriaLabel: "open sub dropdown", closeAriaLabel: "close sub dropdown", children: [_jsx(DropdownButton, { onClick: () => { }, children: "Inner Dropdown Button" }), _jsx(DropdownText, { children: " Inner Custom Text" })] })] }));
|
|
59
37
|
WithSubmenu.story = {
|
|
60
38
|
name: "with submenu",
|
|
61
39
|
};
|
|
62
|
-
export const WithVisitedLinks = () => (
|
|
63
|
-
|
|
64
|
-
React.createElement(DropdownItem, null,
|
|
65
|
-
React.createElement("a", { href: "/", style: { textDecoration: "none" } }, "Custom Link Component"))));
|
|
66
|
-
export const SetToDisabled = () => (React.createElement(DropdownMenu, { disabled: true, openAriaLabel: "open dropdown", closeAriaLabel: "close dropdown" },
|
|
67
|
-
React.createElement(DropdownLink, { href: "/never_been" }, "Dropdown Link"),
|
|
68
|
-
React.createElement(DropdownButton, { onClick: () => { } }, "Dropdown Button")));
|
|
40
|
+
export const WithVisitedLinks = () => (_jsxs(DropdownMenu, { defaultOpen: true, openAriaLabel: "open dropdown", closeAriaLabel: "close dropdown", children: [_jsx(DropdownLink, { href: "/", children: "Dropdown Link" }), _jsx(DropdownItem, { children: _jsx("a", { href: "/", style: { textDecoration: "none" }, children: "Custom Link Component" }) })] }));
|
|
41
|
+
export const SetToDisabled = () => (_jsxs(DropdownMenu, { disabled: true, openAriaLabel: "open dropdown", closeAriaLabel: "close dropdown", children: [_jsx(DropdownLink, { href: "/never_been", children: "Dropdown Link" }), _jsx(DropdownButton, { onClick: () => { }, children: "Dropdown Button" })] }));
|
|
69
42
|
SetToDisabled.story = {
|
|
70
43
|
name: "Set to disabled",
|
|
71
44
|
};
|
|
72
45
|
export const WithConditionallyRenderedMenuItems = () => {
|
|
73
46
|
const showItemB = false;
|
|
74
47
|
const showItemC = true;
|
|
75
|
-
return (
|
|
76
|
-
React.createElement(DropdownButton, { onClick: () => { } }, "Item A"),
|
|
77
|
-
showItemB && React.createElement(DropdownButton, { onClick: () => { } }, "Conditional Item B"),
|
|
78
|
-
showItemC && React.createElement(DropdownButton, { onClick: () => { } }, "Conditional Item C")));
|
|
48
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownButton, { onClick: () => { }, children: "Item A" }), showItemB && _jsx(DropdownButton, { onClick: () => { }, children: "Conditional Item B" }), showItemC && _jsx(DropdownButton, { onClick: () => { }, children: "Conditional Item C" })] }));
|
|
79
49
|
};
|
|
80
|
-
export const WithRenderProps = () => (
|
|
81
|
-
React.createElement(DropdownButton, { onClick: (e) => closeMenu(e) }, "Close menu"),
|
|
82
|
-
React.createElement(DropdownButton, { onClick: (e) => openMenu(e) }, "Open menu")))));
|
|
50
|
+
export const WithRenderProps = () => (_jsx(DropdownMenu, { children: ({ closeMenu, openMenu }) => (_jsxs(_Fragment, { children: [_jsx(DropdownButton, { onClick: (e) => closeMenu(e), children: "Close menu" }), _jsx(DropdownButton, { onClick: (e) => openMenu(e), children: "Open menu" })] })) }));
|
|
83
51
|
WithRenderProps.story = {
|
|
84
52
|
name: "With render props",
|
|
85
53
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { TextProps } from "../Type";
|
|
2
|
-
declare const DropdownText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "textTransform" | "disabled" | keyof import("react").HTMLAttributes<HTMLParagraphElement> | "inline" | "compact" | keyof import("
|
|
2
|
+
declare const DropdownText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "textTransform" | "disabled" | keyof import("react").HTMLAttributes<HTMLParagraphElement> | "inline" | "compact" | keyof import("..").StyledProps> & import("react").HTMLAttributes<HTMLParagraphElement> & {
|
|
3
3
|
variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
|
|
4
4
|
inline?: boolean;
|
|
5
5
|
compact?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
textTransform?: "none" | "inherit" | "initial" | "-moz-initial" | "revert" | "unset" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase" | undefined;
|
|
8
8
|
fontSize?: string;
|
|
9
|
-
} & import("
|
|
9
|
+
} & import("..").StyledProps, "ref"> & {
|
|
10
10
|
ref?: import("react").Ref<HTMLParagraphElement>;
|
|
11
11
|
}, TextProps>> & string;
|
|
12
12
|
export default DropdownText;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { FieldLabelProps } from "./FieldLabel.type";
|
|
3
|
-
export default function FieldLabel({ labelText, requirementText, helpText, hint, children, ...props }: FieldLabelProps):
|
|
2
|
+
export default function FieldLabel({ labelText, requirementText, helpText, hint, children, ...props }: FieldLabelProps): 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 { Box } from "../Box";
|
|
3
3
|
import { InlineIcon } from "../Icon";
|
|
4
4
|
import { Tooltip } from "../Tooltip";
|
|
@@ -7,13 +7,5 @@ import Label from "./Label";
|
|
|
7
7
|
import RequirementText from "./RequirementText";
|
|
8
8
|
import { LabelContent, LabelText } from "./LabelText";
|
|
9
9
|
export default function FieldLabel({ labelText, requirementText, helpText, hint, children, ...props }) {
|
|
10
|
-
return (
|
|
11
|
-
React.createElement(Box, { mb: children && "x1", "data-testid": "field-label" },
|
|
12
|
-
React.createElement(LabelContent, { "data-testid": "label-content" },
|
|
13
|
-
React.createElement(LabelText, { "data-testid": "label-text" }, labelText),
|
|
14
|
-
requirementText && (React.createElement(RequirementText, { "data-testid": "requirement-text", ml: "none" }, requirementText)),
|
|
15
|
-
hint && (React.createElement(Tooltip, { tooltip: hint },
|
|
16
|
-
React.createElement(InlineIcon, { color: "darkGrey", size: "x2", icon: "info" })))),
|
|
17
|
-
helpText && React.createElement(HelpText, { "data-testid": "help-text" }, helpText)),
|
|
18
|
-
children));
|
|
10
|
+
return (_jsxs(Label, { display: "block", ...props, children: [_jsxs(Box, { mb: children && "x1", "data-testid": "field-label", children: [_jsxs(LabelContent, { "data-testid": "label-content", children: [_jsx(LabelText, { "data-testid": "label-text", children: labelText }), requirementText && (_jsx(RequirementText, { "data-testid": "requirement-text", ml: "none", children: requirementText })), hint && (_jsx(Tooltip, { tooltip: hint, children: _jsx(InlineIcon, { color: "darkGrey", size: "x2", icon: "info" }) }))] }), helpText && _jsx(HelpText, { "data-testid": "help-text", children: helpText })] }), children] }));
|
|
19
11
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
declare const _default: {
|
|
3
2
|
title: string;
|
|
4
3
|
};
|
|
5
4
|
export default _default;
|
|
6
5
|
export declare const _FieldLabel: {
|
|
7
|
-
():
|
|
6
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
story: {
|
|
9
8
|
name: string;
|
|
10
9
|
};
|
|
11
10
|
};
|
|
12
|
-
export declare const WithHelpText: () =>
|
|
13
|
-
export declare const WithRequirementText: () =>
|
|
14
|
-
export declare const WithAllAdditionalText: () =>
|
|
15
|
-
export declare const WithAssociatedCustomInputComponent: () =>
|
|
16
|
-
export declare const WithHint: () =>
|
|
17
|
-
export declare const WithRangeOfInputComponents: () =>
|
|
11
|
+
export declare const WithHelpText: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const WithRequirementText: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const WithAllAdditionalText: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const WithAssociatedCustomInputComponent: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const WithHint: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const WithRangeOfInputComponents: () => import("react/jsx-runtime").JSX.Element;
|