@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
@@ -1 +1 @@
1
- {"file":"gov-accordion.js","mappings":";;;;;;;;;AAAA,MAAM,eAAe,GAAG,wfAAwf;;MCengBA,cAAY;EAGxB;;;;gBAQ4C,GAAG;mBAIG,SAAS;oBAII,KAAK;;;IAfnE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EA6BD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;GAC3D;EAGD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;GACrD;EAED,iBAAiB;IAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC5B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;GAClC;EAED,gBAAgB;IACf,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,KAAkC;MAC9F,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAkC;QACvE,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;UACnB,SAAS,EAAE,cAAc,CAAC,IAAI;UAC9B,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI;UACnB,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG;SACjB,CAAC,CAAA;OACF,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,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IACvF,WAAK,IAAI,EAAE,MAAM,iBAAe,IAAI,CAAC,SAAS,sBAAoB,IAAI,CAAC,cAAc,IACpF,eAAQ,CACH,CACA,EACP;GACD;;;;EAMD,MAAM,YAAY;IACjB,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;GAC3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovAccordion"],"sources":["../../../packages/core/src/components/gov-accordion/gov-accordion.scss?tag=gov-accordion","../../../packages/core/src/components/gov-accordion/gov-accordion.tsx"],"sourcesContent":["/*\n * Accordion\n */\n\n$class: \".gov-accordion\";\n\n#{$class} {\n\t@include base();\n\n\t&[no-border] {\n\t\t.gov-accordion-item__header::before {\n\t\t\tbackground-color: transparent !important;\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { AccordionClass, AccordionSizes, AccordionSizeType, AccordionItemClass, AccordionVariantType } from './constants'\nimport { Variants } from '../../core/constants/variants'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { AccordionEvent, AccordionItemEvent } from \"./gov-accordion.types\"\n\n@Component({\n\ttag: 'gov-accordion',\n\tstyleUrl: 'gov-accordion.scss',\n})\nexport class GovAccordion {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAccordionElement\n\t/**\n\t * Accordion’s size.\n\t */\n\t@Prop() readonly size?: AccordionSizeType = 'm'\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: AccordionVariantType = 'primary'\n\t/**\n\t * Accordion item underline\n\t */\n\t@Prop({ attribute: 'no-border' }) readonly noBorder: boolean = false\n\t/**\n\t * Adds accessible label for the accordion that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<AccordionEvent>\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(AccordionSizes, newValue, AccordionClass.root)\n\t}\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(Variants, newValue, AccordionClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(AccordionItemClass.root).forEach((child: HTMLGovAccordionItemElement) => {\n\t\t\tchild.addEventListener('gov-change', (e: CustomEvent<AccordionItemEvent>) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.govChange.emit({\n\t\t\t\t\tcomponent: AccordionClass.root,\n\t\t\t\t\topen: e.detail.open,\n\t\t\t\t\tref: e.detail.ref\n\t\t\t\t})\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(AccordionClass.root)} size={this.size} variant={this.variant}>\n\t\t\t\t<div role={'list'} arial-label={this.wcagLabel} arial-labelledby={this.wcagLabelledBy}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, AccordionClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-accordion.js","mappings":";;;;;;;;;AAAA,MAAM,eAAe,GAAG,wfAAwf;;MCengBA,cAAY;EAGxB;;;;gBAQ4C,GAAG;mBAIG,SAAS;oBAII,KAAK;;;IAfnE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EA6BD,YAAY,CAAC,QAAgB;IAC5B,YAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;GAC3D;EAGD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;GACrD;EAED,iBAAiB;IAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC5B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;GAClC;EAED,gBAAgB;IACf,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,KAAkC;MAC9F,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAkC;QACvE,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;UACnB,SAAS,EAAE,cAAc,CAAC,IAAI;UAC9B,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI;UACnB,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG;SACjB,CAAC,CAAA;OACF,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,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IACvF,WAAK,IAAI,EAAE,MAAM,iBAAe,IAAI,CAAC,SAAS,sBAAoB,IAAI,CAAC,cAAc,IACpF,eAAQ,CACH,CACA,EACP;GACD;;;;EAMD,MAAM,YAAY;IACjB,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;GAC3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovAccordion"],"sources":["../../../packages/core/src/components/gov-accordion/gov-accordion.scss?tag=gov-accordion","../../../packages/core/src/components/gov-accordion/gov-accordion.tsx"],"sourcesContent":["/*\n * Accordion\n */\n\n$class: \".gov-accordion\";\n\n#{$class} {\n\t@include base();\n\n\t&[no-border] {\n\t\t.gov-accordion-item__header::before {\n\t\t\tbackground-color: transparent !important;\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from '@stencil/core'\nimport { validateProp } from '../../helpers/Validate/props'\nimport { AccordionClass, AccordionSizes, AccordionSizeType, AccordionItemClass, AccordionVariantType } from './constants'\nimport { Variants } from '../../core/constants/variants'\nimport { validateWcagLabel } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\nimport { govHost } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { AccordionEvent, AccordionItemEvent } from \"./gov-accordion.types\"\n\n@Component({\n\ttag: 'gov-accordion',\n\tstyleUrl: 'gov-accordion.scss',\n})\nexport class GovAccordion {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() readonly host: HTMLGovAccordionElement\n\t/**\n\t * Accordion’s size.\n\t */\n\t@Prop() readonly size?: AccordionSizeType = 'm'\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: AccordionVariantType = 'primary'\n\t/**\n\t * Accordion item underline\n\t */\n\t@Prop({ attribute: 'no-border' }) readonly noBorder: boolean = false\n\t/**\n\t * Adds accessible label for the accordion that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: 'gov-change' }) govChange: EventEmitter<AccordionEvent>\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(AccordionSizes, newValue, AccordionClass.root)\n\t}\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(Variants, newValue, AccordionClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateVariant(this.variant)\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.host.querySelectorAll(AccordionItemClass.root).forEach((child: HTMLGovAccordionItemElement) => {\n\t\t\tchild.addEventListener('gov-change', (e: CustomEvent<AccordionItemEvent>) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tthis.govChange.emit({\n\t\t\t\t\tcomponent: AccordionClass.root,\n\t\t\t\t\topen: e.detail.open,\n\t\t\t\t\tref: e.detail.ref\n\t\t\t\t})\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(AccordionClass.root)} size={this.size} variant={this.variant}>\n\t\t\t\t<div role={'list'} arial-label={this.wcagLabel} arial-labelledby={this.wcagLabelledBy}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, AccordionClass.root)\n\t}\n}\n"],"version":3}
@@ -113,7 +113,6 @@ function defineCustomElement$1() {
113
113
  break;
114
114
  } });
