@i-dot-ai-npm/component-library-react 0.0.1 → 0.0.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 (112) hide show
  1. package/package.json +17 -6
  2. package/src/accordion/Accordion.tsx +3 -3
  3. package/src/accordion/AccordionSection.tsx +2 -2
  4. package/src/accordion/AccordionSectionContent.tsx +2 -2
  5. package/src/accordion/AccordionSectionHeader.tsx +2 -2
  6. package/src/accordion/AccordionSectionHeading.tsx +2 -2
  7. package/src/accordion/AccordionSectionSummary.tsx +2 -2
  8. package/src/back-link/BackLink.tsx +2 -2
  9. package/src/breadcrumbs/BreadcrumbItem.tsx +2 -2
  10. package/src/breadcrumbs/Breadcrumbs.tsx +2 -2
  11. package/src/button/Button.tsx +11 -9
  12. package/src/button-group/ButtonGroup.tsx +2 -2
  13. package/src/card/Card.tsx +2 -2
  14. package/src/card/CardContent.tsx +2 -2
  15. package/src/card/CardGroup.tsx +2 -2
  16. package/src/card/CardHeading.tsx +2 -2
  17. package/src/card/CardIcon.tsx +2 -2
  18. package/src/card/CardLink.tsx +2 -2
  19. package/src/character-count/CharacterCount.tsx +0 -2
  20. package/src/character-count/CharacterCountMessage.tsx +2 -2
  21. package/src/checkboxes/CheckboxDivider.tsx +2 -2
  22. package/src/checkboxes/CheckboxInput.tsx +0 -2
  23. package/src/checkboxes/CheckboxItem.tsx +2 -2
  24. package/src/checkboxes/CheckboxLabel.tsx +2 -2
  25. package/src/checkboxes/Checkboxes.tsx +2 -2
  26. package/src/cookie-banner/CookieBanner.tsx +2 -2
  27. package/src/cookie-banner/CookieBannerActions.tsx +2 -2
  28. package/src/cookie-banner/CookieBannerContent.tsx +2 -2
  29. package/src/cookie-banner/CookieBannerHeading.tsx +2 -2
  30. package/src/cookie-banner/CookieBannerMessage.tsx +2 -2
  31. package/src/date-input/DateInput.tsx +2 -2
  32. package/src/date-input/DateInputField.tsx +1 -3
  33. package/src/date-input/DateInputItem.tsx +2 -2
  34. package/src/details/Details.tsx +2 -2
  35. package/src/details/DetailsSummary.tsx +2 -2
  36. package/src/details/DetailsText.tsx +2 -2
  37. package/src/error-message/ErrorMessage.tsx +2 -2
  38. package/src/error-summary/ErrorSummary.tsx +2 -2
  39. package/src/error-summary/ErrorSummaryBody.tsx +2 -2
  40. package/src/error-summary/ErrorSummaryItem.tsx +2 -2
  41. package/src/error-summary/ErrorSummaryList.tsx +2 -2
  42. package/src/error-summary/ErrorSummaryTitle.tsx +2 -2
  43. package/src/fieldset/Fieldset.tsx +2 -2
  44. package/src/fieldset/FieldsetLegend.tsx +2 -2
  45. package/src/file-upload/FileUpload.tsx +0 -2
  46. package/src/form-group/FormGroup.tsx +2 -2
  47. package/src/govuk-frontend.d.ts +13 -0
  48. package/src/header/Header.tsx +2 -2
  49. package/src/hint/Hint.tsx +2 -2
  50. package/src/index.ts +0 -1
  51. package/src/input/Input.tsx +0 -2
  52. package/src/input-label/InputLabel.tsx +2 -2
  53. package/src/inset-text/InsetText.tsx +2 -2
  54. package/src/link/Link.tsx +2 -2
  55. package/src/list/List.tsx +8 -8
  56. package/src/list/ListItem.tsx +2 -2
  57. package/src/notification-banner/NotificationBanner.tsx +8 -8
  58. package/src/notification-banner/NotificationBannerContent.tsx +2 -2
  59. package/src/notification-banner/NotificationBannerHeader.tsx +2 -2
  60. package/src/notification-banner/NotificationBannerHeading.tsx +2 -2
  61. package/src/notification-banner/NotificationBannerTitle.tsx +2 -2
  62. package/src/pagination/Pagination.tsx +2 -2
  63. package/src/pagination/PaginationItem.tsx +10 -10
  64. package/src/pagination/PaginationList.tsx +2 -2
  65. package/src/pagination/PaginationNext.tsx +2 -2
  66. package/src/pagination/PaginationPrev.tsx +2 -2
  67. package/src/password-input/PasswordInput.tsx +4 -4
  68. package/src/phase-banner/PhaseBanner.tsx +2 -2
  69. package/src/radios/RadioDivider.tsx +2 -2
  70. package/src/radios/RadioInput.tsx +0 -2
  71. package/src/radios/RadioItem.tsx +2 -2
  72. package/src/radios/Radios.tsx +2 -2
  73. package/src/select/Select.tsx +2 -2
  74. package/src/select/SelectOption.tsx +2 -2
  75. package/src/service-navigation/ServiceNavigation.tsx +2 -2
  76. package/src/service-navigation/ServiceNavigationItem.tsx +2 -2
  77. package/src/side-nav/SideNav.tsx +2 -2
  78. package/src/side-nav/SideNavItem.tsx +2 -2
  79. package/src/side-nav/SideNavList.tsx +2 -2
  80. package/src/side-nav/SideNavSubnavHeading.tsx +2 -2
  81. package/src/side-nav/SideNavSubnavList.tsx +2 -2
  82. package/src/side-nav/SideNavTitle.tsx +2 -2
  83. package/src/skip-link/SkipLink.tsx +2 -2
  84. package/src/summary-list/SummaryList.tsx +2 -2
  85. package/src/summary-list/SummaryListActions.tsx +2 -2
  86. package/src/summary-list/SummaryListKey.tsx +2 -2
  87. package/src/summary-list/SummaryListRow.tsx +2 -2
  88. package/src/summary-list/SummaryListValue.tsx +2 -2
  89. package/src/table/Table.tsx +6 -3
  90. package/src/table/TableBody.tsx +4 -2
  91. package/src/table/TableCaption.tsx +4 -2
  92. package/src/table/TableCell.tsx +11 -3
  93. package/src/table/TableHead.tsx +4 -2
  94. package/src/table/TableHeader.tsx +4 -2
  95. package/src/table/TableRow.tsx +4 -2
  96. package/src/tabs/Tab.tsx +2 -2
  97. package/src/tabs/TabPanel.tsx +2 -2
  98. package/src/tabs/Tabs.tsx +3 -3
  99. package/src/tabs/TabsList.tsx +2 -2
  100. package/src/tabs/TabsTitle.tsx +2 -2
  101. package/src/tag/Tag.tsx +2 -2
  102. package/src/task-list/TaskList.tsx +2 -2
  103. package/src/task-list/TaskListHint.tsx +2 -2
  104. package/src/task-list/TaskListItem.tsx +2 -2
  105. package/src/task-list/TaskListLink.tsx +2 -2
  106. package/src/task-list/TaskListNameAndHint.tsx +2 -2
  107. package/src/task-list/TaskListStatus.tsx +2 -2
  108. package/src/textarea/Textarea.tsx +0 -2
  109. package/src/toggle/Toggle.tsx +0 -2
  110. package/src/toggle/ToggleItem.tsx +2 -2
  111. package/src/toggle/ToggleLabel.tsx +2 -2
  112. package/src/warning-text/WarningText.tsx +2 -2
