@gov-design-system-ce/components 0.0.10 → 0.0.11

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 (214) hide show
  1. package/dist/cjs/gov-button.cjs.entry.js +0 -2
  2. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  3. package/dist/cjs/gov-form-autocomplete.cjs.entry.js +0 -4
  4. package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
  5. package/dist/cjs/gov-form-checkbox.cjs.entry.js +0 -3
  6. package/dist/cjs/gov-form-checkbox.cjs.entry.js.map +1 -1
  7. package/dist/cjs/gov-form-file.cjs.entry.js +0 -3
  8. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  9. package/dist/cjs/gov-form-input.cjs.entry.js +0 -4
  10. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  11. package/dist/cjs/gov-form-multi-select.cjs.entry.js +0 -4
  12. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  13. package/dist/cjs/gov-form-radio.cjs.entry.js +0 -3
  14. package/dist/cjs/gov-form-radio.cjs.entry.js.map +1 -1
  15. package/dist/cjs/gov-form-switch.cjs.entry.js +0 -2
  16. package/dist/cjs/gov-form-switch.cjs.entry.js.map +1 -1
  17. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  18. package/dist/cjs/gov-pagination.cjs.entry.js +0 -2
  19. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gov-tooltip.cjs.entry.js +2 -2
  21. package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
  22. package/dist/collection/components/gov-button/gov-button.js +0 -2
  23. package/dist/collection/components/gov-button/gov-button.js.map +1 -1
  24. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +0 -4
  25. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
  26. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js +0 -3
  27. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.js.map +1 -1
  28. package/dist/collection/components/gov-form/file/gov-form-file.js +0 -3
  29. package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
  30. package/dist/collection/components/gov-form/input/gov-form-input.js +0 -4
  31. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  32. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +0 -4
  33. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
  34. package/dist/collection/components/gov-form/radio/gov-form-radio.js +0 -3
  35. package/dist/collection/components/gov-form/radio/gov-form-radio.js.map +1 -1
  36. package/dist/collection/components/gov-form/switch/gov-form-switch.js +0 -2
  37. package/dist/collection/components/gov-form/switch/gov-form-switch.js.map +1 -1
  38. package/dist/collection/components/gov-pagination/gov-pagination.js +0 -2
  39. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  40. package/dist/collection/components/gov-tooltip/gov-tooltip.js +2 -2
  41. package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
  42. package/dist/components/gov-accordion-item.js +0 -1
  43. package/dist/components/gov-accordion-item.js.map +1 -1
  44. package/dist/components/gov-accordion.js +0 -1
  45. package/dist/components/gov-accordion.js.map +1 -1
  46. package/dist/components/gov-alert.js +0 -1
  47. package/dist/components/gov-alert.js.map +1 -1
  48. package/dist/components/gov-app.js +0 -1
  49. package/dist/components/gov-app.js.map +1 -1
  50. package/dist/components/gov-attachments-item2.js +0 -1
  51. package/dist/components/gov-attachments-item2.js.map +1 -1
  52. package/dist/components/gov-attachments2.js +0 -1
  53. package/dist/components/gov-attachments2.js.map +1 -1
  54. package/dist/components/gov-backdrop2.js +0 -1
  55. package/dist/components/gov-backdrop2.js.map +1 -1
  56. package/dist/components/gov-badge2.js +0 -1
  57. package/dist/components/gov-badge2.js.map +1 -1
  58. package/dist/components/gov-breadcrumbs.js +0 -1
  59. package/dist/components/gov-breadcrumbs.js.map +1 -1
  60. package/dist/components/gov-button2.js +0 -3
  61. package/dist/components/gov-button2.js.map +1 -1
  62. package/dist/components/gov-card.js +0 -1
  63. package/dist/components/gov-card.js.map +1 -1
  64. package/dist/components/gov-container.js +0 -1
  65. package/dist/components/gov-container.js.map +1 -1
  66. package/dist/components/gov-cookiebar.js +0 -1
  67. package/dist/components/gov-cookiebar.js.map +1 -1
  68. package/dist/components/gov-empty.js +0 -1
  69. package/dist/components/gov-empty.js.map +1 -1
  70. package/dist/components/gov-error-code.js +0 -1
  71. package/dist/components/gov-error-code.js.map +1 -1
  72. package/dist/components/gov-form-autocomplete2.js +0 -5
  73. package/dist/components/gov-form-autocomplete2.js.map +1 -1
  74. package/dist/components/gov-form-checkbox.js +0 -4
  75. package/dist/components/gov-form-checkbox.js.map +1 -1
  76. package/dist/components/gov-form-control.js +0 -1
  77. package/dist/components/gov-form-control.js.map +1 -1
  78. package/dist/components/gov-form-file.js +0 -4
  79. package/dist/components/gov-form-file.js.map +1 -1
  80. package/dist/components/gov-form-group.js +0 -1
  81. package/dist/components/gov-form-group.js.map +1 -1
  82. package/dist/components/gov-form-input2.js +0 -5
  83. package/dist/components/gov-form-input2.js.map +1 -1
  84. package/dist/components/gov-form-label.js +0 -1
  85. package/dist/components/gov-form-label.js.map +1 -1
  86. package/dist/components/gov-form-message2.js +0 -1
  87. package/dist/components/gov-form-message2.js.map +1 -1
  88. package/dist/components/gov-form-multi-select.js +0 -5
  89. package/dist/components/gov-form-multi-select.js.map +1 -1
  90. package/dist/components/gov-form-password-power.js +0 -1
  91. package/dist/components/gov-form-password-power.js.map +1 -1
  92. package/dist/components/gov-form-radio.js +0 -4
  93. package/dist/components/gov-form-radio.js.map +1 -1
  94. package/dist/components/gov-form-search.js +0 -1
  95. package/dist/components/gov-form-search.js.map +1 -1
  96. package/dist/components/gov-form-select2.js +0 -1
  97. package/dist/components/gov-form-select2.js.map +1 -1
  98. package/dist/components/gov-form-switch.js +0 -3
  99. package/dist/components/gov-form-switch.js.map +1 -1
  100. package/dist/components/gov-grid-item.js +0 -1
  101. package/dist/components/gov-grid-item.js.map +1 -1
  102. package/dist/components/gov-grid.js +0 -1
  103. package/dist/components/gov-grid.js.map +1 -1
  104. package/dist/components/gov-icon2.js +1 -2
  105. package/dist/components/gov-icon2.js.map +1 -1
  106. package/dist/components/gov-layout-column.js +0 -1
  107. package/dist/components/gov-layout-column.js.map +1 -1
  108. package/dist/components/gov-layout.js +0 -1
  109. package/dist/components/gov-layout.js.map +1 -1
  110. package/dist/components/gov-loading.js +0 -1
  111. package/dist/components/gov-loading.js.map +1 -1
  112. package/dist/components/gov-message.js +0 -1
  113. package/dist/components/gov-message.js.map +1 -1
  114. package/dist/components/gov-modal.js +0 -1
  115. package/dist/components/gov-modal.js.map +1 -1
  116. package/dist/components/gov-nav-item.js +0 -1
  117. package/dist/components/gov-nav-item.js.map +1 -1
  118. package/dist/components/gov-nav.js +0 -1
  119. package/dist/components/gov-nav.js.map +1 -1
  120. package/dist/components/gov-pagination.js +0 -3
  121. package/dist/components/gov-pagination.js.map +1 -1
  122. package/dist/components/gov-prompt.js +0 -1
  123. package/dist/components/gov-prompt.js.map +1 -1
  124. package/dist/components/gov-side-nav-item.js +0 -1
  125. package/dist/components/gov-side-nav-item.js.map +1 -1
  126. package/dist/components/gov-side-nav.js +0 -1
  127. package/dist/components/gov-side-nav.js.map +1 -1
  128. package/dist/components/gov-spacer.js +0 -1
  129. package/dist/components/gov-spacer.js.map +1 -1
  130. package/dist/components/gov-statsbar-item.js +0 -1
  131. package/dist/components/gov-statsbar-item.js.map +1 -1
  132. package/dist/components/gov-statsbar.js +0 -1
  133. package/dist/components/gov-statsbar.js.map +1 -1
  134. package/dist/components/gov-stepper-item.js +0 -1
  135. package/dist/components/gov-stepper-item.js.map +1 -1
  136. package/dist/components/gov-stepper.js +0 -1
  137. package/dist/components/gov-stepper.js.map +1 -1
  138. package/dist/components/gov-tabs-item.js +0 -1
  139. package/dist/components/gov-tabs-item.js.map +1 -1
  140. package/dist/components/gov-tabs.js +0 -1
  141. package/dist/components/gov-tabs.js.map +1 -1
  142. package/dist/components/gov-tile.js +0 -1
  143. package/dist/components/gov-tile.js.map +1 -1
  144. package/dist/components/gov-tiles.js +0 -1
  145. package/dist/components/gov-tiles.js.map +1 -1
  146. package/dist/components/gov-toast.js +0 -1
  147. package/dist/components/gov-toast.js.map +1 -1
  148. package/dist/components/gov-tooltip-content.js +0 -1
  149. package/dist/components/gov-tooltip-content.js.map +1 -1
  150. package/dist/components/gov-tooltip.js +2 -3
  151. package/dist/components/gov-tooltip.js.map +1 -1
  152. package/dist/components/gov-wizzard-item.js +0 -1
  153. package/dist/components/gov-wizzard-item.js.map +1 -1
  154. package/dist/components/gov-wizzard.js +0 -1
  155. package/dist/components/gov-wizzard.js.map +1 -1
  156. package/dist/core/core.esm.js +1 -1
  157. package/dist/core/{p-9ceeba49.entry.js → p-4e12d6e3.entry.js} +2 -2
  158. package/dist/core/p-4e12d6e3.entry.js.map +1 -0
  159. package/dist/core/{p-6b928a53.entry.js → p-64d6997b.entry.js} +2 -2
  160. package/dist/core/p-64d6997b.entry.js.map +1 -0
  161. package/dist/core/{p-cc37a226.entry.js → p-882621a0.entry.js} +2 -2
  162. package/dist/core/p-882621a0.entry.js.map +1 -0
  163. package/dist/core/{p-04fc18ab.entry.js → p-ae3e2d60.entry.js} +2 -2
  164. package/dist/core/p-ae3e2d60.entry.js.map +1 -0
  165. package/dist/core/{p-9c844f4d.entry.js → p-b37ca132.entry.js} +2 -2
  166. package/dist/core/p-b37ca132.entry.js.map +1 -0
  167. package/dist/core/{p-bba09987.entry.js → p-cec15cf8.entry.js} +2 -2
  168. package/dist/core/p-cec15cf8.entry.js.map +1 -0
  169. package/dist/core/{p-f759342e.entry.js → p-d2d8998d.entry.js} +2 -2
  170. package/dist/core/p-d2d8998d.entry.js.map +1 -0
  171. package/dist/core/{p-6fd0c41d.entry.js → p-db88f249.entry.js} +2 -2
  172. package/dist/core/{p-6b69dbd3.entry.js → p-e3484849.entry.js} +2 -2
  173. package/dist/core/p-e3484849.entry.js.map +1 -0
  174. package/dist/core/{p-851939ff.entry.js → p-e86bffd0.entry.js} +2 -2
  175. package/dist/core/p-e86bffd0.entry.js.map +1 -0
  176. package/dist/core/{p-44dc2ef4.entry.js → p-fc61fd31.entry.js} +2 -2
  177. package/dist/core/p-fc61fd31.entry.js.map +1 -0
  178. package/dist/custom-elements/index.js +1 -1
  179. package/dist/custom-elements/index.js.map +1 -1
  180. package/dist/esm/gov-button.entry.js +0 -2
  181. package/dist/esm/gov-button.entry.js.map +1 -1
  182. package/dist/esm/gov-form-autocomplete.entry.js +0 -4
  183. package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
  184. package/dist/esm/gov-form-checkbox.entry.js +0 -3
  185. package/dist/esm/gov-form-checkbox.entry.js.map +1 -1
  186. package/dist/esm/gov-form-file.entry.js +0 -3
  187. package/dist/esm/gov-form-file.entry.js.map +1 -1
  188. package/dist/esm/gov-form-input.entry.js +0 -4
  189. package/dist/esm/gov-form-input.entry.js.map +1 -1
  190. package/dist/esm/gov-form-multi-select.entry.js +0 -4
  191. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  192. package/dist/esm/gov-form-radio.entry.js +0 -3
  193. package/dist/esm/gov-form-radio.entry.js.map +1 -1
  194. package/dist/esm/gov-form-switch.entry.js +0 -2
  195. package/dist/esm/gov-form-switch.entry.js.map +1 -1
  196. package/dist/esm/gov-icon.entry.js +1 -1
  197. package/dist/esm/gov-pagination.entry.js +0 -2
  198. package/dist/esm/gov-pagination.entry.js.map +1 -1
  199. package/dist/esm/gov-tooltip.entry.js +2 -2
  200. package/dist/esm/gov-tooltip.entry.js.map +1 -1
  201. package/dist/hydrate/index.js +2 -29
  202. package/dist/types/components/gov-tooltip/gov-tooltip.d.ts +1 -1
  203. package/package.json +1 -1
  204. package/dist/core/p-04fc18ab.entry.js.map +0 -1
  205. package/dist/core/p-44dc2ef4.entry.js.map +0 -1
  206. package/dist/core/p-6b69dbd3.entry.js.map +0 -1
  207. package/dist/core/p-6b928a53.entry.js.map +0 -1
  208. package/dist/core/p-851939ff.entry.js.map +0 -1
  209. package/dist/core/p-9c844f4d.entry.js.map +0 -1
  210. package/dist/core/p-9ceeba49.entry.js.map +0 -1
  211. package/dist/core/p-bba09987.entry.js.map +0 -1
  212. package/dist/core/p-cc37a226.entry.js.map +0 -1
  213. package/dist/core/p-f759342e.entry.js.map +0 -1
  214. /package/dist/core/{p-6fd0c41d.entry.js.map → p-db88f249.entry.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/core/src/utils/bool.utils.ts","../../../packages/core/src/components/gov-button/gov-button.scss?tag=gov-button","../../../packages/core/src/components/gov-button/gov-button.tsx"],"names":["toBool","value","indexOf","govButtonCss","Tags","GovButton","[object Object]","hostRef","this","h","govHost","host","newValue","validateProp","ButtonVariants","ButtonClass","root","Type","Sizes","NativeType","validateVariant","variant","validateType","type","validateSize","size","validateNativeType","nativeType","canValidateWcagOnRender","delay","validateWcag","classNames","prepareClasses","hasSlot","rootWithIcon","Tag","href","A","BUTTON","undefined","Host","hoverable","class","classes","inverse","ref","el","buttonRef","onClick","onClickHandler","bind","onFocus","onFocusHandler","onBlur","onBlurHandler","onMouseDown","isPressed","onMouseUp","disabled","id","identifier","target","download","hreflang","rel","name","tabindex","focusable","aria-activedescendant","wcagActiveDescendant","aria-describedby","aria-description","wcagDescription","aria-controls","wcagControls","aria-details","wcagDetails","aria-expanded","toBoolAttrIfDefined","wcagExpanded","aria-label","wcagLabel","aria-labelledby","wcagLabelledBy","aria-owns","wcagOwns","aria-haspopup","wcagHasPopup","aria-pressed","toBoolAttr","aria-disabled","aria-current","wcagCurrent","loading","e","stopPropagation","govClick","emit","preventDefault","govFocus","govBlur","focus","validateWcagRef","validateWcagLabel"],"mappings":"8bAAgBA,EAAOC,GACtB,UAAWA,IAAU,SAAU,CAC9B,MAAO,CAAC,OAAQ,OAAQ,OAAQ,KAAKC,Q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M,yBAMnFpC,eAAewF,GACtBA,EAAEC,kBACF,GAAIvF,KAAKkD,WAAa,MAAO,CAC5BlD,KAAKwF,SAASC,KAAKH,IAIbxF,eAAewF,GACtBA,EAAEC,kBACFD,EAAEI,iBACF1F,KAAK2F,SAASF,KAAKH,GAGZxF,cAAcwF,GACrBA,EAAEC,kBACFD,EAAEI,iBACF1F,KAAK4F,QAAQH,KAAKH,GAOnBxF,iBACCE,KAAKuC,UAAUsD,QAOhB/F,qBACC,GAAIE,KAAK2D,UAAW,CACnBmC,EAAgB9F,KAAK6D,qBAAsB,wBAAyBtD,EAAYC,MAChFsF,EAAgB9F,KAAKkE,aAAc,gBAAiB3D,EAAYC,MAChEsF,EAAgB9F,KAAKoE,YAAa,eAAgB7D,EAAYC,MAC9DsF,EAAgB9F,KAAK6E,SAAU,YAAatE,EAAYC,MACxDsF,EAAgB9F,KAAK+E,aAAc,gBAAiBxE,EAAYC,MAChEuF,EAAkB/F,KAAKyE,UAAWzE,KAAK2E,eAAgBpE,EAAYC","sourcesContent":["export function toBool(value: any): boolean {\n\tif (typeof value === 'string') {\n\t\treturn ['true', 'True', 'TRUE', '1'].indexOf(value) !== -1\n\t} else if (typeof value === 'number') {\n\t\treturn value > 0\n\t} else if (typeof value === 'boolean') {\n\t\treturn value\n\t} else {\n\t\treturn value ? true : false\n\t}\n}\n","/*\n * Button\n */\n\n// Shared definitions - BUTTON & badge\n@import \"./gov-button-core.scss\";\n\n.gov-button {\n\t@extend %button-core;\n\tdisplay: inline-block;\n\t.element {\n\t\tborder-radius: #{$border-radius};\n\t}\n\n\t&[type=\"link\"] {\n\t\t.element {\n\t\t\tpadding: 0;\n\t\t\ttext-decoration: underline;\n\t\t\tline-height: inherit;\n\t\t\tmin-height: inherit;\n\t\t\t@include hover() {\n\t\t\t\ttext-decoration: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t// STATES\n\t&[loading=\"true\"],\n\t&[loading=\"1\"] {\n\t\t.element {\n\t\t\t> .gov-icon:not(.gov-spin-animation),\n\t\t\t> gov-icon:not(.gov-spin-animation) {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $button-sizes {\n\t\t// Loading state\n\t\t&:not(&--w-icon)[loading=\"0\"][size=\"#{$size}\"],\n\t\t&:not(&--w-icon)[loading=\"false\"][size=\"#{$size}\"],\n\t\t&:not(&--w-icon)[loading=\"\"][size=\"#{$size}\"]\n\t\t&:not[type=\"link\"] {\n\t\t\t.element {\n\t\t\t\tpadding: get(\"padding-y\", $definitions)\n\t\t\t\t\tcalc(get(\"padding-x\", $definitions) + (get(\"padding-x\", $definitions) / 2) + (get(\"icon-size\", $definitions) / 2));\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 { validateProp } from '../../helpers/Validate/props'\nimport { ButtonSizesType, NativeTypesType, TypesType, ButtonVariants, ButtonVariantType, ButtonClass, Type, NativeType, ButtonTargetType } from './constants'\nimport { govHost, toBoolAttr, toBoolAttrIfDefined, prepareClasses } from '../../helpers/Dom/template'\nimport { GovHost } from '../../helpers/Dom/template.types'\nimport { toBool } from '../../utils/bool.utils'\nimport { Sizes } from '../../core/constants/sizes'\nimport { validateWcagLabel, validateWcagRef } from '../../helpers/Validate/wcag'\nimport { canValidateWcagOnRender } from '../../helpers/Dom/win'\nimport { delay } from '../../utils/utils'\n\nenum Tags {\n\tA = 'a',\n\tBUTTON = 'button',\n}\n\n@Component({\n\ttag: 'gov-button',\n\tstyleUrl: 'gov-button.scss',\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate buttonRef?: HTMLButtonElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovButtonElement\n\n\t/**\n\t * Style variation of the button\n\t */\n\t@Prop({reflect: true}) readonly variant?: ButtonVariantType\n\t/**\n\t * Button’s size\n\t */\n\t@Prop({reflect: true}) readonly size?: ButtonSizesType = 'm'\n\t/**\n\t * Button's type\n\t */\n\t@Prop({reflect: true}) readonly type?: TypesType = 'solid'\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop() readonly expanded: boolean = false\n\t/**\n\t * Determine if component should have inversed colors to be used on dark background\n\t */\n\t@Prop() readonly inverse: boolean = false\n\t/**\n\t * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Makes the button component disabled.\n\t * This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Same as original parameter\n\t * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n\t */\n\t@Prop() readonly nativeType?: NativeTypesType = 'button'\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href\n\t */\n\t@Prop() readonly href: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n\t */\n\t@Prop() readonly target?: ButtonTargetType\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n\t */\n\t@Prop() readonly download: boolean\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang\n\t */\n\t@Prop() readonly hreflang: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-referrerpolicy\n\t */\n\t@Prop() readonly referrerpolicy: string\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-rel\n\t */\n\t@Prop() readonly rel: string\n\t/**\n\t * Indicates whether an asynchronous process is running\n\t */\n\t@Prop() readonly loading: string\n\t/**\n\t * Same as original parametr\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/focusable\n\t */\n\t@Prop() readonly focusable: boolean = true\n\t/**\n\t * Custom button identifier\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\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 property to add an aria-controls attribute to the button. Use the attribute to point to the unique id of the content that the button manages\n\t */\n\t@Prop({ attribute: 'wcag-controls' }) readonly wcagControls: string\n\t/**\n\t * Indicates the id of a component that describes the button\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Aria description the button\n\t */\n\t@Prop({ attribute: 'wcag-description' }) readonly wcagDescription: string\n\t/**\n\t * Details of the component\n\t */\n\t@Prop({ attribute: 'wcag-details' }) readonly wcagDetails: string\n\t/**\n\t * If a button expands or collapses adjacent content, then use the ariaExpanded prop to add the aria-expanded attribute to the button\n\t * Set the value to convey the current expanded (true) or collapsed (false) state of the content\n\t */\n\t@Prop({ attribute: 'wcag-expanded' }) readonly wcagExpanded: boolean\n\t/**\n\t * Adds accessible label for the button that is only shown for screen readers\n\t * Typically, this label text replaces the visible text on the button for users who use assistive technology\n\t */\n\t@Prop({ attribute: 'wcag-label' }) readonly wcagLabel: string\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component owned by the button\n\t */\n\t@Prop({ attribute: 'wcag-owns' }) readonly wcagOwns: string\n\t/**\n\t * \tUse this property to add an aria-haspopup attribute to a button, if you are using it as a menu button\n\t */\n\t@Prop({ attribute: 'wcag-has-popup' }) readonly wcagHasPopup: string\n\t/**\n\t * Tells screen reader the element is pressed\n\t */\n\t@Prop({ attribute: 'wcag-pressed' }) readonly wcagPressed: string\n\t/**\n\t * Indicates the current item within a container or set of related elements\n\t */\n\t@Prop({ attribute: 'wcag-current' }) readonly wcagCurrent: string\n\t/**\n\t * Emitted when the button click\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<PointerEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FocusEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FocusEvent>\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(ButtonVariants, newValue, ButtonClass.root)\n\t}\n\n\t@Watch('type')\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(Type, newValue, ButtonClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(Sizes, newValue, ButtonClass.root)\n\t}\n\n\t@Watch('nativeType')\n\tvalidateNativeType(newValue: string): void {\n\t\tvalidateProp(NativeType, newValue, ButtonClass.root)\n\t}\n\n\t@State() isPressed = false\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\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\tget classNames(): string {\n\t\tconst { h } = this\n\n\t\treturn prepareClasses([ButtonClass.root, h.hasSlot('left-icon') && ButtonClass.rootWithIcon, h.hasSlot('right-icon') && ButtonClass.rootWithIcon])\n\t}\n\n\trender() {\n\t\tconst Tag = this.href ? Tags.A : Tags.BUTTON\n\t\tconst nativeType = Tag === Tags.A ? undefined : this.nativeType\n\n\t\treturn (\n\t\t\t<Host hoverable={true} size={this.size} variant={this.variant} class={this.h.classes(this.classNames)} type={this.type} inverse={this.inverse}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.buttonRef = el as HTMLButtonElement)}\n\t\t\t\t\tonClick={this.onClickHandler.bind(this)}\n\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\tonMouseDown={() => (this.isPressed = true)}\n\t\t\t\t\tonMouseUp={() => (this.isPressed = false)}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tid={this.identifier}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tdownload={this.download}\n\t\t\t\t\threflang={this.hreflang}\n\t\t\t\t\trel={this.rel}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\ttype={nativeType}\n\t\t\t\t\ttabindex={this.focusable ? '0' : '-1'}\n\t\t\t\t\taria-activedescendant={this.wcagActiveDescendant}\n\t\t\t\t\taria-describedby={this.wcagActiveDescendant}\n\t\t\t\t\taria-description={this.wcagDescription}\n\t\t\t\t\taria-controls={this.wcagControls}\n\t\t\t\t\taria-details={this.wcagDetails}\n\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\taria-haspopup={toBoolAttrIfDefined(this.wcagHasPopup)}\n\t\t\t\t\taria-pressed={toBoolAttr(this.isPressed)}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\taria-current={this.wcagCurrent}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot('right-icon') && <gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot('left-icon') && <slot name=\"left-icon\"></slot>}\n\t\t\t\t\t<slot />\n\t\t\t\t\t{this.h.hasSlot('right-icon') && <slot name=\"right-icon\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot('right-icon') && <gov-icon name=\"loader\" class=\"gov-spin-animation\"></gov-icon>}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: PointerEvent): void {\n\t\te.stopPropagation()\n\t\tif (this.disabled === false) {\n\t\t\tthis.govClick.emit(e)\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tthis.govFocus.emit(e)\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\te.preventDefault()\n\t\tthis.govBlur.emit(e)\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.buttonRef.focus()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tif (this.focusable) {\n\t\t\tvalidateWcagRef(this.wcagActiveDescendant, 'aria-activedescendant', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagControls, 'aria-controls', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagDetails, 'aria-details', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagOwns, 'aria-owns', ButtonClass.root)\n\t\t\tvalidateWcagRef(this.wcagHasPopup, 'aria-haspopup', ButtonClass.root)\n\t\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, ButtonClass.root)\n\t\t}\n\t}\n}\n"]}