@gov-design-system-ce/components 0.0.6 → 0.0.8

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 (566) hide show
  1. package/dist/cjs/Fragment-52846f79.js +7 -0
  2. package/dist/cjs/Fragment-52846f79.js.map +1 -0
  3. package/dist/cjs/{constants-5f6bbc50.js → constants-245999e7.js} +3 -2
  4. package/dist/cjs/constants-245999e7.js.map +1 -0
  5. package/dist/cjs/{constants-dc2ba6bd.js → constants-61f8be34.js} +3 -3
  6. package/dist/cjs/constants-61f8be34.js.map +1 -0
  7. package/dist/cjs/core.cjs.js +1 -1
  8. package/dist/cjs/gov-accordion-item.cjs.entry.js +2 -2
  9. package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
  10. package/dist/cjs/gov-accordion.cjs.entry.js +2 -1
  11. package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-alert.cjs.entry.js +1 -1
  13. package/dist/cjs/gov-alert.cjs.entry.js.map +1 -1
  14. package/dist/cjs/gov-app.cjs.entry.js +673 -165
  15. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  16. package/dist/cjs/gov-attachments_3.cjs.entry.js +1 -1
  17. package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
  18. package/dist/cjs/gov-backdrop.cjs.entry.js +4 -3
  19. package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gov-badge.cjs.entry.js +17 -17
  21. package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
  22. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +1 -1
  23. package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
  24. package/dist/cjs/gov-button.cjs.entry.js +14 -3
  25. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  26. package/dist/cjs/gov-card.cjs.entry.js +1 -1
  27. package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
  28. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +4 -0
  29. package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
  30. package/dist/cjs/gov-form-checkbox.cjs.entry.js +23 -7
  31. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  32. package/dist/cjs/gov-form-file.cjs.entry.js +7 -1
  33. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  34. package/dist/cjs/gov-form-input.cjs.entry.js +8 -2
  35. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  36. package/dist/cjs/gov-form-multi-select.cjs.entry.js +11 -3
  37. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  38. package/dist/cjs/gov-form-password-power.cjs.entry.js +28 -0
  39. package/dist/cjs/gov-form-password-power.cjs.entry.js.map +1 -0
  40. package/dist/cjs/gov-form-radio.cjs.entry.js +17 -1
  41. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  42. package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
  43. package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
  44. package/dist/cjs/gov-form-select.cjs.entry.js +3 -3
  45. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  46. package/dist/cjs/gov-form-switch.cjs.entry.js +23 -7
  47. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  48. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  49. package/dist/cjs/gov-modal.cjs.entry.js +19 -13
  50. package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
  51. package/dist/cjs/gov-pagination.cjs.entry.js +50 -16
  52. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  53. package/dist/cjs/gov-prompt.cjs.entry.js +12 -6
  54. package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
  55. package/dist/cjs/gov-side-nav-item.cjs.entry.js +1 -1
  56. package/dist/cjs/gov-side-nav-item.cjs.entry.js.map +1 -1
  57. package/dist/cjs/gov-spacer.cjs.entry.js +1 -1
  58. package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
  59. package/dist/cjs/gov-statsbar-item.cjs.entry.js +1 -1
  60. package/dist/cjs/gov-statsbar.cjs.entry.js +2 -2
  61. package/dist/cjs/gov-statsbar.cjs.entry.js.map +1 -1
  62. package/dist/cjs/gov-tabs.cjs.entry.js +1 -1
  63. package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
  64. package/dist/cjs/gov-tile.cjs.entry.js +3 -2
  65. package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
  66. package/dist/cjs/gov-tiles.cjs.entry.js +2 -1
  67. package/dist/cjs/gov-tiles.cjs.entry.js.map +1 -1
  68. package/dist/cjs/gov-toast.cjs.entry.js +1 -1
  69. package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
  70. package/dist/cjs/gov-wizzard-item.cjs.entry.js +1 -1
  71. package/dist/cjs/gov-wizzard-item.cjs.entry.js.map +1 -1
  72. package/dist/cjs/index-356717ae.js +4 -0
  73. package/dist/cjs/loader.cjs.js +1 -1
  74. package/dist/collection/collection-manifest.json +1 -0
  75. package/dist/collection/components/gov-accordion/gov-accordion-item.css +37 -5
  76. package/dist/collection/components/gov-accordion/gov-accordion-item.js +1 -1
  77. package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
  78. package/dist/collection/components/gov-accordion/gov-accordion.css +6 -0
  79. package/dist/collection/components/gov-accordion/gov-accordion.js +19 -0
  80. package/dist/collection/components/gov-accordion/gov-accordion.js.map +1 -1
  81. package/dist/collection/components/gov-alert/gov-alert.css +3 -0
  82. package/dist/collection/components/gov-alert/gov-alert.js +1 -1
  83. package/dist/collection/components/gov-alert/gov-alert.js.map +1 -1
  84. package/dist/collection/components/gov-app/gov-app.css +3 -0
  85. package/dist/collection/components/gov-attachments/gov-attachments-item.css +3 -0
  86. package/dist/collection/components/gov-attachments/gov-attachments-item.js +1 -1
  87. package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
  88. package/dist/collection/components/gov-attachments/gov-attachments.css +3 -0
  89. package/dist/collection/components/gov-backdrop/gov-backdrop.css +3 -0
  90. package/dist/collection/components/gov-backdrop/gov-backdrop.js +5 -4
  91. package/dist/collection/components/gov-backdrop/gov-backdrop.js.map +1 -1
  92. package/dist/collection/components/gov-badge/constants.js +4 -1
  93. package/dist/collection/components/gov-badge/constants.js.map +1 -1
  94. package/dist/collection/components/gov-badge/gov-badge.css +204 -96
  95. package/dist/collection/components/gov-badge/gov-badge.js +26 -47
  96. package/dist/collection/components/gov-badge/gov-badge.js.map +1 -1
  97. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +3 -0
  98. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
  99. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
  100. package/dist/collection/components/gov-button/constants.js +2 -1
  101. package/dist/collection/components/gov-button/constants.js.map +1 -1
  102. package/dist/collection/components/gov-button/gov-button.css +210 -131
  103. package/dist/collection/components/gov-button/gov-button.js +18 -7
  104. package/dist/collection/components/gov-button/gov-button.js.map +1 -1
  105. package/dist/collection/components/gov-card/gov-card.css +3 -0
  106. package/dist/collection/components/gov-card/gov-card.js +1 -1
  107. package/dist/collection/components/gov-card/gov-card.js.map +1 -1
  108. package/dist/collection/components/gov-container/gov-container.css +3 -0
  109. package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +3 -0
  110. package/dist/collection/components/gov-empty/gov-empty.css +3 -0
  111. package/dist/collection/components/gov-error-code/gov-error-code.css +3 -0
  112. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +3 -0
  113. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +4 -0
  114. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
  115. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +3 -0
  116. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +53 -19
  117. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  118. package/dist/collection/components/gov-form/control/gov-form-control.css +3 -0
  119. package/dist/collection/components/gov-form/file/gov-form-file.css +3 -0
  120. package/dist/collection/components/gov-form/file/gov-form-file.js +7 -1
  121. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  122. package/dist/collection/components/gov-form/group/gov-form-group.css +3 -0
  123. package/dist/collection/components/gov-form/input/gov-form-input.css +6 -3
  124. package/dist/collection/components/gov-form/input/gov-form-input.js +7 -1
  125. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  126. package/dist/collection/components/gov-form/label/gov-form-label.css +3 -0
  127. package/dist/collection/components/gov-form/message/gov-form-message.css +3 -0
  128. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +3 -3
  129. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +10 -2
  130. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  131. package/dist/collection/components/gov-form/password-power/constants.js +6 -0
  132. package/dist/collection/components/gov-form/password-power/constants.js.map +1 -0
  133. package/dist/collection/components/gov-form/password-power/gov-form-password-power.css +246 -0
  134. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +43 -0
  135. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js.map +1 -0
  136. package/dist/collection/components/gov-form/radio/gov-form-radio.css +3 -0
  137. package/dist/collection/components/gov-form/radio/gov-form-radio.js +35 -1
  138. package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
  139. package/dist/collection/components/gov-form/search/gov-form-search.css +7 -0
  140. package/dist/collection/components/gov-form/select/gov-form-select.css +3 -3
  141. package/dist/collection/components/gov-form/select/gov-form-select.js +2 -2
  142. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  143. package/dist/collection/components/gov-form/switch/gov-form-switch.css +3 -0
  144. package/dist/collection/components/gov-form/switch/gov-form-switch.js +52 -18
  145. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  146. package/dist/collection/components/gov-grid/gov-grid-item.css +3 -0
  147. package/dist/collection/components/gov-grid/gov-grid.css +3 -0
  148. package/dist/collection/components/gov-icon/gov-icon.css +3 -0
  149. package/dist/collection/components/gov-icon/list.js +148 -5
  150. package/dist/collection/components/gov-icon/list.js.map +1 -1
  151. package/dist/collection/components/gov-layout/gov-layout-column.css +3 -0
  152. package/dist/collection/components/gov-layout/gov-layout.css +3 -0
  153. package/dist/collection/components/gov-loading/gov-loading.css +3 -0
  154. package/dist/collection/components/gov-message/gov-message.css +3 -0
  155. package/dist/collection/components/gov-modal/gov-modal.css +6 -3
  156. package/dist/collection/components/gov-modal/gov-modal.js +35 -22
  157. package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
  158. package/dist/collection/components/gov-nav/gov-nav-item.css +3 -0
  159. package/dist/collection/components/gov-nav/gov-nav.css +3 -0
  160. package/dist/collection/components/gov-pagination/gov-pagination.css +88 -39
  161. package/dist/collection/components/gov-pagination/gov-pagination.js +63 -29
  162. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  163. package/dist/collection/components/gov-promp/gov-prompt.css +6 -3
  164. package/dist/collection/components/gov-promp/gov-prompt.js +18 -5
  165. package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
  166. package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +3 -0
  167. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js +1 -1
  168. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js.map +1 -1
  169. package/dist/collection/components/gov-side-nav/gov-side-nav.css +3 -0
  170. package/dist/collection/components/gov-spacer/gov-spacer.css +3 -0
  171. package/dist/collection/components/gov-spacer/gov-spacer.js +3 -2
  172. package/dist/collection/components/gov-spacer/gov-spacer.js.map +1 -1
  173. package/dist/collection/components/gov-statsbar/constants.js +1 -1
  174. package/dist/collection/components/gov-statsbar/constants.js.map +1 -1
  175. package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +3 -0
  176. package/dist/collection/components/gov-statsbar/gov-statsbar.css +3 -0
  177. package/dist/collection/components/gov-statsbar/gov-statsbar.js +2 -2
  178. package/dist/collection/components/gov-statsbar/gov-statsbar.js.map +1 -1
  179. package/dist/collection/components/gov-stepper/gov-stepper-item.css +3 -0
  180. package/dist/collection/components/gov-stepper/gov-stepper.css +3 -0
  181. package/dist/collection/components/gov-tabs/gov-tabs-item.css +3 -0
  182. package/dist/collection/components/gov-tabs/gov-tabs.css +3 -0
  183. package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
  184. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  185. package/dist/collection/components/gov-tile/constants.js +1 -0
  186. package/dist/collection/components/gov-tile/constants.js.map +1 -1
  187. package/dist/collection/components/gov-tile/gov-tile.css +11 -4
  188. package/dist/collection/components/gov-tile/gov-tile.js +3 -6
  189. package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
  190. package/dist/collection/components/gov-tiles/gov-tiles.css +6 -0
  191. package/dist/collection/components/gov-tiles/gov-tiles.js +19 -0
  192. package/dist/collection/components/gov-tiles/gov-tiles.js.map +1 -1
  193. package/dist/collection/components/gov-toast/gov-toast.css +3 -0
  194. package/dist/collection/components/gov-toast/gov-toast.js +1 -1
  195. package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
  196. package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +3 -0
  197. package/dist/collection/components/gov-tooltip/gov-tooltip.css +3 -0
  198. package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +3 -0
  199. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js +1 -1
  200. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js.map +1 -1
  201. package/dist/collection/components/gov-wizzard/gov-wizzard.css +3 -0
  202. package/dist/collection/pages/Accordion.js +97 -2
  203. package/dist/collection/pages/Accordion.js.map +1 -1
  204. package/dist/collection/pages/Badge.js +27 -0
  205. package/dist/collection/pages/Badge.js.map +1 -1
  206. package/dist/collection/pages/Button.js +440 -120
  207. package/dist/collection/pages/Button.js.map +1 -1
  208. package/dist/collection/pages/Error.js +1 -1
  209. package/dist/collection/pages/Error.js.map +1 -1
  210. package/dist/collection/pages/Forms.js +46 -29
  211. package/dist/collection/pages/Forms.js.map +1 -1
  212. package/dist/collection/pages/Pagination.js +12 -2
  213. package/dist/collection/pages/Pagination.js.map +1 -1
  214. package/dist/collection/pages/Stepper.js +6 -6
  215. package/dist/collection/pages/Stepper.js.map +1 -1
  216. package/dist/collection/pages/Tiles.js +39 -0
  217. package/dist/collection/pages/Tiles.js.map +1 -1
  218. package/dist/collection/pages/ToastMessage.js +1 -1
  219. package/dist/collection/pages/ToastMessage.js.map +1 -1
  220. package/dist/collection/pages/ToastMessageCountdown.js +1 -1
  221. package/dist/collection/pages/ToastMessageCountdown.js.map +1 -1
  222. package/dist/collection/pages/Wizzard.js +3 -3
  223. package/dist/collection/pages/Wizzard.js.map +1 -1
  224. package/dist/collection/utils/array.utils.js +2 -0
  225. package/dist/collection/utils/array.utils.js.map +1 -0
  226. package/dist/components/Fragment.js +5 -0
  227. package/dist/components/Fragment.js.map +1 -0
  228. package/dist/components/constants11.js +2 -2
  229. package/dist/components/constants11.js.map +1 -1
  230. package/dist/components/constants3.js +2 -1
  231. package/dist/components/constants3.js.map +1 -1
  232. package/dist/components/gov-accordion-item.js +2 -3
  233. package/dist/components/gov-accordion-item.js.map +1 -1
  234. package/dist/components/gov-accordion.js +3 -2
  235. package/dist/components/gov-accordion.js.map +1 -1
  236. package/dist/components/gov-alert.js +1 -2
  237. package/dist/components/gov-alert.js.map +1 -1
  238. package/dist/components/gov-app.js +673 -166
  239. package/dist/components/gov-app.js.map +1 -1
  240. package/dist/components/gov-attachments-item2.js +1 -2
  241. package/dist/components/gov-attachments-item2.js.map +1 -1
  242. package/dist/components/gov-attachments2.js +0 -1
  243. package/dist/components/gov-attachments2.js.map +1 -1
  244. package/dist/components/gov-backdrop2.js +5 -5
  245. package/dist/components/gov-backdrop2.js.map +1 -1
  246. package/dist/components/gov-badge2.js +16 -18
  247. package/dist/components/gov-badge2.js.map +1 -1
  248. package/dist/components/gov-breadcrumbs.js +1 -2
  249. package/dist/components/gov-breadcrumbs.js.map +1 -1
  250. package/dist/components/gov-button2.js +17 -7
  251. package/dist/components/gov-button2.js.map +1 -1
  252. package/dist/components/gov-card.js +1 -2
  253. package/dist/components/gov-card.js.map +1 -1
  254. package/dist/components/gov-container.js +0 -1
  255. package/dist/components/gov-container.js.map +1 -1
  256. package/dist/components/gov-cookiebar.js +0 -1
  257. package/dist/components/gov-cookiebar.js.map +1 -1
  258. package/dist/components/gov-empty.js +0 -1
  259. package/dist/components/gov-empty.js.map +1 -1
  260. package/dist/components/gov-error-code.js +0 -1
  261. package/dist/components/gov-error-code.js.map +1 -1
  262. package/dist/components/gov-form-autocomplete2.js +4 -1
  263. package/dist/components/gov-form-autocomplete2.js.map +1 -1
  264. package/dist/components/gov-form-checkbox.js +24 -8
  265. package/dist/components/gov-form-checkbox.js.map +1 -1
  266. package/dist/components/gov-form-control.js +0 -1
  267. package/dist/components/gov-form-control.js.map +1 -1
  268. package/dist/components/gov-form-file.js +7 -2
  269. package/dist/components/gov-form-file.js.map +1 -1
  270. package/dist/components/gov-form-group.js +0 -1
  271. package/dist/components/gov-form-group.js.map +1 -1
  272. package/dist/components/gov-form-input2.js +8 -3
  273. package/dist/components/gov-form-input2.js.map +1 -1
  274. package/dist/components/gov-form-label.js +0 -1
  275. package/dist/components/gov-form-label.js.map +1 -1
  276. package/dist/components/gov-form-message2.js +0 -1
  277. package/dist/components/gov-form-message2.js.map +1 -1
  278. package/dist/components/gov-form-multi-select.js +11 -4
  279. package/dist/components/gov-form-multi-select.js.map +1 -1
  280. package/dist/components/gov-form-password-power.d.ts +11 -0
  281. package/dist/components/gov-form-password-power.js +43 -0
  282. package/dist/components/gov-form-password-power.js.map +1 -0
  283. package/dist/components/gov-form-radio.js +18 -2
  284. package/dist/components/gov-form-radio.js.map +1 -1
  285. package/dist/components/gov-form-search.js +1 -2
  286. package/dist/components/gov-form-search.js.map +1 -1
  287. package/dist/components/gov-form-select2.js +3 -4
  288. package/dist/components/gov-form-select2.js.map +1 -1
  289. package/dist/components/gov-form-switch.js +24 -8
  290. package/dist/components/gov-form-switch.js.map +1 -1
  291. package/dist/components/gov-grid-item.js +0 -1
  292. package/dist/components/gov-grid-item.js.map +1 -1
  293. package/dist/components/gov-grid.js +0 -1
  294. package/dist/components/gov-grid.js.map +1 -1
  295. package/dist/components/gov-icon2.js +1 -2
  296. package/dist/components/gov-icon2.js.map +1 -1
  297. package/dist/components/gov-layout-column.js +0 -1
  298. package/dist/components/gov-layout-column.js.map +1 -1
  299. package/dist/components/gov-layout.js +0 -1
  300. package/dist/components/gov-layout.js.map +1 -1
  301. package/dist/components/gov-loading.js +0 -1
  302. package/dist/components/gov-loading.js.map +1 -1
  303. package/dist/components/gov-message.js +0 -1
  304. package/dist/components/gov-message.js.map +1 -1
  305. package/dist/components/gov-modal.js +20 -14
  306. package/dist/components/gov-modal.js.map +1 -1
  307. package/dist/components/gov-nav-item.js +0 -1
  308. package/dist/components/gov-nav-item.js.map +1 -1
  309. package/dist/components/gov-nav.js +0 -1
  310. package/dist/components/gov-nav.js.map +1 -1
  311. package/dist/components/gov-pagination.js +50 -17
  312. package/dist/components/gov-pagination.js.map +1 -1
  313. package/dist/components/gov-prompt.js +13 -7
  314. package/dist/components/gov-prompt.js.map +1 -1
  315. package/dist/components/gov-side-nav-item.js +1 -2
  316. package/dist/components/gov-side-nav-item.js.map +1 -1
  317. package/dist/components/gov-side-nav.js +0 -1
  318. package/dist/components/gov-side-nav.js.map +1 -1
  319. package/dist/components/gov-spacer.js +1 -2
  320. package/dist/components/gov-spacer.js.map +1 -1
  321. package/dist/components/gov-statsbar-item.js +0 -1
  322. package/dist/components/gov-statsbar-item.js.map +1 -1
  323. package/dist/components/gov-statsbar.js +2 -3
  324. package/dist/components/gov-statsbar.js.map +1 -1
  325. package/dist/components/gov-stepper-item.js +0 -1
  326. package/dist/components/gov-stepper-item.js.map +1 -1
  327. package/dist/components/gov-stepper.js +0 -1
  328. package/dist/components/gov-stepper.js.map +1 -1
  329. package/dist/components/gov-tabs-item.js +0 -1
  330. package/dist/components/gov-tabs-item.js.map +1 -1
  331. package/dist/components/gov-tabs.js +1 -2
  332. package/dist/components/gov-tabs.js.map +1 -1
  333. package/dist/components/gov-tile.js +3 -3
  334. package/dist/components/gov-tile.js.map +1 -1
  335. package/dist/components/gov-tiles.js +4 -3
  336. package/dist/components/gov-tiles.js.map +1 -1
  337. package/dist/components/gov-toast.js +1 -2
  338. package/dist/components/gov-toast.js.map +1 -1
  339. package/dist/components/gov-tooltip-content.js +0 -1
  340. package/dist/components/gov-tooltip-content.js.map +1 -1
  341. package/dist/components/gov-tooltip.js +0 -1
  342. package/dist/components/gov-tooltip.js.map +1 -1
  343. package/dist/components/gov-wizzard-item.js +1 -2
  344. package/dist/components/gov-wizzard-item.js.map +1 -1
  345. package/dist/components/gov-wizzard.js +0 -1
  346. package/dist/components/gov-wizzard.js.map +1 -1
  347. package/dist/components/index.d.ts +1 -0
  348. package/dist/components/index.js +1 -0
  349. package/dist/components/index.js.map +1 -1
  350. package/dist/core/core.css +1 -1
  351. package/dist/core/core.esm.js +1 -1
  352. package/dist/core/core.esm.js.map +1 -1
  353. package/dist/core/{p-e7dd2002.entry.js → p-00e1e600.entry.js} +2 -2
  354. package/dist/core/p-00e1e600.entry.js.map +1 -0
  355. package/dist/core/{p-ae3e2d60.entry.js → p-04fc18ab.entry.js} +2 -2
  356. package/dist/core/p-04fc18ab.entry.js.map +1 -0
  357. package/dist/core/p-0950ba85.entry.js +2 -0
  358. package/dist/core/p-0950ba85.entry.js.map +1 -0
  359. package/dist/core/{p-5fa41af9.js → p-1020a160.js} +1 -1
  360. package/dist/core/p-1020a160.js.map +1 -0
  361. package/dist/core/{p-9e6a41cc.entry.js → p-16608a87.entry.js} +2 -2
  362. package/dist/core/p-16608a87.entry.js.map +1 -0
  363. package/dist/core/{p-f5ee7634.entry.js → p-1bb5184f.entry.js} +2 -2
  364. package/dist/core/{p-f5ee7634.entry.js.map → p-1bb5184f.entry.js.map} +1 -1
  365. package/dist/core/p-1c06fb0b.entry.js +2 -0
  366. package/dist/core/p-1c06fb0b.entry.js.map +1 -0
  367. package/dist/core/p-1c1d0bbe.js +2 -0
  368. package/dist/core/p-1c1d0bbe.js.map +1 -0
  369. package/dist/core/{p-b48a3112.entry.js → p-4b375a4d.entry.js} +2 -2
  370. package/dist/core/{p-b48a3112.entry.js.map → p-4b375a4d.entry.js.map} +1 -1
  371. package/dist/core/p-5b4e3bdf.entry.js +2 -0
  372. package/dist/core/p-5b4e3bdf.entry.js.map +1 -0
  373. package/dist/core/p-613d8ed8.entry.js +2 -0
  374. package/dist/core/p-613d8ed8.entry.js.map +1 -0
  375. package/dist/core/{p-6d40721b.entry.js → p-63d2e8ec.entry.js} +2 -2
  376. package/dist/core/{p-6d40721b.entry.js.map → p-63d2e8ec.entry.js.map} +1 -1
  377. package/dist/core/{p-f5ffcb3d.entry.js → p-72b9e63a.entry.js} +2 -2
  378. package/dist/core/{p-5cecdaaf.entry.js → p-72f16a95.entry.js} +2 -2
  379. package/dist/core/p-7ac5f119.entry.js +2 -0
  380. package/dist/core/{p-63079b80.entry.js.map → p-7ac5f119.entry.js.map} +1 -1
  381. package/dist/core/{p-03d40bf4.entry.js → p-833ab414.entry.js} +2 -2
  382. package/dist/core/{p-03d40bf4.entry.js.map → p-833ab414.entry.js.map} +1 -1
  383. package/dist/core/{p-34360f92.entry.js → p-84fda9dd.entry.js} +2 -2
  384. package/dist/core/{p-34360f92.entry.js.map → p-84fda9dd.entry.js.map} +1 -1
  385. package/dist/core/p-851939ff.entry.js +2 -0
  386. package/dist/core/p-851939ff.entry.js.map +1 -0
  387. package/dist/core/p-8dacc8dc.entry.js +2 -0
  388. package/dist/core/p-8dacc8dc.entry.js.map +1 -0
  389. package/dist/core/p-8dbad4a2.entry.js +2 -0
  390. package/dist/core/p-8dbad4a2.entry.js.map +1 -0
  391. package/dist/core/p-902002e9.entry.js +2 -0
  392. package/dist/core/p-902002e9.entry.js.map +1 -0
  393. package/dist/core/p-95f21fbf.entry.js +2 -0
  394. package/dist/core/p-95f21fbf.entry.js.map +1 -0
  395. package/dist/core/p-99155ec0.entry.js +2 -0
  396. package/dist/core/p-99155ec0.entry.js.map +1 -0
  397. package/dist/core/{p-7591ecd4.entry.js → p-9ca0a11c.entry.js} +2 -2
  398. package/dist/core/{p-7591ecd4.entry.js.map → p-9ca0a11c.entry.js.map} +1 -1
  399. package/dist/core/p-9ceeba49.entry.js +2 -0
  400. package/dist/core/p-9ceeba49.entry.js.map +1 -0
  401. package/dist/core/{p-ec617f18.entry.js → p-9d30e79e.entry.js} +2 -2
  402. package/dist/core/{p-ec617f18.entry.js.map → p-9d30e79e.entry.js.map} +1 -1
  403. package/dist/core/{p-38fb2d42.entry.js → p-a36234bb.entry.js} +2 -2
  404. package/dist/core/p-a36234bb.entry.js.map +1 -0
  405. package/dist/core/p-ac33c5ef.entry.js +2 -0
  406. package/dist/core/p-ac33c5ef.entry.js.map +1 -0
  407. package/dist/core/p-b966062a.entry.js +2 -0
  408. package/dist/core/p-b966062a.entry.js.map +1 -0
  409. package/dist/core/{p-fc1581f9.entry.js → p-bd560ffc.entry.js} +2 -2
  410. package/dist/core/{p-fc1581f9.entry.js.map → p-bd560ffc.entry.js.map} +1 -1
  411. package/dist/core/{p-93facb4a.entry.js → p-c0430e75.entry.js} +2 -2
  412. package/dist/core/p-c0430e75.entry.js.map +1 -0
  413. package/dist/core/p-c9948e57.entry.js +2 -0
  414. package/dist/core/p-c9948e57.entry.js.map +1 -0
  415. package/dist/core/p-cd869237.js +2 -0
  416. package/dist/core/p-cd869237.js.map +1 -0
  417. package/dist/core/{p-9cc6ed83.entry.js → p-e57d250f.entry.js} +2 -2
  418. package/dist/core/p-e57d250f.entry.js.map +1 -0
  419. package/dist/core/p-ecdfb046.entry.js +2 -0
  420. package/dist/core/p-ecdfb046.entry.js.map +1 -0
  421. package/dist/core/p-fac1c202.entry.js +2 -0
  422. package/dist/core/p-fac1c202.entry.js.map +1 -0
  423. package/dist/custom-elements/index.d.ts +6 -0
  424. package/dist/custom-elements/index.js +1 -1
  425. package/dist/custom-elements/index.js.map +1 -1
  426. package/dist/esm/Fragment-8d8d54fb.js +5 -0
  427. package/dist/esm/Fragment-8d8d54fb.js.map +1 -0
  428. package/dist/esm/{constants-d550c816.js → constants-037c35bc.js} +3 -3
  429. package/dist/esm/constants-037c35bc.js.map +1 -0
  430. package/dist/esm/{constants-1a2146b2.js → constants-45f6db4c.js} +3 -2
  431. package/dist/esm/constants-45f6db4c.js.map +1 -0
  432. package/dist/esm/core.js +1 -1
  433. package/dist/esm/gov-accordion-item.entry.js +2 -2
  434. package/dist/esm/gov-accordion-item.entry.js.map +1 -1
  435. package/dist/esm/gov-accordion.entry.js +2 -1
  436. package/dist/esm/gov-accordion.entry.js.map +1 -1
  437. package/dist/esm/gov-alert.entry.js +1 -1
  438. package/dist/esm/gov-alert.entry.js.map +1 -1
  439. package/dist/esm/gov-app.entry.js +673 -165
  440. package/dist/esm/gov-app.entry.js.map +1 -1
  441. package/dist/esm/gov-attachments_3.entry.js +1 -1
  442. package/dist/esm/gov-attachments_3.entry.js.map +1 -1
  443. package/dist/esm/gov-backdrop.entry.js +5 -4
  444. package/dist/esm/gov-backdrop.entry.js.map +1 -1
  445. package/dist/esm/gov-badge.entry.js +17 -17
  446. package/dist/esm/gov-badge.entry.js.map +1 -1
  447. package/dist/esm/gov-breadcrumbs.entry.js +1 -1
  448. package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
  449. package/dist/esm/gov-button.entry.js +14 -3
  450. package/dist/esm/gov-button.entry.js.map +1 -1
  451. package/dist/esm/gov-card.entry.js +1 -1
  452. package/dist/esm/gov-card.entry.js.map +1 -1
  453. package/dist/esm/gov-form-autocomplete.entry.js +4 -0
  454. package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
  455. package/dist/esm/gov-form-checkbox.entry.js +23 -7
  456. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  457. package/dist/esm/gov-form-file.entry.js +7 -1
  458. package/dist/esm/gov-form-file.entry.js.map +1 -1
  459. package/dist/esm/gov-form-input.entry.js +8 -2
  460. package/dist/esm/gov-form-input.entry.js.map +1 -1
  461. package/dist/esm/gov-form-multi-select.entry.js +11 -3
  462. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  463. package/dist/esm/gov-form-password-power.entry.js +24 -0
  464. package/dist/esm/gov-form-password-power.entry.js.map +1 -0
  465. package/dist/esm/gov-form-radio.entry.js +17 -1
  466. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  467. package/dist/esm/gov-form-search.entry.js +1 -1
  468. package/dist/esm/gov-form-search.entry.js.map +1 -1
  469. package/dist/esm/gov-form-select.entry.js +3 -3
  470. package/dist/esm/gov-form-select.entry.js.map +1 -1
  471. package/dist/esm/gov-form-switch.entry.js +23 -7
  472. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  473. package/dist/esm/gov-icon.entry.js +1 -1
  474. package/dist/esm/gov-modal.entry.js +19 -13
  475. package/dist/esm/gov-modal.entry.js.map +1 -1
  476. package/dist/esm/gov-pagination.entry.js +50 -16
  477. package/dist/esm/gov-pagination.entry.js.map +1 -1
  478. package/dist/esm/gov-prompt.entry.js +12 -6
  479. package/dist/esm/gov-prompt.entry.js.map +1 -1
  480. package/dist/esm/gov-side-nav-item.entry.js +1 -1
  481. package/dist/esm/gov-side-nav-item.entry.js.map +1 -1
  482. package/dist/esm/gov-spacer.entry.js +1 -1
  483. package/dist/esm/gov-spacer.entry.js.map +1 -1
  484. package/dist/esm/gov-statsbar-item.entry.js +1 -1
  485. package/dist/esm/gov-statsbar.entry.js +2 -2
  486. package/dist/esm/gov-statsbar.entry.js.map +1 -1
  487. package/dist/esm/gov-tabs.entry.js +1 -1
  488. package/dist/esm/gov-tabs.entry.js.map +1 -1
  489. package/dist/esm/gov-tile.entry.js +3 -2
  490. package/dist/esm/gov-tile.entry.js.map +1 -1
  491. package/dist/esm/gov-tiles.entry.js +2 -1
  492. package/dist/esm/gov-tiles.entry.js.map +1 -1
  493. package/dist/esm/gov-toast.entry.js +1 -1
  494. package/dist/esm/gov-toast.entry.js.map +1 -1
  495. package/dist/esm/gov-wizzard-item.entry.js +1 -1
  496. package/dist/esm/gov-wizzard-item.entry.js.map +1 -1
  497. package/dist/esm/index-00e9a0d5.js +4 -0
  498. package/dist/esm/loader.js +1 -1
  499. package/dist/hydrate/index.js +946 -271
  500. package/dist/types/components/gov-accordion/gov-accordion.d.ts +4 -0
  501. package/dist/types/components/gov-badge/constants.d.ts +4 -2
  502. package/dist/types/components/gov-badge/gov-badge.d.ts +4 -9
  503. package/dist/types/components/gov-button/constants.d.ts +3 -2
  504. package/dist/types/components/gov-button/gov-button.d.ts +2 -0
  505. package/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +8 -3
  506. package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -0
  507. package/dist/types/components/gov-form/password-power/constants.d.ts +5 -0
  508. package/dist/types/components/gov-form/password-power/gov-form-password-power.d.ts +7 -0
  509. package/dist/types/components/gov-form/radio/gov-form-radio.d.ts +5 -0
  510. package/dist/types/components/gov-form/switch/gov-form-switch.d.ts +8 -3
  511. package/dist/types/components/gov-modal/gov-modal.d.ts +3 -1
  512. package/dist/types/components/gov-pagination/gov-pagination.d.ts +7 -3
  513. package/dist/types/components/gov-promp/gov-prompt.d.ts +3 -1
  514. package/dist/types/components/gov-statsbar/constants.d.ts +2 -2
  515. package/dist/types/components/gov-tile/constants.d.ts +1 -0
  516. package/dist/types/components/gov-tile/gov-tile.d.ts +1 -2
  517. package/dist/types/components/gov-tiles/gov-tiles.d.ts +4 -0
  518. package/dist/types/components.d.ts +65 -14
  519. package/dist/types/utils/array.utils.d.ts +1 -0
  520. package/package.json +1 -1
  521. package/dist/cjs/constants-5f6bbc50.js.map +0 -1
  522. package/dist/cjs/constants-dc2ba6bd.js.map +0 -1
  523. package/dist/core/p-00182e76.entry.js +0 -2
  524. package/dist/core/p-00182e76.entry.js.map +0 -1
  525. package/dist/core/p-0278fcb3.entry.js +0 -2
  526. package/dist/core/p-0278fcb3.entry.js.map +0 -1
  527. package/dist/core/p-08f14c8b.entry.js +0 -2
  528. package/dist/core/p-08f14c8b.entry.js.map +0 -1
  529. package/dist/core/p-0a152bb7.entry.js +0 -2
  530. package/dist/core/p-0a152bb7.entry.js.map +0 -1
  531. package/dist/core/p-14f8f2fb.js +0 -2
  532. package/dist/core/p-14f8f2fb.js.map +0 -1
  533. package/dist/core/p-2128abe1.entry.js +0 -2
  534. package/dist/core/p-2128abe1.entry.js.map +0 -1
  535. package/dist/core/p-22722ff3.entry.js +0 -2
  536. package/dist/core/p-22722ff3.entry.js.map +0 -1
  537. package/dist/core/p-2419f4cd.entry.js +0 -2
  538. package/dist/core/p-2419f4cd.entry.js.map +0 -1
  539. package/dist/core/p-38fb2d42.entry.js.map +0 -1
  540. package/dist/core/p-4681cb3a.entry.js +0 -2
  541. package/dist/core/p-4681cb3a.entry.js.map +0 -1
  542. package/dist/core/p-469273be.entry.js +0 -2
  543. package/dist/core/p-469273be.entry.js.map +0 -1
  544. package/dist/core/p-5547dbb0.entry.js +0 -2
  545. package/dist/core/p-5547dbb0.entry.js.map +0 -1
  546. package/dist/core/p-5fa41af9.js.map +0 -1
  547. package/dist/core/p-63079b80.entry.js +0 -2
  548. package/dist/core/p-8965f84a.entry.js +0 -2
  549. package/dist/core/p-8965f84a.entry.js.map +0 -1
  550. package/dist/core/p-93facb4a.entry.js.map +0 -1
  551. package/dist/core/p-9cc6ed83.entry.js.map +0 -1
  552. package/dist/core/p-9e6a41cc.entry.js.map +0 -1
  553. package/dist/core/p-ad0cc981.entry.js +0 -2
  554. package/dist/core/p-ad0cc981.entry.js.map +0 -1
  555. package/dist/core/p-ae3e2d60.entry.js.map +0 -1
  556. package/dist/core/p-e52a042f.entry.js +0 -2
  557. package/dist/core/p-e52a042f.entry.js.map +0 -1
  558. package/dist/core/p-e7dd2002.entry.js.map +0 -1
  559. package/dist/core/p-f2dc8ce3.entry.js +0 -2
  560. package/dist/core/p-f2dc8ce3.entry.js.map +0 -1
  561. package/dist/core/p-fc91591d.entry.js +0 -2
  562. package/dist/core/p-fc91591d.entry.js.map +0 -1
  563. package/dist/esm/constants-1a2146b2.js.map +0 -1
  564. package/dist/esm/constants-d550c816.js.map +0 -1
  565. /package/dist/core/{p-f5ffcb3d.entry.js.map → p-72b9e63a.entry.js.map} +0 -0
  566. /package/dist/core/{p-5cecdaaf.entry.js.map → p-72f16a95.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"gov-grid.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,qjBAAqjB;;MCS3jBA,SAAO;EAGnB;;;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;;EAeD,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,aAAW,IAAI,CAAC,MAAM,aAAW,IAAI,CAAC,MAAM,EAAE,IAAI,EAAC,MAAM,IACnG,eAAa,CACP,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovGrid"],"sources":["../../../packages/core/src/components/gov-grid/gov-grid.scss?tag=gov-grid","../../../packages/core/src/components/gov-grid/gov-grid.tsx"],"sourcesContent":["/*\n * Grid\n */\n\n$class: \".gov-grid\";\n\n#{$class} {\n\t@include base(flex);\n\tflex-wrap: wrap;\n\n\t// VARIANTS\n\t&[align-x=\"middle\"] {\n\t\talign-items: center;\n\t}\n\t&[align-x=\"bottom\"] {\n\t\talign-items: flex-end;\n\t}\n\t&[align-y=\"center\"] {\n\t\tjustify-content: center;\n\t}\n\t&[align-y=\"right\"] {\n\t\tjustify-content: flex-end;\n\t}\n\t&[align-y=\"space-between\"] {\n\t\tjustify-content: space-between;\n\t}\n\t&[align-y=\"space-around\"] {\n\t\tjustify-content: space-around;\n\t}\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { GridClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-grid',\n\tstyleUrl: 'gov-grid.scss',\n})\nexport class GovGrid {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovGridElement\n\t/**\n\t * Horizontal align of cells\n\t */\n\t@Prop({ attribute: 'align-x' }) readonly alignX: string\n\n\t/**\n\t * Vertical align of cells\n\t */\n\t@Prop({ attribute: 'align-y' }) readonly alignY: string\n\n\t// vertical / horizontal align\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(GridClass.root)} align-x={this.alignX} align-y={this.alignY} role=\"list\">\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-grid.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,qjBAAqjB;;MCS3jBA,SAAO;EAGnB;;;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;;EAeD,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,aAAW,IAAI,CAAC,MAAM,aAAW,IAAI,CAAC,MAAM,EAAE,IAAI,EAAC,MAAM,IACnG,eAAa,CACP,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovGrid"],"sources":["../../../packages/core/src/components/gov-grid/gov-grid.scss?tag=gov-grid","../../../packages/core/src/components/gov-grid/gov-grid.tsx"],"sourcesContent":["/*\n * Grid\n */\n\n$class: \".gov-grid\";\n\n#{$class} {\n\t@include base(flex);\n\tflex-wrap: wrap;\n\n\t// VARIANTS\n\t&[align-x=\"middle\"] {\n\t\talign-items: center;\n\t}\n\t&[align-x=\"bottom\"] {\n\t\talign-items: flex-end;\n\t}\n\t&[align-y=\"center\"] {\n\t\tjustify-content: center;\n\t}\n\t&[align-y=\"right\"] {\n\t\tjustify-content: flex-end;\n\t}\n\t&[align-y=\"space-between\"] {\n\t\tjustify-content: space-between;\n\t}\n\t&[align-y=\"space-around\"] {\n\t\tjustify-content: space-around;\n\t}\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { GridClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-grid',\n\tstyleUrl: 'gov-grid.scss',\n})\nexport class GovGrid {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovGridElement\n\t/**\n\t * Horizontal align of cells\n\t */\n\t@Prop({ attribute: 'align-x' }) readonly alignX: string\n\n\t/**\n\t * Vertical align of cells\n\t */\n\t@Prop({ attribute: 'align-y' }) readonly alignY: string\n\n\t// vertical / horizontal align\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(GridClass.root)} align-x={this.alignX} align-y={this.alignY} role=\"list\">\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -13,7 +13,7 @@ const IconClass = {
13
13
  holder: 'gov-icon__holder',
14
14
  };
