@gov-design-system-ce/components 0.0.41 → 0.0.43

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 (186) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/gov-app.cjs.entry.js +11 -4
  3. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gov-dropdown.cjs.entry.js +7 -1
  5. package/dist/cjs/gov-dropdown.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gov-form-file.cjs.entry.js +3 -2
  7. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  9. package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
  10. package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
  11. package/dist/cjs/gov-wizzard-item.cjs.entry.js +1 -1
  12. package/dist/cjs/gov-wizzard-item.cjs.entry.js.map +1 -1
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/collection/components/gov-button/dropdown/gov-dropdown.js +28 -3
  15. package/dist/collection/components/gov-button/dropdown/gov-dropdown.js.map +1 -1
  16. package/dist/collection/components/gov-form/file/gov-form-file.js +23 -1
  17. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  18. package/dist/collection/components/gov-stepper/gov-stepper-item.css +7 -0
  19. package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +7 -0
  20. package/dist/collection/pages/Forms.js +9 -2
  21. package/dist/collection/pages/Forms.js.map +1 -1
  22. package/dist/collection/pages/Wizzard.js +2 -2
  23. package/dist/collection/pages/Wizzard.js.map +1 -1
  24. package/dist/collection/utils/file.utils.js +1 -1
  25. package/dist/collection/utils/file.utils.js.map +1 -1
  26. package/dist/components/gov-accordion-item.js +0 -1
  27. package/dist/components/gov-accordion-item.js.map +1 -1
  28. package/dist/components/gov-accordion.js +0 -1
  29. package/dist/components/gov-accordion.js.map +1 -1
  30. package/dist/components/gov-alert.js +0 -1
  31. package/dist/components/gov-alert.js.map +1 -1
  32. package/dist/components/gov-app.js +11 -5
  33. package/dist/components/gov-app.js.map +1 -1
  34. package/dist/components/gov-attachments-item2.js +0 -1
  35. package/dist/components/gov-attachments-item2.js.map +1 -1
  36. package/dist/components/gov-attachments2.js +0 -1
  37. package/dist/components/gov-attachments2.js.map +1 -1
  38. package/dist/components/gov-backdrop2.js +0 -1
  39. package/dist/components/gov-backdrop2.js.map +1 -1
  40. package/dist/components/gov-badge2.js +0 -1
  41. package/dist/components/gov-badge2.js.map +1 -1
  42. package/dist/components/gov-breadcrumbs.js +0 -1
  43. package/dist/components/gov-breadcrumbs.js.map +1 -1
  44. package/dist/components/gov-button2.js +0 -1
  45. package/dist/components/gov-button2.js.map +1 -1
  46. package/dist/components/gov-card.js +0 -1
  47. package/dist/components/gov-card.js.map +1 -1
  48. package/dist/components/gov-container.js +0 -1
  49. package/dist/components/gov-container.js.map +1 -1
  50. package/dist/components/gov-control-group.js +0 -1
  51. package/dist/components/gov-control-group.js.map +1 -1
  52. package/dist/components/gov-cookiebar.js +0 -1
  53. package/dist/components/gov-cookiebar.js.map +1 -1
  54. package/dist/components/gov-dropdown.js +9 -3
  55. package/dist/components/gov-dropdown.js.map +1 -1
  56. package/dist/components/gov-empty.js +0 -1
  57. package/dist/components/gov-empty.js.map +1 -1
  58. package/dist/components/gov-error-code.js +0 -1
  59. package/dist/components/gov-error-code.js.map +1 -1
  60. package/dist/components/gov-form-autocomplete2.js +0 -1
  61. package/dist/components/gov-form-autocomplete2.js.map +1 -1
  62. package/dist/components/gov-form-checkbox.js +0 -1
  63. package/dist/components/gov-form-checkbox.js.map +1 -1
  64. package/dist/components/gov-form-control.js +0 -1
  65. package/dist/components/gov-form-control.js.map +1 -1
  66. package/dist/components/gov-form-file.js +4 -3
  67. package/dist/components/gov-form-file.js.map +1 -1
  68. package/dist/components/gov-form-group.js +0 -1
  69. package/dist/components/gov-form-group.js.map +1 -1
  70. package/dist/components/gov-form-input2.js +0 -1
  71. package/dist/components/gov-form-input2.js.map +1 -1
  72. package/dist/components/gov-form-label.js +0 -1
  73. package/dist/components/gov-form-label.js.map +1 -1
  74. package/dist/components/gov-form-message2.js +0 -1
  75. package/dist/components/gov-form-message2.js.map +1 -1
  76. package/dist/components/gov-form-multi-select.js +0 -1
  77. package/dist/components/gov-form-multi-select.js.map +1 -1
  78. package/dist/components/gov-form-password-power.js +0 -1
  79. package/dist/components/gov-form-password-power.js.map +1 -1
  80. package/dist/components/gov-form-radio.js +0 -1
  81. package/dist/components/gov-form-radio.js.map +1 -1
  82. package/dist/components/gov-form-search.js +0 -1
  83. package/dist/components/gov-form-search.js.map +1 -1
  84. package/dist/components/gov-form-select2.js +0 -1
  85. package/dist/components/gov-form-select2.js.map +1 -1
  86. package/dist/components/gov-form-switch.js +0 -1
  87. package/dist/components/gov-form-switch.js.map +1 -1
  88. package/dist/components/gov-grid-item.js +0 -1
  89. package/dist/components/gov-grid-item.js.map +1 -1
  90. package/dist/components/gov-grid.js +0 -1
  91. package/dist/components/gov-grid.js.map +1 -1
  92. package/dist/components/gov-icon2.js +1 -2
  93. package/dist/components/gov-icon2.js.map +1 -1
  94. package/dist/components/gov-layout-column.js +0 -1
  95. package/dist/components/gov-layout-column.js.map +1 -1
  96. package/dist/components/gov-layout.js +0 -1
  97. package/dist/components/gov-layout.js.map +1 -1
  98. package/dist/components/gov-loading.js +0 -1
  99. package/dist/components/gov-loading.js.map +1 -1
  100. package/dist/components/gov-message.js +0 -1
  101. package/dist/components/gov-message.js.map +1 -1
  102. package/dist/components/gov-modal.js +0 -1
  103. package/dist/components/gov-modal.js.map +1 -1
  104. package/dist/components/gov-nav-item.js +0 -1
  105. package/dist/components/gov-nav-item.js.map +1 -1
  106. package/dist/components/gov-nav.js +0 -1
  107. package/dist/components/gov-nav.js.map +1 -1
  108. package/dist/components/gov-pagination.js +0 -1
  109. package/dist/components/gov-pagination.js.map +1 -1
  110. package/dist/components/gov-prompt.js +0 -1
  111. package/dist/components/gov-prompt.js.map +1 -1
  112. package/dist/components/gov-side-nav-item.js +0 -1
  113. package/dist/components/gov-side-nav-item.js.map +1 -1
  114. package/dist/components/gov-side-nav.js +0 -1
  115. package/dist/components/gov-side-nav.js.map +1 -1
  116. package/dist/components/gov-skeleton.js +0 -1
  117. package/dist/components/gov-skeleton.js.map +1 -1
  118. package/dist/components/gov-spacer.js +0 -1
  119. package/dist/components/gov-spacer.js.map +1 -1
  120. package/dist/components/gov-statsbar-item.js +0 -1
  121. package/dist/components/gov-statsbar-item.js.map +1 -1
  122. package/dist/components/gov-statsbar.js +0 -1
  123. package/dist/components/gov-statsbar.js.map +1 -1
  124. package/dist/components/gov-stepper-item.js +1 -2
  125. package/dist/components/gov-stepper-item.js.map +1 -1
  126. package/dist/components/gov-stepper.js +0 -1
  127. package/dist/components/gov-stepper.js.map +1 -1
  128. package/dist/components/gov-tabs-item.js +0 -1
  129. package/dist/components/gov-tabs-item.js.map +1 -1
  130. package/dist/components/gov-tabs.js +0 -1
  131. package/dist/components/gov-tabs.js.map +1 -1
  132. package/dist/components/gov-tile.js +0 -1
  133. package/dist/components/gov-tile.js.map +1 -1
  134. package/dist/components/gov-tiles.js +0 -1
  135. package/dist/components/gov-tiles.js.map +1 -1
  136. package/dist/components/gov-toast.js +0 -1
  137. package/dist/components/gov-toast.js.map +1 -1
  138. package/dist/components/gov-tooltip-content.js +0 -1
  139. package/dist/components/gov-tooltip-content.js.map +1 -1
  140. package/dist/components/gov-tooltip.js +0 -1
  141. package/dist/components/gov-tooltip.js.map +1 -1
  142. package/dist/components/gov-wizzard-item.js +1 -2
  143. package/dist/components/gov-wizzard-item.js.map +1 -1
  144. package/dist/components/gov-wizzard.js +0 -1
  145. package/dist/components/gov-wizzard.js.map +1 -1
  146. package/dist/core/core.esm.js +1 -1
  147. package/dist/core/core.esm.js.map +1 -1
  148. package/dist/core/p-2507a42a.entry.js +2 -0
  149. package/dist/core/p-2507a42a.entry.js.map +1 -0
  150. package/dist/core/{p-ad89c9e7.entry.js → p-3932645b.entry.js} +2 -2
  151. package/dist/core/{p-09cda4ea.entry.js → p-bc1c8436.entry.js} +2 -2
  152. package/dist/core/p-bc1c8436.entry.js.map +1 -0
  153. package/dist/core/{p-2f0f56fc.entry.js → p-bd47b407.entry.js} +2 -2
  154. package/dist/core/p-bd47b407.entry.js.map +1 -0
  155. package/dist/core/p-ca2b9685.entry.js +2 -0
  156. package/dist/core/{p-d389c001.entry.js.map → p-ca2b9685.entry.js.map} +1 -1
  157. package/dist/core/p-fb895b07.entry.js +2 -0
  158. package/dist/core/{p-0563bda3.entry.js.map → p-fb895b07.entry.js.map} +1 -1
  159. package/dist/custom-elements/index.js +1 -1
  160. package/dist/custom-elements/index.js.map +1 -1
  161. package/dist/esm/core.js +1 -1
  162. package/dist/esm/gov-app.entry.js +11 -4
  163. package/dist/esm/gov-app.entry.js.map +1 -1
  164. package/dist/esm/gov-dropdown.entry.js +7 -1
  165. package/dist/esm/gov-dropdown.entry.js.map +1 -1
  166. package/dist/esm/gov-form-file.entry.js +3 -2
  167. package/dist/esm/gov-form-file.entry.js.map +1 -1
  168. package/dist/esm/gov-icon.entry.js +1 -1
  169. package/dist/esm/gov-stepper-item.entry.js +1 -1
  170. package/dist/esm/gov-stepper-item.entry.js.map +1 -1
  171. package/dist/esm/gov-wizzard-item.entry.js +1 -1
  172. package/dist/esm/gov-wizzard-item.entry.js.map +1 -1
  173. package/dist/esm/loader.js +1 -1
  174. package/dist/hydrate/index.js +26 -10
  175. package/dist/types/components/gov-button/dropdown/gov-dropdown.d.ts +5 -1
  176. package/dist/types/components/gov-form/file/gov-form-file.d.ts +5 -0
  177. package/dist/types/components.d.ts +15 -1
  178. package/hydrate/index.js +26 -10
  179. package/package.json +1 -1
  180. package/dist/core/p-0563bda3.entry.js +0 -2
  181. package/dist/core/p-09cda4ea.entry.js.map +0 -1
  182. package/dist/core/p-2f0f56fc.entry.js.map +0 -1
  183. package/dist/core/p-bfc5e0f7.entry.js +0 -2
  184. package/dist/core/p-bfc5e0f7.entry.js.map +0 -1
  185. package/dist/core/p-d389c001.entry.js +0 -2
  186. /package/dist/core/{p-ad89c9e7.entry.js.map → p-3932645b.entry.js.map} +0 -0
@@ -7,7 +7,7 @@ import { g as govHost, b as booleanString, t as toBoolAttrIfDefined } from './te
7
7
  import { F as Fragment } from './Fragment.js';
8
8
  import { d as defineCustomElement$2 } from './gov-icon2.js';
9
9
 
