@gov-design-system-ce/components 0.0.56 → 0.0.57

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 (189) hide show
  1. package/dist/cjs/gov-accordion-item.cjs.entry.js +1 -1
  2. package/dist/cjs/gov-accordion-item.cjs.entry.js.map +1 -1
  3. package/dist/cjs/gov-app.cjs.entry.js +71 -6
  4. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  5. package/dist/cjs/gov-badge.cjs.entry.js +1 -1
  6. package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
  7. package/dist/cjs/gov-button.cjs.entry.js +1 -1
  8. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  9. package/dist/cjs/gov-form-checkbox.cjs.entry.js +1 -1
  10. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  11. package/dist/cjs/gov-form-input.cjs.entry.js +1 -1
  12. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  13. package/dist/cjs/gov-form-multi-select.cjs.entry.js +1 -1
  14. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  15. package/dist/cjs/gov-form-radio.cjs.entry.js +1 -1
  16. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  17. package/dist/cjs/gov-form-select.cjs.entry.js +2 -2
  18. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  19. package/dist/cjs/gov-form-switch.cjs.entry.js +1 -1
  20. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  21. package/dist/cjs/gov-icon.cjs.entry.js +2 -2
  22. package/dist/cjs/gov-icon.cjs.entry.js.map +1 -1
  23. package/dist/cjs/gov-modal.cjs.entry.js +1 -1
  24. package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
  25. package/dist/cjs/gov-prompt.cjs.entry.js +1 -1
  26. package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
  27. package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
  28. package/dist/cjs/gov-stepper-item.cjs.entry.js.map +1 -1
  29. package/dist/cjs/gov-wizard-item.cjs.entry.js +1 -1
  30. package/dist/cjs/gov-wizard-item.cjs.entry.js.map +1 -1
  31. package/dist/collection/components/gov-accordion/gov-accordion-item.css +1 -0
  32. package/dist/collection/components/gov-badge/gov-badge.css +12 -12
  33. package/dist/collection/components/gov-button/default/gov-button.css +12 -12
  34. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +1 -0
  35. package/dist/collection/components/gov-form/input/gov-form-input.css +17 -7
  36. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +32 -11
  37. package/dist/collection/components/gov-form/radio/gov-form-radio.css +1 -0
  38. package/dist/collection/components/gov-form/select/gov-form-select.css +29 -11
  39. package/dist/collection/components/gov-form/select/gov-form-select.js +1 -1
  40. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  41. package/dist/collection/components/gov-form/switch/gov-form-switch.css +4 -8
  42. package/dist/collection/components/gov-icon/gov-icon.css +6 -2
  43. package/dist/collection/components/gov-icon/list.js +10 -0
  44. package/dist/collection/components/gov-icon/list.js.map +1 -1
  45. package/dist/collection/components/gov-modal/gov-modal.css +0 -4
  46. package/dist/collection/components/gov-promp/gov-prompt.css +0 -4
  47. package/dist/collection/components/gov-stepper/gov-stepper-item.css +0 -1
  48. package/dist/collection/components/gov-wizard/gov-wizard-item.css +3 -1
  49. package/dist/collection/pages/Accordion.js +2 -2
  50. package/dist/collection/pages/Accordion.js.map +1 -1
  51. package/dist/collection/pages/Forms.js +69 -4
  52. package/dist/collection/pages/Forms.js.map +1 -1
  53. package/dist/components/gov-accordion-item.js +1 -1
  54. package/dist/components/gov-accordion-item.js.map +1 -1
  55. package/dist/components/gov-alert.js +1 -1
  56. package/dist/components/gov-app.js +1 -1
  57. package/dist/components/gov-app.js.map +1 -1
  58. package/dist/components/gov-attachments-item.js +1 -1
  59. package/dist/components/gov-badge.js +1 -1
  60. package/dist/components/gov-button.js +1 -1
  61. package/dist/components/gov-card.js +1 -1
  62. package/dist/components/gov-form-autocomplete.js +1 -1
  63. package/dist/components/gov-form-checkbox.js +1 -1
  64. package/dist/components/gov-form-checkbox.js.map +1 -1
  65. package/dist/components/gov-form-file.js +1 -1
  66. package/dist/components/gov-form-input.js +1 -1
  67. package/dist/components/gov-form-multi-select.js +1 -1
  68. package/dist/components/gov-form-multi-select.js.map +1 -1
  69. package/dist/components/gov-form-radio.js +1 -1
  70. package/dist/components/gov-form-radio.js.map +1 -1
  71. package/dist/components/gov-form-select.js +1 -1
  72. package/dist/components/gov-form-switch.js +1 -1
  73. package/dist/components/gov-form-switch.js.map +1 -1
  74. package/dist/components/gov-icon.js +1 -1
  75. package/dist/components/gov-loading.js +1 -1
  76. package/dist/components/gov-modal.js +1 -1
  77. package/dist/components/gov-modal.js.map +1 -1
  78. package/dist/components/gov-pagination.js +1 -1
  79. package/dist/components/gov-prompt.js +1 -1
  80. package/dist/components/gov-prompt.js.map +1 -1
  81. package/dist/components/gov-side-nav-item.js +1 -1
  82. package/dist/components/gov-stepper-item.js +1 -1
  83. package/dist/components/gov-stepper-item.js.map +1 -1
  84. package/dist/components/gov-tabs.js +1 -1
  85. package/dist/components/gov-tile.js +1 -1
  86. package/dist/components/gov-toast.js +1 -1
  87. package/dist/components/gov-wizard-item.js +1 -1
  88. package/dist/components/gov-wizard-item.js.map +1 -1
  89. package/dist/components/{p-a2e601c5.js → p-0378da4d.js} +2 -2
  90. package/dist/components/{p-a2e601c5.js.map → p-0378da4d.js.map} +1 -1
  91. package/dist/components/p-1a0f8d13.js +2 -0
  92. package/dist/components/p-1a0f8d13.js.map +1 -0
  93. package/dist/components/p-80f0ed50.js +2 -0
  94. package/dist/components/{p-04bfe959.js.map → p-80f0ed50.js.map} +1 -1
  95. package/dist/components/{p-594ba760.js → p-839e8965.js} +2 -2
  96. package/dist/components/{p-6ca0c464.js → p-8449a4cf.js} +2 -2
  97. package/dist/components/{p-6ca0c464.js.map → p-8449a4cf.js.map} +1 -1
  98. package/dist/components/p-8d9c2f0a.js +2 -0
  99. package/dist/components/{p-2753b6e4.js.map → p-8d9c2f0a.js.map} +1 -1
  100. package/dist/components/{p-f516d8f6.js → p-d4f30d9b.js} +2 -2
  101. package/dist/core/core.esm.js +1 -1
  102. package/dist/core/p-2944bf77.entry.js +2 -0
  103. package/dist/core/{p-64f7e661.entry.js.map → p-2944bf77.entry.js.map} +1 -1
  104. package/dist/core/p-4c79a97a.entry.js +2 -0
  105. package/dist/core/p-4c79a97a.entry.js.map +1 -0
  106. package/dist/core/p-62e9bbf3.entry.js +2 -0
  107. package/dist/core/p-62e9bbf3.entry.js.map +1 -0
  108. package/dist/core/p-667dc3de.entry.js +2 -0
  109. package/dist/core/p-667dc3de.entry.js.map +1 -0
  110. package/dist/core/p-69f944d1.entry.js +2 -0
  111. package/dist/core/p-69f944d1.entry.js.map +1 -0
  112. package/dist/core/{p-bfb4d904.entry.js → p-6a65af35.entry.js} +2 -2
  113. package/dist/core/{p-bfb4d904.entry.js.map → p-6a65af35.entry.js.map} +1 -1
  114. package/dist/core/p-85258200.entry.js +2 -0
  115. package/dist/core/{p-f0a5847a.entry.js.map → p-85258200.entry.js.map} +1 -1
  116. package/dist/core/p-8fce08d1.entry.js +2 -0
  117. package/dist/core/p-8fce08d1.entry.js.map +1 -0
  118. package/dist/core/p-9bfab069.entry.js +2 -0
  119. package/dist/core/{p-fc853777.entry.js.map → p-9bfab069.entry.js.map} +1 -1
  120. package/dist/core/p-a85f4a62.entry.js +2 -0
  121. package/dist/core/p-a85f4a62.entry.js.map +1 -0
  122. package/dist/core/{p-accf8575.entry.js → p-af646ce2.entry.js} +2 -2
  123. package/dist/core/{p-accf8575.entry.js.map → p-af646ce2.entry.js.map} +1 -1
  124. package/dist/core/p-cacd0fed.entry.js +2 -0
  125. package/dist/core/{p-22a86871.entry.js.map → p-cacd0fed.entry.js.map} +1 -1
  126. package/dist/core/p-d4cfa93a.entry.js +2 -0
  127. package/dist/core/{p-81643870.entry.js.map → p-d4cfa93a.entry.js.map} +1 -1
  128. package/dist/core/p-de5c9181.entry.js +2 -0
  129. package/dist/core/p-de5c9181.entry.js.map +1 -0
  130. package/dist/core/p-f8252fea.entry.js +2 -0
  131. package/dist/core/{p-ea4459ae.entry.js.map → p-f8252fea.entry.js.map} +1 -1
  132. package/dist/esm/gov-accordion-item.entry.js +1 -1
  133. package/dist/esm/gov-accordion-item.entry.js.map +1 -1
  134. package/dist/esm/gov-app.entry.js +71 -6
  135. package/dist/esm/gov-app.entry.js.map +1 -1
  136. package/dist/esm/gov-badge.entry.js +1 -1
  137. package/dist/esm/gov-badge.entry.js.map +1 -1
  138. package/dist/esm/gov-button.entry.js +1 -1
  139. package/dist/esm/gov-button.entry.js.map +1 -1
  140. package/dist/esm/gov-form-checkbox.entry.js +1 -1
  141. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  142. package/dist/esm/gov-form-input.entry.js +1 -1
  143. package/dist/esm/gov-form-input.entry.js.map +1 -1
  144. package/dist/esm/gov-form-multi-select.entry.js +1 -1
  145. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  146. package/dist/esm/gov-form-radio.entry.js +1 -1
  147. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  148. package/dist/esm/gov-form-select.entry.js +2 -2
  149. package/dist/esm/gov-form-select.entry.js.map +1 -1
  150. package/dist/esm/gov-form-switch.entry.js +1 -1
  151. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  152. package/dist/esm/gov-icon.entry.js +2 -2
  153. package/dist/esm/gov-icon.entry.js.map +1 -1
  154. package/dist/esm/gov-modal.entry.js +1 -1
  155. package/dist/esm/gov-modal.entry.js.map +1 -1
  156. package/dist/esm/gov-prompt.entry.js +1 -1
  157. package/dist/esm/gov-prompt.entry.js.map +1 -1
  158. package/dist/esm/gov-stepper-item.entry.js +1 -1
  159. package/dist/esm/gov-stepper-item.entry.js.map +1 -1
  160. package/dist/esm/gov-wizard-item.entry.js +1 -1
  161. package/dist/esm/gov-wizard-item.entry.js.map +1 -1
  162. package/dist/hydrate/index.js +86 -21
  163. package/package.json +3 -3
  164. package/dist/components/p-04bfe959.js +0 -2
  165. package/dist/components/p-2753b6e4.js +0 -2
  166. package/dist/components/p-baf87688.js +0 -2
  167. package/dist/components/p-baf87688.js.map +0 -1
  168. package/dist/core/p-22a86871.entry.js +0 -2
  169. package/dist/core/p-23385300.entry.js +0 -2
  170. package/dist/core/p-23385300.entry.js.map +0 -1
  171. package/dist/core/p-48cfc1c6.entry.js +0 -2
  172. package/dist/core/p-48cfc1c6.entry.js.map +0 -1
  173. package/dist/core/p-4df62a13.entry.js +0 -2
  174. package/dist/core/p-4df62a13.entry.js.map +0 -1
  175. package/dist/core/p-64f7e661.entry.js +0 -2
  176. package/dist/core/p-74f0be51.entry.js +0 -2
  177. package/dist/core/p-74f0be51.entry.js.map +0 -1
  178. package/dist/core/p-801f1147.entry.js +0 -2
  179. package/dist/core/p-801f1147.entry.js.map +0 -1
  180. package/dist/core/p-81643870.entry.js +0 -2
  181. package/dist/core/p-82f64673.entry.js +0 -2
  182. package/dist/core/p-82f64673.entry.js.map +0 -1
  183. package/dist/core/p-e769f3ee.entry.js +0 -2
  184. package/dist/core/p-e769f3ee.entry.js.map +0 -1
  185. package/dist/core/p-ea4459ae.entry.js +0 -2
  186. package/dist/core/p-f0a5847a.entry.js +0 -2
  187. package/dist/core/p-fc853777.entry.js +0 -2
  188. /package/dist/components/{p-594ba760.js.map → p-839e8965.js.map} +0 -0
  189. /package/dist/components/{p-f516d8f6.js.map → p-d4f30d9b.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"gov-wizard-item.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,wrSAAwrS;;ACUjtS,IAAK,IAGJ;AAHD,WAAK,IAAI;EACR,mBAAW,CAAA;EACX,yBAAiB,CAAA;AAClB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAMY,aAA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EAAE,CAAA;GAClB;;;;EAMM,MAAM,YAAY;IACxB,OAAO,IAAI,CAAC,UAAU,CAAA;GACtB;;;;;;;;;;;;","names":["govHost","createID","govErrorLog","WizardItemClass","validateProp","WizardVariants","h","Host","Fragment","booleanString","toBoolAttrIfDefined"],"sources":["../../../packages/core/src/components/gov-wizard/gov-wizard-item.scss?tag=gov-wizard-item","../../../packages/core/src/components/gov-wizard/gov-wizard-item.tsx"],"sourcesContent":["/*\n * Wizard - Item\n */\n\n@import \"../gov-wizard/gov-wizard-item-core.scss\";\n$class: \".gov-wizard-item\";\n\n#{$class} {\n\t@include wizard-item-core;\n\tmargin-bottom: rem-calc(16);\n\tbackground: $wizard-bg-color;\n\t&__header {\n\t\t@include focus-outline();\n\t\tgap: rem-calc(16);\n\t\tpadding: rem-calc(16);\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttransition: $t linear color;\n\t}\n\t&__prefix {\n\t\tposition: absolute;\n\t\tleft: rem-calc(16);\n\t}\n\n\t// STATES\n\t&__header[aria-expanded=\"true\"] {\n\t\t#{$class}__label {\n\t\t\t.gov-icon {\n\t\t\t\ttransform: scale(-1);\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t&[size=\"#{$size-xs}\"],\n\t&[size=\"#{$size-s}\"],\n\t&[size=\"#{$size-m}\"] {\n\t\t#{$class} {\n\t\t\t&__title {\n\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-xs, \"font-size\"));\n\t\t\t}\n\t\t\t&__annot {\n\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-xs, \"font-size-annot\"));\n\t\t\t}\n\t\t\t&__prefix {\n\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-xs, \"font-size-indicator\"));\n\t\t\t\twidth: deep-map-get($wizard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\theight: deep-map-get($wizard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\ttop: deep-map-get($wizard-sizes, $size-xs, \"top\");\n\t\t\t\t+ #{$class}__header {\n\t\t\t\t\tpadding: deep-map-get($wizard-sizes, $size-xs, \"header-padding\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t&__content {\n\t\t\t\tpadding: $wizard-content-padding;\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $wizard-core-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t@include parameter(\"collapsible\") {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__header {\n\t\t\t\t\t\t@include hover() {\n\t\t\t\t\t\t\tcolor: get(\"hover-color\", $definitions);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// HOVERS\n\t@at-root button#{&}__header {\n\t\t@include button-core();\n\t\tjustify-content: flex-start;\n\t\ttext-align: left;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&[size=\"#{$size-s}\"],\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-s, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-s, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizard-sizes, $size-s, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizard-sizes, $size-s, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-m, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-m, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizard-sizes, $size-m, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizard-sizes, $size-m, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@each $size, $definitions in $wizard-sizes {\n\t\t\t&[size=\"#{$size}\"] {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tpadding: get(\"content-padding\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizesType, WizardVariants, WizardVariantsType, WizardItemClass } from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { WizardItemEvent } from \"./gov-wizard-item.types\"\nimport Fragment from \"../../helpers/Fragment\"\n\nenum Tags {\n\tDIV = \"div\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-wizard-item\",\n\tstyleUrl: \"gov-wizard-item.scss\",\n})\nexport class GovWizardItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovWizardItem\")\n\t\tthis.contentId = createID(\"GovWizardContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovWizardItemElement\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: WizardVariantsType = \"primary\"\n\t/**\n\t * Size of wizard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Custom wizard item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defines weather the wizard item can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Item annotation of the wizard\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Item label of the wizard\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Makes the wizard component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by default\n\t */\n\t@Prop({ attribute: \"is-expanded\", mutable: true }) isExpanded = false\n\t/**\n\t * Used to change the HTML tag in the accordion trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: \"label-tag\" }) readonly labelTag: string = \"h3\"\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<WizardItemEvent>\n\n\t@Watch(\"label\")\n\tprivate validateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${WizardItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch(\"labelTag\")\n\tprivate validateTriggerTag(newValue: string): void {\n\t\tconst validTags = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"span\"]\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${WizardItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"variant\")\n\tprivate validateVariant(newValue: string): void {\n\t\tvalidateProp(WizardVariants, newValue, WizardItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ expanded: this.isExpanded, component: WizardItemClass.root })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateTriggerTag(this.labelTag)\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst LabelTag = this.labelTag\n\t\tconst Tag = this.collapsible ? Tags.BUTTON : Tags.DIV\n\t\tconst prefixSlot = this.h.hasSlot(\"prefix\") && (<span class={WizardItemClass.prefix}><slot name=\"prefix\" /></span>)\n\n\t\tconst label = (\n\t\t\t<LabelTag class={WizardItemClass.title}>\n\t\t\t\t<span class={WizardItemClass.name}>\n\t\t\t\t\t<span class={WizardItemClass.label}>\n\t\t\t\t\t\t<span>{this.label}</span>\n\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizardItemClass.arrow} name=\"chevron-down\"></gov-icon>}\n\t\t\t\t\t</span>\n\n\t\t\t\t\t{this.annotation && <span class={WizardItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t</span>\n\t\t\t</LabelTag>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizardItemClass.root)} is-expanded={this.isExpanded} variant={this.variant} size={this.size} role=\"listitem\" collapsible={this.collapsible}>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\tid={triggerId}\n\t\t\t\t\t\t\tclass={WizardItemClass.header}\n\t\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.collapsible ? this.toggle() : false\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t</Fragment>\n\t\t\t\t) : (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<div class={WizardItemClass.header}>{label}</div>\n\t\t\t\t\t</Fragment>\n\t\t\t\t)}\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={WizardItemClass.content}\n\t\t\t\t\t\tid={this.contentId}\n\t\t\t\t\t\taria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\thidden={!this.isExpanded}\n\t\t\t\t\t\taria-labelledby={triggerId}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={WizardItemClass.content} aria-hidden={booleanString(!this.isExpanded)} hidden={!this.isExpanded}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Opening the Wizard\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpanded = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Wizard\n\t */\n\t@Method()\n\tpublic async close(): Promise<void> {\n\t\tthis.isExpanded = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Wizard switch\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\tthis.isExpanded = !this.isExpanded\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tpublic async currentState(): Promise<boolean> {\n\t\treturn this.isExpanded\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-wizard-item.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,gtSAAgtS;;ACUzuS,IAAK,IAGJ;AAHD,WAAK,IAAI;EACR,mBAAW,CAAA;EACX,yBAAiB,CAAA;AAClB,CAA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,CAAC,UAAU,CAAA;IAClC,IAAI,CAAC,WAAW,EAAE,CAAA;GAClB;;;;EAMM,MAAM,YAAY;IACxB,OAAO,IAAI,CAAC,UAAU,CAAA;GACtB;;;;;;;;;;;;","names":["govHost","createID","govErrorLog","WizardItemClass","validateProp","WizardVariants","h","Host","Fragment","booleanString","toBoolAttrIfDefined"],"sources":["../../../packages/core/src/components/gov-wizard/gov-wizard-item.scss?tag=gov-wizard-item","../../../packages/core/src/components/gov-wizard/gov-wizard-item.tsx"],"sourcesContent":["/*\n * Wizard - Item\n */\n\n@import \"../gov-wizard/gov-wizard-item-core.scss\";\n$class: \".gov-wizard-item\";\n\n#{$class} {\n\t@include wizard-item-core;\n\tmargin-bottom: rem-calc(16);\n\tbackground: $wizard-bg-color;\n\t&__header {\n\t\t@include focus-outline();\n\t\tgap: rem-calc(16);\n\t\tpadding: rem-calc(16);\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t\ttransition: $t linear color;\n\t}\n\t&__prefix {\n\t\tposition: absolute;\n\t\tleft: rem-calc(16);\n\t}\n\t&__label {\n\t\tfont-weight: $wizard-title-font-weight;\n\t}\n\n\t// STATES\n\t&__header[aria-expanded=\"true\"] {\n\t\t#{$class}__label {\n\t\t\t.gov-icon {\n\t\t\t\ttransform: scale(-1);\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t&[size=\"#{$size-xs}\"],\n\t&[size=\"#{$size-s}\"],\n\t&[size=\"#{$size-m}\"] {\n\t\t#{$class} {\n\t\t\t&__title {\n\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-xs, \"font-size\"));\n\t\t\t}\n\t\t\t&__annot {\n\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-xs, \"font-size-annot\"));\n\t\t\t}\n\t\t\t&__prefix {\n\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-xs, \"font-size-indicator\"));\n\t\t\t\twidth: deep-map-get($wizard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\theight: deep-map-get($wizard-sizes, $size-xs, \"indicator-size\");\n\t\t\t\ttop: deep-map-get($wizard-sizes, $size-xs, \"top\");\n\t\t\t\t+ #{$class}__header {\n\t\t\t\t\tpadding: deep-map-get($wizard-sizes, $size-xs, \"header-padding\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t&__content {\n\t\t\t\tpadding: $wizard-content-padding;\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $wizard-core-variants {\n\t\t&[variant=\"#{$variant}\"] {\n\t\t\t@include parameter(\"collapsible\") {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__header {\n\t\t\t\t\t\t@include hover() {\n\t\t\t\t\t\t\tcolor: get(\"hover-color\", $definitions);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// HOVERS\n\t@at-root button#{&}__header {\n\t\t@include button-core();\n\t\tjustify-content: flex-start;\n\t\ttext-align: left;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&[size=\"#{$size-s}\"],\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-s, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-s, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizard-sizes, $size-s, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizard-sizes, $size-s, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizard-sizes, $size-s, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&[size=\"#{$size-m}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__title {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-m, \"font-size\"));\n\t\t\t\t}\n\t\t\t\t&__prefix {\n\t\t\t\t\t@include typography(deep-map-get($wizard-sizes, $size-m, \"font-size-indicator\"));\n\t\t\t\t\twidth: deep-map-get($wizard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\theight: deep-map-get($wizard-sizes, $size-m, \"indicator-size\");\n\t\t\t\t\ttop: deep-map-get($wizard-sizes, $size-m, \"top\");\n\t\t\t\t\t+ #{$class}__header {\n\t\t\t\t\t\tpadding: deep-map-get($wizard-sizes, $size-m, \"header-padding\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@each $size, $definitions in $wizard-sizes {\n\t\t\t&[size=\"#{$size}\"] {\n\t\t\t\t#{$class} {\n\t\t\t\t\t&__content {\n\t\t\t\t\t\tpadding: get(\"content-padding\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from \"@stencil/core\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\nimport { validateProp } from \"../../helpers/Validate/props\"\nimport { WizardSizesType, WizardVariants, WizardVariantsType, WizardItemClass } from \"./constants\"\nimport { createID } from \"../../utils/string.utils\"\nimport { booleanString, govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { WizardItemEvent } from \"./gov-wizard-item.types\"\nimport Fragment from \"../../helpers/Fragment\"\n\nenum Tags {\n\tDIV = \"div\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-wizard-item\",\n\tstyleUrl: \"gov-wizard-item.scss\",\n})\nexport class GovWizardItem {\n\tprivate h: GovHost\n\tprivate readonly triggerId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.triggerId = createID(\"GovWizardItem\")\n\t\tthis.contentId = createID(\"GovWizardContent\")\n\t}\n\n\t@Element() readonly host: HTMLGovWizardItemElement\n\t/**\n\t * Style variation of the button.\n\t */\n\t@Prop() readonly variant?: WizardVariantsType = \"primary\"\n\t/**\n\t * Size of wizard\n\t */\n\t@Prop() readonly size?: WizardSizesType = \"m\"\n\t/**\n\t * Custom wizard item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Defines weather the wizard item can be collapsible\n\t */\n\t@Prop() readonly collapsible: boolean = false\n\t/**\n\t * Item annotation of the wizard\n\t */\n\t@Prop() readonly annotation: string\n\t/**\n\t * Item label of the wizard\n\t */\n\t@Prop() readonly label: string\n\t/**\n\t * Makes the wizard component disabled.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Defines whether the accordion is open or closed by default\n\t */\n\t@Prop({ attribute: \"is-expanded\", mutable: true }) isExpanded = false\n\t/**\n\t * Used to change the HTML tag in the accordion trigger for correct semantic structure\n\t */\n\t@Prop({ attribute: \"label-tag\" }) readonly labelTag: string = \"h3\"\n\t/**\n\t * Called when the accordion state changes\n\t */\n\t@Event({ eventName: \"gov-change\" }) govChange: EventEmitter<WizardItemEvent>\n\n\t@Watch(\"label\")\n\tprivate validateLabel(newValue: string): void {\n\t\tif (!newValue) {\n\t\t\tgovErrorLog(`[${WizardItemClass.root}]: Parameter label is required.`)\n\t\t}\n\t}\n\n\t@Watch(\"labelTag\")\n\tprivate validateTriggerTag(newValue: string): void {\n\t\tconst validTags = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"span\"]\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${WizardItemClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"variant\")\n\tprivate validateVariant(newValue: string): void {\n\t\tvalidateProp(WizardVariants, newValue, WizardItemClass.root)\n\t}\n\n\tprivate emmitChange(): void {\n\t\tthis.govChange.emit({ expanded: this.isExpanded, component: WizardItemClass.root })\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateLabel(this.label)\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateTriggerTag(this.labelTag)\n\t}\n\n\trender() {\n\t\tconst triggerId = this.identifier || this.triggerId\n\t\tconst LabelTag = this.labelTag\n\t\tconst Tag = this.collapsible ? Tags.BUTTON : Tags.DIV\n\t\tconst prefixSlot = this.h.hasSlot(\"prefix\") && (<span class={WizardItemClass.prefix}><slot name=\"prefix\" /></span>)\n\n\t\tconst label = (\n\t\t\t<LabelTag class={WizardItemClass.title}>\n\t\t\t\t<span class={WizardItemClass.name}>\n\t\t\t\t\t<span class={WizardItemClass.label}>\n\t\t\t\t\t\t<span>{this.label}</span>\n\t\t\t\t\t\t{this.collapsible && <gov-icon class={WizardItemClass.arrow} name=\"chevron-down\"></gov-icon>}\n\t\t\t\t\t</span>\n\n\t\t\t\t\t{this.annotation && <span class={WizardItemClass.annot}>{this.annotation}</span>}\n\t\t\t\t</span>\n\t\t\t</LabelTag>\n\t\t)\n\n\t\treturn (\n\t\t\t<Host class={this.h.classes(WizardItemClass.root)} is-expanded={this.isExpanded} variant={this.variant} size={this.size} role=\"listitem\" collapsible={this.collapsible}>\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\tid={triggerId}\n\t\t\t\t\t\t\tclass={WizardItemClass.header}\n\t\t\t\t\t\t\taria-expanded={booleanString(this.isExpanded)}\n\t\t\t\t\t\t\taria-controls={this.contentId}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.collapsible ? this.toggle() : false\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t</Fragment>\n\t\t\t\t) : (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{prefixSlot}\n\t\t\t\t\t\t<div class={WizardItemClass.header}>{label}</div>\n\t\t\t\t\t</Fragment>\n\t\t\t\t)}\n\t\t\t\t{this.collapsible ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={WizardItemClass.content}\n\t\t\t\t\t\tid={this.contentId}\n\t\t\t\t\t\taria-hidden={booleanString(!this.isExpanded)}\n\t\t\t\t\t\thidden={!this.isExpanded}\n\t\t\t\t\t\taria-labelledby={triggerId}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div class={WizardItemClass.content} aria-hidden={booleanString(!this.isExpanded)} hidden={!this.isExpanded}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Opening the Wizard\n\t */\n\t@Method()\n\tasync open(): Promise<void> {\n\t\tthis.isExpanded = true\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Closing the Wizard\n\t */\n\t@Method()\n\tpublic async close(): Promise<void> {\n\t\tthis.isExpanded = false\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Wizard switch\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\tthis.isExpanded = !this.isExpanded\n\t\tthis.emmitChange()\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tpublic async currentState(): Promise<boolean> {\n\t\treturn this.isExpanded\n\t}\n}\n"],"version":3}
@@ -299,6 +299,7 @@
299
299
  }
