@gov-design-system-ce/components 4.0.8-rc17 → 4.0.8-rc19

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 (176) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/gov-form-checkbox.cjs.entry.js +5 -4
  3. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gov-form-control.cjs.entry.js +1 -37
  5. package/dist/cjs/gov-form-control.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gov-form-file.cjs.entry.js +7 -6
  7. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gov-form-input.cjs.entry.js +11 -9
  9. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  10. package/dist/cjs/gov-form-multi-select.cjs.entry.js +7 -7
  11. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-form-radio.cjs.entry.js +5 -4
  13. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  14. package/dist/cjs/gov-form-select.cjs.entry.js +10 -7
  15. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  16. package/dist/cjs/gov-form-switch.cjs.entry.js +2 -1
  17. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  18. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  19. package/dist/cjs/gov-tile.cjs.entry.js +1 -1
  20. package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
  21. package/dist/cjs/loader.cjs.js +1 -1
  22. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +5 -4
  23. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  24. package/dist/collection/components/gov-form/control/gov-form-control.js +5 -64
  25. package/dist/collection/components/gov-form/control/gov-form-control.js.map +1 -1
  26. package/dist/collection/components/gov-form/file/gov-form-file.js +7 -6
  27. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  28. package/dist/collection/components/gov-form/input/gov-form-input.js +16 -14
  29. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  30. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +7 -7
  31. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  32. package/dist/collection/components/gov-form/radio/gov-form-radio.js +5 -4
  33. package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
  34. package/dist/collection/components/gov-form/select/gov-form-select.js +12 -7
  35. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  36. package/dist/collection/components/gov-form/switch/gov-form-switch.js +2 -1
  37. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  38. package/dist/collection/components/gov-tile/gov-tile.js +1 -1
  39. package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
  40. package/dist/collection/pages/Forms.js +12 -12
  41. package/dist/collection/pages/Forms.js.map +1 -1
  42. package/dist/components/gov-accordion-item.js +1 -1
  43. package/dist/components/gov-attachments-item.js +1 -1
  44. package/dist/components/gov-breadcrumbs.js +1 -1
  45. package/dist/components/gov-button.js +1 -1
  46. package/dist/components/gov-card.js +1 -1
  47. package/dist/components/gov-chip.js +1 -1
  48. package/dist/components/gov-form-autocomplete.js +1 -1
  49. package/dist/components/gov-form-checkbox.js +1 -1
  50. package/dist/components/gov-form-checkbox.js.map +1 -1
  51. package/dist/components/gov-form-control.js +1 -1
  52. package/dist/components/gov-form-control.js.map +1 -1
  53. package/dist/components/gov-form-file.js +1 -1
  54. package/dist/components/gov-form-file.js.map +1 -1
  55. package/dist/components/gov-form-input.js +1 -1
  56. package/dist/components/gov-form-multi-select.js +1 -1
  57. package/dist/components/gov-form-multi-select.js.map +1 -1
  58. package/dist/components/gov-form-radio.js +1 -1
  59. package/dist/components/gov-form-radio.js.map +1 -1
  60. package/dist/components/gov-form-select.js +1 -1
  61. package/dist/components/gov-form-switch.js +1 -1
  62. package/dist/components/gov-form-switch.js.map +1 -1
  63. package/dist/components/gov-icon.js +1 -1
  64. package/dist/components/gov-infobar.js +1 -1
  65. package/dist/components/gov-loading.js +1 -1
  66. package/dist/components/gov-modal.js +1 -1
  67. package/dist/components/gov-pagination.js +1 -1
  68. package/dist/components/gov-prompt.js +1 -1
  69. package/dist/components/gov-side-nav-item.js +1 -1
  70. package/dist/components/gov-tabs.js +1 -1
  71. package/dist/components/gov-tabs.js.map +1 -1
  72. package/dist/components/gov-tag.js +1 -1
  73. package/dist/components/gov-tile.js +1 -1
  74. package/dist/components/gov-tile.js.map +1 -1
  75. package/dist/components/gov-toast.js +1 -1
  76. package/dist/components/gov-tooltip-content.js +1 -1
  77. package/dist/components/gov-wizard-item.js +1 -1
  78. package/dist/components/{p-8ac22724.js → p-37b342d0.js} +2 -2
  79. package/dist/components/p-37b342d0.js.map +1 -0
  80. package/dist/components/{p-57bc98b3.js → p-410e296d.js} +2 -2
  81. package/dist/components/{p-fd554fb4.js → p-4f694d25.js} +2 -2
  82. package/dist/components/{p-3248435d.js → p-5ee68c72.js} +2 -2
  83. package/dist/components/p-5ee68c72.js.map +1 -0
  84. package/dist/components/{p-483d079f.js → p-701f03e1.js} +2 -2
  85. package/dist/components/{p-e35fdedd.js → p-ab0ea373.js} +2 -2
  86. package/dist/components/{p-44c731a0.js → p-eefec75b.js} +2 -2
  87. package/dist/core/core.esm.js +1 -1
  88. package/dist/core/core.esm.js.map +1 -1
  89. package/dist/core/{p-a87d8f17.entry.js → p-2cdb5670.entry.js} +3 -2
  90. package/dist/core/p-2cdb5670.entry.js.map +1 -0
  91. package/dist/core/{p-4c83f443.entry.js → p-2e07619e.entry.js} +2 -2
  92. package/dist/core/{p-4c83f443.entry.js.map → p-2e07619e.entry.js.map} +1 -1
  93. package/dist/core/{p-14e5fd00.entry.js → p-396ae350.entry.js} +2 -2
  94. package/dist/core/p-396ae350.entry.js.map +1 -0
  95. package/dist/core/{p-065b396a.entry.js → p-3c0058a4.entry.js} +2 -2
  96. package/dist/core/p-3c0058a4.entry.js.map +1 -0
  97. package/dist/core/{p-98e89c46.entry.js → p-4b88cdf6.entry.js} +2 -2
  98. package/dist/core/{p-bc2ec133.entry.js → p-5f3721be.entry.js} +2 -2
  99. package/dist/core/p-5f3721be.entry.js.map +1 -0
  100. package/dist/core/p-6110119c.entry.js +2 -0
  101. package/dist/core/p-6110119c.entry.js.map +1 -0
  102. package/dist/core/{p-afb86442.entry.js → p-6be9b50d.entry.js} +3 -2
  103. package/dist/core/p-6be9b50d.entry.js.map +1 -0
  104. package/dist/core/{p-d0446df9.entry.js → p-74627eb2.entry.js} +2 -2
  105. package/dist/core/p-74627eb2.entry.js.map +1 -0
  106. package/dist/core/{p-b18be1d6.entry.js → p-753e4861.entry.js} +3 -2
  107. package/dist/core/p-753e4861.entry.js.map +1 -0
  108. package/dist/core/{p-36312bef.entry.js → p-92f752e1.entry.js} +3 -2
  109. package/dist/core/p-92f752e1.entry.js.map +1 -0
  110. package/dist/core/{p-6092fd22.entry.js → p-aa91f33f.entry.js} +2 -2
  111. package/dist/core/p-aa91f33f.entry.js.map +1 -0
  112. package/dist/core/{p-c7e8faec.entry.js → p-ab2f6b4d.entry.js} +2 -2
  113. package/dist/core/{p-c7e8faec.entry.js.map → p-ab2f6b4d.entry.js.map} +1 -1
  114. package/dist/core/{p-0d99a3d8.entry.js → p-e102ae1d.entry.js} +2 -2
  115. package/dist/core/p-e102ae1d.entry.js.map +1 -0
  116. package/dist/core/{p-dbb67e76.entry.js → p-e21b402c.entry.js} +3 -2
  117. package/dist/core/p-e21b402c.entry.js.map +1 -0
  118. package/dist/core/{p-1d67220c.entry.js → p-f9e6f776.entry.js} +3 -2
  119. package/dist/core/p-f9e6f776.entry.js.map +1 -0
  120. package/dist/core/{p-dbad9256.entry.js → p-fc3d4a73.entry.js} +3 -2
  121. package/dist/core/p-fc3d4a73.entry.js.map +1 -0
  122. package/dist/esm/core.js +1 -1
  123. package/dist/esm/gov-form-checkbox.entry.js +5 -4
  124. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  125. package/dist/esm/gov-form-control.entry.js +2 -38
  126. package/dist/esm/gov-form-control.entry.js.map +1 -1
  127. package/dist/esm/gov-form-file.entry.js +7 -6
  128. package/dist/esm/gov-form-file.entry.js.map +1 -1
  129. package/dist/esm/gov-form-input.entry.js +11 -9
  130. package/dist/esm/gov-form-input.entry.js.map +1 -1
  131. package/dist/esm/gov-form-multi-select.entry.js +7 -7
  132. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  133. package/dist/esm/gov-form-radio.entry.js +5 -4
  134. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  135. package/dist/esm/gov-form-select.entry.js +10 -7
  136. package/dist/esm/gov-form-select.entry.js.map +1 -1
  137. package/dist/esm/gov-form-switch.entry.js +2 -1
  138. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  139. package/dist/esm/gov-icon.entry.js +1 -1
  140. package/dist/esm/gov-tile.entry.js +1 -1
  141. package/dist/esm/gov-tile.entry.js.map +1 -1
  142. package/dist/esm/loader.js +1 -1
  143. package/dist/hydrate/index.js +54 -82
  144. package/dist/hydrate/index.mjs +54 -82
  145. package/dist/types/components/gov-form/checkbox/gov-form-checkbox.d.ts +1 -1
  146. package/dist/types/components/gov-form/control/gov-form-control.d.ts +3 -10
  147. package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -1
  148. package/dist/types/components/gov-form/input/gov-form-input.d.ts +1 -1
  149. package/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +1 -1
  150. package/dist/types/components/gov-form/radio/gov-form-radio.d.ts +1 -1
  151. package/dist/types/components/gov-form/select/gov-form-select.d.ts +1 -1
  152. package/dist/types/components.d.ts +6 -14
  153. package/package.json +1 -1
  154. package/dist/components/p-3248435d.js.map +0 -1
  155. package/dist/components/p-8ac22724.js.map +0 -1
  156. package/dist/core/p-065b396a.entry.js.map +0 -1
  157. package/dist/core/p-0d99a3d8.entry.js.map +0 -1
  158. package/dist/core/p-14e5fd00.entry.js.map +0 -1
  159. package/dist/core/p-1d67220c.entry.js.map +0 -1
  160. package/dist/core/p-36312bef.entry.js.map +0 -1
  161. package/dist/core/p-4b048e19.entry.js +0 -2
  162. package/dist/core/p-4b048e19.entry.js.map +0 -1
  163. package/dist/core/p-6092fd22.entry.js.map +0 -1
  164. package/dist/core/p-a87d8f17.entry.js.map +0 -1
  165. package/dist/core/p-afb86442.entry.js.map +0 -1
  166. package/dist/core/p-b18be1d6.entry.js.map +0 -1
  167. package/dist/core/p-bc2ec133.entry.js.map +0 -1
  168. package/dist/core/p-d0446df9.entry.js.map +0 -1
  169. package/dist/core/p-dbad9256.entry.js.map +0 -1
  170. package/dist/core/p-dbb67e76.entry.js.map +0 -1
  171. /package/dist/components/{p-57bc98b3.js.map → p-410e296d.js.map} +0 -0
  172. /package/dist/components/{p-fd554fb4.js.map → p-4f694d25.js.map} +0 -0
  173. /package/dist/components/{p-483d079f.js.map → p-701f03e1.js.map} +0 -0
  174. /package/dist/components/{p-e35fdedd.js.map → p-ab0ea373.js.map} +0 -0
  175. /package/dist/components/{p-44c731a0.js.map → p-eefec75b.js.map} +0 -0
  176. /package/dist/core/{p-98e89c46.entry.js.map → p-4b88cdf6.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{p as o,H as i,c as t,h as e,d as r}from"./p-d6759ac3.js";import{g as n,c as a,d as s,e as l}from"./p-77a6e3be.js";import{g as c,a as v,t as g,c as p}from"./p-d687df8f.js";import{c as m}from"./p-e618f1cb.js";import{v as f}from"./p-344c72d7.js";import{b as d,c as u}from"./p-6b0471a8.js";import{c as h}from"./p-95d41a3b.js";import{d as b}from"./p-e0e2e9c1.js";import{d as x}from"./p-fd554fb4.js";const z='.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-input{position:relative;display:flex;width:100%;align-items:center}.gov-form-input .element{position:relative;display:flex;flex:1 1 auto}.gov-form-input input,.gov-form-input select,.gov-form-input textarea{width:100%;border-radius:var(--gov-border-radius, 0.1875rem);background-color:var(--gov-form-bg-color, var(--gov-color-neutral-white));font-family:var(--gov-font-family, "Roboto", sans-serif)}.gov-form-input input:focus,.gov-form-input select:focus,.gov-form-input textarea:focus{outline:none}.gov-form-input input:focus-visible,.gov-form-input select:focus-visible,.gov-form-input textarea: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-form-input input::-moz-placeholder,.gov-form-input select::-moz-placeholder,.gov-form-input textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-input input::placeholder,.gov-form-input select::placeholder,.gov-form-input textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-input textarea{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);padding:0.5rem 0.75rem;resize:none}.gov-form-input *[slot=left-icon],.gov-form-input *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;transform:translateY(-50%);pointer-events:none}.gov-form-input *[slot=left-icon]{left:0}.gov-form-input *[slot=right-icon]{right:0}.gov-form-input *[slot=prefix],.gov-form-input *[slot=sufix]{margin:0}[size=s].gov-form-input{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);gap:0.5rem var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-input input,[size=s].gov-form-input select{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);height:var(--gov-form-input-core-s-height, 2rem);padding:var(--gov-form-input-core-s-padding, 0.25rem 0.75rem)}[size=s].gov-form-input *[slot=left-icon],[size=s].gov-form-input *[slot=right-icon]{width:var(--gov-form-input-core-s-icon-size, 1rem);height:var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-input *[slot=left-icon]{left:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=s].gov-form-input *[slot=right-icon]{right:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-input *[slot=right-icon]~input,[size=s].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=m].gov-form-input{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);gap:0.5rem var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-input input,[size=m].gov-form-input select{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);height:var(--gov-form-input-core-m-height, 2.5rem);padding:var(--gov-form-input-core-m-padding, 0.4375rem 0.75rem)}[size=m].gov-form-input *[slot=left-icon],[size=m].gov-form-input *[slot=right-icon]{width:var(--gov-form-input-core-m-icon-size, 1rem);height:var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-input *[slot=left-icon]{left:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-input *[slot=right-icon]{right:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-input *[slot=right-icon]~input,[size=m].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-input{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);gap:0.5rem var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-input input,[size=l].gov-form-input select{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);height:var(--gov-form-input-core-l-height, 3rem);padding:var(--gov-form-input-core-l-padding, 0.6875rem 0.75rem)}[size=l].gov-form-input *[slot=left-icon],[size=l].gov-form-input *[slot=right-icon]{width:var(--gov-form-input-core-l-icon-size, 1rem);height:var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-input *[slot=left-icon]{left:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-input *[slot=right-icon]{right:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-input *[slot=right-icon]~input,[size=l].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-input{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);gap:0.5rem var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-input input,[size=xl].gov-form-input select{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);height:var(--gov-form-input-core-xl-height, 3.5rem);padding:var(--gov-form-input-core-xl-padding, 0.9375rem 1rem 0.875rem)}[size=xl].gov-form-input *[slot=left-icon],[size=xl].gov-form-input *[slot=right-icon]{width:var(--gov-form-input-core-xl-icon-size, 1.25rem);height:var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-input *[slot=left-icon]{left:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-input *[slot=right-icon]{right:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-input *[slot=right-icon]~input,[size=xl].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}[variant=primary].gov-form-input input,[variant=primary].gov-form-input select,[variant=primary].gov-form-input textarea{color:var(--gov-form-input-color-primary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600))}[variant=primary].gov-form-input *[slot=left-icon],[variant=primary].gov-form-input *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-primary, var(--gov-color-primary))}[variant=secondary].gov-form-input input,[variant=secondary].gov-form-input select,[variant=secondary].gov-form-input textarea{color:var(--gov-form-input-color-secondary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700))}[variant=secondary].gov-form-input *[slot=left-icon],[variant=secondary].gov-form-input *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-secondary, var(--gov-color-primary))}[disabled=""].gov-form-input,[disabled=true i].gov-form-input,[disabled="1"].gov-form-input{pointer-events:none}[disabled=""].gov-form-input input,[disabled=""].gov-form-input select,[disabled=""].gov-form-input textarea,[disabled=true i].gov-form-input input,[disabled=true i].gov-form-input select,[disabled=true i].gov-form-input textarea,[disabled="1"].gov-form-input input,[disabled="1"].gov-form-input select,[disabled="1"].gov-form-input textarea{border-color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));background:var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=""].gov-form-input *[slot=left-icon],[disabled=""].gov-form-input *[slot=right-icon],[disabled=true i].gov-form-input *[slot=left-icon],[disabled=true i].gov-form-input *[slot=right-icon],[disabled="1"].gov-form-input *[slot=left-icon],[disabled="1"].gov-form-input *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important}[invalid=""].gov-form-input input,[invalid=""].gov-form-input select,[invalid=""].gov-form-input textarea,[invalid=true i].gov-form-input input,[invalid=true i].gov-form-input select,[invalid=true i].gov-form-input textarea,[invalid="1"].gov-form-input input,[invalid="1"].gov-form-input select,[invalid="1"].gov-form-input textarea{border-color:var(--gov-form-state-color-error, var(--gov-color-error));color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=""].gov-form-input input::-moz-placeholder,[invalid=""].gov-form-input select::-moz-placeholder,[invalid=""].gov-form-input textarea::-moz-placeholder,[invalid=true i].gov-form-input input::-moz-placeholder,[invalid=true i].gov-form-input select::-moz-placeholder,[invalid=true i].gov-form-input textarea::-moz-placeholder,[invalid="1"].gov-form-input input::-moz-placeholder,[invalid="1"].gov-form-input select::-moz-placeholder,[invalid="1"].gov-form-input textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-input input::placeholder,[invalid=""].gov-form-input select::placeholder,[invalid=""].gov-form-input textarea::placeholder,[invalid=true i].gov-form-input input::placeholder,[invalid=true i].gov-form-input select::placeholder,[invalid=true i].gov-form-input textarea::placeholder,[invalid="1"].gov-form-input input::placeholder,[invalid="1"].gov-form-input select::placeholder,[invalid="1"].gov-form-input textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-input *[slot=left-icon],[invalid=""].gov-form-input *[slot=right-icon],[invalid=true i].gov-form-input *[slot=left-icon],[invalid=true i].gov-form-input *[slot=right-icon],[invalid="1"].gov-form-input *[slot=left-icon],[invalid="1"].gov-form-input *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error)) !important}[invalid=""].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=true i].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid="1"].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[success=""].gov-form-input *[slot=right-icon]:not(.icon-arrow),[success=true i].gov-form-input *[slot=right-icon]:not(.icon-arrow),[success="1"].gov-form-input *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=""].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success="1"].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[multiline=""].gov-form-input *[slot=left-icon],[multiline=""].gov-form-input *[slot=right-icon],[multiline=true i].gov-form-input *[slot=left-icon],[multiline=true i].gov-form-input *[slot=right-icon],[multiline="1"].gov-form-input *[slot=left-icon],[multiline="1"].gov-form-input *[slot=right-icon]{display:none}.gov-form-input[type=reset] input{border-width:0}.gov-form-input[type=reset] input:focus{outline:none}';const y=z;var w;(function(o){o["INPUT"]="input";o["TEXTAREA"]="textarea"})(w||(w={}));const k=o(class o extends i{constructor(){super();this.__registerHost();this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govInput=t(this,"gov-input",7);this.govKeyUp=t(this,"gov-keyup",7);this.govHydrated=t(this,"gov-hydrated",7);this.govKeyDown=t(this,"gov-keydown",7);this.value=undefined;this.identifier=undefined;this.variant="secondary";this.success=undefined;this.size="m";this.name=undefined;this.multiline=undefined;this.rows=undefined;this.cols=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.minlength=undefined;this.maxlength=undefined;this.min=undefined;this.max=undefined;this.autocomplete=undefined;this.autocorrect=undefined;this.spellcheck=undefined;this.inputLang=undefined;this.type=undefined;this.inputType="text";this.role=undefined;this.invalid=undefined;this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.wcagAutocomplete=undefined;this.wcagExpanded=undefined;this.focused=undefined;this.h=c(this.host);this.inputId=h("GovInput");this.f=n(this.h)}validateVariant(o){f(s,o,a.root)}validateSize(o){f(l,o,a.root)}watchDisabled(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",v(this.invalid));this.f.passAttrToControl("type",this.multiline?w.TEXTAREA:w.INPUT)}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size);this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required))}async componentDidRender(){if(m()){await b(500);await this.validateWcag()}}componentDidLoad(){this.govHydrated.emit()}render(){const o=this.multiline?w.TEXTAREA:w.INPUT;return e(r,{key:"1d217855ba964b9c637373529e2b677fb09f8034",class:a.root,size:this.size,variant:this.variant,type:this.type},this.h.hasSlot("prefix")&&e("slot",{key:"75b989d2f4b70cf43e9a5315fdb6eb56af832118",name:"prefix"}),e("span",{key:"39f063be627ad300abe364adfa4a32b79a879773",class:"element"},this.h.hasSlot("left-icon")&&e("slot",{key:"84da6d8d05274f5a9760b871ffb89dec870122f8",name:"left-icon"}),this.h.hasSlot("right-icon")&&!(this.success||this.invalid)&&e("slot",{key:"b8ede08c703cc88e526593cb5aac4a868293543c",name:"right-icon"}),this.success&&!this.multiline&&e("gov-icon",{key:"1dad15f0bbab72fef2f2d596fb2ce27b097eb3a4",slot:"right-icon",class:"icon-validation",name:"check-lg"}),this.invalid&&!this.multiline&&e("gov-icon",{key:"9d8ed110a2640133ecc462c6b06f1f5496fb61f7",slot:"right-icon",class:"icon-validation",name:"exclamation-lg"}),e(o,{key:"62ac8ee0c14c5289c377685fabf535947a43f4c5",type:this.inputType,disabled:this.disabled,id:this.identifier||this.inputId,name:this.name,onFocus:this.onFocusHandler.bind(this),onInput:this.onInputHandler.bind(this),onBlur:this.onBlurHandler.bind(this),onKeyUp:this.onKeyUpHandler.bind(this),onKeyDown:this.onKeyDownHandler.bind(this),ref:o=>this.inputRef=o,placeholder:this.placeholder,value:this.value,spellcheck:g(this.spellcheck),lang:this.inputLang,readonly:g(this.readonly),autocomplete:p(this.autocomplete),autocorrect:p(this.autocorrect),minlength:this.minlength,maxlength:this.maxlength,min:this.min,max:this.max,required:this.required,rows:this.rows,cols:this.cols,role:this.role,"aria-required":g(this.required),"aria-invalid":g(this.invalid),"aria-disabled":g(this.disabled),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-owns":this.wcagOwns,"aria-expanded":g(this.wcagExpanded),"aria-autocomplete":this.wcagAutocomplete})),this.h.hasSlot("sufix")&&e("slot",{key:"9746bac959c672b37d1c5529cbbe0da13ecf4ce8",name:"sufix"}))}onFocusHandler(o){o.stopPropagation();this.focused=true;this.govFocus.emit({component:a.root,value:this.value,originalEvent:o})}onBlurHandler(o){o.stopPropagation();this.focused=false;this.govBlur.emit({component:a.root,value:this.value,originalEvent:o})}onKeyUpHandler(o){o.stopPropagation();this.govKeyUp.emit({component:a.root,value:this.value,originalEvent:o})}onKeyDownHandler(o){o.stopPropagation();this.govKeyDown.emit({component:a.root,value:this.value,originalEvent:o})}onInputHandler(o){this.value=o.target.value;o.stopPropagation();this.govInput.emit({component:a.root,value:this.value,originalEvent:o})}async setFocus(o){return this.inputRef.focus(o)}async setValue(o){this.value=o}async clearValue(){this.value="";this.inputRef.value=""}async getRef(){return this.inputRef}async validateWcag(){d(this.wcagDescribedBy,"wcag-described-by",a.root);d(this.wcagLabelledBy,"wcag-labelled-by",a.root);d(this.wcagOwns,"wcag-owns",a.root);u(this.identifier||this.inputId,this.wcagLabelledBy,a.root)}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"],type:["watchDisabled"]}}static get style(){return y}},[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],spellcheck:[4],inputLang:[1,"input-lang"],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]},undefined,{variant:["validateVariant"],size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"],type:["watchDisabled"]}]);function D(){if(typeof customElements==="undefined"){return}const o=["gov-form-input","gov-icon"];o.forEach((o=>{switch(o){case"gov-form-input":if(!customElements.get(o)){customElements.define(o,k)}break;case"gov-icon":if(!customElements.get(o)){x()}break}}))}D();export{k as G,D as d};
