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,183 +0,0 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
2
- import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
3
- import { useState, useCallback } from 'react';
4
- import { jsxs, jsx } from 'react/jsx-runtime';
5
-
6
- var Accordion = ({
7
- className,
8
- ref,
9
- children,
10
- showAllSections,
11
- defaultValue,
12
- ...props
13
- }) => {
14
- const [openSections, setOpenSections] = useState(
15
- defaultValue ?? []
16
- );
17
- const allOpen = showAllSections !== void 0 && showAllSections.length > 0 && showAllSections.every((v) => openSections.includes(v));
18
- const handleToggleAll = useCallback(() => {
19
- if (allOpen) {
20
- setOpenSections([]);
21
- } else {
22
- setOpenSections(showAllSections ?? []);
23
- }
24
- }, [allOpen, showAllSections]);
25
- return /* @__PURE__ */ jsxs(
26
- Accordion$1.Root,
27
- {
28
- ref,
29
- multiple: true,
30
- value: openSections,
31
- onValueChange: setOpenSections,
32
- className: cn(
33
- "mb-govuk-6 font-govuk text-govuk-body text-govuk-black",
34
- "border-b border-govuk-mid-grey",
35
- className
36
- ),
37
- ...props,
38
- children: [
39
- showAllSections && /* @__PURE__ */ jsx("div", { className: "pb-govuk-1", children: /* @__PURE__ */ jsxs(
40
- "button",
41
- {
42
- type: "button",
43
- onClick: handleToggleAll,
44
- "aria-expanded": allOpen,
45
- className: cn(
46
- "group inline-flex items-center",
47
- "py-govuk-1 border-0 bg-transparent cursor-pointer",
48
- "font-govuk text-govuk-body text-govuk-brand",
49
- "hover:text-govuk-black hover:bg-govuk-light-grey",
50
- "focus-visible:govuk-link-focus focus-visible:outline-none"
51
- ),
52
- children: [
53
- /* @__PURE__ */ jsxs(
54
- "svg",
55
- {
56
- className: cn(
57
- "transition-transform",
58
- allOpen ? "" : "rotate-180"
59
- ),
60
- xmlns: "http://www.w3.org/2000/svg",
61
- width: "18",
62
- height: "18",
63
- viewBox: "0 0 20 20",
64
- "aria-hidden": "true",
65
- focusable: "false",
66
- children: [
67
- /* @__PURE__ */ jsx(
68
- "circle",
69
- {
70
- className: "fill-none stroke-current group-hover:fill-govuk-black group-hover:stroke-govuk-black",
71
- cx: "10",
72
- cy: "10",
73
- r: "9",
74
- strokeWidth: "1"
75
- }
76
- ),
77
- /* @__PURE__ */ jsx(
78
- "polyline",
79
- {
80
- className: "fill-none stroke-current group-hover:stroke-govuk-light-grey",
81
- points: "6.5 8.5 10 12 13.5 8.5",
82
- strokeWidth: "2",
83
- strokeLinecap: "round",
84
- strokeLinejoin: "round"
85
- }
86
- )
87
- ]
88
- }
89
- ),
90
- /* @__PURE__ */ jsx("span", { className: "ml-govuk-1", children: allOpen ? "Hide all sections" : "Show all sections" })
91
- ]
92
- }
93
- ) }),
94
- children
95
- ]
96
- }
97
- );
98
- };
99
- var AccordionSection = ({
100
- className,
101
- ref,
102
- children,
103
- ...props
104
- }) => /* @__PURE__ */ jsx(Accordion$1.Item, { ref, className: cn(className), ...props, children });
105
- var AccordionHeading = ({
106
- className,
107
- ref,
108
- children,
109
- summary,
110
- ...props
111
- }) => /* @__PURE__ */ jsx(Accordion$1.Header, { render: /* @__PURE__ */ jsx("h2", {}), className: "m-0 p-0", children: /* @__PURE__ */ jsxs(
112
- Accordion$1.Trigger,
113
- {
114
- ref,
115
- className: cn(
116
- "group w-full",
117
- "pt-govuk-2 pb-govuk-2 govuk-accordion-button-border",
118
- "bg-transparent cursor-pointer text-left",
119
- "hover:bg-govuk-light-grey",
120
- "focus-visible:outline-none",
121
- className
122
- ),
123
- ...props,
124
- children: [
125
- /* @__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 }) }),
126
- summary && /* @__PURE__ */ jsx("span", { className: "block mb-govuk-2", children: /* @__PURE__ */ jsx("span", { className: "text-govuk-body text-govuk-dark-grey group-focus-visible:govuk-link-focus", children: summary }) }),
127
- /* @__PURE__ */ jsx("span", { className: "block mb-govuk-2", children: /* @__PURE__ */ jsxs("span", { className: "group-focus-visible:govuk-link-focus inline-flex items-center text-govuk-body text-govuk-brand group-hover:text-govuk-black", children: [
128
- /* @__PURE__ */ jsxs(
129
- "svg",
130
- {
131
- className: "govuk-accordion-chevron transition-transform group-data-panel-open:rotate-180",
132
- xmlns: "http://www.w3.org/2000/svg",
133
- width: "18",
134
- height: "18",
135
- viewBox: "0 0 20 20",
136
- "aria-hidden": "true",
137
- focusable: "false",
138
- children: [
139
- /* @__PURE__ */ jsx(
140
- "circle",
141
- {
142
- className: "fill-none stroke-current group-hover:fill-govuk-black group-hover:stroke-govuk-black",
143
- cx: "10",
144
- cy: "10",
145
- r: "9",
146
- strokeWidth: "1"
147
- }
148
- ),
149
- /* @__PURE__ */ jsx(
150
- "polyline",
151
- {
152
- className: "fill-none stroke-current group-hover:stroke-govuk-light-grey",
153
- points: "6.5 8.5 10 12 13.5 8.5",
154
- strokeWidth: "2",
155
- strokeLinecap: "round",
156
- strokeLinejoin: "round"
157
- }
158
- )
159
- ]
160
- }
161
- ),
162
- /* @__PURE__ */ jsx("span", { className: "ml-govuk-1 group-data-panel-open:hidden", children: "Show" }),
163
- /* @__PURE__ */ jsx("span", { className: "ml-govuk-1 hidden group-data-panel-open:inline", children: "Hide" })
164
- ] }) })
165
- ]
166
- }
167
- ) });
168
- var AccordionContent = ({
169
- className,
170
- ref,
171
- children,
172
- ...props
173
- }) => /* @__PURE__ */ jsx(
174
- Accordion$1.Panel,
175
- {
176
- ref,
177
- className: cn("pt-govuk-3 pb-govuk-8 *:last:mb-0", className),
178
- ...props,
179
- children
180
- }
181
- );
182
-
183
- export { Accordion, AccordionContent, AccordionHeading, AccordionSection };
@@ -1,93 +0,0 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- var CookieBanner = ({
5
- className,
6
- ref,
7
- children,
8
- role = "region",
9
- ...props
10
- }) => /* @__PURE__ */ jsx(
11
- "div",
12
- {
13
- ref,
14
- role,
15
- "data-nosnippet": true,
16
- className: cn(
17
- "font-govuk text-govuk-body",
18
- "pt-govuk-4",
19
- "border-b-govuk-wide border-b-transparent",
20
- "bg-govuk-light-grey",
21
- className
22
- ),
23
- ...props,
24
- children
25
- }
26
- );
27
- var CookieBannerMessage = ({
28
- className,
29
- ref,
30
- children,
31
- ...props
32
- }) => /* @__PURE__ */ jsx(
33
- "div",
34
- {
35
- ref,
36
- className: cn("max-w-240 mx-auto px-govuk-3", "-mb-govuk-2", className),
37
- ...props,
38
- children
39
- }
40
- );
41
- var CookieBannerContent = ({
42
- className,
43
- ref,
44
- children,
45
- ...props
46
- }) => /* @__PURE__ */ jsx(
47
- "div",
48
- {
49
- ref,
50
- className: cn("sm:w-2/3", "mb-govuk-3", "*:last:mb-0", className),
51
- ...props,
52
- children
53
- }
54
- );
55
- var CookieBannerHeading = ({
56
- className,
57
- ref,
58
- children,
59
- ...props
60
- }) => /* @__PURE__ */ jsx(
61
- "h2",
62
- {
63
- ref,
64
- className: cn(
65
- "text-govuk-heading-m font-bold text-govuk-black",
66
- "m-0 mb-govuk-3",
67
- className
68
- ),
69
- ...props,
70
- children
71
- }
72
- );
73
- var CookieBannerActions = ({
74
- className,
75
- ref,
76
- children,
77
- ...props
78
- }) => /* @__PURE__ */ jsx(
79
- "div",
80
- {
81
- ref,
82
- className: cn(
83
- "flex flex-col items-start",
84
- "sm:flex-row sm:flex-wrap sm:items-baseline",
85
- "gap-govuk-3",
86
- className
87
- ),
88
- ...props,
89
- children
90
- }
91
- );
92
-
93
- export { CookieBanner, CookieBannerActions, CookieBannerContent, CookieBannerHeading, CookieBannerMessage };
@@ -1,41 +0,0 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- var Panel = ({ className, ref, children, ...props }) => /* @__PURE__ */ jsx(
5
- "div",
6
- {
7
- ref,
8
- className: cn(
9
- "font-govuk text-govuk-heading-l",
10
- "box-border text-center",
11
- "mb-govuk-3 p-govuk-7 max-sm:p-govuk-4",
12
- "border-govuk-standard border-transparent",
13
- "text-white bg-govuk-green",
14
- "overflow-wrap-break-word",
15
- className
16
- ),
17
- ...props,
18
- children
19
- }
20
- );
21
- var PanelTitle = ({
22
- className,
23
- ref,
24
- children,
25
- ...props
26
- }) => /* @__PURE__ */ jsx(
27
- "h1",
28
- {
29
- ref,
30
- className: cn(
31
- "text-govuk-heading-xl font-bold",
32
- "mt-0 mb-govuk-6 last:mb-0",
33
- className
34
- ),
35
- ...props,
36
- children
37
- }
38
- );
39
- var PanelBody = ({ className, ref, children, ...props }) => /* @__PURE__ */ jsx("div", { ref, className: cn("text-govuk-heading-l", className), ...props, children });
40
-
41
- export { Panel, PanelBody, PanelTitle };
@@ -1,29 +0,0 @@
1
- import { clsx } from 'clsx';
2
- import { extendTailwindMerge } from 'tailwind-merge';
3
-
4
- // registry/default/lib/utils.ts
5
- var twMerge = extendTailwindMerge({
6
- extend: {
7
- classGroups: {
8
- "font-size": [
9
- {
10
- text: [
11
- "govuk-header",
12
- "govuk-header-link",
13
- "govuk-body",
14
- "govuk-tag",
15
- "govuk-start",
16
- "govuk-heading-xl",
17
- "govuk-heading-l",
18
- "govuk-heading-m",
19
- "govuk-warning-icon",
20
- "govuk-phase-banner"
21
- ]
22
- }
23
- ]
24
- }
25
- }
26
- });
27
- var cn = (...inputs) => twMerge(clsx(inputs));
28
-
29
- export { cn };
@@ -1,150 +0,0 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
2
- import { Select as Select$1 } from '@base-ui/react/select';
3
- import { cva } from 'class-variance-authority';
4
- import { jsxs, jsx } from 'react/jsx-runtime';
5
-
6
- var selectTriggerVariants = cva(
7
- [
8
- "box-border",
9
- "w-full sm:w-auto max-w-full",
10
- "h-10",
11
- "py-1.25 pr-1.25 pl-2",
12
- "border-2 border-govuk-black",
13
- "rounded-none",
14
- "appearance-none",
15
- "text-govuk-body leading-tight font-normal font-govuk text-govuk-black",
16
- "bg-white",
17
- "inline-flex items-center",
18
- "cursor-pointer",
19
- "focus:outline-3 focus:outline-govuk-yellow focus:outline-offset-0",
20
- "focus:inset-ring-2 focus:inset-ring-govuk-black",
21
- "data-popup-open:outline-3 data-popup-open:outline-govuk-yellow data-popup-open:outline-offset-0",
22
- "data-popup-open:inset-ring-2 data-popup-open:inset-ring-govuk-black",
23
- "data-disabled:opacity-50 data-disabled:cursor-not-allowed"
24
- ],
25
- {
26
- variants: {
27
- error: {
28
- true: "border-govuk-error focus:border-govuk-black",
29
- false: ""
30
- }
31
- },
32
- defaultVariants: {
33
- error: false
34
- }
35
- }
36
- );
37
- var Select = ({
38
- children,
39
- className,
40
- error = false,
41
- placeholder,
42
- defaultValue,
43
- value,
44
- onValueChange,
45
- disabled,
46
- name,
47
- required,
48
- items,
49
- "aria-label": ariaLabel,
50
- "aria-labelledby": ariaLabelledBy
51
- }) => /* @__PURE__ */ jsxs(
52
- Select$1.Root,
53
- {
54
- defaultValue,
55
- value,
56
- onValueChange,
57
- disabled,
58
- name,
59
- required,
60
- items,
61
- children: [
62
- /* @__PURE__ */ jsxs(
63
- Select$1.Trigger,
64
- {
65
- "aria-label": ariaLabel,
66
- "aria-labelledby": ariaLabelledBy,
67
- className: cn(selectTriggerVariants({ error }), className),
68
- children: [
69
- /* @__PURE__ */ jsxs("span", { className: "relative flex-1 text-left", children: [
70
- /* @__PURE__ */ jsx(Select$1.Value, { placeholder }),
71
- items && /* @__PURE__ */ jsx(
72
- "span",
73
- {
74
- "aria-hidden": "true",
75
- className: "invisible block h-0 overflow-hidden",
76
- children: items.map((item) => /* @__PURE__ */ jsx("span", { className: "block whitespace-nowrap", children: item.label }, item.value))
77
- }
78
- )
79
- ] }),
80
- /* @__PURE__ */ jsx(Select$1.Icon, { className: "ml-govuk-1 flex-none", children: /* @__PURE__ */ jsx(
81
- "svg",
82
- {
83
- xmlns: "http://www.w3.org/2000/svg",
84
- width: "16",
85
- height: "16",
86
- viewBox: "0 0 16 16",
87
- fill: "none",
88
- "aria-hidden": "true",
89
- children: /* @__PURE__ */ jsx("path", { d: "M4 6L8 10L12 6", stroke: "currentColor", strokeWidth: "2" })
90
- }
91
- ) })
92
- ]
93
- }
94
- ),
95
- /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(
96
- Select$1.Positioner,
97
- {
98
- alignItemWithTrigger: false,
99
- side: "bottom",
100
- align: "start",
101
- sideOffset: -2,
102
- collisionPadding: 0,
103
- positionMethod: "fixed",
104
- className: "z-50",
105
- children: /* @__PURE__ */ jsx(
106
- Select$1.Popup,
107
- {
108
- className: cn(
109
- "w-anchor box-border",
110
- "border-2 border-govuk-black",
111
- "max-h-60 overflow-y-auto",
112
- "bg-white",
113
- "outline-none"
114
- ),
115
- children: /* @__PURE__ */ jsx(Select$1.List, { children })
116
- }
117
- )
118
- }
119
- ) })
120
- ]
121
- }
122
- );
123
- var SelectItem = ({
124
- children,
125
- className,
126
- value,
127
- label,
128
- disabled,
129
- ...props
130
- }) => /* @__PURE__ */ jsx(
131
- Select$1.Item,
132
- {
133
- value,
134
- label: label ?? (typeof children === "string" ? children : void 0),
135
- disabled,
136
- className: cn(
137
- "py-govuk-1 pr-govuk-1 pl-2",
138
- "text-govuk-body font-govuk text-govuk-black",
139
- "cursor-pointer select-none",
140
- "outline-none",
141
- "data-highlighted:bg-govuk-brand data-highlighted:text-white",
142
- "data-disabled:opacity-50 data-disabled:cursor-not-allowed",
143
- className
144
- ),
145
- ...props,
146
- children: /* @__PURE__ */ jsx(Select$1.ItemText, { children })
147
- }
148
- );
149
-
150
- export { Select, SelectItem, selectTriggerVariants };
@@ -1,48 +0,0 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- var PhaseBanner = ({ className, ref, ...props }) => /* @__PURE__ */ jsx(
5
- "div",
6
- {
7
- ref,
8
- className: cn("py-govuk-2 border-b border-govuk-mid-grey", className),
9
- ...props
10
- }
11
- );
12
- var PhaseBannerContent = ({
13
- className,
14
- ref,
15
- ...props
16
- }) => /* @__PURE__ */ jsx(
17
- "p",
18
- {
19
- ref,
20
- className: cn(
21
- "table m-0 font-govuk text-govuk-phase-banner text-govuk-black",
22
- className
23
- ),
24
- ...props
25
- }
26
- );
27
- var PhaseBannerTag = ({ className, ref, ...props }) => /* @__PURE__ */ jsx(
28
- "span",
29
- {
30
- ref,
31
- className: cn("mr-govuk-3 sm:mr-govuk-2", className),
32
- ...props
33
- }
34
- );
35
- var PhaseBannerText = ({
36
- className,
37
- ref,
38
- ...props
39
- }) => /* @__PURE__ */ jsx(
40
- "span",
41
- {
42
- ref,
43
- className: cn("table-cell align-middle", className),
44
- ...props
45
- }
46
- );
47
-
48
- export { PhaseBanner, PhaseBannerContent, PhaseBannerTag, PhaseBannerText };