@@ -1,16 +1,24 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ /** @jsxImportSource react */
2
+
3
+ import { ReactNode } from 'react';
2
4
 
3
5
  type TableCellProps = {
4
6
  numeric?: boolean;
7
+ stretch?: boolean;
8
+ noWrap?: boolean;
9
+ small?: boolean;
5
10
  class?: string;
6
- children?: React.ReactNode;
11
+ children?: ReactNode;
7
12
  [key: string]: unknown;
8
13
  };
9
14
 
10
- export default function TableCell({ numeric, class: className, children, ...rest }: TableCellProps) {
15
+ export default function TableCell({ numeric, stretch, noWrap, small, class: className, children, ...rest }: TableCellProps) {
11
16
  const classes = [
12
17
  "govuk-table__cell",
13
18
  numeric ? "govuk-table__cell--numeric" : "",
19
+ stretch ? "govuk-table__cell--stretch" : "",
20
+ noWrap ? "govuk-table__cell--no-wrap" : "",
21
+ small ? "govuk-table__cell--small" : "",
14
22
  className ?? "",
15
23
  ]
16
24
  .filter(Boolean)
@@ -1,8 +1,10 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ /** @jsxImportSource react */
2
+
3
+ import { ReactNode } from 'react';
2
4
 
3
5
  type TableHeadProps = {
4
6
  class?: string;
5
- children?: React.ReactNode;
7
+ children?: ReactNode;
6
8
  [key: string]: unknown;
7
9
  };
8
10
 
@@ -1,9 +1,11 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ /** @jsxImportSource react */
2
+
3
+ import { ReactNode } from 'react';
2
4
 
3
5
  type TableHeaderProps = {
4
6
  numeric?: boolean;
5
7
  class?: string;
6
- children?: React.ReactNode;
8
+ children?: ReactNode;
7
9
  [key: string]: unknown;
8
10
  };
9
11
 
@@ -1,8 +1,10 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ /** @jsxImportSource react */
2
+
3
+ import { ReactNode } from 'react';
2
4
 
3
5
  type TableRowProps = {
4
6
  class?: string;
5
- children?: React.ReactNode;
7
+ children?: ReactNode;
6
8
  [key: string]: unknown;
7
9
  };
8
10
 
package/src/tabs/Tab.tsx CHANGED
@@ -1,9 +1,9 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type TabProps = {
4
4
  selected?: boolean;
5
5
  class?: string;
6
- children?: React.ReactNode;
6
+ children?: ReactNode;
7
7
  [key: string]: unknown;
8
8
  };
9
9
 
@@ -1,9 +1,9 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type TabPanelProps = {
4
4
  hidden?: boolean;
5
5
  class?: string;
6
- children?: React.ReactNode;
6
+ children?: ReactNode;
7
7
  [key: string]: unknown;
8
8
  };
9
9
 
package/src/tabs/Tabs.tsx CHANGED
@@ -1,14 +1,14 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
  import { useEffect, useRef } from "react";
3
3
 
4
4
  type TabsProps = {
5
5
  class?: string;
6
- children?: React.ReactNode;
6
+ children?: ReactNode;
7
7
  [key: string]: unknown;
8
8
  };
9
9
 
10
10
  export default function Tabs({ class: className, children, ...rest }: TabsProps) {
11
- const ref = useRef<HTMLElement>(null);
11
+ const ref = useRef<HTMLDivElement>(null);
12
12
  const classes = ["govuk-tabs", className ?? ""].filter(Boolean).join(" ");
13
13
  useEffect(() => {
14
14
  const el = ref.current;
@@ -1,8 +1,8 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type TabsListProps = {
4
4
  class?: string;
5
- children?: React.ReactNode;
5
+ children?: ReactNode;
6
6
  [key: string]: unknown;
7
7
  };
8
8
 
@@ -1,8 +1,8 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type TabsTitleProps = {
4
4
  class?: string;
5
- children?: React.ReactNode;
5
+ children?: ReactNode;
6
6
  [key: string]: unknown;
7
7
  };
8
8
 
package/src/tag/Tag.tsx CHANGED
@@ -1,9 +1,9 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type TagProps = {
4
4
  colour?: "grey" | "green" | "turquoise" | "blue" | "light-blue" | "purple" | "pink" | "red" | "orange" | "yellow";
5
5
  class?: string;
6
- children?: React.ReactNode;
6
+ children?: ReactNode;
7
7
  [key: string]: unknown;
8
8
  };
9
9
 
@@ -1,8 +1,8 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type TaskListProps = {
4
4
  class?: string;
5
- children?: React.ReactNode;
5
+ children?: ReactNode;
6
6
  [key: string]: unknown;
7
7
  };
8
8
 
@@ -1,8 +1,8 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type TaskListHintProps = {
4
4
  class?: string;
5
- children?: React.ReactNode;
5
+ children?: ReactNode;
6
6
  [key: string]: unknown;
7
7
  };
8
8
 
@@ -1,9 +1,9 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type TaskListItemProps = {
4
4
  withLink?: boolean;
5
5
  class?: string;
6
- children?: React.ReactNode;
6
+ children?: ReactNode;
7
7
  [key: string]: unknown;
8
8
  };
9
9
 
@@ -1,8 +1,8 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type TaskListLinkProps = {
4
4
  class?: string;
5
- children?: React.ReactNode;
5
+ children?: ReactNode;
6
6
  [key: string]: unknown;
7
7
  };
8
8
 
@@ -1,8 +1,8 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type TaskListNameAndHintProps = {
4
4
  class?: string;
5
- children?: React.ReactNode;
5
+ children?: ReactNode;
6
6
  [key: string]: unknown;
7
7
  };
8
8
 
@@ -1,8 +1,8 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type TaskListStatusProps = {
4
4
  class?: string;
5
- children?: React.ReactNode;
5
+ children?: ReactNode;
6
6
  [key: string]: unknown;
7
7
  };
8
8
 
@@ -1,5 +1,3 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
-
3
1
  type TextareaProps = {
4
2
  error?: boolean;
5
3
  subtle?: boolean;
@@ -1,5 +1,3 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
2
-
3
1
  type ToggleProps = {
4
2
  class?: string;
5
3
  [key: string]: unknown;
@@ -1,8 +1,8 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type ToggleItemProps = {
4
4
  class?: string;
5
- children?: React.ReactNode;
5
+ children?: ReactNode;
6
6
  [key: string]: unknown;
7
7
  };
8
8
 
@@ -1,8 +1,8 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type ToggleLabelProps = {
4
4
  class?: string;
5
- children?: React.ReactNode;
5
+ children?: ReactNode;
6
6
  [key: string]: unknown;
7
7
  };
8
8
 
@@ -1,8 +1,8 @@
1
- // AUTO-GENERATED from HTML spec. Do not edit by hand.
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  type WarningTextProps = {
4
4
  class?: string;
5
- children?: React.ReactNode;
5
+ children?: ReactNode;
6
6
  [key: string]: unknown;
7
7
  };
8
8