10
- const govWizzardItemCss = ".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-wizzard-item{position:relative;display:block;width:100%;margin-bottom:1rem;background:var(--gov-wizzard-bg-color, var(--gov-color-neutral-white))}.gov-wizzard-item__header{position:relative;width:100%}.gov-wizzard-item__arrow{flex:0 0 auto;width:0.75rem;height:0.75rem}.gov-wizzard-item__title{margin:0;padding:0;font-family:var(--gov-font-family, \"Roboto\", sans-serif);font-weight:400;box-sizing:border-box;display:flex;gap:1rem;align-items:baseline}.gov-wizzard-item__prefix{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;text-align:center}.gov-wizzard-item__prefix .gov-icon{width:45%;height:45%}.gov-wizzard-item__name{display:flex;flex-direction:column}.gov-wizzard-item__label{display:flex;gap:0.5rem;align-items:center}.gov-wizzard-item__annot{color:var(--gov-color-secondary)}.gov-wizzard-item__content>*:last-child{margin-bottom:0}.gov-wizzard-item[variant=primary] .gov-wizzard-item__header{color:var(--gov-wizzard-primary-color, var(--gov-color-primary-800))}.gov-wizzard-item[variant=primary] .gov-wizzard-item__prefix{background:var(--gov-wizzard-primary-indicator-bg, var(--gov-color-primary-300));color:var(--gov-wizzard-primary-indicator-color, var(--gov-color-primary-800))}.gov-wizzard-item[variant=secondary] .gov-wizzard-item__header{color:var(--gov-wizzard-secondary-color, var(--gov-color-secondary-700))}.gov-wizzard-item[variant=secondary] .gov-wizzard-item__prefix{background:var(--gov-wizzard-secondary-indicator-bg, var(--gov-color-secondary-400));color:var(--gov-wizzard-secondary-indicator-color, var(--gov-color-secondary-700))}.gov-wizzard-item[variant=success] .gov-wizzard-item__header{color:var(--gov-wizzard-success-color, var(--gov-color-success-500))}.gov-wizzard-item[variant=success] .gov-wizzard-item__prefix{background:var(--gov-wizzard-success-indicator-bg, var(--gov-color-success));color:var(--gov-wizzard-success-indicator-color, var(--gov-color-neutral-white))}.gov-wizzard-item[variant=error] .gov-wizzard-item__header{color:var(--gov-wizzard-error-color, var(--gov-color-error-500))}.gov-wizzard-item[variant=error] .gov-wizzard-item__prefix{background:var(--gov-wizzard-error-indicator-bg, var(--gov-color-error));color:var(--gov-wizzard-error-indicator-color, var(--gov-color-neutral-white))}.gov-wizzard-item[variant=warning] .gov-wizzard-item__header{color:var(--gov-wizzard-warning-color, var(--gov-color-warning-500))}.gov-wizzard-item[variant=warning] .gov-wizzard-item__prefix{background:var(--gov-wizzard-warning-indicator-bg, var(--gov-color-warning));color:var(--gov-wizzard-warning-indicator-color, var(--gov-color-neutral-white))}.gov-wizzard-item__header{gap:1rem;padding:1rem;border-radius:0;text-align:left;transition:150ms linear color}.gov-wizzard-item__header:focus{outline:none}.gov-wizzard-item__header:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-wizzard-item__prefix{position:absolute;left:1rem}.gov-wizzard-item__header[aria-expanded=true] .gov-wizzard-item__label .gov-icon{transform:scale(-1)}.gov-wizzard-item[size=xs] .gov-wizzard-item__title,.gov-wizzard-item[size=s] .gov-wizzard-item__title,.gov-wizzard-item[size=m] .gov-wizzard-item__title{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-wizzard-item[size=xs] .gov-wizzard-item__annot,.gov-wizzard-item[size=s] .gov-wizzard-item__annot,.gov-wizzard-item[size=m] .gov-wizzard-item__annot{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)}.gov-wizzard-item[size=xs] .gov-wizzard-item__prefix,.gov-wizzard-item[size=s] .gov-wizzard-item__prefix,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix{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);width:var(--gov-wizzard-xs-indicator-size, 1.5rem);height:var(--gov-wizzard-xs-indicator-size, 1.5rem);top:var(--gov-wizzard-xs-top, 1rem)}.gov-wizzard-item[size=xs] .gov-wizzard-item__prefix+.gov-wizzard-item__header,.gov-wizzard-item[size=s] .gov-wizzard-item__prefix+.gov-wizzard-item__header,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix+.gov-wizzard-item__header{padding:var(--gov-wizzard-xs-header-padding, 1rem 1rem 1rem 3.5rem)}.gov-wizzard-item[size=xs] .gov-wizzard-item__content,.gov-wizzard-item[size=s] .gov-wizzard-item__content,.gov-wizzard-item[size=m] .gov-wizzard-item__content{padding:var(--gov-wizzard-content-padding, 0rem 1rem 1rem 1rem)}@media not all and (pointer: coarse){.gov-wizzard-item[variant=primary][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=primary][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=primary][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-primary-hover-color, var(--gov-color-primary-900))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=secondary][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=secondary][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=secondary][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-secondary-hover-color, var(--gov-color-secondary-800))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=success][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=success][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=success][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-success-hover-color, var(--gov-color-success-600))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=error][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=error][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=error][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-error-hover-color, var(--gov-color-error-600))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=warning][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=warning][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=warning][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-warning-hover-color, var(--gov-color-warning-600))}}button.gov-wizzard-item__header{display:inline-flex;vertical-align:middle;justify-content:center;align-items:center;border:0;background-color:transparent;text-align:center;text-decoration:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;justify-content:flex-start;text-align:left}button.gov-wizzard-item__header:focus{outline:none}@media (min-width: 30em){.gov-wizzard-item[size=s] .gov-wizzard-item__title,.gov-wizzard-item[size=m] .gov-wizzard-item__title{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)}.gov-wizzard-item[size=s] .gov-wizzard-item__prefix,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);width:var(--gov-wizzard-s-indicator-size, 2rem);height:var(--gov-wizzard-s-indicator-size, 2rem);top:var(--gov-wizzard-s-top, 0.8125rem)}.gov-wizzard-item[size=s] .gov-wizzard-item__prefix+.gov-wizzard-item__header,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix+.gov-wizzard-item__header{padding:var(--gov-wizzard-s-header-padding, 1rem 1rem 1rem 4rem)}}@media (min-width: 48em){.gov-wizzard-item[size=m] .gov-wizzard-item__title{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)}.gov-wizzard-item[size=m] .gov-wizzard-item__prefix{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);width:var(--gov-wizzard-m-indicator-size, 2.5rem);height:var(--gov-wizzard-m-indicator-size, 2.5rem);top:var(--gov-wizzard-m-top, 0.5625rem)}.gov-wizzard-item[size=m] .gov-wizzard-item__prefix+.gov-wizzard-item__header{padding:var(--gov-wizzard-m-header-padding, 1rem 1rem 1rem 4.5rem)}.gov-wizzard-item[size=xs] .gov-wizzard-item__content{padding:var(--gov-wizzard-xs-content-padding, 0rem 1rem 1rem 3.5rem)}.gov-wizzard-item[size=s] .gov-wizzard-item__content{padding:var(--gov-wizzard-s-content-padding, 0rem 1rem 1rem 4rem)}.gov-wizzard-item[size=m] .gov-wizzard-item__content{padding:var(--gov-wizzard-m-content-padding, 0rem 1rem 1rem 4.5rem)}}";
10
+ const govWizzardItemCss = ".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-wizzard-item{position:relative;display:block;width:100%;margin-bottom:1rem;background:var(--gov-wizzard-bg-color, var(--gov-color-neutral-white))}.gov-wizzard-item__header{position:relative;width:100%}.gov-wizzard-item__arrow{flex:0 0 auto;width:0.75rem;height:0.75rem}.gov-wizzard-item__title{margin:0;padding:0;font-family:var(--gov-font-family, \"Roboto\", sans-serif);font-weight:400;box-sizing:border-box;display:flex;gap:1rem;align-items:baseline}.gov-wizzard-item__prefix{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;text-align:center}.gov-wizzard-item__prefix .gov-icon{width:45%;height:45%}.gov-wizzard-item__prefix span[slot=prefix]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.gov-wizzard-item__name{display:flex;flex-direction:column}.gov-wizzard-item__label{display:flex;gap:0.5rem;align-items:center}.gov-wizzard-item__annot{color:var(--gov-color-secondary)}.gov-wizzard-item__content>*:last-child{margin-bottom:0}.gov-wizzard-item[variant=primary] .gov-wizzard-item__header{color:var(--gov-wizzard-primary-color, var(--gov-color-primary-800))}.gov-wizzard-item[variant=primary] .gov-wizzard-item__prefix{background:var(--gov-wizzard-primary-indicator-bg, var(--gov-color-primary-300));color:var(--gov-wizzard-primary-indicator-color, var(--gov-color-primary-800))}.gov-wizzard-item[variant=secondary] .gov-wizzard-item__header{color:var(--gov-wizzard-secondary-color, var(--gov-color-secondary-700))}.gov-wizzard-item[variant=secondary] .gov-wizzard-item__prefix{background:var(--gov-wizzard-secondary-indicator-bg, var(--gov-color-secondary-400));color:var(--gov-wizzard-secondary-indicator-color, var(--gov-color-secondary-700))}.gov-wizzard-item[variant=success] .gov-wizzard-item__header{color:var(--gov-wizzard-success-color, var(--gov-color-success-500))}.gov-wizzard-item[variant=success] .gov-wizzard-item__prefix{background:var(--gov-wizzard-success-indicator-bg, var(--gov-color-success));color:var(--gov-wizzard-success-indicator-color, var(--gov-color-neutral-white))}.gov-wizzard-item[variant=error] .gov-wizzard-item__header{color:var(--gov-wizzard-error-color, var(--gov-color-error-500))}.gov-wizzard-item[variant=error] .gov-wizzard-item__prefix{background:var(--gov-wizzard-error-indicator-bg, var(--gov-color-error));color:var(--gov-wizzard-error-indicator-color, var(--gov-color-neutral-white))}.gov-wizzard-item[variant=warning] .gov-wizzard-item__header{color:var(--gov-wizzard-warning-color, var(--gov-color-warning-500))}.gov-wizzard-item[variant=warning] .gov-wizzard-item__prefix{background:var(--gov-wizzard-warning-indicator-bg, var(--gov-color-warning));color:var(--gov-wizzard-warning-indicator-color, var(--gov-color-neutral-white))}.gov-wizzard-item__header{gap:1rem;padding:1rem;border-radius:0;text-align:left;transition:150ms linear color}.gov-wizzard-item__header:focus{outline:none}.gov-wizzard-item__header:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-wizzard-item__prefix{position:absolute;left:1rem}.gov-wizzard-item__header[aria-expanded=true] .gov-wizzard-item__label .gov-icon{transform:scale(-1)}.gov-wizzard-item[size=xs] .gov-wizzard-item__title,.gov-wizzard-item[size=s] .gov-wizzard-item__title,.gov-wizzard-item[size=m] .gov-wizzard-item__title{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-wizzard-item[size=xs] .gov-wizzard-item__annot,.gov-wizzard-item[size=s] .gov-wizzard-item__annot,.gov-wizzard-item[size=m] .gov-wizzard-item__annot{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)}.gov-wizzard-item[size=xs] .gov-wizzard-item__prefix,.gov-wizzard-item[size=s] .gov-wizzard-item__prefix,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix{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);width:var(--gov-wizzard-xs-indicator-size, 1.5rem);height:var(--gov-wizzard-xs-indicator-size, 1.5rem);top:var(--gov-wizzard-xs-top, 1rem)}.gov-wizzard-item[size=xs] .gov-wizzard-item__prefix+.gov-wizzard-item__header,.gov-wizzard-item[size=s] .gov-wizzard-item__prefix+.gov-wizzard-item__header,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix+.gov-wizzard-item__header{padding:var(--gov-wizzard-xs-header-padding, 1rem 1rem 1rem 3.5rem)}.gov-wizzard-item[size=xs] .gov-wizzard-item__content,.gov-wizzard-item[size=s] .gov-wizzard-item__content,.gov-wizzard-item[size=m] .gov-wizzard-item__content{padding:var(--gov-wizzard-content-padding, 0rem 1rem 1rem 1rem)}@media not all and (pointer: coarse){.gov-wizzard-item[variant=primary][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=primary][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=primary][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-primary-hover-color, var(--gov-color-primary-900))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=secondary][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=secondary][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=secondary][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-secondary-hover-color, var(--gov-color-secondary-800))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=success][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=success][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=success][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-success-hover-color, var(--gov-color-success-600))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=error][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=error][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=error][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-error-hover-color, var(--gov-color-error-600))}}@media not all and (pointer: coarse){.gov-wizzard-item[variant=warning][collapsible=\"\"] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=warning][collapsible=true i] .gov-wizzard-item__header:hover,.gov-wizzard-item[variant=warning][collapsible=\"1\"] .gov-wizzard-item__header:hover{color:var(--gov-wizzard-warning-hover-color, var(--gov-color-warning-600))}}button.gov-wizzard-item__header{display:inline-flex;vertical-align:middle;justify-content:center;align-items:center;border:0;background-color:transparent;text-align:center;text-decoration:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;justify-content:flex-start;text-align:left}button.gov-wizzard-item__header:focus{outline:none}@media (min-width: 30em){.gov-wizzard-item[size=s] .gov-wizzard-item__title,.gov-wizzard-item[size=m] .gov-wizzard-item__title{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)}.gov-wizzard-item[size=s] .gov-wizzard-item__prefix,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);width:var(--gov-wizzard-s-indicator-size, 2rem);height:var(--gov-wizzard-s-indicator-size, 2rem);top:var(--gov-wizzard-s-top, 0.8125rem)}.gov-wizzard-item[size=s] .gov-wizzard-item__prefix+.gov-wizzard-item__header,.gov-wizzard-item[size=m] .gov-wizzard-item__prefix+.gov-wizzard-item__header{padding:var(--gov-wizzard-s-header-padding, 1rem 1rem 1rem 4rem)}}@media (min-width: 48em){.gov-wizzard-item[size=m] .gov-wizzard-item__title{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)}.gov-wizzard-item[size=m] .gov-wizzard-item__prefix{font-weight:var(--gov-text-xl-font-weight);font-size:var(--gov-text-xl-font-size);line-height:var(--gov-text-xl-line-height);letter-spacing:var(--gov-text-xl-letter-spacing);width:var(--gov-wizzard-m-indicator-size, 2.5rem);height:var(--gov-wizzard-m-indicator-size, 2.5rem);top:var(--gov-wizzard-m-top, 0.5625rem)}.gov-wizzard-item[size=m] .gov-wizzard-item__prefix+.gov-wizzard-item__header{padding:var(--gov-wizzard-m-header-padding, 1rem 1rem 1rem 4.5rem)}.gov-wizzard-item[size=xs] .gov-wizzard-item__content{padding:var(--gov-wizzard-xs-content-padding, 0rem 1rem 1rem 3.5rem)}.gov-wizzard-item[size=s] .gov-wizzard-item__content{padding:var(--gov-wizzard-s-content-padding, 0rem 1rem 1rem 4rem)}.gov-wizzard-item[size=m] .gov-wizzard-item__content{padding:var(--gov-wizzard-m-content-padding, 0rem 1rem 1rem 4.5rem)}}";
11
11
 
