whitehall-ui 1.0.0 → 2.0.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.
Files changed (145) hide show
  1. package/README.md +4 -1
  2. package/dist/{chunk-KWAC6IEK.js → chunk-2KB4IAMZ.js} +9 -22
  3. package/dist/{chunk-5TI2WXYU.js → chunk-3UX7QPLM.js} +10 -21
  4. package/dist/{chunk-SK27BMU5.js → chunk-4GQRYMDK.js} +11 -23
  5. package/dist/{chunk-OP35ZJ4X.js → chunk-4TBXH62Z.js} +6 -7
  6. package/dist/{chunk-M6CLPMRP.js → chunk-6WLHJ5MN.js} +34 -76
  7. package/dist/chunk-7IOR7UNU.js +77 -0
  8. package/dist/chunk-7Q2C5RB7.js +167 -0
  9. package/dist/{chunk-5PIQJ22R.js → chunk-ASBIQC77.js} +13 -18
  10. package/dist/{chunk-KD4LPFIZ.js → chunk-C2YQVLZ7.js} +15 -18
  11. package/dist/chunk-CBT6WCJ7.js +52 -0
  12. package/dist/{chunk-3YIKJK6M.js → chunk-CYBPAHLZ.js} +48 -52
  13. package/dist/{chunk-VB6V3PHD.js → chunk-D2T6BUOB.js} +6 -16
  14. package/dist/chunk-DZ3743JO.js +38 -0
  15. package/dist/{chunk-AO6HPG4R.js → chunk-EDOSCND4.js} +5 -20
  16. package/dist/chunk-FJHNUBEM.js +59 -0
  17. package/dist/chunk-FVBDMMNR.js +143 -0
  18. package/dist/chunk-GKHD33N6.js +52 -0
  19. package/dist/{chunk-3INCIYDO.js → chunk-GLDCEDTR.js} +22 -77
  20. package/dist/{chunk-G6T44BDV.js → chunk-HBLVAX45.js} +7 -11
  21. package/dist/{chunk-UWQFFFTB.js → chunk-JCERRZV6.js} +13 -13
  22. package/dist/chunk-KXQGZLMK.js +120 -0
  23. package/dist/{chunk-CEPBVMFU.js → chunk-MFI5R2TJ.js} +1 -3
  24. package/dist/{chunk-5XNKIBMP.js → chunk-MYMVHSRJ.js} +3 -4
  25. package/dist/chunk-N5PY3VZH.js +192 -0
  26. package/dist/{chunk-P4GCF5FQ.js → chunk-OQILIT3B.js} +26 -15
  27. package/dist/{chunk-6VXVJERU.js → chunk-QKR7NELW.js} +4 -8
  28. package/dist/chunk-QPN5J5IU.js +177 -0
  29. package/dist/chunk-RGXB6M3G.js +87 -0
  30. package/dist/chunk-TAVSU2XB.js +90 -0
  31. package/dist/chunk-TGNN5ZP3.js +81 -0
  32. package/dist/chunk-TICBCBDN.js +18 -0
  33. package/dist/{chunk-7ZCZQN5N.js → chunk-UK7RLSTJ.js} +15 -22
  34. package/dist/chunk-UXOJELVU.js +37 -0
  35. package/dist/{chunk-QTSEOPVX.js → chunk-VCJE5UO2.js} +23 -25
  36. package/dist/{chunk-N67H5OUQ.js → chunk-VHSAXVCF.js} +7 -5
  37. package/dist/chunk-VMI2XU5D.js +74 -0
  38. package/dist/{chunk-TXGBUZB4.js → chunk-VRGDQ3SF.js} +3 -10
  39. package/dist/chunk-W4CWUYTA.js +44 -0
  40. package/dist/{chunk-LRNZYPC2.js → chunk-YF6EZ57H.js} +14 -44
  41. package/dist/chunk-ZAKQHDVD.js +40 -0
  42. package/dist/chunk-ZJB7BBTN.js +188 -0
  43. package/dist/index.d.ts +15 -13
  44. package/dist/index.js +41 -39
  45. package/dist/lib/utils.d.ts +2 -1
  46. package/dist/lib/utils.js +1 -1
  47. package/dist/ui/accordion.d.ts +8 -13
  48. package/dist/ui/accordion.js +2 -2
  49. package/dist/ui/back-link.d.ts +4 -4
  50. package/dist/ui/back-link.js +2 -2
  51. package/dist/ui/breadcrumbs.d.ts +10 -16
  52. package/dist/ui/breadcrumbs.js +2 -2
  53. package/dist/ui/button.d.ts +7 -8
  54. package/dist/ui/button.js +2 -2
  55. package/dist/ui/character-count.d.ts +11 -15
  56. package/dist/ui/character-count.js +3 -3
  57. package/dist/ui/checkboxes.d.ts +9 -17
  58. package/dist/ui/checkboxes.js +2 -2
  59. package/dist/ui/cookie-banner.d.ts +12 -21
  60. package/dist/ui/cookie-banner.js +2 -2
  61. package/dist/ui/date-input.d.ts +10 -16
  62. package/dist/ui/date-input.js +2 -2
  63. package/dist/ui/details.d.ts +8 -17
  64. package/dist/ui/details.js +2 -2
  65. package/dist/ui/error-message.d.ts +4 -4
  66. package/dist/ui/error-message.js +2 -2
  67. package/dist/ui/error-summary.d.ts +5 -4
  68. package/dist/ui/error-summary.js +2 -2
  69. package/dist/ui/exit-this-page.d.ts +4 -4
  70. package/dist/ui/exit-this-page.js +3 -3
  71. package/dist/ui/feedback.d.ts +13 -0
  72. package/dist/ui/feedback.js +2 -0
  73. package/dist/ui/fieldset.d.ts +9 -13
  74. package/dist/ui/fieldset.js +2 -2
  75. package/dist/ui/file-upload.d.ts +4 -5
  76. package/dist/ui/file-upload.js +2 -2
  77. package/dist/ui/footer.d.ts +39 -50
  78. package/dist/ui/footer.js +2 -2
  79. package/dist/ui/generic-header.d.ts +10 -15
  80. package/dist/ui/generic-header.js +2 -2
  81. package/dist/ui/header.d.ts +14 -32
  82. package/dist/ui/header.js +2 -2
  83. package/dist/ui/hint.d.ts +4 -5
  84. package/dist/ui/hint.js +2 -2
  85. package/dist/ui/inset-text.d.ts +4 -5
  86. package/dist/ui/inset-text.js +2 -2
  87. package/dist/ui/label.d.ts +7 -9
  88. package/dist/ui/label.js +2 -2
  89. package/dist/ui/language-navigation.d.ts +20 -0
  90. package/dist/ui/language-navigation.js +2 -0
  91. package/dist/ui/link.d.ts +5 -6
  92. package/dist/ui/link.js +2 -2
  93. package/dist/ui/notification-banner.d.ts +15 -24
  94. package/dist/ui/notification-banner.js +2 -2
  95. package/dist/ui/pagination.d.ts +20 -34
  96. package/dist/ui/pagination.js +2 -2
  97. package/dist/ui/panel.d.ts +11 -12
  98. package/dist/ui/panel.js +2 -2
  99. package/dist/ui/password-input.d.ts +7 -6
  100. package/dist/ui/password-input.js +4 -4
  101. package/dist/ui/phase-banner.d.ts +10 -17
  102. package/dist/ui/phase-banner.js +2 -2
  103. package/dist/ui/radios.d.ts +8 -13
  104. package/dist/ui/radios.js +2 -2
  105. package/dist/ui/select.d.ts +6 -30
  106. package/dist/ui/select.js +2 -2
  107. package/dist/ui/service-navigation.d.ts +15 -23
  108. package/dist/ui/service-navigation.js +2 -2
  109. package/dist/ui/skip-link.d.ts +4 -5
  110. package/dist/ui/skip-link.js +2 -2
  111. package/dist/ui/summary-list.d.ts +24 -41
  112. package/dist/ui/summary-list.js +2 -2
  113. package/dist/ui/table.d.ts +21 -26
  114. package/dist/ui/table.js +2 -2
  115. package/dist/ui/tabs.d.ts +7 -9
  116. package/dist/ui/tabs.js +2 -2
  117. package/dist/ui/tag.d.ts +4 -6
  118. package/dist/ui/tag.js +2 -2
  119. package/dist/ui/task-list.d.ts +14 -23
  120. package/dist/ui/task-list.js +2 -2
  121. package/dist/ui/text-input.d.ts +5 -6
  122. package/dist/ui/text-input.js +2 -2
  123. package/dist/ui/textarea.d.ts +4 -6
  124. package/dist/ui/textarea.js +2 -2
  125. package/dist/ui/warning-text.d.ts +4 -4
  126. package/dist/ui/warning-text.js +2 -2
  127. package/package.json +111 -263
  128. package/registry/default/theme/govuk-tokens.css +207 -40
  129. package/dist/chunk-2QKZ6DPC.js +0 -27
  130. package/dist/chunk-4MXR4WNS.js +0 -17
  131. package/dist/chunk-5AKGRLG2.js +0 -190
  132. package/dist/chunk-5H55YDJS.js +0 -69
  133. package/dist/chunk-72PH2FMG.js +0 -180
  134. package/dist/chunk-GUZIKVAE.js +0 -119
  135. package/dist/chunk-JESMK3XK.js +0 -105
  136. package/dist/chunk-JFZN5XP6.js +0 -88
  137. package/dist/chunk-NRXTKHI2.js +0 -169
  138. package/dist/chunk-PGZHPAT5.js +0 -183
  139. package/dist/chunk-RPV43YDC.js +0 -93
  140. package/dist/chunk-VQOCX44T.js +0 -41
  141. package/dist/chunk-WONVZ7WK.js +0 -29
  142. package/dist/chunk-WPPWPEFV.js +0 -150
  143. package/dist/chunk-XQOYWPKV.js +0 -48
  144. package/dist/chunk-YAKI4SI7.js +0 -205
  145. package/dist/chunk-YCLGXX3R.js +0 -68
