@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,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const WithContent: () => React.JSX.Element;
|
|
1
|
+
export declare const WithSelectedValue: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const WithOtherInteractiveElements: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const WithContent: () => import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
declare const _default: {
|
|
6
5
|
title: string;
|
|
7
6
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
2
3
|
import { Box } from "../Box";
|
|
3
4
|
import { Text } from "../Type";
|
|
4
5
|
import { Button } from "../Button";
|
|
@@ -7,25 +8,12 @@ import Switcher from "./Switcher";
|
|
|
7
8
|
import Switch from "./Switch";
|
|
8
9
|
export const WithSelectedValue = () => {
|
|
9
10
|
const [selected, setSelected] = useState("option_2");
|
|
10
|
-
return (
|
|
11
|
-
React.createElement(Switch, { value: "option_1" }, "Option 1"),
|
|
12
|
-
React.createElement(Switch, { value: "option_2" }, "Option 2")));
|
|
11
|
+
return (_jsxs(Switcher, { "aria-label": "storybook-switcher", selected: selected, onChange: setSelected, children: [_jsx(Switch, { value: "option_1", children: "Option 1" }), _jsx(Switch, { value: "option_2", children: "Option 2" })] }));
|
|
13
12
|
};
|
|
14
|
-
export const WithOtherInteractiveElements = () => (
|
|
15
|
-
React.createElement(Button, null, "Click me"),
|
|
16
|
-
React.createElement(Switcher, { "aria-label": "storybook-switcher", selected: "option_2" },
|
|
17
|
-
React.createElement(Switch, { value: "option_1" }, "Option 1"),
|
|
18
|
-
React.createElement(Switch, { value: "option_2" }, "Option 2"))));
|
|
13
|
+
export const WithOtherInteractiveElements = () => (_jsxs(Flex, { gap: "x1", alignItems: "center", children: [_jsx(Button, { children: "Click me" }), _jsxs(Switcher, { "aria-label": "storybook-switcher", selected: "option_2", children: [_jsx(Switch, { value: "option_1", children: "Option 1" }), _jsx(Switch, { value: "option_2", children: "Option 2" })] })] }));
|
|
19
14
|
export const WithContent = () => {
|
|
20
15
|
const [selected, setSelected] = useState("all");
|
|
21
|
-
return (
|
|
22
|
-
React.createElement(Switcher, { "aria-label": "storybook-switcher", selected: selected, onChange: setSelected },
|
|
23
|
-
React.createElement(Switch, { value: "all" }, "All"),
|
|
24
|
-
React.createElement(Switch, { value: "option_1" }, "Option 1"),
|
|
25
|
-
React.createElement(Switch, { value: "option_2" }, "Option 2")),
|
|
26
|
-
React.createElement(Box, { px: "x1", py: "x3" },
|
|
27
|
-
["all", "option_1"].includes(selected) && React.createElement(Text, null, "Option 1 Content"),
|
|
28
|
-
["all", "option_2"].includes(selected) && React.createElement(Text, null, "Option 2 Content"))));
|
|
16
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Switcher, { "aria-label": "storybook-switcher", selected: selected, onChange: setSelected, children: [_jsx(Switch, { value: "all", children: "All" }), _jsx(Switch, { value: "option_1", children: "Option 1" }), _jsx(Switch, { value: "option_2", children: "Option 2" })] }), _jsxs(Box, { px: "x1", py: "x3", children: [["all", "option_1"].includes(selected) && _jsx(Text, { children: "Option 1 Content" }), ["all", "option_2"].includes(selected) && _jsx(Text, { children: "Option 2 Content" })] })] }));
|
|
29
17
|
};
|
|
30
18
|
export default {
|
|
31
19
|
title: "Components/Switcher",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
import { RowType, Columns, RowBorder } from "./Table.types";
|
|
3
3
|
export type BaseTableProps<ColumnMetaData> = {
|
|
4
4
|
columns: Columns<ColumnMetaData>;
|
|
@@ -18,5 +18,5 @@ export type BaseTableProps<ColumnMetaData> = {
|
|
|
18
18
|
onMouseLeave?: any;
|
|
19
19
|
rowBorder?: RowBorder;
|
|
20
20
|
};
|
|
21
|
-
declare function BaseTable<ColumnMetaData>({ noRowsContent, keyField, loading, footerRows, rowHovers, compact, stickyHeader, onRowMouseEnter, onRowMouseLeave, columns, rows, id, className, rowBorder, ...props }: BaseTableProps<ColumnMetaData>):
|
|
21
|
+
declare function BaseTable<ColumnMetaData>({ noRowsContent, keyField, loading, footerRows, rowHovers, compact, stickyHeader, onRowMouseEnter, onRowMouseLeave, columns, rows, id, className, rowBorder, ...props }: BaseTableProps<ColumnMetaData>): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export default BaseTable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { styled } from "styled-components";
|
|
3
3
|
import { space } from "styled-system";
|
|
4
4
|
import TableHead from "./TableHead";
|
|
@@ -11,9 +11,6 @@ const StyledTable = styled.table(space, {
|
|
|
11
11
|
position: "relative",
|
|
12
12
|
});
|
|
13
13
|
function BaseTable({ noRowsContent = "No records have been created for this table.", keyField = "id", loading = false, footerRows = [], rowHovers = true, compact = false, stickyHeader = false, onRowMouseEnter = () => { }, onRowMouseLeave = () => { }, columns, rows, id, className, rowBorder = false, ...props }) {
|
|
14
|
-
return (
|
|
15
|
-
React.createElement(TableHead, { columns: columns, compact: compact, sticky: stickyHeader }),
|
|
16
|
-
React.createElement(TableBody, { columns: columns, rows: rows, keyField: keyField, noRowsContent: noRowsContent, loading: loading, rowHovers: rowHovers, compact: compact, onRowMouseLeave: onRowMouseLeave, onRowMouseEnter: onRowMouseEnter, rowBorder: rowBorder }),
|
|
17
|
-
footerRows && (React.createElement(TableFoot, { columns: columns, rows: footerRows, keyField: keyField, loading: loading, compact: compact }))));
|
|
14
|
+
return (_jsxs(StyledTable, { id: id, className: className, ...props, children: [_jsx(TableHead, { columns: columns, compact: compact, sticky: stickyHeader }), _jsx(TableBody, { columns: columns, rows: rows, keyField: keyField, noRowsContent: noRowsContent, loading: loading, rowHovers: rowHovers, compact: compact, onRowMouseLeave: onRowMouseLeave, onRowMouseEnter: onRowMouseEnter, rowBorder: rowBorder }), footerRows && (_jsx(TableFoot, { columns: columns, rows: footerRows, keyField: keyField, loading: loading, compact: compact }))] }));
|
|
18
15
|
}
|
|
19
16
|
export default BaseTable;
|
|
@@ -6,5 +6,5 @@ interface SortingColumnHeaderProps {
|
|
|
6
6
|
ascending?: boolean;
|
|
7
7
|
active?: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare function SortingColumnHeader({ onChange, label, ariaLabel, ascending, active, }: SortingColumnHeaderProps):
|
|
9
|
+
declare function SortingColumnHeader({ onChange, label, ariaLabel, ascending, active, }: SortingColumnHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default SortingColumnHeader;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
import { Text } from "../Type";
|
|
4
4
|
import { Flex } from "../Flex";
|
|
@@ -6,8 +6,6 @@ import { ControlIcon } from "../Button";
|
|
|
6
6
|
function SortingColumnHeader({ onChange, label, ariaLabel, ascending = false, active = false, }) {
|
|
7
7
|
const { t } = useTranslation();
|
|
8
8
|
const defaultAriaLabel = ascending ? t("sort descending") : t("sort ascending");
|
|
9
|
-
return (
|
|
10
|
-
React.createElement(Text, { mr: "x1" }, label),
|
|
11
|
-
React.createElement(ControlIcon, { size: "x3", icon: ascending ? "sortDown" : "sortUp", label: ariaLabel || defaultAriaLabel, toggled: active, onClick: onChange })));
|
|
9
|
+
return (_jsxs(Flex, { alignItems: "center", children: [_jsx(Text, { mr: "x1", children: label }), _jsx(ControlIcon, { size: "x3", icon: ascending ? "sortDown" : "sortUp", label: ariaLabel || defaultAriaLabel, toggled: active, onClick: onChange })] }));
|
|
12
10
|
}
|
|
13
11
|
export default SortingColumnHeader;
|
|
@@ -102,6 +102,6 @@ declare class StatefulTable<ColumnMetaData> extends Component<StatefulTableProps
|
|
|
102
102
|
onSelectHeader?: (...args: any[]) => any;
|
|
103
103
|
isHeaderSelected?: any;
|
|
104
104
|
};
|
|
105
|
-
render():
|
|
105
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
106
106
|
}
|
|
107
107
|
export default StatefulTable;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Component } from "react";
|
|
2
3
|
import propTypes from "@styled-system/prop-types";
|
|
3
4
|
import { Pagination } from "../Pagination";
|
|
4
5
|
import { pick } from "../utils/subset";
|
|
@@ -192,9 +193,7 @@ class StatefulTable extends Component {
|
|
|
192
193
|
const { paginatedRows, currentPage } = this.state;
|
|
193
194
|
const { rowsPerPage, paginationProps, paginationCss } = this.props;
|
|
194
195
|
const baseTableProps = pick(this.getControlProps(), ...propNames);
|
|
195
|
-
return (
|
|
196
|
-
React.createElement(BaseTable, { ...baseTableProps }),
|
|
197
|
-
rowsPerPage && (React.createElement(Pagination, { pt: "x2", currentPage: currentPage, totalPages: paginatedRows.length || 1, onSelectPage: this.goToPage, onNext: this.goToNextPage, onPrevious: this.goToPrevPage, justifyContent: "flex-end", css: paginationCss, ...paginationProps }))));
|
|
196
|
+
return (_jsxs(_Fragment, { children: [_jsx(BaseTable, { ...baseTableProps }), rowsPerPage && (_jsx(Pagination, { pt: "x2", currentPage: currentPage, totalPages: paginatedRows.length || 1, onSelectPage: this.goToPage, onNext: this.goToNextPage, onPrevious: this.goToPrevPage, justifyContent: "flex-end", css: paginationCss, ...paginationProps }))] }));
|
|
198
197
|
}
|
|
199
198
|
}
|
|
200
199
|
StatefulTable.defaultProps = {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import SortingColumnHeader from "./SortingColumnHeader";
|
|
3
2
|
import { StatefulTableProps } from "./StatefulTable";
|
|
4
3
|
import { ColumnType, RowType, CellInfoType } from "./Table.types";
|
|
@@ -6,7 +5,7 @@ export type TableProps<ColumnMetadata = unknown> = StatefulTableProps<ColumnMeta
|
|
|
6
5
|
export type TableColumnType<ColumnMetadata = unknown> = ColumnType<ColumnMetadata>;
|
|
7
6
|
export type TableRowType = RowType;
|
|
8
7
|
export type TableCellInfoType<ColumnMetadata = unknown> = CellInfoType<ColumnMetadata>;
|
|
9
|
-
declare function Table<ColumnMetadata>({ hasSelectableRows, rowsPerPage, hasExpandableRows, selectedRows, onRowSelectionChange, onRowExpansionChange, onPageChange, selectAllAriaLabel, deselectAllAriaLabel, paginationCss, paginationProps, ...props }: TableProps<ColumnMetadata>):
|
|
8
|
+
declare function Table<ColumnMetadata>({ hasSelectableRows, rowsPerPage, hasExpandableRows, selectedRows, onRowSelectionChange, onRowExpansionChange, onPageChange, selectAllAriaLabel, deselectAllAriaLabel, paginationCss, paginationProps, ...props }: TableProps<ColumnMetadata>): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
declare namespace Table {
|
|
11
10
|
var SortingHeader: typeof SortingColumnHeader;
|
|
12
11
|
}
|
package/dist/src/Table/Table.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import StatefulTable from "./StatefulTable";
|
|
3
3
|
import BaseTable from "./BaseTable";
|
|
4
4
|
import SortingColumnHeader from "./SortingColumnHeader";
|
|
5
5
|
function Table({ hasSelectableRows, rowsPerPage, hasExpandableRows, selectedRows, onRowSelectionChange, onRowExpansionChange, onPageChange, selectAllAriaLabel, deselectAllAriaLabel, paginationCss, paginationProps, ...props }) {
|
|
6
|
-
return hasSelectableRows || rowsPerPage || hasExpandableRows ? (
|
|
6
|
+
return hasSelectableRows || rowsPerPage || hasExpandableRows ? (_jsx(StatefulTable, { hasExpandableRows: hasExpandableRows, hasSelectableRows: hasSelectableRows, onRowExpansionChange: onRowExpansionChange, onRowSelectionChange: onRowSelectionChange, selectedRows: selectedRows, rowsPerPage: rowsPerPage, onPageChange: onPageChange, selectAllAriaLabel: selectAllAriaLabel, deselectAllAriaLabel: deselectAllAriaLabel, paginationCss: paginationCss, paginationProps: paginationProps, ...props })) : (_jsx(BaseTable, { ...props }));
|
|
7
7
|
}
|
|
8
8
|
Table.SortingHeader = SortingColumnHeader;
|
|
9
9
|
export default Table;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
import { RowBorder } from "./Table.types";
|
|
3
3
|
interface TableBodyProps {
|
|
4
4
|
rows: any[];
|
|
@@ -12,5 +12,5 @@ interface TableBodyProps {
|
|
|
12
12
|
onRowMouseEnter?: (...args: any[]) => any;
|
|
13
13
|
rowBorder?: RowBorder;
|
|
14
14
|
}
|
|
15
|
-
declare const TableBody: ({ rows, columns, keyField, noRowsContent, loading, rowHovers, compact, onRowMouseLeave, onRowMouseEnter, rowBorder, }: TableBodyProps) =>
|
|
15
|
+
declare const TableBody: ({ rows, columns, keyField, noRowsContent, loading, rowHovers, compact, onRowMouseLeave, onRowMouseEnter, rowBorder, }: TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export default TableBody;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { styled } from "styled-components";
|
|
3
3
|
import { Box } from "../Box";
|
|
4
4
|
import TableCell from "./TableCell";
|
|
@@ -20,18 +20,13 @@ const StyledTr = styled.tr(({ rowHovers, rowBorder, theme }) => ({
|
|
|
20
20
|
}));
|
|
21
21
|
const renderRows = (rows, columns, keyField, rowHovers, noRowsContent, compact, onRowMouseLeave, onRowMouseEnter, rowBorder) => rows.length > 0 ? (rows.map((row, rowIndex) => {
|
|
22
22
|
const rowKey = row[keyField] !== undefined ? row[keyField] : rowIndex;
|
|
23
|
-
return (
|
|
24
|
-
})) : (
|
|
23
|
+
return (_jsx(TableBodyRow, { row: row, columns: columns, keyField: keyField, rowHovers: rowHovers, compact: compact, rowClassName: row.rowClassName, onMouseEnter: (e) => onRowMouseEnter({ row, e }), onMouseLeave: (e) => onRowMouseLeave({ row, e }), rowBorder: rowBorder }, rowKey));
|
|
24
|
+
})) : (_jsx(TableMessageContainer, { colSpan: columns.length, children: noRowsContent }));
|
|
25
25
|
const TableBodyRow = ({ row, columns, rowHovers, compact, rowClassName, onMouseLeave, onMouseEnter, rowBorder, }) => {
|
|
26
|
-
const renderAllCells = () => columns.map((column, index) => (
|
|
27
|
-
return (
|
|
28
|
-
React.createElement(StyledTr, { rowHovers: rowHovers, "data-testid": "table-row", className: rowClassName, onMouseLeave: onMouseLeave, onMouseEnter: onMouseEnter, rowBorder: rowBorder }, row.heading ? (React.createElement(TableCell, { row: row, colSpan: columns.length, cellData: row.heading, compact: compact })) : (renderAllCells())),
|
|
29
|
-
row.expandedContent && row.expanded && (React.createElement("tr", { "data-testid": "expanded-table-row" },
|
|
30
|
-
React.createElement("td", { colSpan: columns.length }, row.expandedContent({ row }))))));
|
|
26
|
+
const renderAllCells = () => columns.map((column, index) => (_jsx(TableCell, { row: row, column: column, cellData: row[column.dataKey], compact: compact }, column.dataKey ?? column.key ?? index)));
|
|
27
|
+
return (_jsxs(_Fragment, { children: [_jsx(StyledTr, { rowHovers: rowHovers, "data-testid": "table-row", className: rowClassName, onMouseLeave: onMouseLeave, onMouseEnter: onMouseEnter, rowBorder: rowBorder, children: row.heading ? (_jsx(TableCell, { row: row, colSpan: columns.length, cellData: row.heading, compact: compact })) : (renderAllCells()) }), row.expandedContent && row.expanded && (_jsx("tr", { "data-testid": "expanded-table-row", children: _jsx("td", { colSpan: columns.length, children: row.expandedContent({ row }) }) }))] }));
|
|
31
28
|
};
|
|
32
|
-
const TableMessageContainer = ({ colSpan, children }) => (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const LoadingContent = ({ colSpan }) => (React.createElement(TableMessageContainer, { colSpan: colSpan }, "Loading..."));
|
|
36
|
-
const TableBody = ({ rows, columns, keyField = "id", noRowsContent = "No records have been created for this table.", loading, rowHovers, compact, onRowMouseLeave, onRowMouseEnter, rowBorder, }) => (React.createElement("tbody", { "data-testid": "table-body" }, !loading ? (renderRows(rows, columns, keyField, rowHovers, noRowsContent, compact, onRowMouseLeave, onRowMouseEnter, rowBorder)) : (React.createElement(LoadingContent, { colSpan: columns.length }))));
|
|
29
|
+
const TableMessageContainer = ({ colSpan, children }) => (_jsx("tr", { "data-testid": "table-message-container", children: _jsx("td", { colSpan: colSpan, children: _jsx(StyledMessageContainer, { className: "nds-table__no-rows-content", children: children }) }) }));
|
|
30
|
+
const LoadingContent = ({ colSpan }) => (_jsx(TableMessageContainer, { colSpan: colSpan, children: "Loading..." }));
|
|
31
|
+
const TableBody = ({ rows, columns, keyField = "id", noRowsContent = "No records have been created for this table.", loading, rowHovers, compact, onRowMouseLeave, onRowMouseEnter, rowBorder, }) => (_jsx("tbody", { "data-testid": "table-body", children: !loading ? (renderRows(rows, columns, keyField, rowHovers, noRowsContent, compact, onRowMouseLeave, onRowMouseEnter, rowBorder)) : (_jsx(LoadingContent, { colSpan: columns.length })) }));
|
|
37
32
|
export default TableBody;
|
|
@@ -6,5 +6,5 @@ type TableCellProps = {
|
|
|
6
6
|
cellData?: Record<string, unknown> | React.ReactNode | boolean;
|
|
7
7
|
compact?: boolean;
|
|
8
8
|
};
|
|
9
|
-
declare const TableCell: ({ column, row, cellData, colSpan, compact }: TableCellProps) =>
|
|
9
|
+
declare const TableCell: ({ column, row, cellData, colSpan, compact }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default TableCell;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { styled } from "styled-components";
|
|
3
3
|
const StyledTableCell = styled.td(({ align, compact, verticalAlign, theme }) => {
|
|
4
4
|
const padding = compact ? theme.space.x1 : theme.space.x2;
|
|
@@ -19,8 +19,8 @@ const TableCell = ({ column = {}, row = {}, cellData = "", colSpan = undefined,
|
|
|
19
19
|
const isCustomCell = Boolean(cellRenderer);
|
|
20
20
|
const cellContent = cellFormatter ? cellFormatter({ cellData, column, row }) : cellData;
|
|
21
21
|
if (isCustomCell) {
|
|
22
|
-
return
|
|
22
|
+
return _jsx("td", { colSpan: colSpan, children: cellRenderer ? cellRenderer({ cellData, column, row }) : cellData });
|
|
23
23
|
}
|
|
24
|
-
return (
|
|
24
|
+
return (_jsx(StyledTableCell, { align: column.align, compact: compact, verticalAlign: row.verticalAlign, children: cellContent }));
|
|
25
25
|
};
|
|
26
26
|
export default TableCell;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { RowType, Columns } from "./Table.types";
|
|
3
2
|
declare function TableFoot<ColumnMetadata>({ columns, rows, keyField, loading, compact, }: {
|
|
4
3
|
columns: Columns<ColumnMetadata>;
|
|
@@ -6,5 +5,5 @@ declare function TableFoot<ColumnMetadata>({ columns, rows, keyField, loading, c
|
|
|
6
5
|
keyField?: string;
|
|
7
6
|
loading?: boolean;
|
|
8
7
|
compact?: boolean;
|
|
9
|
-
}):
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export default TableFoot;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { styled } from "styled-components";
|
|
3
3
|
import TableCell from "./TableCell";
|
|
4
4
|
import StyledTh from "./StyledTh";
|
|
@@ -7,17 +7,17 @@ const StyledFooterRow = styled.tr(({ theme }) => ({
|
|
|
7
7
|
borderTop: `1px solid ${theme.colors.lightGrey}`,
|
|
8
8
|
},
|
|
9
9
|
}));
|
|
10
|
-
const renderRows = (rows, columns, keyField, loading, compact) => rows.map((row) => (
|
|
10
|
+
const renderRows = (rows, columns, keyField, loading, compact) => rows.map((row) => (_jsx(TableFooterRow, { row: row, columns: columns, loading: loading, compact: compact }, row[keyField])));
|
|
11
11
|
const TableFooterRow = ({ row, columns, loading, compact }) => {
|
|
12
12
|
const columnsWithoutControls = columns.filter((column) => column.dataKey !== "selected" && column.dataKey !== "expanded");
|
|
13
13
|
const numberOfControlColumns = columns.length - columnsWithoutControls.length;
|
|
14
|
-
return (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
return (_jsx(StyledFooterRow, { children: columnsWithoutControls.map((column, index) => index === 0 ? (_jsx(StyledTh, { scope: "row", colSpan: numberOfControlColumns + 1, compact: compact, children: row[column.dataKey] }, column.dataKey)) : (!loading && (_jsx(TableCell, { row: row, column: {
|
|
15
|
+
dataKey: column.dataKey,
|
|
16
|
+
label: column.label,
|
|
17
|
+
align: column.align,
|
|
18
|
+
}, cellData: row[column.dataKey], compact: compact }, column.dataKey ?? column.key ?? index)))) }));
|
|
19
19
|
};
|
|
20
20
|
function TableFoot({ columns, rows, keyField = "id", loading = false, compact = false, }) {
|
|
21
|
-
return
|
|
21
|
+
return _jsx("tfoot", { children: renderRows(rows, columns, keyField, loading, compact) });
|
|
22
22
|
}
|
|
23
23
|
export default TableFoot;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import type { Columns } from "./Table.types";
|
|
3
2
|
interface TableHeadProps<ColumnMetadata> {
|
|
4
3
|
columns: Columns<ColumnMetadata>;
|
|
5
4
|
compact?: boolean;
|
|
6
5
|
sticky?: boolean;
|
|
7
6
|
}
|
|
8
|
-
declare function TableHead<ColumnMetadata>({ columns, compact, sticky }: TableHeadProps<ColumnMetadata>):
|
|
7
|
+
declare function TableHead<ColumnMetadata>({ columns, compact, sticky }: TableHeadProps<ColumnMetadata>): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default TableHead;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { styled } from "styled-components";
|
|
3
3
|
import StyledTh from "./StyledTh";
|
|
4
4
|
const StyledHeaderRow = styled.tr(({ theme }) => ({
|
|
@@ -11,8 +11,7 @@ function renderHeaderCellContent({ headerFormatter = ({ label }) => label, align
|
|
|
11
11
|
: headerFormatter({ align, label, width, metadata, dataKey });
|
|
12
12
|
}
|
|
13
13
|
function TableHead({ columns, compact, sticky }) {
|
|
14
|
-
const renderColumns = (allColumns) => allColumns.map((column, index) => (
|
|
15
|
-
return (
|
|
16
|
-
React.createElement(StyledHeaderRow, null, renderColumns(columns))));
|
|
14
|
+
const renderColumns = (allColumns) => allColumns.map((column, index) => (_jsx(StyledTh, { scope: "col", width: column.width, compact: compact, "data-testid": "table-head", sticky: sticky, children: renderHeaderCellContent(column) }, column.dataKey ?? column.key ?? index)));
|
|
15
|
+
return (_jsx("thead", { children: _jsx(StyledHeaderRow, { children: renderColumns(columns) }) }));
|
|
17
16
|
}
|
|
18
17
|
export default TableHead;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
import { ControlIcon } from "../Button";
|
|
4
4
|
import { SELECTABLE_COLUMN_DATA_KEY } from "./addSelectableControl";
|
|
@@ -8,9 +8,9 @@ const ExpandCell = ({ row, onRowExpansionChange }) => {
|
|
|
8
8
|
const { t } = useTranslation();
|
|
9
9
|
const collapseLabel = row.collapseAriaLabel || t("collapse row");
|
|
10
10
|
const expandLabel = row.expandAriaLabel || t("expand row");
|
|
11
|
-
return (
|
|
11
|
+
return (_jsx(_Fragment, { children: row.expandedContent && (_jsx(ControlIcon, { icon: row[EXPANDABLE_COLUMN_DATA_KEY] ? "upArrow" : "downArrow", label: row[EXPANDABLE_COLUMN_DATA_KEY] ? collapseLabel : expandLabel, onClick: expandRowHandler })) }));
|
|
12
12
|
};
|
|
13
|
-
const expandCellRenderer = (onRowExpansionChange) => (props) => (
|
|
13
|
+
const expandCellRenderer = (onRowExpansionChange) => (props) => (_jsx(ExpandCell, { onRowExpansionChange: onRowExpansionChange, ...props }));
|
|
14
14
|
const addExpandableColumn = ({ columns, onRowExpansionChange }) => {
|
|
15
15
|
const expandableColumn = {
|
|
16
16
|
dataKey: EXPANDABLE_COLUMN_DATA_KEY,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
import { Checkbox } from "../Checkbox";
|
|
4
4
|
export const SELECTABLE_COLUMN_DATA_KEY = "selected";
|
|
@@ -7,7 +7,7 @@ const selectHeaderFormatter = (onSelectHeader, isHeaderSelected, selectAllAriaLa
|
|
|
7
7
|
const checkedAriaLabel = deselectAllAriaLabel || t("deselect all");
|
|
8
8
|
const uncheckedAriaLabel = selectAllAriaLabel || t("select all");
|
|
9
9
|
const ariaLabel = isHeaderSelected ? checkedAriaLabel : uncheckedAriaLabel;
|
|
10
|
-
return
|
|
10
|
+
return _jsx(Checkbox, { checked: isHeaderSelected, onChange: onSelectHeader, "aria-label": ariaLabel });
|
|
11
11
|
};
|
|
12
12
|
const SelectCell = ({ row, onSelectRow }) => {
|
|
13
13
|
const selectRowHandler = () => onSelectRow(row);
|
|
@@ -16,9 +16,9 @@ const SelectCell = ({ row, onSelectRow }) => {
|
|
|
16
16
|
const checkedAriaLabel = row.selectAriaLabel || t("select row");
|
|
17
17
|
const uncheckedAriaLabel = row.deselectAriaLabel || t("select row");
|
|
18
18
|
const ariaLabel = checked ? checkedAriaLabel : uncheckedAriaLabel;
|
|
19
|
-
return
|
|
19
|
+
return _jsx(Checkbox, { "aria-label": ariaLabel, checked: checked, onChange: selectRowHandler });
|
|
20
20
|
};
|
|
21
|
-
const selectCellRenderer = (onSelectRow) => (props) =>
|
|
21
|
+
const selectCellRenderer = (onSelectRow) => (props) => _jsx(SelectCell, { onSelectRow: onSelectRow, ...props });
|
|
22
22
|
export const addSelectableControl = ({ columns, rows, onSelectRow, onSelectHeader, keyField, selectedRows, isHeaderSelected, selectAllAriaLabel, deselectAllAriaLabel, }) => {
|
|
23
23
|
const selectableColumn = {
|
|
24
24
|
dataKey: SELECTABLE_COLUMN_DATA_KEY,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import type { StoryObj } from "@storybook/react";
|
|
3
2
|
import { Table } from "..";
|
|
4
3
|
declare const _default: {
|
|
@@ -11,13 +10,13 @@ export declare const WithData: Story;
|
|
|
11
10
|
export declare const WithNoData: Story;
|
|
12
11
|
export declare const WithStickyHeader: Story;
|
|
13
12
|
export declare const WithLotsOfRowsAndColumns: Story;
|
|
14
|
-
export declare const WithCustomColumnWidths: () =>
|
|
15
|
-
export declare const WithACustomCellComponent: () =>
|
|
16
|
-
export declare const WithCellAlignment: () =>
|
|
17
|
-
export declare const WithACellFormatter: () =>
|
|
18
|
-
export declare const WithACustomColumnLabelComponent: () =>
|
|
19
|
-
export declare const WithMetadata: () =>
|
|
20
|
-
export declare const WithFullWidthSection: () =>
|
|
13
|
+
export declare const WithCustomColumnWidths: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const WithACustomCellComponent: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const WithCellAlignment: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const WithACellFormatter: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const WithACustomColumnLabelComponent: () => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const WithMetadata: () => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const WithFullWidthSection: () => import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
export declare const WithAFooter: Story;
|
|
22
21
|
export declare const WithRowBorder: Story;
|
|
23
22
|
export declare const WithVerticalAlignment: Story;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { action } from "@storybook/addon-actions";
|
|
3
3
|
import { Box, DropdownButton, DropdownMenu, Button, Text, Flex } from "../..";
|
|
4
4
|
import { getMockRows, mockColumns } from "../Table.mock-utils";
|
|
@@ -6,12 +6,8 @@ import { Table } from "..";
|
|
|
6
6
|
const dateToString = ({ cellData }) => {
|
|
7
7
|
return new Date(cellData).toUTCString().split(" ").splice(0, 4).join(" ");
|
|
8
8
|
};
|
|
9
|
-
const sectionRow = ({ cellData }) => (
|
|
10
|
-
|
|
11
|
-
const dropdownCellRenderer = ({ cellData }) => (React.createElement(Box, { textAlign: "right", pr: "x3" },
|
|
12
|
-
React.createElement(DropdownMenu, null,
|
|
13
|
-
React.createElement(DropdownButton, { onClick: action(cellData) }, "Edit"),
|
|
14
|
-
React.createElement(DropdownButton, { onClick: action(cellData) }, "Delete"))));
|
|
9
|
+
const sectionRow = ({ cellData }) => (_jsx(Box, { bg: "lightBlue", py: "x1", px: "x2", children: _jsx(Text, { fontWeight: "bold", color: "blackBlue", children: cellData }) }));
|
|
10
|
+
const dropdownCellRenderer = ({ cellData }) => (_jsx(Box, { textAlign: "right", pr: "x3", children: _jsxs(DropdownMenu, { children: [_jsx(DropdownButton, { onClick: action(cellData), children: "Edit" }), _jsx(DropdownButton, { onClick: action(cellData), children: "Delete" })] }) }));
|
|
15
11
|
const columns = [
|
|
16
12
|
{ label: "Date", dataKey: "date" },
|
|
17
13
|
{ label: "Expected Quantity", dataKey: "expectedQuantity" },
|
|
@@ -272,8 +268,7 @@ export const WithNoData = {
|
|
|
272
268
|
},
|
|
273
269
|
};
|
|
274
270
|
export const WithStickyHeader = {
|
|
275
|
-
render: (args) => (
|
|
276
|
-
React.createElement(Table, { columns: columns, rows: rowData, rowHovers: args.rowHovers, compact: args.compact, loading: args.loading, className: "Table", stickyHeader: true }))),
|
|
271
|
+
render: (args) => (_jsx(Box, { mt: "x4", children: _jsx(Table, { columns: columns, rows: rowData, rowHovers: args.rowHovers, compact: args.compact, loading: args.loading, className: "Table", stickyHeader: true }) })),
|
|
277
272
|
args: {
|
|
278
273
|
rowHovers: true,
|
|
279
274
|
compact: false,
|
|
@@ -305,21 +300,21 @@ export const WithLotsOfRowsAndColumns = {
|
|
|
305
300
|
},
|
|
306
301
|
},
|
|
307
302
|
};
|
|
308
|
-
export const WithCustomColumnWidths = () =>
|
|
309
|
-
export const WithACustomCellComponent = () => (
|
|
310
|
-
export const WithCellAlignment = () =>
|
|
311
|
-
export const WithACellFormatter = () =>
|
|
312
|
-
export const WithACustomColumnLabelComponent = () => (
|
|
303
|
+
export const WithCustomColumnWidths = () => _jsx(Table, { columns: columnsWithWidths, rows: rowDataWithWidths });
|
|
304
|
+
export const WithACustomCellComponent = () => (_jsx(Table, { columns: getColumnsWithCellRenderer(dropdownCellRenderer), rows: rowData }));
|
|
305
|
+
export const WithCellAlignment = () => _jsx(Table, { columns: columnsWithAlignment, rows: rowData });
|
|
306
|
+
export const WithACellFormatter = () => _jsx(Table, { columns: columnsWithFormatter, rows: rowData });
|
|
307
|
+
export const WithACustomColumnLabelComponent = () => (_jsx(Table, { columns: [
|
|
313
308
|
{ label: "Date", dataKey: "date" },
|
|
314
309
|
{ label: "Expected Quantity", dataKey: "expectedQuantity" },
|
|
315
310
|
{ label: "Actual Quantity", dataKey: "actualQuantity" },
|
|
316
311
|
{
|
|
317
312
|
label: "Add record",
|
|
318
313
|
dataKey: "c4",
|
|
319
|
-
headerFormatter: ({ label }) =>
|
|
314
|
+
headerFormatter: ({ label }) => _jsx(Button, { onClick: action("button clicked"), children: label }),
|
|
320
315
|
},
|
|
321
316
|
], rows: rowData }));
|
|
322
|
-
export const WithMetadata = () => (
|
|
317
|
+
export const WithMetadata = () => (_jsx(Table, { columns: [
|
|
323
318
|
{ label: "Date", dataKey: "date" },
|
|
324
319
|
{ label: "Expected Quantity", dataKey: "expectedQuantity" },
|
|
325
320
|
{ label: "Actual Quantity", dataKey: "actualQuantity" },
|
|
@@ -327,16 +322,12 @@ export const WithMetadata = () => (React.createElement(Table, { columns: [
|
|
|
327
322
|
label: "Add record",
|
|
328
323
|
dataKey: "c4",
|
|
329
324
|
metadata: { helpText: "Allows adding a new record" },
|
|
330
|
-
headerFormatter: ({ label, metadata }) => (
|
|
331
|
-
React.createElement(Text, null, label),
|
|
332
|
-
React.createElement(Text, { fontSize: "small", fontWeight: "base", color: "midGrey" }, metadata.helpText))),
|
|
325
|
+
headerFormatter: ({ label, metadata }) => (_jsxs(Flex, { flexDirection: "column", children: [_jsx(Text, { children: label }), _jsx(Text, { fontSize: "small", fontWeight: "base", color: "midGrey", children: metadata.helpText })] })),
|
|
333
326
|
},
|
|
334
327
|
], rows: rowData }));
|
|
335
|
-
export const WithFullWidthSection = () =>
|
|
328
|
+
export const WithFullWidthSection = () => _jsx(Table, { columns: columns, rows: rowDataWithSections });
|
|
336
329
|
export const WithAFooter = {
|
|
337
|
-
render: (args) => (
|
|
338
|
-
React.createElement(Table, { columns: columns, keyField: "date", rows: rowData, footerRows: footerRowData, loading: args.loading }),
|
|
339
|
-
React.createElement(Table, { compact: true, columns: columns, keyField: "date", rows: compactRowData, footerRows: footerRowData, loading: args.loading }))),
|
|
330
|
+
render: (args) => (_jsxs(_Fragment, { children: [_jsx(Table, { columns: columns, keyField: "date", rows: rowData, footerRows: footerRowData, loading: args.loading }), _jsx(Table, { compact: true, columns: columns, keyField: "date", rows: compactRowData, footerRows: footerRowData, loading: args.loading })] })),
|
|
340
331
|
args: {
|
|
341
332
|
loading: false,
|
|
342
333
|
},
|
|
@@ -372,7 +363,7 @@ export const WithRowBorder = {
|
|
|
372
363
|
},
|
|
373
364
|
};
|
|
374
365
|
export const WithVerticalAlignment = {
|
|
375
|
-
render: (args) => (
|
|
366
|
+
render: (args) => (_jsx(Table, { rowBorder: args.rowBorder, columns: [
|
|
376
367
|
{ label: "Description", dataKey: "description", width: "50%" },
|
|
377
368
|
{ label: "Expected Quantity", dataKey: "expectedQuantity" },
|
|
378
369
|
{ label: "Actual Quantity", dataKey: "actualQuantity" },
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
declare const _default: {
|
|
3
2
|
title: string;
|
|
4
3
|
};
|
|
5
4
|
export default _default;
|
|
6
|
-
export declare const Inputs: () =>
|
|
7
|
-
export declare const TextVariants: () =>
|
|
5
|
+
export declare const Inputs: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const TextVariants: () => import("react/jsx-runtime").JSX.Element;
|