115
115
  }
116
- defineCustomElement$1();
117
116
 
118
117
  const GovAlert = GovAlert$1;
119
118
  const defineCustomElement = defineCustomElement$1;
@@ -1 +1 @@
1
- {"file":"gov-alert.js","mappings":";;;;;;;;;;;AAIO,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;AAG7F,MAAM,UAAU,GAAG;EACzB,IAAI,EAAE,WAAW;EACjB,OAAO,EAAE,oBAAoB;EAC7B,IAAI,EAAE,iBAAiB;EACvB,OAAO,EAAE,oBAAoB;EAC7B,QAAQ,EAAE,qBAAqB;EAC/B,KAAK,EAAE,kBAAkB;CACzB;;ACdD,MAAM,WAAW,GAAG,2tOAA2tO;;MCgBluOA,UAAQ;EAGpB;;;;;mBAawC,SAAS;mBAIb,KAAK;;;oBAgBH,KAAK;yBAElB,KAAK;IAlC7B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,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constants.ts","../../../packages/core/src/components/gov-alert/gov-alert.scss?tag=gov-alert","../../../packages/core/src/components/gov-alert/gov-alert.tsx"],"sourcesContent":["import { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const AlertVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type VariantType = `${ValueOf<typeof AlertVariants>}`\n\nexport const AlertClass = {\n\troot: 'gov-alert',\n\tsection: 'gov-alert__section',\n\ticon: 'gov-alert__icon',\n\tcontent: 'gov-alert__content',\n\theadline: 'gov-alert__headline',\n\tclose: 'gov-alert__close',\n}\n","/*\n * Alert\n */\n\n$class: \".gov-alert\";\n\n#{$class} {\n\t@include base();\n\t&__section {\n\t\t@include container();\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\tpadding-top: rem-calc(16);\n\t\tpadding-bottom: rem-calc(16);\n\t}\n\t&__icon {\n\t\tflex: 0 0 auto;\n\t\t& > * {\n\t\t\twidth: rem-calc(20);\n\t\t\theight: rem-calc(20);\n\t\t}\n\t}\n\t&__headline {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\n\t\t+ div {\n\t\t\tmargin-top: rem-calc(8);\n\t\t}\n\n\t\tp {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tgov-button {\n\t\t\tmargin-top: rem-calc(-4);\n\t\t}\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t\tpadding-right: rem-calc(52);\n\t\tp {\n\t\t\t@include typography($font-size-m);\n\t\t}\n\t\ta {\n\t\t\tcolor: inherit;\n\t\t\t@include hover() {\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n\t&__close {\n\t\tposition: absolute;\n\t\ttop: rem-calc(10);\n\t\tright: rem-calc(16);\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $alert-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tbackground-color: get(\"bg-color\", $definitions);\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tcolor: get(\"icon-color\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tcolor: get(\"text-color\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t\t@if deep-map-check($definitions, \"border\") {\n\t\t\t\tborder-bottom: $alert-border;\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\tborder-bottom: $alert-border;\n\t\t\t\tbackground-color: $alert-inverse-bg;\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__icon {\n\t\t\t\t\t\tcolor: get(\"bg-color\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tcolor: $alert-inverse-color;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: xl) {\n\t\t&__content {\n\t\t\tpadding-right: rem-calc(32);\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { AlertClass, AlertVariants, VariantType } from \"./constants\"\nimport { govHost, toBoolAttr } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { AlertEvent } from \"./gov-alert.types\"\nimport { ButtonEvent } from \"../gov-button/default/gov-button.types\"\nimport Fragment from \"../../helpers/Fragment\"\nimport { validateWcagProp } from \"../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\n\n@Component({\n\ttag: \"gov-alert\",\n\tstyleUrl: \"gov-alert.scss\",\n})\nexport class GovAlert {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovAlertElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly headline: string\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant: VariantType = \"primary\"\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Aria label for the closing button. It is mandatory if the alert is closable\n\t */\n\t@Prop({ attribute: \"wcag-close-label\" }) readonly wcagCloseLabel: string\n\t/**\n\t * Aria label for the toggle button. It is mandatory if the alert has headline\n\t */\n\t@Prop({ attribute: \"wcag-toggle-label\" }) readonly wcagToggleLabel: string\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({ eventName: \"gov-close\" }) govClose: EventEmitter<AlertEvent>\n\t/**\n\t * Displays the option to close the alert\n\t */\n\t@Prop() readonly closable?: boolean = false\n\n\t@State() toggleContent = false\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(AlertVariants, newValue, AlertClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\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\tlet inverse = !this.inverse\n\t\tlet variant = this.inverse ? \"secondary\" : this.variant\n\n\t\tif (this.variant == \"warning\") {\n\t\t\tinverse = false\n\t\t\tvariant = \"secondary\"\n\t\t}\n\n\t\tconst closeButton = (\n\t\t\t<div class={AlertClass.close}>\n\t\t\t\t<gov-button\n\t\t\t\t\tsize=\"s\"\n\t\t\t\t\taria-label={this.wcagCloseLabel}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tinverse={inverse}\n\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t>\n\t\t\t\t\t<gov-icon name=\"x-lg\"></gov-icon>\n\t\t\t\t</gov-button>\n\t\t\t</div>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AlertClass.root)} variant={this.variant}>\n\t\t\t\t<section class={AlertClass.section} role=\"alert\">\n\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t<div class={AlertClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div class={AlertClass.content}>\n\t\t\t\t\t\t{this.headline ? (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class={AlertClass.headline}>\n\t\t\t\t\t\t\t\t\t<p>{this.headline}</p>\n\t\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\t\t\t\t\taria-label={this.wcagToggleLabel}\n\t\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tvariant={variant}\n\t\t\t\t\t\t\t\t\t\tinverse={inverse}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.toggleContent = !this.toggleContent}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name={this.toggleContent ? 'chevron-up' : 'chevron-down'}></gov-icon>\n\t\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div hidden={!this.toggleContent} aria-hidden={toBoolAttr(this.toggleContent)}>\n\t\t\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t\t{this.closable && closeButton}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tonCloseHandler(e: CustomEvent<ButtonEvent>) {\n\t\tthis.govClose.emit({\n\t\t\tcomponent: AlertClass.root,\n\t\t\tref: this.host,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tif (this.closable) {\n\t\t\tvalidateWcagProp(this.wcagCloseLabel, 'wcag-close-label', AlertClass.root)\n\t\t}\n\t\tif (this.headline) {\n\t\t\tvalidateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', AlertClass.root)\n\t\t}\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-alert.js","mappings":";;;;;;;;;;;AAIO,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;AAG7F,MAAM,UAAU,GAAG;EACzB,IAAI,EAAE,WAAW;EACjB,OAAO,EAAE,oBAAoB;EAC7B,IAAI,EAAE,iBAAiB;EACvB,OAAO,EAAE,oBAAoB;EAC7B,QAAQ,EAAE,qBAAqB;EAC/B,KAAK,EAAE,kBAAkB;CACzB;;ACdD,MAAM,WAAW,GAAG,2tOAA2tO;;MCgBluOA,UAAQ;EAGpB;;;;;mBAawC,SAAS;mBAIb,KAAK;;;oBAgBH,KAAK;yBAElB,KAAK;IAlC7B,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;GAC3B;EAoCD,eAAe,CAAC,QAAgB;IAC/B,YAAY,CAAC,aAAa,EAAE,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;GACtD;EAED,iBAAiB;IAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;GAClC;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,IAAI,OAAO,GAAG,CAAC,IAA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U,IAAI,EAAE,IAAI,CAAC,aAAa,GAAG,YAAY,GAAG,cAAc,GAAa,CACnE,CACR,EACN,WAAK,MAAM,EAAE,CAAC,IAAI,CAAC,aAAa,iBAAe,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,IAC5E,eAAQ,CACH,CACI,KAEX,eAAQ,CACR,CACI,CACG,EACT,IAAI,CAAC,QAAQ,IAAI,WAAW,CACvB,EACP;GACD;EAED,cAAc,CAAC,CAA2B;IACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;MAClB,SAAS,EAAE,UAAU,CAAC,IAAI;MAC1B,GAAG,EAAE,IAAI,CAAC,IAAI;MACd,aAAa,EAAE,CAAC;KAChB,CAAC,CAAA;GACF;;;;EAMD,MAAM,YAAY;IACjB,IAAI,IAAI,CAAC,QAAQ,EAAE;MAClB,gBAAgB,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;KAC1E;IACD,IAAI,IAAI,CAAC,QAAQ,EAAE;MAClB,gBAAgB,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;KAC5E;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GovAlert"],"sources":["../../../packages/core/src/components/gov-alert/constants.ts","../../../packages/core/src/components/gov-alert/gov-alert.scss?tag=gov-alert","../../../packages/core/src/components/gov-alert/gov-alert.tsx"],"sourcesContent":["import { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const AlertVariants = pick(Variants, ['PRIMARY', 'SECONDARY', 'WARNING', 'ERROR', 'SUCCESS'])\nexport type VariantType = `${ValueOf<typeof AlertVariants>}`\n\nexport const AlertClass = {\n\troot: 'gov-alert',\n\tsection: 'gov-alert__section',\n\ticon: 'gov-alert__icon',\n\tcontent: 'gov-alert__content',\n\theadline: 'gov-alert__headline',\n\tclose: 'gov-alert__close',\n}\n","/*\n * Alert\n */\n\n$class: \".gov-alert\";\n\n#{$class} {\n\t@include base();\n\t&__section {\n\t\t@include container();\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\tpadding-top: rem-calc(16);\n\t\tpadding-bottom: rem-calc(16);\n\t}\n\t&__icon {\n\t\tflex: 0 0 auto;\n\t\t& > * {\n\t\t\twidth: rem-calc(20);\n\t\t\theight: rem-calc(20);\n\t\t}\n\t}\n\t&__headline {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\n\t\t+ div {\n\t\t\tmargin-top: rem-calc(8);\n\t\t}\n\n\t\tp {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tgov-button {\n\t\t\tmargin-top: rem-calc(-4);\n\t\t}\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t\tpadding-right: rem-calc(52);\n\t\tp {\n\t\t\t@include typography($font-size-m);\n\t\t}\n\t\ta {\n\t\t\tcolor: inherit;\n\t\t\t@include hover() {\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n\t&__close {\n\t\tposition: absolute;\n\t\ttop: rem-calc(10);\n\t\tright: rem-calc(16);\n\t}\n\n\t// VARIANTS\n\t@each $variant, $definitions in $alert-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\tbackground-color: get(\"bg-color\", $definitions);\n\t\t\t#{$class} {\n\t\t\t\t&__icon {\n\t\t\t\t\tcolor: get(\"icon-color\", $definitions);\n\t\t\t\t}\n\t\t\t\t&__content {\n\t\t\t\t\tcolor: get(\"text-color\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t\t@if deep-map-check($definitions, \"border\") {\n\t\t\t\tborder-bottom: $alert-border;\n\t\t\t}\n\n\t\t\t// STATES\n\t\t\t@include parameter(\"inverse\") {\n\t\t\t\tborder-bottom: $alert-border;\n\t\t\t\tbackground-color: $alert-inverse-bg;\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__icon {\n\t\t\t\t\t\tcolor: get(\"bg-color\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tcolor: $alert-inverse-color;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: xl) {\n\t\t&__content {\n\t\t\tpadding-right: rem-calc(32);\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { AlertClass, AlertVariants, VariantType } from \"./constants\"\nimport { govHost, toBoolAttr } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { AlertEvent } from \"./gov-alert.types\"\nimport { ButtonEvent } from \"../gov-button/default/gov-button.types\"\nimport Fragment from \"../../helpers/Fragment\"\nimport { validateWcagProp } from \"../../helpers/Validate/wcag\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\n\n@Component({\n\ttag: \"gov-alert\",\n\tstyleUrl: \"gov-alert.scss\",\n})\nexport class GovAlert {\n\tprivate h: GovHost\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovAlertElement\n\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly headline: string\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant: VariantType = \"primary\"\n\t/**\n\t * Determine if component should have inverse colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * Aria label for the closing button. It is mandatory if the alert is closable\n\t */\n\t@Prop({ attribute: \"wcag-close-label\" }) readonly wcagCloseLabel: string\n\t/**\n\t * Aria label for the toggle button. It is mandatory if the alert has headline\n\t */\n\t@Prop({ attribute: \"wcag-toggle-label\" }) readonly wcagToggleLabel: string\n\t/**\n\t * Called when the close button is clicked\n\t */\n\t@Event({ eventName: \"gov-close\" }) govClose: EventEmitter<AlertEvent>\n\t/**\n\t * Displays the option to close the alert\n\t */\n\t@Prop() readonly closable?: boolean = false\n\n\t@State() toggleContent = false\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(AlertVariants, newValue, AlertClass.root)\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\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\tlet inverse = !this.inverse\n\t\tlet variant = this.inverse ? \"secondary\" : this.variant\n\n\t\tif (this.variant == \"warning\") {\n\t\t\tinverse = false\n\t\t\tvariant = \"secondary\"\n\t\t}\n\n\t\tconst closeButton = (\n\t\t\t<div class={AlertClass.close}>\n\t\t\t\t<gov-button\n\t\t\t\t\tsize=\"s\"\n\t\t\t\t\taria-label={this.wcagCloseLabel}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tinverse={inverse}\n\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t>\n\t\t\t\t\t<gov-icon name=\"x-lg\"></gov-icon>\n\t\t\t\t</gov-button>\n\t\t\t</div>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(AlertClass.root)} variant={this.variant}>\n\t\t\t\t<section class={AlertClass.section} role=\"alert\">\n\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t<div class={AlertClass.icon}>\n\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div class={AlertClass.content}>\n\t\t\t\t\t\t{this.headline ? (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class={AlertClass.headline}>\n\t\t\t\t\t\t\t\t\t<p>{this.headline}</p>\n\t\t\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\t\t\tsize=\"s\"\n\t\t\t\t\t\t\t\t\t\taria-label={this.wcagToggleLabel}\n\t\t\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\t\t\tvariant={variant}\n\t\t\t\t\t\t\t\t\t\tinverse={inverse}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.toggleContent = !this.toggleContent}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<gov-icon name={this.toggleContent ? 'chevron-up' : 'chevron-down'}></gov-icon>\n\t\t\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div hidden={!this.toggleContent} aria-hidden={toBoolAttr(this.toggleContent)}>\n\t\t\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t\t{this.closable && closeButton}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tonCloseHandler(e: CustomEvent<ButtonEvent>) {\n\t\tthis.govClose.emit({\n\t\t\tcomponent: AlertClass.root,\n\t\t\tref: this.host,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tif (this.closable) {\n\t\t\tvalidateWcagProp(this.wcagCloseLabel, 'wcag-close-label', AlertClass.root)\n\t\t}\n\t\tif (this.headline) {\n\t\t\tvalidateWcagProp(this.wcagToggleLabel, 'wcag-toggle-label', AlertClass.root)\n\t\t}\n\t}\n}\n"],"version":3}
@@ -5639,6 +5639,7 @@ class FormsPage extends HTMLElement {
5639
5639
  connectedCallback() {
5640
5640
  (() => {
5641
5641
  setTimeout(() => {
5642
+ const da = document.getElementById('test-me-ujo');
5642
5643
  const po = document.getElementById('bagr');
5643
5644
  const ba = document.getElementById('ba');
5644
5645
  const na = document.getElementById('kaprWWWWWW');
@@ -5652,6 +5653,12 @@ class FormsPage extends HTMLElement {
5652
5653
  console.log(e);
5653
5654
  });
5654
5655
  }
5656
+ if (da) {
5657
+ console.log(da);
5658
+ da.addEventListener('gov-add-file', function (e) {
5659
+ console.log(e.detail);
5660
+ });
5661
+ }
5655
5662
  if (po) {
5656
5663
  po.addEventListener('gov-select', function (e) {
5657
5664
  console.log(e);
@@ -5772,11 +5779,11 @@ class FormsPage extends HTMLElement {
5772
5779
 
5773
5780
  <h2>File</h2>
5774
5781
  <div class="container-view">
5775
- <h3>Normal</h3>
5782
+ <h3>Normal 2</h3>
5776
5783
  <gov-form-control>
5777
5784
  <gov-form-label size="s" slot="top">Přidat přílohu *</gov-form-label>
5778
5785
  <gov-form-group>
5779
- <gov-form-file name="test-me-c" accept="image/*" max-file-size="1024">
5786
+ <gov-form-file id="test-me-ujo" multiple accept=".pdf,.jpg,.png,.jpeg" max-file-size="616448">
5780
5787
  <p>
5781
5788
  <gov-button variant="primary" type="outlined" tabindex="-1">
5782
5789
  Nahrát soubor ze zařízení
@@ -8759,7 +8766,7 @@ class WizzardPage extends HTMLElement {
8759
8766
  <div class="gov-bg--secondary-300" style="padding: 48px">
8760
8767
  <gov-wizzard>
8761
8768
  <gov-wizzard-item label-tag="h1" label="Font Awesome Icon" variant="success" collapsible>
8762
- <gov-icon slot="prefix" name="check-lg"></gov-icon>
8769
+ <span slot="prefix"><gov-icon name="check-lg"></gov-icon></span>
8763
8770
  <p>Opět věc a stylování obsahu. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vehicula sollicitudin risus, quis tempor metus imperdiet vitae. Duis in blandit lacus.</p>
8764
8771
  <p>Opět věc a stylování obsahu. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vehicula sollicitudin risus, quis tempor metus imperdiet vitae. Duis in blandit lacus.</p>
8765
8772
  </gov-wizzard-item>
@@ -8808,7 +8815,7 @@ class WizzardPage extends HTMLElement {
8808
8815
  </gov-wizzard-item>
8809
8816
  </gov-wizzard>
8810
8817
  <br><br>
8811
-
8818
+
8812
8819
  <gov-wizzard size="xs">
8813
8820
  <gov-wizzard-item label-tag="h1" label="Font Awesome Icon" variant="success" annotation="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vehicula sollicitudin risus." collapsible>
8814
8821
  <gov-icon slot="prefix" name="check-lg"></gov-icon>
@@ -8908,7 +8915,6 @@ function defineCustomElement$1() {
8908
8915
  break;
8909
8916
  } });
8910
8917
  }
8911
- defineCustomElement$1();
8912
8918
 
8913
8919
  const GovApp = GovApp$1;
8914
8920
  const defineCustomElement = defineCustomElement$1;