15
15
 
16
- const version = "0.0.6";
16
+ const version = "0.0.8";
17
17
 
18
18
  const dsVersion = () => {
19
19
  return version;
@@ -135,7 +135,6 @@ function defineCustomElement() {
135
135
  break;
136
136
  } });
137
137
  }
138
- defineCustomElement();
139
138
 
140
139
  export { GovIcon as G, defineCustomElement as d };
141
140
 
@@ -1 +1 @@
1
- {"file":"gov-icon2.js","mappings":"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","names":[],"sources":["../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/components/gov-icon/gov-icon.scss?tag=gov-icon","../../../packages/core/src/components/gov-icon/gov-icon.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import { getAssetPath } from '@stencil/core'\nimport { dsVersion } from './ds.utils'\nimport { iconsPath } from '../helpers/Dom/win'\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith('http://') || path.startsWith('https://')\nconst iconUrl = (path: string, name: string, type: string) => {\n\tif (isExternalUrl(path)) {\n\t\treturn `${path}/${type}/${name}.svg?v=${dsVersion()}`\n\t}\n\treturn getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({ name, type }: { name: string; type: string }): Promise<string> {\n\tif (iconCache[name]) {\n\t\treturn iconCache[name]\n\t}\n\tif (!requestCache[name]) {\n\t\trequestCache[name] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n\t\t\tif (resp.status === 200) {\n\t\t\t\treturn resp.text()\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Gov Icon doesn't exists\")\n\t\t\t}\n\t\t})\n\t}\n\tconst path = await requestCache[name]\n\ticonCache[name] = path\n\treturn path\n}\n","/*\n * Icon\n */\n\n$class: \".gov-icon\";\n\n#{$class} {\n\tdisplay: inline-flex;\n\t&__holder,\n\tsvg {\n\t\tdisplay: inline-flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n}\n","import { Build, Component, Element, h, Prop, State, Watch, Host } from '@stencil/core'\nimport { IconClass, Type } from './constants'\nimport { fetchIcon } from '../../utils/icon.utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\tassetsDirs: ['assets'],\n\tstyleUrl: 'gov-icon.scss',\n\ttag: 'gov-icon',\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Name of icon\n\t */\n\t@Prop() name: string = null\n\t/**\n\t * Type of icon\n\t */\n\t@Prop() type: Type = 'basic'\n\t@State() private iconData: string\n\t@State() private visible = false\n\t@State() private error = false\n\tprivate intersectionObserver: IntersectionObserver\n\n\t@Watch('name')\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst { name, visible, type } = this\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\treturn\n\t\t}\n\t\ttry {\n\t\t\tthis.iconData = await fetchIcon({ name, type })\n\t\t} catch (e) {\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\tconnectedCallback(): void {\n\t\tthis.waitUntilVisible(async () => {\n\t\t\tthis.visible = true\n\t\t\tawait this.loadIconPathData()\n\t\t})\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === 'undefined' || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{ rootMargin: '50px' }\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)}>\n\t\t\t\t<span class={IconClass.holder} innerHTML={this.iconData}></span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-icon2.js","mappings":"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","names":[],"sources":["../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/components/gov-icon/gov-icon.scss?tag=gov-icon","../../../packages/core/src/components/gov-icon/gov-icon.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import { getAssetPath } from '@stencil/core'\nimport { dsVersion } from './ds.utils'\nimport { iconsPath } from '../helpers/Dom/win'\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith('http://') || path.startsWith('https://')\nconst iconUrl = (path: string, name: string, type: string) => {\n\tif (isExternalUrl(path)) {\n\t\treturn `${path}/${type}/${name}.svg?v=${dsVersion()}`\n\t}\n\treturn getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({ name, type }: { name: string; type: string }): Promise<string> {\n\tif (iconCache[name]) {\n\t\treturn iconCache[name]\n\t}\n\tif (!requestCache[name]) {\n\t\trequestCache[name] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n\t\t\tif (resp.status === 200) {\n\t\t\t\treturn resp.text()\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Gov Icon doesn't exists\")\n\t\t\t}\n\t\t})\n\t}\n\tconst path = await requestCache[name]\n\ticonCache[name] = path\n\treturn path\n}\n","/*\n * Icon\n */\n\n$class: \".gov-icon\";\n\n#{$class} {\n\tdisplay: inline-flex;\n\t&__holder,\n\tsvg {\n\t\tdisplay: inline-flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n}\n","import { Build, Component, Element, h, Prop, State, Watch, Host } from '@stencil/core'\nimport { IconClass, Type } from './constants'\nimport { fetchIcon } from '../../utils/icon.utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\tassetsDirs: ['assets'],\n\tstyleUrl: 'gov-icon.scss',\n\ttag: 'gov-icon',\n})\nexport class GovIcon {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t@Element() host: HTMLGovIconElement\n\t/**\n\t * Name of icon\n\t */\n\t@Prop() name: string = null\n\t/**\n\t * Type of icon\n\t */\n\t@Prop() type: Type = 'basic'\n\t@State() private iconData: string\n\t@State() private visible = false\n\t@State() private error = false\n\tprivate intersectionObserver: IntersectionObserver\n\n\t@Watch('name')\n\tprivate async loadIconPathData(): Promise<void> {\n\t\tconst { name, visible, type } = this\n\t\tif (!Build.isBrowser || !name || !visible) {\n\t\t\treturn\n\t\t}\n\t\ttry {\n\t\t\tthis.iconData = await fetchIcon({ name, type })\n\t\t} catch (e) {\n\t\t\tthis.error = true\n\t\t}\n\t}\n\n\tconnectedCallback(): void {\n\t\tthis.waitUntilVisible(async () => {\n\t\t\tthis.visible = true\n\t\t\tawait this.loadIconPathData()\n\t\t})\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tif (this.intersectionObserver) {\n\t\t\tthis.intersectionObserver.disconnect()\n\t\t\tthis.intersectionObserver = null\n\t\t}\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tawait this.loadIconPathData()\n\t}\n\n\tprivate waitUntilVisible(callback: () => void): void {\n\t\tif (!Build.isBrowser || typeof window === 'undefined' || !(window as any).IntersectionObserver) {\n\t\t\tcallback()\n\t\t\treturn\n\t\t}\n\t\tthis.intersectionObserver = new IntersectionObserver(\n\t\t\tentries => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tthis.intersectionObserver.disconnect()\n\t\t\t\t\t\tthis.intersectionObserver = null\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{ rootMargin: '50px' }\n\t\t)\n\t\tthis.intersectionObserver.observe(this.host)\n\t}\n\n\trender() {\n\t\tif (this.error) {\n\t\t\treturn null\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(IconClass.root)}>\n\t\t\t\t<span class={IconClass.holder} innerHTML={this.iconData}></span>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -29,7 +29,6 @@ function defineCustomElement$1() {
29
29
  break;
30
30
  } });