300
300
  .gov-accordion-item__label * {
301
301
  margin-bottom: 0;
302
+ display: inline-block;
302
303
  transform: translateY(1px);
303
304
  }
304
305
  .gov-accordion-item__annotation * {
@@ -1044,10 +1044,10 @@
1044
1044
  height: var(--gov-button-xs-icon-size, 1rem);
1045
1045
  }
1046
1046
  [size=s].gov-badge .element {
1047
- font-weight: var(--gov-button-text-s-font-weight, var(--gov-text-s-font-weight));
1048
- font-size: var(--gov-button-text-s-font-size, var(--gov-text-s-font-size));
1049
- line-height: var(--gov-button-text-s-line-height, var(--gov-text-s-line-height));
1050
- letter-spacing: var(--gov-button-text-s-letter-spacing, var(--gov-text-s-letter-spacing));
1047
+ font-weight: var(--gov-button-text-xs-font-weight, var(--gov-text-xs-font-weight));
1048
+ font-size: var(--gov-button-text-xs-font-size, var(--gov-text-xs-font-size));
1049
+ line-height: var(--gov-button-text-xs-line-height, var(--gov-text-xs-line-height));
1050
+ letter-spacing: var(--gov-button-text-xs-letter-spacing, var(--gov-text-xs-letter-spacing));
1051
1051
  -moz-column-gap: var(--gov-button-s-padding-x, 0.75rem);
1052
1052
  column-gap: var(--gov-button-s-padding-x, 0.75rem);
1053
1053
  min-height: var(--gov-button-s-min-height, 2rem);
@@ -1058,10 +1058,10 @@
1058
1058
  height: var(--gov-button-s-icon-size, 1rem);
1059
1059
  }
