@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,64 +1,63 @@
|
|
|
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 WithoutALabel: {
|
|
7
|
-
():
|
|
6
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
story: {
|
|
9
8
|
name: string;
|
|
10
9
|
};
|
|
11
10
|
};
|
|
12
11
|
export declare const WithLabel: {
|
|
13
|
-
():
|
|
12
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
story: {
|
|
15
14
|
name: string;
|
|
16
15
|
};
|
|
17
16
|
};
|
|
18
17
|
export declare const WithALongLabel: {
|
|
19
|
-
():
|
|
18
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
story: {
|
|
21
20
|
name: string;
|
|
22
21
|
};
|
|
23
22
|
};
|
|
24
23
|
export declare const SetToDisabled: {
|
|
25
|
-
():
|
|
24
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
26
25
|
story: {
|
|
27
26
|
name: string;
|
|
28
27
|
};
|
|
29
28
|
};
|
|
30
29
|
export declare const WithAHiddenLabel: {
|
|
31
|
-
():
|
|
30
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
32
31
|
story: {
|
|
33
32
|
name: string;
|
|
34
33
|
};
|
|
35
34
|
};
|
|
36
35
|
export declare const WithACustomIconSize: {
|
|
37
|
-
():
|
|
36
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
38
37
|
story: {
|
|
39
38
|
name: string;
|
|
40
39
|
};
|
|
41
40
|
};
|
|
42
41
|
export declare const WithACustomColor: {
|
|
43
|
-
():
|
|
42
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
44
43
|
story: {
|
|
45
44
|
name: string;
|
|
46
45
|
};
|
|
47
46
|
};
|
|
48
47
|
export declare const WithATooltipAndLabel: {
|
|
49
|
-
():
|
|
48
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
50
49
|
story: {
|
|
51
50
|
name: string;
|
|
52
51
|
};
|
|
53
52
|
};
|
|
54
53
|
export declare const WithAComplicatedTooltipAndLabel: {
|
|
55
|
-
():
|
|
54
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
56
55
|
story: {
|
|
57
56
|
name: string;
|
|
58
57
|
};
|
|
59
58
|
};
|
|
60
59
|
export declare const rightAligned: {
|
|
61
|
-
():
|
|
60
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
62
61
|
parameters: {
|
|
63
62
|
chromatic: {
|
|
64
63
|
diffThreshold: number;
|
|
@@ -66,17 +65,17 @@ export declare const rightAligned: {
|
|
|
66
65
|
};
|
|
67
66
|
};
|
|
68
67
|
export declare const WithACustomFontSize: {
|
|
69
|
-
():
|
|
68
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
70
69
|
story: {
|
|
71
70
|
name: string;
|
|
72
71
|
};
|
|
73
72
|
};
|
|
74
73
|
export declare const WithNonTextChildren: {
|
|
75
|
-
():
|
|
74
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
76
75
|
story: {
|
|
77
76
|
name: string;
|
|
78
77
|
};
|
|
79
78
|
};
|
|
80
|
-
export declare const WithCustomHoverBackgroundThemeColor: () =>
|
|
81
|
-
export declare const WithCustomHoverBackgroundNonThemeColor: () =>
|
|
82
|
-
export declare const WithLargerIcons: () =>
|
|
79
|
+
export declare const WithCustomHoverBackgroundThemeColor: () => import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
export declare const WithCustomHoverBackgroundNonThemeColor: () => import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
export declare const WithLargerIcons: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { IconicButton } from "../index";
|
|
3
3
|
import { Flex } from "../Flex";
|
|
4
4
|
import { StatusIndicator } from "../StatusIndicator";
|
|
@@ -6,69 +6,54 @@ import { Box } from "../Box";
|
|
|
6
6
|
export default {
|
|
7
7
|
title: "Components/IconicButton",
|
|
8
8
|
};
|
|
9
|
-
export const WithoutALabel = () =>
|
|
9
|
+
export const WithoutALabel = () => _jsx(IconicButton, { icon: "delete" });
|
|
10
10
|
WithoutALabel.story = {
|
|
11
11
|
name: "without a label",
|
|
12
12
|
};
|
|
13
|
-
export const WithLabel = () =>
|
|
13
|
+
export const WithLabel = () => _jsx(IconicButton, { icon: "delete", children: "Delete" });
|
|
14
14
|
WithLabel.story = {
|
|
15
15
|
name: "with label",
|
|
16
16
|
};
|
|
17
|
-
export const WithALongLabel = () => (
|
|
17
|
+
export const WithALongLabel = () => (_jsx(IconicButton, { icon: "user", children: "I am an Iconic Button with a really really really long label" }));
|
|
18
18
|
WithALongLabel.story = {
|
|
19
19
|
name: "with a long label",
|
|
20
20
|
};
|
|
21
|
-
export const SetToDisabled = () => (
|
|
22
|
-
React.createElement(IconicButton, { icon: "cancel", disabled: true }, "Cancel"),
|
|
23
|
-
React.createElement(IconicButton, { icon: "lock", disabled: true }, "Lock")));
|
|
21
|
+
export const SetToDisabled = () => (_jsxs(_Fragment, { children: [_jsx(IconicButton, { icon: "cancel", disabled: true, children: "Cancel" }), _jsx(IconicButton, { icon: "lock", disabled: true, children: "Lock" })] }));
|
|
24
22
|
SetToDisabled.story = {
|
|
25
23
|
name: "set to disabled",
|
|
26
24
|
};
|
|
27
|
-
export const WithAHiddenLabel = () => (
|
|
25
|
+
export const WithAHiddenLabel = () => (_jsx(IconicButton, { ml: "x6", labelHidden: true, icon: "user", children: "Hidden Label" }));
|
|
28
26
|
WithAHiddenLabel.story = {
|
|
29
27
|
name: "with a hidden label",
|
|
30
28
|
};
|
|
31
|
-
export const WithACustomIconSize = () => (
|
|
29
|
+
export const WithACustomIconSize = () => (_jsx(IconicButton, { icon: "user", iconSize: "50px", labelHidden: true, children: "I am an Iconic Button" }));
|
|
32
30
|
WithACustomIconSize.story = {
|
|
33
31
|
name: "with a custom icon size",
|
|
34
32
|
};
|
|
35
|
-
export const WithACustomColor = () => (
|
|
33
|
+
export const WithACustomColor = () => (_jsx(IconicButton, { color: "red", icon: "close", children: "Close" }));
|
|
36
34
|
WithACustomColor.story = {
|
|
37
35
|
name: "with a custom color",
|
|
38
36
|
};
|
|
39
|
-
export const WithATooltipAndLabel = () => (
|
|
37
|
+
export const WithATooltipAndLabel = () => (_jsx(IconicButton, { tooltip: "Stop job", icon: "close", children: "Stop" }));
|
|
40
38
|
WithATooltipAndLabel.story = {
|
|
41
39
|
name: "with a tooltip and label",
|
|
42
40
|
};
|
|
43
|
-
export const WithAComplicatedTooltipAndLabel = () => (
|
|
41
|
+
export const WithAComplicatedTooltipAndLabel = () => (_jsx(IconicButton, { tooltip: _jsx(Box, { children: "Hello" }), icon: "close", children: "Please stop" }));
|
|
44
42
|
WithAComplicatedTooltipAndLabel.story = {
|
|
45
43
|
name: "with a complicated tooltip and label",
|
|
46
44
|
};
|
|
47
|
-
export const rightAligned = () => (
|
|
48
|
-
React.createElement(Flex, { justifyContent: "flex-end", alignItems: "flex-start", width: "100%" },
|
|
49
|
-
React.createElement(IconicButton, { icon: "rightArrow", labelHidden: true }, "I am an Iconic Button"),
|
|
50
|
-
React.createElement(IconicButton, { icon: "leftArrow", labelHidden: true }, "I am an Iconic Button 2"))));
|
|
45
|
+
export const rightAligned = () => (_jsx(Flex, { px: "x3", height: "150px", children: _jsxs(Flex, { justifyContent: "flex-end", alignItems: "flex-start", width: "100%", children: [_jsx(IconicButton, { icon: "rightArrow", labelHidden: true, children: "I am an Iconic Button" }), _jsx(IconicButton, { icon: "leftArrow", labelHidden: true, children: "I am an Iconic Button 2" })] }) }));
|
|
51
46
|
rightAligned.parameters = {
|
|
52
47
|
chromatic: { diffThreshold: 0.3 },
|
|
53
48
|
};
|
|
54
|
-
export const WithACustomFontSize = () => (
|
|
55
|
-
React.createElement(IconicButton, { fontSize: "small", tooltip: "Stop job", icon: "close" }, "This is an IconicButton with a small font size"),
|
|
56
|
-
React.createElement(IconicButton, { fontSize: "large", tooltip: "Stop job", icon: "close" }, "This is an IconicButton with a large font size"),
|
|
57
|
-
React.createElement(IconicButton, { fontSize: "48px", tooltip: "Stop job", icon: "close" }, "This is an IconicButton with 48px font size")));
|
|
49
|
+
export const WithACustomFontSize = () => (_jsxs(Flex, { flexDirection: "column", children: [_jsx(IconicButton, { fontSize: "small", tooltip: "Stop job", icon: "close", children: "This is an IconicButton with a small font size" }), _jsx(IconicButton, { fontSize: "large", tooltip: "Stop job", icon: "close", children: "This is an IconicButton with a large font size" }), _jsx(IconicButton, { fontSize: "48px", tooltip: "Stop job", icon: "close", children: "This is an IconicButton with 48px font size" })] }));
|
|
58
50
|
WithACustomFontSize.story = {
|
|
59
51
|
name: "with a custom font size",
|
|
60
52
|
};
|
|
61
|
-
export const WithNonTextChildren = () => (
|
|
62
|
-
React.createElement(Flex, null,
|
|
63
|
-
React.createElement(Box, { as: "span", pr: "x1" }, "Warnings"),
|
|
64
|
-
React.createElement(StatusIndicator, { type: "informative" }, "3"))));
|
|
53
|
+
export const WithNonTextChildren = () => (_jsx(IconicButton, { fontSize: "small", "aria-label": "warnings", icon: "warning", children: _jsxs(Flex, { children: [_jsx(Box, { as: "span", pr: "x1", children: "Warnings" }), _jsx(StatusIndicator, { type: "informative", children: "3" })] }) }));
|
|
65
54
|
WithNonTextChildren.story = {
|
|
66
55
|
name: "with non text children",
|
|
67
56
|
};
|
|
68
|
-
export const WithCustomHoverBackgroundThemeColor = () => (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
export const WithCustomHoverBackgroundNonThemeColor = () => (React.createElement(IconicButton, { hoverBackgroundColor: "#FA8072", fontSize: "small", "aria-label": "warnings", icon: "warning" },
|
|
72
|
-
React.createElement(Flex, null,
|
|
73
|
-
React.createElement(Box, { as: "span", pr: "x1" }, "Warnings"))));
|
|
74
|
-
export const WithLargerIcons = () => React.createElement(IconicButton, { icon: "chatBubble" }, "Add comment");
|
|
57
|
+
export const WithCustomHoverBackgroundThemeColor = () => (_jsx(IconicButton, { hoverBackgroundColor: "lightYellow", fontSize: "small", "aria-label": "warnings", icon: "warning", children: _jsx(Flex, { children: _jsx(Box, { as: "span", pr: "x1", children: "Warnings" }) }) }));
|
|
58
|
+
export const WithCustomHoverBackgroundNonThemeColor = () => (_jsx(IconicButton, { hoverBackgroundColor: "#FA8072", fontSize: "small", "aria-label": "warnings", icon: "warning", children: _jsx(Flex, { children: _jsx(Box, { as: "span", pr: "x1", children: "Warnings" }) }) }));
|
|
59
|
+
export const WithLargerIcons = () => _jsx(IconicButton, { icon: "chatBubble", children: "Add comment" });
|
|
@@ -1,34 +1,33 @@
|
|
|
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 _ButtonGroup: {
|
|
7
|
-
():
|
|
6
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
story: {
|
|
9
8
|
name: string;
|
|
10
9
|
};
|
|
11
10
|
};
|
|
12
11
|
export declare const WithAlignmentRight: {
|
|
13
|
-
():
|
|
12
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
story: {
|
|
15
14
|
name: string;
|
|
16
15
|
};
|
|
17
16
|
};
|
|
18
17
|
export declare const WithAlignmentSpaced: {
|
|
19
|
-
():
|
|
18
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
story: {
|
|
21
20
|
name: string;
|
|
22
21
|
};
|
|
23
22
|
};
|
|
24
23
|
export declare const MoreButtonTypes: {
|
|
25
|
-
():
|
|
24
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
26
25
|
story: {
|
|
27
26
|
name: string;
|
|
28
27
|
};
|
|
29
28
|
};
|
|
30
29
|
export declare const WrappingButtons: {
|
|
31
|
-
():
|
|
30
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
32
31
|
story: {
|
|
33
32
|
name: string;
|
|
34
33
|
parameters: {
|
|
@@ -1,62 +1,25 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Box, ButtonGroup, Button, PrimaryButton, DangerButton, QuietButton, IconicButton } from "../index";
|
|
3
3
|
export default {
|
|
4
4
|
title: "Components/ButtonGroup",
|
|
5
5
|
};
|
|
6
|
-
export const _ButtonGroup = () => (
|
|
7
|
-
React.createElement(ButtonGroup, null,
|
|
8
|
-
React.createElement(PrimaryButton, null, "Button"),
|
|
9
|
-
React.createElement(Button, null, "Button"),
|
|
10
|
-
React.createElement(Button, null, "Button"))));
|
|
6
|
+
export const _ButtonGroup = () => (_jsx(Box, { bg: "whiteGrey", p: "x2", width: "500px", children: _jsxs(ButtonGroup, { children: [_jsx(PrimaryButton, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" })] }) }));
|
|
11
7
|
_ButtonGroup.story = {
|
|
12
8
|
name: "ButtonGroup",
|
|
13
9
|
};
|
|
14
|
-
export const WithAlignmentRight = () => (
|
|
15
|
-
React.createElement(PrimaryButton, null, "Button"),
|
|
16
|
-
React.createElement(Button, null, "Button"),
|
|
17
|
-
React.createElement(Button, null, "Button")));
|
|
10
|
+
export const WithAlignmentRight = () => (_jsxs(ButtonGroup, { alignment: "right", p: "x2", bg: "whiteGrey", width: "500px", children: [_jsx(PrimaryButton, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" })] }));
|
|
18
11
|
WithAlignmentRight.story = {
|
|
19
12
|
name: "with alignment right",
|
|
20
13
|
};
|
|
21
|
-
export const WithAlignmentSpaced = () => (
|
|
22
|
-
React.createElement(PrimaryButton, null, "Button"),
|
|
23
|
-
React.createElement(Button, null, "Button")));
|
|
14
|
+
export const WithAlignmentSpaced = () => (_jsxs(ButtonGroup, { alignment: "spaced", bg: "whiteGrey", p: "x2", width: "500px", children: [_jsx(PrimaryButton, { children: "Button" }), _jsx(Button, { children: "Button" })] }));
|
|
24
15
|
WithAlignmentSpaced.story = {
|
|
25
16
|
name: "with alignment spaced",
|
|
26
17
|
};
|
|
27
|
-
export const MoreButtonTypes = () => (
|
|
28
|
-
React.createElement(PrimaryButton, null, "Button"),
|
|
29
|
-
React.createElement(DangerButton, null, "Button"),
|
|
30
|
-
React.createElement(Button, null, "Button"),
|
|
31
|
-
React.createElement(QuietButton, null, "Button"),
|
|
32
|
-
React.createElement(IconicButton, { icon: "menu" }),
|
|
33
|
-
React.createElement(IconicButton, { icon: "menu" }, "Button")));
|
|
18
|
+
export const MoreButtonTypes = () => (_jsxs(ButtonGroup, { bg: "whiteGrey", p: "x2", width: "600px", children: [_jsx(PrimaryButton, { children: "Button" }), _jsx(DangerButton, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(QuietButton, { children: "Button" }), _jsx(IconicButton, { icon: "menu" }), _jsx(IconicButton, { icon: "menu", children: "Button" })] }));
|
|
34
19
|
MoreButtonTypes.story = {
|
|
35
20
|
name: "more button types",
|
|
36
21
|
};
|
|
37
|
-
export const WrappingButtons = () => (
|
|
38
|
-
React.createElement(ButtonGroup, { bg: "whiteGrey", p: "x2" },
|
|
39
|
-
React.createElement(Button, null, "Button"),
|
|
40
|
-
React.createElement(Button, null, "Button"),
|
|
41
|
-
React.createElement(Button, null, "Button"),
|
|
42
|
-
React.createElement(Button, null, "Button"),
|
|
43
|
-
React.createElement(Button, null, "Button"),
|
|
44
|
-
React.createElement(Button, null, "Button"),
|
|
45
|
-
React.createElement(Button, null, "Button"),
|
|
46
|
-
React.createElement(Button, null, "Button"),
|
|
47
|
-
React.createElement(Button, null, "Button"),
|
|
48
|
-
React.createElement(Button, null, "Button")),
|
|
49
|
-
React.createElement(ButtonGroup, { alignment: "right", bg: "whiteGrey", p: "x2", mt: "x2" },
|
|
50
|
-
React.createElement(Button, null, "Button"),
|
|
51
|
-
React.createElement(Button, null, "Button"),
|
|
52
|
-
React.createElement(Button, null, "Button"),
|
|
53
|
-
React.createElement(Button, null, "Button"),
|
|
54
|
-
React.createElement(Button, null, "Button"),
|
|
55
|
-
React.createElement(Button, null, "Button"),
|
|
56
|
-
React.createElement(Button, null, "Button"),
|
|
57
|
-
React.createElement(Button, null, "Button"),
|
|
58
|
-
React.createElement(Button, null, "Button"),
|
|
59
|
-
React.createElement(Button, null, "Button"))));
|
|
22
|
+
export const WrappingButtons = () => (_jsxs(_Fragment, { children: [_jsxs(ButtonGroup, { bg: "whiteGrey", p: "x2", children: [_jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" })] }), _jsxs(ButtonGroup, { alignment: "right", bg: "whiteGrey", p: "x2", mt: "x2", children: [_jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" }), _jsx(Button, { children: "Button" })] })] }));
|
|
60
23
|
WrappingButtons.story = {
|
|
61
24
|
name: "wrapping buttons",
|
|
62
25
|
parameters: { viewport: { defaultViewport: "extraSmall" } },
|
package/dist/src/Card/Card.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { BoxProps } from "../Box/Box";
|
|
3
|
-
export default function Card({ borderRadius, boxShadow, py, px, position, children, ...props }: BoxProps):
|
|
2
|
+
export default function Card({ borderRadius, boxShadow, py, px, position, children, ...props }: BoxProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/src/Card/Card.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Box } from "../Box";
|
|
3
3
|
export default function Card({ borderRadius = "medium", boxShadow = "small", py = "x2", px = "x2", position = "relative", children, ...props }) {
|
|
4
|
-
return (
|
|
4
|
+
return (_jsx(Box, { border: "1px solid", borderColor: "lightGrey", borderRadius: borderRadius, boxShadow: boxShadow, py: py, px: px, position: position, ...props, children: children }));
|
|
5
5
|
}
|
|
@@ -1,18 +1,17 @@
|
|
|
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 _Card: () =>
|
|
5
|
+
export declare const _Card: () => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export declare const CustomCard: {
|
|
8
|
-
():
|
|
7
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
story: {
|
|
10
9
|
name: string;
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
|
-
export declare const Cardset: () =>
|
|
12
|
+
export declare const Cardset: () => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export declare const AdvancedUsage: {
|
|
15
|
-
():
|
|
14
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
parameters: {
|
|
17
16
|
layout: string;
|
|
18
17
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ApplicationFrame, Card, CardSet, DescriptionDetails, DescriptionGroup, DescriptionList, DescriptionTerm, Icon, Link, Page, StatusIndicator, Tooltip, TopBar, } from "../index";
|
|
3
3
|
import { Heading4, Text } from "../Type";
|
|
4
4
|
import TruncatedText from "../TruncatedText/TruncatedText";
|
|
@@ -6,50 +6,17 @@ import { menuItems } from "../TopBar/stories/fixtures";
|
|
|
6
6
|
export default {
|
|
7
7
|
title: "Components/Card",
|
|
8
8
|
};
|
|
9
|
-
export const _Card = () =>
|
|
10
|
-
export const CustomCard = () => (
|
|
9
|
+
export const _Card = () => _jsx(Card, { children: "I am a card." });
|
|
10
|
+
export const CustomCard = () => (_jsx(Card, { bg: "black", color: "white", borderRadius: "small", p: "x1", children: "I am a custom card." }));
|
|
11
11
|
CustomCard.story = {
|
|
12
12
|
name: "Custom card",
|
|
13
13
|
};
|
|
14
|
-
export const Cardset = () => (
|
|
15
|
-
React.createElement(Card, null, "I am a 1st card in a cardset."),
|
|
16
|
-
React.createElement(Card, null, "I am a 2nd card in a cardset."),
|
|
17
|
-
React.createElement(Card, null, "I am a 3rd card in a cardset.")));
|
|
14
|
+
export const Cardset = () => (_jsxs(CardSet, { children: [_jsx(Card, { children: "I am a 1st card in a cardset." }), _jsx(Card, { children: "I am a 2nd card in a cardset." }), _jsx(Card, { children: "I am a 3rd card in a cardset." })] }));
|
|
18
15
|
function AdvancedCard() {
|
|
19
|
-
return (
|
|
20
|
-
React.createElement(Heading4, null, "POLI-2304"),
|
|
21
|
-
React.createElement(DescriptionList, null,
|
|
22
|
-
React.createElement(DescriptionGroup, null,
|
|
23
|
-
React.createElement(DescriptionTerm, null, "Customer"),
|
|
24
|
-
React.createElement(DescriptionDetails, null, "Nulogy")),
|
|
25
|
-
React.createElement(DescriptionGroup, null,
|
|
26
|
-
React.createElement(DescriptionTerm, null,
|
|
27
|
-
React.createElement(Text, { display: "inline-flex", alignItems: "center" },
|
|
28
|
-
"Order number",
|
|
29
|
-
React.createElement(Tooltip, { tooltip: "The unique identifier assigned to this order when it was placed by the customer." },
|
|
30
|
-
React.createElement(Icon, { icon: "info", size: "x3", paddingLeft: "half" })))),
|
|
31
|
-
React.createElement(DescriptionDetails, null,
|
|
32
|
-
React.createElement(Link, { href: "/customer-details" }, "P12-90381-2039"))),
|
|
33
|
-
React.createElement(DescriptionGroup, null,
|
|
34
|
-
React.createElement(DescriptionTerm, null, "Status"),
|
|
35
|
-
React.createElement(DescriptionDetails, null,
|
|
36
|
-
React.createElement(StatusIndicator, { type: "success" }, "Paid"))),
|
|
37
|
-
React.createElement(DescriptionGroup, null,
|
|
38
|
-
React.createElement(DescriptionTerm, null, "Amount"),
|
|
39
|
-
React.createElement(DescriptionDetails, null, "$202.12")),
|
|
40
|
-
React.createElement(DescriptionGroup, null,
|
|
41
|
-
React.createElement(DescriptionTerm, null, "Notes"),
|
|
42
|
-
React.createElement(DescriptionDetails, null,
|
|
43
|
-
React.createElement(TruncatedText, { fontSize: "small", maxCharacters: 200 }, "Due to severe weather disruptions and unforeseen logistical challenges, this shipment has been significantly delayed. The warehouse manager reported that mechanical issues with the transport vehicles coupled with a shortage of available staff, have extended processing times at the loading dock. Additionally, mandatory safety inspections and inventory verifications required extra time, further postponing the dispatch schedule. His detailed notes also mention that alternate transportation arrangements are being evaluated and urge all stakeholders to stay in close communication for updated delivery timelines."))))));
|
|
16
|
+
return (_jsxs(Card, { children: [_jsx(Heading4, { children: "POLI-2304" }), _jsxs(DescriptionList, { 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: "Notes" }), _jsx(DescriptionDetails, { children: _jsx(TruncatedText, { fontSize: "small", maxCharacters: 200, children: "Due to severe weather disruptions and unforeseen logistical challenges, this shipment has been significantly delayed. The warehouse manager reported that mechanical issues with the transport vehicles coupled with a shortage of available staff, have extended processing times at the loading dock. Additionally, mandatory safety inspections and inventory verifications required extra time, further postponing the dispatch schedule. His detailed notes also mention that alternate transportation arrangements are being evaluated and urge all stakeholders to stay in close communication for updated delivery timelines." }) })] })] })] }));
|
|
44
17
|
}
|
|
45
18
|
export const AdvancedUsage = () => {
|
|
46
|
-
return (
|
|
47
|
-
React.createElement(TopBar.BackLink, { href: "/cycle-counts" }, "Cycle counts"),
|
|
48
|
-
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
49
|
-
React.createElement(TopBar.Menu, null, menuItems.map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
|
|
50
|
-
React.createElement(TopBar.MenuItemLink, { ...props })))))) },
|
|
51
|
-
React.createElement(Page, { fullHeight: true },
|
|
52
|
-
React.createElement(CardSet, null, [...Array(10)].map((_, i) => (React.createElement(AdvancedCard, { key: i })))))));
|
|
19
|
+
return (_jsx(ApplicationFrame, { navBar: _jsxs(TopBar.Root, { children: [_jsx(TopBar.BackLink, { href: "/cycle-counts", children: "Cycle counts" }), _jsx(TopBar.PageTitle, { children: "Cycle count #3992" }), _jsx(TopBar.Menu, { children: menuItems.map((props) => (_jsx(TopBar.MenuItem, { children: _jsx(TopBar.MenuItemLink, { ...props }) }, props.title))) })] }), children: _jsx(Page, { fullHeight: true, children: _jsx(CardSet, { children: [...Array(10)].map((_, i) => (_jsx(AdvancedCard, {}, i))) }) }) }));
|
|
53
20
|
};
|
|
54
21
|
AdvancedUsage.parameters = {
|
|
55
22
|
layout: "fullscreen",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
2
3
|
import { styled } from "styled-components";
|
|
3
4
|
import propTypes from "@styled-system/prop-types";
|
|
4
5
|
import { Box } from "../Box";
|
|
@@ -102,10 +103,6 @@ const Checkbox = forwardRef((props, ref) => {
|
|
|
102
103
|
const componentVariant = useComponentVariant(variant);
|
|
103
104
|
const spaceProps = getSubset(props, propTypes.space);
|
|
104
105
|
const restProps = omitSubset(props, propTypes.space);
|
|
105
|
-
return (
|
|
106
|
-
React.createElement(ClickInputLabel, { variant: componentVariant, disabled: disabled },
|
|
107
|
-
React.createElement(CheckboxInput, { type: "checkbox", required: required, "aria-required": required, "aria-invalid": error, indeterminate: indeterminate, ref: ref, ...restProps }),
|
|
108
|
-
React.createElement(VisualCheckbox, { disabled: disabled, checked: checked, indeterminate: indeterminate, "data-testid": "visual-checkbox" }),
|
|
109
|
-
labelText && (React.createElement(Text, { fontSize: componentVariant === "touch" ? "md" : undefined, lineHeight: componentVariant === "touch" ? "base" : undefined, disabled: disabled, ml: "x1" }, labelText)))));
|
|
106
|
+
return (_jsx(Box, { className: className, px: "0", ...spaceProps, children: _jsxs(ClickInputLabel, { variant: componentVariant, disabled: disabled, children: [_jsx(CheckboxInput, { type: "checkbox", required: required, "aria-required": required, "aria-invalid": error, indeterminate: indeterminate, ref: ref, ...restProps }), _jsx(VisualCheckbox, { disabled: disabled, checked: checked, indeterminate: indeterminate, "data-testid": "visual-checkbox" }), labelText && (_jsx(Text, { fontSize: componentVariant === "touch" ? "md" : undefined, lineHeight: componentVariant === "touch" ? "base" : undefined, disabled: disabled, ml: "x1", children: labelText }))] }) }));
|
|
110
107
|
});
|
|
111
108
|
export default Checkbox;
|
|
@@ -1,57 +1,56 @@
|
|
|
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 _Checkbox: () =>
|
|
5
|
+
export declare const _Checkbox: () => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export declare const Multiline: {
|
|
8
|
-
():
|
|
9
|
-
decorators: ((story: any) =>
|
|
7
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
decorators: ((story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
10
9
|
};
|
|
11
10
|
export declare const SetToDefaultChecked: {
|
|
12
|
-
():
|
|
11
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
story: {
|
|
14
13
|
name: string;
|
|
15
14
|
};
|
|
16
15
|
};
|
|
17
16
|
export declare const SetToDisabled: {
|
|
18
|
-
():
|
|
17
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
19
18
|
story: {
|
|
20
19
|
name: string;
|
|
21
20
|
};
|
|
22
21
|
};
|
|
23
22
|
export declare const CheckboxWithNoLabel: {
|
|
24
|
-
():
|
|
23
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
25
24
|
story: {
|
|
26
25
|
name: string;
|
|
27
26
|
};
|
|
28
27
|
};
|
|
29
28
|
export declare const SetToError: {
|
|
30
|
-
():
|
|
29
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
31
30
|
story: {
|
|
32
31
|
name: string;
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
34
|
export declare const SetToRequired: {
|
|
36
|
-
():
|
|
35
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
37
36
|
story: {
|
|
38
37
|
name: string;
|
|
39
38
|
};
|
|
40
39
|
};
|
|
41
40
|
export declare const Indeterminate: {
|
|
42
|
-
():
|
|
41
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
43
42
|
story: {
|
|
44
43
|
name: string;
|
|
45
44
|
};
|
|
46
45
|
};
|
|
47
46
|
export declare const WithState: {
|
|
48
|
-
():
|
|
47
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
49
48
|
story: {
|
|
50
49
|
name: string;
|
|
51
50
|
};
|
|
52
51
|
};
|
|
53
52
|
export declare const UsingRefToControlFocus: {
|
|
54
|
-
():
|
|
53
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
55
54
|
story: {
|
|
56
55
|
name: string;
|
|
57
56
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React, { useRef } from "react";
|
|
2
3
|
import { Checkbox, Button } from "../index";
|
|
3
4
|
class CheckboxWithState extends React.Component {
|
|
@@ -13,52 +14,40 @@ class CheckboxWithState extends React.Component {
|
|
|
13
14
|
}
|
|
14
15
|
render() {
|
|
15
16
|
const { checkbox1, checkbox2 } = this.state;
|
|
16
|
-
return (
|
|
17
|
-
React.createElement(Checkbox, { id: "checkbox-1", checked: checkbox1, onChange: () => this.handleChange("checkbox1"), labelText: "I am controlled and checked" }),
|
|
18
|
-
React.createElement(Checkbox, { id: "checkbox-2", checked: checkbox2, onChange: () => this.handleChange("checkbox2"), labelText: "I am controlled and unchecked" })));
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(Checkbox, { id: "checkbox-1", checked: checkbox1, onChange: () => this.handleChange("checkbox1"), labelText: "I am controlled and checked" }), _jsx(Checkbox, { id: "checkbox-2", checked: checkbox2, onChange: () => this.handleChange("checkbox2"), labelText: "I am controlled and unchecked" })] }));
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
20
|
export default {
|
|
22
21
|
title: "Components/Checkbox",
|
|
23
22
|
};
|
|
24
|
-
export const _Checkbox = () =>
|
|
25
|
-
export const Multiline = () =>
|
|
26
|
-
Multiline.decorators = [(story) =>
|
|
27
|
-
export const SetToDefaultChecked = () =>
|
|
23
|
+
export const _Checkbox = () => _jsx(Checkbox, { p: "x3", id: "checkbox", labelText: "I am a checkbox" });
|
|
24
|
+
export const Multiline = () => _jsx(Checkbox, { p: "x3", id: "checkbox", labelText: "Lorem ipsum dolor sit amet consecutor" });
|
|
25
|
+
Multiline.decorators = [(story) => _jsx("div", { style: { width: "200px" }, children: story() })];
|
|
26
|
+
export const SetToDefaultChecked = () => _jsx(Checkbox, { id: "checkbox", defaultChecked: true, labelText: "I am checked by default" });
|
|
28
27
|
SetToDefaultChecked.story = {
|
|
29
28
|
name: "Set to defaultChecked",
|
|
30
29
|
};
|
|
31
|
-
export const SetToDisabled = () => (
|
|
32
|
-
React.createElement(Checkbox, { id: "checkbox-1", disabled: true, labelText: "I am disabled" }),
|
|
33
|
-
React.createElement(Checkbox, { id: "checkbox-2", checked: true, disabled: true, labelText: "I am disabled" })));
|
|
30
|
+
export const SetToDisabled = () => (_jsxs(_Fragment, { children: [_jsx(Checkbox, { id: "checkbox-1", disabled: true, labelText: "I am disabled" }), _jsx(Checkbox, { id: "checkbox-2", checked: true, disabled: true, labelText: "I am disabled" })] }));
|
|
34
31
|
SetToDisabled.story = {
|
|
35
32
|
name: "Set to disabled",
|
|
36
33
|
};
|
|
37
|
-
export const CheckboxWithNoLabel = () => (
|
|
38
|
-
React.createElement(Checkbox, null)));
|
|
34
|
+
export const CheckboxWithNoLabel = () => (_jsx(_Fragment, { children: _jsx(Checkbox, {}) }));
|
|
39
35
|
CheckboxWithNoLabel.story = {
|
|
40
36
|
name: "Checkbox with no label",
|
|
41
37
|
};
|
|
42
|
-
export const SetToError = () => (
|
|
43
|
-
React.createElement(Checkbox, { id: "checkbox", error: true, labelText: "I am error" }),
|
|
44
|
-
React.createElement(Checkbox, { id: "checkbox", defaultChecked: true, error: true, labelText: "I am error" })));
|
|
38
|
+
export const SetToError = () => (_jsxs(_Fragment, { children: [_jsx(Checkbox, { id: "checkbox", error: true, labelText: "I am error" }), _jsx(Checkbox, { id: "checkbox", defaultChecked: true, error: true, labelText: "I am error" })] }));
|
|
45
39
|
SetToError.story = {
|
|
46
40
|
name: "Set to error",
|
|
47
41
|
};
|
|
48
|
-
export const SetToRequired = () => (
|
|
49
|
-
React.createElement(Checkbox, { id: "checkbox", labelText: "I am a checkbox", required: true })));
|
|
42
|
+
export const SetToRequired = () => (_jsx(_Fragment, { children: _jsx(Checkbox, { id: "checkbox", labelText: "I am a checkbox", required: true }) }));
|
|
50
43
|
SetToRequired.story = {
|
|
51
44
|
name: "Set to required",
|
|
52
45
|
};
|
|
53
|
-
export const Indeterminate = () => (
|
|
54
|
-
React.createElement(Checkbox, { id: "checkbox", labelText: "I am an indeterminate checkbox", readOnly: true, checked: true, indeterminate: true }),
|
|
55
|
-
React.createElement(Checkbox, { id: "checkbox", labelText: "I am a unchecked indeterminate checkbox", readOnly: true, checked: false, indeterminate: true }),
|
|
56
|
-
React.createElement(Checkbox, { id: "checkbox", labelText: "I am an indeterminate checkbox with an error", readOnly: true, checked: true, indeterminate: true, error: true }),
|
|
57
|
-
React.createElement(Checkbox, { id: "checkbox", labelText: "I am a disabled indeterminate checkbox", readOnly: true, checked: true, indeterminate: true, disabled: true })));
|
|
46
|
+
export const Indeterminate = () => (_jsxs(_Fragment, { children: [_jsx(Checkbox, { id: "checkbox", labelText: "I am an indeterminate checkbox", readOnly: true, checked: true, indeterminate: true }), _jsx(Checkbox, { id: "checkbox", labelText: "I am a unchecked indeterminate checkbox", readOnly: true, checked: false, indeterminate: true }), _jsx(Checkbox, { id: "checkbox", labelText: "I am an indeterminate checkbox with an error", readOnly: true, checked: true, indeterminate: true, error: true }), _jsx(Checkbox, { id: "checkbox", labelText: "I am a disabled indeterminate checkbox", readOnly: true, checked: true, indeterminate: true, disabled: true })] }));
|
|
58
47
|
Indeterminate.story = {
|
|
59
48
|
name: "indeterminate",
|
|
60
49
|
};
|
|
61
|
-
export const WithState = () =>
|
|
50
|
+
export const WithState = () => _jsx(CheckboxWithState, {});
|
|
62
51
|
WithState.story = {
|
|
63
52
|
name: "With state",
|
|
64
53
|
};
|
|
@@ -67,9 +56,7 @@ export const UsingRefToControlFocus = () => {
|
|
|
67
56
|
const handleClick = () => {
|
|
68
57
|
ref.current.focus();
|
|
69
58
|
};
|
|
70
|
-
return (
|
|
71
|
-
React.createElement(Checkbox, { ref: ref, labelText: "I am a unchecked indeterminate checkbox", readOnly: true, checked: false, indeterminate: true }),
|
|
72
|
-
React.createElement(Button, { onClick: handleClick }, "Focus the Input")));
|
|
59
|
+
return (_jsxs(_Fragment, { children: [_jsx(Checkbox, { ref: ref, labelText: "I am a unchecked indeterminate checkbox", readOnly: true, checked: false, indeterminate: true }), _jsx(Button, { onClick: handleClick, children: "Focus the Input" })] }));
|
|
73
60
|
};
|
|
74
61
|
UsingRefToControlFocus.story = {
|
|
75
62
|
name: "using ref to control focus",
|
|
@@ -16,5 +16,5 @@ interface CheckboxGroupProps {
|
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
hint?: string;
|
|
18
18
|
}
|
|
19
|
-
export default function CheckboxGroup({ className, id, errorMessage, errorList, labelText, helpText, requirementText, hint, ...props }: CheckboxGroupProps):
|
|
19
|
+
export default function CheckboxGroup({ className, id, errorMessage, errorList, labelText, helpText, requirementText, hint, ...props }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { styled } from "styled-components";
|
|
3
4
|
import { HelpText, RequirementText } from "../FieldLabel";
|
|
@@ -9,21 +10,12 @@ import LabelText, { LabelContent } from "../FieldLabel/LabelText";
|
|
|
9
10
|
import Checkbox from "./Checkbox";
|
|
10
11
|
export default function CheckboxGroup({ className, id, errorMessage, errorList, labelText, helpText, requirementText, hint, ...props }) {
|
|
11
12
|
const otherProps = { ...props, errorMessage, errorList };
|
|
12
|
-
return (
|
|
13
|
-
React.createElement(Legend, null,
|
|
14
|
-
React.createElement(LabelContent, { "data-testid": "label-content" },
|
|
15
|
-
React.createElement(LabelText, { "data-testid": "label-text" }, labelText),
|
|
16
|
-
requirementText && (React.createElement(RequirementText, { "data-testid": "requirement-text", ml: "none" }, requirementText)),
|
|
17
|
-
hint && (React.createElement(Tooltip, { tooltip: hint },
|
|
18
|
-
React.createElement(InlineIcon, { color: "darkGrey", size: "x2", icon: "info" }))))),
|
|
19
|
-
helpText && React.createElement(HelpText, null, helpText),
|
|
20
|
-
getCheckboxButtons(otherProps),
|
|
21
|
-
React.createElement(InlineValidation, { mt: "x1", errorMessage: errorMessage, errorList: errorList })));
|
|
13
|
+
return (_jsxs(Fieldset, { className: className, id: id, children: [_jsx(Legend, { 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, { children: helpText }), getCheckboxButtons(otherProps), _jsx(InlineValidation, { mt: "x1", errorMessage: errorMessage, errorList: errorList })] }));
|
|
22
14
|
}
|
|
23
15
|
const getCheckboxButtons = (props) => {
|
|
24
16
|
const checkboxButtons = React.Children.map(props.children, (checkbox) => {
|
|
25
17
|
const { value, disabled, required, onChange, ...checkboxProps } = checkbox.props;
|
|
26
|
-
return (
|
|
18
|
+
return (_jsx(Checkbox, { ...checkboxProps, value: value, disabled: props.disabled || disabled, error: !!(props.errorMessage || props.errorList), required: props.required || required, name: props.name, defaultChecked: props.defaultValue ? props.defaultValue.includes(value) : undefined, checked: props.checkedValue ? props.checkedValue.includes(value) : undefined, onChange: props.onChange || onChange }));
|
|
27
19
|
});
|
|
28
20
|
return checkboxButtons;
|
|
29
21
|
};
|