31
31
  }
32
- defineCustomElement$1();
33
32
 
34
33
  const GovLayoutColumn = GovLayoutColumn$1;
35
34
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-layout-column.js","mappings":";;;;AAAA,MAAM,kBAAkB,GAAG,0OAA0O;;MCSxPA,iBAAe;EAG3B;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAID,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAClD,eAAQ,CACF,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovLayoutColumn"],"sources":["../../../packages/core/src/components/gov-layout/gov-layout-column.scss?tag=gov-layout-column","../../../packages/core/src/components/gov-layout/gov-layout-column.tsx"],"sourcesContent":["/*\n * Layout column\n */\n\n$class: \".gov-layout-column\";\n\n#{$class} {\n\tposition: relative;\n\tdisplay: block;\n}\n","import { Component, Element, h, Host } from '@stencil/core'\nimport { LayoutColumnClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-layout-column',\n\tstyleUrl: 'gov-layout-column.scss',\n})\nexport class GovLayoutColumn {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovLayoutColumnElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(LayoutColumnClass.root)}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-layout-column.js","mappings":";;;;AAAA,MAAM,kBAAkB,GAAG,0OAA0O;;MCSxPA,iBAAe;EAG3B;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAID,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAClD,eAAQ,CACF,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;","names":["GovLayoutColumn"],"sources":["../../../packages/core/src/components/gov-layout/gov-layout-column.scss?tag=gov-layout-column","../../../packages/core/src/components/gov-layout/gov-layout-column.tsx"],"sourcesContent":["/*\n * Layout column\n */\n\n$class: \".gov-layout-column\";\n\n#{$class} {\n\tposition: relative;\n\tdisplay: block;\n}\n","import { Component, Element, h, Host } from '@stencil/core'\nimport { LayoutColumnClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-layout-column',\n\tstyleUrl: 'gov-layout-column.scss',\n})\nexport class GovLayoutColumn {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovLayoutColumnElement\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(LayoutColumnClass.root)}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -42,7 +42,6 @@ function defineCustomElement$1() {
42
42
  break;
43
43
  } });
