@scottish-government/designsystem-react 0.10.2 → 0.11.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/@types/components/Accordion.d.ts +3 -2
- package/@types/components/ButtonGroup.d.ts +5 -0
- package/@types/components/PageHeader.d.ts +2 -1
- package/@types/components/RadioButton.d.ts +2 -2
- package/@types/components/SearchFacets.d.ts +18 -0
- package/@types/components/SearchFilters.d.ts +14 -0
- package/@types/components/SearchResult.d.ts +30 -0
- package/@types/components/SearchSort.d.ts +9 -0
- package/@types/components/SideNavigation.d.ts +1 -1
- package/CHANGELOG.md +39 -5
- package/dist/common/AbstractNotificationBanner/AbstractNotificationBanner.d.ts +9 -0
- package/dist/common/AbstractNotificationBanner/AbstractNotificationBanner.jsx +62 -0
- package/dist/common/AbstractNotificationBanner/index.d.ts +1 -0
- package/dist/common/AbstractNotificationBanner/index.js +8 -0
- package/dist/common/ActionLink/ActionLink.d.ts +5 -0
- package/dist/common/ActionLink/ActionLink.jsx +19 -0
- package/dist/common/ActionLink/index.d.ts +1 -0
- package/dist/common/ActionLink/index.js +8 -0
- package/dist/common/ConditionalWrapper/ConditionalWrapper.d.ts +8 -0
- package/dist/common/ConditionalWrapper/ConditionalWrapper.jsx +8 -0
- package/dist/common/ConditionalWrapper/index.d.ts +1 -0
- package/dist/common/ConditionalWrapper/index.js +8 -0
- package/dist/common/FileIcon/FileIcon.d.ts +6 -0
- package/dist/common/FileIcon/FileIcon.jsx +46 -0
- package/dist/common/FileIcon/index.d.ts +1 -0
- package/dist/common/FileIcon/index.js +8 -0
- package/dist/common/HintText/HintText.d.ts +5 -0
- package/dist/common/HintText/HintText.jsx +9 -0
- package/dist/common/HintText/index.d.ts +1 -0
- package/dist/common/HintText/index.js +8 -0
- package/dist/common/Icon/Icon.d.ts +6 -0
- package/dist/common/Icon/Icon.jsx +51 -0
- package/dist/common/Icon/index.d.ts +1 -0
- package/dist/common/Icon/index.js +8 -0
- package/dist/common/ScreenReaderText/ScreenReaderText.d.ts +5 -0
- package/dist/common/ScreenReaderText/ScreenReaderText.jsx +9 -0
- package/dist/common/ScreenReaderText/index.d.ts +1 -0
- package/dist/common/ScreenReaderText/index.js +8 -0
- package/dist/common/WrapperTag/WrapperTag.d.ts +8 -0
- package/dist/common/WrapperTag/WrapperTag.jsx +11 -0
- package/dist/common/WrapperTag/index.d.ts +1 -0
- package/dist/common/WrapperTag/index.js +8 -0
- package/dist/common/index.d.ts +8 -0
- package/dist/common/index.js +22 -0
- package/dist/components/Accordion/Accordion.d.ts +10 -0
- package/dist/components/Accordion/Accordion.jsx +8 -3
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +8 -0
- package/dist/components/AspectBox/AspectBox.d.ts +6 -0
- package/dist/components/AspectBox/index.d.ts +1 -0
- package/dist/components/AspectBox/index.js +8 -0
- package/dist/components/BackToTop/BackToTop.d.ts +5 -0
- package/dist/components/BackToTop/index.d.ts +1 -0
- package/dist/components/BackToTop/index.js +8 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +9 -0
- package/dist/components/Breadcrumbs/index.d.ts +1 -0
- package/dist/components/Breadcrumbs/index.js +8 -0
- package/dist/components/Button/Button.d.ts +5 -0
- package/dist/components/Button/ButtonGroup.d.ts +5 -0
- package/dist/components/Button/ButtonGroup.jsx +13 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/index.js +10 -0
- package/dist/components/ButtonGroup/ButtonGroup.jsx +13 -0
- package/dist/components/CategoryItem/CategoryItem.d.ts +5 -0
- package/dist/components/CategoryItem/index.d.ts +1 -0
- package/dist/components/CategoryItem/index.js +8 -0
- package/dist/components/CategoryList/CategoryList.d.ts +6 -0
- package/dist/components/CategoryList/index.d.ts +1 -0
- package/dist/components/CategoryList/index.js +8 -0
- package/dist/components/Checkbox/Checkbox.d.ts +5 -0
- package/dist/components/Checkbox/CheckboxGroup.d.ts +6 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/index.js +10 -0
- package/dist/components/ConfirmationMessage/ConfirmationMessage.d.ts +5 -0
- package/dist/components/ConfirmationMessage/index.d.ts +1 -0
- package/dist/components/ConfirmationMessage/index.js +8 -0
- package/dist/components/ContentsNav/ContentsNav.d.ts +10 -0
- package/dist/components/ContentsNav/index.d.ts +1 -0
- package/dist/components/ContentsNav/index.js +8 -0
- package/dist/components/CookieBanner/CookieBanner.d.ts +9 -0
- package/dist/components/CookieBanner/index.d.ts +1 -0
- package/dist/components/CookieBanner/index.js +8 -0
- package/dist/components/DatePicker/DatePicker.d.ts +5 -0
- package/dist/components/DatePicker/DatePicker.jsx +2 -2
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/index.js +8 -0
- package/dist/components/Details/Details.d.ts +5 -0
- package/dist/components/Details/index.d.ts +1 -0
- package/dist/components/Details/index.js +8 -0
- package/dist/components/ErrorMessage/ErrorMessage.d.ts +5 -0
- package/dist/components/ErrorMessage/index.d.ts +1 -0
- package/dist/components/ErrorMessage/index.js +8 -0
- package/dist/components/ErrorSummary/ErrorSummary.d.ts +9 -0
- package/dist/components/ErrorSummary/index.d.ts +1 -0
- package/dist/components/ErrorSummary/index.js +8 -0
- package/dist/components/FeatureHeader/FeatureHeader.d.ts +13 -0
- package/dist/components/FeatureHeader/FeatureHeader.jsx +70 -0
- package/dist/components/FeatureHeader/index.d.ts +1 -0
- package/dist/components/FeatureHeader/index.js +8 -0
- package/dist/components/FileDownload/FileDownload.d.ts +5 -0
- package/dist/components/FileDownload/index.d.ts +1 -0
- package/dist/components/FileDownload/index.js +8 -0
- package/dist/components/HideThisPage/HideThisPage.d.ts +6 -0
- package/dist/components/HideThisPage/index.d.ts +1 -0
- package/dist/components/HideThisPage/index.js +8 -0
- package/dist/components/InsetText/InsetText.d.ts +5 -0
- package/dist/components/InsetText/index.d.ts +1 -0
- package/dist/components/InsetText/index.js +8 -0
- package/dist/components/NotificationBanner/NotificationBanner.d.ts +9 -0
- package/dist/components/NotificationBanner/index.d.ts +1 -0
- package/dist/components/NotificationBanner/index.js +8 -0
- package/dist/components/NotificationPanel/NotificationPanel.d.ts +5 -0
- package/dist/components/NotificationPanel/index.d.ts +1 -0
- package/dist/components/NotificationPanel/index.js +8 -0
- package/dist/components/PageHeader/PageHeader.d.ts +5 -0
- package/dist/components/PageHeader/PageHeader.jsx +2 -2
- package/dist/components/PageHeader/index.d.ts +1 -0
- package/dist/components/PageHeader/index.js +8 -0
- package/dist/components/PageMetadata/PageMetadata.d.ts +9 -0
- package/dist/components/PageMetadata/index.d.ts +1 -0
- package/dist/components/PageMetadata/index.js +8 -0
- package/dist/components/Pagination/Pagination.d.ts +7 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/Pagination/index.js +8 -0
- package/dist/components/PhaseBanner/PhaseBanner.d.ts +5 -0
- package/dist/components/PhaseBanner/index.d.ts +1 -0
- package/dist/components/PhaseBanner/index.js +8 -0
- package/dist/components/Question/Question.d.ts +5 -0
- package/dist/components/Question/Question.jsx +1 -1
- package/dist/components/Question/index.d.ts +1 -0
- package/dist/components/Question/index.js +8 -0
- package/dist/components/RadioButton/RadioButton.d.ts +5 -0
- package/dist/components/RadioButton/RadioGroup.d.ts +6 -0
- package/dist/components/RadioButton/RadioGroup.jsx +1 -1
- package/dist/components/RadioButton/index.d.ts +2 -0
- package/dist/components/RadioButton/index.js +10 -0
- package/dist/components/SearchFacets/SearchFacets.d.ts +14 -0
- package/dist/components/SearchFacets/SearchFacets.jsx +101 -0
- package/dist/components/SearchFacets/index.d.ts +1 -0
- package/dist/components/SearchFacets/index.js +8 -0
- package/dist/components/SearchFilters/SearchFilters.d.ts +16 -0
- package/dist/components/SearchFilters/SearchFilters.jsx +63 -0
- package/dist/components/SearchFilters/index.d.ts +1 -0
- package/dist/components/SearchFilters/index.js +8 -0
- package/dist/components/SearchResult/SearchResult.d.ts +28 -0
- package/dist/components/SearchResult/SearchResult.jsx +93 -0
- package/dist/components/SearchResult/index.d.ts +1 -0
- package/dist/components/SearchResult/index.js +8 -0
- package/dist/components/SearchSort/SearchSort.d.ts +10 -0
- package/dist/components/SearchSort/SearchSort.jsx +28 -0
- package/dist/components/SearchSort/index.d.ts +1 -0
- package/dist/components/SearchSort/index.js +8 -0
- package/dist/components/Select/Select.d.ts +5 -0
- package/dist/components/Select/Select.jsx +1 -1
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Select/index.js +8 -0
- package/dist/components/SequentialNavigation/SequentialNavigation.d.ts +13 -0
- package/dist/components/SequentialNavigation/SequentialNavigation.jsx +0 -1
- package/dist/components/SequentialNavigation/index.d.ts +1 -0
- package/dist/components/SequentialNavigation/index.js +8 -0
- package/dist/components/SideNavigation/SideNavigation.d.ts +13 -0
- package/dist/components/SideNavigation/SideNavigation.jsx +2 -2
- package/dist/components/SideNavigation/index.d.ts +1 -0
- package/dist/components/SideNavigation/index.js +8 -0
- package/dist/components/SiteFooter/SiteFooter.d.ts +22 -0
- package/dist/components/SiteFooter/index.d.ts +1 -0
- package/dist/components/SiteFooter/index.js +8 -0
- package/dist/components/SiteHeader/SiteHeader.d.ts +22 -0
- package/dist/components/SiteHeader/SiteHeader.jsx +1 -2
- package/dist/components/SiteHeader/index.d.ts +1 -0
- package/dist/components/SiteHeader/index.js +8 -0
- package/dist/components/SiteNavigation/SiteNavigation.d.ts +9 -0
- package/dist/components/SiteNavigation/index.d.ts +1 -0
- package/dist/components/SiteNavigation/index.js +8 -0
- package/dist/components/SiteSearch/SiteSearch.d.ts +5 -0
- package/dist/components/SiteSearch/SiteSearch.jsx +1 -1
- package/dist/components/SiteSearch/index.d.ts +1 -0
- package/dist/components/SiteSearch/index.js +8 -0
- package/dist/components/SkipLinks/SkipLinks.d.ts +10 -0
- package/dist/components/SkipLinks/SkipLinks.jsx +42 -0
- package/dist/components/SkipLinks/index.d.ts +1 -0
- package/dist/components/SkipLinks/index.js +8 -0
- package/dist/components/SummaryCard/SummaryCard.d.ts +10 -0
- package/dist/components/SummaryCard/index.d.ts +1 -0
- package/dist/components/SummaryCard/index.js +8 -0
- package/dist/components/SummaryList/SummaryList.d.ts +18 -0
- package/dist/components/SummaryList/index.d.ts +1 -0
- package/dist/components/SummaryList/index.js +8 -0
- package/dist/components/Table/Table.d.ts +5 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +8 -0
- package/dist/components/Tabs/Tabs.d.ts +10 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/index.js +8 -0
- package/dist/components/Tag/Tag.d.ts +5 -0
- package/dist/components/Tag/index.d.ts +1 -0
- package/dist/components/Tag/index.js +8 -0
- package/dist/components/TaskList/TaskList.d.ts +13 -0
- package/dist/components/TaskList/TaskList.jsx +1 -1
- package/dist/components/TaskList/index.d.ts +1 -0
- package/dist/components/TaskList/index.js +8 -0
- package/dist/components/TextInput/TextInput.d.ts +5 -0
- package/dist/components/TextInput/TextInput.jsx +2 -2
- package/dist/components/TextInput/index.d.ts +1 -0
- package/dist/components/TextInput/index.js +8 -0
- package/dist/components/Textarea/Textarea.d.ts +5 -0
- package/dist/components/Textarea/Textarea.jsx +1 -1
- package/dist/components/Textarea/index.d.ts +1 -0
- package/dist/components/Textarea/index.js +8 -0
- package/dist/components/WarningText/WarningText.d.ts +5 -0
- package/dist/components/WarningText/index.d.ts +1 -0
- package/dist/components/WarningText/index.js +8 -0
- package/dist/components/index.d.ts +46 -0
- package/dist/components/index.js +101 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +8 -0
- package/dist/hooks/useTracking/index.d.ts +1 -0
- package/dist/hooks/useTracking/index.js +8 -0
- package/dist/hooks/useTracking/useTracking.d.ts +1 -0
- package/dist/hooks/useTracking/useTracking.js +21 -0
- package/dist/images/documents/audio.d.ts +4 -0
- package/dist/images/documents/csv.d.ts +4 -0
- package/dist/images/documents/excel.d.ts +4 -0
- package/dist/images/documents/file.d.ts +4 -0
- package/dist/images/documents/generic.d.ts +4 -0
- package/dist/images/documents/geodata.d.ts +4 -0
- package/dist/images/documents/ical.d.ts +4 -0
- package/dist/images/documents/ico.d.ts +4 -0
- package/dist/images/documents/image.d.ts +4 -0
- package/dist/images/documents/index.d.ts +22 -0
- package/dist/images/documents/odf.d.ts +4 -0
- package/dist/images/documents/odg.d.ts +4 -0
- package/dist/images/documents/odp.d.ts +4 -0
- package/dist/images/documents/ods.d.ts +4 -0
- package/dist/images/documents/odt.d.ts +4 -0
- package/dist/images/documents/pdf.d.ts +4 -0
- package/dist/images/documents/ppt.d.ts +4 -0
- package/dist/images/documents/rtf.d.ts +4 -0
- package/dist/images/documents/text.d.ts +4 -0
- package/dist/images/documents/video.d.ts +4 -0
- package/dist/images/documents/word.d.ts +4 -0
- package/dist/images/documents/xml.d.ts +4 -0
- package/dist/images/documents/zip.d.ts +4 -0
- package/dist/images/icons/arrow_upward.d.ts +4 -0
- package/dist/images/icons/calendar_today.d.ts +4 -0
- package/dist/images/icons/cancel.d.ts +4 -0
- package/dist/images/icons/check_circle.d.ts +4 -0
- package/dist/images/icons/chevron_left.d.ts +4 -0
- package/dist/images/icons/chevron_right.d.ts +4 -0
- package/dist/images/icons/close.d.ts +4 -0
- package/dist/images/icons/description.d.ts +4 -0
- package/dist/images/icons/double_chevron_left.d.ts +4 -0
- package/dist/images/icons/double_chevron_right.d.ts +4 -0
- package/dist/images/icons/error.d.ts +4 -0
- package/dist/images/icons/expand_less.d.ts +4 -0
- package/dist/images/icons/expand_more.d.ts +4 -0
- package/dist/images/icons/index.d.ts +17 -0
- package/dist/images/icons/list.d.ts +4 -0
- package/dist/images/icons/menu.d.ts +4 -0
- package/dist/images/icons/priority_high.d.ts +4 -0
- package/dist/images/icons/search.d.ts +4 -0
- package/dist/images/index.d.ts +2 -0
- package/dist/images/index.js +38 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +40 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/context.d.ts +4 -0
- package/package.json +25 -23
- package/src/common/{AbstractNotificationBanner.test.tsx → AbstractNotificationBanner/AbstractNotificationBanner.test.tsx} +1 -1
- package/src/common/{AbstractNotificationBanner.tsx → AbstractNotificationBanner/AbstractNotificationBanner.tsx} +2 -2
- package/src/common/AbstractNotificationBanner/index.ts +1 -0
- package/src/common/ActionLink/index.ts +1 -0
- package/src/common/ConditionalWrapper/index.ts +1 -0
- package/src/common/{FileIcon.tsx → FileIcon/FileIcon.tsx} +1 -1
- package/src/common/FileIcon/index.ts +1 -0
- package/src/common/HintText/index.ts +1 -0
- package/src/common/{Icon.tsx → Icon/Icon.tsx} +1 -1
- package/src/common/Icon/index.ts +1 -0
- package/src/common/ScreenReaderText/index.ts +1 -0
- package/src/common/WrapperTag/index.ts +1 -0
- package/src/common/index.ts +8 -0
- package/src/components/Accordion/Accordion.Item.stories.tsx +10 -9
- package/src/components/Accordion/Accordion.stories.tsx +4 -4
- package/src/components/Accordion/Accordion.test.tsx +48 -14
- package/src/components/Accordion/Accordion.tsx +12 -1
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/AspectBox/index.ts +1 -0
- package/src/components/BackToTop/index.ts +1 -0
- package/src/components/Breadcrumbs/Breadcrumbs.Item.stories.tsx +8 -1
- package/src/components/Breadcrumbs/index.ts +1 -0
- package/src/components/Button/Button.stories.tsx +1 -1
- package/src/components/Button/ButtonGroup.stories.tsx +41 -0
- package/src/components/Button/ButtonGroup.test.tsx +45 -0
- package/src/components/Button/ButtonGroup.tsx +20 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/CategoryItem/index.ts +1 -0
- package/src/components/CategoryList/CategoryList.stories.tsx +1 -1
- package/src/components/CategoryList/CategoryList.test.tsx +1 -1
- package/src/components/CategoryList/index.ts +1 -0
- package/src/components/Checkbox/index.ts +2 -0
- package/src/components/ConfirmationMessage/index.ts +1 -0
- package/src/components/ContentsNav/ContentsNav.Item.stories.tsx +8 -0
- package/src/components/ContentsNav/index.ts +1 -0
- package/src/components/CookieBanner/CookieBanner.Buttons.stories.tsx +1 -1
- package/src/components/CookieBanner/CookieBanner.stories.tsx +1 -1
- package/src/components/CookieBanner/index.ts +1 -0
- package/src/components/DatePicker/DatePicker.tsx +2 -2
- package/src/components/DatePicker/index.ts +1 -0
- package/src/components/Details/index.ts +1 -0
- package/src/components/ErrorMessage/index.ts +1 -0
- package/src/components/ErrorSummary/ErrorSummary.Item.stories.tsx +7 -0
- package/src/components/ErrorSummary/index.ts +1 -0
- package/src/components/FeatureHeader/FeatureHeader.stories.tsx +60 -0
- package/src/components/FeatureHeader/FeatureHeader.tsx +94 -0
- package/src/components/FeatureHeader/index.ts +1 -0
- package/src/components/FileDownload/index.ts +1 -0
- package/src/components/HideThisPage/index.ts +1 -0
- package/src/components/InsetText/index.ts +1 -0
- package/src/components/NotificationBanner/index.ts +1 -0
- package/src/components/NotificationPanel/index.ts +1 -0
- package/src/components/PageHeader/PageHeader.stories.tsx +1 -1
- package/src/components/PageHeader/PageHeader.tsx +2 -1
- package/src/components/PageHeader/index.ts +1 -0
- package/src/components/PageMetadata/PageMetadata.Item.stories.tsx +9 -0
- package/src/components/PageMetadata/index.ts +1 -0
- package/src/components/Pagination/index.ts +1 -0
- package/src/components/PhaseBanner/index.ts +1 -0
- package/src/components/Question/Question.stories.tsx +2 -3
- package/src/components/Question/Question.tsx +2 -2
- package/src/components/Question/index.ts +1 -0
- package/src/components/RadioButton/RadioGroup.stories.tsx +1 -2
- package/src/components/RadioButton/RadioGroup.test.tsx +1 -2
- package/src/components/RadioButton/RadioGroup.tsx +2 -2
- package/src/components/RadioButton/index.ts +2 -0
- package/src/components/SearchFacets/SearchFacets.Group.stories.tsx +56 -0
- package/src/components/SearchFacets/SearchFacets.Item.stories.tsx +53 -0
- package/src/components/SearchFacets/SearchFacets.stories.tsx +38 -0
- package/src/components/SearchFacets/SearchFacets.test.tsx +214 -0
- package/src/components/SearchFacets/SearchFacets.tsx +99 -0
- package/src/components/SearchFacets/index.ts +1 -0
- package/src/components/SearchFilters/SearchFilters.Panel.stories.tsx +201 -0
- package/src/components/SearchFilters/SearchFilters.stories.tsx +137 -0
- package/src/components/SearchFilters/SearchFilters.test.tsx +161 -0
- package/src/components/SearchFilters/SearchFilters.tsx +89 -0
- package/src/components/SearchFilters/index.ts +1 -0
- package/src/components/SearchResult/SearchResult.stories.tsx +111 -0
- package/src/components/SearchResult/SearchResult.test.tsx +215 -0
- package/src/components/SearchResult/SearchResult.tsx +137 -0
- package/src/components/SearchResult/index.ts +1 -0
- package/src/components/SearchSort/SearchSort.stories.tsx +32 -0
- package/src/components/SearchSort/SearchSort.test.tsx +129 -0
- package/src/components/SearchSort/SearchSort.tsx +45 -0
- package/src/components/SearchSort/index.ts +1 -0
- package/src/components/Select/Select.tsx +1 -1
- package/src/components/Select/index.ts +1 -0
- package/src/components/SequentialNavigation/SequentialNavigation.Next.stories.tsx +1 -1
- package/src/components/SequentialNavigation/SequentialNavigation.Previous.stories.tsx +1 -1
- package/src/components/SequentialNavigation/SequentialNavigation.tsx +0 -1
- package/src/components/SequentialNavigation/index.ts +1 -0
- package/src/components/SideNavigation/SideNavigation.Item.stories.tsx +9 -0
- package/src/components/SideNavigation/SideNavigation.List.stories.tsx +7 -0
- package/src/components/SideNavigation/SideNavigation.tsx +2 -1
- package/src/components/SideNavigation/index.ts +1 -0
- package/src/components/SiteFooter/SiteFooter.License.stories.tsx +7 -0
- package/src/components/SiteFooter/SiteFooter.Link.stories.tsx +9 -0
- package/src/components/SiteFooter/SiteFooter.Org.stories.tsx +7 -0
- package/src/components/SiteFooter/index.ts +1 -0
- package/src/components/SiteHeader/SiteHeader.stories.tsx +3 -3
- package/src/components/SiteHeader/SiteHeader.test.tsx +3 -3
- package/src/components/SiteHeader/SiteHeader.tsx +1 -3
- package/src/components/SiteHeader/index.ts +1 -0
- package/src/components/SiteNavigation/SiteNavigation.Item.stories.tsx +10 -0
- package/src/components/SiteNavigation/index.ts +1 -0
- package/src/components/SiteSearch/SiteSearch.tsx +1 -1
- package/src/components/SiteSearch/index.ts +1 -0
- package/src/components/SkipLinks/SkipLinks.Item.stories.tsx +11 -1
- package/src/components/SkipLinks/SkipLinks.tsx +10 -0
- package/src/components/SkipLinks/index.ts +1 -0
- package/src/components/SummaryCard/SummaryCard.Action.stories.tsx +7 -0
- package/src/components/SummaryCard/SummaryCard.stories.tsx +8 -1
- package/src/components/SummaryCard/SummaryCard.test.tsx +2 -2
- package/src/components/SummaryCard/index.ts +1 -0
- package/src/components/SummaryList/SummaryList.Item.stories.tsx +15 -0
- package/src/components/SummaryList/SummaryList.Value.stories.tsx +5 -2
- package/src/components/SummaryList/index.ts +1 -0
- package/src/components/Table/index.ts +1 -0
- package/src/components/Tabs/Tabs.Item.stories.tsx +4 -1
- package/src/components/Tabs/index.ts +1 -0
- package/src/components/Tag/index.ts +1 -0
- package/src/components/TaskList/TaskList.Group.stories.tsx +9 -0
- package/src/components/TaskList/TaskList.Item.stories.tsx +7 -0
- package/src/components/TaskList/TaskList.tsx +1 -1
- package/src/components/TaskList/index.ts +1 -0
- package/src/components/TextInput/TextInput.tsx +2 -2
- package/src/components/TextInput/index.ts +1 -0
- package/src/components/Textarea/Textarea.tsx +1 -1
- package/src/components/Textarea/index.ts +1 -0
- package/src/components/WarningText/index.ts +1 -0
- package/src/components/index.ts +46 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useTracking/index.ts +1 -0
- package/src/images/index.ts +2 -0
- package/src/index.ts +4 -0
- package/tsconfig.json +14 -14
- package/vite.config.ts +2 -1
- /package/src/common/{ActionLink.test.tsx → ActionLink/ActionLink.test.tsx} +0 -0
- /package/src/common/{ActionLink.tsx → ActionLink/ActionLink.tsx} +0 -0
- /package/src/common/{ConditionalWrapper.test.tsx → ConditionalWrapper/ConditionalWrapper.test.tsx} +0 -0
- /package/src/common/{ConditionalWrapper.tsx → ConditionalWrapper/ConditionalWrapper.tsx} +0 -0
- /package/src/common/{FileIcon.test.tsx → FileIcon/FileIcon.test.tsx} +0 -0
- /package/src/common/{HintText.test.tsx → HintText/HintText.test.tsx} +0 -0
- /package/src/common/{HintText.tsx → HintText/HintText.tsx} +0 -0
- /package/src/common/{Icon.test.tsx → Icon/Icon.test.tsx} +0 -0
- /package/src/common/{ScreenReaderText.test.tsx → ScreenReaderText/ScreenReaderText.test.tsx} +0 -0
- /package/src/common/{ScreenReaderText.tsx → ScreenReaderText/ScreenReaderText.tsx} +0 -0
- /package/src/common/{WrapperTag.test.tsx → WrapperTag/WrapperTag.test.tsx} +0 -0
- /package/src/common/{WrapperTag.tsx → WrapperTag/WrapperTag.tsx} +0 -0
- /package/src/hooks/{useTracking.test.tsx → useTracking/useTracking.test.tsx} +0 -0
- /package/src/hooks/{useTracking.ts → useTracking/useTracking.ts} +0 -0
|
@@ -7,7 +7,7 @@ const meta = {
|
|
|
7
7
|
title: 'Components/SequentialNavigation/SequentialNavigation.Next',
|
|
8
8
|
component: SequentialNavigation.Next,
|
|
9
9
|
argTypes: {
|
|
10
|
-
href: argTypes.href(),
|
|
10
|
+
href: argTypes.href({type: {name: 'string', required: true}}),
|
|
11
11
|
linkComponent: argTypes.linkComponent(),
|
|
12
12
|
textLabel: {
|
|
13
13
|
description: 'String to use for the label that precedes the link text',
|
|
@@ -7,7 +7,7 @@ const meta = {
|
|
|
7
7
|
title: 'Components/SequentialNavigation/SequentialNavigation.Previous',
|
|
8
8
|
component: SequentialNavigation.Previous,
|
|
9
9
|
argTypes: {
|
|
10
|
-
href: argTypes.href(),
|
|
10
|
+
href: argTypes.href({type: {name: 'string', required: true}}),
|
|
11
11
|
linkComponent: argTypes.linkComponent(),
|
|
12
12
|
textLabel: {
|
|
13
13
|
description: 'String to use for the label that precedes the link text',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SequentialNavigation';
|
|
@@ -6,6 +6,15 @@ import SideNavigation from './SideNavigation';
|
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Components/SideNavigation/SideNavigation.Item',
|
|
8
8
|
component: SideNavigation.Item,
|
|
9
|
+
decorators: [
|
|
10
|
+
Story => (
|
|
11
|
+
<nav className="ds_side-navigation">
|
|
12
|
+
<ul className="ds_side-navigation__list">
|
|
13
|
+
<Story />
|
|
14
|
+
</ul>
|
|
15
|
+
</nav>
|
|
16
|
+
)
|
|
17
|
+
],
|
|
9
18
|
argTypes: {
|
|
10
19
|
href: argTypes.href(),
|
|
11
20
|
isCurrent: argTypes.isCurrent(),
|
|
@@ -6,6 +6,13 @@ import SideNavigation from './SideNavigation';
|
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Components/SideNavigation/SideNavigation.List',
|
|
8
8
|
component: SideNavigation.List,
|
|
9
|
+
decorators: [
|
|
10
|
+
Story => (
|
|
11
|
+
<nav className="ds_side-navigation">
|
|
12
|
+
<Story />
|
|
13
|
+
</nav>
|
|
14
|
+
)
|
|
15
|
+
],
|
|
9
16
|
argTypes: {
|
|
10
17
|
isRoot: {
|
|
11
18
|
description: 'Indicates that this is the root list in a nested structure. Required for mobile navigation.',
|
|
@@ -43,6 +43,7 @@ const SideNavigationItem = function ({
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
const SideNavigation = function ({
|
|
46
|
+
ariaLabel = 'Sections',
|
|
46
47
|
children,
|
|
47
48
|
className,
|
|
48
49
|
...props
|
|
@@ -57,7 +58,7 @@ const SideNavigation = function ({
|
|
|
57
58
|
|
|
58
59
|
return (
|
|
59
60
|
<nav
|
|
60
|
-
aria-label=
|
|
61
|
+
aria-label={ariaLabel}
|
|
61
62
|
className={[
|
|
62
63
|
'ds_side-navigation',
|
|
63
64
|
className
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SideNavigation';
|
|
@@ -6,6 +6,13 @@ import SiteFooter from './SiteFooter';
|
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Components/SiteFooter/SiteFooter.License',
|
|
8
8
|
component: SiteFooter.License,
|
|
9
|
+
decorators: [
|
|
10
|
+
Story => (
|
|
11
|
+
<nav className="ds_site-footer" style={{borderTop: 0}}>
|
|
12
|
+
<Story />
|
|
13
|
+
</nav>
|
|
14
|
+
)
|
|
15
|
+
],
|
|
9
16
|
argTypes: {
|
|
10
17
|
children: argTypes.children()
|
|
11
18
|
},
|
|
@@ -6,6 +6,15 @@ import SiteFooter from './SiteFooter';
|
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Components/SiteFooter/SiteFooter.Link',
|
|
8
8
|
component: SiteFooter.Link,
|
|
9
|
+
decorators: [
|
|
10
|
+
Story => (
|
|
11
|
+
<div className="ds_site-footer__site-items" style={{ borderBottom: 0 }}>
|
|
12
|
+
<ul>
|
|
13
|
+
<Story />
|
|
14
|
+
</ul>
|
|
15
|
+
</div>
|
|
16
|
+
)
|
|
17
|
+
],
|
|
9
18
|
argTypes: {
|
|
10
19
|
href: argTypes.href(),
|
|
11
20
|
linkComponent: argTypes.linkComponent(),
|
|
@@ -6,6 +6,13 @@ import SiteFooter from './SiteFooter';
|
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Components/SiteFooter/SiteFooter.Org',
|
|
8
8
|
component: SiteFooter.Org,
|
|
9
|
+
decorators: [
|
|
10
|
+
Story => (
|
|
11
|
+
<div className="ds_site-footer__content" style={{borderTop: 0}}>
|
|
12
|
+
<Story />
|
|
13
|
+
</div>
|
|
14
|
+
)
|
|
15
|
+
],
|
|
9
16
|
argTypes: {
|
|
10
17
|
href: argTypes.href(),
|
|
11
18
|
title: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SiteFooter';
|
|
@@ -2,9 +2,9 @@ import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import argTypes from '../../../.storybook/sgdsArgTypes';
|
|
3
3
|
|
|
4
4
|
import SiteHeader from './SiteHeader';
|
|
5
|
-
import SiteSearch from '../SiteSearch
|
|
6
|
-
import SiteNavigation from '../SiteNavigation
|
|
7
|
-
import PhaseBanner from '../PhaseBanner
|
|
5
|
+
import SiteSearch from '../SiteSearch';
|
|
6
|
+
import SiteNavigation from '../SiteNavigation';
|
|
7
|
+
import PhaseBanner from '../PhaseBanner';
|
|
8
8
|
|
|
9
9
|
const meta = {
|
|
10
10
|
title: 'Components/SiteHeader',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { test, expect } from 'vitest';
|
|
2
2
|
import { render, screen, within } from '@testing-library/react';
|
|
3
3
|
import SiteHeader from './SiteHeader';
|
|
4
|
-
import SiteNavigation from '../SiteNavigation
|
|
5
|
-
import SiteSearch from '../SiteSearch
|
|
6
|
-
import PhaseBanner from '../PhaseBanner
|
|
4
|
+
import SiteNavigation from '../SiteNavigation';
|
|
5
|
+
import SiteSearch from '../SiteSearch';
|
|
6
|
+
import PhaseBanner from '../PhaseBanner';
|
|
7
7
|
|
|
8
8
|
test('site header renders correctly (maximal, testing markup structure)', () => {
|
|
9
9
|
render(
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
1
|
import React, { Children, useEffect, useRef } from 'react';
|
|
4
2
|
import Icon from '../../common/Icon';
|
|
5
|
-
import SiteNavigation from '../SiteNavigation
|
|
3
|
+
import SiteNavigation from '../SiteNavigation';
|
|
6
4
|
|
|
7
5
|
// @ts-ignore
|
|
8
6
|
import DSMobileMenu from '@scottish-government/design-system/src/components/site-navigation/site-navigation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SiteHeader';
|
|
@@ -6,7 +6,17 @@ import SiteNavigation from './SiteNavigation';
|
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Components/SiteNavigation/SiteNavigation.Item',
|
|
8
8
|
component: SiteNavigation.Item,
|
|
9
|
+
decorators: [
|
|
10
|
+
Story => (
|
|
11
|
+
<nav className="ds_site-navigation">
|
|
12
|
+
<ul className="ds_site-navigation__list">
|
|
13
|
+
<Story />
|
|
14
|
+
</ul>
|
|
15
|
+
</nav>
|
|
16
|
+
)
|
|
17
|
+
],
|
|
9
18
|
argTypes: {
|
|
19
|
+
href: argTypes.href({type: {name: 'string', required: true}}),
|
|
10
20
|
linkComponent: argTypes.linkComponent(),
|
|
11
21
|
children: argTypes.children()
|
|
12
22
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SiteNavigation';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
|
2
2
|
// @ts-ignore
|
|
3
3
|
import DSAutocomplete from '@scottish-government/design-system/src/components/autocomplete/autocomplete';
|
|
4
|
-
import Button from '../Button
|
|
4
|
+
import Button from '../Button';
|
|
5
5
|
|
|
6
6
|
const SiteSearch = function ({
|
|
7
7
|
action = '/search',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SiteSearch';
|
|
@@ -6,10 +6,20 @@ import SkipLinks from './SkipLinks';
|
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Components/SkipLinks/SkipLinks.Link',
|
|
8
8
|
component: SkipLinks.Link,
|
|
9
|
+
decorators: [
|
|
10
|
+
Story => (
|
|
11
|
+
<ul className="ds_skip-links">
|
|
12
|
+
<Story />
|
|
13
|
+
</ul>
|
|
14
|
+
)
|
|
15
|
+
],
|
|
9
16
|
argTypes: {
|
|
10
17
|
fragmentId: {
|
|
11
18
|
description: 'ID of the destination element',
|
|
12
|
-
type:
|
|
19
|
+
type: {
|
|
20
|
+
name: 'string',
|
|
21
|
+
required: true
|
|
22
|
+
}
|
|
13
23
|
},
|
|
14
24
|
children: argTypes.children()
|
|
15
25
|
},
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import dsSkipLinks from '@scottish-government/design-system/src/components/skip-links/skip-links';
|
|
5
|
+
|
|
1
6
|
const Link = ({
|
|
2
7
|
children,
|
|
3
8
|
fragmentId
|
|
@@ -18,6 +23,11 @@ const SkipLinks = ({
|
|
|
18
23
|
isStatic,
|
|
19
24
|
...props
|
|
20
25
|
}: SGDS.Component.SkipLinks) => {
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
dsSkipLinks.init();
|
|
29
|
+
});
|
|
30
|
+
|
|
21
31
|
return (
|
|
22
32
|
<div
|
|
23
33
|
className={[
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SkipLinks';
|
|
@@ -6,6 +6,13 @@ import SummaryCard from './SummaryCard';
|
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Components/SummaryCard/SummaryCard.Action',
|
|
8
8
|
component: SummaryCard.Action,
|
|
9
|
+
decorators: [
|
|
10
|
+
Story => (
|
|
11
|
+
<div className="ds_summary-card__header">
|
|
12
|
+
<Story />
|
|
13
|
+
</div>
|
|
14
|
+
)
|
|
15
|
+
],
|
|
9
16
|
argTypes: {
|
|
10
17
|
href: argTypes.href(),
|
|
11
18
|
onClick: argTypes.onClick(),
|
|
@@ -2,13 +2,20 @@ import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import argTypes from '../../../.storybook/sgdsArgTypes';
|
|
3
3
|
|
|
4
4
|
import SummaryCard from './SummaryCard';
|
|
5
|
-
import SummaryList from '../SummaryList
|
|
5
|
+
import SummaryList from '../SummaryList';
|
|
6
6
|
|
|
7
7
|
const meta = {
|
|
8
8
|
title: 'Components/SummaryCard',
|
|
9
9
|
component: SummaryCard,
|
|
10
10
|
argTypes: {
|
|
11
11
|
headingLevel: argTypes.headingLevel(),
|
|
12
|
+
title: {
|
|
13
|
+
description: 'The title of the summary card',
|
|
14
|
+
type: {
|
|
15
|
+
name: 'string',
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
12
19
|
children: argTypes.children()
|
|
13
20
|
},
|
|
14
21
|
args: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { test, expect, vi } from 'vitest';
|
|
2
|
-
import { render, screen, within
|
|
2
|
+
import { render, screen, within } from '@testing-library/react';
|
|
3
3
|
import SummaryCard from './SummaryCard';
|
|
4
|
-
import SummaryList from '../SummaryList
|
|
4
|
+
import SummaryList from '../SummaryList';
|
|
5
5
|
|
|
6
6
|
const ONCLICK_FUNCTION = vi.fn();
|
|
7
7
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SummaryCard';
|
|
@@ -6,10 +6,25 @@ import SummaryList from './SummaryList';
|
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Components/SummaryList/SummaryList.Item',
|
|
8
8
|
component: SummaryList.Item,
|
|
9
|
+
decorators: [
|
|
10
|
+
Story => (
|
|
11
|
+
<ul>
|
|
12
|
+
<Story />
|
|
13
|
+
</ul>
|
|
14
|
+
)
|
|
15
|
+
],
|
|
9
16
|
argTypes: {
|
|
17
|
+
Title: {
|
|
18
|
+
description: 'Title of the summary list item.',
|
|
19
|
+
type: {
|
|
20
|
+
name: 'string',
|
|
21
|
+
required: true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
10
24
|
children: argTypes.children()
|
|
11
25
|
},
|
|
12
26
|
args: {
|
|
27
|
+
title: 'Contact details',
|
|
13
28
|
children: [
|
|
14
29
|
<SummaryList.Value name="Email">
|
|
15
30
|
email@gov.scot
|
|
@@ -8,8 +8,11 @@ const meta = {
|
|
|
8
8
|
component: SummaryList.Value,
|
|
9
9
|
argTypes: {
|
|
10
10
|
name: {
|
|
11
|
-
description: '
|
|
12
|
-
type:
|
|
11
|
+
description: 'Name of the summary value',
|
|
12
|
+
type: {
|
|
13
|
+
name: 'string',
|
|
14
|
+
required: true
|
|
15
|
+
}
|
|
13
16
|
},
|
|
14
17
|
children: argTypes.children()
|
|
15
18
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SummaryList';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Table';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Tabs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Tag';
|
|
@@ -6,6 +6,15 @@ import TaskList from './TaskList';
|
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Components/TaskList/TaskList.Group',
|
|
8
8
|
component: TaskList.Group,
|
|
9
|
+
decorators: [
|
|
10
|
+
Story => (
|
|
11
|
+
<div className="ds_task-list">
|
|
12
|
+
<ul>
|
|
13
|
+
<Story />
|
|
14
|
+
</ul>
|
|
15
|
+
</div>
|
|
16
|
+
)
|
|
17
|
+
],
|
|
9
18
|
argTypes: {
|
|
10
19
|
headingId: {
|
|
11
20
|
description: 'ID of the task list\'s heading element',
|
|
@@ -2,7 +2,7 @@ import { Children } from 'react';
|
|
|
2
2
|
import ConditionalWrapper from '../../common/ConditionalWrapper';
|
|
3
3
|
import HintText from '../../common/HintText';
|
|
4
4
|
import ScreenReaderText from '../../common/ScreenReaderText';
|
|
5
|
-
import Tag from '../Tag
|
|
5
|
+
import Tag from '../Tag';
|
|
6
6
|
|
|
7
7
|
const TaskItem = ({
|
|
8
8
|
children,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TaskList';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
|
2
2
|
// @ts-ignore
|
|
3
3
|
import DSCharacterCount from '@scottish-government/design-system/src/forms/character-count/character-count';
|
|
4
|
-
import Button from '../Button
|
|
4
|
+
import Button from '../Button';
|
|
5
5
|
import ConditionalWrapper from '../../common/ConditionalWrapper';
|
|
6
|
-
import ErrorMessage from '../ErrorMessage
|
|
6
|
+
import ErrorMessage from '../ErrorMessage';
|
|
7
7
|
import HintText from '../../common/HintText';
|
|
8
8
|
|
|
9
9
|
const TextInput = ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TextInput';
|
|
@@ -2,7 +2,7 @@ import { useEffect, useRef } from 'react';
|
|
|
2
2
|
// @ts-ignore
|
|
3
3
|
import DSCharacterCount from '@scottish-government/design-system/src/forms/character-count/character-count';
|
|
4
4
|
import ConditionalWrapper from '../../common/ConditionalWrapper';
|
|
5
|
-
import ErrorMessage from '../ErrorMessage
|
|
5
|
+
import ErrorMessage from '../ErrorMessage';
|
|
6
6
|
import HintText from '../../common/HintText';
|
|
7
7
|
|
|
8
8
|
const Textarea = ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Textarea';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './WarningText';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export { default as Accordion } from "./Accordion";
|
|
2
|
+
export { default as AspectBox } from "./AspectBox";
|
|
3
|
+
export { default as BackToTop } from "./BackToTop";
|
|
4
|
+
export { default as Breadcrumbs } from "./Breadcrumbs";
|
|
5
|
+
export { default as Button, ButtonGroup } from "./Button";
|
|
6
|
+
export { default as CategoryItem } from "./CategoryItem";
|
|
7
|
+
export { default as CategoryList } from "./CategoryList";
|
|
8
|
+
export { default as Checkbox, CheckboxGroup } from "./Checkbox";
|
|
9
|
+
export { default as ConfirmationMessage } from "./ConfirmationMessage";
|
|
10
|
+
export { default as ContentsNav } from "./ContentsNav";
|
|
11
|
+
export { default as CookieBanner } from "./CookieBanner";
|
|
12
|
+
export { default as DatePicker } from "./DatePicker";
|
|
13
|
+
export { default as Details } from "./Details";
|
|
14
|
+
export { default as ErrorMessage } from "./ErrorMessage";
|
|
15
|
+
export { default as ErrorSummary } from "./ErrorSummary";
|
|
16
|
+
export { default as FileDownload } from "./FileDownload";
|
|
17
|
+
export { default as HideThisPage } from "./HideThisPage";
|
|
18
|
+
export { default as InsetText } from "./InsetText";
|
|
19
|
+
export { default as NotificationBanner } from "./NotificationBanner";
|
|
20
|
+
export { default as NotificationPanel } from "./NotificationPanel";
|
|
21
|
+
export { default as PageHeader } from "./PageHeader";
|
|
22
|
+
export { default as PageMetadata } from "./PageMetadata/";
|
|
23
|
+
export { default as Pagination } from "./Pagination";
|
|
24
|
+
export { default as PhaseBanner } from "./PhaseBanner";
|
|
25
|
+
export { default as Question } from "./Question";
|
|
26
|
+
export { default as RadioButton, RadioGroup } from "./RadioButton";
|
|
27
|
+
export { default as SearchFacets } from "./SearchFacets";
|
|
28
|
+
export { default as SearchFilters } from "./SearchFilters";
|
|
29
|
+
export { default as SearchResult } from "./SearchResult";
|
|
30
|
+
export { default as SearchSort } from "./SearchSort";
|
|
31
|
+
export { default as Select } from "./Select";
|
|
32
|
+
export { default as SequentialNavigation } from "./SequentialNavigation";
|
|
33
|
+
export { default as SideNavigation } from "./SideNavigation";
|
|
34
|
+
export { default as SiteFooter } from "./SiteFooter";
|
|
35
|
+
export { default as SiteHeader } from "./SiteHeader";
|
|
36
|
+
export { default as SiteSearch } from "./SiteSearch";
|
|
37
|
+
export { default as SkipLinks } from "./SkipLinks";
|
|
38
|
+
export { default as SummaryCard } from "./SummaryCard";
|
|
39
|
+
export { default as SummaryList } from "./SummaryList";
|
|
40
|
+
export { default as Table } from "./Table";
|
|
41
|
+
export { default as Tabs } from "./Tabs";
|
|
42
|
+
export { default as Tag } from "./Tag";
|
|
43
|
+
export { default as TaskList } from "./TaskList";
|
|
44
|
+
export { default as Textarea } from "./Textarea";
|
|
45
|
+
export { default as TextInput } from "./TextInput";
|
|
46
|
+
export { default as WarningText } from "./WarningText";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as useTracking } from "./useTracking";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './useTracking';
|
package/src/index.ts
ADDED
package/tsconfig.json
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"allowJs": false,
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"esModuleInterop": true,
|
|
6
|
+
"incremental": true,
|
|
4
7
|
"jsx": "preserve",
|
|
8
|
+
"lib": [
|
|
9
|
+
"dom",
|
|
10
|
+
"dom.iterable",
|
|
11
|
+
"esnext"
|
|
12
|
+
],
|
|
5
13
|
"module": "NodeNext",
|
|
6
14
|
"moduleResolution": "nodenext",
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"noUnusedLocals": true,
|
|
17
|
+
"noUnusedParameters": true,
|
|
7
18
|
"outDir": "./dist",
|
|
8
19
|
"paths": {
|
|
9
20
|
"@/*": [
|
|
@@ -13,25 +24,14 @@
|
|
|
13
24
|
"./node_modules/@scottish-government/design-system/src/*"
|
|
14
25
|
]
|
|
15
26
|
},
|
|
27
|
+
"resolveJsonModule": true,
|
|
28
|
+
"strict": true,
|
|
16
29
|
"target": "esnext",
|
|
17
30
|
"types": [],
|
|
18
31
|
"typeRoots": [
|
|
19
32
|
"./node_modules/@types",
|
|
20
33
|
"./@types"
|
|
21
|
-
]
|
|
22
|
-
"lib": [
|
|
23
|
-
"dom",
|
|
24
|
-
"dom.iterable",
|
|
25
|
-
"esnext"
|
|
26
|
-
],
|
|
27
|
-
"incremental": true,
|
|
28
|
-
"esModuleInterop": true,
|
|
29
|
-
"resolveJsonModule": true,
|
|
30
|
-
|
|
31
|
-
"noFallthroughCasesInSwitch": true,
|
|
32
|
-
"noUnusedLocals": true,
|
|
33
|
-
"noUnusedParameters": true,
|
|
34
|
-
"strict": true
|
|
34
|
+
]
|
|
35
35
|
},
|
|
36
36
|
"include": [
|
|
37
37
|
"@types",
|
package/vite.config.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="vitest/config" />
|
|
2
2
|
import { defineConfig } from 'vitest/config';
|
|
3
3
|
import react from "@vitejs/plugin-react-swc";
|
|
4
|
+
import { playwright } from '@vitest/browser-playwright';
|
|
4
5
|
import path from 'node:path';
|
|
5
6
|
import { fileURLToPath } from 'node:url';
|
|
6
7
|
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
|
|
@@ -38,7 +39,7 @@ export default defineConfig({
|
|
|
38
39
|
browser: {
|
|
39
40
|
enabled: true,
|
|
40
41
|
headless: true,
|
|
41
|
-
provider:
|
|
42
|
+
provider: playwright(),
|
|
42
43
|
instances: [{
|
|
43
44
|
browser: 'chromium'
|
|
44
45
|
}]
|
|
File without changes
|
|
File without changes
|
/package/src/common/{ConditionalWrapper.test.tsx → ConditionalWrapper/ConditionalWrapper.test.tsx}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/common/{ScreenReaderText.test.tsx → ScreenReaderText/ScreenReaderText.test.tsx}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|