@scottish-government/designsystem-react 0.10.1 → 0.10.2

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.
Files changed (71) hide show
  1. package/.storybook/manager.ts +1 -7
  2. package/.storybook/sgdsArgTypes.ts +19 -0
  3. package/README.md +3 -0
  4. package/dist/common/AbstractNotificationBanner.jsx +2 -5
  5. package/dist/components/SequentialNavigation/SequentialNavigation.jsx +1 -0
  6. package/dist/components/TaskList/TaskList.jsx +1 -0
  7. package/dist/tsconfig.tsbuildinfo +1 -1
  8. package/package.json +2 -2
  9. package/src/common/AbstractNotificationBanner.tsx +2 -6
  10. package/src/components/Accordion/Accordion.Item.stories.tsx +62 -0
  11. package/src/components/Accordion/Accordion.stories.tsx +0 -50
  12. package/src/components/AspectBox/AspectBox.stories.tsx +1 -1
  13. package/src/components/BackToTop/BackToTop.stories.tsx +1 -1
  14. package/src/components/Breadcrumbs/Breadcrumbs.Item.stories.tsx +35 -0
  15. package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -1
  16. package/src/components/CategoryItem/CategoryItem.stories.tsx +1 -1
  17. package/src/components/CategoryList/CategoryList.stories.tsx +1 -1
  18. package/src/components/Checkbox/Checkbox.stories.tsx +1 -1
  19. package/src/components/Checkbox/CheckboxGroup.stories.tsx +1 -1
  20. package/src/components/ConfirmationMessage/ConfirmationMessage.stories.tsx +1 -1
  21. package/src/components/ContentsNav/ContentsNav.Item.stories.tsx +45 -0
  22. package/src/components/ContentsNav/ContentsNav.stories.tsx +1 -2
  23. package/src/components/CookieBanner/CookieBanner.Buttons.stories.tsx +27 -0
  24. package/src/components/CookieBanner/CookieBanner.stories.tsx +2 -2
  25. package/src/components/DatePicker/DatePicker.stories.tsx +1 -1
  26. package/src/components/ErrorMessage/ErrorMessage.stories.tsx +1 -1
  27. package/src/components/ErrorSummary/ErrorSummary.Item.stories.tsx +28 -0
  28. package/src/components/ErrorSummary/ErrorSummary.stories.tsx +1 -2
  29. package/src/components/FileDownload/FileDownload.stories.tsx +1 -1
  30. package/src/components/HideThisPage/HideThisPage.stories.tsx +1 -1
  31. package/src/components/InsetText/InsetText.stories.tsx +1 -1
  32. package/src/components/NotificationBanner/NotificationBanner.stories.tsx +1 -1
  33. package/src/components/NotificationPanel/NotificationPanel.stories.tsx +1 -1
  34. package/src/components/PageHeader/PageHeader.stories.tsx +1 -1
  35. package/src/components/PageMetadata/PageMetadata.Item.stories.tsx +31 -0
  36. package/src/components/PageMetadata/PageMetadata.stories.tsx +10 -5
  37. package/src/components/PhaseBanner/PhaseBanner.stories.tsx +1 -1
  38. package/src/components/RadioButton/RadioButton.stories.tsx +1 -1
  39. package/src/components/RadioButton/RadioGroup.stories.tsx +1 -1
  40. package/src/components/SequentialNavigation/SequentialNavigation.Next.stories.tsx +35 -0
  41. package/src/components/SequentialNavigation/SequentialNavigation.Previous.stories.tsx +35 -0
  42. package/src/components/SequentialNavigation/SequentialNavigation.stories.tsx +1 -2
  43. package/src/components/SequentialNavigation/SequentialNavigation.test.tsx +15 -0
  44. package/src/components/SequentialNavigation/SequentialNavigation.tsx +1 -0
  45. package/src/components/SideNavigation/SideNavigation.Item.stories.tsx +36 -0
  46. package/src/components/SideNavigation/SideNavigation.List.stories.tsx +46 -0
  47. package/src/components/SideNavigation/SideNavigation.stories.tsx +1 -2
  48. package/src/components/SiteFooter/SiteFooter.License.stories.tsx +39 -0
  49. package/src/components/SiteFooter/SiteFooter.Link.stories.tsx +25 -0
  50. package/src/components/SiteFooter/SiteFooter.Links.stories.tsx +32 -0
  51. package/src/components/SiteFooter/SiteFooter.Org.stories.tsx +38 -0
  52. package/src/components/SiteFooter/SiteFooter.stories.tsx +1 -1
  53. package/src/components/SiteHeader/SiteHeader.Brand.stories.tsx +45 -0
  54. package/src/components/SiteHeader/SiteHeader.stories.tsx +1 -1
  55. package/src/components/SiteNavigation/SiteNavigation.Item.stories.tsx +30 -0
  56. package/src/components/SiteNavigation/SiteNavigation.stories.tsx +1 -2
  57. package/src/components/SkipLinks/SkipLinks.Item.stories.tsx +27 -0
  58. package/src/components/SkipLinks/SkipLinks.stories.tsx +1 -1
  59. package/src/components/SummaryCard/SummaryCard.Action.stories.tsx +32 -0
  60. package/src/components/SummaryCard/SummaryCard.stories.tsx +1 -1
  61. package/src/components/SummaryList/SummaryList.Action.stories.tsx +32 -0
  62. package/src/components/SummaryList/SummaryList.Item.stories.tsx +35 -0
  63. package/src/components/SummaryList/SummaryList.Value.stories.tsx +27 -0
  64. package/src/components/SummaryList/SummaryList.stories.tsx +1 -1
  65. package/src/components/Tabs/Tabs.Item.stories.tsx +34 -0
  66. package/src/components/Tag/Tag.stories.tsx +2 -6
  67. package/src/components/TaskList/TaskList.Group.stories.tsx +101 -0
  68. package/src/components/TaskList/TaskList.Item.stories.tsx +70 -0
  69. package/src/components/TaskList/TaskList.stories.tsx +1 -1
  70. package/src/components/TaskList/TaskList.test.tsx +21 -1
  71. package/src/components/TaskList/TaskList.tsx +1 -0
