@i-dot-ai-npm/component-library-react 0.0.7 → 0.0.9

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 (141) hide show
  1. package/package.json +11 -3
  2. package/src/accordion/Accordion.tsx +2 -3
  3. package/src/accordion/AccordionSection.tsx +2 -3
  4. package/src/accordion/AccordionSectionContent.tsx +2 -3
  5. package/src/accordion/AccordionSectionHeader.tsx +2 -3
  6. package/src/accordion/AccordionSectionHeading.tsx +2 -3
  7. package/src/accordion/AccordionSectionSummary.tsx +2 -3
  8. package/src/back-link/BackLink.tsx +2 -3
  9. package/src/breadcrumbs/BreadcrumbItem.tsx +2 -3
  10. package/src/breadcrumbs/Breadcrumbs.tsx +2 -3
  11. package/src/button/Button.tsx +2 -3
  12. package/src/button-group/ButtonGroup.tsx +2 -3
  13. package/src/card/Card.tsx +2 -3
  14. package/src/card/CardContent.tsx +2 -3
  15. package/src/card/CardGroup.tsx +2 -3
  16. package/src/card/CardHeading.tsx +2 -3
  17. package/src/card/CardIcon.tsx +2 -3
  18. package/src/card/CardLink.tsx +2 -3
  19. package/src/character-count/CharacterCount.tsx +2 -3
  20. package/src/character-count/CharacterCountMessage.tsx +2 -3
  21. package/src/checkboxes/CheckboxConditional.tsx +2 -3
  22. package/src/checkboxes/CheckboxDivider.tsx +1 -2
  23. package/src/checkboxes/CheckboxInput.tsx +3 -2
  24. package/src/checkboxes/CheckboxItem.tsx +2 -3
  25. package/src/checkboxes/CheckboxLabel.tsx +2 -3
  26. package/src/checkboxes/Checkboxes.tsx +2 -3
  27. package/src/contents-panel/ContentsPanel.tsx +2 -3
  28. package/src/contents-panel/ContentsPanelItem.tsx +2 -3
  29. package/src/contents-panel/ContentsPanelList.tsx +2 -3
  30. package/src/contents-panel/ContentsPanelListHeading.tsx +2 -3
  31. package/src/cookie-banner/CookieBanner.tsx +2 -3
  32. package/src/cookie-banner/CookieBannerActions.tsx +2 -3
  33. package/src/cookie-banner/CookieBannerContent.tsx +2 -3
  34. package/src/cookie-banner/CookieBannerHeading.tsx +2 -3
  35. package/src/cookie-banner/CookieBannerMessage.tsx +2 -3
  36. package/src/date-input/DateInput.tsx +2 -3
  37. package/src/date-input/DateInputField.tsx +5 -4
  38. package/src/date-input/DateInputItem.tsx +2 -3
  39. package/src/details/Details.tsx +2 -3
  40. package/src/details/DetailsSummary.tsx +2 -3
  41. package/src/details/DetailsText.tsx +2 -3
  42. package/src/error-message/ErrorMessage.tsx +2 -3
  43. package/src/error-summary/ErrorSummary.tsx +2 -3
  44. package/src/error-summary/ErrorSummaryBody.tsx +2 -3
  45. package/src/error-summary/ErrorSummaryItem.tsx +2 -3
  46. package/src/error-summary/ErrorSummaryList.tsx +2 -3
  47. package/src/error-summary/ErrorSummaryTitle.tsx +2 -3
  48. package/src/exit-this-page/ExitThisPage.tsx +2 -3
  49. package/src/feedback/Feedback.tsx +2 -3
  50. package/src/fieldset/Fieldset.tsx +2 -3
  51. package/src/fieldset/FieldsetLegend.tsx +2 -3
  52. package/src/file-upload/FileUpload.tsx +3 -2
  53. package/src/footer/Footer.tsx +2 -3
  54. package/src/form-group/FormGroup.tsx +2 -3
  55. package/src/govuk-footer/GovukFooter.tsx +2 -3
  56. package/src/govuk-header/GovukHeader.tsx +3 -2
  57. package/src/header/Header.tsx +2 -3
  58. package/src/hint/Hint.tsx +2 -3
  59. package/src/index.ts +4 -0
  60. package/src/input/Input.tsx +5 -4
  61. package/src/input-label/InputLabel.tsx +2 -3
  62. package/src/inset-text/InsetText.tsx +2 -3
  63. package/src/label/Label.tsx +2 -3
  64. package/src/language-navigation/LanguageNavigation.tsx +2 -3
  65. package/src/language-navigation/LanguageNavigationItem.tsx +2 -3
  66. package/src/link/Link.tsx +2 -3
  67. package/src/list/List.tsx +2 -3
  68. package/src/list/ListItem.tsx +2 -3
  69. package/src/modal/Modal.tsx +53 -0
  70. package/src/modal/ModalBody.tsx +16 -0
  71. package/src/modal/ModalFooter.tsx +18 -0
  72. package/src/modal/ModalTitle.tsx +18 -0
  73. package/src/notification-banner/NotificationBanner.tsx +2 -3
  74. package/src/notification-banner/NotificationBannerContent.tsx +2 -3
  75. package/src/notification-banner/NotificationBannerHeader.tsx +2 -3
  76. package/src/notification-banner/NotificationBannerHeading.tsx +2 -3
  77. package/src/notification-banner/NotificationBannerTitle.tsx +2 -3
  78. package/src/pagination/Pagination.tsx +2 -3
  79. package/src/pagination/PaginationItem.tsx +2 -3
  80. package/src/pagination/PaginationList.tsx +2 -3
  81. package/src/pagination/PaginationNext.tsx +2 -3
  82. package/src/pagination/PaginationPrev.tsx +2 -3
  83. package/src/panel/Panel.tsx +2 -3
  84. package/src/panel/PanelActions.tsx +2 -3
  85. package/src/panel/PanelBody.tsx +2 -3
  86. package/src/panel/PanelTitle.tsx +2 -3
  87. package/src/password-input/PasswordInput.tsx +2 -3
  88. package/src/phase-banner/PhaseBanner.tsx +2 -3
  89. package/src/phase-banner/PhaseBannerText.tsx +2 -3
  90. package/src/radios/RadioConditional.tsx +2 -3
  91. package/src/radios/RadioDivider.tsx +1 -2
  92. package/src/radios/RadioInput.tsx +3 -2
  93. package/src/radios/RadioItem.tsx +2 -3
  94. package/src/radios/RadioLabel.tsx +2 -3
  95. package/src/radios/Radios.tsx +2 -3
  96. package/src/select/Select.tsx +2 -3
  97. package/src/select/SelectOption.tsx +2 -3
  98. package/src/service-navigation/ServiceNavigation.tsx +2 -3
  99. package/src/service-navigation/ServiceNavigationItem.tsx +2 -3
  100. package/src/side-nav/SideNav.tsx +2 -3
  101. package/src/side-nav/SideNavItem.tsx +2 -3
  102. package/src/side-nav/SideNavList.tsx +2 -3
  103. package/src/side-nav/SideNavSubnavHeading.tsx +2 -3
  104. package/src/side-nav/SideNavSubnavList.tsx +2 -3
  105. package/src/side-nav/SideNavTitle.tsx +2 -3
  106. package/src/skip-link/SkipLink.tsx +2 -3
  107. package/src/summary-card/SummaryCard.tsx +2 -3
  108. package/src/summary-card/SummaryCardAction.tsx +2 -3
  109. package/src/summary-card/SummaryCardActions.tsx +2 -3
  110. package/src/summary-card/SummaryCardContent.tsx +2 -3
  111. package/src/summary-card/SummaryCardTitle.tsx +2 -3
  112. package/src/summary-card/SummaryCardTitleWrapper.tsx +2 -3
  113. package/src/summary-list/SummaryList.tsx +2 -3
  114. package/src/summary-list/SummaryListActions.tsx +2 -3
  115. package/src/summary-list/SummaryListKey.tsx +2 -3
  116. package/src/summary-list/SummaryListRow.tsx +2 -3
  117. package/src/summary-list/SummaryListValue.tsx +2 -3
  118. package/src/table/Table.tsx +2 -3
  119. package/src/table/TableBody.tsx +2 -3
  120. package/src/table/TableCaption.tsx +2 -3
  121. package/src/table/TableCell.tsx +2 -3
  122. package/src/table/TableHead.tsx +2 -3
  123. package/src/table/TableHeader.tsx +2 -3
  124. package/src/table/TableRow.tsx +2 -3
  125. package/src/tabs/Tab.tsx +2 -3
  126. package/src/tabs/TabPanel.tsx +2 -3
  127. package/src/tabs/Tabs.tsx +2 -3
  128. package/src/tabs/TabsList.tsx +2 -3
  129. package/src/tabs/TabsTitle.tsx +2 -3
  130. package/src/tag/Tag.tsx +2 -3
  131. package/src/task-list/TaskList.tsx +2 -3
  132. package/src/task-list/TaskListHint.tsx +2 -3
  133. package/src/task-list/TaskListItem.tsx +2 -3
  134. package/src/task-list/TaskListLink.tsx +2 -3
  135. package/src/task-list/TaskListNameAndHint.tsx +2 -3
  136. package/src/task-list/TaskListStatus.tsx +2 -3
  137. package/src/textarea/Textarea.tsx +3 -2
  138. package/src/toggle/Toggle.tsx +3 -2
  139. package/src/toggle/ToggleItem.tsx +2 -3
  140. package/src/toggle/ToggleLabel.tsx +2 -3
  141. package/src/warning-text/WarningText.tsx +2 -3
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type PanelTitleProps = {
3
+ type PanelTitleProps = ComponentPropsWithoutRef<'h1'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function PanelTitle({ class: className, children, ...rest }: PanelTitleProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type PasswordInputProps = {
3
+ type PasswordInputProps = ComponentPropsWithoutRef<'input'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function PasswordInput({ class: className, children, ...rest }: PasswordInputProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type PhaseBannerProps = {
3
+ type PhaseBannerProps = ComponentPropsWithoutRef<'div'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function PhaseBanner({ class: className, children, ...rest }: PhaseBannerProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type PhaseBannerTextProps = {
3
+ type PhaseBannerTextProps = ComponentPropsWithoutRef<'span'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function PhaseBannerText({ class: className, children, ...rest }: PhaseBannerTextProps) {
@@ -1,10 +1,9 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type RadioConditionalProps = {
3
+ type RadioConditionalProps = ComponentPropsWithoutRef<'div'> & {
4
4
  hidden?: boolean;
5
5
  class?: string;
6
6
  children?: ReactNode;
7
- [key: string]: unknown;
8
7
  };
9
8
 
10
9
  export default function RadioConditional({ hidden = true, class: className, children, ...rest }: RadioConditionalProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ReactNode } from 'react';
2
2
 
3
3
  type RadioDividerProps = {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function RadioDivider({ class: className, children }: RadioDividerProps) {
@@ -1,6 +1,7 @@
1
- type RadioInputProps = {
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+
3
+ type RadioInputProps = ComponentPropsWithoutRef<'input'> & {
2
4
  class?: string;
3
- [key: string]: unknown;
4
5
  };
5
6
 
6
7
  export default function RadioInput({ class: className, ...rest }: RadioInputProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type RadioItemProps = {
3
+ type RadioItemProps = ComponentPropsWithoutRef<'div'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function RadioItem({ class: className, children, ...rest }: RadioItemProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type RadioLabelProps = {
3
+ type RadioLabelProps = ComponentPropsWithoutRef<'label'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function RadioLabel({ class: className, children, ...rest }: RadioLabelProps) {
@@ -1,11 +1,10 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type RadiosProps = {
3
+ type RadiosProps = ComponentPropsWithoutRef<'div'> & {
4
4
  inline?: boolean;
5
5
  small?: boolean;
6
6
  class?: string;
7
7
  children?: ReactNode;
8
- [key: string]: unknown;
9
8
  };
10
9
 
11
10
  export default function Radios({ inline, small, class: className, children, ...rest }: RadiosProps) {
@@ -1,11 +1,10 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SelectProps = {
3
+ type SelectProps = ComponentPropsWithoutRef<'select'> & {
4
4
  subtle?: boolean;
5
5
  error?: boolean;
6
6
  class?: string;
7
7
  children?: ReactNode;
8
- [key: string]: unknown;
9
8
  };
10
9
 
11
10
  export default function Select({ subtle, error, class: className, children, ...rest }: SelectProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SelectOptionProps = {
3
+ type SelectOptionProps = ComponentPropsWithoutRef<'option'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SelectOption({ class: className, children, ...rest }: SelectOptionProps) {
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type ServiceNavigationProps = {
3
+ type ServiceNavigationProps = ComponentPropsWithoutRef<'section'> & ComponentPropsWithoutRef<'div'> & {
4
4
  sideNav?: boolean;
5
5
  inverse?: boolean;
6
6
  serviceName?: string;
@@ -18,7 +18,6 @@ type ServiceNavigationProps = {
18
18
  endSlotInline?: boolean;
19
19
  class?: string;
20
20
  children?: ReactNode;
21
- [key: string]: unknown;
22
21
  };
23
22
 
24
23
  export default function ServiceNavigation({
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type ServiceNavigationItemProps = {
3
+ type ServiceNavigationItemProps = ComponentPropsWithoutRef<'a'> & ComponentPropsWithoutRef<'span'> & {
4
4
  href?: string;
5
5
  /** Current page — adds active styling + aria-current="page". */
6
6
  current?: boolean;
@@ -8,7 +8,6 @@ type ServiceNavigationItemProps = {
8
8
  active?: boolean;
9
9
  class?: string;
10
10
  children?: ReactNode;
11
- [key: string]: unknown;
12
11
  };
13
12
 
14
13
  export default function ServiceNavigationItem({ href, current, active, class: className, children, ...rest }: ServiceNavigationItemProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SideNavProps = {
3
+ type SideNavProps = ComponentPropsWithoutRef<'nav'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SideNav({ class: className, children, ...rest }: SideNavProps) {
@@ -1,10 +1,9 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SideNavItemProps = {
3
+ type SideNavItemProps = ComponentPropsWithoutRef<'li'> & {
4
4
  href?: string;
5
5
  class?: string;
6
6
  children?: ReactNode;
7
- [key: string]: unknown;
8
7
  };
9
8
 
10
9
  export default function SideNavItem({ href, class: className, children, ...rest }: SideNavItemProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SideNavListProps = {
3
+ type SideNavListProps = ComponentPropsWithoutRef<'ul'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SideNavList({ class: className, children, ...rest }: SideNavListProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SideNavSubnavHeadingProps = {
3
+ type SideNavSubnavHeadingProps = ComponentPropsWithoutRef<'h3'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SideNavSubnavHeading({ class: className, children, ...rest }: SideNavSubnavHeadingProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SideNavSubnavListProps = {
3
+ type SideNavSubnavListProps = ComponentPropsWithoutRef<'ul'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SideNavSubnavList({ class: className, children, ...rest }: SideNavSubnavListProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SideNavTitleProps = {
3
+ type SideNavTitleProps = ComponentPropsWithoutRef<'h2'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SideNavTitle({ class: className, children, ...rest }: SideNavTitleProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SkipLinkProps = {
3
+ type SkipLinkProps = ComponentPropsWithoutRef<'a'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SkipLink({ class: className, children, ...rest }: SkipLinkProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SummaryCardProps = {
3
+ type SummaryCardProps = ComponentPropsWithoutRef<'div'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SummaryCard({ class: className, children, ...rest }: SummaryCardProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SummaryCardActionProps = {
3
+ type SummaryCardActionProps = ComponentPropsWithoutRef<'li'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SummaryCardAction({ class: className, children, ...rest }: SummaryCardActionProps) {
@@ -1,12 +1,11 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SummaryCardActionsProps = {
3
+ type SummaryCardActionsProps = ComponentPropsWithoutRef<'div'> & ComponentPropsWithoutRef<'ul'> & {
4
4
  /** Render as a single-action wrapper (`<div>`) instead of a list (`<ul>`).
5
5
  * govuk uses a div for exactly one action and a ul for multiple. */
6
6
  single?: boolean;
7
7
  class?: string;
8
8
  children?: ReactNode;
9
- [key: string]: unknown;
10
9
  };
11
10
 
12
11
  export default function SummaryCardActions({ single, class: className, children, ...rest }: SummaryCardActionsProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SummaryCardContentProps = {
3
+ type SummaryCardContentProps = ComponentPropsWithoutRef<'div'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SummaryCardContent({ class: className, children, ...rest }: SummaryCardContentProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SummaryCardTitleProps = {
3
+ type SummaryCardTitleProps = ComponentPropsWithoutRef<'h2'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SummaryCardTitle({ class: className, children, ...rest }: SummaryCardTitleProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SummaryCardTitleWrapperProps = {
3
+ type SummaryCardTitleWrapperProps = ComponentPropsWithoutRef<'div'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SummaryCardTitleWrapper({ class: className, children, ...rest }: SummaryCardTitleWrapperProps) {
@@ -1,10 +1,9 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SummaryListProps = {
3
+ type SummaryListProps = ComponentPropsWithoutRef<'dl'> & {
4
4
  noBorder?: boolean;
5
5
  class?: string;
6
6
  children?: ReactNode;
7
- [key: string]: unknown;
8
7
  };
9
8
 
10
9
  export default function SummaryList({ noBorder, class: className, children, ...rest }: SummaryListProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SummaryListActionsProps = {
3
+ type SummaryListActionsProps = ComponentPropsWithoutRef<'dd'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SummaryListActions({ class: className, children, ...rest }: SummaryListActionsProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SummaryListKeyProps = {
3
+ type SummaryListKeyProps = ComponentPropsWithoutRef<'dt'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SummaryListKey({ class: className, children, ...rest }: SummaryListKeyProps) {
@@ -1,10 +1,9 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SummaryListRowProps = {
3
+ type SummaryListRowProps = ComponentPropsWithoutRef<'div'> & {
4
4
  noActions?: boolean;
5
5
  class?: string;
6
6
  children?: ReactNode;
7
- [key: string]: unknown;
8
7
  };
9
8
 
10
9
  export default function SummaryListRow({ noActions, class: className, children, ...rest }: SummaryListRowProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type SummaryListValueProps = {
3
+ type SummaryListValueProps = ComponentPropsWithoutRef<'dd'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function SummaryListValue({ class: className, children, ...rest }: SummaryListValueProps) {
@@ -1,13 +1,12 @@
1
1
  /** @jsxImportSource react */
2
- import { ReactNode } from 'react';
2
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
3
3
 
4
- type TableProps = {
4
+ type TableProps = ComponentPropsWithoutRef<'table'> & {
5
5
  smallTextUntilTablet?: boolean;
6
6
  subtle?: boolean;
7
7
  summary?: boolean;
8
8
  class?: string;
9
9
  children?: ReactNode;
10
- [key: string]: unknown;
11
10
  };
12
11
 
13
12
  export default function Table({ smallTextUntilTablet, subtle, summary, class: className, children, ...rest }: TableProps) {
@@ -1,11 +1,10 @@
1
1
  /** @jsxImportSource react */
2
2
 
3
- import { ReactNode } from 'react';
3
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
4
4
 
5
- type TableBodyProps = {
5
+ type TableBodyProps = ComponentPropsWithoutRef<'tbody'> & {
6
6
  class?: string;
7
7
  children?: ReactNode;
8
- [key: string]: unknown;
9
8
  };
10
9
 
11
10
  export default function TableBody({ class: className, children, ...rest }: TableBodyProps) {
@@ -1,12 +1,11 @@
1
1
  /** @jsxImportSource react */
2
2
 
3
- import { ReactNode } from 'react';
3
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
4
4
 
5
- type TableCaptionProps = {
5
+ type TableCaptionProps = ComponentPropsWithoutRef<'caption'> & {
6
6
  size?: "small" | "medium" | "large" | "xl";
7
7
  class?: string;
8
8
  children?: ReactNode;
9
- [key: string]: unknown;
10
9
  };
11
10
 
12
11
  export default function TableCaption({ size, class: className, children, ...rest }: TableCaptionProps) {
@@ -1,15 +1,14 @@
1
1
  /** @jsxImportSource react */
2
2
 
3
- import { ReactNode } from 'react';
3
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
4
4
 
5
- type TableCellProps = {
5
+ type TableCellProps = ComponentPropsWithoutRef<'td'> & {
6
6
  numeric?: boolean;
7
7
  stretch?: boolean;
8
8
  noWrap?: boolean;
9
9
  small?: boolean;
10
10
  class?: string;
11
11
  children?: ReactNode;
12
- [key: string]: unknown;
13
12
  };
14
13
 
15
14
  export default function TableCell({ numeric, stretch, noWrap, small, class: className, children, ...rest }: TableCellProps) {
@@ -1,11 +1,10 @@
1
1
  /** @jsxImportSource react */
2
2
 
3
- import { ReactNode } from 'react';
3
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
4
4
 
5
- type TableHeadProps = {
5
+ type TableHeadProps = ComponentPropsWithoutRef<'thead'> & {
6
6
  class?: string;
7
7
  children?: ReactNode;
8
- [key: string]: unknown;
9
8
  };
10
9
 
11
10
  export default function TableHead({ class: className, children, ...rest }: TableHeadProps) {
@@ -1,13 +1,12 @@
1
1
  /** @jsxImportSource react */
2
2
 
3
- import { ReactNode } from 'react';
3
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
4
4
 
5
- type TableHeaderProps = {
5
+ type TableHeaderProps = ComponentPropsWithoutRef<'th'> & {
6
6
  numeric?: boolean;
7
7
  scope?: "col" | "row" | "colgroup" | "rowgroup";
8
8
  class?: string;
9
9
  children?: ReactNode;
10
- [key: string]: unknown;
11
10
  };
12
11
 
13
12
  export default function TableHeader({ numeric, scope = "col", class: className, children, ...rest }: TableHeaderProps) {
@@ -1,11 +1,10 @@
1
1
  /** @jsxImportSource react */
2
2
 
3
- import { ReactNode } from 'react';
3
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
4
4
 
5
- type TableRowProps = {
5
+ type TableRowProps = ComponentPropsWithoutRef<'tr'> & {
6
6
  class?: string;
7
7
  children?: ReactNode;
8
- [key: string]: unknown;
9
8
  };
10
9
 
11
10
  export default function TableRow({ class: className, children, ...rest }: TableRowProps) {
package/src/tabs/Tab.tsx CHANGED
@@ -1,10 +1,9 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type TabProps = {
3
+ type TabProps = ComponentPropsWithoutRef<'a'> & {
4
4
  selected?: boolean;
5
5
  class?: string;
6
6
  children?: ReactNode;
7
- [key: string]: unknown;
8
7
  };
9
8
 
10
9
  export default function Tab({ selected, class: className, children, ...rest }: TabProps) {
@@ -1,10 +1,9 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type TabPanelProps = {
3
+ type TabPanelProps = ComponentPropsWithoutRef<'div'> & {
4
4
  hidden?: boolean;
5
5
  class?: string;
6
6
  children?: ReactNode;
7
- [key: string]: unknown;
8
7
  };
9
8
 
10
9
  export default function TabPanel({ hidden, class: className, children, ...rest }: TabPanelProps) {
package/src/tabs/Tabs.tsx CHANGED
@@ -1,10 +1,9 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import { useEffect, useRef } from "react";
3
3
 
4
- type TabsProps = {
4
+ type TabsProps = ComponentPropsWithoutRef<'div'> & {
5
5
  class?: string;
6
6
  children?: ReactNode;
7
- [key: string]: unknown;
8
7
  };
9
8
 
10
9
  export default function Tabs({ class: className, children, ...rest }: TabsProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type TabsListProps = {
3
+ type TabsListProps = ComponentPropsWithoutRef<'ul'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function TabsList({ class: className, children, ...rest }: TabsListProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type TabsTitleProps = {
3
+ type TabsTitleProps = ComponentPropsWithoutRef<'h2'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function TabsTitle({ class: className, children, ...rest }: TabsTitleProps) {
package/src/tag/Tag.tsx CHANGED
@@ -1,10 +1,9 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type TagProps = {
3
+ type TagProps = ComponentPropsWithoutRef<'strong'> & {
4
4
  colour?: "grey" | "green" | "teal" | "turquoise" | "blue" | "light-blue" | "purple" | "magenta" | "pink" | "red" | "orange" | "yellow";
5
5
  class?: string;
6
6
  children?: ReactNode;
7
- [key: string]: unknown;
8
7
  };
9
8
 
10
9
  export default function Tag({ colour, class: className, children, ...rest }: TagProps) {
@@ -1,9 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- type TaskListProps = {
3
+ type TaskListProps = ComponentPropsWithoutRef<'ul'> & {
4
4
  class?: string;
5
5
  children?: ReactNode;
6
- [key: string]: unknown;
7
6
  };
8
7
 
9
8
  export default function TaskList({ class: className, children, ...rest }: TaskListProps) {