@scottish-government/designsystem-react 0.10.2 → 0.11.0
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/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 +31 -5
- package/dist/components/Accordion/Accordion.jsx +8 -3
- package/dist/components/ButtonGroup/ButtonGroup.jsx +13 -0
- package/dist/components/RadioButton/RadioGroup.jsx +1 -1
- package/dist/components/SearchFacets/SearchFacets.jsx +101 -0
- package/dist/components/SearchFilters/SearchFilters.jsx +63 -0
- package/dist/components/SearchResult/SearchResult.jsx +93 -0
- package/dist/components/SearchSort/SearchSort.jsx +28 -0
- package/dist/components/SequentialNavigation/SequentialNavigation.jsx +0 -1
- package/dist/components/SideNavigation/SideNavigation.jsx +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- 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/Breadcrumbs/Breadcrumbs.Item.stories.tsx +8 -1
- package/src/components/Button/Button.stories.tsx +1 -1
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +41 -0
- package/src/components/ButtonGroup/ButtonGroup.test.tsx +45 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +20 -0
- package/src/components/ContentsNav/ContentsNav.Item.stories.tsx +8 -0
- package/src/components/ErrorSummary/ErrorSummary.Item.stories.tsx +7 -0
- package/src/components/PageMetadata/PageMetadata.Item.stories.tsx +9 -0
- package/src/components/RadioButton/RadioGroup.tsx +2 -2
- 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/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/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/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/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/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/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/SiteNavigation/SiteNavigation.Item.stories.tsx +10 -0
- package/src/components/SkipLinks/SkipLinks.Item.stories.tsx +11 -1
- package/src/components/SummaryCard/SummaryCard.Action.stories.tsx +7 -0
- package/src/components/SummaryCard/SummaryCard.stories.tsx +7 -0
- package/src/components/SummaryList/SummaryList.Item.stories.tsx +15 -0
- package/src/components/SummaryList/SummaryList.Value.stories.tsx +5 -2
- package/src/components/Tabs/Tabs.Item.stories.tsx +4 -1
- package/src/components/TaskList/TaskList.Group.stories.tsx +9 -0
- package/src/components/TaskList/TaskList.Item.stories.tsx +7 -0
|
@@ -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
|
},
|
|
@@ -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
|
},
|
|
@@ -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(),
|
|
@@ -9,6 +9,13 @@ const meta = {
|
|
|
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: {
|
|
@@ -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
|
},
|
|
@@ -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',
|