44
44
  }
45
- defineCustomElement$1();
46
45
 
47
46
  const GovLayout = GovLayout$1;
48
47
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-layout.js","mappings":";;;;AAAA,MAAM,YAAY,GAAG,q8CAAq8C;;MCS78CA,WAAS;EAGrB;;;gBAQqC,SAAS;;mBAQV,KAAK;IAfxC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAgBO,SAAS,CAAC,aAAqB,EAAE,IAAY,EAAE,OAAe,EAAE,OAAgB;IACvF,MAAM,MAAM,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,EAAE,CAAA;IACrC,MAAM,SAAS,GAAG,OAAO,GAAG,GAAG,GAAG,OAAO,GAAG,EAAE,CAAA;IAC9C,MAAM,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,EAAE,CAAA;IAC3C,OAAO,aAAa,GAAG,GAAG,GAAG,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;GAC3E;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,IAC7D,eAAS,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,IACzF,eAAQ,CACC,CACJ,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovLayout"],"sources":["../../../packages/core/src/components/gov-layout/gov-layout.scss?tag=gov-layout","../../../packages/core/src/components/gov-layout/gov-layout.tsx"],"sourcesContent":["/*\n * Layout\n */\n\n$class: \".gov-layout\";\n\n@mixin big() {\n\tflex: 1 1 auto;\n\twidth: auto;\n}\n\n@mixin small() {\n\tflex: 0 0 auto;\n\twidth: calc($container-width / 3 - $layout-gap);\n}\n\n#{$class} {\n\t@include base();\n\t&__section {\n\t\tdisplay: flex;\n\t\tgap: $layout-gap;\n\t\tflex-direction: column;\n\t}\n\n\t// MQ\n\t@include mq($from: lg) {\n\t\t&__section {\n\t\t\tflex-direction: row;\n\n\t\t\t&-aside-right,\n\t\t\t&-aside {\n\t\t\t\t#{$class}-column:first-child {\n\t\t\t\t\t@include big;\n\t\t\t\t}\n\n\t\t\t\t#{$class}-column:last-child {\n\t\t\t\t\t@include small;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&-aside-left {\n\t\t\t\t#{$class}-column:first-child {\n\t\t\t\t\t@include small;\n\t\t\t\t}\n\n\t\t\t\t#{$class}-column:last-child {\n\t\t\t\t\t@include big;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&-aside-right-inverse {\n\t\t\t\t#{$class}-column:first-child {\n\t\t\t\t\torder: 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&-aside-left-inverse {\n\t\t\t\t#{$class}-column:first-child {\n\t\t\t\t\torder: 2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&-text {\n\t\t\t\twidth: $layout-content-width;\n\t\t\t\tmargin-right: auto;\n\t\t\t\tmargin-left: auto;\n\t\t\t}\n\n\t\t\t&-text-left {\n\t\t\t\twidth: $layout-content-width;\n\t\t\t\tmargin-right: auto;\n\t\t\t}\n\n\t\t\t&-text-right {\n\t\t\t\twidth: $layout-content-width;\n\t\t\t\tmargin-left: auto;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { LayoutClass, LayoutType, LayoutVariantType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-layout',\n\tstyleUrl: 'gov-layout.scss',\n})\nexport class GovLayout {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLayoutElement\n\t/**\n\t * Layout type\n\t */\n\t@Prop() readonly type?: LayoutType = 'stretch'\n\t/**\n\t * Layout align\n\t */\n\t@Prop() readonly variant?: LayoutVariantType\n\t/**\n\t * Determine if component should have inverse column order\n\t */\n\t@Prop() readonly inverse: boolean = false\n\n\tprivate typeClass(originalClass: string, type: string, variant: string, inverse: boolean) {\n\t\tconst isType = type ? '-' + type : ''\n\t\tconst isVariant = variant ? '-' + variant : ''\n\t\tconst isInverse = inverse ? '-inverse' : ''\n\t\treturn originalClass + ' ' + originalClass + isType + isVariant + isInverse\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host type={this.type} class={this.h.classes(LayoutClass.root)}>\n\t\t\t\t<section class={this.typeClass(LayoutClass.section, this.type, this.variant, this.inverse)}>\n\t\t\t\t\t<slot />\n\t\t\t\t</section>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-layout.js","mappings":";;;;AAAA,MAAM,YAAY,GAAG,q8CAAq8C;;MCS78CA,WAAS;EAGrB;;;gBAQqC,SAAS;;mBAQV,KAAK;IAfxC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAgBO,SAAS,CAAC,aAAqB,EAAE,IAAY,EAAE,OAAe,EAAE,OAAgB;IACvF,MAAM,MAAM,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,EAAE,CAAA;IACrC,MAAM,SAAS,GAAG,OAAO,GAAG,GAAG,GAAG,OAAO,GAAG,EAAE,CAAA;IAC9C,MAAM,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,EAAE,CAAA;IAC3C,OAAO,aAAa,GAAG,GAAG,GAAG,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;GAC3E;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,IAC7D,eAAS,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,IACzF,eAAQ,CACC,CACJ,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovLayout"],"sources":["../../../packages/core/src/components/gov-layout/gov-layout.scss?tag=gov-layout","../../../packages/core/src/components/gov-layout/gov-layout.tsx"],"sourcesContent":["/*\n * Layout\n */\n\n$class: \".gov-layout\";\n\n@mixin big() {\n\tflex: 1 1 auto;\n\twidth: auto;\n}\n\n@mixin small() {\n\tflex: 0 0 auto;\n\twidth: calc($container-width / 3 - $layout-gap);\n}\n\n#{$class} {\n\t@include base();\n\t&__section {\n\t\tdisplay: flex;\n\t\tgap: $layout-gap;\n\t\tflex-direction: column;\n\t}\n\n\t// MQ\n\t@include mq($from: lg) {\n\t\t&__section {\n\t\t\tflex-direction: row;\n\n\t\t\t&-aside-right,\n\t\t\t&-aside {\n\t\t\t\t#{$class}-column:first-child {\n\t\t\t\t\t@include big;\n\t\t\t\t}\n\n\t\t\t\t#{$class}-column:last-child {\n\t\t\t\t\t@include small;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&-aside-left {\n\t\t\t\t#{$class}-column:first-child {\n\t\t\t\t\t@include small;\n\t\t\t\t}\n\n\t\t\t\t#{$class}-column:last-child {\n\t\t\t\t\t@include big;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&-aside-right-inverse {\n\t\t\t\t#{$class}-column:first-child {\n\t\t\t\t\torder: 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&-aside-left-inverse {\n\t\t\t\t#{$class}-column:first-child {\n\t\t\t\t\torder: 2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&-text {\n\t\t\t\twidth: $layout-content-width;\n\t\t\t\tmargin-right: auto;\n\t\t\t\tmargin-left: auto;\n\t\t\t}\n\n\t\t\t&-text-left {\n\t\t\t\twidth: $layout-content-width;\n\t\t\t\tmargin-right: auto;\n\t\t\t}\n\n\t\t\t&-text-right {\n\t\t\t\twidth: $layout-content-width;\n\t\t\t\tmargin-left: auto;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { LayoutClass, LayoutType, LayoutVariantType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-layout',\n\tstyleUrl: 'gov-layout.scss',\n})\nexport class GovLayout {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLayoutElement\n\t/**\n\t * Layout type\n\t */\n\t@Prop() readonly type?: LayoutType = 'stretch'\n\t/**\n\t * Layout align\n\t */\n\t@Prop() readonly variant?: LayoutVariantType\n\t/**\n\t * Determine if component should have inverse column order\n\t */\n\t@Prop() readonly inverse: boolean = false\n\n\tprivate typeClass(originalClass: string, type: string, variant: string, inverse: boolean) {\n\t\tconst isType = type ? '-' + type : ''\n\t\tconst isVariant = variant ? '-' + variant : ''\n\t\tconst isInverse = inverse ? '-inverse' : ''\n\t\treturn originalClass + ' ' + originalClass + isType + isVariant + isInverse\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host type={this.type} class={this.h.classes(LayoutClass.root)}>\n\t\t\t\t<section class={this.typeClass(LayoutClass.section, this.type, this.variant, this.inverse)}>\n\t\t\t\t\t<slot />\n\t\t\t\t</section>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -49,7 +49,6 @@ function defineCustomElement$1() {
49
49
  break;
50
50
  } });
51
51
  }
52
- defineCustomElement$1();
53
52
 
54
53
  const GovLoading = GovLoading$1;
