@gov-design-system-ce/components 4.2.3 → 4.2.5

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 (142) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/gov-button.cjs.entry.js +4 -3
  3. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gov-empty.cjs.entry.js +7 -1
  5. package/dist/cjs/gov-empty.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gov-flex_3.cjs.entry.js +3 -3
  7. package/dist/cjs/gov-flex_3.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gov-form-input_2.cjs.entry.js +1 -1
  9. package/dist/cjs/gov-form-input_2.cjs.entry.js.map +1 -1
  10. package/dist/cjs/gov-form-label.cjs.entry.js +1 -1
  11. package/dist/cjs/gov-form-label.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gov-infobar.cjs.entry.js +6 -2
  13. package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/collection/components/gov-button/button/gov-button.js +22 -3
  16. package/dist/collection/components/gov-button/button/gov-button.js.map +1 -1
  17. package/dist/collection/components/gov-empty/constants.js +5 -0
  18. package/dist/collection/components/gov-empty/constants.js.map +1 -1
  19. package/dist/collection/components/gov-empty/gov-empty.js +26 -1
  20. package/dist/collection/components/gov-empty/gov-empty.js.map +1 -1
  21. package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
  22. package/dist/collection/components/gov-form/label/gov-form-label.js.map +1 -1
  23. package/dist/collection/components/gov-infobar/gov-infobar.js +6 -2
  24. package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -1
  25. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js +6 -6
  26. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.js.map +1 -1
  27. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js +5 -5
  28. package/dist/collection/components/gov-theme-switch/gov-theme-switch.js.map +1 -1
  29. package/dist/collection/pages/Banner.js +10 -0
  30. package/dist/collection/pages/Banner.js.map +1 -1
  31. package/dist/collection/pages/Button.js +18 -0
  32. package/dist/collection/pages/Button.js.map +1 -1
  33. package/dist/collection/pages/Empty.js +26 -0
  34. package/dist/collection/pages/Empty.js.map +1 -1
  35. package/dist/collection/pages/Forms.js +31 -31
  36. package/dist/collection/pages/Forms.js.map +1 -1
  37. package/dist/collection/pages/Home.js +8 -2
  38. package/dist/collection/pages/Home.js.map +1 -1
  39. package/dist/collection/pages/Loading.js +5 -1
  40. package/dist/collection/pages/Loading.js.map +1 -1
  41. package/dist/components/gov-accordion-item.js +1 -1
  42. package/dist/components/gov-attachments-item.js +1 -1
  43. package/dist/components/gov-blockquote.js +1 -1
  44. package/dist/components/gov-breadcrumbs.js +1 -1
  45. package/dist/components/gov-button.js +1 -1
  46. package/dist/components/gov-card.js +1 -1
  47. package/dist/components/gov-chip.js +1 -1
  48. package/dist/components/gov-dialog.js +1 -1
  49. package/dist/components/gov-empty.js +1 -1
  50. package/dist/components/gov-empty.js.map +1 -1
  51. package/dist/components/gov-form-autocomplete.js +1 -1
  52. package/dist/components/gov-form-checkbox.js +1 -1
  53. package/dist/components/gov-form-file.js +1 -1
  54. package/dist/components/gov-form-input.js +1 -1
  55. package/dist/components/gov-form-label.js +1 -1
  56. package/dist/components/gov-form-label.js.map +1 -1
  57. package/dist/components/gov-form-multi-select.js +1 -1
  58. package/dist/components/gov-form-range.js +1 -1
  59. package/dist/components/gov-form-range.js.map +1 -1
  60. package/dist/components/gov-form-select.js +1 -1
  61. package/dist/components/gov-form-switch.js +1 -1
  62. package/dist/components/gov-icon.js +1 -1
  63. package/dist/components/gov-infobar.js +1 -1
  64. package/dist/components/gov-infobar.js.map +1 -1
  65. package/dist/components/gov-link.js +1 -1
  66. package/dist/components/gov-loading.js +1 -1
  67. package/dist/components/gov-pagination.js +1 -1
  68. package/dist/components/gov-skeleton.js +1 -1
  69. package/dist/components/gov-tabs.js +1 -1
  70. package/dist/components/gov-tag.js +1 -1
  71. package/dist/components/gov-theme-switch.js +1 -1
  72. package/dist/components/gov-theme-switch.js.map +1 -1
  73. package/dist/components/gov-tile.js +1 -1
  74. package/dist/components/gov-toast.js +1 -1
  75. package/dist/components/gov-tooltip-content.js +1 -1
  76. package/dist/components/gov-wizard-item.js +1 -1
  77. package/dist/components/{p-11fa70ff.js → p-106a27de.js} +2 -2
  78. package/dist/components/{p-1572effa.js → p-246216b9.js} +2 -2
  79. package/dist/components/{p-8e888b01.js → p-2d1d727d.js} +2 -2
  80. package/dist/components/{p-93f4a242.js → p-5c247bc2.js} +2 -2
  81. package/dist/components/p-80c889e2.js +2 -0
  82. package/dist/components/p-80c889e2.js.map +1 -0
  83. package/dist/components/{p-5b0a3c98.js → p-d1a59544.js} +2 -2
  84. package/dist/components/{p-c150610c.js → p-f7ca5e39.js} +2 -2
  85. package/dist/components/{p-313b4611.js → p-fcc6dd1d.js} +2 -2
  86. package/dist/components/p-fcc6dd1d.js.map +1 -0
  87. package/dist/core/core.css +132 -57
  88. package/dist/core/core.esm.js +1 -1
  89. package/dist/core/core.esm.js.map +1 -1
  90. package/dist/core/p-2fd53723.entry.js +2 -0
  91. package/dist/core/{p-b9f1c2ef.entry.js.map → p-2fd53723.entry.js.map} +1 -1
  92. package/dist/core/p-39d6e51d.entry.js +2 -0
  93. package/dist/core/p-39d6e51d.entry.js.map +1 -0
  94. package/dist/core/p-ac800db4.entry.js +2 -0
  95. package/dist/core/p-ac800db4.entry.js.map +1 -0
  96. package/dist/core/{p-83e14b47.entry.js → p-d3014dc5.entry.js} +2 -2
  97. package/dist/core/{p-83e14b47.entry.js.map → p-d3014dc5.entry.js.map} +1 -1
  98. package/dist/core/p-d45bcd43.entry.js +2 -0
  99. package/dist/core/p-d45bcd43.entry.js.map +1 -0
  100. package/dist/core/p-e7e00fe3.entry.js +2 -0
  101. package/dist/core/{p-774ea182.entry.js.map → p-e7e00fe3.entry.js.map} +1 -1
  102. package/dist/esm/core.js +1 -1
  103. package/dist/esm/gov-button.entry.js +4 -3
  104. package/dist/esm/gov-button.entry.js.map +1 -1
  105. package/dist/esm/gov-empty.entry.js +7 -1
  106. package/dist/esm/gov-empty.entry.js.map +1 -1
  107. package/dist/esm/gov-flex_3.entry.js +3 -3
  108. package/dist/esm/gov-flex_3.entry.js.map +1 -1
  109. package/dist/esm/gov-form-input_2.entry.js +1 -1
  110. package/dist/esm/gov-form-input_2.entry.js.map +1 -1
  111. package/dist/esm/gov-form-label.entry.js +1 -1
  112. package/dist/esm/gov-form-label.entry.js.map +1 -1
  113. package/dist/esm/gov-infobar.entry.js +6 -2
  114. package/dist/esm/gov-infobar.entry.js.map +1 -1
  115. package/dist/esm/loader.js +1 -1
  116. package/dist/hydrate/index.js +30 -17
  117. package/dist/hydrate/index.mjs +30 -17
  118. package/dist/types/components/gov-button/button/gov-button.d.ts +4 -0
  119. package/dist/types/components/gov-empty/constants.d.ts +5 -0
  120. package/dist/types/components/gov-empty/gov-empty.d.ts +5 -1
  121. package/dist/types/components/gov-infobar/gov-infobar.d.ts +2 -0
  122. package/dist/types/components/gov-loading/skeleton/gov-skeleton.d.ts +2 -2
  123. package/dist/types/components/gov-theme-switch/gov-theme-switch.d.ts +1 -1
  124. package/dist/types/components.d.ts +22 -6
  125. package/package.json +1 -1
  126. package/dist/components/p-313b4611.js.map +0 -1
  127. package/dist/components/p-62d01259.js +0 -2
  128. package/dist/components/p-62d01259.js.map +0 -1
  129. package/dist/core/p-774ea182.entry.js +0 -2
  130. package/dist/core/p-a1c825f3.entry.js +0 -2
  131. package/dist/core/p-a1c825f3.entry.js.map +0 -1
  132. package/dist/core/p-b9f1c2ef.entry.js +0 -2
  133. package/dist/core/p-c1584cfe.entry.js +0 -2
  134. package/dist/core/p-c1584cfe.entry.js.map +0 -1
  135. package/dist/core/p-c5a49469.entry.js +0 -2
  136. package/dist/core/p-c5a49469.entry.js.map +0 -1
  137. /package/dist/components/{p-11fa70ff.js.map → p-106a27de.js.map} +0 -0
  138. /package/dist/components/{p-1572effa.js.map → p-246216b9.js.map} +0 -0
  139. /package/dist/components/{p-8e888b01.js.map → p-2d1d727d.js.map} +0 -0
  140. /package/dist/components/{p-93f4a242.js.map → p-5c247bc2.js.map} +0 -0
  141. /package/dist/components/{p-5b0a3c98.js.map → p-d1a59544.js.map} +0 -0
  142. /package/dist/components/{p-c150610c.js.map → p-f7ca5e39.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["toBool","value","indexOf","Tags","GovButton","proxyCustomElement","H","constructor","this","hydrated","h","govHost","host","validateColor","newValue","validateProp","ButtonColors","ButtonClass","root","validateType","ButtonType","validateSize","Sizes","validateNativeType","NativeType","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","removeAttribute","inheritedAttributes","Object","assign","disconnectedCallback","_a","stopObserving","componentWillLoad","color","type","size","nativeType","inheritAriaAttributes","componentDidRender","canValidateWcagOnRender","delay","validateAccessibility","connectedCallback","render","Tag","href","A","BUTTON","undefined","Host","key","class","classes","ref","el","triggerRef","onClick","onClickHandler","bind","onFocus","onFocusHandler","onBlur","onBlurHandler","disabled","id","identifier","target","download","hreflang","rel","name","tabindex","toBoolAttrIfDefined","loading","hasSlot","e","stopPropagation","govClick","emit","component","originalEvent","govFocus","govBlur","setFocus","focus","getRef","focusable","validateAccessibleLabel","getAttribute"],"sources":["../../../packages/core/src/utils/bool.utils.ts","../../../packages/core/src/components/gov-button/button/gov-button.tsx"],"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","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {\n\tButtonClass,\n\tButtonColors,\n\tButtonColorType,\n\tButtonSizesType,\n\tButtonTargetType,\n\tButtonType,\n\tButtonTypesType,\n\tNativeType,\n\tNativeTypesType,\n} from \"./constants\"\nimport {govHost, toBoolAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {toBool} from \"../../../utils/bool.utils\"\nimport {Sizes} from \"../../../core/constants/sizes\"\nimport {validateAccessibleLabel} from \"../../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\nimport {delay} from \"../../../utils/utils\"\nimport {ButtonEvent} from \"./gov-button.types\"\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\n\nenum Tags {\n\tA = \"a\",\n\tBUTTON = \"button\",\n}\n\n@Component({\n\ttag: \"gov-button\",\n})\nexport class GovButton {\n\tprivate h: GovHost\n\tprivate triggerRef?: HTMLButtonElement | HTMLLinkElement\n\tprivate attributeObserver: AttributeObserver\n\tprivate hydrated = false\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 color: ButtonColorType\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: ButtonTypesType\n\t/**\n\t * Expands the button to fill 100% of the container width\n\t */\n\t@Prop({reflect: true}) readonly expanded: boolean = false\n\t/**\n\t * Expands the button to fill 100% of the container width only on mobile\n\t */\n\t@Prop({reflect: true, attribute: \"expanded-mobile\"}) readonly expandedMobile: 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 parameter\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 * Emitted when the button click\n\t */\n\t@Event({eventName: \"gov-click\"}) govClick: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button has focus\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<ButtonEvent>\n\t/**\n\t * Emitted when the button loses focus\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<ButtonEvent>\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(ButtonColors, newValue, ButtonClass.root)\n\t}\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(ButtonType, 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() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateType(this.type)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateNativeType(this.nativeType)\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateAccessibility()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tthis.hydrated = true\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 size={this.size}\n\t\t\t\t hydrated={this.hydrated}\n\t\t\t\t color={this.color}\n\t\t\t\t class={this.h.classes(ButtonClass.root)}\n\t\t\t\t type={this.type}>\n\t\t\t\t<Tag\n\t\t\t\t\tclass=\"element\"\n\t\t\t\t\tref={el => (this.triggerRef = el as HTMLButtonElement | HTMLLinkElement)}\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\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.disabled ? \"-1\" : \"0\"}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t>\n\t\t\t\t\t{toBool(this.loading) && !this.h.hasSlot(\"icon-end\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\" type=\"components\"></gov-icon>}\n\t\t\t\t\t{this.h.hasSlot(\"icon-start\") && <slot name=\"icon-start\"></slot>}\n\t\t\t\t\t<slot/>\n\t\t\t\t\t{this.h.hasSlot(\"icon-end\") && <slot name=\"icon-end\"></slot>}\n\t\t\t\t\t{toBool(this.loading) && this.h.hasSlot(\"icon-end\") &&\n\t\t\t\t\t\t<gov-icon name=\"loader\" class=\"gov-spin-animation\" type=\"components\"></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({\n\t\t\t\tcomponent: ButtonClass.root,\n\t\t\t\toriginalEvent: e,\n\t\t\t\tref: this.host,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: ButtonClass.root,\n\t\t\toriginalEvent: e,\n\t\t\tref: this.host,\n\t\t})\n\t}\n\n\t/**\n\t * Focus button element\n\t */\n\t@Method()\n\tasync setFocus(): Promise<void> {\n\t\tthis.triggerRef.focus()\n\t}\n\n\t/**\n\t * Returns a clickable element instance\n\t */\n\t@Method()\n\tasync getRef() {\n\t\treturn this.triggerRef\n\t}\n\n\t/**\n\t * Validate the Accessibility attributes of the component\n\t */\n\t@Method()\n\tasync validateAccessibility(): Promise<void> {\n\t\tif (this.focusable) {\n\t\t\tvalidateAccessibleLabel(this.triggerRef.getAttribute('aria-label'), this.triggerRef.getAttribute('aria-labelledby'), ButtonClass.root, this.host)\n\t\t}\n\t}\n}\n"],"mappings":"ubAAgBA,EAAOC,GACtB,UAAWA,IAAU,SAAU,CAC9B,MAAO,CAAC,OAAQ,OAAQ,OAAQ,KAAKC,QAAQD,MAAY,C,MACnD,UAAWA,IAAU,SAAU,CACrC,OAAOA,EAAQ,C,MACT,UAAWA,IAAU,UAAW,CACtC,OAAOA,C,KACD,CACN,OAAOA,EAAQ,KAAO,K,CAExB,CCeA,IAAKE,GAAL,SAAKA,GACJA,EAAA,SACAA,EAAA,kBACA,EAHD,CAAKA,MAAI,K,MAQIC,EAASC,EAAA,MAAAD,UAAAE,EAMrB,WAAAC,G,wIAFQC,KAAAC,SAAW,M,+BAesC,I,kCAQL,M,oBAIoC,M,kCASpC,M,gBAKJ,S,iLAuCV,K,mDAsCK,GAnH1CD,K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ACF3E,KAAKgF,SAASH,KAAK,CAClBC,UAAWrE,EAAYC,KACvBqE,cAAeL,EACftB,IAAKpD,KAAKI,M,CAIJ,aAAAyD,CAAca,GACrBA,EAAEC,kBACF3E,KAAKiF,QAAQJ,KAAK,CACjBC,UAAWrE,EAAYC,KACvBqE,cAAeL,EACftB,IAAKpD,KAAKI,M,CAQZ,cAAM8E,GACLlF,KAAKsD,WAAW6B,O,CAOjB,YAAMC,GACL,OAAOpF,KAAKsD,U,CAOb,2BAAMd,GACL,GAAIxC,KAAKqF,UAAW,CACnBC,EAAwBtF,KAAKsD,WAAWiC,aAAa,cAAevF,KAAKsD,WAAWiC,aAAa,mBAAoB9E,EAAYC,KAAMV,KAAKI,K","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,h as e,d as n}from"./p-42200001.js";import{p as i}from"./p-e0e2e9c1.js";import{C as o}from"./p-5aad3497.js";import{S as r}from"./p-92f420cb.js";import{i as a,a as c,b as l}from"./p-e8ec030e.js";import{g as h}from"./p-ea7fdd2e.js";import{v as u}from"./p-0b3574c2.js";i(r,["_XS","_S","_M","_L","_XL","_2XL","_3XL","_4XL","_5XL"]);const f=i(o,["DEFAULT","PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING","DISABLED","WHITE","BLACK"]);var d;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(d||(d={}));const m={root:"gov-icon",holder:"gov-icon__holder"};const p="4.2.3";const v=()=>p;const w={};const g={};const y=t=>t.startsWith("http://")||t.startsWith("https://");const C=(t,s,e)=>{if(y(t)){return`${t}/${e}/${s}.svg?v=${v()}`}return`${t}/${e}/${s}.svg`+`?v=${v()}`};async function I({name:t,type:s}){const e=s+"-"+t;if(w[e]){return w[e]}if(!g[e]){g[e]=fetch(C(a(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const n=await g[e];w[e]=n;return n}const b=(t,s,e)=>{if(!c){return}let n="";if(e){const t=new Date;t.setTime(t.getTime()+e*24*60*60*1e3);n="; expires="+t.toUTCString()}document.cookie=`${t}=${encodeURIComponent(s)}${n}; path=/`};const E=t=>{if(!c){return null}const s=t+"=";const e=document.cookie.split(";");for(let t=0;t<e.length;t++){let n=e[t].trim();if(n.startsWith(s)){return decodeURIComponent(n.substring(s.length))}}return null};const L=t=>{try{const s=new DOMParser;const e=s.parseFromString(t,"image/svg+xml");const n=e.querySelector("parsererror");if(n){return false}const i=e.documentElement;if(i.tagName.toLowerCase()!=="svg"){return false}return true}catch(t){return false}};const S=t(class t extends s{constructor(){super();this.__registerHost();this.size=undefined;this.color=undefined;this.name=null;this.type="components";this.visible=false;this.error=false;this.h=h(this.host)}validateSize(t){u(r,t,m.root)}validateColor(t){u(f,t,m.root)}async loadIconPathData(){const{name:t,visible:s}=this;if(!t||!s){return}await this.loadIcon()}connectedCallback(){if(l()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){this.validateSize(this.size);this.validateColor(this.color);await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}async loadIcon(){try{const{name:t,type:s}=this;const e=await I({name:t,type:s});const n=L(e);this.host.innerHTML=n?e:null}catch(t){this.host.innerHTML="";this.error=true}}render(){if(this.error){return null}return e(n,{class:this.h.classes(m.root),size:this.size,color:this.color})}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}}},[0,"gov-icon",{size:[513],color:[513],name:[513],type:[513],visible:[32],error:[32]},undefined,{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}]);function $(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,S)}break}}))}$();export{S as G,$ as d,E as g,b as s};
