whitehall-ui 2.0.0 → 2.2.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/README.md +9 -2
- package/dist/chunk-25PZB34H.js +105 -0
- package/dist/chunk-336BAPDV.js +153 -0
- package/dist/{chunk-CYBPAHLZ.js → chunk-7TI7IVX5.js} +40 -7
- package/dist/{chunk-FVBDMMNR.js → chunk-A3JRUVST.js} +1 -1
- package/dist/{chunk-OQILIT3B.js → chunk-A3K2CJUC.js} +1 -1
- package/dist/{chunk-VMI2XU5D.js → chunk-GFRA77XT.js} +4 -4
- package/dist/{chunk-ASBIQC77.js → chunk-IOAJ3OIQ.js} +11 -11
- package/dist/{chunk-2KB4IAMZ.js → chunk-JXR63GVO.js} +1 -1
- package/dist/chunk-LXPS6UFQ.js +175 -0
- package/dist/chunk-VEIYL5NB.js +19 -0
- package/dist/{chunk-7Q2C5RB7.js → chunk-WMOWFYPB.js} +28 -1
- package/dist/{chunk-QPN5J5IU.js → chunk-XVE5B2T3.js} +1 -1
- package/dist/{chunk-ZAKQHDVD.js → chunk-ZT5VOKVY.js} +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +14 -13
- package/dist/ui/accordion.js +1 -1
- package/dist/ui/breadcrumbs.js +1 -1
- package/dist/ui/button.js +1 -1
- package/dist/ui/checkboxes.d.ts +6 -3
- package/dist/ui/checkboxes.js +1 -1
- package/dist/ui/exit-this-page.js +2 -2
- package/dist/ui/file-upload.d.ts +2 -1
- package/dist/ui/file-upload.js +1 -1
- package/dist/ui/form-group.d.ts +9 -0
- package/dist/ui/form-group.js +2 -0
- package/dist/ui/language-navigation.js +1 -1
- package/dist/ui/password-input.d.ts +1 -1
- package/dist/ui/password-input.js +2 -2
- package/dist/ui/phase-banner.js +1 -1
- package/dist/ui/radios.d.ts +13 -5
- package/dist/ui/radios.js +1 -1
- package/dist/ui/service-navigation.d.ts +10 -4
- package/dist/ui/service-navigation.js +1 -1
- package/dist/ui/task-list.d.ts +1 -1
- package/dist/ui/task-list.js +1 -1
- package/package.json +1 -1
- package/registry/default/theme/govuk-tokens.css +7 -1
- package/dist/chunk-4GQRYMDK.js +0 -128
- package/dist/chunk-JCERRZV6.js +0 -136
- package/dist/chunk-YF6EZ57H.js +0 -77
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cn } from './chunk-GKHD33N6.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
var FormGroup = ({ className, error, ...props }) => /* @__PURE__ */ jsx(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
"data-form-group": error ? "error" : "",
|
|
8
|
+
className: cn(
|
|
9
|
+
"mb-govuk-r6",
|
|
10
|
+
"in-data-form-group:last-of-type:mb-0",
|
|
11
|
+
error && "pl-govuk-3 border-l-govuk-standard border-l-govuk-error",
|
|
12
|
+
"in-data-[form-group=error]:p-0 in-data-[form-group=error]:border-0",
|
|
13
|
+
className
|
|
14
|
+
),
|
|
15
|
+
...props
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export { FormGroup };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn, mergeRefs } from './chunk-GKHD33N6.js';
|
|
2
2
|
import { useRef, useState, useId } from 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
|
-
import {
|
|
4
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
var fileUploadButtonVariants = cva(
|
|
7
7
|
[
|
|
@@ -44,6 +44,7 @@ var FileUpload = ({
|
|
|
44
44
|
id,
|
|
45
45
|
disabled,
|
|
46
46
|
error,
|
|
47
|
+
enhanced = true,
|
|
47
48
|
chooseFileButtonText = "Choose file",
|
|
48
49
|
dropInstructionText = "or drop file",
|
|
49
50
|
noFileChosenText = "No file chosen",
|
|
@@ -60,6 +61,32 @@ var FileUpload = ({
|
|
|
60
61
|
const statusId = `${buttonId}-status`;
|
|
61
62
|
const empty = fileNames.length === 0;
|
|
62
63
|
const status = fileNames.length > 1 ? `${fileNames.length} files chosen` : fileNames[0] ?? noFileChosenText;
|
|
64
|
+
if (!enhanced) {
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
"input",
|
|
67
|
+
{
|
|
68
|
+
ref,
|
|
69
|
+
id,
|
|
70
|
+
type: "file",
|
|
71
|
+
disabled,
|
|
72
|
+
onChange,
|
|
73
|
+
"aria-describedby": ariaDescribedBy,
|
|
74
|
+
className: cn(
|
|
75
|
+
"max-w-full -ml-govuk-1 p-govuk-1",
|
|
76
|
+
"font-govuk text-govuk-body text-govuk-black",
|
|
77
|
+
"file:font-govuk file:text-govuk-body file:text-inherit",
|
|
78
|
+
"file:mr-govuk-2 file:px-govuk-2 file:py-px file:cursor-pointer",
|
|
79
|
+
"file:border file:border-govuk-dark-grey file:rounded-xs",
|
|
80
|
+
"file:bg-govuk-light-grey hover:file:bg-govuk-mid-grey",
|
|
81
|
+
"focus:outline-3 focus:outline-govuk-yellow",
|
|
82
|
+
"focus:inset-ring-4 focus:inset-ring-govuk-black",
|
|
83
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
84
|
+
className
|
|
85
|
+
),
|
|
86
|
+
...props
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
63
90
|
return /* @__PURE__ */ jsxs(
|
|
64
91
|
"div",
|
|
65
92
|
{
|
|
@@ -5,7 +5,7 @@ var PhaseBanner = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
5
5
|
"div",
|
|
6
6
|
{
|
|
7
7
|
className: cn(
|
|
8
|
-
"govuk-width-container [.govuk-width-
|
|
8
|
+
"govuk-width-container in-[.govuk-width-container]:mx-0",
|
|
9
9
|
"py-govuk-2 border-b border-govuk-mid-grey",
|
|
10
10
|
className
|
|
11
11
|
),
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export { Feedback, FeedbackBody, FeedbackBodyProps, FeedbackProps, FeedbackTitle
|
|
|
15
15
|
export { Fieldset, FieldsetHeading, FieldsetHeadingProps, FieldsetLegend, FieldsetLegendProps, FieldsetProps, fieldsetLegendVariants } from './ui/fieldset.js';
|
|
16
16
|
export { FileUpload, FileUploadProps, fileUploadButtonVariants } from './ui/file-upload.js';
|
|
17
17
|
export { Footer, FooterContainer, FooterContainerProps, FooterContentLicence, FooterContentLicenceProps, FooterCrown, FooterCrownProps, FooterHeading, FooterHeadingProps, FooterInlineList, FooterInlineListItem, FooterInlineListItemProps, FooterInlineListProps, FooterLicenceLogo, FooterLicenceLogoProps, FooterLink, FooterLinkProps, FooterList, FooterListItem, FooterListItemProps, FooterListProps, FooterMeta, FooterMetaItem, FooterMetaItemProps, FooterMetaProps, FooterNavigation, FooterNavigationProps, FooterProps, FooterSection, FooterSectionBreak, FooterSectionProps } from './ui/footer.js';
|
|
18
|
+
export { FormGroup, FormGroupProps } from './ui/form-group.js';
|
|
18
19
|
export { GenericHeader, GenericHeaderContainer, GenericHeaderContainerProps, GenericHeaderLink, GenericHeaderLinkProps, GenericHeaderLogo, GenericHeaderLogoProps, GenericHeaderProps } from './ui/generic-header.js';
|
|
19
20
|
export { Header, HeaderContainer, HeaderContainerProps, HeaderLink, HeaderLinkProps, HeaderLogo, HeaderLogoProps, HeaderLogotype, HeaderLogotypeProps, HeaderProductName, HeaderProductNameProps, HeaderProps } from './ui/header.js';
|
|
20
21
|
export { Hint, HintProps } from './ui/hint.js';
|
|
@@ -27,9 +28,9 @@ export { NextArrow, Pagination, PaginationEllipsis, PaginationEllipsisProps, Pag
|
|
|
27
28
|
export { Panel, PanelActions, PanelActionsProps, PanelBody, PanelBodyProps, PanelProps, PanelTitle, PanelTitleProps } from './ui/panel.js';
|
|
28
29
|
export { PasswordInput, PasswordInputProps } from './ui/password-input.js';
|
|
29
30
|
export { PhaseBanner, PhaseBannerContent, PhaseBannerContentProps, PhaseBannerProps, PhaseBannerTag, PhaseBannerTagProps, PhaseBannerText, PhaseBannerTextProps } from './ui/phase-banner.js';
|
|
30
|
-
export { Radios, RadiosDivider, RadiosDividerProps, RadiosHint, RadiosHintProps, RadiosItem, RadiosItemProps, RadiosProps } from './ui/radios.js';
|
|
31
|
+
export { Radios, RadiosConditional, RadiosConditionalProps, RadiosDivider, RadiosDividerProps, RadiosHint, RadiosHintProps, RadiosItem, RadiosItemProps, RadiosProps } from './ui/radios.js';
|
|
31
32
|
export { Select, SelectProps, selectVariants } from './ui/select.js';
|
|
32
|
-
export { ServiceNavigation, ServiceNavigationContainer, ServiceNavigationContainerProps, ServiceNavigationItem, ServiceNavigationItemProps, ServiceNavigationLink, ServiceNavigationLinkProps, ServiceNavigationNav, ServiceNavigationNavProps, ServiceNavigationProps, ServiceNavigationServiceName, ServiceNavigationServiceNameProps } from './ui/service-navigation.js';
|
|
33
|
+
export { ServiceNavigation, ServiceNavigationContainer, ServiceNavigationContainerProps, ServiceNavigationEnd, ServiceNavigationEndProps, ServiceNavigationItem, ServiceNavigationItemProps, ServiceNavigationLink, ServiceNavigationLinkProps, ServiceNavigationNav, ServiceNavigationNavProps, ServiceNavigationProps, ServiceNavigationServiceName, ServiceNavigationServiceNameProps } from './ui/service-navigation.js';
|
|
33
34
|
export { SkipLink, SkipLinkProps } from './ui/skip-link.js';
|
|
34
35
|
export { SummaryList, SummaryListActions, SummaryListActionsProps, SummaryListCard, SummaryListCardAction, SummaryListCardActionProps, SummaryListCardActions, SummaryListCardActionsProps, SummaryListCardContent, SummaryListCardContentProps, SummaryListCardHeader, SummaryListCardHeaderProps, SummaryListCardProps, SummaryListCardTitle, SummaryListCardTitleProps, SummaryListKey, SummaryListKeyProps, SummaryListProps, SummaryListRow, SummaryListRowProps, SummaryListValue, SummaryListValueProps } from './ui/summary-list.js';
|
|
35
36
|
export { Table, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCaptionSize, TableCell, TableCellProps, TableContainer, TableContainerProps, TableHead, TableHeadProps, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps, tableCaptionVariants } from './ui/table.js';
|
package/dist/index.js
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
export { WarningText } from './chunk-4TBXH62Z.js';
|
|
2
|
-
export {
|
|
2
|
+
export { Select, selectVariants } from './chunk-UXOJELVU.js';
|
|
3
|
+
export { ServiceNavigation, ServiceNavigationContainer, ServiceNavigationEnd, ServiceNavigationItem, ServiceNavigationLink, ServiceNavigationNav, ServiceNavigationServiceName } from './chunk-7TI7IVX5.js';
|
|
3
4
|
export { SkipLink } from './chunk-W4CWUYTA.js';
|
|
4
5
|
export { SummaryList, SummaryListActions, SummaryListCard, SummaryListCardAction, SummaryListCardActions, SummaryListCardContent, SummaryListCardHeader, SummaryListCardTitle, SummaryListKey, SummaryListRow, SummaryListValue } from './chunk-GLDCEDTR.js';
|
|
5
6
|
export { Table, TableBody, TableCaption, TableCell, TableContainer, TableHead, TableHeader, TableRow, tableCaptionVariants } from './chunk-7IOR7UNU.js';
|
|
6
7
|
export { Tabs, TabsList, TabsPanel, TabsTab } from './chunk-N5PY3VZH.js';
|
|
7
8
|
export { Tag, tagVariants } from './chunk-VRGDQ3SF.js';
|
|
8
|
-
export { TaskList, TaskListHint, TaskListItem, TaskListLink, TaskListNameAndHint, TaskListStatus } from './chunk-
|
|
9
|
+
export { TaskList, TaskListHint, TaskListItem, TaskListLink, TaskListNameAndHint, TaskListStatus } from './chunk-25PZB34H.js';
|
|
10
|
+
export { LanguageNavigation, LanguageNavigationCurrent, LanguageNavigationItem, LanguageNavigationLink } from './chunk-GFRA77XT.js';
|
|
9
11
|
export { Link, linkVariants } from './chunk-HBLVAX45.js';
|
|
10
12
|
export { NotificationBanner, NotificationBannerContent, NotificationBannerHeader, NotificationBannerHeading, NotificationBannerLink, NotificationBannerTitle } from './chunk-KXQGZLMK.js';
|
|
11
13
|
export { NextArrow, Pagination, PaginationEllipsis, PaginationItem, PaginationLink, PaginationLinkLabel, PaginationLinkTitle, PaginationList, PaginationNext, PaginationPrevious, PrevArrow } from './chunk-6WLHJ5MN.js';
|
|
12
14
|
export { Panel, PanelActions, PanelBody, PanelTitle } from './chunk-CBT6WCJ7.js';
|
|
13
|
-
export { PasswordInput } from './chunk-
|
|
15
|
+
export { PasswordInput } from './chunk-A3K2CJUC.js';
|
|
14
16
|
export { TextInput, textInputVariants } from './chunk-VCJE5UO2.js';
|
|
15
|
-
export { PhaseBanner, PhaseBannerContent, PhaseBannerTag, PhaseBannerText } from './chunk-
|
|
16
|
-
export { Radios, RadiosDivider, RadiosHint, RadiosItem } from './chunk-
|
|
17
|
-
export {
|
|
18
|
-
export { FileUpload, fileUploadButtonVariants } from './chunk-7Q2C5RB7.js';
|
|
17
|
+
export { PhaseBanner, PhaseBannerContent, PhaseBannerTag, PhaseBannerText } from './chunk-ZT5VOKVY.js';
|
|
18
|
+
export { Radios, RadiosConditional, RadiosDivider, RadiosHint, RadiosItem } from './chunk-LXPS6UFQ.js';
|
|
19
|
+
export { FileUpload, fileUploadButtonVariants } from './chunk-WMOWFYPB.js';
|
|
19
20
|
export { Footer, FooterContainer, FooterContentLicence, FooterCrown, FooterHeading, FooterInlineList, FooterInlineListItem, FooterLicenceLogo, FooterLink, FooterList, FooterListItem, FooterMeta, FooterMetaItem, FooterNavigation, FooterSection, FooterSectionBreak } from './chunk-ZJB7BBTN.js';
|
|
21
|
+
export { FormGroup } from './chunk-VEIYL5NB.js';
|
|
20
22
|
export { GenericHeader, GenericHeaderContainer, GenericHeaderLink, GenericHeaderLogo } from './chunk-UK7RLSTJ.js';
|
|
21
23
|
export { Header, HeaderContainer, HeaderLink, HeaderLogo, HeaderLogotype, HeaderProductName } from './chunk-RGXB6M3G.js';
|
|
22
24
|
export { Hint } from './chunk-TICBCBDN.js';
|
|
23
25
|
export { InsetText } from './chunk-MYMVHSRJ.js';
|
|
24
26
|
export { Label, LabelWrapper, labelVariants } from './chunk-QKR7NELW.js';
|
|
25
|
-
export { LanguageNavigation, LanguageNavigationCurrent, LanguageNavigationItem, LanguageNavigationLink } from './chunk-VMI2XU5D.js';
|
|
26
27
|
export { CookieBanner, CookieBannerActions, CookieBannerContent, CookieBannerHeading, CookieBannerMessage } from './chunk-FJHNUBEM.js';
|
|
27
28
|
export { DateInput, DateInputInput, DateInputItem, DateInputLabel } from './chunk-3UX7QPLM.js';
|
|
28
29
|
export { Details, DetailsSummary, DetailsText } from './chunk-C2YQVLZ7.js';
|
|
29
30
|
export { ErrorMessage } from './chunk-MFI5R2TJ.js';
|
|
30
31
|
export { ErrorSummary } from './chunk-TGNN5ZP3.js';
|
|
31
|
-
export { ExitThisPage } from './chunk-
|
|
32
|
+
export { ExitThisPage } from './chunk-XVE5B2T3.js';
|
|
32
33
|
export { Feedback, FeedbackBody, FeedbackTitle } from './chunk-DZ3743JO.js';
|
|
33
34
|
export { Fieldset, FieldsetHeading, FieldsetLegend, fieldsetLegendVariants } from './chunk-D2T6BUOB.js';
|
|
34
|
-
export { Accordion, AccordionContent, AccordionHeading, AccordionSection } from './chunk-
|
|
35
|
+
export { Accordion, AccordionContent, AccordionHeading, AccordionSection } from './chunk-A3JRUVST.js';
|
|
35
36
|
export { BackLink } from './chunk-VHSAXVCF.js';
|
|
36
|
-
export { Breadcrumbs, BreadcrumbsLink, BreadcrumbsList, BreadcrumbsListItem } from './chunk-
|
|
37
|
-
export { Button, buttonVariants } from './chunk-
|
|
37
|
+
export { Breadcrumbs, BreadcrumbsLink, BreadcrumbsList, BreadcrumbsListItem } from './chunk-JXR63GVO.js';
|
|
38
|
+
export { Button, buttonVariants } from './chunk-IOAJ3OIQ.js';
|
|
38
39
|
export { CharacterCount, CharacterCountMessage } from './chunk-TAVSU2XB.js';
|
|
39
40
|
export { Textarea, textareaVariants } from './chunk-EDOSCND4.js';
|
|
40
|
-
export { Checkboxes, CheckboxesConditional, CheckboxesDivider, CheckboxesHint, CheckboxesItem } from './chunk-
|
|
41
|
+
export { Checkboxes, CheckboxesConditional, CheckboxesDivider, CheckboxesHint, CheckboxesItem } from './chunk-336BAPDV.js';
|
|
41
42
|
export { cn, mergeRefs } from './chunk-GKHD33N6.js';
|
package/dist/ui/accordion.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Accordion, AccordionContent, AccordionHeading, AccordionSection } from '../chunk-
|
|
1
|
+
export { Accordion, AccordionContent, AccordionHeading, AccordionSection } from '../chunk-A3JRUVST.js';
|
|
2
2
|
import '../chunk-GKHD33N6.js';
|
package/dist/ui/breadcrumbs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Breadcrumbs, BreadcrumbsLink, BreadcrumbsList, BreadcrumbsListItem } from '../chunk-
|
|
1
|
+
export { Breadcrumbs, BreadcrumbsLink, BreadcrumbsList, BreadcrumbsListItem } from '../chunk-JXR63GVO.js';
|
|
2
2
|
import '../chunk-GKHD33N6.js';
|
package/dist/ui/button.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Button, buttonVariants } from '../chunk-
|
|
1
|
+
export { Button, buttonVariants } from '../chunk-IOAJ3OIQ.js';
|
|
2
2
|
import '../chunk-GKHD33N6.js';
|
package/dist/ui/checkboxes.d.ts
CHANGED
|
@@ -6,17 +6,20 @@ type CheckboxesProps = React.ComponentProps<typeof CheckboxGroup>;
|
|
|
6
6
|
declare const Checkboxes: (props: CheckboxesProps) => react.JSX.Element;
|
|
7
7
|
interface CheckboxesItemProps extends Omit<React.ComponentProps<typeof Checkbox.Root>, 'className'> {
|
|
8
8
|
className?: string;
|
|
9
|
+
hint?: React.ReactNode;
|
|
9
10
|
small?: boolean;
|
|
10
11
|
}
|
|
11
|
-
declare const CheckboxesItem: ({ className, children, small, ...props }: CheckboxesItemProps) => react.JSX.Element;
|
|
12
|
+
declare const CheckboxesItem: ({ className, children, hint, "aria-describedby": ariaDescribedBy, small, ...props }: CheckboxesItemProps) => react.JSX.Element;
|
|
12
13
|
type CheckboxesHintProps = React.ComponentProps<'span'>;
|
|
13
14
|
declare const CheckboxesHint: ({ className, ...props }: CheckboxesHintProps) => react.JSX.Element;
|
|
14
15
|
interface CheckboxesDividerProps extends React.ComponentProps<'div'> {
|
|
15
16
|
small?: boolean;
|
|
16
17
|
}
|
|
17
18
|
declare const CheckboxesDivider: ({ className, children, small, ...props }: CheckboxesDividerProps) => react.JSX.Element;
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
interface CheckboxesConditionalProps extends React.ComponentProps<'div'> {
|
|
20
|
+
small?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const CheckboxesConditional: ({ className, small, ...props }: CheckboxesConditionalProps) => react.JSX.Element;
|
|
20
23
|
|
|
21
24
|
export { Checkboxes, CheckboxesConditional, CheckboxesDivider, CheckboxesHint, CheckboxesItem };
|
|
22
25
|
export type { CheckboxesConditionalProps, CheckboxesDividerProps, CheckboxesHintProps, CheckboxesItemProps, CheckboxesProps };
|
package/dist/ui/checkboxes.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Checkboxes, CheckboxesConditional, CheckboxesDivider, CheckboxesHint, CheckboxesItem } from '../chunk-
|
|
1
|
+
export { Checkboxes, CheckboxesConditional, CheckboxesDivider, CheckboxesHint, CheckboxesItem } from '../chunk-336BAPDV.js';
|
|
2
2
|
import '../chunk-GKHD33N6.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ExitThisPage } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { ExitThisPage } from '../chunk-XVE5B2T3.js';
|
|
2
|
+
import '../chunk-IOAJ3OIQ.js';
|
|
3
3
|
import '../chunk-GKHD33N6.js';
|
package/dist/ui/file-upload.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
3
3
|
|
|
4
4
|
interface FileUploadProps extends Omit<React.ComponentProps<'input'>, 'type'> {
|
|
5
5
|
error?: boolean;
|
|
6
|
+
enhanced?: boolean;
|
|
6
7
|
chooseFileButtonText?: string;
|
|
7
8
|
dropInstructionText?: string;
|
|
8
9
|
noFileChosenText?: string;
|
|
@@ -12,7 +13,7 @@ declare const fileUploadButtonVariants: (props?: ({
|
|
|
12
13
|
dragging?: boolean | null | undefined;
|
|
13
14
|
error?: boolean | null | undefined;
|
|
14
15
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
-
declare const FileUpload: ({ className, id, disabled, error, chooseFileButtonText, dropInstructionText, noFileChosenText, onChange, ref, "aria-describedby": ariaDescribedBy, ...props }: FileUploadProps) => react.JSX.Element;
|
|
16
|
+
declare const FileUpload: ({ className, id, disabled, error, enhanced, chooseFileButtonText, dropInstructionText, noFileChosenText, onChange, ref, "aria-describedby": ariaDescribedBy, ...props }: FileUploadProps) => react.JSX.Element;
|
|
16
17
|
|
|
17
18
|
export { FileUpload, fileUploadButtonVariants };
|
|
18
19
|
export type { FileUploadProps };
|
package/dist/ui/file-upload.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { FileUpload, fileUploadButtonVariants } from '../chunk-
|
|
1
|
+
export { FileUpload, fileUploadButtonVariants } from '../chunk-WMOWFYPB.js';
|
|
2
2
|
import '../chunk-GKHD33N6.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
interface FormGroupProps extends React.ComponentProps<'div'> {
|
|
4
|
+
error?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const FormGroup: ({ className, error, ...props }: FormGroupProps) => react.JSX.Element;
|
|
7
|
+
|
|
8
|
+
export { FormGroup };
|
|
9
|
+
export type { FormGroupProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { LanguageNavigation, LanguageNavigationCurrent, LanguageNavigationItem, LanguageNavigationLink } from '../chunk-
|
|
1
|
+
export { LanguageNavigation, LanguageNavigationCurrent, LanguageNavigationItem, LanguageNavigationLink } from '../chunk-GFRA77XT.js';
|
|
2
2
|
import '../chunk-GKHD33N6.js';
|
|
@@ -3,7 +3,7 @@ import { TextInputProps } from './text-input.js';
|
|
|
3
3
|
import 'class-variance-authority/types';
|
|
4
4
|
import 'class-variance-authority';
|
|
5
5
|
|
|
6
|
-
interface PasswordInputProps extends Omit<TextInputProps, 'type' | '
|
|
6
|
+
interface PasswordInputProps extends Omit<TextInputProps, 'type' | 'prefix' | 'suffix'> {
|
|
7
7
|
showPasswordText?: string;
|
|
8
8
|
hidePasswordText?: string;
|
|
9
9
|
showPasswordAriaLabel?: string;
|
package/dist/ui/phase-banner.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { PhaseBanner, PhaseBannerContent, PhaseBannerTag, PhaseBannerText } from '../chunk-
|
|
1
|
+
export { PhaseBanner, PhaseBannerContent, PhaseBannerTag, PhaseBannerText } from '../chunk-ZT5VOKVY.js';
|
|
2
2
|
import '../chunk-GKHD33N6.js';
|
package/dist/ui/radios.d.ts
CHANGED
|
@@ -9,12 +9,20 @@ interface RadiosProps extends Omit<React.ComponentProps<typeof RadioGroup>, 'cla
|
|
|
9
9
|
declare const Radios: ({ className, inline, ...props }: RadiosProps) => react.JSX.Element;
|
|
10
10
|
interface RadiosItemProps extends Omit<React.ComponentProps<typeof Radio.Root>, 'className'> {
|
|
11
11
|
className?: string;
|
|
12
|
+
hint?: React.ReactNode;
|
|
13
|
+
small?: boolean;
|
|
12
14
|
}
|
|
13
|
-
declare const RadiosItem: ({ className, children, ...props }: RadiosItemProps) => react.JSX.Element;
|
|
15
|
+
declare const RadiosItem: ({ className, children, hint, small, "aria-describedby": ariaDescribedBy, ...props }: RadiosItemProps) => react.JSX.Element;
|
|
14
16
|
type RadiosHintProps = React.ComponentProps<'span'>;
|
|
15
17
|
declare const RadiosHint: ({ className, ...props }: RadiosHintProps) => react.JSX.Element;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
interface RadiosDividerProps extends React.ComponentProps<'div'> {
|
|
19
|
+
small?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const RadiosDivider: ({ className, children, small, ...props }: RadiosDividerProps) => react.JSX.Element;
|
|
22
|
+
interface RadiosConditionalProps extends React.ComponentProps<'div'> {
|
|
23
|
+
small?: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare const RadiosConditional: ({ className, small, ...props }: RadiosConditionalProps) => react.JSX.Element;
|
|
18
26
|
|
|
19
|
-
export { Radios, RadiosDivider, RadiosHint, RadiosItem };
|
|
20
|
-
export type { RadiosDividerProps, RadiosHintProps, RadiosItemProps, RadiosProps };
|
|
27
|
+
export { Radios, RadiosConditional, RadiosDivider, RadiosHint, RadiosItem };
|
|
28
|
+
export type { RadiosConditionalProps, RadiosDividerProps, RadiosHintProps, RadiosItemProps, RadiosProps };
|
package/dist/ui/radios.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Radios, RadiosDivider, RadiosHint, RadiosItem } from '../chunk-
|
|
1
|
+
export { Radios, RadiosConditional, RadiosDivider, RadiosHint, RadiosItem } from '../chunk-LXPS6UFQ.js';
|
|
2
2
|
import '../chunk-GKHD33N6.js';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface ServiceNavigationProps extends React.ComponentProps<'section'> {
|
|
4
|
+
inverse?: boolean;
|
|
5
|
+
}
|
|
4
6
|
type ServiceNavigationContainerProps = React.ComponentProps<'div'>;
|
|
5
7
|
type ServiceNavigationServiceNameProps = React.ComponentProps<'a'>;
|
|
6
8
|
interface ServiceNavigationNavProps extends React.ComponentProps<'nav'> {
|
|
@@ -11,12 +13,16 @@ interface ServiceNavigationItemProps extends React.ComponentProps<'li'> {
|
|
|
11
13
|
active?: boolean;
|
|
12
14
|
}
|
|
13
15
|
type ServiceNavigationLinkProps = React.ComponentProps<'a'>;
|
|
14
|
-
|
|
16
|
+
interface ServiceNavigationEndProps extends React.ComponentProps<'div'> {
|
|
17
|
+
inline?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const ServiceNavigation: ({ className, inverse, ...props }: ServiceNavigationProps) => react.JSX.Element;
|
|
15
20
|
declare const ServiceNavigationContainer: ({ className, ...props }: ServiceNavigationContainerProps) => react.JSX.Element;
|
|
16
21
|
declare const ServiceNavigationServiceName: ({ className, children, href, ...props }: ServiceNavigationServiceNameProps) => react.JSX.Element;
|
|
17
22
|
declare const ServiceNavigationNav: ({ className, children, menuButtonText, collapseOnMobile, ...props }: ServiceNavigationNavProps) => react.JSX.Element;
|
|
18
23
|
declare const ServiceNavigationItem: ({ className, active, ...props }: ServiceNavigationItemProps) => react.JSX.Element;
|
|
19
24
|
declare const ServiceNavigationLink: ({ className, children, ...props }: ServiceNavigationLinkProps) => react.JSX.Element;
|
|
25
|
+
declare const ServiceNavigationEnd: ({ className, inline, ...props }: ServiceNavigationEndProps) => react.JSX.Element;
|
|
20
26
|
|
|
21
|
-
export { ServiceNavigation, ServiceNavigationContainer, ServiceNavigationItem, ServiceNavigationLink, ServiceNavigationNav, ServiceNavigationServiceName };
|
|
22
|
-
export type { ServiceNavigationContainerProps, ServiceNavigationItemProps, ServiceNavigationLinkProps, ServiceNavigationNavProps, ServiceNavigationProps, ServiceNavigationServiceNameProps };
|
|
27
|
+
export { ServiceNavigation, ServiceNavigationContainer, ServiceNavigationEnd, ServiceNavigationItem, ServiceNavigationLink, ServiceNavigationNav, ServiceNavigationServiceName };
|
|
28
|
+
export type { ServiceNavigationContainerProps, ServiceNavigationEndProps, ServiceNavigationItemProps, ServiceNavigationLinkProps, ServiceNavigationNavProps, ServiceNavigationProps, ServiceNavigationServiceNameProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ServiceNavigation, ServiceNavigationContainer, ServiceNavigationItem, ServiceNavigationLink, ServiceNavigationNav, ServiceNavigationServiceName } from '../chunk-
|
|
1
|
+
export { ServiceNavigation, ServiceNavigationContainer, ServiceNavigationEnd, ServiceNavigationItem, ServiceNavigationLink, ServiceNavigationNav, ServiceNavigationServiceName } from '../chunk-7TI7IVX5.js';
|
|
2
2
|
import '../chunk-GKHD33N6.js';
|
package/dist/ui/task-list.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ interface TaskListStatusProps extends React.ComponentProps<'div'> {
|
|
|
13
13
|
declare const TaskList: ({ className, ...props }: TaskListProps) => react.JSX.Element;
|
|
14
14
|
declare const TaskListItem: ({ className, hasLink, ...props }: TaskListItemProps) => react.JSX.Element;
|
|
15
15
|
declare const TaskListNameAndHint: ({ className, ...props }: TaskListNameAndHintProps) => react.JSX.Element;
|
|
16
|
-
declare const TaskListLink: ({ className, children, ...props }: TaskListLinkProps) => react.JSX.Element;
|
|
16
|
+
declare const TaskListLink: ({ className, children, "aria-describedby": ariaDescribedBy, ...props }: TaskListLinkProps) => react.JSX.Element;
|
|
17
17
|
declare const TaskListHint: ({ className, ...props }: TaskListHintProps) => react.JSX.Element;
|
|
18
18
|
declare const TaskListStatus: ({ className, cannotStartYet, ...props }: TaskListStatusProps) => react.JSX.Element;
|
|
19
19
|
|
package/dist/ui/task-list.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { TaskList, TaskListHint, TaskListItem, TaskListLink, TaskListNameAndHint, TaskListStatus } from '../chunk-
|
|
1
|
+
export { TaskList, TaskListHint, TaskListItem, TaskListLink, TaskListNameAndHint, TaskListStatus } from '../chunk-25PZB34H.js';
|
|
2
2
|
import '../chunk-GKHD33N6.js';
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* `@import "tailwindcss"`:
|
|
10
10
|
*
|
|
11
11
|
* @import "tailwindcss";
|
|
12
|
-
* @import "
|
|
12
|
+
* @import "./styles/govuk-tokens.css"; (path relative to src/index.css)
|
|
13
13
|
*
|
|
14
14
|
* ------------------------------------------------------------------------- */
|
|
15
15
|
|
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
--spacing-govuk-radio-size: 40px;
|
|
133
133
|
--spacing-govuk-radio-touch-target: 44px;
|
|
134
134
|
--spacing-govuk-radio-dot: 10px;
|
|
135
|
+
--spacing-govuk-radio-small-dot: 5px;
|
|
135
136
|
--spacing-govuk-radio-label-padding-x: 15px;
|
|
136
137
|
--spacing-govuk-radio-focus-width: 4px;
|
|
137
138
|
--spacing-govuk-radio-gutter: 4px;
|
|
@@ -253,6 +254,11 @@
|
|
|
253
254
|
var(--color-govuk-yellow);
|
|
254
255
|
}
|
|
255
256
|
|
|
257
|
+
@utility govuk-radio-focus-shadow {
|
|
258
|
+
--govuk-cb-focus-shadow: 0 0 0 var(--spacing-govuk-radio-focus-width)
|
|
259
|
+
var(--color-govuk-yellow);
|
|
260
|
+
}
|
|
261
|
+
|
|
256
262
|
@utility govuk-checkbox-small-hover {
|
|
257
263
|
--govuk-cb-hover-shadow: 0 0 0 var(--spacing-govuk-hover-width)
|
|
258
264
|
var(--color-govuk-mid-grey);
|
package/dist/chunk-4GQRYMDK.js
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-GKHD33N6.js';
|
|
2
|
-
import { useId } from 'react';
|
|
3
|
-
import { RadioGroup } from '@base-ui/react/radio-group';
|
|
4
|
-
import { Radio } from '@base-ui/react/radio';
|
|
5
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var Radios = ({ className, inline, ...props }) => /* @__PURE__ */ jsx(
|
|
8
|
-
RadioGroup,
|
|
9
|
-
{
|
|
10
|
-
className: cn(
|
|
11
|
-
inline && "sm:flex sm:flex-wrap sm:items-start sm:gap-x-govuk-4",
|
|
12
|
-
className
|
|
13
|
-
),
|
|
14
|
-
...props
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
var RadiosItem = ({ className, children, ...props }) => {
|
|
18
|
-
const labelId = useId();
|
|
19
|
-
return /* @__PURE__ */ jsxs(
|
|
20
|
-
"label",
|
|
21
|
-
{
|
|
22
|
-
className: cn(
|
|
23
|
-
"flex flex-wrap items-start",
|
|
24
|
-
"relative",
|
|
25
|
-
"mb-govuk-2 last:mb-0",
|
|
26
|
-
"cursor-pointer",
|
|
27
|
-
"has-data-[disabled]:opacity-50 has-data-[disabled]:cursor-not-allowed",
|
|
28
|
-
className
|
|
29
|
-
),
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ jsxs(
|
|
32
|
-
Radio.Root,
|
|
33
|
-
{
|
|
34
|
-
"aria-labelledby": labelId,
|
|
35
|
-
className: cn(
|
|
36
|
-
"group/radio",
|
|
37
|
-
"relative flex-none",
|
|
38
|
-
"w-govuk-radio-touch-target h-govuk-radio-touch-target",
|
|
39
|
-
"outline-none"
|
|
40
|
-
),
|
|
41
|
-
...props,
|
|
42
|
-
children: [
|
|
43
|
-
/* @__PURE__ */ jsx(
|
|
44
|
-
"span",
|
|
45
|
-
{
|
|
46
|
-
"aria-hidden": "true",
|
|
47
|
-
className: cn(
|
|
48
|
-
"absolute box-border",
|
|
49
|
-
"top-[calc(var(--spacing-govuk-radio-gutter)/2)] left-[calc(var(--spacing-govuk-radio-gutter)/2)]",
|
|
50
|
-
"w-govuk-radio-size h-govuk-radio-size",
|
|
51
|
-
"rounded-full",
|
|
52
|
-
"border-2 border-current bg-transparent",
|
|
53
|
-
"group-focus/radio:border-4",
|
|
54
|
-
"group-focus/radio:shadow-[0_0_0_var(--spacing-govuk-radio-focus-width)_var(--color-govuk-yellow)]",
|
|
55
|
-
"group-focus/radio:outline-govuk-radio-focus-width group-focus/radio:outline-transparent group-focus/radio:outline-offset-1"
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
),
|
|
59
|
-
/* @__PURE__ */ jsx(
|
|
60
|
-
Radio.Indicator,
|
|
61
|
-
{
|
|
62
|
-
keepMounted: true,
|
|
63
|
-
className: cn(
|
|
64
|
-
"absolute",
|
|
65
|
-
"top-[calc(var(--spacing-govuk-radio-touch-target)/2-var(--spacing-govuk-radio-dot))]",
|
|
66
|
-
"left-[calc(var(--spacing-govuk-radio-touch-target)/2-var(--spacing-govuk-radio-dot))]",
|
|
67
|
-
"w-0 h-0",
|
|
68
|
-
"rounded-full",
|
|
69
|
-
"border-(length:--spacing-govuk-radio-dot) border-current",
|
|
70
|
-
"bg-current",
|
|
71
|
-
"opacity-0 data-checked:opacity-100"
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
/* @__PURE__ */ jsx(
|
|
79
|
-
"span",
|
|
80
|
-
{
|
|
81
|
-
id: labelId,
|
|
82
|
-
className: cn(
|
|
83
|
-
"self-center",
|
|
84
|
-
"py-govuk-button-pb px-govuk-radio-label-padding-x",
|
|
85
|
-
"text-govuk-tag font-normal font-govuk",
|
|
86
|
-
"max-w-[calc(100%-74px)]"
|
|
87
|
-
),
|
|
88
|
-
children
|
|
89
|
-
}
|
|
90
|
-
)
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
};
|
|
95
|
-
var RadiosHint = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
96
|
-
"span",
|
|
97
|
-
{
|
|
98
|
-
className: cn(
|
|
99
|
-
"block w-full",
|
|
100
|
-
"-mt-govuk-3 mb-govuk-2 last:mb-0",
|
|
101
|
-
"pr-govuk-radio-label-padding-x",
|
|
102
|
-
"pl-[calc(var(--spacing-govuk-radio-label-padding-x)+var(--spacing-govuk-radio-touch-target))]",
|
|
103
|
-
"text-govuk-tag font-normal font-govuk text-govuk-dark-grey",
|
|
104
|
-
className
|
|
105
|
-
),
|
|
106
|
-
...props
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
var RadiosDivider = ({
|
|
110
|
-
className,
|
|
111
|
-
children = "or",
|
|
112
|
-
...props
|
|
113
|
-
}) => /* @__PURE__ */ jsx(
|
|
114
|
-
"div",
|
|
115
|
-
{
|
|
116
|
-
className: cn(
|
|
117
|
-
"w-govuk-radio-size",
|
|
118
|
-
"mb-govuk-2",
|
|
119
|
-
"text-govuk-tag font-normal font-govuk text-govuk-black",
|
|
120
|
-
"text-center",
|
|
121
|
-
className
|
|
122
|
-
),
|
|
123
|
-
...props,
|
|
124
|
-
children
|
|
125
|
-
}
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
export { Radios, RadiosDivider, RadiosHint, RadiosItem };
|