whitehall-ui 1.0.0 → 2.1.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 (148) hide show
  1. package/README.md +13 -3
  2. package/dist/{chunk-KWAC6IEK.js → chunk-2KB4IAMZ.js} +9 -22
  3. package/dist/chunk-3NOO2YUQ.js +139 -0
  4. package/dist/{chunk-5TI2WXYU.js → chunk-3UX7QPLM.js} +10 -21
  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-JU7A7KQI.js +152 -0
  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-YMQVN3MH.js +100 -0
  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 +10 -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 +9 -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 +208 -41
  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-LRNZYPC2.js +0 -107
  138. package/dist/chunk-NRXTKHI2.js +0 -169
  139. package/dist/chunk-PGZHPAT5.js +0 -183
  140. package/dist/chunk-RPV43YDC.js +0 -93
  141. package/dist/chunk-SK27BMU5.js +0 -140
  142. package/dist/chunk-UWQFFFTB.js +0 -136
  143. package/dist/chunk-VQOCX44T.js +0 -41
  144. package/dist/chunk-WONVZ7WK.js +0 -29
  145. package/dist/chunk-WPPWPEFV.js +0 -150
  146. package/dist/chunk-XQOYWPKV.js +0 -48
  147. package/dist/chunk-YAKI4SI7.js +0 -205
  148. package/dist/chunk-YCLGXX3R.js +0 -68
@@ -1,23 +1,22 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
1
+ import { cn } from './chunk-GKHD33N6.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
 