12
12
  var Tags;
13
13
  (function (Tags) {
@@ -131,7 +131,6 @@ function defineCustomElement$1() {
131
131
  break;
132
132
  } });
133
133
  }
134
- defineCustomElement$1();
135
134
 
136
135
  const GovWizzardItem = GovWizzardItem$1;
137
136
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-wizzard-item.js","mappings":";;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,+qSAA+qS;;ACUzsS,IAAK,IAGJ;AAHD,WAAK,IAAI;EACR,mBAAW,CAAA;EACX,yBAAiB,CAAA;AAClB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAMYA,gBAAc;EAK1B;;;;mBAUgD,SAAS;gBAIf,GAAG;;uBAQL,KAAK;;;oBAYR,KAAK;sBAIsB,KAAK;oBAIP,IAAI;IAzCjE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAA;IAC3C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,mBAAmB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ACP,UAAU,EACX,WAAK,KAAK,EAAE,gBAAgB,CAAC,MAAM,IAAG,KAAK,CAAO,CACxC,CACX,EACA,IAAI,CAAC,WAAW,IAChB,WACC,KAAK,EAAE,gBAAgB,CAAC,OAAO,EAC/B,EAAE,EAAE,IAAI,CAAC,SAAS,iBACL,aAAa,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAC5C,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,qBACP,SAAS,IAE1B,eAAQ,CACH,KAEN,WAAK,KAAK,EAAE,gBAAgB,CAAC,OAAO,iBAAe,aAAa,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,IAC3G,eAAQ,CACH,CACN,CACK,EACP;GACD;;;;EAMD,MAAM,IAAI;IACT,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;IACtB,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,KAAK;IACjB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;IACvB,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,MAAM;IAClB,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAA;IAClC,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,YAAY;IACxB,OAAO,IAAI,CAAC,UAAU,CAAA;GACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovWizzardItem"],"sources":["../../../packages/core/src/components/gov-wizzard/gov-wizzard-item.scss?tag=gov-wizzard-item","../../../packages/core/src/components/gov-wizzard/gov-wizzard-item.tsx"],"sourcesContent":["/*\n * Wizzard - Item\n */\n\n@import \"../gov-wizzard/gov-wizzard-item-core.scss\";\n$class: \".gov-wizzard-item\";\n\n#{$class} {\n\t@include wizzard-item-core;\n\tmargin-bottom: rem-calc(16);\n\tbackground: $wizzard-bg-color;\n\t&__header {\n\t\t@include focus-outline();\n\t\tgap: rem-calc(16);\n\t\tpadding: rem-calc(16);\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttransition: $t linear color;\n\t}\n\t&__prefix {\n\t\tposition: absolute;\n\t\tleft: rem-calc(16);\n\t}\n\n\t// STATES\n\t&__header[aria-expanded=\"true\"] {\n\t\t#{$class}__label {\n\t\t\t.gov-icon {\n\t\t\t\ttransform: scale(-1);\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t&[size=\"#{$size-xs}\"],\n\t&[size=\"#{$size-s}\"],\n\t&[size=\"#{$size-m}\"] {\n\t\t#{$class} {\n\t\t\t&__title {\n\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-xs, \"font-size\"));\n\t\t\t}\n\t\t\t&__annot {\n\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-xs, \"font-size-annot\"));\n\t\t\t}\n\t\t\t&__prefix {\n\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-xs, \"font-size-indicator\"));\n\t\t\t\twidth: deep-map-get($wizzard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\theight: deep-map-get($wizzard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\ttop: deep-map-get($wizzard-sizes, $size-xs, \"top\");\n\t\t\t\t+ #{$class}__header {\n\t\t\t\t\tpadding: deep-map-get($wizzard-sizes, $size-xs, \"header-padding\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t&__content {\n\t\t\t\tpadding: $wizzard-content-padding;\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $wizzard-core-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t@include parameter(\"collapsible\") {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__header {\n\t\t\t\t\t\t@include hover() {\n\t\t\t\t\t\t\tcolor: get(\"hover-color\", $definitions);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// HOVERS\n\t@at-root button#{&}__header {\n\t\t@include button-core();\n\t\tjustify-content: flex-start;\n\t\ttext-align: left;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&[size=\"#{$size-s}\"],\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-s, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-s, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizzard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizzard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizzard-sizes, $size-s, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizzard-sizes, $size-s, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-m, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-m, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizzard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizzard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizzard-sizes, $size-m, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizzard-sizes, $size-m, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@each $size, $definitions in $wizzard-sizes {\n\t\t\t&[size=\"#{$size}\"] {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tpadding: get(\"content-padding\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizesType, WizardVariants, WizardVariantsType, WizzardItemClass } from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { WizzardItemEvent } from \"./gov-wizzard-item.types\"\nimport Fragment from \"../../helpers/Fragment\"\n\nenum Tags {\n\tDIV = \"div\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-wizzard-item\",\n\tstyleUrl: \"gov-wizzard-item.scss\",\n})\nexport class GovWizzardItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovWizzardItem\")\n\t\tthis.contentId = createID(\"GovWizzardContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovWizzardItemElement\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: WizardVariantsType = \"primary\"\n\t/**\n\t * Size of wizzard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Custom wizzard item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defines weather the wizzard item can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Item annotation of the wizzard\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Item label of the wizzard\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Makes the wizzard component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by default\n\t */\n\t@Prop({ attribute: \"is-expanded\", mutable: true }) isExpanded = false\n\t/**\n\t * Used to change the HTML tag in the accordion trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: \"label-tag\" }) readonly labelTag: string = \"h3\"\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<WizzardItemEvent>\n\n\t@Watch(\"label\")\n\tprivate validateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${WizzardItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch(\"labelTag\")\n\tprivate validateTriggerTag(newValue: string): void {\n\t\tconst validTags = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"span\"]\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${WizzardItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"variant\")\n\tprivate validateVariant(newValue: string): void {\n\t\tvalidateProp(WizardVariants, newValue, WizzardItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ expanded: this.isExpanded, component: WizzardItemClass.root })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateTriggerTag(this.labelTag)\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst LabelTag = this.labelTag\n\t\tconst Tag = this.collapsible ? Tags.BUTTON : Tags.DIV\n\t\tconst prefixSlot = this.h.hasSlot(\"prefix\") && (<span class={WizzardItemClass.prefix}><slot name=\"prefix\" /></span>)\n\n\t\tconst label = (\n\t\t\t<LabelTag class={WizzardItemClass.title}>\n\t\t\t\t<span class={WizzardItemClass.name}>\n\t\t\t\t\t<span class={WizzardItemClass.label}>\n\t\t\t\t\t\t<span>{this.label}</span>\n\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizzardItemClass.arrow} name=\"chevron-down\"></gov-icon>}\n\t\t\t\t\t</span>\n\n\t\t\t\t\t{this.annotation && <span class={WizzardItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t</span>\n\t\t\t</LabelTag>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizzardItemClass.root)} is-expanded={this.isExpanded} variant={this.variant} size={this.size} role=\"listitem\" collapsible={this.collapsible}>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\tid={triggerId}\n\t\t\t\t\t\t\tclass={WizzardItemClass.header}\n\t\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\tonClick={() => (this.collapsible ? this.toggle() : false)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t</Fragment>\n\t\t\t\t) : (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<div class={WizzardItemClass.header}>{label}</div>\n\t\t\t\t\t</Fragment>\n\t\t\t\t)}\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={WizzardItemClass.content}\n\t\t\t\t\t\tid={this.contentId}\n\t\t\t\t\t\taria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\thidden={!this.isExpanded}\n\t\t\t\t\t\taria-labelledby={triggerId}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={WizzardItemClass.content} aria-hidden={booleanString(!this.isExpanded)} hidden={!this.isExpanded}>\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 Wizzard\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpanded = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Wizzard\n\t */\n\t@Method()\n\tpublic async close(): Promise<void> {\n\t\tthis.isExpanded = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Wizzard switch\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\tthis.isExpanded = !this.isExpanded\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tpublic async currentState(): Promise<boolean> {\n\t\treturn this.isExpanded\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-wizzard-item.js","mappings":";;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,yySAAyyS;;ACUn0S,IAAK,IAGJ;AAHD,WAAK,IAAI;EACR,mBAAW,CAAA;EACX,yBAAiB,CAAA;AAClB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAMYA,gBAAc;EAK1B;;;;mBAUgD,SAAS;gBAIf,GAAG;;uBAQL,KAAK;;;oBAYR,KAAK;sBAIsB,KAAK;oBAIP,IAAI;IAzCjE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAA;IAC3C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAA;GAC9C;EA6CO,aAAa,CAAC,QAAgB;IACrC,IAAI,CAAC,QAAQ,EAAE;MACd,WAAW,CAAC,IAAI,gBAAgB,CAAC,IAAI,iCAAiC,CAAC,CAAA;KACvE;GACD;EAGO,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E,EAAE,IAAI,CAAC,SAAS,iBACL,aAAa,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAC5C,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,qBACP,SAAS,IAE1B,eAAQ,CACH,KAEN,WAAK,KAAK,EAAE,gBAAgB,CAAC,OAAO,iBAAe,aAAa,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,IAC3G,eAAQ,CACH,CACN,CACK,EACP;GACD;;;;EAMD,MAAM,IAAI;IACT,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;IACtB,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,KAAK;IACjB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;IACvB,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,MAAM;IAClB,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAA;IAClC,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,YAAY;IACxB,OAAO,IAAI,CAAC,UAAU,CAAA;GACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovWizzardItem"],"sources":["../../../packages/core/src/components/gov-wizzard/gov-wizzard-item.scss?tag=gov-wizzard-item","../../../packages/core/src/components/gov-wizzard/gov-wizzard-item.tsx"],"sourcesContent":["/*\n * Wizzard - Item\n */\n\n@import \"../gov-wizzard/gov-wizzard-item-core.scss\";\n$class: \".gov-wizzard-item\";\n\n#{$class} {\n\t@include wizzard-item-core;\n\tmargin-bottom: rem-calc(16);\n\tbackground: $wizzard-bg-color;\n\t&__header {\n\t\t@include focus-outline();\n\t\tgap: rem-calc(16);\n\t\tpadding: rem-calc(16);\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttransition: $t linear color;\n\t}\n\t&__prefix {\n\t\tposition: absolute;\n\t\tleft: rem-calc(16);\n\t}\n\n\t// STATES\n\t&__header[aria-expanded=\"true\"] {\n\t\t#{$class}__label {\n\t\t\t.gov-icon {\n\t\t\t\ttransform: scale(-1);\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t&[size=\"#{$size-xs}\"],\n\t&[size=\"#{$size-s}\"],\n\t&[size=\"#{$size-m}\"] {\n\t\t#{$class} {\n\t\t\t&__title {\n\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-xs, \"font-size\"));\n\t\t\t}\n\t\t\t&__annot {\n\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-xs, \"font-size-annot\"));\n\t\t\t}\n\t\t\t&__prefix {\n\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-xs, \"font-size-indicator\"));\n\t\t\t\twidth: deep-map-get($wizzard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\theight: deep-map-get($wizzard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\ttop: deep-map-get($wizzard-sizes, $size-xs, \"top\");\n\t\t\t\t+ #{$class}__header {\n\t\t\t\t\tpadding: deep-map-get($wizzard-sizes, $size-xs, \"header-padding\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t&__content {\n\t\t\t\tpadding: $wizzard-content-padding;\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $wizzard-core-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t@include parameter(\"collapsible\") {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__header {\n\t\t\t\t\t\t@include hover() {\n\t\t\t\t\t\t\tcolor: get(\"hover-color\", $definitions);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// HOVERS\n\t@at-root button#{&}__header {\n\t\t@include button-core();\n\t\tjustify-content: flex-start;\n\t\ttext-align: left;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&[size=\"#{$size-s}\"],\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-s, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-s, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizzard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizzard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizzard-sizes, $size-s, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizzard-sizes, $size-s, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-m, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizzard-sizes, $size-m, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizzard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizzard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizzard-sizes, $size-m, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizzard-sizes, $size-m, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@each $size, $definitions in $wizzard-sizes {\n\t\t\t&[size=\"#{$size}\"] {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tpadding: get(\"content-padding\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizesType, WizardVariants, WizardVariantsType, WizzardItemClass } from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { WizzardItemEvent } from \"./gov-wizzard-item.types\"\nimport Fragment from \"../../helpers/Fragment\"\n\nenum Tags {\n\tDIV = \"div\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-wizzard-item\",\n\tstyleUrl: \"gov-wizzard-item.scss\",\n})\nexport class GovWizzardItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovWizzardItem\")\n\t\tthis.contentId = createID(\"GovWizzardContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovWizzardItemElement\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: WizardVariantsType = \"primary\"\n\t/**\n\t * Size of wizzard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Custom wizzard item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defines weather the wizzard item can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Item annotation of the wizzard\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Item label of the wizzard\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Makes the wizzard component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by default\n\t */\n\t@Prop({ attribute: \"is-expanded\", mutable: true }) isExpanded = false\n\t/**\n\t * Used to change the HTML tag in the accordion trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: \"label-tag\" }) readonly labelTag: string = \"h3\"\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<WizzardItemEvent>\n\n\t@Watch(\"label\")\n\tprivate validateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${WizzardItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch(\"labelTag\")\n\tprivate validateTriggerTag(newValue: string): void {\n\t\tconst validTags = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"span\"]\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${WizzardItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"variant\")\n\tprivate validateVariant(newValue: string): void {\n\t\tvalidateProp(WizardVariants, newValue, WizzardItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ expanded: this.isExpanded, component: WizzardItemClass.root })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateTriggerTag(this.labelTag)\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst LabelTag = this.labelTag\n\t\tconst Tag = this.collapsible ? Tags.BUTTON : Tags.DIV\n\t\tconst prefixSlot = this.h.hasSlot(\"prefix\") && (<span class={WizzardItemClass.prefix}><slot name=\"prefix\" /></span>)\n\n\t\tconst label = (\n\t\t\t<LabelTag class={WizzardItemClass.title}>\n\t\t\t\t<span class={WizzardItemClass.name}>\n\t\t\t\t\t<span class={WizzardItemClass.label}>\n\t\t\t\t\t\t<span>{this.label}</span>\n\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizzardItemClass.arrow} name=\"chevron-down\"></gov-icon>}\n\t\t\t\t\t</span>\n\n\t\t\t\t\t{this.annotation && <span class={WizzardItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t</span>\n\t\t\t</LabelTag>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizzardItemClass.root)} is-expanded={this.isExpanded} variant={this.variant} size={this.size} role=\"listitem\" collapsible={this.collapsible}>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\tid={triggerId}\n\t\t\t\t\t\t\tclass={WizzardItemClass.header}\n\t\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\tonClick={() => (this.collapsible ? this.toggle() : false)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t</Fragment>\n\t\t\t\t) : (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<div class={WizzardItemClass.header}>{label}</div>\n\t\t\t\t\t</Fragment>\n\t\t\t\t)}\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={WizzardItemClass.content}\n\t\t\t\t\t\tid={this.contentId}\n\t\t\t\t\t\taria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\thidden={!this.isExpanded}\n\t\t\t\t\t\taria-labelledby={triggerId}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={WizzardItemClass.content} aria-hidden={booleanString(!this.isExpanded)} hidden={!this.isExpanded}>\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 Wizzard\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpanded = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Wizzard\n\t */\n\t@Method()\n\tpublic async close(): Promise<void> {\n\t\tthis.isExpanded = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Wizzard switch\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\tthis.isExpanded = !this.isExpanded\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tpublic async currentState(): Promise<boolean> {\n\t\treturn this.isExpanded\n\t}\n}\n"],"version":3}
@@ -72,7 +72,6 @@ function defineCustomElement$1() {
72
72
  break;
73
73
  } });
