@ogcio/design-system-react 1.11.1 → 1.11.2

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 (374) hide show
  1. package/dist/accordion/accordion-item.d.ts +11 -0
  2. package/dist/accordion/accordion-item.js +76 -0
  3. package/dist/accordion/accordion.d.ts +10 -0
  4. package/dist/accordion/accordion.js +39 -0
  5. package/dist/accordion/accordion.test.d.ts +1 -0
  6. package/dist/accordion/accordion.test.js +61 -0
  7. package/dist/alert/alert.d.ts +89 -0
  8. package/dist/alert/alert.js +115 -0
  9. package/dist/alert/alert.test.d.ts +1 -0
  10. package/dist/alert/alert.test.js +45 -0
  11. package/dist/assets/logos/gov-of-ireland/harp-gold-text-green.d.ts +2 -0
  12. package/dist/assets/logos/gov-of-ireland/harp-gold-text-green.js +322 -0
  13. package/dist/assets/logos/gov-of-ireland/harp-white.d.ts +2 -0
  14. package/dist/assets/logos/gov-of-ireland/harp-white.js +322 -0
  15. package/dist/assets/logos/harp/harp-white.d.ts +2 -0
  16. package/dist/assets/logos/harp/harp-white.js +60 -0
  17. package/dist/autocomplete/autocomplete.d.ts +4 -0
  18. package/dist/autocomplete/autocomplete.js +252 -0
  19. package/dist/autocomplete/types.d.ts +61 -0
  20. package/dist/autocomplete/types.js +13 -0
  21. package/dist/blockquote/blockquote.d.ts +3 -0
  22. package/dist/blockquote/blockquote.js +7 -0
  23. package/dist/blockquote/blockquote.test.d.ts +1 -0
  24. package/dist/blockquote/blockquote.test.js +21 -0
  25. package/dist/breadcrumbs/breadcrumbs.d.ts +5 -0
  26. package/dist/breadcrumbs/breadcrumbs.js +38 -0
  27. package/dist/breadcrumbs/breadcrumbs.test.d.ts +1 -0
  28. package/dist/breadcrumbs/breadcrumbs.test.js +43 -0
  29. package/dist/breadcrumbs/types.d.ts +17 -0
  30. package/dist/breadcrumbs/types.js +1 -0
  31. package/dist/button/button.d.ts +9 -0
  32. package/dist/button/button.js +38 -0
  33. package/dist/button/button.test.d.ts +1 -0
  34. package/dist/button/button.test.js +78 -0
  35. package/dist/button/helpers.d.ts +13 -0
  36. package/dist/button/helpers.js +39 -0
  37. package/dist/button/types.d.ts +13 -0
  38. package/dist/button/types.js +4 -0
  39. package/dist/button-group/button-group.d.ts +21 -0
  40. package/dist/button-group/button-group.js +85 -0
  41. package/dist/button-group/button-group.test.d.ts +1 -0
  42. package/dist/button-group/button-group.test.js +2982 -0
  43. package/dist/card/card-legacy.d.ts +5 -0
  44. package/dist/card/card-legacy.js +68 -0
  45. package/dist/card/card-next.d.ts +13 -0
  46. package/dist/card/card-next.js +84 -0
  47. package/dist/card/card.d.ts +2 -0
  48. package/dist/card/card.js +26 -0
  49. package/dist/card/card.test.d.ts +1 -0
  50. package/dist/card/card.test.js +130 -0
  51. package/dist/card/types.d.ts +92 -0
  52. package/dist/card/types.js +1 -0
  53. package/dist/checkbox/checkbox-group.d.ts +4 -0
  54. package/dist/checkbox/checkbox-group.js +7 -0
  55. package/dist/checkbox/checkbox.d.ts +4 -0
  56. package/dist/checkbox/checkbox.js +7 -0
  57. package/dist/checkbox/types.d.ts +14 -0
  58. package/dist/checkbox/types.js +5 -0
  59. package/dist/chip/chip.d.ts +9 -0
  60. package/dist/chip/chip.js +37 -0
  61. package/dist/cn.d.ts +2 -0
  62. package/dist/cn.js +19 -0
  63. package/dist/combo-box/combo-box.content.d.ts +12 -0
  64. package/dist/combo-box/combo-box.content.js +685 -0
  65. package/dist/combo-box/combo-box.d.ts +2 -0
  66. package/dist/combo-box/combo-box.js +17 -0
  67. package/dist/combo-box/dropdown-item.d.ts +2 -0
  68. package/dist/combo-box/dropdown-item.js +154 -0
  69. package/dist/combo-box/dropdown-item.test.d.ts +1 -0
  70. package/dist/combo-box/dropdown-item.test.js +88 -0
  71. package/dist/combo-box/types.d.ts +18 -0
  72. package/dist/combo-box/types.js +1 -0
  73. package/dist/common/types.d.ts +7 -0
  74. package/dist/common/types.js +1 -0
  75. package/dist/container/container.d.ts +16 -0
  76. package/dist/container/container.js +37 -0
  77. package/dist/container/container.test.d.ts +1 -0
  78. package/dist/container/container.test.js +28 -0
  79. package/dist/cookie-banner/cookie-banner.content.d.ts +3 -0
  80. package/dist/cookie-banner/cookie-banner.content.js +21 -0
  81. package/dist/cookie-banner/cookie-banner.d.ts +12 -0
  82. package/dist/cookie-banner/cookie-banner.js +31 -0
  83. package/dist/cookie-banner/cookie-banner.test.d.ts +1 -0
  84. package/dist/cookie-banner/cookie-banner.test.js +20 -0
  85. package/dist/details/details.d.ts +4 -0
  86. package/dist/details/details.js +55 -0
  87. package/dist/details/details.test.d.ts +1 -0
  88. package/dist/details/details.test.js +50 -0
  89. package/dist/drawer/drawer.content.d.ts +3 -0
  90. package/dist/drawer/drawer.content.js +68 -0
  91. package/dist/drawer/drawer.d.ts +26 -0
  92. package/dist/drawer/drawer.js +48 -0
  93. package/dist/drawer/drawer.test.d.ts +1 -0
  94. package/dist/drawer/drawer.test.js +69 -0
  95. package/dist/error-text/error-text.d.ts +7 -0
  96. package/dist/error-text/error-text.js +40 -0
  97. package/dist/error-text/error-text.test.d.ts +1 -0
  98. package/dist/error-text/error-text.test.js +30 -0
  99. package/dist/error-text/types.d.ts +8 -0
  100. package/dist/error-text/types.js +1 -0
  101. package/dist/file-upload/file-upload.d.ts +9 -0
  102. package/dist/file-upload/file-upload.js +6 -0
  103. package/dist/footer/footer.d.ts +11 -0
  104. package/dist/footer/footer.js +108 -0
  105. package/dist/footer/footer.test.d.ts +1 -0
  106. package/dist/footer/footer.test.js +42 -0
  107. package/dist/forms/form-field-with-tag/form-field-with-tag.d.ts +24 -0
  108. package/dist/forms/form-field-with-tag/form-field-with-tag.js +50 -0
  109. package/dist/forms/form-field.d.ts +11 -0
  110. package/dist/forms/form-field.js +41 -0
  111. package/dist/forms/form.d.ts +4 -0
  112. package/dist/forms/form.js +5 -0
  113. package/dist/header/components/header-menu.d.ts +13 -0
  114. package/dist/header/components/header-menu.js +126 -0
  115. package/dist/header/components/header-search.d.ts +7 -0
  116. package/dist/header/components/header-search.js +59 -0
  117. package/dist/header/components/header-slot.d.ts +12 -0
  118. package/dist/header/components/header-slot.js +129 -0
  119. package/dist/header/header.d.ts +2 -0
  120. package/dist/header/header.js +201 -0
  121. package/dist/header/header.test.d.ts +1 -0
  122. package/dist/header/header.test.js +95 -0
  123. package/dist/header/helper.d.ts +2 -0
  124. package/dist/header/helper.js +79 -0
  125. package/dist/header/types.d.ts +76 -0
  126. package/dist/header/types.js +1 -0
  127. package/dist/heading/heading.d.ts +82 -0
  128. package/dist/heading/heading.js +50 -0
  129. package/dist/hint-text/hint-text.d.ts +7 -0
  130. package/dist/hint-text/hint-text.js +30 -0
  131. package/dist/hint-text/hint-text.test.d.ts +1 -0
  132. package/dist/hint-text/hint-text.test.js +31 -0
  133. package/dist/hint-text/types.d.ts +7 -0
  134. package/dist/hint-text/types.js +1 -0
  135. package/dist/hooks/use-breakpoint.d.ts +12 -0
  136. package/dist/hooks/use-breakpoint.js +24 -0
  137. package/dist/hooks/use-dom-id.d.ts +1 -0
  138. package/dist/hooks/use-dom-id.js +8 -0
  139. package/dist/i18n/config.d.ts +7 -0
  140. package/dist/i18n/config.js +13 -0
  141. package/dist/i18n/utility.d.ts +1 -0
  142. package/dist/i18n/utility.js +5 -0
  143. package/dist/i18next-DxWa09nx.js +1395 -0
  144. package/dist/icon/icon.d.ts +15 -0
  145. package/dist/icon/icon.js +173 -0
  146. package/dist/icon/icon.test.d.ts +1 -0
  147. package/dist/icon/icon.test.js +53 -0
  148. package/dist/icon/icons.d.ts +2 -0
  149. package/dist/icon/icons.js +144 -0
  150. package/dist/icon/svg.d.ts +7 -0
  151. package/dist/icon/svg.js +22 -0
  152. package/dist/icon/svgs/bluesky.d.ts +5 -0
  153. package/dist/icon/svgs/bluesky.js +24 -0
  154. package/dist/icon/svgs/facebook.d.ts +5 -0
  155. package/dist/icon/svgs/facebook.js +24 -0
  156. package/dist/icon/svgs/instagram.d.ts +5 -0
  157. package/dist/icon/svgs/instagram.js +24 -0
  158. package/dist/icon/svgs/linkedin.d.ts +5 -0
  159. package/dist/icon/svgs/linkedin.js +24 -0
  160. package/dist/icon/svgs/placeholder.d.ts +5 -0
  161. package/dist/icon/svgs/placeholder.js +30 -0
  162. package/dist/icon/svgs/threads.d.ts +5 -0
  163. package/dist/icon/svgs/threads.js +24 -0
  164. package/dist/icon/svgs/tiktok.d.ts +5 -0
  165. package/dist/icon/svgs/tiktok.js +24 -0
  166. package/dist/icon/svgs/x.d.ts +5 -0
  167. package/dist/icon/svgs/x.js +24 -0
  168. package/dist/icon/svgs/youtube.d.ts +5 -0
  169. package/dist/icon/svgs/youtube.js +29 -0
  170. package/dist/icon-button/icon-button.d.ts +10 -0
  171. package/dist/icon-button/icon-button.js +43 -0
  172. package/dist/icon-button/icon-button.test.d.ts +1 -0
  173. package/dist/icon-button/icon-button.test.js +56 -0
  174. package/dist/index-DNkhmzZp.js +2419 -0
  175. package/dist/index-ntYL1VRC.js +64 -0
  176. package/dist/index.d.ts +102 -0
  177. package/dist/index.js +190 -0
  178. package/dist/input-checkbox/input-checkbox.d.ts +3 -0
  179. package/dist/input-checkbox/input-checkbox.js +51 -0
  180. package/dist/input-checkbox/types.d.ts +12 -0
  181. package/dist/input-checkbox/types.js +8 -0
  182. package/dist/input-checkbox-group/input-checkbox-group.d.ts +2 -0
  183. package/dist/input-checkbox-group/input-checkbox-group.js +24 -0
  184. package/dist/input-checkbox-group/types.d.ts +7 -0
  185. package/dist/input-checkbox-group/types.js +1 -0
  186. package/dist/input-file/input-file.d.ts +2 -0
  187. package/dist/input-file/input-file.js +20 -0
  188. package/dist/input-file/types.d.ts +1 -0
  189. package/dist/input-file/types.js +1 -0
  190. package/dist/input-password/input-password.d.ts +2 -0
  191. package/dist/input-password/input-password.js +30 -0
  192. package/dist/input-password/input-password.test.d.ts +1 -0
  193. package/dist/input-password/input-password.test.js +16 -0
  194. package/dist/input-password/types.d.ts +2 -0
  195. package/dist/input-password/types.js +1 -0
  196. package/dist/input-radio/input-radio.d.ts +3 -0
  197. package/dist/input-radio/input-radio.js +68 -0
  198. package/dist/input-radio/types.d.ts +14 -0
  199. package/dist/input-radio/types.js +8 -0
  200. package/dist/input-radio-group/input-radio-group.d.ts +3 -0
  201. package/dist/input-radio-group/input-radio-group.js +28 -0
  202. package/dist/input-radio-group/types.d.ts +5 -0
  203. package/dist/input-radio-group/types.js +1 -0
  204. package/dist/input-text/input-text.d.ts +19 -0
  205. package/dist/input-text/input-text.js +140 -0
  206. package/dist/input-text/type.d.ts +27 -0
  207. package/dist/input-text/type.js +1 -0
  208. package/dist/label/label.d.ts +11 -0
  209. package/dist/label/label.js +27 -0
  210. package/dist/label/label.test.d.ts +1 -0
  211. package/dist/label/label.test.js +49 -0
  212. package/dist/label/types.d.ts +7 -0
  213. package/dist/label/types.js +1 -0
  214. package/dist/link/link.d.ts +47 -0
  215. package/dist/link/link.js +104 -0
  216. package/dist/link/link.test.d.ts +1 -0
  217. package/dist/link/link.test.js +66 -0
  218. package/dist/list/list.d.ts +13 -0
  219. package/dist/list/list.js +44 -0
  220. package/dist/list/list.test.d.ts +1 -0
  221. package/dist/list/list.test.js +67 -0
  222. package/dist/list-item/list-item.d.ts +9 -0
  223. package/dist/list-item/list-item.js +19 -0
  224. package/dist/modal/modal.content.d.ts +2 -0
  225. package/dist/modal/modal.content.js +19 -0
  226. package/dist/modal/modal.d.ts +11 -0
  227. package/dist/modal/modal.js +222 -0
  228. package/dist/modal/modal.test.d.ts +1 -0
  229. package/dist/modal/modal.test.js +81 -0
  230. package/dist/modal/types.d.ts +39 -0
  231. package/dist/modal/types.js +1 -0
  232. package/dist/pagination/pagination.d.ts +8 -0
  233. package/dist/pagination/pagination.js +104 -0
  234. package/dist/pagination/pagination.test.d.ts +1 -0
  235. package/dist/pagination/pagination.test.js +95 -0
  236. package/dist/paragraph/paragraph.d.ts +17 -0
  237. package/dist/paragraph/paragraph.js +60 -0
  238. package/dist/paragraph/paragraph.test.d.ts +1 -0
  239. package/dist/paragraph/paragraph.test.js +63 -0
  240. package/dist/phase-banner/phase-banner.d.ts +5 -0
  241. package/dist/phase-banner/phase-banner.js +10 -0
  242. package/dist/phase-banner/phase-banner.test.d.ts +1 -0
  243. package/dist/phase-banner/phase-banner.test.js +27 -0
  244. package/dist/popover/popover.d.ts +2 -0
  245. package/dist/popover/popover.js +946 -0
  246. package/dist/popover/types.d.ts +10 -0
  247. package/dist/popover/types.js +1 -0
  248. package/dist/primitives/anchor.d.ts +7 -0
  249. package/dist/primitives/anchor.js +14 -0
  250. package/dist/primitives/anchor.test.d.ts +1 -0
  251. package/dist/primitives/anchor.test.js +39 -0
  252. package/dist/primitives/input.d.ts +3 -0
  253. package/dist/primitives/input.js +9 -0
  254. package/dist/progress-bar/progress-bar.d.ts +7 -0
  255. package/dist/progress-bar/progress-bar.js +40 -0
  256. package/dist/progress-bar/progress-bar.test.d.ts +1 -0
  257. package/dist/progress-bar/progress-bar.test.js +34 -0
  258. package/dist/progress-stepper/progress-stepper.d.ts +5 -0
  259. package/dist/progress-stepper/progress-stepper.js +198 -0
  260. package/dist/progress-stepper/progress-stepper.test.d.ts +1 -0
  261. package/dist/progress-stepper/progress-stepper.test.js +117 -0
  262. package/dist/progress-stepper/types.d.ts +49 -0
  263. package/dist/progress-stepper/types.js +7 -0
  264. package/dist/radio/radio-group.d.ts +4 -0
  265. package/dist/radio/radio-group.js +7 -0
  266. package/dist/radio/radio.d.ts +4 -0
  267. package/dist/radio/radio.js +7 -0
  268. package/dist/radio/types.d.ts +14 -0
  269. package/dist/radio/types.js +5 -0
  270. package/dist/score-select/score-select.d.ts +3 -0
  271. package/dist/score-select/score-select.js +124 -0
  272. package/dist/score-select/type.d.ts +14 -0
  273. package/dist/score-select/type.js +1 -0
  274. package/dist/section-break/section-break.d.ts +7 -0
  275. package/dist/section-break/section-break.js +38 -0
  276. package/dist/section-break/section-break.test.d.ts +1 -0
  277. package/dist/section-break/section-break.test.js +36 -0
  278. package/dist/select/select-menu.d.ts +7 -0
  279. package/dist/select/select-menu.js +141 -0
  280. package/dist/select/select-native.d.ts +5 -0
  281. package/dist/select/select-native.js +27 -0
  282. package/dist/select/select-next.d.ts +5 -0
  283. package/dist/select/select-next.js +162 -0
  284. package/dist/select/select.d.ts +5 -0
  285. package/dist/select/select.js +10 -0
  286. package/dist/select/types.d.ts +62 -0
  287. package/dist/select/types.js +1 -0
  288. package/dist/side-nav/side-nav.d.ts +6 -0
  289. package/dist/side-nav/side-nav.js +171 -0
  290. package/dist/side-nav/types.d.ts +18 -0
  291. package/dist/side-nav/types.js +1 -0
  292. package/dist/spinner/spinner.d.ts +35 -0
  293. package/dist/spinner/spinner.js +84 -0
  294. package/dist/spinner/spinner.test.d.ts +1 -0
  295. package/dist/spinner/spinner.test.js +11 -0
  296. package/dist/stack/stack.d.ts +3 -0
  297. package/dist/stack/stack.js +186 -0
  298. package/dist/stack/stack.test.d.ts +1 -0
  299. package/dist/stack/stack.test.js +44 -0
  300. package/dist/stack/types.d.ts +32 -0
  301. package/dist/stack/types.js +1 -0
  302. package/dist/styles.css +3 -0
  303. package/dist/summary-list/summary-list.d.ts +14 -0
  304. package/dist/summary-list/summary-list.js +46 -0
  305. package/dist/summary-list/summary-list.test.d.ts +1 -0
  306. package/dist/summary-list/summary-list.test.js +56 -0
  307. package/dist/summary-list/types.d.ts +20 -0
  308. package/dist/summary-list/types.js +1 -0
  309. package/dist/table/caption.d.ts +5 -0
  310. package/dist/table/caption.js +15 -0
  311. package/dist/table/column-group.d.ts +2 -0
  312. package/dist/table/column-group.js +10 -0
  313. package/dist/table/column.d.ts +2 -0
  314. package/dist/table/column.js +10 -0
  315. package/dist/table/table-body.d.ts +2 -0
  316. package/dist/table/table-body.js +10 -0
  317. package/dist/table/table-content.d.ts +1 -0
  318. package/dist/table/table-content.js +26 -0
  319. package/dist/table/table-data.d.ts +8 -0
  320. package/dist/table/table-data.js +35 -0
  321. package/dist/table/table-foot.d.ts +2 -0
  322. package/dist/table/table-foot.js +10 -0
  323. package/dist/table/table-head.d.ts +2 -0
  324. package/dist/table/table-head.js +10 -0
  325. package/dist/table/table-header.d.ts +8 -0
  326. package/dist/table/table-header.js +35 -0
  327. package/dist/table/table-row.d.ts +2 -0
  328. package/dist/table/table-row.js +10 -0
  329. package/dist/table/table.d.ts +25 -0
  330. package/dist/table/table.js +33 -0
  331. package/dist/table/table.test.d.ts +1 -0
  332. package/dist/table/table.test.js +18 -0
  333. package/dist/tabs/tab-item.d.ts +17 -0
  334. package/dist/tabs/tab-item.js +42 -0
  335. package/dist/tabs/tab-list.d.ts +5 -0
  336. package/dist/tabs/tab-list.js +62 -0
  337. package/dist/tabs/tab-panel.d.ts +7 -0
  338. package/dist/tabs/tab-panel.js +22 -0
  339. package/dist/tabs/tabs-content.d.ts +1 -0
  340. package/dist/tabs/tabs-content.js +17 -0
  341. package/dist/tabs/tabs.d.ts +7 -0
  342. package/dist/tabs/tabs.js +24 -0
  343. package/dist/tabs/tabs.test.d.ts +1 -0
  344. package/dist/tabs/tabs.test.js +44 -0
  345. package/dist/tag/tag.d.ts +19 -0
  346. package/dist/tag/tag.js +27 -0
  347. package/dist/tag/tag.test.d.ts +1 -0
  348. package/dist/tag/tag.test.js +40 -0
  349. package/dist/test-utilities-BS7B3BF-.js +34112 -0
  350. package/dist/test-utilities.d.ts +8 -0
  351. package/dist/test-utilities.js +87 -0
  352. package/dist/text-input/text-input.d.ts +23 -0
  353. package/dist/text-input/text-input.js +7 -0
  354. package/dist/textarea/textarea.d.ts +13 -0
  355. package/dist/textarea/textarea.js +98 -0
  356. package/dist/toast/ds-toast.d.ts +82 -0
  357. package/dist/toast/ds-toast.js +116 -0
  358. package/dist/toast/toast.d.ts +6 -0
  359. package/dist/toast/toast.js +125 -0
  360. package/dist/toast/toast.test.d.ts +1 -0
  361. package/dist/toast/toast.test.js +44 -0
  362. package/dist/toast/types.d.ts +24 -0
  363. package/dist/toast/types.js +1 -0
  364. package/dist/tooltip/tooltip.d.ts +10 -0
  365. package/dist/tooltip/tooltip.js +67 -0
  366. package/dist/tooltip/tooltip.test.d.ts +1 -0
  367. package/dist/tooltip/tooltip.test.js +85 -0
  368. package/dist/utilities.d.ts +9 -0
  369. package/dist/utilities.js +13 -0
  370. package/dist/utils/utilities.d.ts +24 -0
  371. package/dist/utils/utilities.js +20 -0
  372. package/dist/utils/utilities.test.d.ts +1 -0
  373. package/dist/utils/utilities.test.js +79 -0
  374. package/package.json +3 -3