1060
1060
  [size=m].gov-badge .element {
1061
- font-weight: var(--gov-button-text-m-font-weight, var(--gov-text-m-font-weight));
1062
- font-size: var(--gov-button-text-m-font-size, var(--gov-text-m-font-size));
1063
- line-height: var(--gov-button-text-m-line-height, var(--gov-text-m-line-height));
1064
- letter-spacing: var(--gov-button-text-m-letter-spacing, var(--gov-text-m-letter-spacing));
1061
+ font-weight: var(--gov-button-text-s-font-weight, var(--gov-text-s-font-weight));
1062
+ font-size: var(--gov-button-text-s-font-size, var(--gov-text-s-font-size));
1063
+ line-height: var(--gov-button-text-s-line-height, var(--gov-text-s-line-height));
1064
+ letter-spacing: var(--gov-button-text-s-letter-spacing, var(--gov-text-s-letter-spacing));
1065
1065
  -moz-column-gap: var(--gov-button-m-padding-x, 0.75rem);
1066
1066
  column-gap: var(--gov-button-m-padding-x, 0.75rem);
1067
1067
  min-height: var(--gov-button-m-min-height, 2.5rem);
@@ -1072,10 +1072,10 @@
1072
1072
  height: var(--gov-button-m-icon-size, 1.25rem);
1073
1073
  }