74
74
  }
75
- defineCustomElement$1();
76
75
 
77
76
  const GovWizzard = GovWizzard$1;
78
77
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-wizzard.js","mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,0bAA0b;;MCencA,YAAU;EAItB;;;;gBAM0C,GAAG;;;IAL5C,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAmBO,YAAY,CAAC,QAAgB;IACpC,YAAY,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;GACtD;EAED,iBAAiB;IAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC5B;EAED,gBAAgB;IACf,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,KAAgC;MAC1F,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;MACrC,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAuD;QAC5F,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;OAC7B,CAAC,CAAA;KACF,CAAC,CAAA;GACF;EAED,MAAM,kBAAkB;IACvB,IAAI,uBAAuB,EAAE,EAAE;MAC9B,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;MAChB,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;KACzB;GACD;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAC1E,eAAQ,CACF,EACP;GACD;;;;EAMM,MAAM,YAAY;IACxB,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;GACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovWizzard"],"sources":["../../../packages/core/src/components/gov-wizzard/gov-wizzard.scss?tag=gov-wizzard","../../../packages/core/src/components/gov-wizzard/gov-wizzard.tsx"],"sourcesContent":["/*\n * Wizzard\n */\n\n$class: \".gov-wizzard\";\n\n#{$class} {\n\t@include base();\n\t@include reset-last-margin();\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { WizzardClass, WizzardItemClass, WizardSizesType, WizardSizes } from './constants'\nimport { GovWizzardItemCustomEvent } from '../../components'\nimport { GovWizzardItemChangeEvent } from './gov-wizzard-item.d'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\n\n@Component({\n\ttag: 'gov-wizzard',\n\tstyleUrl: 'gov-wizzard.scss',\n})\nexport class GovWizzard {\n\tprivate h: GovHost\n\n\t@Element() readonly host: HTMLGovWizzardElement\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t/**\n\t * Size of wizzard\n\t */\n\t@Prop() readonly size?: WizardSizesType = 'm'\n\t/**\n\t * Adds accessible label for the wizzard that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Called when the wizzard children state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovWizzardItemChangeEvent>\n\n\t@Watch('size')\n\tprivate validateSize(newValue: string): void {\n\t\tvalidateProp(WizardSizes, newValue, WizzardClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(WizzardItemClass.root).forEach((child: HTMLGovWizzardItemElement) => {\n\t\t\tchild.setAttribute('size', this.size)\n\t\t\tchild.addEventListener('gov-change', (e: GovWizzardItemCustomEvent<GovWizzardItemChangeEvent>) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.govChange.emit(e.detail)\n\t\t\t})\n\t\t})\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizzardClass.root)} role=\"list\" size={this.size}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tpublic async validateWcag(): Promise<void> {\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, WizzardClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-wizz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;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovWizzard"],"sources":["../../../packages/core/src/components/gov-wizzard/gov-wizzard.scss?tag=gov-wizzard","../../../packages/core/src/components/gov-wizzard/gov-wizzard.tsx"],"sourcesContent":["/*\n * Wizzard\n */\n\n$class: \".gov-wizzard\";\n\n#{$class} {\n\t@include base();\n\t@include reset-last-margin();\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { WizzardClass, WizzardItemClass, WizardSizesType, WizardSizes } from './constants'\nimport { GovWizzardItemCustomEvent } from '../../components'\nimport { GovWizzardItemChangeEvent } from './gov-wizzard-item.d'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\n\n@Component({\n\ttag: 'gov-wizzard',\n\tstyleUrl: 'gov-wizzard.scss',\n})\nexport class GovWizzard {\n\tprivate h: GovHost\n\n\t@Element() readonly host: HTMLGovWizzardElement\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\t/**\n\t * Size of wizzard\n\t */\n\t@Prop() readonly size?: WizardSizesType = 'm'\n\t/**\n\t * Adds accessible label for the wizzard that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Called when the wizzard children state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<GovWizzardItemChangeEvent>\n\n\t@Watch('size')\n\tprivate validateSize(newValue: string): void {\n\t\tvalidateProp(WizardSizes, newValue, WizzardClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(WizzardItemClass.root).forEach((child: HTMLGovWizzardItemElement) => {\n\t\t\tchild.setAttribute('size', this.size)\n\t\t\tchild.addEventListener('gov-change', (e: GovWizzardItemCustomEvent<GovWizzardItemChangeEvent>) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.govChange.emit(e.detail)\n\t\t\t})\n\t\t})\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizzardClass.root)} role=\"list\" size={this.size}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tpublic async validateWcag(): Promise<void> {\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, WizzardClass.root)\n\t}\n}\n"],"version":3}
@@ -1,2 +1,2 @@
1
- import{p as e,b as a}from"./p-4af5e4f4.js";const l=()=>{const a=import.meta.url;const l={};if(a!==""){l.resourcesUrl=new URL(".",a).href}return e(l)};l().then((e=>a(JSON.parse('[["p-bfc5e0f7",[[4,"gov-form-file",{"expanded":[4],"required":[4],"disabled":[4],"displayAttachments":[4,"display-attachments"],"name":[1],"accept":[1],"maxFileSize":[2,"max-file-size"],"identifier":[1],"invalid":[4],"errorSize":[1,"error-size"],"errorAccept":[1,"error-accept"],"attachmentsLabel":[1,"attachments-label"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagRemoveLabel":[1,"wcag-remove-label"],"wcagAttachmentsLabel":[1,"wcag-attachments-label"],"files":[32],"getRef":[64],"getAreaRef":[64],"validateWcag":[64]}]]],["p-0574a26a",[[4,"gov-form-multi-select",{"identifier":[1],"placeholder":[1],"variant":[1],"size":[1],"name":[1],"required":[4],"disabled":[4],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"value":[32],"selectedOptions":[32],"setFocus":[64],"setValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-02fb27e8",[[4,"gov-modal",{"open":[1028],"label":[1],"role":[1],"labelTag":[1,"label-tag"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagCloseLabel":[1,"wcag-close-label"],"wcagCloseLabelledBy":[1,"wcag-close-labelled-by"],"show":[64],"hide":[64],"validateWcag":[64]}]]],["p-ed1e9d01",[[0,"gov-pagination",{"type":[1],"current":[2],"total":[2],"inverse":[4],"size":[1],"variant":[1],"pageSize":[2,"page-size"],"maxPages":[2,"max-pages"],"link":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagSelectLabel":[1,"wcag-select-label"],"wcagPageLabel":[1,"wcag-page-label"],"pagination":[32],"validateWcag":[64]}]]],["p-ce59c2ee",[[4,"gov-prompt",{"open":[1028],"label":[1],"role":[1],"labelTag":[1,"label-tag"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagCloseLabel":[1,"wcag-close-label"],"wcagCloseLabelledBy":[1,"wcag-close-labelled-by"],"show":[64],"hide":[64],"validateWcag":[64]}]]],["p-ec63daab",[[4,"gov-tabs",{"type":[1],"variant":[1],"orientation":[1],"wcagLabel":[1,"wcag-label"],"wcagSelectLabel":[1,"wcag-select-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"controller":[32],"focusIndex":[32],"compactControls":[32],"refresh":[64],"currentTab":[64],"setActiveTab":[64],"validateWcag":[64]}]]],["p-683fc65e",[[4,"gov-alert",{"headline":[1],"variant":[1],"inverse":[4],"wcagCloseLabel":[1,"wcag-close-label"],"wcagToggleLabel":[1,"wcag-toggle-label"],"closable":[4],"toggleContent":[32],"validateWcag":[64]}]]],["p-354c6a6d",[[4,"gov-loading",{"loading":[4]}]]],["p-8bebbcc7",[[4,"gov-side-nav-item",{"inverse":[4],"compact":[4],"identifier":[1],"count":[4],"label":[1],"disabled":[4],"href":[1],"isExpanded":[4,"is-expanded"],"isExpandedState":[32],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-042d5b20",[[4,"gov-toast",{"variant":[1],"gravity":[1],"position":[1],"type":[1],"time":[2],"closeLabel":[1,"close-label"],"wcagCloseLabel":[1,"wcag-close-label"],"destroy":[64]}]]],["p-5957ba08",[[4,"gov-accordion-item",{"variant":[1025],"identifier":[1],"size":[1025],"label":[1],"annotation":[1],"disabled":[4],"isExpanded":[4,"is-expanded"],"triggerTag":[1,"trigger-tag"],"noBorder":[4,"no-border"],"isExpandedState":[32],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-070f9684",[[4,"gov-card",{"promotion":[4],"label":[1],"collapsible":[4],"expanded":[4],"headlineTag":[1,"headline-tag"],"wcagTriggerLabel":[1,"wcag-trigger-label"],"wcagTriggerLabelledBy":[1,"wcag-trigger-labelled-by"],"isExpanded":[32],"open":[64],"close":[64],"validateWcag":[64]}]]],["p-70a7e7f6",[[4,"gov-form-checkbox",{"value":[1],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"noLabel":[4,"no-label"],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-4db67975",[[4,"gov-tile",{"promotion":[4],"href":[1],"name":[1],"getTriggerRef":[64]}]]],["p-0563bda3",[[4,"gov-wizzard-item",{"variant":[1],"size":[1],"identifier":[1],"collapsible":[4],"annotation":[1],"label":[1],"disabled":[4],"isExpanded":[1028,"is-expanded"],"labelTag":[1,"label-tag"],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-7cde4bc8",[[4,"gov-accordion",{"size":[1],"variant":[1],"noBorder":[4,"no-border"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-09cda4ea",[[0,"gov-app"]]],["p-d9e28400",[[4,"gov-breadcrumbs",{"collapsible":[4],"isExpanded":[4,"is-expanded"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelded-by"],"validateWcag":[64]}]]],["p-2f88b6d9",[[4,"gov-container",{"slottedChildren":[64]}]]],["p-58047fab",[[4,"gov-control-group",{"variant":[1],"noBorder":[4,"no-border"]}]]],["p-6aa31f02",[[4,"gov-cookiebar"]]],["p-2f0f56fc",[[4,"gov-dropdown",{"open":[1028],"position":[1],"getState":[64]}]]],["p-d90a2718",[[4,"gov-empty"]]],["p-1def0eb2",[[4,"gov-error-code"]]],["p-90330543",[[4,"gov-form-control",{"gap":[1],"identifier":[1],"invalid":[4],"disabled":[4],"success":[4],"fieldset":[4],"size":[1]}]]],["p-4d257c38",[[4,"gov-form-group",{"gap":[1]}]]],["p-63ef7826",[[4,"gov-form-label",{"identifier":[1],"size":[1],"required":[4],"legend":[4]}]]],["p-f644cad5",[[4,"gov-form-password-power",{"power":[2]}]]],["p-14a475a8",[[4,"gov-form-radio",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-00c4dc0d",[[4,"gov-form-search",{"variant":[1]}]]],["p-529363af",[[4,"gov-form-switch",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-5d348765",[[4,"gov-grid",{"alignX":[1,"align-x"],"alignY":[1,"align-y"]}]]],["p-a4d23e73",[[4,"gov-grid-item",{"size":[1],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]}]]],["p-52dc68aa",[[4,"gov-layout",{"type":[1],"variant":[1],"inverse":[4]}]]],["p-50e94566",[[4,"gov-layout-column"]]],["p-dc94a1da",[[4,"gov-message",{"variant":[1]}]]],["p-22222994",[[4,"gov-nav",{"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-732f74fe",[[4,"gov-nav-item",{"href":[1],"isExpandedState":[32]}]]],["p-2e2be66b",[[4,"gov-side-nav",{"inverse":[4],"compact":[4],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-3d7ea15c",[[0,"gov-skeleton",{"variant":[1],"count":[2],"shape":[1],"width":[1],"height":[1],"animation":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}]]],["p-76e2aa52",[[0,"gov-spacer",{"size":[1],"breakpoint":[1]}]]],["p-e4bb6100",[[4,"gov-statsbar",{"iconPosition":[1,"icon-position"],"variant":[1]}]]],["p-d8def432",[[4,"gov-statsbar-item",{"iconPosition":[1,"icon-position"]}]]],["p-a89c27c1",[[4,"gov-stepper",{"size":[1]}]]],["p-d389c001",[[4,"gov-stepper-item",{"variant":[1],"size":[1],"identifier":[1],"label":[1],"annotation":[1],"triggerTag":[1,"trigger-tag"],"isExpandedState":[32],"currentState":[64]}]]],["p-0f0564e8",[[4,"gov-tabs-item",{"identifier":[1],"triggerIdentifier":[1,"trigger-identifier"],"label":[1],"default":[4],"isActive":[32],"getIdentifier":[64],"getTriggerIdentifier":[64],"setActiveStatus":[64]}]]],["p-e1e4c8f8",[[4,"gov-tiles",{"columns":[2],"noBorder":[4,"no-border"]}]]],["p-ebf79ea8",[[4,"gov-tooltip",{"variant":[1],"size":[1],"position":[1],"message":[1],"identifier":[1],"icon":[4],"show":[64],"hide":[64]}]]],["p-42636ddf",[[4,"gov-tooltip-content",{"isVisible":[4,"is-visible"]}]]],["p-65aa3b0c",[[4,"gov-wizzard",{"size":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-ad89c9e7",[[0,"gov-icon",{"name":[1],"type":[1],"iconData":[32],"visible":[32],"error":[32]}]]],["p-2e94d2d3",[[4,"gov-form-input",{"value":[1537],"identifier":[1],"variant":[1],"success":[4],"size":[1],"name":[1],"multiline":[4],"rows":[2],"cols":[2],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"minlength":[2],"maxlength":[2],"min":[8],"max":[8],"autocomplete":[4],"autocorrect":[4],"type":[1],"inputType":[1,"input-type"],"role":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"wcagAutocomplete":[1,"wcag-autocomplete"],"wcagExpanded":[4,"wcag-expanded"],"focused":[32],"setFocus":[64],"setValue":[64],"clearValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-f656fffe",[[4,"gov-form-autocomplete",{"value":[1537],"identifier":[1],"variant":[1],"success":[4],"size":[1],"nameKey":[1,"name-key"],"name":[1],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"invalid":[4],"minlength":[2],"maxlength":[2],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"processing":[32],"arrowCounter":[32],"list":[32],"setFocus":[64],"setOptions":[64],"clearValue":[64],"setProcessing":[64],"setSearchCallback":[64],"setTemplateResolver":[64]}]]],["p-f1503456",[[4,"gov-form-select",{"value":[1537],"identifier":[1],"variant":[1],"size":[1],"name":[1],"required":[4],"disabled":[4],"invalid":[4],"wcagActiveDescendant":[1,"wcag-active-descendant"],"wcagControls":[1,"wcag-controls"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"setFocus":[64],"setValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-f5d42069",[[4,"gov-badge",{"inverse":[4],"disabled":[4],"href":[1],"target":[1],"size":[1],"type":[1],"tag":[1],"variant":[1],"wcagLabel":[1,"wcag-label"],"getTriggerRef":[64]}]]],["p-4c6d7b65",[[4,"gov-attachments-item",{"wcagRemoveLabel":[1,"wcag-remove-label"],"wcagRemoveLabelledBy":[1,"wcag-remove-labelled-by"],"validateWcag":[64]}],[4,"gov-attachments",{"label":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}],[4,"gov-form-message",{"variant":[1],"identifier":[64]}]]],["p-60ff8457",[[0,"gov-backdrop",{"inverse":[4],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-1c4ad772",[[4,"gov-button",{"variant":[513],"size":[513],"type":[513],"expanded":[4],"inverse":[4],"name":[1],"disabled":[516],"nativeType":[1,"native-type"],"href":[1],"target":[1],"download":[4],"hreflang":[1],"referrerpolicy":[1],"rel":[1],"loading":[1],"focusable":[4],"identifier":[1],"wcagActiveDescendant":[1,"wcag-active-descendant"],"wcagControls":[1,"wcag-controls"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagDescription":[1,"wcag-description"],"wcagDetails":[1,"wcag-details"],"wcagExpanded":[4,"wcag-expanded"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"wcagHasPopup":[1,"wcag-has-popup"],"wcagPressed":[1,"wcag-pressed"],"wcagCurrent":[1,"wcag-current"],"isPressed":[32],"setFocus":[64],"getTriggerRef":[64],"validateWcag":[64]}]]]]'),e)));
1
+ import{p as e,b as a}from"./p-4af5e4f4.js";const l=()=>{const a=import.meta.url;const l={};if(a!==""){l.resourcesUrl=new URL(".",a).href}return e(l)};l().then((e=>a(JSON.parse('[["p-2507a42a",[[4,"gov-form-file",{"expanded":[4],"required":[4],"disabled":[4],"displayAttachments":[4,"display-attachments"],"name":[1],"accept":[1],"multiple":[4],"maxFileSize":[2,"max-file-size"],"identifier":[1],"invalid":[4],"errorSize":[1,"error-size"],"errorAccept":[1,"error-accept"],"attachmentsLabel":[1,"attachments-label"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagRemoveLabel":[1,"wcag-remove-label"],"wcagAttachmentsLabel":[1,"wcag-attachments-label"],"files":[32],"getRef":[64],"getAreaRef":[64],"validateWcag":[64]}]]],["p-0574a26a",[[4,"gov-form-multi-select",{"identifier":[1],"placeholder":[1],"variant":[1],"size":[1],"name":[1],"required":[4],"disabled":[4],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"value":[32],"selectedOptions":[32],"setFocus":[64],"setValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-02fb27e8",[[4,"gov-modal",{"open":[1028],"label":[1],"role":[1],"labelTag":[1,"label-tag"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagCloseLabel":[1,"wcag-close-label"],"wcagCloseLabelledBy":[1,"wcag-close-labelled-by"],"show":[64],"hide":[64],"validateWcag":[64]}]]],["p-ed1e9d01",[[0,"gov-pagination",{"type":[1],"current":[2],"total":[2],"inverse":[4],"size":[1],"variant":[1],"pageSize":[2,"page-size"],"maxPages":[2,"max-pages"],"link":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagSelectLabel":[1,"wcag-select-label"],"wcagPageLabel":[1,"wcag-page-label"],"pagination":[32],"validateWcag":[64]}]]],["p-ce59c2ee",[[4,"gov-prompt",{"open":[1028],"label":[1],"role":[1],"labelTag":[1,"label-tag"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagCloseLabel":[1,"wcag-close-label"],"wcagCloseLabelledBy":[1,"wcag-close-labelled-by"],"show":[64],"hide":[64],"validateWcag":[64]}]]],["p-ec63daab",[[4,"gov-tabs",{"type":[1],"variant":[1],"orientation":[1],"wcagLabel":[1,"wcag-label"],"wcagSelectLabel":[1,"wcag-select-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"controller":[32],"focusIndex":[32],"compactControls":[32],"refresh":[64],"currentTab":[64],"setActiveTab":[64],"validateWcag":[64]}]]],["p-683fc65e",[[4,"gov-alert",{"headline":[1],"variant":[1],"inverse":[4],"wcagCloseLabel":[1,"wcag-close-label"],"wcagToggleLabel":[1,"wcag-toggle-label"],"closable":[4],"toggleContent":[32],"validateWcag":[64]}]]],["p-354c6a6d",[[4,"gov-loading",{"loading":[4]}]]],["p-8bebbcc7",[[4,"gov-side-nav-item",{"inverse":[4],"compact":[4],"identifier":[1],"count":[4],"label":[1],"disabled":[4],"href":[1],"isExpanded":[4,"is-expanded"],"isExpandedState":[32],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-042d5b20",[[4,"gov-toast",{"variant":[1],"gravity":[1],"position":[1],"type":[1],"time":[2],"closeLabel":[1,"close-label"],"wcagCloseLabel":[1,"wcag-close-label"],"destroy":[64]}]]],["p-5957ba08",[[4,"gov-accordion-item",{"variant":[1025],"identifier":[1],"size":[1025],"label":[1],"annotation":[1],"disabled":[4],"isExpanded":[4,"is-expanded"],"triggerTag":[1,"trigger-tag"],"noBorder":[4,"no-border"],"isExpandedState":[32],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-070f9684",[[4,"gov-card",{"promotion":[4],"label":[1],"collapsible":[4],"expanded":[4],"headlineTag":[1,"headline-tag"],"wcagTriggerLabel":[1,"wcag-trigger-label"],"wcagTriggerLabelledBy":[1,"wcag-trigger-labelled-by"],"isExpanded":[32],"open":[64],"close":[64],"validateWcag":[64]}]]],["p-70a7e7f6",[[4,"gov-form-checkbox",{"value":[1],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"noLabel":[4,"no-label"],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-4db67975",[[4,"gov-tile",{"promotion":[4],"href":[1],"name":[1],"getTriggerRef":[64]}]]],["p-fb895b07",[[4,"gov-wizzard-item",{"variant":[1],"size":[1],"identifier":[1],"collapsible":[4],"annotation":[1],"label":[1],"disabled":[4],"isExpanded":[1028,"is-expanded"],"labelTag":[1,"label-tag"],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-7cde4bc8",[[4,"gov-accordion",{"size":[1],"variant":[1],"noBorder":[4,"no-border"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-bc1c8436",[[0,"gov-app"]]],["p-d9e28400",[[4,"gov-breadcrumbs",{"collapsible":[4],"isExpanded":[4,"is-expanded"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelded-by"],"validateWcag":[64]}]]],["p-2f88b6d9",[[4,"gov-container",{"slottedChildren":[64]}]]],["p-58047fab",[[4,"gov-control-group",{"variant":[1],"noBorder":[4,"no-border"]}]]],["p-6aa31f02",[[4,"gov-cookiebar"]]],["p-bd47b407",[[4,"gov-dropdown",{"open":[1028],"position":[1],"getState":[64],"setOpen":[64]}]]],["p-d90a2718",[[4,"gov-empty"]]],["p-1def0eb2",[[4,"gov-error-code"]]],["p-90330543",[[4,"gov-form-control",{"gap":[1],"identifier":[1],"invalid":[4],"disabled":[4],"success":[4],"fieldset":[4],"size":[1]}]]],["p-4d257c38",[[4,"gov-form-group",{"gap":[1]}]]],["p-63ef7826",[[4,"gov-form-label",{"identifier":[1],"size":[1],"required":[4],"legend":[4]}]]],["p-f644cad5",[[4,"gov-form-password-power",{"power":[2]}]]],["p-14a475a8",[[4,"gov-form-radio",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-00c4dc0d",[[4,"gov-form-search",{"variant":[1]}]]],["p-529363af",[[4,"gov-form-switch",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-5d348765",[[4,"gov-grid",{"alignX":[1,"align-x"],"alignY":[1,"align-y"]}]]],["p-a4d23e73",[[4,"gov-grid-item",{"size":[1],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]}]]],["p-52dc68aa",[[4,"gov-layout",{"type":[1],"variant":[1],"inverse":[4]}]]],["p-50e94566",[[4,"gov-layout-column"]]],["p-dc94a1da",[[4,"gov-message",{"variant":[1]}]]],["p-22222994",[[4,"gov-nav",{"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-732f74fe",[[4,"gov-nav-item",{"href":[1],"isExpandedState":[32]}]]],["p-2e2be66b",[[4,"gov-side-nav",{"inverse":[4],"compact":[4],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-3d7ea15c",[[0,"gov-skeleton",{"variant":[1],"count":[2],"shape":[1],"width":[1],"height":[1],"animation":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}]]],["p-76e2aa52",[[0,"gov-spacer",{"size":[1],"breakpoint":[1]}]]],["p-e4bb6100",[[4,"gov-statsbar",{"iconPosition":[1,"icon-position"],"variant":[1]}]]],["p-d8def432",[[4,"gov-statsbar-item",{"iconPosition":[1,"icon-position"]}]]],["p-a89c27c1",[[4,"gov-stepper",{"size":[1]}]]],["p-ca2b9685",[[4,"gov-stepper-item",{"variant":[1],"size":[1],"identifier":[1],"label":[1],"annotation":[1],"triggerTag":[1,"trigger-tag"],"isExpandedState":[32],"currentState":[64]}]]],["p-0f0564e8",[[4,"gov-tabs-item",{"identifier":[1],"triggerIdentifier":[1,"trigger-identifier"],"label":[1],"default":[4],"isActive":[32],"getIdentifier":[64],"getTriggerIdentifier":[64],"setActiveStatus":[64]}]]],["p-e1e4c8f8",[[4,"gov-tiles",{"columns":[2],"noBorder":[4,"no-border"]}]]],["p-ebf79ea8",[[4,"gov-tooltip",{"variant":[1],"size":[1],"position":[1],"message":[1],"identifier":[1],"icon":[4],"show":[64],"hide":[64]}]]],["p-42636ddf",[[4,"gov-tooltip-content",{"isVisible":[4,"is-visible"]}]]],["p-65aa3b0c",[[4,"gov-wizzard",{"size":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-3932645b",[[0,"gov-icon",{"name":[1],"type":[1],"iconData":[32],"visible":[32],"error":[32]}]]],["p-2e94d2d3",[[4,"gov-form-input",{"value":[1537],"identifier":[1],"variant":[1],"success":[4],"size":[1],"name":[1],"multiline":[4],"rows":[2],"cols":[2],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"minlength":[2],"maxlength":[2],"min":[8],"max":[8],"autocomplete":[4],"autocorrect":[4],"type":[1],"inputType":[1,"input-type"],"role":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"wcagAutocomplete":[1,"wcag-autocomplete"],"wcagExpanded":[4,"wcag-expanded"],"focused":[32],"setFocus":[64],"setValue":[64],"clearValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-f656fffe",[[4,"gov-form-autocomplete",{"value":[1537],"identifier":[1],"variant":[1],"success":[4],"size":[1],"nameKey":[1,"name-key"],"name":[1],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"invalid":[4],"minlength":[2],"maxlength":[2],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"processing":[32],"arrowCounter":[32],"list":[32],"setFocus":[64],"setOptions":[64],"clearValue":[64],"setProcessing":[64],"setSearchCallback":[64],"setTemplateResolver":[64]}]]],["p-f1503456",[[4,"gov-form-select",{"value":[1537],"identifier":[1],"variant":[1],"size":[1],"name":[1],"required":[4],"disabled":[4],"invalid":[4],"wcagActiveDescendant":[1,"wcag-active-descendant"],"wcagControls":[1,"wcag-controls"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"setFocus":[64],"setValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-f5d42069",[[4,"gov-badge",{"inverse":[4],"disabled":[4],"href":[1],"target":[1],"size":[1],"type":[1],"tag":[1],"variant":[1],"wcagLabel":[1,"wcag-label"],"getTriggerRef":[64]}]]],["p-4c6d7b65",[[4,"gov-attachments-item",{"wcagRemoveLabel":[1,"wcag-remove-label"],"wcagRemoveLabelledBy":[1,"wcag-remove-labelled-by"],"validateWcag":[64]}],[4,"gov-attachments",{"label":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}],[4,"gov-form-message",{"variant":[1],"identifier":[64]}]]],["p-60ff8457",[[0,"gov-backdrop",{"inverse":[4],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-1c4ad772",[[4,"gov-button",{"variant":[513],"size":[513],"type":[513],"expanded":[4],"inverse":[4],"name":[1],"disabled":[516],"nativeType":[1,"native-type"],"href":[1],"target":[1],"download":[4],"hreflang":[1],"referrerpolicy":[1],"rel":[1],"loading":[1],"focusable":[4],"identifier":[1],"wcagActiveDescendant":[1,"wcag-active-descendant"],"wcagControls":[1,"wcag-controls"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagDescription":[1,"wcag-description"],"wcagDetails":[1,"wcag-details"],"wcagExpanded":[4,"wcag-expanded"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"wcagHasPopup":[1,"wcag-has-popup"],"wcagPressed":[1,"wcag-pressed"],"wcagCurrent":[1,"wcag-current"],"isPressed":[32],"setFocus":[64],"getTriggerRef":[64],"validateWcag":[64]}]]]]'),e)));
2
2
  //# sourceMappingURL=core.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"names":["patchBrowser","importMeta","import","meta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","JSON","parse"],"mappings":"2CAMA,MAAMA,EAAe,KA6BjB,MAAMC,EAAaC,OAAOC,KAAKC,IAC/B,MAAMC,EAA6D,GAenE,GAAuBJ,IAAe,GAAI,CACtCI,EAAKC,aAAe,IAAIC,IAAI,IAAKN,GAAYO,KAajD,OAAOC,EAAeJ,IC9D1BL,IAAeU,MAAKC,GAEXC,EAAcC,KAAAC,MAAA,49VAAuCH","sourcesContent":["/*\n Stencil Client Patch Browser v2.20.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cssVarShim) {\n // shim css vars\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","import { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"]}
