whitehall-ui 2.1.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 +1 -1
- package/dist/{chunk-YMQVN3MH.js → chunk-25PZB34H.js} +7 -2
- package/dist/{chunk-JU7A7KQI.js → chunk-336BAPDV.js} +3 -2
- 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-3NOO2YUQ.js → chunk-LXPS6UFQ.js} +51 -15
- 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 +4 -2
- 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 +12 -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 +6 -0
package/README.md
CHANGED
|
@@ -107,7 +107,7 @@ export function Example() {
|
|
|
107
107
|
|
|
108
108
|
## Available components
|
|
109
109
|
|
|
110
|
-
`accordion` · `back-link` · `breadcrumbs` · `button` · `character-count` · `checkboxes` · `cookie-banner` · `date-input` · `details` · `error-message` · `error-summary` · `exit-this-page` · `feedback` · `fieldset` · `file-upload` · `footer` · `generic-header` · `header` · `hint` · `inset-text` · `label` · `language-navigation` · `link` · `notification-banner` · `pagination` · `panel` · `password-input` · `phase-banner` · `radios` · `select` · `service-navigation` · `skip-link` · `summary-list` · `table` · `tabs` · `tag` · `task-list` · `text-input` · `textarea` · `warning-text`
|
|
110
|
+
`accordion` · `back-link` · `breadcrumbs` · `button` · `character-count` · `checkboxes` · `cookie-banner` · `date-input` · `details` · `error-message` · `error-summary` · `exit-this-page` · `feedback` · `fieldset` · `file-upload` · `footer` · `form-group` · `generic-header` · `header` · `hint` · `inset-text` · `label` · `language-navigation` · `link` · `notification-banner` · `pagination` · `panel` · `password-input` · `phase-banner` · `radios` · `select` · `service-navigation` · `skip-link` · `summary-list` · `table` · `tabs` · `tag` · `task-list` · `text-input` · `textarea` · `warning-text`
|
|
111
111
|
|
|
112
112
|
See the [Storybook](https://dawidmakos.github.io/whitehall-ui/) for props and live examples.
|
|
113
113
|
|
|
@@ -47,12 +47,17 @@ var TaskListNameAndHint = ({
|
|
|
47
47
|
...props
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
|
-
var TaskListLink = ({
|
|
50
|
+
var TaskListLink = ({
|
|
51
|
+
className,
|
|
52
|
+
children,
|
|
53
|
+
"aria-describedby": ariaDescribedBy,
|
|
54
|
+
...props
|
|
55
|
+
}) => {
|
|
51
56
|
const { hintId, statusId } = use(TaskListItemContext);
|
|
52
57
|
return /* @__PURE__ */ jsx(
|
|
53
58
|
"a",
|
|
54
59
|
{
|
|
55
|
-
"aria-describedby": `${hintId} ${statusId}`.trim() || void 0,
|
|
60
|
+
"aria-describedby": `${hintId} ${statusId} ${ariaDescribedBy ?? ""}`.trim() || void 0,
|
|
56
61
|
className: cn(
|
|
57
62
|
"text-govuk-link underline govuk-link-underline",
|
|
58
63
|
"visited:text-govuk-visited active:text-govuk-black",
|
|
@@ -24,7 +24,7 @@ var CheckboxesItem = ({
|
|
|
24
24
|
"relative",
|
|
25
25
|
small ? "group/item mb-0" : "mb-govuk-2 last:mb-0",
|
|
26
26
|
"cursor-pointer touch-manipulation",
|
|
27
|
-
"has-data-
|
|
27
|
+
"has-data-disabled:opacity-50 has-data-disabled:cursor-not-allowed",
|
|
28
28
|
className
|
|
29
29
|
),
|
|
30
30
|
children: [
|
|
@@ -134,12 +134,13 @@ var CheckboxesDivider = ({
|
|
|
134
134
|
);
|
|
135
135
|
var CheckboxesConditional = ({
|
|
136
136
|
className,
|
|
137
|
+
small,
|
|
137
138
|
...props
|
|
138
139
|
}) => /* @__PURE__ */ jsx(
|
|
139
140
|
"div",
|
|
140
141
|
{
|
|
141
142
|
className: cn(
|
|
142
|
-
"ml-govuk-checkbox-conditional-ml pl-govuk-checkbox-conditional-pl",
|
|
143
|
+
small ? "ml-govuk-2 pl-govuk-4" : "ml-govuk-checkbox-conditional-ml pl-govuk-checkbox-conditional-pl",
|
|
143
144
|
"mb-govuk-3 sm:mb-govuk-4",
|
|
144
145
|
"border-l-4 border-govuk-grey",
|
|
145
146
|
"*:last:mb-0",
|
|
@@ -9,6 +9,12 @@ var useHydrated = () => useSyncExternalStore(
|
|
|
9
9
|
() => true,
|
|
10
10
|
() => false
|
|
11
11
|
);
|
|
12
|
+
var inverseLinkStyles = [
|
|
13
|
+
"group-data-inverse/service-nav:text-white",
|
|
14
|
+
"group-data-inverse/service-nav:visited:text-white",
|
|
15
|
+
"group-data-inverse/service-nav:hover:text-white",
|
|
16
|
+
"group-data-inverse/service-nav:active:text-white"
|
|
17
|
+
];
|
|
12
18
|
var linkStyles = [
|
|
13
19
|
"font-govuk cursor-pointer",
|
|
14
20
|
"no-underline hover:underline active:underline",
|
|
@@ -20,14 +26,21 @@ var itemStyles = [
|
|
|
20
26
|
"sm:my-0 sm:inline-block sm:py-govuk-3 sm:leading-govuk-service-nav",
|
|
21
27
|
"sm:not-last:mr-govuk-6"
|
|
22
28
|
];
|
|
23
|
-
var ServiceNavigation = ({
|
|
29
|
+
var ServiceNavigation = ({
|
|
30
|
+
className,
|
|
31
|
+
inverse,
|
|
32
|
+
...props
|
|
33
|
+
}) => /* @__PURE__ */ jsx(
|
|
24
34
|
"section",
|
|
25
35
|
{
|
|
26
36
|
"aria-label": "Service information",
|
|
37
|
+
"data-inverse": inverse || void 0,
|
|
27
38
|
className: cn(
|
|
28
|
-
"font-govuk text-govuk-body
|
|
29
|
-
"
|
|
30
|
-
|
|
39
|
+
"group/service-nav font-govuk text-govuk-body",
|
|
40
|
+
inverse ? "text-white bg-govuk-brand" : [
|
|
41
|
+
"text-govuk-black bg-govuk-surface",
|
|
42
|
+
"border-b border-b-govuk-surface-border"
|
|
43
|
+
],
|
|
31
44
|
className
|
|
32
45
|
),
|
|
33
46
|
...props
|
|
@@ -43,6 +56,8 @@ var ServiceNavigationContainer = ({
|
|
|
43
56
|
"govuk-width-container",
|
|
44
57
|
"flex flex-col items-start",
|
|
45
58
|
"sm:flex-row sm:flex-wrap",
|
|
59
|
+
"group-data-inverse/service-nav:border-y",
|
|
60
|
+
"group-data-inverse/service-nav:border-govuk-surface-border",
|
|
46
61
|
className
|
|
47
62
|
),
|
|
48
63
|
...props
|
|
@@ -64,7 +79,8 @@ var ServiceNavigationServiceName = ({
|
|
|
64
79
|
className: cn(
|
|
65
80
|
"text-govuk-black visited:text-govuk-black",
|
|
66
81
|
"hover:text-govuk-black active:text-govuk-black",
|
|
67
|
-
linkStyles
|
|
82
|
+
linkStyles,
|
|
83
|
+
inverseLinkStyles
|
|
68
84
|
),
|
|
69
85
|
...props,
|
|
70
86
|
children
|
|
@@ -99,6 +115,7 @@ var ServiceNavigationNav = ({
|
|
|
99
115
|
"my-govuk-2 p-0",
|
|
100
116
|
"font-govuk text-govuk-body font-bold",
|
|
101
117
|
"bg-transparent border-0 text-govuk-link cursor-pointer",
|
|
118
|
+
"group-data-inverse/service-nav:text-white",
|
|
102
119
|
"focus:govuk-link-focus"
|
|
103
120
|
),
|
|
104
121
|
onClick: () => setMenuOpen((prev) => !prev),
|
|
@@ -146,7 +163,7 @@ var ServiceNavigationItem = ({
|
|
|
146
163
|
{
|
|
147
164
|
className: cn(
|
|
148
165
|
itemStyles,
|
|
149
|
-
"border-govuk-link",
|
|
166
|
+
"border-govuk-link group-data-inverse/service-nav:border-current",
|
|
150
167
|
active && [
|
|
151
168
|
"max-sm:-ml-govuk-3 max-sm:pl-govuk-2 max-sm:border-l-govuk-standard",
|
|
152
169
|
"sm:border-b-govuk-standard sm:pb-govuk-2"
|
|
@@ -167,11 +184,27 @@ var ServiceNavigationLink = ({
|
|
|
167
184
|
"text-govuk-link visited:text-govuk-link",
|
|
168
185
|
"hover:text-govuk-brand-hover active:text-govuk-black",
|
|
169
186
|
linkStyles,
|
|
187
|
+
inverseLinkStyles,
|
|
170
188
|
className
|
|
171
189
|
),
|
|
172
190
|
...props,
|
|
173
191
|
children
|
|
174
192
|
}
|
|
175
193
|
);
|
|
194
|
+
var ServiceNavigationEnd = ({
|
|
195
|
+
className,
|
|
196
|
+
inline,
|
|
197
|
+
...props
|
|
198
|
+
}) => /* @__PURE__ */ jsx(
|
|
199
|
+
"div",
|
|
200
|
+
{
|
|
201
|
+
className: cn(
|
|
202
|
+
inline ? "sm:ml-auto sm:pl-govuk-6" : "w-full",
|
|
203
|
+
"*:mt-govuk-1 *:mb-govuk-3 sm:*:mt-govuk-3",
|
|
204
|
+
className
|
|
205
|
+
),
|
|
206
|
+
...props
|
|
207
|
+
}
|
|
208
|
+
);
|
|
176
209
|
|
|
177
|
-
export { ServiceNavigation, ServiceNavigationContainer, ServiceNavigationItem, ServiceNavigationLink, ServiceNavigationNav, ServiceNavigationServiceName };
|
|
210
|
+
export { ServiceNavigation, ServiceNavigationContainer, ServiceNavigationEnd, ServiceNavigationItem, ServiceNavigationLink, ServiceNavigationNav, ServiceNavigationServiceName };
|
|
@@ -133,7 +133,7 @@ var AccordionContent = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
133
133
|
Accordion$1.Panel,
|
|
134
134
|
{
|
|
135
135
|
className: cn(
|
|
136
|
-
"pt-govuk-3 pb-govuk-6 sm:pb-govuk-8 [
|
|
136
|
+
"pt-govuk-3 pb-govuk-6 sm:pb-govuk-8 [[hidden]]:py-0 *:last:mb-0",
|
|
137
137
|
className
|
|
138
138
|
),
|
|
139
139
|
...props
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextInput } from './chunk-VCJE5UO2.js';
|
|
2
|
-
import { Button } from './chunk-
|
|
2
|
+
import { Button } from './chunk-IOAJ3OIQ.js';
|
|
3
3
|
import { cn } from './chunk-GKHD33N6.js';
|
|
4
4
|
import { useId, useState, useRef, useEffect } from 'react';
|
|
5
5
|
import { flushSync } from 'react-dom';
|
|
@@ -30,7 +30,7 @@ var LanguageNavigationItem = ({
|
|
|
30
30
|
"flex items-center",
|
|
31
31
|
"not-last:after:block not-last:after:h-[1em] not-last:after:mx-govuk-2",
|
|
32
32
|
"not-last:after:border-r not-last:after:border-govuk-mid-grey",
|
|
33
|
-
"group-data-
|
|
33
|
+
"group-data-inverse/language:not-last:after:border-current",
|
|
34
34
|
className
|
|
35
35
|
),
|
|
36
36
|
...props
|
|
@@ -54,9 +54,9 @@ var LanguageNavigationLink = ({
|
|
|
54
54
|
"hover:govuk-link-underline-hover focus:govuk-link-focus",
|
|
55
55
|
"text-govuk-link visited:text-govuk-visited",
|
|
56
56
|
"hover:text-govuk-brand-hover active:text-govuk-black",
|
|
57
|
-
"group-data-
|
|
58
|
-
"group-data-
|
|
59
|
-
"group-data-
|
|
57
|
+
"group-data-inverse/language:text-white",
|
|
58
|
+
"group-data-inverse/language:visited:text-white",
|
|
59
|
+
"group-data-inverse/language:hover:text-white",
|
|
60
60
|
className
|
|
61
61
|
),
|
|
62
62
|
...props,
|
|
@@ -18,12 +18,12 @@ var buttonVariants = cva(
|
|
|
18
18
|
"active:top-govuk-button-press",
|
|
19
19
|
"focus:border-govuk-yellow focus:outline-3 focus:outline-transparent",
|
|
20
20
|
"focus:shadow-govuk-clear focus:inset-ring-1 focus:inset-ring-govuk-yellow",
|
|
21
|
-
"focus:not-
|
|
22
|
-
"focus:not-
|
|
23
|
-
"focus:not-
|
|
24
|
-
"focus:not-
|
|
25
|
-
"focus:not-
|
|
26
|
-
"data-
|
|
21
|
+
"focus:not-active:not-[:hover]:bg-govuk-yellow",
|
|
22
|
+
"focus:not-active:not-[:hover]:text-govuk-black",
|
|
23
|
+
"focus:not-active:not-[:hover]:shadow-govuk-yellow",
|
|
24
|
+
"focus:not-active:not-[:hover]:inset-ring-0",
|
|
25
|
+
"focus:not-active:not-[:hover]:border-govuk-yellow",
|
|
26
|
+
"data-disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:active:top-0"
|
|
27
27
|
],
|
|
28
28
|
{
|
|
29
29
|
variants: {
|
|
@@ -31,31 +31,31 @@ var buttonVariants = cva(
|
|
|
31
31
|
default: [
|
|
32
32
|
"bg-govuk-green text-white",
|
|
33
33
|
"shadow-govuk-green",
|
|
34
|
-
"hover:not-data-
|
|
34
|
+
"hover:not-data-disabled:bg-govuk-green-hover",
|
|
35
35
|
"visited:text-white active:text-white"
|
|
36
36
|
],
|
|
37
37
|
secondary: [
|
|
38
38
|
"bg-govuk-light-grey text-govuk-black",
|
|
39
39
|
"shadow-govuk-light-grey",
|
|
40
|
-
"hover:not-data-
|
|
40
|
+
"hover:not-data-disabled:bg-govuk-grey",
|
|
41
41
|
"visited:text-govuk-black active:text-govuk-black"
|
|
42
42
|
],
|
|
43
43
|
warning: [
|
|
44
44
|
"bg-govuk-red text-white",
|
|
45
45
|
"shadow-govuk-red",
|
|
46
|
-
"hover:not-data-
|
|
46
|
+
"hover:not-data-disabled:bg-govuk-red-hover",
|
|
47
47
|
"visited:text-white active:text-white"
|
|
48
48
|
],
|
|
49
49
|
inverse: [
|
|
50
50
|
"bg-white text-govuk-brand",
|
|
51
51
|
"shadow-govuk-inverse",
|
|
52
|
-
"hover:not-data-
|
|
52
|
+
"hover:not-data-disabled:bg-govuk-inverse-hover",
|
|
53
53
|
"visited:text-govuk-brand active:text-govuk-brand"
|
|
54
54
|
],
|
|
55
55
|
start: [
|
|
56
56
|
"bg-govuk-green text-white",
|
|
57
57
|
"shadow-govuk-green",
|
|
58
|
-
"hover:not-data-
|
|
58
|
+
"hover:not-data-disabled:bg-govuk-green-hover",
|
|
59
59
|
"visited:text-white active:text-white",
|
|
60
60
|
"font-bold text-govuk-start",
|
|
61
61
|
"inline-flex items-center justify-center"
|
|
@@ -39,7 +39,7 @@ var BreadcrumbsListItem = ({
|
|
|
39
39
|
/* @__PURE__ */ jsx(
|
|
40
40
|
"svg",
|
|
41
41
|
{
|
|
42
|
-
className: "inline-block align-middle mx-govuk-2 -mt-px text-govuk-dark-grey group-data-
|
|
42
|
+
className: "inline-block align-middle mx-govuk-2 -mt-px text-govuk-dark-grey group-data-inverse/breadcrumbs:text-current",
|
|
43
43
|
xmlns: "http://www.w3.org/2000/svg",
|
|
44
44
|
width: "7",
|
|
45
45
|
height: "11",
|
|
@@ -18,6 +18,7 @@ var RadiosItem = ({
|
|
|
18
18
|
className,
|
|
19
19
|
children,
|
|
20
20
|
hint,
|
|
21
|
+
small,
|
|
21
22
|
"aria-describedby": ariaDescribedBy,
|
|
22
23
|
...props
|
|
23
24
|
}) => {
|
|
@@ -30,9 +31,9 @@ var RadiosItem = ({
|
|
|
30
31
|
className: cn(
|
|
31
32
|
"flex flex-wrap items-start",
|
|
32
33
|
"relative",
|
|
33
|
-
"mb-govuk-2 last:mb-0",
|
|
34
|
+
small ? "group/item mb-0" : "mb-govuk-2 last:mb-0",
|
|
34
35
|
"cursor-pointer",
|
|
35
|
-
"has-data-
|
|
36
|
+
"has-data-disabled:opacity-50 has-data-disabled:cursor-not-allowed",
|
|
36
37
|
className
|
|
37
38
|
),
|
|
38
39
|
children: [
|
|
@@ -45,7 +46,8 @@ var RadiosItem = ({
|
|
|
45
46
|
"group/radio",
|
|
46
47
|
"relative flex-none",
|
|
47
48
|
"w-govuk-radio-touch-target h-govuk-radio-touch-target",
|
|
48
|
-
"outline-none"
|
|
49
|
+
"outline-none",
|
|
50
|
+
small && "-ml-govuk-2"
|
|
49
51
|
),
|
|
50
52
|
...props,
|
|
51
53
|
children: [
|
|
@@ -55,13 +57,14 @@ var RadiosItem = ({
|
|
|
55
57
|
"aria-hidden": "true",
|
|
56
58
|
className: cn(
|
|
57
59
|
"absolute box-border",
|
|
58
|
-
"top-[calc(var(--spacing-govuk-radio-gutter)/2)] left-[calc(var(--spacing-govuk-radio-gutter)/2)]",
|
|
59
|
-
"w-govuk-radio-size h-govuk-radio-size",
|
|
60
|
+
small ? "top-govuk-checkbox-small-box-offset left-govuk-checkbox-small-box-offset w-govuk-checkbox-small-size h-govuk-checkbox-small-size" : "top-[calc(var(--spacing-govuk-radio-gutter)/2)] left-[calc(var(--spacing-govuk-radio-gutter)/2)] w-govuk-radio-size h-govuk-radio-size",
|
|
60
61
|
"rounded-full",
|
|
61
62
|
"border-2 border-current bg-transparent",
|
|
63
|
+
"govuk-checkbox-composed-shadow",
|
|
62
64
|
"group-focus/radio:border-4",
|
|
63
|
-
"group-focus/radio:
|
|
64
|
-
"group-focus/radio:outline-govuk-radio-focus-width group-focus/radio:outline-transparent group-focus/radio:outline-offset-1"
|
|
65
|
+
"group-focus/radio:govuk-radio-focus-shadow",
|
|
66
|
+
"group-focus/radio:outline-govuk-radio-focus-width group-focus/radio:outline-transparent group-focus/radio:outline-offset-1",
|
|
67
|
+
small && "group-hover/item:govuk-checkbox-small-hover"
|
|
65
68
|
)
|
|
66
69
|
}
|
|
67
70
|
),
|
|
@@ -71,11 +74,18 @@ var RadiosItem = ({
|
|
|
71
74
|
keepMounted: true,
|
|
72
75
|
className: cn(
|
|
73
76
|
"absolute",
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
small ? [
|
|
78
|
+
"top-[calc(var(--spacing-govuk-radio-touch-target)/2-var(--spacing-govuk-radio-small-dot))]",
|
|
79
|
+
"left-[calc(var(--spacing-govuk-radio-touch-target)/2-var(--spacing-govuk-radio-small-dot))]",
|
|
80
|
+
"border-(length:--spacing-govuk-radio-small-dot)"
|
|
81
|
+
] : [
|
|
82
|
+
"top-[calc(var(--spacing-govuk-radio-touch-target)/2-var(--spacing-govuk-radio-dot))]",
|
|
83
|
+
"left-[calc(var(--spacing-govuk-radio-touch-target)/2-var(--spacing-govuk-radio-dot))]",
|
|
84
|
+
"border-(length:--spacing-govuk-radio-dot)"
|
|
85
|
+
],
|
|
76
86
|
"w-0 h-0",
|
|
77
87
|
"rounded-full",
|
|
78
|
-
"border-
|
|
88
|
+
"border-current",
|
|
79
89
|
"bg-current",
|
|
80
90
|
"opacity-0 data-checked:opacity-100"
|
|
81
91
|
)
|
|
@@ -92,7 +102,7 @@ var RadiosItem = ({
|
|
|
92
102
|
"self-center",
|
|
93
103
|
"py-govuk-button-pb px-govuk-radio-label-padding-x",
|
|
94
104
|
"text-govuk-tag font-normal font-govuk",
|
|
95
|
-
"max-w-[calc(100%-74px)]"
|
|
105
|
+
small ? "pl-px max-w-[calc(100%-50px)]" : "max-w-[calc(100%-74px)]"
|
|
96
106
|
),
|
|
97
107
|
children
|
|
98
108
|
}
|
|
@@ -100,7 +110,16 @@ var RadiosItem = ({
|
|
|
100
110
|
]
|
|
101
111
|
}
|
|
102
112
|
),
|
|
103
|
-
hint && /* @__PURE__ */ jsx(
|
|
113
|
+
hint && /* @__PURE__ */ jsx(
|
|
114
|
+
RadiosHint,
|
|
115
|
+
{
|
|
116
|
+
id: hintId,
|
|
117
|
+
className: cn(
|
|
118
|
+
small && "pl-[calc(var(--spacing-govuk-radio-touch-target)-var(--spacing-govuk-2))]"
|
|
119
|
+
),
|
|
120
|
+
children: hint
|
|
121
|
+
}
|
|
122
|
+
)
|
|
104
123
|
] });
|
|
105
124
|
};
|
|
106
125
|
var RadiosHint = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
@@ -120,13 +139,13 @@ var RadiosHint = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
120
139
|
var RadiosDivider = ({
|
|
121
140
|
className,
|
|
122
141
|
children = "or",
|
|
142
|
+
small,
|
|
123
143
|
...props
|
|
124
144
|
}) => /* @__PURE__ */ jsx(
|
|
125
145
|
"div",
|
|
126
146
|
{
|
|
127
147
|
className: cn(
|
|
128
|
-
"w-govuk-radio-size",
|
|
129
|
-
"mb-govuk-2",
|
|
148
|
+
small ? "w-govuk-checkbox-small-size mb-govuk-1" : "w-govuk-radio-size mb-govuk-2",
|
|
130
149
|
"text-govuk-tag font-normal font-govuk text-govuk-black",
|
|
131
150
|
"text-center",
|
|
132
151
|
className
|
|
@@ -135,5 +154,22 @@ var RadiosDivider = ({
|
|
|
135
154
|
children
|
|
136
155
|
}
|
|
137
156
|
);
|
|
157
|
+
var RadiosConditional = ({
|
|
158
|
+
className,
|
|
159
|
+
small,
|
|
160
|
+
...props
|
|
161
|
+
}) => /* @__PURE__ */ jsx(
|
|
162
|
+
"div",
|
|
163
|
+
{
|
|
164
|
+
className: cn(
|
|
165
|
+
small ? "ml-govuk-2 pl-govuk-4" : "ml-govuk-checkbox-conditional-ml pl-govuk-checkbox-conditional-pl",
|
|
166
|
+
"mb-govuk-3 sm:mb-govuk-4",
|
|
167
|
+
"border-l-4 border-govuk-grey",
|
|
168
|
+
"*:last:mb-0",
|
|
169
|
+
className
|
|
170
|
+
),
|
|
171
|
+
...props
|
|
172
|
+
}
|
|
173
|
+
);
|
|
138
174
|
|
|
139
|
-
export { Radios, RadiosDivider, RadiosHint, RadiosItem };
|
|
175
|
+
export { Radios, RadiosConditional, RadiosDivider, RadiosHint, RadiosItem };
|
|
@@ -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
|
@@ -16,8 +16,10 @@ interface CheckboxesDividerProps extends React.ComponentProps<'div'> {
|
|
|
16
16
|
small?: boolean;
|
|
17
17
|
}
|
|
18
18
|
declare const CheckboxesDivider: ({ className, children, small, ...props }: CheckboxesDividerProps) => react.JSX.Element;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
interface CheckboxesConditionalProps extends React.ComponentProps<'div'> {
|
|
20
|
+
small?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const CheckboxesConditional: ({ className, small, ...props }: CheckboxesConditionalProps) => react.JSX.Element;
|
|
21
23
|
|
|
22
24
|
export { Checkboxes, CheckboxesConditional, CheckboxesDivider, CheckboxesHint, CheckboxesItem };
|
|
23
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
|
@@ -10,12 +10,19 @@ declare const Radios: ({ className, inline, ...props }: RadiosProps) => react.JS
|
|
|
10
10
|
interface RadiosItemProps extends Omit<React.ComponentProps<typeof Radio.Root>, 'className'> {
|
|
11
11
|
className?: string;
|
|
12
12
|
hint?: React.ReactNode;
|
|
13
|
+
small?: boolean;
|
|
13
14
|
}
|
|
14
|
-
declare const RadiosItem: ({ className, children, hint, "aria-describedby": ariaDescribedBy, ...props }: RadiosItemProps) => react.JSX.Element;
|
|
15
|
+
declare const RadiosItem: ({ className, children, hint, small, "aria-describedby": ariaDescribedBy, ...props }: RadiosItemProps) => react.JSX.Element;
|
|
15
16
|
type RadiosHintProps = React.ComponentProps<'span'>;
|
|
16
17
|
declare const RadiosHint: ({ className, ...props }: RadiosHintProps) => react.JSX.Element;
|
|
17
|
-
|
|
18
|
-
|
|
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;
|
|
19
26
|
|
|
20
|
-
export { Radios, RadiosDivider, RadiosHint, RadiosItem };
|
|
21
|
-
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
|
@@ -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);
|