@@ -0,0 +1,45 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import argTypes from '../../../.storybook/sgdsArgTypes';
3
+
4
+ import ContentsNav from './ContentsNav';
5
+
6
+ const meta = {
7
+ title: 'Components/ContentsNav/ContentsNav.Item',
8
+ component: ContentsNav.Item,
9
+ argTypes: {
10
+ isCurrent: argTypes.isCurrent(),
11
+ linkComponent: argTypes.linkComponent(),
12
+ children: argTypes.children()
13
+ },
14
+ args: {
15
+ children: <>
16
+ Apply for Blue Badge
17
+ </>,
18
+ href: '#foo'
19
+ }
20
+ } satisfies Meta<typeof ContentsNav.Item>;
21
+
22
+ export default meta;
23
+ type Story = StoryObj<typeof meta>;
24
+
25
+ export const Default: Story = {
26
+ };
27
+
28
+ export const Current: Story = {
29
+ args: {
30
+ isCurrent: true
31
+ }
32
+ };
33
+
34
+ export const NoLink: Story = {
35
+ args: {
36
+ href: undefined
37
+ }
38
+ };
39
+
40
+ export const NoLinkCurrent: Story = {
41
+ args: {
42
+ href: undefined,
43
+ isCurrent: true
44
+ }
45
+ };
@@ -4,12 +4,11 @@ import argTypes from '../../../.storybook/sgdsArgTypes';
4
4
  import ContentsNav from './ContentsNav';
5
5
 
