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
package/dist/chunk-JCERRZV6.js
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-GKHD33N6.js';
|
|
2
|
-
import { useId } from 'react';
|
|
3
|
-
import { Checkbox } from '@base-ui/react/checkbox';
|
|
4
|
-
import { CheckboxGroup } from '@base-ui/react/checkbox-group';
|
|
5
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var Checkboxes = (props) => /* @__PURE__ */ jsx(CheckboxGroup, { ...props });
|
|
8
|
-
var CheckboxesItem = ({
|
|
9
|
-
className,
|
|
10
|
-
children,
|
|
11
|
-
small,
|
|
12
|
-
...props
|
|
13
|
-
}) => {
|
|
14
|
-
const labelId = useId();
|
|
15
|
-
return /* @__PURE__ */ jsxs(
|
|
16
|
-
"label",
|
|
17
|
-
{
|
|
18
|
-
className: cn(
|
|
19
|
-
"flex flex-wrap items-start",
|
|
20
|
-
"relative",
|
|
21
|
-
small ? "group/item mb-0" : "mb-govuk-2 last:mb-0",
|
|
22
|
-
"cursor-pointer touch-manipulation",
|
|
23
|
-
"has-data-[disabled]:opacity-50 has-data-[disabled]:cursor-not-allowed",
|
|
24
|
-
className
|
|
25
|
-
),
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ jsxs(
|
|
28
|
-
Checkbox.Root,
|
|
29
|
-
{
|
|
30
|
-
"aria-labelledby": labelId,
|
|
31
|
-
className: cn(
|
|
32
|
-
"group/checkbox",
|
|
33
|
-
"relative flex-none",
|
|
34
|
-
"w-govuk-checkbox-touch-target h-govuk-checkbox-touch-target",
|
|
35
|
-
"outline-none",
|
|
36
|
-
small && "-ml-govuk-2"
|
|
37
|
-
),
|
|
38
|
-
...props,
|
|
39
|
-
children: [
|
|
40
|
-
/* @__PURE__ */ jsx(
|
|
41
|
-
"span",
|
|
42
|
-
{
|
|
43
|
-
"aria-hidden": "true",
|
|
44
|
-
className: cn(
|
|
45
|
-
"absolute box-border",
|
|
46
|
-
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-checkbox-gutter)/2)] left-[calc(var(--spacing-govuk-checkbox-gutter)/2)] w-govuk-checkbox-size h-govuk-checkbox-size",
|
|
47
|
-
"border-2 border-current bg-transparent",
|
|
48
|
-
"govuk-checkbox-composed-shadow",
|
|
49
|
-
"group-focus/checkbox:border-4",
|
|
50
|
-
"group-focus/checkbox:govuk-checkbox-focus-shadow",
|
|
51
|
-
"group-focus/checkbox:outline-3 group-focus/checkbox:outline-transparent group-focus/checkbox:outline-offset-1",
|
|
52
|
-
small && "group-hover/item:govuk-checkbox-small-hover"
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
/* @__PURE__ */ jsx(
|
|
57
|
-
Checkbox.Indicator,
|
|
58
|
-
{
|
|
59
|
-
keepMounted: true,
|
|
60
|
-
className: cn(
|
|
61
|
-
"absolute box-border",
|
|
62
|
-
small ? "top-govuk-checkbox-small-check-top left-govuk-checkbox-small-check-left w-govuk-checkbox-small-check-width h-govuk-checkbox-small-check-height govuk-checkmark-small" : "top-govuk-checkbox-check-top left-govuk-checkbox-check-left w-govuk-checkbox-check-width h-govuk-checkbox-check-height govuk-checkmark",
|
|
63
|
-
"opacity-0 data-checked:opacity-100"
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
)
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
),
|
|
70
|
-
/* @__PURE__ */ jsx(
|
|
71
|
-
"span",
|
|
72
|
-
{
|
|
73
|
-
id: labelId,
|
|
74
|
-
className: cn(
|
|
75
|
-
"self-center",
|
|
76
|
-
"py-govuk-checkbox-label-padding-y px-govuk-checkbox-label-padding-x",
|
|
77
|
-
"text-govuk-tag font-normal font-govuk",
|
|
78
|
-
small ? "pl-px max-w-[calc(100%-50px)]" : "max-w-[calc(100%-74px)]"
|
|
79
|
-
),
|
|
80
|
-
children
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
};
|
|
87
|
-
var CheckboxesHint = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
88
|
-
"span",
|
|
89
|
-
{
|
|
90
|
-
className: cn(
|
|
91
|
-
"block w-full",
|
|
92
|
-
"-mt-govuk-3 mb-govuk-2 last:mb-0",
|
|
93
|
-
"pr-govuk-checkbox-label-padding-x",
|
|
94
|
-
"pl-[calc(var(--spacing-govuk-checkbox-label-padding-x)+var(--spacing-govuk-checkbox-touch-target))]",
|
|
95
|
-
"text-govuk-tag font-normal font-govuk text-govuk-dark-grey",
|
|
96
|
-
className
|
|
97
|
-
),
|
|
98
|
-
...props
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
var CheckboxesDivider = ({
|
|
102
|
-
className,
|
|
103
|
-
children = "or",
|
|
104
|
-
small,
|
|
105
|
-
...props
|
|
106
|
-
}) => /* @__PURE__ */ jsx(
|
|
107
|
-
"div",
|
|
108
|
-
{
|
|
109
|
-
className: cn(
|
|
110
|
-
small ? "w-govuk-checkbox-small-size mb-govuk-1" : "w-govuk-checkbox-size mb-govuk-2",
|
|
111
|
-
"text-govuk-tag font-normal font-govuk text-govuk-black",
|
|
112
|
-
"text-center",
|
|
113
|
-
className
|
|
114
|
-
),
|
|
115
|
-
...props,
|
|
116
|
-
children
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
var CheckboxesConditional = ({
|
|
120
|
-
className,
|
|
121
|
-
...props
|
|
122
|
-
}) => /* @__PURE__ */ jsx(
|
|
123
|
-
"div",
|
|
124
|
-
{
|
|
125
|
-
className: cn(
|
|
126
|
-
"ml-govuk-checkbox-conditional-ml pl-govuk-checkbox-conditional-pl",
|
|
127
|
-
"mb-govuk-3 sm:mb-govuk-4",
|
|
128
|
-
"border-l-4 border-govuk-grey",
|
|
129
|
-
"*:last:mb-0",
|
|
130
|
-
className
|
|
131
|
-
),
|
|
132
|
-
...props
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
|
|
136
|
-
export { Checkboxes, CheckboxesConditional, CheckboxesDivider, CheckboxesHint, CheckboxesItem };
|
package/dist/chunk-YF6EZ57H.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-GKHD33N6.js';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
var TaskList = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
5
|
-
"ul",
|
|
6
|
-
{
|
|
7
|
-
className: cn(
|
|
8
|
-
"font-govuk text-govuk-body text-govuk-black",
|
|
9
|
-
"mt-0 mb-govuk-r6 p-0 list-none",
|
|
10
|
-
className
|
|
11
|
-
),
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
var TaskListItem = ({ className, hasLink, ...props }) => /* @__PURE__ */ jsx(
|
|
16
|
-
"li",
|
|
17
|
-
{
|
|
18
|
-
className: cn(
|
|
19
|
-
"table relative w-full mb-0",
|
|
20
|
-
"py-govuk-2",
|
|
21
|
-
"border-b border-govuk-mid-grey",
|
|
22
|
-
"first:border-t first:border-t-govuk-mid-grey",
|
|
23
|
-
hasLink && "hover:bg-govuk-light-grey",
|
|
24
|
-
className
|
|
25
|
-
),
|
|
26
|
-
...props
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
var TaskListNameAndHint = ({
|
|
30
|
-
className,
|
|
31
|
-
...props
|
|
32
|
-
}) => /* @__PURE__ */ jsx(
|
|
33
|
-
"div",
|
|
34
|
-
{
|
|
35
|
-
className: cn("table-cell align-top text-govuk-black", className),
|
|
36
|
-
...props
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
var TaskListLink = ({ className, children, ...props }) => /* @__PURE__ */ jsx(
|
|
40
|
-
"a",
|
|
41
|
-
{
|
|
42
|
-
className: cn(
|
|
43
|
-
"text-govuk-link underline govuk-link-underline",
|
|
44
|
-
"visited:text-govuk-visited active:text-govuk-black",
|
|
45
|
-
"hover:text-govuk-brand-hover hover:govuk-link-underline-hover",
|
|
46
|
-
"focus:govuk-link-focus",
|
|
47
|
-
"after:block after:absolute after:inset-0",
|
|
48
|
-
className
|
|
49
|
-
),
|
|
50
|
-
...props,
|
|
51
|
-
children
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
var TaskListHint = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
55
|
-
"div",
|
|
56
|
-
{
|
|
57
|
-
className: cn("mt-govuk-1 text-govuk-dark-grey", className),
|
|
58
|
-
...props
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
var TaskListStatus = ({
|
|
62
|
-
className,
|
|
63
|
-
cannotStartYet,
|
|
64
|
-
...props
|
|
65
|
-
}) => /* @__PURE__ */ jsx(
|
|
66
|
-
"div",
|
|
67
|
-
{
|
|
68
|
-
className: cn(
|
|
69
|
-
"table-cell pl-govuk-2 text-right align-top",
|
|
70
|
-
cannotStartYet ? "text-govuk-dark-grey" : "text-govuk-black",
|
|
71
|
-
className
|
|
72
|
-
),
|
|
73
|
-
...props
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
export { TaskList, TaskListHint, TaskListItem, TaskListLink, TaskListNameAndHint, TaskListStatus };
|