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

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 (450) hide show
  1. package/dist/cjs/{constants-5f6bbc50.js → constants-245999e7.js} +3 -2
  2. package/dist/cjs/constants-245999e7.js.map +1 -0
  3. package/dist/cjs/{constants-dc2ba6bd.js → constants-61f8be34.js} +3 -3
  4. package/dist/cjs/constants-61f8be34.js.map +1 -0
  5. package/dist/cjs/core.cjs.js +1 -1
  6. package/dist/cjs/gov-accordion-item.cjs.entry.js +2 -2
  7. package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gov-accordion.cjs.entry.js +2 -1
  9. package/dist/cjs/gov-accordion.cjs.entry.js.map +1 -1
  10. package/dist/cjs/gov-alert.cjs.entry.js +1 -1
  11. package/dist/cjs/gov-alert.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-app.cjs.entry.js +658 -159
  13. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  14. package/dist/cjs/gov-attachments_3.cjs.entry.js +1 -1
  15. package/dist/cjs/gov-attachments_3.cjs.entry.js.map +1 -1
  16. package/dist/cjs/gov-backdrop.cjs.entry.js +4 -3
  17. package/dist/cjs/gov-backdrop.cjs.entry.js.map +1 -1
  18. package/dist/cjs/gov-badge.cjs.entry.js +17 -17
  19. package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gov-breadcrumbs.cjs.entry.js +1 -1
  21. package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
  22. package/dist/cjs/gov-button.cjs.entry.js +2 -2
  23. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  24. package/dist/cjs/gov-card.cjs.entry.js +1 -1
  25. package/dist/cjs/gov-card.cjs.entry.js.map +1 -1
  26. package/dist/cjs/gov-form-checkbox.cjs.entry.js +1 -1
  27. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  28. package/dist/cjs/gov-form-file.cjs.entry.js +1 -1
  29. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  30. package/dist/cjs/gov-form-input.cjs.entry.js +2 -2
  31. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  32. package/dist/cjs/gov-form-multi-select.cjs.entry.js +3 -3
  33. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  34. package/dist/cjs/gov-form-password-power.cjs.entry.js +28 -0
  35. package/dist/cjs/gov-form-password-power.cjs.entry.js.map +1 -0
  36. package/dist/cjs/gov-form-select.cjs.entry.js +3 -3
  37. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  38. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  39. package/dist/cjs/gov-modal.cjs.entry.js +19 -13
  40. package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
  41. package/dist/cjs/gov-pagination.cjs.entry.js +49 -14
  42. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  43. package/dist/cjs/gov-prompt.cjs.entry.js +12 -6
  44. package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
  45. package/dist/cjs/gov-side-nav-item.cjs.entry.js +1 -1
  46. package/dist/cjs/gov-side-nav-item.cjs.entry.js.map +1 -1
  47. package/dist/cjs/gov-spacer.cjs.entry.js +1 -1
  48. package/dist/cjs/gov-spacer.cjs.entry.js.map +1 -1
  49. package/dist/cjs/gov-statsbar-item.cjs.entry.js +1 -1
  50. package/dist/cjs/gov-statsbar.cjs.entry.js +2 -2
  51. package/dist/cjs/gov-statsbar.cjs.entry.js.map +1 -1
  52. package/dist/cjs/gov-tabs.cjs.entry.js +1 -1
  53. package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
  54. package/dist/cjs/gov-tile.cjs.entry.js +2 -2
  55. package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
  56. package/dist/cjs/gov-tiles.cjs.entry.js +2 -1
  57. package/dist/cjs/gov-tiles.cjs.entry.js.map +1 -1
  58. package/dist/cjs/gov-toast.cjs.entry.js +1 -1
  59. package/dist/cjs/gov-toast.cjs.entry.js.map +1 -1
  60. package/dist/cjs/gov-wizzard-item.cjs.entry.js +1 -1
  61. package/dist/cjs/gov-wizzard-item.cjs.entry.js.map +1 -1
  62. package/dist/cjs/index-356717ae.js +4 -0
  63. package/dist/cjs/loader.cjs.js +1 -1
  64. package/dist/collection/collection-manifest.json +1 -0
  65. package/dist/collection/components/gov-accordion/gov-accordion-item.css +37 -5
  66. package/dist/collection/components/gov-accordion/gov-accordion-item.js +1 -1
  67. package/dist/collection/components/gov-accordion/gov-accordion-item.js.map +1 -1
  68. package/dist/collection/components/gov-accordion/gov-accordion.css +6 -0
  69. package/dist/collection/components/gov-accordion/gov-accordion.js +19 -0
  70. package/dist/collection/components/gov-accordion/gov-accordion.js.map +1 -1
  71. package/dist/collection/components/gov-alert/gov-alert.css +3 -0
  72. package/dist/collection/components/gov-alert/gov-alert.js +1 -1
  73. package/dist/collection/components/gov-alert/gov-alert.js.map +1 -1
  74. package/dist/collection/components/gov-app/gov-app.css +3 -0
  75. package/dist/collection/components/gov-attachments/gov-attachments-item.css +3 -0
  76. package/dist/collection/components/gov-attachments/gov-attachments-item.js +1 -1
  77. package/dist/collection/components/gov-attachments/gov-attachments-item.js.map +1 -1
  78. package/dist/collection/components/gov-attachments/gov-attachments.css +3 -0
  79. package/dist/collection/components/gov-backdrop/gov-backdrop.css +3 -0
  80. package/dist/collection/components/gov-backdrop/gov-backdrop.js +5 -4
  81. package/dist/collection/components/gov-backdrop/gov-backdrop.js.map +1 -1
  82. package/dist/collection/components/gov-badge/constants.js +4 -1
  83. package/dist/collection/components/gov-badge/constants.js.map +1 -1
  84. package/dist/collection/components/gov-badge/gov-badge.css +204 -96
  85. package/dist/collection/components/gov-badge/gov-badge.js +26 -47
  86. package/dist/collection/components/gov-badge/gov-badge.js.map +1 -1
  87. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +3 -0
  88. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +1 -1
  89. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
  90. package/dist/collection/components/gov-button/constants.js +2 -1
  91. package/dist/collection/components/gov-button/constants.js.map +1 -1
  92. package/dist/collection/components/gov-button/gov-button.css +210 -131
  93. package/dist/collection/components/gov-button/gov-button.js +6 -6
  94. package/dist/collection/components/gov-button/gov-button.js.map +1 -1
  95. package/dist/collection/components/gov-card/gov-card.css +3 -0
  96. package/dist/collection/components/gov-card/gov-card.js +1 -1
  97. package/dist/collection/components/gov-card/gov-card.js.map +1 -1
  98. package/dist/collection/components/gov-container/gov-container.css +3 -0
  99. package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +3 -0
  100. package/dist/collection/components/gov-empty/gov-empty.css +3 -0
  101. package/dist/collection/components/gov-error-code/gov-error-code.css +3 -0
  102. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +3 -0
  103. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +3 -0
  104. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +1 -1
  105. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  106. package/dist/collection/components/gov-form/control/gov-form-control.css +3 -0
  107. package/dist/collection/components/gov-form/file/gov-form-file.css +3 -0
  108. package/dist/collection/components/gov-form/file/gov-form-file.js +1 -1
  109. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  110. package/dist/collection/components/gov-form/group/gov-form-group.css +3 -0
  111. package/dist/collection/components/gov-form/input/gov-form-input.css +6 -3
  112. package/dist/collection/components/gov-form/input/gov-form-input.js +1 -1
  113. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  114. package/dist/collection/components/gov-form/label/gov-form-label.css +3 -0
  115. package/dist/collection/components/gov-form/message/gov-form-message.css +3 -0
  116. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +3 -3
  117. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +2 -2
  118. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  119. package/dist/collection/components/gov-form/password-power/constants.js +6 -0
  120. package/dist/collection/components/gov-form/password-power/constants.js.map +1 -0
  121. package/dist/collection/components/gov-form/password-power/gov-form-password-power.css +246 -0
  122. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js +43 -0
  123. package/dist/collection/components/gov-form/password-power/gov-form-password-power.js.map +1 -0
  124. package/dist/collection/components/gov-form/radio/gov-form-radio.css +3 -0
  125. package/dist/collection/components/gov-form/search/gov-form-search.css +3 -0
  126. package/dist/collection/components/gov-form/select/gov-form-select.css +3 -3
  127. package/dist/collection/components/gov-form/select/gov-form-select.js +2 -2
  128. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  129. package/dist/collection/components/gov-form/switch/gov-form-switch.css +3 -0
  130. package/dist/collection/components/gov-grid/gov-grid-item.css +3 -0
  131. package/dist/collection/components/gov-grid/gov-grid.css +3 -0
  132. package/dist/collection/components/gov-icon/gov-icon.css +3 -0
  133. package/dist/collection/components/gov-icon/list.js +148 -5
  134. package/dist/collection/components/gov-icon/list.js.map +1 -1
  135. package/dist/collection/components/gov-layout/gov-layout-column.css +3 -0
  136. package/dist/collection/components/gov-layout/gov-layout.css +3 -0
  137. package/dist/collection/components/gov-loading/gov-loading.css +3 -0
  138. package/dist/collection/components/gov-message/gov-message.css +3 -0
  139. package/dist/collection/components/gov-modal/gov-modal.css +6 -3
  140. package/dist/collection/components/gov-modal/gov-modal.js +35 -22
  141. package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
  142. package/dist/collection/components/gov-nav/gov-nav-item.css +3 -0
  143. package/dist/collection/components/gov-nav/gov-nav.css +3 -0
  144. package/dist/collection/components/gov-pagination/gov-pagination.css +87 -39
  145. package/dist/collection/components/gov-pagination/gov-pagination.js +63 -29
  146. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  147. package/dist/collection/components/gov-promp/gov-prompt.css +6 -3
  148. package/dist/collection/components/gov-promp/gov-prompt.js +18 -5
  149. package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
  150. package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +3 -0
  151. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js +1 -1
  152. package/dist/collection/components/gov-side-nav/gov-side-nav-item.js.map +1 -1
  153. package/dist/collection/components/gov-side-nav/gov-side-nav.css +3 -0
  154. package/dist/collection/components/gov-spacer/gov-spacer.css +3 -0
  155. package/dist/collection/components/gov-spacer/gov-spacer.js +3 -2
  156. package/dist/collection/components/gov-spacer/gov-spacer.js.map +1 -1
  157. package/dist/collection/components/gov-statsbar/constants.js +1 -1
  158. package/dist/collection/components/gov-statsbar/constants.js.map +1 -1
  159. package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +3 -0
  160. package/dist/collection/components/gov-statsbar/gov-statsbar.css +3 -0
  161. package/dist/collection/components/gov-statsbar/gov-statsbar.js +2 -2
  162. package/dist/collection/components/gov-statsbar/gov-statsbar.js.map +1 -1
  163. package/dist/collection/components/gov-stepper/gov-stepper-item.css +3 -0
  164. package/dist/collection/components/gov-stepper/gov-stepper.css +3 -0
  165. package/dist/collection/components/gov-tabs/gov-tabs-item.css +3 -0
  166. package/dist/collection/components/gov-tabs/gov-tabs.css +3 -0
  167. package/dist/collection/components/gov-tabs/gov-tabs.js +1 -1
  168. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  169. package/dist/collection/components/gov-tile/gov-tile.css +4 -1
  170. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  171. package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
  172. package/dist/collection/components/gov-tiles/gov-tiles.css +6 -0
  173. package/dist/collection/components/gov-tiles/gov-tiles.js +19 -0
  174. package/dist/collection/components/gov-tiles/gov-tiles.js.map +1 -1
  175. package/dist/collection/components/gov-toast/gov-toast.css +3 -0
  176. package/dist/collection/components/gov-toast/gov-toast.js +1 -1
  177. package/dist/collection/components/gov-toast/gov-toast.js.map +1 -1
  178. package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +3 -0
  179. package/dist/collection/components/gov-tooltip/gov-tooltip.css +3 -0
  180. package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +3 -0
  181. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js +1 -1
  182. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js.map +1 -1
  183. package/dist/collection/components/gov-wizzard/gov-wizzard.css +3 -0
  184. package/dist/collection/pages/Accordion.js +97 -2
  185. package/dist/collection/pages/Accordion.js.map +1 -1
  186. package/dist/collection/pages/Badge.js +27 -0
  187. package/dist/collection/pages/Badge.js.map +1 -1
  188. package/dist/collection/pages/Button.js +440 -120
  189. package/dist/collection/pages/Button.js.map +1 -1
  190. package/dist/collection/pages/Error.js +1 -1
  191. package/dist/collection/pages/Error.js.map +1 -1
  192. package/dist/collection/pages/Forms.js +31 -23
  193. package/dist/collection/pages/Forms.js.map +1 -1
  194. package/dist/collection/pages/Pagination.js +12 -2
  195. package/dist/collection/pages/Pagination.js.map +1 -1
  196. package/dist/collection/pages/Stepper.js +6 -6
  197. package/dist/collection/pages/Stepper.js.map +1 -1
  198. package/dist/collection/pages/Tiles.js +39 -0
  199. package/dist/collection/pages/Tiles.js.map +1 -1
  200. package/dist/collection/pages/ToastMessage.js +1 -1
  201. package/dist/collection/pages/ToastMessage.js.map +1 -1
  202. package/dist/collection/pages/ToastMessageCountdown.js +1 -1
  203. package/dist/collection/pages/ToastMessageCountdown.js.map +1 -1
  204. package/dist/collection/pages/Wizzard.js +3 -3
  205. package/dist/collection/pages/Wizzard.js.map +1 -1
  206. package/dist/collection/utils/array.utils.js +2 -0
  207. package/dist/collection/utils/array.utils.js.map +1 -0
  208. package/dist/components/constants11.js +2 -2
  209. package/dist/components/constants11.js.map +1 -1
  210. package/dist/components/constants3.js +2 -1
  211. package/dist/components/constants3.js.map +1 -1
  212. package/dist/components/gov-accordion-item.js +2 -2
  213. package/dist/components/gov-accordion-item.js.map +1 -1
  214. package/dist/components/gov-accordion.js +3 -1
  215. package/dist/components/gov-accordion.js.map +1 -1
  216. package/dist/components/gov-alert.js +1 -1
  217. package/dist/components/gov-alert.js.map +1 -1
  218. package/dist/components/gov-app.js +658 -159
  219. package/dist/components/gov-app.js.map +1 -1
  220. package/dist/components/gov-attachments-item2.js +1 -1
  221. package/dist/components/gov-attachments-item2.js.map +1 -1
  222. package/dist/components/gov-backdrop2.js +5 -4
  223. package/dist/components/gov-backdrop2.js.map +1 -1
  224. package/dist/components/gov-badge2.js +16 -17
  225. package/dist/components/gov-badge2.js.map +1 -1
  226. package/dist/components/gov-breadcrumbs.js +1 -1
  227. package/dist/components/gov-breadcrumbs.js.map +1 -1
  228. package/dist/components/gov-button2.js +5 -5
  229. package/dist/components/gov-button2.js.map +1 -1
  230. package/dist/components/gov-card.js +1 -1
  231. package/dist/components/gov-card.js.map +1 -1
  232. package/dist/components/gov-form-checkbox.js +1 -1
  233. package/dist/components/gov-form-checkbox.js.map +1 -1
  234. package/dist/components/gov-form-file.js +1 -1
  235. package/dist/components/gov-form-file.js.map +1 -1
  236. package/dist/components/gov-form-input2.js +2 -2
  237. package/dist/components/gov-form-input2.js.map +1 -1
  238. package/dist/components/gov-form-multi-select.js +3 -3
  239. package/dist/components/gov-form-multi-select.js.map +1 -1
  240. package/dist/components/gov-form-password-power.d.ts +11 -0
  241. package/dist/components/gov-form-password-power.js +44 -0
  242. package/dist/components/gov-form-password-power.js.map +1 -0
  243. package/dist/components/gov-form-select2.js +3 -3
  244. package/dist/components/gov-form-select2.js.map +1 -1
  245. package/dist/components/gov-icon2.js +1 -1
  246. package/dist/components/gov-modal.js +20 -13
  247. package/dist/components/gov-modal.js.map +1 -1
  248. package/dist/components/gov-pagination.js +49 -14
  249. package/dist/components/gov-pagination.js.map +1 -1
  250. package/dist/components/gov-prompt.js +13 -6
  251. package/dist/components/gov-prompt.js.map +1 -1
  252. package/dist/components/gov-side-nav-item.js +1 -1
  253. package/dist/components/gov-side-nav-item.js.map +1 -1
  254. package/dist/components/gov-spacer.js +1 -1
  255. package/dist/components/gov-spacer.js.map +1 -1
  256. package/dist/components/gov-statsbar.js +2 -2
  257. package/dist/components/gov-statsbar.js.map +1 -1
  258. package/dist/components/gov-tabs.js +1 -1
  259. package/dist/components/gov-tabs.js.map +1 -1
  260. package/dist/components/gov-tile.js +2 -2
  261. package/dist/components/gov-tile.js.map +1 -1
  262. package/dist/components/gov-tiles.js +4 -2
  263. package/dist/components/gov-tiles.js.map +1 -1
  264. package/dist/components/gov-toast.js +1 -1
  265. package/dist/components/gov-toast.js.map +1 -1
  266. package/dist/components/gov-wizzard-item.js +1 -1
  267. package/dist/components/gov-wizzard-item.js.map +1 -1
  268. package/dist/components/index.d.ts +1 -0
  269. package/dist/components/index.js +1 -0
  270. package/dist/components/index.js.map +1 -1
  271. package/dist/core/core.esm.js +1 -1
  272. package/dist/core/core.esm.js.map +1 -1
  273. package/dist/core/{p-e7dd2002.entry.js → p-00e1e600.entry.js} +2 -2
  274. package/dist/core/p-00e1e600.entry.js.map +1 -0
  275. package/dist/core/p-0950ba85.entry.js +2 -0
  276. package/dist/core/p-0950ba85.entry.js.map +1 -0
  277. package/dist/core/{p-5fa41af9.js → p-1020a160.js} +1 -1
  278. package/dist/core/p-1020a160.js.map +1 -0
  279. package/dist/core/p-165fe5f4.entry.js +2 -0
  280. package/dist/core/{p-0a152bb7.entry.js.map → p-165fe5f4.entry.js.map} +1 -1
  281. package/dist/core/{p-9e6a41cc.entry.js → p-16608a87.entry.js} +2 -2
  282. package/dist/core/p-16608a87.entry.js.map +1 -0
  283. package/dist/core/{p-f5ee7634.entry.js → p-1bb5184f.entry.js} +2 -2
  284. package/dist/core/{p-f5ee7634.entry.js.map → p-1bb5184f.entry.js.map} +1 -1
  285. package/dist/core/p-1cc7b8d3.entry.js +2 -0
  286. package/dist/core/p-1cc7b8d3.entry.js.map +1 -0
  287. package/dist/core/{p-b48a3112.entry.js → p-4b375a4d.entry.js} +2 -2
  288. package/dist/core/{p-b48a3112.entry.js.map → p-4b375a4d.entry.js.map} +1 -1
  289. package/dist/core/{p-ad0cc981.entry.js → p-54f367db.entry.js} +2 -2
  290. package/dist/core/{p-ad0cc981.entry.js.map → p-54f367db.entry.js.map} +1 -1
  291. package/dist/core/p-5b4e3bdf.entry.js +2 -0
  292. package/dist/core/p-5b4e3bdf.entry.js.map +1 -0
  293. package/dist/core/p-613d8ed8.entry.js +2 -0
  294. package/dist/core/p-613d8ed8.entry.js.map +1 -0
  295. package/dist/core/{p-6d40721b.entry.js → p-63d2e8ec.entry.js} +2 -2
  296. package/dist/core/{p-6d40721b.entry.js.map → p-63d2e8ec.entry.js.map} +1 -1
  297. package/dist/core/{p-38fb2d42.entry.js → p-692eb701.entry.js} +2 -2
  298. package/dist/core/p-692eb701.entry.js.map +1 -0
  299. package/dist/core/{p-5cecdaaf.entry.js → p-72f16a95.entry.js} +2 -2
  300. package/dist/core/p-7ac5f119.entry.js +2 -0
  301. package/dist/core/{p-63079b80.entry.js.map → p-7ac5f119.entry.js.map} +1 -1
  302. package/dist/core/{p-03d40bf4.entry.js → p-833ab414.entry.js} +2 -2
  303. package/dist/core/{p-03d40bf4.entry.js.map → p-833ab414.entry.js.map} +1 -1
  304. package/dist/core/{p-34360f92.entry.js → p-84fda9dd.entry.js} +2 -2
  305. package/dist/core/{p-34360f92.entry.js.map → p-84fda9dd.entry.js.map} +1 -1
  306. package/dist/core/p-86a3c0d5.entry.js +2 -0
  307. package/dist/core/p-86a3c0d5.entry.js.map +1 -0
  308. package/dist/core/p-8dacc8dc.entry.js +2 -0
  309. package/dist/core/p-8dacc8dc.entry.js.map +1 -0
  310. package/dist/core/p-99155ec0.entry.js +2 -0
  311. package/dist/core/p-99155ec0.entry.js.map +1 -0
  312. package/dist/core/{p-7591ecd4.entry.js → p-9ca0a11c.entry.js} +2 -2
  313. package/dist/core/{p-7591ecd4.entry.js.map → p-9ca0a11c.entry.js.map} +1 -1
  314. package/dist/core/p-a0c491a6.entry.js +2 -0
  315. package/dist/core/p-a0c491a6.entry.js.map +1 -0
  316. package/dist/core/p-a0dd0a95.entry.js +2 -0
  317. package/dist/core/{p-e52a042f.entry.js.map → p-a0dd0a95.entry.js.map} +1 -1
  318. package/dist/core/p-b966062a.entry.js +2 -0
  319. package/dist/core/p-b966062a.entry.js.map +1 -0
  320. package/dist/core/{p-fc1581f9.entry.js → p-bd560ffc.entry.js} +2 -2
  321. package/dist/core/{p-fc1581f9.entry.js.map → p-bd560ffc.entry.js.map} +1 -1
  322. package/dist/core/p-c9948e57.entry.js +2 -0
  323. package/dist/core/p-c9948e57.entry.js.map +1 -0
  324. package/dist/core/p-cd869237.js +2 -0
  325. package/dist/core/p-cd869237.js.map +1 -0
  326. package/dist/core/{p-93facb4a.entry.js → p-da2b921e.entry.js} +2 -2
  327. package/dist/core/p-da2b921e.entry.js.map +1 -0
  328. package/dist/core/{p-9cc6ed83.entry.js → p-e57d250f.entry.js} +2 -2
  329. package/dist/core/p-e57d250f.entry.js.map +1 -0
  330. package/dist/core/{p-f5ffcb3d.entry.js → p-e9c94ef7.entry.js} +2 -2
  331. package/dist/core/p-fac1c202.entry.js +2 -0
  332. package/dist/core/p-fac1c202.entry.js.map +1 -0
  333. package/dist/custom-elements/index.d.ts +6 -0
  334. package/dist/custom-elements/index.js +1 -1
  335. package/dist/custom-elements/index.js.map +1 -1
  336. package/dist/esm/{constants-d550c816.js → constants-037c35bc.js} +3 -3
  337. package/dist/esm/constants-037c35bc.js.map +1 -0
  338. package/dist/esm/{constants-1a2146b2.js → constants-45f6db4c.js} +3 -2
  339. package/dist/esm/constants-45f6db4c.js.map +1 -0
  340. package/dist/esm/core.js +1 -1
  341. package/dist/esm/gov-accordion-item.entry.js +2 -2
  342. package/dist/esm/gov-accordion-item.entry.js.map +1 -1
  343. package/dist/esm/gov-accordion.entry.js +2 -1
  344. package/dist/esm/gov-accordion.entry.js.map +1 -1
  345. package/dist/esm/gov-alert.entry.js +1 -1
  346. package/dist/esm/gov-alert.entry.js.map +1 -1
  347. package/dist/esm/gov-app.entry.js +658 -159
  348. package/dist/esm/gov-app.entry.js.map +1 -1
  349. package/dist/esm/gov-attachments_3.entry.js +1 -1
  350. package/dist/esm/gov-attachments_3.entry.js.map +1 -1
  351. package/dist/esm/gov-backdrop.entry.js +5 -4
  352. package/dist/esm/gov-backdrop.entry.js.map +1 -1
  353. package/dist/esm/gov-badge.entry.js +17 -17
  354. package/dist/esm/gov-badge.entry.js.map +1 -1
  355. package/dist/esm/gov-breadcrumbs.entry.js +1 -1
  356. package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
  357. package/dist/esm/gov-button.entry.js +2 -2
  358. package/dist/esm/gov-button.entry.js.map +1 -1
  359. package/dist/esm/gov-card.entry.js +1 -1
  360. package/dist/esm/gov-card.entry.js.map +1 -1
  361. package/dist/esm/gov-form-checkbox.entry.js +1 -1
  362. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  363. package/dist/esm/gov-form-file.entry.js +1 -1
  364. package/dist/esm/gov-form-file.entry.js.map +1 -1
  365. package/dist/esm/gov-form-input.entry.js +2 -2
  366. package/dist/esm/gov-form-input.entry.js.map +1 -1
  367. package/dist/esm/gov-form-multi-select.entry.js +3 -3
  368. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  369. package/dist/esm/gov-form-password-power.entry.js +24 -0
  370. package/dist/esm/gov-form-password-power.entry.js.map +1 -0
  371. package/dist/esm/gov-form-select.entry.js +3 -3
  372. package/dist/esm/gov-form-select.entry.js.map +1 -1
  373. package/dist/esm/gov-icon.entry.js +1 -1
  374. package/dist/esm/gov-modal.entry.js +19 -13
  375. package/dist/esm/gov-modal.entry.js.map +1 -1
  376. package/dist/esm/gov-pagination.entry.js +49 -14
  377. package/dist/esm/gov-pagination.entry.js.map +1 -1
  378. package/dist/esm/gov-prompt.entry.js +12 -6
  379. package/dist/esm/gov-prompt.entry.js.map +1 -1
  380. package/dist/esm/gov-side-nav-item.entry.js +1 -1
  381. package/dist/esm/gov-side-nav-item.entry.js.map +1 -1
  382. package/dist/esm/gov-spacer.entry.js +1 -1
  383. package/dist/esm/gov-spacer.entry.js.map +1 -1
  384. package/dist/esm/gov-statsbar-item.entry.js +1 -1
  385. package/dist/esm/gov-statsbar.entry.js +2 -2
  386. package/dist/esm/gov-statsbar.entry.js.map +1 -1
  387. package/dist/esm/gov-tabs.entry.js +1 -1
  388. package/dist/esm/gov-tabs.entry.js.map +1 -1
  389. package/dist/esm/gov-tile.entry.js +2 -2
  390. package/dist/esm/gov-tile.entry.js.map +1 -1
  391. package/dist/esm/gov-tiles.entry.js +2 -1
  392. package/dist/esm/gov-tiles.entry.js.map +1 -1
  393. package/dist/esm/gov-toast.entry.js +1 -1
  394. package/dist/esm/gov-toast.entry.js.map +1 -1
  395. package/dist/esm/gov-wizzard-item.entry.js +1 -1
  396. package/dist/esm/gov-wizzard-item.entry.js.map +1 -1
  397. package/dist/esm/index-00e9a0d5.js +4 -0
  398. package/dist/esm/loader.js +1 -1
  399. package/dist/hydrate/index.js +830 -247
  400. package/dist/types/components/gov-accordion/gov-accordion.d.ts +4 -0
  401. package/dist/types/components/gov-badge/constants.d.ts +4 -2
  402. package/dist/types/components/gov-badge/gov-badge.d.ts +4 -9
  403. package/dist/types/components/gov-button/constants.d.ts +3 -2
  404. package/dist/types/components/gov-form/password-power/constants.d.ts +5 -0
  405. package/dist/types/components/gov-form/password-power/gov-form-password-power.d.ts +7 -0
  406. package/dist/types/components/gov-modal/gov-modal.d.ts +3 -1
  407. package/dist/types/components/gov-pagination/gov-pagination.d.ts +7 -3
  408. package/dist/types/components/gov-promp/gov-prompt.d.ts +3 -1
  409. package/dist/types/components/gov-statsbar/constants.d.ts +2 -2
  410. package/dist/types/components/gov-tiles/gov-tiles.d.ts +4 -0
  411. package/dist/types/components.d.ts +39 -10
  412. package/dist/types/utils/array.utils.d.ts +1 -0
  413. package/package.json +1 -1
  414. package/dist/cjs/constants-5f6bbc50.js.map +0 -1
  415. package/dist/cjs/constants-dc2ba6bd.js.map +0 -1
  416. package/dist/core/p-00182e76.entry.js +0 -2
  417. package/dist/core/p-00182e76.entry.js.map +0 -1
  418. package/dist/core/p-0278fcb3.entry.js +0 -2
  419. package/dist/core/p-0278fcb3.entry.js.map +0 -1
  420. package/dist/core/p-08f14c8b.entry.js +0 -2
  421. package/dist/core/p-08f14c8b.entry.js.map +0 -1
  422. package/dist/core/p-0a152bb7.entry.js +0 -2
  423. package/dist/core/p-14f8f2fb.js +0 -2
  424. package/dist/core/p-14f8f2fb.js.map +0 -1
  425. package/dist/core/p-2128abe1.entry.js +0 -2
  426. package/dist/core/p-2128abe1.entry.js.map +0 -1
  427. package/dist/core/p-2419f4cd.entry.js +0 -2
  428. package/dist/core/p-2419f4cd.entry.js.map +0 -1
  429. package/dist/core/p-38fb2d42.entry.js.map +0 -1
  430. package/dist/core/p-4681cb3a.entry.js +0 -2
  431. package/dist/core/p-4681cb3a.entry.js.map +0 -1
  432. package/dist/core/p-469273be.entry.js +0 -2
  433. package/dist/core/p-469273be.entry.js.map +0 -1
  434. package/dist/core/p-5547dbb0.entry.js +0 -2
  435. package/dist/core/p-5547dbb0.entry.js.map +0 -1
  436. package/dist/core/p-5fa41af9.js.map +0 -1
  437. package/dist/core/p-63079b80.entry.js +0 -2
  438. package/dist/core/p-93facb4a.entry.js.map +0 -1
  439. package/dist/core/p-9cc6ed83.entry.js.map +0 -1
  440. package/dist/core/p-9e6a41cc.entry.js.map +0 -1
  441. package/dist/core/p-e52a042f.entry.js +0 -2
  442. package/dist/core/p-e7dd2002.entry.js.map +0 -1
  443. package/dist/core/p-f2dc8ce3.entry.js +0 -2
  444. package/dist/core/p-f2dc8ce3.entry.js.map +0 -1
  445. package/dist/core/p-fc91591d.entry.js +0 -2
  446. package/dist/core/p-fc91591d.entry.js.map +0 -1
  447. package/dist/esm/constants-1a2146b2.js.map +0 -1
  448. package/dist/esm/constants-d550c816.js.map +0 -1
  449. /package/dist/core/{p-5cecdaaf.entry.js.map → p-72f16a95.entry.js.map} +0 -0
  450. /package/dist/core/{p-f5ffcb3d.entry.js.map → p-e9c94ef7.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"gov-side-nav-item.js","sourceRoot":"","sources":["../../../../../../src/components/gov-side-nav/gov-side-nav-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAA;AAC5G,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAE1E,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAOpD,MAAM,OAAO,cAAc;EAG1B;;mBAUoC,KAAK;mBAIL,KAAK;;iBAQP,KAAK;;oBASF,KAAK;;sBASyB,KAAK;IAvCvE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EA6CD,aAAa,CAAC,QAAgB;IAC7B,IAAI,CAAC,QAAQ,EAAE;MACd,WAAW,CAAC,IAAI,gBAAgB,CAAC,IAAI,iCAAiC,CAAC,CAAA;KACvE;EACF,CAAC;EAEO,WAAW;IAClB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;EACxE,CAAC;EAED,iBAAiB;IAChB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,UAAU,CAAA;IACtC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Prop, State, Watch, Host, Method, Event, EventEmitter } from '@stencil/core'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { SideNavItemClass } from './constants'\nimport { booleanString, prepareClasses } from '../../helpers/Dom/template'\nimport { GovSideNavItemChangeEvent } from './gov-side-nav-item.d'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-side-nav-item',\n\tstyleUrl: 'gov-side-nav-item.scss',\n})\nexport class GovSideNavItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovSideNavItemElement\n\t@State() isExpandedState: boolean\n\n\t/**\n\t * Determide if component should have inversed colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Determide if component should have compact styles.\n\t */\n\t@Prop() readonly compact: boolean = false\n\t/**\n\t * Custom sidenav item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defined the count of nested items\n\t */\n\t@Prop() readonly count: boolean = false\n\t/**\n\t * Item name of the sidenav\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\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\t/**\n\t * Defines whether the sidenav is open or closed by default\n\t */\n\t@Prop({ attribute: 'is-expanded' }) readonly isExpanded: boolean = false\n\t/**\n\t * Called when the sidenav state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovSideNavItemChangeEvent>\n\n\t@Watch('label')\n\tvalidateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${SideNavItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ open: this.isExpandedState, element: this.host })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.isExpandedState = this.isExpanded\n\t\tthis.validateLabel(this.label)\n\t}\n\n\tget classNames(): string {\n\t\tconst { h } = this\n\n\t\treturn prepareClasses([SideNavItemClass.root, h.hasSlot('icon') && SideNavItemClass.rootWithIcon])\n\t}\n\n\trender() {\n\t\tconst { isExpandedState, label } = this\n\t\t// TODO: správný počet zanořených childů\n\t\tconst hasChilds = this.host.children.length > 1\n\n\t\treturn (\n\t\t\t<Host class={this.classNames} role=\"listitem\" inverse={this.inverse} aria-expanded={booleanString(isExpandedState)}>\n\t\t\t\t{this.href ? (\n\t\t\t\t\t<div class={SideNavItemClass.header}>\n\t\t\t\t\t\t<a class={SideNavItemClass.name} href={this.href}>\n\t\t\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t\t\t<span class={SideNavItemClass.icon}>\n\t\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<span class={SideNavItemClass.label}>{label}</span>\n\n\t\t\t\t\t\t\t{this.count && (\n\t\t\t\t\t\t\t\t<span class={SideNavItemClass.badge}>\n\t\t\t\t\t\t\t\t\t<gov-badge variant=\"secondary\" size=\"s\" inverse={this.inverse}>\n\t\t\t\t\t\t\t\t\t\t{/* // TODO: správný počet zanořených childů */}3\n\t\t\t\t\t\t\t\t\t</gov-badge>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t{hasChilds && (\n\t\t\t\t\t\t\t<button type=\"button\" class={SideNavItemClass.arrow} onClick={() => this.toggle()}>\n\t\t\t\t\t\t\t\t<gov-icon name=\"arrow-down\"></gov-icon>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={SideNavItemClass.header}>\n\t\t\t\t\t\t<button class={SideNavItemClass.name} type=\"button\" onClick={() => this.toggle()}>\n\t\t\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t\t\t<span class={SideNavItemClass.icon}>\n\t\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<span class={SideNavItemClass.label}>{label}</span>\n\n\t\t\t\t\t\t\t{hasChilds && (\n\t\t\t\t\t\t\t\t<span class={SideNavItemClass.arrow}>\n\t\t\t\t\t\t\t\t\t<gov-icon name=\"arrow-down\"></gov-icon>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{hasChilds && (\n\t\t\t\t\t<div class={SideNavItemClass.content}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Opening the sidenav\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpandedState = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the sidenav\n\t */\n\t@Method()\n\tasync close(): Promise<void> {\n\t\tthis.isExpandedState = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * sidenav switch\n\t */\n\t@Method()\n\tasync toggle(): Promise<void> {\n\t\tthis.isExpandedState = !this.isExpandedState\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync currentState(): Promise<boolean> {\n\t\treturn this.isExpandedState\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-side-nav-item.js","sourceRoot":"","sources":["../../../../../../src/components/gov-side-nav/gov-side-nav-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAA;AAC5G,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAE1E,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAOpD,MAAM,OAAO,cAAc;EAG1B;;mBAUoC,KAAK;mBAIL,KAAK;;iBAQP,KAAK;;oBASF,KAAK;;sBASyB,KAAK;IAvCvE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EA6CD,aAAa,CAAC,QAAgB;IAC7B,IAAI,CAAC,QAAQ,EAAE;MACd,WAAW,CAAC,IAAI,gBAAgB,CAAC,IAAI,iCAAiC,CAAC,CAAA;KACvE;EACF,CAAC;EAEO,WAAW;IAClB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;EACxE,CAAC;EAED,iBAAiB;IAChB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,UAAU,CAAA;IACtC,IAAI,CAAC,aAAa,CAAC,I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,CAAA;EAC5B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Prop, State, Watch, Host, Method, Event, EventEmitter } from '@stencil/core'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { SideNavItemClass } from './constants'\nimport { booleanString, prepareClasses } from '../../helpers/Dom/template'\nimport { GovSideNavItemChangeEvent } from './gov-side-nav-item.d'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-side-nav-item',\n\tstyleUrl: 'gov-side-nav-item.scss',\n})\nexport class GovSideNavItem {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovSideNavItemElement\n\t@State() isExpandedState: boolean\n\n\t/**\n\t * Determide if component should have inversed colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Determide if component should have compact styles.\n\t */\n\t@Prop() readonly compact: boolean = false\n\t/**\n\t * Custom sidenav item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defined the count of nested items\n\t */\n\t@Prop() readonly count: boolean = false\n\t/**\n\t * Item name of the sidenav\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\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\t/**\n\t * Defines whether the sidenav is open or closed by default\n\t */\n\t@Prop({ attribute: 'is-expanded' }) readonly isExpanded: boolean = false\n\t/**\n\t * Called when the sidenav state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovSideNavItemChangeEvent>\n\n\t@Watch('label')\n\tvalidateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${SideNavItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ open: this.isExpandedState, element: this.host })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.isExpandedState = this.isExpanded\n\t\tthis.validateLabel(this.label)\n\t}\n\n\tget classNames(): string {\n\t\tconst { h } = this\n\n\t\treturn prepareClasses([SideNavItemClass.root, h.hasSlot('icon') && SideNavItemClass.rootWithIcon])\n\t}\n\n\trender() {\n\t\tconst { isExpandedState, label } = this\n\t\t// TODO: správný počet zanořených childů\n\t\tconst hasChilds = this.host.children.length > 1\n\n\t\treturn (\n\t\t\t<Host class={this.classNames} role=\"listitem\" inverse={this.inverse} aria-expanded={booleanString(isExpandedState)}>\n\t\t\t\t{this.href ? (\n\t\t\t\t\t<div class={SideNavItemClass.header}>\n\t\t\t\t\t\t<a class={SideNavItemClass.name} href={this.href}>\n\t\t\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t\t\t<span class={SideNavItemClass.icon}>\n\t\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<span class={SideNavItemClass.label}>{label}</span>\n\n\t\t\t\t\t\t\t{this.count && (\n\t\t\t\t\t\t\t\t<span class={SideNavItemClass.badge}>\n\t\t\t\t\t\t\t\t\t<gov-badge variant=\"secondary\" size=\"s\" inverse={this.inverse}>\n\t\t\t\t\t\t\t\t\t\t{/* // TODO: správný počet zanořených childů */}3\n\t\t\t\t\t\t\t\t\t</gov-badge>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t{hasChilds && (\n\t\t\t\t\t\t\t<button type=\"button\" class={SideNavItemClass.arrow} onClick={() => this.toggle()}>\n\t\t\t\t\t\t\t\t<gov-icon name=\"chevron-down\"></gov-icon>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={SideNavItemClass.header}>\n\t\t\t\t\t\t<button class={SideNavItemClass.name} type=\"button\" onClick={() => this.toggle()}>\n\t\t\t\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t\t\t\t<span class={SideNavItemClass.icon}>\n\t\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<span class={SideNavItemClass.label}>{label}</span>\n\n\t\t\t\t\t\t\t{hasChilds && (\n\t\t\t\t\t\t\t\t<span class={SideNavItemClass.arrow}>\n\t\t\t\t\t\t\t\t\t<gov-icon name=\"chevron-down\"></gov-icon>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{hasChilds && (\n\t\t\t\t\t<div class={SideNavItemClass.content}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Opening the sidenav\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpandedState = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the sidenav\n\t */\n\t@Method()\n\tasync close(): Promise<void> {\n\t\tthis.isExpandedState = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * sidenav switch\n\t */\n\t@Method()\n\tasync toggle(): Promise<void> {\n\t\tthis.isExpandedState = !this.isExpandedState\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync currentState(): Promise<boolean> {\n\t\treturn this.isExpandedState\n\t}\n}\n"]}
@@ -148,6 +148,9 @@
148
148
  /*
149
149
  - Variables - Form multiselect
150
150
  */
151
+ /*
152
+ - Variables - Form password power
153
+ */
151
154
  /*
152
155
  - Variables - Form checkbox & radio
153
156
  */
@@ -148,6 +148,9 @@
148
148
  /*
149
149
  - Variables - Form multiselect
150
150
  */
151
+ /*
152
+ - Variables - Form password power
153
+ */
151
154
  /*
152
155
  - Variables - Form checkbox & radio
153
156
  */
@@ -5,7 +5,7 @@ import { govHost } from '../../helpers/Dom/template';
5
5
  export class GovSpacer {
6
6
  constructor() {
7
7
  this.size = undefined;
8
- this.breakpoint = undefined;
8
+ this.breakpoint = SpacerBreakpoints.NONE;
9
9
  this.h = govHost(this.host);
10
10
  }
11
11
  validateSize(newValue) {
@@ -76,7 +76,8 @@ export class GovSpacer {
76
76
  "text": "Breakpoint"
77
77
  },
78
78
  "attribute": "breakpoint",
79
- "reflect": false
79
+ "reflect": false,
80
+ "defaultValue": "SpacerBreakpoints.NONE"
80
81
  }
81
82
  };
82
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"gov-spacer.js","sourceRoot":"","sources":["../../../../../../src/components/gov-spacer/gov-spacer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAyB,WAAW,EAAE,UAAU,EAAkB,MAAM,aAAa,CAAA;AAE/G,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAMpD,MAAM,OAAO,SAAS;EAErB;;;IACC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAYD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAAC,UAAU,EAAE,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;EACrD,CAAC;EAGD,kBAAkB,CAAC,QAAgB;IAClC,YAAY,CAAC,iBAAiB,EAAE,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;EAC5D,CAAC;EAED,iBAAiB;IAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC5B,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;EACzC,CAAC;EAED,MAAM;IACL,OAAO,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,GAAS,CAAA;EAC5G,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { SpacerBreakpoints, SpacerBreakpointsType, SpacerClass, SpacerSize, SpacerSizeType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-spacer',\n\tstyleUrl: 'gov-spacer.scss',\n})\nexport class GovSpacer {\n\tprivate h: GovHost\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t@Element() host: HTMLGovSpacerElement\n\t/**\n\t * Spacer’s size\n\t */\n\t@Prop() readonly size?: SpacerSizeType\n\t/**\n\t * Breakpoint\n\t */\n\t@Prop() readonly breakpoint?: SpacerBreakpointsType\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SpacerSize, newValue, SpacerClass.root)\n\t}\n\n\t@Watch('breakpoint')\n\tvalidateBreakpoint(newValue: string): void {\n\t\tvalidateProp(SpacerBreakpoints, newValue, SpacerClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateBreakpoint(this.breakpoint)\n\t}\n\n\trender() {\n\t\treturn <Host class={this.h.classes(SpacerClass.root)} size={this.size} breakpoint={this.breakpoint}></Host>\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-spacer.js","sourceRoot":"","sources":["../../../../../../src/components/gov-spacer/gov-spacer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAyB,WAAW,EAAE,UAAU,EAAkB,MAAM,aAAa,CAAA;AAE/G,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAMpD,MAAM,OAAO,SAAS;EAErB;;sBAWsD,iBAAiB,CAAC,IAAI;IAV3E,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAYD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAAC,UAAU,EAAE,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;EACrD,CAAC;EAGD,kBAAkB,CAAC,QAAgB;IAClC,YAAY,CAAC,iBAAiB,EAAE,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;EAC5D,CAAC;EAED,iBAAiB;IAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC5B,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;EACzC,CAAC;EAED,MAAM;IACL,OAAO,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,GAAS,CAAA;EAC5G,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { SpacerBreakpoints, SpacerBreakpointsType, SpacerClass, SpacerSize, SpacerSizeType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-spacer',\n\tstyleUrl: 'gov-spacer.scss',\n})\nexport class GovSpacer {\n\tprivate h: GovHost\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t@Element() host: HTMLGovSpacerElement\n\t/**\n\t * Spacer’s size\n\t */\n\t@Prop() readonly size?: SpacerSizeType\n\t/**\n\t * Breakpoint\n\t */\n\t@Prop() readonly breakpoint?: SpacerBreakpointsType = SpacerBreakpoints.NONE\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SpacerSize, newValue, SpacerClass.root)\n\t}\n\n\t@Watch('breakpoint')\n\tvalidateBreakpoint(newValue: string): void {\n\t\tvalidateProp(SpacerBreakpoints, newValue, SpacerClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateBreakpoint(this.breakpoint)\n\t}\n\n\trender() {\n\t\treturn <Host class={this.h.classes(SpacerClass.root)} size={this.size} breakpoint={this.breakpoint}></Host>\n\t}\n}\n"]}
@@ -4,7 +4,7 @@ export var StatsBarIconPosition;
4
4
  (function (StatsBarIconPosition) {
5
5
  StatsBarIconPosition["LEFT"] = "left";
6
6
  })(StatsBarIconPosition || (StatsBarIconPosition = {}));
7
- export const StatsBarVariant = pick(Variants, ['PRIMARY', 'SECONDARY']);
7
+ export const StatsBarVariants = pick(Variants, ['PRIMARY', 'SECONDARY']);
8
8
  export const StatsBarClass = {
9
9
  root: 'gov-statsbar',
10
10
  section: 'gov-statsbar__section',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../src/components/gov-statsbar/constants.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAExD,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;EAC/B,qCAAa,CAAA;AACd,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B;AAGD,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAA;AAGvE,MAAM,CAAC,MAAM,aAAa,GAAG;EAC5B,IAAI,EAAE,cAAc;EACpB,OAAO,EAAE,uBAAuB;CAChC,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG;EAChC,IAAI,EAAE,mBAAmB;EACzB,IAAI,EAAE,yBAAyB;EAC/B,MAAM,EAAE,2BAA2B;EACnC,IAAI,EAAE,yBAAyB;CAC/B,CAAA","sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\nimport { Variants } from '../../core/constants/variants'\n\nexport enum StatsBarIconPosition {\n\tLEFT = 'left',\n}\nexport type StatsBarIconPositionType = `${ValueOf<typeof StatsBarIconPosition>}`\n\nexport const StatsBarVariant = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type StatsBarVariantType = `${ValueOf<typeof StatsBarVariant>}`\n\nexport const StatsBarClass = {\n\troot: 'gov-statsbar',\n\tsection: 'gov-statsbar__section',\n}\n\nexport const StatsBarItemClass = {\n\troot: 'gov-statsbar-item',\n\ticon: 'gov-statsbar-item__icon',\n\tnumber: 'gov-statsbar-item__number',\n\ttext: 'gov-statsbar-item__text',\n}\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../src/components/gov-statsbar/constants.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAExD,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;EAC/B,qCAAa,CAAA;AACd,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B;AAGD,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAA;AAGxE,MAAM,CAAC,MAAM,aAAa,GAAG;EAC5B,IAAI,EAAE,cAAc;EACpB,OAAO,EAAE,uBAAuB;CAChC,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG;EAChC,IAAI,EAAE,mBAAmB;EACzB,IAAI,EAAE,yBAAyB;EAC/B,MAAM,EAAE,2BAA2B;EACnC,IAAI,EAAE,yBAAyB;CAC/B,CAAA","sourcesContent":["import { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\nimport { Variants } from '../../core/constants/variants'\n\nexport enum StatsBarIconPosition {\n\tLEFT = 'left',\n}\nexport type StatsBarIconPositionType = `${ValueOf<typeof StatsBarIconPosition>}`\n\nexport const StatsBarVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type StatsBarVariantType = `${ValueOf<typeof StatsBarVariants>}`\n\nexport const StatsBarClass = {\n\troot: 'gov-statsbar',\n\tsection: 'gov-statsbar__section',\n}\n\nexport const StatsBarItemClass = {\n\troot: 'gov-statsbar-item',\n\ticon: 'gov-statsbar-item__icon',\n\tnumber: 'gov-statsbar-item__number',\n\ttext: 'gov-statsbar-item__text',\n}\n"]}
@@ -148,6 +148,9 @@
148
148
  /*
149
149
  - Variables - Form multiselect
150
150
  */
151
+ /*
152
+ - Variables - Form password power
153
+ */
151
154
  /*
152
155
  - Variables - Form checkbox & radio
153
156
  */
@@ -148,6 +148,9 @@
148
148
  /*
149
149
  - Variables - Form multiselect
150
150
  */
151
+ /*
152
+ - Variables - Form password power
153
+ */
151
154
  /*
152
155
  - Variables - Form checkbox & radio
153
156
  */
@@ -1,6 +1,6 @@
1
1
  import { h, Host } from '@stencil/core';
2
2
  import { validateProp } from '../../helpers/Validate/props';
3
- import { StatsBarClass, StatsBarVariant, StatsBarItemClass, StatsBarIconPosition } from './constants';
3
+ import { StatsBarClass, StatsBarVariants, StatsBarItemClass, StatsBarIconPosition } from './constants';
4
4
  import { govHost } from '../../helpers/Dom/template';
5
5
  export class GovStatsbar {
6
6
  constructor() {
@@ -12,7 +12,7 @@ export class GovStatsbar {
12
12
  validateProp(StatsBarIconPosition, newValue, StatsBarClass.root);
13
13
  }
14
14
  validateVariant(newValue) {
15
- validateProp(StatsBarVariant, newValue, StatsBarClass.root);
15
+ validateProp(StatsBarVariants, newValue, StatsBarClass.root);
16
16
  }
17
17
  componentWillLoad() {
18
18
  this.validateIconPosition(this.iconPosition);
@@ -1 +1 @@
1
- {"version":3,"file":"gov-statsbar.js","sourceRoot":"","sources":["../../../../../../src/components/gov-statsbar/gov-statsbar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,eAAe,EAAuB,iBAAiB,EAAE,oBAAoB,EAA4B,MAAM,aAAa,CAAA;AAEpJ,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAMpD,MAAM,OAAO,WAAW;EAGvB;;mBAayE,SAAS;IAZjF,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAcD,oBAAoB,CAAC,QAAgB;IACpC,YAAY,CAAC,oBAAoB,EAAE,QAAQ,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;EACjE,CAAC;EAGD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,eAAe,EAAE,QAAQ,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;EAC5D,CAAC;EAED,iBAAiB;IAChB,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IAC5C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;EACnC,CAAC;EAED,gBAAgB;IACf,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE;MACxE,IAAI,IAAI,CAAC,YAAY,KAAK,MAAM,EAAE;QACjC,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAA;OAC1C;IACF,CAAC,CAAC,CAAA;EACH,CAAC;EAED,MAAM;IACL,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO;MACrE,eAAS,KAAK,EAAE,aAAa,CAAC,OAAO;QACpC,eAAQ,CACC,CACJ,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { StatsBarClass, StatsBarVariant, StatsBarVariantType, StatsBarItemClass, StatsBarIconPosition, StatsBarIconPositionType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-statsbar',\n\tstyleUrl: 'gov-statsbar.scss',\n})\nexport class GovStatsbar {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovStatsbarElement\n\n\t/**\n\t * Icon’s position\n\t */\n\t@Prop() readonly iconPosition?: StatsBarIconPositionType\n\t/**\n\t * Style variation\n\t */\n\t@Prop({ attribute: 'variant' }) readonly variant?: StatsBarVariantType = 'primary'\n\n\t@Watch('iconPosition')\n\tvalidateIconPosition(newValue: string): void {\n\t\tvalidateProp(StatsBarIconPosition, newValue, StatsBarClass.root)\n\t}\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(StatsBarVariant, newValue, StatsBarClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateIconPosition(this.iconPosition)\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(StatsBarItemClass.root).forEach((node: any) => {\n\t\t\tif (this.iconPosition === 'left') {\n\t\t\t\tnode.setAttribute('icon-position', 'left')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(StatsBarClass.root)} variant={this.variant}>\n\t\t\t\t<section class={StatsBarClass.section}>\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"]}
1
+ {"version":3,"file":"gov-statsbar.js","sourceRoot":"","sources":["../../../../../../src/components/gov-statsbar/gov-statsbar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { StatsBarClass, StatsBarVariants, StatsBarVariantType, StatsBarItemClass, StatsBarIconPosition, StatsBarIconPositionType } from './constants'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { govHost } from '../../helpers/Dom/template'\n\n@Component({\n\ttag: 'gov-statsbar',\n\tstyleUrl: 'gov-statsbar.scss',\n})\nexport class GovStatsbar {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovStatsbarElement\n\n\t/**\n\t * Icon’s position\n\t */\n\t@Prop() readonly iconPosition?: StatsBarIconPositionType\n\t/**\n\t * Style variation\n\t */\n\t@Prop({ attribute: 'variant' }) readonly variant?: StatsBarVariantType = 'primary'\n\n\t@Watch('iconPosition')\n\tvalidateIconPosition(newValue: string): void {\n\t\tvalidateProp(StatsBarIconPosition, newValue, StatsBarClass.root)\n\t}\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(StatsBarVariants, newValue, StatsBarClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateIconPosition(this.iconPosition)\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(StatsBarItemClass.root).forEach((node: any) => {\n\t\t\tif (this.iconPosition === 'left') {\n\t\t\t\tnode.setAttribute('icon-position', 'left')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(StatsBarClass.root)} variant={this.variant}>\n\t\t\t\t<section class={StatsBarClass.section}>\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"]}
@@ -148,6 +148,9 @@
148
148
  /*
149
149
  - Variables - Form multiselect
150
150
  */
151
+ /*
152
+ - Variables - Form password power
153
+ */
151
154
  /*
152
155
  - Variables - Form checkbox & radio
153
156
  */
@@ -148,6 +148,9 @@
148
148
  /*
149
149
  - Variables - Form multiselect
150
150
  */
151
+ /*
152
+ - Variables - Form password power
153
+ */
151
154
  /*
152
155
  - Variables - Form checkbox & radio
153
156
  */
@@ -148,6 +148,9 @@
148
148
  /*
149
149
  - Variables - Form multiselect
150
150
  */
151
+ /*
152
+ - Variables - Form password power
153
+ */
151
154
  /*
152
155
  - Variables - Form checkbox & radio
153
156
  */
@@ -162,6 +162,9 @@
162
162
  /*
163
163
  - Variables - Form multiselect
164
164
  */
165
+ /*
166
+ - Variables - Form password power
167
+ */
165
168
  /*
166
169
  - Variables - Form checkbox & radio
167
170
  */
@@ -92,7 +92,7 @@ export class GovTabs {
92
92
  resizeObserver.observe(this.tabsRef);
93
93
  }
94
94
  render() {
95
- return (h(Host, { class: this.h.classes(TabsClass.root), variant: this.variant, type: this.type, role: "tablist", ref: el => (this.tabsRef = el), "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy, onKeyDown: this.onKeydownHandler.bind(this) }, h("div", { class: TabsClass.tabs, "aria-hidden": toBoolAttr(this.compactControls) }, h("ul", { class: TabsClass.list }, this.controller.map((control, index) => (h("li", { class: TabsClass.item }, this.type == 'text' ? (h("button", { class: TabsClass.btn, id: control.triggerIdentifier, role: "tab", onClick: () => this.onSelectHandler(control, index), "aria-selected": toBoolAttr(control.active), "aria-controls": control.contentIdentifier, tabindex: control.active ? -1 : 0, ref: el => (this.triggerRefs[control.triggerIdentifier] = el) }, control.label)) : (h("gov-badge", { variant: this.variant, type: toBoolAttr(control.active) == 'true' ? 'solid' : 'outlined', nativeType: toBoolAttr(control.active) == 'true' ? 'span' : 'button', "on-gov-click": () => this.onSelectHandler(control, index) }, control.label))))))), h("span", { id: this.formSelectId, hidden: true }, this.wcagSelectLabel), this.compactControls ? (h("gov-form-select", { "wcag-labelled-by": this.formSelectId, "onGov-change": this.onChangeHandler.bind(this) }, this.controller.map(control => (h("option", { value: control.triggerIdentifier, selected: control.active }, control.label))))) : null, h("slot", null)));
95
+ return (h(Host, { class: this.h.classes(TabsClass.root), variant: this.variant, type: this.type, role: "tablist", ref: el => (this.tabsRef = el), "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy, onKeyDown: this.onKeydownHandler.bind(this) }, h("div", { class: TabsClass.tabs, "aria-hidden": toBoolAttr(this.compactControls) }, h("ul", { class: TabsClass.list }, this.controller.map((control, index) => (h("li", { class: TabsClass.item }, this.type == 'text' ? (h("button", { class: TabsClass.btn, id: control.triggerIdentifier, role: "tab", onClick: () => this.onSelectHandler(control, index), "aria-selected": toBoolAttr(control.active), "aria-controls": control.contentIdentifier, tabindex: control.active ? -1 : 0, ref: el => (this.triggerRefs[control.triggerIdentifier] = el) }, control.label)) : (h("gov-badge", { variant: this.variant, type: toBoolAttr(control.active) == 'true' ? 'solid' : 'outlined', "on-gov-click": () => this.onSelectHandler(control, index) }, control.label))))))), h("span", { id: this.formSelectId, hidden: true }, this.wcagSelectLabel), this.compactControls ? (h("gov-form-select", { "wcag-labelled-by": this.formSelectId, "onGov-change": this.onChangeHandler.bind(this) }, this.controller.map(control => (h("option", { value: control.triggerIdentifier, selected: control.active }, control.label))))) : null, h("slot", null)));
96
96
  }
97
97
  getCurrentTab() {
98
98
  return this.controller.find(control => control.active) || null;
@@ -1 +1 @@
1
- {"version":3,"file":"gov-tabs.js","sourceRoot":"","sources":["../../../../../../src/components/gov-tabs/gov-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAgB,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC5G,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAe,MAAM,aAAa,CA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,CAAA;OACjD;KACD;EACF,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,OAAO;IACZ,IAAI,CAAC,iBAAiB,EAAE,CAAA;EACzB,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,UAAU;IACf,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,IAAI,IAAI,CAAA;EAC5C,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,YAAY,CAAC,UAAkB;IACpC,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAA;IACtC,IAAI,CAAC,QAAQ,EAAE,CAAA;EAChB,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,YAAY;IACjB,gBAAgB,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;IAC3E,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;EACvE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Host, h, State, Method, Event, EventEmitter, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { TabsItemClass, TabVariants, VariantType } from './constants'\nimport { GovTabControllerItem } from './gov-tabs.types'\nimport { govHost, toBoolAttr } from '../../helpers/Dom/template'\nimport { validateWcagLabel, validateWcagProp } from '../../helpers/Validate/wcag'\nimport { TabsClass, TabType, TabTypes, TabOrientationType } from './constants'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay, throttle } from '../../utils/utils'\nimport { createID } from '../../utils/string.utils'\nimport { Nullable } from '../../types/interfaces'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-tabs',\n\tstyleUrl: 'gov-tabs.scss',\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: { [key: string]: HTMLButtonElement } = {}\n\tprivate tabsRef?: HTMLDivElement\n\n\tprivate readonly formSelectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.formSelectId = createID('GovForSelect')\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t@State() controller: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() compactControls = false\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = 'text'\n\t/**\n\t * Style variation of the tab badges.\n\t */\n\t@Prop() readonly variant?: VariantType = 'primary'\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = 'horizontal'\n\t/**\n\t * Adds accessible label for the tabs that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * Adds accessible label for the tabs select\n\t */\n\t@Prop({ attribute: 'wcag-select-label' }) readonly wcagSelectLabel: string\n\t/**\n\t * Indicates the id of a component that labels the tabs.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch('type')\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(TabVariants, newValue, TabsClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareDataSource()\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\n\t\tthis.resizeObserver()\n\t}\n\n\tprivate prepareDataSource(): void {\n\t\tthis.controller = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([tab.getIdentifier(), tab.getTriggerIdentifier()]).then(([identifier, triggerIdentifier]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute('default') === 'string'\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute('label'),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t})\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tlet defaultTab = controllers.findIndex(controller => controller.default)\n\t\t\tif (defaultTab === -1) defaultTab = 0\n\t\t\tthis.focusIndex = defaultTab\n\t\t\tcontrollers[defaultTab].active = true\n\t\t\tthis.controller = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controller.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controller = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controller.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active)\n\t\t})\n\t}\n\n\t/*\n\tprivate evaluateControls() {\n\t\tthis.compactControls = false\n\t\tlet sumOfWidth = this.tabsRef.querySelector(\"ul\").offsetWidth\n\t\tthis.compactControls = this.tabsRef.offsetWidth < sumOfWidth\n\t}\n\t*/\n\n\tprivate resizeObserver() {\n\t\tconst resizeObserver = new ResizeObserver(\n\t\t\tthrottle(() => {\n\t\t\t\t// this.evaluateControls()\n\t\t\t}, 200)\n\t\t)\n\n\t\tresizeObserver.observe(this.tabsRef)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tvariant={this.variant}\n\t\t\t\ttype={this.type}\n\t\t\t\trole=\"tablist\"\n\t\t\t\tref={el => (this.tabsRef = el as HTMLDivElement)}\n\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs} aria-hidden={toBoolAttr(this.compactControls)}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controller.map((control, index) => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == 'text' ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control, index)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active ? -1 : 0}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLInputElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-badge\n\t\t\t\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\t\t\t\ttype={toBoolAttr(control.active) == 'true' ? 'solid' : 'outlined'}\n\t\t\t\t\t\t\t\t\t\tnativeType={toBoolAttr(control.active) == 'true' ? 'span' : 'button'}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control, index)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</gov-badge>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\n\t\t\t\t<span id={this.formSelectId} hidden>\n\t\t\t\t\t{this.wcagSelectLabel}\n\t\t\t\t</span>\n\t\t\t\t{this.compactControls ? (\n\t\t\t\t\t<gov-form-select wcag-labelled-by={this.formSelectId} onGov-change={this.onChangeHandler.bind(this)}>\n\t\t\t\t\t\t{this.controller.map(control => (\n\t\t\t\t\t\t\t<option value={control.triggerIdentifier} selected={control.active}>\n\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</gov-form-select>\n\t\t\t\t) : null}\n\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controller.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem, index: number) {\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onChangeHandler(e: CustomEvent) {\n\t\tconst triggerId = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.setActiveByIdentifier(triggerId)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\t\te.stopPropagation()\n\t\tif (keyCode === 39 || keyCode === 37) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.controller[this.focusIndex].active = false\n\t\t\tif (keyCode === 39) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controller.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controller.length - 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1) {\n\t\t\t\tconst current = this.controller[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\tthis.controller = [...this.controller]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareDataSource()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\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\tvalidateWcagProp(this.wcagSelectLabel, 'wcag-select-label', TabsClass.root)\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, TabsClass.root)\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-tabs.js","sourceRoot":"","sources":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nD,IAAI,CAAC,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAA;QACtC,IAAI,CAAC,QAAQ,EAAE,CAAA;QACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,CAAA;OACjD;KACD;EACF,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,OAAO;IACZ,IAAI,CAAC,iBAAiB,EAAE,CAAA;EACzB,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,UAAU;IACf,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,IAAI,IAAI,CAAA;EAC5C,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,YAAY,CAAC,UAAkB;IACpC,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAA;IACtC,IAAI,CAAC,QAAQ,EAAE,CAAA;EAChB,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,YAAY;IACjB,gBAAgB,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;IAC3E,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;EACvE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Host, h, State, Method, Event, EventEmitter, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { TabsItemClass, TabVariants, VariantType } from './constants'\nimport { GovTabControllerItem } from './gov-tabs.types'\nimport { govHost, toBoolAttr } from '../../helpers/Dom/template'\nimport { validateWcagLabel, validateWcagProp } from '../../helpers/Validate/wcag'\nimport { TabsClass, TabType, TabTypes, TabOrientationType } from './constants'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay, throttle } from '../../utils/utils'\nimport { createID } from '../../utils/string.utils'\nimport { Nullable } from '../../types/interfaces'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-tabs',\n\tstyleUrl: 'gov-tabs.scss',\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: { [key: string]: HTMLButtonElement } = {}\n\tprivate tabsRef?: HTMLDivElement\n\n\tprivate readonly formSelectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.formSelectId = createID('GovForSelect')\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t@State() controller: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() compactControls = false\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = 'text'\n\t/**\n\t * Style variation of the tab badges.\n\t */\n\t@Prop() readonly variant?: VariantType = 'primary'\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = 'horizontal'\n\t/**\n\t * Adds accessible label for the tabs that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * Adds accessible label for the tabs select\n\t */\n\t@Prop({ attribute: 'wcag-select-label' }) readonly wcagSelectLabel: string\n\t/**\n\t * Indicates the id of a component that labels the tabs.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch('type')\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(TabVariants, newValue, TabsClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareDataSource()\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\n\t\tthis.resizeObserver()\n\t}\n\n\tprivate prepareDataSource(): void {\n\t\tthis.controller = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([tab.getIdentifier(), tab.getTriggerIdentifier()]).then(([identifier, triggerIdentifier]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute('default') === 'string'\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute('label'),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t})\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tlet defaultTab = controllers.findIndex(controller => controller.default)\n\t\t\tif (defaultTab === -1) defaultTab = 0\n\t\t\tthis.focusIndex = defaultTab\n\t\t\tcontrollers[defaultTab].active = true\n\t\t\tthis.controller = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controller.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controller = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controller.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active)\n\t\t})\n\t}\n\n\t/*\n\tprivate evaluateControls() {\n\t\tthis.compactControls = false\n\t\tlet sumOfWidth = this.tabsRef.querySelector(\"ul\").offsetWidth\n\t\tthis.compactControls = this.tabsRef.offsetWidth < sumOfWidth\n\t}\n\t*/\n\n\tprivate resizeObserver() {\n\t\tconst resizeObserver = new ResizeObserver(\n\t\t\tthrottle(() => {\n\t\t\t\t// this.evaluateControls()\n\t\t\t}, 200)\n\t\t)\n\n\t\tresizeObserver.observe(this.tabsRef)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tvariant={this.variant}\n\t\t\t\ttype={this.type}\n\t\t\t\trole=\"tablist\"\n\t\t\t\tref={el => (this.tabsRef = el as HTMLDivElement)}\n\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs} aria-hidden={toBoolAttr(this.compactControls)}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controller.map((control, index) => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == 'text' ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control, index)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active ? -1 : 0}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLInputElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-badge\n\t\t\t\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\t\t\t\ttype={toBoolAttr(control.active) == 'true' ? 'solid' : 'outlined'}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control, index)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</gov-badge>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\n\t\t\t\t<span id={this.formSelectId} hidden>\n\t\t\t\t\t{this.wcagSelectLabel}\n\t\t\t\t</span>\n\t\t\t\t{this.compactControls ? (\n\t\t\t\t\t<gov-form-select wcag-labelled-by={this.formSelectId} onGov-change={this.onChangeHandler.bind(this)}>\n\t\t\t\t\t\t{this.controller.map(control => (\n\t\t\t\t\t\t\t<option value={control.triggerIdentifier} selected={control.active}>\n\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</gov-form-select>\n\t\t\t\t) : null}\n\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controller.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem, index: number) {\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onChangeHandler(e: CustomEvent) {\n\t\tconst triggerId = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.setActiveByIdentifier(triggerId)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\t\te.stopPropagation()\n\t\tif (keyCode === 39 || keyCode === 37) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.controller[this.focusIndex].active = false\n\t\t\tif (keyCode === 39) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controller.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controller.length - 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1) {\n\t\t\t\tconst current = this.controller[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\tthis.controller = [...this.controller]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareDataSource()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\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\tvalidateWcagProp(this.wcagSelectLabel, 'wcag-select-label', TabsClass.root)\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, TabsClass.root)\n\t}\n}\n"]}
@@ -158,6 +158,9 @@
158
158
  /*
159
159
  - Variables - Form multiselect
160
160
  */
161
+ /*
162
+ - Variables - Form password power
163
+ */
161
164
  /*
162
165
  - Variables - Form checkbox & radio
163
166
  */
@@ -219,7 +222,7 @@
219
222
  .gov-tile__icon {
220
223
  display: flex;
221
224
  margin: 0rem 0rem 0.75rem;
222
- color: var(--gov-tile-icon-color, var(--gov-color-secondary));
225
+ color: var(--gov-tile-main-color, var(--gov-color-primary));
223
226
  }
224
227
  .gov-tile__icon .gov-icon {
225
228
  width: 2.5rem;
@@ -19,7 +19,7 @@ export class GovTile {
19
19
  }
20
20
  render() {
21
21
  // tag type
22
- return (h(Host, { class: this.h.classes(TileClass.root), promotion: this.promotion }, this.h.hasSlot('icon') && (h("div", { class: TileClass.icon }, h("slot", { name: "icon" }))), h("h3", { class: TileClass.title }, this.href ? (h("a", { href: this.href, class: TileClass.link }, this.name, h("gov-icon", { class: TileClass.arrow, name: "arrow-right" }))) : (h("span", null, this.name))), h("div", { class: TileClass.content }, h("slot", null))));
22
+ return (h(Host, { class: this.h.classes(TileClass.root), promotion: this.promotion }, this.h.hasSlot('icon') && (h("div", { class: TileClass.icon }, h("slot", { name: "icon" }))), h("h3", { class: TileClass.title }, this.href ? (h("a", { href: this.href, class: TileClass.link }, this.name, h("gov-icon", { class: TileClass.arrow, name: "chevron-right" }))) : (h("span", null, this.name))), h("div", { class: TileClass.content }, h("slot", null))));
23
23
  }
24
24
  static get is() { return "gov-tile"; }
25
25
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"gov-tile.js","sourceRoot":"","sources":["../../../../../../src/components/gov-tile/gov-tile.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACx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AC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { TileClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-tile',\n\tstyleUrl: 'gov-tile.scss',\n})\nexport class GovTile {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTileElement\n\t/**\n\t * Style variation of the card.\n\t */\n\t@Prop() readonly promotion: boolean = false\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\t/**\n\t * Item name\n\t */\n\t@Prop() readonly name: string\n\n\t@Watch('name')\n\tvalidateName(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${TileClass.root}]: Parameter title is required.`)\n\t\t}\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateName(this.name)\n\t}\n\n\trender() {\n\t\t// tag type\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TileClass.root)} promotion={this.promotion}>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<div class={TileClass.icon}>\n\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<h3 class={TileClass.title}>\n\t\t\t\t\t{this.href ? (\n\t\t\t\t\t\t<a href={this.href} class={TileClass.link}>\n\t\t\t\t\t\t\t{this.name}\n\t\t\t\t\t\t\t<gov-icon class={TileClass.arrow} name=\"arrow-right\"></gov-icon>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span>{this.name}</span>\n\t\t\t\t\t)}\n\t\t\t\t</h3>\n\t\t\t\t<div class={TileClass.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"]}
1
+ {"version":3,"file":"gov-tile.js","sourceRoot":"","sources":["../../../../../../src/components/gov-tile/gov-tile.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAOpD,MAAM,OAAO,OAAO;EAGnB;qBAQsC,KAAK;;;IAP1C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAkBD,YAAY,CAAC,QAAgB;IAC5B,IAAI,CAAC,QAAQ,EAAE;MACd,WAAW,CAAC,IAAI,SAAS,CAAC,IAAI,iCAAiC,CAAC,CAAA;KAChE;EACF,CAAC;EAED,iBAAiB;IAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;EAC7B,CAAC;EAED,MAAM;IACL,WAAW;IACX,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS;MACpE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAC1B,WAAK,KAAK,EAAE,SAAS,CAAC,IAAI;QACzB,YAAM,IAAI,EAAC,MAAM,GAAG,CACf,CACN;MACD,UAAI,KAAK,EAAE,SAAS,CAAC,KAAK,IACxB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CACZ,SAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,IAAI;QACvC,IAAI,CAAC,IAAI;QACV,gBAAU,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,IAAI,EAAC,eAAe,GAAY,CAC/D,CACJ,CAAC,CAAC,CAAC,CACH,gBAAO,IAAI,CAAC,IAAI,CAAQ,CACxB,CACG;MACL,WAAK,KAAK,EAAE,SAAS,CAAC,OAAO;QAC5B,eAAQ,CACH,CACA,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from '@stencil/core'\nimport { govErrorLog } from '../../helpers/Log/gov.log'\nimport { TileClass } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-tile',\n\tstyleUrl: 'gov-tile.scss',\n})\nexport class GovTile {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovTileElement\n\t/**\n\t * Style variation of the card.\n\t */\n\t@Prop() readonly promotion: boolean = false\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\t/**\n\t * Item name\n\t */\n\t@Prop() readonly name: string\n\n\t@Watch('name')\n\tvalidateName(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${TileClass.root}]: Parameter title is required.`)\n\t\t}\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateName(this.name)\n\t}\n\n\trender() {\n\t\t// tag type\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TileClass.root)} promotion={this.promotion}>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<div class={TileClass.icon}>\n\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<h3 class={TileClass.title}>\n\t\t\t\t\t{this.href ? (\n\t\t\t\t\t\t<a href={this.href} class={TileClass.link}>\n\t\t\t\t\t\t\t{this.name}\n\t\t\t\t\t\t\t<gov-icon class={TileClass.arrow} name=\"chevron-right\"></gov-icon>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span>{this.name}</span>\n\t\t\t\t\t)}\n\t\t\t\t</h3>\n\t\t\t\t<div class={TileClass.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"]}
@@ -148,6 +148,9 @@
148
148
  /*
149
149
  - Variables - Form multiselect
150
150
  */
151
+ /*
152
+ - Variables - Form password power
153
+ */
151
154
  /*
152
155
  - Variables - Form checkbox & radio
153
156
  */
@@ -210,6 +213,9 @@
210
213
  .gov-tiles > *:last-child {
211
214
  border-bottom-width: 0;
212
215
  }
216
+ .gov-tiles[no-border] > * {
217
+ border: none;
218
+ }
213
219
  @media (min-width: 48em) {
214
220
  .gov-tiles {
215
221
  display: grid;
@@ -5,6 +5,7 @@ import { govHost } from '../../helpers/Dom/template';
5
5
  export class GovTiles {
6
6
  constructor() {
7
7
  this.columns = 3;
8
+ this.noBorder = false;
8
9
  this.h = govHost(this.host);
9
10
  }
10
11
  get classNames() {
@@ -43,6 +44,24 @@ export class GovTiles {
43
44
  "attribute": "columns",
44
45
  "reflect": false,
45
46
  "defaultValue": "3"
47
+ },
48
+ "noBorder": {
49
+ "type": "boolean",
50
+ "mutable": false,
51
+ "complexType": {
52
+ "original": "boolean",
53
+ "resolved": "boolean",
54
+ "references": {}
55
+ },
56
+ "required": false,
57
+ "optional": false,
58
+ "docs": {
59
+ "tags": [],
60
+ "text": "Tiles border"
61
+ },
62
+ "attribute": "no-border",
63
+ "reflect": false,
64
+ "defaultValue": "false"
46
65
  }
47
66
  };
48
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":"gov-tiles.js","sourceRoot":"","sources":["../../../../../../src/components/gov-tiles/gov-tiles.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAOpD,MAAM,OAAO,QAAQ;EAGpB;mBAMmC,CAAC;IALnC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAQD,IAAI,UAAU;IACb,OAAO,cAAc,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,UAAU,CAAC,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAA;EACjG,CAAC;EAED,MAAM;IACL,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC;MAC3C,eAAQ,CACF,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { TilesClass } from './constants'\nimport { prepareClasses } from '../../helpers/Dom/template'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-tiles',\n\tstyleUrl: 'gov-tiles.scss',\n})\nexport class GovTiles {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t/**\n\t * Number of columns between 1-4\n\t */\n\t@Prop() readonly columns: number = 3\n\n\t@Element() host: HTMLGovTilesElement\n\n\tget classNames(): string {\n\t\treturn prepareClasses([TilesClass.root, this.columns && TilesClass.root + '--x' + this.columns])\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(this.classNames)}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-tiles.js","sourceRoot":"","sources":["../../../../../../src/components/gov-tiles/gov-tiles.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAOpD,MAAM,OAAO,QAAQ;EAGpB;mBAMmC,CAAC;oBAI2B,KAAK;IATnE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAYD,IAAI,UAAU;IACb,OAAO,cAAc,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,UAAU,CAAC,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAA;EACjG,CAAC;EAED,MAAM;IACL,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC;MAC3C,eAAQ,CACF,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { TilesClass } from './constants'\nimport { prepareClasses } from '../../helpers/Dom/template'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\n\n@Component({\n\ttag: 'gov-tiles',\n\tstyleUrl: 'gov-tiles.scss',\n})\nexport class GovTiles {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t/**\n\t * Number of columns between 1-4\n\t */\n\t@Prop() readonly columns: number = 3\n\t/**\n\t * Tiles border\n\t */\n\t@Prop({ attribute: 'no-border' }) readonly noBorder: boolean = false\n\n\t@Element() host: HTMLGovTilesElement\n\n\tget classNames(): string {\n\t\treturn prepareClasses([TilesClass.root, this.columns && TilesClass.root + '--x' + this.columns])\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(this.classNames)}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
@@ -148,6 +148,9 @@
148
148
  /*
149
149
  - Variables - Form multiselect
150
150
  */
151
+ /*
152
+ - Variables - Form password power
153
+ */
151
154
  /*
152
155
  - Variables - Form checkbox & radio
153
156
  */
@@ -43,7 +43,7 @@ export class GovToast {
43
43
  }
44
44
  }
45
45
  render() {
46
- return (h(Host, { class: this.h.classes([ToastClass.root, 'gov-box-shadow--m']), "data-toast-id": this.toastId, gravity: this.gravity, position: this.position, variant: this.variant, type: this.type, style: { '--toast-duration': this.time + 'ms' } }, this.h.hasSlot('icon') && (h("span", { class: ToastClass.icon }, h("slot", { name: "icon" }))), h("div", { class: ToastClass.content, "aria-live": "polite", role: "status" }, h("slot", null)), h("div", { class: ToastClass.close }, h("gov-button", { size: "s", "wcag-label": this.wcagCloseLabel, variant: this.isSolid ? this.variant : 'secondary', inverse: this.isSolid, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, this.closeLabel ? this.closeLabel : h("gov-icon", { name: "cross" }))), h("div", { class: ToastClass.timer })));
46
+ return (h(Host, { class: this.h.classes([ToastClass.root, 'gov-box-shadow--m']), "data-toast-id": this.toastId, gravity: this.gravity, position: this.position, variant: this.variant, type: this.type, style: { '--toast-duration': this.time + 'ms' } }, this.h.hasSlot('icon') && (h("span", { class: ToastClass.icon }, h("slot", { name: "icon" }))), h("div", { class: ToastClass.content, "aria-live": "polite", role: "status" }, h("slot", null)), h("div", { class: ToastClass.close }, h("gov-button", { size: "s", "wcag-label": this.wcagCloseLabel, variant: this.isSolid ? this.variant : 'secondary', inverse: this.isSolid, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, this.closeLabel ? this.closeLabel : h("gov-icon", { name: "x-lg" }))), h("div", { class: ToastClass.timer })));
47
47
  }
48
48
  onCloseHandler() {
49
49
  this.destroy()
@@ -1 +1 @@
1
- {"version":3,"file":"gov-toast.js","sourceRoot":"","sources":["../../../../../../src/components/gov-toast/gov-toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACrG,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAkB,aAAa,EAAE,MAAM,aAAa,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAMnD,MAAM,OAAO,QAAQ;EAKpB;mBAS8C,SAAS;mBAKV,KAAK;oBAIO,OAAO;gBAIvB,SAAS;gBAIlB,CAAC;;;IAzBhC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAA;GACnC;EAsCD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,aAAa,EAAE,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;EACvD,CAAC;EAED,iBAAiB;IAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAClC,IAAI,CAAC,QAAQ,EAAE,CAAA;E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;KAEG;EAEH,KAAK,CAAC,OAAO;IACZ,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC1B,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,IAAI,CAAC,OAAO,IAAI,CAAC,CAAA;IACzE,IAAI,KAAK,EAAE;MACV,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;MACtC,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,UAAU,EAAE;QACvC,KAAK,CAAC,MAAM,EAAE,CAAA;OACd;KACD;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Prop, Watch, Method } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { ToastClass, ToastTypesType, ToastVariants } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { ToastVariantType } from './constants'\nimport { createID } from '../../utils/string.utils'\n\n@Component({\n\ttag: 'gov-toast',\n\tstyleUrl: 'gov-toast.scss',\n})\nexport class GovToast {\n\tprivate h: GovHost\n\tprivate timeout\n\tprivate readonly toastId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.toastId = createID('GovToast')\n\t}\n\n\t@Element() host: HTMLGovToastElement\n\t/**\n\t * Style variation of the toast message.\n\t */\n\t@Prop() readonly variant?: ToastVariantType = 'primary'\n\n\t/**\n\t * Toast’s gravity\n\t */\n\t@Prop() readonly gravity: 'top' | 'bottom' = 'top'\n\t/**\n\t * Toast’s position\n\t */\n\t@Prop() readonly position: 'left' | 'center' | 'right' = 'right'\n\t/**\n\t * Toast type\n\t */\n\t@Prop() readonly type?: ToastTypesType = 'classic'\n\t/**\n\t * Number of milliseconds to wait before Toast disappear\n\t */\n\t@Prop() readonly time: number = 0\n\t/**\n\t * Closing button texting instead of icons\n\t */\n\t@Prop({ attribute: 'close-label' }) readonly closeLabel: string\n\t/**\n\t * Aria label for the closing button. It is mandatory if the alert is closable\n\t */\n\t@Prop({ attribute: 'wcag-close-label' }) readonly wcagCloseLabel: string\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({ eventName: 'gov-close' }) govClose: EventEmitter<string>\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ToastVariants, newValue, ToastClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.runTimer()\n\t}\n\n\tcomponentDidLoad() {\n\t\tconst existedToasts = document.querySelectorAll(`gov-toast[gravity=\"${this.gravity}\"][position=\"${this.position}\"]:not([data-toast-id=\"${this.toastId}\"])`)\n\t\tif (existedToasts.length > 0) {\n\t\t\tArray.from(existedToasts).map((toast: HTMLGovToastElement) => toast.destroy().then())\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tclearTimeout(this.timeout)\n\t}\n\n\tprivate runTimer() {\n\t\tif (this.isSolid) {\n\t\t\tthis.host.classList.add('is-initialized')\n\t\t}\n\t\tif (this.isTimer) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.classList.add(ToastClass.hidden)\n\t\t\t\tsetTimeout(this.destroy.bind(this), 600)\n\t\t\t}, this.time)\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes([ToastClass.root, 'gov-box-shadow--m'])}\n\t\t\t\tdata-toast-id={this.toastId}\n\t\t\t\tgravity={this.gravity}\n\t\t\t\tposition={this.position}\n\t\t\t\tvariant={this.variant}\n\t\t\t\ttype={this.type}\n\t\t\t\tstyle={{ '--toast-duration': this.time + 'ms' }}\n\t\t\t>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<span class={ToastClass.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={ToastClass.content} aria-live=\"polite\" role=\"status\">\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\n\t\t\t\t<div class={ToastClass.close}>\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\twcag-label={this.wcagCloseLabel}\n\t\t\t\t\t\tvariant={this.isSolid ? this.variant : 'secondary'}\n\t\t\t\t\t\tinverse={this.isSolid}\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.closeLabel ? this.closeLabel : <gov-icon name=\"cross\"></gov-icon>}\n\t\t\t\t\t</gov-button>\n\t\t\t\t</div>\n\n\t\t\t\t<div class={ToastClass.timer}></div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(): void {\n\t\tthis.destroy()\n\t\t\t.then(() => this.govClose.emit(this.toastId))\n\t\t\t.catch()\n\t}\n\n\tget isSolid(): boolean {\n\t\treturn this.type === 'solid'\n\t}\n\n\tget isTimer(): boolean {\n\t\treturn Number.isInteger(this.time) && this.time > 0\n\t}\n\n\t/**\n\t * Remove toast from dom\n\t */\n\t@Method()\n\tasync destroy(): Promise<void> {\n\t\tclearTimeout(this.timeout)\n\t\tconst toast = document.querySelector(`[data-toast-id=\"${this.toastId}\"]`)\n\t\tif (toast) {\n\t\t\ttoast.classList.add(ToastClass.hidden)\n\t\t\tif (typeof toast.remove === 'function') {\n\t\t\t\ttoast.remove()\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-toast.js","sourceRoot":"","sources":["../../../../../../src/components/gov-toast/gov-to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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Prop, Watch, Method } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { ToastClass, ToastTypesType, ToastVariants } from './constants'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { ToastVariantType } from './constants'\nimport { createID } from '../../utils/string.utils'\n\n@Component({\n\ttag: 'gov-toast',\n\tstyleUrl: 'gov-toast.scss',\n})\nexport class GovToast {\n\tprivate h: GovHost\n\tprivate timeout\n\tprivate readonly toastId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.toastId = createID('GovToast')\n\t}\n\n\t@Element() host: HTMLGovToastElement\n\t/**\n\t * Style variation of the toast message.\n\t */\n\t@Prop() readonly variant?: ToastVariantType = 'primary'\n\n\t/**\n\t * Toast’s gravity\n\t */\n\t@Prop() readonly gravity: 'top' | 'bottom' = 'top'\n\t/**\n\t * Toast’s position\n\t */\n\t@Prop() readonly position: 'left' | 'center' | 'right' = 'right'\n\t/**\n\t * Toast type\n\t */\n\t@Prop() readonly type?: ToastTypesType = 'classic'\n\t/**\n\t * Number of milliseconds to wait before Toast disappear\n\t */\n\t@Prop() readonly time: number = 0\n\t/**\n\t * Closing button texting instead of icons\n\t */\n\t@Prop({ attribute: 'close-label' }) readonly closeLabel: string\n\t/**\n\t * Aria label for the closing button. It is mandatory if the alert is closable\n\t */\n\t@Prop({ attribute: 'wcag-close-label' }) readonly wcagCloseLabel: string\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({ eventName: 'gov-close' }) govClose: EventEmitter<string>\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ToastVariants, newValue, ToastClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.runTimer()\n\t}\n\n\tcomponentDidLoad() {\n\t\tconst existedToasts = document.querySelectorAll(`gov-toast[gravity=\"${this.gravity}\"][position=\"${this.position}\"]:not([data-toast-id=\"${this.toastId}\"])`)\n\t\tif (existedToasts.length > 0) {\n\t\t\tArray.from(existedToasts).map((toast: HTMLGovToastElement) => toast.destroy().then())\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tclearTimeout(this.timeout)\n\t}\n\n\tprivate runTimer() {\n\t\tif (this.isSolid) {\n\t\t\tthis.host.classList.add('is-initialized')\n\t\t}\n\t\tif (this.isTimer) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.classList.add(ToastClass.hidden)\n\t\t\t\tsetTimeout(this.destroy.bind(this), 600)\n\t\t\t}, this.time)\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes([ToastClass.root, 'gov-box-shadow--m'])}\n\t\t\t\tdata-toast-id={this.toastId}\n\t\t\t\tgravity={this.gravity}\n\t\t\t\tposition={this.position}\n\t\t\t\tvariant={this.variant}\n\t\t\t\ttype={this.type}\n\t\t\t\tstyle={{ '--toast-duration': this.time + 'ms' }}\n\t\t\t>\n\t\t\t\t{this.h.hasSlot('icon') && (\n\t\t\t\t\t<span class={ToastClass.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={ToastClass.content} aria-live=\"polite\" role=\"status\">\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\n\t\t\t\t<div class={ToastClass.close}>\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\twcag-label={this.wcagCloseLabel}\n\t\t\t\t\t\tvariant={this.isSolid ? this.variant : 'secondary'}\n\t\t\t\t\t\tinverse={this.isSolid}\n\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.closeLabel ? this.closeLabel : <gov-icon name=\"x-lg\"></gov-icon>}\n\t\t\t\t\t</gov-button>\n\t\t\t\t</div>\n\n\t\t\t\t<div class={ToastClass.timer}></div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(): void {\n\t\tthis.destroy()\n\t\t\t.then(() => this.govClose.emit(this.toastId))\n\t\t\t.catch()\n\t}\n\n\tget isSolid(): boolean {\n\t\treturn this.type === 'solid'\n\t}\n\n\tget isTimer(): boolean {\n\t\treturn Number.isInteger(this.time) && this.time > 0\n\t}\n\n\t/**\n\t * Remove toast from dom\n\t */\n\t@Method()\n\tasync destroy(): Promise<void> {\n\t\tclearTimeout(this.timeout)\n\t\tconst toast = document.querySelector(`[data-toast-id=\"${this.toastId}\"]`)\n\t\tif (toast) {\n\t\t\ttoast.classList.add(ToastClass.hidden)\n\t\t\tif (typeof toast.remove === 'function') {\n\t\t\t\ttoast.remove()\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
@@ -148,6 +148,9 @@
148
148
  /*
149
149
  - Variables - Form multiselect
150
150
  */
151
+ /*
152
+ - Variables - Form password power
153
+ */
151
154
  /*
152
155
  - Variables - Form checkbox & radio
153
156
  */
@@ -148,6 +148,9 @@
148
148
  /*
149
149
  - Variables - Form multiselect
150
150
  */
151
+ /*
152
+ - Variables - Form password power
153
+ */
151
154
  /*
152
155
  - Variables - Form checkbox & radio
153
156
  */
@@ -148,6 +148,9 @@
148
148
  /*
149
149
  - Variables - Form multiselect
150
150
  */
151
+ /*
152
+ - Variables - Form password power
153
+ */
151
154
  /*
152
155
  - Variables - Form checkbox & radio
153
156
  */
@@ -54,7 +54,7 @@ export class GovWizzardItem {
54
54
  const triggerId = this.identifier || this.triggerId;
55
55
  const LabelTag = this.labelTag;
56
56
  const Tag = this.collapsible ? Tags.BUTTON : Tags.DIV;
57
- const label = (h(LabelTag, { class: WizzardItemClass.title }, this.h.hasSlot('prefix') && (h("span", { class: WizzardItemClass.prefix }, h("slot", { name: "prefix" }))), h("span", { class: WizzardItemClass.name }, h("span", { class: WizzardItemClass.label }, h("span", null, this.label), this.collapsible && h("gov-icon", { class: WizzardItemClass.arrow, name: "arrow-down" })), this.annotation && h("span", { class: WizzardItemClass.annot }, this.annotation))));
57
+ const label = (h(LabelTag, { class: WizzardItemClass.title }, this.h.hasSlot('prefix') && (h("span", { class: WizzardItemClass.prefix }, h("slot", { name: "prefix" }))), h("span", { class: WizzardItemClass.name }, h("span", { class: WizzardItemClass.label }, h("span", null, this.label), this.collapsible && h("gov-icon", { class: WizzardItemClass.arrow, name: "chevron-down" })), this.annotation && h("span", { class: WizzardItemClass.annot }, this.annotation))));
58
58
  return (h(Host, { class: this.h.classes(WizzardItemClass.root), variant: this.variant, size: this.size, role: "listitem", collapsible: this.collapsible }, this.collapsible ? (h(Tag, { id: triggerId, class: WizzardItemClass.header, "aria-expanded": booleanString(this.isExpandedState), "aria-controls": this.contentId, disabled: this.disabled, "aria-disabled": toBoolAttrIfDefined(this.disabled), onClick: () => (this.collapsible ? this.toggle() : false) }, label)) : (h("div", { class: WizzardItemClass.header }, label)), this.collapsible ? (h("div", { class: WizzardItemClass.content, id: this.contentId, "aria-hidden": booleanString(!this.isExpandedState), hidden: !this.isExpandedState, "aria-labelledby": triggerId }, h("slot", null))) : (h("div", { class: WizzardItemClass.content, "aria-hidden": booleanString(!this.isExpandedState), hidden: !this.isExpandedState }, h("slot", null)))));
59
59
  }
60
60
  /**