1074
1074
  [size=l].gov-badge .element {
1075
- font-weight: var(--gov-button-text-l-font-weight, var(--gov-text-l-font-weight));
1076
- font-size: var(--gov-button-text-l-font-size, var(--gov-text-l-font-size));
1077
- line-height: var(--gov-button-text-l-line-height, var(--gov-text-l-line-height));
1078
- letter-spacing: var(--gov-button-text-l-letter-spacing, var(--gov-text-l-letter-spacing));
1075
+ font-weight: var(--gov-button-text-m-font-weight, var(--gov-text-m-font-weight));
1076
+ font-size: var(--gov-button-text-m-font-size, var(--gov-text-m-font-size));
1077
+ line-height: var(--gov-button-text-m-line-height, var(--gov-text-m-line-height));
1078
+ letter-spacing: var(--gov-button-text-m-letter-spacing, var(--gov-text-m-letter-spacing));
1079
1079
  -moz-column-gap: var(--gov-button-l-padding-x, 1rem);
1080
1080
  column-gap: var(--gov-button-l-padding-x, 1rem);
1081
1081
  min-height: var(--gov-button-l-min-height, 3rem);
@@ -1044,10 +1044,10 @@
1044
1044
  height: var(--gov-button-xs-icon-size, 1rem);
1045
1045
  }