55
54
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-loading.js","mappings":";;;;;AAAO,MAAM,YAAY,GAAG;EAC3B,IAAI,EAAE,aAAa;EACnB,OAAO,EAAE,sBAAsB;EAC/B,IAAI,EAAE,mBAAmB;CACzB;;ACJD,MAAM,aAAa,GAAG,+tBAA+tB;;MCSxuBA,YAAU;EAGtB;;;mBAQkB,KAAK;IAPtB,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAQD,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IACpE,WAAK,KAAK,EAAE,YAAY,CAAC,OAAO,IAC/B,gBAAU,KAAK,EAAE,cAAc,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC,EAAE,IAAI,EAAC,QAAQ,GAAY,EACrG,eAAQ,CACH,EACN,oBAAc,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAI,CAChD,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovLoading"],"sources":["../../../packages/core/src/components/gov-loading/constants.ts","../../../packages/core/src/components/gov-loading/gov-loading.scss?tag=gov-loading","../../../packages/core/src/components/gov-loading/gov-loading.tsx"],"sourcesContent":["export const LoadingClass = {\n\troot: 'gov-loading',\n\tcontent: 'gov-loading__content',\n\ticon: 'gov-loading__icon',\n}\n","/*\n * Loading\n */\n\n$class: \".gov-loading\";\n\n#{$class} {\n\tdisplay: none;\n\t&__content {\n\t\t@include z-index(\"modal\", 1);\n\t\tposition: fixed;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tmin-width: rem-calc(155);\n\t\tpadding: rem-calc(24);\n\t\tborder-radius: rem-calc(8);\n\t\tbackground: $loading-bg;\n\t\tcolor: $loading-color;\n\t\ttext-align: center;\n\t\ttransform: translate(-50%, -50%);\n\t}\n\t&__icon {\n\t\twidth: rem-calc(64);\n\t\theight: rem-calc(64);\n\t\tline-height: 1;\n\t}\n\n\t// STATES\n\t@include parameter(\"loading\") {\n\t\tdisplay: block;\n\t}\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { LoadingClass } from './constants'\nimport { govHost, prepareClasses } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-loading',\n\tstyleUrl: 'gov-loading.scss',\n})\nexport class GovLoading {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLoadingElement\n\t/**\n\t * Determine if loading is active\n\t */\n\t@Prop() loading = false\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(LoadingClass.root)} loading={this.loading}>\n\t\t\t\t<div class={LoadingClass.content}>\n\t\t\t\t\t<gov-icon class={prepareClasses([LoadingClass.icon, 'gov-spin-animation'])} name=\"loader\"></gov-icon>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t\t<gov-backdrop visible={this.loading} inverse={true} />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-loading.js","mappings":";;;;;AAAO,MAAM,YAAY,GAAG;EAC3B,IAAI,EAAE,aAAa;EACnB,OAAO,EAAE,sBAAsB;EAC/B,IAAI,EAAE,mBAAmB;CACzB;;ACJD,MAAM,aAAa,GAAG,+tBAA+tB;;MCSxuBA,YAAU;EAGtB;;;mBAQkB,KAAK;IAPtB,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAQD,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IACpE,WAAK,KAAK,EAAE,YAAY,CAAC,OAAO,IAC/B,gBAAU,KAAK,EAAE,cAAc,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC,EAAE,IAAI,EAAC,QAAQ,GAAY,EACrG,eAAQ,CACH,EACN,oBAAc,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAI,CAChD,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovLoading"],"sources":["../../../packages/core/src/components/gov-loading/constants.ts","../../../packages/core/src/components/gov-loading/gov-loading.scss?tag=gov-loading","../../../packages/core/src/components/gov-loading/gov-loading.tsx"],"sourcesContent":["export const LoadingClass = {\n\troot: 'gov-loading',\n\tcontent: 'gov-loading__content',\n\ticon: 'gov-loading__icon',\n}\n","/*\n * Loading\n */\n\n$class: \".gov-loading\";\n\n#{$class} {\n\tdisplay: none;\n\t&__content {\n\t\t@include z-index(\"modal\", 1);\n\t\tposition: fixed;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tmin-width: rem-calc(155);\n\t\tpadding: rem-calc(24);\n\t\tborder-radius: rem-calc(8);\n\t\tbackground: $loading-bg;\n\t\tcolor: $loading-color;\n\t\ttext-align: center;\n\t\ttransform: translate(-50%, -50%);\n\t}\n\t&__icon {\n\t\twidth: rem-calc(64);\n\t\theight: rem-calc(64);\n\t\tline-height: 1;\n\t}\n\n\t// STATES\n\t@include parameter(\"loading\") {\n\t\tdisplay: block;\n\t}\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { LoadingClass } from './constants'\nimport { govHost, prepareClasses } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-loading',\n\tstyleUrl: 'gov-loading.scss',\n})\nexport class GovLoading {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovLoadingElement\n\t/**\n\t * Determine if loading is active\n\t */\n\t@Prop() loading = false\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(LoadingClass.root)} loading={this.loading}>\n\t\t\t\t<div class={LoadingClass.content}>\n\t\t\t\t\t<gov-icon class={prepareClasses([LoadingClass.icon, 'gov-spin-animation'])} name=\"loader\"></gov-icon>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t\t<gov-backdrop visible={this.loading} inverse={true} />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -48,7 +48,6 @@ function defineCustomElement$1() {
48
48
  break;
49
49
  } });
50
50
  }
51
- defineCustomElement$1();
52
51
 
53
52
  const GovMessage = GovMessage$1;