4
4
  var BackLink = ({
5
5
  className,
6
6
  inverse,
7
- ref,
8
7
  children = "Back",
9
8
  ...props
10
9
  }) => /* @__PURE__ */ jsxs(
11
10
  "a",
12
11
  {
13
- ref,
14
12
  className: cn(
15
- "font-govuk text-govuk-header leading-tight",
13
+ "relative font-govuk text-govuk-header leading-tight",
16
14
  "inline-flex items-center gap-govuk-1",
17
15
  "my-govuk-3",
18
16
  "underline govuk-link-underline",
19
17
  "hover:govuk-link-underline-hover",
20
18
  "focus:govuk-link-focus",
19
+ "after:absolute after:inset-x-0 after:-top-govuk-3 after:-bottom-govuk-3",
21
20
  inverse ? [
22
21
  "text-white visited:text-white",
23
22
  "hover:text-white active:text-white"
@@ -32,7 +31,10 @@ var BackLink = ({
32
31
  /* @__PURE__ */ jsx(
33
32
  "svg",
34
33
  {
35
- className: "shrink-0",
34
+ className: cn(
35
+ "shrink-0",
36
+ inverse ? "text-current" : "text-govuk-dark-grey [a:focus_&]:text-govuk-black"
37
+ ),
36
38
  xmlns: "http://www.w3.org/2000/svg",
37
39
  width: "7",
38
40
  height: "11",
@@ -0,0 +1,74 @@
1
+ import { cn } from './chunk-GKHD33N6.js';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+
4
+ var LanguageNavigation = ({
5
+ className,
6
+ inverse,
7
+ children,
8
+ ...props
9
+ }) => /* @__PURE__ */ jsx(
10
+ "nav",
11
+ {
12
+ "aria-label": "Language",
13
+ "data-inverse": inverse || void 0,
14
+ className: cn(
15
+ "group/language font-govuk text-govuk-body mb-govuk-r6",
16
+ inverse ? "text-white" : "text-govuk-black",
17
+ className
18
+ ),
19
+ ...props,
20
+ children: /* @__PURE__ */ jsx("ul", { className: "inline-flex flex-wrap gap-y-govuk-2 m-0 p-0 list-none", children })
21
+ }
22
+ );
23
+ var LanguageNavigationItem = ({
24
+ className,
25
+ ...props
26
+ }) => /* @__PURE__ */ jsx(
27
+ "li",
28
+ {
29
+ className: cn(
30
+ "flex items-center",
31
+ "not-last:after:block not-last:after:h-[1em] not-last:after:mx-govuk-2",
32
+ "not-last:after:border-r not-last:after:border-govuk-mid-grey",
33
+ "group-data-[inverse]/language:not-last:after:border-current",
34
+ className
35
+ ),
36
+ ...props
37
+ }
38
+ );
39
+ var LanguageNavigationLink = ({
40
+ className,
41
+ lang,
42
+ hrefLang = lang,
43
+ description,
44
+ children,
45
+ ...props
46
+ }) => /* @__PURE__ */ jsxs(
47
+ "a",
48
+ {
49
+ rel: "alternate",
50
+ lang,
51
+ hrefLang,
52
+ className: cn(
53
+ "underline govuk-link-underline",
54
+ "hover:govuk-link-underline-hover focus:govuk-link-focus",
55
+ "text-govuk-link visited:text-govuk-visited",
56
+ "hover:text-govuk-brand-hover active:text-govuk-black",
57
+ "group-data-[inverse]/language:text-white",
58
+ "group-data-[inverse]/language:visited:text-white",
59
+ "group-data-[inverse]/language:hover:text-white",
60
+ className
61
+ ),
62
+ ...props,
63
+ children: [
64
+ children,
65
+ description && /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
66
+ " ",
67
+ description
68
+ ] })
69
+ ]
70
+ }
71
+ );
72
+ var LanguageNavigationCurrent = (props) => /* @__PURE__ */ jsx("span", { "aria-current": "true", ...props });
73
+
74
+ export { LanguageNavigation, LanguageNavigationCurrent, LanguageNavigationItem, LanguageNavigationLink };
@@ -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
 
@@ -9,7 +9,7 @@ var tagVariants = cva(
9
9
  "mt-govuk-tag-mt mb-govuk-tag-mb",
10
10
  "rounded-govuk-tag",
11
11
  "text-govuk-tag font-normal font-govuk",
12
- "no-underline break-words",
12
+ "no-underline wrap-break-word",
13
13
  "max-w-govuk-tag-max-width",
14
14
  "forced-colors:font-bold"
15
15
  ],
@@ -32,13 +32,6 @@ var tagVariants = cva(
32
32
  }
33
33
  }
34
34
  );
35
- var Tag = ({ className, colour = "blue", ref, ...props }) => /* @__PURE__ */ jsx(
36
- "strong",
37
- {
38
- ref,
39
- className: cn(tagVariants({ colour }), className),
40
- ...props
41
- }
42
- );
35
+ var Tag = ({ className, colour = "blue", ...props }) => /* @__PURE__ */ jsx("strong", { className: cn(tagVariants({ colour }), className), ...props });
43
36
 
44
37
  export { Tag, tagVariants };
@@ -0,0 +1,44 @@
1
+ import { cn } from './chunk-GKHD33N6.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ var SkipLink = ({
5
+ className,
6
+ children = "Skip to main content",
7
+ onClick,
8
+ ...props
9
+ }) => /* @__PURE__ */ jsx(
10
+ "a",
11
+ {
12
+ href: "#main-content",
13
+ className: cn(
14
+ "govuk-skip-link",
15
+ "font-govuk text-govuk-header leading-tight",
16
+ "block py-govuk-2 px-govuk-3",
17
+ "text-govuk-black underline govuk-link-underline",
18
+ className
19
+ ),
20
+ onClick: (event) => {
21
+ onClick?.(event);
22
+ const { hash, pathname } = event.currentTarget;
23
+ const target = hash && pathname === globalThis.location.pathname ? document.getElementById(decodeURIComponent(hash.slice(1))) : null;
24
+ if (!target) return;
25
+ if (!target.hasAttribute("tabindex")) {
26
+ target.setAttribute("tabindex", "-1");
27
+ target.style.outline = "none";
28
+ target.addEventListener(
29
+ "blur",
30
+ () => {
31
+ target.removeAttribute("tabindex");
32
+ target.style.removeProperty("outline");
33
+ },
34
+ { once: true }
35
+ );
36
+ }
37
+ target.focus();
38
+ },
39
+ ...props,
40
+ children
41
+ }
42
+ );
43
+
44
+ export { SkipLink };
@@ -0,0 +1,100 @@
1
+ import { cn } from './chunk-GKHD33N6.js';
2
+ import { createContext, useId, use } from 'react';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ var TaskListItemContext = createContext({ hintId: "", statusId: "" });
6
+ var TaskList = ({ className, ...props }) => /* @__PURE__ */ jsx(
7
+ "ul",
8
+ {
9
+ className: cn(
10
+ "font-govuk text-govuk-body text-govuk-black",
11
+ "mt-0 mb-govuk-r6 p-0 list-none",
12
+ className
13
+ ),
14
+ ...props
15
+ }
16
+ );
17
+ var TaskListItem = ({ className, hasLink, ...props }) => {
18
+ const id = useId();
19
+ return /* @__PURE__ */ jsx(
20
+ TaskListItemContext,
21
+ {
22
+ value: { hintId: `${id}-hint`, statusId: `${id}-status` },
23
+ children: /* @__PURE__ */ jsx(
24
+ "li",
25
+ {
26
+ className: cn(
27
+ "table relative w-full mb-0",
28
+ "py-govuk-2",
29
+ "border-b border-govuk-mid-grey",
30
+ "first:border-t first:border-t-govuk-mid-grey",
31
+ hasLink && "hover:bg-govuk-light-grey",
32
+ className
33
+ ),
34
+ ...props
35
+ }
36
+ )
37
+ }
38
+ );
39
+ };
40
+ var TaskListNameAndHint = ({
41
+ className,
42
+ ...props
43
+ }) => /* @__PURE__ */ jsx(
44
+ "div",
45
+ {
46
+ className: cn("table-cell align-top text-govuk-black", className),
47
+ ...props
48
+ }
49
+ );
50
+ var TaskListLink = ({ className, children, ...props }) => {
51
+ const { hintId, statusId } = use(TaskListItemContext);
52
+ return /* @__PURE__ */ jsx(
53
+ "a",
54
+ {
55
+ "aria-describedby": `${hintId} ${statusId}`.trim() || void 0,
56
+ className: cn(
57
+ "text-govuk-link underline govuk-link-underline",
58
+ "visited:text-govuk-visited active:text-govuk-black",
59
+ "hover:text-govuk-brand-hover hover:govuk-link-underline-hover",
60
+ "focus:govuk-link-focus",
61
+ "after:block after:absolute after:inset-0",
62
+ className
63
+ ),
64
+ ...props,
65
+ children
66
+ }
67
+ );
68
+ };
69
+ var TaskListHint = ({ className, ...props }) => {
70
+ const { hintId } = use(TaskListItemContext);
71
+ return /* @__PURE__ */ jsx(
72
+ "div",
73
+ {
74
+ className: cn("mt-govuk-1 text-govuk-dark-grey", className),
75
+ ...props,
76
+ id: hintId || props.id
77
+ }
78
+ );
79
+ };
80
+ var TaskListStatus = ({
81
+ className,
82
+ cannotStartYet,
83
+ ...props
84
+ }) => {
85
+ const { statusId } = use(TaskListItemContext);
86
+ return /* @__PURE__ */ jsx(
87
+ "div",
88
+ {
89
+ className: cn(
90
+ "table-cell pl-govuk-2 text-right align-top",
91
+ cannotStartYet ? "text-govuk-dark-grey" : "text-govuk-black",
92
+ className
93
+ ),
94
+ ...props,
95
+ id: statusId || props.id
96
+ }
97
+ );
98
+ };
99
+
100
+ export { TaskList, TaskListHint, TaskListItem, TaskListLink, TaskListNameAndHint, TaskListStatus };
@@ -0,0 +1,40 @@
1
+ import { cn } from './chunk-GKHD33N6.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ var PhaseBanner = ({ className, ...props }) => /* @__PURE__ */ jsx(
5
+ "div",
6
+ {
7
+ className: cn(
8
+ "govuk-width-container [.govuk-width-container_&]:mx-0",
9
+ "py-govuk-2 border-b border-govuk-mid-grey",
10
+ className
11
+ ),
12
+ ...props
13
+ }
14
+ );
15
+ var PhaseBannerContent = ({
16
+ className,
17
+ ...props
18
+ }) => /* @__PURE__ */ jsx(
19
+ "p",
20
+ {
21
+ className: cn(
22
+ "table m-0 font-govuk text-govuk-phase-banner text-govuk-black",
23
+ className
24
+ ),
25
+ ...props
26
+ }
27
+ );
28
+ var PhaseBannerTag = ({ className, ...props }) => /* @__PURE__ */ jsx(
29
+ "span",
30
+ {
31
+ className: cn(
32
+ "mr-govuk-3 sm:mr-govuk-2 *:text-govuk-body-small",
33
+ className
34
+ ),
35
+ ...props
36
+ }
37
+ );
38
+ var PhaseBannerText = ({ className, ...props }) => /* @__PURE__ */ jsx("span", { className: cn("table-cell align-middle", className), ...props });
39
+
40
+ export { PhaseBanner, PhaseBannerContent, PhaseBannerTag, PhaseBannerText };
@@ -0,0 +1,188 @@
1
+ import { cn } from './chunk-GKHD33N6.js';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+
4
+ var footerSectionWidths = {
5
+ full: "w-full",
6
+ "one-half": "sm:inline-block sm:w-1/2 sm:align-top",
7
+ "one-third": "sm:inline-block sm:w-1/3 sm:align-top",
8
+ "two-thirds": "sm:inline-block sm:w-2/3 sm:align-top"
9
+ };
10
+ var footerLinkStyles = [
11
+ "underline govuk-link-underline",
12
+ "text-govuk-link visited:text-govuk-visited",
13
+ "hover:text-govuk-brand-hover hover:govuk-link-underline-hover",
14
+ "active:text-govuk-black",
15
+ "focus:govuk-link-focus"
16
+ ];
17
+ var Footer = ({ className, ...props }) => /* @__PURE__ */ jsx(
18
+ "footer",
19
+ {
20
+ className: cn(
21
+ "font-govuk text-govuk-body text-govuk-black",
22
+ "border-t-govuk-wide border-t-govuk-brand",
23
+ "pt-govuk-5 sm:pt-govuk-7 pb-govuk-3 sm:pb-govuk-5",
24
+ "bg-govuk-surface",
25
+ "print:border-t-current print:bg-transparent",
26
+ className
27
+ ),
28
+ ...props
29
+ }
30
+ );
31
+ var FooterContainer = ({
32
+ className,
33
+ fullWidth,
34
+ ...props
35
+ }) => /* @__PURE__ */ jsx(
36
+ "div",
37
+ {
38
+ className: cn(
39
+ fullWidth ? "px-govuk-3" : "govuk-width-container",
40
+ className
41
+ ),
42
+ ...props
43
+ }
44
+ );
45
+ var FooterCrown = ({ className, ...props }) => /* @__PURE__ */ jsx(
46
+ "svg",
47
+ {
48
+ focusable: "false",
49
+ role: "presentation",
50
+ xmlns: "http://www.w3.org/2000/svg",
51
+ viewBox: "0 0 64 60",
52
+ height: "30",
53
+ width: "32",
54
+ fill: "currentcolor",
55
+ className: cn("block mb-govuk-5", className),
56
+ ...props,
57
+ children: /* @__PURE__ */ jsxs("g", { children: [
58
+ /* @__PURE__ */ jsx("circle", { cx: "20", cy: "17.6", r: "3.7" }),
59
+ /* @__PURE__ */ jsx("circle", { cx: "10.2", cy: "23.5", r: "3.7" }),
60
+ /* @__PURE__ */ jsx("circle", { cx: "3.7", cy: "33.2", r: "3.7" }),
61
+ /* @__PURE__ */ jsx("circle", { cx: "31.7", cy: "30.6", r: "3.7" }),
62
+ /* @__PURE__ */ jsx("circle", { cx: "43.3", cy: "17.6", r: "3.7" }),
63
+ /* @__PURE__ */ jsx("circle", { cx: "53.2", cy: "23.5", r: "3.7" }),
64
+ /* @__PURE__ */ jsx("circle", { cx: "59.7", cy: "33.2", r: "3.7" }),
65
+ /* @__PURE__ */ jsx("circle", { cx: "31.7", cy: "30.6", r: "3.7" }),
66
+ /* @__PURE__ */ jsx("path", { d: "M33.1,9.8c.2-.1.3-.3.5-.5l4.6,2.4v-6.8l-4.6,1.5c-.1-.2-.3-.3-.5-.5l1.9-5.9h-6.7l1.9,5.9c-.2.1-.3.3-.5.5l-4.6-1.5v6.8l4.6-2.4c.1.2.3.3.5.5l-2.6,8c-.9,2.8,1.2,5.7,4.1,5.7h0c3,0,5.1-2.9,4.1-5.7l-2.6-8ZM37,37.9s-3.4,3.8-4.1,6.1c2.2,0,4.2-.5,6.4-2.8l-.7,8.5c-2-2.8-4.4-4.1-5.7-3.8.1,3.1.5,6.7,5.8,7.2,3.7.3,6.7-1.5,7-3.8.4-2.6-2-4.3-3.7-1.6-1.4-4.5,2.4-6.1,4.9-3.2-1.9-4.5-1.8-7.7,2.4-10.9,3,4,2.6,7.3-1.2,11.1,2.4-1.3,6.2,0,4,4.6-1.2-2.8-3.7-2.2-4.2.2-.3,1.7.7,3.7,3,4.2,1.9.3,4.7-.9,7-5.9-1.3,0-2.4.7-3.9,1.7l2.4-8c.6,2.3,1.4,3.7,2.2,4.5.6-1.6.5-2.8,0-5.3l5,1.8c-2.6,3.6-5.2,8.7-7.3,17.5-7.4-1.1-15.7-1.7-24.5-1.7h0c-8.8,0-17.1.6-24.5,1.7-2.1-8.9-4.7-13.9-7.3-17.5l5-1.8c-.5,2.5-.6,3.7,0,5.3.8-.8,1.6-2.3,2.2-4.5l2.4,8c-1.5-1-2.6-1.7-3.9-1.7,2.3,5,5.2,6.2,7,5.9,2.3-.4,3.3-2.4,3-4.2-.5-2.4-3-3.1-4.2-.2-2.2-4.6,1.6-6,4-4.6-3.7-3.7-4.2-7.1-1.2-11.1,4.2,3.2,4.3,6.4,2.4,10.9,2.5-2.8,6.3-1.3,4.9,3.2-1.8-2.7-4.1-1-3.7,1.6.3,2.3,3.3,4.1,7,3.8,5.4-.5,5.7-4.2,5.8-7.2-1.3-.2-3.7,1-5.7,3.8l-.7-8.5c2.2,2.3,4.2,2.7,6.4,2.8-.7-2.3-4.1-6.1-4.1-6.1h10.6,0Z" })
67
+ ] })
68
+ }
69
+ );
70
+ var FooterNavigation = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("-mx-govuk-3", className), ...props });
71
+ var FooterSection = ({
72
+ className,
73
+ width = "full",
74
+ ...props
75
+ }) => /* @__PURE__ */ jsx(
76
+ "div",
77
+ {
78
+ className: cn(
79
+ footerSectionWidths[width],
80
+ "px-govuk-3 mb-govuk-6",
81
+ className
82
+ ),
83
+ ...props
84
+ }
85
+ );
86
+ var FooterHeading = ({
87
+ className,
88
+ children,
89
+ ...props
90
+ }) => /* @__PURE__ */ jsx(
91
+ "h2",
92
+ {
93
+ className: cn(
94
+ "text-govuk-heading-m font-bold text-govuk-black",
95
+ "mb-govuk-6 pb-govuk-2 sm:pb-govuk-4",
96
+ "border-b border-govuk-surface-border",
97
+ className
98
+ ),
99
+ ...props,
100
+ children
101
+ }
102
+ );
103
+ var FooterList = ({ className, columns = 1, ...props }) => /* @__PURE__ */ jsx(
104
+ "ul",
105
+ {
106
+ className: cn(
107
+ "list-none m-0 p-0",
108
+ "gap-x-govuk-6",
109
+ columns === 2 && "md:columns-2",
110
+ columns === 3 && "md:columns-3",
111
+ className
112
+ ),
113
+ ...props
114
+ }
115
+ );
116
+ var FooterListItem = ({ className, ...props }) => /* @__PURE__ */ jsx(
117
+ "li",
118
+ {
119
+ className: cn("mb-govuk-3 sm:mb-govuk-4", "last:mb-0", className),
120
+ ...props
121
+ }
122
+ );
123
+ var FooterLink = ({ className, children, ...props }) => /* @__PURE__ */ jsx("a", { className: cn(footerLinkStyles, className), ...props, children });
124
+ var FooterSectionBreak = () => /* @__PURE__ */ jsx("hr", { className: "m-0 mb-govuk-6 sm:mb-govuk-8 border-0 border-b border-govuk-surface-border" });
125
+ var FooterMeta = ({ className, ...props }) => /* @__PURE__ */ jsx(
126
+ "div",
127
+ {
128
+ className: cn(
129
+ "flex flex-wrap items-end justify-center -mx-govuk-3",
130
+ className
131
+ ),
132
+ ...props
133
+ }
134
+ );
135
+ var FooterMetaItem = ({ className, grow, ...props }) => /* @__PURE__ */ jsx(
136
+ "div",
137
+ {
138
+ className: cn(
139
+ "mx-govuk-3 mb-govuk-5",
140
+ grow && "flex-1 max-sm:basis-80",
141
+ className
142
+ ),
143
+ ...props
144
+ }
145
+ );
146
+ var FooterInlineList = ({ className, ...props }) => /* @__PURE__ */ jsx(
147
+ "ul",
148
+ {
149
+ className: cn("list-none m-0 mb-govuk-3 p-0", "last:mb-0", className),
150
+ ...props
151
+ }
152
+ );
153
+ var FooterInlineListItem = ({
154
+ className,
155
+ ...props
156
+ }) => /* @__PURE__ */ jsx(
157
+ "li",
158
+ {
159
+ className: cn("inline-block mr-govuk-3 mb-govuk-1", className),
160
+ ...props
161
+ }
162
+ );
163
+ var FooterLicenceLogo = ({ className, ...props }) => /* @__PURE__ */ jsx(
164
+ "svg",
165
+ {
166
+ "aria-hidden": "true",
167
+ focusable: "false",
168
+ xmlns: "http://www.w3.org/2000/svg",
169
+ viewBox: "0 0 483.2 195.7",
170
+ height: "17",
171
+ width: "41",
172
+ className: cn("inline-block align-top mr-govuk-2 max-md:mb-govuk-3", className),
173
+ ...props,
174
+ children: /* @__PURE__ */ jsx(
175
+ "path",
176
+ {
177
+ fill: "currentColor",
178
+ d: "M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"
179
+ }
180
+ )
181
+ }
182
+ );
183
+ var FooterContentLicence = ({
184
+ className,
185
+ ...props
186
+ }) => /* @__PURE__ */ jsx("span", { className: cn("inline-block text-balance", className), ...props });
187
+
188
+ export { Footer, FooterContainer, FooterContentLicence, FooterCrown, FooterHeading, FooterInlineList, FooterInlineListItem, FooterLicenceLogo, FooterLink, FooterList, FooterListItem, FooterMeta, FooterMetaItem, FooterNavigation, FooterSection, FooterSectionBreak };
package/dist/index.d.ts CHANGED
@@ -1,38 +1,40 @@
1
- export { cn } from './lib/utils.js';
1
+ export { cn, mergeRefs } from './lib/utils.js';
2
2
  export { Accordion, AccordionContent, AccordionContentProps, AccordionHeading, AccordionHeadingProps, AccordionProps, AccordionSection, AccordionSectionProps } from './ui/accordion.js';