1046
1046
  [size=s].gov-button .element {
1047
- font-weight: var(--gov-button-text-s-font-weight, var(--gov-text-s-font-weight));
1048
- font-size: var(--gov-button-text-s-font-size, var(--gov-text-s-font-size));
1049
- line-height: var(--gov-button-text-s-line-height, var(--gov-text-s-line-height));
1050
- letter-spacing: var(--gov-button-text-s-letter-spacing, var(--gov-text-s-letter-spacing));
1047
+ font-weight: var(--gov-button-text-xs-font-weight, var(--gov-text-xs-font-weight));
1048
+ font-size: var(--gov-button-text-xs-font-size, var(--gov-text-xs-font-size));
1049
+ line-height: var(--gov-button-text-xs-line-height, var(--gov-text-xs-line-height));
1050
+ letter-spacing: var(--gov-button-text-xs-letter-spacing, var(--gov-text-xs-letter-spacing));
1051
1051
  -moz-column-gap: var(--gov-button-s-padding-x, 0.75rem);
1052
1052
  column-gap: var(--gov-button-s-padding-x, 0.75rem);
1053
1053
  min-height: var(--gov-button-s-min-height, 2rem);
@@ -1058,10 +1058,10 @@
1058
1058
  height: var(--gov-button-s-icon-size, 1rem);
1059
1059
  }
1060
1060
  [size=m].gov-button .element {
1061
- font-weight: var(--gov-button-text-m-font-weight, var(--gov-text-m-font-weight));
1062
- font-size: var(--gov-button-text-m-font-size, var(--gov-text-m-font-size));
1063
- line-height: var(--gov-button-text-m-line-height, var(--gov-text-m-line-height));
1064
- letter-spacing: var(--gov-button-text-m-letter-spacing, var(--gov-text-m-letter-spacing));
1061
+ font-weight: var(--gov-button-text-s-font-weight, var(--gov-text-s-font-weight));
1062
+ font-size: var(--gov-button-text-s-font-size, var(--gov-text-s-font-size));
1063
+ line-height: var(--gov-button-text-s-line-height, var(--gov-text-s-line-height));
1064
+ letter-spacing: var(--gov-button-text-s-letter-spacing, var(--gov-text-s-letter-spacing));
1065
1065
  -moz-column-gap: var(--gov-button-m-padding-x, 0.75rem);
1066
1066
  column-gap: var(--gov-button-m-padding-x, 0.75rem);
1067
1067
  min-height: var(--gov-button-m-min-height, 2.5rem);
@@ -1072,10 +1072,10 @@
1072
1072
  height: var(--gov-button-m-icon-size, 1.25rem);
1073
1073
  }
1074
1074
  [size=l].gov-button .element {
1075
- font-weight: var(--gov-button-text-l-font-weight, var(--gov-text-l-font-weight));
1076
- font-size: var(--gov-button-text-l-font-size, var(--gov-text-l-font-size));
1077
- line-height: var(--gov-button-text-l-line-height, var(--gov-text-l-line-height));
1078
- letter-spacing: var(--gov-button-text-l-letter-spacing, var(--gov-text-l-letter-spacing));
1075
+ font-weight: var(--gov-button-text-m-font-weight, var(--gov-text-m-font-weight));
1076
+ font-size: var(--gov-button-text-m-font-size, var(--gov-text-m-font-size));
1077
+ line-height: var(--gov-button-text-m-line-height, var(--gov-text-m-line-height));
1078
+ letter-spacing: var(--gov-button-text-m-letter-spacing, var(--gov-text-m-letter-spacing));
1079
1079
  -moz-column-gap: var(--gov-button-l-padding-x, 1rem);
1080
1080
  column-gap: var(--gov-button-l-padding-x, 1rem);
1081
1081
  min-height: var(--gov-button-l-min-height, 3rem);
@@ -244,6 +244,7 @@
244
244
  .gov-form-checkbox input + span {
245
245
  position: relative;
246
246
  display: block;
247
+ cursor: pointer;
247
248
  }
248
249
  .gov-form-checkbox input + span::before {
249
250
  content: "";
@@ -292,6 +292,10 @@
292
292
  .gov-form-input *[slot=right-icon] {
293
293
  right: 0;
294
294
  }
295
+ .gov-form-input *[slot=prefix],
296
+ .gov-form-input *[slot=sufix] {
297
+ margin: 0;
298
+ }
295
299
  [size=s].gov-form-input {
296
300
  font-weight: var(--gov-text-s-font-weight);
297
301
  font-size: var(--gov-text-s-font-size);
@@ -431,7 +435,7 @@
431
435
  border: var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600));
432
436
  }