54
53
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-message.js","mappings":";;;;;;AAI+B,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,EAAC;AAG/F,MAAM,YAAY,GAAG;EAC3B,IAAI,EAAE,aAAa;EACnB,IAAI,EAAE,mBAAmB;EACzB,OAAO,EAAE,sBAAsB;EAC/B,KAAK,EAAE,oBAAoB;CAC3B;;ACZD,MAAM,aAAa,GAAG,05GAA05G;;MCYn6GA,YAAU;EAGtB;;;mBAS+C,QAAQ,CAAC,OAAO;IAR9D,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAUD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;GACnD;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAC,OAAO,IACjF,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtB,YAAM,KAAK,EAAE,YAAY,CAAC,IAAI,IAC7B,YAAM,IAAI,EAAC,MAAM,GAAG,CACd,CACP,EAED,WAAK,KAAK,EAAE,YAAY,CAAC,OAAO,IAC/B,eAAQ,CACH,CACA,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovMessage"],"sources":["../../../packages/core/src/components/gov-message/constants.ts","../../../packages/core/src/components/gov-message/gov-message.scss?tag=gov-message","../../../packages/core/src/components/gov-message/gov-message.tsx"],"sourcesContent":["import { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const MessageVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type MessageVariantType = `${ValueOf<typeof MessageVariants>}`\n\nexport const MessageClass = {\n\troot: 'gov-message',\n\ticon: 'gov-message__icon',\n\tcontent: 'gov-message__content',\n\tclose: 'gov-message__close',\n}\n","/*\n * Alert\n */\n\n@import \"../gov-toast/gov-toast-message-core.scss\";\n$class: \".gov-message\";\n\n#{$class} {\n\t@include toast-message-core;\n\n\t// VARIANTS\n\t@include parameter(\"shadow\") {\n\t\tbox-shadow: $message-box-shadow;\n\t}\n\t@each $variant, $definitions in $message-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tborder-left-color: get(\"color\", $definitions);\n\t\t\tbackground: get(\"bg-color\", $definitions);\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\tbackground: $message-bg-inverse;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { MessageClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { Variants } from '../../core/constants/variants'\nimport { MessageVariantType } from './constants'\n\n@Component({\n\ttag: 'gov-message',\n\tstyleUrl: 'gov-message.scss',\n})\nexport class GovMessage {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovMessageElement\n\n\t/**\n\t * Style variation of the content message.\n\t */\n\t@Prop() readonly variant: MessageVariantType = Variants.PRIMARY\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(Variants, newValue, MessageClass.root)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(MessageClass.root)} variant={this.variant} role=\"alert\">\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<span class={MessageClass.icon}>\n\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\n\t\t\t\t<div class={MessageClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-message.js","mappings":";;;;;;AAI+B,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,EAAC;AAG/F,MAAM,YAAY,GAAG;EAC3B,IAAI,EAAE,aAAa;EACnB,IAAI,EAAE,mBAAmB;EACzB,OAAO,EAAE,sBAAsB;EAC/B,KAAK,EAAE,oBAAoB;CAC3B;;ACZD,MAAM,aAAa,GAAG,05GAA05G;;MCYn6GA,YAAU;EAGtB;;;mBAS+C,QAAQ,CAAC,OAAO;IAR9D,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAUD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;GACnD;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAC,OAAO,IACjF,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KACtB,YAAM,KAAK,EAAE,YAAY,CAAC,IAAI,IAC7B,YAAM,IAAI,EAAC,MAAM,GAAG,CACd,CACP,EAED,WAAK,KAAK,EAAE,YAAY,CAAC,OAAO,IAC/B,eAAQ,CACH,CACA,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovMessage"],"sources":["../../../packages/core/src/components/gov-message/constants.ts","../../../packages/core/src/components/gov-message/gov-message.scss?tag=gov-message","../../../packages/core/src/components/gov-message/gov-message.tsx"],"sourcesContent":["import { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const MessageVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type MessageVariantType = `${ValueOf<typeof MessageVariants>}`\n\nexport const MessageClass = {\n\troot: 'gov-message',\n\ticon: 'gov-message__icon',\n\tcontent: 'gov-message__content',\n\tclose: 'gov-message__close',\n}\n","/*\n * Alert\n */\n\n@import \"../gov-toast/gov-toast-message-core.scss\";\n$class: \".gov-message\";\n\n#{$class} {\n\t@include toast-message-core;\n\n\t// VARIANTS\n\t@include parameter(\"shadow\") {\n\t\tbox-shadow: $message-box-shadow;\n\t}\n\t@each $variant, $definitions in $message-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tborder-left-color: get(\"color\", $definitions);\n\t\t\tbackground: get(\"bg-color\", $definitions);\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\tbackground: $message-bg-inverse;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { MessageClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { Variants } from '../../core/constants/variants'\nimport { MessageVariantType } from './constants'\n\n@Component({\n\ttag: 'gov-message',\n\tstyleUrl: 'gov-message.scss',\n})\nexport class GovMessage {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovMessageElement\n\n\t/**\n\t * Style variation of the content message.\n\t */\n\t@Prop() readonly variant: MessageVariantType = Variants.PRIMARY\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(Variants, newValue, MessageClass.root)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(MessageClass.root)} variant={this.variant} role=\"alert\">\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<span class={MessageClass.icon}>\n\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\n\t\t\t\t<div class={MessageClass.content}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -10,7 +10,7 @@ import { d as defineCustomElement$4 } from './gov-backdrop2.js';
10
10
  import { d as defineCustomElement$3 } from './gov-button2.js';
11
11
  import { d as defineCustomElement$2 } from './gov-icon2.js';
12
12
 
13
- const govModalCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-modal{display:none}.gov-modal__dialog{z-index:101;position:fixed;top:50%;left:50%;display:flex;justify-content:center;align-items:center;width:100%;max-width:var(--gov-modal-max-width, 52.5rem);height:100%;padding:0.5rem;border:none;background:transparent;transform:translate(-50%, -50%);pointer-events:none}.gov-modal__inner{position:relative;display:flex;flex-direction:column;width:100%;max-height:100%;border-radius:var(--gov-border-radius, 0.1875rem);background:var(--gov-modal-bg, var(--gov-color-neutral-white));overflow:hidden;pointer-events:auto;box-shadow:0 0 1.5rem rgba(var(--gov-color-secondary-800-rgb), 0.24)}.gov-modal__header{display:flex;gap:1rem;align-items:flex-start;padding:1.5rem 0.25rem 1.5rem 1rem;border-bottom:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__icon{flex:0 0 auto;padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 1.5rem) / 2)}.gov-modal__icon>*{width:1.5rem;height:1.5rem}.gov-modal__title{font-weight:var(--gov-text-3xl-font-weight);font-size:var(--gov-text-3xl-font-size);line-height:var(--gov-text-3xl-line-height);letter-spacing:var(--gov-text-3xl-letter-spacing);margin:0}.gov-modal__close{flex:0 0 auto;margin-left:auto;padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 2rem) / 2)}.gov-modal__content{height:100%;padding:1.5rem 1rem;color:var(--gov-modal-text-color, var(--gov-color-secondary-700));overflow:auto}.gov-modal__content>*:last-child{margin-bottom:0}.gov-modal__actions{display:flex;gap:0.5rem 1rem;flex-wrap:wrap;justify-content:flex-end;padding:1.5rem 1rem;border-top:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__dialog:focus .gov-modal__inner{outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base)}.gov-modal[open=\"\"],.gov-modal[open=true i],.gov-modal[open=\"1\"]{display:block}@media (min-width: 30em){.gov-modal__dialog{max-width:calc(var(--gov-modal-max-width, 52.5rem) + 3rem);padding:1.5rem}.gov-modal__dialog:focus{outline-offset:-1.5rem}.gov-modal__inner{box-shadow:0 0 2rem rgba(var(--gov-color-secondary-800-rgb), 0.32)}.gov-modal--prompt .gov-modal__dialog{max-width:calc(var(--gov-modal-prompt-max-width, 33.125rem) + 3rem)}}@media (min-width: 48em){.gov-modal__header{gap:1.25rem;padding:2rem 2.25rem 2rem 3rem}.gov-modal__close{padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 2.5rem) / 2)}.gov-modal__content{padding:1.5rem 3rem 2rem}.gov-modal--prompt .gov-modal__header,.gov-modal--prompt .gov-modal__content,.gov-modal--prompt .gov-modal__actions{padding:1.5rem}}";
13
+ const govModalCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-modal{display:none}.gov-modal__dialog{z-index:101;position:fixed;top:50%;left:50%;display:flex;justify-content:center;align-items:center;width:100%;max-width:var(--gov-modal-max-width, 52.5rem);height:100%;padding:0.5rem;border:none;background:transparent;transform:translate(-50%, -50%);pointer-events:none}.gov-modal__inner{position:relative;display:flex;flex-direction:column;width:100%;max-height:100%;border-radius:var(--gov-border-radius, 0.1875rem);background:var(--gov-modal-bg, var(--gov-color-neutral-white));overflow:hidden;pointer-events:auto;box-shadow:0 0 1.5rem rgba(var(--gov-color-secondary-800-rgb), 0.24)}.gov-modal__header{display:flex;gap:1rem;align-items:flex-start;padding:1.5rem 1rem;border-bottom:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__icon{flex:0 0 auto;padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 1.5rem) / 2)}.gov-modal__icon>*{width:1.5rem;height:1.5rem}.gov-modal__title{font-weight:var(--gov-text-3xl-font-weight);font-size:var(--gov-text-3xl-font-size);line-height:var(--gov-text-3xl-line-height);letter-spacing:var(--gov-text-3xl-letter-spacing);margin:0}.gov-modal__close{flex:0 0 auto;margin-left:auto;padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 2rem) / 2)}.gov-modal__content{height:100%;padding:1.5rem 1rem;color:var(--gov-modal-text-color, var(--gov-color-secondary-700));overflow:auto}.gov-modal__content>*:last-child{margin-bottom:0}.gov-modal__actions{display:flex;gap:0.5rem 1rem;flex-wrap:wrap;justify-content:flex-end;padding:1.5rem 1rem;border-top:var(--gov-modal-border-color, 0.0625rem solid var(--gov-color-secondary-500))}.gov-modal__dialog:focus .gov-modal__inner{outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base)}.gov-modal[open=\"\"],.gov-modal[open=true i],.gov-modal[open=\"1\"]{display:block}@media (min-width: 30em){.gov-modal__dialog{max-width:calc(var(--gov-modal-max-width, 52.5rem) + 3rem);padding:1.5rem}.gov-modal__dialog:focus{outline-offset:-1.5rem}.gov-modal__inner{box-shadow:0 0 2rem rgba(var(--gov-color-secondary-800-rgb), 0.32)}.gov-modal--prompt .gov-modal__dialog{max-width:calc(var(--gov-modal-prompt-max-width, 33.125rem) + 3rem)}}@media (min-width: 48em){.gov-modal__header{gap:1.25rem;padding:2rem 2.5rem 2rem 3rem}.gov-modal__close{padding-top:calc((var(--gov-text-3xl-font-size) * 1.5 - 2.5rem) / 2)}.gov-modal__content{padding:2rem 3rem}.gov-modal--prompt .gov-modal__header,.gov-modal--prompt .gov-modal__content,.gov-modal--prompt .gov-modal__actions{padding:1.5rem}}";
14
14
 
15
15
  const GovModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
16
16
  constructor() {
@@ -19,34 +19,38 @@ const GovModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
19
19
  this.govClose = createEvent(this, "gov-close", 7);
20
20
  this.open = false;
21
21
  this.label = undefined;
22
- this.role = 'dialog';
23
- this.labelTag = 'h2';
22
+ this.role = "dialog";
23
+ this.labelTag = "h2";
24
24
  this.wcaglabelledBy = undefined;
25
25
  this.wcagDescribedBy = undefined;
26
26
  this.wcagCloseLabel = undefined;
27
27
  this.wcagCloseLabelledBy = undefined;
28
+ this.modalVisible = false;
28
29
  this.h = govHost(this.host);
29
- this.labelId = createID('GovModalLabel');
30
- this.contentId = createID('GovModalContent');
30
+ this.labelId = createID("GovModalLabel");
31
+ this.contentId = createID("GovModalContent");
31
32
  }
32
33
  validateLabelTag(newValue) {
33
- const validTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
34
+ const validTags = ["h1", "h2", "h3", "h4", "h5", "h6"];
34
35
  if (newValue) {
35
36
  if (!validTags.includes(newValue)) {
36
37
  govErrorLog(`[${ModalClass.root}]: Tag ${newValue} is not allowed.`);
37
38
  }
38
39
  }
39
40
  }
41
+ watchOpen(newValue) {
42
+ this.modalVisible = newValue;
43
+ }
40
44
  showModal() {
41
- this.open = true;
45
+ this.modalVisible = true;
42
46
  document.body.classList.add(ModalClass.bodyFix);
43
47
  }
44
48
  hideModal() {
45
- this.open = false;
49
+ this.modalVisible = false;
46
50
  document.body.classList.remove(ModalClass.bodyFix);
47
51
  }
48
52
  async componentWillRender() {
49
- if (this.open) {
53
+ if (this.modalVisible) {
50
54
  this.showModal();
51
55
  }
52
56
  else {
@@ -54,6 +58,7 @@ const GovModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
54
58
  }
55
59
  }
56
60
  async componentDidRender() {
61
+ this.modalVisible = this.open;
57
62
  if (canValidateWcagOnRender()) {
58
63
  await delay(500);
59
64
  await this.validateWcag();
@@ -61,7 +66,7 @@ const GovModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
61
66
  }
62
67
  render() {
63
68
  const LabelTag = this.labelTag;
64
- return (h(Host, { class: this.h.classes(ModalClass.root), open: this.open }, h("dialog", { class: ModalClass.dialog, hidden: !this.open, tabindex: "-1", open: this.open, "aria-modal": "true", "aria-hidden": toBoolAttr(!this.open), "aria-labelledby": this.wcaglabelledBy || this.labelId, "aria-describedby": this.wcagDescribedBy || this.contentId, role: this.role }, h("div", { class: ModalClass.inner }, h("div", { class: ModalClass.header }, this.h.hasSlot('icon') && (h("div", { class: ModalClass.icon }, h("slot", { name: "icon" }))), this.label && (h(LabelTag, { class: ModalClass.title, id: this.labelId }, this.label)), h("gov-button", { class: ModalClass.close, variant: "primary", wcagLabel: this.wcagCloseLabel, wcagLabelledBy: this.wcagCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, h("gov-icon", { name: "cross" }))), h("div", { class: ModalClass.content, id: this.contentId }, h("slot", null)))), h("gov-backdrop", { visible: this.open, "wcag-label": this.wcagCloseLabel, "wcag-labelled-by": this.wcagCloseLabelledBy, "on-gov-click": this.onCloseHandler.bind(this) })));
69
+ return (h(Host, { class: this.h.classes(ModalClass.root), open: this.modalVisible }, h("dialog", { class: ModalClass.dialog, hidden: !this.modalVisible, tabindex: "-1", open: this.modalVisible, "aria-modal": "true", "aria-hidden": toBoolAttr(!this.modalVisible), "aria-labelledby": this.wcaglabelledBy || this.labelId, "aria-describedby": this.wcagDescribedBy || this.contentId, role: this.role }, h("div", { class: ModalClass.inner }, h("div", { class: ModalClass.header }, this.h.hasSlot("icon") && (h("div", { class: ModalClass.icon }, h("slot", { name: "icon" }))), this.label && (h(LabelTag, { class: ModalClass.title, id: this.labelId }, this.label)), h("gov-button", { class: ModalClass.close, variant: "primary", wcagLabel: this.wcagCloseLabel, wcagLabelledBy: this.wcagCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, h("gov-icon", { name: "x-lg" }))), h("div", { class: ModalClass.content, id: this.contentId }, h("slot", null)))), h("gov-backdrop", { visible: this.modalVisible, "wcag-label": this.wcagCloseLabel, "wcag-labelled-by": this.wcagCloseLabelledBy, "on-gov-click": this.onCloseHandler.bind(this) })));
65
70
  }
66
71
  onCloseHandler(e) {
67
72
  e.stopPropagation();
@@ -84,12 +89,13 @@ const GovModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
84
89
  * Validate the WCAG attributes of the component
85
90
  */
86
91
  async validateWcag() {
87
- validateWcagRef(this.wcaglabelledBy, 'aria-labelledby', ModalClass.root);
88
- validateWcagRef(this.wcagDescribedBy, 'aria-describedby', ModalClass.root);
92
+ validateWcagRef(this.wcaglabelledBy, "aria-labelledby", ModalClass.root);
93
+ validateWcagRef(this.wcagDescribedBy, "aria-describedby", ModalClass.root);
89
94
  }
90
95
  get host() { return this; }
91
96
  static get watchers() { return {
92
- "labelTag": ["validateLabelTag"]
97
+ "labelTag": ["validateLabelTag"],
98
+ "open": ["watchOpen"]
93
99
  }; }
94
100
  static get style() { return govModalCss; }
95
101
  }, [4, "gov-modal", {
@@ -101,6 +107,7 @@ const GovModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
101
107
  "wcagDescribedBy": [1, "wcag-described-by"],
102
108
  "wcagCloseLabel": [1, "wcag-close-label"],
103
109
  "wcagCloseLabelledBy": [1, "wcag-close-labelled-by"],
110
+ "modalVisible": [32],
104
111
  "show": [64],
105
112
  "hide": [64],
106
113
  "validateWcag": [64]
@@ -133,7 +140,6 @@ function defineCustomElement$1() {
133
140
  break;
134
141
  } });
135
142
  }
136
- defineCustomElement$1();
137
143
 
138
144
  const GovModal = GovModal$1;
139
145
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-modal.js","mappings":"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","names":["GovModal"],"sources":["../../../packages/core/src/components/gov-modal/gov-modal.scss?tag=gov-modal","../../../packages/core/src/components/gov-modal/gov-modal.tsx"],"sourcesContent":["/*\n * Modal\n */\n\n$class: \".gov-modal\";\n\n#{$class} {\n\tdisplay: none;\n\t&__dialog {\n\t\t@include z-index(\"modal\", 1);\n\t\tposition: fixed;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 100%;\n\t\tmax-width: $modal-max-width;\n\t\theight: 100%;\n\t\tpadding: rem-calc(8);\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\ttransform: translate(-50%, -50%);\n\t\tpointer-events: none;\n\t}\n\t&__inner {\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: 100%;\n\t\tmax-height: 100%;\n\t\tborder-radius: $border-radius;\n\t\tbackground: $modal-bg;\n\t\toverflow: hidden;\n\t\tpointer-events: auto;\n\t\tbox-shadow: get($shadow-l, $shadows);\n\t}\n\t&__header {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\talign-items: flex-start;\n\t\tpadding: rem-calc(24 4 24 16);\n\t\tborder-bottom: $modal-border;\n\t}\n\t&__icon {\n\t\tflex: 0 0 auto;\n\t\tpadding-top: calc(((var(--gov-text-#{$font-size-3xl}-font-size) * 1.5) - rem-calc(24)) / 2);\n\t\t& > * {\n\t\t\twidth: rem-calc(24);\n\t\t\theight: rem-calc(24);\n\t\t}\n\t}\n\t&__title {\n\t\t@include typography($font-size-3xl);\n\t\tmargin: 0;\n\t}\n\t&__close {\n\t\tflex: 0 0 auto;\n\t\tmargin-left: auto;\n\t\tpadding-top: calc(((var(--gov-text-#{$font-size-3xl}-font-size) * 1.5) - rem-calc(32)) / 2);\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t\theight: 100%;\n\t\tpadding: rem-calc(24 16);\n\t\tcolor: $modal-text-color;\n\t\toverflow: auto;\n\t}\n\t&__actions {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(8 16);\n\t\tflex-wrap: wrap;\n\t\tjustify-content: flex-end;\n\t\tpadding: rem-calc(24 16);\n\t\tborder-top: $modal-border;\n\t}\n\n\t// STATES\n\t&__dialog:focus &__inner {\n\t\toutline: $outline;\n\t}\n\t@include parameter(\"open\") {\n\t\tdisplay: block;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&__dialog {\n\t\t\tmax-width: calc($modal-max-width + 2 * rem-calc(24));\n\t\t\tpadding: rem-calc(24);\n\t\t\t&:focus {\n\t\t\t\toutline-offset: rem-calc(-24);\n\t\t\t}\n\t\t}\n\t\t&__inner {\n\t\t\tbox-shadow: get($shadow-xl, $shadows);\n\t\t}\n\n\t\t// VARIANTS\n\t\t&--prompt &__dialog {\n\t\t\tmax-width: calc($modal-prompt-max-width + 2 * rem-calc(24));\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&__header {\n\t\t\tgap: rem-calc(20);\n\t\t\tpadding: rem-calc(32 36 32 48);\n\t\t}\n\t\t&__close {\n\t\t\tpadding-top: calc(((var(--gov-text-#{$font-size-3xl}-font-size) * 1.5) - rem-calc(40)) / 2);\n\t\t}\n\t\t&__content {\n\t\t\tpadding: rem-calc(24 48 32);\n\t\t}\n\n\t\t// VARIANTS\n\t\t&--prompt {\n\t\t\t#{$class} {\n\t\t\t\t&__header,\n\t\t\t\t&__content,\n\t\t\t\t&__actions {\n\t\t\t\t\tpadding: rem-calc(24);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Event, Element, EventEmitter, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport { createID } from '../../utils/string.utils'\nimport { validateWcagRef } from '../../helpers/Validate/wcag'\nimport { ModalClass } from './constants'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { toBoolAttr } from '../../helpers/Dom/template'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\n\n@Component({\n\ttag: 'gov-modal',\n\tstyleUrl: 'gov-modal.scss',\n})\nexport class GovModal {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID('GovModalLabel')\n\t\tthis.contentId = createID('GovModalContent')\n\t}\n\n\t@Element() host: HTMLGovModalElement\n\n\t/**\n\t * Attribute for modal window display\n\t */\n\t@Prop() open = false\n\t/**\n\t * Title of modal window\n\t */\n\t@Prop() label: string\n\t/**\n\t * Role of modal\n\t */\n\t@Prop({ attribute: 'role' }) role = 'dialog'\n\t/**\n\t * Used to change the HMTL tag in the modal label for correct semantic structure\n\t */\n\t@Prop({ attribute: 'label-tag' }) readonly labelTag: string = 'h2'\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) wcaglabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the modal.\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) wcagDescribedBy: string\n\t/**\n\t * Adds accessible label for the modal close button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-close-label' }) wcagCloseLabel: string\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the modal window\n\t */\n\t@Prop({ attribute: 'wcag-close-labelled-by' }) wcagCloseLabelledBy: string\n\t/**\n\t * Emitted when modal window closes.\n\t */\n\t@Event({ eventName: 'gov-close' }) govClose: EventEmitter<PointerEvent>\n\n\t@Watch('labelTag')\n\tvalidateLabelTag(newValue: string): void {\n\t\tconst validTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${ModalClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate showModal() {\n\t\tthis.open = true\n\t\tdocument.body.classList.add(ModalClass.bodyFix)\n\t}\n\n\tprivate hideModal() {\n\t\tthis.open = false\n\t\tdocument.body.classList.remove(ModalClass.bodyFix)\n\t}\n\n\tasync componentWillRender() {\n\t\tif (this.open) {\n\t\t\tthis.showModal()\n\t\t} else {\n\t\t\tthis.hideModal()\n\t\t}\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst LabelTag = this.labelTag\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ModalClass.root)} open={this.open}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={ModalClass.dialog}\n\t\t\t\t\thidden={!this.open}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\topen={this.open}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.open)}\n\t\t\t\t\taria-labelledby={this.wcaglabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.wcagDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={ModalClass.inner}>\n\t\t\t\t\t\t<div class={ModalClass.header}>\n\t\t\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t\t\t<div class={ModalClass.icon}>\n\t\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{this.label && (\n\t\t\t\t\t\t\t\t<LabelTag class={ModalClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t{this.label}\n\t\t\t\t\t\t\t\t</LabelTag>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tclass={ModalClass.close}\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\twcagLabel={this.wcagCloseLabel}\n\t\t\t\t\t\t\t\twcagLabelledBy={this.wcagCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon name=\"cross\" />\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={ModalClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t<gov-backdrop\n\t\t\t\t\tvisible={this.open}\n\t\t\t\t\twcag-label={this.wcagCloseLabel}\n\t\t\t\t\twcag-labelled-by={this.wcagCloseLabelledBy}\n\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t/>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\tthis.hideModal()\n\t\tthis.govClose.emit(e)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showModal()\n\t}\n\n\t/**\n\t * Hidding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.hideModal()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcaglabelledBy, 'aria-labelledby', ModalClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'aria-describedby', ModalClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-modal.js","mappings":"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","names":["GovModal"],"sources":["../../../packages/core/src/components/gov-modal/gov-modal.scss?tag=gov-modal","../../../packages/core/src/components/gov-modal/gov-modal.tsx"],"sourcesContent":["/*\n * Modal\n */\n\n$class: \".gov-modal\";\n\n#{$class} {\n\tdisplay: none;\n\t&__dialog {\n\t\t@include z-index(\"modal\", 1);\n\t\tposition: fixed;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 100%;\n\t\tmax-width: $modal-max-width;\n\t\theight: 100%;\n\t\tpadding: rem-calc(8);\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\ttransform: translate(-50%, -50%);\n\t\tpointer-events: none;\n\t}\n\t&__inner {\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: 100%;\n\t\tmax-height: 100%;\n\t\tborder-radius: $border-radius;\n\t\tbackground: $modal-bg;\n\t\toverflow: hidden;\n\t\tpointer-events: auto;\n\t\tbox-shadow: get($shadow-l, $shadows);\n\t}\n\t&__header {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\talign-items: flex-start;\n\t\tpadding: rem-calc(24 16);\n\t\tborder-bottom: $modal-border;\n\t}\n\t&__icon {\n\t\tflex: 0 0 auto;\n\t\tpadding-top: calc(((var(--gov-text-#{$font-size-3xl}-font-size) * 1.5) - rem-calc(24)) / 2);\n\t\t& > * {\n\t\t\twidth: rem-calc(24);\n\t\t\theight: rem-calc(24);\n\t\t}\n\t}\n\t&__title {\n\t\t@include typography($font-size-3xl);\n\t\tmargin: 0;\n\t}\n\t&__close {\n\t\tflex: 0 0 auto;\n\t\tmargin-left: auto;\n\t\tpadding-top: calc(((var(--gov-text-#{$font-size-3xl}-font-size) * 1.5) - rem-calc(32)) / 2);\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t\theight: 100%;\n\t\tpadding: rem-calc(24 16);\n\t\tcolor: $modal-text-color;\n\t\toverflow: auto;\n\t}\n\t&__actions {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(8 16);\n\t\tflex-wrap: wrap;\n\t\tjustify-content: flex-end;\n\t\tpadding: rem-calc(24 16);\n\t\tborder-top: $modal-border;\n\t}\n\n\t// STATES\n\t&__dialog:focus &__inner {\n\t\toutline: $outline;\n\t}\n\t@include parameter(\"open\") {\n\t\tdisplay: block;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&__dialog {\n\t\t\tmax-width: calc($modal-max-width + 2 * rem-calc(24));\n\t\t\tpadding: rem-calc(24);\n\t\t\t&:focus {\n\t\t\t\toutline-offset: rem-calc(-24);\n\t\t\t}\n\t\t}\n\t\t&__inner {\n\t\t\tbox-shadow: get($shadow-xl, $shadows);\n\t\t}\n\n\t\t// VARIANTS\n\t\t&--prompt &__dialog {\n\t\t\tmax-width: calc($modal-prompt-max-width + 2 * rem-calc(24));\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&__header {\n\t\t\tgap: rem-calc(20);\n\t\t\tpadding: rem-calc(32 40 32 48);\n\t\t}\n\t\t&__close {\n\t\t\tpadding-top: calc(((var(--gov-text-#{$font-size-3xl}-font-size) * 1.5) - rem-calc(40)) / 2);\n\t\t}\n\t\t&__content {\n\t\t\tpadding: rem-calc(32 48);\n\t\t}\n\n\t\t// VARIANTS\n\t\t&--prompt {\n\t\t\t#{$class} {\n\t\t\t\t&__header,\n\t\t\t\t&__content,\n\t\t\t\t&__actions {\n\t\t\t\t\tpadding: rem-calc(24);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Event, Element, EventEmitter, h, Host, Method, Prop, Watch, State } from \"@stencil/core\"\nimport { createID } from \"../../utils/string.utils\"\nimport { validateWcagRef } from \"../../helpers/Validate/wcag\"\nimport { ModalClass } from \"./constants\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\nimport { toBoolAttr } from \"../../helpers/Dom/template\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\n\n@Component({\n\ttag: \"gov-modal\",\n\tstyleUrl: \"gov-modal.scss\",\n})\nexport class GovModal {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID(\"GovModalLabel\")\n\t\tthis.contentId = createID(\"GovModalContent\")\n\t}\n\n\t@Element() host: HTMLGovModalElement\n\n\t/**\n\t * Attribute for modal window display\n\t */\n\t@Prop() open = false\n\t/**\n\t * Title of modal window\n\t */\n\t@Prop() label: string\n\t/**\n\t * Role of modal\n\t */\n\t@Prop({ attribute: \"role\" }) role = \"dialog\"\n\t/**\n\t * Used to change the HMTL tag in the modal label for correct semantic structure\n\t */\n\t@Prop({ attribute: \"label-tag\" }) readonly labelTag: string = \"h2\"\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) wcaglabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the modal.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) wcagDescribedBy: string\n\t/**\n\t * Adds accessible label for the modal close button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: \"wcag-close-label\" }) wcagCloseLabel: string\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the modal window\n\t */\n\t@Prop({ attribute: \"wcag-close-labelled-by\" }) wcagCloseLabelledBy: string\n\t/**\n\t * Emitted when modal window closes.\n\t */\n\t@Event({ eventName: \"gov-close\" }) govClose: EventEmitter<PointerEvent>\n\n\t@State() modalVisible = false\n\n\t@Watch(\"labelTag\")\n\tvalidateLabelTag(newValue: string): void {\n\t\tconst validTags = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"]\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${ModalClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"open\")\n\twatchOpen(newValue: boolean): void {\n\t\tthis.modalVisible = newValue\n\t}\n\n\tprivate showModal() {\n\t\tthis.modalVisible = true\n\t\tdocument.body.classList.add(ModalClass.bodyFix)\n\t}\n\n\tprivate hideModal() {\n\t\tthis.modalVisible = false\n\t\tdocument.body.classList.remove(ModalClass.bodyFix)\n\t}\n\n\tasync componentWillRender() {\n\t\tif (this.modalVisible) {\n\t\t\tthis.showModal()\n\t\t} else {\n\t\t\tthis.hideModal()\n\t\t}\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.modalVisible = this.open\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst LabelTag = this.labelTag\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ModalClass.root)} open={this.modalVisible}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={ModalClass.dialog}\n\t\t\t\t\thidden={!this.modalVisible}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\topen={this.modalVisible}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.modalVisible)}\n\t\t\t\t\taria-labelledby={this.wcaglabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.wcagDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={ModalClass.inner}>\n\t\t\t\t\t\t<div class={ModalClass.header}>\n\t\t\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t\t\t<div class={ModalClass.icon}>\n\t\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{this.label && (\n\t\t\t\t\t\t\t\t<LabelTag class={ModalClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t{this.label}\n\t\t\t\t\t\t\t\t</LabelTag>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tclass={ModalClass.close}\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\twcagLabel={this.wcagCloseLabel}\n\t\t\t\t\t\t\t\twcagLabelledBy={this.wcagCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon name=\"x-lg\" />\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={ModalClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t<gov-backdrop\n\t\t\t\t\tvisible={this.modalVisible}\n\t\t\t\t\twcag-label={this.wcagCloseLabel}\n\t\t\t\t\twcag-labelled-by={this.wcagCloseLabelledBy}\n\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t/>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\tthis.hideModal()\n\t\tthis.govClose.emit(e)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showModal()\n\t}\n\n\t/**\n\t * Hidding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.hideModal()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcaglabelledBy, \"aria-labelledby\", ModalClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"aria-describedby\", ModalClass.root)\n\t}\n}\n"],"version":3}
@@ -44,7 +44,6 @@ function defineCustomElement$1() {
44
44
  break;
45
45
  } });
46
46
  }