2
- //# sourceMappingURL=p-5b0a3c98.js.map
1
+ import{p as t,H as s,h as e,d as n}from"./p-42200001.js";import{p as i}from"./p-e0e2e9c1.js";import{C as o}from"./p-5aad3497.js";import{S as r}from"./p-92f420cb.js";import{i as a,a as c,b as l}from"./p-e8ec030e.js";import{g as h}from"./p-ea7fdd2e.js";import{v as u}from"./p-0b3574c2.js";i(r,["_XS","_S","_M","_L","_XL","_2XL","_3XL","_4XL","_5XL"]);const f=i(o,["DEFAULT","PRIMARY","SECONDARY","NEUTRAL","ERROR","SUCCESS","WARNING","DISABLED","WHITE","BLACK"]);var d;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(d||(d={}));const m={root:"gov-icon",holder:"gov-icon__holder"};const p="4.2.5";const v=()=>p;const w={};const g={};const y=t=>t.startsWith("http://")||t.startsWith("https://");const C=(t,s,e)=>{if(y(t)){return`${t}/${e}/${s}.svg?v=${v()}`}return`${t}/${e}/${s}.svg`+`?v=${v()}`};async function I({name:t,type:s}){const e=s+"-"+t;if(w[e]){return w[e]}if(!g[e]){g[e]=fetch(C(a(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const n=await g[e];w[e]=n;return n}const b=(t,s,e)=>{if(!c){return}let n="";if(e){const t=new Date;t.setTime(t.getTime()+e*24*60*60*1e3);n="; expires="+t.toUTCString()}document.cookie=`${t}=${encodeURIComponent(s)}${n}; path=/`};const E=t=>{if(!c){return null}const s=t+"=";const e=document.cookie.split(";");for(let t=0;t<e.length;t++){let n=e[t].trim();if(n.startsWith(s)){return decodeURIComponent(n.substring(s.length))}}return null};const L=t=>{try{const s=new DOMParser;const e=s.parseFromString(t,"image/svg+xml");const n=e.querySelector("parsererror");if(n){return false}const i=e.documentElement;if(i.tagName.toLowerCase()!=="svg"){return false}return true}catch(t){return false}};const S=t(class t extends s{constructor(){super();this.__registerHost();this.size=undefined;this.color=undefined;this.name=null;this.type="components";this.visible=false;this.error=false;this.h=h(this.host)}validateSize(t){u(r,t,m.root)}validateColor(t){u(f,t,m.root)}async loadIconPathData(){const{name:t,visible:s}=this;if(!t||!s){return}await this.loadIcon()}connectedCallback(){if(l()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){this.validateSize(this.size);this.validateColor(this.color);await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}async loadIcon(){try{const{name:t,type:s}=this;const e=await I({name:t,type:s});const n=L(e);this.host.innerHTML=n?e:null}catch(t){this.host.innerHTML="";this.error=true}}render(){if(this.error){return null}return e(n,{class:this.h.classes(m.root),size:this.size,color:this.color})}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}}},[0,"gov-icon",{size:[513],color:[513],name:[513],type:[513],visible:[32],error:[32]},undefined,{size:["validateSize"],color:["validateColor"],name:["loadIconPathData"]}]);function $(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,S)}break}}))}$();export{S as G,$ as d,E as g,b as s};
2
+ //# sourceMappingURL=p-d1a59544.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as a,h as s,d as i}from"./p-42200001.js";import{a as c}from"./p-07165d99.js";import{a as o}from"./p-10cad7f1.js";import{c as m}from"./p-e8ec030e.js";import{d as n}from"./p-e0e2e9c1.js";import{g as r}from"./p-ea7fdd2e.js";import{d}from"./p-62d01259.js";import{d as l}from"./p-5b0a3c98.js";const f="gov-attachments-item,.gov-attachments-item{position:relative;display:flex;width:100%;gap:var(--spacing-s)}gov-attachments-item__messages>*:last-child,.gov-attachments-item__messages>*:last-child{margin-bottom:0}gov-attachments-item__file,.gov-attachments-item__file{display:flex;gap:var(--spacing-s)}gov-attachments-item__name,.gov-attachments-item__name{display:flex;gap:var(--spacing-s);flex-wrap:wrap;align-items:center;margin:0;color:var(--name-color, var(--text-primary))}gov-attachments-item__name span,.gov-attachments-item__name span{font-size:var(--font-size-body-xs);line-height:150%;font-weight:400;color:var(--decor-color, var(--text-secondary))}";const b=f;const p=e(class e extends t{constructor(){super();this.__registerHost();this.govRemove=a(this,"gov-remove",7);this.accessibleRemoveLabel=undefined;this.accessibleRemoveLabelledBy=undefined;this.h=r(this.host)}async componentDidRender(){if(m()){await n(500);await this.validateAccessibility()}}render(){return s(i,{key:"a8fffc03fb890c1aaae5a1d63240747f5fcb013e",class:this.h.classes(c.root),role:"listitem"},s("div",{key:"0aa555d1c5b3bdf089cf020db1271e40389522f9",class:c.file},s("p",{key:"46014b9e9d9a46fea6f813ef271815be6ab6dfc4",class:c.name},s("slot",{key:"806f9dc2b2ee44248f7fe613e8362d92ed938ba8"}),s("slot",{key:"97d69e72afd5063f41ea7b41e50012893ee5027c",name:"info"})),s("gov-button",{key:"6c40ff9ae6be99cde30fde276db287a3d14dccd1",color:"primary",type:"base",size:"s","aria-label":this.accessibleRemoveLabel,"aria-labelledby":this.accessibleRemoveLabelledBy,"on-gov-click":this.govRemove.emit},s("gov-icon",{key:"24871273b10ca807811acd15dabb49c6a45d76d1",slot:"icon-start",name:"x-lg",type:"components"}))),this.h.hasSlot("message")&&s("div",{key:"7683c6c6bfd1ca4b9660ee56ec190472970d0ac8",class:c.messages},s("slot",{key:"20b46c868809d19f9c67105a4c4774df9688a2c1",name:"message"})))}async validateAccessibility(){o(this.accessibleRemoveLabel,this.accessibleRemoveLabelledBy,c.root,this.host)}get host(){return this}static get style(){return b}},[4,"gov-attachments-item",{accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleRemoveLabelledBy:[1,"accessible-remove-labelledby"],validateAccessibility:[64]}]);function g(){if(typeof customElements==="undefined"){return}const e=["gov-attachments-item","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-attachments-item":if(!customElements.get(e)){customElements.define(e,p)}break;case"gov-button":if(!customElements.get(e)){d()}break;case"gov-icon":if(!customElements.get(e)){l()}break}}))}g();export{p as G,g as d};
2
- //# sourceMappingURL=p-c150610c.js.map
1
+ import{p as e,H as t,c as a,h as s,d as i}from"./p-42200001.js";import{a as c}from"./p-07165d99.js";import{a as o}from"./p-10cad7f1.js";import{c as m}from"./p-e8ec030e.js";import{d as n}from"./p-e0e2e9c1.js";import{g as r}from"./p-ea7fdd2e.js";import{d}from"./p-80c889e2.js";import{d as l}from"./p-d1a59544.js";const f="gov-attachments-item,.gov-attachments-item{position:relative;display:flex;width:100%;gap:var(--spacing-s)}gov-attachments-item__messages>*:last-child,.gov-attachments-item__messages>*:last-child{margin-bottom:0}gov-attachments-item__file,.gov-attachments-item__file{display:flex;gap:var(--spacing-s)}gov-attachments-item__name,.gov-attachments-item__name{display:flex;gap:var(--spacing-s);flex-wrap:wrap;align-items:center;margin:0;color:var(--name-color, var(--text-primary))}gov-attachments-item__name span,.gov-attachments-item__name span{font-size:var(--font-size-body-xs);line-height:150%;font-weight:400;color:var(--decor-color, var(--text-secondary))}";const b=f;const p=e(class e extends t{constructor(){super();this.__registerHost();this.govRemove=a(this,"gov-remove",7);this.accessibleRemoveLabel=undefined;this.accessibleRemoveLabelledBy=undefined;this.h=r(this.host)}async componentDidRender(){if(m()){await n(500);await this.validateAccessibility()}}render(){return s(i,{key:"a8fffc03fb890c1aaae5a1d63240747f5fcb013e",class:this.h.classes(c.root),role:"listitem"},s("div",{key:"0aa555d1c5b3bdf089cf020db1271e40389522f9",class:c.file},s("p",{key:"46014b9e9d9a46fea6f813ef271815be6ab6dfc4",class:c.name},s("slot",{key:"806f9dc2b2ee44248f7fe613e8362d92ed938ba8"}),s("slot",{key:"97d69e72afd5063f41ea7b41e50012893ee5027c",name:"info"})),s("gov-button",{key:"6c40ff9ae6be99cde30fde276db287a3d14dccd1",color:"primary",type:"base",size:"s","aria-label":this.accessibleRemoveLabel,"aria-labelledby":this.accessibleRemoveLabelledBy,"on-gov-click":this.govRemove.emit},s("gov-icon",{key:"24871273b10ca807811acd15dabb49c6a45d76d1",slot:"icon-start",name:"x-lg",type:"components"}))),this.h.hasSlot("message")&&s("div",{key:"7683c6c6bfd1ca4b9660ee56ec190472970d0ac8",class:c.messages},s("slot",{key:"20b46c868809d19f9c67105a4c4774df9688a2c1",name:"message"})))}async validateAccessibility(){o(this.accessibleRemoveLabel,this.accessibleRemoveLabelledBy,c.root,this.host)}get host(){return this}static get style(){return b}},[4,"gov-attachments-item",{accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleRemoveLabelledBy:[1,"accessible-remove-labelledby"],validateAccessibility:[64]}]);function g(){if(typeof customElements==="undefined"){return}const e=["gov-attachments-item","gov-button","gov-icon"];e.forEach((e=>{switch(e){case"gov-attachments-item":if(!customElements.get(e)){customElements.define(e,p)}break;case"gov-button":if(!customElements.get(e)){d()}break;case"gov-icon":if(!customElements.get(e)){l()}break}}))}g();export{p as G,g as d};
2
+ //# sourceMappingURL=p-f7ca5e39.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as i,h as s,d as e}from"./p-42200001.js";import{p as a}from"./p-e0e2e9c1.js";import{S as o}from"./p-92f420cb.js";import{C as n}from"./p-5aad3497.js";import{g as r}from"./p-ea7fdd2e.js";import{v as h}from"./p-0b3574c2.js";import{A as l,a as c,i as p}from"./p-33d5d1ed.js";const d=a(o,["_XS","_S","_M","_L","_XL"]);a(n,["PRIMARY","NEUTRAL"]);var m;(function(t){t["CIRCLE"]="circle";t["LINE"]="line"})(m||(m={}));var u;(function(t){t["PULSE"]="pulse";t["PROGRESS"]="progress";t["FALSE"]="false"})(u||(u={}));const f={root:"gov-skeleton"};const v=t(class t extends i{constructor(){super();this.__registerHost();this.items=[];this.size="m";this.color="neutral";this.shape="line";this.width=null;this.height=null;this.animation="progress";this.inheritedAttributes={};this.h=r(this.host)}validateSize(t){h(d,t,f.root)}validateShape(t){h(m,t,f.root)}validateAnimation(t){h(u,t,f.root)}componentDidLoad(){this.attributeObserver=new l(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(c)}componentWillLoad(){this.validateSize(this.size);this.validateShape(this.shape);this.validateAnimation(this.animation);this.init();this.inheritedAttributes=p(this.host)}componentWillUpdate(){this.init()}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}init(){this.items.fill(1)}get style(){const t={width:null,height:null};if(this.width){t.width=this.width}if(this.height){t.height=this.height}return Object.assign({},t)}render(){return s(e,Object.assign({key:"fa43a5bc92210a51bb681449542c6f5c2863e3ad",size:this.size,color:this.color,class:{[f.root]:true,circle:this.shape==="circle",line:this.shape==="line",progress:this.animation==="progress",pulse:this.animation==="pulse"}},this.inheritedAttributes,{"aria-busy":"true","aria-valuemin":"0","aria-valuemax":"100",role:"progressbar",tabindex:"0",style:this.style}))}get host(){return this}static get watchers(){return{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}}},[0,"gov-skeleton",{size:[1],color:[1],shape:[1],width:[1],height:[1],animation:[1],inheritedAttributes:[32]},undefined,{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}]);function b(){if(typeof customElements==="undefined"){return}const t=["gov-skeleton"];t.forEach((t=>{switch(t){case"gov-skeleton":if(!customElements.get(t)){customElements.define(t,v)}break}}))}b();export{v as G,b as d};
2
- //# sourceMappingURL=p-313b4611.js.map
1
+ import{p as t,H as i,h as s,d as e}from"./p-42200001.js";import{p as a}from"./p-e0e2e9c1.js";import{S as o}from"./p-92f420cb.js";import{C as n}from"./p-5aad3497.js";import{g as r}from"./p-ea7fdd2e.js";import{v as h}from"./p-0b3574c2.js";import{A as l,a as c,i as p}from"./p-33d5d1ed.js";const d=a(o,["_XS","_S","_M","_L","_XL"]);a(n,["PRIMARY","NEUTRAL"]);var m;(function(t){t["CIRCLE"]="circle";t["LINE"]="line"})(m||(m={}));var u;(function(t){t["PULSE"]="pulse";t["PROGRESS"]="progress";t["FALSE"]="false"})(u||(u={}));const f={root:"gov-skeleton"};const v=t(class t extends i{constructor(){super();this.__registerHost();this.items=[];this.size="m";this.color="neutral";this.shape="line";this.width=null;this.height=null;this.animation="progress";this.inheritedAttributes={};this.h=r(this.host)}validateSize(t){h(d,t,f.root)}validateShape(t){h(m,t,f.root)}validateAnimation(t){h(u,t,f.root)}componentDidLoad(){this.attributeObserver=new l(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(c)}componentWillLoad(){this.validateSize(this.size);this.validateShape(this.shape);this.validateAnimation(this.animation);this.init();this.inheritedAttributes=p(this.host)}componentWillUpdate(){this.init()}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}init(){this.items.fill(1)}get style(){const t={width:null,height:null};if(this.width){t.width=this.width}if(this.height){t.height=this.height}return Object.assign({},t)}render(){return s(e,Object.assign({key:"613250c817d9f03aa3af10639b01b523c3107868",size:this.size,color:this.color,class:{[f.root]:true,circle:this.shape==="circle",line:this.shape==="line",progress:this.animation==="progress",pulse:this.animation==="pulse"}},this.inheritedAttributes,{"aria-busy":"true","aria-valuemin":"0","aria-valuemax":"100",role:"progressbar",tabindex:"0",style:this.style}))}get host(){return this}static get watchers(){return{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}}},[0,"gov-skeleton",{size:[513],color:[1],shape:[1],width:[513],height:[513],animation:[1],inheritedAttributes:[32]},undefined,{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}]);function g(){if(typeof customElements==="undefined"){return}const t=["gov-skeleton"];t.forEach((t=>{switch(t){case"gov-skeleton":if(!customElements.get(t)){customElements.define(t,v)}break}}))}g();export{v as G,g as d};
2
+ //# sourceMappingURL=p-fcc6dd1d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SkeletonSizes","pick","Sizes","Colors","SkeletonShapes","SkeletonAnimation","SkeletonClass","root","GovSkeleton","proxyCustomElement","H","constructor","this","items","h","govHost","host","validateSize","newValue","validateProp","validateShape","validateAnimation","componentDidLoad","attributeObserver","AttributeObserver","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","size","shape","animation","init","inheritedAttributes","inheritAriaAttributes","componentWillUpdate","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","fill","style","dimenssionsStyles","width","height","render","Host","key","color","class","circle","line","progress","pulse","role","tabindex"],"sources":["../../../packages/core/src/components/gov-loading/skeleton/constants.ts","../../../packages/core/src/components/gov-loading/skeleton/gov-skeleton.tsx"],"sourcesContent":["import { pick } from \"../../../utils/utils\"\nimport { ValueOf } from \"../../../types/interfaces\"\nimport {Sizes} from \"../../../core/constants/sizes\";\nimport {Colors} from \"../../../core/constants/colors\";\n\nexport const SkeletonSizes = pick(Sizes, ['_XS', '_S', '_M', '_L', '_XL'])\nexport type SkeletonSizesType = `${ValueOf<typeof SkeletonSizes>}`\n\nexport const SkeletonColors = pick(Colors, [\"PRIMARY\", \"NEUTRAL\"])\nexport type SkeletonColorType = `${ValueOf<typeof SkeletonColors>}`\n\nexport enum SkeletonShapes {\n\tCIRCLE = 'circle',\n\tLINE = 'line'\n}\nexport type SkeletonShapesType = `${ValueOf<typeof SkeletonShapes>}`\n\nexport enum SkeletonAnimation {\n\tPULSE = 'pulse',\n\tPROGRESS = 'progress',\n\tFALSE = 'false'\n}\nexport type SkeletonAnimationType = `${ValueOf<typeof SkeletonAnimation>}`\n\nexport const SkeletonClass = {\n\troot: 'gov-skeleton',\n}\n","import {Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {\n\tSkeletonAnimation,\n\tSkeletonAnimationType,\n\tSkeletonClass,\n\tSkeletonColorType,\n\tSkeletonShapes,\n\tSkeletonShapesType,\n\tSkeletonSizes,\n} from \"./constants\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {govHost} from \"../../../helpers/Dom/template\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {FormInputSizesType} from \"../../gov-form/input/constants\";\nimport {AttributeObserver, Attributes} from \"../../../helpers/Dom/attribute\";\nimport {ariaAttributes} from \"../../../helpers/Accessibility/attributes\";\nimport {inheritAriaAttributes} from \"../../../helpers/Accessibility/accessibility\";\n\n@Component({\n\ttag: \"gov-skeleton\",\n})\nexport class GovSkeleton {\n\th: GovHost\n\tprivate attributeObserver: AttributeObserver\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t}\n\n\t@Element() host: HTMLGovSkeletonElement\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop({reflect: true}) readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Style variation of the skeleton.\n\t */\n\t@Prop() readonly color?: SkeletonColorType = \"neutral\"\n\t/**\n\t * Shape of the skeleton\n\t */\n\t@Prop() shape?: SkeletonShapesType = \"line\"\n\t/**\n\t * Width of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop({reflect: true}) width?: string = null\n\t/**\n\t * Height of the skeleton ex. 100px, 100%, auto etc.\n\t */\n\t@Prop({reflect: true}) height?: string = null\n\t/**\n\t * Animation type\n\t */\n\t@Prop() animation?: SkeletonAnimationType = \"progress\"\n\n\titems: number[] = []\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(SkeletonSizes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('shape')\n\tvalidateShape(newValue: string): void {\n\t\tvalidateProp(SkeletonShapes, newValue, SkeletonClass.root)\n\t}\n\n\t@Watch('animation')\n\tvalidateAnimation(newValue: string): void {\n\t\tvalidateProp(SkeletonAnimation, newValue, SkeletonClass.root)\n\t}\n\n\t@State() inheritedAttributes: Attributes = {}\n\n\tcomponentDidLoad() {\n\t\tthis.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {\n\t\t\tthis.onAriaAttributeChange(attributeName, newValue);\n\t\t});\n\n\t\tthis.attributeObserver.startObserving(ariaAttributes);\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateSize(this.size)\n\t\tthis.validateShape(this.shape)\n\t\tthis.validateAnimation(this.animation)\n\t\tthis.init()\n\t\tthis.inheritedAttributes = inheritAriaAttributes(this.host);\n\t}\n\n\tcomponentWillUpdate() {\n\t\tthis.init()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.attributeObserver?.stopObserving();\n\t}\n\n\tonAriaAttributeChange(attributeName: string, newValue: string) {\n\t\tthis.host.removeAttribute(attributeName)\n\t\tthis.inheritedAttributes = {...this.inheritedAttributes, [attributeName]: newValue};\n\t}\n\n\tinit() {\n\t\tthis.items.fill(1)\n\t}\n\n\tget style() {\n\t\tconst dimenssionsStyles: {\n\t\t\twidth?: string,\n\t\t\theight?: string,\n\t\t} = {\n\t\t\twidth: null,\n\t\t\theight: null,\n\t\t}\n\t\tif (this.width) {\n\t\t\tdimenssionsStyles.width = this.width\n\t\t}\n\n\t\tif (this.height) {\n\t\t\tdimenssionsStyles.height = this.height\n\t\t}\n\n\t\treturn {...dimenssionsStyles}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host size={this.size}\n\t\t\t\t color={this.color}\n\t\t\t\t class={{\n\t\t\t\t\t [SkeletonClass.root]: true,\n\t\t\t\t\t circle: this.shape === \"circle\",\n\t\t\t\t\t line: this.shape === \"line\",\n\t\t\t\t\t progress: this.animation === \"progress\",\n\t\t\t\t\t pulse: this.animation === \"pulse\",\n\t\t\t\t }}\n\t\t\t\t {...this.inheritedAttributes}\n\t\t\t\t aria-busy=\"true\"\n\t\t\t\t aria-valuemin=\"0\"\n\t\t\t\t aria-valuemax=\"100\"\n\t\t\t\t role=\"progressbar\"\n\t\t\t\t tabindex=\"0\"\n\t\t\t\t style={this.style}>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"+RAKO,MAAMA,EAAgBC,EAAKC,EAAO,CAAC,MAAO,KAAM,KAAM,KAAM,QAGrCD,EAAKE,EAAQ,CAAC,UAAW,YAGvD,IAAYC,GAAZ,SAAYA,GACXA,EAAA,mBACAA,EAAA,cACA,EAHD,CAAYA,MAAc,KAM1B,IAAYC,GAAZ,SAAYA,GACXA,EAAA,iBACAA,EAAA,uBACAA,EAAA,gBACA,EAJD,CAAYA,MAAiB,KAOtB,MAAMC,EAAgB,CAC5BC,KAAM,gB,MCJMC,EAAWC,EAAA,MAAAD,UAAAE,EAIvB,WAAAC,G,8BA8BAC,KAAAC,MAAkB,G,UAtB0C,I,WAIf,U,WAIR,O,WAIG,K,YAIC,K,eAIG,W,yBAmBD,GA9C1CD,KAAKE,EAAIC,EAAQH,KAAKI,K,CAgCvB,YAAAC,CAAaC,GACZC,EAAanB,EAAekB,EAAUZ,EAAcC,K,CAIrD,aAAAa,CAAcF,GACbC,EAAaf,EAAgBc,EAAUZ,EAAcC,K,CAItD,iBAAAc,CAAkBH,GACjBC,EAAad,EAAmBa,EAAUZ,EAAcC,K,CAKzD,gBAAAe,GACCV,KAAKW,kBAAoB,IAAIC,EAAkBZ,KAAKI,MAAM,CAACS,EAAeP,KACzEN,KAAKc,sBAAsBD,EAAeP,EAAS,IAGpDN,KAAKW,kBAAkBI,eAAeC,E,CAGvC,iBAAAC,GACCjB,KAAKK,aAAaL,KAAKkB,MACv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