@gov-design-system-ce/components 0.0.19 → 0.0.21
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/core.cjs.js +1 -1
- package/dist/cjs/gov-alert.cjs.entry.js +39 -7
- package/dist/cjs/gov-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-app.cjs.entry.js +8 -1
- package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-icon.cjs.entry.js +1 -1
- package/dist/cjs/gov-modal.cjs.entry.js +9 -11
- package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-prompt.cjs.entry.js +9 -11
- package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gov-alert/constants.js +1 -0
- package/dist/collection/components/gov-alert/constants.js.map +1 -1
- package/dist/collection/components/gov-alert/gov-alert.css +13 -0
- package/dist/collection/components/gov-alert/gov-alert.js +107 -16
- package/dist/collection/components/gov-alert/gov-alert.js.map +1 -1
- package/dist/collection/components/gov-alert/gov-alert.types.js +2 -0
- package/dist/collection/components/gov-alert/gov-alert.types.js.map +1 -0
- package/dist/collection/components/gov-modal/gov-modal.js +13 -20
- package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
- package/dist/collection/components/gov-promp/gov-prompt.js +13 -20
- package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
- package/dist/collection/pages/Alert.js +8 -1
- package/dist/collection/pages/Alert.js.map +1 -1
- package/dist/components/gov-alert.js +45 -10
- package/dist/components/gov-alert.js.map +1 -1
- package/dist/components/gov-app.js +8 -1
- package/dist/components/gov-app.js.map +1 -1
- package/dist/components/gov-attachments2.js +1 -1
- package/dist/components/gov-button2.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-input2.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-select2.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-icon2.js +1 -1
- package/dist/components/gov-modal.js +12 -15
- package/dist/components/gov-modal.js.map +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-prompt.js +12 -15
- package/dist/components/gov-prompt.js.map +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/wcag.js +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/critial.css +484 -0
- package/dist/core/{p-26260897.entry.js → p-034c40ab.entry.js} +2 -2
- package/dist/core/p-0800095f.entry.js +2 -0
- package/dist/core/p-0800095f.entry.js.map +1 -0
- package/dist/core/{p-f0a4439e.entry.js → p-207ba616.entry.js} +2 -2
- package/dist/core/{p-429850b9.entry.js → p-3699c1b3.entry.js} +2 -2
- package/dist/core/{p-d79d0f7a.entry.js → p-3cd5b6cb.entry.js} +2 -2
- package/dist/core/{p-85404e69.entry.js → p-3da88ddb.entry.js} +2 -2
- package/dist/core/{p-aba39622.entry.js → p-3e1a1bd4.entry.js} +2 -2
- package/dist/core/{p-5a1c8d48.entry.js → p-42db4603.entry.js} +2 -2
- package/dist/core/{p-07a2c755.entry.js → p-4ce15026.entry.js} +2 -2
- package/dist/core/{p-540e79c4.entry.js → p-54b17f4d.entry.js} +2 -2
- package/dist/core/{p-ef393836.entry.js → p-5e865538.entry.js} +2 -2
- package/dist/core/{p-364b4792.js → p-670b4f93.js} +2 -2
- package/dist/core/{p-f73d482b.entry.js → p-742e37e4.entry.js} +2 -2
- package/dist/core/p-742e37e4.entry.js.map +1 -0
- package/dist/core/p-75a4c838.entry.js +2 -0
- package/dist/core/p-75a4c838.entry.js.map +1 -0
- package/dist/core/p-7b890c55.entry.js +2 -0
- package/dist/core/{p-8bb1ad43.entry.js.map → p-7b890c55.entry.js.map} +1 -1
- package/dist/core/{p-a929f64e.entry.js → p-7c55677b.entry.js} +2 -2
- package/dist/core/{p-e409d788.entry.js → p-8925ef42.entry.js} +2 -2
- package/dist/core/{p-3ad9cc54.entry.js → p-99f198b9.entry.js} +2 -2
- package/dist/core/{p-d8ef1d7a.entry.js → p-a8b628ed.entry.js} +2 -2
- package/dist/core/{p-724921e7.entry.js → p-a8ef7292.entry.js} +2 -2
- package/dist/core/{p-24877419.entry.js → p-a9c57f72.entry.js} +2 -2
- package/dist/core/{p-52f2f67c.entry.js → p-acfd00a2.entry.js} +2 -2
- package/dist/core/{p-299f3d3c.entry.js → p-ccb44728.entry.js} +2 -2
- package/dist/core/{p-5e5e925d.entry.js → p-f555fce1.entry.js} +2 -2
- package/dist/core/p-f555fce1.entry.js.map +1 -0
- package/dist/core/{p-f6e2f2f0.entry.js → p-f7275b59.entry.js} +2 -2
- package/dist/custom-elements/index.js +1 -1
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/core.js +1 -1
- package/dist/esm/gov-accordion.entry.js +1 -1
- package/dist/esm/gov-alert.entry.js +41 -9
- package/dist/esm/gov-alert.entry.js.map +1 -1
- package/dist/esm/gov-app.entry.js +8 -1
- package/dist/esm/gov-app.entry.js.map +1 -1
- package/dist/esm/gov-attachments_3.entry.js +1 -1
- package/dist/esm/gov-backdrop.entry.js +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +1 -1
- package/dist/esm/gov-button.entry.js +1 -1
- package/dist/esm/gov-card.entry.js +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +1 -1
- package/dist/esm/gov-form-file.entry.js +1 -1
- package/dist/esm/gov-form-input.entry.js +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +1 -1
- package/dist/esm/gov-form-radio.entry.js +1 -1
- package/dist/esm/gov-form-select.entry.js +1 -1
- package/dist/esm/gov-form-switch.entry.js +1 -1
- package/dist/esm/gov-icon.entry.js +1 -1
- package/dist/esm/gov-modal.entry.js +10 -12
- package/dist/esm/gov-modal.entry.js.map +1 -1
- package/dist/esm/gov-nav.entry.js +1 -1
- package/dist/esm/gov-pagination.entry.js +1 -1
- package/dist/esm/gov-prompt.entry.js +10 -12
- package/dist/esm/gov-prompt.entry.js.map +1 -1
- package/dist/esm/gov-side-nav.entry.js +1 -1
- package/dist/esm/gov-skeleton.entry.js +1 -1
- package/dist/esm/gov-tabs.entry.js +1 -1
- package/dist/esm/gov-wizzard.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{wcag-3792d4bb.js → wcag-d588d144.js} +2 -2
- package/dist/esm/{wcag-3792d4bb.js.map → wcag-d588d144.js.map} +1 -1
- package/dist/hydrate/index.js +72 -39
- package/dist/types/components/gov-alert/constants.d.ts +1 -0
- package/dist/types/components/gov-alert/gov-alert.d.ts +21 -4
- package/dist/types/components/gov-alert/gov-alert.types.d.ts +4 -0
- package/dist/types/components/gov-modal/gov-modal.d.ts +3 -4
- package/dist/types/components/gov-promp/gov-prompt.d.ts +3 -4
- package/dist/types/components.d.ts +34 -13
- package/package.json +1 -1
- package/dist/core/p-3f92f3bf.entry.js +0 -2
- package/dist/core/p-3f92f3bf.entry.js.map +0 -1
- package/dist/core/p-5e5e925d.entry.js.map +0 -1
- package/dist/core/p-8bb1ad43.entry.js +0 -2
- package/dist/core/p-b2d1dd2a.entry.js +0 -2
- package/dist/core/p-b2d1dd2a.entry.js.map +0 -1
- package/dist/core/p-f73d482b.entry.js.map +0 -1
- /package/dist/core/{p-26260897.entry.js.map → p-034c40ab.entry.js.map} +0 -0
- /package/dist/core/{p-f0a4439e.entry.js.map → p-207ba616.entry.js.map} +0 -0
- /package/dist/core/{p-429850b9.entry.js.map → p-3699c1b3.entry.js.map} +0 -0
- /package/dist/core/{p-d79d0f7a.entry.js.map → p-3cd5b6cb.entry.js.map} +0 -0
- /package/dist/core/{p-85404e69.entry.js.map → p-3da88ddb.entry.js.map} +0 -0
- /package/dist/core/{p-aba39622.entry.js.map → p-3e1a1bd4.entry.js.map} +0 -0
- /package/dist/core/{p-5a1c8d48.entry.js.map → p-42db4603.entry.js.map} +0 -0
- /package/dist/core/{p-07a2c755.entry.js.map → p-4ce15026.entry.js.map} +0 -0
- /package/dist/core/{p-540e79c4.entry.js.map → p-54b17f4d.entry.js.map} +0 -0
- /package/dist/core/{p-ef393836.entry.js.map → p-5e865538.entry.js.map} +0 -0
- /package/dist/core/{p-364b4792.js.map → p-670b4f93.js.map} +0 -0
- /package/dist/core/{p-a929f64e.entry.js.map → p-7c55677b.entry.js.map} +0 -0
- /package/dist/core/{p-e409d788.entry.js.map → p-8925ef42.entry.js.map} +0 -0
- /package/dist/core/{p-3ad9cc54.entry.js.map → p-99f198b9.entry.js.map} +0 -0
- /package/dist/core/{p-d8ef1d7a.entry.js.map → p-a8b628ed.entry.js.map} +0 -0
- /package/dist/core/{p-724921e7.entry.js.map → p-a8ef7292.entry.js.map} +0 -0
- /package/dist/core/{p-24877419.entry.js.map → p-a9c57f72.entry.js.map} +0 -0
- /package/dist/core/{p-52f2f67c.entry.js.map → p-acfd00a2.entry.js.map} +0 -0
- /package/dist/core/{p-299f3d3c.entry.js.map → p-ccb44728.entry.js.map} +0 -0
- /package/dist/core/{p-f6e2f2f0.entry.js.map → p-f7275b59.entry.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../packages/core/src/components/gov-modal/gov-modal.scss?tag=gov-modal","../../../packages/core/src/components/gov-modal/gov-modal.tsx"],"names":["govModalCss","GovModal","[object Object]","hostRef","this","h","govHost","host","labelId","createID","contentId","newValue","validTags","includes","govErrorLog","ModalClass","root","modalVisible","document","body","classList","add","bodyFix","remove","showModal","hideModal","open","canValidateWcagOnRender","delay","validateWcag","LabelTag","labelTag","Host","class","classes","dialog","hidden","tabindex","aria-modal","aria-hidden","toBoolAttr","aria-labelledby","wcaglabelledBy","aria-describedby","wcagDescribedBy","role","inner","header","hasSlot","icon","name","label","title","id","close","variant","wcagLabel","wcagCloseLabel","wcagLabelledBy","wcagCloseLabelledBy","type","on-gov-click","onCloseHandler","bind","content","wcag-label","wcag-labelled-by","e","stopPropagation","govClose","emit","validateWcagRef"],"mappings":"mUAAA,MAAMA,EAAc,s1FCePC,EAAQ,MAKpBC,YAAAC,2DAWe,qCAQqB,uBAI0B,qJAsBtC,MA5CvBC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,QAAUC,EAAS,iBACxBL,KAAKM,UAAYD,EAAS,mBA6C3BP,iBAAiBS,GAChB,MAAMC,EAAY,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,MACjD,GAAID,EAAU,CACb,IAAKC,EAAUC,SAASF,GAAW,CAClCG,EAAY,IAAIC,EAAWC,cAAcL,uBAM5CT,UAAUS,GACTP,KAAKa,aAAeN,EAGbT,YACPE,KAAKa,aAAe,KACpBC,SAASC,KAAKC,UAAUC,IAAIN,EAAWO,SAGhCpB,YACPE,KAAKa,aAAe,MACpBC,SAASC,KAAKC,UAAUG,OAAOR,EAAWO,SAG3CpB,4BACC,GAAIE,KAAKa,aAAc,CACtBb,KAAKoB,gBACC,CACNpB,KAAKqB,aAIPvB,2BACCE,KAAKa,aAAeb,KAAKsB,KACzB,GAAIC,IAA2B,OACxBC,EAAM,WACNxB,KAAKyB,gBAIb3B,SACC,MAAM4B,EAAW1B,KAAK2B,SACtB,OACC1B,EAAC2B,EAAI,CAACC,MAAO7B,KAAKC,EAAE6B,QAAQnB,EAAWC,MAAOU,KAAMtB,KAAKa,cACxDZ,EAAA,SAAA,CACC4B,MAAOlB,EAAWoB,OAClBC,QAAShC,KAAKa,aACdoB,SAAS,KACTX,KAAMtB,KAAKa,aAAYqB,aACZ,OAAMC,cACJC,GAAYpC,KAAKa,cAAawB,kBAC1BrC,KAAKsC,gBAAkBtC,KAAKI,QAAOmC,mBAClCvC,KAAKwC,iBAAmBxC,KAAKM,UAC/CmC,KAAMzC,KAAKyC,MAEXxC,EAAA,MAAA,CAAK4B,MAAOlB,EAAW+B,OACtBzC,EAAA,MAAA,CAAK4B,MAAOlB,EAAWgC,QACrB3C,KAAKC,EAAE2C,QAAQ,SACf3C,EAAA,MAAA,CAAK4B,MAAOlB,EAAWkC,MACtB5C,EAAA,OAAA,CAAM6C,KAAK,UAGZ9C,KAAK+C,OACL9C,EAACyB,EAAQ,CAACG,MAAOlB,EAAWqC,MAAOC,GAAIjD,KAAKI,SAC1CJ,KAAK+C,OAGR9C,EAAA,aAAA,CACC4B,MAAOlB,EAAWuC,MAClBC,QAAQ,UACRC,UAAWpD,KAAKqD,eAChBC,eAAgBtD,KAAKuD,oBACrBC,KAAK,OAAMC,eACGzD,KAAK0D,eAAeC,KAAK3D,OAEvCC,EAAA,WAAA,CAAU6C,KAAK,WAGjB7C,EAAA,MAAA,CAAK4B,MAAOlB,EAAWiD,QAASX,GAAIjD,KAAKM,WACxCL,EAAA,OAAA,SAKFD,KAAKa,aACLZ,EAAA,eAAA,CAAA4D,aACa7D,KAAKqD,eAAcS,mBACb9D,KAAKuD,oBAAmBE,eAC5BzD,KAAK0D,eAAeC,KAAK3D,QAErC,MAKCF,eAAeiE,GACtBA,EAAEC,kBACFhE,KAAKqB,YACLrB,KAAKiE,SAASC,KAAKH,GAOpBjE,aACCE,KAAKoB,YAONtB,aACCE,KAAKqB,YAONvB,qBACCqE,EAAgBnE,KAAKsC,eAAgB,kBAAmB3B,EAAWC,MACnEuD,EAAgBnE,KAAKwC,gBAAiB,mBAAoB7B,EAAWC","sourcesContent":["/*\n * Modal\n */\n\n$class: \".gov-modal\";\n\n#{$class} {\n\tdisplay: none;\n\t&__dialog {\n\t\t@include z-index(\"modal\", 1);\n\t\tposition: fixed;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 100%;\n\t\tmax-width: $modal-max-width;\n\t\theight: 100%;\n\t\tpadding: rem-calc(8);\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\ttransform: translate(-50%, -50%);\n\t\tpointer-events: none;\n\t}\n\t&__inner {\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: 100%;\n\t\tmax-height: 100%;\n\t\tborder-radius: $border-radius;\n\t\tbackground: $modal-bg;\n\t\toverflow: hidden;\n\t\tpointer-events: auto;\n\t\tbox-shadow: get($shadow-l, $shadows);\n\t}\n\t&__header {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(16);\n\t\talign-items: flex-start;\n\t\tpadding: rem-calc(24 16);\n\t\tborder-bottom: $modal-border;\n\t}\n\t&__icon {\n\t\tflex: 0 0 auto;\n\t\tpadding-top: calc(((var(--gov-text-#{$font-size-3xl}-font-size) * 1.5) - rem-calc(24)) / 2);\n\t\t& > * {\n\t\t\twidth: rem-calc(24);\n\t\t\theight: rem-calc(24);\n\t\t}\n\t}\n\t&__title {\n\t\t@include typography($font-size-3xl);\n\t\tmargin: 0;\n\t}\n\t&__close {\n\t\tflex: 0 0 auto;\n\t\tmargin-left: auto;\n\t\tpadding-top: calc(((var(--gov-text-#{$font-size-3xl}-font-size) * 1.5) - rem-calc(32)) / 2);\n\t}\n\t&__content {\n\t\t@include reset-last-margin();\n\t\theight: 100%;\n\t\tpadding: rem-calc(24 16);\n\t\tcolor: $modal-text-color;\n\t\toverflow: auto;\n\t}\n\t&__actions {\n\t\tdisplay: flex;\n\t\tgap: rem-calc(8 16);\n\t\tflex-wrap: wrap;\n\t\tjustify-content: flex-end;\n\t\tpadding: rem-calc(24 16);\n\t\tborder-top: $modal-border;\n\t}\n\n\t// STATES\n\t&__dialog:focus &__inner {\n\t\toutline: $outline;\n\t}\n\t@include parameter(\"open\") {\n\t\tdisplay: block;\n\t}\n\n\t// MQ\n\t@include mq($from: sm) {\n\t\t&__dialog {\n\t\t\tmax-width: calc($modal-max-width + 2 * rem-calc(24));\n\t\t\tpadding: rem-calc(24);\n\t\t\t&:focus {\n\t\t\t\toutline-offset: rem-calc(-24);\n\t\t\t}\n\t\t}\n\t\t&__inner {\n\t\t\tbox-shadow: get($shadow-xl, $shadows);\n\t\t}\n\n\t\t// VARIANTS\n\t\t&--prompt &__dialog {\n\t\t\tmax-width: calc($modal-prompt-max-width + 2 * rem-calc(24));\n\t\t}\n\t}\n\t@include mq($from: md) {\n\t\t&__header {\n\t\t\tgap: rem-calc(20);\n\t\t\tpadding: rem-calc(32 40 32 48);\n\t\t}\n\t\t&__close {\n\t\t\tpadding-top: calc(((var(--gov-text-#{$font-size-3xl}-font-size) * 1.5) - rem-calc(40)) / 2);\n\t\t}\n\t\t&__content {\n\t\t\tpadding: rem-calc(32 48);\n\t\t}\n\n\t\t// VARIANTS\n\t\t&--prompt {\n\t\t\t#{$class} {\n\t\t\t\t&__header,\n\t\t\t\t&__content,\n\t\t\t\t&__actions {\n\t\t\t\t\tpadding: rem-calc(24);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Event, Element, EventEmitter, h, Host, Method, Prop, Watch, State } from \"@stencil/core\"\nimport { createID } from \"../../utils/string.utils\"\nimport { validateWcagRef } from \"../../helpers/Validate/wcag\"\nimport { ModalClass } from \"./constants\"\nimport { canValidateWcagOnRender } from \"../../helpers/Dom/win\"\nimport { delay } from \"../../utils/utils\"\nimport { toBoolAttr } from \"../../helpers/Dom/template\"\nimport { govHost } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { govErrorLog } from \"../../helpers/Log/gov.log\"\n\n@Component({\n\ttag: \"gov-modal\",\n\tstyleUrl: \"gov-modal.scss\",\n})\nexport class GovModal {\n\tprivate h: GovHost\n\tprivate readonly labelId: string\n\tprivate readonly contentId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.labelId = createID(\"GovModalLabel\")\n\t\tthis.contentId = createID(\"GovModalContent\")\n\t}\n\n\t@Element() host: HTMLGovModalElement\n\n\t/**\n\t * Attribute for modal window display\n\t */\n\t@Prop() open = false\n\t/**\n\t * Title of modal window\n\t */\n\t@Prop() label: string\n\t/**\n\t * Role of modal\n\t */\n\t@Prop({ attribute: \"role\" }) role = \"dialog\"\n\t/**\n\t * Used to change the HMTL tag in the modal label for correct semantic structure\n\t */\n\t@Prop({ attribute: \"label-tag\" }) readonly labelTag: string = \"h2\"\n\t/**\n\t * String of id's that indicate alternative labels elements\n\t */\n\t@Prop({ attribute: \"wcag-labelled-by\" }) wcaglabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the modal.\n\t */\n\t@Prop({ attribute: \"wcag-described-by\" }) wcagDescribedBy: string\n\t/**\n\t * Adds accessible label for the modal close button that is only shown for screen readers.\n\t */\n\t@Prop({ attribute: \"wcag-close-label\" }) wcagCloseLabel: string\n\t/**\n\t * A string of identifiers that indicate alternative label elements for closing the modal window\n\t */\n\t@Prop({ attribute: \"wcag-close-labelled-by\" }) wcagCloseLabelledBy: string\n\t/**\n\t * Emitted when modal window closes.\n\t */\n\t@Event({ eventName: \"gov-close\" }) govClose: EventEmitter<PointerEvent>\n\n\t@State() modalVisible = false\n\n\t@Watch(\"labelTag\")\n\tvalidateLabelTag(newValue: string): void {\n\t\tconst validTags = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"]\n\t\tif (newValue) {\n\t\t\tif (!validTags.includes(newValue)) {\n\t\t\t\tgovErrorLog(`[${ModalClass.root}]: Tag ${newValue} is not allowed.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t@Watch(\"open\")\n\twatchOpen(newValue: boolean): void {\n\t\tthis.modalVisible = newValue\n\t}\n\n\tprivate showModal() {\n\t\tthis.modalVisible = true\n\t\tdocument.body.classList.add(ModalClass.bodyFix)\n\t}\n\n\tprivate hideModal() {\n\t\tthis.modalVisible = false\n\t\tdocument.body.classList.remove(ModalClass.bodyFix)\n\t}\n\n\tasync componentWillRender() {\n\t\tif (this.modalVisible) {\n\t\t\tthis.showModal()\n\t\t} else {\n\t\t\tthis.hideModal()\n\t\t}\n\t}\n\n\tasync componentDidRender() {\n\t\tthis.modalVisible = this.open\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst LabelTag = this.labelTag\n\t\treturn (\n\t\t\t<Host class={this.h.classes(ModalClass.root)} open={this.modalVisible}>\n\t\t\t\t<dialog\n\t\t\t\t\tclass={ModalClass.dialog}\n\t\t\t\t\thidden={!this.modalVisible}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\topen={this.modalVisible}\n\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\taria-hidden={toBoolAttr(!this.modalVisible)}\n\t\t\t\t\taria-labelledby={this.wcaglabelledBy || this.labelId}\n\t\t\t\t\taria-describedby={this.wcagDescribedBy || this.contentId}\n\t\t\t\t\trole={this.role}\n\t\t\t\t>\n\t\t\t\t\t<div class={ModalClass.inner}>\n\t\t\t\t\t\t<div class={ModalClass.header}>\n\t\t\t\t\t\t\t{this.h.hasSlot(\"icon\") && (\n\t\t\t\t\t\t\t\t<div class={ModalClass.icon}>\n\t\t\t\t\t\t\t\t\t<slot name=\"icon\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{this.label && (\n\t\t\t\t\t\t\t\t<LabelTag class={ModalClass.title} id={this.labelId}>\n\t\t\t\t\t\t\t\t\t{this.label}\n\t\t\t\t\t\t\t\t</LabelTag>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<gov-button\n\t\t\t\t\t\t\t\tclass={ModalClass.close}\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\twcagLabel={this.wcagCloseLabel}\n\t\t\t\t\t\t\t\twcagLabelledBy={this.wcagCloseLabelledBy}\n\t\t\t\t\t\t\t\ttype=\"base\"\n\t\t\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<gov-icon name=\"x-lg\" />\n\t\t\t\t\t\t\t</gov-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class={ModalClass.content} id={this.contentId}>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</dialog>\n\n\t\t\t\t{this.modalVisible ? (\n\t\t\t\t\t<gov-backdrop\n\t\t\t\t\t\twcag-label={this.wcagCloseLabel}\n\t\t\t\t\t\twcag-labelled-by={this.wcagCloseLabelledBy}\n\t\t\t\t\t\ton-gov-click={this.onCloseHandler.bind(this)}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onCloseHandler(e: PointerEvent) {\n\t\te.stopPropagation()\n\t\tthis.hideModal()\n\t\tthis.govClose.emit(e)\n\t}\n\n\t/**\n\t * Showing the modal\n\t */\n\t@Method()\n\tasync show(): Promise<void> {\n\t\tthis.showModal()\n\t}\n\n\t/**\n\t * Hidding the modal\n\t */\n\t@Method()\n\tasync hide(): Promise<void> {\n\t\tthis.hideModal()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcaglabelledBy, \"aria-labelledby\", ModalClass.root)\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"aria-describedby\", ModalClass.root)\n\t}\n}\n"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|