@ogcio/design-system-react 1.11.0 → 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 +4 -5
@@ -0,0 +1,171 @@
1
+ "use client";
2
+ import { jsxs as w, Fragment as V, jsx as s } from "react/jsx-runtime";
3
+ import N, { memo as B, useEffect as q, useCallback as v, useState as _ } from "react";
4
+ import { Button as A } from "../button/button.js";
5
+ import { cn as f } from "../cn.js";
6
+ import { Icon as $ } from "../icon/icon.js";
7
+ import { Link as G } from "../link/link.js";
8
+ import { Paragraph as H } from "../paragraph/paragraph.js";
9
+ const j = N.createContext(
10
+ void 0
11
+ ), z = B(
12
+ ({
13
+ icon: n,
14
+ label: i,
15
+ showExpandableIcon: c,
16
+ isOpen: e
17
+ }) => /* @__PURE__ */ w(V, { children: [
18
+ /* @__PURE__ */ w("div", { className: "gi-side-nav-item-left", children: [
19
+ n && /* @__PURE__ */ s("div", { className: "gi-side-nav-item-icon", children: /* @__PURE__ */ s($, { icon: n }) }),
20
+ /* @__PURE__ */ s("div", { className: "gi-side-nav-item-label", children: /* @__PURE__ */ s(H, { size: "md", children: i }) })
21
+ ] }),
22
+ c && /* @__PURE__ */ s("div", { className: "gi-side-nav-expandable-icon", children: /* @__PURE__ */ s(
23
+ $,
24
+ {
25
+ className: f(e && "gi-rotate-180"),
26
+ icon: "keyboard_arrow_down"
27
+ }
28
+ ) })
29
+ ] })
30
+ ), J = N.memo(
31
+ ({
32
+ children: n,
33
+ primary: i,
34
+ secondary: c,
35
+ expandable: e,
36
+ label: o,
37
+ value: t,
38
+ icon: u,
39
+ href: m,
40
+ asChild: g,
41
+ open: r
42
+ }) => {
43
+ const l = N.useContext(j);
44
+ if (!l)
45
+ throw new Error("SideNavItem must be used within a SideNav");
46
+ const {
47
+ openItemIds: a,
48
+ selectedItemId: S,
49
+ setOpenItemIds: p,
50
+ setSelectedItemId: C,
51
+ navId: P
52
+ } = l, I = a.includes(t), x = S === t;
53
+ q(() => {
54
+ r && p((d) => d.includes(t) ? d : [...d, t]);
55
+ }, [r, p, t]);
56
+ const h = v(() => {
57
+ const d = I ? a.filter((R) => R !== t) : [...a, t];
58
+ p(d);
59
+ }, [I, a, p, t]), k = v(() => {
60
+ C(t);
61
+ }, [C, t]), E = `${P}-${t}`, O = i && e, b = m !== void 0, D = v(() => {
62
+ i && e && h(), k();
63
+ }, [i, e, h, k]), F = v(
64
+ (d) => {
65
+ d.preventDefault(), i && e ? h() : k();
66
+ },
67
+ [i, e, h, k]
68
+ ), L = f("gi-side-nav-item", {
69
+ "gi-side-nav-item-selected": x,
70
+ "gi-side-nav-item-primary": i,
71
+ "gi-side-nav-item-secondary": c
72
+ }), M = f("gi-side-nav-item", {
73
+ "gi-side-nav-item-selected": x,
74
+ "gi-side-nav-item-primary": i,
75
+ "gi-side-nav-item-secondary": c
76
+ });
77
+ return /* @__PURE__ */ w(
78
+ "div",
79
+ {
80
+ role: "group",
81
+ "aria-label": `${o} ${i && e ? "dropdown" : "item"}`,
82
+ children: [
83
+ b ? /* @__PURE__ */ s(
84
+ G,
85
+ {
86
+ id: E,
87
+ href: m,
88
+ asChild: g,
89
+ asButton: {
90
+ variant: "flat",
91
+ appearance: "dark",
92
+ size: "medium"
93
+ },
94
+ className: L,
95
+ onClick: D,
96
+ children: g ? n : /* @__PURE__ */ s(
97
+ z,
98
+ {
99
+ icon: u,
100
+ label: o,
101
+ showExpandableIcon: O,
102
+ isOpen: I
103
+ }
104
+ )
105
+ }
106
+ ) : /* @__PURE__ */ s(
107
+ A,
108
+ {
109
+ variant: "flat",
110
+ appearance: "dark",
111
+ size: "medium",
112
+ onClick: F,
113
+ className: M,
114
+ id: E,
115
+ children: /* @__PURE__ */ s(
116
+ z,
117
+ {
118
+ icon: u,
119
+ label: o,
120
+ showExpandableIcon: O,
121
+ isOpen: I
122
+ }
123
+ )
124
+ }
125
+ ),
126
+ e && i && /* @__PURE__ */ s(
127
+ "div",
128
+ {
129
+ className: f(I ? "gi-side-nav-item-content" : "gi-hidden"),
130
+ children: n
131
+ }
132
+ )
133
+ ]
134
+ }
135
+ );
136
+ }
137
+ ), K = B(
138
+ ({ children: n, className: i, dataTestid: c, onChange: e, value: o }) => {
139
+ const [t, u] = _([]), [m, g] = _(
140
+ o
141
+ ), r = N.useId(), l = v(
142
+ (S) => {
143
+ g(S), e == null || e(S);
144
+ },
145
+ [e]
146
+ ), a = N.useMemo(
147
+ () => ({
148
+ openItemIds: t,
149
+ selectedItemId: m,
150
+ setOpenItemIds: u,
151
+ setSelectedItemId: l,
152
+ navId: r
153
+ }),
154
+ [t, m, l, r]
155
+ );
156
+ return /* @__PURE__ */ s(j.Provider, { value: a, children: /* @__PURE__ */ s(
157
+ "div",
158
+ {
159
+ className: f("gi-side-nav-container", i),
160
+ "data-testid": c,
161
+ children: n
162
+ }
163
+ ) });
164
+ }
165
+ );
166
+ K.displayName = "SideNav";
167
+ J.displayName = "SideNavItem";
168
+ export {
169
+ K as SideNav,
170
+ J as SideNavItem
171
+ };
@@ -0,0 +1,18 @@
1
+ import { IconId } from '../icon/icon.js';
2
+ export type SideNavItemProps = {
3
+ value: string;
4
+ label: string;
5
+ href?: string;
6
+ asChild?: boolean;
7
+ primary?: boolean;
8
+ secondary?: boolean;
9
+ open?: boolean;
10
+ expandable?: boolean;
11
+ icon?: IconId;
12
+ };
13
+ export type SideNavProps = {
14
+ className?: string;
15
+ dataTestid?: string;
16
+ value?: string;
17
+ onChange?: (value: string) => void;
18
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,35 @@
1
+ import { VariantProps } from 'tailwind-variants';
2
+ export declare const spinnerSizeVariants: {
3
+ xl: string;
4
+ lg: string;
5
+ md: string;
6
+ sm: string;
7
+ };
8
+ declare const spinnerVariants: import('tailwind-variants').TVReturnType<{
9
+ size: {
10
+ xl: string;
11
+ lg: string;
12
+ md: string;
13
+ sm: string;
14
+ };
15
+ }, undefined, undefined, TVConfig<V, EV>, {
16
+ size: {
17
+ xl: string;
18
+ lg: string;
19
+ md: string;
20
+ sm: string;
21
+ };
22
+ }, undefined, import('tailwind-variants').TVReturnType<{
23
+ size: {
24
+ xl: string;
25
+ lg: string;
26
+ md: string;
27
+ sm: string;
28
+ };
29
+ }, undefined, undefined, TVConfig<V, EV>, unknown, unknown, undefined>>;
30
+ export type SpinnerProps = VariantProps<typeof spinnerVariants> & {
31
+ inline?: boolean;
32
+ dataTestid?: string;
33
+ };
34
+ export declare function Spinner({ size, inline, dataTestid, }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
35
+ export {};
@@ -0,0 +1,84 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as i } from "react/jsx-runtime";
3
+ import { c as o } from "../index-DNkhmzZp.js";
4
+ import { cn as l } from "../cn.js";
5
+ const c = {
6
+ xl: "gi-w-10 gi-h-10",
7
+ lg: "gi-w-8 gi-h-8",
8
+ md: "gi-w-6 gi-h-6",
9
+ sm: "gi-w-4 gi-h-4"
10
+ }, m = o({
11
+ variants: {
12
+ size: c
13
+ }
14
+ });
15
+ function g({
16
+ size: t = "md",
17
+ inline: s = !1,
18
+ dataTestid: r
19
+ }) {
20
+ const a = s ? "" : "gi-block", n = m({ size: t });
21
+ return /* @__PURE__ */ e(
22
+ "svg",
23
+ {
24
+ role: "status",
25
+ className: l("gi-stroke-gray-950", a, n),
26
+ viewBox: "0 0 24 24",
27
+ xmlns: "http://www.w3.org/2000/svg",
28
+ "data-testid": r,
29
+ children: /* @__PURE__ */ i("g", { children: [
30
+ /* @__PURE__ */ i(
31
+ "circle",
32
+ {
33
+ cx: "12",
34
+ cy: "12",
35
+ r: "9.5",
36
+ fill: "none",
37
+ strokeWidth: "3",
38
+ strokeLinecap: "round",
39
+ children: [
40
+ /* @__PURE__ */ e(
41
+ "animate",
42
+ {
43
+ attributeName: "stroke-dasharray",
44
+ dur: "1.5s",
45
+ calcMode: "spline",
46
+ values: "0 150;42 150;42 150;42 150",
47
+ keyTimes: "0;0.475;0.95;1",
48
+ keySplines: "0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1",
49
+ repeatCount: "indefinite"
50
+ }
51
+ ),
52
+ /* @__PURE__ */ e(
53
+ "animate",
54
+ {
55
+ attributeName: "stroke-dashoffset",
56
+ dur: "1.5s",
57
+ calcMode: "spline",
58
+ values: "0;-16;-59;-59",
59
+ keyTimes: "0;0.475;0.95;1",
60
+ keySplines: "0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1",
61
+ repeatCount: "indefinite"
62
+ }
63
+ )
64
+ ]
65
+ }
66
+ ),
67
+ /* @__PURE__ */ e(
68
+ "animateTransform",
69
+ {
70
+ attributeName: "transform",
71
+ type: "rotate",
72
+ dur: "2s",
73
+ values: "0 12 12;360 12 12",
74
+ repeatCount: "indefinite"
75
+ }
76
+ )
77
+ ] })
78
+ }
79
+ );
80
+ }
81
+ export {
82
+ g as Spinner,
83
+ c as spinnerSizeVariants
84
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { c as i, t as s, r as t } from "../test-utilities-BS7B3BF-.js";
3
+ import { spinnerSizeVariants as o, Spinner as a } from "./spinner.js";
4
+ describe("govieSpinner", () => {
5
+ afterEach(i);
6
+ const r = (e) => t(/* @__PURE__ */ n(a, { ...e }));
7
+ s(
8
+ Reflect.ownKeys(o),
9
+ (e) => r({ size: e })
10
+ );
11
+ });
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { StackProps } from './types.js';
3
+ export declare const Stack: FC<StackProps>;
@@ -0,0 +1,186 @@
1
+ "use client";
2
+ import { jsx as C, jsxs as h } from "react/jsx-runtime";
3
+ import { Children as R, Fragment as y, isValidElement as d, cloneElement as X } from "react";
4
+ import { cn as c } from "../cn.js";
5
+ const p = (l) => typeof l == "string" ? {} : {
6
+ isBaseColumn: l.base === "column",
7
+ isBaseRow: l.base === "row",
8
+ isXsColumn: l.xs === "column",
9
+ isXsRow: l.xs === "row",
10
+ isSmColumn: l.sm === "column",
11
+ isSmRow: l.sm === "row",
12
+ isMdColumn: l.md === "column",
13
+ isMdRow: l.md === "row",
14
+ isLgColumn: l.lg === "column",
15
+ isLgRow: l.lg === "row",
16
+ isXlColumn: l.xl === "column",
17
+ isXlRow: l.xl === "row",
18
+ is2xlColumn: l["2xl"] === "column",
19
+ is2xlRow: l["2xl"] === "row"
20
+ }, j = (l) => {
21
+ if (typeof l == "string")
22
+ return {
23
+ "gi-flex-row": l === "row",
24
+ "gi-flex-col": l === "column"
25
+ };
26
+ const {
27
+ isBaseColumn: s,
28
+ isBaseRow: e,
29
+ isXsColumn: g,
30
+ isXsRow: r,
31
+ isSmColumn: u,
32
+ isSmRow: m,
33
+ isMdColumn: x,
34
+ isMdRow: t,
35
+ isLgColumn: w,
36
+ isLgRow: f,
37
+ isXlColumn: a,
38
+ isXlRow: n,
39
+ is2xlColumn: o,
40
+ is2xlRow: i
41
+ } = p(l);
42
+ return {
43
+ "gi-flex-row": e,
44
+ "gi-flex-col": s,
45
+ "xs:gi-flex-row": r,
46
+ "xs:gi-flex-col": g,
47
+ "sm:gi-flex-row": m,
48
+ "sm:gi-flex-col": u,
49
+ "md:gi-flex-row": t,
50
+ "md:gi-flex-col": x,
51
+ "lg:gi-flex-row": f,
52
+ "lg:gi-flex-col": w,
53
+ "xl:gi-flex-row": n,
54
+ "xl:gi-flex-col": a,
55
+ "2xl:gi-flex-row": i,
56
+ "2xl:gi-flex-col": o
57
+ };
58
+ }, S = (l) => {
59
+ if (typeof l == "string")
60
+ return {
61
+ "gi-w-full": l === "column",
62
+ "gi-h-[1px]": l === "column",
63
+ "gi-h-full": l === "row",
64
+ "gi-w-[1px]": l === "row"
65
+ };
66
+ const {
67
+ isBaseColumn: s,
68
+ isBaseRow: e,
69
+ isXsColumn: g,
70
+ isXsRow: r,
71
+ isSmColumn: u,
72
+ isSmRow: m,
73
+ isMdColumn: x,
74
+ isMdRow: t,
75
+ isLgColumn: w,
76
+ isLgRow: f,
77
+ isXlColumn: a,
78
+ isXlRow: n,
79
+ is2xlColumn: o,
80
+ is2xlRow: i
81
+ } = p(l);
82
+ return {
83
+ "gi-w-full": s,
84
+ "gi-h-[1px]": s,
85
+ "gi-h-full": e,
86
+ "gi-w-[1px]": e,
87
+ "xs:gi-w-full": g,
88
+ "xs:gi-h-[1px]": g,
89
+ "xs:gi-h-full": r,
90
+ "xs:gi-w-[1px]": r,
91
+ "sm:gi-w-full": u,
92
+ "sm:gi-h-[1px]": u,
93
+ "sm:gi-h-full": m,
94
+ "sm:gi-w-[1px]": m,
95
+ "md:gi-w-full": x,
96
+ "md:gi-h-[1px]": x,
97
+ "md:gi-h-full": t,
98
+ "md:gi-w-[1px]": t,
99
+ "lg:gi-w-full": w,
100
+ "lg:gi-h-[1px]": w,
101
+ "lg:gi-h-full": f,
102
+ "lg:gi-w-[1px]": f,
103
+ "xl:gi-w-full": a,
104
+ "xl:gi-h-[1px]": a,
105
+ "xl:gi-h-full": n,
106
+ "xl:gi-w-[1px]": n,
107
+ "2xl:gi-w-full": o,
108
+ "2xl:gi-h-[1px]": o,
109
+ "2xl:gi-h-full": i,
110
+ "2xl:gi-w-[1px]": i
111
+ };
112
+ }, v = (l) => ({
113
+ "gi-items-start": l === "start",
114
+ "gi-items-center": l === "center",
115
+ "gi-items-end": l === "end",
116
+ "gi-items-stretch": l === "stretch"
117
+ }), B = (l) => ({
118
+ "gi-justify-start": l === "start",
119
+ "gi-justify-center": l === "center",
120
+ "gi-justify-end": l === "end",
121
+ "gi-justify-between": l === "between",
122
+ "gi-justify-around": l === "around",
123
+ "gi-justify-evenly": l === "evenly",
124
+ "gi-justify-stretch": l === "stretch"
125
+ }), $ = (l) => ({
126
+ "gi-flex-wrap": l,
127
+ "gi-flex-nowrap": !l
128
+ }), L = (l) => typeof l == "number" && l ? `gi-gap-${l}` : Object.entries(l).map(
129
+ ([e, g]) => e === "base" ? `gi-gap-${g}` : `${e}:gi-gap-${g}`
130
+ ).join(" "), M = ({ direction: l }) => {
131
+ const s = S(l);
132
+ return /* @__PURE__ */ C(
133
+ "div",
134
+ {
135
+ className: `${c(s)} gi-bg-gray-400`,
136
+ "aria-hidden": "true"
137
+ }
138
+ );
139
+ }, k = ({
140
+ children: l,
141
+ direction: s = "column",
142
+ fixedHeight: e = "100%",
143
+ gap: g = 0,
144
+ hasDivider: r,
145
+ itemsAlignment: u = "start",
146
+ itemsDistribution: m = "start",
147
+ wrap: x = !1,
148
+ className: t,
149
+ ...w
150
+ }) => {
151
+ const f = c(
152
+ t,
153
+ "gi-flex",
154
+ "gi-w-full",
155
+ B(m),
156
+ v(u),
157
+ j(s),
158
+ L(g),
159
+ $(x)
160
+ );
161
+ return /* @__PURE__ */ C(
162
+ "div",
163
+ {
164
+ className: f,
165
+ role: "region",
166
+ style: { height: e },
167
+ ...w,
168
+ children: (() => {
169
+ const n = R.toArray(l);
170
+ return n.map((o, i) => /* @__PURE__ */ h(y, { children: [
171
+ d(o) ? X(
172
+ o,
173
+ {
174
+ "data-testid": `govie-stack-item-${i}`
175
+ }
176
+ ) : o,
177
+ r && i < n.length - 1 && /* @__PURE__ */ C(M, { direction: s })
178
+ ] }, `item_${i}`));
179
+ })()
180
+ }
181
+ );
182
+ };
183
+ k.displayName = "Stack";
184
+ export {
185
+ k as Stack
186
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,44 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { c as s, r as n } from "../test-utilities-BS7B3BF-.js";
3
+ import { Stack as o } from "./stack.js";
4
+ describe("govieStack", () => {
5
+ afterEach(s);
6
+ const i = (e) => n(/* @__PURE__ */ t(o, { ...e, "data-testid": "govie-stack" })), c = [
7
+ /* @__PURE__ */ t("div", { children: "item 1" }, "stack_1"),
8
+ /* @__PURE__ */ t("div", { children: "item 2" }, "stack_2"),
9
+ /* @__PURE__ */ t("div", { children: "item 3" }, "stack_3")
10
+ ];
11
+ it("should Stack items render correctly", () => {
12
+ const e = i({
13
+ direction: "column",
14
+ itemsAlignment: "center",
15
+ itemsDistribution: "end",
16
+ gap: 1,
17
+ children: c
18
+ });
19
+ expect(e.getByTestId("govie-stack")).toBeInTheDocument(), expect(e.getByTestId("govie-stack-item-0")).toBeInTheDocument(), expect(e.getByTestId("govie-stack-item-1")).toBeInTheDocument(), expect(e.getByTestId("govie-stack-item-2")).toBeInTheDocument();
20
+ }), it("should Stack items render correctly with breakpoint configuration", () => {
21
+ const e = i({
22
+ direction: {
23
+ base: "column",
24
+ md: "row"
25
+ },
26
+ gap: {
27
+ sm: 2,
28
+ xs: 1,
29
+ md: 3
30
+ },
31
+ itemsAlignment: "start",
32
+ itemsDistribution: "start",
33
+ children: c
34
+ });
35
+ expect(e.getByTestId("govie-stack")).toBeInTheDocument(), expect(e.getByTestId("govie-stack-item-0")).toBeInTheDocument(), expect(e.getByTestId("govie-stack-item-1")).toBeInTheDocument(), expect(e.getByTestId("govie-stack-item-2")).toBeInTheDocument();
36
+ }), it("should pass axe accessibility tests", async () => {
37
+ await i({
38
+ direction: "column",
39
+ itemsAlignment: "start",
40
+ itemsDistribution: "start",
41
+ children: c
42
+ }).axe();
43
+ });
44
+ });
@@ -0,0 +1,32 @@
1
+ export type Gap = number | {
2
+ base?: number;
3
+ xs?: number;
4
+ sm?: number;
5
+ md?: number;
6
+ lg?: number;
7
+ xl?: number;
8
+ '2xl'?: number;
9
+ };
10
+ type SimpleDirection = 'column' | 'row';
11
+ export type Alignment = 'start' | 'center' | 'end' | 'stretch';
12
+ export type Distribution = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly' | 'stretch';
13
+ export type Direction = SimpleDirection | {
14
+ base?: SimpleDirection;
15
+ xs?: SimpleDirection;
16
+ sm?: SimpleDirection;
17
+ md?: SimpleDirection;
18
+ lg?: SimpleDirection;
19
+ xl?: SimpleDirection;
20
+ '2xl'?: SimpleDirection;
21
+ };
22
+ export type StackProps = {
23
+ direction?: Direction;
24
+ itemsAlignment?: Alignment;
25
+ itemsDistribution?: Distribution;
26
+ gap?: Gap;
27
+ hasDivider?: boolean;
28
+ wrap?: boolean;
29
+ fixedHeight?: string;
30
+ className?: string;
31
+ } & React.HTMLAttributes<HTMLDivElement>;
32
+ export {};
@@ -0,0 +1 @@
1
+