@gov-design-system-ce/components 0.0.19 → 0.0.21

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 (147) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/gov-alert.cjs.entry.js +39 -7
  3. package/dist/cjs/gov-alert.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gov-app.cjs.entry.js +8 -1
  5. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  7. package/dist/cjs/gov-modal.cjs.entry.js +9 -11
  8. package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
  9. package/dist/cjs/gov-prompt.cjs.entry.js +9 -11
  10. package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/collection/components/gov-alert/constants.js +1 -0
  13. package/dist/collection/components/gov-alert/constants.js.map +1 -1
  14. package/dist/collection/components/gov-alert/gov-alert.css +13 -0
  15. package/dist/collection/components/gov-alert/gov-alert.js +107 -16
  16. package/dist/collection/components/gov-alert/gov-alert.js.map +1 -1
  17. package/dist/collection/components/gov-alert/gov-alert.types.js +2 -0
  18. package/dist/collection/components/gov-alert/gov-alert.types.js.map +1 -0
  19. package/dist/collection/components/gov-modal/gov-modal.js +13 -20
  20. package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
  21. package/dist/collection/components/gov-promp/gov-prompt.js +13 -20
  22. package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
  23. package/dist/collection/pages/Alert.js +8 -1
  24. package/dist/collection/pages/Alert.js.map +1 -1
  25. package/dist/components/gov-alert.js +45 -10
  26. package/dist/components/gov-alert.js.map +1 -1
  27. package/dist/components/gov-app.js +8 -1
  28. package/dist/components/gov-app.js.map +1 -1
  29. package/dist/components/gov-attachments2.js +1 -1
  30. package/dist/components/gov-button2.js +1 -1
  31. package/dist/components/gov-form-checkbox.js +1 -1
  32. package/dist/components/gov-form-file.js +1 -1
  33. package/dist/components/gov-form-input2.js +1 -1
  34. package/dist/components/gov-form-multi-select.js +1 -1
  35. package/dist/components/gov-form-radio.js +1 -1
  36. package/dist/components/gov-form-select2.js +1 -1
  37. package/dist/components/gov-form-switch.js +1 -1
  38. package/dist/components/gov-icon2.js +1 -1
  39. package/dist/components/gov-modal.js +12 -15
  40. package/dist/components/gov-modal.js.map +1 -1
  41. package/dist/components/gov-pagination.js +1 -1
  42. package/dist/components/gov-prompt.js +12 -15
  43. package/dist/components/gov-prompt.js.map +1 -1
  44. package/dist/components/gov-tabs.js +1 -1
  45. package/dist/components/wcag.js +1 -1
  46. package/dist/core/core.esm.js +1 -1
  47. package/dist/core/core.esm.js.map +1 -1
  48. package/dist/core/critial.css +484 -0
  49. package/dist/core/{p-26260897.entry.js → p-034c40ab.entry.js} +2 -2
  50. package/dist/core/p-0800095f.entry.js +2 -0
  51. package/dist/core/p-0800095f.entry.js.map +1 -0
  52. package/dist/core/{p-f0a4439e.entry.js → p-207ba616.entry.js} +2 -2
  53. package/dist/core/{p-429850b9.entry.js → p-3699c1b3.entry.js} +2 -2
  54. package/dist/core/{p-d79d0f7a.entry.js → p-3cd5b6cb.entry.js} +2 -2
  55. package/dist/core/{p-85404e69.entry.js → p-3da88ddb.entry.js} +2 -2
  56. package/dist/core/{p-aba39622.entry.js → p-3e1a1bd4.entry.js} +2 -2
  57. package/dist/core/{p-5a1c8d48.entry.js → p-42db4603.entry.js} +2 -2
  58. package/dist/core/{p-07a2c755.entry.js → p-4ce15026.entry.js} +2 -2
  59. package/dist/core/{p-540e79c4.entry.js → p-54b17f4d.entry.js} +2 -2
  60. package/dist/core/{p-ef393836.entry.js → p-5e865538.entry.js} +2 -2
  61. package/dist/core/{p-364b4792.js → p-670b4f93.js} +2 -2
  62. package/dist/core/{p-f73d482b.entry.js → p-742e37e4.entry.js} +2 -2
  63. package/dist/core/p-742e37e4.entry.js.map +1 -0
  64. package/dist/core/p-75a4c838.entry.js +2 -0
  65. package/dist/core/p-75a4c838.entry.js.map +1 -0
  66. package/dist/core/p-7b890c55.entry.js +2 -0
  67. package/dist/core/{p-8bb1ad43.entry.js.map → p-7b890c55.entry.js.map} +1 -1
  68. package/dist/core/{p-a929f64e.entry.js → p-7c55677b.entry.js} +2 -2
  69. package/dist/core/{p-e409d788.entry.js → p-8925ef42.entry.js} +2 -2
  70. package/dist/core/{p-3ad9cc54.entry.js → p-99f198b9.entry.js} +2 -2
  71. package/dist/core/{p-d8ef1d7a.entry.js → p-a8b628ed.entry.js} +2 -2
  72. package/dist/core/{p-724921e7.entry.js → p-a8ef7292.entry.js} +2 -2
  73. package/dist/core/{p-24877419.entry.js → p-a9c57f72.entry.js} +2 -2
  74. package/dist/core/{p-52f2f67c.entry.js → p-acfd00a2.entry.js} +2 -2
  75. package/dist/core/{p-299f3d3c.entry.js → p-ccb44728.entry.js} +2 -2
  76. package/dist/core/{p-5e5e925d.entry.js → p-f555fce1.entry.js} +2 -2
  77. package/dist/core/p-f555fce1.entry.js.map +1 -0
  78. package/dist/core/{p-f6e2f2f0.entry.js → p-f7275b59.entry.js} +2 -2
  79. package/dist/custom-elements/index.js +1 -1
  80. package/dist/custom-elements/index.js.map +1 -1
  81. package/dist/esm/core.js +1 -1
  82. package/dist/esm/gov-accordion.entry.js +1 -1
  83. package/dist/esm/gov-alert.entry.js +41 -9
  84. package/dist/esm/gov-alert.entry.js.map +1 -1
  85. package/dist/esm/gov-app.entry.js +8 -1
  86. package/dist/esm/gov-app.entry.js.map +1 -1
  87. package/dist/esm/gov-attachments_3.entry.js +1 -1
  88. package/dist/esm/gov-backdrop.entry.js +1 -1
  89. package/dist/esm/gov-breadcrumbs.entry.js +1 -1
  90. package/dist/esm/gov-button.entry.js +1 -1
  91. package/dist/esm/gov-card.entry.js +1 -1
  92. package/dist/esm/gov-form-checkbox.entry.js +1 -1
  93. package/dist/esm/gov-form-file.entry.js +1 -1
  94. package/dist/esm/gov-form-input.entry.js +1 -1
  95. package/dist/esm/gov-form-multi-select.entry.js +1 -1
  96. package/dist/esm/gov-form-radio.entry.js +1 -1
  97. package/dist/esm/gov-form-select.entry.js +1 -1
  98. package/dist/esm/gov-form-switch.entry.js +1 -1
  99. package/dist/esm/gov-icon.entry.js +1 -1
  100. package/dist/esm/gov-modal.entry.js +10 -12
  101. package/dist/esm/gov-modal.entry.js.map +1 -1
  102. package/dist/esm/gov-nav.entry.js +1 -1
  103. package/dist/esm/gov-pagination.entry.js +1 -1
  104. package/dist/esm/gov-prompt.entry.js +10 -12
  105. package/dist/esm/gov-prompt.entry.js.map +1 -1
  106. package/dist/esm/gov-side-nav.entry.js +1 -1
  107. package/dist/esm/gov-skeleton.entry.js +1 -1
  108. package/dist/esm/gov-tabs.entry.js +1 -1
  109. package/dist/esm/gov-wizzard.entry.js +1 -1
  110. package/dist/esm/loader.js +1 -1
  111. package/dist/esm/{wcag-3792d4bb.js → wcag-d588d144.js} +2 -2
  112. package/dist/esm/{wcag-3792d4bb.js.map → wcag-d588d144.js.map} +1 -1
  113. package/dist/hydrate/index.js +72 -39
  114. package/dist/types/components/gov-alert/constants.d.ts +1 -0
  115. package/dist/types/components/gov-alert/gov-alert.d.ts +21 -4
  116. package/dist/types/components/gov-alert/gov-alert.types.d.ts +4 -0
  117. package/dist/types/components/gov-modal/gov-modal.d.ts +3 -4
  118. package/dist/types/components/gov-promp/gov-prompt.d.ts +3 -4
  119. package/dist/types/components.d.ts +34 -13
  120. package/package.json +1 -1
  121. package/dist/core/p-3f92f3bf.entry.js +0 -2
  122. package/dist/core/p-3f92f3bf.entry.js.map +0 -1
  123. package/dist/core/p-5e5e925d.entry.js.map +0 -1
  124. package/dist/core/p-8bb1ad43.entry.js +0 -2
  125. package/dist/core/p-b2d1dd2a.entry.js +0 -2
  126. package/dist/core/p-b2d1dd2a.entry.js.map +0 -1
  127. package/dist/core/p-f73d482b.entry.js.map +0 -1
  128. /package/dist/core/{p-26260897.entry.js.map → p-034c40ab.entry.js.map} +0 -0
  129. /package/dist/core/{p-f0a4439e.entry.js.map → p-207ba616.entry.js.map} +0 -0
  130. /package/dist/core/{p-429850b9.entry.js.map → p-3699c1b3.entry.js.map} +0 -0
  131. /package/dist/core/{p-d79d0f7a.entry.js.map → p-3cd5b6cb.entry.js.map} +0 -0
  132. /package/dist/core/{p-85404e69.entry.js.map → p-3da88ddb.entry.js.map} +0 -0
  133. /package/dist/core/{p-aba39622.entry.js.map → p-3e1a1bd4.entry.js.map} +0 -0
  134. /package/dist/core/{p-5a1c8d48.entry.js.map → p-42db4603.entry.js.map} +0 -0
  135. /package/dist/core/{p-07a2c755.entry.js.map → p-4ce15026.entry.js.map} +0 -0
  136. /package/dist/core/{p-540e79c4.entry.js.map → p-54b17f4d.entry.js.map} +0 -0
  137. /package/dist/core/{p-ef393836.entry.js.map → p-5e865538.entry.js.map} +0 -0
  138. /package/dist/core/{p-364b4792.js.map → p-670b4f93.js.map} +0 -0
  139. /package/dist/core/{p-a929f64e.entry.js.map → p-7c55677b.entry.js.map} +0 -0
  140. /package/dist/core/{p-e409d788.entry.js.map → p-8925ef42.entry.js.map} +0 -0
  141. /package/dist/core/{p-3ad9cc54.entry.js.map → p-99f198b9.entry.js.map} +0 -0
  142. /package/dist/core/{p-d8ef1d7a.entry.js.map → p-a8b628ed.entry.js.map} +0 -0
  143. /package/dist/core/{p-724921e7.entry.js.map → p-a8ef7292.entry.js.map} +0 -0
  144. /package/dist/core/{p-24877419.entry.js.map → p-a9c57f72.entry.js.map} +0 -0
  145. /package/dist/core/{p-52f2f67c.entry.js.map → p-acfd00a2.entry.js.map} +0 -0
  146. /package/dist/core/{p-299f3d3c.entry.js.map → p-ccb44728.entry.js.map} +0 -0
  147. /package/dist/core/{p-f6e2f2f0.entry.js.map → p-f7275b59.entry.js.map} +0 -0