2
- //# sourceMappingURL=p-8ac22724.js.map
1
+ import{p as o,H as i,c as t,h as e,d as r}from"./p-d6759ac3.js";import{g as n,c as a,d as s,e as l}from"./p-77a6e3be.js";import{g as c,a as v,t as g,c as p}from"./p-d687df8f.js";import{c as m}from"./p-e618f1cb.js";import{v as d}from"./p-344c72d7.js";import{b as f,c as u}from"./p-6b0471a8.js";import{c as h}from"./p-95d41a3b.js";import{d as x}from"./p-e0e2e9c1.js";import{d as z}from"./p-4f694d25.js";const b='.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-input{position:relative;display:flex;width:100%;align-items:center}.gov-form-input .element{position:relative;display:flex;flex:1 1 auto}.gov-form-input input,.gov-form-input select,.gov-form-input textarea{width:100%;border-radius:var(--gov-border-radius, 0.1875rem);background-color:var(--gov-form-bg-color, var(--gov-color-neutral-white));font-family:var(--gov-font-family, "Roboto", sans-serif)}.gov-form-input input:focus,.gov-form-input select:focus,.gov-form-input textarea:focus{outline:none}.gov-form-input input:focus-visible,.gov-form-input select:focus-visible,.gov-form-input textarea: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-form-input input::-moz-placeholder,.gov-form-input select::-moz-placeholder,.gov-form-input textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-input input::placeholder,.gov-form-input select::placeholder,.gov-form-input textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-input textarea{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);padding:0.5rem 0.75rem;resize:none}.gov-form-input *[slot=left-icon],.gov-form-input *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;transform:translateY(-50%);pointer-events:none}.gov-form-input *[slot=left-icon]{left:0}.gov-form-input *[slot=right-icon]{right:0}.gov-form-input *[slot=prefix],.gov-form-input *[slot=sufix]{margin:0}[size=s].gov-form-input{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);gap:0.5rem var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-input input,[size=s].gov-form-input select{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);height:var(--gov-form-input-core-s-height, 2rem);padding:var(--gov-form-input-core-s-padding, 0.25rem 0.75rem)}[size=s].gov-form-input *[slot=left-icon],[size=s].gov-form-input *[slot=right-icon]{width:var(--gov-form-input-core-s-icon-size, 1rem);height:var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-input *[slot=left-icon]{left:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=s].gov-form-input *[slot=right-icon]{right:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-input *[slot=right-icon]~input,[size=s].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=m].gov-form-input{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);gap:0.5rem var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-input input,[size=m].gov-form-input select{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);height:var(--gov-form-input-core-m-height, 2.5rem);padding:var(--gov-form-input-core-m-padding, 0.4375rem 0.75rem)}[size=m].gov-form-input *[slot=left-icon],[size=m].gov-form-input *[slot=right-icon]{width:var(--gov-form-input-core-m-icon-size, 1rem);height:var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-input *[slot=left-icon]{left:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-input *[slot=right-icon]{right:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-input *[slot=right-icon]~input,[size=m].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-input{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);gap:0.5rem var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-input input,[size=l].gov-form-input select{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);height:var(--gov-form-input-core-l-height, 3rem);padding:var(--gov-form-input-core-l-padding, 0.6875rem 0.75rem)}[size=l].gov-form-input *[slot=left-icon],[size=l].gov-form-input *[slot=right-icon]{width:var(--gov-form-input-core-l-icon-size, 1rem);height:var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-input *[slot=left-icon]{left:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-input *[slot=right-icon]{right:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-input *[slot=right-icon]~input,[size=l].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-input{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);gap:0.5rem var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-input input,[size=xl].gov-form-input select{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);height:var(--gov-form-input-core-xl-height, 3.5rem);padding:var(--gov-form-input-core-xl-padding, 0.9375rem 1rem 0.875rem)}[size=xl].gov-form-input *[slot=left-icon],[size=xl].gov-form-input *[slot=right-icon]{width:var(--gov-form-input-core-xl-icon-size, 1.25rem);height:var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-input *[slot=left-icon]{left:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-input *[slot=right-icon]{right:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-input *[slot=right-icon]~input,[size=xl].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}[variant=primary].gov-form-input input,[variant=primary].gov-form-input select,[variant=primary].gov-form-input textarea{color:var(--gov-form-input-color-primary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600))}[variant=primary].gov-form-input *[slot=left-icon],[variant=primary].gov-form-input *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-primary, var(--gov-color-primary))}[variant=secondary].gov-form-input input,[variant=secondary].gov-form-input select,[variant=secondary].gov-form-input textarea{color:var(--gov-form-input-color-secondary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700))}[variant=secondary].gov-form-input *[slot=left-icon],[variant=secondary].gov-form-input *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-secondary, var(--gov-color-primary))}[disabled=""].gov-form-input,[disabled=true i].gov-form-input,[disabled="1"].gov-form-input{pointer-events:none}[disabled=""].gov-form-input input,[disabled=""].gov-form-input select,[disabled=""].gov-form-input textarea,[disabled=true i].gov-form-input input,[disabled=true i].gov-form-input select,[disabled=true i].gov-form-input textarea,[disabled="1"].gov-form-input input,[disabled="1"].gov-form-input select,[disabled="1"].gov-form-input textarea{border-color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));background:var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=""].gov-form-input *[slot=left-icon],[disabled=""].gov-form-input *[slot=right-icon],[disabled=true i].gov-form-input *[slot=left-icon],[disabled=true i].gov-form-input *[slot=right-icon],[disabled="1"].gov-form-input *[slot=left-icon],[disabled="1"].gov-form-input *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important}[invalid=""].gov-form-input input,[invalid=""].gov-form-input select,[invalid=""].gov-form-input textarea,[invalid=true i].gov-form-input input,[invalid=true i].gov-form-input select,[invalid=true i].gov-form-input textarea,[invalid="1"].gov-form-input input,[invalid="1"].gov-form-input select,[invalid="1"].gov-form-input textarea{border-color:var(--gov-form-state-color-error, var(--gov-color-error));color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=""].gov-form-input input::-moz-placeholder,[invalid=""].gov-form-input select::-moz-placeholder,[invalid=""].gov-form-input textarea::-moz-placeholder,[invalid=true i].gov-form-input input::-moz-placeholder,[invalid=true i].gov-form-input select::-moz-placeholder,[invalid=true i].gov-form-input textarea::-moz-placeholder,[invalid="1"].gov-form-input input::-moz-placeholder,[invalid="1"].gov-form-input select::-moz-placeholder,[invalid="1"].gov-form-input textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-input input::placeholder,[invalid=""].gov-form-input select::placeholder,[invalid=""].gov-form-input textarea::placeholder,[invalid=true i].gov-form-input input::placeholder,[invalid=true i].gov-form-input select::placeholder,[invalid=true i].gov-form-input textarea::placeholder,[invalid="1"].gov-form-input input::placeholder,[invalid="1"].gov-form-input select::placeholder,[invalid="1"].gov-form-input textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-input *[slot=left-icon],[invalid=""].gov-form-input *[slot=right-icon],[invalid=true i].gov-form-input *[slot=left-icon],[invalid=true i].gov-form-input *[slot=right-icon],[invalid="1"].gov-form-input *[slot=left-icon],[invalid="1"].gov-form-input *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error)) !important}[invalid=""].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=true i].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid="1"].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[success=""].gov-form-input *[slot=right-icon]:not(.icon-arrow),[success=true i].gov-form-input *[slot=right-icon]:not(.icon-arrow),[success="1"].gov-form-input *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=""].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success="1"].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[multiline=""].gov-form-input *[slot=left-icon],[multiline=""].gov-form-input *[slot=right-icon],[multiline=true i].gov-form-input *[slot=left-icon],[multiline=true i].gov-form-input *[slot=right-icon],[multiline="1"].gov-form-input *[slot=left-icon],[multiline="1"].gov-form-input *[slot=right-icon]{display:none}.gov-form-input[type=reset] input{border-width:0}.gov-form-input[type=reset] input:focus{outline:none}';const y=b;var w;(function(o){o["INPUT"]="input";o["TEXTAREA"]="textarea"})(w||(w={}));const k=o(class o extends i{constructor(){super();this.__registerHost();this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govInput=t(this,"gov-input",7);this.govKeyUp=t(this,"gov-keyup",7);this.govHydrated=t(this,"gov-hydrated",7);this.govKeyDown=t(this,"gov-keydown",7);this.value=undefined;this.identifier=undefined;this.variant="secondary";this.success=undefined;this.size="m";this.name=undefined;this.multiline=undefined;this.rows=undefined;this.cols=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.minlength=undefined;this.maxlength=undefined;this.min=undefined;this.max=undefined;this.autocomplete=undefined;this.autocorrect=undefined;this.spellcheck=undefined;this.inputLang=undefined;this.type=undefined;this.inputType="text";this.role=undefined;this.invalid=undefined;this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.wcagAutocomplete=undefined;this.wcagExpanded=undefined;this.focused=undefined;this.h=c(this.host);this.inputId=h("GovInput");this.f=n(this.h)}validateVariant(o){d(s,o,a.root)}validateSize(o){d(l,o,a.root)}watchControlAttrs(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("success",v(this.success));this.f.passAttrToControl("disabled",v(this.disabled));this.f.passAttrToControl("invalid",v(this.invalid))}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size);this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));this.f.passAttrToControl("type",this.multiline?w.TEXTAREA:w.INPUT)}async componentDidRender(){if(m()){await x(500);await this.validateWcag()}}componentDidLoad(){this.govHydrated.emit()}render(){const o=this.multiline?w.TEXTAREA:w.INPUT;return e(r,{key:"fb06974797e9fe99cc0845cd9aac8cc79bfc0583",class:a.root,size:this.size,variant:this.variant,type:this.type},this.h.hasSlot("prefix")&&e("slot",{key:"c8a307ca8c1e4e4a27ac00463523f19c4012bbfe",name:"prefix"}),e("span",{key:"b86a839790465feda8d50385ca5b44a98c3ee81d",class:"element"},this.h.hasSlot("left-icon")&&e("slot",{key:"300d97f0f13e95ac306b3c0332ccb58b99988c7a",name:"left-icon"}),this.h.hasSlot("right-icon")&&!(this.success||this.invalid)&&e("slot",{key:"6d2673bc16e363b52662671a172f7c20eca85c62",name:"right-icon"}),this.success&&!this.multiline&&e("gov-icon",{key:"40c2f0e9991833ad731e469164d0bd148d883007",slot:"right-icon",class:"icon-validation",name:"check-lg"}),this.invalid&&!this.multiline&&e("gov-icon",{key:"56d940b36602db7749fc1656fdee739b2ad21370",slot:"right-icon",class:"icon-validation",name:"exclamation-lg"}),e(o,{key:"ecdf27b1a0889cfd0367ded8cffd24152c2e1d01",type:this.inputType,disabled:this.disabled,id:this.identifier||this.inputId,name:this.name,onFocus:this.onFocusHandler.bind(this),onInput:this.onInputHandler.bind(this),onBlur:this.onBlurHandler.bind(this),onKeyUp:this.onKeyUpHandler.bind(this),onKeyDown:this.onKeyDownHandler.bind(this),ref:o=>this.inputRef=o,placeholder:this.placeholder,value:this.value,spellcheck:g(this.spellcheck),lang:this.inputLang,readonly:g(this.readonly),autocomplete:p(this.autocomplete),autocorrect:p(this.autocorrect),minlength:this.minlength,maxlength:this.maxlength,min:this.min,max:this.max,required:this.required,rows:this.rows,cols:this.cols,role:this.role,"aria-required":g(this.required),"aria-invalid":g(this.invalid),"aria-disabled":g(this.disabled),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-owns":this.wcagOwns,"aria-expanded":g(this.wcagExpanded),"aria-autocomplete":this.wcagAutocomplete})),this.h.hasSlot("sufix")&&e("slot",{key:"bd6b9c7a981c40fdddf83e8ce0778978e1ea31af",name:"sufix"}))}onFocusHandler(o){o.stopPropagation();this.focused=true;this.govFocus.emit({component:a.root,value:this.value,originalEvent:o})}onBlurHandler(o){o.stopPropagation();this.focused=false;this.govBlur.emit({component:a.root,value:this.value,originalEvent:o})}onKeyUpHandler(o){o.stopPropagation();this.govKeyUp.emit({component:a.root,value:this.value,originalEvent:o})}onKeyDownHandler(o){o.stopPropagation();this.govKeyDown.emit({component:a.root,value:this.value,originalEvent:o})}onInputHandler(o){this.value=o.target.value;o.stopPropagation();this.govInput.emit({component:a.root,value:this.value,originalEvent:o})}async setFocus(o){return this.inputRef.focus(o)}async setValue(o){this.value=o}async clearValue(){this.value="";this.inputRef.value=""}async getRef(){return this.inputRef}async validateWcag(){f(this.wcagDescribedBy,"wcag-described-by",a.root);f(this.wcagLabelledBy,"wcag-labelled-by",a.root);f(this.wcagOwns,"wcag-owns",a.root);u(this.identifier||this.inputId,this.wcagLabelledBy,a.root)}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}}static get style(){return y}},[4,"gov-form-input",{value:[1537],identifier:[1],variant:[1],success:[516],size:[1],name:[1],multiline:[4],rows:[2],cols:[2],required:[516],disabled:[516],placeholder:[1],readonly:[4],minlength:[2],maxlength:[2],min:[8],max:[8],autocomplete:[4],autocorrect:[4],spellcheck:[4],inputLang:[1,"input-lang"],type:[1],inputType:[1,"input-type"],role:[1],invalid:[516],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]},undefined,{variant:["validateVariant"],size:["validateSize","watchControlAttrs"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"]}]);function A(){if(typeof customElements==="undefined"){return}const o=["gov-form-input","gov-icon"];o.forEach((o=>{switch(o){case"gov-form-input":if(!customElements.get(o)){customElements.define(o,k)}break;case"gov-icon":if(!customElements.get(o)){z()}break}}))}A();export{k as G,A as d};
2
+ //# sourceMappingURL=p-37b342d0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["govFormInputCss","GovFormInputStyle0","Tags","GovFormInput","proxyCustomElement","H","constructor","this","h","govHost","host","inputId","createID","f","govForm","validateVariant","newValue","validateProp","FormInputVariants","FormInputClass","root","validateSize","FormInputSizes","watchControlAttrs","passControlAttrs","passAttrToControl","size","toBoolAttr","success","disabled","invalid","componentWillLoad","variant","passAttrToLabel","String","required","multiline","TEXTAREA","INPUT","componentDidRender","canValidateWcagOnRender","delay","validateWcag","componentDidLoad","govHydrated","emit","render","Tag","Host","key","class","type","hasSlot","name","slot","inputType","id","identifier","onFocus","onFocusHandler","bind","onInput","onInputHandler","onBlur","onBlurHandler","onKeyUp","onKeyUpHandler","onKeyDown","onKeyDownHandler","ref","el","inputRef","placeholder","value","spellcheck","toBoolAttrIfDefined","lang","inputLang","readonly","autocomplete","toOnOffAttrIfDefined","autocorrect","minlength","maxlength","min","max","rows","cols","role","wcagDescribedBy","wcagLabelledBy","wcagOwns","wcagExpanded","wcagAutocomplete","e","stopPropagation","focused","govFocus","component","originalEvent","govBlur","govKeyUp","govKeyDown","target","govInput","setFocus","options","focus","setValue","clearValue","getRef","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/input/gov-form-input.scss?tag=gov-form-input","../../../packages/core/src/components/gov-form/input/gov-form-input.tsx"],"sourcesContent":["/*\n * Input\n */\n\n@import \"../input/gov-form-input-core.scss\";\n$class: \".gov-form-input\";\n\n#{$class} {\n\t@extend %form-input-core;\n\n\t// VARIANTS\n\t&[type=\"reset\"] {\n\t\tinput {\n\t\t\tborder-width: 0;\n\t\t\t&:focus {\n\t\t\t\toutline: none;\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 {govForm} from \"../../../helpers/Dom/form\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {validateWcagLabelFor, validateWcagRef} from \"../../../helpers/Validate/wcag\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {delay} from \"../../../utils/utils\"\nimport {\n\tFormInputClass,\n\tFormInputSizes,\n\tFormInputSizesType,\n\tFormInputVariants,\n\tFormInputVariantType,\n\tInputType,\n\tType,\n} from \"./constants\"\nimport {FormInputEvent} from \"./gov-form-input.types\"\nimport {Nullable} from \"../../../types/interfaces\"\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n\tstyleUrl: \"gov-form-input.scss\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID(\"GovInput\")\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop() readonly variant?: FormInputVariantType = \"secondary\"\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\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({reflect:true}) readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect:true}) readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck\n\t */\n\t@Prop() readonly spellcheck: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang\n\t */\n\t@Prop({attribute: \"input-lang\"}) readonly inputLang: string\n\t/**\n\t * Defined the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop({attribute: \"input-type\"}) readonly inputType: InputType = \"text\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: Nullable<string>\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop({reflect:true}) readonly invalid: boolean\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 * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({attribute: \"wcag-owns\"}) readonly wcagOwns: string\n\t/**\n\t * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value.\n\t */\n\t@Prop({attribute: \"wcag-autocomplete\"}) readonly wcagAutocomplete: string\n\t/**\n\t * Attribute is set on an element to indicate if a control is expanded or collapsed\n\t */\n\t@Prop({attribute: \"wcag-expanded\"}) readonly wcagExpanded: boolean\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-input\"}) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keyup\"}) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-hydrated\"}) govHydrated: EventEmitter<void>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keydown\"}) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormInputVariants, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"success\")\n\t@Watch(\"size\")\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"success\", toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.passControlAttrs()\n\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\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\tcomponentDidLoad() {\n\t\tthis.govHydrated.emit();\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} variant={this.variant} type={this.type}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\"/>}\n\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && !(this.success || this.invalid) && <slot name=\"right-icon\"/>}\n\n\t\t\t\t\t{this.success && !this.multiline &&\n\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && !this.multiline &&\n\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\tspellcheck={toBoolAttrIfDefined(this.spellcheck)}\n\t\t\t\t\t\tlang={this.inputLang}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\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-disabled={toBoolAttrIfDefined(this.disabled)}\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-owns={this.wcagOwns}\n\t\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\t\taria-autocomplete={this.wcagAutocomplete}\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\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\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, \"wcag-owns\", FormInputClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.inputId, this.wcagLabelledBy, FormInputClass.root)\n\t}\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as e,H as a,c as t,h as s,d as o}from"./p-d6759ac3.js";import{a as c}from"./p-07165d99.js";import{v as i}from"./p-6b0471a8.js";import{c as n}from"./p-e618f1cb.js";import{d as r}from"./p-e0e2e9c1.js";import{g as m}from"./p-d687df8f.js";import{d as l}from"./p-44c731a0.js";import{d}from"./p-fd554fb4.js";const g=".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-attachments-item{position:relative;display:block;width:100%;margin:0rem 0rem 0.5rem}.gov-attachments-item__messages>*:last-child{margin-bottom:0}.gov-attachments-item__file{display:flex;gap:1rem}.gov-attachments-item__name{display:flex;gap:0 0.5rem;flex-wrap:wrap;align-items:center;align-self:center;margin:0;color:var(--gov-attachments-name-color, var(--gov-color-primary))}.gov-attachments-item__name span{font-weight:var(--gov-text-xs-font-weight);font-size:var(--gov-text-xs-font-size);line-height:var(--gov-text-xs-line-height);letter-spacing:var(--gov-text-xs-letter-spacing);color:var(--gov-attachments-decor-color, var(--gov-color-secondary-700))}";const f=g;const p=e(class e extends a{constructor(){super();this.__registerHost();this.govRemove=t(this,"gov-remove",7);this.wcagRemoveLabel=undefined;this.wcagRemoveLabelledBy=undefined;this.h=m(this.host)}async componentDidRender(){if(n()){await r(500);await this.validateWcag()}}render(){return s(o,{key:"015f39cdea81c65f2611071cb85c2d72ed5108eb",class:this.h.classes(c.root),role:"listitem"},s("div",{key:"9ced89cbee422052b997ede6e35e1a5228397d24",class:c.file},s("p",{key:"674843721e5015d50fbf0d2e6bd7fcc95e38cc4f",class:c.name},s("slot",{key:"2ce5d7c8afa3655614cab57e6907caa7d84770b6"}),s("slot",{key:"a0c55792da29507f935841b47cc009bc4c1914bd",name:"info"})),s("gov-button",{key:"08bb5ea2679d8d116f073552d7101bf59c9454e7",variant:"primary",type:"base",size:"s","wcag-label":this.wcagRemoveLabel,"wcag-labelled-by":this.wcagRemoveLabelledBy,"on-gov-click":this.govRemove.emit},s("gov-icon",{key:"657e53ab7128c12b6bae2a427ca7b840b0a1b908",slot:"left-icon",name:"x-lg"}))),this.h.hasSlot("message")&&s("div",{key:"8c333c0f6b74ac28502abbcb0d48f1339f2cc38a",class:c.messages},s("slot",{key:"c9d727112efad1e589aca3ada9f74600acedc0c1",name:"message"})))}async validateWcag(){i(this.wcagRemoveLabel,this.wcagRemoveLabelledBy,c.root)}get host(){return this}static get style(){return f}},[4,"gov-attachments-item",{wcagRemoveLabel:[1,"wcag-remove-label"],wcagRemoveLabelledBy:[1,"wcag-remove-labelled-by"],validateWcag:[64]}]);function b(){if(typeof customElements==="undefined"){return}const e=["gov-attachments-item","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-attachments-item":if(!customElements.get(e)){customElements.define(e,p)}break;case"gov-button":if(!customElements.get(e)){l()}break;case"gov-icon":if(!customElements.get(e)){d()}break}}))}b();export{p as G,b as d};
2
- //# sourceMappingURL=p-57bc98b3.js.map
1
+ import{p as e,H as t,c as a,h as s,d as o}from"./p-d6759ac3.js";import{a as c}from"./p-07165d99.js";import{v as i}from"./p-6b0471a8.js";import{c as n}from"./p-e618f1cb.js";import{d as r}from"./p-e0e2e9c1.js";import{g as m}from"./p-d687df8f.js";import{d as l}from"./p-eefec75b.js";import{d}from"./p-4f694d25.js";const g=".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-attachments-item{position:relative;display:block;width:100%;margin:0rem 0rem 0.5rem}.gov-attachments-item__messages>*:last-child{margin-bottom:0}.gov-attachments-item__file{display:flex;gap:1rem}.gov-attachments-item__name{display:flex;gap:0 0.5rem;flex-wrap:wrap;align-items:center;align-self:center;margin:0;color:var(--gov-attachments-name-color, var(--gov-color-primary))}.gov-attachments-item__name span{font-weight:var(--gov-text-xs-font-weight);font-size:var(--gov-text-xs-font-size);line-height:var(--gov-text-xs-line-height);letter-spacing:var(--gov-text-xs-letter-spacing);color:var(--gov-attachments-decor-color, var(--gov-color-secondary-700))}";const f=g;const p=e(class e extends t{constructor(){super();this.__registerHost();this.govRemove=a(this,"gov-remove",7);this.wcagRemoveLabel=undefined;this.wcagRemoveLabelledBy=undefined;this.h=m(this.host)}async componentDidRender(){if(n()){await r(500);await this.validateWcag()}}render(){return s(o,{key:"015f39cdea81c65f2611071cb85c2d72ed5108eb",class:this.h.classes(c.root),role:"listitem"},s("div",{key:"9ced89cbee422052b997ede6e35e1a5228397d24",class:c.file},s("p",{key:"674843721e5015d50fbf0d2e6bd7fcc95e38cc4f",class:c.name},s("slot",{key:"2ce5d7c8afa3655614cab57e6907caa7d84770b6"}),s("slot",{key:"a0c55792da29507f935841b47cc009bc4c1914bd",name:"info"})),s("gov-button",{key:"08bb5ea2679d8d116f073552d7101bf59c9454e7",variant:"primary",type:"base",size:"s","wcag-label":this.wcagRemoveLabel,"wcag-labelled-by":this.wcagRemoveLabelledBy,"on-gov-click":this.govRemove.emit},s("gov-icon",{key:"657e53ab7128c12b6bae2a427ca7b840b0a1b908",slot:"left-icon",name:"x-lg"}))),this.h.hasSlot("message")&&s("div",{key:"8c333c0f6b74ac28502abbcb0d48f1339f2cc38a",class:c.messages},s("slot",{key:"c9d727112efad1e589aca3ada9f74600acedc0c1",name:"message"})))}async validateWcag(){i(this.wcagRemoveLabel,this.wcagRemoveLabelledBy,c.root)}get host(){return this}static get style(){return f}},[4,"gov-attachments-item",{wcagRemoveLabel:[1,"wcag-remove-label"],wcagRemoveLabelledBy:[1,"wcag-remove-labelled-by"],validateWcag:[64]}]);function b(){if(typeof customElements==="undefined"){return}const e=["gov-attachments-item","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-attachments-item":if(!customElements.get(e)){customElements.define(e,p)}break;case"gov-button":if(!customElements.get(e)){l()}break;case"gov-icon":if(!customElements.get(e)){d()}break}}))}b();export{p as G,b as d};
2
+ //# sourceMappingURL=p-410e296d.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,h as i,d as n}from"./p-d6759ac3.js";import{g as e}from"./p-bfce6f99.js";import{i as o,e as a}from"./p-e618f1cb.js";import{g as r}from"./p-d687df8f.js";var c;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(c||(c={}));const h={root:"gov-icon",holder:"gov-icon__holder"};const l="4.0.8-rc17";const f=()=>l;const d={};const p={};const u=t=>t.startsWith("http://")||t.startsWith("https://");const m=(t,s,i)=>{if(u(t)){return`${t}/${i}/${s}.svg?v=${f()}`}return e(`${t}/${i}/${s}.svg`)+`?v=${f()}`};async function g({name:t,type:s}){const i=s+"-"+t;if(d[i]){return d[i]}if(!p[i]){p[i]=fetch(m(o(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const n=await p[i];d[i]=n;return n}const y=".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{display:inline-flex;width:100%;height:100%}.gov-icon__holder+.gov-icon__holder{display:none !important}.gov-icon svg{display:inline-flex;width:100%;height:100%;max-width:100%;max-height:100%}";const v=y;const w=t(class t extends s{constructor(){super();this.__registerHost();this.name=null;this.type="basic";this.iconData=undefined;this.visible=false;this.error=false;this.h=r(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(){if(a()){this.visible=true;this.loadIconPathData().finally()}else{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){if(this.intersectionObserver){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(h.root)},i("span",{class:h.holder,innerHTML:this.iconData}))}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{name:["loadIconPathData"]}}static get style(){return v}},[0,"gov-icon",{name:[1],type:[1],iconData:[32],visible:[32],error:[32]},undefined,{name:["loadIconPathData"]}]);function b(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,w)}break}}))}b();export{w as G,b as d};
2
- //# sourceMappingURL=p-fd554fb4.js.map
1
+ import{p as t,H as s,h as i,d as n}from"./p-d6759ac3.js";import{g as e}from"./p-bfce6f99.js";import{i as o,e as a}from"./p-e618f1cb.js";import{g as r}from"./p-d687df8f.js";var c;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(c||(c={}));const h={root:"gov-icon",holder:"gov-icon__holder"};const l="4.0.8-rc19";const f=()=>l;const d={};const p={};const u=t=>t.startsWith("http://")||t.startsWith("https://");const m=(t,s,i)=>{if(u(t)){return`${t}/${i}/${s}.svg?v=${f()}`}return e(`${t}/${i}/${s}.svg`)+`?v=${f()}`};async function g({name:t,type:s}){const i=s+"-"+t;if(d[i]){return d[i]}if(!p[i]){p[i]=fetch(m(o(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const n=await p[i];d[i]=n;return n}const y=".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{display:inline-flex;width:100%;height:100%}.gov-icon__holder+.gov-icon__holder{display:none !important}.gov-icon svg{display:inline-flex;width:100%;height:100%;max-width:100%;max-height:100%}";const v=y;const w=t(class t extends s{constructor(){super();this.__registerHost();this.name=null;this.type="basic";this.iconData=undefined;this.visible=false;this.error=false;this.h=r(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(){if(a()){this.visible=true;this.loadIconPathData().finally()}else{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){if(this.intersectionObserver){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(h.root)},i("span",{class:h.holder,innerHTML:this.iconData}))}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{name:["loadIconPathData"]}}static get style(){return v}},[0,"gov-icon",{name:[1],type:[1],iconData:[32],visible:[32],error:[32]},undefined,{name:["loadIconPathData"]}]);function b(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,w)}break}}))}b();export{w as G,b as d};
2
+ //# sourceMappingURL=p-4f694d25.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as o,c as i,h as t,d as r}from"./p-d6759ac3.js";import{g as s,o as c,p as l,q as a}from"./p-77a6e3be.js";import{g as n,a as g,t as v}from"./p-d687df8f.js";import{c as m}from"./p-e618f1cb.js";import{v as f}from"./p-344c72d7.js";import{b as d,c as h}from"./p-6b0471a8.js";import{c as p}from"./p-95d41a3b.js";import{d as u}from"./p-e0e2e9c1.js";import{p as z}from"./p-3f704a40.js";import{t as w}from"./p-240c302e.js";import{d as x}from"./p-fd554fb4.js";const b='.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-select{position:relative;display:flex;width:100%;align-items:center}.gov-form-select .element{position:relative;display:flex;flex:1 1 auto}.gov-form-select input,.gov-form-select select,.gov-form-select textarea{width:100%;border-radius:var(--gov-border-radius, 0.1875rem);background-color:var(--gov-form-bg-color, var(--gov-color-neutral-white));font-family:var(--gov-font-family, "Roboto", sans-serif)}.gov-form-select input:focus,.gov-form-select select:focus,.gov-form-select textarea:focus{outline:none}.gov-form-select input:focus-visible,.gov-form-select select:focus-visible,.gov-form-select textarea: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-form-select input::-moz-placeholder,.gov-form-select select::-moz-placeholder,.gov-form-select textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-select input::placeholder,.gov-form-select select::placeholder,.gov-form-select textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-select textarea{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);padding:0.5rem 0.75rem;resize:none}.gov-form-select *[slot=left-icon],.gov-form-select *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;transform:translateY(-50%);pointer-events:none}.gov-form-select *[slot=left-icon]{left:0}.gov-form-select *[slot=right-icon]{right:0}.gov-form-select *[slot=prefix],.gov-form-select *[slot=sufix]{margin:0}[size=s].gov-form-select{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);gap:0.5rem var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-select input,[size=s].gov-form-select select{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);height:var(--gov-form-input-core-s-height, 2rem);padding:var(--gov-form-input-core-s-padding, 0.25rem 0.75rem)}[size=s].gov-form-select *[slot=left-icon],[size=s].gov-form-select *[slot=right-icon]{width:var(--gov-form-input-core-s-icon-size, 1rem);height:var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=s].gov-form-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-select *[slot=right-icon]~input,[size=s].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=m].gov-form-select{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);gap:0.5rem var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-select input,[size=m].gov-form-select select{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);height:var(--gov-form-input-core-m-height, 2.5rem);padding:var(--gov-form-input-core-m-padding, 0.4375rem 0.75rem)}[size=m].gov-form-select *[slot=left-icon],[size=m].gov-form-select *[slot=right-icon]{width:var(--gov-form-input-core-m-icon-size, 1rem);height:var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-select *[slot=right-icon]~input,[size=m].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-select{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);gap:0.5rem var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-select input,[size=l].gov-form-select select{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);height:var(--gov-form-input-core-l-height, 3rem);padding:var(--gov-form-input-core-l-padding, 0.6875rem 0.75rem)}[size=l].gov-form-select *[slot=left-icon],[size=l].gov-form-select *[slot=right-icon]{width:var(--gov-form-input-core-l-icon-size, 1rem);height:var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-select *[slot=right-icon]~input,[size=l].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-select{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);gap:0.5rem var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-select input,[size=xl].gov-form-select select{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);height:var(--gov-form-input-core-xl-height, 3.5rem);padding:var(--gov-form-input-core-xl-padding, 0.9375rem 1rem 0.875rem)}[size=xl].gov-form-select *[slot=left-icon],[size=xl].gov-form-select *[slot=right-icon]{width:var(--gov-form-input-core-xl-icon-size, 1.25rem);height:var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-select *[slot=right-icon]~input,[size=xl].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}[variant=primary].gov-form-select input,[variant=primary].gov-form-select select,[variant=primary].gov-form-select textarea{color:var(--gov-form-input-color-primary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600))}[variant=primary].gov-form-select *[slot=left-icon],[variant=primary].gov-form-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-primary, var(--gov-color-primary))}[variant=secondary].gov-form-select input,[variant=secondary].gov-form-select select,[variant=secondary].gov-form-select textarea{color:var(--gov-form-input-color-secondary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700))}[variant=secondary].gov-form-select *[slot=left-icon],[variant=secondary].gov-form-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-secondary, var(--gov-color-primary))}[disabled=""].gov-form-select,[disabled=true i].gov-form-select,[disabled="1"].gov-form-select{pointer-events:none}[disabled=""].gov-form-select input,[disabled=""].gov-form-select select,[disabled=""].gov-form-select textarea,[disabled=true i].gov-form-select input,[disabled=true i].gov-form-select select,[disabled=true i].gov-form-select textarea,[disabled="1"].gov-form-select input,[disabled="1"].gov-form-select select,[disabled="1"].gov-form-select textarea{border-color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));background:var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=""].gov-form-select *[slot=left-icon],[disabled=""].gov-form-select *[slot=right-icon],[disabled=true i].gov-form-select *[slot=left-icon],[disabled=true i].gov-form-select *[slot=right-icon],[disabled="1"].gov-form-select *[slot=left-icon],[disabled="1"].gov-form-select *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important}[invalid=""].gov-form-select input,[invalid=""].gov-form-select select,[invalid=""].gov-form-select textarea,[invalid=true i].gov-form-select input,[invalid=true i].gov-form-select select,[invalid=true i].gov-form-select textarea,[invalid="1"].gov-form-select input,[invalid="1"].gov-form-select select,[invalid="1"].gov-form-select textarea{border-color:var(--gov-form-state-color-error, var(--gov-color-error));color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=""].gov-form-select input::-moz-placeholder,[invalid=""].gov-form-select select::-moz-placeholder,[invalid=""].gov-form-select textarea::-moz-placeholder,[invalid=true i].gov-form-select input::-moz-placeholder,[invalid=true i].gov-form-select select::-moz-placeholder,[invalid=true i].gov-form-select textarea::-moz-placeholder,[invalid="1"].gov-form-select input::-moz-placeholder,[invalid="1"].gov-form-select select::-moz-placeholder,[invalid="1"].gov-form-select textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-select input::placeholder,[invalid=""].gov-form-select select::placeholder,[invalid=""].gov-form-select textarea::placeholder,[invalid=true i].gov-form-select input::placeholder,[invalid=true i].gov-form-select select::placeholder,[invalid=true i].gov-form-select textarea::placeholder,[invalid="1"].gov-form-select input::placeholder,[invalid="1"].gov-form-select select::placeholder,[invalid="1"].gov-form-select textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-select *[slot=left-icon],[invalid=""].gov-form-select *[slot=right-icon],[invalid=true i].gov-form-select *[slot=left-icon],[invalid=true i].gov-form-select *[slot=right-icon],[invalid="1"].gov-form-select *[slot=left-icon],[invalid="1"].gov-form-select *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error)) !important}[invalid=""].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=true i].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid="1"].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[success=""].gov-form-select *[slot=right-icon]:not(.icon-arrow),[success=true i].gov-form-select *[slot=right-icon]:not(.icon-arrow),[success="1"].gov-form-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=""].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success="1"].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[multiline=""].gov-form-select *[slot=left-icon],[multiline=""].gov-form-select *[slot=right-icon],[multiline=true i].gov-form-select *[slot=left-icon],[multiline=true i].gov-form-select *[slot=right-icon],[multiline="1"].gov-form-select *[slot=left-icon],[multiline="1"].gov-form-select *[slot=right-icon]{display:none}.gov-form-select{background:none}.gov-form-select select{-webkit-appearance:none;-moz-appearance:none}.gov-form-select select::-ms-expand{display:none}[size=s].gov-form-select *[slot=right-icon]{right:var(--gov-form-select-s-arrow-right-position, 0.75rem);width:var(--gov-form-select-s-arrow-size, 0.75rem);height:var(--gov-form-select-s-arrow-size, 0.75rem)}[size=s][invalid=""].gov-form-select .icon-arrow,[size=s][invalid=true i].gov-form-select .icon-arrow,[size=s][invalid="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-s-arrow-right-position, 0.75rem))}[size=s][success=""].gov-form-select .icon-arrow,[size=s][success=true i].gov-form-select .icon-arrow,[size=s][success="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-s-arrow-right-position, 0.75rem))}[size=m].gov-form-select *[slot=right-icon]{right:var(--gov-form-select-m-arrow-right-position, 1rem);width:var(--gov-form-select-m-arrow-size, 0.75rem);height:var(--gov-form-select-m-arrow-size, 0.75rem)}[size=m][invalid=""].gov-form-select .icon-arrow,[size=m][invalid=true i].gov-form-select .icon-arrow,[size=m][invalid="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-m-arrow-right-position, 1rem))}[size=m][success=""].gov-form-select .icon-arrow,[size=m][success=true i].gov-form-select .icon-arrow,[size=m][success="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-m-arrow-right-position, 1rem))}[size=l].gov-form-select *[slot=right-icon]{right:var(--gov-form-select-l-arrow-right-position, 1rem);width:var(--gov-form-select-l-arrow-size, 1rem);height:var(--gov-form-select-l-arrow-size, 1rem)}[size=l][invalid=""].gov-form-select .icon-arrow,[size=l][invalid=true i].gov-form-select .icon-arrow,[size=l][invalid="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-l-arrow-right-position, 1rem))}[size=l][success=""].gov-form-select .icon-arrow,[size=l][success=true i].gov-form-select .icon-arrow,[size=l][success="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-l-arrow-right-position, 1rem))}[size=xl].gov-form-select *[slot=right-icon]{right:var(--gov-form-select-xl-arrow-right-position, 1.3125rem);width:var(--gov-form-select-xl-arrow-size, 1rem);height:var(--gov-form-select-xl-arrow-size, 1rem)}[size=xl][invalid=""].gov-form-select .icon-arrow,[size=xl][invalid=true i].gov-form-select .icon-arrow,[size=xl][invalid="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-xl-arrow-right-position, 1.3125rem))}[size=xl][success=""].gov-form-select .icon-arrow,[size=xl][success=true i].gov-form-select .icon-arrow,[size=xl][success="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-xl-arrow-right-position, 1.3125rem))}[size=s][invalid=""].gov-form-select *[slot=right-icon]~select,[size=s][invalid=""].gov-form-select *[slot=right-icon]~input,[size=s][invalid=true i].gov-form-select *[slot=right-icon]~select,[size=s][invalid=true i].gov-form-select *[slot=right-icon]~input,[size=s][invalid="1"].gov-form-select *[slot=right-icon]~select,[size=s][invalid="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-s-icon-padding, 2rem))}[size=s][success=""].gov-form-select *[slot=right-icon]~select,[size=s][success=""].gov-form-select *[slot=right-icon]~input,[size=s][success=true i].gov-form-select *[slot=right-icon]~select,[size=s][success=true i].gov-form-select *[slot=right-icon]~input,[size=s][success="1"].gov-form-select *[slot=right-icon]~select,[size=s][success="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-s-icon-padding, 2rem))}[size=m][invalid=""].gov-form-select *[slot=right-icon]~select,[size=m][invalid=""].gov-form-select *[slot=right-icon]~input,[size=m][invalid=true i].gov-form-select *[slot=right-icon]~select,[size=m][invalid=true i].gov-form-select *[slot=right-icon]~input,[size=m][invalid="1"].gov-form-select *[slot=right-icon]~select,[size=m][invalid="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-m-icon-padding, 2.5rem))}[size=m][success=""].gov-form-select *[slot=right-icon]~select,[size=m][success=""].gov-form-select *[slot=right-icon]~input,[size=m][success=true i].gov-form-select *[slot=right-icon]~select,[size=m][success=true i].gov-form-select *[slot=right-icon]~input,[size=m][success="1"].gov-form-select *[slot=right-icon]~select,[size=m][success="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-m-icon-padding, 2.5rem))}[size=l][invalid=""].gov-form-select *[slot=right-icon]~select,[size=l][invalid=""].gov-form-select *[slot=right-icon]~input,[size=l][invalid=true i].gov-form-select *[slot=right-icon]~select,[size=l][invalid=true i].gov-form-select *[slot=right-icon]~input,[size=l][invalid="1"].gov-form-select *[slot=right-icon]~select,[size=l][invalid="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-l-icon-padding, 2.5rem))}[size=l][success=""].gov-form-select *[slot=right-icon]~select,[size=l][success=""].gov-form-select *[slot=right-icon]~input,[size=l][success=true i].gov-form-select *[slot=right-icon]~select,[size=l][success=true i].gov-form-select *[slot=right-icon]~input,[size=l][success="1"].gov-form-select *[slot=right-icon]~select,[size=l][success="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-l-icon-padding, 2.5rem))}[size=xl][invalid=""].gov-form-select *[slot=right-icon]~select,[size=xl][invalid=""].gov-form-select *[slot=right-icon]~input,[size=xl][invalid=true i].gov-form-select *[slot=right-icon]~select,[size=xl][invalid=true i].gov-form-select *[slot=right-icon]~input,[size=xl][invalid="1"].gov-form-select *[slot=right-icon]~select,[size=xl][invalid="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-xl-icon-padding, 3rem))}[size=xl][success=""].gov-form-select *[slot=right-icon]~select,[size=xl][success=""].gov-form-select *[slot=right-icon]~input,[size=xl][success=true i].gov-form-select *[slot=right-icon]~select,[size=xl][success=true i].gov-form-select *[slot=right-icon]~input,[size=xl][success="1"].gov-form-select *[slot=right-icon]~select,[size=xl][success="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-xl-icon-padding, 3rem))}';const y=b;const k=e(class e extends o{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govChange=i(this,"gov-change",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.variant="secondary";this.size="m";this.name=undefined;this.required=false;this.success=undefined;this.disabled=false;this.invalid=undefined;this.wcagActiveDescendant=undefined;this.wcagControls=undefined;this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.focused=undefined;this.optionsState=[];this.h=n(this.host);this.f=s(this.h);this.selectId=p("GovSelect")}validateVariant(e){f(l,e,c.root)}validateSize(e){f(a,e,c.root)}watchOptions(e){this.optionsState=z(e)}watchDisabled(){this.passControlAttrs()}watchValue(){this.markSelectedValue()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",g(this.invalid));this.f.passAttrToControl("type","select")}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size);this.markSelectedValue();this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));this.optionsState=z(this.options)}async componentDidRender(){if(m()){await u(500);await this.validateWcag()}w((()=>this.markSelectedValue()))}markSelectedValue(){this.host.querySelectorAll("option").forEach((e=>{if(e.value===this.value){e.setAttribute("selected","selected")}else{e.removeAttribute("selected")}}))}render(){return t(r,{key:"5e9b2cdd4aae50ae5ee5ce8fe35db02888d682db",class:c.root,size:this.size,variant:this.variant},this.h.hasSlot("prefix")&&t("slot",{key:"1eb66206a8dd47a44496c1566cd386b5183766ee",name:"prefix"}),t("span",{key:"df3d012666a80ca6e2ad96981f04f2adda0d8654",class:"element"},t("gov-icon",{key:"e8ad512230dec7eb045e4dc91169b16709674f0b",slot:"right-icon",name:"chevron-down",class:"icon-arrow"}),this.h.hasSlot("right-icon")&&!(this.success||this.invalid)&&t("slot",{key:"f05864931816635b3dc3c4613680ba5c1dac0283",name:"right-icon"}),this.success&&t("gov-icon",{key:"e5d8ad5dc8a6c5c14a1db233426ab2f56e4da6d3",slot:"right-icon",class:"icon-validation",name:"check-lg"}),this.invalid&&t("gov-icon",{key:"c63c87a6cfc3eafdb979ebd40e019e3f65ecd35f",slot:"right-icon",class:"icon-validation",name:"exclamation-lg"}),t("select",{key:"b0d5876fb44872b8189870d7cf8ac374612153c7",id:this.identifier||this.selectId,onFocus:this.onFocusHandler.bind(this),onChange:this.onChangeHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,name:this.name,disabled:this.disabled,ref:e=>this.selectRef=e,"aria-disabled":v(this.disabled),"aria-activedescendant":this.wcagActiveDescendant,"aria-controls":this.wcagControls,"aria-required":v(this.required),"aria-invalid":v(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-owns":this.wcagOwns},t("slot",{key:"5edd39b36e1dc407a26c28e41eda625e9a780f3f"}),Array.isArray(this.optionsState)&&this.optionsState.map((e=>{var o;return t("option",{value:e.value,selected:e.value===this.value,disabled:e===null||e===void 0?void 0:e.disabled},(o=e.label)!==null&&o!==void 0?o:e.value)})))),this.h.hasSlot("sufix")&&t("slot",{key:"9d2e12ec4dda23883e70b65773a7936cc231d03c",name:"sufix"}))}onFocusHandler(e){this.focused=true;this.govFocus.emit({component:c.root,originalEvent:e,value:this.value})}onBlurHandler(e){this.focused=false;this.govBlur.emit({component:c.root,originalEvent:e,value:this.value})}onChangeHandler(e){this.value=e.target.value;e.stopPropagation();this.govChange.emit({component:c.root,originalEvent:e,value:this.value})}async setFocus(e){return this.selectRef.focus(e)}async getRef(){return this.selectRef}async validateWcag(){d(this.wcagActiveDescendant,"wcag-active-descendant",c.root);d(this.wcagControls,"wcag-controls",c.root);d(this.wcagDescribedBy,"wcag-described-by",c.root);d(this.wcagOwns,"wcag-owns",c.root);h(this.identifier||this.selectId,this.wcagLabelledBy,c.root)}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize","watchDisabled"],options:["watchOptions"],disabled:["watchDisabled"],invalid:["watchDisabled"],value:["watchValue"]}}static get style(){return y}},[4,"gov-form-select",{value:[1537],options:[1537],identifier:[1],variant:[1],size:[1],name:[1],required:[4],success:[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],optionsState:[32],setFocus:[64],getRef:[64],validateWcag:[64]},undefined,{variant:["validateVariant"],size:["validateSize","watchDisabled"],options:["watchOptions"],disabled:["watchDisabled"],invalid:["watchDisabled"],value:["watchValue"]}]);function j(){if(typeof customElements==="undefined"){return}const e=["gov-form-select","gov-icon"];e.forEach((e=>{switch(e){case"gov-form-select":if(!customElements.get(e)){customElements.define(e,k)}break;case"gov-icon":if(!customElements.get(e)){x()}break}}))}j();export{k as G,j as d};
2
- //# sourceMappingURL=p-3248435d.js.map
1
+ import{p as e,H as o,c as t,h as i,d as r}from"./p-d6759ac3.js";import{g as s,o as c,p as l,q as n}from"./p-77a6e3be.js";import{g as a,a as g,t as v}from"./p-d687df8f.js";import{c as m}from"./p-e618f1cb.js";import{v as f}from"./p-344c72d7.js";import{b as d,c as h}from"./p-6b0471a8.js";import{c as p}from"./p-95d41a3b.js";import{d as u}from"./p-e0e2e9c1.js";import{p as z}from"./p-3f704a40.js";import{t as w}from"./p-240c302e.js";import{d as x}from"./p-4f694d25.js";const b='.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-select{position:relative;display:flex;width:100%;align-items:center}.gov-form-select .element{position:relative;display:flex;flex:1 1 auto}.gov-form-select input,.gov-form-select select,.gov-form-select textarea{width:100%;border-radius:var(--gov-border-radius, 0.1875rem);background-color:var(--gov-form-bg-color, var(--gov-color-neutral-white));font-family:var(--gov-font-family, "Roboto", sans-serif)}.gov-form-select input:focus,.gov-form-select select:focus,.gov-form-select textarea:focus{outline:none}.gov-form-select input:focus-visible,.gov-form-select select:focus-visible,.gov-form-select textarea: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-form-select input::-moz-placeholder,.gov-form-select select::-moz-placeholder,.gov-form-select textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-select input::placeholder,.gov-form-select select::placeholder,.gov-form-select textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-select textarea{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);padding:0.5rem 0.75rem;resize:none}.gov-form-select *[slot=left-icon],.gov-form-select *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;transform:translateY(-50%);pointer-events:none}.gov-form-select *[slot=left-icon]{left:0}.gov-form-select *[slot=right-icon]{right:0}.gov-form-select *[slot=prefix],.gov-form-select *[slot=sufix]{margin:0}[size=s].gov-form-select{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);gap:0.5rem var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-select input,[size=s].gov-form-select select{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);height:var(--gov-form-input-core-s-height, 2rem);padding:var(--gov-form-input-core-s-padding, 0.25rem 0.75rem)}[size=s].gov-form-select *[slot=left-icon],[size=s].gov-form-select *[slot=right-icon]{width:var(--gov-form-input-core-s-icon-size, 1rem);height:var(--gov-form-input-core-s-icon-size, 1rem)}[size=s].gov-form-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=s].gov-form-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2)}[size=s].gov-form-select *[slot=right-icon]~input,[size=s].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-s-icon-padding, 2rem)}[size=m].gov-form-select{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);gap:0.5rem var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-select input,[size=m].gov-form-select select{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);height:var(--gov-form-input-core-m-height, 2.5rem);padding:var(--gov-form-input-core-m-padding, 0.4375rem 0.75rem)}[size=m].gov-form-select *[slot=left-icon],[size=m].gov-form-select *[slot=right-icon]{width:var(--gov-form-input-core-m-icon-size, 1rem);height:var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-select *[slot=right-icon]~input,[size=m].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-select{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);gap:0.5rem var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-select input,[size=l].gov-form-select select{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);height:var(--gov-form-input-core-l-height, 3rem);padding:var(--gov-form-input-core-l-padding, 0.6875rem 0.75rem)}[size=l].gov-form-select *[slot=left-icon],[size=l].gov-form-select *[slot=right-icon]{width:var(--gov-form-input-core-l-icon-size, 1rem);height:var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-select *[slot=right-icon]~input,[size=l].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-select{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);gap:0.5rem var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-select input,[size=xl].gov-form-select select{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);height:var(--gov-form-input-core-xl-height, 3.5rem);padding:var(--gov-form-input-core-xl-padding, 0.9375rem 1rem 0.875rem)}[size=xl].gov-form-select *[slot=left-icon],[size=xl].gov-form-select *[slot=right-icon]{width:var(--gov-form-input-core-xl-icon-size, 1.25rem);height:var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-select *[slot=left-icon]{left:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-select *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-select *[slot=right-icon]{right:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-select *[slot=right-icon]~input,[size=xl].gov-form-select *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}[variant=primary].gov-form-select input,[variant=primary].gov-form-select select,[variant=primary].gov-form-select textarea{color:var(--gov-form-input-color-primary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600))}[variant=primary].gov-form-select *[slot=left-icon],[variant=primary].gov-form-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-primary, var(--gov-color-primary))}[variant=secondary].gov-form-select input,[variant=secondary].gov-form-select select,[variant=secondary].gov-form-select textarea{color:var(--gov-form-input-color-secondary, var(--gov-color-secondary-700));border:var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700))}[variant=secondary].gov-form-select *[slot=left-icon],[variant=secondary].gov-form-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-input-icon-color-secondary, var(--gov-color-primary))}[disabled=""].gov-form-select,[disabled=true i].gov-form-select,[disabled="1"].gov-form-select{pointer-events:none}[disabled=""].gov-form-select input,[disabled=""].gov-form-select select,[disabled=""].gov-form-select textarea,[disabled=true i].gov-form-select input,[disabled=true i].gov-form-select select,[disabled=true i].gov-form-select textarea,[disabled="1"].gov-form-select input,[disabled="1"].gov-form-select select,[disabled="1"].gov-form-select textarea{border-color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));background:var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=""].gov-form-select *[slot=left-icon],[disabled=""].gov-form-select *[slot=right-icon],[disabled=true i].gov-form-select *[slot=left-icon],[disabled=true i].gov-form-select *[slot=right-icon],[disabled="1"].gov-form-select *[slot=left-icon],[disabled="1"].gov-form-select *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important}[invalid=""].gov-form-select input,[invalid=""].gov-form-select select,[invalid=""].gov-form-select textarea,[invalid=true i].gov-form-select input,[invalid=true i].gov-form-select select,[invalid=true i].gov-form-select textarea,[invalid="1"].gov-form-select input,[invalid="1"].gov-form-select select,[invalid="1"].gov-form-select textarea{border-color:var(--gov-form-state-color-error, var(--gov-color-error));color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=""].gov-form-select input::-moz-placeholder,[invalid=""].gov-form-select select::-moz-placeholder,[invalid=""].gov-form-select textarea::-moz-placeholder,[invalid=true i].gov-form-select input::-moz-placeholder,[invalid=true i].gov-form-select select::-moz-placeholder,[invalid=true i].gov-form-select textarea::-moz-placeholder,[invalid="1"].gov-form-select input::-moz-placeholder,[invalid="1"].gov-form-select select::-moz-placeholder,[invalid="1"].gov-form-select textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-select input::placeholder,[invalid=""].gov-form-select select::placeholder,[invalid=""].gov-form-select textarea::placeholder,[invalid=true i].gov-form-select input::placeholder,[invalid=true i].gov-form-select select::placeholder,[invalid=true i].gov-form-select textarea::placeholder,[invalid="1"].gov-form-select input::placeholder,[invalid="1"].gov-form-select select::placeholder,[invalid="1"].gov-form-select textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-select *[slot=left-icon],[invalid=""].gov-form-select *[slot=right-icon],[invalid=true i].gov-form-select *[slot=left-icon],[invalid=true i].gov-form-select *[slot=right-icon],[invalid="1"].gov-form-select *[slot=left-icon],[invalid="1"].gov-form-select *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error)) !important}[invalid=""].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid=true i].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[invalid="1"].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[success=""].gov-form-select *[slot=right-icon]:not(.icon-arrow),[success=true i].gov-form-select *[slot=right-icon]:not(.icon-arrow),[success="1"].gov-form-select *[slot=right-icon]:not(.icon-arrow){color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=""].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success="1"].gov-form-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[multiline=""].gov-form-select *[slot=left-icon],[multiline=""].gov-form-select *[slot=right-icon],[multiline=true i].gov-form-select *[slot=left-icon],[multiline=true i].gov-form-select *[slot=right-icon],[multiline="1"].gov-form-select *[slot=left-icon],[multiline="1"].gov-form-select *[slot=right-icon]{display:none}.gov-form-select{background:none}.gov-form-select select{-webkit-appearance:none;-moz-appearance:none}.gov-form-select select::-ms-expand{display:none}[size=s].gov-form-select *[slot=right-icon]{right:var(--gov-form-select-s-arrow-right-position, 0.75rem);width:var(--gov-form-select-s-arrow-size, 0.75rem);height:var(--gov-form-select-s-arrow-size, 0.75rem)}[size=s][invalid=""].gov-form-select .icon-arrow,[size=s][invalid=true i].gov-form-select .icon-arrow,[size=s][invalid="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-s-arrow-right-position, 0.75rem))}[size=s][success=""].gov-form-select .icon-arrow,[size=s][success=true i].gov-form-select .icon-arrow,[size=s][success="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-s-arrow-right-position, 0.75rem))}[size=m].gov-form-select *[slot=right-icon]{right:var(--gov-form-select-m-arrow-right-position, 1rem);width:var(--gov-form-select-m-arrow-size, 0.75rem);height:var(--gov-form-select-m-arrow-size, 0.75rem)}[size=m][invalid=""].gov-form-select .icon-arrow,[size=m][invalid=true i].gov-form-select .icon-arrow,[size=m][invalid="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-m-arrow-right-position, 1rem))}[size=m][success=""].gov-form-select .icon-arrow,[size=m][success=true i].gov-form-select .icon-arrow,[size=m][success="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-m-arrow-right-position, 1rem))}[size=l].gov-form-select *[slot=right-icon]{right:var(--gov-form-select-l-arrow-right-position, 1rem);width:var(--gov-form-select-l-arrow-size, 1rem);height:var(--gov-form-select-l-arrow-size, 1rem)}[size=l][invalid=""].gov-form-select .icon-arrow,[size=l][invalid=true i].gov-form-select .icon-arrow,[size=l][invalid="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-l-arrow-right-position, 1rem))}[size=l][success=""].gov-form-select .icon-arrow,[size=l][success=true i].gov-form-select .icon-arrow,[size=l][success="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-l-arrow-right-position, 1rem))}[size=xl].gov-form-select *[slot=right-icon]{right:var(--gov-form-select-xl-arrow-right-position, 1.3125rem);width:var(--gov-form-select-xl-arrow-size, 1rem);height:var(--gov-form-select-xl-arrow-size, 1rem)}[size=xl][invalid=""].gov-form-select .icon-arrow,[size=xl][invalid=true i].gov-form-select .icon-arrow,[size=xl][invalid="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-xl-arrow-right-position, 1.3125rem))}[size=xl][success=""].gov-form-select .icon-arrow,[size=xl][success=true i].gov-form-select .icon-arrow,[size=xl][success="1"].gov-form-select .icon-arrow{right:calc(3 * var(--gov-form-select-xl-arrow-right-position, 1.3125rem))}[size=s][invalid=""].gov-form-select *[slot=right-icon]~select,[size=s][invalid=""].gov-form-select *[slot=right-icon]~input,[size=s][invalid=true i].gov-form-select *[slot=right-icon]~select,[size=s][invalid=true i].gov-form-select *[slot=right-icon]~input,[size=s][invalid="1"].gov-form-select *[slot=right-icon]~select,[size=s][invalid="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-s-icon-padding, 2rem))}[size=s][success=""].gov-form-select *[slot=right-icon]~select,[size=s][success=""].gov-form-select *[slot=right-icon]~input,[size=s][success=true i].gov-form-select *[slot=right-icon]~select,[size=s][success=true i].gov-form-select *[slot=right-icon]~input,[size=s][success="1"].gov-form-select *[slot=right-icon]~select,[size=s][success="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-s-icon-padding, 2rem))}[size=m][invalid=""].gov-form-select *[slot=right-icon]~select,[size=m][invalid=""].gov-form-select *[slot=right-icon]~input,[size=m][invalid=true i].gov-form-select *[slot=right-icon]~select,[size=m][invalid=true i].gov-form-select *[slot=right-icon]~input,[size=m][invalid="1"].gov-form-select *[slot=right-icon]~select,[size=m][invalid="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-m-icon-padding, 2.5rem))}[size=m][success=""].gov-form-select *[slot=right-icon]~select,[size=m][success=""].gov-form-select *[slot=right-icon]~input,[size=m][success=true i].gov-form-select *[slot=right-icon]~select,[size=m][success=true i].gov-form-select *[slot=right-icon]~input,[size=m][success="1"].gov-form-select *[slot=right-icon]~select,[size=m][success="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-m-icon-padding, 2.5rem))}[size=l][invalid=""].gov-form-select *[slot=right-icon]~select,[size=l][invalid=""].gov-form-select *[slot=right-icon]~input,[size=l][invalid=true i].gov-form-select *[slot=right-icon]~select,[size=l][invalid=true i].gov-form-select *[slot=right-icon]~input,[size=l][invalid="1"].gov-form-select *[slot=right-icon]~select,[size=l][invalid="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-l-icon-padding, 2.5rem))}[size=l][success=""].gov-form-select *[slot=right-icon]~select,[size=l][success=""].gov-form-select *[slot=right-icon]~input,[size=l][success=true i].gov-form-select *[slot=right-icon]~select,[size=l][success=true i].gov-form-select *[slot=right-icon]~input,[size=l][success="1"].gov-form-select *[slot=right-icon]~select,[size=l][success="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-l-icon-padding, 2.5rem))}[size=xl][invalid=""].gov-form-select *[slot=right-icon]~select,[size=xl][invalid=""].gov-form-select *[slot=right-icon]~input,[size=xl][invalid=true i].gov-form-select *[slot=right-icon]~select,[size=xl][invalid=true i].gov-form-select *[slot=right-icon]~input,[size=xl][invalid="1"].gov-form-select *[slot=right-icon]~select,[size=xl][invalid="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-xl-icon-padding, 3rem))}[size=xl][success=""].gov-form-select *[slot=right-icon]~select,[size=xl][success=""].gov-form-select *[slot=right-icon]~input,[size=xl][success=true i].gov-form-select *[slot=right-icon]~select,[size=xl][success=true i].gov-form-select *[slot=right-icon]~input,[size=xl][success="1"].gov-form-select *[slot=right-icon]~select,[size=xl][success="1"].gov-form-select *[slot=right-icon]~input{padding-right:calc(2 * var(--gov-form-input-core-xl-icon-padding, 3rem))}';const y=b;const k=e(class e extends o{constructor(){super();this.__registerHost();this.govFocus=t(this,"gov-focus",7);this.govBlur=t(this,"gov-blur",7);this.govChange=t(this,"gov-change",7);this.value=undefined;this.options=undefined;this.identifier=undefined;this.variant="secondary";this.size="m";this.name=undefined;this.required=false;this.success=undefined;this.disabled=false;this.invalid=undefined;this.wcagActiveDescendant=undefined;this.wcagControls=undefined;this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.focused=undefined;this.optionsState=[];this.h=a(this.host);this.f=s(this.h);this.selectId=p("GovSelect")}validateVariant(e){f(l,e,c.root)}validateSize(e){f(n,e,c.root)}watchOptions(e){this.optionsState=z(e)}watchControlAttrs(){this.passControlAttrs()}watchValue(){this.markSelectedValue()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("invalid",g(this.invalid));this.f.passAttrToControl("success",g(this.success));this.f.passAttrToControl("disabled",g(this.disabled))}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size);this.markSelectedValue();this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required));this.f.passAttrToControl("type","select");this.optionsState=z(this.options)}async componentDidRender(){if(m()){await u(500);await this.validateWcag()}w((()=>this.markSelectedValue()))}markSelectedValue(){this.host.querySelectorAll("option").forEach((e=>{if(e.value===this.value){e.setAttribute("selected","selected")}else{e.removeAttribute("selected")}}))}render(){return i(r,{key:"0ef3419f4afce93b161ad8b71401a228ae8b9c4a",class:c.root,size:this.size,variant:this.variant},this.h.hasSlot("prefix")&&i("slot",{key:"828f069b3672d5bb766a44ef37384b9117327eab",name:"prefix"}),i("span",{key:"169ac6c9d58c88bbdcc96f36b8208ea05faa8e51",class:"element"},i("gov-icon",{key:"a2501ad9ecc603d3e52fc0143fef2ee53ae63d4d",slot:"right-icon",name:"chevron-down",class:"icon-arrow"}),this.h.hasSlot("right-icon")&&!(this.success||this.invalid)&&i("slot",{key:"97b2417a96a781620b67a557244c4c0cfa8b3669",name:"right-icon"}),this.success&&i("gov-icon",{key:"cebe7eb826cb741bae4afdbd8d9b18948c410f8c",slot:"right-icon",class:"icon-validation",name:"check-lg"}),this.invalid&&i("gov-icon",{key:"cef9b5715b1c134242f52439f65b88c7d228054f",slot:"right-icon",class:"icon-validation",name:"exclamation-lg"}),i("select",{key:"b8374d51d9a66f313db7f851446916e22debeee3",id:this.identifier||this.selectId,onFocus:this.onFocusHandler.bind(this),onChange:this.onChangeHandler.bind(this),onBlur:this.onBlurHandler.bind(this),required:this.required,name:this.name,disabled:this.disabled,ref:e=>this.selectRef=e,"aria-disabled":v(this.disabled),"aria-activedescendant":this.wcagActiveDescendant,"aria-controls":this.wcagControls,"aria-required":v(this.required),"aria-invalid":v(this.invalid),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-owns":this.wcagOwns},i("slot",{key:"5ad33b529b013a1e4846aaf3d6a778a0e7652f83"}),Array.isArray(this.optionsState)&&this.optionsState.map((e=>{var o;return i("option",{value:e.value,selected:e.value===this.value,disabled:e===null||e===void 0?void 0:e.disabled},(o=e.label)!==null&&o!==void 0?o:e.value)})))),this.h.hasSlot("sufix")&&i("slot",{key:"257ebbc1fbe845806360efbf491640c2c364d540",name:"sufix"}))}onFocusHandler(e){this.focused=true;this.govFocus.emit({component:c.root,originalEvent:e,value:this.value})}onBlurHandler(e){this.focused=false;this.govBlur.emit({component:c.root,originalEvent:e,value:this.value})}onChangeHandler(e){this.value=e.target.value;e.stopPropagation();this.govChange.emit({component:c.root,originalEvent:e,value:this.value})}async setFocus(e){return this.selectRef.focus(e)}async getRef(){return this.selectRef}async validateWcag(){d(this.wcagActiveDescendant,"wcag-active-descendant",c.root);d(this.wcagControls,"wcag-controls",c.root);d(this.wcagDescribedBy,"wcag-described-by",c.root);d(this.wcagOwns,"wcag-owns",c.root);h(this.identifier||this.selectId,this.wcagLabelledBy,c.root)}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}}static get style(){return y}},[4,"gov-form-select",{value:[1537],options:[1537],identifier:[1],variant:[1],size:[1],name:[1],required:[4],success:[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],optionsState:[32],setFocus:[64],getRef:[64],validateWcag:[64]},undefined,{variant:["validateVariant"],size:["validateSize","watchControlAttrs"],options:["watchOptions"],disabled:["watchControlAttrs"],invalid:["watchControlAttrs"],success:["watchControlAttrs"],value:["watchValue"]}]);function C(){if(typeof customElements==="undefined"){return}const e=["gov-form-select","gov-icon"];e.forEach((e=>{switch(e){case"gov-form-select":if(!customElements.get(e)){customElements.define(e,k)}break;case"gov-icon":if(!customElements.get(e)){x()}break}}))}C();export{k as G,C as d};
2
+ //# sourceMappingURL=p-5ee68c72.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["govFormSelectCss","GovFormSelectStyle0","GovFormSelect","proxyCustomElement","H","constructor","this","h","govHost","host","f","govForm","selectId","createID","validateVariant","newValue","validateProp","FormSelectVariants","FormSelectClass","root","validateSize","FormSelectSizes","watchOptions","optionsState","propsValueToArray","watchControlAttrs","passControlAttrs","watchValue","markSelectedValue","passAttrToControl","size","toBoolAttr","invalid","success","disabled","componentWillLoad","variant","passAttrToLabel","String","required","options","componentDidRender","canValidateWcagOnRender","delay","validateWcag","tick","querySelectorAll","forEach","option","value","setAttribute","removeAttribute","render","Host","key","class","hasSlot","name","slot","id","identifier","onFocus","onFocusHandler","bind","onChange","onChangeHandler","onBlur","onBlurHandler","ref","el","selectRef","toBoolAttrIfDefined","wcagActiveDescendant","wcagControls","wcagDescribedBy","wcagLabelledBy","wcagOwns","Array","isArray","map","selected","_a","label","e","focused","govFocus","emit","component","originalEvent","govBlur","target","stopPropagation","govChange","setFocus","focus","getRef","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/select/gov-form-select.scss?tag=gov-form-select","../../../packages/core/src/components/gov-form/select/gov-form-select.tsx"],"sourcesContent":["/*\n * Select\n */\n\n@import \"../select/gov-form-select-core.scss\";\n\n$class: \".gov-form-select\";\n\n#{$class} {\n\t@extend %form-select-core;\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {govForm} from '../../../helpers/Dom/form'\nimport {GovForm} from '../../../helpers/Dom/form.types'\nimport {govHost, toBoolAttr, toBoolAttrIfDefined} from '../../../helpers/Dom/template'\nimport {GovHost} from '../../../helpers/Dom/template.types'\nimport {canValidateWcagOnRender} from '../../../helpers/Dom/win'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {validateWcagLabelFor, validateWcagRef} from '../../../helpers/Validate/wcag'\nimport {createID} from '../../../utils/string.utils'\nimport {delay} from '../../../utils/utils'\nimport {\n\tFormSelectClass,\n\tFormSelectSizes,\n\tFormSelectSizesType,\n\tFormSelectVariants,\n\tFormSelectVariantType\n} from './constants'\nimport {FormSelectEvent, FormSelectOption} from './gov-form-select.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport {tick} from \"../../../utils/stencil.utils\";\n\n@Component({\n\ttag: 'gov-form-select',\n\tstyleUrl: 'gov-form-select.scss',\n})\nexport class GovFormSelect {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate selectRef?: HTMLSelectElement\n\n\tprivate readonly selectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.f = govForm(this.h)\n\t\tthis.selectId = createID('GovSelect')\n\t}\n\n\t@Element() host: HTMLGovFormSelectElement\n\t/**\n\t * Value of select\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Options of select\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | FormSelectOption[]\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Style variation of the form select.\n\t */\n\t@Prop() readonly variant?: FormSelectVariantType = 'secondary'\n\t/**\n\t * Select’s size.\n\t */\n\t@Prop() readonly size?: FormSelectSizesType = 'm'\n\t/**\n\t * Name of the select.\n\t */\n\t@Prop() readonly name: string\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 * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Makes the select component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\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 * Indicates the id of a related component’s visually focused element.\n\t */\n\t@Prop({attribute: 'wcag-active-descendant'}) readonly wcagActiveDescendant: string\n\t/**\n\t * Use this prop to add an aria-controls attribute. Use the attribute to indicate the id of a component controlled by this component.\n\t */\n\t@Prop({attribute: 'wcag-controls'}) readonly wcagControls: string\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 * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({attribute: 'wcag-owns'}) readonly wcagOwns: string\n\t/**\n\t * Emitted when the select has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormSelectEvent>\n\t/**\n\t * Emitted when the select change value.\n\t */\n\t@Event({eventName: 'gov-change'}) govChange: EventEmitter<FormSelectEvent>\n\t@State() focused: boolean\n\t@State() optionsState: FormSelectOption[] = []\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormSelectVariants, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormSelectSizes, newValue, FormSelectClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | FormSelectOption[]): void {\n\t\tthis.optionsState = propsValueToArray(newValue)\n\t}\n\n\t@Watch('disabled')\n\t@Watch('invalid')\n\t@Watch('success')\n\t@Watch('size')\n\twatchControlAttrs(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\t@Watch('value')\n\twatchValue(): void {\n\t\tthis.markSelectedValue()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl('size', this.size)\n\t\tthis.f.passAttrToControl('invalid', toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('success', toBoolAttr(this.success))\n\t\tthis.f.passAttrToControl('disabled', toBoolAttr(this.disabled))\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\n\t\tthis.markSelectedValue()\n\t\tthis.passControlAttrs()\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t\tthis.f.passAttrToControl('type', 'select')\n\t\tthis.optionsState = propsValueToArray(this.options)\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\ttick(() => this.markSelectedValue())\n\t}\n\n\tprivate markSelectedValue() {\n\t\tthis.host.querySelectorAll('option').forEach((option: HTMLOptionElement) => {\n\t\t\tif (option.value === this.value) {\n\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t} else {\n\t\t\t\toption.removeAttribute('selected')\n\t\t\t}\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSelectClass.root} size={this.size} variant={this.variant}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t<gov-icon slot=\"right-icon\" name=\"chevron-down\" class=\"icon-arrow\"></gov-icon>\n\t\t\t\t\t{this.h.hasSlot('right-icon') && !(this.success || this.invalid) && <slot name=\"right-icon\"/>}\n\t\t\t\t\t{this.success && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<select\n\t\t\t\t\t\tid={this.identifier || this.selectId}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonChange={this.onChangeHandler.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\tname={this.name}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tref={el => (this.selectRef = el as HTMLSelectElement)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\t\taria-controls={this.wcagControls}\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-owns={this.wcagOwns}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t{Array.isArray(this.optionsState) && this.optionsState.map((option) => {\n\t\t\t\t\t\t\treturn (<option value={option.value} selected={option.value === this.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={option?.disabled}>{option.label ?? option.value}</option>)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</select>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\tprivate onChangeHandler(e: Event) {\n\t\tthis.value = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.govChange.emit({\n\t\t\tcomponent: FormSelectClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tvalue: this.value,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.selectRef.focus(options)\n\t}\n\n\t/**\n\t * Returns an instance of the native html select element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLSelectElement> {\n\t\treturn this.selectRef\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.wcagActiveDescendant, 'wcag-active-descendant', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagControls, 'wcag-controls', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', FormSelectClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, 'wcag-owns', FormSelectClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.selectId, this.wcagLabelledBy, FormSelectClass.root)\n\t}\n}\n"],"mappings":"kdAAA,MAAMA,EAAmB,kxlBACzB,MAAAC,EAAeD,E,MCwBFE,EAAaC,EAAA,MAAAD,UAAAE,EAOzB,WAAAC,G,6NAsBmD,Y,UAIL,I,kCAST,M,qCASA,M,qNAsCO,GAjF3CC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,EAAIC,EAAQL,KAAKC,GACtBD,KAAKM,SAAWC,EAAS,Y,CAkF1B,eAAAC,CAAgBC,GACfC,EAAaC,EAAoBF,EAAUG,EAAgBC,K,CAI5D,YAAAC,CAAaL,GACZC,EAAaK,EAAiBN,EAAUG,EAAgBC,K,CAIzD,YAAAG,CAAaP,GACZT,KAAKiB,aAAeC,EAAkBT,E,CAOvC,iBAAAU,GACCnB,KAAKoB,kB,CAIN,UAAAC,GACCrB,KAAKsB,mB,CAGE,gBAAAF,GACPpB,KAAKI,EAAEmB,kBAAkB,OAAQvB,KAAKwB,MACtCxB,KAAKI,EAAEmB,kBAAkB,UAAWE,EAAWzB,KAAK0B,UACpD1B,KAAKI,EAAEmB,kBAAkB,UAAWE,EAAWzB,KAAK2B,UACpD3B,KAAKI,EAAEmB,kBAAkB,WAAYE,EAAWzB,KAAK4B,U,CAGtD,iBAAAC,GACC7B,KAAKQ,gBAAgBR,KAAK8B,SAC1B9B,KAAKc,aAAad,KAAKwB,MAEvBxB,KAAKsB,oBACLtB,KAAKoB,mBACLpB,KAAKI,EAAE2B,gBAAgB,WAAYC,OAAOhC,KAAKiC,WAC/CjC,KAAKI,EAAEmB,kBAAkB,OAAQ,UACjCvB,KAAKiB,aAAeC,EAAkBlB,KAAKkC,Q,CAG5C,wBAAMC,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACNrC,KAAKsC,c,CAEZC,GAAK,IAAMvC,KAAKsB,qB,CAGT,iBAAAA,GACPtB,KAAKG,KAAKqC,iBAAiB,UAAUC,SAASC,IAC7C,GAAIA,EAAOC,QAAU3C,KAAK2C,MAAO,CAChCD,EAAOE,aAAa,WAAY,W,KAC1B,CACNF,EAAOG,gBAAgB,W,KAK1B,MAAAC,GACC,OACC7C,EAAC8C,EAAI,CAAAC,IAAA,2CAACC,MAAOrC,EAAgBC,KAAMW,KAAMxB,KAAKwB,KAAMM,QAAS9B,KAAK8B,SAChE9B,KAAKC,EAAEiD,QAAQ,WAAajD,EAAA,QAAA+C,IAAA,2CAAMG,KAAK,WACxClD,EAAA,QAAA+C,IAAA,2CAAMC,MAAM,WACXhD,EAAA,YAAA+C,IAAA,2CAAUI,KAAK,aAAaD,KAAK,eAAeF,MAAM,eACrDjD,KAAKC,EAAEiD,QAAQ,iBAAmBlD,KAAK2B,SAAW3B,KAAK0B,UAAYzB,EAAA,QAAA+C,IAAA,2CAAMG,KAAK,eAC9EnD,KAAK2B,SAAW1B,EAAA,YAAA+C,IAAA,2CAAUI,KAAK,aAAaH,MAAM,kBAAkBE,KAAK,aACzEnD,KAAK0B,SAAWzB,EAAA,YAAA+C,IAAA,2CAAUI,KAAK,aAAaH,MAAM,kBAAkBE,KAAK,mBAC1ElD,EAAA,UAAA+C,IAAA,2CACCK,GAAIrD,KAAKsD,YAActD,KAAKM,SAC5BiD,QAASvD,KAAKwD,eAAeC,KAAKzD,MAClC0D,SAAU1D,KAAK2D,gBAAgBF,KAAKzD,MACpC4D,OAAQ5D,KAAK6D,cAAcJ,KAAKzD,MAChCiC,SAAUjC,KAAKiC,SACfkB,KAAMnD,KAAKmD,KACXvB,SAAU5B,KAAK4B,SACfkC,IAAKC,GAAO/D,KAAKgE,UAAYD,EAAwB,gBACtCE,EAAoBjE,KAAK4B,UAAS,wBAC1B5B,KAAKkE,qBAAoB,gBACjClE,KAAKmE,aAAY,gBACjBF,EAAoBjE,KAAKiC,UAAS,eACnCgC,EAAoBjE,KAAK0B,SAAQ,mBAC7B1B,KAAKoE,gBAAe,kBACrBpE,KAAKqE,eAAc,YACzBrE,KAAKsE,UAEhBrE,EAAA,QAAA+C,IAAA,6CACCuB,MAAMC,QAAQxE,KAAKiB,eAAiBjB,KAAKiB,aAAawD,KAAK/B,I,MAC3D,OAAQzC,EAAA,UAAQ0C,MAAOD,EAAOC,MAAO+B,SAAUhC,EAAOC,QAAU3C,KAAK2C,MAC7Df,SAAUc,IAAM,MAANA,SAAM,SAANA,EAAQd,WAAW+C,EAAAjC,EAAOkC,SAAK,MAAAD,SAAA,EAAAA,EAAIjC,EAAOC,MAAe,MAI7E3C,KAAKC,EAAEiD,QAAQ,UAAYjD,EAAA,QAAA+C,IAAA,2CAAMG,KAAK,U,CAKlC,cAAAK,CAAeqB,GACtB7E,KAAK8E,QAAU,KACf9E,KAAK+E,SAASC,KAAK,CAClBC,UAAWrE,EAAgBC,KAC3BqE,cAAeL,EACflC,MAAO3C,KAAK2C,O,CAIN,aAAAkB,CAAcgB,GACrB7E,KAAK8E,QAAU,MACf9E,KAAKmF,QAAQH,KAAK,CACjBC,UAAWrE,EAAgBC,KAC3BqE,cAAeL,EACflC,MAAO3C,KAAK2C,O,CAIN,eAAAgB,CAAgBkB,GACvB7E,KAAK2C,MAASkC,EAAEO,OAA6BzC,MAC7CkC,EAAEQ,kBACFrF,KAAKsF,UAAUN,KAAK,CACnBC,UAAWrE,EAAgBC,KAC3BqE,cAAeL,EACflC,MAAO3C,KAAK2C,O,CAQd,cAAM4C,CAASrD,GACd,OAAOlC,KAAKgE,UAAUwB,MAAMtD,E,CAO7B,YAAMuD,GACL,OAAOzF,KAAKgE,S,CAOb,kBAAM1B,GACLoD,EAAgB1F,KAAKkE,qBAAsB,yBAA0BtD,EAAgBC,MACrF6E,EAAgB1F,KAAKmE,aAAc,gBAAiBvD,EAAgBC,MACpE6E,EAAgB1F,KAAKoE,gBAAiB,oBAAqBxD,EAAgBC,MAC3E6E,EAAgB1F,KAAKsE,SAAU,YAAa1D,EAAgBC,MAC5D8E,EAAqB3F,KAAKsD,YAActD,KAAKM,SAAUN,KAAKqE,eAAgBzD,EAAgBC,K","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,c as i,h as s,d as o}from"./p-d6759ac3.js";import{a}from"./p-d687df8f.js";import{v as n}from"./p-344c72d7.js";import{c as r}from"./p-95d41a3b.js";import{d as h,t as l,h as c}from"./p-e0e2e9c1.js";import{F as m,a as d,b as p}from"./p-77a6e3be.js";import{p as u}from"./p-3f704a40.js";import{d as g}from"./p-8ac22724.js";import{d as f}from"./p-fd554fb4.js";const v='.gov-form-autocomplete__list{margin:0;padding:0}.gov-form-autocomplete__list>.gov-form-autocomplete__item{margin:0;padding:0;background:none}.gov-form-autocomplete__list>.gov-form-autocomplete__item::before{display:none}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@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-autocomplete{position:relative;display:block;width:100%}.gov-form-autocomplete__list{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);position:absolute;top:100%;right:0;left:0;z-index:5;max-height:14.0625rem;margin-top:0.5rem;border:var(--gov-autocomplete-item-hover, 0.0625rem solid var(--gov-color-secondary-500));border-radius:var(--gov-border-radius, 0.1875rem);background:var(--gov-autocomplete-bg, var(--gov-color-neutral-white));overflow-x:hidden;overflow-y:auto;overscroll-behavior:none}.gov-form-autocomplete__list>.gov-form-autocomplete__item{padding:0.75rem 0.5rem;cursor:pointer}.gov-form-autocomplete__item--empty,.gov-form-autocomplete__item--loading{padding:0.75rem 0.5rem;color:var(--gov-autocomplete-item-disable-color, var(--gov-color-secondary-600))}.gov-form-autocomplete__item--empty .gov-icon,.gov-form-autocomplete__item--empty .gov-spin-animation,.gov-form-autocomplete__item--loading .gov-icon,.gov-form-autocomplete__item--loading .gov-spin-animation{width:12px;height:12px}.gov-form-autocomplete__list:empty{display:none}.gov-form-autocomplete__item[aria-selected=""],.gov-form-autocomplete__item[aria-selected=true i],.gov-form-autocomplete__item[aria-selected="1"]{background:var(--gov-autocomplete-item-select, var(--gov-color-secondary-400))}@media not all and (pointer: coarse){.gov-form-autocomplete__item:hover{background:var(--gov-autocomplete-item-hover, var(--gov-color-primary-100))}}';const y=v;const b=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govSelect=i(this,"gov-select",7);this.templateResolver=t=>t[this.nameKey];this.value="";this.options=undefined;this.identifier=undefined;this.variant=undefined;this.success=undefined;this.size="m";this.nameKey="name";this.name=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.invalid=undefined;this.minlength=3;this.maxlength=undefined;this.throttleTime=200;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.messageLoading="Načítám...";this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.focused=undefined;this.processing=false;this.arrowCounter=-1;this.list=[];this.listBoxId=r("GovListBox")}validateVariant(t){n(d,t,m.root)}validateSize(t){n(p,t,m.root)}watchOptions(t){this.setOptions(u(t)).catch()}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await h(200);const t=this.listRef.offsetHeight;const e=this.listRef.querySelector('li[aria-selected="true"]');if(e&&t){const t=e.offsetTop;this.listRef.scrollTo({top:t,behavior:"smooth"})}}doSearch(){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((t=>this.list=t)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}clearList(){const t=u(this.options);if(t.length===0){this.list=[]}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size)}render(){return s(o,{key:"3ade1a0f94261a8530ce85af0a67f0ce5ed067d3",class:m.root,size:this.size,variant:this.variant},s("gov-form-input",{key:"ac6392ffdb77783b45b774dbb00edca83de7370e",placeholder:this.placeholder,name:this.name,disabled:this.disabled,readonly:this.readonly,autocomplete:false,size:this.size,variant:this.variant,required:this.required,invalid:this.invalid,success:this.success,role:"searchbox",value:this.value,minlength:this.minlength,maxlength:this.maxlength,"on-gov-input":l(this.onInputHandler.bind(this),this.throttleTime),"on-gov-keyup":this.onKeyUpHandler.bind(this),"on-gov-keydown":this.onKeyDownHandler.bind(this),"on-gov-focus":this.onFocusHandler.bind(this),"on-gov-blur":this.onBlurHandler.bind(this),wcagAutocomplete:"list",wcagDescribedBy:this.wcagDescribedBy,wcagLabelledBy:this.wcagLabelledBy,wcagOwns:[this.listBoxId,this.wcagOwns].join(" "),wcagExpanded:this.list.length&&this.focused,ref:t=>this.inputRef=t},s("slot",{key:"adb1c0a349ac9f12e0fb7d2790516a1e7a4cf437",slot:"right-icon",name:"right-icon"})),s("ul",{key:"9d11566e2fda522c662d8af6973cd5f4d155c1ad",class:m.list,role:"listbox","aria-hidden":a(!this.focused),hidden:!this.focused,id:this.listBoxId,ref:t=>this.listRef=t},this.focused&&this.list.length===0&&this.processing===false&&this.isValueAccepted&&this.messageEmpty?s("li",{class:m.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?s("li",{class:m.loading},s("gov-icon",{name:"loader",class:"gov-spin-animation"})," ",this.messageLoading):null,this.focused?this.list.map(((t,e)=>{const i=this.arrowCounter===e;return s("li",{class:m.item,innerHTML:this.templateResolver(t,i),role:"option","aria-posinset":e,tabindex:i?0:-1,"aria-setsize":this.list.length,onTouchStart:t=>this.onSelectHandler(t,e),onMouseDown:t=>this.onSelectHandler(t,e),"aria-selected":a(i)})})):null))}onFocusHandler(t){this.focused=true;this.arrowCounter=-1;if(this.isValueAccepted&&this.searchCallback){this.doSearch()}t.stopPropagation();this.govFocus.emit({originalEvent:t,component:m.root,value:this.value,selected:null})}onBlurHandler(t){this.focused=false;this.clearList();this.arrowCounter=-1;t.stopPropagation();this.govBlur.emit({originalEvent:t,component:m.root,value:this.value,selected:null})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({originalEvent:t,component:m.root,value:this.value,selected:null});this.doSearch()}onSelectHandler(t,e=-1){let i=null;if(e>-1){i=this.list[e]}else if(c(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:m.root,value:this.value,selected:i,originalEvent:t});this.clearList();if(c(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(t){const e=t.detail.originalEvent;t.stopPropagation();e.stopPropagation();if(e.keyCode===38)this.onArrowUp();else if(e.keyCode===40)this.onArrowDown();else if(e.keyCode===13){t.preventDefault();e.preventDefault();this.onSelectHandler(t)}}onKeyDownHandler(t){const e=t.detail.originalEvent;t.stopPropagation();e.stopPropagation();if(e.keyCode===13){t.preventDefault();e.preventDefault()}}async setFocus(t){return this.inputRef.focus(t)}async setBlur(){return this.inputRef.blur()}async setOptions(t){this.list=Array.isArray(t)?t:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(t){this.processing=t}async setSearchCallback(t){this.searchCallback=t}async setTemplateResolver(t){this.templateResolver=t}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize"],options:["watchOptions"]}}static get style(){return y}},[4,"gov-form-autocomplete",{value:[1537],options:[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],throttleTime:[2,"throttle-time"],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],setBlur:[64],setOptions:[64],clearValue:[64],setProcessing:[64],setSearchCallback:[64],setTemplateResolver:[64]},undefined,{variant:["validateVariant"],size:["validateSize"],options:["watchOptions"]}]);function _(){if(typeof customElements==="undefined"){return}const t=["gov-form-autocomplete","gov-form-input","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-autocomplete":if(!customElements.get(t)){customElements.define(t,b)}break;case"gov-form-input":if(!customElements.get(t)){g()}break;case"gov-icon":if(!customElements.get(t)){f()}break}}))}_();export{b as G,_ as d};
2
- //# sourceMappingURL=p-483d079f.js.map
1
+ import{p as t,H as e,c as i,h as s,d as o}from"./p-d6759ac3.js";import{a}from"./p-d687df8f.js";import{v as n}from"./p-344c72d7.js";import{c as r}from"./p-95d41a3b.js";import{d as h,t as l,h as c}from"./p-e0e2e9c1.js";import{F as m,a as d,b as p}from"./p-77a6e3be.js";import{p as u}from"./p-3f704a40.js";import{d as g}from"./p-37b342d0.js";import{d as f}from"./p-4f694d25.js";const v='.gov-form-autocomplete__list{margin:0;padding:0}.gov-form-autocomplete__list>.gov-form-autocomplete__item{margin:0;padding:0;background:none}.gov-form-autocomplete__list>.gov-form-autocomplete__item::before{display:none}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@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-autocomplete{position:relative;display:block;width:100%}.gov-form-autocomplete__list{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);position:absolute;top:100%;right:0;left:0;z-index:5;max-height:14.0625rem;margin-top:0.5rem;border:var(--gov-autocomplete-item-hover, 0.0625rem solid var(--gov-color-secondary-500));border-radius:var(--gov-border-radius, 0.1875rem);background:var(--gov-autocomplete-bg, var(--gov-color-neutral-white));overflow-x:hidden;overflow-y:auto;overscroll-behavior:none}.gov-form-autocomplete__list>.gov-form-autocomplete__item{padding:0.75rem 0.5rem;cursor:pointer}.gov-form-autocomplete__item--empty,.gov-form-autocomplete__item--loading{padding:0.75rem 0.5rem;color:var(--gov-autocomplete-item-disable-color, var(--gov-color-secondary-600))}.gov-form-autocomplete__item--empty .gov-icon,.gov-form-autocomplete__item--empty .gov-spin-animation,.gov-form-autocomplete__item--loading .gov-icon,.gov-form-autocomplete__item--loading .gov-spin-animation{width:12px;height:12px}.gov-form-autocomplete__list:empty{display:none}.gov-form-autocomplete__item[aria-selected=""],.gov-form-autocomplete__item[aria-selected=true i],.gov-form-autocomplete__item[aria-selected="1"]{background:var(--gov-autocomplete-item-select, var(--gov-color-secondary-400))}@media not all and (pointer: coarse){.gov-form-autocomplete__item:hover{background:var(--gov-autocomplete-item-hover, var(--gov-color-primary-100))}}';const y=v;const b=t(class t extends e{constructor(){super();this.__registerHost();this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govSelect=i(this,"gov-select",7);this.templateResolver=t=>t[this.nameKey];this.value="";this.options=undefined;this.identifier=undefined;this.variant=undefined;this.success=undefined;this.size="m";this.nameKey="name";this.name=undefined;this.required=false;this.disabled=false;this.placeholder=undefined;this.readonly=undefined;this.invalid=undefined;this.minlength=3;this.maxlength=undefined;this.throttleTime=200;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.messageLoading="Načítám...";this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.focused=undefined;this.processing=false;this.arrowCounter=-1;this.list=[];this.listBoxId=r("GovListBox")}validateVariant(t){n(d,t,m.root)}validateSize(t){n(p,t,m.root)}watchOptions(t){this.setOptions(u(t)).catch()}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await h(200);const t=this.listRef.offsetHeight;const e=this.listRef.querySelector('li[aria-selected="true"]');if(e&&t){const t=e.offsetTop;this.listRef.scrollTo({top:t,behavior:"smooth"})}}doSearch(){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}if(this.searchCallback){this.processing=true;this.searchCallback(this.value).then((t=>this.list=t)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}))}}clearList(){const t=u(this.options);if(t.length===0){this.list=[]}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size)}render(){return s(o,{key:"3ade1a0f94261a8530ce85af0a67f0ce5ed067d3",class:m.root,size:this.size,variant:this.variant},s("gov-form-input",{key:"ac6392ffdb77783b45b774dbb00edca83de7370e",placeholder:this.placeholder,name:this.name,disabled:this.disabled,readonly:this.readonly,autocomplete:false,size:this.size,variant:this.variant,required:this.required,invalid:this.invalid,success:this.success,role:"searchbox",value:this.value,minlength:this.minlength,maxlength:this.maxlength,"on-gov-input":l(this.onInputHandler.bind(this),this.throttleTime),"on-gov-keyup":this.onKeyUpHandler.bind(this),"on-gov-keydown":this.onKeyDownHandler.bind(this),"on-gov-focus":this.onFocusHandler.bind(this),"on-gov-blur":this.onBlurHandler.bind(this),wcagAutocomplete:"list",wcagDescribedBy:this.wcagDescribedBy,wcagLabelledBy:this.wcagLabelledBy,wcagOwns:[this.listBoxId,this.wcagOwns].join(" "),wcagExpanded:this.list.length&&this.focused,ref:t=>this.inputRef=t},s("slot",{key:"adb1c0a349ac9f12e0fb7d2790516a1e7a4cf437",slot:"right-icon",name:"right-icon"})),s("ul",{key:"9d11566e2fda522c662d8af6973cd5f4d155c1ad",class:m.list,role:"listbox","aria-hidden":a(!this.focused),hidden:!this.focused,id:this.listBoxId,ref:t=>this.listRef=t},this.focused&&this.list.length===0&&this.processing===false&&this.isValueAccepted&&this.messageEmpty?s("li",{class:m.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?s("li",{class:m.loading},s("gov-icon",{name:"loader",class:"gov-spin-animation"})," ",this.messageLoading):null,this.focused?this.list.map(((t,e)=>{const i=this.arrowCounter===e;return s("li",{class:m.item,innerHTML:this.templateResolver(t,i),role:"option","aria-posinset":e,tabindex:i?0:-1,"aria-setsize":this.list.length,onTouchStart:t=>this.onSelectHandler(t,e),onMouseDown:t=>this.onSelectHandler(t,e),"aria-selected":a(i)})})):null))}onFocusHandler(t){this.focused=true;this.arrowCounter=-1;if(this.isValueAccepted&&this.searchCallback){this.doSearch()}t.stopPropagation();this.govFocus.emit({originalEvent:t,component:m.root,value:this.value,selected:null})}onBlurHandler(t){this.focused=false;this.clearList();this.arrowCounter=-1;t.stopPropagation();this.govBlur.emit({originalEvent:t,component:m.root,value:this.value,selected:null})}onInputHandler(t){this.value=t.target.value;t.stopPropagation();this.govInput.emit({originalEvent:t,component:m.root,value:this.value,selected:null});this.doSearch()}onSelectHandler(t,e=-1){let i=null;if(e>-1){i=this.list[e]}else if(c(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:m.root,value:this.value,selected:i,originalEvent:t});this.clearList();if(c(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(t){const e=t.detail.originalEvent;t.stopPropagation();e.stopPropagation();if(e.keyCode===38)this.onArrowUp();else if(e.keyCode===40)this.onArrowDown();else if(e.keyCode===13){t.preventDefault();e.preventDefault();this.onSelectHandler(t)}}onKeyDownHandler(t){const e=t.detail.originalEvent;t.stopPropagation();e.stopPropagation();if(e.keyCode===13){t.preventDefault();e.preventDefault()}}async setFocus(t){return this.inputRef.focus(t)}async setBlur(){return this.inputRef.blur()}async setOptions(t){this.list=Array.isArray(t)?t:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(t){this.processing=t}async setSearchCallback(t){this.searchCallback=t}async setTemplateResolver(t){this.templateResolver=t}get host(){return this}static get watchers(){return{variant:["validateVariant"],size:["validateSize"],options:["watchOptions"]}}static get style(){return y}},[4,"gov-form-autocomplete",{value:[1537],options:[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],throttleTime:[2,"throttle-time"],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],setBlur:[64],setOptions:[64],clearValue:[64],setProcessing:[64],setSearchCallback:[64],setTemplateResolver:[64]},undefined,{variant:["validateVariant"],size:["validateSize"],options:["watchOptions"]}]);function _(){if(typeof customElements==="undefined"){return}const t=["gov-form-autocomplete","gov-form-input","gov-icon"];t.forEach((t=>{switch(t){case"gov-form-autocomplete":if(!customElements.get(t)){customElements.define(t,b)}break;case"gov-form-input":if(!customElements.get(t)){g()}break;case"gov-icon":if(!customElements.get(t)){f()}break}}))}_();export{b as G,_ as d};
2
+ //# sourceMappingURL=p-701f03e1.js.map