3
3
  export { BackLink, BackLinkProps } from './ui/back-link.js';
4
4
  export { Breadcrumbs, BreadcrumbsLink, BreadcrumbsLinkProps, BreadcrumbsList, BreadcrumbsListItem, BreadcrumbsListItemProps, BreadcrumbsListProps, BreadcrumbsProps } from './ui/breadcrumbs.js';
5
5
  export { Button, ButtonProps, ButtonVariant, buttonVariants } from './ui/button.js';
6
6
  export { CharacterCount, CharacterCountMessage, CharacterCountMessageProps, CharacterCountProps } from './ui/character-count.js';
7
- export { CookieBanner, CookieBannerActions, CookieBannerActionsProps, CookieBannerContent, CookieBannerContentProps, CookieBannerHeading, CookieBannerHeadingProps, CookieBannerMessage, CookieBannerMessageProps, CookieBannerProps } from './ui/cookie-banner.js';
8
7
  export { Checkboxes, CheckboxesConditional, CheckboxesConditionalProps, CheckboxesDivider, CheckboxesDividerProps, CheckboxesHint, CheckboxesHintProps, CheckboxesItem, CheckboxesItemProps, CheckboxesProps } from './ui/checkboxes.js';
9
- export { ErrorMessage, ErrorMessageProps } from './ui/error-message.js';
8
+ export { CookieBanner, CookieBannerActions, CookieBannerActionsProps, CookieBannerContent, CookieBannerContentProps, CookieBannerHeading, CookieBannerHeadingProps, CookieBannerMessage, CookieBannerMessageProps, CookieBannerProps } from './ui/cookie-banner.js';
10
9
  export { DateInput, DateInputInput, DateInputInputProps, DateInputItem, DateInputItemProps, DateInputLabel, DateInputLabelProps, DateInputProps } from './ui/date-input.js';