433
437
  [variant=primary].gov-form-input *[slot=left-icon],
434
- [variant=primary].gov-form-input *[slot=right-icon] {
438
+ [variant=primary].gov-form-input *[slot=right-icon]:not(.icon-arrow) {
435
439
  color: var(--gov-form-input-icon-color-primary, var(--gov-color-primary));
436
440
  }
437
441
  [variant=secondary].gov-form-input input,
@@ -441,7 +445,7 @@
441
445
  border: var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700));
442
446
  }
443
447
  [variant=secondary].gov-form-input *[slot=left-icon],
444
- [variant=secondary].gov-form-input *[slot=right-icon] {
448
+ [variant=secondary].gov-form-input *[slot=right-icon]:not(.icon-arrow) {
445
449
  color: var(--gov-form-input-icon-color-secondary, var(--gov-color-primary));
446
450
  }
447
451
  [disabled=""].gov-form-input, [disabled=true i].gov-form-input, [disabled="1"].gov-form-input {
@@ -462,7 +466,7 @@
462
466
  [disabled=""].gov-form-input *[slot=right-icon], [disabled=true i].gov-form-input *[slot=left-icon],
463
467
  [disabled=true i].gov-form-input *[slot=right-icon], [disabled="1"].gov-form-input *[slot=left-icon],
464
468
  [disabled="1"].gov-form-input *[slot=right-icon] {
465
- color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
469
+ color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important;
466
470
  }
467
471
  [invalid=""].gov-form-input input,
468
472
  [invalid=""].gov-form-input select,
@@ -490,18 +494,24 @@
490
494
  [invalid=""].gov-form-input *[slot=right-icon], [invalid=true i].gov-form-input *[slot=left-icon],
491
495
  [invalid=true i].gov-form-input *[slot=right-icon], [invalid="1"].gov-form-input *[slot=left-icon],
492
496
  [invalid="1"].gov-form-input *[slot=right-icon] {
493
- color: var(--gov-form-state-color-error, var(--gov-color-error));
497
+ color: var(--gov-form-state-color-error, var(--gov-color-error)) !important;
494
498
  }
495
- [success=""].gov-form-input *[slot=right-icon], [success=true i].gov-form-input *[slot=right-icon], [success="1"].gov-form-input *[slot=right-icon] {
499
+ [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) {
500
+ display: none;
501
+ }
502
+ [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) {
496
503
  color: var(--gov-form-state-color-success, var(--gov-color-success));
497
504
  }
498
505
  [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) {
499
506
  display: none;
500
507
  }
501
-
502
- .gov-form-input[invalid=""] *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), .gov-form-input[invalid=true i] *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), .gov-form-input[invalid="1"] *[slot=right-icon]:not(.icon-validation):not(.icon-arrow) {
508
+ [multiline=""].gov-form-input *[slot=left-icon],
509
+ [multiline=""].gov-form-input *[slot=right-icon], [multiline=true i].gov-form-input *[slot=left-icon],
510
+ [multiline=true i].gov-form-input *[slot=right-icon], [multiline="1"].gov-form-input *[slot=left-icon],
511
+ [multiline="1"].gov-form-input *[slot=right-icon] {
503
512
  display: none;
504
513
  }
514
+
505
515
  .gov-form-input[type=reset] input {
506
516
  border-width: 0;
507
517
  }
@@ -309,6 +309,10 @@
309
309
  .gov-form-multi-select *[slot=right-icon] {
310
310
  right: 0;
311
311
  }
312
+ .gov-form-multi-select *[slot=prefix],
313
+ .gov-form-multi-select *[slot=sufix] {
314
+ margin: 0;
315
+ }
312
316
  [size=s].gov-form-multi-select {
313
317
  font-weight: var(--gov-text-s-font-weight);
314
318
  font-size: var(--gov-text-s-font-size);
@@ -448,7 +452,7 @@
448
452
  border: var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600));
449
453
  }
450
454
  [variant=primary].gov-form-multi-select *[slot=left-icon],
451
- [variant=primary].gov-form-multi-select *[slot=right-icon] {
455
+ [variant=primary].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow) {
452
456
  color: var(--gov-form-input-icon-color-primary, var(--gov-color-primary));
453
457
  }
454
458
  [variant=secondary].gov-form-multi-select input,
@@ -458,7 +462,7 @@
458
462
  border: var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700));
459
463
  }
460
464
  [variant=secondary].gov-form-multi-select *[slot=left-icon],
461
- [variant=secondary].gov-form-multi-select *[slot=right-icon] {
465
+ [variant=secondary].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow) {
462
466
  color: var(--gov-form-input-icon-color-secondary, var(--gov-color-primary));
463
467
  }
464
468
  [disabled=""].gov-form-multi-select, [disabled=true i].gov-form-multi-select, [disabled="1"].gov-form-multi-select {
@@ -479,7 +483,7 @@
479
483
  [disabled=""].gov-form-multi-select *[slot=right-icon], [disabled=true i].gov-form-multi-select *[slot=left-icon],
480
484
  [disabled=true i].gov-form-multi-select *[slot=right-icon], [disabled="1"].gov-form-multi-select *[slot=left-icon],
481
485
  [disabled="1"].gov-form-multi-select *[slot=right-icon] {
482
- color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
486
+ color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important;
483
487
  }
484
488
  [invalid=""].gov-form-multi-select input,
485
489
  [invalid=""].gov-form-multi-select select,
@@ -507,14 +511,23 @@
507
511
  [invalid=""].gov-form-multi-select *[slot=right-icon], [invalid=true i].gov-form-multi-select *[slot=left-icon],
508
512
  [invalid=true i].gov-form-multi-select *[slot=right-icon], [invalid="1"].gov-form-multi-select *[slot=left-icon],
509
513
  [invalid="1"].gov-form-multi-select *[slot=right-icon] {
510
- color: var(--gov-form-state-color-error, var(--gov-color-error));
514
+ color: var(--gov-form-state-color-error, var(--gov-color-error)) !important;
515
+ }
516
+ [invalid=""].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), [invalid=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), [invalid="1"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow) {
517
+ display: none;
511
518
  }
512
- [success=""].gov-form-multi-select *[slot=right-icon], [success=true i].gov-form-multi-select *[slot=right-icon], [success="1"].gov-form-multi-select *[slot=right-icon] {
519
+ [success=""].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow), [success=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow), [success="1"].gov-form-multi-select *[slot=right-icon]:not(.icon-arrow) {
513
520
  color: var(--gov-form-state-color-success, var(--gov-color-success));
514
521
  }
515
522
  [success=""].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), [success=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), [success="1"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow) {
516
523
  display: none;
517
524
  }
