@i-dot-ai-npm/component-library-react 0.0.7 → 0.0.8
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/package.json +9 -3
- package/src/accordion/Accordion.tsx +2 -3
- package/src/accordion/AccordionSection.tsx +2 -3
- package/src/accordion/AccordionSectionContent.tsx +2 -3
- package/src/accordion/AccordionSectionHeader.tsx +2 -3
- package/src/accordion/AccordionSectionHeading.tsx +2 -3
- package/src/accordion/AccordionSectionSummary.tsx +2 -3
- package/src/back-link/BackLink.tsx +2 -3
- package/src/breadcrumbs/BreadcrumbItem.tsx +2 -3
- package/src/breadcrumbs/Breadcrumbs.tsx +2 -3
- package/src/button/Button.tsx +2 -3
- package/src/button-group/ButtonGroup.tsx +2 -3
- package/src/card/Card.tsx +2 -3
- package/src/card/CardContent.tsx +2 -3
- package/src/card/CardGroup.tsx +2 -3
- package/src/card/CardHeading.tsx +2 -3
- package/src/card/CardIcon.tsx +2 -3
- package/src/card/CardLink.tsx +2 -3
- package/src/character-count/CharacterCount.tsx +2 -3
- package/src/character-count/CharacterCountMessage.tsx +2 -3
- package/src/checkboxes/CheckboxConditional.tsx +2 -3
- package/src/checkboxes/CheckboxDivider.tsx +1 -2
- package/src/checkboxes/CheckboxInput.tsx +3 -2
- package/src/checkboxes/CheckboxItem.tsx +2 -3
- package/src/checkboxes/CheckboxLabel.tsx +2 -3
- package/src/checkboxes/Checkboxes.tsx +2 -3
- package/src/contents-panel/ContentsPanel.tsx +2 -3
- package/src/contents-panel/ContentsPanelItem.tsx +2 -3
- package/src/contents-panel/ContentsPanelList.tsx +2 -3
- package/src/contents-panel/ContentsPanelListHeading.tsx +2 -3
- package/src/cookie-banner/CookieBanner.tsx +2 -3
- package/src/cookie-banner/CookieBannerActions.tsx +2 -3
- package/src/cookie-banner/CookieBannerContent.tsx +2 -3
- package/src/cookie-banner/CookieBannerHeading.tsx +2 -3
- package/src/cookie-banner/CookieBannerMessage.tsx +2 -3
- package/src/date-input/DateInput.tsx +2 -3
- package/src/date-input/DateInputField.tsx +5 -4
- package/src/date-input/DateInputItem.tsx +2 -3
- package/src/details/Details.tsx +2 -3
- package/src/details/DetailsSummary.tsx +2 -3
- package/src/details/DetailsText.tsx +2 -3
- package/src/error-message/ErrorMessage.tsx +2 -3
- package/src/error-summary/ErrorSummary.tsx +2 -3
- package/src/error-summary/ErrorSummaryBody.tsx +2 -3
- package/src/error-summary/ErrorSummaryItem.tsx +2 -3
- package/src/error-summary/ErrorSummaryList.tsx +2 -3
- package/src/error-summary/ErrorSummaryTitle.tsx +2 -3
- package/src/exit-this-page/ExitThisPage.tsx +2 -3
- package/src/feedback/Feedback.tsx +2 -3
- package/src/fieldset/Fieldset.tsx +2 -3
- package/src/fieldset/FieldsetLegend.tsx +2 -3
- package/src/file-upload/FileUpload.tsx +3 -2
- package/src/footer/Footer.tsx +2 -3
- package/src/form-group/FormGroup.tsx +2 -3
- package/src/govuk-footer/GovukFooter.tsx +2 -3
- package/src/govuk-header/GovukHeader.tsx +3 -2
- package/src/header/Header.tsx +2 -3
- package/src/hint/Hint.tsx +2 -3
- package/src/input/Input.tsx +5 -4
- package/src/input-label/InputLabel.tsx +2 -3
- package/src/inset-text/InsetText.tsx +2 -3
- package/src/label/Label.tsx +2 -3
- package/src/language-navigation/LanguageNavigation.tsx +2 -3
- package/src/language-navigation/LanguageNavigationItem.tsx +2 -3
- package/src/link/Link.tsx +2 -3
- package/src/list/List.tsx +2 -3
- package/src/list/ListItem.tsx +2 -3
- package/src/notification-banner/NotificationBanner.tsx +2 -3
- package/src/notification-banner/NotificationBannerContent.tsx +2 -3
- package/src/notification-banner/NotificationBannerHeader.tsx +2 -3
- package/src/notification-banner/NotificationBannerHeading.tsx +2 -3
- package/src/notification-banner/NotificationBannerTitle.tsx +2 -3
- package/src/pagination/Pagination.tsx +2 -3
- package/src/pagination/PaginationItem.tsx +2 -3
- package/src/pagination/PaginationList.tsx +2 -3
- package/src/pagination/PaginationNext.tsx +2 -3
- package/src/pagination/PaginationPrev.tsx +2 -3
- package/src/panel/Panel.tsx +2 -3
- package/src/panel/PanelActions.tsx +2 -3
- package/src/panel/PanelBody.tsx +2 -3
- package/src/panel/PanelTitle.tsx +2 -3
- package/src/password-input/PasswordInput.tsx +2 -3
- package/src/phase-banner/PhaseBanner.tsx +2 -3
- package/src/phase-banner/PhaseBannerText.tsx +2 -3
- package/src/radios/RadioConditional.tsx +2 -3
- package/src/radios/RadioDivider.tsx +1 -2
- package/src/radios/RadioInput.tsx +3 -2
- package/src/radios/RadioItem.tsx +2 -3
- package/src/radios/RadioLabel.tsx +2 -3
- package/src/radios/Radios.tsx +2 -3
- package/src/select/Select.tsx +2 -3
- package/src/select/SelectOption.tsx +2 -3
- package/src/service-navigation/ServiceNavigation.tsx +2 -3
- package/src/service-navigation/ServiceNavigationItem.tsx +2 -3
- package/src/side-nav/SideNav.tsx +2 -3
- package/src/side-nav/SideNavItem.tsx +2 -3
- package/src/side-nav/SideNavList.tsx +2 -3
- package/src/side-nav/SideNavSubnavHeading.tsx +2 -3
- package/src/side-nav/SideNavSubnavList.tsx +2 -3
- package/src/side-nav/SideNavTitle.tsx +2 -3
- package/src/skip-link/SkipLink.tsx +2 -3
- package/src/summary-card/SummaryCard.tsx +2 -3
- package/src/summary-card/SummaryCardAction.tsx +2 -3
- package/src/summary-card/SummaryCardActions.tsx +2 -3
- package/src/summary-card/SummaryCardContent.tsx +2 -3
- package/src/summary-card/SummaryCardTitle.tsx +2 -3
- package/src/summary-card/SummaryCardTitleWrapper.tsx +2 -3
- package/src/summary-list/SummaryList.tsx +2 -3
- package/src/summary-list/SummaryListActions.tsx +2 -3
- package/src/summary-list/SummaryListKey.tsx +2 -3
- package/src/summary-list/SummaryListRow.tsx +2 -3
- package/src/summary-list/SummaryListValue.tsx +2 -3
- package/src/table/Table.tsx +2 -3
- package/src/table/TableBody.tsx +2 -3
- package/src/table/TableCaption.tsx +2 -3
- package/src/table/TableCell.tsx +2 -3
- package/src/table/TableHead.tsx +2 -3
- package/src/table/TableHeader.tsx +2 -3
- package/src/table/TableRow.tsx +2 -3
- package/src/tabs/Tab.tsx +2 -3
- package/src/tabs/TabPanel.tsx +2 -3
- package/src/tabs/Tabs.tsx +2 -3
- package/src/tabs/TabsList.tsx +2 -3
- package/src/tabs/TabsTitle.tsx +2 -3
- package/src/tag/Tag.tsx +2 -3
- package/src/task-list/TaskList.tsx +2 -3
- package/src/task-list/TaskListHint.tsx +2 -3
- package/src/task-list/TaskListItem.tsx +2 -3
- package/src/task-list/TaskListLink.tsx +2 -3
- package/src/task-list/TaskListNameAndHint.tsx +2 -3
- package/src/task-list/TaskListStatus.tsx +2 -3
- package/src/textarea/Textarea.tsx +3 -2
- package/src/toggle/Toggle.tsx +3 -2
- package/src/toggle/ToggleItem.tsx +2 -3
- package/src/toggle/ToggleLabel.tsx +2 -3
- 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 ErrorSummaryTitleProps = {
|
|
3
|
+
type ErrorSummaryTitleProps = ComponentPropsWithoutRef<'h2'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function ErrorSummaryTitle({ class: className, children, ...rest }: ErrorSummaryTitleProps) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type ExitThisPageProps = {
|
|
3
|
+
type ExitThisPageProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
4
|
redirectUrl?: string;
|
|
5
5
|
id?: string;
|
|
6
6
|
class?: string;
|
|
7
7
|
children?: ReactNode;
|
|
8
|
-
[key: string]: unknown;
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
export default function ExitThisPage({
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type FeedbackProps = {
|
|
3
|
+
type FeedbackProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
4
|
title?: string;
|
|
5
5
|
class?: string;
|
|
6
6
|
children?: ReactNode;
|
|
7
|
-
[key: string]: unknown;
|
|
8
7
|
};
|
|
9
8
|
|
|
10
9
|
export default function Feedback({ title, class: className, children, ...rest }: FeedbackProps) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type FieldsetProps = {
|
|
3
|
+
type FieldsetProps = ComponentPropsWithoutRef<'fieldset'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function Fieldset({ class: className, children, ...rest }: FieldsetProps) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type FieldsetLegendProps = {
|
|
3
|
+
type FieldsetLegendProps = ComponentPropsWithoutRef<'legend'> & {
|
|
4
4
|
size?: "small" | "medium" | "large" | "xl";
|
|
5
5
|
isPageHeading?: boolean;
|
|
6
6
|
class?: string;
|
|
7
7
|
children?: ReactNode;
|
|
8
|
-
[key: string]: unknown;
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
export default function FieldsetLegend({ size, isPageHeading, class: className, children, ...rest }: FieldsetLegendProps) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
type
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
|
|
3
|
+
type FileUploadProps = ComponentPropsWithoutRef<'input'> & {
|
|
2
4
|
class?: string;
|
|
3
|
-
[key: string]: unknown;
|
|
4
5
|
};
|
|
5
6
|
|
|
6
7
|
export default function FileUpload({ class: className, ...rest }: FileUploadProps) {
|
package/src/footer/Footer.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
type FooterLink = { href?: string; text?: string; attributes?: Record<string, string> };
|
|
4
4
|
|
|
5
|
-
type FooterProps = {
|
|
5
|
+
type FooterProps = ComponentPropsWithoutRef<'div'> & {
|
|
6
6
|
/** Support links shown in the inline list (e.g. Accessibility statement, Cookies, Privacy). */
|
|
7
7
|
links?: FooterLink[];
|
|
8
8
|
/** Visually-hidden heading above the support links. */
|
|
@@ -10,7 +10,6 @@ type FooterProps = {
|
|
|
10
10
|
containerClasses?: string;
|
|
11
11
|
class?: string;
|
|
12
12
|
children?: ReactNode;
|
|
13
|
-
[key: string]: unknown;
|
|
14
13
|
};
|
|
15
14
|
|
|
16
15
|
export default function Footer({
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type FormGroupProps = {
|
|
3
|
+
type FormGroupProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
4
|
inline?: boolean;
|
|
5
5
|
class?: string;
|
|
6
6
|
children?: ReactNode;
|
|
7
|
-
[key: string]: unknown;
|
|
8
7
|
};
|
|
9
8
|
|
|
10
9
|
export default function FormGroup({ inline, class: className, children, ...rest }: FormGroupProps) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
function FooterCrown() {
|
|
4
4
|
return (
|
|
@@ -67,14 +67,13 @@ type FooterCopyright = {
|
|
|
67
67
|
content?: ReactNode;
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
type FooterProps = {
|
|
70
|
+
type FooterProps = ComponentPropsWithoutRef<'div'> & {
|
|
71
71
|
navigation?: FooterNav[];
|
|
72
72
|
meta?: FooterMeta;
|
|
73
73
|
contentLicence?: FooterLicence;
|
|
74
74
|
copyright?: FooterCopyright;
|
|
75
75
|
containerClasses?: string;
|
|
76
76
|
class?: string;
|
|
77
|
-
[key: string]: unknown;
|
|
78
77
|
};
|
|
79
78
|
|
|
80
79
|
export default function GovukFooter({
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
|
|
1
3
|
const CROWN_LOGO = `<svg
|
|
2
4
|
focusable="false"
|
|
3
5
|
role="img"
|
|
@@ -21,12 +23,11 @@ const CROWN_LOGO = `<svg
|
|
|
21
23
|
<path d="M93.94 41.25c.4 1.81 1.2 3.21 2.21 4.62 1 1.4 2.21 2.41 3.61 3.21s3.21 1.2 5.22 1.2 3.61-.4 4.82-1c1.4-.6 2.41-1.4 3.21-2.41.8-1 1.4-2.01 1.61-3.01s.4-2.01.4-3.01v.14h-10.86v-7.02h20.07v24.08h-8.03v-5.56c-.6.8-1.38 1.61-2.19 2.41-.8.8-1.81 1.2-2.81 1.81-1 .4-2.21.8-3.41 1.2s-2.41.4-3.81.4a18.56 18.56 0 0 1-14.65-6.63c-1.6-2.01-3.01-4.41-3.81-7.02s-1.4-5.62-1.4-8.83.4-6.02 1.4-8.83a20.45 20.45 0 0 1 19.46-13.65c3.21 0 4.01.2 5.82.8 1.81.4 3.61 1.2 5.02 2.01 1.61.8 2.81 2.01 4.01 3.21s2.21 2.61 2.81 4.21l-7.63 4.41c-.4-1-1-1.81-1.61-2.61-.6-.8-1.4-1.4-2.21-2.01-.8-.6-1.81-1-2.81-1.4-1-.4-2.21-.4-3.61-.4-2.01 0-3.81.4-5.22 1.2-1.4.8-2.61 1.81-3.61 3.21s-1.61 2.81-2.21 4.62c-.4 1.81-.6 3.71-.6 5.42s.8 5.22.8 5.22Zm57.8-27.9c3.21 0 6.22.6 8.63 1.81 2.41 1.2 4.82 2.81 6.62 4.82S170.2 24.39 171 27s1.4 5.62 1.4 8.83-.4 6.02-1.4 8.83-2.41 5.02-4.01 7.02-4.01 3.61-6.62 4.82-5.42 1.81-8.63 1.81-6.22-.6-8.63-1.81-4.82-2.81-6.42-4.82-3.21-4.41-4.01-7.02-1.4-5.62-1.4-8.83.4-6.02 1.4-8.83 2.41-5.02 4.01-7.02 4.01-3.61 6.42-4.82 5.42-1.81 8.63-1.81Zm0 36.73c1.81 0 3.61-.4 5.02-1s2.61-1.81 3.61-3.01 1.81-2.81 2.21-4.41c.4-1.81.8-3.61.8-5.62 0-2.21-.2-4.21-.8-6.02s-1.2-3.21-2.21-4.62c-1-1.2-2.21-2.21-3.61-3.01s-3.21-1-5.02-1-3.61.4-5.02 1c-1.4.8-2.61 1.81-3.61 3.01s-1.81 2.81-2.21 4.62c-.4 1.81-.8 3.61-.8 5.62 0 2.41.2 4.21.8 6.02.4 1.81 1.2 3.21 2.21 4.41s2.21 2.21 3.61 3.01c1.4.8 3.21 1 5.02 1Zm36.32 7.96-12.24-44.15h9.83l8.43 32.77h.4l8.23-32.77h9.83L200.3 58.04h-12.24Zm74.14-7.96c2.18 0 3.51-.6 3.51-.6 1.2-.6 2.01-1 2.81-1.81s1.4-1.81 1.81-2.81a13 13 0 0 0 .8-4.01V13.9h8.63v28.15c0 2.41-.4 4.62-1.4 6.62-.8 2.01-2.21 3.61-3.61 5.02s-3.41 2.41-5.62 3.21-4.62 1.2-7.02 1.2-5.02-.4-7.02-1.2c-2.21-.8-4.01-1.81-5.62-3.21s-2.81-3.01-3.61-5.02-1.4-4.21-1.4-6.62V13.9h8.63v26.95c0 1.61.2 3.01.8 4.01.4 1.2 1.2 2.21 2.01 2.81.8.8 1.81 1.4 2.81 1.81 0 0 1.34.6 3.51.6Zm34.22-36.18v18.92l15.65-18.92h10.82l-15.03 17.32 16.03 26.83h-10.21l-11.44-20.21-5.62 6.22v13.99h-8.83V13.9"/>
|
|
22
24
|
</svg>`;
|
|
23
25
|
|
|
24
|
-
type GovukHeaderProps = {
|
|
26
|
+
type GovukHeaderProps = ComponentPropsWithoutRef<'div'> & {
|
|
25
27
|
homepageUrl?: string;
|
|
26
28
|
productName?: string;
|
|
27
29
|
containerClasses?: string;
|
|
28
30
|
class?: string;
|
|
29
|
-
[key: string]: unknown;
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
export default function GovukHeader({
|
package/src/header/Header.tsx
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type HeaderProps = {
|
|
3
|
+
type HeaderProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
4
|
href?: string;
|
|
5
5
|
class?: string;
|
|
6
6
|
containerClasses?: string;
|
|
7
7
|
children?: ReactNode;
|
|
8
|
-
[key: string]: unknown;
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
export default function Header({ href, class: className, containerClasses, children, ...rest }: HeaderProps) {
|
package/src/hint/Hint.tsx
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type HintProps = {
|
|
3
|
+
type HintProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function Hint({ class: className, children, ...rest }: HintProps) {
|
package/src/input/Input.tsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
type
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
|
|
3
|
+
type InputProps = Omit<ComponentPropsWithoutRef<'input'>, 'width'> & {
|
|
2
4
|
error?: boolean;
|
|
3
5
|
extraLetterSpacing?: boolean;
|
|
4
6
|
subtle?: boolean;
|
|
5
|
-
width?:
|
|
7
|
+
width?: 2 | 3 | 4 | 5 | 10 | 20 | 30;
|
|
6
8
|
class?: string;
|
|
7
|
-
[key: string]: unknown;
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
export default function Input({ error, extraLetterSpacing, subtle, width, class: className, ...rest }: InputProps) {
|
|
@@ -13,7 +14,7 @@ export default function Input({ error, extraLetterSpacing, subtle, width, class:
|
|
|
13
14
|
error ? "govuk-input--error" : "",
|
|
14
15
|
extraLetterSpacing ? "govuk-input--extra-letter-spacing" : "",
|
|
15
16
|
subtle ? "govuk-input--subtle" : "",
|
|
16
|
-
(width ? {
|
|
17
|
+
(width ? { 2: "govuk-input--width-2", 3: "govuk-input--width-3", 4: "govuk-input--width-4", 5: "govuk-input--width-5", 10: "govuk-input--width-10", 20: "govuk-input--width-20", 30: "govuk-input--width-30" }[width] : ""),
|
|
17
18
|
className ?? "",
|
|
18
19
|
]
|
|
19
20
|
.filter(Boolean)
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type InputLabelProps = {
|
|
3
|
+
type InputLabelProps = ComponentPropsWithoutRef<'label'> & {
|
|
4
4
|
size?: "small" | "medium" | "large" | "xl";
|
|
5
5
|
class?: string;
|
|
6
6
|
children?: ReactNode;
|
|
7
|
-
[key: string]: unknown;
|
|
8
7
|
};
|
|
9
8
|
|
|
10
9
|
export default function InputLabel({ size, class: className, children, ...rest }: InputLabelProps) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type InsetTextProps = {
|
|
3
|
+
type InsetTextProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function InsetText({ class: className, children, ...rest }: InsetTextProps) {
|
package/src/label/Label.tsx
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type LabelProps = {
|
|
3
|
+
type LabelProps = ComponentPropsWithoutRef<'label'> & {
|
|
4
4
|
size?: "small" | "medium" | "large" | "xl";
|
|
5
5
|
isPageHeading?: boolean;
|
|
6
6
|
class?: string;
|
|
7
7
|
children?: ReactNode;
|
|
8
|
-
[key: string]: unknown;
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
export default function Label({ size, isPageHeading = false, class: className, children, ...rest }: LabelProps) {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type LanguageNavigationProps = {
|
|
3
|
+
type LanguageNavigationProps = ComponentPropsWithoutRef<'nav'> & {
|
|
4
4
|
ariaLabel?: string;
|
|
5
5
|
class?: string;
|
|
6
6
|
children?: ReactNode;
|
|
7
|
-
[key: string]: unknown;
|
|
8
7
|
};
|
|
9
8
|
|
|
10
9
|
export default function LanguageNavigation({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type LanguageNavigationItemProps = {
|
|
3
|
+
type LanguageNavigationItemProps = Omit<ComponentPropsWithoutRef<'span'> & ComponentPropsWithoutRef<'a'>, 'href' | 'dir'> & {
|
|
4
4
|
href?: string;
|
|
5
5
|
current?: boolean;
|
|
6
6
|
lang?: string;
|
|
@@ -10,7 +10,6 @@ type LanguageNavigationItemProps = {
|
|
|
10
10
|
/** Visually-hidden description appended to a link item. */
|
|
11
11
|
languageDescriptionText?: string;
|
|
12
12
|
children?: ReactNode;
|
|
13
|
-
[key: string]: unknown;
|
|
14
13
|
};
|
|
15
14
|
|
|
16
15
|
export default function LanguageNavigationItem({
|
package/src/link/Link.tsx
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type LinkProps = {
|
|
3
|
+
type LinkProps = ComponentPropsWithoutRef<'a'> & {
|
|
4
4
|
noUnderline?: boolean;
|
|
5
5
|
noVisitedState?: boolean;
|
|
6
6
|
variant?: "warning" | "inverse";
|
|
7
7
|
class?: string;
|
|
8
8
|
children?: ReactNode;
|
|
9
|
-
[key: string]: unknown;
|
|
10
9
|
};
|
|
11
10
|
|
|
12
11
|
export default function Link({ noUnderline, noVisitedState, variant, class: className, children, ...rest }: LinkProps) {
|
package/src/list/List.tsx
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type ListProps = {
|
|
3
|
+
type ListProps = ComponentPropsWithoutRef<'ol'> & ComponentPropsWithoutRef<'ul'> & {
|
|
4
4
|
spaced?: boolean;
|
|
5
5
|
numbered?: string;
|
|
6
6
|
class?: string;
|
|
7
7
|
children?: ReactNode;
|
|
8
|
-
[key: string]: unknown;
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
export default function List({ spaced, numbered, class: className, children, ...rest }: ListProps) {
|
package/src/list/ListItem.tsx
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type ListItemProps = {
|
|
3
|
+
type ListItemProps = ComponentPropsWithoutRef<'li'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function ListItem({ class: className, children, ...rest }: ListItemProps) {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type NotificationBannerProps = {
|
|
3
|
+
type NotificationBannerProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
4
|
success?: string;
|
|
5
5
|
class?: string;
|
|
6
6
|
children?: ReactNode;
|
|
7
|
-
[key: string]: unknown;
|
|
8
7
|
};
|
|
9
8
|
|
|
10
9
|
export default function NotificationBanner({ success, class: className, children, ...rest }: NotificationBannerProps) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type NotificationBannerContentProps = {
|
|
3
|
+
type NotificationBannerContentProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function NotificationBannerContent({ class: className, children, ...rest }: NotificationBannerContentProps) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type NotificationBannerHeaderProps = {
|
|
3
|
+
type NotificationBannerHeaderProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function NotificationBannerHeader({ class: className, children, ...rest }: NotificationBannerHeaderProps) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type NotificationBannerHeadingProps = {
|
|
3
|
+
type NotificationBannerHeadingProps = ComponentPropsWithoutRef<'p'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function NotificationBannerHeading({ class: className, children, ...rest }: NotificationBannerHeadingProps) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type NotificationBannerTitleProps = {
|
|
3
|
+
type NotificationBannerTitleProps = ComponentPropsWithoutRef<'h2'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function NotificationBannerTitle({ class: className, children, ...rest }: NotificationBannerTitleProps) {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type PaginationProps = {
|
|
3
|
+
type PaginationProps = ComponentPropsWithoutRef<'nav'> & {
|
|
4
4
|
block?: boolean;
|
|
5
5
|
class?: string;
|
|
6
6
|
children?: ReactNode;
|
|
7
|
-
[key: string]: unknown;
|
|
8
7
|
};
|
|
9
8
|
|
|
10
9
|
export default function Pagination({ block, class: className, children, ...rest }: PaginationProps) {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type PaginationItemProps = {
|
|
3
|
+
type PaginationItemProps = ComponentPropsWithoutRef<'a'> & {
|
|
4
4
|
current?: boolean;
|
|
5
5
|
ellipsis?: boolean;
|
|
6
6
|
/** aria-label for the page link (e.g. "Page 2"). */
|
|
7
7
|
ariaLabel?: string;
|
|
8
8
|
class?: string;
|
|
9
9
|
children?: ReactNode;
|
|
10
|
-
[key: string]: unknown;
|
|
11
10
|
};
|
|
12
11
|
|
|
13
12
|
export default function PaginationItem({ current, ellipsis, ariaLabel, class: className, children, ...rest }: PaginationItemProps) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type PaginationListProps = {
|
|
3
|
+
type PaginationListProps = ComponentPropsWithoutRef<'ul'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function PaginationList({ class: className, children, ...rest }: PaginationListProps) {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type PaginationNextProps = {
|
|
3
|
+
type PaginationNextProps = ComponentPropsWithoutRef<'a'> & {
|
|
4
4
|
/** Block-level layout (no numbered items, just prev/next). */
|
|
5
5
|
block?: boolean;
|
|
6
6
|
/** Descriptive label shown alongside the title (block layout only). */
|
|
7
7
|
labelText?: string;
|
|
8
8
|
class?: string;
|
|
9
9
|
children?: ReactNode;
|
|
10
|
-
[key: string]: unknown;
|
|
11
10
|
};
|
|
12
11
|
|
|
13
12
|
const arrow = (
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type PaginationPrevProps = {
|
|
3
|
+
type PaginationPrevProps = ComponentPropsWithoutRef<'a'> & {
|
|
4
4
|
/** Block-level layout (no numbered items, just prev/next). */
|
|
5
5
|
block?: boolean;
|
|
6
6
|
/** Descriptive label shown alongside the title (block layout only). */
|
|
7
7
|
labelText?: string;
|
|
8
8
|
class?: string;
|
|
9
9
|
children?: ReactNode;
|
|
10
|
-
[key: string]: unknown;
|
|
11
10
|
};
|
|
12
11
|
|
|
13
12
|
const arrow = (
|
package/src/panel/Panel.tsx
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type PanelProps = {
|
|
3
|
+
type PanelProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function Panel({ class: className, children, ...rest }: PanelProps) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type PanelActionsProps = {
|
|
3
|
+
type PanelActionsProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function PanelActions({ class: className, children, ...rest }: PanelActionsProps) {
|
package/src/panel/PanelBody.tsx
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type PanelBodyProps = {
|
|
3
|
+
type PanelBodyProps = ComponentPropsWithoutRef<'div'> & {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
[key: string]: unknown;
|
|
7
6
|
};
|
|
8
7
|
|
|
9
8
|
export default function PanelBody({ class: className, children, ...rest }: PanelBodyProps) {
|
package/src/panel/PanelTitle.tsx
CHANGED
|
@@ -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
|
|
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) {
|
package/src/radios/RadioItem.tsx
CHANGED
|
@@ -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) {
|