@gov-design-system-ce/components 0.0.70 → 4.0.0
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/gov-icon.cjs.entry.js +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-attachments-item.js +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-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-modal.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-prompt.js +1 -1
- package/dist/components/gov-side-nav-item.js +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tag.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-wizard-item.js +1 -1
- package/dist/components/{p-559d660f.js → p-198dc831.js} +2 -2
- package/dist/components/{p-fb5194a6.js → p-37a38783.js} +2 -2
- package/dist/components/{p-5d223502.js → p-52ac9c76.js} +2 -2
- package/dist/components/p-6f454bf0.js +2 -0
- package/dist/components/{p-4b5f8c6e.js.map → p-6f454bf0.js.map} +1 -1
- package/dist/components/{p-b8fa0c35.js → p-b3acd8f1.js} +2 -2
- package/dist/components/{p-a80377a8.js → p-b5462602.js} +2 -2
- package/dist/components/{p-8a8bb365.js → p-d9460b5e.js} +2 -2
- package/dist/core/core.esm.js +1 -1
- package/dist/core/p-5613e8db.entry.js +2 -0
- package/dist/core/{p-3424977f.entry.js.map → p-5613e8db.entry.js.map} +1 -1
- package/dist/esm/gov-icon.entry.js +1 -1
- package/package.json +2 -2
- package/dist/components/p-4b5f8c6e.js +0 -2
- package/dist/core/p-3424977f.entry.js +0 -2
- /package/dist/components/{p-559d660f.js.map → p-198dc831.js.map} +0 -0
- /package/dist/components/{p-fb5194a6.js.map → p-37a38783.js.map} +0 -0
- /package/dist/components/{p-5d223502.js.map → p-52ac9c76.js.map} +0 -0
- /package/dist/components/{p-b8fa0c35.js.map → p-b3acd8f1.js.map} +0 -0
- /package/dist/components/{p-a80377a8.js.map → p-b5462602.js.map} +0 -0
- /package/dist/components/{p-8a8bb365.js.map → p-d9460b5e.js.map} +0 -0
package/dist/core/core.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as a,b as l}from"./p-5bc604a3.js";export{s as setNonce}from"./p-5bc604a3.js";const i=()=>{{c(a.prototype)}const l=import.meta.url;const i={};if(l!==""){i.resourcesUrl=new URL(".",l).href}return e(i)};const c=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const l=a.call(this,false);const i=this.childNodes;if(e){for(let e=0;e<i.length;e++){if(i[e].nodeType!==2){l.appendChild(i[e].cloneNode(true))}}}return l}};i().then((e=>l(JSON.parse('[["p-28c83bdf",[[4,"gov-form-file",{"expanded":[4],"required":[4],"disabled":[4],"displayAttachments":[4,"display-attachments"],"name":[1],"accept":[1],"multiple":[4],"maxFileSize":[2,"max-file-size"],"identifier":[1],"invalid":[4],"errorSize":[1,"error-size"],"errorAccept":[1,"error-accept"],"attachmentsLabel":[1,"attachments-label"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagRemoveLabel":[1,"wcag-remove-label"],"wcagAttachmentsLabel":[1,"wcag-attachments-label"],"files":[32],"getRef":[64],"getAreaRef":[64],"reset":[64],"validateWcag":[64]}]]],["p-24a60224",[[4,"gov-form-multi-select",{"identifier":[1],"placeholder":[1],"variant":[1],"size":[1],"name":[1],"hideSelectedList":[4,"hide-selected-list"],"required":[4],"disabled":[4],"invalid":[4],"success":[4],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"value":[32],"selectedOptions":[32],"options":[32],"setFocus":[64],"setValue":[64],"getRef":[64],"getSelectedOptions":[64],"setOptions":[64],"setSelectedOptions":[64],"removeSelectedOption":[64],"setSelectedOption":[64],"validateWcag":[64]}]]],["p-13942637",[[4,"gov-modal",{"open":[1028],"blockClose":[4,"block-close"],"label":[1],"role":[1],"labelTag":[1,"label-tag"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagCloseLabel":[1,"wcag-close-label"],"wcagCloseLabelledBy":[1,"wcag-close-labelled-by"],"show":[64],"hide":[64],"validateWcag":[64]}]]],["p-f4a6a339",[[0,"gov-pagination",{"type":[1],"current":[2],"total":[2],"inverse":[4],"size":[1],"variant":[1],"pageSize":[2,"page-size"],"maxPages":[2,"max-pages"],"link":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagSelectLabel":[1,"wcag-select-label"],"wcagPageLabel":[1,"wcag-page-label"],"pagination":[32],"validateWcag":[64]}]]],["p-6b1c11ba",[[4,"gov-prompt",{"open":[1028],"label":[1],"role":[1],"labelTag":[1,"label-tag"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagCloseLabel":[1,"wcag-close-label"],"wcagCloseLabelledBy":[1,"wcag-close-labelled-by"],"show":[64],"hide":[64],"validateWcag":[64]}]]],["p-3aa4cf18",[[4,"gov-tabs",{"type":[1],"variant":[1],"orientation":[1],"wcagLabel":[1,"wcag-label"],"wcagSelectLabel":[1,"wcag-select-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"controller":[32],"focusIndex":[32],"compactControls":[32],"refresh":[64],"currentTab":[64],"setActiveTab":[64],"validateWcag":[64]}]]],["p-fc81b896",[[4,"gov-infobar",{"headline":[1],"variant":[1],"inverse":[4],"wcagCloseLabel":[1,"wcag-close-label"],"wcagToggleLabel":[1,"wcag-toggle-label"],"closable":[4],"toggleContent":[32],"validateWcag":[64]}]]],["p-01d928c5",[[4,"gov-loading"]]],["p-3b45ecb0",[[4,"gov-side-nav-item",{"inverse":[4],"compact":[4],"identifier":[1],"count":[4],"label":[1],"disabled":[4],"href":[1],"isExpanded":[4,"is-expanded"],"isExpandedState":[32],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-18396341",[[4,"gov-toast",{"variant":[1],"gravity":[1],"position":[1],"type":[1],"time":[2],"closeLabel":[1,"close-label"],"wcagCloseLabel":[1,"wcag-close-label"],"destroy":[64]}]]],["p-09966eaa",[[4,"gov-tooltip-content",{"variant":[1],"size":[1],"persist":[4],"isVisible":[1028,"is-visible"],"parentId":[1,"parent-id"]}]]],["p-d1a3e571",[[4,"gov-accordion-item",{"variant":[1],"identifier":[1],"size":[1],"disabled":[4],"isExpanded":[1028,"is-expanded"],"isExpandedState":[32],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-a7d895cb",[[4,"gov-card",{"promotion":[4],"label":[1],"collapsible":[4],"expanded":[4],"headlineTag":[1,"headline-tag"],"wcagTriggerLabel":[1,"wcag-trigger-label"],"wcagTriggerLabelledBy":[1,"wcag-trigger-labelled-by"],"isExpanded":[32],"open":[64],"close":[64],"validateWcag":[64]}]]],["p-26921fac",[[4,"gov-form-checkbox",{"value":[1],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"noLabel":[4,"no-label"],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-bd763705",[[4,"gov-tag",{"inverse":[4],"iconLeft":[1,"icon-left"],"iconRight":[1,"icon-right"],"size":[513],"variant":[513]}]]],["p-2f858bf5",[[4,"gov-tile",{"href":[513],"target":[1],"getTriggerRef":[64]}]]],["p-bd1855f7",[[4,"gov-wizard-item",{"variant":[1],"size":[1],"identifier":[1],"collapsible":[4],"annotation":[1],"label":[1],"disabled":[4],"isExpanded":[1028,"is-expanded"],"labelTag":[1,"label-tag"],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-9d10131d",[[4,"gov-accordion",{"size":[1],"variant":[1],"noBorder":[4,"no-border"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-fe3f57cc",[[0,"gov-app"]]],["p-1fd3d109",[[4,"gov-breadcrumbs",{"collapsible":[4],"isExpanded":[4,"is-expanded"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labeled-by"],"validateWcag":[64]}]]],["p-22abe742",[[4,"gov-container",{"slottedChildren":[64]}]]],["p-c44d44df",[[4,"gov-control-group",{"variant":[1],"noBorder":[4,"no-border"]}]]],["p-141d9af4",[[4,"gov-cookiebar"]]],["p-81593c86",[[4,"gov-dropdown",{"open":[1028],"position":[1],"getState":[64],"setOpen":[64]}]]],["p-7757e4a1",[[4,"gov-empty"]]],["p-89b3e4d4",[[4,"gov-error-code"]]],["p-bb7f0a66",[[4,"gov-form-control",{"gap":[1],"identifier":[1],"invalid":[4],"disabled":[4],"success":[4],"fieldset":[4],"size":[1]}]]],["p-47d63996",[[4,"gov-form-group",{"gap":[1],"orientation":[1]}]]],["p-74882c70",[[4,"gov-form-label",{"identifier":[1],"size":[1],"required":[4],"legend":[4]}]]],["p-705efbf1",[[4,"gov-form-password-power",{"power":[514]}]]],["p-0950ca8d",[[4,"gov-form-radio",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-c574ecc8",[[4,"gov-form-search",{"variant":[513]}]]],["p-cef10fe5",[[4,"gov-form-switch",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-67138ae9",[[4,"gov-grid",{"alignX":[1,"align-x"],"alignY":[1,"align-y"]}]]],["p-1116fec6",[[4,"gov-grid-item",{"size":[1],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]}]]],["p-6675a0f0",[[4,"gov-layout",{"type":[1],"variant":[1],"inverse":[4]}]]],["p-e5c2f601",[[4,"gov-layout-column"]]],["p-243b1ccc",[[4,"gov-message",{"variant":[1]}]]],["p-acb40ea2",[[4,"gov-nav",{"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-2c9a4d08",[[4,"gov-nav-item",{"href":[1],"isExpandedState":[32]}]]],["p-093160bb",[[4,"gov-side-nav",{"inverse":[4],"compact":[4],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-79ca1b62",[[0,"gov-skeleton",{"variant":[1],"count":[2],"shape":[1],"width":[1],"height":[1],"animation":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}]]],["p-877121d4",[[0,"gov-spacer",{"size":[1],"breakpoint":[1]}]]],["p-1730ac7a",[[4,"gov-statsbar",{"iconPosition":[1,"icon-position"],"variant":[1]}]]],["p-31b93317",[[4,"gov-statsbar-item",{"iconPosition":[1,"icon-position"]}]]],["p-44f4daa3",[[4,"gov-stepper",{"size":[1]}]]],["p-e4f703d3",[[4,"gov-stepper-item",{"variant":[1],"size":[1],"identifier":[1],"label":[1],"annotation":[1],"triggerTag":[1,"trigger-tag"],"isExpandedState":[32],"currentState":[64]}]]],["p-fc2a1e14",[[4,"gov-tabs-item",{"identifier":[1],"triggerIdentifier":[1,"trigger-identifier"],"label":[513],"default":[4],"isActive":[32],"getIdentifier":[64],"getTriggerIdentifier":[64],"setActiveStatus":[64]}]]],["p-b49293dc",[[4,"gov-tiles",{"columns":[2],"noBorder":[4,"no-border"]}]]],["p-ecc8cc47",[[4,"gov-tooltip",{"variant":[1],"size":[1],"position":[1025],"message":[1],"identifier":[1],"icon":[516],"persist":[32],"show":[64],"hide":[64]}]]],["p-af1433f7",[[4,"gov-wizard",{"size":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-3424977f",[[0,"gov-icon",{"name":[1],"type":[1],"iconData":[32],"visible":[32],"error":[32]}]]],["p-ba7cbd7f",[[4,"gov-form-input",{"value":[1537],"identifier":[1],"variant":[1],"success":[4],"size":[1],"name":[1],"multiline":[4],"rows":[2],"cols":[2],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"minlength":[2],"maxlength":[2],"min":[8],"max":[8],"autocomplete":[4],"autocorrect":[4],"type":[1],"inputType":[1,"input-type"],"role":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"wcagAutocomplete":[1,"wcag-autocomplete"],"wcagExpanded":[4,"wcag-expanded"],"focused":[32],"setFocus":[64],"setValue":[64],"clearValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-ce586e19",[[4,"gov-form-autocomplete",{"value":[1537],"identifier":[1],"variant":[1],"success":[4],"size":[1],"nameKey":[1,"name-key"],"name":[1],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"invalid":[4],"minlength":[2],"maxlength":[2],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"processing":[32],"arrowCounter":[32],"list":[32],"setFocus":[64],"setOptions":[64],"clearValue":[64],"setProcessing":[64],"setSearchCallback":[64],"setTemplateResolver":[64]}]]],["p-9aeb4282",[[4,"gov-chip",{"inverse":[4],"disabled":[4],"href":[1],"target":[1],"iconLeft":[1,"icon-left"],"iconRight":[1,"icon-right"],"size":[1],"tag":[1],"variant":[1],"focusable":[4],"identifier":[1],"wcagLabel":[1,"wcag-label"],"wcagControls":[1,"wcag-controls"],"wcagSelected":[4,"wcag-selected"],"getTriggerRef":[64],"getTriggerIdentifier":[64],"setFocus":[64]}]]],["p-7cd73b1e",[[4,"gov-form-select",{"value":[1537],"identifier":[1],"variant":[1],"size":[1],"name":[1],"required":[4],"success":[4],"disabled":[4],"invalid":[4],"wcagActiveDescendant":[1,"wcag-active-descendant"],"wcagControls":[1,"wcag-controls"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"options":[32],"setFocus":[64],"setValue":[64],"getRef":[64],"setOptions":[64],"validateWcag":[64]}]]],["p-d4d59523",[[4,"gov-attachments-item",{"wcagRemoveLabel":[1,"wcag-remove-label"],"wcagRemoveLabelledBy":[1,"wcag-remove-labelled-by"],"validateWcag":[64]}],[4,"gov-attachments",{"label":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}],[4,"gov-form-message",{"variant":[1],"identifier":[64]}]]],["p-878741b6",[[0,"gov-backdrop",{"inverse":[4],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-ee35ca3f",[[4,"gov-button",{"variant":[513],"size":[513],"type":[513],"expanded":[516],"inverse":[516],"name":[1],"iconLeft":[1,"icon-left"],"iconRight":[1,"icon-right"],"disabled":[516],"nativeType":[1,"native-type"],"href":[1],"target":[1],"download":[4],"hreflang":[1],"referrerpolicy":[1],"rel":[1],"loading":[1],"focusable":[4],"identifier":[1],"wcagActiveDescendant":[1,"wcag-active-descendant"],"wcagControls":[1,"wcag-controls"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagDescription":[1,"wcag-description"],"wcagDetails":[1,"wcag-details"],"wcagExpanded":[4,"wcag-expanded"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"wcagHasPopup":[1,"wcag-has-popup"],"wcagPressed":[1,"wcag-pressed"],"wcagCurrent":[1,"wcag-current"],"isPressed":[32],"setFocus":[64],"getTriggerRef":[64],"validateWcag":[64]}]]]]'),e)));
|
|
1
|
+
import{p as e,H as a,b as l}from"./p-5bc604a3.js";export{s as setNonce}from"./p-5bc604a3.js";const i=()=>{{c(a.prototype)}const l=import.meta.url;const i={};if(l!==""){i.resourcesUrl=new URL(".",l).href}return e(i)};const c=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const l=a.call(this,false);const i=this.childNodes;if(e){for(let e=0;e<i.length;e++){if(i[e].nodeType!==2){l.appendChild(i[e].cloneNode(true))}}}return l}};i().then((e=>l(JSON.parse('[["p-28c83bdf",[[4,"gov-form-file",{"expanded":[4],"required":[4],"disabled":[4],"displayAttachments":[4,"display-attachments"],"name":[1],"accept":[1],"multiple":[4],"maxFileSize":[2,"max-file-size"],"identifier":[1],"invalid":[4],"errorSize":[1,"error-size"],"errorAccept":[1,"error-accept"],"attachmentsLabel":[1,"attachments-label"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagRemoveLabel":[1,"wcag-remove-label"],"wcagAttachmentsLabel":[1,"wcag-attachments-label"],"files":[32],"getRef":[64],"getAreaRef":[64],"reset":[64],"validateWcag":[64]}]]],["p-24a60224",[[4,"gov-form-multi-select",{"identifier":[1],"placeholder":[1],"variant":[1],"size":[1],"name":[1],"hideSelectedList":[4,"hide-selected-list"],"required":[4],"disabled":[4],"invalid":[4],"success":[4],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"value":[32],"selectedOptions":[32],"options":[32],"setFocus":[64],"setValue":[64],"getRef":[64],"getSelectedOptions":[64],"setOptions":[64],"setSelectedOptions":[64],"removeSelectedOption":[64],"setSelectedOption":[64],"validateWcag":[64]}]]],["p-13942637",[[4,"gov-modal",{"open":[1028],"blockClose":[4,"block-close"],"label":[1],"role":[1],"labelTag":[1,"label-tag"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagCloseLabel":[1,"wcag-close-label"],"wcagCloseLabelledBy":[1,"wcag-close-labelled-by"],"show":[64],"hide":[64],"validateWcag":[64]}]]],["p-f4a6a339",[[0,"gov-pagination",{"type":[1],"current":[2],"total":[2],"inverse":[4],"size":[1],"variant":[1],"pageSize":[2,"page-size"],"maxPages":[2,"max-pages"],"link":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagSelectLabel":[1,"wcag-select-label"],"wcagPageLabel":[1,"wcag-page-label"],"pagination":[32],"validateWcag":[64]}]]],["p-6b1c11ba",[[4,"gov-prompt",{"open":[1028],"label":[1],"role":[1],"labelTag":[1,"label-tag"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagCloseLabel":[1,"wcag-close-label"],"wcagCloseLabelledBy":[1,"wcag-close-labelled-by"],"show":[64],"hide":[64],"validateWcag":[64]}]]],["p-3aa4cf18",[[4,"gov-tabs",{"type":[1],"variant":[1],"orientation":[1],"wcagLabel":[1,"wcag-label"],"wcagSelectLabel":[1,"wcag-select-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"controller":[32],"focusIndex":[32],"compactControls":[32],"refresh":[64],"currentTab":[64],"setActiveTab":[64],"validateWcag":[64]}]]],["p-fc81b896",[[4,"gov-infobar",{"headline":[1],"variant":[1],"inverse":[4],"wcagCloseLabel":[1,"wcag-close-label"],"wcagToggleLabel":[1,"wcag-toggle-label"],"closable":[4],"toggleContent":[32],"validateWcag":[64]}]]],["p-01d928c5",[[4,"gov-loading"]]],["p-3b45ecb0",[[4,"gov-side-nav-item",{"inverse":[4],"compact":[4],"identifier":[1],"count":[4],"label":[1],"disabled":[4],"href":[1],"isExpanded":[4,"is-expanded"],"isExpandedState":[32],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-18396341",[[4,"gov-toast",{"variant":[1],"gravity":[1],"position":[1],"type":[1],"time":[2],"closeLabel":[1,"close-label"],"wcagCloseLabel":[1,"wcag-close-label"],"destroy":[64]}]]],["p-09966eaa",[[4,"gov-tooltip-content",{"variant":[1],"size":[1],"persist":[4],"isVisible":[1028,"is-visible"],"parentId":[1,"parent-id"]}]]],["p-d1a3e571",[[4,"gov-accordion-item",{"variant":[1],"identifier":[1],"size":[1],"disabled":[4],"isExpanded":[1028,"is-expanded"],"isExpandedState":[32],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-a7d895cb",[[4,"gov-card",{"promotion":[4],"label":[1],"collapsible":[4],"expanded":[4],"headlineTag":[1,"headline-tag"],"wcagTriggerLabel":[1,"wcag-trigger-label"],"wcagTriggerLabelledBy":[1,"wcag-trigger-labelled-by"],"isExpanded":[32],"open":[64],"close":[64],"validateWcag":[64]}]]],["p-26921fac",[[4,"gov-form-checkbox",{"value":[1],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"noLabel":[4,"no-label"],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-bd763705",[[4,"gov-tag",{"inverse":[4],"iconLeft":[1,"icon-left"],"iconRight":[1,"icon-right"],"size":[513],"variant":[513]}]]],["p-2f858bf5",[[4,"gov-tile",{"href":[513],"target":[1],"getTriggerRef":[64]}]]],["p-bd1855f7",[[4,"gov-wizard-item",{"variant":[1],"size":[1],"identifier":[1],"collapsible":[4],"annotation":[1],"label":[1],"disabled":[4],"isExpanded":[1028,"is-expanded"],"labelTag":[1,"label-tag"],"open":[64],"close":[64],"toggle":[64],"currentState":[64]}]]],["p-9d10131d",[[4,"gov-accordion",{"size":[1],"variant":[1],"noBorder":[4,"no-border"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-fe3f57cc",[[0,"gov-app"]]],["p-1fd3d109",[[4,"gov-breadcrumbs",{"collapsible":[4],"isExpanded":[4,"is-expanded"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labeled-by"],"validateWcag":[64]}]]],["p-22abe742",[[4,"gov-container",{"slottedChildren":[64]}]]],["p-c44d44df",[[4,"gov-control-group",{"variant":[1],"noBorder":[4,"no-border"]}]]],["p-141d9af4",[[4,"gov-cookiebar"]]],["p-81593c86",[[4,"gov-dropdown",{"open":[1028],"position":[1],"getState":[64],"setOpen":[64]}]]],["p-7757e4a1",[[4,"gov-empty"]]],["p-89b3e4d4",[[4,"gov-error-code"]]],["p-bb7f0a66",[[4,"gov-form-control",{"gap":[1],"identifier":[1],"invalid":[4],"disabled":[4],"success":[4],"fieldset":[4],"size":[1]}]]],["p-47d63996",[[4,"gov-form-group",{"gap":[1],"orientation":[1]}]]],["p-74882c70",[[4,"gov-form-label",{"identifier":[1],"size":[1],"required":[4],"legend":[4]}]]],["p-705efbf1",[[4,"gov-form-password-power",{"power":[514]}]]],["p-0950ca8d",[[4,"gov-form-radio",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-c574ecc8",[[4,"gov-form-search",{"variant":[513]}]]],["p-cef10fe5",[[4,"gov-form-switch",{"value":[1],"noLabel":[4,"no-label"],"checked":[1540],"required":[4],"disabled":[4],"name":[1],"size":[1],"identifier":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"getRef":[64],"validateWcag":[64]}]]],["p-67138ae9",[[4,"gov-grid",{"alignX":[1,"align-x"],"alignY":[1,"align-y"]}]]],["p-1116fec6",[[4,"gov-grid-item",{"size":[1],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]}]]],["p-6675a0f0",[[4,"gov-layout",{"type":[1],"variant":[1],"inverse":[4]}]]],["p-e5c2f601",[[4,"gov-layout-column"]]],["p-243b1ccc",[[4,"gov-message",{"variant":[1]}]]],["p-acb40ea2",[[4,"gov-nav",{"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-2c9a4d08",[[4,"gov-nav-item",{"href":[1],"isExpandedState":[32]}]]],["p-093160bb",[[4,"gov-side-nav",{"inverse":[4],"compact":[4],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-79ca1b62",[[0,"gov-skeleton",{"variant":[1],"count":[2],"shape":[1],"width":[1],"height":[1],"animation":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}]]],["p-877121d4",[[0,"gov-spacer",{"size":[1],"breakpoint":[1]}]]],["p-1730ac7a",[[4,"gov-statsbar",{"iconPosition":[1,"icon-position"],"variant":[1]}]]],["p-31b93317",[[4,"gov-statsbar-item",{"iconPosition":[1,"icon-position"]}]]],["p-44f4daa3",[[4,"gov-stepper",{"size":[1]}]]],["p-e4f703d3",[[4,"gov-stepper-item",{"variant":[1],"size":[1],"identifier":[1],"label":[1],"annotation":[1],"triggerTag":[1,"trigger-tag"],"isExpandedState":[32],"currentState":[64]}]]],["p-fc2a1e14",[[4,"gov-tabs-item",{"identifier":[1],"triggerIdentifier":[1,"trigger-identifier"],"label":[513],"default":[4],"isActive":[32],"getIdentifier":[64],"getTriggerIdentifier":[64],"setActiveStatus":[64]}]]],["p-b49293dc",[[4,"gov-tiles",{"columns":[2],"noBorder":[4,"no-border"]}]]],["p-ecc8cc47",[[4,"gov-tooltip",{"variant":[1],"size":[1],"position":[1025],"message":[1],"identifier":[1],"icon":[516],"persist":[32],"show":[64],"hide":[64]}]]],["p-af1433f7",[[4,"gov-wizard",{"size":[1],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-5613e8db",[[0,"gov-icon",{"name":[1],"type":[1],"iconData":[32],"visible":[32],"error":[32]}]]],["p-ba7cbd7f",[[4,"gov-form-input",{"value":[1537],"identifier":[1],"variant":[1],"success":[4],"size":[1],"name":[1],"multiline":[4],"rows":[2],"cols":[2],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"minlength":[2],"maxlength":[2],"min":[8],"max":[8],"autocomplete":[4],"autocorrect":[4],"type":[1],"inputType":[1,"input-type"],"role":[1],"invalid":[4],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"wcagAutocomplete":[1,"wcag-autocomplete"],"wcagExpanded":[4,"wcag-expanded"],"focused":[32],"setFocus":[64],"setValue":[64],"clearValue":[64],"getRef":[64],"validateWcag":[64]}]]],["p-ce586e19",[[4,"gov-form-autocomplete",{"value":[1537],"identifier":[1],"variant":[1],"success":[4],"size":[1],"nameKey":[1,"name-key"],"name":[1],"required":[4],"disabled":[4],"placeholder":[1],"readonly":[4],"invalid":[4],"minlength":[2],"maxlength":[2],"messageEmpty":[1,"message-empty"],"messageLoading":[1,"message-loading"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"processing":[32],"arrowCounter":[32],"list":[32],"setFocus":[64],"setOptions":[64],"clearValue":[64],"setProcessing":[64],"setSearchCallback":[64],"setTemplateResolver":[64]}]]],["p-9aeb4282",[[4,"gov-chip",{"inverse":[4],"disabled":[4],"href":[1],"target":[1],"iconLeft":[1,"icon-left"],"iconRight":[1,"icon-right"],"size":[1],"tag":[1],"variant":[1],"focusable":[4],"identifier":[1],"wcagLabel":[1,"wcag-label"],"wcagControls":[1,"wcag-controls"],"wcagSelected":[4,"wcag-selected"],"getTriggerRef":[64],"getTriggerIdentifier":[64],"setFocus":[64]}]]],["p-7cd73b1e",[[4,"gov-form-select",{"value":[1537],"identifier":[1],"variant":[1],"size":[1],"name":[1],"required":[4],"success":[4],"disabled":[4],"invalid":[4],"wcagActiveDescendant":[1,"wcag-active-descendant"],"wcagControls":[1,"wcag-controls"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"focused":[32],"options":[32],"setFocus":[64],"setValue":[64],"getRef":[64],"setOptions":[64],"validateWcag":[64]}]]],["p-d4d59523",[[4,"gov-attachments-item",{"wcagRemoveLabel":[1,"wcag-remove-label"],"wcagRemoveLabelledBy":[1,"wcag-remove-labelled-by"],"validateWcag":[64]}],[4,"gov-attachments",{"label":[1],"wcagLabel":[1,"wcag-label"],"validateWcag":[64]}],[4,"gov-form-message",{"variant":[1],"identifier":[64]}]]],["p-878741b6",[[0,"gov-backdrop",{"inverse":[4],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"validateWcag":[64]}]]],["p-ee35ca3f",[[4,"gov-button",{"variant":[513],"size":[513],"type":[513],"expanded":[516],"inverse":[516],"name":[1],"iconLeft":[1,"icon-left"],"iconRight":[1,"icon-right"],"disabled":[516],"nativeType":[1,"native-type"],"href":[1],"target":[1],"download":[4],"hreflang":[1],"referrerpolicy":[1],"rel":[1],"loading":[1],"focusable":[4],"identifier":[1],"wcagActiveDescendant":[1,"wcag-active-descendant"],"wcagControls":[1,"wcag-controls"],"wcagDescribedBy":[1,"wcag-described-by"],"wcagDescription":[1,"wcag-description"],"wcagDetails":[1,"wcag-details"],"wcagExpanded":[4,"wcag-expanded"],"wcagLabel":[1,"wcag-label"],"wcagLabelledBy":[1,"wcag-labelled-by"],"wcagOwns":[1,"wcag-owns"],"wcagHasPopup":[1,"wcag-has-popup"],"wcagPressed":[1,"wcag-pressed"],"wcagCurrent":[1,"wcag-current"],"isPressed":[32],"setFocus":[64],"getTriggerRef":[64],"validateWcag":[64]}]]]]'),e)));
|
|
2
2
|
//# sourceMappingURL=core.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as t,r as i,h as s,a as n,g as e}from"./p-5bc604a3.js";import{i as o,a}from"./p-d23e6972.js";import{g as r}from"./p-28e59384.js";import"./p-03990da5.js";var c;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(c||(c={}));const h={root:"gov-icon",holder:"gov-icon__holder"};const l="4.0.0";const p=()=>l;const d={};const f={};const u=t=>t.startsWith("http://")||t.startsWith("https://");const g=(i,s,n)=>{if(u(i)){return`${i}/${n}/${s}.svg?v=${p()}`}return t(`${i}/${n}/${s}.svg`)+`?v=${p()}`};async function m({name:t,type:i}){const s=i+"-"+t;if(d[s]){return d[s]}if(!f[s]){f[s]=fetch(g(o(),t,i)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const n=await f[s];d[s]=n;return n}const y=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-icon{display:inline-flex}.gov-icon__holder{display:inline-flex;width:100%;height:100%}.gov-icon__holder+.gov-icon__holder{display:none !important}.gov-icon svg{display:inline-flex;width:100%;height:100%;max-width:100%;max-height:100%}";const v=class{constructor(t){i(this,t);this.name=null;this.type="basic";this.iconData=undefined;this.visible=false;this.error=false;this.h=r(this.host)}async loadIconPathData(){const{name:t,visible:i,type:s}=this;if(!t||!i){return}try{this.iconData=await m({name:t,type:s})}catch(t){this.error=true}}connectedCallback(){if(a()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((i=>{i.forEach((i=>{if(i.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}render(){if(this.error){return null}return s(n,{class:this.h.classes(h.root)},s("span",{class:h.holder,innerHTML:this.iconData}))}static get assetsDirs(){return["assets"]}get host(){return e(this)}static get watchers(){return{name:["loadIconPathData"]}}};v.style=y;export{v as gov_icon};
|
|
2
|
+
//# sourceMappingURL=p-5613e8db.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Types","IconClass","root","holder","dsVersion","version","iconCache","requestCache","isExternalUrl","path","startsWith","iconUrl","name","type","getAssetPath","async","fetchIcon","cacheKey","fetch","iconsPath","then","resp","status","text","Error","govIconCss","GovIcon","constructor","hostRef","this","h","govHost","host","loadIconPathData","visible","iconData","e","error","connectedCallback","iconsLazyLoad","finally","waitUntilVisible","disconnectedCallback","intersectionObserver","disconnect","componentWillLoad","callback","window","IntersectionObserver","entries","forEach","entry","isIntersecting","rootMargin","observe","render","Host","class","classes","innerHTML"],"sources":["../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/components/gov-icon/gov-icon.scss?tag=gov-icon","../../../packages/core/src/components/gov-icon/gov-icon.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import { getAssetPath } from \"@stencil/core\"\nimport { dsVersion } from \"./ds.utils\"\nimport { iconsPath } from \"../helpers/Dom/win\"\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith(\"http://\") || path.startsWith(\"https://\")\nconst iconUrl = (path: string, name: string, type: string) => {\n\tif (isExternalUrl(path)) {\n\t\treturn `${path}/${type}/${name}.svg?v=${dsVersion()}`\n\t}\n\treturn getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({ name, type }: { name: string; type: string }): Promise<string> {\n\tconst cacheKey = type + \"-\" + name\n\tif (iconCache[cacheKey]) {\n\t\treturn iconCache[cacheKey]\n\t}\n\tif (!requestCache[cacheKey]) {\n\t\trequestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n\t\t\tif (resp.status === 200) {\n\t\t\t\treturn resp.text()\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Gov Icon doesn't exists\")\n\t\t\t}\n\t\t})\n\t}\n\tconst path = await requestCache[cacheKey]\n\ticonCache[cacheKey] = path\n\treturn path\n}\n","/*\n * Icon\n */\n\n$class: \".gov-icon\";\n\n#{$class} {\n\tdisplay: inline-flex;\n\t&__holder {\n\t\tdisplay: inline-flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t& + #{$class}__holder {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\tsvg {\n\t\tdisplay: inline-flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmax-width: 100%;\n\t\tmax-height: 100%;\n\t}\n}\n","import {Build, Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {IconClass} from \"./constants\"\nimport {fetchIcon} from \"../../utils/icon.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {iconsLazyLoad} from \"../../helpers/Dom/win\"\n\n@Component({\n assetsDirs: [\"assets\"],\n styleUrl: \"gov-icon.scss\",\n tag: \"gov-icon\",\n})\nexport class GovIcon {\n private h: GovHost\n\n constructor() {\n this.h = govHost(this.host)\n }\n\n @Element() host: HTMLGovIconElement\n /**\n * Name of icon\n */\n @Prop() name: string = null\n /**\n * Type (folder) of icon\n */\n @Prop() type: string = \"basic\"\n @State() private iconData: string\n @State() private visible = false\n @State() private error = false\n private intersectionObserver: IntersectionObserver\n\n @Watch(\"name\")\n private async loadIconPathData(): Promise<void> {\n const {name, visible, type} = this\n if (!Build.isBrowser || !name || !visible) {\n return\n }\n try {\n this.iconData = await fetchIcon({name, type})\n } catch (e) {\n this.error = true\n }\n }\n\n connectedCallback(): void {\n if (iconsLazyLoad()) {\n this.visible = true\n this.loadIconPathData().finally()\n } else {\n this.waitUntilVisible(async () => {\n this.visible = true\n await this.loadIconPathData()\n })\n }\n }\n\n disconnectedCallback(): void {\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect()\n this.intersectionObserver = null\n }\n }\n\n async componentWillLoad(): Promise<void> {\n await this.loadIconPathData()\n }\n\n private waitUntilVisible(callback: () => void): void {\n if (!Build.isBrowser || typeof window === \"undefined\" || !(window as any).IntersectionObserver) {\n callback()\n return\n }\n this.intersectionObserver = new IntersectionObserver(\n entries => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect()\n this.intersectionObserver = null\n }\n callback()\n }\n })\n },\n {rootMargin: \"50px\"},\n )\n this.intersectionObserver.observe(this.host)\n }\n\n render() {\n if (this.error) {\n return null\n }\n return (\n <Host class={this.h.classes(IconClass.root)}>\n <span class={IconClass.holder} innerHTML={this.iconData}></span>\n </Host>\n )\n }\n}\n"],"mappings":"kKAEA,IAAKA,GAAL,SAAKA,GACJA,EAAA,iBACAA,EAAA,qBACAA,EAAA,oBACA,EAJD,CAAKA,MAAK,KAOH,MAAMC,EAAY,CACxBC,KAAM,WACNC,OAAQ,oB,
|
|
1
|
+
{"version":3,"names":["Types","IconClass","root","holder","dsVersion","version","iconCache","requestCache","isExternalUrl","path","startsWith","iconUrl","name","type","getAssetPath","async","fetchIcon","cacheKey","fetch","iconsPath","then","resp","status","text","Error","govIconCss","GovIcon","constructor","hostRef","this","h","govHost","host","loadIconPathData","visible","iconData","e","error","connectedCallback","iconsLazyLoad","finally","waitUntilVisible","disconnectedCallback","intersectionObserver","disconnect","componentWillLoad","callback","window","IntersectionObserver","entries","forEach","entry","isIntersecting","rootMargin","observe","render","Host","class","classes","innerHTML"],"sources":["../../../packages/core/src/components/gov-icon/constants.ts","../../../packages/core/src/utils/ds.utils.ts","../../../packages/core/src/utils/icon.utils.ts","../../../packages/core/src/components/gov-icon/gov-icon.scss?tag=gov-icon","../../../packages/core/src/components/gov-icon/gov-icon.tsx"],"sourcesContent":["import { ValueOf } from '../../types/interfaces'\n\nenum Types {\n\tBASIC = 'basic',\n\tCOMPLEX = 'complex',\n\tCOLORED = 'colored',\n}\nexport type Type = `${ValueOf<typeof Types>}`\n\nexport const IconClass = {\n\troot: 'gov-icon',\n\tholder: 'gov-icon__holder',\n}\n","import { version } from '../../package.json'\n\nexport const dsVersion = (): string => {\n\treturn version\n}\n","import { getAssetPath } from \"@stencil/core\"\nimport { dsVersion } from \"./ds.utils\"\nimport { iconsPath } from \"../helpers/Dom/win\"\n\nconst iconCache: { [key: string]: string } = {}\nconst requestCache: { [key: string]: Promise<string> } = {}\n\nconst isExternalUrl = (path: string) => path.startsWith(\"http://\") || path.startsWith(\"https://\")\nconst iconUrl = (path: string, name: string, type: string) => {\n\tif (isExternalUrl(path)) {\n\t\treturn `${path}/${type}/${name}.svg?v=${dsVersion()}`\n\t}\n\treturn getAssetPath(`${path}/${type}/${name}.svg`) + `?v=${dsVersion()}`\n}\n\nexport async function fetchIcon({ name, type }: { name: string; type: string }): Promise<string> {\n\tconst cacheKey = type + \"-\" + name\n\tif (iconCache[cacheKey]) {\n\t\treturn iconCache[cacheKey]\n\t}\n\tif (!requestCache[cacheKey]) {\n\t\trequestCache[cacheKey] = fetch(iconUrl(iconsPath(), name, type)).then(resp => {\n\t\t\tif (resp.status === 200) {\n\t\t\t\treturn resp.text()\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Gov Icon doesn't exists\")\n\t\t\t}\n\t\t})\n\t}\n\tconst path = await requestCache[cacheKey]\n\ticonCache[cacheKey] = path\n\treturn path\n}\n","/*\n * Icon\n */\n\n$class: \".gov-icon\";\n\n#{$class} {\n\tdisplay: inline-flex;\n\t&__holder {\n\t\tdisplay: inline-flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t& + #{$class}__holder {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\tsvg {\n\t\tdisplay: inline-flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmax-width: 100%;\n\t\tmax-height: 100%;\n\t}\n}\n","import {Build, Component, Element, h, Host, Prop, State, Watch} from \"@stencil/core\"\nimport {IconClass} from \"./constants\"\nimport {fetchIcon} from \"../../utils/icon.utils\"\nimport {govHost} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {iconsLazyLoad} from \"../../helpers/Dom/win\"\n\n@Component({\n assetsDirs: [\"assets\"],\n styleUrl: \"gov-icon.scss\",\n tag: \"gov-icon\",\n})\nexport class GovIcon {\n private h: GovHost\n\n constructor() {\n this.h = govHost(this.host)\n }\n\n @Element() host: HTMLGovIconElement\n /**\n * Name of icon\n */\n @Prop() name: string = null\n /**\n * Type (folder) of icon\n */\n @Prop() type: string = \"basic\"\n @State() private iconData: string\n @State() private visible = false\n @State() private error = false\n private intersectionObserver: IntersectionObserver\n\n @Watch(\"name\")\n private async loadIconPathData(): Promise<void> {\n const {name, visible, type} = this\n if (!Build.isBrowser || !name || !visible) {\n return\n }\n try {\n this.iconData = await fetchIcon({name, type})\n } catch (e) {\n this.error = true\n }\n }\n\n connectedCallback(): void {\n if (iconsLazyLoad()) {\n this.visible = true\n this.loadIconPathData().finally()\n } else {\n this.waitUntilVisible(async () => {\n this.visible = true\n await this.loadIconPathData()\n })\n }\n }\n\n disconnectedCallback(): void {\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect()\n this.intersectionObserver = null\n }\n }\n\n async componentWillLoad(): Promise<void> {\n await this.loadIconPathData()\n }\n\n private waitUntilVisible(callback: () => void): void {\n if (!Build.isBrowser || typeof window === \"undefined\" || !(window as any).IntersectionObserver) {\n callback()\n return\n }\n this.intersectionObserver = new IntersectionObserver(\n entries => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect()\n this.intersectionObserver = null\n }\n callback()\n }\n })\n },\n {rootMargin: \"50px\"},\n )\n this.intersectionObserver.observe(this.host)\n }\n\n render() {\n if (this.error) {\n return null\n }\n return (\n <Host class={this.h.classes(IconClass.root)}>\n <span class={IconClass.holder} innerHTML={this.iconData}></span>\n </Host>\n )\n }\n}\n"],"mappings":"kKAEA,IAAKA,GAAL,SAAKA,GACJA,EAAA,iBACAA,EAAA,qBACAA,EAAA,oBACA,EAJD,CAAKA,MAAK,KAOH,MAAMC,EAAY,CACxBC,KAAM,WACNC,OAAQ,oB,gBCTF,MAAMC,EAAY,IACjBC,ECCR,MAAMC,EAAuC,GAC7C,MAAMC,EAAmD,GAEzD,MAAMC,EAAiBC,GAAiBA,EAAKC,WAAW,YAAcD,EAAKC,WAAW,YACtF,MAAMC,EAAU,CAACF,EAAcG,EAAcC,KAC5C,GAAIL,EAAcC,GAAO,CACxB,MAAO,GAAGA,KAAQI,KAAQD,WAAcR,K,CAEzC,OAAOU,EAAa,GAAGL,KAAQI,KAAQD,SAAc,MAAMR,KAAa,EAGlEW,eAAeC,GAAUJ,KAAEA,EAAIC,KAAEA,IACvC,MAAMI,EAAWJ,EAAO,IAAMD,EAC9B,GAAIN,EAAUW,GAAW,CACxB,OAAOX,EAAUW,E,CAElB,IAAKV,EAAaU,GAAW,CAC5BV,EAAaU,GAAYC,MAAMP,EAAQQ,IAAaP,EAAMC,IAAOO,MAAKC,IACrE,GAAIA,EAAKC,SAAW,IAAK,CACxB,OAAOD,EAAKE,M,KACN,CACN,MAAM,IAAIC,MAAM,0B,KAInB,MAAMf,QAAaF,EAAaU,GAChCX,EAAUW,GAAYR,EACtB,OAAOA,CACR,CChCA,MAAMgB,EAAa,wkB,MCYNC,EAAO,MAGlB,WAAAC,CAAAC,G,oBAQuB,K,UAIA,Q,qCAEI,M,WACF,MAdvBC,KAAKC,EAAIC,EAAQF,KAAKG,K,CAkBhB,sBAAMC,GACZ,MAAMrB,KAACA,EAAIsB,QAAEA,EAAOrB,KAAEA,GAAQgB,KAC9B,IAAyBjB,IAASsB,EAAS,CACzC,M,CAEF,IACEL,KAAKM,eAAiBnB,EAAU,CAACJ,OAAMC,Q,CACvC,MAAOuB,GACPP,KAAKQ,MAAQ,I,EAIjB,iBAAAC,GACE,GAAIC,IAAiB,CACnBV,KAAKK,QAAU,KACfL,KAAKI,mBAAmBO,S,KACnB,CACLX,KAAKY,kBAAiB1B,UACpBc,KAAKK,QAAU,WACTL,KAAKI,kBAAkB,G,EAKnC,oBAAAS,GACE,GAAIb,KAAKc,qBAAsB,CAC7Bd,KAAKc,qBAAqBC,aAC1Bf,KAAKc,qBAAuB,I,EAIhC,uBAAME,SACEhB,KAAKI,kB,CAGL,gBAAAQ,CAAiBK,GACvB,UAA+BC,SAAW,cAAiBA,OAAeC,qBAAsB,CAC9FF,IACA,M,CAEFjB,KAAKc,qBAAuB,IAAIK,sBAC9BC,IACEA,EAAQC,SAAQC,IACd,GAAIA,EAAMC,eAAgB,CACxB,GAAIvB,KAAKc,qBAAsB,CAC7Bd,KAAKc,qBAAqBC,aAC1Bf,KAAKc,qBAAuB,I,CAE9BG,G,IAEF,GAEJ,CAACO,WAAY,SAEfxB,KAAKc,qBAAqBW,QAAQzB,KAAKG,K,CAGzC,MAAAuB,GACE,GAAI1B,KAAKQ,MAAO,CACd,OAAO,I,CAET,OACEP,EAAC0B,EAAI,CAACC,MAAO5B,KAAKC,EAAE4B,QAAQzD,EAAUC,OACpC4B,EAAA,QAAM2B,MAAOxD,EAAUE,OAAQwD,UAAW9B,KAAKM,W"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@gov-design-system-ce/components",
|
|
3
3
|
"description": "This package includes Gov Design System Web Components and related utilities.",
|
|
4
4
|
"author": "Zdeněk Vítek",
|
|
5
|
-
"version": "0.0
|
|
5
|
+
"version": "4.0.0",
|
|
6
6
|
"license": "EUPL v1.2 Licensed",
|
|
7
7
|
"main": "./dist/index.cjs.js",
|
|
8
8
|
"unpkg": "./dist/core/core.esm.js",
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
"dependencies" : {
|
|
25
25
|
"@gov-design-system-ce/icons": "0.0.12",
|
|
26
26
|
"@gov-design-system-ce/fonts": "0.0.2",
|
|
27
|
-
"@gov-design-system-ce/styles": "0.0
|
|
27
|
+
"@gov-design-system-ce/styles": "4.0.0"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as t,H as s,h as e,d as i}from"./p-2dee9951.js";import{i as n,a as o}from"./p-d23e6972.js";import{g as a}from"./p-28e59384.js";var r;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(r||(r={}));const c={root:"gov-icon",holder:"gov-icon__holder"};const l=t=>{const s=new URL(t,d.t);return s.origin!==h.location.origin?s.href:s.pathname};const h=typeof window!=="undefined"?window:{};const d={i:0,t:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,s,e,i)=>t.addEventListener(s,e,i),rel:(t,s,e,i)=>t.removeEventListener(s,e,i),ce:(t,s)=>new CustomEvent(t,s)};const f="0.0.70";const p=()=>f;const u={};const m={};const g=t=>t.startsWith("http://")||t.startsWith("https://");const w=(t,s,e)=>{if(g(t)){return`${t}/${e}/${s}.svg?v=${p()}`}return l(`${t}/${e}/${s}.svg`)+`?v=${p()}`};async function y({name:t,type:s}){const e=s+"-"+t;if(u[e]){return u[e]}if(!m[e]){m[e]=fetch(w(n(),t,s)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const i=await m[e];u[e]=i;return i}const v=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-icon{display:inline-flex}.gov-icon__holder{display:inline-flex;width:100%;height:100%}.gov-icon__holder+.gov-icon__holder{display:none !important}.gov-icon svg{display:inline-flex;width:100%;height:100%;max-width:100%;max-height:100%}";const b=t(class t extends s{constructor(){super();this.__registerHost();this.name=null;this.type="basic";this.iconData=undefined;this.visible=false;this.error=false;this.h=a(this.host)}async loadIconPathData(){const{name:t,visible:s,type:e}=this;if(!t||!s){return}try{this.iconData=await y({name:t,type:e})}catch(t){this.error=true}}connectedCallback(){if(o()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((s=>{s.forEach((s=>{if(s.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}render(){if(this.error){return null}return e(i,{class:this.h.classes(c.root)},e("span",{class:c.holder,innerHTML:this.iconData}))}static get assetsDirs(){return["assets"]}get host(){return this}static get watchers(){return{name:["loadIconPathData"]}}static get style(){return v}},[0,"gov-icon",{name:[1],type:[1],iconData:[32],visible:[32],error:[32]}]);function x(){if(typeof customElements==="undefined"){return}const t=["gov-icon"];t.forEach((t=>{switch(t){case"gov-icon":if(!customElements.get(t)){customElements.define(t,b)}break}}))}x();export{b as G,x as d};
|
|
2
|
-
//# sourceMappingURL=p-4b5f8c6e.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as t,r as i,h as s,a as n,g as e}from"./p-5bc604a3.js";import{i as o,a}from"./p-d23e6972.js";import{g as r}from"./p-28e59384.js";import"./p-03990da5.js";var c;(function(t){t["BASIC"]="basic";t["COMPLEX"]="complex";t["COLORED"]="colored"})(c||(c={}));const h={root:"gov-icon",holder:"gov-icon__holder"};const l="0.0.70";const p=()=>l;const d={};const f={};const u=t=>t.startsWith("http://")||t.startsWith("https://");const g=(i,s,n)=>{if(u(i)){return`${i}/${n}/${s}.svg?v=${p()}`}return t(`${i}/${n}/${s}.svg`)+`?v=${p()}`};async function m({name:t,type:i}){const s=i+"-"+t;if(d[s]){return d[s]}if(!f[s]){f[s]=fetch(g(o(),t,i)).then((t=>{if(t.status===200){return t.text()}else{throw new Error("Gov Icon doesn't exists")}}))}const n=await f[s];d[s]=n;return n}const y=".gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-icon{display:inline-flex}.gov-icon__holder{display:inline-flex;width:100%;height:100%}.gov-icon__holder+.gov-icon__holder{display:none !important}.gov-icon svg{display:inline-flex;width:100%;height:100%;max-width:100%;max-height:100%}";const v=class{constructor(t){i(this,t);this.name=null;this.type="basic";this.iconData=undefined;this.visible=false;this.error=false;this.h=r(this.host)}async loadIconPathData(){const{name:t,visible:i,type:s}=this;if(!t||!i){return}try{this.iconData=await m({name:t,type:s})}catch(t){this.error=true}}connectedCallback(){if(a()){this.visible=true;this.loadIconPathData().finally()}else{this.waitUntilVisible((async()=>{this.visible=true;await this.loadIconPathData()}))}}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async componentWillLoad(){await this.loadIconPathData()}waitUntilVisible(t){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((i=>{i.forEach((i=>{if(i.isIntersecting){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}t()}}))}),{rootMargin:"50px"});this.intersectionObserver.observe(this.host)}render(){if(this.error){return null}return s(n,{class:this.h.classes(h.root)},s("span",{class:h.holder,innerHTML:this.iconData}))}static get assetsDirs(){return["assets"]}get host(){return e(this)}static get watchers(){return{name:["loadIconPathData"]}}};v.style=y;export{v as gov_icon};
|
|
2
|
-
//# sourceMappingURL=p-3424977f.entry.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|