11
10
  export { Details, DetailsProps, DetailsSummary, DetailsSummaryProps, DetailsText, DetailsTextProps } from './ui/details.js';
11
+ export { ErrorMessage, ErrorMessageProps } from './ui/error-message.js';
12
12
  export { ErrorSummary, ErrorSummaryItem, ErrorSummaryProps } from './ui/error-summary.js';
13
13
  export { ExitThisPage, ExitThisPageProps } from './ui/exit-this-page.js';
14
+ export { Feedback, FeedbackBody, FeedbackBodyProps, FeedbackProps, FeedbackTitle, FeedbackTitleProps } from './ui/feedback.js';
14
15
  export { Fieldset, FieldsetHeading, FieldsetHeadingProps, FieldsetLegend, FieldsetLegendProps, FieldsetProps, fieldsetLegendVariants } from './ui/fieldset.js';
15
- export { FileUpload, FileUploadProps } from './ui/file-upload.js';
16
- export { Header, HeaderContainer, HeaderContainerProps, HeaderLink, HeaderLinkProps, HeaderLogo, HeaderLogoProps, HeaderNav, HeaderNavItem, HeaderNavItemProps, HeaderNavLink, HeaderNavLinkProps, HeaderNavProps, HeaderProps, HeaderServiceName, HeaderServiceNameProps } from './ui/header.js';
16
+ export { FileUpload, FileUploadProps, fileUploadButtonVariants } from './ui/file-upload.js';
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';
17
18
  export { GenericHeader, GenericHeaderContainer, GenericHeaderContainerProps, GenericHeaderLink, GenericHeaderLinkProps, GenericHeaderLogo, GenericHeaderLogoProps, GenericHeaderProps } from './ui/generic-header.js';
