@i-dot-ai-npm/component-library-react 0.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.
Files changed (111) hide show
  1. package/package.json +27 -0
  2. package/src/accordion/Accordion.tsx +31 -0
  3. package/src/accordion/AccordionSection.tsx +17 -0
  4. package/src/accordion/AccordionSectionContent.tsx +17 -0
  5. package/src/accordion/AccordionSectionHeader.tsx +17 -0
  6. package/src/accordion/AccordionSectionHeading.tsx +19 -0
  7. package/src/accordion/AccordionSectionSummary.tsx +17 -0
  8. package/src/back-link/BackLink.tsx +24 -0
  9. package/src/breadcrumbs/BreadcrumbItem.tsx +20 -0
  10. package/src/breadcrumbs/Breadcrumbs.tsx +28 -0
  11. package/src/button/Button.tsx +26 -0
  12. package/src/button-group/ButtonGroup.tsx +17 -0
  13. package/src/card/Card.tsx +24 -0
  14. package/src/card/CardContent.tsx +17 -0
  15. package/src/card/CardGroup.tsx +17 -0
  16. package/src/card/CardHeading.tsx +17 -0
  17. package/src/card/CardIcon.tsx +17 -0
  18. package/src/card/CardLink.tsx +17 -0
  19. package/src/character-count/CharacterCount.tsx +14 -0
  20. package/src/character-count/CharacterCountMessage.tsx +17 -0
  21. package/src/checkboxes/CheckboxDivider.tsx +17 -0
  22. package/src/checkboxes/CheckboxInput.tsx +14 -0
  23. package/src/checkboxes/CheckboxItem.tsx +17 -0
  24. package/src/checkboxes/CheckboxLabel.tsx +17 -0
  25. package/src/checkboxes/Checkboxes.tsx +26 -0
  26. package/src/cookie-banner/CookieBanner.tsx +17 -0
  27. package/src/cookie-banner/CookieBannerActions.tsx +17 -0
  28. package/src/cookie-banner/CookieBannerContent.tsx +17 -0
  29. package/src/cookie-banner/CookieBannerHeading.tsx +17 -0
  30. package/src/cookie-banner/CookieBannerMessage.tsx +17 -0
  31. package/src/date-input/DateInput.tsx +17 -0
  32. package/src/date-input/DateInputField.tsx +21 -0
  33. package/src/date-input/DateInputItem.tsx +17 -0
  34. package/src/details/Details.tsx +17 -0
  35. package/src/details/DetailsSummary.tsx +19 -0
  36. package/src/details/DetailsText.tsx +17 -0
  37. package/src/error-message/ErrorMessage.tsx +20 -0
  38. package/src/error-summary/ErrorSummary.tsx +19 -0
  39. package/src/error-summary/ErrorSummaryBody.tsx +17 -0
  40. package/src/error-summary/ErrorSummaryItem.tsx +19 -0
  41. package/src/error-summary/ErrorSummaryList.tsx +17 -0
  42. package/src/error-summary/ErrorSummaryTitle.tsx +17 -0
  43. package/src/fieldset/Fieldset.tsx +17 -0
  44. package/src/fieldset/FieldsetLegend.tsx +24 -0
  45. package/src/file-upload/FileUpload.tsx +14 -0
  46. package/src/form-group/FormGroup.tsx +24 -0
  47. package/src/header/Header.tsx +24 -0
  48. package/src/hint/Hint.tsx +17 -0
  49. package/src/index.ts +110 -0
  50. package/src/input/Input.tsx +27 -0
  51. package/src/input-label/InputLabel.tsx +24 -0
  52. package/src/inset-text/InsetText.tsx +17 -0
  53. package/src/link/Link.tsx +28 -0
  54. package/src/list/List.tsx +24 -0
  55. package/src/list/ListItem.tsx +17 -0
  56. package/src/notification-banner/NotificationBanner.tsx +23 -0
  57. package/src/notification-banner/NotificationBannerContent.tsx +17 -0
  58. package/src/notification-banner/NotificationBannerHeader.tsx +17 -0
  59. package/src/notification-banner/NotificationBannerHeading.tsx +17 -0
  60. package/src/notification-banner/NotificationBannerTitle.tsx +17 -0
  61. package/src/pagination/Pagination.tsx +24 -0
  62. package/src/pagination/PaginationItem.tsx +26 -0
  63. package/src/pagination/PaginationList.tsx +17 -0
  64. package/src/pagination/PaginationNext.tsx +27 -0
  65. package/src/pagination/PaginationPrev.tsx +27 -0
  66. package/src/password-input/PasswordInput.tsx +20 -0
  67. package/src/phase-banner/PhaseBanner.tsx +19 -0
  68. package/src/radios/RadioDivider.tsx +17 -0
  69. package/src/radios/RadioInput.tsx +14 -0
  70. package/src/radios/RadioItem.tsx +17 -0
  71. package/src/radios/Radios.tsx +26 -0
  72. package/src/select/Select.tsx +26 -0
  73. package/src/select/SelectOption.tsx +17 -0
  74. package/src/service-navigation/ServiceNavigation.tsx +34 -0
  75. package/src/service-navigation/ServiceNavigationItem.tsx +20 -0
  76. package/src/side-nav/SideNav.tsx +17 -0
  77. package/src/side-nav/SideNavItem.tsx +20 -0
  78. package/src/side-nav/SideNavList.tsx +17 -0
  79. package/src/side-nav/SideNavSubnavHeading.tsx +17 -0
  80. package/src/side-nav/SideNavSubnavList.tsx +17 -0
  81. package/src/side-nav/SideNavTitle.tsx +17 -0
  82. package/src/skip-link/SkipLink.tsx +17 -0
  83. package/src/summary-list/SummaryList.tsx +24 -0
  84. package/src/summary-list/SummaryListActions.tsx +17 -0
  85. package/src/summary-list/SummaryListKey.tsx +17 -0
  86. package/src/summary-list/SummaryListRow.tsx +24 -0
  87. package/src/summary-list/SummaryListValue.tsx +17 -0
  88. package/src/table/Table.tsx +26 -0
  89. package/src/table/TableBody.tsx +17 -0
  90. package/src/table/TableCaption.tsx +24 -0
  91. package/src/table/TableCell.tsx +24 -0
  92. package/src/table/TableHead.tsx +17 -0
  93. package/src/table/TableHeader.tsx +24 -0
  94. package/src/table/TableRow.tsx +17 -0
  95. package/src/tabs/Tab.tsx +20 -0
  96. package/src/tabs/TabPanel.tsx +24 -0
  97. package/src/tabs/Tabs.tsx +31 -0
  98. package/src/tabs/TabsList.tsx +17 -0
  99. package/src/tabs/TabsTitle.tsx +17 -0
  100. package/src/tag/Tag.tsx +24 -0
  101. package/src/task-list/TaskList.tsx +17 -0
  102. package/src/task-list/TaskListHint.tsx +17 -0
  103. package/src/task-list/TaskListItem.tsx +24 -0
  104. package/src/task-list/TaskListLink.tsx +17 -0
  105. package/src/task-list/TaskListNameAndHint.tsx +17 -0
  106. package/src/task-list/TaskListStatus.tsx +17 -0
  107. package/src/textarea/Textarea.tsx +23 -0
  108. package/src/toggle/Toggle.tsx +16 -0
  109. package/src/toggle/ToggleItem.tsx +17 -0
  110. package/src/toggle/ToggleLabel.tsx +17 -0
  111. package/src/warning-text/WarningText.tsx +25 -0
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type NotificationBannerTitleProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function NotificationBannerTitle({ class: className, children, ...rest }: NotificationBannerTitleProps) {
10
+ const classes = ["govuk-notification-banner__title", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <h2 className={classes} id="govuk-notification-banner-title" {...rest}>
14
+ {children ?? ""}
15
+ </h2>
16
+ );
17
+ }
@@ -0,0 +1,24 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type PaginationProps = {
4
+ block?: boolean;
5
+ class?: string;
6
+ children?: React.ReactNode;
7
+ [key: string]: unknown;
8
+ };
9
+
10
+ export default function Pagination({ block, class: className, children, ...rest }: PaginationProps) {
11
+ const classes = [
12
+ "govuk-pagination",
13
+ block ? "govuk-pagination--block" : "",
14
+ className ?? "",
15
+ ]
16
+ .filter(Boolean)
17
+ .join(" ");
18
+
19
+ return (
20
+ <nav className={classes} aria-label="Pagination" {...rest}>
21
+ {children ?? ""}
22
+ </nav>
23
+ );
24
+ }
@@ -0,0 +1,26 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type PaginationItemProps = {
4
+ current?: boolean;
5
+ ellipsis?: string;
6
+ class?: string;
7
+ children?: React.ReactNode;
8
+ [key: string]: unknown;
9
+ };
10
+
11
+ export default function PaginationItem({ current, ellipsis, class: className, children, ...rest }: PaginationItemProps) {
12
+
13
+ return (
14
+ ellipsis ? (
15
+ <li className="govuk-pagination__item govuk-pagination__item--ellipsis">
16
+ {children ?? "⋯"}
17
+ </li>
18
+ ) : (
19
+ <li className={["govuk-pagination__item", current ? "govuk-pagination__item--current" : ""].filter(Boolean).join(" ")}>
20
+ <a className={["govuk-link govuk-pagination__link", className ?? ""].filter(Boolean).join(" ")} {...rest}>
21
+ {children ?? ""}
22
+ </a>
23
+ </li>
24
+ )
25
+ );
26
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type PaginationListProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function PaginationList({ class: className, children, ...rest }: PaginationListProps) {
10
+ const classes = ["govuk-pagination__list", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <ul className={classes} {...rest}>
14
+ {children ?? ""}
15
+ </ul>
16
+ );
17
+ }
@@ -0,0 +1,27 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type PaginationNextProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function PaginationNext({ class: className, children, ...rest }: PaginationNextProps) {
10
+ const classes = ["govuk-link govuk-pagination__link", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <div className="govuk-pagination__next">
14
+ <a className={classes} rel="next" {...rest}>
15
+ <span className="govuk-pagination__link-title">
16
+ {children ?? "Next"}
17
+ <span className="govuk-visually-hidden">
18
+ page
19
+ </span>
20
+ </span>
21
+ <svg className="govuk-pagination__icon govuk-pagination__icon--next" xmlns="http://www.w3.org/2000/svg" height="13" width="15" aria-hidden="true" focusable="false" viewBox="0 0 15 13">
22
+ <path d="m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z"></path>
23
+ </svg>
24
+ </a>
25
+ </div>
26
+ );
27
+ }
@@ -0,0 +1,27 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type PaginationPrevProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function PaginationPrev({ class: className, children, ...rest }: PaginationPrevProps) {
10
+ const classes = ["govuk-link govuk-pagination__link", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <div className="govuk-pagination__prev">
14
+ <a className={classes} rel="prev" {...rest}>
15
+ <svg className="govuk-pagination__icon govuk-pagination__icon--prev" xmlns="http://www.w3.org/2000/svg" height="13" width="15" aria-hidden="true" focusable="false" viewBox="0 0 15 13">
16
+ <path d="m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z"></path>
17
+ </svg>
18
+ <span className="govuk-pagination__link-title">
19
+ {children ?? "Previous"}
20
+ <span className="govuk-visually-hidden">
21
+ page
22
+ </span>
23
+ </span>
24
+ </a>
25
+ </div>
26
+ );
27
+ }
@@ -0,0 +1,20 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type PasswordInputProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function PasswordInput({ class: className, children, ...rest }: PasswordInputProps) {
10
+ const classes = ["govuk-input govuk-password-input__input govuk-js-password-input-input", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <div className="govuk-input__wrapper govuk-password-input__wrapper">
14
+ <input className={classes} type="password" spellcheck="false" autocomplete="current-password" autocapitalize="none" {...rest} />
15
+ <button className="govuk-button govuk-button--secondary govuk-password-input__toggle govuk-js-password-input-toggle" type="button" data-module="govuk-button" aria-label="Show password" hidden="">
16
+ {children ?? "Show"}
17
+ </button>
18
+ </div>
19
+ );
20
+ }
@@ -0,0 +1,19 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type PhaseBannerProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function PhaseBanner({ class: className, children, ...rest }: PhaseBannerProps) {
10
+ const classes = ["govuk-phase-banner", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <div className={classes} {...rest}>
14
+ <p className="govuk-phase-banner__content">
15
+ {children ?? ""}
16
+ </p>
17
+ </div>
18
+ );
19
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type RadioDividerProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function RadioDivider({ class: className, children }: RadioDividerProps) {
10
+ const classes = ["govuk-radios__divider", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <div className={classes}>
14
+ {children ?? "or"}
15
+ </div>
16
+ );
17
+ }
@@ -0,0 +1,14 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type RadioInputProps = {
4
+ class?: string;
5
+ [key: string]: unknown;
6
+ };
7
+
8
+ export default function RadioInput({ class: className, ...rest }: RadioInputProps) {
9
+ const classes = ["govuk-radios__input", className ?? ""].filter(Boolean).join(" ");
10
+
11
+ return (
12
+ <input className={classes} type="radio" {...rest} />
13
+ );
14
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type RadioItemProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function RadioItem({ class: className, children, ...rest }: RadioItemProps) {
10
+ const classes = ["govuk-radios__item", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <div className={classes} {...rest}>
14
+ {children ?? ""}
15
+ </div>
16
+ );
17
+ }
@@ -0,0 +1,26 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type RadiosProps = {
4
+ inline?: boolean;
5
+ small?: boolean;
6
+ class?: string;
7
+ children?: React.ReactNode;
8
+ [key: string]: unknown;
9
+ };
10
+
11
+ export default function Radios({ inline, small, class: className, children, ...rest }: RadiosProps) {
12
+ const classes = [
13
+ "govuk-radios",
14
+ inline ? "govuk-radios--inline" : "",
15
+ small ? "govuk-radios--small" : "",
16
+ className ?? "",
17
+ ]
18
+ .filter(Boolean)
19
+ .join(" ");
20
+
21
+ return (
22
+ <div className={classes} data-module="govuk-radios" {...rest}>
23
+ {children ?? ""}
24
+ </div>
25
+ );
26
+ }
@@ -0,0 +1,26 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SelectProps = {
4
+ subtle?: boolean;
5
+ error?: boolean;
6
+ class?: string;
7
+ children?: React.ReactNode;
8
+ [key: string]: unknown;
9
+ };
10
+
11
+ export default function Select({ subtle, error, class: className, children, ...rest }: SelectProps) {
12
+ const classes = [
13
+ "govuk-select",
14
+ subtle ? "govuk-select--subtle" : "",
15
+ error ? "govuk-select--error" : "",
16
+ className ?? "",
17
+ ]
18
+ .filter(Boolean)
19
+ .join(" ");
20
+
21
+ return (
22
+ <select className={classes} {...rest}>
23
+ {children ?? ""}
24
+ </select>
25
+ );
26
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SelectOptionProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function SelectOption({ class: className, children, ...rest }: SelectOptionProps) {
10
+ const classes = ["", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <option className={classes} {...rest}>
14
+ {children ?? ""}
15
+ </option>
16
+ );
17
+ }
@@ -0,0 +1,34 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type ServiceNavigationProps = {
4
+ sideNav?: boolean;
5
+ inverse?: boolean;
6
+ class?: string;
7
+ children?: React.ReactNode;
8
+ [key: string]: unknown;
9
+ };
10
+
11
+ export default function ServiceNavigation({ sideNav, inverse, class: className, children, ...rest }: ServiceNavigationProps) {
12
+ const classes = [
13
+ "govuk-service-navigation",
14
+ sideNav ? "govuk-service-navigation--side-nav" : "",
15
+ inverse ? "govuk-service-navigation--inverse" : "",
16
+ className ?? "",
17
+ ]
18
+ .filter(Boolean)
19
+ .join(" ");
20
+
21
+ return (
22
+ <div className={classes} data-module="govuk-service-navigation" {...rest}>
23
+ <div className="govuk-width-container">
24
+ <div className="govuk-service-navigation__container">
25
+ <nav className="govuk-service-navigation__wrapper" aria-label="Menu">
26
+ <ul className="govuk-service-navigation__list" id="navigation">
27
+ {children ?? ""}
28
+ </ul>
29
+ </nav>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ );
34
+ }
@@ -0,0 +1,20 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type ServiceNavigationItemProps = {
4
+ href?: string;
5
+ class?: string;
6
+ children?: React.ReactNode;
7
+ [key: string]: unknown;
8
+ };
9
+
10
+ export default function ServiceNavigationItem({ href, class: className, children, ...rest }: ServiceNavigationItemProps) {
11
+ const classes = ["govuk-service-navigation__item", className ?? ""].filter(Boolean).join(" ");
12
+
13
+ return (
14
+ <li className={classes} {...rest}>
15
+ <a className="govuk-service-navigation__link" href={href}>
16
+ {children ?? ""}
17
+ </a>
18
+ </li>
19
+ );
20
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SideNavProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function SideNav({ class: className, children, ...rest }: SideNavProps) {
10
+ const classes = ["side-nav", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <nav className={classes} {...rest}>
14
+ {children ?? ""}
15
+ </nav>
16
+ );
17
+ }
@@ -0,0 +1,20 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SideNavItemProps = {
4
+ href?: string;
5
+ class?: string;
6
+ children?: React.ReactNode;
7
+ [key: string]: unknown;
8
+ };
9
+
10
+ export default function SideNavItem({ href, class: className, children, ...rest }: SideNavItemProps) {
11
+ const classes = ["side-nav__item", className ?? ""].filter(Boolean).join(" ");
12
+
13
+ return (
14
+ <li className={classes} {...rest}>
15
+ <a className="govuk-link govuk-link--no-visited-state govuk-!-font-size-16 govuk-link--no-underline" href={href}>
16
+ {children ?? ""}
17
+ </a>
18
+ </li>
19
+ );
20
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SideNavListProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function SideNavList({ class: className, children, ...rest }: SideNavListProps) {
10
+ const classes = ["govuk-list govuk-list--spaced", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <ul className={classes} {...rest}>
14
+ {children ?? ""}
15
+ </ul>
16
+ );
17
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SideNavSubnavHeadingProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function SideNavSubnavHeading({ class: className, children, ...rest }: SideNavSubnavHeadingProps) {
10
+ const classes = ["side-nav__section-heading", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <h3 className={classes} {...rest}>
14
+ {children ?? ""}
15
+ </h3>
16
+ );
17
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SideNavSubnavListProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function SideNavSubnavList({ class: className, children, ...rest }: SideNavSubnavListProps) {
10
+ const classes = ["side-nav__subnav-list", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <ul className={classes} {...rest}>
14
+ {children ?? ""}
15
+ </ul>
16
+ );
17
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SideNavTitleProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function SideNavTitle({ class: className, children, ...rest }: SideNavTitleProps) {
10
+ const classes = ["side-nav__title", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <h2 className={classes} {...rest}>
14
+ {children ?? ""}
15
+ </h2>
16
+ );
17
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SkipLinkProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function SkipLink({ class: className, children, ...rest }: SkipLinkProps) {
10
+ const classes = ["govuk-skip-link", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <a className={classes} data-module="govuk-skip-link" {...rest}>
14
+ {children ?? ""}
15
+ </a>
16
+ );
17
+ }
@@ -0,0 +1,24 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SummaryListProps = {
4
+ noBorder?: boolean;
5
+ class?: string;
6
+ children?: React.ReactNode;
7
+ [key: string]: unknown;
8
+ };
9
+
10
+ export default function SummaryList({ noBorder, class: className, children, ...rest }: SummaryListProps) {
11
+ const classes = [
12
+ "govuk-summary-list",
13
+ noBorder ? "govuk-summary-list--no-border" : "",
14
+ className ?? "",
15
+ ]
16
+ .filter(Boolean)
17
+ .join(" ");
18
+
19
+ return (
20
+ <dl className={classes} {...rest}>
21
+ {children ?? ""}
22
+ </dl>
23
+ );
24
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SummaryListActionsProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function SummaryListActions({ class: className, children, ...rest }: SummaryListActionsProps) {
10
+ const classes = ["govuk-summary-list__actions", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <dd className={classes} {...rest}>
14
+ {children ?? ""}
15
+ </dd>
16
+ );
17
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SummaryListKeyProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function SummaryListKey({ class: className, children, ...rest }: SummaryListKeyProps) {
10
+ const classes = ["govuk-summary-list__key", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <dt className={classes} {...rest}>
14
+ {children ?? ""}
15
+ </dt>
16
+ );
17
+ }
@@ -0,0 +1,24 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SummaryListRowProps = {
4
+ noActions?: boolean;
5
+ class?: string;
6
+ children?: React.ReactNode;
7
+ [key: string]: unknown;
8
+ };
9
+
10
+ export default function SummaryListRow({ noActions, class: className, children, ...rest }: SummaryListRowProps) {
11
+ const classes = [
12
+ "govuk-summary-list__row",
13
+ noActions ? "govuk-summary-list__row--no-actions" : "",
14
+ className ?? "",
15
+ ]
16
+ .filter(Boolean)
17
+ .join(" ");
18
+
19
+ return (
20
+ <div className={classes} {...rest}>
21
+ {children ?? ""}
22
+ </div>
23
+ );
24
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type SummaryListValueProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function SummaryListValue({ class: className, children, ...rest }: SummaryListValueProps) {
10
+ const classes = ["govuk-summary-list__value", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <dd className={classes} {...rest}>
14
+ {children ?? ""}
15
+ </dd>
16
+ );
17
+ }
@@ -0,0 +1,26 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type TableProps = {
4
+ smallTextUntilTablet?: boolean;
5
+ subtle?: boolean;
6
+ class?: string;
7
+ children?: React.ReactNode;
8
+ [key: string]: unknown;
9
+ };
10
+
11
+ export default function Table({ smallTextUntilTablet, subtle, class: className, children, ...rest }: TableProps) {
12
+ const classes = [
13
+ "govuk-table",
14
+ smallTextUntilTablet ? "govuk-table--small-text-until-tablet" : "",
15
+ subtle ? "govuk-table--subtle" : "",
16
+ className ?? "",
17
+ ]
18
+ .filter(Boolean)
19
+ .join(" ");
20
+
21
+ return (
22
+ <table className={classes} {...rest}>
23
+ {children ?? ""}
24
+ </table>
25
+ );
26
+ }
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
+
3
+ type TableBodyProps = {
4
+ class?: string;
5
+ children?: React.ReactNode;
6
+ [key: string]: unknown;
7
+ };
8
+
9
+ export default function TableBody({ class: className, children, ...rest }: TableBodyProps) {
10
+ const classes = ["govuk-table__body", className ?? ""].filter(Boolean).join(" ");
11
+
12
+ return (
13
+ <tbody className={classes} {...rest}>
14
+ {children ?? ""}
15
+ </tbody>
16
+ );
17
+ }