525
+ [multiline=""].gov-form-multi-select *[slot=left-icon],
526
+ [multiline=""].gov-form-multi-select *[slot=right-icon], [multiline=true i].gov-form-multi-select *[slot=left-icon],
527
+ [multiline=true i].gov-form-multi-select *[slot=right-icon], [multiline="1"].gov-form-multi-select *[slot=left-icon],
528
+ [multiline="1"].gov-form-multi-select *[slot=right-icon] {
529
+ display: none;
530
+ }
518
531
 
519
532
  .gov-form-multi-select {
520
533
  background: none;
@@ -526,20 +539,25 @@
526
539
  .gov-form-multi-select select::-ms-expand {
527
540
  display: none;
528
541
  }
542
+ [size=s].gov-form-multi-select *[slot=right-icon] {
543
+ right: var(--gov-form-select-s-arrow-right-position, 0.75rem);
544
+ width: var(--gov-form-select-s-arrow-size, 0.75rem);
545
+ height: var(--gov-form-select-s-arrow-size, 0.75rem);
546
+ }
529
547
  [size=m].gov-form-multi-select *[slot=right-icon] {
530
548
  right: var(--gov-form-select-m-arrow-right-position, 1rem);
531
- width: var(--gov-form-select-m-arrow-size, 0.5rem);
532
- height: var(--gov-form-select-m-arrow-size, 0.5rem);
549
+ width: var(--gov-form-select-m-arrow-size, 0.75rem);
550
+ height: var(--gov-form-select-m-arrow-size, 0.75rem);
533
551
  }
534
552
  [size=l].gov-form-multi-select *[slot=right-icon] {
535
553
  right: var(--gov-form-select-l-arrow-right-position, 1rem);
536
- width: var(--gov-form-select-l-arrow-size, 0.5rem);
537
- height: var(--gov-form-select-l-arrow-size, 0.5rem);
554
+ width: var(--gov-form-select-l-arrow-size, 1rem);
555
+ height: var(--gov-form-select-l-arrow-size, 1rem);
538
556
  }
539
557
  [size=xl].gov-form-multi-select *[slot=right-icon] {
540
558
  right: var(--gov-form-select-xl-arrow-right-position, 1.3125rem);
541
- width: var(--gov-form-select-xl-arrow-size, 0.625rem);
542
- height: var(--gov-form-select-xl-arrow-size, 0.625rem);
559
+ width: var(--gov-form-select-xl-arrow-size, 1rem);
560
+ height: var(--gov-form-select-xl-arrow-size, 1rem);
543
561
  }
544
562
 
545
563
  .gov-form-multi-select {
@@ -567,4 +585,7 @@
567
585
  padding: 0rem 0rem 0rem 0.5rem;
568
586
  background: var(--gov-form-multiselect-bg, var(--gov-color-primary-200));
569
587
  transition: 150ms linear background-color;
588
+ }
589
+ .gov-form-multi-select .icon-validation {
590
+ display: none;
570
591
  }
@@ -244,6 +244,7 @@
244
244
  .gov-form-radio input + span {
245
245
  position: relative;
246
246
  display: block;
247
+ cursor: pointer;
247
248
  }
248
249
  .gov-form-radio input + span::before {
249
250
  content: "";
@@ -295,6 +295,10 @@
295
295
  .gov-form-select *[slot=right-icon] {
296
296
  right: 0;
297
297
  }
298
+ .gov-form-select *[slot=prefix],
299
+ .gov-form-select *[slot=sufix] {
300
+ margin: 0;
301
+ }
298
302
  [size=s].gov-form-select {
299
303
  font-weight: var(--gov-text-s-font-weight);
300
304
  font-size: var(--gov-text-s-font-size);
@@ -434,7 +438,7 @@
434
438
  border: var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600));
435
439
  }
436
440
  [variant=primary].gov-form-select *[slot=left-icon],
437
- [variant=primary].gov-form-select *[slot=right-icon] {
441
+ [variant=primary].gov-form-select *[slot=right-icon]:not(.icon-arrow) {
438
442
  color: var(--gov-form-input-icon-color-primary, var(--gov-color-primary));
439
443
  }
440
444
  [variant=secondary].gov-form-select input,
@@ -444,7 +448,7 @@
444
448
  border: var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700));
445
449
  }
446
450
  [variant=secondary].gov-form-select *[slot=left-icon],
447
- [variant=secondary].gov-form-select *[slot=right-icon] {
451
+ [variant=secondary].gov-form-select *[slot=right-icon]:not(.icon-arrow) {
448
452
  color: var(--gov-form-input-icon-color-secondary, var(--gov-color-primary));
449
453
  }
450
454
  [disabled=""].gov-form-select, [disabled=true i].gov-form-select, [disabled="1"].gov-form-select {
@@ -465,7 +469,7 @@
465
469
  [disabled=""].gov-form-select *[slot=right-icon], [disabled=true i].gov-form-select *[slot=left-icon],
466
470
  [disabled=true i].gov-form-select *[slot=right-icon], [disabled="1"].gov-form-select *[slot=left-icon],
467
471
  [disabled="1"].gov-form-select *[slot=right-icon] {
468
- color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
472
+ color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600)) !important;
469
473
  }
470
474
  [invalid=""].gov-form-select input,
471
475
  [invalid=""].gov-form-select select,
@@ -493,14 +497,23 @@
493
497
  [invalid=""].gov-form-select *[slot=right-icon], [invalid=true i].gov-form-select *[slot=left-icon],
494
498
  [invalid=true i].gov-form-select *[slot=right-icon], [invalid="1"].gov-form-select *[slot=left-icon],
495
499
  [invalid="1"].gov-form-select *[slot=right-icon] {
496
- color: var(--gov-form-state-color-error, var(--gov-color-error));
500
+ color: var(--gov-form-state-color-error, var(--gov-color-error)) !important;
501
+ }
502
+ [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) {
503
+ display: none;
497
504
  }
498
- [success=""].gov-form-select *[slot=right-icon], [success=true i].gov-form-select *[slot=right-icon], [success="1"].gov-form-select *[slot=right-icon] {
505
+ [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) {
499
506
  color: var(--gov-form-state-color-success, var(--gov-color-success));
500
507
  }
501
508
  [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) {
502
509
  display: none;
503
510
  }
511
+ [multiline=""].gov-form-select *[slot=left-icon],
512
+ [multiline=""].gov-form-select *[slot=right-icon], [multiline=true i].gov-form-select *[slot=left-icon],
513
+ [multiline=true i].gov-form-select *[slot=right-icon], [multiline="1"].gov-form-select *[slot=left-icon],
514
+ [multiline="1"].gov-form-select *[slot=right-icon] {
515
+ display: none;
516
+ }
504
517
 
505
518
  .gov-form-select {
506
519
  background: none;
@@ -512,18 +525,23 @@
512
525
  .gov-form-select select::-ms-expand {
513
526
  display: none;
514
527
  }
528
+ [size=s].gov-form-select *[slot=right-icon] {
529
+ right: var(--gov-form-select-s-arrow-right-position, 0.75rem);
530
+ width: var(--gov-form-select-s-arrow-size, 0.75rem);
531
+ height: var(--gov-form-select-s-arrow-size, 0.75rem);
532
+ }
515
533
  [size=m].gov-form-select *[slot=right-icon] {
516
534
  right: var(--gov-form-select-m-arrow-right-position, 1rem);
517
- width: var(--gov-form-select-m-arrow-size, 0.5rem);
518
- height: var(--gov-form-select-m-arrow-size, 0.5rem);
535
+ width: var(--gov-form-select-m-arrow-size, 0.75rem);
536
+ height: var(--gov-form-select-m-arrow-size, 0.75rem);
519
537
  }
520
538
  [size=l].gov-form-select *[slot=right-icon] {
521
539
  right: var(--gov-form-select-l-arrow-right-position, 1rem);
522
- width: var(--gov-form-select-l-arrow-size, 0.5rem);
523
- height: var(--gov-form-select-l-arrow-size, 0.5rem);
540
+ width: var(--gov-form-select-l-arrow-size, 1rem);
541
+ height: var(--gov-form-select-l-arrow-size, 1rem);
524
542
  }
525
543
  [size=xl].gov-form-select *[slot=right-icon] {
526
544
  right: var(--gov-form-select-xl-arrow-right-position, 1.3125rem);
527
- width: var(--gov-form-select-xl-arrow-size, 0.625rem);
528
- height: var(--gov-form-select-xl-arrow-size, 0.625rem);
545
+ width: var(--gov-form-select-xl-arrow-size, 1rem);
546
+ height: var(--gov-form-select-xl-arrow-size, 1rem);
529
547
  }
@@ -69,7 +69,7 @@ export class GovFormSelect {
69
69
  });
70
70
  }