1
+ {"version":3,"sources":["../../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"names":["patchBrowser","importMeta","import","meta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","JSON","parse"],"mappings":"2CAMA,MAAMA,EAAe,KA6BjB,MAAMC,EAAaC,OAAOC,KAAKC,IAC/B,MAAMC,EAA6D,GAenE,GAAuBJ,IAAe,GAAI,CACtCI,EAAKC,aAAe,IAAIC,IAAI,IAAKN,GAAYO,KAajD,OAAOC,EAAeJ,IC9D1BL,IAAeU,MAAKC,GAEXC,EAAcC,KAAAC,MAAA,0/VAAuCH","sourcesContent":["/*\n Stencil Client Patch Browser v2.20.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cssVarShim) {\n // shim css vars\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","import { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as o,h as i,H as l,g as a}from"./p-4af5e4f4.js";import{c as r}from"./p-24636c53.js";import{g as t,a as f,t as s}from"./p-3f37ddb6.js";import{b as n,c as d}from"./p-0f5e2b0a.js";import{c as m}from"./p-34152b51.js";import{d as v}from"./p-03990da5.js";import{g}from"./p-34ed07f6.js";import"./p-561fa17b.js";import"./p-55500e5a.js";import"./p-ff7365ae.js";import"./p-6278531b.js";import"./p-9dab01be.js";import"./p-3464136c.js";const h={root:"gov-form-file",area:"gov-form-file__area",label:"gov-form-file__label",input:"gov-form-file__input",list:"gov-form-file__list",item:"gov-form-file__item",attachments:"gov-form-file__attachments"};function _(e){const o=["bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let i=0,l=parseInt(e,10)||0;while(l>=1024&&++i){l=l/1024}return l.toFixed(l<10&&i>0?1:0)+" "+o[i]}function b(e,o){if(typeof o==="string"&&o.length){return o.replace(/\s/g,"").split(",").filter((o=>new RegExp(o.replace("*",".*")).test(e.type))).length>0}else{return true}}function p(e,o){const i=Math.round(e.size);return i<=o}const c='.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-file{position:relative;display:block;width:100%}.gov-form-file__label .gov-form-label__label>*:last-child{margin-bottom:0}.gov-form-file__input{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0.0001;cursor:pointer}.gov-form-file__attachments{margin-top:1rem 0rem 0rem}.gov-form-file__item{display:flex;gap:1rem;align-items:center}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label{pointer-events:none}.gov-form-file[disabled=""] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled=true i] .gov-form-file__label .gov-form-label__label *,.gov-form-file[disabled="1"] .gov-form-file__label .gov-form-label__label *{color:var(--gov-form-file-disabled-color, var(--gov-color-secondary-600))}.gov-form-file[expanded=""] .gov-form-file__area,.gov-form-file[expanded=true i] .gov-form-file__area,.gov-form-file[expanded="1"] .gov-form-file__area{position:relative;width:100%;padding:2rem 1.375rem 1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center;transition:background-color 150ms ease-in-out;will-change:background-color}.gov-form-file[expanded=""] .gov-form-file__area.highlight,.gov-form-file[expanded=true i] .gov-form-file__area.highlight,.gov-form-file[expanded="1"] .gov-form-file__area.highlight{background-color:var(--gov-color-primary-200)}.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{width:100%;padding:1.375rem;border:var(--gov-form-file-border, 0.0625rem dashed var(--gov-color-secondary-500));text-align:center}.gov-form-file[expanded=""] .gov-form-file__attachments,.gov-form-file[expanded=true i] .gov-form-file__attachments,.gov-form-file[expanded="1"] .gov-form-file__attachments{margin:1.5rem 0rem 0rem}.gov-form-file[expanded=""][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=""][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i][invalid="1"] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"][invalid="1"] .gov-form-file__label .gov-form-label__label{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-file[expanded=""][invalid=""] .gov-form-file__area,.gov-form-file[expanded=""][invalid=true i] .gov-form-file__area,.gov-form-file[expanded=""][invalid="1"] .gov-form-file__area,.gov-form-file[expanded=true i][invalid=""] .gov-form-file__area,.gov-form-file[expanded=true i][invalid=true i] .gov-form-file__area,.gov-form-file[expanded=true i][invalid="1"] .gov-form-file__area,.gov-form-file[expanded="1"][invalid=""] .gov-form-file__area,.gov-form-file[expanded="1"][invalid=true i] .gov-form-file__area,.gov-form-file[expanded="1"][invalid="1"] .gov-form-file__area{border-color:var(--gov-form-state-color-error, var(--gov-color-error))}.gov-form-file[expanded=""][disabled=""] .gov-form-file__area,.gov-form-file[expanded=""][disabled=true i] .gov-form-file__area,.gov-form-file[expanded=""][disabled="1"] .gov-form-file__area,.gov-form-file[expanded=true i][disabled=""] .gov-form-file__area,.gov-form-file[expanded=true i][disabled=true i] .gov-form-file__area,.gov-form-file[expanded=true i][disabled="1"] .gov-form-file__area,.gov-form-file[expanded="1"][disabled=""] .gov-form-file__area,.gov-form-file[expanded="1"][disabled=true i] .gov-form-file__area,.gov-form-file[expanded="1"][disabled="1"] .gov-form-file__area{pointer-events:none;color:var(--gov-form-file-disabled-color, var(--gov-color-secondary-600))}@media (min-width: 30em){.gov-form-file[expanded=""] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded=true i] .gov-form-file__label .gov-form-label__label,.gov-form-file[expanded="1"] .gov-form-file__label .gov-form-label__label{padding:2rem}}';const u=class{constructor(i){e(this,i);this.govFocus=o(this,"gov-focus",7);this.govBlur=o(this,"gov-blur",7);this.govFiles=o(this,"gov-files",7);this.govAddFile=o(this,"gov-add-file",7);this.govRemoveFile=o(this,"gov-remove-file",7);this.expanded=false;this.required=false;this.disabled=undefined;this.displayAttachments=true;this.name=undefined;this.accept=undefined;this.multiple=false;this.maxFileSize=-1;this.identifier=undefined;this.invalid=undefined;this.errorSize="Soubor je větší než povolená velikost {FILE_SIZE}";this.errorAccept="Soubor tohoto typu není povolen";this.attachmentsLabel="Přílohy";this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagRemoveLabel="Odebrat soubor {FILE_NAME}";this.wcagAttachmentsLabel="Přílohy";this.files=[];this.fileId=r("GovInputFile");this.h=t(this.host);this.f=g(this.h)}watchDisabled(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("disabled",f(this.disabled));this.f.passAttrToControl("invalid",f(this.invalid));this.f.passAttrToControl("type","File")}registerListeners(){function e(){this.areaRef.classList.add("highlight")}function o(){this.areaRef.classList.remove("highlight")}this.inputRef.addEventListener("change",(e=>{e.preventDefault();e.stopPropagation();const o=e.target.files;this.validateFiles(o)}),false);if(this.expanded){const i=["dragover","dragleave"];const l=["dragenter","dragover","mouseenter"];const a=["dragleave","drop","mouseleave"];i.map((e=>this.inputRef.addEventListener(e,this.preventDefaults.bind(this),false)));l.map((o=>this.inputRef.addEventListener(o,e.bind(this),false)));a.forEach((e=>this.inputRef.addEventListener(e,o.bind(this),false)));this.areaRef.addEventListener("drop",this.handleDrop.bind(this),false)}}preventDefaults(e){e.preventDefault();e.stopPropagation()}handleDrop(e){const o=e.dataTransfer;this.validateFiles(o.files)}validateFiles(e){Array.from(e).map((e=>{const o=this.files.find((o=>o.file.name===e.name&&o.file.size===e.size))||null;if(o===null){const o=typeof this.maxFileSize==="number"&&this.maxFileSize>0?p(e,this.maxFileSize):true;const i=b(e,this.accept);const l={id:r("GovFormFile"),file:e,acceptValid:i,sizeValid:o};this.files=[...this.files,l];this.govAddFile.emit({component:h.root,file:l})}}));this.govFiles.emit({component:h.root,files:this.files})}componentWillLoad(){this.f.passAttrToLabel("required",String(this.required));this.watchDisabled()}async componentDidRender(){if(m()){await v(500);await this.validateWcag()}this.registerListeners()}render(){return i(l,{class:this.h.classes([h.root]),invalid:s(this.invalid),expanded:s(this.expanded)},i("div",{class:h.area,ref:e=>this.areaRef=e},i("slot",null),i("input",{class:h.input,ref:e=>this.inputRef=e,id:this.identifier||this.fileId,type:"file",name:this.name,accept:this.accept,multiple:this.multiple,onChange:this.onChangeHandler.bind(this),onFocus:this.onFocusHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,disabled:this.disabled,"aria-required":s(this.required),"aria-invalid":s(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-disabled":s(this.disabled)})),this.h.hasSlot("attachments")?i("div",{class:h.attachments},i("slot",{name:"attachments"})):null,this.files.length&&this.displayAttachments?i("div",{class:h.attachments},i("gov-attachments",{label:this.wcagAttachmentsLabel,"wcag-label":this.wcagAttachmentsLabel},this.files.map((e=>i("gov-attachments-item",{"wcag-remove-labelled-by":e.id,"on-gov-remove":()=>this.onRemoveFileHandler(e)},i("span",{class:"sr-only",id:e.id},this.wcagRemoveLabel.replace("{FILE_NAME}",e.file.name)),e.file.name,e.acceptValid===false?i("gov-form-message",{slot:"message",variant:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill"}),e.acceptValid===false?this.errorAccept:null):null,e.sizeValid===false?i("gov-form-message",{slot:"message",variant:"error"},i("gov-icon",{slot:"icon",name:"exclamation-triangle-fill"}),this.errorSize.replace("{FILE_SIZE}",_(this.maxFileSize))):null,i("span",{slot:"info"},"(",_(e.file.size),")")))))):null)}onRemoveFileHandler(e){const o=this.files.findIndex((o=>o.id===e.id));if(o!==-1){const e=this.files;const i=this.files[o];e.splice(o,1);this.files=[...e];this.govRemoveFile.emit({component:h.root,file:i});this.govFiles.emit({component:h.root,files:e})}}onFocusHandler(e){e.stopPropagation();this.govFocus.emit({component:h.root,originalEvent:e})}onBlurHandler(e){e.stopPropagation();this.govBlur.emit({component:h.root,originalEvent:e})}onChangeHandler(e){e.stopPropagation()}async getRef(){return this.inputRef}async getAreaRef(){return this.areaRef}async validateWcag(){n(this.wcagDescribedBy,"wcag-described-by",h.root);n(this.wcagLabelledBy,"wcag-labelled-by",h.root);d(this.identifier||this.fileId,this.wcagLabelledBy,h.root)}get host(){return a(this)}static get watchers(){return{disabled:["watchDisabled"],invalid:["watchDisabled"]}}};u.style=c;export{u as gov_form_file};
2
+ //# sourceMappingURL=p-2507a42a.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/components/gov-form/file/constants.ts","../../../packages/core/src/utils/file.utils.ts","../../../packages/core/src/components/gov-form/file/gov-form-file.scss?tag=gov-form-file","../../../packages/core/src/components/gov-form/file/gov-form-file.tsx"],"names":["FormFileClass","root","area","label","input","list","item","attachments","formatBytes","bytes","units","l","n","parseInt","toFixed","fileAcceptValidation","file","accept","length","replace","split","filter","RegExp","test","type","fileSizeValidation","maxSize","fileSize","Math","round","size","govFormFileCss","GovFormFile","[object Object]","hostRef","this","fileId","createID","h","govHost","host","f","govForm","passControlAttrs","passAttrToControl","toBoolAttr","disabled","invalid","highlight","areaRef","classList","add","unhighlight","remove","inputRef","addEventListener","e","preventDefault","stopPropagation","files","target","validateFiles","expanded","events","inEvents","outEvents","map","eventName","preventDefaults","bind","forEach","handleDrop","dataTransfer","Array","from","isFile","find","name","isSizeValid","maxFileSize","isAcceptValid","newFile","id","acceptValid","sizeValid","govAddFile","emit","component","govFiles","passAttrToLabel","String","required","watchDisabled","canValidateWcagOnRender","delay","validateWcag","registerListeners","Host","class","classes","toBoolAttrIfDefined","ref","el","identifier","multiple","onChange","onChangeHandler","onFocus","onFocusHandler","onBlur","onBlurHandler","aria-required","aria-invalid","aria-describedby","wcagDescribedBy","aria-labelledby","wcagLabelledBy","aria-disabled","hasSlot","displayAttachments","wcagAttachmentsLabel","wcag-label","wcag-remove-labelled-by","on-gov-remove","onRemoveFileHandler","wcagRemoveLabel","slot","variant","errorAccept","errorSize","index","findIndex","removeFile","splice","govRemoveFile","govFocus","originalEvent","govBlur","validateWcagRef","validateWcagLabelFor"],"mappings":"wbAAO,MAAMA,EAAgB,CAC5BC,KAAM,gBACNC,KAAM,sBACNC,MAAO,uBACPC,MAAO,uBACPC,KAAM,sBACNC,KAAM,sBACNC,YAAa,uCCPEC,EAAYC,GAC3B,MAAMC,EAAQ,CAAC,QAAS,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,OACzE,IA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BuB,GACvBA,EAAEE,kBAOHzB,eACC,OAAOE,KAAKmB,SAObrB,mBACC,OAAOE,KAAKc,QAObhB,qBACCyG,EAAgBvG,KAAK+E,gBAAiB,oBAAqBlH,EAAcC,MACzEyI,EAAgBvG,KAAKiF,eAAgB,mBAAoBpH,EAAcC,MACvE0I,EAAqBxG,KAAKoE,YAAcpE,KAAKC,OAAQD,KAAKiF,eAAgBpH,EAAcC","sourcesContent":["export const FormFileClass = {\n\troot: 'gov-form-file',\n\tarea: 'gov-form-file__area',\n\tlabel: 'gov-form-file__label',\n\tinput: 'gov-form-file__input',\n\tlist: 'gov-form-file__list',\n\titem: 'gov-form-file__item',\n\tattachments: 'gov-form-file__attachments',\n}\n","export function formatBytes(bytes: any): string {\n\tconst units = ['bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']\n\tlet l = 0,\n\t\tn = parseInt(bytes, 10) || 0\n\n\twhile (n >= 1024 && ++l) {\n\t\tn = n / 1024\n\t}\n\n\treturn n.toFixed(n < 10 && l > 0 ? 1 : 0) + ' ' + units[l]\n}\n\nexport function fileAcceptValidation(file: File, accept: string): boolean {\n\tif (typeof accept === 'string' && accept.length) {\n\t\treturn (\n\t\t\taccept\n\t\t\t\t.replace(/\\s/g, '')\n\t\t\t\t.split(',')\n\t\t\t\t.filter(accept => {\n\t\t\t\t\treturn new RegExp(accept.replace('*', '.*')).test(file.type)\n\t\t\t\t}).length > 0\n\t\t)\n\t} else {\n\t\treturn true\n\t}\n}\n\nexport function fileSizeValidation(file: File, maxSize: number): boolean {\n\tconst fileSize = Math.round(file.size)\n\treturn fileSize <= maxSize\n}\n","/*\n * File\n */\n\n$class: \".gov-form-file\";\n\n#{$class} {\n\t@include base();\n\t&__label .gov-form-label__label {\n\t\t@include reset-last-margin();\n\t}\n\t&__input {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\topacity: 0.0001;\n\t\tcursor: pointer;\n\t}\n\t&__attachments {\n\t\tmargin-top: rem-calc(16 0 0);\n\t}\n\t&__item {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\talign-items: center;\n\t}\n\n\t// STATES\n\t@include parameter(\"disabled\") {\n\t\t#{$class} {\n\t\t\t&__label .gov-form-label__label {\n\t\t\t\tpointer-events: none;\n\t\t\t\t* {\n\t\t\t\t\tcolor: $form-file-disabled-color;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@include parameter(\"expanded\") {\n\t\t#{$class} {\n\t\t\t&__area {\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\tpadding: rem-calc(32) rem-calc(22) rem-calc(22);\n\t\t\t\tborder: $form-file-border;\n\t\t\t\ttext-align: center;\n\t\t\t\ttransition: background-color $t ease-in-out;\n\t\t\t\twill-change: background-color;\n\t\t\t\t&.highlight {\n\t\t\t\t\tbackground-color: color(\"primary.200\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&__label .gov-form-label__label {\n\t\t\t\twidth: 100%;\n\t\t\t\tpadding: rem-calc(22);\n\t\t\t\tborder: $form-file-border;\n\t\t\t\ttext-align: center;\n\t\t\t}\n\t\t\t&__attachments {\n\t\t\t\tmargin: rem-calc(24 0 0);\n\t\t\t}\n\t\t}\n\n\t\t// STATES\n\t\t@include parameter(\"invalid\") {\n\t\t\t#{$class} {\n\t\t\t\t&__label .gov-form-label__label {\n\t\t\t\t\tborder-color: $form-state-color-error;\n\t\t\t\t}\n\t\t\t\t&__area {\n\t\t\t\t\tborder-color: $form-state-color-error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@include parameter(\"disabled\") {\n\t\t\t#{$class} {\n\t\t\t\t&__area {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\tcolor: $form-file-disabled-color;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t@include parameter(\"expanded\") {\n\t\t\t#{$class} {\n\t\t\t\t&__label .gov-form-label__label {\n\t\t\t\t\tpadding: rem-calc(32);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { createID } from \"../../../utils/string.utils\"\nimport { FormFileClass } from \"./constants\"\nimport { govHost, toBoolAttr, toBoolAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { validateWcagLabelFor, validateWcagRef } from \"../../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../../helpers/Dom/win\"\nimport { fileAcceptValidation, fileSizeValidation, formatBytes } from \"../../../utils/file.utils\"\nimport { delay } from \"../../../utils/utils\"\nimport { GovForm } from \"../../../helpers/Dom/form.types\"\nimport { GovHost } from \"../../../helpers/Dom/template.types\"\nimport { govForm } from \"../../../helpers/Dom/form\"\nimport { GovFormFileEvent, GovFormFileItem } from \"./gov-form-file.types\"\n\n@Component({\n\ttag: \"gov-form-file\",\n\tstyleUrl: \"gov-form-file.scss\",\n})\nexport class GovFormFile {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\n\tprivate areaRef?: HTMLDivElement\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly fileId: string\n\n\tconstructor() {\n\t\tthis.fileId = createID(\"GovInputFile\")\n\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormFileElement\n\t/**\n\t * Expands the file input to fill 100% of the container width.\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the File component disabled.\n\t * This prevents users from being able to interact with the File, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Show list of attachments\n\t */\n\t@Prop({ attribute: \"display-attachments\" }) readonly displayAttachments: boolean = true\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept\n\t */\n\t@Prop() readonly accept: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/multiple\n\t */\n\t@Prop() readonly multiple: boolean = false\n\t/**\n\t * Maximum embedded file size\n\t */\n\t@Prop({ attribute: \"max-file-size\" }) readonly maxFileSize: number = -1\n\t/**\n\t * Custom File identifier.\n\t */\n\t@Prop({ attribute: \"identifier\" }) readonly identifier: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Error message when the maximum file size is exceeded\n\t */\n\t@Prop({ attribute: \"error-size\" }) readonly errorSize: string = \"Soubor je větší než povolená velikost {FILE_SIZE}\"\n\t/**\n\t * Insert unsupported file error message\n\t */\n\t@Prop({ attribute: \"error-accept\" }) readonly errorAccept: string = \"Soubor tohoto typu není povolen\"\n\t/**\n\t * Description of the list of attachments\n\t */\n\t@Prop({ attribute: \"attachments-label\" }) readonly attachmentsLabel: string = \"Přílohy\"\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) readonly wcagLabelledBy: string\n\t/**\n\t * Adds accessible label for the remove button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: \"wcag-remove-label\" }) readonly wcagRemoveLabel: string = \"Odebrat soubor {FILE_NAME}\"\n\t/**\n\t * Adds accessible label for the list of attachments.\n\t */\n\t@Prop({ attribute: \"wcag-attachments-label\" }) readonly wcagAttachmentsLabel: string = \"Přílohy\"\n\t/**\n\t * Emitted when the File has focus.\n\t */\n\t@Event({ eventName: \"gov-focus\" }) govFocus: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Emitted when the File loses focus.\n\t */\n\t@Event({ eventName: \"gov-blur\" }) govBlur: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when the list of inserted files is changed\n\t */\n\t@Event({ eventName: \"gov-files\" }) govFiles: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when a new file is added\n\t */\n\t@Event({ eventName: \"gov-add-file\" }) govAddFile: EventEmitter<GovFormFileEvent>\n\t/**\n\t * Called when a file is removed from the list\n\t */\n\t@Event({ eventName: \"gov-remove-file\" }) govRemoveFile: EventEmitter<GovFormFileEvent>\n\n\t@State() files: GovFormFileItem[] = []\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", \"File\")\n\t}\n\n\n\tprivate registerListeners() {\n\t\tfunction highlight() {\n\t\t\tthis.areaRef.classList.add(\"highlight\")\n\t\t}\n\n\t\tfunction unhighlight() {\n\t\t\tthis.areaRef.classList.remove(\"highlight\")\n\t\t}\n\n\t\tthis.inputRef.addEventListener(\n\t\t\t\"change\",\n\t\t\te => {\n\t\t\t\te.preventDefault()\n\t\t\t\te.stopPropagation()\n\t\t\t\tconst files = (e.target as HTMLInputElement).files\n\t\t\t\tthis.validateFiles(files)\n\t\t\t},\n\t\t\tfalse,\n\t\t)\n\t\t//this.inputRef.addEventListener('focus')\n\n\t\tif (this.expanded) {\n\t\t\tconst events = [\"dragover\", \"dragleave\"]\n\t\t\tconst inEvents = [\"dragenter\", \"dragover\", \"mouseenter\"]\n\t\t\tconst outEvents = [\"dragleave\", \"drop\", \"mouseleave\"]\n\n\t\t\tevents.map(eventName => this.inputRef.addEventListener(eventName, this.preventDefaults.bind(this), false))\n\t\t\tinEvents.map(eventName => this.inputRef.addEventListener(eventName, highlight.bind(this), false))\n\t\t\toutEvents.forEach(eventName => this.inputRef.addEventListener(eventName, unhighlight.bind(this), false))\n\n\t\t\tthis.areaRef.addEventListener(\"drop\", this.handleDrop.bind(this), false)\n\t\t}\n\t}\n\n\tpreventDefaults(e) {\n\t\te.preventDefault()\n\t\te.stopPropagation()\n\t}\n\n\thandleDrop(e: DragEvent) {\n\t\tconst dataTransfer = e.dataTransfer\n\t\tthis.validateFiles(dataTransfer.files)\n\t}\n\n\tprivate validateFiles(files: FileList) {\n\t\tArray.from(files).map(file => {\n\t\t\tconst isFile = this.files.find(item => item.file.name === file.name && item.file.size === file.size) || null\n\t\t\tif (isFile === null) {\n\t\t\t\tconst isSizeValid = typeof this.maxFileSize === \"number\" && this.maxFileSize > 0 ? fileSizeValidation(file, this.maxFileSize) : true\n\t\t\t\tconst isAcceptValid = fileAcceptValidation(file, this.accept)\n\t\t\t\tconst newFile = {\n\t\t\t\t\tid: createID(\"GovFormFile\"),\n\t\t\t\t\tfile,\n\t\t\t\t\tacceptValid: isAcceptValid,\n\t\t\t\t\tsizeValid: isSizeValid,\n\t\t\t\t}\n\t\t\t\tthis.files = [...this.files, newFile]\n\t\t\t\tthis.govAddFile.emit({\n\t\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\t\tfile: newFile,\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\tthis.govFiles.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\tfiles: this.files,\n\t\t})\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.watchDisabled()\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.registerListeners()\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes([FormFileClass.root])} invalid={toBoolAttrIfDefined(this.invalid)} expanded={toBoolAttrIfDefined(this.expanded)}>\n\t\t\t\t<div class={FormFileClass.area} ref={el => (this.areaRef = el as HTMLDivElement)}>\n\t\t\t\t\t<slot />\n\t\t\t\t\t<input\n\t\t\t\t\t\tclass={FormFileClass.input}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tid={this.identifier || this.fileId}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\taccept={this.accept}\n\t\t\t\t\t\tmultiple={this.multiple}\n\t\t\t\t\t\tonChange={this.onChangeHandler.bind(this)}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t{this.h.hasSlot(\"attachments\") ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<slot name={\"attachments\"} />\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\n\t\t\t\t{this.files.length && this.displayAttachments ? (\n\t\t\t\t\t<div class={FormFileClass.attachments}>\n\t\t\t\t\t\t<gov-attachments label={this.wcagAttachmentsLabel} wcag-label={this.wcagAttachmentsLabel}>\n\t\t\t\t\t\t\t{this.files.map(item => (\n\t\t\t\t\t\t\t\t<gov-attachments-item wcag-remove-labelled-by={item.id} on-gov-remove={() => this.onRemoveFileHandler(item)}>\n\t\t\t\t\t\t\t\t\t<span class={\"sr-only\"} id={item.id}>\n\t\t\t\t\t\t\t\t\t\t{this.wcagRemoveLabel.replace(\"{FILE_NAME}\", item.file.name)}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{item.file.name}\n\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" variant=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{item.acceptValid === false ? this.errorAccept : null}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t{item.sizeValid === false ? (\n\t\t\t\t\t\t\t\t\t\t<gov-form-message slot=\"message\" variant=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t<gov-icon slot=\"icon\" name=\"exclamation-triangle-fill\"></gov-icon>\n\t\t\t\t\t\t\t\t\t\t\t{this.errorSize.replace(\"{FILE_SIZE}\", formatBytes(this.maxFileSize))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-message>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t<span slot=\"info\">({formatBytes(item.file.size)})</span>\n\t\t\t\t\t\t\t\t</gov-attachments-item>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</gov-attachments>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onRemoveFileHandler(file: GovFormFileItem) {\n\t\tconst index = this.files.findIndex(item => item.id === file.id)\n\t\tif (index !== -1) {\n\t\t\tconst files = this.files\n\t\t\tconst removeFile = this.files[index]\n\t\t\tfiles.splice(index, 1)\n\t\t\tthis.files = [...files]\n\t\t\tthis.govRemoveFile.emit({\n\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\tfile: removeFile,\n\t\t\t})\n\t\t\tthis.govFiles.emit({\n\t\t\t\tcomponent: FormFileClass.root,\n\t\t\t\tfiles,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormFileClass.root,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\te.stopPropagation()\n\t}\n\n\t/**\n\t * Returns the reference of the native element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Returns the reference of the native area element\n\t */\n\t@Method()\n\tasync getAreaRef(): Promise<HTMLDivElement> {\n\t\treturn this.areaRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormFileClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormFileClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.fileId, this.wcagLabelledBy, FormFileClass.root)\n\t}\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{a as t,r as s,h as i,H as n,g as o}from"./p-4af5e4f4.js";import{i as e}from"./p-34152b51.js";import{g as a}from"./p-3f37ddb6.js";import"./p-03990da5.js";var r;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(r||(r={}));const c={root:"gov-icon",holder:"gov-icon__holder"};const h="0.0.41";const l=()=>h;const p={};const f={};const d=t=>t.startsWith("http://")||t.startsWith("https://");const u=(s,i,n)=>{if(d(s)){return`${s}/${n}/${i}.svg?v=${l()}`}return t(`${s}/${n}/${i}.svg`)+`?v=${l()}`};async function g({name:t,type:s}){if(p[t]){return p[t]}if(!f[t]){f[t]=fetch(u(e(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const i=await f[t];p[t]=i;return i}const m=".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-icon{display:inline-flex}.gov-icon__holder,.gov-icon svg{display:inline-flex;width:100%;height:100%}";const y=class{constructor(t){s(this,t);this.name=null;this.type="basic";this.iconData=undefined;this.visible=false;this.error=false;this.h=a(this.host)}async loadIconPathData(){const{name:t,visible:s,type:i}=this;if(!t||!s){return}try{this.iconData=await g({name:t,type:i})}catch(t){this.error=true}}connectedCallback(){this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){this.intersectionObserver.disconnect();this.intersectionObserver=null;t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}render(){if(this.error){return null}return i(n,{class:this.h.classes(c.root)},i("span",{class:c.holder,innerHTML:this.iconData}))}static get assetsDirs(){return["assets"]}get host(){return o(this)}static get watchers(){return{name:["loadIconPathData"]}}};y.style=m;export{y as gov_icon};
2
- //# sourceMappingURL=p-ad89c9e7.entry.js.map
1
+ import{a as t,r as s,h as i,H as n,g as o}from"./p-4af5e4f4.js";import{i as e}from"./p-34152b51.js";import{g as a}from"./p-3f37ddb6.js";import"./p-03990da5.js";var r;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(r||(r={}));const c={root:"gov-icon",holder:"gov-icon__holder"};const h="0.0.43";const l=()=>h;const p={};const f={};const d=t=>t.startsWith("http://")||t.startsWith("https://");const u=(s,i,n)=>{if(d(s)){return`${s}/${n}/${i}.svg?v=${l()}`}return t(`${s}/${n}/${i}.svg`)+`?v=${l()}`};async function g({name:t,type:s}){if(p[t]){return p[t]}if(!f[t]){f[t]=fetch(u(e(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const i=await f[t];p[t]=i;return i}const m=".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-icon{display:inline-flex}.gov-icon__holder,.gov-icon svg{display:inline-flex;width:100%;height:100%}";const y=class{constructor(t){s(this,t);this.name=null;this.type="basic";this.iconData=undefined;this.visible=false;this.error=false;this.h=a(this.host)}async loadIconPathData(){const{name:t,visible:s,type:i}=this;if(!t||!s){return}try{this.iconData=await g({name:t,type:i})}catch(t){this.error=true}}connectedCallback(){this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){this.intersectionObserver.disconnect();this.intersectionObserver=null;t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}render(){if(this.error){return null}return i(n,{class:this.h.classes(c.root)},i("span",{class:c.holder,innerHTML:this.iconData}))}static get assetsDirs(){return["assets"]}get host(){return o(this)}static get watchers(){return{name:["loadIconPathData"]}}};y.style=m;export{y as gov_icon};
2
+ //# sourceMappingURL=p-3932645b.entry.js.map