govuk-react 0.10.6 → 1.0.0-alpha.0
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/LICENSE +21 -0
- package/README.md +45 -52
- package/dist/accordion.d.ts +4 -0
- package/dist/accordion.js +4 -0
- package/dist/accordion.js.map +1 -0
- package/dist/back-link.d.ts +21 -0
- package/dist/back-link.js +4 -0
- package/dist/back-link.js.map +1 -0
- package/dist/body.d.ts +1 -0
- package/dist/body.js +4 -0
- package/dist/body.js.map +1 -0
- package/dist/breadcrumbs.d.ts +1 -0
- package/dist/breadcrumbs.js +3 -0
- package/dist/breadcrumbs.js.map +1 -0
- package/dist/button.d.ts +26 -0
- package/dist/button.js +4 -0
- package/dist/button.js.map +1 -0
- package/dist/caption.d.ts +1 -0
- package/dist/caption.js +4 -0
- package/dist/caption.js.map +1 -0
- package/dist/character-count.d.ts +4 -0
- package/dist/character-count.js +4 -0
- package/dist/character-count.js.map +1 -0
- package/dist/checkboxes.d.ts +3 -0
- package/dist/checkboxes.js +4 -0
- package/dist/checkboxes.js.map +1 -0
- package/dist/chunk-2KPHO7N2.js +3 -0
- package/dist/chunk-2KPHO7N2.js.map +1 -0
- package/dist/chunk-2W35PR6E.js +3 -0
- package/dist/chunk-2W35PR6E.js.map +1 -0
- package/dist/chunk-57K6B6V2.js +38 -0
- package/dist/chunk-57K6B6V2.js.map +1 -0
- package/dist/chunk-5RYJUAI3.js +3 -0
- package/dist/chunk-5RYJUAI3.js.map +1 -0
- package/dist/chunk-5YT2PQAF.js +3 -0
- package/dist/chunk-5YT2PQAF.js.map +1 -0
- package/dist/chunk-B33BQUXM.js +8 -0
- package/dist/chunk-B33BQUXM.js.map +1 -0
- package/dist/chunk-BAXFWXMR.js +41 -0
- package/dist/chunk-BAXFWXMR.js.map +1 -0
- package/dist/chunk-BDIDAVNV.js +22 -0
- package/dist/chunk-BDIDAVNV.js.map +1 -0
- package/dist/chunk-D6TMELAY.js +3 -0
- package/dist/chunk-D6TMELAY.js.map +1 -0
- package/dist/chunk-DHTWPFZO.js +8 -0
- package/dist/chunk-DHTWPFZO.js.map +1 -0
- package/dist/chunk-DK2FZF7U.js +3 -0
- package/dist/chunk-DK2FZF7U.js.map +1 -0
- package/dist/chunk-EMM6RZT7.js +3 -0
- package/dist/chunk-EMM6RZT7.js.map +1 -0
- package/dist/chunk-EMNBPB3L.js +8 -0
- package/dist/chunk-EMNBPB3L.js.map +1 -0
- package/dist/chunk-FE2OFAA5.js +8 -0
- package/dist/chunk-FE2OFAA5.js.map +1 -0
- package/dist/chunk-FNDQEOKW.js +20 -0
- package/dist/chunk-FNDQEOKW.js.map +1 -0
- package/dist/chunk-HHH5BEO6.js +3 -0
- package/dist/chunk-HHH5BEO6.js.map +1 -0
- package/dist/chunk-HRURRTAU.js +83 -0
- package/dist/chunk-HRURRTAU.js.map +1 -0
- package/dist/chunk-IFETUZ4S.js +3 -0
- package/dist/chunk-IFETUZ4S.js.map +1 -0
- package/dist/chunk-JLNRFYFI.js +3 -0
- package/dist/chunk-JLNRFYFI.js.map +1 -0
- package/dist/chunk-K7VSNNQD.js +8 -0
- package/dist/chunk-K7VSNNQD.js.map +1 -0
- package/dist/chunk-KFWTQTVJ.js +3 -0
- package/dist/chunk-KFWTQTVJ.js.map +1 -0
- package/dist/chunk-L4GCVMBX.js +3 -0
- package/dist/chunk-L4GCVMBX.js.map +1 -0
- package/dist/chunk-L4O7OXGY.js +151 -0
- package/dist/chunk-L4O7OXGY.js.map +1 -0
- package/dist/chunk-LG7D7X4T.js +8 -0
- package/dist/chunk-LG7D7X4T.js.map +1 -0
- package/dist/chunk-M5BQAPSC.js +8 -0
- package/dist/chunk-M5BQAPSC.js.map +1 -0
- package/dist/chunk-NN44HUS7.js +64 -0
- package/dist/chunk-NN44HUS7.js.map +1 -0
- package/dist/chunk-NV2BSK6G.js +3 -0
- package/dist/chunk-NV2BSK6G.js.map +1 -0
- package/dist/chunk-OCGJIH5X.js +159 -0
- package/dist/chunk-OCGJIH5X.js.map +1 -0
- package/dist/chunk-OQVOKH2T.js +8 -0
- package/dist/chunk-OQVOKH2T.js.map +1 -0
- package/dist/chunk-OWBD4KZC.js +115 -0
- package/dist/chunk-OWBD4KZC.js.map +1 -0
- package/dist/chunk-PM2AAFY4.js +35 -0
- package/dist/chunk-PM2AAFY4.js.map +1 -0
- package/dist/chunk-PNMADTQQ.js +3 -0
- package/dist/chunk-PNMADTQQ.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +9 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/chunk-QOWZLJK4.js +3 -0
- package/dist/chunk-QOWZLJK4.js.map +1 -0
- package/dist/chunk-QV7AS734.js +98 -0
- package/dist/chunk-QV7AS734.js.map +1 -0
- package/dist/chunk-RC24GP47.js +8 -0
- package/dist/chunk-RC24GP47.js.map +1 -0
- package/dist/chunk-RIB3ADHK.js +8 -0
- package/dist/chunk-RIB3ADHK.js.map +1 -0
- package/dist/chunk-RODK5NYM.js +3 -0
- package/dist/chunk-RODK5NYM.js.map +1 -0
- package/dist/chunk-SKQVJZMM.js +79 -0
- package/dist/chunk-SKQVJZMM.js.map +1 -0
- package/dist/chunk-SMUQZFJ7.js +179 -0
- package/dist/chunk-SMUQZFJ7.js.map +1 -0
- package/dist/chunk-SVIOO5V5.js +109 -0
- package/dist/chunk-SVIOO5V5.js.map +1 -0
- package/dist/chunk-SYW45KJ5.js +3 -0
- package/dist/chunk-SYW45KJ5.js.map +1 -0
- package/dist/chunk-T56AQZA4.js +3 -0
- package/dist/chunk-T56AQZA4.js.map +1 -0
- package/dist/chunk-TK6FAARU.js +12 -0
- package/dist/chunk-TK6FAARU.js.map +1 -0
- package/dist/chunk-TQOVKJLU.js +78 -0
- package/dist/chunk-TQOVKJLU.js.map +1 -0
- package/dist/chunk-U2FEV65D.js +8 -0
- package/dist/chunk-U2FEV65D.js.map +1 -0
- package/dist/chunk-UHX5TMH6.js +49 -0
- package/dist/chunk-UHX5TMH6.js.map +1 -0
- package/dist/chunk-VB3GA2KO.js +3 -0
- package/dist/chunk-VB3GA2KO.js.map +1 -0
- package/dist/chunk-VGZUAGCQ.js +8 -0
- package/dist/chunk-VGZUAGCQ.js.map +1 -0
- package/dist/chunk-VKUBJY23.js +8 -0
- package/dist/chunk-VKUBJY23.js.map +1 -0
- package/dist/chunk-VQ4FRNV3.js +8 -0
- package/dist/chunk-VQ4FRNV3.js.map +1 -0
- package/dist/chunk-W7RN6ITL.js +8 -0
- package/dist/chunk-W7RN6ITL.js.map +1 -0
- package/dist/chunk-WFHQPUFE.js +3 -0
- package/dist/chunk-WFHQPUFE.js.map +1 -0
- package/dist/chunk-XO7OW5TM.js +3 -0
- package/dist/chunk-XO7OW5TM.js.map +1 -0
- package/dist/chunk-YOBXV2EG.js +101 -0
- package/dist/chunk-YOBXV2EG.js.map +1 -0
- package/dist/chunk-YYDYVLVS.js +47 -0
- package/dist/chunk-YYDYVLVS.js.map +1 -0
- package/dist/chunk-Z4J4DQCF.js +8 -0
- package/dist/chunk-Z4J4DQCF.js.map +1 -0
- package/dist/chunk-ZHHORZMC.js +3 -0
- package/dist/chunk-ZHHORZMC.js.map +1 -0
- package/dist/cookie-banner.d.ts +1 -0
- package/dist/cookie-banner.js +3 -0
- package/dist/cookie-banner.js.map +1 -0
- package/dist/date-input.d.ts +1 -0
- package/dist/date-input.js +3 -0
- package/dist/date-input.js.map +1 -0
- package/dist/details.d.ts +1 -0
- package/dist/details.js +3 -0
- package/dist/details.js.map +1 -0
- package/dist/document-footer-metadata.d.ts +2 -0
- package/dist/document-footer-metadata.js +4 -0
- package/dist/document-footer-metadata.js.map +1 -0
- package/dist/error-message.d.ts +1 -0
- package/dist/error-message.js +4 -0
- package/dist/error-message.js.map +1 -0
- package/dist/error-summary.d.ts +3 -0
- package/dist/error-summary.js +4 -0
- package/dist/error-summary.js.map +1 -0
- package/dist/exit-this-page.d.ts +4 -0
- package/dist/exit-this-page.js +4 -0
- package/dist/exit-this-page.js.map +1 -0
- package/dist/feedback.d.ts +1 -0
- package/dist/feedback.js +3 -0
- package/dist/feedback.js.map +1 -0
- package/dist/fieldset.d.ts +1 -0
- package/dist/fieldset.js +3 -0
- package/dist/fieldset.js.map +1 -0
- package/dist/file-upload.d.ts +90 -0
- package/dist/file-upload.js +4 -0
- package/dist/file-upload.js.map +1 -0
- package/dist/footer.d.ts +1 -0
- package/dist/footer.js +3 -0
- package/dist/footer.js.map +1 -0
- package/dist/form-group.d.ts +1 -0
- package/dist/form-group.js +4 -0
- package/dist/form-group.js.map +1 -0
- package/dist/generic-header.d.ts +1 -0
- package/dist/generic-header.js +3 -0
- package/dist/generic-header.js.map +1 -0
- package/dist/grid-column.d.ts +1 -0
- package/dist/grid-column.js +4 -0
- package/dist/grid-column.js.map +1 -0
- package/dist/grid-row.d.ts +1 -0
- package/dist/grid-row.js +4 -0
- package/dist/grid-row.js.map +1 -0
- package/dist/header.d.ts +1 -0
- package/dist/header.js +3 -0
- package/dist/header.js.map +1 -0
- package/dist/heading.d.ts +1 -0
- package/dist/heading.js +4 -0
- package/dist/heading.js.map +1 -0
- package/dist/hint.d.ts +1 -0
- package/dist/hint.js +4 -0
- package/dist/hint.js.map +1 -0
- package/dist/index-7cuUiEo3.d.ts +98 -0
- package/dist/index-B8fw-F9t.d.ts +22 -0
- package/dist/index-BBckYYWt.d.ts +131 -0
- package/dist/index-BOPiKua4.d.ts +61 -0
- package/dist/index-BOfUYry5.d.ts +22 -0
- package/dist/index-BP18qbj1.d.ts +22 -0
- package/dist/index-BQaNJq4d.d.ts +22 -0
- package/dist/index-BnYaP7AC.d.ts +57 -0
- package/dist/index-C-c5LroN.d.ts +22 -0
- package/dist/index-CAxOsfPr.d.ts +22 -0
- package/dist/index-CHKQTetM.d.ts +52 -0
- package/dist/index-CWRQhs3p.d.ts +55 -0
- package/dist/index-CidkuScr.d.ts +22 -0
- package/dist/index-D-5h70y_.d.ts +22 -0
- package/dist/index-DDvVZ8mX.d.ts +22 -0
- package/dist/index-DQaFKwpy.d.ts +106 -0
- package/dist/index-DWibEGiF.d.ts +22 -0
- package/dist/index-D_wOwhn9.d.ts +127 -0
- package/dist/index-DhPVSZNZ.d.ts +40 -0
- package/dist/index-DhjWVeDK.d.ts +22 -0
- package/dist/index-DnvlWvry.d.ts +54 -0
- package/dist/index-Dr0S9iUZ.d.ts +22 -0
- package/dist/index-Dw9RbQVO.d.ts +22 -0
- package/dist/index-MxQB65RM.d.ts +48 -0
- package/dist/index-RZtIJBvk.d.ts +22 -0
- package/dist/index-TgEbRgDh.d.ts +22 -0
- package/dist/index-a8sYZpTj.d.ts +77 -0
- package/dist/index-rQaOtoWF.d.ts +59 -0
- package/dist/index-trAlT6HP.d.ts +22 -0
- package/dist/index-vBukON0x.d.ts +50 -0
- package/dist/index.d.ts +94 -0
- package/dist/index.js +61 -0
- package/dist/index.js.map +1 -0
- package/dist/input.d.ts +1 -0
- package/dist/input.js +3 -0
- package/dist/input.js.map +1 -0
- package/dist/inset-text.d.ts +1 -0
- package/dist/inset-text.js +4 -0
- package/dist/inset-text.js.map +1 -0
- package/dist/label.d.ts +1 -0
- package/dist/label.js +4 -0
- package/dist/label.js.map +1 -0
- package/dist/language-navigation.d.ts +1 -0
- package/dist/language-navigation.js +3 -0
- package/dist/language-navigation.js.map +1 -0
- package/dist/link.d.ts +1 -0
- package/dist/link.js +4 -0
- package/dist/link.js.map +1 -0
- package/dist/list.d.ts +1 -0
- package/dist/list.js +4 -0
- package/dist/list.js.map +1 -0
- package/dist/loading-box.d.ts +39 -0
- package/dist/loading-box.js +4 -0
- package/dist/loading-box.js.map +1 -0
- package/dist/main-wrapper.d.ts +1 -0
- package/dist/main-wrapper.js +4 -0
- package/dist/main-wrapper.js.map +1 -0
- package/dist/modal.d.ts +4 -0
- package/dist/modal.js +4 -0
- package/dist/modal.js.map +1 -0
- package/dist/notification-banner.d.ts +3 -0
- package/dist/notification-banner.js +4 -0
- package/dist/notification-banner.js.map +1 -0
- package/dist/page.d.ts +27 -0
- package/dist/page.js +7 -0
- package/dist/page.js.map +1 -0
- package/dist/pagination.d.ts +1 -0
- package/dist/pagination.js +3 -0
- package/dist/pagination.js.map +1 -0
- package/dist/panel.d.ts +1 -0
- package/dist/panel.js +3 -0
- package/dist/panel.js.map +1 -0
- package/dist/password-input.d.ts +4 -0
- package/dist/password-input.js +4 -0
- package/dist/password-input.js.map +1 -0
- package/dist/phase-banner.d.ts +1 -0
- package/dist/phase-banner.js +3 -0
- package/dist/phase-banner.js.map +1 -0
- package/dist/radios.d.ts +3 -0
- package/dist/radios.js +4 -0
- package/dist/radios.js.map +1 -0
- package/dist/related-items.d.ts +2 -0
- package/dist/related-items.js +4 -0
- package/dist/related-items.js.map +1 -0
- package/dist/search-box.d.ts +3 -0
- package/dist/search-box.js +4 -0
- package/dist/search-box.js.map +1 -0
- package/dist/section-break.d.ts +1 -0
- package/dist/section-break.js +4 -0
- package/dist/section-break.js.map +1 -0
- package/dist/select.d.ts +1 -0
- package/dist/select.js +3 -0
- package/dist/select.js.map +1 -0
- package/dist/service-navigation.d.ts +4 -0
- package/dist/service-navigation.js +4 -0
- package/dist/service-navigation.js.map +1 -0
- package/dist/skip-link.d.ts +16 -0
- package/dist/skip-link.js +4 -0
- package/dist/skip-link.js.map +1 -0
- package/dist/summary-list.d.ts +1 -0
- package/dist/summary-list.js +3 -0
- package/dist/summary-list.js.map +1 -0
- package/dist/table.d.ts +1 -0
- package/dist/table.js +3 -0
- package/dist/table.js.map +1 -0
- package/dist/tabs.d.ts +3 -0
- package/dist/tabs.js +4 -0
- package/dist/tabs.js.map +1 -0
- package/dist/tag.d.ts +1 -0
- package/dist/tag.js +4 -0
- package/dist/tag.js.map +1 -0
- package/dist/task-list.d.ts +1 -0
- package/dist/task-list.js +3 -0
- package/dist/task-list.js.map +1 -0
- package/dist/textarea.d.ts +1 -0
- package/dist/textarea.js +3 -0
- package/dist/textarea.js.map +1 -0
- package/dist/visually-hidden.d.ts +1 -0
- package/dist/visually-hidden.js +4 -0
- package/dist/visually-hidden.js.map +1 -0
- package/dist/warning-text.d.ts +1 -0
- package/dist/warning-text.js +3 -0
- package/dist/warning-text.js.map +1 -0
- package/dist/width-container.d.ts +1 -0
- package/dist/width-container.js +4 -0
- package/dist/width-container.js.map +1 -0
- package/package.json +38 -66
- package/dist/declarations/src/index.d.ts +0 -52
- package/dist/govuk-react.cjs.d.ts +0 -2
- package/dist/govuk-react.cjs.d.ts.map +0 -1
- package/dist/govuk-react.cjs.dev.js +0 -351
- package/dist/govuk-react.cjs.js +0 -7
- package/dist/govuk-react.cjs.prod.js +0 -351
- package/dist/govuk-react.esm.js +0 -51
- package/src/index.ts +0 -56
- package/src/test.tsx +0 -56
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"form-group.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'govuk-frontend-react/generic-header';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"generic-header.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GridColumn, GridColumnProps } from 'govuk-frontend-react/grid';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"grid-column.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GridRow, GridRowProps } from 'govuk-frontend-react/grid';
|
package/dist/grid-row.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"grid-row.js"}
|
package/dist/header.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'govuk-frontend-react/header';
|
package/dist/header.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"header.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Heading, HeadingProps } from 'govuk-frontend-react/heading';
|
package/dist/heading.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"heading.js"}
|
package/dist/hint.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Hint, HintProps } from 'govuk-frontend-react/hint';
|
package/dist/hint.js
ADDED
package/dist/hint.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"hint.js"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import * as Primitives from '@govuk-react/primitives/accordion';
|
|
4
|
+
import * as Markup from 'govuk-frontend-react/accordion';
|
|
5
|
+
import { SectionHeader, SectionHeaderProps, SectionHeading, SectionHeadingProps } from 'govuk-frontend-react/accordion';
|
|
6
|
+
|
|
7
|
+
type RootProps = Omit<Markup.RootProps, 'defaultValue' | 'onChange'> & {
|
|
8
|
+
/** The open sections' values, to control them once hydrated. */
|
|
9
|
+
value?: string[];
|
|
10
|
+
/** The sections open at first. */
|
|
11
|
+
defaultValue?: string[];
|
|
12
|
+
/** Called with the open sections' values when the user opens or closes a section. */
|
|
13
|
+
onValueChange?: (value: string[]) => void;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The accordion component lets users show and hide sections of related content on a page.
|
|
17
|
+
*
|
|
18
|
+
* @see https://design-system.service.gov.uk/components/accordion/
|
|
19
|
+
*/
|
|
20
|
+
declare function Root({ value, defaultValue, onValueChange, rememberExpanded, hideAllSectionsText, hideSectionText, hideSectionAriaLabelText, showAllSectionsText, showSectionText, showSectionAriaLabelText, ...props }: RootProps): React.JSX.Element;
|
|
21
|
+
type ControlsProps = Omit<Primitives.ControlsProps, 'asChild' | 'children'>;
|
|
22
|
+
/** The "Show all sections" button, at the top of the accordion. Hidden until JavaScript runs. */
|
|
23
|
+
declare function Controls({ className, ...props }: ControlsProps): React.JSX.Element;
|
|
24
|
+
type SectionProps = Markup.SectionProps & {
|
|
25
|
+
/** Identifies the section in the accordion's `value`. */
|
|
26
|
+
value: string;
|
|
27
|
+
};
|
|
28
|
+
declare function Section({ value, expanded, ...props }: SectionProps): React.JSX.Element;
|
|
29
|
+
|
|
30
|
+
type SectionButtonProps = Markup.SectionButtonProps & {
|
|
31
|
+
/** The section's summary line, which the button also shows once JavaScript runs. */
|
|
32
|
+
summary?: ReactNode;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* The section's heading text. Without JavaScript it's plain text. Once JavaScript runs it's a
|
|
36
|
+
* button that shows and hides the section, holding the heading and `summary`.
|
|
37
|
+
*/
|
|
38
|
+
declare function SectionButton({ summary, children, ...props }: SectionButtonProps): React.JSX.Element;
|
|
39
|
+
type SectionSummaryProps = Markup.SectionSummaryProps;
|
|
40
|
+
/** The section's summary line without JavaScript. Once JavaScript runs, `SectionButton` shows it. */
|
|
41
|
+
declare function SectionSummary(props: SectionSummaryProps): React.JSX.Element;
|
|
42
|
+
type SectionContentProps = Markup.SectionContentProps;
|
|
43
|
+
/** The section's content. Give it an id, which the button's `aria-controls` names. */
|
|
44
|
+
declare function SectionContent(props: SectionContentProps): React.JSX.Element;
|
|
45
|
+
type SectionCompositeProps = Omit<Markup.SectionCompositeProps, 'expanded'> & {
|
|
46
|
+
/** Identifies the section in the accordion's `value`. Defaults to its content's id. */
|
|
47
|
+
value?: string;
|
|
48
|
+
/** Sets whether the section should be expanded when the page loads for the first time. Defaults to whether the accordion's value includes it. */
|
|
49
|
+
expanded?: boolean;
|
|
50
|
+
};
|
|
51
|
+
declare function SectionComposite({ accordionId, index, heading, summary, headingLevel, value, children, ...props }: SectionCompositeProps): React.JSX.Element;
|
|
52
|
+
type CompositeProps = Omit<RootProps, 'id' | 'children'> & Pick<Markup.SectionHeadingProps, 'headingLevel'> & {
|
|
53
|
+
/** Must be unique across the domain of your service if `rememberExpanded` is `true` (as the expanded state of individual instances of the component persists across page loads using [session storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)). Used as an `id` in the HTML for the accordion as a whole, and also as a prefix for the `id`s of the section contents and the buttons that open them, so that those `id`s can be the target of `aria-control` attributes. */
|
|
54
|
+
id: string;
|
|
55
|
+
} & ({
|
|
56
|
+
children?: ReactNode;
|
|
57
|
+
sections?: never;
|
|
58
|
+
} | {
|
|
59
|
+
children?: never;
|
|
60
|
+
/** Prefer children, which memoise and re-render better. */
|
|
61
|
+
sections: Omit<SectionCompositeProps, 'accordionId' | 'index' | 'headingLevel'>[];
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* The accordion component lets users show and hide sections of related content on a page.
|
|
65
|
+
*
|
|
66
|
+
* Children are `SectionComposite`s. With `sections`, it fills in their ids and heading level.
|
|
67
|
+
*
|
|
68
|
+
* @see https://design-system.service.gov.uk/components/accordion/
|
|
69
|
+
*/
|
|
70
|
+
declare function Composite({ id, headingLevel, sections, children, ...props }: CompositeProps): React.JSX.Element;
|
|
71
|
+
|
|
72
|
+
declare const index_Composite: typeof Composite;
|
|
73
|
+
type index_CompositeProps = CompositeProps;
|
|
74
|
+
declare const index_Controls: typeof Controls;
|
|
75
|
+
type index_ControlsProps = ControlsProps;
|
|
76
|
+
declare const index_Root: typeof Root;
|
|
77
|
+
type index_RootProps = RootProps;
|
|
78
|
+
declare const index_Section: typeof Section;
|
|
79
|
+
declare const index_SectionButton: typeof SectionButton;
|
|
80
|
+
type index_SectionButtonProps = SectionButtonProps;
|
|
81
|
+
declare const index_SectionComposite: typeof SectionComposite;
|
|
82
|
+
type index_SectionCompositeProps = SectionCompositeProps;
|
|
83
|
+
declare const index_SectionContent: typeof SectionContent;
|
|
84
|
+
type index_SectionContentProps = SectionContentProps;
|
|
85
|
+
declare const index_SectionHeader: typeof SectionHeader;
|
|
86
|
+
declare const index_SectionHeaderProps: typeof SectionHeaderProps;
|
|
87
|
+
declare const index_SectionHeading: typeof SectionHeading;
|
|
88
|
+
declare const index_SectionHeadingProps: typeof SectionHeadingProps;
|
|
89
|
+
type index_SectionProps = SectionProps;
|
|
90
|
+
declare const index_SectionSummary: typeof SectionSummary;
|
|
91
|
+
type index_SectionSummaryProps = SectionSummaryProps;
|
|
92
|
+
declare namespace index {
|
|
93
|
+
export { index_Composite as Composite, index_Controls as Controls, index_Root as Root, index_Section as Section, index_SectionButton as SectionButton, index_SectionComposite as SectionComposite, index_SectionContent as SectionContent, index_SectionHeader as SectionHeader, index_SectionHeaderProps as SectionHeaderProps, index_SectionHeading as SectionHeading, index_SectionHeadingProps as SectionHeadingProps, index_SectionSummary as SectionSummary };
|
|
94
|
+
export type { index_CompositeProps as CompositeProps, index_ControlsProps as ControlsProps, index_RootProps as RootProps, index_SectionButtonProps as SectionButtonProps, index_SectionCompositeProps as SectionCompositeProps, index_SectionContentProps as SectionContentProps, index_SectionProps as SectionProps, index_SectionSummaryProps as SectionSummaryProps };
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export { Composite as C, Root as R, Section as S, Controls as b, SectionButton as e, SectionComposite as g, index as i, SectionContent as j, SectionSummary as m };
|
|
98
|
+
export type { CompositeProps as a, ControlsProps as c, RootProps as d, SectionButtonProps as f, SectionCompositeProps as h, SectionContentProps as k, SectionProps as l, SectionSummaryProps as n };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as pagination from 'govuk-frontend-react/pagination';
|
|
2
|
+
|
|
3
|
+
function _mergeNamespaces(n, m) {
|
|
4
|
+
m.forEach(function (e) {
|
|
5
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
6
|
+
if (k !== 'default' && !(k in n)) {
|
|
7
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
8
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return e[k]; }
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
return Object.freeze(n);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var index = /*#__PURE__*/_mergeNamespaces({
|
|
19
|
+
__proto__: null
|
|
20
|
+
}, [pagination]);
|
|
21
|
+
|
|
22
|
+
export { index as i };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import * as Markup from 'govuk-frontend-react/tabs';
|
|
4
|
+
import { Title, TitleProps } from 'govuk-frontend-react/tabs';
|
|
5
|
+
|
|
6
|
+
type BaseRootProps = Omit<Markup.RootProps, 'defaultValue' | 'onChange'> & {
|
|
7
|
+
/** Called when the user selects a tab. */
|
|
8
|
+
onValueChange?: (value: string) => void;
|
|
9
|
+
/**
|
|
10
|
+
* When controlled, what happens to a tab the user picked before hydration: "ignore" keeps
|
|
11
|
+
* `value`, "report" calls `onValueChange` with the pick so you can adopt it.
|
|
12
|
+
*/
|
|
13
|
+
preHydration?: 'ignore' | 'report';
|
|
14
|
+
/** The panels' radio group name. Defaults to a generated one. */
|
|
15
|
+
name?: string;
|
|
16
|
+
};
|
|
17
|
+
type RootProps = BaseRootProps & {
|
|
18
|
+
/** The selected tab's value, to control the tabs. */
|
|
19
|
+
value?: string;
|
|
20
|
+
/** The tab selected at first, when uncontrolled. Defaults to the first tab. */
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Tabs can be a helpful way of letting users quickly switch between related information.
|
|
25
|
+
*
|
|
26
|
+
* As in govuk-frontend, without JavaScript the tabs are a list of links to every panel. Use `Tab`
|
|
27
|
+
* and `Panel` inside it. Each tab's `value` is its panel's id.
|
|
28
|
+
*
|
|
29
|
+
* @see https://design-system.service.gov.uk/components/tabs/
|
|
30
|
+
*/
|
|
31
|
+
declare function Root({ value, defaultValue, onValueChange, preHydration, name, ...props }: RootProps): React.JSX.Element;
|
|
32
|
+
type RadiosRootProps = BaseRootProps & ({
|
|
33
|
+
value: string;
|
|
34
|
+
defaultValue?: string;
|
|
35
|
+
} | {
|
|
36
|
+
value?: string;
|
|
37
|
+
defaultValue: string;
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* Tabs that switch panels without JavaScript too, through a hidden radio in each panel. Use
|
|
41
|
+
* `RadioTab` and `RadioPanel` inside it. Each tab's `value` is its panel's id.
|
|
42
|
+
*
|
|
43
|
+
* @see https://design-system.service.gov.uk/components/tabs/
|
|
44
|
+
*/
|
|
45
|
+
declare function RadiosRoot({ value, defaultValue, onValueChange, preHydration, name, ...props }: RadiosRootProps): React.JSX.Element;
|
|
46
|
+
|
|
47
|
+
type ListProps = Markup.ListProps;
|
|
48
|
+
declare function List(props: ListProps): React.JSX.Element;
|
|
49
|
+
type ListItemProps = Markup.ListItemProps & {
|
|
50
|
+
/** The value of the tab inside it. */
|
|
51
|
+
value: string;
|
|
52
|
+
};
|
|
53
|
+
declare function ListItem({ value, selected, ...props }: ListItemProps): React.JSX.Element;
|
|
54
|
+
type TabProps = Omit<Markup.TabProps, 'href' | 'asChild'> & {
|
|
55
|
+
/** Its panel's value, which is the panel's id. */
|
|
56
|
+
value: string;
|
|
57
|
+
};
|
|
58
|
+
/** A tab in a `Root`: a link to its panel. */
|
|
59
|
+
declare function Tab({ value, children, ...props }: TabProps): React.JSX.Element;
|
|
60
|
+
type RadioTabProps = TabProps & {
|
|
61
|
+
/** The panels' radio group name. Set by RadiosRoot: pass it to a tab rendered without one, such as in an island. */
|
|
62
|
+
name?: string;
|
|
63
|
+
};
|
|
64
|
+
/** A tab in a `RadiosRoot`: a label for its panel's radio. */
|
|
65
|
+
declare function RadioTab({ value, name, children, ...props }: RadioTabProps): React.JSX.Element;
|
|
66
|
+
type PanelProps = Omit<Markup.PanelProps, 'id'> & {
|
|
67
|
+
/** Its tab's value, which is the panel's id. */
|
|
68
|
+
value: string;
|
|
69
|
+
/** The panels' radio group name. Set by Root: pass it to a panel rendered without one, such as in an island. */
|
|
70
|
+
name?: string;
|
|
71
|
+
};
|
|
72
|
+
/** A panel in a `Root`. */
|
|
73
|
+
declare function Panel({ value, selected, name, ...props }: PanelProps): React.JSX.Element;
|
|
74
|
+
type RadioPanelProps = PanelProps;
|
|
75
|
+
/** A panel in a `RadiosRoot`, shown without JavaScript only while its tab is chosen. */
|
|
76
|
+
declare function RadioPanel({ value, selected, name, ...props }: RadioPanelProps): React.JSX.Element;
|
|
77
|
+
type CompositeItem = {
|
|
78
|
+
/** The panel's id, and the tab's value. */
|
|
79
|
+
id: string;
|
|
80
|
+
label: ReactNode;
|
|
81
|
+
panel: ReactNode;
|
|
82
|
+
};
|
|
83
|
+
type CompositeProps = Omit<RootProps, 'title'> & {
|
|
84
|
+
/** The heading shown above the list of links when the tabs aren't shown. Defaults to "Contents". */
|
|
85
|
+
title?: ReactNode;
|
|
86
|
+
items: CompositeItem[];
|
|
87
|
+
};
|
|
88
|
+
/** The tabs, with a tab and panel for each item. Without JavaScript, a list of links to every panel. */
|
|
89
|
+
declare function Composite({ title, items, value, defaultValue, ...props }: CompositeProps): React.JSX.Element;
|
|
90
|
+
type RadiosCompositeProps = Omit<BaseRootProps, 'title'> & {
|
|
91
|
+
/** The heading shown above the list of tabs when they aren't styled as tabs. Defaults to "Contents". */
|
|
92
|
+
title?: ReactNode;
|
|
93
|
+
items: CompositeItem[];
|
|
94
|
+
/** The selected tab's value, to control the tabs. */
|
|
95
|
+
value?: string;
|
|
96
|
+
/** The tab selected at first, when uncontrolled. Defaults to the first tab. */
|
|
97
|
+
defaultValue?: string;
|
|
98
|
+
};
|
|
99
|
+
/** The tabs, with a tab and panel for each item. They switch panels without JavaScript too. */
|
|
100
|
+
declare function RadiosComposite({ title, items, value, defaultValue, ...props }: RadiosCompositeProps): React.JSX.Element;
|
|
101
|
+
|
|
102
|
+
declare const index_Composite: typeof Composite;
|
|
103
|
+
type index_CompositeItem = CompositeItem;
|
|
104
|
+
type index_CompositeProps = CompositeProps;
|
|
105
|
+
declare const index_List: typeof List;
|
|
106
|
+
declare const index_ListItem: typeof ListItem;
|
|
107
|
+
type index_ListItemProps = ListItemProps;
|
|
108
|
+
type index_ListProps = ListProps;
|
|
109
|
+
declare const index_Panel: typeof Panel;
|
|
110
|
+
type index_PanelProps = PanelProps;
|
|
111
|
+
declare const index_RadioPanel: typeof RadioPanel;
|
|
112
|
+
type index_RadioPanelProps = RadioPanelProps;
|
|
113
|
+
declare const index_RadioTab: typeof RadioTab;
|
|
114
|
+
type index_RadioTabProps = RadioTabProps;
|
|
115
|
+
declare const index_RadiosComposite: typeof RadiosComposite;
|
|
116
|
+
type index_RadiosCompositeProps = RadiosCompositeProps;
|
|
117
|
+
declare const index_RadiosRoot: typeof RadiosRoot;
|
|
118
|
+
type index_RadiosRootProps = RadiosRootProps;
|
|
119
|
+
declare const index_Root: typeof Root;
|
|
120
|
+
type index_RootProps = RootProps;
|
|
121
|
+
declare const index_Tab: typeof Tab;
|
|
122
|
+
type index_TabProps = TabProps;
|
|
123
|
+
declare const index_Title: typeof Title;
|
|
124
|
+
declare const index_TitleProps: typeof TitleProps;
|
|
125
|
+
declare namespace index {
|
|
126
|
+
export { index_Composite as Composite, index_List as List, index_ListItem as ListItem, index_Panel as Panel, index_RadioPanel as RadioPanel, index_RadioTab as RadioTab, index_RadiosComposite as RadiosComposite, index_RadiosRoot as RadiosRoot, index_Root as Root, index_Tab as Tab, index_Title as Title, index_TitleProps as TitleProps };
|
|
127
|
+
export type { index_CompositeItem as CompositeItem, index_CompositeProps as CompositeProps, index_ListItemProps as ListItemProps, index_ListProps as ListProps, index_PanelProps as PanelProps, index_RadioPanelProps as RadioPanelProps, index_RadioTabProps as RadioTabProps, index_RadiosCompositeProps as RadiosCompositeProps, index_RadiosRootProps as RadiosRootProps, index_RootProps as RootProps, index_TabProps as TabProps };
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { Composite as C, List as L, Panel as P, RadioPanel as R, Tab as T, ListItem as c, RadioTab as h, index as i, RadiosComposite as k, RadiosRoot as m, Root as o };
|
|
131
|
+
export type { CompositeItem as a, CompositeProps as b, ListItemProps as d, ListProps as e, PanelProps as f, RadioPanelProps as g, RadioTabProps as j, RadiosCompositeProps as l, RadiosRootProps as n, RootProps as p, TabProps as q };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as Markup from 'govuk-frontend-react/radios';
|
|
3
|
+
import { Divider, DividerProps, Hint, HintProps, Item, ItemProps, Label, LabelProps } from 'govuk-frontend-react/radios';
|
|
4
|
+
|
|
5
|
+
/** Shows a reveal only while its radio is checked, before or without JavaScript. */
|
|
6
|
+
declare const radiosCss: string;
|
|
7
|
+
type RootProps = Markup.RootProps;
|
|
8
|
+
/**
|
|
9
|
+
* Let users select a single option from a list using the radios component.
|
|
10
|
+
*
|
|
11
|
+
* Children are `Item`s, each with an `Input`, followed by a `Conditional` where it reveals one.
|
|
12
|
+
*
|
|
13
|
+
* @see https://design-system.service.gov.uk/components/radios/
|
|
14
|
+
*/
|
|
15
|
+
declare function Root(props: RootProps): React.JSX.Element;
|
|
16
|
+
type InputProps = Markup.InputProps & {
|
|
17
|
+
/** The id of the `Conditional` this radio reveals. */
|
|
18
|
+
controls?: string;
|
|
19
|
+
};
|
|
20
|
+
declare function Input({ controls, ...props }: InputProps): React.JSX.Element;
|
|
21
|
+
type ConditionalProps = Markup.ConditionalProps;
|
|
22
|
+
/** Content revealed while its radio is checked, straight after its `Item`. Pass the radio's `checked` or `defaultChecked` as `checked`. */
|
|
23
|
+
declare function Conditional(props: ConditionalProps): React.JSX.Element;
|
|
24
|
+
type ItemCompositeProps = Markup.ItemCompositeProps;
|
|
25
|
+
declare function ItemComposite({ id, label, hint, conditional, 'aria-describedby': describedBy, ...props }: ItemCompositeProps): React.JSX.Element;
|
|
26
|
+
type FieldProps = Markup.FieldProps;
|
|
27
|
+
/**
|
|
28
|
+
* Let users select a single option from a list using the radios component.
|
|
29
|
+
*
|
|
30
|
+
* Children are `ItemComposite`s and `Divider`s.
|
|
31
|
+
*
|
|
32
|
+
* @see https://design-system.service.gov.uk/components/radios/
|
|
33
|
+
*/
|
|
34
|
+
declare function Field({ items, children, ...props }: FieldProps): React.JSX.Element;
|
|
35
|
+
|
|
36
|
+
declare const index_Conditional: typeof Conditional;
|
|
37
|
+
type index_ConditionalProps = ConditionalProps;
|
|
38
|
+
declare const index_Divider: typeof Divider;
|
|
39
|
+
declare const index_DividerProps: typeof DividerProps;
|
|
40
|
+
declare const index_Field: typeof Field;
|
|
41
|
+
type index_FieldProps = FieldProps;
|
|
42
|
+
declare const index_Hint: typeof Hint;
|
|
43
|
+
declare const index_HintProps: typeof HintProps;
|
|
44
|
+
declare const index_Input: typeof Input;
|
|
45
|
+
type index_InputProps = InputProps;
|
|
46
|
+
declare const index_Item: typeof Item;
|
|
47
|
+
declare const index_ItemComposite: typeof ItemComposite;
|
|
48
|
+
type index_ItemCompositeProps = ItemCompositeProps;
|
|
49
|
+
declare const index_ItemProps: typeof ItemProps;
|
|
50
|
+
declare const index_Label: typeof Label;
|
|
51
|
+
declare const index_LabelProps: typeof LabelProps;
|
|
52
|
+
declare const index_Root: typeof Root;
|
|
53
|
+
type index_RootProps = RootProps;
|
|
54
|
+
declare const index_radiosCss: typeof radiosCss;
|
|
55
|
+
declare namespace index {
|
|
56
|
+
export { index_Conditional as Conditional, index_Divider as Divider, index_DividerProps as DividerProps, index_Field as Field, index_Hint as Hint, index_HintProps as HintProps, index_Input as Input, index_Item as Item, index_ItemComposite as ItemComposite, index_ItemProps as ItemProps, index_Label as Label, index_LabelProps as LabelProps, index_Root as Root, index_radiosCss as radiosCss };
|
|
57
|
+
export type { index_ConditionalProps as ConditionalProps, index_FieldProps as FieldProps, index_InputProps as InputProps, index_ItemCompositeProps as ItemCompositeProps, index_RootProps as RootProps };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { Conditional as C, Field as F, Input as I, Root as R, ItemComposite as d, index as i, radiosCss as r };
|
|
61
|
+
export type { ConditionalProps as a, FieldProps as b, InputProps as c, ItemCompositeProps as e, RootProps as f };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as footer from 'govuk-frontend-react/footer';
|
|
2
|
+
|
|
3
|
+
function _mergeNamespaces(n, m) {
|
|
4
|
+
m.forEach(function (e) {
|
|
5
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
6
|
+
if (k !== 'default' && !(k in n)) {
|
|
7
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
8
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return e[k]; }
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
return Object.freeze(n);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var index = /*#__PURE__*/_mergeNamespaces({
|
|
19
|
+
__proto__: null
|
|
20
|
+
}, [footer]);
|
|
21
|
+
|
|
22
|
+
export { index as i };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as genericHeader from 'govuk-frontend-react/generic-header';
|
|
2
|
+
|
|
3
|
+
function _mergeNamespaces(n, m) {
|
|
4
|
+
m.forEach(function (e) {
|
|
5
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
6
|
+
if (k !== 'default' && !(k in n)) {
|
|
7
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
8
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return e[k]; }
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
return Object.freeze(n);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var index = /*#__PURE__*/_mergeNamespaces({
|
|
19
|
+
__proto__: null
|
|
20
|
+
}, [genericHeader]);
|
|
21
|
+
|
|
22
|
+
export { index as i };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as fieldset from 'govuk-frontend-react/fieldset';
|
|
2
|
+
|
|
3
|
+
function _mergeNamespaces(n, m) {
|
|
4
|
+
m.forEach(function (e) {
|
|
5
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
6
|
+
if (k !== 'default' && !(k in n)) {
|
|
7
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
8
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return e[k]; }
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
return Object.freeze(n);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var index = /*#__PURE__*/_mergeNamespaces({
|
|
19
|
+
__proto__: null
|
|
20
|
+
}, [fieldset]);
|
|
21
|
+
|
|
22
|
+
export { index as i };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as Primitives from '@govuk-react/primitives/character-count';
|
|
3
|
+
import * as Markup from 'govuk-frontend-react/character-count';
|
|
4
|
+
|
|
5
|
+
type RootProps = Markup.RootProps;
|
|
6
|
+
/**
|
|
7
|
+
* Tell users how many characters or words they can enter into a textarea.
|
|
8
|
+
*
|
|
9
|
+
* Wrap `Textarea`, `Message`, `Status` and `ScreenReaderStatus`, with the label, hint and error
|
|
10
|
+
* message.
|
|
11
|
+
*
|
|
12
|
+
* @see https://design-system.service.gov.uk/components/character-count/
|
|
13
|
+
*/
|
|
14
|
+
declare function Root({ maxLength, maxWords, threshold, countType, charactersUnderLimitText, charactersAtLimitText, charactersOverLimitText, wordsUnderLimitText, wordsAtLimitText, wordsOverLimitText, error, ...props }: RootProps): React.JSX.Element;
|
|
15
|
+
type TextareaProps = Markup.TextareaProps;
|
|
16
|
+
/** The field. */
|
|
17
|
+
declare function Textarea(props: TextareaProps): React.JSX.Element;
|
|
18
|
+
type MessageProps = Markup.MessageProps;
|
|
19
|
+
/**
|
|
20
|
+
* The description, such as "You can enter up to 200 characters". Shown without JavaScript, and
|
|
21
|
+
* visually hidden once the count shows. Give it the field's id followed by `-info`, and add that to
|
|
22
|
+
* the field's `aria-describedby`.
|
|
23
|
+
*/
|
|
24
|
+
declare function Message(props: MessageProps): React.JSX.Element;
|
|
25
|
+
type StatusProps = Omit<Primitives.StatusProps, 'asChild'>;
|
|
26
|
+
/** The visible count, after `Message`. Shown once JavaScript runs. */
|
|
27
|
+
declare function Status({ className, ...props }: StatusProps): React.JSX.Element;
|
|
28
|
+
type ScreenReaderStatusProps = Omit<Primitives.ScreenReaderStatusProps, 'asChild'>;
|
|
29
|
+
/** The count for screen readers, after `Status`, once the user pauses typing. */
|
|
30
|
+
declare function ScreenReaderStatus({ className, ...props }: ScreenReaderStatusProps): React.JSX.Element;
|
|
31
|
+
type FieldProps = Markup.FieldProps;
|
|
32
|
+
/**
|
|
33
|
+
* Tell users how many characters or words they can enter into a textarea.
|
|
34
|
+
*
|
|
35
|
+
* @see https://design-system.service.gov.uk/components/character-count/
|
|
36
|
+
*/
|
|
37
|
+
declare function Field({ id: idProp, name, label, labelSize, labelIsPageHeading, hint, errorMessage, maxLength, maxWords, threshold, countType, textareaDescriptionText, charactersUnderLimitText, charactersAtLimitText, charactersOverLimitText, wordsUnderLimitText, wordsAtLimitText, wordsOverLimitText, 'aria-describedby': describedBy, ...props }: FieldProps): React.JSX.Element;
|
|
38
|
+
|
|
39
|
+
declare const index_Field: typeof Field;
|
|
40
|
+
type index_FieldProps = FieldProps;
|
|
41
|
+
declare const index_Message: typeof Message;
|
|
42
|
+
type index_MessageProps = MessageProps;
|
|
43
|
+
declare const index_Root: typeof Root;
|
|
44
|
+
type index_RootProps = RootProps;
|
|
45
|
+
declare const index_ScreenReaderStatus: typeof ScreenReaderStatus;
|
|
46
|
+
type index_ScreenReaderStatusProps = ScreenReaderStatusProps;
|
|
47
|
+
declare const index_Status: typeof Status;
|
|
48
|
+
type index_StatusProps = StatusProps;
|
|
49
|
+
declare const index_Textarea: typeof Textarea;
|
|
50
|
+
type index_TextareaProps = TextareaProps;
|
|
51
|
+
declare namespace index {
|
|
52
|
+
export { index_Field as Field, index_Message as Message, index_Root as Root, index_ScreenReaderStatus as ScreenReaderStatus, index_Status as Status, index_Textarea as Textarea };
|
|
53
|
+
export type { index_FieldProps as FieldProps, index_MessageProps as MessageProps, index_RootProps as RootProps, index_ScreenReaderStatusProps as ScreenReaderStatusProps, index_StatusProps as StatusProps, index_TextareaProps as TextareaProps };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { Field as F, Message as M, Root as R, ScreenReaderStatus as S, Textarea as T, Status as e, index as i };
|
|
57
|
+
export type { FieldProps as a, MessageProps as b, RootProps as c, ScreenReaderStatusProps as d, StatusProps as f, TextareaProps as g };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as panel from 'govuk-frontend-react/panel';
|
|
2
|
+
|
|
3
|
+
function _mergeNamespaces(n, m) {
|
|
4
|
+
m.forEach(function (e) {
|
|
5
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
6
|
+
if (k !== 'default' && !(k in n)) {
|
|
7
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
8
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return e[k]; }
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
return Object.freeze(n);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var index = /*#__PURE__*/_mergeNamespaces({
|
|
19
|
+
__proto__: null
|
|
20
|
+
}, [panel]);
|
|
21
|
+
|
|
22
|
+
export { index as i };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as dateInput from 'govuk-frontend-react/date-input';
|
|
2
|
+
|
|
3
|
+
function _mergeNamespaces(n, m) {
|
|
4
|
+
m.forEach(function (e) {
|
|
5
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
6
|
+
if (k !== 'default' && !(k in n)) {
|
|
7
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
8
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return e[k]; }
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
return Object.freeze(n);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var index = /*#__PURE__*/_mergeNamespaces({
|
|
19
|
+
__proto__: null
|
|
20
|
+
}, [dateInput]);
|
|
21
|
+
|
|
22
|
+
export { index as i };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as Markup from 'govuk-frontend-react/exit-this-page';
|
|
3
|
+
import { SkipLinkProps as SkipLinkProps$1 } from 'govuk-frontend-react/skip-link';
|
|
4
|
+
|
|
5
|
+
type RootProps = Markup.RootProps;
|
|
6
|
+
/**
|
|
7
|
+
* Give users a way to quickly and safely exit a service, website or application.
|
|
8
|
+
*
|
|
9
|
+
* Once JavaScript runs, the button, a `SkipLink`, or pressing Shift 3 times hides the page and
|
|
10
|
+
* goes to the button's `href`, as in govuk-frontend.
|
|
11
|
+
*
|
|
12
|
+
* @see https://design-system.service.gov.uk/components/exit-this-page/
|
|
13
|
+
*/
|
|
14
|
+
declare function Root({ children, ...props }: RootProps): React.JSX.Element;
|
|
15
|
+
type ButtonProps = Markup.ButtonProps;
|
|
16
|
+
/** The link to a safe page. Shows how many times Shift has been pressed. */
|
|
17
|
+
declare function Button({ children, ...props }: ButtonProps): React.JSX.Element;
|
|
18
|
+
/** Shows how many times Shift has been pressed. Button renders it. */
|
|
19
|
+
declare function Indicator(): React.JSX.Element;
|
|
20
|
+
/** Tells screen readers how many more presses are needed. Root renders it. */
|
|
21
|
+
declare function Status(): React.JSX.Element;
|
|
22
|
+
type SkipLinkProps = SkipLinkProps$1;
|
|
23
|
+
/** A skip link that exits the page too, for the top of the page. */
|
|
24
|
+
declare function SkipLink({ href, className, ...props }: SkipLinkProps): React.JSX.Element;
|
|
25
|
+
type CompositeProps = Markup.CompositeProps;
|
|
26
|
+
/**
|
|
27
|
+
* Give users a way to quickly and safely exit a service, website or application.
|
|
28
|
+
*
|
|
29
|
+
* Once JavaScript runs, the button, a `SkipLink`, or pressing Shift 3 times hides the page and
|
|
30
|
+
* goes to the button's `href`, as in govuk-frontend.
|
|
31
|
+
*
|
|
32
|
+
* @see https://design-system.service.gov.uk/components/exit-this-page/
|
|
33
|
+
*/
|
|
34
|
+
declare function Composite({ href, children, ...props }: CompositeProps): React.JSX.Element;
|
|
35
|
+
|
|
36
|
+
declare const index_Button: typeof Button;
|
|
37
|
+
type index_ButtonProps = ButtonProps;
|
|
38
|
+
declare const index_Composite: typeof Composite;
|
|
39
|
+
type index_CompositeProps = CompositeProps;
|
|
40
|
+
declare const index_Indicator: typeof Indicator;
|
|
41
|
+
declare const index_Root: typeof Root;
|
|
42
|
+
type index_RootProps = RootProps;
|
|
43
|
+
declare const index_SkipLink: typeof SkipLink;
|
|
44
|
+
type index_SkipLinkProps = SkipLinkProps;
|
|
45
|
+
declare const index_Status: typeof Status;
|
|
46
|
+
declare namespace index {
|
|
47
|
+
export { index_Button as Button, index_Composite as Composite, index_Indicator as Indicator, index_Root as Root, index_SkipLink as SkipLink, index_Status as Status };
|
|
48
|
+
export type { index_ButtonProps as ButtonProps, index_CompositeProps as CompositeProps, index_RootProps as RootProps, index_SkipLinkProps as SkipLinkProps };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { Button as B, Composite as C, Indicator as I, Root as R, SkipLink as S, Status as e, index as i };
|
|
52
|
+
export type { ButtonProps as a, CompositeProps as b, RootProps as c, SkipLinkProps as d };
|