@@ -6237,19 +6237,25 @@ const AlertClass = {
6237
6237
  section: 'gov-alert__section',
6238
6238
  icon: 'gov-alert__icon',
6239
6239
  content: 'gov-alert__content',
6240
+ headline: 'gov-alert__headline',
6240
6241
  close: 'gov-alert__close',
6241
6242
  };
6242
6243
 
6243
- const govAlertCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-alert{position:relative;display:block;width:100%}.gov-alert__section{display:block;width:100%;max-width:calc(var(--gov-container-width, 73.75rem) + 2 * var(--gov-container-padding, 2.5rem));margin-right:auto;margin-left:auto;padding-right:var(--gov-container-padding-mobile, 1.25rem);padding-left:var(--gov-container-padding-mobile, 1.25rem);display:flex;gap:1rem;padding-top:1rem;padding-bottom:1rem}@media (min-width: 48em){.gov-alert__section{padding-right:var(--gov-container-padding, 2.5rem);padding-left:var(--gov-container-padding, 2.5rem)}}.gov-alert__icon{flex:0 0 auto}.gov-alert__icon>*{width:1.25rem;height:1.25rem}.gov-alert__content{padding-right:3.25rem}.gov-alert__content>*:last-child{margin-bottom:0}.gov-alert__content p{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-alert__content a{color:inherit}@media not all and (pointer: coarse){.gov-alert__content a:hover{color:inherit}}.gov-alert__close{position:absolute;top:0.625rem;right:1rem}.gov-alert[variant=warning]{background-color:var(--gov-alert-warning-bg-color, var(--gov-color-warning))}.gov-alert[variant=warning] .gov-alert__icon{color:var(--gov-alert-warning-icon-color, var(--gov-color-secondary))}.gov-alert[variant=warning] .gov-alert__content{color:var(--gov-alert-warning-text-color, var(--gov-color-secondary))}.gov-alert[variant=warning][inverse=\"\"],.gov-alert[variant=warning][inverse=true i],.gov-alert[variant=warning][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=warning][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=warning][inverse=true i] .gov-alert__icon,.gov-alert[variant=warning][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-warning-bg-color, var(--gov-color-warning))}.gov-alert[variant=warning][inverse=\"\"] .gov-alert__content,.gov-alert[variant=warning][inverse=true i] .gov-alert__content,.gov-alert[variant=warning][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=error]{background-color:var(--gov-alert-error-bg-color, var(--gov-color-error))}.gov-alert[variant=error] .gov-alert__icon{color:var(--gov-alert-error-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=error] .gov-alert__content{color:var(--gov-alert-error-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=error][inverse=\"\"],.gov-alert[variant=error][inverse=true i],.gov-alert[variant=error][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=error][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=error][inverse=true i] .gov-alert__icon,.gov-alert[variant=error][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-error-bg-color, var(--gov-color-error))}.gov-alert[variant=error][inverse=\"\"] .gov-alert__content,.gov-alert[variant=error][inverse=true i] .gov-alert__content,.gov-alert[variant=error][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=secondary]{background-color:var(--gov-alert-secondary-bg-color, var(--gov-color-secondary))}.gov-alert[variant=secondary] .gov-alert__icon{color:var(--gov-alert-secondary-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=secondary] .gov-alert__content{color:var(--gov-alert-secondary-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=secondary][inverse=\"\"],.gov-alert[variant=secondary][inverse=true i],.gov-alert[variant=secondary][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=secondary][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=secondary][inverse=true i] .gov-alert__icon,.gov-alert[variant=secondary][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-secondary-bg-color, var(--gov-color-secondary))}.gov-alert[variant=secondary][inverse=\"\"] .gov-alert__content,.gov-alert[variant=secondary][inverse=true i] .gov-alert__content,.gov-alert[variant=secondary][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=success]{background-color:var(--gov-alert-success-bg-color, var(--gov-color-success-500))}.gov-alert[variant=success] .gov-alert__icon{color:var(--gov-alert-success-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=success] .gov-alert__content{color:var(--gov-alert-success-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=success][inverse=\"\"],.gov-alert[variant=success][inverse=true i],.gov-alert[variant=success][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=success][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=success][inverse=true i] .gov-alert__icon,.gov-alert[variant=success][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-success-bg-color, var(--gov-color-success-500))}.gov-alert[variant=success][inverse=\"\"] .gov-alert__content,.gov-alert[variant=success][inverse=true i] .gov-alert__content,.gov-alert[variant=success][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=primary]{background-color:var(--gov-alert-primary-bg-color, var(--gov-color-primary))}.gov-alert[variant=primary] .gov-alert__icon{color:var(--gov-alert-primary-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=primary] .gov-alert__content{color:var(--gov-alert-primary-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=primary][inverse=\"\"],.gov-alert[variant=primary][inverse=true i],.gov-alert[variant=primary][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=primary][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=primary][inverse=true i] .gov-alert__icon,.gov-alert[variant=primary][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-primary-bg-color, var(--gov-color-primary))}.gov-alert[variant=primary][inverse=\"\"] .gov-alert__content,.gov-alert[variant=primary][inverse=true i] .gov-alert__content,.gov-alert[variant=primary][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}@media (min-width: 75em){.gov-alert__content{padding-right:2rem}}";
6244
+ var Fragment = (_, children) => [...children];
6245
+
6246
+ const govAlertCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-alert{position:relative;display:block;width:100%}.gov-alert__section{display:block;width:100%;max-width:calc(var(--gov-container-width, 73.75rem) + 2 * var(--gov-container-padding, 2.5rem));margin-right:auto;margin-left:auto;padding-right:var(--gov-container-padding-mobile, 1.25rem);padding-left:var(--gov-container-padding-mobile, 1.25rem);display:flex;gap:1rem;padding-top:1rem;padding-bottom:1rem}@media (min-width: 48em){.gov-alert__section{padding-right:var(--gov-container-padding, 2.5rem);padding-left:var(--gov-container-padding, 2.5rem)}}.gov-alert__icon{flex:0 0 auto}.gov-alert__icon>*{width:1.25rem;height:1.25rem}.gov-alert__headline{display:flex;gap:1rem}.gov-alert__headline+div{margin-top:0.5rem}.gov-alert__headline p{margin-bottom:0}.gov-alert__headline gov-button{margin-top:-0.25rem}.gov-alert__content{padding-right:3.25rem}.gov-alert__content>*:last-child{margin-bottom:0}.gov-alert__content p{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing)}.gov-alert__content a{color:inherit}@media not all and (pointer: coarse){.gov-alert__content a:hover{color:inherit}}.gov-alert__close{position:absolute;top:0.625rem;right:1rem}.gov-alert[variant=warning]{background-color:var(--gov-alert-warning-bg-color, var(--gov-color-warning))}.gov-alert[variant=warning] .gov-alert__icon{color:var(--gov-alert-warning-icon-color, var(--gov-color-secondary))}.gov-alert[variant=warning] .gov-alert__content{color:var(--gov-alert-warning-text-color, var(--gov-color-secondary))}.gov-alert[variant=warning][inverse=\"\"],.gov-alert[variant=warning][inverse=true i],.gov-alert[variant=warning][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=warning][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=warning][inverse=true i] .gov-alert__icon,.gov-alert[variant=warning][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-warning-bg-color, var(--gov-color-warning))}.gov-alert[variant=warning][inverse=\"\"] .gov-alert__content,.gov-alert[variant=warning][inverse=true i] .gov-alert__content,.gov-alert[variant=warning][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=error]{background-color:var(--gov-alert-error-bg-color, var(--gov-color-error))}.gov-alert[variant=error] .gov-alert__icon{color:var(--gov-alert-error-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=error] .gov-alert__content{color:var(--gov-alert-error-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=error][inverse=\"\"],.gov-alert[variant=error][inverse=true i],.gov-alert[variant=error][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=error][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=error][inverse=true i] .gov-alert__icon,.gov-alert[variant=error][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-error-bg-color, var(--gov-color-error))}.gov-alert[variant=error][inverse=\"\"] .gov-alert__content,.gov-alert[variant=error][inverse=true i] .gov-alert__content,.gov-alert[variant=error][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=secondary]{background-color:var(--gov-alert-secondary-bg-color, var(--gov-color-secondary))}.gov-alert[variant=secondary] .gov-alert__icon{color:var(--gov-alert-secondary-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=secondary] .gov-alert__content{color:var(--gov-alert-secondary-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=secondary][inverse=\"\"],.gov-alert[variant=secondary][inverse=true i],.gov-alert[variant=secondary][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=secondary][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=secondary][inverse=true i] .gov-alert__icon,.gov-alert[variant=secondary][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-secondary-bg-color, var(--gov-color-secondary))}.gov-alert[variant=secondary][inverse=\"\"] .gov-alert__content,.gov-alert[variant=secondary][inverse=true i] .gov-alert__content,.gov-alert[variant=secondary][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=success]{background-color:var(--gov-alert-success-bg-color, var(--gov-color-success-500))}.gov-alert[variant=success] .gov-alert__icon{color:var(--gov-alert-success-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=success] .gov-alert__content{color:var(--gov-alert-success-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=success][inverse=\"\"],.gov-alert[variant=success][inverse=true i],.gov-alert[variant=success][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=success][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=success][inverse=true i] .gov-alert__icon,.gov-alert[variant=success][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-success-bg-color, var(--gov-color-success-500))}.gov-alert[variant=success][inverse=\"\"] .gov-alert__content,.gov-alert[variant=success][inverse=true i] .gov-alert__content,.gov-alert[variant=success][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}.gov-alert[variant=primary]{background-color:var(--gov-alert-primary-bg-color, var(--gov-color-primary))}.gov-alert[variant=primary] .gov-alert__icon{color:var(--gov-alert-primary-icon-color, var(--gov-color-neutral-white))}.gov-alert[variant=primary] .gov-alert__content{color:var(--gov-alert-primary-text-color, var(--gov-color-neutral-white))}.gov-alert[variant=primary][inverse=\"\"],.gov-alert[variant=primary][inverse=true i],.gov-alert[variant=primary][inverse=\"1\"]{border-bottom:var(--gov-alert-border, 0.0625rem solid var(--gov-color-secondary-400));background-color:var(--gov-alert-inverse-bg, var(--gov-color-neutral-white))}.gov-alert[variant=primary][inverse=\"\"] .gov-alert__icon,.gov-alert[variant=primary][inverse=true i] .gov-alert__icon,.gov-alert[variant=primary][inverse=\"1\"] .gov-alert__icon{color:var(--gov-alert-primary-bg-color, var(--gov-color-primary))}.gov-alert[variant=primary][inverse=\"\"] .gov-alert__content,.gov-alert[variant=primary][inverse=true i] .gov-alert__content,.gov-alert[variant=primary][inverse=\"1\"] .gov-alert__content{color:var(--gov-alert-inverse-color, var(--gov-color-secondary-800))}@media (min-width: 75em){.gov-alert__content{padding-right:2rem}}";
6244
6247
 
6245
6248
  class GovAlert {
6246
6249
  constructor(hostRef) {
6247
6250
  registerInstance(this, hostRef);
6248
6251
  this.govClose = createEvent(this, "gov-close", 7);
6249
- this.variant = 'primary';
6252
+ this.headline = undefined;
6253
+ this.variant = "primary";
6250
6254
  this.inverse = false;
6251
6255
  this.wcagCloseLabel = undefined;
6256
+ this.wcagToggleLabel = undefined;
6252
6257
  this.closable = false;
6258
+ this.toggleContent = false;
6253
6259
  this.h = govHost(this.host);
6254
6260
  }
6255
6261
  validateVariant(newValue) {
@@ -6258,15 +6264,39 @@ class GovAlert {
6258
6264
  componentWillLoad() {
6259
6265
  this.validateVariant(this.variant);
6260
6266
  }
6267
+ async componentDidRender() {
6268
+ if (canValidateWcagOnRender()) {
6269
+ await delay(500);
6270
+ await this.validateWcag();
6271
+ }
6272
+ }
6261
6273
  render() {
6262
6274
  let inverse = !this.inverse;
6263
- let variant = this.inverse ? 'secondary' : this.variant;
6264
- if (this.variant == 'warning') {
6275
+ let variant = this.inverse ? "secondary" : this.variant;
6276
+ if (this.variant == "warning") {
6265
6277
  inverse = false;
6266
- variant = 'secondary';
6278
+ variant = "secondary";
6279
+ }
6280
+ const closeButton = (hAsync("div", { class: AlertClass.close }, hAsync("gov-button", { size: "s", "aria-label": this.wcagCloseLabel, type: "base", variant: variant, inverse: inverse, "on-gov-click": this.onCloseHandler.bind(this) }, hAsync("gov-icon", { name: "x-lg" }))));
6281
+ return (hAsync(Host, { class: this.h.classes(AlertClass.root), variant: this.variant }, hAsync("section", { class: AlertClass.section, role: "alert" }, this.h.hasSlot("icon") && (hAsync("div", { class: AlertClass.icon }, hAsync("slot", { name: "icon" }))), hAsync("div", { class: AlertClass.content }, this.headline ? (hAsync(Fragment, null, hAsync("div", { class: AlertClass.headline }, hAsync("p", null, this.headline), hAsync("gov-button", { size: "s", "aria-label": this.wcagToggleLabel, type: "base", variant: variant, inverse: inverse, "on-gov-click": () => this.toggleContent = !this.toggleContent }, hAsync("gov-icon", { name: this.toggleContent ? 'chevron-up' : 'chevron-down' }))), hAsync("div", { hidden: !this.toggleContent, "aria-hidden": toBoolAttr(this.toggleContent) }, hAsync("slot", null)))) : (hAsync("slot", null)))), this.closable && closeButton));
6282
+ }
6283
+ onCloseHandler(e) {
6284
+ this.govClose.emit({
6285
+ component: AlertClass.root,
6286
+ ref: this.host,
6287
+ originalEvent: e,
6288
+ });
6289
+ }
6290
+ /**
6291
+ * Validate the WCAG attributes of the component
6292
+ */
6293
+ async validateWcag() {
6294
+ if (this.closable) {
6295
+ validateWcagProp(this.wcagCloseLabel, 'wcag-close-label', AlertClass.root);
6296
+ }
6297
+ if (this.headline) {
6298
+ validateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', AlertClass.root);
6267
6299
  }
6268
- const closeButton = (hAsync("div", { class: AlertClass.close }, hAsync("gov-button", { size: "s", "aria-label": this.wcagCloseLabel, type: "base", variant: variant, inverse: inverse, onClick: (e) => this.govClose.emit(e) }, hAsync("gov-icon", { name: "x-lg" }))));
6269
- return (hAsync(Host, { class: this.h.classes(AlertClass.root), variant: this.variant }, hAsync("section", { class: AlertClass.section, role: "alert" }, this.h.hasSlot('icon') && (hAsync("div", { class: AlertClass.icon }, hAsync("slot", { name: "icon" }))), hAsync("div", { class: AlertClass.content }, hAsync("slot", null))), this.closable && closeButton));
6270
6300
  }
6271
6301
  get host() { return getElement(this); }
6272
6302
  static get watchers() { return {
@@ -6277,10 +6307,14 @@ class GovAlert {
6277
6307
  "$flags$": 4,
6278
6308
  "$tagName$": "gov-alert",
6279
6309
  "$members$": {
6310
+ "headline": [1],
6280
6311
  "variant": [1],
6281
6312
  "inverse": [4],
6282
6313
  "wcagCloseLabel": [1, "wcag-close-label"],
6283
- "closable": [4]
6314
+ "wcagToggleLabel": [1, "wcag-toggle-label"],
6315
+ "closable": [4],
6316
+ "toggleContent": [32],
6317
+ "validateWcag": [64]
6284
6318
  },
6285
6319
  "$listeners$": undefined,
6286
6320
  "$lazyBundleId$": "-",
@@ -9541,7 +9575,14 @@ class AlertPage extends HTMLElement {
9541
9575
  connectedCallback() {
9542
9576
  this.innerHTML = `
9543
9577
  <h2>Alert</h2>
9544
-
9578
+
9579
+ <gov-alert variant="secondary" headline="Tohle bude super nadpis pro všechno" closable>
9580
+ <gov-icon name="info" slot="icon"></gov-icon>
9581
+ <p>
9582
+ Secondary - Od 20. 12. 2020 do 14:00 h do 20.&nbsp;12. 2020 do 15:00 h bude provedena plánovaná odstávka serverů. V&nbsp;uvedeném termínu bude nedostupné přihlášení k&nbsp;Portálu občana prostřednictvím datové schránky. Více informací <a href="#">zde</a>.
9583
+ </p>
9584
+ </gov-alert>
9585
+ <br>
9545
9586
  <gov-alert variant="secondary" closable>
9546
9587
  <gov-icon name="info" slot="icon"></gov-icon>
9547
9588
  <p>
@@ -15748,8 +15789,6 @@ const govForm = (govHost) => {
15748
15789
  };
15749
15790
  };
15750
15791
 
15751
- var Fragment = (_, children) => [...children];
15752
-
15753
15792
  const govFormCheckboxCss = ".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-form-checkbox{cursor:pointer}.gov-form-checkbox input{position:absolute;top:0;left:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gov-form-checkbox input+span{position:relative;display:block}.gov-form-checkbox input+span::before{content:\"\";position:absolute;display:block;top:0;left:0;border:var(--gov-form-checkbox-border-size, 0.125rem solid var(--gov-color-primary));background-color:var(--gov-form-checkbox-background-color, var(--gov-color-neutral-white));transition:150ms linear border-color, 150ms linear background-color, 150ms linear outline-color}.gov-form-checkbox .gov-form-label__label{position:relative;z-index:1;width:100%}.gov-form-checkbox input:focus-visible+span::before{outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base)}[invalid=\"\"].gov-form-checkbox .gov-form-label__label,[invalid=true i].gov-form-checkbox .gov-form-label__label,[invalid=\"1\"].gov-form-checkbox .gov-form-label__label{color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=\"\"].gov-form-checkbox input+span::before,[invalid=true i].gov-form-checkbox input+span::before,[invalid=\"1\"].gov-form-checkbox input+span::before{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}[disabled=\"\"].gov-form-checkbox,[disabled=true i].gov-form-checkbox,[disabled=\"1\"].gov-form-checkbox{pointer-events:none}[disabled=\"\"].gov-form-checkbox .gov-form-label__label,[disabled=true i].gov-form-checkbox .gov-form-label__label,[disabled=\"1\"].gov-form-checkbox .gov-form-label__label{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=\"\"].gov-form-checkbox input+span::before,[disabled=true i].gov-form-checkbox input+span::before,[disabled=\"1\"].gov-form-checkbox input+span::before{border-color:var(--gov-form-input-disabled-bg, var(--gov-color-primary-400))}[size=xs].gov-form-checkbox{font-weight:var(--gov-text-xs-font-weight);font-size:var(--gov-text-xs-font-size);line-height:var(--gov-text-xs-line-height);letter-spacing:var(--gov-text-xs-letter-spacing);display:block;min-width:var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem);min-height:var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem)}[size=xs].gov-form-checkbox .gov-form-label__label{padding-top:calc((var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) - var(--gov-text-xs-font-size) * 1.5) / 2);padding-left:calc(var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) + var(--gov-form-checkbox-core-xs-gap, 0.75rem))}[size=xs].gov-form-checkbox input+span::before{width:var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem);height:var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem)}[size=s].gov-form-checkbox{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);display:block;min-width:var(--gov-form-checkbox-core-s-indicator-size, 1.375rem);min-height:var(--gov-form-checkbox-core-s-indicator-size, 1.375rem)}[size=s].gov-form-checkbox .gov-form-label__label{padding-top:calc((var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) - var(--gov-text-s-font-size) * 1.5) / 2);padding-left:calc(var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) + var(--gov-form-checkbox-core-s-gap, 0.75rem))}[size=s].gov-form-checkbox input+span::before{width:var(--gov-form-checkbox-core-s-indicator-size, 1.375rem);height:var(--gov-form-checkbox-core-s-indicator-size, 1.375rem)}[size=m].gov-form-checkbox{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);display:block;min-width:var(--gov-form-checkbox-core-m-indicator-size, 1.5rem);min-height:var(--gov-form-checkbox-core-m-indicator-size, 1.5rem)}[size=m].gov-form-checkbox .gov-form-label__label{padding-top:calc((var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) - var(--gov-text-m-font-size) * 1.5) / 2);padding-left:calc(var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) + var(--gov-form-checkbox-core-m-gap, 1rem))}[size=m].gov-form-checkbox input+span::before{width:var(--gov-form-checkbox-core-m-indicator-size, 1.5rem);height:var(--gov-form-checkbox-core-m-indicator-size, 1.5rem)}[size=l].gov-form-checkbox{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);display:block;min-width:var(--gov-form-checkbox-core-l-indicator-size, 2rem);min-height:var(--gov-form-checkbox-core-l-indicator-size, 2rem)}[size=l].gov-form-checkbox .gov-form-label__label{padding-top:calc((var(--gov-form-checkbox-core-l-indicator-size, 2rem) - var(--gov-text-l-font-size) * 1.5) / 2);padding-left:calc(var(--gov-form-checkbox-core-l-indicator-size, 2rem) + var(--gov-form-checkbox-core-l-gap, 1rem))}[size=l].gov-form-checkbox input+span::before{width:var(--gov-form-checkbox-core-l-indicator-size, 2rem);height:var(--gov-form-checkbox-core-l-indicator-size, 2rem)}.gov-form-checkbox input+span::before{border-radius:var(--gov-border-radius, 0.1875rem)}.gov-form-checkbox__check{position:absolute;color:var(--gov-form-checkbox-check-color, var(--gov-color-neutral-white));opacity:0;transition:150ms linear opacity}.gov-form-checkbox input:checked+span::before{background:var(--gov-form-checkbox-indicator-bg, var(--gov-color-primary))}input:checked+span .gov-form-checkbox__check{opacity:1}.gov-form-checkbox[invalid=\"\"] input:checked+span::before,.gov-form-checkbox[invalid=true i] input:checked+span::before,.gov-form-checkbox[invalid=\"1\"] input:checked+span::before{background:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-checkbox[disabled=\"\"] input:checked+span::before,.gov-form-checkbox[disabled=true i] input:checked+span::before,.gov-form-checkbox[disabled=\"1\"] input:checked+span::before{border-color:var(--gov-form-input-disabled-bg, var(--gov-color-primary-400));background-color:var(--gov-form-input-disabled-bg, var(--gov-color-primary-400))}.gov-form-checkbox[size=xs] .gov-form-checkbox__check{top:calc((var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) - var(--gov-form-checkbox-core-xs-check-size, 0.75rem)) / 2);left:calc((var(--gov-form-checkbox-core-xs-indicator-size, 1.25rem) - var(--gov-form-checkbox-core-xs-check-size, 0.75rem)) / 2);width:var(--gov-form-checkbox-core-xs-check-size, 0.75rem);height:var(--gov-form-checkbox-core-xs-check-size, 0.75rem)}.gov-form-checkbox[size=s] .gov-form-checkbox__check{top:calc((var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) - var(--gov-form-checkbox-core-s-check-size, 0.825rem)) / 2);left:calc((var(--gov-form-checkbox-core-s-indicator-size, 1.375rem) - var(--gov-form-checkbox-core-s-check-size, 0.825rem)) / 2);width:var(--gov-form-checkbox-core-s-check-size, 0.825rem);height:var(--gov-form-checkbox-core-s-check-size, 0.825rem)}.gov-form-checkbox[size=m] .gov-form-checkbox__check{top:calc((var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) - var(--gov-form-checkbox-core-m-check-size, 0.9rem)) / 2);left:calc((var(--gov-form-checkbox-core-m-indicator-size, 1.5rem) - var(--gov-form-checkbox-core-m-check-size, 0.9rem)) / 2);width:var(--gov-form-checkbox-core-m-check-size, 0.9rem);height:var(--gov-form-checkbox-core-m-check-size, 0.9rem)}.gov-form-checkbox[size=l] .gov-form-checkbox__check{top:calc((var(--gov-form-checkbox-core-l-indicator-size, 2rem) - var(--gov-form-checkbox-core-l-check-size, 1.2rem)) / 2);left:calc((var(--gov-form-checkbox-core-l-indicator-size, 2rem) - var(--gov-form-checkbox-core-l-check-size, 1.2rem)) / 2);width:var(--gov-form-checkbox-core-l-check-size, 1.2rem);height:var(--gov-form-checkbox-core-l-check-size, 1.2rem)}";
15754
15793
 
15755
15794
  class GovFormCheckbox {
@@ -17451,11 +17490,10 @@ class GovModal {
17451
17490
  this.label = undefined;
17452
17491
  this.role = "dialog";
17453
17492
  this.labelTag = "h2";
17454
- this.wcaglabelledBy = undefined;
17493
+ this.wcagLabelledBy = undefined;
17455
17494
  this.wcagDescribedBy = undefined;
17456
17495
  this.wcagCloseLabel = undefined;
17457
17496
  this.wcagCloseLabelledBy = undefined;
17458
- this.modalVisible = false;
17459
17497
  this.h = govHost(this.host);
17460
17498
  this.labelId = createID("GovModalLabel");
17461
17499
  this.contentId = createID("GovModalContent");
@@ -17469,18 +17507,18 @@ class GovModal {
17469
17507
  }
17470
17508
  }
17471
17509
  watchOpen(newValue) {
17472
- this.modalVisible = newValue;
17510
+ this.open = newValue;
17473
17511
  }
17474
17512
  showModal() {
17475
- this.modalVisible = true;
17513
+ this.open = true;
17476
17514
  document.body.classList.add(ModalClass.bodyFix);
17477
17515
  }
17478
17516
  hideModal() {
17479
- this.modalVisible = false;
17517
+ this.open = false;
17480
17518
  document.body.classList.remove(ModalClass.bodyFix);
17481
17519
  }
17482
17520
  async componentWillRender() {
17483
- if (this.modalVisible) {
17521
+ if (this.open) {
17484
17522
  this.showModal();
17485
17523
  }
17486
17524
  else {
@@ -17488,7 +17526,6 @@ class GovModal {
17488
17526
  }
17489
17527
  }
17490
17528
  async componentDidRender() {
17491
- this.modalVisible = this.open;
17492
17529
  if (canValidateWcagOnRender()) {
17493
17530
  await delay(500);
17494
17531
  await this.validateWcag();
@@ -17496,7 +17533,7 @@ class GovModal {
17496
17533
  }
17497
17534
  render() {
17498
17535
  const LabelTag = this.labelTag;
17499
- return (hAsync(Host, { class: this.h.classes(ModalClass.root), open: this.modalVisible }, hAsync("dialog", { class: ModalClass.dialog, hidden: !this.modalVisible, tabindex: "-1", open: this.modalVisible, "aria-modal": "true", "aria-hidden": toBoolAttr(!this.modalVisible), "aria-labelledby": this.wcaglabelledBy || this.labelId, "aria-describedby": this.wcagDescribedBy || this.contentId, role: this.role }, hAsync("div", { class: ModalClass.inner }, hAsync("div", { class: ModalClass.header }, this.h.hasSlot("icon") && (hAsync("div", { class: ModalClass.icon }, hAsync("slot", { name: "icon" }))), this.label && (hAsync(LabelTag, { class: ModalClass.title, id: this.labelId }, this.label)), hAsync("gov-button", { class: ModalClass.close, variant: "primary", wcagLabel: this.wcagCloseLabel, wcagLabelledBy: this.wcagCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, hAsync("gov-icon", { name: "x-lg" }))), hAsync("div", { class: ModalClass.content, id: this.contentId }, hAsync("slot", null)))), this.modalVisible ? (hAsync("gov-backdrop", { "wcag-label": this.wcagCloseLabel, "wcag-labelled-by": this.wcagCloseLabelledBy, "on-gov-click": this.onCloseHandler.bind(this) })) : null));
17536
+ return (hAsync(Host, { class: this.h.classes(ModalClass.root), open: this.open }, hAsync("dialog", { class: ModalClass.dialog, hidden: !this.open, tabindex: "-1", open: this.open, "aria-modal": "true", "aria-hidden": toBoolAttr(!this.open), "aria-labelledby": this.wcagLabelledBy || this.labelId, "aria-describedby": this.wcagDescribedBy || this.contentId, role: this.role }, hAsync("div", { class: ModalClass.inner }, hAsync("div", { class: ModalClass.header }, this.h.hasSlot("icon") && (hAsync("div", { class: ModalClass.icon }, hAsync("slot", { name: "icon" }))), this.label && (hAsync(LabelTag, { class: ModalClass.title, id: this.labelId }, this.label)), hAsync("gov-button", { class: ModalClass.close, variant: "primary", wcagLabel: this.wcagCloseLabel, wcagLabelledBy: this.wcagCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, hAsync("gov-icon", { name: "x-lg" }))), hAsync("div", { class: ModalClass.content, id: this.contentId }, hAsync("slot", null)))), this.open ? (hAsync("gov-backdrop", { "wcag-label": this.wcagCloseLabel, "wcag-labelled-by": this.wcagCloseLabelledBy, "on-gov-click": this.onCloseHandler.bind(this) })) : null));
17500
17537
  }
17501
17538
  onCloseHandler(e) {
17502
17539
  e.stopPropagation();
@@ -17510,7 +17547,7 @@ class GovModal {
17510
17547
  this.showModal();
17511
17548
  }
17512
17549
  /**
17513
- * Hidding the modal
17550
+ * Hiding the modal
17514
17551
  */
17515
17552
  async hide() {
17516
17553
  this.hideModal();
@@ -17519,8 +17556,8 @@ class GovModal {
17519
17556
  * Validate the WCAG attributes of the component
17520
17557
  */
17521
17558
  async validateWcag() {
17522
- validateWcagRef(this.wcaglabelledBy, "aria-labelledby", ModalClass.root);
17523
- validateWcagRef(this.wcagDescribedBy, "aria-describedby", ModalClass.root);
17559
+ validateWcagRef(this.wcagLabelledBy, "wcag-labelled-by", ModalClass.root);
17560
+ validateWcagRef(this.wcagDescribedBy, "wcag-described-by", ModalClass.root);
17524
17561
  }
17525
17562
  get host() { return getElement(this); }
17526
17563
  static get watchers() { return {
@@ -17532,15 +17569,14 @@ class GovModal {
17532
17569
  "$flags$": 4,
17533
17570
  "$tagName$": "gov-modal",
17534
17571
  "$members$": {
17535
- "open": [4],
17572
+ "open": [1028],
17536
17573
  "label": [1],
17537
17574
  "role": [1],
17538
17575
  "labelTag": [1, "label-tag"],
17539
- "wcaglabelledBy": [1, "wcag-labelled-by"],
17576
+ "wcagLabelledBy": [1, "wcag-labelled-by"],
17540
17577
  "wcagDescribedBy": [1, "wcag-described-by"],
17541
17578
  "wcagCloseLabel": [1, "wcag-close-label"],
17542
17579
  "wcagCloseLabelledBy": [1, "wcag-close-labelled-by"],
17543
- "modalVisible": [32],
17544
17580
  "show": [64],
17545
17581
  "hide": [64],
17546
17582
  "validateWcag": [64]
@@ -17868,11 +17904,10 @@ class GovPrompt {
17868
17904
  this.label = undefined;
17869
17905
  this.role = "dialog";
17870
17906
  this.labelTag = "h2";
17871
- this.wcaglabelledBy = undefined;
17907
+ this.wcagLabelledBy = undefined;
17872
17908
  this.wcagDescribedBy = undefined;
17873
17909
  this.wcagCloseLabel = undefined;
17874
17910
  this.wcagCloseLabelledBy = undefined;
17875
- this.modalVisible = false;
17876
17911
  this.h = govHost(this.host);
17877
17912
  this.labelId = createID("GovPromptLabel");
17878
17913
  this.contentId = createID("GovPromptContent");
@@ -17886,18 +17921,18 @@ class GovPrompt {
17886
17921
  }
17887
17922
  }
17888
17923
  watchOpen(newValue) {
17889
- this.modalVisible = newValue;
17924
+ this.open = newValue;
17890
17925
  }
17891
17926
  showModal() {
17892
- this.modalVisible = true;
17927
+ this.open = true;
17893
17928
  document.body.classList.add(ModalClass.bodyFix);
17894
17929
  }
17895
17930
  hideModal() {
17896
- this.modalVisible = false;
17931
+ this.open = false;
17897
17932
  document.body.classList.remove(ModalClass.bodyFix);
17898
17933
  }
17899
17934
  async componentWillRender() {
17900
- if (this.modalVisible) {
17935
+ if (this.open) {
17901
17936
  this.showModal();
17902
17937
  }
17903
17938
  else {
@@ -17905,7 +17940,6 @@ class GovPrompt {
17905
17940
  }
17906
17941
  }
17907
17942
  async componentDidRender() {
17908
- this.modalVisible = this.open;
17909
17943
  if (canValidateWcagOnRender()) {
17910
17944
  await delay(500);
17911
17945
  await this.validateWcag();
@@ -17913,7 +17947,7 @@ class GovPrompt {
17913
17947
  }
17914
17948
  render() {
17915
17949
  const LabelTag = this.labelTag;
17916
- return (hAsync(Host, { class: this.h.classes(ModalClass.rootPrompt), open: this.modalVisible }, hAsync("dialog", { class: ModalClass.dialog, hidden: !this.modalVisible, tabindex: "-1", open: this.modalVisible, "aria-modal": "true", "aria-hidden": toBoolAttr(!this.modalVisible), "aria-labelledby": this.wcaglabelledBy || this.labelId, "aria-describedby": this.wcagDescribedBy || this.contentId, role: this.role }, hAsync("div", { class: ModalClass.inner }, hAsync("div", { class: ModalClass.header }, this.h.hasSlot("icon") && (hAsync("div", { class: ModalClass.icon }, hAsync("slot", { name: "icon" }))), this.label && (hAsync(LabelTag, { class: ModalClass.title, id: this.labelId }, this.label)), hAsync("gov-button", { class: ModalClass.close, variant: "primary", wcagLabel: this.wcagCloseLabel, wcagLabelledBy: this.wcagCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, hAsync("gov-icon", { name: "x-lg" }))), hAsync("div", { class: ModalClass.content, id: this.contentId }, hAsync("slot", null)), hAsync("div", { class: ModalClass.actions }, hAsync("slot", { name: "actions" })))), this.modalVisible ? (hAsync("gov-backdrop", { "wcag-label": this.wcagCloseLabel, "wcag-labelled-by": this.wcagCloseLabelledBy, "on-gov-click": this.onCloseHandler.bind(this) })) : null));
17950
+ return (hAsync(Host, { class: this.h.classes(ModalClass.rootPrompt), open: this.open }, hAsync("dialog", { class: ModalClass.dialog, hidden: !this.open, tabindex: "-1", open: this.open, "aria-modal": "true", "aria-hidden": toBoolAttr(!this.open), "aria-labelledby": this.wcagLabelledBy || this.labelId, "aria-describedby": this.wcagDescribedBy || this.contentId, role: this.role }, hAsync("div", { class: ModalClass.inner }, hAsync("div", { class: ModalClass.header }, this.h.hasSlot("icon") && (hAsync("div", { class: ModalClass.icon }, hAsync("slot", { name: "icon" }))), this.label && (hAsync(LabelTag, { class: ModalClass.title, id: this.labelId }, this.label)), hAsync("gov-button", { class: ModalClass.close, variant: "primary", wcagLabel: this.wcagCloseLabel, wcagLabelledBy: this.wcagCloseLabelledBy, type: "base", "on-gov-click": this.onCloseHandler.bind(this) }, hAsync("gov-icon", { name: "x-lg" }))), hAsync("div", { class: ModalClass.content, id: this.contentId }, hAsync("slot", null)), hAsync("div", { class: ModalClass.actions }, hAsync("slot", { name: "actions" })))), this.open ? (hAsync("gov-backdrop", { "wcag-label": this.wcagCloseLabel, "wcag-labelled-by": this.wcagCloseLabelledBy, "on-gov-click": this.onCloseHandler.bind(this) })) : null));
17917
17951
  }
17918
17952
  onCloseHandler(e) {
17919
17953
  e.stopPropagation();
@@ -17927,7 +17961,7 @@ class GovPrompt {
17927
17961
  this.showModal();
17928
17962
  }
17929
17963
  /**
17930
- * Hidding the modal
17964
+ * Hiding the modal
17931
17965
  */
17932
17966
  async hide() {
17933
17967
  this.hideModal();
@@ -17936,8 +17970,8 @@ class GovPrompt {
17936
17970
  * Validate the WCAG attributes of the component
17937
17971
  */
17938
17972
  async validateWcag() {
17939
- validateWcagRef(this.wcaglabelledBy, "aria-labelledby", ModalClass.root);
17940
- validateWcagRef(this.wcagDescribedBy, "aria-describedby", ModalClass.root);
17973
+ validateWcagRef(this.wcagLabelledBy, "wcag-labelled-by", ModalClass.root);
17974
+ validateWcagRef(this.wcagDescribedBy, "wcag-described-by", ModalClass.root);
17941
17975
  }
17942
17976
  get host() { return getElement(this); }
17943
17977
  static get watchers() { return {
@@ -17949,15 +17983,14 @@ class GovPrompt {
17949
17983
  "$flags$": 4,
17950
17984
  "$tagName$": "gov-prompt",
17951
17985
  "$members$": {
17952
- "open": [4],
17986
+ "open": [1028],
17953
17987
  "label": [1],
17954
17988
  "role": [1],
17955
17989
  "labelTag": [1, "label-tag"],
17956
- "wcaglabelledBy": [1, "wcag-labelled-by"],
17990
+ "wcagLabelledBy": [1, "wcag-labelled-by"],
17957
17991
  "wcagDescribedBy": [1, "wcag-described-by"],
17958
17992
  "wcagCloseLabel": [1, "wcag-close-label"],
17959
17993
  "wcagCloseLabelledBy": [1, "wcag-close-labelled-by"],
17960
- "modalVisible": [32],
17961
17994
  "show": [64],
17962
17995
  "hide": [64],
17963
17996
  "validateWcag": [64]
@@ -7,5 +7,6 @@ export declare const AlertClass: {
7
7
  section: string;
8
8
  icon: string;
9
9
  content: string;
10
+ headline: string;
10
11
  close: string;
11
12
  };
@@ -1,30 +1,47 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { VariantType } from './constants';
1
+ import { EventEmitter } from "../../stencil-public-runtime";
2
+ import { VariantType } from "./constants";
3
+ import { AlertEvent } from "./gov-alert.types";
4
+ import { ButtonEvent } from "../gov-button/gov-button.types";
3
5
  export declare class GovAlert {
4
6
  private h;
5
7
  constructor();
6
8
  host: HTMLGovAlertElement;
9
+ /**
10
+ * Style variation of the button.
11
+ */
12
+ readonly headline: string;
7
13
  /**
8
14
  * Style variation of the button.
9
15
  */
10
16
  readonly variant: VariantType;
11
17
  /**
12
- * Determide if component should have inversed colors to be used on dark background
18
+ * Determine if component should have inverse colors to be used on dark background
13
19
  */
14
20
  readonly inverse: boolean;
15
21
  /**
16
22
  * Aria label for the closing button. It is mandatory if the alert is closable
17
23
  */
18
24
  readonly wcagCloseLabel: string;
25
+ /**
26
+ * Aria label for the toggle button. It is mandatory if the alert has headline
27
+ */
28
+ readonly wcagToggleLabel: string;
19
29
  /**
20
30
  * Called when the close button is clicked
21
31
  */
22
- govClose: EventEmitter<PointerEvent>;
32
+ govClose: EventEmitter<AlertEvent>;
23
33
  /**
24
34
  * Displays the option to close the alert
25
35
  */
26
36
  readonly closable?: boolean;
37
+ toggleContent: boolean;
27
38
  validateVariant(newValue: string): void;
28
39
  componentWillLoad(): void;
40
+ componentDidRender(): Promise<void>;
29
41
  render(): any;
42
+ onCloseHandler(e: CustomEvent<ButtonEvent>): void;
43
+ /**
44
+ * Validate the WCAG attributes of the component
45
+ */
46
+ validateWcag(): Promise<void>;
30
47
  }
@@ -0,0 +1,4 @@
1
+ import { GovBaseEvent } from "../../types/event.types";
2
+ export interface AlertEvent extends GovBaseEvent {
3
+ ref: HTMLGovAlertElement;
4
+ }
@@ -18,13 +18,13 @@ export declare class GovModal {
18
18
  */
19
19
  role: string;
20
20
  /**
21
- * Used to change the HMTL tag in the modal label for correct semantic structure
21
+ * Used to change the HTML tag in the modal label for correct semantic structure
22
22
  */
23
23
  readonly labelTag: string;
24
24
  /**
25
25
  * String of id's that indicate alternative labels elements
26
26
  */
27
- wcaglabelledBy: string;
27
+ wcagLabelledBy: string;
28
28
  /**
29
29
  * Indicates the id of a component that describes the modal.
30
30
  */
@@ -41,7 +41,6 @@ export declare class GovModal {
41
41
  * Emitted when modal window closes.
42
42
  */
43
43
  govClose: EventEmitter<PointerEvent>;
44
- modalVisible: boolean;
45
44
  validateLabelTag(newValue: string): void;
46
45
  watchOpen(newValue: boolean): void;
47
46
  private showModal;
@@ -55,7 +54,7 @@ export declare class GovModal {
55
54
  */
56
55
  show(): Promise<void>;
57
56
  /**
58
- * Hidding the modal
57
+ * Hiding the modal
59
58
  */
60
59
  hide(): Promise<void>;
61
60
  /**
@@ -18,13 +18,13 @@ export declare class GovPrompt {
18
18
  */
19
19
  role: string;
20
20
  /**
21
- * Used to change the HMTL tag in the modal label for correct semantic structure
21
+ * Used to change the HTML tag in the modal label for correct semantic structure
22
22
  */
23
23
  readonly labelTag: string;
24
24
  /**
25
25
  * String of id's that indicate alternative labels elements
26
26
  */
27
- wcaglabelledBy: string;
27
+ wcagLabelledBy: string;
28
28
  /**
29
29
  * Indicates the id of a component that describes the modal.
30
30
  */
@@ -41,7 +41,6 @@ export declare class GovPrompt {
41
41
  * Emitted when modal window closes.
42
42
  */
43
43
  govClose: EventEmitter<PointerEvent>;
44
- modalVisible: boolean;
45
44
  validateLabelTag(newValue: string): void;
46
45
  watchOpen(newValue: boolean): void;
47
46
  private showModal;
@@ -55,7 +54,7 @@ export declare class GovPrompt {
55
54
  */
56
55
  show(): Promise<void>;
57
56
  /**
58
- * Hidding the modal
57
+ * Hiding the modal
59
58
  */
60
59
  hide(): Promise<void>;
61
60
  /**
@@ -8,6 +8,7 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { AccordionSizeType, AccordionVariantType } from "./components/gov-accordion/constants";
9
9
  import { AccordionEvent, AccordionItemEvent } from "./components/gov-accordion/gov-accordion.types";
10
10
  import { VariantType } from "./components/gov-alert/constants";
11
+ import { AlertEvent } from "./components/gov-alert/gov-alert.types";
11
12
  import { ButtonSizesType, ButtonTargetType, ButtonVariantType, NativeTypesType as NativeTypesType1, TypesType } from "./components/gov-button/constants";
12
13
  import { NativeTypesType } from "./components/gov-badge/constants";
13
14
  import { GovBreadcrumbsChangeEvent } from "./components/gov-breadcrumbs/gov-breadcrumbs.d";
@@ -136,9 +137,17 @@ export namespace Components {
136
137
  */
137
138
  "closable"?: boolean;
138
139
  /**
139
- * Determide if component should have inversed colors to be used on dark background
140
+ * Style variation of the button.
141
+ */
142
+ "headline": string;
143
+ /**
144
+ * Determine if component should have inverse colors to be used on dark background
140
145
  */
141
146
  "inverse": boolean;
147
+ /**
148
+ * Validate the WCAG attributes of the component
149
+ */
150
+ "validateWcag": () => Promise<void>;
142
151
  /**
143
152
  * Style variation of the button.
144
153
  */
@@ -147,6 +156,10 @@ export namespace Components {
147
156
  * Aria label for the closing button. It is mandatory if the alert is closable
148
157
  */
149
158
  "wcagCloseLabel": string;
159
+ /**
160
+ * Aria label for the toggle button. It is mandatory if the alert has headline
161
+ */
162
+ "wcagToggleLabel": string;
150
163
  }
151
164
  interface GovApp {
152
165
  }
@@ -1178,7 +1191,7 @@ export namespace Components {
1178
1191
  }
1179
1192
  interface GovModal {
1180
1193
  /**
1181
- * Hidding the modal
1194
+ * Hiding the modal
1182
1195
  */
1183
1196
  "hide": () => Promise<void>;
1184
1197
  /**
@@ -1186,7 +1199,7 @@ export namespace Components {
1186
1199
  */
1187
1200
  "label": string;
1188
1201
  /**
1189
- * Used to change the HMTL tag in the modal label for correct semantic structure
1202
+ * Used to change the HTML tag in the modal label for correct semantic structure
1190
1203
  */
1191
1204
  "labelTag": string;
1192
1205
  /**
@@ -1220,7 +1233,7 @@ export namespace Components {
1220
1233
  /**
1221
1234
  * String of id's that indicate alternative labels elements
1222
1235
  */
1223
- "wcaglabelledBy": string;
1236
+ "wcagLabelledBy": string;
1224
1237
  }
1225
1238
  interface GovNav {
1226
1239
  /**
@@ -1303,7 +1316,7 @@ export namespace Components {
1303
1316
  }
1304
1317
  interface GovPrompt {
1305
1318
  /**
1306
- * Hidding the modal
1319
+ * Hiding the modal
1307
1320
  */
1308
1321
  "hide": () => Promise<void>;
1309
1322
  /**
@@ -1311,7 +1324,7 @@ export namespace Components {
1311
1324
  */
1312
1325
  "label": string;
1313
1326
  /**
1314
- * Used to change the HMTL tag in the modal label for correct semantic structure
1327
+ * Used to change the HTML tag in the modal label for correct semantic structure
1315
1328
  */
1316
1329
  "labelTag": string;
1317
1330
  /**
@@ -1345,7 +1358,7 @@ export namespace Components {
1345
1358
  /**
1346
1359
  * String of id's that indicate alternative labels elements
1347
1360
  */
1348
- "wcaglabelledBy": string;
1361
+ "wcagLabelledBy": string;
1349
1362
  }
1350
1363
  interface GovSideNav {
1351
1364
  /**
@@ -2360,13 +2373,17 @@ declare namespace LocalJSX {
2360
2373
  */
2361
2374
  "closable"?: boolean;
2362
2375
  /**
2363
- * Determide if component should have inversed colors to be used on dark background
2376
+ * Style variation of the button.
2377
+ */
2378
+ "headline"?: string;
2379
+ /**
2380
+ * Determine if component should have inverse colors to be used on dark background
2364
2381
  */
2365
2382
  "inverse"?: boolean;
2366
2383
  /**
2367
2384
  * Called when the close button is clicked
2368
2385
  */
2369
- "onGov-close"?: (event: GovAlertCustomEvent<PointerEvent>) => void;
2386
+ "onGov-close"?: (event: GovAlertCustomEvent<AlertEvent>) => void;
2370
2387
  /**
2371
2388
  * Style variation of the button.
2372
2389
  */
@@ -2375,6 +2392,10 @@ declare namespace LocalJSX {
2375
2392
  * Aria label for the closing button. It is mandatory if the alert is closable
2376
2393
  */
2377
2394
  "wcagCloseLabel"?: string;
2395
+ /**
2396
+ * Aria label for the toggle button. It is mandatory if the alert has headline
2397
+ */
2398
+ "wcagToggleLabel"?: string;
2378
2399
  }
2379
2400
  interface GovApp {
2380
2401
  }
@@ -3408,7 +3429,7 @@ declare namespace LocalJSX {
3408
3429
  */
3409
3430
  "label"?: string;
3410
3431
  /**
3411
- * Used to change the HMTL tag in the modal label for correct semantic structure
3432
+ * Used to change the HTML tag in the modal label for correct semantic structure
3412
3433
  */
3413
3434
  "labelTag"?: string;
3414
3435
  /**
@@ -3438,7 +3459,7 @@ declare namespace LocalJSX {
3438
3459
  /**
3439
3460
  * String of id's that indicate alternative labels elements
3440
3461
  */
3441
- "wcaglabelledBy"?: string;
3462
+ "wcagLabelledBy"?: string;
3442
3463
  }
3443
3464
  interface GovNav {
3444
3465
  /**
@@ -3521,7 +3542,7 @@ declare namespace LocalJSX {
3521
3542
  */
3522
3543
  "label"?: string;
3523
3544
  /**
3524
- * Used to change the HMTL tag in the modal label for correct semantic structure
3545
+ * Used to change the HTML tag in the modal label for correct semantic structure
3525
3546
  */
3526
3547
  "labelTag"?: string;
3527
3548
  /**
@@ -3551,7 +3572,7 @@ declare namespace LocalJSX {
3551
3572
  /**
3552
3573
  * String of id's that indicate alternative labels elements
3553
3574
  */
3554
- "wcaglabelledBy"?: string;
3575
+ "wcagLabelledBy"?: string;
3555
3576
  }
3556
3577
  interface GovSideNav {
3557
3578
  /**
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name" : "@gov-design-system-ce/components",
3
3
  "description" : "This package includes Gov Design System Web Components and related utilities.",
4
4
  "author": "Zdeněk Vítek",
5
- "version" : "0.0.19",
5
+ "version" : "0.0.21",
6
6
  "license" : "EUPL v1.2 Licensed",
7
7
  "main" : "./dist/index.cjs.js",
8
8
  "module" : "./dist/index.js",