@coopdigital/react 0.45.0 → 0.47.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 (207) hide show
  1. package/dist/components/AlertBanner/AlertBanner.d.ts +4 -2
  2. package/dist/components/AlertBanner/AlertBanner.js +2 -2
  3. package/dist/components/Author/Author.d.ts +4 -2
  4. package/dist/components/Author/Author.js +2 -2
  5. package/dist/components/Button/Button.d.ts +6 -4
  6. package/dist/components/Button/Button.js +4 -7
  7. package/dist/components/Card/Card.d.ts +4 -2
  8. package/dist/components/Card/Card.js +4 -4
  9. package/dist/components/Checkbox/Checkbox.d.ts +4 -2
  10. package/dist/components/Checkbox/Checkbox.js +2 -2
  11. package/dist/components/Expandable/Expandable.d.ts +4 -2
  12. package/dist/components/Expandable/Expandable.js +4 -4
  13. package/dist/components/Field/Field.d.ts +4 -2
  14. package/dist/components/Field/Field.js +7 -8
  15. package/dist/components/FieldMarkers/Error.d.ts +4 -2
  16. package/dist/components/FieldMarkers/Error.js +2 -2
  17. package/dist/components/FieldMarkers/Hint.d.ts +5 -3
  18. package/dist/components/FieldMarkers/Hint.js +2 -2
  19. package/dist/components/FieldMarkers/Label.d.ts +4 -2
  20. package/dist/components/FieldMarkers/Label.js +6 -2
  21. package/dist/components/FieldMarkers/Legend.d.ts +4 -2
  22. package/dist/components/FieldMarkers/Legend.js +2 -2
  23. package/dist/components/Fieldset/Fieldset.d.ts +4 -2
  24. package/dist/components/Fieldset/Fieldset.js +2 -4
  25. package/dist/components/Flourish/Flourish.d.ts +4 -2
  26. package/dist/components/Flourish/Flourish.js +2 -2
  27. package/dist/components/Icon/AddIcon.d.ts +1 -1
  28. package/dist/components/Icon/AddIcon.js +6 -5
  29. package/dist/components/Icon/ArrowDownIcon.d.ts +1 -1
  30. package/dist/components/Icon/ArrowDownIcon.js +6 -5
  31. package/dist/components/Icon/ArrowLeftIcon.d.ts +1 -1
  32. package/dist/components/Icon/ArrowLeftIcon.js +6 -5
  33. package/dist/components/Icon/ArrowRightIcon.d.ts +1 -1
  34. package/dist/components/Icon/ArrowRightIcon.js +6 -5
  35. package/dist/components/Icon/ArrowUpIcon.d.ts +1 -1
  36. package/dist/components/Icon/ArrowUpIcon.js +6 -5
  37. package/dist/components/Icon/AvatarAltIcon.d.ts +1 -1
  38. package/dist/components/Icon/AvatarAltIcon.js +6 -5
  39. package/dist/components/Icon/AvatarIcon.d.ts +1 -1
  40. package/dist/components/Icon/AvatarIcon.js +6 -5
  41. package/dist/components/Icon/BasketIcon.d.ts +1 -1
  42. package/dist/components/Icon/BasketIcon.js +6 -5
  43. package/dist/components/Icon/CalendarIcon.d.ts +1 -1
  44. package/dist/components/Icon/CalendarIcon.js +6 -5
  45. package/dist/components/Icon/ChevronDownIcon.d.ts +1 -1
  46. package/dist/components/Icon/ChevronDownIcon.js +6 -5
  47. package/dist/components/Icon/ChevronLeftIcon.d.ts +1 -1
  48. package/dist/components/Icon/ChevronLeftIcon.js +6 -5
  49. package/dist/components/Icon/ChevronRightIcon.d.ts +1 -1
  50. package/dist/components/Icon/ChevronRightIcon.js +6 -5
  51. package/dist/components/Icon/ChevronUpIcon.d.ts +1 -1
  52. package/dist/components/Icon/ChevronUpIcon.js +6 -5
  53. package/dist/components/Icon/ClockIcon.d.ts +1 -1
  54. package/dist/components/Icon/ClockIcon.js +6 -5
  55. package/dist/components/Icon/CloseAltIcon.d.ts +1 -1
  56. package/dist/components/Icon/CloseAltIcon.js +6 -5
  57. package/dist/components/Icon/CloseIcon.d.ts +1 -1
  58. package/dist/components/Icon/CloseIcon.js +6 -5
  59. package/dist/components/Icon/CoopCardIcon.d.ts +1 -1
  60. package/dist/components/Icon/CoopCardIcon.js +6 -5
  61. package/dist/components/Icon/CoopIcon.d.ts +1 -1
  62. package/dist/components/Icon/CoopIcon.js +6 -5
  63. package/dist/components/Icon/CoopLocationIcon.d.ts +1 -1
  64. package/dist/components/Icon/CoopLocationIcon.js +6 -5
  65. package/dist/components/Icon/DownloadIcon.d.ts +1 -1
  66. package/dist/components/Icon/DownloadIcon.js +6 -5
  67. package/dist/components/Icon/HomeIcon.d.ts +1 -1
  68. package/dist/components/Icon/HomeIcon.js +6 -5
  69. package/dist/components/Icon/InformationIcon.d.ts +1 -1
  70. package/dist/components/Icon/InformationIcon.js +6 -5
  71. package/dist/components/Icon/LoadingIcon.d.ts +1 -1
  72. package/dist/components/Icon/LoadingIcon.js +6 -5
  73. package/dist/components/Icon/LocationIcon.d.ts +1 -1
  74. package/dist/components/Icon/LocationIcon.js +6 -5
  75. package/dist/components/Icon/MailIcon.d.ts +1 -1
  76. package/dist/components/Icon/MailIcon.js +6 -5
  77. package/dist/components/Icon/MenuIcon.d.ts +1 -1
  78. package/dist/components/Icon/MenuIcon.js +6 -5
  79. package/dist/components/Icon/MessageIcon.d.ts +1 -1
  80. package/dist/components/Icon/MessageIcon.js +6 -5
  81. package/dist/components/Icon/MinusIcon.d.ts +1 -1
  82. package/dist/components/Icon/MinusIcon.js +6 -5
  83. package/dist/components/Icon/OpenNewIcon.d.ts +1 -1
  84. package/dist/components/Icon/OpenNewIcon.js +6 -5
  85. package/dist/components/Icon/PencilIcon.d.ts +1 -1
  86. package/dist/components/Icon/PencilIcon.js +6 -5
  87. package/dist/components/Icon/PhoneIcon.d.ts +1 -1
  88. package/dist/components/Icon/PhoneIcon.js +6 -5
  89. package/dist/components/Icon/QuestionIcon.d.ts +1 -1
  90. package/dist/components/Icon/QuestionIcon.js +6 -5
  91. package/dist/components/Icon/ScooterIcon.d.ts +1 -1
  92. package/dist/components/Icon/ScooterIcon.js +6 -5
  93. package/dist/components/Icon/SearchIcon.d.ts +1 -1
  94. package/dist/components/Icon/SearchIcon.js +6 -5
  95. package/dist/components/Icon/SettingsIcon.d.ts +1 -1
  96. package/dist/components/Icon/SettingsIcon.js +6 -5
  97. package/dist/components/Icon/TickAltIcon.d.ts +1 -1
  98. package/dist/components/Icon/TickAltIcon.js +6 -5
  99. package/dist/components/Icon/TickIcon.d.ts +1 -1
  100. package/dist/components/Icon/TickIcon.js +6 -5
  101. package/dist/components/Icon/VanIcon.d.ts +1 -1
  102. package/dist/components/Icon/VanIcon.js +6 -5
  103. package/dist/components/Icon/WarningIcon.d.ts +1 -1
  104. package/dist/components/Icon/WarningIcon.js +6 -5
  105. package/dist/components/Icon/WriteIcon.d.ts +1 -1
  106. package/dist/components/Icon/WriteIcon.js +6 -5
  107. package/dist/components/Image/Image.d.ts +4 -2
  108. package/dist/components/Image/Image.js +2 -2
  109. package/dist/components/Pill/Pill.d.ts +4 -2
  110. package/dist/components/Pill/Pill.js +7 -8
  111. package/dist/components/Radio/Radio.d.ts +20 -0
  112. package/dist/components/Radio/Radio.js +21 -0
  113. package/dist/components/Radio/index.d.ts +4 -0
  114. package/dist/components/{SearchBox/SearchBox.d.ts → Searchbox/Searchbox.d.ts} +10 -8
  115. package/dist/components/{SearchBox/SearchBox.js → Searchbox/Searchbox.js} +16 -11
  116. package/dist/components/Searchbox/index.d.ts +4 -0
  117. package/dist/components/Signpost/Signpost.d.ts +6 -4
  118. package/dist/components/Signpost/Signpost.js +3 -6
  119. package/dist/components/SkipNav/SkipNav.d.ts +4 -2
  120. package/dist/components/SkipNav/SkipNav.js +2 -2
  121. package/dist/components/Squircle/Squircle.d.ts +4 -2
  122. package/dist/components/Squircle/Squircle.js +2 -2
  123. package/dist/components/Tag/Tag.d.ts +5 -3
  124. package/dist/components/Tag/Tag.js +3 -6
  125. package/dist/components/TextInput/TextInput.d.ts +5 -3
  126. package/dist/components/TextInput/TextInput.js +2 -2
  127. package/dist/components/Textarea/Textarea.d.ts +4 -2
  128. package/dist/components/Textarea/Textarea.js +4 -5
  129. package/dist/{utils/slots.d.ts → hooks/useSlots.d.ts} +1 -1
  130. package/dist/{utils/slots.js → hooks/useSlots.js} +2 -2
  131. package/dist/index.d.ts +2 -2
  132. package/dist/index.js +2 -2
  133. package/package.json +3 -3
  134. package/src/components/AlertBanner/AlertBanner.tsx +6 -2
  135. package/src/components/Author/Author.tsx +5 -2
  136. package/src/components/Button/Button.tsx +10 -15
  137. package/src/components/Card/Card.tsx +7 -5
  138. package/src/components/Checkbox/Checkbox.tsx +6 -2
  139. package/src/components/Expandable/Expandable.tsx +12 -5
  140. package/src/components/Field/Field.tsx +10 -9
  141. package/src/components/FieldMarkers/Error.tsx +9 -3
  142. package/src/components/FieldMarkers/Hint.tsx +10 -4
  143. package/src/components/FieldMarkers/Label.tsx +9 -3
  144. package/src/components/FieldMarkers/Legend.tsx +9 -3
  145. package/src/components/Fieldset/Fieldset.tsx +9 -4
  146. package/src/components/Flourish/Flourish.tsx +5 -2
  147. package/src/components/Icon/AddIcon.tsx +9 -6
  148. package/src/components/Icon/ArrowDownIcon.tsx +9 -6
  149. package/src/components/Icon/ArrowLeftIcon.tsx +9 -6
  150. package/src/components/Icon/ArrowRightIcon.tsx +9 -6
  151. package/src/components/Icon/ArrowUpIcon.tsx +9 -6
  152. package/src/components/Icon/AvatarAltIcon.tsx +9 -6
  153. package/src/components/Icon/AvatarIcon.tsx +9 -6
  154. package/src/components/Icon/BasketIcon.tsx +9 -6
  155. package/src/components/Icon/CalendarIcon.tsx +9 -6
  156. package/src/components/Icon/ChevronDownIcon.tsx +9 -6
  157. package/src/components/Icon/ChevronLeftIcon.tsx +9 -6
  158. package/src/components/Icon/ChevronRightIcon.tsx +9 -6
  159. package/src/components/Icon/ChevronUpIcon.tsx +9 -6
  160. package/src/components/Icon/ClockIcon.tsx +9 -6
  161. package/src/components/Icon/CloseAltIcon.tsx +9 -6
  162. package/src/components/Icon/CloseIcon.tsx +9 -6
  163. package/src/components/Icon/CoopCardIcon.tsx +9 -6
  164. package/src/components/Icon/CoopIcon.tsx +9 -6
  165. package/src/components/Icon/CoopLocationIcon.tsx +9 -6
  166. package/src/components/Icon/DownloadIcon.tsx +9 -6
  167. package/src/components/Icon/HomeIcon.tsx +9 -6
  168. package/src/components/Icon/InformationIcon.tsx +9 -6
  169. package/src/components/Icon/LoadingIcon.tsx +9 -6
  170. package/src/components/Icon/LocationIcon.tsx +9 -6
  171. package/src/components/Icon/MailIcon.tsx +9 -6
  172. package/src/components/Icon/MenuIcon.tsx +9 -6
  173. package/src/components/Icon/MessageIcon.tsx +9 -6
  174. package/src/components/Icon/MinusIcon.tsx +9 -6
  175. package/src/components/Icon/OpenNewIcon.tsx +9 -6
  176. package/src/components/Icon/PencilIcon.tsx +9 -6
  177. package/src/components/Icon/PhoneIcon.tsx +9 -6
  178. package/src/components/Icon/QuestionIcon.tsx +9 -6
  179. package/src/components/Icon/ScooterIcon.tsx +9 -6
  180. package/src/components/Icon/SearchIcon.tsx +9 -6
  181. package/src/components/Icon/SettingsIcon.tsx +9 -6
  182. package/src/components/Icon/TickAltIcon.tsx +9 -6
  183. package/src/components/Icon/TickIcon.tsx +9 -6
  184. package/src/components/Icon/VanIcon.tsx +9 -6
  185. package/src/components/Icon/WarningIcon.tsx +9 -6
  186. package/src/components/Icon/WriteIcon.tsx +9 -6
  187. package/src/components/Image/Image.tsx +5 -2
  188. package/src/components/Pill/Pill.tsx +10 -9
  189. package/src/components/Radio/Radio.tsx +50 -0
  190. package/src/components/Radio/index.ts +5 -0
  191. package/src/components/{SearchBox/SearchBox.tsx → Searchbox/Searchbox.tsx} +33 -30
  192. package/src/components/Searchbox/index.ts +5 -0
  193. package/src/components/Signpost/Signpost.tsx +8 -8
  194. package/src/components/SkipNav/SkipNav.tsx +5 -2
  195. package/src/components/Squircle/Squircle.tsx +5 -2
  196. package/src/components/Tag/Tag.tsx +9 -8
  197. package/src/components/TextInput/TextInput.tsx +18 -3
  198. package/src/components/Textarea/Textarea.tsx +8 -6
  199. package/src/{utils/slots.ts → hooks/useSlots.ts} +1 -1
  200. package/src/index.ts +2 -2
  201. package/dist/components/RadioButton/RadioButton.d.ts +0 -18
  202. package/dist/components/RadioButton/RadioButton.js +0 -22
  203. package/dist/components/RadioButton/index.d.ts +0 -4
  204. package/dist/components/SearchBox/index.d.ts +0 -4
  205. package/src/components/RadioButton/RadioButton.tsx +0 -48
  206. package/src/components/RadioButton/index.ts +0 -5
  207. package/src/components/SearchBox/index.ts +0 -5