18
- export { Footer, FooterContainer, FooterContainerProps, FooterContentLicence, FooterContentLicenceProps, FooterHeading, FooterHeadingProps, FooterInlineList, FooterInlineListItem, FooterInlineListItemProps, FooterInlineListProps, FooterLink, FooterLinkProps, FooterList, FooterListItem, FooterListItemProps, FooterListProps, FooterMeta, FooterMetaItem, FooterMetaItemProps, FooterMetaProps, FooterNavigation, FooterNavigationProps, FooterProps, FooterSection, FooterSectionBreak, FooterSectionProps } from './ui/footer.js';
19
+ export { Header, HeaderContainer, HeaderContainerProps, HeaderLink, HeaderLinkProps, HeaderLogo, HeaderLogoProps, HeaderLogotype, HeaderLogotypeProps, HeaderProductName, HeaderProductNameProps, HeaderProps } from './ui/header.js';
19
20
  export { Hint, HintProps } from './ui/hint.js';
20
21
  export { InsetText, InsetTextProps } from './ui/inset-text.js';
21
22
  export { Label, LabelProps, LabelWrapper, LabelWrapperProps, labelVariants } from './ui/label.js';
23
+ export { LanguageNavigation, LanguageNavigationCurrent, LanguageNavigationCurrentProps, LanguageNavigationItem, LanguageNavigationItemProps, LanguageNavigationLink, LanguageNavigationLinkProps, LanguageNavigationProps } from './ui/language-navigation.js';
22
24
  export { Link, LinkProps, LinkVariant, linkVariants } from './ui/link.js';