47
- defineCustomElement$1();
48
47
 
49
48
  const GovNavItem = GovNavItem$1;
50
49
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-nav-item.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,y0CAAy0C;;MCQl1CA,YAAU;;;;;;;EAWtB,YAAY,CAAC,QAAgB;IAC5B,IAAI,CAAC,QAAQ,EAAE;MACd,WAAW,CAAC,IAAI,YAAY,CAAC,IAAI,gCAAgC,CAAC,CAAA;KAClE;GACD;EAED,iBAAiB;IAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC5B;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,IAAI,EAAE,IAAI,EAAC,UAAU,IAC9C,SAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,IAC3C,eAAQ,CACL,CACE,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovNavItem"],"sources":["../../../packages/core/src/components/gov-nav/gov-nav-item.scss?tag=gov-nav-item","../../../packages/core/src/components/gov-nav/gov-nav-item.tsx"],"sourcesContent":["/*\n * Nav - Item\n */\n\n$class: \".gov-nav-item\";\n\n#{$class} {\n\tdisplay: block;\n\t&__link {\n\t\t@include focus-outline();\n\t\tposition: relative;\n\t\tdisplay: block;\n\t\tpadding: rem-calc(15 48 15 36);\n\t\tcolor: $nav-color;\n\t\ttext-decoration: none;\n\t\t&:focus {\n\t\t\toutline-color: $nav-color;\n\t\t}\n\t\t@include hover() {\n\t\t\tcolor: $nav-color;\n\t\t\ttext-decoration: underline;\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: md) {\n\t\t&__link {\n\t\t\tdisplay: inline-flex;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\theight: 100%;\n\t\t\tpadding: rem-calc(22 20 21);\n\t\t\t&::before {\n\t\t\t\t@include pseudo();\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 50%;\n\t\t\t\twidth: 0;\n\t\t\t\theight: rem-calc(2);\n\t\t\t\tbackground: $nav-color;\n\t\t\t\ttransform: translate(-50%);\n\t\t\t\ttransition: width $t;\n\t\t\t}\n\t\t\t@include hover() {\n\t\t\t\ttext-decoration: none;\n\t\t\t\t&::before {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Prop, State, Host, Watch } from '@stencil/core'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { NavItemClass } from './constants'\n\n@Component({\n\ttag: 'gov-nav-item',\n\tstyleUrl: 'gov-nav-item.scss',\n})\nexport class GovNavItem {\n\t@Element() readonly host: HTMLGovNavItemElement\n\t@State() isExpandedState: boolean\n\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\n\t@Watch('href')\n\tvalidateHref(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${NavItemClass.root}]: Parameter href is required.`)\n\t\t}\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateHref(this.href)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={NavItemClass.root} role=\"listitem\">\n\t\t\t\t<a href={this.href} class={NavItemClass.link}>\n\t\t\t\t\t<slot />\n\t\t\t\t</a>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-nav-item.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,y0CAAy0C;;MCQl1CA,YAAU;;;;;;;EAWtB,YAAY,CAAC,QAAgB;IAC5B,IAAI,CAAC,QAAQ,EAAE;MACd,WAAW,CAAC,IAAI,YAAY,CAAC,IAAI,gCAAgC,CAAC,CAAA;KAClE;GACD;EAED,iBAAiB;IAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC5B;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,IAAI,EAAE,IAAI,EAAC,UAAU,IAC9C,SAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,IAC3C,eAAQ,CACL,CACE,EACP;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovNavItem"],"sources":["../../../packages/core/src/components/gov-nav/gov-nav-item.scss?tag=gov-nav-item","../../../packages/core/src/components/gov-nav/gov-nav-item.tsx"],"sourcesContent":["/*\n * Nav - Item\n */\n\n$class: \".gov-nav-item\";\n\n#{$class} {\n\tdisplay: block;\n\t&__link {\n\t\t@include focus-outline();\n\t\tposition: relative;\n\t\tdisplay: block;\n\t\tpadding: rem-calc(15 48 15 36);\n\t\tcolor: $nav-color;\n\t\ttext-decoration: none;\n\t\t&:focus {\n\t\t\toutline-color: $nav-color;\n\t\t}\n\t\t@include hover() {\n\t\t\tcolor: $nav-color;\n\t\t\ttext-decoration: underline;\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: md) {\n\t\t&__link {\n\t\t\tdisplay: inline-flex;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\theight: 100%;\n\t\t\tpadding: rem-calc(22 20 21);\n\t\t\t&::before {\n\t\t\t\t@include pseudo();\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 50%;\n\t\t\t\twidth: 0;\n\t\t\t\theight: rem-calc(2);\n\t\t\t\tbackground: $nav-color;\n\t\t\t\ttransform: translate(-50%);\n\t\t\t\ttransition: width $t;\n\t\t\t}\n\t\t\t@include hover() {\n\t\t\t\ttext-decoration: none;\n\t\t\t\t&::before {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Prop, State, Host, Watch } from '@stencil/core'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { NavItemClass } from './constants'\n\n@Component({\n\ttag: 'gov-nav-item',\n\tstyleUrl: 'gov-nav-item.scss',\n})\nexport class GovNavItem {\n\t@Element() readonly host: HTMLGovNavItemElement\n\t@State() isExpandedState: boolean\n\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\n\t@Watch('href')\n\tvalidateHref(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${NavItemClass.root}]: Parameter href is required.`)\n\t\t}\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateHref(this.href)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={NavItemClass.root} role=\"listitem\">\n\t\t\t\t<a href={this.href} class={NavItemClass.link}>\n\t\t\t\t\t<slot />\n\t\t\t\t</a>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -48,7 +48,6 @@ function defineCustomElement$1() {
48
48
  break;
49
49
  } });
50
50
  }
51
- defineCustomElement$1();
52
51
 
53
52
  const GovNav = GovNav$1;
54
53
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-nav.js","mappings":";;;;;;AAAA,MAAM,SAAS,GAAG,4nBAA4nB;;MCUjoBA,QAAM;;;;;;;EAYlB,MAAM,kBAAkB;IACvB,IAAI,uBAAuB,EAAE,EAAE;MAC9B,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;MAChB,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;KACzB;GACD;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,IACzB,WAAK,KAAK,EAAE,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,iBAAe,IAAI,CAAC,SAAS,sBAAoB,IAAI,CAAC,cAAc,IACzG,eAAQ,CACH,CACA,EACP;GACD;;;;EAMD,MAAM,YAAY;IACjB,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;GACrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovNav"],"sources":["../../../packages/core/src/components/gov-nav/gov-nav.scss?tag=gov-nav","../../../packages/core/src/components/gov-nav/gov-nav.tsx"],"sourcesContent":["/*\n * Nav\n */\n\n$class: \".gov-nav\";\n\n#{$class} {\n\t@include base();\n\t@include typography($font-size-s);\n\tbackground: $nav-bg;\n\tfont-weight: bold;\n\tletter-spacing: 0.0125em;\n\ttext-transform: uppercase;\n\n\t// MQ\n\t@include mq($from: md) {\n\t\ttext-align: center;\n\t\t&__nav {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: space-between;\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop } from '@stencil/core'\nimport { NavClass } from './constants'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\n\n@Component({\n\ttag: 'gov-nav',\n\tstyleUrl: 'gov-nav.scss',\n})\nexport class GovNav {\n\t@Element() readonly host: HTMLGovNavElement\n\n\t/**\n\t * Adds accessible label for the accordion that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={NavClass.root}>\n\t\t\t\t<nav class={NavClass.nav} role={'list'} arial-label={this.wcagLabel} arial-labelledby={this.wcagLabelledBy}>\n\t\t\t\t\t<slot />\n\t\t\t\t</nav>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, NavClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-nav.js","mappings":";;;;;;AAAA,MAAM,SAAS,GAAG,4nBAA4nB;;MCUjoBA,QAAM;;;;;;;EAYlB,MAAM,kBAAkB;IACvB,IAAI,uBAAuB,EAAE,EAAE;MAC9B,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;MAChB,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;KACzB;GACD;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,IACzB,WAAK,KAAK,EAAE,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,iBAAe,IAAI,CAAC,SAAS,sBAAoB,IAAI,CAAC,cAAc,IACzG,eAAQ,CACH,CACA,EACP;GACD;;;;EAMD,MAAM,YAAY;IACjB,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;GACrE;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovNav"],"sources":["../../../packages/core/src/components/gov-nav/gov-nav.scss?tag=gov-nav","../../../packages/core/src/components/gov-nav/gov-nav.tsx"],"sourcesContent":["/*\n * Nav\n */\n\n$class: \".gov-nav\";\n\n#{$class} {\n\t@include base();\n\t@include typography($font-size-s);\n\tbackground: $nav-bg;\n\tfont-weight: bold;\n\tletter-spacing: 0.0125em;\n\ttext-transform: uppercase;\n\n\t// MQ\n\t@include mq($from: md) {\n\t\ttext-align: center;\n\t\t&__nav {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: space-between;\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop } from '@stencil/core'\nimport { NavClass } from './constants'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\n\n@Component({\n\ttag: 'gov-nav',\n\tstyleUrl: 'gov-nav.scss',\n})\nexport class GovNav {\n\t@Element() readonly host: HTMLGovNavElement\n\n\t/**\n\t * Adds accessible label for the accordion that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={NavClass.root}>\n\t\t\t\t<nav class={NavClass.nav} role={'list'} arial-label={this.wcagLabel} arial-labelledby={this.wcagLabelledBy}>\n\t\t\t\t\t<slot />\n\t\t\t\t</nav>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, NavClass.root)\n\t}\n}\n"],"version":3}
@@ -1,4 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { F as Fragment } from './Fragment.js';
2
3
  import { v as validateProp } from './props.js';
3
4
  import { S as Sizes } from './sizes.js';
4
5
  import { V as Variants } from './variants.js';
@@ -11,8 +12,6 @@ import { d as defineCustomElement$4 } from './gov-button2.js';
11
12
  import { d as defineCustomElement$3 } from './gov-form-select2.js';