@@ -2,5 +2,5 @@ import { type SVGProps } from "react";
2
2
  interface IconProps extends SVGProps<SVGSVGElement> {
3
3
  alt?: string;
4
4
  }
5
- export declare const SearchIcon: ({ alt, className, fill, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const SearchIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,19 +1,20 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import clsx from 'clsx';
3
- import { useId } from 'react';
3
+ import { useId } from '../../hooks/useId.js';
4
4
 
5
- const SearchIcon = ({ alt, className, fill, ...props }) => {
6
- const id = useId();
5
+ const SearchIcon = ({ alt, className, fill, id, ref, ...props }) => {
6
+ const uid = useId(id);
7
7
  const componentProps = {
8
- "aria-labelledby": alt ? id : undefined,
8
+ "aria-labelledby": alt ? uid + "-title" : undefined,
9
9
  className: clsx("coop-icon", className),
10
10
  "data-icon": "search",
11
11
  fill: fill !== null && fill !== void 0 ? fill : "none",
12
+ id: uid,
12
13
  role: alt ? "img" : undefined,
13
14
  viewBox: "0 0 32 32",
14
15
  ...props,
15
16
  };
16
- return (jsxs("svg", { ...componentProps, children: [alt ? jsx("title", { id: id, children: alt }) : null, jsx("path", { d: "M13.25 25.49a12.25 12.25 0 1 1 12.24-12.24 12.25 12.25 0 0 1-12.24 12.24m0-22.61a10.37 10.37 0 1 0 10.36 10.37A10.38 10.38 0 0 0 13.25 2.88", fill: fill !== null && fill !== void 0 ? fill : "currentColor" }), jsx("path", { d: "M30.06 31a.94.94 0 0 1-.67-.28l-8.81-8.81a.94.94 0 1 1 1.33-1.33l8.81 8.81a.94.94 0 0 1 0 1.33.9.9 0 0 1-.66.28", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
+ return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M13.25 25.49a12.25 12.25 0 1 1 12.24-12.24 12.25 12.25 0 0 1-12.24 12.24m0-22.61a10.37 10.37 0 1 0 10.36 10.37A10.38 10.38 0 0 0 13.25 2.88", fill: fill !== null && fill !== void 0 ? fill : "currentColor" }), jsx("path", { d: "M30.06 31a.94.94 0 0 1-.67-.28l-8.81-8.81a.94.94 0 1 1 1.33-1.33l8.81 8.81a.94.94 0 0 1 0 1.33.9.9 0 0 1-.66.28", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
18
  };
18
19
 
19
20
  export { SearchIcon };
@@ -2,5 +2,5 @@ import { type SVGProps } from "react";
2
2
  interface IconProps extends SVGProps<SVGSVGElement> {
3
3
  alt?: string;
4
4
  }
5
- export declare const SettingsIcon: ({ alt, className, fill, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const SettingsIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,19 +1,20 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import clsx from 'clsx';
3
- import { useId } from 'react';
3
+ import { useId } from '../../hooks/useId.js';
4
4
 
5
- const SettingsIcon = ({ alt, className, fill, ...props }) => {
6
- const id = useId();
5
+ const SettingsIcon = ({ alt, className, fill, id, ref, ...props }) => {
6
+ const uid = useId(id);
7
7
  const componentProps = {
8
- "aria-labelledby": alt ? id : undefined,
8
+ "aria-labelledby": alt ? uid + "-title" : undefined,
9
9
  className: clsx("coop-icon", className),
10
10
  "data-icon": "settings",
11
11
  fill: fill !== null && fill !== void 0 ? fill : "none",
12
+ id: uid,
12
13
  role: alt ? "img" : undefined,
13
14
  viewBox: "0 0 32 32",
14
15
  ...props,
15
16
  };
16
- return (jsxs("svg", { ...componentProps, children: [alt ? jsx("title", { id: id, children: alt }) : null, jsx("path", { d: "M16 2a14 14 0 0 1 2.13.16v3.57l1.34.47a10.2 10.2 0 0 1 3.27 1.89l1.08.91 1.23-.71 1.86-1.08a14 14 0 0 1 2.14 3.69L27.18 12l-1.18.7.26 1.39a10.6 10.6 0 0 1 0 3.8L26 19.28l1.23.71 1.88 1.09a14.2 14.2 0 0 1-2.14 3.69l-1.86-1.08-1.28-.69-1.07.92a10.6 10.6 0 0 1-3.3 1.9l-1.33.47v3.57A14 14 0 0 1 16 30a14 14 0 0 1-2.13-.16v-3.57l-1.34-.47a10.2 10.2 0 0 1-3.27-1.9L8.18 23 7 23.69l-1.91 1.08A14.1 14.1 0 0 1 3 21.08L4.82 20l1.23-.71-.26-1.39a10.6 10.6 0 0 1 0-3.8l.26-1.39L4.82 12 3 10.92a14.5 14.5 0 0 1 2.08-3.69l1.86 1.08L8.16 9l1.08-.9a10.6 10.6 0 0 1 3.3-1.9l1.33-.47V2.16A14 14 0 0 1 16 2m0 21a7 7 0 1 0-7-7 7 7 0 0 0 7 7m0-23a16 16 0 0 0-3.53.39.76.76 0 0 0-.6.75v3.18a12.7 12.7 0 0 0-3.93 2.26L5.2 5a.75.75 0 0 0-.38-.1.77.77 0 0 0-.57.25 15.9 15.9 0 0 0-3.53 6.1.78.78 0 0 0 .35.91l2.75 1.59a12.3 12.3 0 0 0 0 4.52l-2.75 1.58a.79.79 0 0 0-.35.9 16 16 0 0 0 3.53 6.11.8.8 0 0 0 .57.25.7.7 0 0 0 .38-.11L8 25.42a12.3 12.3 0 0 0 3.92 2.26v3.18a.77.77 0 0 0 .61.75A16.2 16.2 0 0 0 16 32a16 16 0 0 0 3.53-.39.76.76 0 0 0 .6-.75v-3.18a12.5 12.5 0 0 0 3.92-2.26L26.8 27a.79.79 0 0 0 1-.15 16 16 0 0 0 3.53-6.11.8.8 0 0 0-.36-.9l-2.75-1.59a12.8 12.8 0 0 0 0-4.53l2.75-1.59a.78.78 0 0 0 .35-.9 16.1 16.1 0 0 0-3.53-6.1.76.76 0 0 0-.57-.26.73.73 0 0 0-.42.13l-2.75 1.57a12.3 12.3 0 0 0-3.92-2.26V1.14a.77.77 0 0 0-.61-.75A16.2 16.2 0 0 0 16 0m0 21a5 5 0 1 1 5-5 5 5 0 0 1-5 5", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
+ return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M16 2a14 14 0 0 1 2.13.16v3.57l1.34.47a10.2 10.2 0 0 1 3.27 1.89l1.08.91 1.23-.71 1.86-1.08a14 14 0 0 1 2.14 3.69L27.18 12l-1.18.7.26 1.39a10.6 10.6 0 0 1 0 3.8L26 19.28l1.23.71 1.88 1.09a14.2 14.2 0 0 1-2.14 3.69l-1.86-1.08-1.28-.69-1.07.92a10.6 10.6 0 0 1-3.3 1.9l-1.33.47v3.57A14 14 0 0 1 16 30a14 14 0 0 1-2.13-.16v-3.57l-1.34-.47a10.2 10.2 0 0 1-3.27-1.9L8.18 23 7 23.69l-1.91 1.08A14.1 14.1 0 0 1 3 21.08L4.82 20l1.23-.71-.26-1.39a10.6 10.6 0 0 1 0-3.8l.26-1.39L4.82 12 3 10.92a14.5 14.5 0 0 1 2.08-3.69l1.86 1.08L8.16 9l1.08-.9a10.6 10.6 0 0 1 3.3-1.9l1.33-.47V2.16A14 14 0 0 1 16 2m0 21a7 7 0 1 0-7-7 7 7 0 0 0 7 7m0-23a16 16 0 0 0-3.53.39.76.76 0 0 0-.6.75v3.18a12.7 12.7 0 0 0-3.93 2.26L5.2 5a.75.75 0 0 0-.38-.1.77.77 0 0 0-.57.25 15.9 15.9 0 0 0-3.53 6.1.78.78 0 0 0 .35.91l2.75 1.59a12.3 12.3 0 0 0 0 4.52l-2.75 1.58a.79.79 0 0 0-.35.9 16 16 0 0 0 3.53 6.11.8.8 0 0 0 .57.25.7.7 0 0 0 .38-.11L8 25.42a12.3 12.3 0 0 0 3.92 2.26v3.18a.77.77 0 0 0 .61.75A16.2 16.2 0 0 0 16 32a16 16 0 0 0 3.53-.39.76.76 0 0 0 .6-.75v-3.18a12.5 12.5 0 0 0 3.92-2.26L26.8 27a.79.79 0 0 0 1-.15 16 16 0 0 0 3.53-6.11.8.8 0 0 0-.36-.9l-2.75-1.59a12.8 12.8 0 0 0 0-4.53l2.75-1.59a.78.78 0 0 0 .35-.9 16.1 16.1 0 0 0-3.53-6.1.76.76 0 0 0-.57-.26.73.73 0 0 0-.42.13l-2.75 1.57a12.3 12.3 0 0 0-3.92-2.26V1.14a.77.77 0 0 0-.61-.75A16.2 16.2 0 0 0 16 0m0 21a5 5 0 1 1 5-5 5 5 0 0 1-5 5", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
18
  };
18
19
 
19
20
  export { SettingsIcon };
@@ -2,5 +2,5 @@ import { type SVGProps } from "react";
2
2
  interface IconProps extends SVGProps<SVGSVGElement> {
3
3
  alt?: string;
4
4
  }
5
- export declare const TickAltIcon: ({ alt, className, fill, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const TickAltIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,19 +1,20 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import clsx from 'clsx';
3
- import { useId } from 'react';
3
+ import { useId } from '../../hooks/useId.js';
4
4
 
5
- const TickAltIcon = ({ alt, className, fill, ...props }) => {
6
- const id = useId();
5
+ const TickAltIcon = ({ alt, className, fill, id, ref, ...props }) => {
6
+ const uid = useId(id);
7
7
  const componentProps = {
8
- "aria-labelledby": alt ? id : undefined,
8
+ "aria-labelledby": alt ? uid + "-title" : undefined,
9
9
  className: clsx("coop-icon", className),
10
10
  "data-icon": "tick-alt",
11
11
  fill: fill !== null && fill !== void 0 ? fill : "none",
12
+ id: uid,
12
13
  role: alt ? "img" : undefined,
13
14
  viewBox: "0 0 32 32",
14
15
  ...props,
15
16
  };
16
- return (jsxs("svg", { ...componentProps, children: [alt ? jsx("title", { id: id, children: alt }) : null, jsx("path", { d: "M12.7 22a1 1 0 0 1-.71-.29L8.3 18a1 1 0 0 1 0-1.42 1 1 0 0 1 1.41 0l3 3 9.41-9.38a1 1 0 0 1 1.42 0 1 1 0 0 1 0 1.41L13.4 21.69a1 1 0 0 1-.7.31", fill: fill !== null && fill !== void 0 ? fill : "currentColor" }), jsx("path", { d: "M16 2A14 14 0 1 1 2 16 14 14 0 0 1 16 2m0-2a16 16 0 1 0 16 16A16 16 0 0 0 16 0", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
+ return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M12.7 22a1 1 0 0 1-.71-.29L8.3 18a1 1 0 0 1 0-1.42 1 1 0 0 1 1.41 0l3 3 9.41-9.38a1 1 0 0 1 1.42 0 1 1 0 0 1 0 1.41L13.4 21.69a1 1 0 0 1-.7.31", fill: fill !== null && fill !== void 0 ? fill : "currentColor" }), jsx("path", { d: "M16 2A14 14 0 1 1 2 16 14 14 0 0 1 16 2m0-2a16 16 0 1 0 16 16A16 16 0 0 0 16 0", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
18
  };
18
19
 
19
20
  export { TickAltIcon };
@@ -2,5 +2,5 @@ import { type SVGProps } from "react";
2
2
  interface IconProps extends SVGProps<SVGSVGElement> {
3
3
  alt?: string;
4
4
  }
5
- export declare const TickIcon: ({ alt, className, fill, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const TickIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,19 +1,20 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import clsx from 'clsx';
3
- import { useId } from 'react';
3
+ import { useId } from '../../hooks/useId.js';
4
4
 
5
- const TickIcon = ({ alt, className, fill, ...props }) => {
6
- const id = useId();
5
+ const TickIcon = ({ alt, className, fill, id, ref, ...props }) => {
6
+ const uid = useId(id);
7
7
  const componentProps = {
8
- "aria-labelledby": alt ? id : undefined,
8
+ "aria-labelledby": alt ? uid + "-title" : undefined,
9
9
  className: clsx("coop-icon", className),
10
10
  "data-icon": "tick",
11
11
  fill: fill !== null && fill !== void 0 ? fill : "none",
12
+ id: uid,
12
13
  role: alt ? "img" : undefined,
13
14
  viewBox: "0 0 32 32",
14
15
  ...props,
15
16
  };
16
- return (jsxs("svg", { ...componentProps, children: [alt ? jsx("title", { id: id, children: alt }) : null, jsx("path", { d: "M10.41 26a1 1 0 0 1-.71-.3l-6.42-6.59a1 1 0 0 1 1.44-1.39l5.69 5.85L27.28 6.3a1 1 0 1 1 1.44 1.4l-17.59 18a1 1 0 0 1-.72.3", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
+ return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M10.41 26a1 1 0 0 1-.71-.3l-6.42-6.59a1 1 0 0 1 1.44-1.39l5.69 5.85L27.28 6.3a1 1 0 1 1 1.44 1.4l-17.59 18a1 1 0 0 1-.72.3", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
18
  };
18
19
 
19
20
  export { TickIcon };
@@ -2,5 +2,5 @@ import { type SVGProps } from "react";
2
2
  interface IconProps extends SVGProps<SVGSVGElement> {
3
3
  alt?: string;
4
4
  }
5
- export declare const VanIcon: ({ alt, className, fill, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const VanIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,19 +1,20 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import clsx from 'clsx';
3
- import { useId } from 'react';
3
+ import { useId } from '../../hooks/useId.js';
4
4
 
5
- const VanIcon = ({ alt, className, fill, ...props }) => {
6
- const id = useId();
5
+ const VanIcon = ({ alt, className, fill, id, ref, ...props }) => {
6
+ const uid = useId(id);
7
7
  const componentProps = {
8
- "aria-labelledby": alt ? id : undefined,
8
+ "aria-labelledby": alt ? uid + "-title" : undefined,
9
9
  className: clsx("coop-icon", className),
10
10
  "data-icon": "van",
11
11
  fill: fill !== null && fill !== void 0 ? fill : "none",
12
+ id: uid,
12
13
  role: alt ? "img" : undefined,
13
14
  viewBox: "0 0 32 32",
14
15
  ...props,
15
16
  };
16
- return (jsxs("svg", { ...componentProps, children: [alt ? jsx("title", { id: id, children: alt }) : null, jsx("path", { d: "M31.05 3H9.8a1 1 0 0 0-1 1v.2H3.06a1 1 0 0 0-1 .86L.89 12.64a1 1 0 0 0-.89 1v10a1 1 0 0 0 1 1h3a5 5 0 0 0 9.9 0H18a5 5 0 0 0 9.89 0h3.21a1 1 0 0 0 .72-.3 1 1 0 0 0 .18-.72V4a1 1 0 0 0-.95-1M3.91 6.24H8.8v6.38H2.93ZM8.92 27A3 3 0 0 1 6 24.71a2.9 2.9 0 0 1-.12-.83 3.1 3.1 0 0 1 .25-1.22 3 3 0 0 1 5.53 0 3.3 3.3 0 0 1 .24 1.22 3.3 3.3 0 0 1-.11.83A3 3 0 0 1 8.92 27M23 27a3 3 0 0 1-2.89-2.24 2.9 2.9 0 0 1-.12-.83 3.1 3.1 0 0 1 .25-1.22 3 3 0 0 1 5.53 0 3.3 3.3 0 0 1 .23 1.17 3.3 3.3 0 0 1-.11.83A3 3 0 0 1 23 27m4.87-4.29a5 5 0 0 0-9.74 0H13.8a5 5 0 0 0-9.75 0H2v-8h7.8a1 1 0 0 0 1-1V5.05H30v17.61Z", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
+ return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M31.05 3H9.8a1 1 0 0 0-1 1v.2H3.06a1 1 0 0 0-1 .86L.89 12.64a1 1 0 0 0-.89 1v10a1 1 0 0 0 1 1h3a5 5 0 0 0 9.9 0H18a5 5 0 0 0 9.89 0h3.21a1 1 0 0 0 .72-.3 1 1 0 0 0 .18-.72V4a1 1 0 0 0-.95-1M3.91 6.24H8.8v6.38H2.93ZM8.92 27A3 3 0 0 1 6 24.71a2.9 2.9 0 0 1-.12-.83 3.1 3.1 0 0 1 .25-1.22 3 3 0 0 1 5.53 0 3.3 3.3 0 0 1 .24 1.22 3.3 3.3 0 0 1-.11.83A3 3 0 0 1 8.92 27M23 27a3 3 0 0 1-2.89-2.24 2.9 2.9 0 0 1-.12-.83 3.1 3.1 0 0 1 .25-1.22 3 3 0 0 1 5.53 0 3.3 3.3 0 0 1 .23 1.17 3.3 3.3 0 0 1-.11.83A3 3 0 0 1 23 27m4.87-4.29a5 5 0 0 0-9.74 0H13.8a5 5 0 0 0-9.75 0H2v-8h7.8a1 1 0 0 0 1-1V5.05H30v17.61Z", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
18
  };
18
19
 
19
20
  export { VanIcon };
@@ -2,5 +2,5 @@ import { type SVGProps } from "react";
2
2
  interface IconProps extends SVGProps<SVGSVGElement> {
3
3
  alt?: string;
4
4
  }
5
- export declare const WarningIcon: ({ alt, className, fill, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const WarningIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,19 +1,20 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import clsx from 'clsx';
3
- import { useId } from 'react';
3
+ import { useId } from '../../hooks/useId.js';
4
4
 
5
- const WarningIcon = ({ alt, className, fill, ...props }) => {
6
- const id = useId();
5
+ const WarningIcon = ({ alt, className, fill, id, ref, ...props }) => {
6
+ const uid = useId(id);
7
7
  const componentProps = {
8
- "aria-labelledby": alt ? id : undefined,
8
+ "aria-labelledby": alt ? uid + "-title" : undefined,
9
9
  className: clsx("coop-icon", className),
10
10
  "data-icon": "warning",
11
11
  fill: fill !== null && fill !== void 0 ? fill : "none",
12
+ id: uid,
12
13
  role: alt ? "img" : undefined,
13
14
  viewBox: "0 0 32 32",
14
15
  ...props,
15
16
  };
16
- return (jsxs("svg", { ...componentProps, children: [alt ? jsx("title", { id: id, children: alt }) : null, jsx("path", { d: "M2.35 28.08 16.06 4.46l13.71 23.62Zm29.32-.7L17.56 3.07A1.73 1.73 0 0 0 16.06 2a1.94 1.94 0 0 0-1.5 1.1L.35 27.38C-.45 28.77.15 30 1.85 30h28.32a1.6 1.6 0 0 0 1.5-2.62", fill: fill !== null && fill !== void 0 ? fill : "currentColor" }), jsx("path", { d: "M14.52 24.19A1.44 1.44 0 0 1 15 23.1a1.54 1.54 0 0 1 1.13-.46 1.63 1.63 0 0 1 1.12.44 1.39 1.39 0 0 1 .48 1.07 1.48 1.48 0 0 1-.47 1.1 1.62 1.62 0 0 1-1.74.34 1.6 1.6 0 0 1-.51-.32 1.3 1.3 0 0 1-.35-.48 1.3 1.3 0 0 1-.14-.6m2.8-3h-2.4v-9.71h2.4Z", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
+ return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M2.35 28.08 16.06 4.46l13.71 23.62Zm29.32-.7L17.56 3.07A1.73 1.73 0 0 0 16.06 2a1.94 1.94 0 0 0-1.5 1.1L.35 27.38C-.45 28.77.15 30 1.85 30h28.32a1.6 1.6 0 0 0 1.5-2.62", fill: fill !== null && fill !== void 0 ? fill : "currentColor" }), jsx("path", { d: "M14.52 24.19A1.44 1.44 0 0 1 15 23.1a1.54 1.54 0 0 1 1.13-.46 1.63 1.63 0 0 1 1.12.44 1.39 1.39 0 0 1 .48 1.07 1.48 1.48 0 0 1-.47 1.1 1.62 1.62 0 0 1-1.74.34 1.6 1.6 0 0 1-.51-.32 1.3 1.3 0 0 1-.35-.48 1.3 1.3 0 0 1-.14-.6m2.8-3h-2.4v-9.71h2.4Z", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
18
  };
18
19
 
19
20
  export { WarningIcon };
@@ -2,5 +2,5 @@ import { type SVGProps } from "react";
2
2
  interface IconProps extends SVGProps<SVGSVGElement> {
3
3
  alt?: string;
4
4
  }
5
- export declare const WriteIcon: ({ alt, className, fill, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const WriteIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,19 +1,20 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import clsx from 'clsx';
3
- import { useId } from 'react';
3
+ import { useId } from '../../hooks/useId.js';
4
4
 
5
- const WriteIcon = ({ alt, className, fill, ...props }) => {
6
- const id = useId();
5
+ const WriteIcon = ({ alt, className, fill, id, ref, ...props }) => {
6
+ const uid = useId(id);
7
7
  const componentProps = {
8
- "aria-labelledby": alt ? id : undefined,
8
+ "aria-labelledby": alt ? uid + "-title" : undefined,
9
9
  className: clsx("coop-icon", className),
10
10
  "data-icon": "write",
11
11
  fill: fill !== null && fill !== void 0 ? fill : "none",
12
+ id: uid,
12
13
  role: alt ? "img" : undefined,
13
14
  viewBox: "0 0 32 32",
14
15
  ...props,
15
16
  };
16
- return (jsxs("svg", { ...componentProps, children: [alt ? jsx("title", { id: id, children: alt }) : null, jsx("path", { d: "M19.67 10.13 17.9 11.9H7a1 1 0 0 1 0-2h12a1 1 0 0 1 .67.23M14.9 14.9l-2 2H7a1 1 0 0 1 0-2ZM20 15.9a1 1 0 0 1-1 1h-1.87l2-2a1 1 0 0 1 .82.59.85.85 0 0 1 .05.41M19 21.9H7a1 1 0 0 1 0-2h12a1 1 0 1 1 0 2", fill: fill !== null && fill !== void 0 ? fill : "currentColor" }), jsx("path", { d: "M24.08 10v20h-22V6h21.73l1.54-1.54a1.9 1.9 0 0 0-1-.44H2.07a2 2 0 0 0-2 2V30a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V8Z", fill: fill !== null && fill !== void 0 ? fill : "currentColor" }), jsx("path", { d: "M30.62 3.41 28.5 1.29a1 1 0 0 0-1.42 0L22.38 6l-3.9 3.9-5 5-1.33 1.33a1 1 0 0 0-.27.48v.19l-.6 2.57a.8.8 0 0 0 0 .43 1 1 0 0 0 1.19.77l2.74-.67a.64.64 0 0 0 .29-.13.6.6 0 0 0 .19-.14l2.85-2.86 1.4-1.39L30.62 4.82a1 1 0 0 0 0-1.41M15 19.06l-2.75.63.62-2.75 6.82-6.81L23.81 6l1.54-1.54L27.79 2l2.13 2.12Z", fill: fill !== null && fill !== void 0 ? fill : "currentColor" }), jsx("path", { d: "M31.33 2.7 29.21.58a2.06 2.06 0 0 0-2.83 0L11.44 15.52a2.1 2.1 0 0 0-.54 1l-.09.41-.54 2.34a2.18 2.18 0 0 0 .54 1.87 2 2 0 0 0 1.4.58 1.8 1.8 0 0 0 .46-.05l2.75-.67a2.1 2.1 0 0 0 1-.54L31.33 5.53a2 2 0 0 0 0-2.83M15 19.06l-2.75.63.62-2.75 6.82-6.81L23.81 6l1.54-1.54L27.79 2l2.13 2.12Z", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
+ return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M19.67 10.13 17.9 11.9H7a1 1 0 0 1 0-2h12a1 1 0 0 1 .67.23M14.9 14.9l-2 2H7a1 1 0 0 1 0-2ZM20 15.9a1 1 0 0 1-1 1h-1.87l2-2a1 1 0 0 1 .82.59.85.85 0 0 1 .05.41M19 21.9H7a1 1 0 0 1 0-2h12a1 1 0 1 1 0 2", fill: fill !== null && fill !== void 0 ? fill : "currentColor" }), jsx("path", { d: "M24.08 10v20h-22V6h21.73l1.54-1.54a1.9 1.9 0 0 0-1-.44H2.07a2 2 0 0 0-2 2V30a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V8Z", fill: fill !== null && fill !== void 0 ? fill : "currentColor" }), jsx("path", { d: "M30.62 3.41 28.5 1.29a1 1 0 0 0-1.42 0L22.38 6l-3.9 3.9-5 5-1.33 1.33a1 1 0 0 0-.27.48v.19l-.6 2.57a.8.8 0 0 0 0 .43 1 1 0 0 0 1.19.77l2.74-.67a.64.64 0 0 0 .29-.13.6.6 0 0 0 .19-.14l2.85-2.86 1.4-1.39L30.62 4.82a1 1 0 0 0 0-1.41M15 19.06l-2.75.63.62-2.75 6.82-6.81L23.81 6l1.54-1.54L27.79 2l2.13 2.12Z", fill: fill !== null && fill !== void 0 ? fill : "currentColor" }), jsx("path", { d: "M31.33 2.7 29.21.58a2.06 2.06 0 0 0-2.83 0L11.44 15.52a2.1 2.1 0 0 0-.54 1l-.09.41-.54 2.34a2.18 2.18 0 0 0 .54 1.87 2 2 0 0 0 1.4.58 1.8 1.8 0 0 0 .46-.05l2.75-.67a2.1 2.1 0 0 0 1-.54L31.33 5.53a2 2 0 0 0 0-2.83M15 19.06l-2.75.63.62-2.75 6.82-6.81L23.81 6l1.54-1.54L27.79 2l2.13 2.12Z", fill: fill !== null && fill !== void 0 ? fill : "currentColor" })] }));
17
18
  };
18
19
 
19
20
  export { WriteIcon };
@@ -1,4 +1,4 @@
1
- import type { HTMLAttributes, JSX } from "react";
1
+ import type { HTMLAttributes, JSX, Ref } from "react";
2
2
  export interface ImageProps extends HTMLAttributes<HTMLImageElement> {
3
3
  /** Specify text to describe the image. Refer to Experience Library guidelines on writing good alt text. */
4
4
  alt: string;
@@ -6,10 +6,12 @@ export interface ImageProps extends HTMLAttributes<HTMLImageElement> {
6
6
  crop?: "square" | "wide" | "none";
7
7
  /** **(Optional)** Specify the height of the image. */
8
8
  height?: string;
9
+ /** **(Optional)** Specify a custom React ref for this component. */
10
+ ref?: Ref<HTMLImageElement>;
9
11
  /** Specify the Image source URL. */
10
12
  src: string;
11
13
  /** **(Optional)** Specify the width of the image. */
12
14
  width?: string;
13
15
  }
14
- export declare const Image: ({ alt, crop, height, src, width, ...props }: ImageProps) => JSX.Element;
16
+ export declare const Image: ({ alt, crop, height, ref, src, width, ...props }: ImageProps) => JSX.Element;
15
17
  export default Image;
@@ -20,7 +20,7 @@ const getContentfulParams = (src, width, height) => {
20
20
  width: (_b = url.searchParams.get("w")) !== null && _b !== void 0 ? _b : width,
21
21
  };
22
22
  };
23
- const Image = ({ alt, crop, height, src, width = "640", ...props }) => {
23
+ const Image = ({ alt, crop, height, ref, src, width = "640", ...props }) => {
24
24
  let params = { height, src, width };
25
25
  if (src.includes("images.ctfassets.net")) {
26
26
  params = getContentfulParams(src, width, height);
@@ -30,7 +30,7 @@ const Image = ({ alt, crop, height, src, width = "640", ...props }) => {
30
30
  height: params.height,
31
31
  width: params.width,
32
32
  };
33
- return (jsx("picture", { children: jsx("img", { alt: alt, loading: "lazy", src: params.src, ...dimensions, ...props }) }));
33
+ return (jsx("picture", { children: jsx("img", { alt: alt, loading: "lazy", src: params.src, ...dimensions, ...props, ref: ref }) }));
34
34
  };
35
35
 
36
36
  export { Image, Image as default };
@@ -1,4 +1,4 @@
1
- import type { ForwardRefExoticComponent, HTMLAttributes, JSX } from "react";
1
+ import type { ForwardRefExoticComponent, HTMLAttributes, JSX, Ref } from "react";
2
2
  import React from "react";
3
3
  import { StandardSizes } from "src/types";
4
4
  export interface PillProps extends HTMLAttributes<HTMLAnchorElement> {
@@ -10,6 +10,8 @@ export interface PillProps extends HTMLAttributes<HTMLAnchorElement> {
10
10
  className?: string;
11
11
  /** **(Optional)** Specify the URL that the Pill component will link to when clicked. */
12
12
  href?: string;
13
+ /** **(Optional)** Specify a custom React ref for this component. */
14
+ ref?: Ref<HTMLElement>;
13
15
  /** **(Optional)** Specify the Pill size. */
14
16
  size?: StandardSizes;
15
17
  }
@@ -20,7 +22,7 @@ interface PillBadgeProps extends HTMLAttributes<HTMLSpanElement> {
20
22
  className?: string;
21
23
  }
22
24
  export declare const Pill: {
23
- ({ as, children, className, href, size, ...props }: PillProps): JSX.Element;
25
+ ({ as, children, className, href, ref, size, ...props }: PillProps): JSX.Element;
24
26
  Badge: {
25
27
  ({ children, className }: PillBadgeProps): import("react/jsx-runtime").JSX.Element;
26
28
  displayName: string;
@@ -1,26 +1,25 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import clsx from 'clsx';
3
3
  import React from 'react';
4
+ import { useSlots } from '../../hooks/useSlots.js';
4
5
  import { hasUserBg } from '../../utils/index.js';
5
- import { getSlots } from '../../utils/slots.js';
6
6
 
7
7
  const componentSlots = {
8
8
  Children: null,
9
9
  PillBadge: null,
10
10
  };
11
- const Pill = ({ as, children, className, href, size = "md", ...props }) => {
12
- let element = href ? "a" : "span";
13
- const slots = getSlots(componentSlots, children);
14
- if (as) {
15
- element = as;
16
- }
11
+ const Pill = ({ as, children, className, href, ref, size = "md", ...props }) => {
12
+ const element = as !== null && as !== void 0 ? as : (href ? "a" : "span");
13
+ const slots = useSlots(componentSlots, children);
17
14
  const componentProps = {
18
15
  className: clsx("coop-pill", !hasUserBg(className) && "bg-tint-grey", className),
19
16
  "data-size": size.length && size !== "md" ? size : undefined,
20
17
  href,
21
18
  ...props,
22
19
  };
23
- return React.createElement(element, { ...componentProps }, slots.PillBadge, slots.Children);
20
+ // https://github.com/facebook/react/issues/34775
21
+ // eslint-disable-next-line react-hooks/refs
22
+ return React.createElement(element, { ...componentProps, ref }, slots.PillBadge, slots.Children);
24
23
  };
25
24
  const PillBadge = ({ children, className }) => {
26
25
  return (jsx("span", { className: clsx("coop-pill--badge", !hasUserBg(className) && "bg-offer-red", className), children: children }));
@@ -0,0 +1,20 @@
1
+ import { type InputHTMLAttributes, type JSX, Ref } from "react";
2
+ import { StandardSizes } from "../../types";
3
+ export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
4
+ /** **(Optional)** Specify additional CSS classes to be applied to the component. */
5
+ className?: string;
6
+ /** **(Optional)** Specify whether the Radio should be disabled. Refer to Experience Library guidance on disabled form controls and accessibility. */
7
+ disabled?: boolean;
8
+ /** **(Optional)** Specify the Radio error state. */
9
+ error?: boolean;
10
+ /** **(Optional)** Specify the Radio id. Will be auto-generated if not set. */
11
+ id?: string;
12
+ /** Specify the Radio name. */
13
+ name: string;
14
+ /** **(Optional)** Specify a custom React ref for this component. */
15
+ ref?: Ref<HTMLInputElement>;
16
+ /** **(Optional)** Specify the Radio size. */
17
+ size?: StandardSizes;
18
+ }
19
+ export declare const Radio: ({ className, disabled, error, id, name, ref, size, ...props }: RadioProps) => JSX.Element;
20
+ export default Radio;
@@ -0,0 +1,21 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import clsx from 'clsx';
3
+ import { useId } from '../../hooks/useId.js';
4
+
5
+ const Radio = ({ className, disabled, error = false, id, name, ref, size = "md", ...props }) => {
6
+ const uid = useId(id);
7
+ const componentProps = {
8
+ className: clsx("coop-radio", className),
9
+ "data-error": error || undefined,
10
+ "data-size": size.length && size !== "md" ? size : undefined,
11
+ disabled,
12
+ id: uid,
13
+ name,
14
+ type: "radio",
15
+ ...props,
16
+ };
17
+ //const formItemProps = { "aria-disabled": disabled ? true : undefined }
18
+ return jsx("input", { ...componentProps, ref: ref });
19
+ };
20
+
21
+ export { Radio, Radio as default };
@@ -0,0 +1,4 @@
1
+ import Radio from "./Radio";
2
+ export default Radio;
3
+ export { Radio };
4
+ export * from "./Radio";
@@ -1,8 +1,8 @@
1
- import type { InputHTMLAttributes, JSX } from "react";
1
+ import type { InputHTMLAttributes, JSX, Ref } from "react";
2
2
  import React from "react";
3
- import { StandardSizes } from "../../../src/types";
3
+ import { StandardSizes } from "../../types";
4
4
  import { type ButtonProps } from "../Button";
5
- export interface SearchBoxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
5
+ export interface SearchboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
6
6
  /** **(Optional)** Specify a server endpoint to submit the form. Will be ignored if onSubmit is also set. */
7
7
  action?: string;
8
8
  /** **(Optional)** Specify props to forward to the Button element. Use `label` to set Button text. */
@@ -19,14 +19,16 @@ export interface SearchBoxProps extends Omit<InputHTMLAttributes<HTMLInputElemen
19
19
  labelVisible?: boolean;
20
20
  /** **(Optional)** Specify the TextInput name, also used as the URL search parameter. Defaults to `query`. */
21
21
  name?: string;
22
- /** **(Optional)** Callback to run when the form is submitted. If this is an async function, it will be awaited and the SearchBox will be in a pending state until the promise is resolved. */
22
+ /** **(Optional)** Callback to run when the form is submitted. If this is an async function, it will be awaited and the Searchbox will be in a pending state until the promise is resolved. */
23
23
  onSubmit?: React.FormEventHandler<HTMLElement> | undefined;
24
24
  /** **(Optional)** Specify the TextInput placeholder text Do not use in place of a form label. */
25
25
  placeholder?: string;
26
- /** **(Optional)** Specify the SearchBox size. */
26
+ /** **(Optional)** Specify a custom React ref for this component. */
27
+ ref?: Ref<HTMLFormElement>;
28
+ /** **(Optional)** Specify the Searchbox size. */
27
29
  size?: StandardSizes;
28
- /** **(Optional)** Specify the SearchBox variant. */
30
+ /** **(Optional)** Specify the Searchbox variant. */
29
31
  variant?: "green" | "blue" | "white" | "grey" | "green-ghost" | "blue-ghost" | "white-ghost" | "grey-ghost";
30
32
  }
31
- export declare const SearchBox: ({ action, "aria-placeholder": ariaPlaceholder, autoCapitalize, autoComplete, button, className, id, label, labelVisible, name, onSubmit, placeholder, size, variant, ...props }: SearchBoxProps) => JSX.Element;
32
- export default SearchBox;
33
+ export declare const Searchbox: ({ action, "aria-placeholder": ariaPlaceholder, autoCapitalize, autoComplete, button, className, id, label, labelVisible, name, onSubmit, placeholder, ref, size, variant, ...props }: SearchboxProps) => JSX.Element;
34
+ export default Searchbox;
@@ -2,7 +2,8 @@
2
2
  "use client";
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import clsx from 'clsx';
5
- import React, { useState, useId, useCallback } from 'react';
5
+ import React, { useState, useCallback } from 'react';
6
+ import { useId } from '../../hooks/useId.js';
6
7
  import { Button } from '../Button/Button.js';
7
8
  import { Label } from '../FieldMarkers/Label.js';
8
9
  import { SearchIcon } from '../Icon/SearchIcon.js';
@@ -12,11 +13,10 @@ const defaultButtonProps = {
12
13
  label: React.createElement(SearchIcon, { alt: "Search", stroke: "currentColor", strokeWidth: 2 }),
13
14
  loadingText: "",
14
15
  };
15
- const SearchBox = ({ action, "aria-placeholder": ariaPlaceholder, autoCapitalize = "off", autoComplete = "off", button = defaultButtonProps, className, id, label, labelVisible = false, name = "query", onSubmit, placeholder, size = "md", variant = "green", ...props }) => {
16
+ const Searchbox = ({ action, "aria-placeholder": ariaPlaceholder, autoCapitalize = "off", autoComplete = "off", button = defaultButtonProps, className, id, label, labelVisible = false, name = "query", onSubmit, placeholder, ref, size = "md", variant = "green", ...props }) => {
16
17
  var _a, _b;
17
18
  const [isPending, setIsPending] = useState(false);
18
- const internalId = useId();
19
- id = id !== null && id !== void 0 ? id : internalId;
19
+ const uid = useId(id);
20
20
  const handleSubmit = useCallback(async (event) => {
21
21
  event.preventDefault();
22
22
  if (isPending || !onSubmit)
@@ -31,30 +31,35 @@ const SearchBox = ({ action, "aria-placeholder": ariaPlaceholder, autoCapitalize
31
31
  }, [onSubmit, isPending]);
32
32
  const formProps = {
33
33
  action: action !== null && action !== void 0 ? action : undefined,
34
- className: clsx("coop-search-box", className),
34
+ className: clsx("coop-searchbox", className),
35
35
  "data-size": size && size !== "md" ? size : undefined,
36
36
  "data-variant": variant.length && variant !== "green" ? variant : undefined,
37
+ id: uid,
37
38
  onSubmit: onSubmit ? handleSubmit : undefined,
38
39
  };
39
40
  const buttonProps = {
40
41
  className: button === null || button === void 0 ? void 0 : button.className,
41
42
  isLoading: isPending,
42
43
  loadingText: (_a = button === null || button === void 0 ? void 0 : button.loadingText) !== null && _a !== void 0 ? _a : "",
43
- size: size,
44
- variant: variant,
44
+ size,
45
+ variant,
45
46
  };
46
47
  const inputProps = {
47
48
  "aria-placeholder": (_b = placeholder !== null && placeholder !== void 0 ? placeholder : ariaPlaceholder) !== null && _b !== void 0 ? _b : undefined,
48
49
  autoCapitalize,
49
50
  autoComplete,
50
- id,
51
+ id: uid + "--input",
51
52
  name,
52
53
  placeholder,
53
- size: size,
54
+ size,
54
55
  type: "search",
55
56
  ...props,
56
57
  };
57
- return (jsxs("form", { ...formProps, children: [label && (jsx(Label, { htmlFor: id, isVisible: labelVisible, children: label })), jsxs("div", { className: "coop-search-box--inner", children: [jsx(TextInput, { ...inputProps }), jsx(Button, { ...buttonProps, children: button.label })] })] }));
58
+ const labelProps = {
59
+ htmlFor: uid + "--input",
60
+ isVisible: labelVisible,
61
+ };
62
+ return (jsxs("form", { ...formProps, ref: ref, children: [label && jsx(Label, { ...labelProps, children: label }), jsxs("div", { className: "coop-searchbox--inner", children: [jsx(TextInput, { ...inputProps }), jsx(Button, { ...buttonProps, children: button.label })] })] }));
58
63
  };
59
64
 
60
- export { SearchBox, SearchBox as default };
65
+ export { Searchbox, Searchbox as default };
@@ -0,0 +1,4 @@
1
+ import Searchbox from "./Searchbox";
2
+ export default Searchbox;
3
+ export { Searchbox };
4
+ export * from "./Searchbox";
@@ -1,9 +1,9 @@
1
- import type { AnchorHTMLAttributes, ForwardRefExoticComponent, HTMLAttributes, JSX } from "react";
1
+ import type { ForwardRefExoticComponent, HTMLAttributes, JSX, Ref } from "react";
2
2
  import React from "react";
3
3
  import { ImageProps } from "../Image";
4
4
  export interface SignpostProps extends HTMLAttributes<HTMLDivElement> {
5
5
  /** **(Optional)** Specify a custom element to override default `a`. */
6
- as?: React.FC<AnchorHTMLAttributes<HTMLElement>> | ForwardRefExoticComponent<any> | string;
6
+ as?: React.FC<any> | ForwardRefExoticComponent<any> | string;
7
7
  /** Main content inside the component. It can be any valid JSX or string. */
8
8
  children: React.ReactNode;
9
9
  /** **(Optional)** Specify additional CSS classes to be applied to the component. */
@@ -11,9 +11,11 @@ export interface SignpostProps extends HTMLAttributes<HTMLDivElement> {
11
11
  /** **(Optional)** Specify the level of the Signpost heading. */
12
12
  headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6";
13
13
  /** Specify the URL that the Signpost component will link to when clicked. */
14
- href: string;
14
+ href?: string;
15
15
  /** **(Optional)** Specify properties of the Signpost Image. */
16
16
  image?: ImageProps;
17
+ /** **(Optional)** Specify a custom React ref for this component. */
18
+ ref?: Ref<HTMLDivElement>;
17
19
  }
18
- export declare const Signpost: ({ as, children, className, headingLevel, href, image, ...props }: SignpostProps) => JSX.Element;
20
+ export declare const Signpost: ({ as, children, className, headingLevel, href, image, ref, ...props }: SignpostProps) => JSX.Element;
19
21
  export default Signpost;
@@ -4,16 +4,13 @@ import React from 'react';
4
4
  import { ChevronRightIcon } from '../Icon/ChevronRightIcon.js';
5
5
  import { Image } from '../Image/Image.js';
6
6
 
7
- const Signpost = ({ as, children, className, headingLevel = "h3", href, image, ...props }) => {
8
- let element = "a";
9
- if (as) {
10
- element = as;
11
- }
7
+ const Signpost = ({ as, children, className, headingLevel = "h3", href, image, ref, ...props }) => {
8
+ const element = as !== null && as !== void 0 ? as : "a";
12
9
  const componentProps = {
13
10
  className: clsx("coop-signpost", className),
14
11
  ...props,
15
12
  };
16
- return (jsxs("div", { ...componentProps, children: [image && jsx(Image, { crop: "wide", ...image }), React.createElement(element, { href }, jsxs("div", { className: "coop-signpost--content", children: [React.createElement(headingLevel, { className: "coop-signpost--heading" }, children), jsx("span", { "aria-hidden": "true", className: "coop-signpost--icon", role: "presentation", children: jsx(ChevronRightIcon, {}) })] }))] }));
13
+ return (jsxs("div", { ...componentProps, ref: ref, children: [image && jsx(Image, { crop: "wide", ...image }), React.createElement(element, { href }, jsxs("div", { className: "coop-signpost--content", children: [React.createElement(headingLevel, { className: "coop-signpost--heading" }, children), jsx("span", { "aria-hidden": "true", className: "coop-signpost--icon", role: "presentation", children: jsx(ChevronRightIcon, {}) })] }))] }));
17
14
  };
18
15
 
19
16
  export { Signpost, Signpost as default };
@@ -1,4 +1,4 @@
1
- import type { HTMLAttributes, JSX } from "react";
1
+ import type { HTMLAttributes, JSX, Ref } from "react";
2
2
  interface SkipNavLink {
3
3
  href: string;
4
4
  label: string;
@@ -11,6 +11,8 @@ export interface SkipNavProps extends HTMLAttributes<HTMLDivElement> {
11
11
  /** **(Optional)** Specify links to show in the SkipNav.
12
12
  * Each item needs a `href` and `label`. Defaults to a single link anchored to `#main`. */
13
13
  links?: SkipNavLink[];
14
+ /** **(Optional)** Specify a custom React ref for this component. */
15
+ ref?: Ref<HTMLDivElement>;
14
16
  }
15
- export declare const SkipNav: ({ className, isVisible, links, ...props }: SkipNavProps) => JSX.Element;
17
+ export declare const SkipNav: ({ className, isVisible, links, ref, ...props }: SkipNavProps) => JSX.Element;
16
18
  export default SkipNav;
@@ -2,13 +2,13 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import clsx from 'clsx';
3
3
 
4
4
  const defaultLinks = [{ href: "#main", label: "Skip to main content" }];
5
- const SkipNav = ({ className, isVisible = false, links = defaultLinks, ...props }) => {
5
+ const SkipNav = ({ className, isVisible = false, links = defaultLinks, ref, ...props }) => {
6
6
  const componentProps = {
7
7
  className: clsx("coop-skip-nav", className),
8
8
  ...props,
9
9
  };
10
10
  const navLinks = links.length > 0 ? links : defaultLinks;
11
- return (jsx("nav", { ...componentProps, children: jsx("ul", { children: navLinks.map((link) => {
11
+ return (jsx("nav", { ...componentProps, ref: ref, children: jsx("ul", { children: navLinks.map((link) => {
12
12
  const linkProps = {
13
13
  "data-visible": isVisible,
14
14
  href: link.href,
@@ -1,11 +1,13 @@
1
- import type { HTMLAttributes, JSX } from "react";
1
+ import type { HTMLAttributes, JSX, Ref } from "react";
2
2
  export interface SquircleProps extends HTMLAttributes<HTMLDivElement> {
3
3
  /** **(Optional)** Main content inside the component. It can be any valid JSX or string. */
4
4
  children?: React.ReactNode;
5
5
  /** **(Optional)** Specify additional CSS classes to be applied to the component. */
6
6
  className?: string;
7
+ /** **(Optional)** Specify a custom React ref for this component. */
8
+ ref?: Ref<HTMLDivElement>;
7
9
  /** **(Optional)** Specify the Squircle size. */
8
10
  size?: "sm" | "md" | "lg";
9
11
  }
10
- export declare const Squircle: ({ children, className, size, ...props }: SquircleProps) => JSX.Element;
12
+ export declare const Squircle: ({ children, className, ref, size, ...props }: SquircleProps) => JSX.Element;
11
13
  export default Squircle;