71
71
  render() {
72
- return (h(Host, { class: FormSelectClass.root, size: this.size, variant: this.variant }, this.h.hasSlot("prefix") && h("slot", { name: "prefix" }), h("span", { class: "element" }, h("gov-icon", { slot: "right-icon", name: "chevron-down" }), h("select", { 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: el => (this.selectRef = el), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-activedescendant": this.wcagActiveDescendant, "aria-controls": this.wcagControls, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns }, h("slot", null))), this.h.hasSlot("sufix") && h("slot", { name: "sufix" })));
72
+ return (h(Host, { class: FormSelectClass.root, size: this.size, variant: this.variant }, this.h.hasSlot("prefix") && h("slot", { name: "prefix" }), h("span", { class: "element" }, h("gov-icon", { slot: "right-icon", name: "chevron-down", class: "icon-arrow" }), h("select", { 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: el => (this.selectRef = el), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-activedescendant": this.wcagActiveDescendant, "aria-controls": this.wcagControls, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns }, h("slot", null))), this.h.hasSlot("sufix") && h("slot", { name: "sufix" })));
73
73
  }
74
74
  onFocusHandler(e) {
75
75
  this.focused = true;
@@ -1 +1 @@
1
- {"version":3,"file":"gov-form-select.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/select/gov-form-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,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C,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAChF,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IACjE,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;EAClG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["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 } from \"./gov-form-select.types\"\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 * 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 * 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\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\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(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): 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(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", \"select\")\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}\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\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\"></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</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 * 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 * 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"]}
1
+ {"version":3,"file":"gov-form-select.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/select/gov-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wBAAwB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAC1F,eAAe,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IACzE,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAChF,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IACjE,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;EAClG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["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 } from \"./gov-form-select.types\"\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 * 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 * 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\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\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(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"size\")\n\twatchDisabled(): 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(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", \"select\")\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}\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\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<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</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 * 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 * 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"]}
@@ -299,13 +299,12 @@
299
299
  line-height: var(--gov-text-xs-line-height);
300
300
  letter-spacing: var(--gov-text-xs-letter-spacing);
301
301
  margin-bottom: 0;
302
- padding-top: calc((var(--gov-form-switch-xs-indicator-height, 1.25rem) - var(--gov-text-xs-font-size) * 1.5) / 2);
303
302
  }
304
303
  .gov-form-switch[size=xs] .gov-form-switch__holder {
305
304
  gap: var(--gov-form-switch-xs-gap, 0.75rem);
306
305
  }
307
306
  .gov-form-switch[size=xs] .gov-form-switch__input {
308
- width: calc(var(--gov-form-switch-xs-indicator-height, 1.25rem) * 2.5);
307
+ width: calc(var(--gov-form-switch-xs-indicator-height, 1.25rem) * 1.6666666667);
309
308
  height: var(--gov-form-switch-xs-indicator-height, 1.25rem);
310
309
  }
311
310
  .gov-form-switch[size=xs] .gov-form-switch__indicator {
@@ -335,13 +334,12 @@
335
334
  line-height: var(--gov-text-s-line-height);
336
335
  letter-spacing: var(--gov-text-s-letter-spacing);
337
336
  margin-bottom: 0;
338
- padding-top: calc((var(--gov-form-switch-s-indicator-height, 1.375rem) - var(--gov-text-s-font-size) * 1.5) / 2);
339
337
  }
340
338
  .gov-form-switch[size=s] .gov-form-switch__holder {
341
339
  gap: var(--gov-form-switch-s-gap, 0.75rem);
342
340
  }
343
341
  .gov-form-switch[size=s] .gov-form-switch__input {
344
- width: calc(var(--gov-form-switch-s-indicator-height, 1.375rem) * 2.5);
342
+ width: calc(var(--gov-form-switch-s-indicator-height, 1.375rem) * 1.6666666667);
345
343
  height: var(--gov-form-switch-s-indicator-height, 1.375rem);
346
344
  }
347
345
  .gov-form-switch[size=s] .gov-form-switch__indicator {
@@ -371,13 +369,12 @@
371
369
  line-height: var(--gov-text-m-line-height);
372
370
  letter-spacing: var(--gov-text-m-letter-spacing);
373
371
  margin-bottom: 0;
374
- padding-top: calc((var(--gov-form-switch-m-indicator-height, 1.5rem) - var(--gov-text-m-font-size) * 1.5) / 2);
375
372
  }
376
373
  .gov-form-switch[size=m] .gov-form-switch__holder {
377
374
  gap: var(--gov-form-switch-m-gap, 1rem);
378
375
  }
379
376
  .gov-form-switch[size=m] .gov-form-switch__input {
380
- width: calc(var(--gov-form-switch-m-indicator-height, 1.5rem) * 2.5);
377
+ width: calc(var(--gov-form-switch-m-indicator-height, 1.5rem) * 1.6666666667);
381
378
  height: var(--gov-form-switch-m-indicator-height, 1.5rem);
382
379
  }
383
380
  .gov-form-switch[size=m] .gov-form-switch__indicator {
@@ -407,13 +404,12 @@
407
404
  line-height: var(--gov-text-l-line-height);
408
405
  letter-spacing: var(--gov-text-l-letter-spacing);
409
406
  margin-bottom: 0;
410
- padding-top: calc((var(--gov-form-switch-l-indicator-height, 2rem) - var(--gov-text-l-font-size) * 1.5) / 2);
411
407
  }
412
408
  .gov-form-switch[size=l] .gov-form-switch__holder {
413
409
  gap: var(--gov-form-switch-l-gap, 1rem);
414
410
  }
415
411
  .gov-form-switch[size=l] .gov-form-switch__input {
416
- width: calc(var(--gov-form-switch-l-indicator-height, 2rem) * 2.5);
412
+ width: calc(var(--gov-form-switch-l-indicator-height, 2rem) * 1.6666666667);
417
413
  height: var(--gov-form-switch-l-indicator-height, 2rem);
418
414
  }
419
415
  .gov-form-switch[size=l] .gov-form-switch__indicator {
@@ -230,9 +230,13 @@
230
230
  .gov-icon {
231
231
  display: inline-flex;
232
232
  }
233
- .gov-icon__holder,
234
- .gov-icon svg {
233
+ .gov-icon__holder {
235
234
  display: inline-flex;
236
235
  width: 100%;
237
236
  height: 100%;
237
+ }
238
+ .gov-icon svg {
239
+ display: inline-flex;
240
+ max-width: 100%;
241
+ max-height: 100%;
238
242
  }