@@ -1,15 +1,15 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
1
+ import { cn } from './chunk-GKHD33N6.js';
2
2
  import { cva } from 'class-variance-authority';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
5
  var textareaVariants = cva(
6
6
  [
7
- "box-border w-full",
7
+ "box-border block w-full mb-govuk-r6",
8
8
  "p-govuk-1",
9
9
  "border-2 border-govuk-black",
10
10
  "rounded-none",
11
11
  "appearance-none resize-y",
12
- "text-govuk-body font-normal font-govuk",
12
+ "text-govuk-body leading-tight font-normal font-govuk",
13
13
  "focus:outline-3 focus:outline-govuk-yellow focus:outline-offset-0",
14
14
  "focus:inset-ring-2 focus:inset-ring-govuk-black",
15
15
  "disabled:opacity-50 disabled:bg-transparent disabled:cursor-not-allowed"
@@ -17,31 +17,16 @@ var textareaVariants = cva(
17
17
  {
18
18
  variants: {
19
19
  error: {
20
- true: "border-govuk-error focus:border-govuk-black",
21
- false: ""
20
+ true: "border-govuk-error focus:border-govuk-black"
22
21
  }
23
- },
24
- defaultVariants: {
25
- error: false
26
22
  }
27
23
  }
28
24
  );
29
- var Textarea = ({
30
- className,
31
- error = false,
32
- rows = 5,
33
- disabled = false,
34
- "aria-describedby": ariaDescribedBy,
35
- ref,
36
- ...props
37
- }) => /* @__PURE__ */ jsx(
25
+ var Textarea = ({ className, error, rows = 5, ...props }) => /* @__PURE__ */ jsx(
38
26
  "textarea",
39
27
  {
40
- ref,
41
28
  rows,
42
- disabled,
43
29
  "aria-invalid": error || void 0,
44
- "aria-describedby": ariaDescribedBy || void 0,
45
30
  className: cn(textareaVariants({ error }), className),
46
31
  ...props
47
32
  }
@@ -0,0 +1,59 @@
1
+ import { cn } from './chunk-GKHD33N6.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ var CookieBanner = ({ className, ...props }) => /* @__PURE__ */ jsx(
5
+ "section",
6
+ {
7
+ "aria-label": "Cookie banner",
8
+ "data-nosnippet": true,
9
+ className: cn(
10
+ "font-govuk text-govuk-body text-govuk-black",
11
+ "pt-govuk-4",
12
+ "border-b-govuk-wide border-b-transparent",
13
+ "bg-govuk-surface",
14
+ className
15
+ ),
16
+ ...props
17
+ }
18
+ );
19
+ var CookieBannerMessage = ({
20
+ className,
21
+ ...props
22
+ }) => /* @__PURE__ */ jsx(
23
+ "div",
24
+ {
25
+ className: cn(
26
+ "govuk-width-container",
27
+ "-mb-govuk-2",
28
+ "focus:outline-none",
29
+ className
30
+ ),
31
+ ...props
32
+ }
33
+ );
34
+ var CookieBannerContent = ({
35
+ className,
36
+ ...props
37
+ }) => /* @__PURE__ */ jsx("div", { className: cn("sm:w-2/3", className), ...props });
38
+ var CookieBannerHeading = ({
39
+ className,
40
+ children,
41
+ ...props
42
+ }) => /* @__PURE__ */ jsx(
43
+ "h2",
44
+ {
45
+ className: cn(
46
+ "text-govuk-heading-m font-bold text-govuk-black",
47
+ "m-0 mb-govuk-3 sm:mb-govuk-4",
48
+ className
49
+ ),
50
+ ...props,
51
+ children
52
+ }
53
+ );
54
+ var CookieBannerActions = ({
55
+ className,
56
+ ...props
57
+ }) => /* @__PURE__ */ jsx("div", { className: cn("govuk-button-group", className), ...props });
58
+
59
+ export { CookieBanner, CookieBannerActions, CookieBannerContent, CookieBannerHeading, CookieBannerMessage };
@@ -0,0 +1,143 @@
1
+ import { cn } from './chunk-GKHD33N6.js';
2
+ import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
3
+ import { useState } from 'react';
4
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
5
+
6
+ var ChevronIcon = ({ className }) => /* @__PURE__ */ jsxs(
7
+ "svg",
8
+ {
9
+ className,
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ width: "20",
12
+ height: "20",
13
+ viewBox: "0 0 20 20",
14
+ "aria-hidden": "true",
15
+ focusable: "false",
16
+ children: [
17
+ /* @__PURE__ */ jsx(
18
+ "circle",
19
+ {
20
+ className: "fill-none stroke-current group-hover:fill-govuk-black group-hover:stroke-govuk-black group-focus-visible:fill-govuk-black group-focus-visible:stroke-govuk-black",
21
+ cx: "10",
22
+ cy: "10",
23
+ r: "9",
24
+ strokeWidth: "1"
25
+ }
26
+ ),
27
+ /* @__PURE__ */ jsx(
28
+ "polyline",
29
+ {
30
+ className: "fill-none stroke-current group-hover:stroke-govuk-light-grey group-focus-visible:stroke-govuk-yellow",
31
+ points: "6.5 8.5 10 12 13.5 8.5",
32
+ strokeWidth: "2",
33
+ strokeLinecap: "round",
34
+ strokeLinejoin: "round"
35
+ }
36
+ )
37
+ ]
38
+ }
39
+ );
40
+ var Accordion = ({
41
+ className,
42
+ children,
43
+ showAllSections,
44
+ defaultValue,
45
+ ...props
46
+ }) => {
47
+ const [openSections, setOpenSections] = useState(defaultValue ?? []);
48
+ const allOpen = !!showAllSections?.length && showAllSections.every((section) => openSections.includes(section));
49
+ return /* @__PURE__ */ jsxs(
50
+ Accordion$1.Root,
51
+ {
52
+ multiple: true,
53
+ hiddenUntilFound: true,
54
+ value: openSections,
55
+ onValueChange: setOpenSections,
56
+ className: cn(
57
+ "mb-govuk-r6 font-govuk text-govuk-body text-govuk-black",
58
+ "border-b border-govuk-mid-grey",
59
+ className
60
+ ),
61
+ ...props,
62
+ children: [
63
+ showAllSections && /* @__PURE__ */ jsx("div", { className: "pb-govuk-1", children: /* @__PURE__ */ jsxs(
64
+ "button",
65
+ {
66
+ type: "button",
67
+ onClick: () => setOpenSections(allOpen ? [] : showAllSections),
68
+ "aria-expanded": allOpen,
69
+ className: cn(
70
+ "group inline-flex items-center",
71
+ "py-govuk-1 border-0 bg-transparent cursor-pointer",
72
+ "font-govuk text-govuk-body text-govuk-link",
73
+ "hover:text-govuk-black hover:bg-govuk-light-grey",
74
+ "focus-visible:govuk-link-focus focus-visible:outline-none"
75
+ ),
76
+ children: [
77
+ /* @__PURE__ */ jsx(
78
+ ChevronIcon,
79
+ {
80
+ className: cn("transition-transform", allOpen && "rotate-180")
81
+ }
82
+ ),
83
+ /* @__PURE__ */ jsx("span", { className: "ml-govuk-1", children: allOpen ? "Hide all sections" : "Show all sections" })
84
+ ]
85
+ }
86
+ ) }),
87
+ children
88
+ ]
89
+ }
90
+ );
91
+ };
92
+ var AccordionSection = (props) => /* @__PURE__ */ jsx(Accordion$1.Item, { ...props });
93
+ var AccordionHeading = ({
94
+ className,
95
+ children,
96
+ summary,
97
+ ...props
98
+ }) => /* @__PURE__ */ jsx(Accordion$1.Header, { render: /* @__PURE__ */ jsx("h2", {}), className: "m-0 p-0", children: /* @__PURE__ */ jsxs(
99
+ Accordion$1.Trigger,
100
+ {
101
+ className: cn(
102
+ "group w-full",
103
+ "pt-govuk-2 pb-govuk-2 sm:pb-govuk-4 max-sm:data-panel-open:pb-govuk-3",
104
+ "govuk-accordion-button-border",
105
+ "bg-transparent cursor-pointer text-left",
106
+ "hover:bg-govuk-light-grey",
107
+ "focus-visible:outline-none",
108
+ className
109
+ ),
110
+ ...props,
111
+ children: [
112
+ /* @__PURE__ */ jsx("span", { className: "block mb-govuk-2", children: /* @__PURE__ */ jsx("span", { className: "text-govuk-heading-m font-bold text-govuk-black group-focus-visible:govuk-link-focus", children }) }),
113
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: ", " }),
114
+ summary && /* @__PURE__ */ jsxs(Fragment, { children: [
115
+ /* @__PURE__ */ jsx("span", { className: "block mb-govuk-2", children: /* @__PURE__ */ jsx("span", { className: "text-govuk-body text-govuk-black group-focus-visible:govuk-link-focus", children: summary }) }),
116
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: ", " })
117
+ ] }),
118
+ /* @__PURE__ */ jsx("span", { className: "block mb-govuk-2", "data-nosnippet": true, children: /* @__PURE__ */ jsxs("span", { className: "group-focus-visible:govuk-link-focus inline-flex items-center text-govuk-body text-govuk-link group-hover:text-govuk-black", children: [
119
+ /* @__PURE__ */ jsx(ChevronIcon, { className: "align-middle transition-transform group-data-panel-open:rotate-180" }),
120
+ /* @__PURE__ */ jsxs("span", { className: "ml-govuk-1 group-data-panel-open:hidden", children: [
121
+ "Show",
122
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: " this section" })
123
+ ] }),
124
+ /* @__PURE__ */ jsxs("span", { className: "ml-govuk-1 hidden group-data-panel-open:inline", children: [
125
+ "Hide",
126
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: " this section" })
127
+ ] })
128
+ ] }) })
129
+ ]
130
+ }
131
+ ) });
132
+ var AccordionContent = ({ className, ...props }) => /* @__PURE__ */ jsx(
133
+ Accordion$1.Panel,
134
+ {
135
+ className: cn(
136
+ "pt-govuk-3 pb-govuk-6 sm:pb-govuk-8 [&[hidden]]:py-0 *:last:mb-0",
137
+ className
138
+ ),
139
+ ...props
140
+ }
141
+ );
142
+
143
+ export { Accordion, AccordionContent, AccordionHeading, AccordionSection };
@@ -0,0 +1,52 @@
1
+ import { clsx } from 'clsx';
2
+ import { extendTailwindMerge } from 'tailwind-merge';
3
+
4
+ // registry/default/lib/utils.ts
5
+ var govukBorderWidths = [
6
+ "govuk-standard",
7
+ "govuk-wide",
8
+ "govuk-exit-page-dot",
9
+ "govuk-warning-icon-border"
10
+ ];
11
+ var twMerge = extendTailwindMerge({
12
+ extend: {
13
+ theme: {
14
+ spacing: [(value) => value.startsWith("govuk-")]
15
+ },
16
+ classGroups: {
17
+ "border-w": [{ border: govukBorderWidths }],
18
+ "border-w-t": [{ "border-t": govukBorderWidths }],
19
+ "border-w-b": [{ "border-b": govukBorderWidths }],
20
+ "border-w-l": [{ "border-l": govukBorderWidths }],
21
+ "font-size": [
22
+ {
23
+ text: [
24
+ "govuk-header",
25
+ "govuk-header-link",
26
+ "govuk-body",
27
+ "govuk-body-small",
28
+ "govuk-tag",
29
+ "govuk-start",
30
+ "govuk-heading-xl",
31
+ "govuk-heading-l",
32
+ "govuk-heading-m",
33
+ "govuk-warning-icon",
34
+ "govuk-phase-banner"
35
+ ]
36
+ }
37
+ ]
38
+ }
39
+ }
40
+ });
41
+ var cn = (...inputs) => twMerge(clsx(inputs));
42
+ var mergeRefs = (...refs) => (node) => {
43
+ for (const ref of refs) {
44
+ if (typeof ref === "function") {
45
+ ref(node);
46
+ } else if (ref) {
47
+ ref.current = node;
48
+ }
49
+ }
50
+ };
51
+
52
+ export { cn, mergeRefs };
@@ -1,132 +1,93 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
1
+ import { cn } from './chunk-GKHD33N6.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
 