23
25
  export { NotificationBanner, NotificationBannerContent, NotificationBannerContentProps, NotificationBannerHeader, NotificationBannerHeaderProps, NotificationBannerHeading, NotificationBannerHeadingProps, NotificationBannerLink, NotificationBannerLinkProps, NotificationBannerProps, NotificationBannerTitle, NotificationBannerTitleProps } from './ui/notification-banner.js';
24
- export { Panel, PanelBody, PanelBodyProps, PanelProps, PanelTitle, PanelTitleProps } from './ui/panel.js';
25
- export { PasswordInput, PasswordInputProps } from './ui/password-input.js';
26
26
  export { NextArrow, Pagination, PaginationEllipsis, PaginationEllipsisProps, PaginationItem, PaginationItemProps, PaginationLink, PaginationLinkLabel, PaginationLinkLabelProps, PaginationLinkProps, PaginationLinkTitle, PaginationLinkTitleProps, PaginationList, PaginationListProps, PaginationNext, PaginationNextProps, PaginationPrevious, PaginationPreviousProps, PaginationProps, PrevArrow } from './ui/pagination.js';
27
+ export { Panel, PanelActions, PanelActionsProps, PanelBody, PanelBodyProps, PanelProps, PanelTitle, PanelTitleProps } from './ui/panel.js';
28
+ export { PasswordInput, PasswordInputProps } from './ui/password-input.js';
27
29
  export { PhaseBanner, PhaseBannerContent, PhaseBannerContentProps, PhaseBannerProps, PhaseBannerTag, PhaseBannerTagProps, PhaseBannerText, PhaseBannerTextProps } from './ui/phase-banner.js';
