@gov-design-system-ce/components 4.6.3 → 4.6.4
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.
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -1
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/gov-banner.cjs.entry.js +3 -3
- package/dist/cjs/gov-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-banner.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-flex_3.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +67 -23
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-autocomplete.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-form-file.cjs.entry.js +32 -3
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-file.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-search.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-form-select.cjs.entry.js +8 -15
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-select.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-tooltip.gov-tooltip-content.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-tooltip_2.cjs.entry.js +34 -9
- package/dist/cjs/gov-tooltip_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +2 -2
- package/dist/cjs/gov-wizard.cjs.entry.js +1 -1
- package/dist/cjs/index-BEF5cZxd.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gov-banner/gov-banner.js +4 -4
- package/dist/collection/components/gov-banner/gov-banner.js.map +1 -1
- package/dist/collection/components/gov-form/autocomplete/autocomplete.utils.js +14 -0
- package/dist/collection/components/gov-form/autocomplete/autocomplete.utils.js.map +1 -0
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +76 -22
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.js +34 -3
- package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.js +2 -2
- package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js +8 -15
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +22 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip.js +31 -8
- package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
- package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
- package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-accordion.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-attachments.js +1 -1
- package/dist/components/gov-backdrop.js +1 -1
- package/dist/components/gov-banner.js +1 -1
- package/dist/components/gov-banner.js.map +1 -1
- package/dist/components/gov-blockquote.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-breadcrumbs.js.map +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-chip.js +1 -1
- package/dist/components/gov-collapsible.js +1 -1
- package/dist/components/gov-collapsible.js.map +1 -1
- package/dist/components/gov-container.js +1 -1
- package/dist/components/gov-control-group.js +1 -1
- package/dist/components/gov-cookiebar.js +1 -1
- package/dist/components/gov-dialog.js +1 -1
- package/dist/components/gov-dropdown.js +1 -1
- package/dist/components/gov-empty.js +1 -1
- package/dist/components/gov-error-code.js +1 -1
- package/dist/components/gov-flex.js +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox-group.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-control.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-group.js +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-message.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-multi-select.js.map +1 -1
- package/dist/components/gov-form-radio-group.js +1 -1
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-range.js +1 -1
- package/dist/components/gov-form-range.js.map +1 -1
- package/dist/components/gov-form-search.js +1 -1
- package/dist/components/gov-form-search.js.map +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-grid-item.js +1 -1
- package/dist/components/gov-grid.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-layout-column.js +1 -1
- package/dist/components/gov-layout.js +1 -1
- package/dist/components/gov-link.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-message.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-skeleton.js +1 -1
- package/dist/components/gov-spacer.js +1 -1
- package/dist/components/gov-stepper-item.js +1 -1
- package/dist/components/gov-stepper.js +1 -1
- package/dist/components/gov-tabs-item.js +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tag.js +1 -1
- package/dist/components/gov-theme-switch.js +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-tooltip.js +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/gov-wizard.js +1 -1
- package/dist/components/{p-DKo9A5gq.js → p-BHRF-5cf.js} +2 -2
- package/dist/components/{p-9imLQpxb.js → p-BSr8e18S.js} +2 -2
- package/dist/components/{p-BNnuBQvo.js → p-BxS4InzB.js} +2 -2
- package/dist/components/{p-CfaJM4SA.js → p-CMmyR4-k.js} +2 -2
- package/dist/components/{p-B0KFtEn3.js → p-CU0plGZP.js} +2 -2
- package/dist/components/{p-BrdXh0mI.js → p-CXPP9vec.js} +2 -2
- package/dist/components/{p-djqfSbq-.js → p-C_URF9Su.js} +2 -2
- package/dist/components/{p-yqJEurSE.js → p-CnKqUwf9.js} +2 -2
- package/dist/components/p-DEthsMuE.js +2 -0
- package/dist/components/p-DEthsMuE.js.map +1 -0
- package/dist/components/{p-Bv5L0j6n.js → p-DN5pb9xA.js} +2 -2
- package/dist/components/{p-DesycS6d.js → p-iTwUkISB.js} +2 -2
- package/dist/components/{p-BZTY3MxF.js → p-ibUK7mfI.js} +2 -2
- package/dist/components/p-keC6luw7.js +2 -0
- package/dist/components/p-keC6luw7.js.map +1 -0
- package/dist/components/p-pJ_vPAO0.js +2 -0
- package/dist/components/p-pJ_vPAO0.js.map +1 -0
- package/dist/components/p-yIpIIG5A.js +2 -0
- package/dist/components/p-yIpIIG5A.js.map +1 -0
- package/dist/core/core.css +47 -47
- package/dist/core/core.esm.js +1 -1
- package/dist/core/gov-banner.entry.esm.js.map +1 -1
- package/dist/core/gov-form-autocomplete.entry.esm.js.map +1 -1
- package/dist/core/gov-form-file.entry.esm.js.map +1 -1
- package/dist/core/gov-form-search.entry.esm.js.map +1 -1
- package/dist/core/gov-form-select.entry.esm.js.map +1 -1
- package/dist/core/gov-tooltip.gov-tooltip-content.entry.esm.js.map +1 -1
- package/dist/core/{p-4da8ac1d.entry.js → p-10991f00.entry.js} +2 -2
- package/dist/core/p-19300834.entry.js +2 -0
- package/dist/core/{p-bd389bfd.entry.js.map → p-19300834.entry.js.map} +1 -1
- package/dist/core/p-4e2faea7.entry.js +2 -0
- package/dist/core/p-4e2faea7.entry.js.map +1 -0
- package/dist/core/p-7f513718.entry.js +2 -0
- package/dist/core/p-7f513718.entry.js.map +1 -0
- package/dist/core/p-8d47e346.entry.js +2 -0
- package/dist/core/p-8d47e346.entry.js.map +1 -0
- package/dist/core/p-DQuL1Twl.js.map +1 -1
- package/dist/core/p-afe254cb.entry.js +2 -0
- package/dist/core/p-afe254cb.entry.js.map +1 -0
- package/dist/core/{p-469f14db.entry.js → p-bec959c4.entry.js} +2 -2
- package/dist/core/p-d9d29f50.entry.js +2 -0
- package/dist/core/p-d9d29f50.entry.js.map +1 -0
- package/dist/core/{p-4d365881.entry.js → p-f75ad657.entry.js} +2 -2
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -1
- package/dist/esm/core.js +1 -1
- package/dist/esm/gov-banner.entry.js +3 -3
- package/dist/esm/gov-banner.entry.js.map +1 -1
- package/dist/esm/gov-flex_3.entry.js +1 -1
- package/dist/esm/gov-form-autocomplete.entry.js +68 -24
- package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
- package/dist/esm/gov-form-file.entry.js +32 -3
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/esm/gov-form-search.entry.js +1 -1
- package/dist/esm/gov-form-search.entry.js.map +1 -1
- package/dist/esm/gov-form-select.entry.js +8 -15
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-tooltip.gov-tooltip-content.entry.js.map +1 -1
- package/dist/esm/gov-tooltip_2.entry.js +34 -9
- package/dist/esm/gov-tooltip_2.entry.js.map +1 -1
- package/dist/esm/gov-wizard-item.entry.js +2 -2
- package/dist/esm/gov-wizard.entry.js +1 -1
- package/dist/esm/index-ClISz4NF.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +154 -60
- package/dist/hydrate/index.mjs +154 -60
- package/dist/types/Users/jf/dev/designSystem/gov-design-system/packages/core/.stencil/packages/core/stencil.config.d.ts +2 -0
- package/dist/types/components/gov-form/autocomplete/autocomplete.utils.d.ts +2 -0
- package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +9 -0
- package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -0
- package/dist/types/components/gov-form/select/gov-form-select.d.ts +1 -1
- package/dist/types/components/gov-tooltip/gov-tooltip-content.d.ts +4 -0
- package/dist/types/components/gov-tooltip/gov-tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +20 -2
- package/package.json +2 -2
- package/readme.md +9 -0
- package/dist/components/p-DFu5UVoP.js +0 -2
- package/dist/components/p-DFu5UVoP.js.map +0 -1
- package/dist/components/p-DMVQRz4f.js +0 -2
- package/dist/components/p-DMVQRz4f.js.map +0 -1
- package/dist/components/p-UDT3DloZ.js +0 -2
- package/dist/components/p-UDT3DloZ.js.map +0 -1
- package/dist/components/p-x3w8Mun_.js +0 -2
- package/dist/components/p-x3w8Mun_.js.map +0 -1
- package/dist/core/p-11fc3899.entry.js +0 -2
- package/dist/core/p-11fc3899.entry.js.map +0 -1
- package/dist/core/p-33b462c9.entry.js +0 -2
- package/dist/core/p-33b462c9.entry.js.map +0 -1
- package/dist/core/p-3e5ae012.entry.js +0 -2
- package/dist/core/p-3e5ae012.entry.js.map +0 -1
- package/dist/core/p-bd389bfd.entry.js +0 -2
- package/dist/core/p-c21bc8f9.entry.js +0 -2
- package/dist/core/p-c21bc8f9.entry.js.map +0 -1
- package/dist/core/p-def34832.entry.js +0 -2
- package/dist/core/p-def34832.entry.js.map +0 -1
- package/dist/types/work/packages/core/.stencil/packages/core/stencil.config.d.ts +0 -2
- /package/dist/components/{p-DKo9A5gq.js.map → p-BHRF-5cf.js.map} +0 -0
- /package/dist/components/{p-9imLQpxb.js.map → p-BSr8e18S.js.map} +0 -0
- /package/dist/components/{p-BNnuBQvo.js.map → p-BxS4InzB.js.map} +0 -0
- /package/dist/components/{p-CfaJM4SA.js.map → p-CMmyR4-k.js.map} +0 -0
- /package/dist/components/{p-B0KFtEn3.js.map → p-CU0plGZP.js.map} +0 -0
- /package/dist/components/{p-BrdXh0mI.js.map → p-CXPP9vec.js.map} +0 -0
- /package/dist/components/{p-djqfSbq-.js.map → p-C_URF9Su.js.map} +0 -0
- /package/dist/components/{p-yqJEurSE.js.map → p-CnKqUwf9.js.map} +0 -0
- /package/dist/components/{p-Bv5L0j6n.js.map → p-DN5pb9xA.js.map} +0 -0
- /package/dist/components/{p-DesycS6d.js.map → p-iTwUkISB.js.map} +0 -0
- /package/dist/components/{p-BZTY3MxF.js.map → p-ibUK7mfI.js.map} +0 -0
- /package/dist/core/{p-4da8ac1d.entry.js.map → p-10991f00.entry.js.map} +0 -0
- /package/dist/core/{p-469f14db.entry.js.map → p-bec959c4.entry.js.map} +0 -0
- /package/dist/core/{p-4d365881.entry.js.map → p-f75ad657.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gov-tooltip.gov-tooltip-content.entry.esm.js","sources":["../../../packages/core/src/components/gov-tooltip/constants.tsx","../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx","../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { Sizes } from '../../core/constants/sizes'\nimport { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\n\nexport const TooltipColors = pick(Colors, ['PRIMARY', 'NEUTRAL'])\nexport type TooltipColorType = `${ValueOf<typeof TooltipColors>}`\n\nexport const TooltipSize = pick(Sizes, ['_S', '_M', '_L'])\nexport type TooltipSizeType = `${ValueOf<typeof TooltipSize>}`\n\nexport enum TooltipPosition {\n\tTOP = 'top',\n\tRIGHT = 'right',\n\tBOTTOM = 'bottom',\n\tLEFT = 'left',\n}\nexport type TooltipPositionType = `${ValueOf<typeof TooltipPosition>}`\n\nexport const TooltipClass = {\n\troot: 'gov-tooltip',\n}\n\nexport const TooltipContentClass = {\n\troot: 'gov-tooltip-content',\n}\n","import {Component, Element, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tTooltipClass,\n\tTooltipContentClass,\n\tTooltipPosition,\n\tTooltipPositionType,\n\tTooltipSize,\n\tTooltipSizeType,\n\tTooltipColors,\n\tTooltipColorType,\n} from \"./constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {documentNode} from \"../../helpers/Dom/win\";\nimport {Nullable} from \"../../utils/helpers.types\";\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: \"gov-tooltip\",\n})\nexport class GovTooltip {\n\tprivate h: GovHost\n\tprivate readonly tooltipContentId = undefined\n\tprivate readonly tooltipId = undefined\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.tooltipId = createID(\"GovTooltip\")\n\t\tthis.tooltipContentId = createID(\"GovContentTooltip\")\n\t}\n\n\t@Element() host: HTMLGovTooltipElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip display position\n\t */\n\t@Prop({mutable: true}) position: TooltipPositionType = \"right\"\n\t/**\n\t * Information contained in the tooltip\n\t */\n\t@Prop() readonly message: string = undefined\n\t/**\n\t * Custom tooltip identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Trigger is just an icon\n\t */\n\t@Prop({reflect: true}) readonly icon: boolean = undefined\n\n\t@State() persist = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TooltipColors, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TooltipSize, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"position\")\n\tvalidatePosition(newValue: string): void {\n\t\tvalidateProp(TooltipPosition, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"message\")\n\trerenderMessage(): void {\n\t\tthis.createContentWrapper();\n\t}\n\n\tconnectedCallback() {\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.createContentWrapper()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.removeContent()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tif (this.tooltipContent) {\n\t\t\tif (this.message) {\n\t\t\t\tthis.tooltipContent.innerHTML = this.message\n\t\t\t} else if (this.insideContent) {\n\t\t\t\tthis.tooltipContent.innerHTML = this.insideContent.innerHTML\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tlet content: HTMLGovTooltipContentElement;\n\t\tif (this.insideContent) {\n\t\t\tcontent = this.insideContent\n\t\t} else {\n\t\t\tcontent = documentNode().createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tcontent.innerHTML = this.message\n\t\t}\n\n\t\tcontent.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n\t\tcontent.setAttribute(\"parent-id\", this.tooltipId)\n\t\tcontent.setAttribute(\"color\", this.color)\n\t\tcontent.setAttribute(\"size\", this.size)\n\t\tdocumentNode().body.appendChild(content)\n\t}\n\n\tprivate get tooltipContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn documentNode().body.querySelector(`#${this.identifier ?? this.tooltipContentId}`);\n\t}\n\n\tprivate get insideContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn this.host.querySelector(TooltipContentClass.root)\n\t}\n\n\tprivate registerListeners() {\n\t\tthis.host.addEventListener(\"click\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.persist = true\n\t\t\tif (this.tooltipContent) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"true\")\n\t\t\t}\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseenter\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseleave\", e => {\n\t\t\te.preventDefault()\n\t\t\tif (this.persist === false) {\n\t\t\t\tthis.hideTooltip()\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate verifyPositionSpace() {\n\t\tconst offset = 12\n\t\tconst windowWidth = window.innerWidth - (window.innerWidth - document.documentElement.clientWidth);\n\t\tconst trigger = this.host.getBoundingClientRect()\n\t\tconst trgWidth = this.host.offsetWidth\n\t\tconst trgHeight = this.host.offsetHeight\n\t\tconst contentWidth = this.tooltipContent.offsetWidth\n\t\tconst contentHeight = this.tooltipContent.offsetHeight\n\t\tconst triggerPos = {\n\t\t\tleft: trigger.left + document.documentElement.scrollLeft,\n\t\t\ttop: trigger.top + document.documentElement.scrollTop,\n\t\t}\n\n\t\tconst isRightSpace = ((triggerPos.left + offset + trigger.width) + contentWidth) <= windowWidth;\n\t\tconst isLeftSpace = triggerPos.left > contentWidth;\n\n\t\t// LEFT/RIGHT\n\t\tif (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\";\n\t\t\tif (isRightSpace === false && isLeftSpace === false) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\t}\n\t\t\tif (isLeftSpace && isRightSpace === false && this.position === TooltipPosition.RIGHT) {\n\t\t\t\tthis.position = TooltipPosition.LEFT\n\t\t\t}\n\t\t\tif (isRightSpace && isLeftSpace === false && this.position === TooltipPosition.LEFT) {\n\t\t\t\tthis.position = TooltipPosition.RIGHT\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.RIGHT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.LEFT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n\t\t}\n\n\t\t// LEFT/RIGHT FOR TOP/BOTTOM\n\t\tif (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n\t\t\tif (contentWidth > trgWidth) {\n\t\t\t\tlet leftPosition = (triggerPos.left - ((contentWidth - trgWidth) / 2));\n\t\t\t\tconst isNotLeftSpace = leftPosition < 0;\n\t\t\t\tconst isNotRightSpace = (leftPosition + contentWidth) > windowWidth;\n\t\t\t\tif (isNotLeftSpace && isNotRightSpace) {\n\t\t\t\t\tthis.tooltipContent.style.width = \"auto\";\n\t\t\t\t\tthis.tooltipContent.style.left = offset + \"px\";\n\t\t\t\t\tthis.tooltipContent.style.right = offset + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tif (isNotLeftSpace) {\n\t\t\t\t\t\tleftPosition = offset\n\t\t\t\t\t}\n\t\t\t\t\tif (isNotRightSpace) {\n\t\t\t\t\t\tleftPosition = leftPosition - ((windowWidth - (leftPosition + contentWidth + offset)) * -1)\n\t\t\t\t\t}\n\t\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst leftPosition = (triggerPos.left + ((trgWidth - contentWidth) / 2))\n\n\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.BOTTOM) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.BOTTOM)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n\t\t}\n\n\t\tthis.tooltipContent.style.opacity = '1'\n\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.style.opacity = '0'\n\t\t\tthis.tooltipContent.hidden = false\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"true\")\n\t\t\ttick(() => {\n\t\t\t\tthis.verifyPositionSpace()\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"false\")\n\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"false\")\n\t\t\tthis.tooltipContent.removeAttribute('style')\n\t\t}\n\t}\n\n\tprivate removeContent() {\n\t\tconst contentEl = document.getElementById(this.tooltipContentId)\n\t\tif (contentEl) {\n\t\t\tcontentEl.remove()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tid={this.tooltipId}\n\t\t\t\tclass={this.h.classes(TooltipClass.root)}\n\t\t\t\tposition={this.position}>\n\t\t\t\t<span role={'button'}\n\t\t\t\t\t\t\ttabindex={0}\n\t\t\t\t\t\t\tonKeyPress={() => this.showTooltip()}\n\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\tif (this.persist === false) {\n\t\t\t\t\t\t\t\t\tthis.hideTooltip()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-describedby={this.identifier ?? this.tooltipContentId}><slot/></span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showTooltip()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.persist = false\n\t\tthis.hideTooltip()\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { TooltipContentClass, TooltipSize, TooltipSizeType, TooltipColors, TooltipColorType } from \"./constants\"\nimport { toBoolAttr } from \"../../helpers/Dom/template\"\n\n@Component({\n\ttag: \"gov-tooltip-content\",\n})\nexport class GovTooltipContent {\n\tprivate timeout\n\n\t@Element() host: HTMLGovTooltipContentElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip is still visible.\n\t */\n\t@Prop() persist?: boolean = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"is-visible\", mutable: true }) isVisible = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"parent-id\" }) parentId: string = null\n\n\t@Watch(\"isVisible\")\n\tvisibleContent(newValue: boolean): void {\n\t\tclearTimeout(this.timeout)\n\t\tif (newValue === false) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.style.visibility = \"hidden\"\n\t\t\t}, 250)\n\t\t} else {\n\t\t\tthis.host.style.visibility = \"visible\"\n\t\t}\n\t}\n\n\thideContent() {\n\t\tthis.isVisible = false\n\t\tthis.persist = false\n\t\tconst parentEl = document.getElementById(this.parentId) as HTMLGovTooltipElement\n\t\tif (parentEl) {\n\t\t\tparentEl.hide().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={TooltipContentClass.root}\n\t\t\t\trole={\"tooltip\"}\n\t\t\t\thidden={!this.isVisible}\n\t\t\t\taria-hidden={!toBoolAttr(this.isVisible)}\n\t\t\t\tis-visible={this.isVisible}>\n\t\t\t\t<slot></slot>\n\t\t\t\t{this.persist ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\ton-gov-click={this.hideContent.bind(this)}\n\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\ttype={\"base\"}>\n\t\t\t\t\t\t<gov-icon slot={\"icon-start\"} name={\"x-lg\"} type={\"components\"}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;AAKO,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAG1D,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAG1D,IAAY,eAKX;AALD,CAAA,UAAY,eAAe,EAAA;AAC1B,IAAA,eAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,eAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACd,CAAC,EALW,eAAe,KAAf,eAAe,GAK1B,EAAA,CAAA,CAAA;AAGM,MAAM,YAAY,GAAG;AAC3B,IAAA,IAAI,EAAE,aAAa;CACnB;AAEM,MAAM,mBAAmB,GAAG;AAClC,IAAA,IAAI,EAAE,qBAAqB;CAC3B;;MCHY,UAAU,GAAA,MAAA;AAKtB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAHiB,QAAA,IAAgB,CAAA,gBAAA,GAAG,SAAS;AAC5B,QAAA,IAAS,CAAA,SAAA,GAAG,SAAS;AAStC;;AAEG;AACc,QAAA,IAAA,CAAA,KAAK,GAAsB,aAAa,CAAC,OAAO;AACjE;;AAEG;AACc,QAAA,IAAA,CAAA,IAAI,GAAqB,WAAW,CAAC,EAAE;AACxD;;AAEG;AACoB,QAAA,IAAQ,CAAA,QAAA,GAAwB,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AAA,EAAA,IAAI,CAAC,SAAS,EAAA,EAC1B,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EACZ,IAAI,CAAC,OAAO,IACZ,CACe,CAAA,YAAA,EAAA,EAAA,cAAA,EAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EACzC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,MAAM,EAAA,EACZ,CAAU,CAAA,UAAA,EAAA,EAAA,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAa,CAAA,CAC/D,IACV,IAAI,CACF;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"gov-tooltip.gov-tooltip-content.entry.esm.js","sources":["../../../packages/core/src/components/gov-tooltip/constants.tsx","../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx","../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { Sizes } from '../../core/constants/sizes'\nimport { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\n\nexport const TooltipColors = pick(Colors, ['PRIMARY', 'NEUTRAL'])\nexport type TooltipColorType = `${ValueOf<typeof TooltipColors>}`\n\nexport const TooltipSize = pick(Sizes, ['_S', '_M', '_L'])\nexport type TooltipSizeType = `${ValueOf<typeof TooltipSize>}`\n\nexport enum TooltipPosition {\n\tTOP = 'top',\n\tRIGHT = 'right',\n\tBOTTOM = 'bottom',\n\tLEFT = 'left',\n}\nexport type TooltipPositionType = `${ValueOf<typeof TooltipPosition>}`\n\nexport const TooltipClass = {\n\troot: 'gov-tooltip',\n}\n\nexport const TooltipContentClass = {\n\troot: 'gov-tooltip-content',\n}\n","import {Component, Element, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tTooltipClass,\n\tTooltipContentClass,\n\tTooltipPosition,\n\tTooltipPositionType,\n\tTooltipSize,\n\tTooltipSizeType,\n\tTooltipColors,\n\tTooltipColorType,\n} from \"./constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {documentNode} from \"../../helpers/Dom/win\";\nimport {Nullable} from \"../../utils/helpers.types\";\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: \"gov-tooltip\",\n})\nexport class GovTooltip {\n\tprivate h: GovHost\n\tprivate readonly tooltipContentId = undefined\n\tprivate readonly tooltipId = undefined\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.tooltipId = createID(\"GovTooltip\")\n\t\tthis.tooltipContentId = createID(\"GovContentTooltip\")\n\t}\n\n\t@Element() host: HTMLGovTooltipElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip display position\n\t */\n\t@Prop({mutable: true}) position: TooltipPositionType = \"right\"\n\t/**\n\t * Information contained in the tooltip\n\t */\n\t@Prop() readonly message: string = undefined\n\t/**\n\t * Custom tooltip identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Trigger is just an icon\n\t */\n\t@Prop({reflect: true}) readonly icon: boolean = undefined\n\n\t@State() persist = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TooltipColors, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TooltipSize, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"position\")\n\tvalidatePosition(newValue: string): void {\n\t\tvalidateProp(TooltipPosition, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"message\")\n\trerenderMessage(): void {\n\t\tthis.createContentWrapper();\n\t}\n\n\tconnectedCallback() {\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.createContentWrapper()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.resizeObserver?.disconnect()\n\t\tthis.resizeObserver = undefined\n\t\twindow.removeEventListener(\"resize\", this.reposition)\n\t\tthis.repositionListenersAttached = false\n\t\tthis.removeContent()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tif (this.tooltipContent) {\n\t\t\tif (this.message != null) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"message\", this.message)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tlet content: HTMLGovTooltipContentElement;\n\t\tif (this.insideContent) {\n\t\t\tcontent = this.insideContent\n\t\t} else {\n\t\t\tcontent = documentNode().createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tif (this.message != null) {\n\t\t\t\tcontent.setAttribute(\"message\", this.message)\n\t\t\t}\n\t\t}\n\n\t\tcontent.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n\t\tcontent.setAttribute(\"parent-id\", this.tooltipId)\n\t\tcontent.setAttribute(\"color\", this.color)\n\t\tcontent.setAttribute(\"size\", this.size)\n\t\tdocumentNode().body.appendChild(content)\n\t}\n\n\tprivate get tooltipContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn documentNode().body.querySelector(`#${this.identifier ?? this.tooltipContentId}`);\n\t}\n\n\tprivate get insideContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn this.host.querySelector(TooltipContentClass.root)\n\t}\n\n\tprivate registerListeners() {\n\t\tthis.host.addEventListener(\"click\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.persist = true\n\t\t\tif (this.tooltipContent) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"true\")\n\t\t\t}\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseenter\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseleave\", e => {\n\t\t\te.preventDefault()\n\t\t\tif (this.persist === false) {\n\t\t\t\tthis.hideTooltip()\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate verifyPositionSpace() {\n\t\tconst offset = 12\n\t\tconst windowWidth = window.innerWidth - (window.innerWidth - document.documentElement.clientWidth);\n\t\tconst trigger = this.host.getBoundingClientRect()\n\t\tconst trgWidth = this.host.offsetWidth\n\t\tconst trgHeight = this.host.offsetHeight\n\t\tconst contentWidth = this.tooltipContent.offsetWidth\n\t\tconst contentHeight = this.tooltipContent.offsetHeight\n\t\tconst triggerPos = {\n\t\t\tleft: trigger.left + document.documentElement.scrollLeft,\n\t\t\ttop: trigger.top + document.documentElement.scrollTop,\n\t\t}\n\n\t\tconst isRightSpace = ((triggerPos.left + offset + trigger.width) + contentWidth) <= windowWidth;\n\t\tconst isLeftSpace = triggerPos.left > contentWidth;\n\n\t\t// LEFT/RIGHT\n\t\tif (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\";\n\t\t\tif (isRightSpace === false && isLeftSpace === false) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\t}\n\t\t\tif (isLeftSpace && isRightSpace === false && this.position === TooltipPosition.RIGHT) {\n\t\t\t\tthis.position = TooltipPosition.LEFT\n\t\t\t}\n\t\t\tif (isRightSpace && isLeftSpace === false && this.position === TooltipPosition.LEFT) {\n\t\t\t\tthis.position = TooltipPosition.RIGHT\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.RIGHT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.LEFT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n\t\t}\n\n\t\t// LEFT/RIGHT FOR TOP/BOTTOM\n\t\tif (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n\t\t\tif (contentWidth > trgWidth) {\n\t\t\t\tlet leftPosition = (triggerPos.left - ((contentWidth - trgWidth) / 2));\n\t\t\t\tconst isNotLeftSpace = leftPosition < 0;\n\t\t\t\tconst isNotRightSpace = (leftPosition + contentWidth) > windowWidth;\n\t\t\t\tif (isNotLeftSpace && isNotRightSpace) {\n\t\t\t\t\tthis.tooltipContent.style.width = \"auto\";\n\t\t\t\t\tthis.tooltipContent.style.left = offset + \"px\";\n\t\t\t\t\tthis.tooltipContent.style.right = offset + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tif (isNotLeftSpace) {\n\t\t\t\t\t\tleftPosition = offset\n\t\t\t\t\t}\n\t\t\t\t\tif (isNotRightSpace) {\n\t\t\t\t\t\tleftPosition = leftPosition - ((windowWidth - (leftPosition + contentWidth + offset)) * -1)\n\t\t\t\t\t}\n\t\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst leftPosition = (triggerPos.left + ((trgWidth - contentWidth) / 2))\n\n\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.BOTTOM) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.BOTTOM)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n\t\t}\n\n\t\tthis.tooltipContent.style.opacity = '1'\n\n\t}\n\n\tprivate resizeObserver?: ResizeObserver\n\tprivate repositionListenersAttached = false\n\tprivate readonly reposition = () => {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.verifyPositionSpace()\n\t\t}\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.style.opacity = '0'\n\t\t\tthis.tooltipContent.hidden = false\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"true\")\n\t\t\ttick(() => {\n\t\t\t\tthis.verifyPositionSpace()\n\t\t\t})\n\t\t\tif (!this.repositionListenersAttached) {\n\t\t\t\tthis.repositionListenersAttached = true\n\t\t\t\tif (typeof ResizeObserver !== \"undefined\") {\n\t\t\t\t\tthis.resizeObserver = new ResizeObserver(this.reposition)\n\t\t\t\t\tthis.resizeObserver.observe(this.tooltipContent)\n\t\t\t\t}\n\t\t\t\twindow.addEventListener(\"resize\", this.reposition)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"false\")\n\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"false\")\n\t\t\tthis.tooltipContent.removeAttribute('style')\n\t\t}\n\t\tthis.resizeObserver?.disconnect()\n\t\tthis.resizeObserver = undefined\n\t\twindow.removeEventListener(\"resize\", this.reposition)\n\t\tthis.repositionListenersAttached = false\n\t}\n\n\tprivate removeContent() {\n\t\tconst contentEl = document.getElementById(this.tooltipContentId)\n\t\tif (contentEl) {\n\t\t\tcontentEl.remove()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tid={this.tooltipId}\n\t\t\t\tclass={this.h.classes(TooltipClass.root)}\n\t\t\t\tposition={this.position}>\n\t\t\t\t<span role={'button'}\n\t\t\t\t\t\t\ttabindex={0}\n\t\t\t\t\t\t\tonKeyPress={() => this.showTooltip()}\n\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\tif (this.persist === false) {\n\t\t\t\t\t\t\t\t\tthis.hideTooltip()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-describedby={this.identifier ?? this.tooltipContentId}><slot/></span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showTooltip()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.persist = false\n\t\tthis.hideTooltip()\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { TooltipContentClass, TooltipSize, TooltipSizeType, TooltipColors, TooltipColorType } from \"./constants\"\nimport { toBoolAttr } from \"../../helpers/Dom/template\"\n\n@Component({\n\ttag: \"gov-tooltip-content\",\n})\nexport class GovTooltipContent {\n\tprivate timeout\n\n\t@Element() host: HTMLGovTooltipContentElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip is still visible.\n\t */\n\t@Prop() persist?: boolean = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"is-visible\", mutable: true }) isVisible = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"parent-id\" }) parentId: string = null\n\t/**\n\t * Tooltip text. When set, renders the HTML message; otherwise the default `<slot/>` is used.\n\t */\n\t@Prop({ attribute: \"message\", mutable: true }) message?: string\n\n\t@Watch(\"isVisible\")\n\tvisibleContent(newValue: boolean): void {\n\t\tclearTimeout(this.timeout)\n\t\tif (newValue === false) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.style.visibility = \"hidden\"\n\t\t\t}, 250)\n\t\t} else {\n\t\t\tthis.host.style.visibility = \"visible\"\n\t\t}\n\t}\n\n\thideContent() {\n\t\tthis.isVisible = false\n\t\tthis.persist = false\n\t\tconst parentEl = document.getElementById(this.parentId) as HTMLGovTooltipElement\n\t\tif (parentEl) {\n\t\t\tparentEl.hide().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={TooltipContentClass.root}\n\t\t\t\trole={\"tooltip\"}\n\t\t\t\thidden={!this.isVisible}\n\t\t\t\taria-hidden={!toBoolAttr(this.isVisible)}\n\t\t\t\tis-visible={this.isVisible}>\n\t\t\t\t{this.message\n\t\t\t\t\t? <span class=\"gov-tooltip-content__message\" innerHTML={this.message}></span>\n\t\t\t\t\t: <slot></slot>}\n\t\t\t\t{this.persist ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\ton-gov-click={this.hideContent.bind(this)}\n\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\ttype={\"base\"}>\n\t\t\t\t\t\t<gov-icon slot={\"icon-start\"} name={\"x-lg\"} type={\"components\"}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;AAKO,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAG1D,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAG1D,IAAY,eAKX;AALD,CAA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./p-ClISz4NF.js";import{v as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as s,c as t,h as i,H as a,g as r}from"./p-ClISz4NF.js";import{v as o}from"./p-NOJjz9dT.js";import{W as e,a as c,b as p}from"./p-BjcqOprh.js";import{g as h}from"./p-CoD1xawt.js";import{v as m}from"./p-CDIRBJsi.js";import{c as d}from"./p-CgDnDrq5.js";import{d as n}from"./p-CQvUntGY.js";import"./p-U40vKHrs.js";import"./p-BcQO4NH2.js";import"./p-vN03FcXN.js";import"./p-DNztiAH0.js";const l=class{constructor(i){s(this,i);this.govChange=t(this,"gov-change");this.hydrated=false;this.size="m";this.h=h(this.host)}validateSize(s){o(p,s,c.root)}componentWillLoad(){this.validateSize(this.size)}componentDidLoad(){this.host.querySelectorAll(e.root).forEach((s=>{s.setAttribute("size",this.size)}))}async componentDidRender(){if(d()){await n(500);await this.validateWcag()}}connectedCallback(){this.hydrated=true}render(){return i(a,{key:"d1957fc0c0058c107769e3cc5390ef986fc9b921",class:this.h.classes(c.root),role:"list",size:this.size,hydrated:this.hydrated},i("slot",{key:"a34323c408d790c5945ca0d80db62de2433db438"}))}async validateWcag(){m(this.wcagLabel,this.wcagLabelledBy,c.root)}get host(){return r(this)}static get watchers(){return{size:["validateSize"]}}};export{l as gov_wizard};
|
|
2
|
+
//# sourceMappingURL=p-10991f00.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as s,h as t,H as a,g as o}from"./p-ClISz4NF.js";import{C as r}from"./p-U40vKHrs.js";import{p as e}from"./p-CQvUntGY.js";import{S as c}from"./p-BcQO4NH2.js";e(c,["_S","_M","_L"]);e(r,["PRIMARY","NEUTRAL"]);const b={root:"gov-form-search"};const f=class{constructor(t){s(this,t);this.size="m";this.color="neutral"}render(){return t(a,{key:"c901368f70213c3be37b44b472002ce0872209d0",class:b.root,color:this.color,size:this.size},t("slot",{key:"4ca581f75ccd75f785f94c1f93500c914b129cc8",name:"input"}),t("slot",{key:"10a34b30a9496b0d9a82b0baaf10b66ac5a2679f",name:"button-erase"}),t("slot",{key:"2888491da6babe4e7586abdda1863850ed67f8a9",name:"button"}))}get host(){return o(this)}};export{f as gov_form_search};
|
|
2
|
+
//# sourceMappingURL=p-19300834.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pick","Sizes","Colors","FormSearchClass","root","GovFormSearch","constructor","hostRef","this","size","color","render","h","Host","key","class","name"],"sources":["../../../packages/core/src/components/gov-form/search/constants.ts","../../../packages/core/src/components/gov-form/search/gov-form-search.tsx"],"sourcesContent":["import { Colors } from '../../../core/constants/colors'\nimport { ValueOf } from '../../../types/interfaces'\nimport { pick } from '../../../utils/utils'\nimport {Sizes} from \"../../../core/constants/sizes\";\n\nexport const FormSearchSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type FormSearchSizesType = `${ValueOf<typeof FormSearchSizes>}`\n\nexport const FormSearchColors = pick(Colors, ['PRIMARY', 'NEUTRAL'])\nexport type FormSearchColorType = `${ValueOf<typeof FormSearchColors>}`\n\nexport const FormSearchClass = {\n\troot: 'gov-form-search',\n}\n","import {Component, Element, h, Host, Prop} from '@stencil/core'\nimport {FormSearchClass, FormSearchSizesType, FormSearchColorType} from './constants'\n\n@Component({\n\ttag: 'gov-form-search',\n})\nexport class GovFormSearch {\n\t@Element() host: HTMLGovFormSearchElement\n\t/**\n\t * Search’s size.\n\t */\n\t@Prop() readonly size?: FormSearchSizesType = \"m\"\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop({reflect: true}) readonly color: FormSearchColorType = 'neutral'\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSearchClass.root} color={this.color} size={this.size}>\n\t\t\t\t<slot name=\"input\"/>\n\t\t\t\t<slot name=\"button-erase\"/>\n\t\t\t\t<slot name=\"button\"/>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"qKAK+BA,EAAKC,EAAO,CAAC,KAAM,KAAM,OAGxBD,EAAKE,EAAQ,CAAC,UAAW,YAGlD,MAAMC,EAAkB,CAC9BC,KAAM,mB,MCNMC,EAAa,MAH1B,WAAAC,CAAAC,G,
|
|
1
|
+
{"version":3,"names":["pick","Sizes","Colors","FormSearchClass","root","GovFormSearch","constructor","hostRef","this","size","color","render","h","Host","key","class","name"],"sources":["../../../packages/core/src/components/gov-form/search/constants.ts","../../../packages/core/src/components/gov-form/search/gov-form-search.tsx"],"sourcesContent":["import { Colors } from '../../../core/constants/colors'\nimport { ValueOf } from '../../../types/interfaces'\nimport { pick } from '../../../utils/utils'\nimport {Sizes} from \"../../../core/constants/sizes\";\n\nexport const FormSearchSizes = pick(Sizes, ['_S', '_M', '_L'])\nexport type FormSearchSizesType = `${ValueOf<typeof FormSearchSizes>}`\n\nexport const FormSearchColors = pick(Colors, ['PRIMARY', 'NEUTRAL'])\nexport type FormSearchColorType = `${ValueOf<typeof FormSearchColors>}`\n\nexport const FormSearchClass = {\n\troot: 'gov-form-search',\n}\n","import {Component, Element, h, Host, Prop} from '@stencil/core'\nimport {FormSearchClass, FormSearchSizesType, FormSearchColorType} from './constants'\n\n@Component({\n\ttag: 'gov-form-search',\n})\nexport class GovFormSearch {\n\t@Element() host: HTMLGovFormSearchElement\n\t/**\n\t * Search’s size.\n\t */\n\t@Prop({reflect: true}) readonly size?: FormSearchSizesType = \"m\"\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop({reflect: true}) readonly color: FormSearchColorType = 'neutral'\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={FormSearchClass.root} color={this.color} size={this.size}>\n\t\t\t\t<slot name=\"input\"/>\n\t\t\t\t<slot name=\"button-erase\"/>\n\t\t\t\t<slot name=\"button\"/>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"qKAK+BA,EAAKC,EAAO,CAAC,KAAM,KAAM,OAGxBD,EAAKE,EAAQ,CAAC,UAAW,YAGlD,MAAMC,EAAkB,CAC9BC,KAAM,mB,MCNMC,EAAa,MAH1B,WAAAC,CAAAC,G,UAQiCC,KAAIC,KAAyB,IAI7BD,KAAKE,MAAwB,SAW7D,CATA,MAAAC,GACC,OACCC,EAACC,EAAI,CAAAC,IAAA,2CAACC,MAAOZ,EAAgBC,KAAMM,MAAOF,KAAKE,MAAOD,KAAMD,KAAKC,MAChEG,EAAM,QAAAE,IAAA,2CAAAE,KAAK,UACXJ,EAAM,QAAAE,IAAA,2CAAAE,KAAK,iBACXJ,EAAA,QAAAE,IAAA,2CAAME,KAAK,W","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,h as s,H as i,g as e}from"./p-ClISz4NF.js";import{v as o}from"./p-NOJjz9dT.js";import{C as h}from"./p-U40vKHrs.js";import{S as n}from"./p-BcQO4NH2.js";import{p as r}from"./p-CQvUntGY.js";import{c as a}from"./p-vN03FcXN.js";import{g as l,a as c}from"./p-CoD1xawt.js";import{d as f}from"./p-CgDnDrq5.js";import{t as d}from"./p-Cjg0wpDG.js";const p=r(h,["PRIMARY","NEUTRAL"]);const u=r(n,["_S","_M","_L"]);var v;(function(t){t["TOP"]="top";t["RIGHT"]="right";t["BOTTOM"]="bottom";t["LEFT"]="left"})(v||(v={}));const m={root:"gov-tooltip"};const g={root:"gov-tooltip-content"};const b=class{constructor(s){t(this,s);this.tooltipContentId=undefined;this.tooltipId=undefined;this.color=p.PRIMARY;this.size=u._M;this.position="right";this.message=undefined;this.icon=undefined;this.persist=false;this.repositionListenersAttached=false;this.reposition=()=>{if(this.tooltipContent){this.verifyPositionSpace()}};this.h=l(this.host);this.tooltipId=a("GovTooltip");this.tooltipContentId=a("GovContentTooltip")}validateColor(t){o(p,t,m.root)}validateSize(t){o(u,t,m.root)}validatePosition(t){o(v,t,m.root)}rerenderMessage(){this.createContentWrapper()}connectedCallback(){this.createContentWrapper();this.registerListeners()}componentWillLoad(){this.validateColor(this.color);this.validateSize(this.size);this.validatePosition(this.position)}componentDidUpdate(){this.createContentWrapper()}disconnectedCallback(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect();this.resizeObserver=undefined;window.removeEventListener("resize",this.reposition);this.repositionListenersAttached=false;this.removeContent()}createContentWrapper(){var t;if(this.tooltipContent){if(this.message!=null){this.tooltipContent.setAttribute("message",this.message)}return}let s;if(this.insideContent){s=this.insideContent}else{s=f().createElement(g.root);if(this.message!=null){s.setAttribute("message",this.message)}}s.setAttribute("id",(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId);s.setAttribute("parent-id",this.tooltipId);s.setAttribute("color",this.color);s.setAttribute("size",this.size);f().body.appendChild(s)}get tooltipContent(){var t;return f().body.querySelector(`#${(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId}`)}get insideContent(){return this.host.querySelector(g.root)}registerListeners(){this.host.addEventListener("click",(t=>{t.preventDefault();this.persist=true;if(this.tooltipContent){this.tooltipContent.setAttribute("persist","true")}this.showTooltip()}));this.host.addEventListener("mouseenter",(t=>{t.preventDefault();this.showTooltip()}));this.host.addEventListener("mouseleave",(t=>{t.preventDefault();if(this.persist===false){this.hideTooltip()}}))}verifyPositionSpace(){const t=12;const s=window.innerWidth-(window.innerWidth-document.documentElement.clientWidth);const i=this.host.getBoundingClientRect();const e=this.host.offsetWidth;const o=this.host.offsetHeight;const h=this.tooltipContent.offsetWidth;const n=this.tooltipContent.offsetHeight;const r={left:i.left+document.documentElement.scrollLeft,top:i.top+document.documentElement.scrollTop};const a=r.left+t+i.width+h<=s;const l=r.left>h;if(this.position===v.LEFT||this.position===v.RIGHT){this.tooltipContent.style.top=r.top-(n-o)/2+"px";if(a===false&&l===false){this.position=v.TOP;this.tooltipContent.setAttribute("position",v.TOP)}if(l&&a===false&&this.position===v.RIGHT){this.position=v.LEFT}if(a&&l===false&&this.position===v.LEFT){this.position=v.RIGHT}}if(this.position===v.RIGHT){this.tooltipContent.setAttribute("position",v.RIGHT);this.tooltipContent.style.left=r.left+t+i.width+"px"}if(this.position===v.LEFT){this.tooltipContent.setAttribute("position",v.LEFT);this.tooltipContent.style.left=r.left-(h+t)+"px"}if(this.position===v.TOP||this.position===v.BOTTOM){if(h>e){let i=r.left-(h-e)/2;const o=i<0;const n=i+h>s;if(o&&n){this.tooltipContent.style.width="auto";this.tooltipContent.style.left=t+"px";this.tooltipContent.style.right=t+"px"}else{if(o){i=t}if(n){i=i-(s-(i+h+t))*-1}this.tooltipContent.style.left=i+"px"}}else{const t=r.left+(e-h)/2;this.tooltipContent.style.left=t+"px"}}if(this.position===v.TOP){this.tooltipContent.setAttribute("position",v.TOP);this.tooltipContent.style.top=r.top-(n+t)+"px"}if(this.position===v.BOTTOM){this.tooltipContent.setAttribute("position",v.BOTTOM);this.tooltipContent.style.top=r.top+(o+t)+"px"}this.tooltipContent.style.opacity="1"}showTooltip(){if(this.tooltipContent){this.tooltipContent.style.opacity="0";this.tooltipContent.hidden=false;this.tooltipContent.setAttribute("is-visible","true");d((()=>{this.verifyPositionSpace()}));if(!this.repositionListenersAttached){this.repositionListenersAttached=true;if(typeof ResizeObserver!=="undefined"){this.resizeObserver=new ResizeObserver(this.reposition);this.resizeObserver.observe(this.tooltipContent)}window.addEventListener("resize",this.reposition)}}}hideTooltip(){var t;if(this.tooltipContent){this.tooltipContent.setAttribute("is-visible","false");this.tooltipContent.setAttribute("persist","false");this.tooltipContent.removeAttribute("style")}(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect();this.resizeObserver=undefined;window.removeEventListener("resize",this.reposition);this.repositionListenersAttached=false}removeContent(){const t=document.getElementById(this.tooltipContentId);if(t){t.remove()}}render(){var t;return s(i,{key:"20ebe5eea59967e8681fd0e35fc7aff53b5915dd",id:this.tooltipId,class:this.h.classes(m.root),position:this.position},s("span",{key:"847b78886907d683425013227eb78bbf9261b709",role:"button",tabindex:0,onKeyPress:()=>this.showTooltip(),onBlur:()=>{if(this.persist===false){this.hideTooltip()}},"aria-describedby":(t=this.identifier)!==null&&t!==void 0?t:this.tooltipContentId},s("slot",{key:"84c4c02ee11e05166fca208b82ef54298dcaa6ee"})))}async show(){this.showTooltip()}async hide(){this.persist=false;this.hideTooltip()}get host(){return e(this)}static get watchers(){return{color:["validateColor"],size:["validateSize"],position:["validatePosition"],message:["rerenderMessage"]}}};const C=class{constructor(s){t(this,s);this.color=p.PRIMARY;this.size=u._M;this.persist=false;this.isVisible=false;this.parentId=null}visibleContent(t){clearTimeout(this.timeout);if(t===false){this.timeout=setTimeout((()=>{this.host.style.visibility="hidden"}),250)}else{this.host.style.visibility="visible"}}hideContent(){this.isVisible=false;this.persist=false;const t=document.getElementById(this.parentId);if(t){t.hide().catch()}}render(){return s(i,{key:"121b5cd3878956618a7a917511e6d8d76edf6672",class:g.root,role:"tooltip",hidden:!this.isVisible,"aria-hidden":!c(this.isVisible),"is-visible":this.isVisible},this.message?s("span",{class:"gov-tooltip-content__message",innerHTML:this.message}):s("slot",null),this.persist?s("gov-button",{"on-gov-click":this.hideContent.bind(this),color:this.color,size:this.size,type:"base"},s("gov-icon",{slot:"icon-start",name:"x-lg",type:"components"})):null)}get host(){return e(this)}static get watchers(){return{isVisible:["visibleContent"]}}};export{b as gov_tooltip,C as gov_tooltip_content};
|
|
2
|
+
//# sourceMappingURL=p-4e2faea7.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TooltipColors","pick","Colors","TooltipSize","Sizes","TooltipPosition","TooltipClass","root","TooltipContentClass","GovTooltip","constructor","hostRef","this","tooltipContentId","undefined","tooltipId","color","PRIMARY","size","_M","position","message","icon","persist","repositionListenersAttached","reposition","tooltipContent","verifyPositionSpace","h","govHost","host","createID","validateColor","newValue","validateProp","validateSize","validatePosition","rerenderMessage","createContentWrapper","connectedCallback","registerListeners","componentWillLoad","componentDidUpdate","disconnectedCallback","_a","resizeObserver","disconnect","window","removeEventListener","removeContent","setAttribute","content","insideContent","documentNode","createElement","identifier","body","appendChild","querySelector","addEventListener","e","preventDefault","showTooltip","hideTooltip","offset","windowWidth","innerWidth","document","documentElement","clientWidth","trigger","getBoundingClientRect","trgWidth","offsetWidth","trgHeight","offsetHeight","contentWidth","contentHeight","triggerPos","left","scrollLeft","top","scrollTop","isRightSpace","width","isLeftSpace","LEFT","RIGHT","style","TOP","BOTTOM","leftPosition","isNotLeftSpace","isNotRightSpace","right","opacity","hidden","tick","ResizeObserver","observe","removeAttribute","contentEl","getElementById","remove","render","Host","key","id","class","classes","role","tabindex","onKeyPress","onBlur","show","hide","GovTooltipContent","isVisible","parentId","visibleContent","clearTimeout","timeout","setTimeout","visibility","hideContent","parentEl","catch","toBoolAttr","innerHTML","bind","type","slot","name"],"sources":["../../../packages/core/src/components/gov-tooltip/constants.tsx","../../../packages/core/src/components/gov-tooltip/gov-tooltip.tsx","../../../packages/core/src/components/gov-tooltip/gov-tooltip-content.tsx"],"sourcesContent":["import { Colors } from '../../core/constants/colors'\nimport { Sizes } from '../../core/constants/sizes'\nimport { ValueOf } from '../../types/interfaces'\nimport { pick } from '../../utils/utils'\n\nexport const TooltipColors = pick(Colors, ['PRIMARY', 'NEUTRAL'])\nexport type TooltipColorType = `${ValueOf<typeof TooltipColors>}`\n\nexport const TooltipSize = pick(Sizes, ['_S', '_M', '_L'])\nexport type TooltipSizeType = `${ValueOf<typeof TooltipSize>}`\n\nexport enum TooltipPosition {\n\tTOP = 'top',\n\tRIGHT = 'right',\n\tBOTTOM = 'bottom',\n\tLEFT = 'left',\n}\nexport type TooltipPositionType = `${ValueOf<typeof TooltipPosition>}`\n\nexport const TooltipClass = {\n\troot: 'gov-tooltip',\n}\n\nexport const TooltipContentClass = {\n\troot: 'gov-tooltip-content',\n}\n","import {Component, Element, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tTooltipClass,\n\tTooltipContentClass,\n\tTooltipPosition,\n\tTooltipPositionType,\n\tTooltipSize,\n\tTooltipSizeType,\n\tTooltipColors,\n\tTooltipColorType,\n} from \"./constants\"\nimport {createID} from \"../../utils/string.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {documentNode} from \"../../helpers/Dom/win\";\nimport {Nullable} from \"../../utils/helpers.types\";\nimport {tick} from \"../../utils/stencil.utils\";\n\n@Component({\n\ttag: \"gov-tooltip\",\n})\nexport class GovTooltip {\n\tprivate h: GovHost\n\tprivate readonly tooltipContentId = undefined\n\tprivate readonly tooltipId = undefined\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.tooltipId = createID(\"GovTooltip\")\n\t\tthis.tooltipContentId = createID(\"GovContentTooltip\")\n\t}\n\n\t@Element() host: HTMLGovTooltipElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip display position\n\t */\n\t@Prop({mutable: true}) position: TooltipPositionType = \"right\"\n\t/**\n\t * Information contained in the tooltip\n\t */\n\t@Prop() readonly message: string = undefined\n\t/**\n\t * Custom tooltip identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Trigger is just an icon\n\t */\n\t@Prop({reflect: true}) readonly icon: boolean = undefined\n\n\t@State() persist = false\n\n\t@Watch(\"color\")\n\tvalidateColor(newValue: string): void {\n\t\tvalidateProp(TooltipColors, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(TooltipSize, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"position\")\n\tvalidatePosition(newValue: string): void {\n\t\tvalidateProp(TooltipPosition, newValue, TooltipClass.root)\n\t}\n\n\t@Watch(\"message\")\n\trerenderMessage(): void {\n\t\tthis.createContentWrapper();\n\t}\n\n\tconnectedCallback() {\n\t\tthis.createContentWrapper()\n\t\tthis.registerListeners()\n\t}\n\n\tcomponentWillLoad(): void {\n\t\tthis.validateColor(this.color)\n\t\tthis.validateSize(this.size)\n\t\tthis.validatePosition(this.position)\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.createContentWrapper()\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.resizeObserver?.disconnect()\n\t\tthis.resizeObserver = undefined\n\t\twindow.removeEventListener(\"resize\", this.reposition)\n\t\tthis.repositionListenersAttached = false\n\t\tthis.removeContent()\n\t}\n\n\tprivate createContentWrapper() {\n\t\tif (this.tooltipContent) {\n\t\t\tif (this.message != null) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"message\", this.message)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tlet content: HTMLGovTooltipContentElement;\n\t\tif (this.insideContent) {\n\t\t\tcontent = this.insideContent\n\t\t} else {\n\t\t\tcontent = documentNode().createElement(TooltipContentClass.root) as HTMLGovTooltipContentElement\n\t\t\tif (this.message != null) {\n\t\t\t\tcontent.setAttribute(\"message\", this.message)\n\t\t\t}\n\t\t}\n\n\t\tcontent.setAttribute(\"id\", this.identifier ?? this.tooltipContentId)\n\t\tcontent.setAttribute(\"parent-id\", this.tooltipId)\n\t\tcontent.setAttribute(\"color\", this.color)\n\t\tcontent.setAttribute(\"size\", this.size)\n\t\tdocumentNode().body.appendChild(content)\n\t}\n\n\tprivate get tooltipContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn documentNode().body.querySelector(`#${this.identifier ?? this.tooltipContentId}`);\n\t}\n\n\tprivate get insideContent(): Nullable<HTMLGovTooltipContentElement> {\n\t\treturn this.host.querySelector(TooltipContentClass.root)\n\t}\n\n\tprivate registerListeners() {\n\t\tthis.host.addEventListener(\"click\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.persist = true\n\t\t\tif (this.tooltipContent) {\n\t\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"true\")\n\t\t\t}\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseenter\", e => {\n\t\t\te.preventDefault()\n\t\t\tthis.showTooltip()\n\t\t})\n\t\tthis.host.addEventListener(\"mouseleave\", e => {\n\t\t\te.preventDefault()\n\t\t\tif (this.persist === false) {\n\t\t\t\tthis.hideTooltip()\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate verifyPositionSpace() {\n\t\tconst offset = 12\n\t\tconst windowWidth = window.innerWidth - (window.innerWidth - document.documentElement.clientWidth);\n\t\tconst trigger = this.host.getBoundingClientRect()\n\t\tconst trgWidth = this.host.offsetWidth\n\t\tconst trgHeight = this.host.offsetHeight\n\t\tconst contentWidth = this.tooltipContent.offsetWidth\n\t\tconst contentHeight = this.tooltipContent.offsetHeight\n\t\tconst triggerPos = {\n\t\t\tleft: trigger.left + document.documentElement.scrollLeft,\n\t\t\ttop: trigger.top + document.documentElement.scrollTop,\n\t\t}\n\n\t\tconst isRightSpace = ((triggerPos.left + offset + trigger.width) + contentWidth) <= windowWidth;\n\t\tconst isLeftSpace = triggerPos.left > contentWidth;\n\n\t\t// LEFT/RIGHT\n\t\tif (this.position === TooltipPosition.LEFT || this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - ((contentHeight - trgHeight) / 2)) + \"px\";\n\t\t\tif (isRightSpace === false && isLeftSpace === false) {\n\t\t\t\tthis.position = TooltipPosition.TOP\n\t\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\t}\n\t\t\tif (isLeftSpace && isRightSpace === false && this.position === TooltipPosition.RIGHT) {\n\t\t\t\tthis.position = TooltipPosition.LEFT\n\t\t\t}\n\t\t\tif (isRightSpace && isLeftSpace === false && this.position === TooltipPosition.LEFT) {\n\t\t\t\tthis.position = TooltipPosition.RIGHT\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.RIGHT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.RIGHT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left + offset + trigger.width) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.LEFT) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.LEFT)\n\t\t\tthis.tooltipContent.style.left = (triggerPos.left - (contentWidth + offset)) + \"px\"\n\t\t}\n\n\t\t// LEFT/RIGHT FOR TOP/BOTTOM\n\t\tif (this.position === TooltipPosition.TOP || this.position === TooltipPosition.BOTTOM) {\n\t\t\tif (contentWidth > trgWidth) {\n\t\t\t\tlet leftPosition = (triggerPos.left - ((contentWidth - trgWidth) / 2));\n\t\t\t\tconst isNotLeftSpace = leftPosition < 0;\n\t\t\t\tconst isNotRightSpace = (leftPosition + contentWidth) > windowWidth;\n\t\t\t\tif (isNotLeftSpace && isNotRightSpace) {\n\t\t\t\t\tthis.tooltipContent.style.width = \"auto\";\n\t\t\t\t\tthis.tooltipContent.style.left = offset + \"px\";\n\t\t\t\t\tthis.tooltipContent.style.right = offset + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tif (isNotLeftSpace) {\n\t\t\t\t\t\tleftPosition = offset\n\t\t\t\t\t}\n\t\t\t\t\tif (isNotRightSpace) {\n\t\t\t\t\t\tleftPosition = leftPosition - ((windowWidth - (leftPosition + contentWidth + offset)) * -1)\n\t\t\t\t\t}\n\t\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst leftPosition = (triggerPos.left + ((trgWidth - contentWidth) / 2))\n\n\t\t\t\tthis.tooltipContent.style.left = leftPosition + \"px\"\n\t\t\t}\n\t\t}\n\t\tif (this.position === TooltipPosition.TOP) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.TOP)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top - (contentHeight + offset)) + \"px\"\n\t\t}\n\t\tif (this.position === TooltipPosition.BOTTOM) {\n\t\t\tthis.tooltipContent.setAttribute(\"position\", TooltipPosition.BOTTOM)\n\t\t\tthis.tooltipContent.style.top = (triggerPos.top + (trgHeight + offset)) + \"px\"\n\t\t}\n\n\t\tthis.tooltipContent.style.opacity = '1'\n\n\t}\n\n\tprivate resizeObserver?: ResizeObserver\n\tprivate repositionListenersAttached = false\n\tprivate readonly reposition = () => {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.verifyPositionSpace()\n\t\t}\n\t}\n\n\tprivate showTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.style.opacity = '0'\n\t\t\tthis.tooltipContent.hidden = false\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"true\")\n\t\t\ttick(() => {\n\t\t\t\tthis.verifyPositionSpace()\n\t\t\t})\n\t\t\tif (!this.repositionListenersAttached) {\n\t\t\t\tthis.repositionListenersAttached = true\n\t\t\t\tif (typeof ResizeObserver !== \"undefined\") {\n\t\t\t\t\tthis.resizeObserver = new ResizeObserver(this.reposition)\n\t\t\t\t\tthis.resizeObserver.observe(this.tooltipContent)\n\t\t\t\t}\n\t\t\t\twindow.addEventListener(\"resize\", this.reposition)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate hideTooltip() {\n\t\tif (this.tooltipContent) {\n\t\t\tthis.tooltipContent.setAttribute(\"is-visible\", \"false\")\n\t\t\tthis.tooltipContent.setAttribute(\"persist\", \"false\")\n\t\t\tthis.tooltipContent.removeAttribute('style')\n\t\t}\n\t\tthis.resizeObserver?.disconnect()\n\t\tthis.resizeObserver = undefined\n\t\twindow.removeEventListener(\"resize\", this.reposition)\n\t\tthis.repositionListenersAttached = false\n\t}\n\n\tprivate removeContent() {\n\t\tconst contentEl = document.getElementById(this.tooltipContentId)\n\t\tif (contentEl) {\n\t\t\tcontentEl.remove()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tid={this.tooltipId}\n\t\t\t\tclass={this.h.classes(TooltipClass.root)}\n\t\t\t\tposition={this.position}>\n\t\t\t\t<span role={'button'}\n\t\t\t\t\t\t\ttabindex={0}\n\t\t\t\t\t\t\tonKeyPress={() => this.showTooltip()}\n\t\t\t\t\t\t\tonBlur={() => {\n\t\t\t\t\t\t\t\tif (this.persist === false) {\n\t\t\t\t\t\t\t\t\tthis.hideTooltip()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-describedby={this.identifier ?? this.tooltipContentId}><slot/></span>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showTooltip()\n\t}\n\n\t/**\n\t * Hiding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.persist = false\n\t\tthis.hideTooltip()\n\t}\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\"\nimport { TooltipContentClass, TooltipSize, TooltipSizeType, TooltipColors, TooltipColorType } from \"./constants\"\nimport { toBoolAttr } from \"../../helpers/Dom/template\"\n\n@Component({\n\ttag: \"gov-tooltip-content\",\n})\nexport class GovTooltipContent {\n\tprivate timeout\n\n\t@Element() host: HTMLGovTooltipContentElement\n\t/**\n\t * Style variation of the tooltip\n\t */\n\t@Prop() readonly color?: TooltipColorType = TooltipColors.PRIMARY\n\t/**\n\t * Tooltip’s size.\n\t */\n\t@Prop() readonly size?: TooltipSizeType = TooltipSize._M\n\t/**\n\t * Tooltip is still visible.\n\t */\n\t@Prop() persist?: boolean = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"is-visible\", mutable: true }) isVisible = false\n\t/**\n\t * Indicates display of tooltip content\n\t */\n\t@Prop({ attribute: \"parent-id\" }) parentId: string = null\n\t/**\n\t * Tooltip text. When set, renders the HTML message; otherwise the default `<slot/>` is used.\n\t */\n\t@Prop({ attribute: \"message\", mutable: true }) message?: string\n\n\t@Watch(\"isVisible\")\n\tvisibleContent(newValue: boolean): void {\n\t\tclearTimeout(this.timeout)\n\t\tif (newValue === false) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.host.style.visibility = \"hidden\"\n\t\t\t}, 250)\n\t\t} else {\n\t\t\tthis.host.style.visibility = \"visible\"\n\t\t}\n\t}\n\n\thideContent() {\n\t\tthis.isVisible = false\n\t\tthis.persist = false\n\t\tconst parentEl = document.getElementById(this.parentId) as HTMLGovTooltipElement\n\t\tif (parentEl) {\n\t\t\tparentEl.hide().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={TooltipContentClass.root}\n\t\t\t\trole={\"tooltip\"}\n\t\t\t\thidden={!this.isVisible}\n\t\t\t\taria-hidden={!toBoolAttr(this.isVisible)}\n\t\t\t\tis-visible={this.isVisible}>\n\t\t\t\t{this.message\n\t\t\t\t\t? <span class=\"gov-tooltip-content__message\" innerHTML={this.message}></span>\n\t\t\t\t\t: <slot></slot>}\n\t\t\t\t{this.persist ? (\n\t\t\t\t\t<gov-button\n\t\t\t\t\t\ton-gov-click={this.hideContent.bind(this)}\n\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\ttype={\"base\"}>\n\t\t\t\t\t\t<gov-icon slot={\"icon-start\"} name={\"x-lg\"} type={\"components\"}></gov-icon>\n\t\t\t\t\t</gov-button>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"gWAKO,MAAMA,EAAgBC,EAAKC,EAAQ,CAAC,UAAW,YAG/C,MAAMC,EAAcF,EAAKG,EAAO,CAAC,KAAM,KAAM,OAGpD,IAAYC,GAAZ,SAAYA,GACXA,EAAA,aACAA,EAAA,iBACAA,EAAA,mBACAA,EAAA,cACA,EALD,CAAYA,MAKX,KAGM,MAAMC,EAAe,CAC3BC,KAAM,eAGA,MAAMC,EAAsB,CAClCD,KAAM,uB,MCFME,EAAU,MAKtB,WAAAC,CAAAC,G,UAHiBC,KAAgBC,iBAAGC,UACnBF,KAASG,UAAGD,UAYZF,KAAAI,MAA2BhB,EAAciB,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AAMsG,EAAW1D,SAASmC,eAAe1F,KAAK0G,UAC9C,GAAIO,EAAU,CACbA,EAASV,OAAOW,O,EAIlB,MAAAtB,GACC,OACC5E,EAAC6E,EAAI,CAAAC,IAAA,2CACJE,MAAOpG,EAAoBD,KAC3BuG,KAAM,UACNd,QAASpF,KAAKyG,UAAS,eACTU,EAAWnH,KAAKyG,WAClB,aAAAzG,KAAKyG,WAChBzG,KAAKS,QACHO,EAAM,QAAAgF,MAAM,+BAA+BoB,UAAWpH,KAAKS,UAC3DO,EAAa,aACfhB,KAAKW,QACLK,EACe,6BAAAhB,KAAKgH,YAAYK,KAAKrH,MACpCI,MAAOJ,KAAKI,MACZE,KAAMN,KAAKM,KACXgH,KAAM,QACNtG,EAAU,YAAAuG,KAAM,aAAcC,KAAM,OAAQF,KAAM,gBAEhD,K","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,h as e,H as o,g as a}from"./p-ClISz4NF.js";import{g as s}from"./p-CoD1xawt.js";import{p as i}from"./p-CQvUntGY.js";import{S as r}from"./p-BcQO4NH2.js";import{v as c}from"./p-NOJjz9dT.js";import"./p-CgDnDrq5.js";const n=i(r,["_S","_M","_L","_XL"]);var d;(function(t){t["SIMPLE"]="simple";t["WAVES"]="waves";t["STRIPES"]="stripes";t["LINES"]="lines"})(d||(d={}));var l;(function(t){t["IMAGE"]="image";t["LOGO"]="logo";t["ICON"]="icon"})(l||(l={}));var b;(function(t){t["LIGHT"]="light";t["DARK"]="dark"})(b||(b={}));const f={root:"gov-banner",content:"gov-banner__content"};const h=class{constructor(e){t(this,e);this.size=n._M;this.background=d.SIMPLE;this.foreground=l.IMAGE;this.textColor=b.LIGHT;this.h=s(this.host)}validateSize(t){c(n,t,f.root)}validateBackground(t){c(d,t,f.root)}validateForeground(t){c(l,t,f.root)}validateTextColor(t){c(b,t,f.root)}componentWillLoad(){this.validateSize(this.size);this.validateBackground(this.background);this.validateForeground(this.foreground);this.validateTextColor(this.textColor)}render(){return e(o,Object.assign({key:"142c906194083f6c186d1f1d9033c4f2c9be9bff",class:this.h.classes(f.root),role:"region",size:this.size},this.size!=="xl"?{background:this.background,foreground:this.foreground}:{"text-color":this.textColor}),e("div",{key:"0b52a8859b6cdcd92d0f5e97b460a3e0a899bd44"},e("div",{key:"a36ed5ad57c878d70770ccfeccd172749a555b22",class:f.content},e("slot",{key:"57f52bfb0189450e77c00f4d9904712e555a3125",name:"headline"}),e("slot",{key:"91629f1bf0605ae28d694d044d19bbef9ebb69da"})),this.h.hasSlot("button")&&e("slot",{key:"458a59c73e9bdf02d6cdb1e8c5caea0dcfec526a",name:"button"})),e("slot",{key:"f1d60077313455ed78c78b56c7741b4b593cf7cc",name:"image"}))}get host(){return a(this)}static get watchers(){return{size:["validateSize"],background:["validateBackground"],foreground:["validateForeground"],"text-color":["validateTextColor"]}}};export{h as gov_banner};
|
|
2
|
+
//# sourceMappingURL=p-7f513718.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BannerSizes","pick","Sizes","BannerBackground","BannerForeground","BannerTextColor","BannerClass","root","content","GovBanner","constructor","hostRef","this","size","_M","background","SIMPLE","foreground","IMAGE","textColor","LIGHT","h","govHost","host","validateSize","newValue","validateProp","validateBackground","validateForeground","validateTextColor","componentWillLoad","render","Host","Object","assign","key","class","classes","role","name","hasSlot"],"sources":["../../../packages/core/src/components/gov-banner/constants.ts","../../../packages/core/src/components/gov-banner/gov-banner.tsx"],"sourcesContent":["import {ValueOf} from \"../../types/interfaces\";\nimport {pick} from \"../../utils/utils\";\nimport {Sizes} from \"../../core/constants/sizes\";\n\nexport const BannerSizes = pick(Sizes, ['_S', '_M', '_L', '_XL'])\nexport type BannerSizesType = `${ValueOf<typeof BannerSizes>}`\n\nexport enum BannerBackground {\n\tSIMPLE = 'simple',\n\tWAVES = 'waves',\n\tSTRIPES = 'stripes',\n\tLINES = 'lines',\n}\nexport type BannerBackgroundsType = `${ValueOf<typeof BannerBackground>}`\n\nexport enum BannerForeground {\n\tIMAGE = 'image',\n\tLOGO = 'logo',\n\tICON = 'icon',\n}\nexport type BannerForegroundsType = `${ValueOf<typeof BannerForeground>}`\n\nexport enum BannerTextColor {\n\tLIGHT = 'light',\n\tDARK = 'dark',\n}\nexport type BannerTextColorsType = `${ValueOf<typeof BannerTextColor>}`\n\nexport const BannerClass = {\n\troot: 'gov-banner',\n\tcontent: 'gov-banner__content',\n}\n","import {Component, Element, h, Host, Prop, Watch} from '@stencil/core'\nimport {govHost} from '../../helpers/Dom/template'\nimport {GovHost} from '../../helpers/Dom/template.types'\nimport {\n BannerBackground,\n BannerBackgroundsType,\n BannerClass,\n BannerForeground,\n BannerForegroundsType,\n BannerSizes,\n BannerSizesType,\n BannerTextColor,\n BannerTextColorsType\n} from \"./constants\";\nimport {validateProp} from \"../../helpers/Validate/props\";\n\n@Component({\n tag: 'gov-banner',\n})\nexport class GovBanner {\n private h: GovHost\n\n constructor() {\n this.h = govHost(this.host)\n }\n\n @Element() host: HTMLGovBannerElement\n /**\n * Banner’s size.\n */\n @Prop({reflect: true}) readonly size: BannerSizesType = BannerSizes._M\n /**\n * Banner’s background\n */\n @Prop() readonly background: BannerBackgroundsType = BannerBackground.SIMPLE\n /**\n * Banner’s foreground\n */\n @Prop() readonly foreground: BannerForegroundsType = BannerForeground.IMAGE\n /**\n * XL Banner’s text color\n */\n @Prop({attribute: 'text-color'}) readonly textColor: BannerTextColorsType = BannerTextColor.LIGHT\n\n @Watch('size')\n validateSize(newValue: string): void {\n validateProp(BannerSizes, newValue, BannerClass.root)\n }\n\n @Watch('background')\n validateBackground(newValue: string): void {\n validateProp(BannerBackground, newValue, BannerClass.root)\n }\n\n @Watch('foreground')\n validateForeground(newValue: string): void {\n validateProp(BannerForeground, newValue, BannerClass.root)\n }\n\n @Watch('text-color')\n validateTextColor(newValue: string): void {\n validateProp(BannerTextColor, newValue, BannerClass.root)\n }\n\n componentWillLoad(): void {\n this.validateSize(this.size)\n this.validateBackground(this.background)\n this.validateForeground(this.foreground)\n this.validateTextColor(this.textColor)\n }\n\n render() {\n return (\n <Host class={this.h.classes(BannerClass.root)}\n role=\"region\"\n size={this.size}\n {...(this.size !== \"xl\" ? {\n background: this.background,\n foreground: this.foreground\n } : {'text-color': this.textColor})}>\n <div>\n <div class={BannerClass.content}>\n <slot name=\"headline\"/>\n <slot/>\n </div>\n {this.h.hasSlot('button') && (\n <slot name=\"button\"/>\n )}\n </div>\n <slot name=\"image\"/>\n </Host>\n )\n }\n}\n"],"mappings":"iOAIO,MAAMA,EAAcC,EAAKC,EAAO,CAAC,KAAM,KAAM,KAAM,QAG1D,IAAYC,GAAZ,SAAYA,GACXA,EAAA,mBACAA,EAAA,iBACAA,EAAA,qBACAA,EAAA,gBACA,EALD,CAAYA,MAKX,KAGD,IAAYC,GAAZ,SAAYA,GACXA,EAAA,iBACAA,EAAA,eACAA,EAAA,cACA,EAJD,CAAYA,MAIX,KAGD,IAAYC,GAAZ,SAAYA,GACXA,EAAA,iBACAA,EAAA,cACA,EAHD,CAAYA,MAGX,KAGM,MAAMC,EAAc,CAC1BC,KAAM,aACNC,QAAS,uB,MCXGC,EAAS,MAGlB,WAAAC,CAAAC,G,UAQgCC,KAAAC,KAAwBb,EAAYc,GAInDF,KAAAG,WAAoCZ,EAAiBa,OAIrDJ,KAAAK,WAAoCb,EAAiBc,MAI5BN,KAAAO,UAAkCd,EAAgBe,MAnBxFR,KAAKS,EAAIC,EAAQV,KAAKW,KACzB,CAqBD,YAAAC,CAAaC,GACTC,EAAa1B,EAAayB,EAAUnB,EAAYC,K,CAIpD,kBAAAoB,CAAmBF,GACfC,EAAavB,EAAkBsB,EAAUnB,EAAYC,K,CAIzD,kBAAAqB,CAAmBH,GACfC,EAAatB,EAAkBqB,EAAUnB,EAAYC,K,CAIzD,iBAAAsB,CAAkBJ,GACdC,EAAarB,EAAiBoB,EAAUnB,EAAYC,K,CAGxD,iBAAAuB,GACIlB,KAAKY,aAAaZ,KAAKC,MACvBD,KAAKe,mBAAmBf,KAAKG,YAC7BH,KAAKgB,mBAAmBhB,KAAKK,YAC7BL,KAAKiB,kBAAkBjB,KAAKO,U,CAGhC,MAAAY,GACI,OACIV,EAACW,EAAIC,OAAAC,OAAA,CAAAC,IAAA,2CAACC,MAAOxB,KAAKS,EAAEgB,QAAQ/B,EAAYC,MAClC+B,KAAK,SACLzB,KAAMD,KAAKC,MACND,KAAKC,OAAS,KAAO,CACtBE,WAAYH,KAAKG,WACjBE,WAAYL,KAAKK,YACjB,CAAC,aAAcL,KAAKO,YAC1BE,EAAA,OAAAc,IAAA,4CACId,EAAA,OAAAc,IAAA,2CAAKC,MAAO9B,EAAYE,SACpBa,EAAM,QAAAc,IAAA,2CAAAI,KAAK,aACXlB,EAAA,QAAAc,IAAA,8CAEHvB,KAAKS,EAAEmB,QAAQ,WACZnB,EAAA,QAAAc,IAAA,2CAAMI,KAAK,YAGnBlB,EAAA,QAAAc,IAAA,2CAAMI,KAAK,U","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as s,h as i,H as h,g as e}from"./p-ClISz4NF.js";import{a as o,b as a}from"./p-CoD1xawt.js";import{v as n}from"./p-NOJjz9dT.js";import{r,c as l}from"./p-vN03FcXN.js";import{d as c,t as f,h as p}from"./p-CQvUntGY.js";import{F as u,a as d}from"./p-DYcNEwSZ.js";import{p as m}from"./p-Ccwpa1ck.js";import{A as b,a as v}from"./p-Bz_RzYFb.js";import{i as g}from"./p-CzXeijOj.js";import"./p-CgDnDrq5.js";import"./p-BcQO4NH2.js";import"./p-DNztiAH0.js";const y=t=>typeof t==="string"?r(t).toLowerCase():"";const w=(t,s,i,h)=>{const e=Array.isArray(t)?t:[];const o=y(s);const a=o.length===0?e:e.filter((t=>{const s=t===null||t===void 0?void 0:t[i];return typeof s==="string"&&y(s).includes(o)}));return Number.isInteger(h)&&h>0?a.slice(0,h):a};const j=class{constructor(i){t(this,i);this.govFocus=s(this,"gov-focus");this.govBlur=s(this,"gov-blur");this.govInput=s(this,"gov-input");this.govSelect=s(this,"gov-select");this.fullOptions=[];this.templateResolver=t=>t[this.nameKey];this.value="";this.size="m";this.nameKey="name";this.required=false;this.disabled=false;this.minlength=3;this.maxOptions=10;this.throttleTime=200;this.messageEmpty="Nebyly nalezeny žádné výsledky";this.processing=false;this.arrowCounter=-1;this.list=[];this.inheritedAttributes={};this.emitAndSearch=t=>{this.govInput.emit({originalEvent:t,component:u.root,value:this.value,selected:null});this.doSearch()};this.onInputHandler=t=>{t.stopPropagation();this.value=t.detail.value;this.debouncedSearch(t)};this.listBoxId=l("GovListBox")}validateSize(t){n(d,t,u.root)}watchOptions(t){this.fullOptions=m(t);if(this.searchCallback){this.setOptions(this.fullOptions).catch()}else{this.list=w(this.fullOptions,this.value,this.nameKey,this.maxOptions)}}onArrowUp(){if(this.arrowCounter>0){this.arrowCounter=this.arrowCounter-1;this.moveToView().finally()}}onArrowDown(){if(this.arrowCounter<this.list.length-1){this.arrowCounter=this.arrowCounter+1;this.moveToView().finally()}}async moveToView(){await c(200);const t=this.listRef.offsetHeight;const s=this.listRef.querySelector('li[aria-selected="true"]');if(s&&t){const t=s.offsetTop;this.listRef.scrollTo({top:t,behavior:"smooth"})}}doSearch(){if(this.searchCallback){if(Number.isInteger(this.minlength)&&this.isValueAccepted===false&&this.minlength){this.list=[];this.arrowCounter=-1;this.processing=false;return}this.processing=true;this.searchCallback(this.value).then((t=>this.list=t)).catch((()=>this.list=[])).finally((()=>{this.arrowCounter=-1;this.processing=false}));return}this.list=w(this.fullOptions,this.value,this.nameKey,this.maxOptions);this.arrowCounter=-1}clearList(){if(this.fullOptions.length===0){this.list=[]}}get isValueAccepted(){if(typeof this.value==="string"){return this.value.length>=this.minlength}else{return false}}componentDidLoad(){this.attributeObserver=new b(this.host,((t,s)=>{this.onAriaAttributeChange(t,s)}));this.attributeObserver.startObserving(v)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=g(this.host);this.debouncedSearch=f(this.emitAndSearch,this.throttleTime);this.fullOptions=m(this.options);if(!this.searchCallback){this.list=w(this.fullOptions,this.value,this.nameKey,this.maxOptions)}}watchThrottleTime(){this.debouncedSearch=f(this.emitAndSearch,this.throttleTime)}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,s){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:s})}render(){return i(h,{key:"0cdbf770359115b24432e9d533b4e17ab2c65e18",class:u.root,size:this.size},i("gov-form-input",Object.assign({key:"5724ed153e3f2384725badbafdb0c19e67b69538",placeholder:this.placeholder,name:this.name,disabled:this.disabled,readonly:this.readonly,autocomplete:false,size:this.size,required:this.required,invalid:this.invalid,success:this.success,role:"searchbox",value:this.value,minlength:this.minlength,maxlength:this.maxlength,"on-gov-input":this.onInputHandler,"on-gov-keyup":this.onKeyUpHandler.bind(this),"on-gov-keydown":this.onKeyDownHandler.bind(this),"on-gov-focus":this.onFocusHandler.bind(this),"on-gov-blur":this.onBlurHandler.bind(this)},this.inheritedAttributes,{"aria-autocomplete":"list","aria-owns":[this.listBoxId,this.inheritedAttributes["aria-owns"]].join(" "),"aria-expanded":a(this.list.length&&this.focused?true:false),ref:t=>this.inputRef=t}),i("slot",{key:"ab6f37982f3d13adc2473a744b5697ac8bc651f5",name:"validation-icon"}),i("slot",{key:"1961a029eceee169b5be12fa4ba8c2e9072bb9de",name:"icon-end"})),i("ul",{key:"61b9b6929be4816e93e1b5fb778c3861b4f8631b",class:u.list,role:"listbox","aria-hidden":o(!this.focused),hidden:!this.focused,id:this.listBoxId,ref:t=>this.listRef=t},this.focused&&this.list.length===0&&this.processing===false&&(this.isValueAccepted||!this.searchCallback&&this.fullOptions.length>0)&&this.messageEmpty?i("li",{class:u.empty},this.messageEmpty):null,this.focused&&this.processing===true&&this.isValueAccepted?i("li",{class:u.loading},i("gov-skeleton",{size:"m"})):null,this.focused?this.list.map(((t,s)=>{const h=this.arrowCounter===s;return i("li",{class:u.item,innerHTML:this.templateResolver(t,h),role:"option","aria-posinset":s,tabindex:h?0:-1,"aria-setsize":this.list.length,onTouchStart:t=>this.onSelectHandler(t,s),onMouseDown:t=>this.onSelectHandler(t,s),"aria-selected":o(h)},i("slot",{name:"list-item-left"}),i("slot",{name:"list-item-right"}))})):null))}onFocusHandler(t){this.focused=true;this.arrowCounter=-1;if(this.searchCallback){if(this.isValueAccepted){this.doSearch()}}else{this.doSearch()}t.stopPropagation();this.govFocus.emit({originalEvent:t,component:u.root,value:this.value,selected:null})}onBlurHandler(t){this.focused=false;this.clearList();this.arrowCounter=-1;t.stopPropagation();this.govBlur.emit({originalEvent:t,component:u.root,value:this.value,selected:null})}onSelectHandler(t,s=-1){let i=null;if(s>-1){i=this.list[s]}else if(p(this.arrowCounter,this.list)){i=this.list[this.arrowCounter]}if(i){this.govSelect.emit({component:u.root,value:this.value,selected:i,originalEvent:t});this.clearList();if(p(this.nameKey,i)&&typeof i[this.nameKey]==="string"){this.value=i[this.nameKey]}}}onKeyUpHandler(t){const s=t.detail.originalEvent;t.stopPropagation();s.stopPropagation();if(s.keyCode===38)this.onArrowUp();else if(s.keyCode===40)this.onArrowDown();else if(s.keyCode===13){t.preventDefault();s.preventDefault();this.onSelectHandler(t)}}onKeyDownHandler(t){const s=t.detail.originalEvent;t.stopPropagation();s.stopPropagation();if(s.keyCode===13){t.preventDefault();s.preventDefault()}}async setFocus(t){return this.inputRef.focus(t)}async setBlur(){return this.inputRef.blur()}async setOptions(t){this.list=Array.isArray(t)?t:[];this.arrowCounter=-1}async clearValue(){this.value="";this.inputRef.value="";await this.inputRef.clearValue()}async setProcessing(t){this.processing=t}async setSearchCallback(t){this.searchCallback=t}async setTemplateResolver(t){this.templateResolver=t}get host(){return e(this)}static get watchers(){return{size:["validateSize"],options:["watchOptions"],throttleTime:["watchThrottleTime"]}}};export{j as gov_form_autocomplete};
|
|
2
|
+
//# sourceMappingURL=p-8d47e346.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["normalize","value","removeDiacritics","toLowerCase","filterAutocompleteOptions","options","query","nameKey","maxOptions","source","Array","isArray","normalizedQuery","matches","length","filter","item","text","includes","Number","isInteger","slice","GovFormAutocomplete","constructor","hostRef","this","fullOptions","templateResolver","size","required","disabled","minlength","throttleTime","messageEmpty","processing","arrowCounter","list","inheritedAttributes","emitAndSearch","e","govInput","emit","originalEvent","component","FormAutocompleteClass","root","selected","doSearch","onInputHandler","stopPropagation","detail","debouncedSearch","listBoxId","createID","validateSize","newValue","validateProp","FormAutocompleteSizes","watchOptions","propsValueToArray","searchCallback","setOptions","catch","onArrowUp","moveToView","finally","onArrowDown","delay","heightOfList","listRef","offsetHeight","querySelector","offsetTop","scrollTo","top","behavior","isValueAccepted","then","response","clearList","componentDidLoad","attributeObserver","AttributeObserver","host","attributeName","onAriaAttributeChange","startObserving","ariaAttributes","componentWillLoad","inheritAriaAttributes","throttle","watchThrottleTime","disconnectedCallback","_a","stopObserving","removeAttribute","Object","assign","render","h","Host","key","class","placeholder","name","readonly","autocomplete","invalid","success","role","maxlength","onKeyUpHandler","bind","onKeyDownHandler","onFocusHandler","onBlurHandler","join","booleanString","focused","ref","el","inputRef","toBoolAttr","hidden","id","empty","loading","map","index","isSelected","innerHTML","tabindex","onTouchStart","onSelectHandler","onMouseDown","govFocus","govBlur","has","govSelect","event","keyCode","preventDefault","setFocus","focus","setBlur","blur","clearValue","setProcessing","status","setSearchCallback","callback","setTemplateResolver"],"sources":["../../../packages/core/src/components/gov-form/autocomplete/autocomplete.utils.ts","../../../packages/core/src/components/gov-form/autocomplete/gov-form-autocomplete.tsx"],"sourcesContent":["import { removeDiacritics } from '../../../utils/string.utils'\nimport { GovFormAutocompleteItem } from './gov-form-autocomplete.types'\n\nconst normalize = (value: unknown): string =>\n\ttypeof value === 'string' ? removeDiacritics(value).toLowerCase() : ''\n\nexport const filterAutocompleteOptions = (\n\toptions: GovFormAutocompleteItem[],\n\tquery: string,\n\tnameKey: string,\n\tmaxOptions: number,\n): GovFormAutocompleteItem[] => {\n\tconst source = Array.isArray(options) ? options : []\n\tconst normalizedQuery = normalize(query)\n\tconst matches =\n\t\tnormalizedQuery.length === 0\n\t\t\t? source\n\t\t\t: source.filter(item => {\n\t\t\t\t\tconst text = item?.[nameKey]\n\t\t\t\t\treturn typeof text === 'string' && normalize(text).includes(normalizedQuery)\n\t\t\t\t})\n\treturn Number.isInteger(maxOptions) && maxOptions > 0 ? matches.slice(0, maxOptions) : matches\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core'\nimport {booleanString, toBoolAttr} from '../../../helpers/Dom/template'\nimport {validateProp} from '../../../helpers/Validate/props'\nimport {Nullable} from '../../../types/interfaces'\nimport {createID} from '../../../utils/string.utils'\nimport {delay, has, throttle} from '../../../utils/utils'\nimport {FormInputEvent} from '../input/gov-form-input.types'\nimport {FormAutocompleteClass, FormAutocompleteSizes, SizesType,} from './constants'\nimport {FormAutocompleteEvent, GovFormAutocompleteItem} from './gov-form-autocomplete.types'\nimport {propsValueToArray} from \"../../../utils/array.utils\";\nimport { filterAutocompleteOptions } from './autocomplete.utils'\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-form-autocomplete',\n})\nexport class GovFormAutocomplete {\n\tprivate inputRef?: HTMLGovFormInputElement\n\tprivate listRef?: HTMLUListElement\n\tprivate readonly listBoxId: string\n\tprivate searchCallback: (value: string) => Promise<GovFormAutocompleteItem[]>\n\tprivate fullOptions: GovFormAutocompleteItem[] = []\n\tprivate templateResolver: (item: GovFormAutocompleteItem, selected: boolean) => string = item => item[this.nameKey]\n\tprivate attributeObserver: AttributeObserver\n\tprivate debouncedSearch: (e: CustomEvent<FormInputEvent>) => void\n\n\tconstructor() {\n\t\tthis.listBoxId = createID('GovListBox')\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value = ''\n\t/**\n\t * Options of autocomplete\n\t */\n\t@Prop({reflect: true, mutable: true}) options?: string | GovFormAutocompleteItem[]\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: 'identifier'}) readonly identifier: string\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: SizesType = 'm'\n\t/**\n\t * Main key name in the object\n\t */\n\t@Prop({attribute: 'name-key'}) readonly nameKey: string = 'name'\n\t/**\n\t * Name of the input.\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 input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * 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 * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number = 3\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Maximum number of items shown from a static `options` list (0 = unlimited).\n\t * Applies only when no async search callback is set.\n\t */\n\t@Prop({attribute: 'max-options'}) readonly maxOptions: number = 10\n\t/**\n\t * Input throttle in milliseconds\n\t */\n\t@Prop() readonly throttleTime: number = 200\n\t/**\n\t * Custom message for when there is a blank sheet\n\t */\n\t@Prop({attribute: 'message-empty'}) readonly messageEmpty: string = 'Nebyly nalezeny žádné výsledky'\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: 'gov-focus'}) govFocus: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: 'gov-blur'}) govBlur: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-input'}) govInput: EventEmitter<FormAutocompleteEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: 'gov-select'}) govSelect: EventEmitter<FormAutocompleteEvent>\n\n\t@State() focused: boolean\n\t@State() processing = false\n\t@State() arrowCounter = -1\n\t@State() list: GovFormAutocompleteItem[] = []\n\t@State() inheritedAttributes: Attributes = {}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormAutocompleteSizes, newValue, FormAutocompleteClass.root)\n\t}\n\n\t@Watch('options')\n\twatchOptions(newValue: string | GovFormAutocompleteItem[]): void {\n\t\tthis.fullOptions = propsValueToArray<GovFormAutocompleteItem[]>(newValue)\n\t\tif (this.searchCallback) {\n\t\t\tthis.setOptions(this.fullOptions).catch()\n\t\t} else {\n\t\t\tthis.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions)\n\t\t}\n\t}\n\n\tprivate onArrowUp() {\n\t\tif (this.arrowCounter > 0) {\n\t\t\tthis.arrowCounter = this.arrowCounter - 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate onArrowDown() {\n\t\tif (this.arrowCounter < this.list.length - 1) {\n\t\t\tthis.arrowCounter = this.arrowCounter + 1\n\t\t\tthis.moveToView().finally()\n\t\t}\n\t}\n\n\tprivate async moveToView() {\n\t\tawait delay(200)\n\t\tconst heightOfList = this.listRef.offsetHeight\n\t\tconst selected = this.listRef.querySelector('li[aria-selected=\"true\"]') as HTMLUListElement\n\t\tif (selected && heightOfList) {\n\t\t\tconst offsetTop = selected.offsetTop\n\t\t\tthis.listRef.scrollTo({top: offsetTop, behavior: 'smooth'})\n\t\t}\n\t}\n\n\tprivate doSearch() {\n\t\tif (this.searchCallback) {\n\t\t\tif (Number.isInteger(this.minlength) && this.isValueAccepted === false && this.minlength) {\n\t\t\t\tthis.list = []\n\t\t\t\tthis.arrowCounter = -1\n\t\t\t\tthis.processing = false\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.processing = true\n\t\t\tthis.searchCallback(this.value)\n\t\t\t\t.then(response => (this.list = response))\n\t\t\t\t.catch(() => (this.list = []))\n\t\t\t\t.finally(() => {\n\t\t\t\t\tthis.arrowCounter = -1\n\t\t\t\t\tthis.processing = false\n\t\t\t\t})\n\t\t\treturn\n\t\t}\n\t\tthis.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions)\n\t\tthis.arrowCounter = -1\n\t}\n\n\tprivate clearList() {\n\t\tif (this.fullOptions.length === 0) {\n\t\t\tthis.list = []\n\t\t}\n\t}\n\n\tget isValueAccepted() {\n\t\tif (typeof this.value === 'string') {\n\t\t\treturn this.value.length >= this.minlength\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\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.inheritedAttributes = inheritAriaAttributes(this.host);\n\t\tthis.debouncedSearch = throttle(this.emitAndSearch, this.throttleTime)\n\t\tthis.fullOptions = propsValueToArray<GovFormAutocompleteItem[]>(this.options)\n\t\tif (!this.searchCallback) {\n\t\t\tthis.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions)\n\t\t}\n\t}\n\n\t@Watch('throttleTime')\n\twatchThrottleTime() {\n\t\tthis.debouncedSearch = throttle(this.emitAndSearch, this.throttleTime)\n\t}\n\n\tprivate emitAndSearch = (e: CustomEvent<FormInputEvent>) => {\n\t\tthis.govInput.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t\tthis.doSearch()\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\trender() {\n\t\treturn (\n\t\t\t<Host class={FormAutocompleteClass.root} size={this.size}>\n\t\t\t\t<gov-form-input\n\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tautocomplete={false}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tinvalid={this.invalid}\n\t\t\t\t\tsuccess={this.success}\n\t\t\t\t\trole={'searchbox'}\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\ton-gov-input={this.onInputHandler}\n\t\t\t\t\ton-gov-keyup={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\ton-gov-keydown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\ton-gov-focus={this.onFocusHandler.bind(this)}\n\t\t\t\t\ton-gov-blur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t{...this.inheritedAttributes}\n\t\t\t\t\taria-autocomplete={'list'}\n\t\t\t\t\taria-owns={[this.listBoxId, this.inheritedAttributes['aria-owns']].join(' ')}\n\t\t\t\t\taria-expanded={booleanString(this.list.length && this.focused ? true : false)}\n\t\t\t\t\tref={el => (this.inputRef = el as HTMLGovFormInputElement)}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"validation-icon\" />\n\t\t\t\t\t<slot name=\"icon-end\" />\n\t\t\t\t</gov-form-input>\n\t\t\t\t<ul class={FormAutocompleteClass.list}\n\t\t\t\t\trole={'listbox'}\n\t\t\t\t\taria-hidden={toBoolAttr(!this.focused)}\n\t\t\t\t\thidden={!this.focused}\n\t\t\t\t\tid={this.listBoxId}\n\t\t\t\t\tref={el => (this.listRef = el as HTMLUListElement)}>\n\t\t\t\t\t{this.focused && this.list.length === 0 && this.processing === false && (this.isValueAccepted || (!this.searchCallback && this.fullOptions.length > 0)) && this.messageEmpty ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.empty}>{this.messageEmpty}</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused && this.processing === true && this.isValueAccepted ? (\n\t\t\t\t\t\t<li class={FormAutocompleteClass.loading}>\n\t\t\t\t\t\t\t<gov-skeleton size=\"m\"></gov-skeleton>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{this.focused ? this.list.map((item, index) => {\n\t\t\t\t\t\tconst isSelected = this.arrowCounter === index\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\tclass={FormAutocompleteClass.item}\n\t\t\t\t\t\t\t\tinnerHTML={this.templateResolver(item, isSelected)}\n\t\t\t\t\t\t\t\trole={'option'}\n\t\t\t\t\t\t\t\taria-posinset={index}\n\t\t\t\t\t\t\t\ttabindex={isSelected ? 0 : -1}\n\t\t\t\t\t\t\t\taria-setsize={this.list.length}\n\t\t\t\t\t\t\t\tonTouchStart={(e: TouchEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\tonMouseDown={(e: PointerEvent) => this.onSelectHandler(e, index)}\n\t\t\t\t\t\t\t\taria-selected={toBoolAttr(isSelected)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-left\"/>\n\t\t\t\t\t\t\t\t<slot name=\"list-item-right\"/>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t)\n\t\t\t\t\t}) : null}\n\t\t\t\t</ul>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\tthis.focused = true\n\t\tthis.arrowCounter = -1\n\t\tif (this.searchCallback) {\n\t\t\tif (this.isValueAccepted) {\n\t\t\t\tthis.doSearch()\n\t\t\t}\n\t\t} else {\n\t\t\tthis.doSearch()\n\t\t}\n\t\te.stopPropagation()\n\t\tthis.govFocus.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\tthis.focused = false\n\t\tthis.clearList();\n\t\tthis.arrowCounter = -1\n\t\te.stopPropagation()\n\t\tthis.govBlur.emit({\n\t\t\toriginalEvent: e,\n\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\tvalue: this.value,\n\t\t\tselected: null,\n\t\t})\n\t}\n\n\tprivate onInputHandler = (e: CustomEvent<FormInputEvent>) => {\n\t\te.stopPropagation()\n\t\tthis.value = e.detail.value\n\t\tthis.debouncedSearch(e)\n\t}\n\n\tprivate onSelectHandler(e: PointerEvent | CustomEvent | TouchEvent, index = -1) {\n\t\tlet selected: Nullable<GovFormAutocompleteItem> = null\n\t\tif (index > -1) {\n\t\t\tselected = this.list[index]\n\t\t} else if (has(this.arrowCounter, this.list)) {\n\t\t\tselected = this.list[this.arrowCounter]\n\t\t}\n\t\tif (selected) {\n\t\t\tthis.govSelect.emit({\n\t\t\t\tcomponent: FormAutocompleteClass.root,\n\t\t\t\tvalue: this.value,\n\t\t\t\tselected: selected,\n\t\t\t\toriginalEvent: e,\n\t\t\t})\n\t\t\tthis.clearList();\n\t\t\tif (has(this.nameKey, selected) && typeof selected[this.nameKey] === 'string') {\n\t\t\t\tthis.value = selected[this.nameKey]\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onKeyUpHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 38) this.onArrowUp()\n\t\telse if (event.keyCode === 40) this.onArrowDown()\n\t\telse if (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t\tthis.onSelectHandler(e)\n\t\t}\n\t}\n\n\tprivate onKeyDownHandler(e: CustomEvent) {\n\t\tconst event = (e.detail as FormInputEvent).originalEvent as KeyboardEvent\n\t\te.stopPropagation()\n\t\tevent.stopPropagation()\n\t\tif (event.keyCode === 13) {\n\t\t\te.preventDefault()\n\t\t\tevent.preventDefault()\n\t\t}\n\t}\n\n\t/**\n\t * Focus main input element\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Blur main input element\n\t */\n\t@Method()\n\tasync setBlur(): Promise<void> {\n\t\treturn this.inputRef.blur()\n\t}\n\n\t/**\n\t * Set options for list\n\t */\n\t@Method()\n\tasync setOptions(options: GovFormAutocompleteItem[]): Promise<void> {\n\t\tthis.list = Array.isArray(options) ? options : []\n\t\tthis.arrowCounter = -1\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\n\t\tawait this.inputRef.clearValue()\n\t}\n\n\t/**\n\t * Clears whisperer value\n\t */\n\t@Method()\n\tasync setProcessing(status: boolean): Promise<void> {\n\t\tthis.processing = status\n\t}\n\n\t/**\n\t * Set a custom asynchronous function for the whisperer\n\t */\n\t@Method()\n\tasync setSearchCallback(callback: (value: string) => Promise<any>) {\n\t\tthis.searchCallback = callback\n\t}\n\n\t/**\n\t * Setting a custom whisper result template\n\t * @param callback\n\t */\n\t@Method()\n\tasync setTemplateResolver(callback: (item: GovFormAutocompleteItem) => string) {\n\t\tthis.templateResolver = callback\n\t}\n}\n"],"mappings":"6cAGA,MAAMA,EAAaC,UACXA,IAAU,SAAWC,EAAiBD,GAAOE,cAAgB,GAE9D,MAAMC,EAA4B,CACxCC,EACAC,EACAC,EACAC,KAEA,MAAMC,EAASC,MAAMC,QAAQN,GAAWA,EAAU,GAClD,MAAMO,EAAkBZ,EAAUM,GAClC,MAAMO,EACLD,EAAgBE,SAAW,EACxBL,EACAA,EAAOM,QAAOC,IACd,MAAMC,EAAOD,IAAA,MAAAA,SAAI,SAAJA,EAAOT,GACpB,cAAcU,IAAS,UAAYjB,EAAUiB,GAAMC,SAASN,EAAgB,IAEhF,OAAOO,OAAOC,UAAUZ,IAAeA,EAAa,EAAIK,EAAQQ,MAAM,EAAGb,GAAcK,CAAO,E,MCHlFS,EAAmB,MAU/B,WAAAC,CAAAC,G,kJALQC,KAAWC,YAA8B,GACzCD,KAAgBE,iBAAiEX,GAAQA,EAAKS,KAAKlB,SAYrEkB,KAAKxB,MAAG,GAgB7BwB,KAAIG,KAAe,IAIIH,KAAOlB,QAAW,OASzCkB,KAAQI,SAAY,MAKLJ,KAAQK,SAAY,MAgBnCL,KAASM,UAAW,EASMN,KAAUjB,WAAW,GAI/CiB,KAAYO,aAAW,IAIKP,KAAYQ,aAAW,iCAmB3DR,KAAUS,WAAG,MACbT,KAAYU,cAAG,EACfV,KAAIW,KAA8B,GAClCX,KAAmBY,oBAAe,GAoGnCZ,KAAAa,cAAiBC,IACxBd,KAAKe,SAASC,KAAK,CAClBC,cAAeH,EACfI,UAAWC,EAAsBC,KACjC5C,MAAOwB,KAAKxB,MACZ6C,SAAU,OAEXrB,KAAKsB,UAAU,EAiHRtB,KAAAuB,eAAkBT,IACzBA,EAAEU,kBACFxB,KAAKxB,MAAQsC,EAAEW,OAAOjD,MACtBwB,KAAK0B,gB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