12
13
  import { d as defineCustomElement$2 } from './gov-icon2.js';
13
14
 
14
- const Fragment = (_, children) => [...children];
15
-
16
15
  const PaginationSizes = pick(Sizes, ['_S', '_M']);
17
16
  const PaginationVariants = pick(Variants, ['PRIMARY', 'SECONDARY']);
18
17
  var PaginationTypes;
@@ -86,29 +85,31 @@ function paginate(totalItems, currentPage = 1, pageSize = 10, maxPages = 10) {
86
85
  };
87
86
  }
88
87
 
89
- const govPaginationCss = ".gov-pagination__list{margin:0;padding:0}.gov-pagination__list .gov-pagination__item{margin:0;padding:0;background:none}.gov-pagination__list .gov-pagination__item::before{display:none}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-pagination{position:relative;display:block;width:100%}.gov-pagination__list{display:flex;align-items:center;font-weight:bold;text-align:center}.gov-pagination__list .gov-pagination__item{display:flex;justify-content:center;align-items:center;margin:0;border-radius:var(--gov-border-radius, 0.1875rem);overflow:hidden}.gov-pagination__list .gov-pagination__item--arrow{display:flex}.gov-pagination__list .gov-pagination__item--select{z-index:1;display:flex;overflow:visible;padding:0rem 1rem}.gov-pagination__item .gov-button .element{width:var(--gov-pagination-button-size, 2rem)}.gov-pagination__arrow{margin:0}.gov-pagination__item--more .gov-form-select select{border:none;padding-right:0.75rem !important}.gov-pagination__item--more .gov-form-select .gov-icon{display:none}.gov-pagination__inner{display:flex;justify-content:center;align-items:center;align-self:stretch;width:100%;color:var(--gov-pagination-color, var(--gov-color-primary));text-decoration:none}.gov-pagination button.gov-pagination__inner,.gov-pagination a.gov-pagination__inner{display:inline-flex;vertical-align:middle;justify-content:center;align-items:center;border:0;background-color:transparent;text-align:center;text-decoration:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;transition:background-color 150ms, color 150ms}.gov-pagination button.gov-pagination__inner:focus,.gov-pagination a.gov-pagination__inner:focus{outline:none}@media not all and (pointer: coarse){.gov-pagination button.gov-pagination__inner:hover,.gov-pagination a.gov-pagination__inner:hover{background-color:var(--gov-pagination-bg-active, var(--gov-color-primary-100));color:var(--gov-pagination-color-active, var(--gov-color-secondary))}}.gov-pagination[size=s] .gov-pagination__inner{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);font-weight:inherit}@media (min-width: 48em){.gov-pagination[size=s] .gov-pagination__item .gov-button .element{width:var(--gov-pagination-s-button-size, 2rem)}}.gov-pagination[size=m] .gov-pagination__inner{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);font-weight:inherit}@media (min-width: 48em){.gov-pagination[size=m] .gov-pagination__item .gov-button .element{width:var(--gov-pagination-m-button-size, 2.5rem)}}";
88
+ const createArrayRange = (from, to) => [...Array(to + 1).keys()].slice(from);
89
+
90
+ const govPaginationCss = ".gov-pagination__list{margin:0;padding:0}.gov-pagination__list .gov-pagination__item{margin:0;padding:0;background:none}.gov-pagination__list .gov-pagination__item::before{display:none}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}.gov-pagination{position:relative;display:block;width:100%}.gov-pagination__list{display:flex;align-items:center;flex-wrap:wrap;font-weight:bold;text-align:center}.gov-pagination__list .gov-pagination__item{display:flex;justify-content:center;align-items:center;margin:0;padding:0.125rem;border-radius:var(--gov-border-radius, 0.1875rem);overflow:hidden}.gov-pagination__list .gov-pagination__item--arrow{display:flex}.gov-pagination__list .gov-pagination__item--select{z-index:1;display:flex;overflow:visible;padding:0rem 1rem}.gov-pagination__arrow{margin:0}.gov-pagination__item--more .gov-form-select select{border:none;padding-right:0.75rem !important}.gov-pagination__item--more .gov-form-select .gov-icon{display:none}.gov-pagination__inner{display:flex;justify-content:center;align-items:center;align-self:stretch;width:100%;text-decoration:none}.gov-pagination__inner[wcag-current=true][type=solid][variant=primary] .element{background-color:var(--gov-button-primary-solid-hover-bg, var(--gov-color-primary-700));color:var(--gov-button-primary-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=primary] .element{background-color:var(--gov-button-primary-outlined-hover-bg, var(--gov-color-primary-100));color:var(--gov-button-primary-outlined-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=base][variant=primary] .element{background-color:var(--gov-button-primary-base-hover-bg, var(--gov-color-primary-100));color:var(--gov-button-primary-base-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=link][variant=primary] .element{background-color:var(--gov-button-primary-link-hover-bg, transparent);color:var(--gov-button-primary-link-hover-color, var(--gov-color-primary))}.gov-pagination__inner[wcag-current=true][type=solid][variant=secondary] .element{background-color:var(--gov-button-secondary-solid-hover-bg, var(--gov-color-secondary-900));color:var(--gov-button-secondary-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=secondary] .element{background-color:var(--gov-button-secondary-outlined-hover-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-outlined-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=base][variant=secondary] .element{background-color:var(--gov-button-secondary-base-hover-bg, var(--gov-color-secondary-300));color:var(--gov-button-secondary-base-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=link][variant=secondary] .element{background-color:var(--gov-button-secondary-link-hover-bg, transparent);color:var(--gov-button-secondary-link-hover-color, var(--gov-color-secondary))}.gov-pagination__inner[wcag-current=true][type=solid][variant=error] .element{background-color:var(--gov-button-error-solid-hover-bg, var(--gov-color-error-500));color:var(--gov-button-error-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=error] .element{background-color:var(--gov-button-error-outlined-hover-bg, var(--gov-color-error-100));color:var(--gov-button-error-outlined-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=base][variant=error] .element{background-color:var(--gov-button-error-base-hover-bg, var(--gov-color-error-100));color:var(--gov-button-error-base-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=link][variant=error] .element{background-color:var(--gov-button-error-link-hover-bg, transparent);color:var(--gov-button-error-link-hover-color, var(--gov-color-error))}.gov-pagination__inner[wcag-current=true][type=solid][variant=success] .element{background-color:var(--gov-button-success-solid-hover-bg, var(--gov-color-success-600));color:var(--gov-button-success-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=success] .element{background-color:var(--gov-button-success-outlined-hover-bg, var(--gov-color-success-100));color:var(--gov-button-success-outlined-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=base][variant=success] .element{background-color:var(--gov-button-success-base-hover-bg, var(--gov-color-success-100));color:var(--gov-button-success-base-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=link][variant=success] .element{background-color:var(--gov-button-success-link-hover-bg, transparent);color:var(--gov-button-success-link-hover-color, var(--gov-color-success-500))}.gov-pagination__inner[wcag-current=true][type=solid][variant=warning] .element{background-color:var(--gov-button-warning-solid-hover-bg, var(--gov-color-warning-600));color:var(--gov-button-warning-solid-hover-color, var(--gov-color-neutral-white))}.gov-pagination__inner[wcag-current=true][type=outlined][variant=warning] .element{background-color:var(--gov-button-warning-outlined-hover-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-outlined-hover-color, var(--gov-color-warning-500))}.gov-pagination__inner[wcag-current=true][type=base][variant=warning] .element{background-color:var(--gov-button-warning-base-hover-bg, var(--gov-color-warning-200));color:var(--gov-button-warning-base-hover-color, var(--gov-color-warning-500))}.gov-pagination__inner[wcag-current=true][type=link][variant=warning] .element{background-color:var(--gov-button-warning-link-hover-bg, transparent);color:var(--gov-button-warning-link-hover-color, var(--gov-color-warning-500))}.gov-pagination[size=s] .gov-pagination__inner{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);font-weight:inherit}.gov-pagination[size=s] .gov-pagination__inner .element{min-width:var(--gov-pagination-s-button-size, 2rem)}.gov-pagination[size=m] .gov-pagination__inner{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);font-weight:inherit}.gov-pagination[size=m] .gov-pagination__inner .element{min-width:var(--gov-pagination-m-button-size, 2.5rem)}";
90
91
 
91
92
  const GovPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
92
93
  constructor() {
93
94
  super();
94
95
  this.__registerHost();
95
96
  this.govPage = createEvent(this, "gov-page", 7);
96
- this.type = 'button';
97
+ this.type = "button";
97
98
  this.current = 1;
98
99
  this.total = undefined;
99
100
  this.inverse = undefined;
100
- this.size = 'm';
101
- this.variant = 'primary';
101
+ this.size = "m";
102
+ this.variant = "primary";
102
103
  this.pageSize = 10;
103
104
  this.maxPages = 5;
104
105
  this.link = undefined;
105
106
  this.wcagLabel = undefined;
106
107
  this.wcagLabelledBy = undefined;
107
- this.wcagSelectLabel = 'Vybrat stranu';
108
- this.wcagPageLabel = 'Strana';
108
+ this.wcagSelectLabel = "Vybrat stranu";
109
+ this.wcagPageLabel = "Strana";
109
110
  this.pagination = undefined;
110
111
  this.h = govHost(this.host);
111
- this.pageSelectId = createID('GovPageSelect');
112
+ this.pageSelectId = createID("GovPageSelect");
112
113
  }
113
114
  validateType(newValue) {
114
115
  validateProp(PaginationTypes, newValue, PaginationClass.root);
@@ -135,32 +136,65 @@ const GovPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
135
136
  }
136
137
  isActivePageClass(originalClass, page) {
137
138
  if (this.pagination.currentPage === page) {
138
- return originalClass + ' is-active';
139
+ return originalClass + " is-active";
139
140
  }
140
141
  else {
141
142
  return originalClass;
142
143
  }
143
144
  }
145
+ prepareLinkUrl(page) {
146
+ if (this.link) {
147
+ return String(this.link).replace("{PAGE}", String(page));
148
+ }
149
+ return undefined;
150
+ }
151
+ resetSelectValue() {
152
+ if (this.spreadSelectRef) {
153
+ this.spreadSelectRef.getInstance()
154
+ .then((el) => {
155
+ el.value = '...';
156
+ });
157
+ }
158
+ }
144
159
  render() {
145
160
  const pageResolver = (page, content) => {
146
161
  const isDisabled = page === -1;
147
162
  const ariaCurrent = toBoolAttrIfDefined(this.pagination.currentPage === page ? true : undefined);
148
- const buttonType = this.pagination.currentPage === page ? 'solid' : 'base';
149
- return (h("gov-button", { variant: this.variant, size: this.size, type: buttonType, inverse: this.pagination.currentPage === page ? true : false, disabled: isDisabled, "gov-click": () => this.onClickHandler(page), "wcag-label": this.wcagPageLabel + ' ' + page, "wcag-current": ariaCurrent, class: PaginationClass.inner }, content));
163
+ return (h("gov-button", { href: this.prepareLinkUrl(page), variant: this.variant, size: this.size, type: "base", disabled: isDisabled, "on-gov-click": (e) => this.onClickHandler(e, page), "wcag-label": page > -1 ? this.wcagPageLabel + " " + page : undefined, "wcag-current": ariaCurrent, class: PaginationClass.inner }, content));
150
164
  };
151
- return (h(Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, h("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, h("ul", { class: PaginationClass.list }, h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, h("gov-icon", { class: PaginationClass.arrow, name: "double-arrow-left" }))), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, h("gov-icon", { class: PaginationClass.arrow, name: "arrow-left" }))), this.type == 'select' ? (h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, h("span", { class: PaginationClass.inner }, h("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), h("gov-form-select", { size: "m", "wcag-labelled-by": this.pageSelectId }, this.pagination.pages.map(page => (h("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (h(Fragment, null, this.pagination.pages.map(page => (h("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page)))), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, h("span", { class: PaginationClass.inner }, h("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), h("gov-form-select", { size: "m", "wcag-labelled-by": this.pageSelectId }, h("option", { value: "..." }, "..."), this.pagination.pages.map(page => (h("option", { value: page, selected: this.pagination.currentPage === page }, page)))))))), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, h("gov-icon", { class: PaginationClass.arrow, name: "arrow-right" }))), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, h("gov-icon", { class: PaginationClass.arrow, name: "double-arrow-right" })))))));
165
+ return (h(Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, h("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, h("ul", { class: PaginationClass.list }, h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, h("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }))), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, h("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }))), this.type == "select" ? (h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, h("span", { class: PaginationClass.inner }, h("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), h("gov-form-select", { size: "m", "wcag-labelled-by": this.pageSelectId, "on-gov-change": this.onSelectHandler.bind(this) }, createArrayRange(1, this.pagination.totalPages).map(page => (h("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (h(Fragment, null, this.pagination.pages.map(page => (h("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page)))), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, h("span", { class: PaginationClass.inner }, h("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), h("gov-form-select", { size: "m", "wcag-labelled-by": this.pageSelectId, ref: el => (this.spreadSelectRef = el), "on-gov-change": this.onSelectHandler.bind(this) }, h("option", { selected: true, hidden: true }, "..."), createArrayRange(1, this.pagination.totalPages).map(page => (h("option", { value: page, selected: false }, page)))))))), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, h("gov-icon", { class: PaginationClass.arrow, name: "chevron-right" }))), h("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, h("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-right" })))))));
152
166
  }
153
- onClickHandler(page) {
167
+ onClickHandler(e, page) {
168
+ e.stopPropagation();
169
+ e.preventDefault();
154
170
  this.recalculatePagination(page);
155
171
  this.govPage.emit(Object.assign({}, this.pagination));
156
172
  }
173
+ onSelectHandler(e) {
174
+ e.stopPropagation();
175
+ e.preventDefault();
176
+ const target = e.target;
177
+ const page = parseInt(target.value);
178
+ this.resetSelectValue();
179
+ if (isNaN(page) === false) {
180
+ this.recalculatePagination(page);
181
+ if (this.link) {
182
+ window.location.href = this.prepareLinkUrl(page);
183
+ }
184
+ else {
185
+ this.govPage.emit(Object.assign({}, this.pagination));
186
+ }
187
+ }
188
+ }
157
189
  /**
158
190
  * Validate the WCAG attributes of the component
159
191
  */
160
192
  async validateWcag() {
161
- validateWcagProp(this.wcagPageLabel, 'wcag-page-label', PaginationClass.root);
162
- validateWcagProp(this.wcagSelectLabel, 'wcag-select-label', PaginationClass.root);
193
+ validateWcagProp(this.wcagPageLabel, "wcag-page-label", PaginationClass.root);
163
194
  validateWcagLabel(this.wcagLabel, this.wcagLabelledBy, PaginationClass.root);
195
+ if (this.type === "select") {
196
+ validateWcagProp(this.wcagSelectLabel, "wcag-select-label", PaginationClass.root);
197
+ }
164
198
  }
165
199
  get host() { return this; }
166
200
  static get watchers() { return {
@@ -214,7 +248,6 @@ function defineCustomElement$1() {
214
248
  break;
215
249
  } });
216
250
  }
217
- defineCustomElement$1();
218
251
 
219
252
  const GovPagination = GovPagination$1;
220
253
  const defineCustomElement = defineCustomElement$1;