28
30
  export { Radios, RadiosDivider, RadiosDividerProps, RadiosHint, RadiosHintProps, RadiosItem, RadiosItemProps, RadiosProps } from './ui/radios.js';
29
- export { Select, SelectItem, SelectItemProps, SelectProps, selectTriggerVariants } from './ui/select.js';
31
+ export { Select, SelectProps, selectVariants } from './ui/select.js';
30
32
  export { ServiceNavigation, ServiceNavigationContainer, ServiceNavigationContainerProps, ServiceNavigationItem, ServiceNavigationItemProps, ServiceNavigationLink, ServiceNavigationLinkProps, ServiceNavigationNav, ServiceNavigationNavProps, ServiceNavigationProps, ServiceNavigationServiceName, ServiceNavigationServiceNameProps } from './ui/service-navigation.js';
31
33
  export { SkipLink, SkipLinkProps } from './ui/skip-link.js';
32
- export { SummaryList, SummaryListActions, SummaryListActionsProps, SummaryListCard, SummaryListCardAction, SummaryListCardActionProps, SummaryListCardActions, SummaryListCardActionsProps, SummaryListCardContent, SummaryListCardHeader, SummaryListCardProps, SummaryListCardTitle, SummaryListCardTitleProps, SummaryListKey, SummaryListKeyProps, SummaryListProps, SummaryListRow, SummaryListRowProps, SummaryListValue, SummaryListValueProps } from './ui/summary-list.js';
33
- export { Tag, TagColour, TagProps, tagVariants } from './ui/tag.js';
34
- export { Table, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCaptionSize, TableCell, TableCellProps, TableHead, TableHeadProps, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps, tableCaptionVariants } from './ui/table.js';
34
+ 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
+ export { Table, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCaptionSize, TableCell, TableCellProps, TableContainer, TableContainerProps, TableHead, TableHeadProps, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps, tableCaptionVariants } from './ui/table.js';
35
36
  export { Tabs, TabsList, TabsListProps, TabsPanel, TabsPanelProps, TabsProps, TabsTab, TabsTabProps } from './ui/tabs.js';
37
+ export { Tag, TagColour, TagProps, tagVariants } from './ui/tag.js';
36
38
  export { TaskList, TaskListHint, TaskListHintProps, TaskListItem, TaskListItemProps, TaskListLink, TaskListLinkProps, TaskListNameAndHint, TaskListNameAndHintProps, TaskListProps, TaskListStatus, TaskListStatusProps } from './ui/task-list.js';
37
39
  export { TextInput, TextInputProps, textInputVariants } from './ui/text-input.js';
38
40
  export { Textarea, TextareaProps, textareaVariants } from './ui/textarea.js';
@@ -41,10 +43,10 @@ import 'clsx';
41
43
  import 'react';
42
44
  import '@base-ui/react/accordion';
43
45
  import 'class-variance-authority/types';
46
+ import '@base-ui/react/button';
44
47
  import 'class-variance-authority';
45
48
  import '@base-ui/react/checkbox';
46
49
  import '@base-ui/react/checkbox-group';
47
- import '@base-ui/react/collapsible';
48
50
  import '@base-ui/react/radio-group';
49
51
  import '@base-ui/react/radio';
50
52
  import '@base-ui/react/tabs';