@@ -0,0 +1,26 @@
1
+ import { Fragment, ReactElement } from 'react';
2
+ import { ButtonProps, ButtonSize } from '../button/types.js';
3
+ import { ModalProps, ModalWrapperProps } from '../modal/types.js';
4
+ type DrawerChildren = Array<ReactElement<typeof DrawerBody | typeof DrawerBody>> | ReactElement<typeof Fragment>;
5
+ export type DrawerPosition = 'left' | 'right' | 'bottom';
6
+ export type DrawerProps = Omit<ModalProps, 'closeOnClick' | 'closeOnOverlayClick' | 'size'> & {
7
+ position?: DrawerPosition;
8
+ closeButtonSize?: ButtonSize;
9
+ children: DrawerChildren;
10
+ };
11
+ type DrawerSectionProps = {
12
+ children: React.ReactElement<ButtonProps> | React.ReactElement<ButtonProps>[];
13
+ className?: string;
14
+ };
15
+ type DrawerBodySectionProps = {
16
+ children: React.ReactNode;
17
+ className?: string;
18
+ };
19
+ export type DrawerWrapperProps = ModalWrapperProps & {
20
+ children: DrawerChildren;
21
+ };
22
+ export declare const DrawerWrapper: ({ children, className, ...props }: DrawerWrapperProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const Drawer: ({ children, triggerButton, startsOpen, closeButtonLabel, position, className, closeButtonSize, }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const DrawerBody: ({ children, className }: DrawerBodySectionProps) => import("react/jsx-runtime").JSX.Element;
25
+ export declare const DrawerFooter: ({ children, className }: DrawerSectionProps) => import("react/jsx-runtime").JSX.Element;
26
+ export {};
@@ -0,0 +1,48 @@
1
+ "use client";
2
+ import { jsx as r, jsxs as x, Fragment as y } from "react/jsx-runtime";
3
+ import { useState as D, cloneElement as O } from "react";
4
+ import { cn as n } from "../cn.js";
5
+ import { ModalWrapper as F, ModalBody as M, ModalFooter as N } from "../modal/modal.js";
6
+ const b = ({
7
+ children: o,
8
+ className: e,
9
+ ...s
10
+ }) => /* @__PURE__ */ r(F, { className: n("gi-drawer-container", e), ...s, children: o }), S = ({
11
+ children: o,
12
+ triggerButton: e,
13
+ startsOpen: s,
14
+ closeButtonLabel: p,
15
+ position: i = "right",
16
+ className: m,
17
+ closeButtonSize: f
18
+ }) => {
19
+ const [t, a] = D(!!s), w = () => a(!0), C = () => a(!1), h = O(e, {
20
+ "data-testid": "drawer-trigger-button-container",
21
+ onClick: (k) => {
22
+ var l, d;
23
+ const c = typeof ((l = e == null ? void 0 : e.props) == null ? void 0 : l.onClick) == "function" ? (d = e == null ? void 0 : e.props) == null ? void 0 : d.onClick : void 0;
24
+ c && c(k), w();
25
+ }
26
+ });
27
+ return /* @__PURE__ */ x(y, { children: [
28
+ h,
29
+ /* @__PURE__ */ r(
30
+ b,
31
+ {
32
+ children: o,
33
+ closeButtonLabel: p,
34
+ position: i,
35
+ className: m,
36
+ isOpen: t,
37
+ onClose: C,
38
+ closeButtonSize: f
39
+ }
40
+ )
41
+ ] });
42
+ }, T = ({ children: o, className: e }) => /* @__PURE__ */ r(M, { className: n("gi-drawer-body", e), children: o }), q = ({ children: o, className: e }) => /* @__PURE__ */ r(N, { className: n("gi-drawer-footer", e), children: o });
43
+ export {
44
+ S as Drawer,
45
+ T as DrawerBody,
46
+ q as DrawerFooter,
47
+ b as DrawerWrapper
48
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,69 @@
1
+ import { jsxs as d, jsx as c } from "react/jsx-runtime";
2
+ import { act as l } from "react";
3
+ import { Button as g } from "../button/button.js";
4
+ import { c as m, w as a, r as B } from "../test-utilities-BS7B3BF-.js";
5
+ import { HtmlContent as n, TriggerButton as s } from "./drawer.content.js";
6
+ import { Drawer as u, DrawerBody as p, DrawerFooter as w } from "./drawer.js";
7
+ describe("drawer", () => {
8
+ afterEach(m);
9
+ const r = (t) => B(
10
+ /* @__PURE__ */ d(u, { ...t, children: [
11
+ /* @__PURE__ */ c(p, { children: "Here is the body content of the drawer." }),
12
+ /* @__PURE__ */ c(w, { children: /* @__PURE__ */ c(g, { children: "Close Drawer" }) })
13
+ ] })
14
+ );
15
+ it("should render the drawer on load if startsOpen is true", () => {
16
+ const t = r({
17
+ children: n,
18
+ triggerButton: s,
19
+ startsOpen: !0
20
+ }), o = t.getByTestId("modal"), e = t.getByTestId("modal-container");
21
+ expect(o.classList.contains("gi-modal-open")).toBe(!0), expect(e).toBeTruthy();
22
+ }), it("should open the drawer on button trigger", async () => {
23
+ const t = r({
24
+ children: n,
25
+ triggerButton: s
26
+ });
27
+ t.getByTestId(
28
+ "drawer-trigger-button-container"
29
+ ).click(), await a(() => {
30
+ const e = t.getByTestId("modal");
31
+ expect(e.classList.contains("gi-modal-open")).toBe(!0);
32
+ });
33
+ }), it("should close the drawer on icon click", async () => {
34
+ const t = r({
35
+ children: n,
36
+ triggerButton: s
37
+ }), o = t.getByTestId("modal"), e = t.getByTestId(
38
+ "drawer-trigger-button-container"
39
+ );
40
+ expect(o.classList.contains("gi-modal-open")).toBe(!1), await l(async () => {
41
+ e.click();
42
+ }), await a(() => {
43
+ expect(o.classList.contains("gi-modal-open")).toBe(!0);
44
+ });
45
+ const i = t.getByTestId("modal-container").querySelector(".gi-modal-icon");
46
+ expect(i).toBeVisible(), await l(async () => {
47
+ i.click();
48
+ });
49
+ }), it("should close the drawer on overlay click", async () => {
50
+ const t = r({
51
+ children: n,
52
+ triggerButton: s
53
+ });
54
+ t.getByTestId(
55
+ "drawer-trigger-button-container"
56
+ ).click(), await a(() => {
57
+ const e = t.getByTestId("modal");
58
+ expect(e.classList.contains("gi-modal-open")).toBe(!0), e.click();
59
+ }), await a(() => {
60
+ const e = t.getByTestId("modal");
61
+ expect(e.classList.contains("gi-modal-open")).toBe(!1);
62
+ });
63
+ }), it("should pass axe accessibility tests", async () => {
64
+ await r({
65
+ children: n,
66
+ triggerButton: s
67
+ }).axe();
68
+ });
69
+ });
@@ -0,0 +1,7 @@
1
+ import { ErrorTextProps } from './types.js';
2
+ export declare const ErrorSize: {
3
+ readonly Small: "sm";
4
+ readonly Medium: "md";
5
+ readonly Large: "lg";
6
+ };
7
+ export declare const ErrorText: React.FC<ErrorTextProps>;
@@ -0,0 +1,40 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { c as m } from "../index-DNkhmzZp.js";
3
+ const d = {
4
+ Small: "sm",
5
+ Medium: "md",
6
+ Large: "lg"
7
+ }, l = m({
8
+ base: "gi-error-text",
9
+ variants: {
10
+ size: {
11
+ sm: "gi-error-text-sm",
12
+ md: "gi-error-text-md",
13
+ lg: "gi-error-text-lg"
14
+ }
15
+ },
16
+ defaultVariants: {
17
+ size: "md"
18
+ }
19
+ }), x = ({
20
+ text: r,
21
+ className: e,
22
+ size: t = d.Medium,
23
+ dataTestid: i,
24
+ children: o,
25
+ ...s
26
+ }) => /* @__PURE__ */ a(
27
+ "div",
28
+ {
29
+ role: "alert",
30
+ className: l({ size: t, className: e }),
31
+ "data-testid": i,
32
+ ...s,
33
+ children: o ?? r
34
+ }
35
+ );
36
+ x.displayName = "ErrorText";
37
+ export {
38
+ d as ErrorSize,
39
+ x as ErrorText
40
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { r as i } from "../test-utilities-BS7B3BF-.js";
3
+ import { ErrorText as n, ErrorSize as s } from "./error-text.js";
4
+ describe("govieErrorText", () => {
5
+ const t = (r) => i(/* @__PURE__ */ o(n, { ...r }));
6
+ it("should render error text with the correct content", () => {
7
+ const e = t({
8
+ text: "This is an error message",
9
+ size: s.Medium
10
+ }).getByText("This is an error message");
11
+ expect(e).toBeTruthy(), expect(e.tagName).toBe("DIV");
12
+ }), it('should render error text with "sm" size', () => {
13
+ const e = t({
14
+ text: "Small error message",
15
+ size: s.Small
16
+ }).getByText("Small error message");
17
+ expect(e.classList.contains("gi-error-text-sm")).toBe(!0);
18
+ }), it('should render error text with "lg" size', () => {
19
+ const e = t({
20
+ text: "Large error message",
21
+ size: s.Large
22
+ }).getByText("Large error message");
23
+ expect(e.classList.contains("gi-error-text-lg")).toBe(!0);
24
+ }), it("should pass axe accessibility tests", async () => {
25
+ await t({
26
+ text: "Accessible error message",
27
+ size: s.Medium
28
+ }).axe();
29
+ });
30
+ });
@@ -0,0 +1,8 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { ErrorSize } from './error-text.js';
3
+ export type ErrorSizeType = (typeof ErrorSize)[keyof typeof ErrorSize];
4
+ export type ErrorTextProps = PropsWithChildren<React.HTMLAttributes<HTMLDivElement> & {
5
+ text?: string | React.ReactElement;
6
+ size?: ErrorSizeType;
7
+ dataTestid?: string;
8
+ }>;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,9 @@
1
+ import { InputFileProps } from '../input-file/types.js';
2
+ /**
3
+ * @deprecated Use FileUploadProps instead of `Radio`.
4
+ */
5
+ export type FileUploadProps = InputFileProps;
6
+ /**
7
+ * @deprecated Use <InputFile /> instead of <FileUpload />.
8
+ */
9
+ export declare const FileUpload: import('react').ForwardRefExoticComponent<InputFileProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,6 @@
1
+ import { InputFile as l } from "../input-file/input-file.js";
2
+ const o = l;
3
+ o.displayName = "FileUpload";
4
+ export {
5
+ o as FileUpload
6
+ };
@@ -0,0 +1,11 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ import { LogoProps } from '../common/types.js';
3
+ export type FooterProps = {
4
+ primarySlot?: ReactNode;
5
+ secondarySlot?: ReactNode;
6
+ utilitySlot?: ReactNode;
7
+ logo?: LogoProps;
8
+ className?: string;
9
+ dataTestid?: string;
10
+ } & React.HTMLAttributes<HTMLDivElement>;
11
+ export declare function Footer({ primarySlot, secondarySlot, utilitySlot, logo, className, dataTestid, ...props }: FooterProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,108 @@
1
+ "use client";
2
+ import { jsxs as i, jsx as t, Fragment as u } from "react/jsx-runtime";
3
+ import { renderToStaticMarkup as c } from "react-dom/server";
4
+ import h from "../assets/logos/gov-of-ireland/harp-gold-text-green.js";
5
+ import p from "../assets/logos/harp/harp-white.js";
6
+ import { cn as v } from "../cn.js";
7
+ import { Container as b } from "../container/container.js";
8
+ import { translate as a } from "../i18n/utility.js";
9
+ import g from "../primitives/anchor.js";
10
+ import { SectionBreak as k } from "../section-break/section-break.js";
11
+ function l({ logo: e }) {
12
+ const n = `data:image/svg+xml;base64,${btoa(c(/* @__PURE__ */ t(p, {})))}`, s = `data:image/svg+xml;base64,${btoa(
13
+ c(/* @__PURE__ */ t(h, {}))
14
+ )}`;
15
+ return /* @__PURE__ */ i("picture", { children: [
16
+ /* @__PURE__ */ t("source", { srcSet: (e == null ? void 0 : e.imageLarge) || s }),
17
+ /* @__PURE__ */ t(
18
+ "img",
19
+ {
20
+ className: "gi-h-16",
21
+ src: (e == null ? void 0 : e.imageSmall) || n,
22
+ alt: (e == null ? void 0 : e.alt) || a("logo.govieLogo", { defaultValue: "Gov.ie Logo" })
23
+ }
24
+ )
25
+ ] });
26
+ }
27
+ function H({
28
+ primarySlot: e,
29
+ secondarySlot: o,
30
+ utilitySlot: n,
31
+ logo: r,
32
+ className: s = "",
33
+ dataTestid: d,
34
+ ...m
35
+ }) {
36
+ const f = () => /* @__PURE__ */ i(u, { children: [
37
+ (r == null ? void 0 : r.href) && /* @__PURE__ */ t(
38
+ g,
39
+ {
40
+ href: r.href,
41
+ "aria-label": a("footer.goToHomePage", {
42
+ defaultValue: "Go to Home Page"
43
+ }),
44
+ "data-testid": "logo-link",
45
+ external: r.external,
46
+ children: l({ logo: r })
47
+ }
48
+ ),
49
+ !(r != null && r.href) && l({ logo: r })
50
+ ] });
51
+ return /* @__PURE__ */ i(
52
+ "footer",
53
+ {
54
+ className: v("gi-footer", s),
55
+ "data-module": "gieds-footer",
56
+ role: "contentinfo",
57
+ "aria-label": a("footer.footer", { defaultValue: "Footer" }),
58
+ "data-testid": d,
59
+ ...m,
60
+ children: [
61
+ /* @__PURE__ */ t("div", { className: "gi-footer-container", children: /* @__PURE__ */ i(b, { children: [
62
+ e && /* @__PURE__ */ t(
63
+ "div",
64
+ {
65
+ "aria-label": a("footer.primarySlot", {
66
+ defaultValue: "Footer Primary Slot"
67
+ }),
68
+ children: e
69
+ }
70
+ ),
71
+ e && o && /* @__PURE__ */ t(
72
+ k,
73
+ {
74
+ color: "gi-border-color-border-system-neutral-subtle",
75
+ size: "lg"
76
+ }
77
+ ),
78
+ /* @__PURE__ */ i(
79
+ "div",
80
+ {
81
+ className: "gi-footer-secondary-slot",
82
+ "aria-label": a("footer.secondarySlot", {
83
+ defaultValue: "Footer Secondary Slot"
84
+ }),
85
+ children: [
86
+ /* @__PURE__ */ t("div", { className: "gi-footer-logo", children: f() }),
87
+ o && /* @__PURE__ */ t("div", { className: "gi-footer-secondary-slot-content", children: o })
88
+ ]
89
+ }
90
+ )
91
+ ] }) }),
92
+ n && /* @__PURE__ */ t(
93
+ "div",
94
+ {
95
+ className: "gi-footer-utility",
96
+ "aria-label": a("footer.utilityLinks", {
97
+ defaultValue: "Footer Utility Links"
98
+ }),
99
+ children: n
100
+ }
101
+ )
102
+ ]
103
+ }
104
+ );
105
+ }
106
+ export {
107
+ H as Footer
108
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,42 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { c as r, s as e, r as s } from "../test-utilities-BS7B3BF-.js";
3
+ import { Footer as d } from "./footer.js";
4
+ describe("Footer", () => {
5
+ afterEach(r);
6
+ const o = (t = {}) => s(/* @__PURE__ */ n(d, { ...t }));
7
+ it("should render the footer with default props", () => {
8
+ o({
9
+ dataTestid: "govie-footer"
10
+ });
11
+ const t = e.getByRole("contentinfo");
12
+ expect(t).toBeInTheDocument(), expect(t).toHaveAttribute("aria-label", "Footer"), expect(t).toHaveAttribute("data-testid", "govie-footer"), expect(t).toHaveClass("gi-footer");
13
+ }), it("should render with custom className", () => {
14
+ o({ className: "custom-class" });
15
+ const t = e.getByRole("contentinfo");
16
+ expect(t).toHaveClass("gi-footer custom-class");
17
+ }), it("should not render primary nav when primarySlot is not provided", () => {
18
+ o({}), expect(
19
+ e.queryByLabelText("Primary footer navigation")
20
+ ).not.toBeInTheDocument();
21
+ }), it("should render secondary slot when provided", () => {
22
+ o({ secondarySlot: /* @__PURE__ */ n("div", { "data-testid": "secondary-content", children: "Secondary Content" }) }), expect(e.getByTestId("secondary-content")).toBeInTheDocument();
23
+ }), it("should not render secondary nav when secondarySlot is not provided", () => {
24
+ o({}), expect(
25
+ e.queryByLabelText("Secondary footer navigation")
26
+ ).not.toBeInTheDocument();
27
+ }), it("should render utility slot when provided", () => {
28
+ o({ utilitySlot: /* @__PURE__ */ n("div", { "data-testid": "utility-content", children: "Utility Content" }) });
29
+ const i = e.getByLabelText("Footer Utility Links");
30
+ expect(i).toBeInTheDocument(), expect(e.getByTestId("utility-content")).toBeInTheDocument();
31
+ }), it("should not render utility section when utilitySlot is not provided", () => {
32
+ o({}), expect(e.queryByLabelText("Utility links")).not.toBeInTheDocument();
33
+ }), it("should render all slots when provided", () => {
34
+ o({
35
+ primarySlot: /* @__PURE__ */ n("div", { "data-testid": "primary", children: "Primary" }),
36
+ secondarySlot: /* @__PURE__ */ n("div", { "data-testid": "secondary", children: "Secondary" }),
37
+ utilitySlot: /* @__PURE__ */ n("div", { "data-testid": "utility", children: "Utility" })
38
+ }), expect(e.getByTestId("primary")).toBeInTheDocument(), expect(e.getByTestId("secondary")).toBeInTheDocument(), expect(e.getByTestId("utility")).toBeInTheDocument();
39
+ }), it("should pass axe tests", async () => {
40
+ await o({}).axe();
41
+ });
42
+ });
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ import { ErrorTextProps } from '../../error-text/types.js';
3
+ import { HintTextProps } from '../../hint-text/types.js';
4
+ import { LabelTextProps } from '../../label/types.js';
5
+ import { TagProps } from '../../tag/tag.js';
6
+ /**
7
+ * @deprecated This type is deprecated and will be removed in a future release.
8
+ * Please use the new FormFieldProps component instead.
9
+ */
10
+ export type FormFieldWithTagProps = {
11
+ error?: ErrorTextProps;
12
+ hint?: HintTextProps;
13
+ label?: LabelTextProps;
14
+ className?: string;
15
+ tag?: TagProps;
16
+ } & React.FieldsetHTMLAttributes<HTMLFieldSetElement>;
17
+ /**
18
+ * @deprecated This component is deprecated and will be removed in a future release.
19
+ * Please use the new FormField component instead.
20
+ */
21
+ export declare const FormFieldWithTag: {
22
+ ({ label, hint, error, children, className, tag, }: FormFieldWithTagProps): import("react/jsx-runtime").JSX.Element;
23
+ displayName: string;
24
+ };
@@ -0,0 +1,50 @@
1
+ import { jsxs as o, jsx as m } from "react/jsx-runtime";
2
+ import { S as d } from "../../index-ntYL1VRC.js";
3
+ import { cn as c } from "../../cn.js";
4
+ import { ErrorText as l } from "../../error-text/error-text.js";
5
+ import { HintText as f } from "../../hint-text/hint-text.js";
6
+ import { translate as a } from "../../i18n/utility.js";
7
+ import { Label as p } from "../../label/label.js";
8
+ import { Tag as g } from "../../tag/tag.js";
9
+ const n = ({
10
+ label: e,
11
+ hint: s,
12
+ error: i,
13
+ children: x,
14
+ className: r,
15
+ tag: t
16
+ }) => /* @__PURE__ */ o("fieldset", { className: c({ "gi-error-state": i }, r), children: [
17
+ /* @__PURE__ */ o("div", { className: "gi-pb-3 gi-flex gi-flex-col gi-gap-1", children: [
18
+ /* @__PURE__ */ o("div", { children: [
19
+ /* @__PURE__ */ o("div", { className: "gi-flex gi-items-center gi-justify-between", children: [
20
+ (e == null ? void 0 : e.text) && /* @__PURE__ */ m(
21
+ p,
22
+ {
23
+ text: e.text,
24
+ size: e.size,
25
+ htmlFor: e.htmlFor,
26
+ className: "gi-font-bold",
27
+ children: e.children
28
+ }
29
+ ),
30
+ (t == null ? void 0 : t.text) && t.type && /* @__PURE__ */ m(
31
+ "div",
32
+ {
33
+ "aria-label": a("formField.tag", {
34
+ tag: t.text,
35
+ defaultValue: `Tag: ${t.text}`
36
+ }),
37
+ children: /* @__PURE__ */ m(g, { text: t.text, type: t.type })
38
+ }
39
+ )
40
+ ] }),
41
+ (s == null ? void 0 : s.text) && /* @__PURE__ */ m(f, { text: s.text, size: s.size, className: "gi-mb-1" })
42
+ ] }),
43
+ (i == null ? void 0 : i.text) && /* @__PURE__ */ m(l, { text: i.text, size: i.size, className: "gi-mb-1" })
44
+ ] }),
45
+ /* @__PURE__ */ m(d, { children: x })
46
+ ] });
47
+ n.displayName = "FormFieldWithTag";
48
+ export {
49
+ n as FormFieldWithTag
50
+ };
@@ -0,0 +1,11 @@
1
+ import { FieldsetHTMLAttributes } from 'react';
2
+ import { ErrorTextProps } from '../error-text/types.js';
3
+ import { HintTextProps } from '../hint-text/types.js';
4
+ import { LabelTextProps } from '../label/types.js';
5
+ export type FormFieldProps = {
6
+ error?: ErrorTextProps;
7
+ hint?: HintTextProps;
8
+ label?: LabelTextProps;
9
+ className?: string;
10
+ } & Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'style'>;
11
+ export declare const FormField: ({ label, hint, error, children, className, ...props }: FormFieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { jsxs as r, jsx as i } from "react/jsx-runtime";
2
+ import { S as g } from "../index-ntYL1VRC.js";
3
+ import { cn as h } from "../cn.js";
4
+ import { ErrorText as l } from "../error-text/error-text.js";
5
+ import { HintText as a } from "../hint-text/hint-text.js";
6
+ import { Label as z } from "../label/label.js";
7
+ const C = ({
8
+ label: e,
9
+ hint: s,
10
+ error: m,
11
+ children: c,
12
+ className: x,
13
+ ...d
14
+ }) => {
15
+ const n = (f, t) => {
16
+ const o = f === "error" ? l : a;
17
+ return t != null && t.text ? typeof t.text == "string" ? /* @__PURE__ */ i(o, { text: t.text, size: t.size, className: "gi-mb-1" }) : /* @__PURE__ */ i(o, { size: t.size, className: "gi-mb-1", children: t.text }) : null;
18
+ };
19
+ return /* @__PURE__ */ r("fieldset", { className: h({ "gi-error-state": m }, x), ...d, children: [
20
+ /* @__PURE__ */ r("div", { className: "gi-pb-3 gi-flex gi-flex-col gi-gap-1", children: [
21
+ /* @__PURE__ */ r("div", { children: [
22
+ (e == null ? void 0 : e.text) && /* @__PURE__ */ i(
23
+ z,
24
+ {
25
+ text: e.text,
26
+ size: e.size,
27
+ htmlFor: e.htmlFor,
28
+ className: "gi-font-bold",
29
+ children: e.children
30
+ }
31
+ ),
32
+ n("hint", s)
33
+ ] }),
34
+ n("error", m)
35
+ ] }),
36
+ /* @__PURE__ */ i(g, { children: c })
37
+ ] });
38
+ };
39
+ export {
40
+ C as FormField
41
+ };
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ type FormType = React.FormHTMLAttributes<HTMLFormElement>;
3
+ export declare const Form: ({ children, ...props }: FormType) => import("react/jsx-runtime").JSX.Element;
4
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ const e = ({ children: r, ...o }) => /* @__PURE__ */ m("form", { ...o, children: r });
3
+ export {
4
+ e as Form
5
+ };
@@ -0,0 +1,13 @@
1
+ import { HeaderProps } from '../types.js';
2
+ export type MobileHeaderMenuProps = Pick<HeaderProps, 'items' | 'secondaryLinks'>;
3
+ type MenuItemAccordionProps = {
4
+ index: number;
5
+ item: {
6
+ label?: string;
7
+ slot: React.ReactNode;
8
+ };
9
+ };
10
+ export declare const MenuItemAccordion: ({ index, item }: MenuItemAccordionProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const MobileHeaderMenuItems: ({ items, secondaryLinks, }: MobileHeaderMenuProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare function HeaderMenu({ ...props }: MobileHeaderMenuProps): import("react/jsx-runtime").JSX.Element;
13
+ export default HeaderMenu;