6
6
  const meta = {
7
- title: 'Components/Contents nav',
7
+ title: 'Components/ContentsNav',
8
8
  component: ContentsNav,
9
9
  argTypes: {
10
10
  ariaLabel: argTypes.ariaLabel({description: 'Text to use for the content nav\'s aria-label property'}),
11
11
  children: argTypes.children(),
12
- linkComponent: argTypes.linkComponent(),
13
12
  title: {
14
13
  description: 'Title of the contents nav',
15
14
  type: 'string'
@@ -0,0 +1,27 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import argTypes from '../../../.storybook/sgdsArgTypes';
3
+
4
+ import CookieBanner from './CookieBanner';
5
+ import Button from '../Button/Button';
6
+
7
+ const meta = {
8
+ title: 'Components/CookieBanner/CookieBanner.Buttons',
9
+ component: CookieBanner.Buttons,
10
+ argTypes: {
11
+ children: argTypes.children()
12
+ },
13
+ args: {
14
+ children: [
15
+ <Button className="js-accept-all-cookies" small buttonStyle="secondary">Accept all cookies</Button>,
16
+ <Button className="js-accept-essential-cookies" small buttonStyle="secondary">Use essential cookies only</Button>,
17
+ <a href="/cookies/">Set cookie preferences</a>
18
+ ]
19
+ }
20
+ } satisfies Meta<typeof CookieBanner.Buttons>;
21
+
22
+ export default meta;
23
+ type Story = StoryObj<typeof meta>;
24
+
25
+ export const Default: Story = {
26
+
27
+ };
@@ -5,7 +5,7 @@ import CookieBanner from './CookieBanner';
5
5
  import Button from '../Button/Button';
6
6
 
7
7
  const meta = {
8
- title: 'Components/Cookie banner',
8
+ title: 'Components/CookieBanner',
9
9
  component: CookieBanner,
10
10
  argTypes: {
11
11
  children: argTypes.children()
@@ -16,7 +16,7 @@ const meta = {
16
16
  experience.</p>,
17
17
  <p key="bar">Click 'Accept all cookies' to agree to all cookies that collect anonymous data.
18
18
  To only allow the cookies that make the site work, click 'Use essential cookies only.' Visit 'Set cookie preferences' to control specific cookies.</p>,
19
- <CookieBanner.Buttons key="baz">
19
+ <CookieBanner.Buttons>
20
20
  <Button className="js-accept-all-cookies" small buttonStyle="secondary">Accept all cookies</Button>
21
21
  <Button className="js-accept-essential-cookies" small buttonStyle="secondary">Use essential cookies only</Button>
22
22
  <a href="/cookies/">Set cookie preferences</a>
@@ -4,7 +4,7 @@ import argTypes from '../../../.storybook/sgdsArgTypes';
4
4
  import DatePicker from './DatePicker';
5
5
 
6
6
  const meta = {
7
- title: 'Components/Date picker',
7
+ title: 'Components/DatePicker',
8
8
  component: DatePicker,
9
9
  argTypes: {
10
10
  dateSelectCallback: {},
@@ -4,7 +4,7 @@ import argTypes from '../../../.storybook/sgdsArgTypes';
4
4
  import ErrorMessage from './ErrorMessage';
5
5
 
6
6
  const meta = {
7
- title: 'Components/Error message',
7
+ title: 'Components/ErrorMessage',
8
8
  component: ErrorMessage,
9
9
  argTypes: {
10
10
  children: argTypes.children()
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import argTypes from '../../../.storybook/sgdsArgTypes';
3
+
4
+ import ErrorSummary from './ErrorSummary';
5
+
6
+ const meta = {
7
+ title: 'Components/ErrorSummary/ErrorSummary.Item',
8
+ component: ErrorSummary.Item,
9
+ argTypes: {
10
+ fragmentId: {
11
+ description: 'ID of the question or field to link to',
12
+ type: 'string'
13
+ },
14
+ linkComponent: argTypes.linkComponent(),
15
+ children: argTypes.children()
16
+ },
17
+ args: {
18
+ fragmentId: 'did-resolve',
19
+ children: 'Did this resolve your issue?'
20
+ }
21
+ } satisfies Meta<typeof ErrorSummary.Item>;
22
+
23
+ export default meta;
24
+ type Story = StoryObj<typeof meta>;
25
+
26
+ export const Default: Story = {
27
+
28
+ };
@@ -4,10 +4,9 @@ import argTypes from '../../../.storybook/sgdsArgTypes';
4
4
  import ErrorSummary from './ErrorSummary';
5
5
 
6
6
  const meta = {
7
- title: 'Components/Error summary',
7
+ title: 'Components/ErrorSummary',
8
8
  component: ErrorSummary,
9
9
  argTypes: {
10
- linkComponent: argTypes.linkComponent(),
11
10
  title: {
12
11
  description: 'The title of the error summary',
13
12
  type: 'string'
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react-vite';
3
3
  import FileDownload from './FileDownload';
4
4
 
5
5
  const meta = {
6
- title: 'Components/File download',
6
+ title: 'Components/FileDownload',
7
7
  component: FileDownload,
8
8
  argTypes: {
9
9
  cover: {
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import HideThisPage from './HideThisPage';
3
3
 
4
4
  const meta = {
5
- title: 'Components/Hide this page',
5
+ title: 'Components/HideThisPage',
6
6
  component: HideThisPage,
7
7
  argTypes: {
8
8
  escapeUrl: {
@@ -4,7 +4,7 @@ import argTypes from '../../../.storybook/sgdsArgTypes';
4
4
  import InsetText from './InsetText';
5
5
 
6
6
  const meta = {
7
- title: 'Components/Inset text',
7
+ title: 'Components/InsetText',
8
8
  component: InsetText,
9
9
  argTypes: {
10
10
  children: argTypes.children()
@@ -4,7 +4,7 @@ import argTypes from '../../../.storybook/sgdsArgTypes';
4
4
  import NotificationBanner from './NotificationBanner';
5
5
 
6
6
  const meta = {
7
- title: 'Components/Notification banner',
7
+ title: 'Components/NotificationBanner',
8
8
  component: NotificationBanner,
9
9
  argTypes: {
10
10
  children: argTypes.children(),
@@ -4,7 +4,7 @@ import argTypes from '../../../.storybook/sgdsArgTypes';
4
4
  import NotificationPanel from './NotificationPanel';
5
5
 
6
6
  const meta = {
7
- title: 'Components/Notification panel',
7
+ title: 'Components/NotificationPanel',
8
8
  component: NotificationPanel,
9
9
  argTypes: {
10
10
  ariaLive: argTypes.ariaLive(),
@@ -5,7 +5,7 @@ import PageHeader from './PageHeader';
5
5
  import Metadata from '../PageMetadata/PageMetadata';
6
6
 
7
7
  const meta = {
8
- title: 'Components/Page header',
8
+ title: 'Components/PageHeader',
9
9
  component: PageHeader,
10
10
  argTypes: {
11
11
  children: argTypes.children(),
@@ -0,0 +1,31 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import argTypes from '../../../.storybook/sgdsArgTypes';
3
+
4
+ import Metadata from './PageMetadata';
5
+
6
+ const meta = {
7
+ title: 'Components/PageMetadata/PageMetadata.Item',
8
+ component: Metadata.Item,
9
+ argTypes: {
10
+ children: argTypes.children(),
11
+ name: {
12
+ description: 'The name or key of the metadata item',
13
+ type: {
14
+ name: 'string',
15
+ required: true
16
+ }
17
+ }
18
+ },
19
+ args: {
20
+ name: 'Last updated',
21
+ children: '21/04/2020'
22
+
23
+ }
24
+ } satisfies Meta<typeof Metadata.Item>;
25
+
26
+ export default meta;
27
+ type Story = StoryObj<typeof meta>;
28
+
29
+ export const Default: Story = {
30
+
31
+ };
@@ -4,19 +4,24 @@ import argTypes from '../../../.storybook/sgdsArgTypes';
4
4
  import Metadata from './PageMetadata';
5
5
 
6
6
  const meta = {
7
- title: 'Components/Page metadata',
7
+ title: 'Components/PageMetadata',
8
8
  component: Metadata,
9
9
  argTypes: {
10
10
  children: argTypes.children(),
11
- isInline: {
11
+ isInline: {
12
12
  control: 'boolean',
13
13
  description: 'Makes the page metadata use the truncated ‘inline’ display'
14
14
  },
15
15
  },
16
16
  args: {
17
- children: <Metadata.Item name="Last updated">
18
- 21/04/2020
19
- </Metadata.Item>
17
+ children: <>
18
+ <Metadata.Item name="Content type">
19
+ Publication
20
+ </Metadata.Item>
21
+ <Metadata.Item name="Last updated">
22
+ 21/04/2020
23
+ </Metadata.Item>
24
+ </>
20
25
  }
21
26
  } satisfies Meta<typeof Metadata>;
22
27
 
@@ -4,7 +4,7 @@ import argTypes from '../../../.storybook/sgdsArgTypes';
4
4
  import PhaseBanner from './PhaseBanner';
5
5
 
6
6
  const meta = {
7
- title: 'Components/Phase banner',
7
+ title: 'Components/PhaseBanner',
8
8
  component: PhaseBanner,
9
9
  argTypes: {
10
10
  children: argTypes.children(),
@@ -4,7 +4,7 @@ import argTypes from '../../../.storybook/sgdsArgTypes';
4
4
  import RadioButton from './RadioButton';
5
5
 
6
6
  const meta = {
7
- title: 'Components/Radio button',
7
+ title: 'Components/Radio/Radio button',
8
8
  component: RadioButton,
9
9
  argTypes: {
10
10
  checked: {
@@ -5,7 +5,7 @@ import RadioButton from '../RadioButton/RadioButton';
5
5
  import RadioGroup from './RadioGroup';
6
6
 
7
7
  const meta = {
8
- title: 'Components/Radio group',
8
+ title: 'Components/Radio/Radio group',
9
9
  component: RadioGroup,
10
10
  argTypes: {
11
11
  isInline: {
@@ -0,0 +1,35 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import argTypes from '../../../.storybook/sgdsArgTypes';
3
+
4
+ import SequentialNavigation from './SequentialNavigation';
5
+
6
+ const meta = {
7
+ title: 'Components/SequentialNavigation/SequentialNavigation.Next',
8
+ component: SequentialNavigation.Next,
9
+ argTypes: {
10
+ href: argTypes.href(),
11
+ linkComponent: argTypes.linkComponent(),
12
+ textLabel: {
13
+ description: 'String to use for the label that precedes the link text',
14
+ type: 'string'
15
+ },
16
+ children: argTypes.children()
17
+ },
18
+ args: {
19
+ href: '#previous',
20
+ children: 'Apply for or renew a Blue Badge'
21
+ }
22
+ } satisfies Meta<typeof SequentialNavigation.Next>;
23
+
24
+ export default meta;
25
+ type Story = StoryObj<typeof meta>;
26
+
27
+ export const Default: Story = {
28
+
29
+ };
30
+
31
+ export const CustomLabel: Story = {
32
+ args: {
33
+ textLabel: 'Next page'
34
+ }
35
+ }
@@ -0,0 +1,35 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import argTypes from '../../../.storybook/sgdsArgTypes';
3
+
4
+ import SequentialNavigation from './SequentialNavigation';
5
+
6
+ const meta = {
7
+ title: 'Components/SequentialNavigation/SequentialNavigation.Previous',
8
+ component: SequentialNavigation.Previous,
9
+ argTypes: {
10
+ href: argTypes.href(),
11
+ linkComponent: argTypes.linkComponent(),
12
+ textLabel: {
13
+ description: 'String to use for the label that precedes the link text',
14
+ type: 'string'
15
+ },
16
+ children: argTypes.children()
17
+ },
18
+ args: {
19
+ href: '#previous',
20
+ children: 'Apply for or renew a Blue Badge'
21
+ }
22
+ } satisfies Meta<typeof SequentialNavigation.Previous>;
23
+
24
+ export default meta;
25
+ type Story = StoryObj<typeof meta>;
26
+
27
+ export const Default: Story = {
28
+
29
+ };
30
+
31
+ export const CustomLabel: Story = {
32
+ args: {
33
+ textLabel: 'Previous page'
34
+ }
35
+ }
@@ -4,11 +4,10 @@ import argTypes from '../../../.storybook/sgdsArgTypes';
4
4
  import SequentialNavigation from './SequentialNavigation';
5
5
 
6
6
  const meta = {
7
- title: 'Components/Sequential navigation',
7
+ title: 'Components/SequentialNavigation',
8
8
  component: SequentialNavigation,
9
9
  argTypes: {
10
10
  ariaLabel: argTypes.ariaLabel({ description: 'Text to use for an aria-label attribute on the nav element' }),
11
- linkComponent: argTypes.linkComponent(),
12
11
  children: argTypes.children()
13
12
  },
14
13
  args: {
@@ -72,6 +72,21 @@ test('sequential nav links with custom element', () => {
72
72
  expect(link?.textContent).toEqual(PREVIOUS_LINK_OBJECT.title);
73
73
  });
74
74
 
75
+ test('custom text label on link', () => {
76
+ const TEXT_LABEL = 'foo';
77
+
78
+ render(
79
+ <SequentialNavigation>
80
+ <SequentialNavigation.Previous textLabel={TEXT_LABEL} href={PREVIOUS_LINK_OBJECT.href}>
81
+ {PREVIOUS_LINK_OBJECT.title}
82
+ </SequentialNavigation.Previous>
83
+ </SequentialNavigation>
84
+ );
85
+
86
+ const prevLink = screen.getAllByRole('link')[0];
87
+ expect(prevLink.querySelector('span')?.dataset.label).toEqual(TEXT_LABEL);
88
+ });
89
+
75
90
  test('passing additional props', () => {
76
91
  render(
77
92
  <SequentialNavigation data-test="foo" />
@@ -5,6 +5,7 @@ const SeqNavLink = ({
5
5
  linkComponent,
6
6
  textLabel
7
7
  }: SGDS.Component.SequentialNavigation.Link) => {
8
+ console.log(textLabel)
8
9
  const LINK_CLASSES = [
9
10
  'ds_sequential-nav__button',
10
11
  isPrev ? 'ds_sequential-nav__button--left' : 'ds_sequential-nav__button--right'
@@ -0,0 +1,36 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import argTypes from '../../../.storybook/sgdsArgTypes';
3
+
4
+ import SideNavigation from './SideNavigation';
5
+
6
+ const meta = {
7
+ title: 'Components/SideNavigation/SideNavigation.Item',
8
+ component: SideNavigation.Item,
9
+ argTypes: {
10
+ href: argTypes.href(),
11
+ isCurrent: argTypes.isCurrent(),
12
+ linkComponent: argTypes.linkComponent(),
13
+ title: {
14
+ description: 'Text of the navigation item',
15
+ type: 'string'
16
+ },
17
+ children: argTypes.children()
18
+ },
19
+ args: {
20
+ href: '#bananas',
21
+ title: 'Bananas'
22
+ }
23
+ } satisfies Meta<typeof SideNavigation.Item>;
24
+
25
+ export default meta;
26
+ type Story = StoryObj<typeof meta>;
27
+
28
+ export const Default: Story = {
29
+
30
+ };
31
+
32
+ export const CurrentItem: Story = {
33
+ args: {
34
+ isCurrent: true
35
+ }
36
+ };
@@ -0,0 +1,46 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import argTypes from '../../../.storybook/sgdsArgTypes';
3
+
4
+ import SideNavigation from './SideNavigation';
5
+
6
+ const meta = {
7
+ title: 'Components/SideNavigation/SideNavigation.List',
8
+ component: SideNavigation.List,
9
+ argTypes: {
10
+ isRoot: {
11
+ description: 'Indicates that this is the root list in a nested structure. Required for mobile navigation.',
12
+ control: 'boolean'
13
+ },
14
+ children: argTypes.children()
15
+ },
16
+ args: {
17
+ children: <>
18
+ <SideNavigation.Item
19
+ isCurrent
20
+ href="#apples"
21
+ title="Apples"
22
+ >
23
+ </SideNavigation.Item>
24
+ <SideNavigation.Item
25
+ href="#bananas"
26
+ title="Bananas"
27
+ />
28
+ <SideNavigation.Item
29
+ href="#cherries"
30
+ title="Cherries"
31
+ />
32
+ <SideNavigation.Item
33
+ href="#dates"
34
+ title="Dates"
35
+ />
36
+ </>,
37
+ isRoot: true
38
+ }
39
+ } satisfies Meta<typeof SideNavigation.List>;
40
+
41
+ export default meta;
42
+ type Story = StoryObj<typeof meta>;
43
+
44
+ export const Default: Story = {
45
+
46
+ };
@@ -4,10 +4,9 @@ import argTypes from '../../../.storybook/sgdsArgTypes';
4
4
  import SideNavigation from './SideNavigation';
5
5
 
6
6
  const meta = {
7
- title: 'Components/Side navigation',
7
+ title: 'Components/SideNavigation',
8
8
  component: SideNavigation,
9
9
  argTypes: {
10
- linkComponent: argTypes.linkComponent(),
11
10
  children: argTypes.children()
12
11
  },
13
12
  args: {
@@ -0,0 +1,39 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import argTypes from '../../../.storybook/sgdsArgTypes';
3
+
4
+ import SiteFooter from './SiteFooter';
5
+
6
+ const meta = {
7
+ title: 'Components/SiteFooter/SiteFooter.License',
8
+ component: SiteFooter.License,
9
+ argTypes: {
10
+ children: argTypes.children()
11
+ },
12
+ args: {
13
+ children: <>
14
+ <svg focusable="false" version="1.1" width="41" height="17" id="ogl-logo" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
15
+ viewBox="0 0 852.16 345.09">
16
+ <title>ogl</title>
17
+ <polygon className="fill" points="743.3 251.79 743.3 0.2 653.9 57.2 653.9 341.2 852.16 341.2 852.16 251.79 743.3 251.79"></polygon>
18
+ <path className="fill" d="M599.62,312.56a83.12,83.12,0,1,1,15.26-107.08l75.36-48a172.35,172.35,0,0,0-295.59,7.84A172.61,172.61,0,0,0,244.49,77.59C149.35,77.59,72,155,72,250.14s77.4,172.54,172.54,172.54A172.6,172.6,0,0,0,394.65,335a172.29,172.29,0,0,0,263.9,44.78l34.25,39.07h5.33V264H557ZM244.49,333.28a83.14,83.14,0,1,1,83.14-83.14A83.24,83.24,0,0,1,244.49,333.28Z" transform="translate(-71.95 -77.59)"/>
19
+ </svg>
20
+ <p>
21
+ All content is available under the{' '}
22
+ <a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/">
23
+ Open Government Licence v3.0
24
+ </a>
25
+ , except for graphic assets and where otherwise stated
26
+ </p>
27
+ <p>
28
+ © Crown Copyright
29
+ </p>
30
+ </>
31
+ }
32
+ } satisfies Meta<typeof SiteFooter.License>;
33
+
34
+ export default meta;
35
+ type Story = StoryObj<typeof meta>;
36
+
37
+ export const Default: Story = {
38
+
39
+ };
@@ -0,0 +1,25 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import argTypes from '../../../.storybook/sgdsArgTypes';
3
+
4
+ import SiteFooter from './SiteFooter';
5
+
6
+ const meta = {
7
+ title: 'Components/SiteFooter/SiteFooter.Link',
8
+ component: SiteFooter.Link,
9
+ argTypes: {
10
+ href: argTypes.href(),
11
+ linkComponent: argTypes.linkComponent(),
12
+ children: argTypes.children()
13
+ },
14
+ args: {
15
+ children: 'Cookies',
16
+ href: '#cookies'
17
+ }
18
+ } satisfies Meta<typeof SiteFooter.Link>;
19
+
20
+ export default meta;
21
+ type Story = StoryObj<typeof meta>;
22
+
23
+ export const Default: Story = {
24
+
25
+ };
@@ -0,0 +1,32 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import argTypes from '../../../.storybook/sgdsArgTypes';
3
+
4
+ import SiteFooter from './SiteFooter';
5
+
6
+ const meta = {
7
+ title: 'Components/SiteFooter/SiteFooter.Links',
8
+ component: SiteFooter.Links,
9
+ argTypes: {
10
+ children: argTypes.children()
11
+ },
12
+ args: {
13
+ children: <>
14
+ <SiteFooter.Link href="#">
15
+ Privacy
16
+ </SiteFooter.Link>
17
+ <SiteFooter.Link href="#">
18
+ Cookies
19
+ </SiteFooter.Link>
20
+ <SiteFooter.Link href="#">
21
+ Accessibility
22
+ </SiteFooter.Link>
23
+ </>
24
+ }
25
+ } satisfies Meta<typeof SiteFooter.Links>;
26
+
27
+ export default meta;
28
+ type Story = StoryObj<typeof meta>;
29
+
30
+ export const Default: Story = {
31
+
32
+ };