4
- var SummaryList = ({
5
- className,
6
- noBorder,
7
- ref,
8
- children,
9
- ...props
10
- }) => /* @__PURE__ */ jsx(
4
+ var SummaryList = ({ className, noBorder, ...props }) => /* @__PURE__ */ jsx(
11
5
  "dl",
12
6
  {
13
- ref,
14
7
  className: cn(
15
8
  "font-govuk text-govuk-body text-govuk-black",
16
- "m-0 mb-govuk-6",
9
+ "m-0 mb-govuk-r6",
17
10
  "sm:table sm:w-full sm:table-fixed sm:border-collapse",
18
11
  noBorder && "[&_div]:border-0 sm:[&_dt]:pb-2.75 sm:[&_dd]:pb-2.75",
19
12
  className
20
13
  ),
21
- ...props,
22
- children
14
+ ...props
23
15
  }
24
16
  );
25
17
  var SummaryListRow = ({
26
18
  className,
27
19
  noBorder,
28
20
  noActions,
29
- ref,
30
- children,
31
21
  ...props
32
22
  }) => /* @__PURE__ */ jsx(
33
23
  "div",
34
24
  {
35
- ref,
36
25
  className: cn(
37
26
  "border-b border-govuk-mid-grey",
38
27
  "max-sm:mb-govuk-3",
39
28
  "sm:table-row",
40
29
  noBorder && "border-0 sm:[&>dt]:pb-2.75 sm:[&>dd]:pb-2.75",
41
- noActions && 'sm:after:content-[""] sm:after:table-cell sm:after:w-[20%]',
30
+ noActions && "sm:after:table-cell sm:after:w-1/5",
42
31
  className
43
32
  ),
44
- ...props,
45
- children
33
+ ...props
46
34
  }
47
35
  );
48
- var SummaryListKey = ({
49
- className,
50
- ref,
51
- children,
52
- ...props
53
- }) => /* @__PURE__ */ jsx(
36
+ var SummaryListKey = ({ className, ...props }) => /* @__PURE__ */ jsx(
54
37
  "dt",
55
38
  {
56
- ref,
57
39
  className: cn(
58
40
  "m-0 mb-govuk-1 font-bold",
59
41
  "wrap-break-word",
60
- "sm:table-cell sm:pt-govuk-2 sm:pr-govuk-4 sm:pb-govuk-2 sm:align-top sm:w-[30%]",
42
+ "sm:table-cell sm:pt-govuk-2 sm:pr-govuk-4 sm:pb-govuk-2 sm:align-top sm:w-3/10",
61
43
  className
62
44
  ),
63
- ...props,
64
- children
45
+ ...props
65
46
  }
66
47
  );
67
- var SummaryListValue = ({
68
- className,
69
- ref,
70
- children,
71
- ...props
72
- }) => /* @__PURE__ */ jsx(
48
+ var SummaryListValue = ({ className, ...props }) => /* @__PURE__ */ jsx(
73
49
  "dd",
74
50
  {
75
- ref,
76
51
  className: cn(
77
52
  "m-0 max-sm:mb-govuk-3",
78
- "wrap-break-word",
53
+ "wrap-break-word [&>p]:mb-govuk-2 *:last:mb-0",
79
54
  "sm:table-cell sm:pt-govuk-2 sm:pr-govuk-4 sm:pb-govuk-2 sm:align-top",
80
55
  className
81
56
  ),
82
- ...props,
83
- children
57
+ ...props
84
58
  }
85
59
  );
86
60
  var SummaryListActions = ({
87
61
  className,
88
- ref,
89
- children,
90
62
  ...props
91
63
  }) => /* @__PURE__ */ jsx(
92
64
  "dd",
93
65
  {
94
- ref,
95
66
  className: cn(
96
67
  "m-0 mb-govuk-3",
97
- "sm:table-cell sm:pt-govuk-2 sm:pb-govuk-2 sm:w-[20%] sm:text-right sm:align-top",
68
+ "sm:table-cell sm:pt-govuk-2 sm:pb-govuk-2 sm:w-1/5 sm:text-right sm:align-top",
98
69
  className
99
70
  ),
100
- ...props,
101
- children
71
+ ...props
102
72
  }
103
73
  );
104
- var SummaryListCard = ({
105
- className,
106
- ref,
107
- children,
108
- ...props
109
- }) => /* @__PURE__ */ jsx(
74
+ var SummaryListCard = ({ className, ...props }) => /* @__PURE__ */ jsx(
110
75
  "div",
111
76
  {
112
- ref,
113
- className: cn("mb-govuk-6 border border-govuk-mid-grey", className),
114
- ...props,
115
- children
77
+ className: cn("mb-govuk-r6 border border-govuk-mid-grey", className),
78
+ ...props
116
79
  }
117
80
  );
118
81
  var SummaryListCardTitle = ({
119
82
  className,
120
- ref,
121
83
  children,
122
84
  ...props
123
85
  }) => /* @__PURE__ */ jsx(
124
86
  "h2",
125
87
  {
126
- ref,
127
88
  className: cn(
128
89
  "font-govuk text-govuk-body font-bold text-govuk-black",
129
- "m-0 mr-govuk-4 mb-govuk-1",
90
+ "mt-govuk-1 mr-govuk-4 mb-govuk-2 sm:mb-govuk-1",
130
91
  className
131
92
  ),
132
93
  ...props,
@@ -135,32 +96,25 @@ var SummaryListCardTitle = ({
135
96
  );
136
97
  var SummaryListCardHeader = ({
137
98
  className,
138
- ref,
139
- children,
140
99
  ...props
141
100
  }) => /* @__PURE__ */ jsx(
142
101
  "div",
143
102
  {
144
- ref,
145
103
  className: cn(
146
104
  "p-govuk-3 sm:px-govuk-4",
147
105
  "border-b border-transparent bg-govuk-light-grey",
148
106
  "sm:flex sm:flex-nowrap sm:justify-between",
149
107
  className
150
108
  ),
151
- ...props,
152
- children
109
+ ...props
153
110
  }
154
111
  );
155
112
  var SummaryListCardActions = ({
156
113
  className,
157
- ref,
158
- children,
159
114
  ...props
160
115
  }) => /* @__PURE__ */ jsx(
161
116
  "ul",
162
117
  {
163
- ref,
164
118
  className: cn(
165
119
  "font-govuk text-govuk-body font-bold",
166
120
  "m-0 my-govuk-1 p-0 list-none",
@@ -168,45 +122,36 @@ var SummaryListCardActions = ({
168
122
  "sm:justify-end sm:text-right",
169
123
  className
170
124
  ),
171
- ...props,
172
- children
125
+ ...props
173
126
  }
174
127
  );
175
128
  var SummaryListCardAction = ({
176
129
  className,
177
- ref,
178
- children,
179
130
  ...props
180
131
  }) => /* @__PURE__ */ jsx(
181
132
  "li",
182
133
  {
183
- ref,
184
134
  className: cn(
185
135
  "inline",
186
136
  "max-sm:mr-govuk-2 max-sm:pr-govuk-2 max-sm:border-r max-sm:border-govuk-mid-grey max-sm:last:mr-0 max-sm:last:pr-0 max-sm:last:border-0",
187
137
  "sm:ml-govuk-2 sm:pl-govuk-2 sm:first:ml-0 sm:first:pl-0 sm:first:border-0 sm:not-first:border-l sm:not-first:border-govuk-mid-grey",
188
138
  className
189
139
  ),
190
- ...props,
191
- children
140
+ ...props
192
141
  }
193
142
  );
194
143
  var SummaryListCardContent = ({
195
144
  className,
196
- ref,
197
- children,
198
145
  ...props
199
146
  }) => /* @__PURE__ */ jsx(
200
147
  "div",
201
148
  {
202
- ref,
203
149
  className: cn(
204
150
  "pt-govuk-3 px-govuk-3 sm:px-govuk-4 sm:pb-govuk-3",
205
151
  "[&_dl]:mb-0 [&_dl_div:last-of-type]:mb-0 [&_dl_div:last-of-type]:border-b-0",
206
152
  className
207
153
  ),
208
- ...props,
209
- children
154
+ ...props
210
155
  }
211
156
  );
212
157
 
@@ -1,4 +1,4 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
1
+ import { cn } from './chunk-GKHD33N6.js';
2
2
  import { cva } from 'class-variance-authority';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -13,23 +13,21 @@ var linkVariants = cva(
13
13
  variants: {
14
14
  variant: {
15
15
  default: [
16
- "text-govuk-brand",
16
+ "text-govuk-link",
17
17
  "hover:text-govuk-brand-hover",
18
18
  "visited:text-govuk-visited",
19
- "active:text-govuk-brand"
19
+ "active:text-govuk-black"
20
20
  ],
21
21
  muted: [
22
22
  "text-govuk-dark-grey",
23
- "hover:text-govuk-dark-grey",
23
+ "hover:text-govuk-black",
24
24
  "visited:text-govuk-dark-grey",
25
- "active:text-govuk-dark-grey"
25
+ "active:text-govuk-black"
26
26
  ],
27
27
  inverse: [
28
28
  "text-white",
29
29
  "hover:text-white",
30
- "visited:text-white",
31
- "active:text-white",
32
- "focus:not-focus:bg-transparent"
30
+ "visited:text-white"
33
31
  ]
34
32
  },
35
33
  noUnderline: {
@@ -43,7 +41,7 @@ var linkVariants = cva(
43
41
  {
44
42
  variant: "default",
45
43
  noVisitedState: true,
46
- className: "visited:text-govuk-brand"
44
+ className: "visited:text-govuk-link"
47
45
  }
48
46
  ],
49
47
  defaultVariants: {
@@ -56,13 +54,11 @@ var Link = ({
56
54
  variant,
57
55
  noUnderline,
58
56
  noVisitedState,
59
- ref,
60
57
  children,
61
58
  ...props
62
59
  }) => /* @__PURE__ */ jsx(
63
60
  "a",
64
61
  {
65
- ref,
66
62
  className: cn(
67
63
  linkVariants({ variant, noUnderline, noVisitedState }),
68
64
  className
@@ -1,15 +1,14 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
1
+ import { cn } from './chunk-GKHD33N6.js';
2
2
  import { useId } from 'react';
3
3
  import { Checkbox } from '@base-ui/react/checkbox';
4
4
  import { CheckboxGroup } from '@base-ui/react/checkbox-group';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
6
6
 
7
- var Checkboxes = ({ className, children, ...props }) => /* @__PURE__ */ jsx(CheckboxGroup, { className: cn(className), ...props, children });
7
+ var Checkboxes = (props) => /* @__PURE__ */ jsx(CheckboxGroup, { ...props });
8
8
  var CheckboxesItem = ({
9
9
  className,
10
10
  children,
11
- value,
12
- small = false,
11
+ small,
13
12
  ...props
14
13
  }) => {
15
14
  const labelId = useId();
@@ -19,21 +18,22 @@ var CheckboxesItem = ({
19
18
  className: cn(
20
19
  "flex flex-wrap items-start",
21
20
  "relative",
22
- small ? "group/item mb-0" : "mb-2.5 last:mb-0",
23
- "cursor-pointer touch-action-manipulation",
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
24
  className
25
25
  ),
26
26
  children: [
27
27
  /* @__PURE__ */ jsxs(
28
28
  Checkbox.Root,
29
29
  {
30
- value,
31
30
  "aria-labelledby": labelId,
32
31
  className: cn(
33
32
  "group/checkbox",
34
33
  "relative flex-none",
35
34
  "w-govuk-checkbox-touch-target h-govuk-checkbox-touch-target",
36
- "cursor-pointer outline-none"
35
+ "outline-none",
36
+ small && "-ml-govuk-2"
37
37
  ),
38
38
  ...props,
39
39
  children: [
@@ -75,7 +75,7 @@ var CheckboxesItem = ({
75
75
  "self-center",
76
76
  "py-govuk-checkbox-label-padding-y px-govuk-checkbox-label-padding-x",
77
77
  "text-govuk-tag font-normal font-govuk",
78
- "cursor-pointer"
78
+ small ? "pl-px max-w-[calc(100%-50px)]" : "max-w-[calc(100%-74px)]"
79
79
  ),
80
80
  children
81
81
  }
@@ -89,7 +89,7 @@ var CheckboxesHint = ({ className, ...props }) => /* @__PURE__ */ jsx(
89
89
  {
90
90
  className: cn(
91
91
  "block w-full",
92
- "-mt-govuk-1",
92
+ "-mt-govuk-3 mb-govuk-2 last:mb-0",
93
93
  "pr-govuk-checkbox-label-padding-x",
94
94
  "pl-[calc(var(--spacing-govuk-checkbox-label-padding-x)+var(--spacing-govuk-checkbox-touch-target))]",
95
95
  "text-govuk-tag font-normal font-govuk text-govuk-dark-grey",
@@ -101,7 +101,7 @@ var CheckboxesHint = ({ className, ...props }) => /* @__PURE__ */ jsx(
101
101
  var CheckboxesDivider = ({
102
102
  className,
103
103
  children = "or",
104
- small = false,
104
+ small,
105
105
  ...props
106
106
  }) => /* @__PURE__ */ jsx(
107
107
  "div",
@@ -124,8 +124,8 @@ var CheckboxesConditional = ({
124
124
  {
125
125
  className: cn(
126
126
  "ml-govuk-checkbox-conditional-ml pl-govuk-checkbox-conditional-pl",
127
- "mb-5",
128
- "border-l-2 border-govuk-grey",
127
+ "mb-govuk-3 sm:mb-govuk-4",
128
+ "border-l-4 border-govuk-grey",
129
129
  "*:last:mb-0",
130
130
  className
131
131
  ),