@iamproperty/components 7.7.1--beta7 → 7.7.1--beta9
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/assets/css/components/{header.css → header.component.css} +1 -1
- package/assets/css/components/header.component.css.map +1 -0
- package/assets/css/components/header.preload.css +1 -0
- package/assets/css/components/header.preload.css.map +1 -0
- package/assets/css/components/nav.component.css +1 -1
- package/assets/css/components/nav.component.css.map +1 -1
- package/assets/css/components/table-basic.global.css +1 -1
- package/assets/css/components/table-basic.global.css.map +1 -1
- package/assets/css/components/table.global.css +1 -1
- package/assets/css/components/table.global.css.map +1 -1
- package/assets/css/components/tooltip.component.css +1 -1
- package/assets/css/components/tooltip.component.css.map +1 -1
- package/assets/css/core.min.css +1 -1
- package/assets/css/core.min.css.map +1 -1
- package/assets/css/style.min.css +1 -1
- package/assets/css/style.min.css.map +1 -1
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
- package/assets/js/components/advanced-select/advanced-select.component.min.js +1 -1
- package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
- package/assets/js/components/barchart/barchart.component.min.js +1 -1
- package/assets/js/components/bento-grid/bento-grid.component.min.js +1 -1
- package/assets/js/components/calendar/calendar.component.min.js +1 -1
- package/assets/js/components/card/card.component.min.js +1 -1
- package/assets/js/components/carousel/carousel.component.min.js +1 -1
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
- package/assets/js/components/config/config.component.min.js +1 -1
- package/assets/js/components/content/content.component.min.js +1 -1
- package/assets/js/components/darkmode/darkmode.component.min.js +1 -1
- package/assets/js/components/doughnutchart/doughnutchart.component.min.js +1 -1
- package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
- package/assets/js/components/filter-card/filter-card.component.min.js +1 -1
- package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
- package/assets/js/components/form/form.component.min.js +1 -1
- package/assets/js/components/header/header.component.js +1 -1
- package/assets/js/components/header/header.component.min.js +2 -2
- package/assets/js/components/header/header.component.min.js.map +1 -1
- package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
- package/assets/js/components/input/input.component.min.js +1 -1
- package/assets/js/components/input-range/input-range.component.min.js +1 -1
- package/assets/js/components/marketing/marketing.component.min.js +1 -1
- package/assets/js/components/menu/menu.component.min.js +1 -1
- package/assets/js/components/milestone/milestone.component.min.js +1 -1
- package/assets/js/components/milestone-group/milestone-group.component.min.js +1 -1
- package/assets/js/components/modal/modal.component.min.js +1 -1
- package/assets/js/components/multi-step/multi-step.component.min.js +1 -1
- package/assets/js/components/multi-step-modal/multi-step-modal.component.min.js +1 -1
- package/assets/js/components/multiselect/multiselect.component.min.js +1 -1
- package/assets/js/components/nav/nav.component.min.js +2 -2
- package/assets/js/components/notification/notification.component.min.js +1 -1
- package/assets/js/components/pagination/pagination.component.min.js +1 -1
- package/assets/js/components/password/password.component.min.js +1 -1
- package/assets/js/components/popover/popover.component.min.js +1 -1
- package/assets/js/components/rank/rank.component.min.js +1 -1
- package/assets/js/components/rankings/rankings.component.min.js +1 -1
- package/assets/js/components/rating/rating.component.min.js +1 -1
- package/assets/js/components/record-card/record-card.component.min.js +1 -1
- package/assets/js/components/search/search.component.min.js +1 -1
- package/assets/js/components/slider/slider.component.min.js +1 -1
- package/assets/js/components/split-button/split-button.component.min.js +1 -1
- package/assets/js/components/std-address-lookup/std-address-lookup.component.min.js +1 -1
- package/assets/js/components/table/table.component.min.js +2 -2
- package/assets/js/components/table-ajax/table-ajax.component.min.js +2 -2
- package/assets/js/components/table-basic/table-basic.component.min.js +2 -2
- package/assets/js/components/table-no-submit/table-no-submit.component.min.js +2 -2
- package/assets/js/components/table-submit/table-submit.component.min.js +2 -2
- package/assets/js/components/tabs/tabs.component.min.js +1 -1
- package/assets/js/components/tag/tag.component.min.js +1 -1
- package/assets/js/components/tooltip/tooltip.component.js +7 -1
- package/assets/js/components/tooltip/tooltip.component.min.js +6 -5
- package/assets/js/components/tooltip/tooltip.component.min.js.map +1 -1
- package/assets/js/components/video/video.component.min.js +1 -1
- package/assets/js/components/video-card/video-card.component.min.js +1 -1
- package/assets/js/components/video-modal/video-modal.component.min.js +1 -1
- package/assets/js/components/word-count/word-count.component.min.js +1 -1
- package/assets/js/scripts.bundle.js +1 -1
- package/assets/js/scripts.bundle.min.js +1 -1
- package/assets/sass/_components.scss +1 -12
- package/assets/sass/components/{header.scss → header.component.scss} +8 -10
- package/assets/sass/components/header.preload.scss +26 -0
- package/assets/sass/components/nav.component.scss +1 -1
- package/assets/sass/components/table-basic.global.scss +1 -1
- package/assets/sass/components/table.global.scss +58 -57
- package/assets/sass/components/tooltip.component.scss +23 -68
- package/assets/ts/components/header/header.component.ts +1 -1
- package/assets/ts/components/tooltip/tooltip.component.ts +11 -1
- package/dist/components.es.js +25 -25
- package/dist/components.umd.js +53 -52
- package/package.json +1 -1
- package/assets/css/components/header.css.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta9
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/(function(w){typeof define=="function"&&define.amd?define(w):w()})((function(){"use strict";var w=a=>{a.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&a.classList.add("ie")},H=a=>{var e=function(n){var r=document.querySelector('label[for="'.concat(n.replace("#",""),'"]')),s=document.querySelector(n+" summary"),u=document.querySelector("dialog".concat(n)),i=document.querySelector("detail".concat(n));r instanceof HTMLElement?r.click():s instanceof HTMLElement?s.click():u instanceof HTMLElement?u.showModal():i instanceof HTMLElement&&i.addAttribute("open")};location.hash&&e(location.hash),window.addEventListener("hashchange",function(){e(location.hash)},!1),addEventListener("popstate",o=>{if(o&&o.state&&o.state.type&&o.state.type=="pagination"){var n=document.querySelector("#".concat(o.state.form)),r=document.querySelector("#".concat(o.state.form," [data-pagination]"));r?r.value=o.state.page:n.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(o.state.page,'" />'),n.dispatchEvent(new Event("submit"))}}),Array.from(document.querySelectorAll("form")).forEach(o=>{o?.closest("iam-form")||o.addEventListener("submit",n=>{var r;o.querySelector(":invalid")&&(o.classList.add("was-validated"),(r=o?.querySelector("input:invalid"))===null||r===void 0||r.scrollIntoView(),n.preventDefault())})}),document.addEventListener("click",o=>{var n;if(o&&o.target instanceof HTMLElement&&o.target.matches("form button:not([type=button])")){var r=o.target.closest("form");r?.closest("iam-form")||(Array.from(r.querySelectorAll("[data-password-type]")).forEach(s=>{s.setAttribute("type","password")}),(r.querySelector(":invalid")||r.querySelector('.pwd-checker[data-strength="1"]')||r.querySelector('.pwd-checker[data-strength="2"]'))&&(r.classList.add("was-validated"),(n=r?.querySelector("input:invalid"))===null||n===void 0||n.scrollIntoView(),o.preventDefault()),r.querySelector("iam-multiselect[data-is-required][data-error]")&&(r.classList.add("was-validated"),o.preventDefault()))}}),document.addEventListener("keydown",o=>{o.key==="Escape"&&document.querySelector(".dialog--transactional[open], .dialog--acknowledgement[open]")&&(o.preventDefault(),o.stopPropagation())}),Array.from(document.querySelectorAll("label progress")).forEach(o=>{var n=o.closest("label");n.setAttribute("data-percent",o.getAttribute("value"))})};function N(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",a=>{var e=a.target.closest("[open] summary");if(e)window.dataLayer.push({event:"closeDetails",detailsTitle:e.textContent||""});else{var o=a.target.closest("summary"),n=a.target.closest("a"),r=a.target.closest("button");o&&window.dataLayer.push({event:"openDetails",detailsTitle:o.textContent||""}),n&&window.dataLayer.push({event:"linkClicked",linkText:n.hasAttribute("title")?n.getAttribute("title")||"":n.textContent||"",class:n.hasAttribute("class")&&n.getAttribute("class")||"",href:n.getAttribute("href")||""}),r&&window.dataLayer.push({event:"buttonClicked",buttonText:r.textContent||"",class:r.hasAttribute("class")&&r.getAttribute("class")||""})}})}window.triggerDynamicEvent=function(a){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"change";console.log("event"),a.hasAttribute("data-change-events")&&e=="change"&&v(a,a.getAttribute("data-change-events")),a.hasAttribute("data-click-events")&&e=="click"&&v(a,a.getAttribute("data-click-events"))};var M=()=>{document.addEventListener("change",a=>{a&&a.target instanceof HTMLElement&&a.target.closest("[data-change-events]")&&v(a.target,a.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("keyup",a=>{a&&a.target instanceof HTMLElement&&a.target.closest("[data-change-events]")&&v(a.target,a.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("click",a=>{a&&a.target instanceof HTMLElement&&a.target.closest("[data-click-events]")&&v(a.target,a.target.closest("[data-click-events]").getAttribute("data-click-events"))})},v=(a,e)=>{if(e||(e=a.parentNode.getAttribute("data-change-events")),!e)return!1;Array.from(JSON.parse(e)).forEach(o=>{C(a,o)})},C=(a,e)=>{if("matches"in e)return e.matches=="any"||a.value==e.matches?f(a,e,"if"):f(a,e,"else"),!1;if("in-list"in e){var o=document.querySelector("".concat(e["in-list"],' option[value="').concat(a.value,'"]'));return document.querySelector("".concat(e["in-list"],' option[value="').concat(a.value,'"]'))?f(o,e,"if"):f(o,e,"else"),!1}else"event"in e&&f(a,e,"event")},f=(a,e,o)=>{if(!(o in e))return!1;switch(e[o]){case"hide":if(document.querySelector(e.target)){var n=document.querySelector(e.target);n.classList.add("js-hide"),Array.from(n.querySelectorAll("[data-required]")).forEach(i=>{i.removeAttribute("required")})}break;case"show":if(document.querySelector(e.target)){var r=document.querySelector(e.target);r.classList.remove("js-hide"),Array.from(r.querySelectorAll("[data-required]")).forEach(i=>{i.closest(".js-hide")||i.setAttribute("required","true")})}break;case"populate-form":D(a,e);break;case"dispatchEvent":var s=new Event(e.value);document.querySelector("".concat(e.target)).dispatchEvent(s);break;case"setAttribute":Array.from(document.querySelectorAll("".concat(e.target))).forEach(function(i){i.setAttribute(e.attribute,e.value)});break;case"focus":document.querySelector("".concat(e.target)).focus();break;case"removeAttribute":Array.from(document.querySelectorAll("".concat(e.target))).forEach(function(i){i.removeAttribute(e.attribute)});break;case"updateValue":document.querySelector("".concat(e.target)).value=e.value?e.value:"";var u=new Event("change");document.querySelector("".concat(e.target)).dispatchEvent(u);break;case"submitForm":document.querySelector("".concat(e.target)).submit();break;case"openLink":document.querySelector("".concat(e.target)).value&&(window.location.href=document.querySelector("".concat(e.target)).value);break}},D=function(e,o){var n=JSON.parse(e.getAttribute("data-values")),r=document.querySelector(o.target);if(!n)return!1;Object.keys(n).forEach(s=>{document.getElementById(s)&&document.getElementById(s).tagName=="SPAN"&&(document.getElementById(s).innerHTML=n[s]),r.querySelector('select[name="'.concat(s,'"] [value="').concat(n[s],'"]'))?(r.querySelector('select[name="'.concat(s,'"]')).value=n[s],e.hasAttribute("data-lock-fields")&&(r.querySelector('select[name="'.concat(s,'"]')).disabled=!0)):r.querySelector('input[name="'.concat(s,'"][type="radio"][value="').concat(n[s],'"]'))?(Array.from(r.querySelectorAll('input[name="'.concat(s,'"][type="radio"]'))).forEach(function(u){u.disabled=!0}),r.querySelector('input[name="'.concat(s,'"][type="radio"][value="').concat(n[s],'"]')).checked=!0,r.querySelector('input[name="'.concat(s,'"][type="radio"][value="').concat(n[s],'"]')).disabled=!1):r.querySelector('input[name="'.concat(s,'"]'))&&(r.querySelector('input[name="'.concat(s,'"]')).value=n[s],e.hasAttribute("data-lock-fields")&&r.querySelector('input[name="'.concat(s,'"]')).setAttribute("readonly","true"))})},F=()=>{var a=[],e={},o="These tests run against mark-up and content meant to test how a component or element has been integrated. Making sure that guidance setout in the design system is being followed.";window.integrationTestsIntro=o,console.log("%cVirgin Money Framework Tests","color: #E10A0A; font-size: 24px; font-weight: bold; margin-top: 20px; margin-bottom: 10px;"),console.log("%c"+o,"font-size: 14px; margin-bottom: 20px;"),console.log("%cKey","font-size: 16px;font-weight:bold;"),console.log("%c %cSuccessfully implemented","background-color: green; margin-right: 10px","background-color: transparent"),console.log("%c %cNOT implemented correctly","background-color: red; margin-right: 10px","background-color: transparent"),console.log("%c %cN/A","background-color: grey; margin-right: 10px","background-color: transparent"),console.log("%c %cWarning - No action needed","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("%c ? %cWarning - Action needed","background-color: orange; margin-right: 10px","background-color: transparent"),e={Test:"Each card with in a card deck has a footer with some CTA text via a button link",Total:0,Passes:0,Fails:0},Array.from(document.querySelectorAll(".card-deck .card")).forEach((t,c)=>{if(t.closest(".navbar")==null){var l=t.querySelector(".btn-link");l!=null&&l.textContent.length?e.Passes++:e.Fails++}}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"Article Decks need to have a background colour applied",Total:0,Passes:0,Fails:0},Array.from(document.querySelectorAll(".article-deck")).forEach((t,c)=>{var l=t.closest(".container");l!=null&&l.matches('[class*="bg-"]')?e.Passes++:e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"Tabs Carousel has a h2 title with a display-4 class. It should always have a strapline next to it also.",Total:0,Passes:0,Fails:0,Notes:"The site nav contains cards without a footer by design."},Array.from(document.querySelectorAll(".tabs__container--carousel")).forEach((t,c)=>{var l=t.querySelector("h2.display-4:first-child"),d=t.querySelector("h2.display-4:first-child + .strapline");l!=null&&d!=null?e.Passes++:e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"Split Containers can only have multiple of two columns. So either 2, 4, 6 and so on.",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--split")).forEach((t,c)=>{t.querySelectorAll(':scope > .row > [class*="col"]').length%2===0?e.Passes++:e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"Statement Containers with only one paragraph or text element should have the class of .h6",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--statement")).forEach((t,c)=>{t.querySelectorAll(":scope > *").length==1&&t.querySelectorAll(":scope > .h6:first-child").length==1?e.Passes++:t.querySelectorAll(":scope > *").length==1&&e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"CTA Containers title should always have the class of .h1",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--cta")).forEach((t,c)=>{t.querySelectorAll("h2.h1:first-child").length==1?e.Passes++:e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),console.log("%cImplementation Tests","font-size: 16px;font-weight:bold; margin-top: 20px;"),a.forEach(function(t){var c="green";t.Total===0?c="grey":t.Fails!=0&&(c="red"),t.Type=="warning"&&(c="orange"),console.groupCollapsed("%c %c"+t.Test,"background-color: "+c+"; margin-right: 10px","background-color: transparent"),console.table({Passed:{value:t.Passes},Failed:{value:t.Fails},Total:{value:t.Total}}),t.Notes!=""&&console.log(t.Notes),console.groupEnd()}),window.integrationTests=a;var n=[];e={Test:"There are XX padding classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="p-"],[class*="pt-"],[class*="pb-"],[class*="pl-"],[class*="pr-"],[class*="px-"],[class*="py-"]')).forEach((t,c)=>{e.Total++}),e.Test=e.Test.replace("XX",e.Total),n.push(e),e={Test:"There are XX margin classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="m-"],[class*="mt-"],[class*="mb-"],[class*="ml-"],[class*="mr-"],[class*="mx-"],[class*="my-"]')).forEach((t,c)=>{e.Total++}),e.Test=e.Test.replace("XX",e.Total),n.push(e),e={Test:"There are XX text modifier classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="text-"]')).forEach((t,c)=>{e.Total++}),e.Test=e.Test.replace("XX",e.Total),n.push(e),console.log("%cUtility classes","font-size: 16px;font-weight:bold;"),console.log("The use of certain utility classes is necessary at times but the over use of these classes will lead to design/layout inconsistencies."),n.forEach(function(t){var c="green";t.Total===0?c="grey":t.Fails!=0&&(c="red"),t.Type=="warning"&&(c="orange"),console.groupCollapsed("%c %c"+t.Test,"background-color: "+c+"; margin-right: 10px","background-color: transparent"),console.table({Total:{value:t.Total}}),t.Notes!=""&&console.log(t.Notes),console.groupEnd()}),console.log("%cAccessibility and Best practice Tests","font-size: 16px;font-weight:bold;");var r="green",s=1,u={};Array.from(document.querySelectorAll("h1,h2,h3,h4,h5,h6")).forEach((t,c)=>{var l=1,d=t.textContent;t.matches("h2")?l=2:t.matches("h3")?l=3:t.matches("h4")?l=4:t.matches("h5")?l=5:t.matches("h6")&&(l=6);var h=l-s<=1;c==0&&l!=1&&(h=!1);var p={"Heading Level":l,"In order":h};h?s=l:r="red",u[d]=p}),console.groupCollapsed("%c %cHeadings are in the correct order","background-color: "+r+"; margin-right: 10px","background-color: transparent"),console.table(u),console.groupEnd(),console.groupCollapsed("%c ? %cDo all of the headings make sense out of context and do they introduce the content that follows?","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("You should be able to read the below table and get an understanding of what the page content consists of. The titles should make sense when read in order and child titles should be relevant to the parent title."),console.table(u),console.groupEnd();var i={};Array.from(document.querySelectorAll("a")).forEach((t,c)=>{var l=t.getAttribute("href"),d=t.textContent,h=t.getAttribute("title"),p={Text:d,Title:h};i[l]=p}),console.groupCollapsed("%c ? %cDo all of the links make sense out of context and do they describe the page/section that it links to?","background-color: orange; margin-right: 10px","background-color: transparent"),console.table(i),console.groupEnd();var A={},m={};Array.from(document.querySelectorAll("img[alt]")).forEach((t,c)=>{var l=t.getAttribute("src"),d=t.getAttribute("alt");if(d!=""){var h={Alt:d};A[l]=h}else{var l=t.getAttribute("src"),p={};m[l]=p}}),console.groupCollapsed("%c ? %cDo all of the images with an alt tag make sense out of context and describes the image appropriately?","background-color: orange; margin-right: 10px","background-color: transparent"),console.table(A),console.log("%cImages with an empty alt tag:","font-weight: bold;"),console.table(m),console.groupEnd(),console.groupCollapsed("%c ? %cCan you navigation the page links by tabbing through the page?","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("Are all of the links, input fields and buttons accessible through using the keyboard only?"),console.groupEnd(),console.log("%cLighthouse","font-size: 16px;font-weight:bold;"),console.groupCollapsed("%c ? %cHave you ran a lighthouse report on this page","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("If you are in a modern version of chrome you can a lighthouse report by opening the lighthouse window within the devtools. This should appear as a tab link above."),console.log("This report will give you more detail about the above the tests aswell as extra tests. "),console.groupEnd(),console.log("%cImage sizes","font-size: 16px;font-weight:bold;"),console.log("The below tests work from the current screen size, so if you have your screen at a mobile viewport the scaling and sizes of images will reflect that. It is worth running the image tests in both mobile and desktop views. Simply change the screen size and refresh the page."),Array.from(document.querySelectorAll("img")).forEach((t,c)=>{if(!t.matches("[src*='http']")&&!t.matches("[src$='.svg']")){var l=t.getAttribute("src"),d=new XMLHttpRequest;d.open("HEAD",l,!0),d.onreadystatechange=function(){if(d.readyState==4)if(d.status==200){var h=d.getResponseHeader("Content-Length");if(h>1024){var p=t.naturalWidth,P=t.naturalHeight,S=t.clientWidth,O=t.clientHeight,k=(S/p).toFixed(2)=="0.00"?"Hidden":(S/p).toFixed(2),B=Math.floor(h/1024),E=(h/(p*P)).toFixed(2),b="green",L="green",q="green",x="",T="";E>.5?(b="red",L="red",x="The image has a VERY large 'Bytes per pixel' score, trying optimising the image using https://tinypng.com/."):E>.2&&(b="orange",L="orange",x="The image has a large 'Bytes per pixel' score, trying optimising the image using https://tinypng.com/."),k>1.2?(b="red",q="red",T="The image size is smaller than the size shown on screen this may cause the image to appear blurry and low quality."):k<.5?(b="red",q="red",T="The image size is VERY large compared to the size shown on screen, this means unnecessary kb's are being downloaded. Try resizing the image in photoshop or other image editing software."):k<.8&&(b="orange",q="orange",T="The image size is large compared to the size shown on screen, this means unnecessary kb's are being downloaded. Try resizing the image in photoshop or other image editing software."),console.log("%c %c "+t.src,"background: url("+t.src+"); border: 3px solid "+b+"; line-height: 30px; width: 30px; background-size: cover;","background-color: transparent"),x!=""&&console.log("%c %c"+x,"background-color: "+L+"; margin-right: 10px","background-color: transparent"),T!=""&&console.log("%c %c"+T,"background-color: "+q+"; margin-right: 10px","background-color: transparent"),console.table({Image:{Dimensions:p+"x"+P,"Scaled to":S+"x"+O,Scale:k,Filesize:B+"Kb","Bytes per pixel":E}}),console.groupEnd()}}else console.log("%c %c"+t.src+" not loaded","background-color: red; margin-right: 10px","background-color: transparent")},d.send(null)}});var g=[];if(typeof window.integrationTests<"u"&&window.integrationTests.forEach(function(t){t.Total!=0&&t.Type!="warning"&&g.push(t.Test)}),g.length!=0){var y=document.querySelector("#vmtests-display");if(y!=null){y.innerHTML=`<div class="container">
|
|
5
5
|
<h2>Integration notes</h2>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta9
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/
|
|
5
5
|
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";window.triggerDynamicEvent=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"change";console.log("event"),t.hasAttribute("data-change-events")&&"change"==a&&e(t,t.getAttribute("data-change-events")),t.hasAttribute("data-click-events")&&"click"==a&&e(t,t.getAttribute("data-click-events"))};var e=(e,a)=>{if(a||(a=e.parentNode.getAttribute("data-change-events")),!a)return!1;Array.from(JSON.parse(a)).forEach(a=>{t(e,a)})},t=(e,t)=>{if("matches"in t)return"any"==t.matches||e.value==t.matches?a(e,t,"if"):a(e,t,"else"),!1;if("in-list"in t){var o=document.querySelector("".concat(t["in-list"],' option[value="').concat(e.value,'"]'));return document.querySelector("".concat(t["in-list"],' option[value="').concat(e.value,'"]'))?a(o,t,"if"):a(o,t,"else"),!1}"event"in t&&a(e,t,"event")},a=(e,t,a)=>{if(!(a in t))return!1;switch(t[a]){case"hide":if(document.querySelector(t.target)){var n=document.querySelector(t.target);n.classList.add("js-hide"),Array.from(n.querySelectorAll("[data-required]")).forEach(e=>{e.removeAttribute("required")})}break;case"show":if(document.querySelector(t.target)){var r=document.querySelector(t.target);r.classList.remove("js-hide"),Array.from(r.querySelectorAll("[data-required]")).forEach(e=>{e.closest(".js-hide")||e.setAttribute("required","true")})}break;case"populate-form":o(e,t);break;case"dispatchEvent":var s=new Event(t.value);document.querySelector("".concat(t.target)).dispatchEvent(s);break;case"setAttribute":Array.from(document.querySelectorAll("".concat(t.target))).forEach(function(e){e.setAttribute(t.attribute,t.value)});break;case"focus":document.querySelector("".concat(t.target)).focus();break;case"removeAttribute":Array.from(document.querySelectorAll("".concat(t.target))).forEach(function(e){e.removeAttribute(t.attribute)});break;case"updateValue":document.querySelector("".concat(t.target)).value=t.value?t.value:"";var l=new Event("change");document.querySelector("".concat(t.target)).dispatchEvent(l);break;case"submitForm":document.querySelector("".concat(t.target)).submit();break;case"openLink":document.querySelector("".concat(t.target)).value&&(window.location.href=document.querySelector("".concat(t.target)).value)}},o=function(e,t){var a=JSON.parse(e.getAttribute("data-values")),o=document.querySelector(t.target);if(!a)return!1;Object.keys(a).forEach(t=>{document.getElementById(t)&&"SPAN"==document.getElementById(t).tagName&&(document.getElementById(t).innerHTML=a[t]),o.querySelector('select[name="'.concat(t,'"] [value="').concat(a[t],'"]'))?(o.querySelector('select[name="'.concat(t,'"]')).value=a[t],e.hasAttribute("data-lock-fields")&&(o.querySelector('select[name="'.concat(t,'"]')).disabled=!0)):o.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]'))?(Array.from(o.querySelectorAll('input[name="'.concat(t,'"][type="radio"]'))).forEach(function(e){e.disabled=!0}),o.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]')).checked=!0,o.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]')).disabled=!1):o.querySelector('input[name="'.concat(t,'"]'))&&(o.querySelector('input[name="'.concat(t,'"]')).value=a[t],e.hasAttribute("data-lock-fields")&&o.querySelector('input[name="'.concat(t,'"]')).setAttribute("readonly","true"))})},n=()=>{var e=[],t={},a="These tests run against mark-up and content meant to test how a component or element has been integrated. Making sure that guidance setout in the design system is being followed.";window.integrationTestsIntro=a,console.log("%cVirgin Money Framework Tests","color: #E10A0A; font-size: 24px; font-weight: bold; margin-top: 20px; margin-bottom: 10px;"),console.log("%c"+a,"font-size: 14px; margin-bottom: 20px;"),console.log("%cKey","font-size: 16px;font-weight:bold;"),console.log("%c %cSuccessfully implemented","background-color: green; margin-right: 10px","background-color: transparent"),console.log("%c %cNOT implemented correctly","background-color: red; margin-right: 10px","background-color: transparent"),console.log("%c %cN/A","background-color: grey; margin-right: 10px","background-color: transparent"),console.log("%c %cWarning - No action needed","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("%c ? %cWarning - Action needed","background-color: orange; margin-right: 10px","background-color: transparent"),t={Test:"Each card with in a card deck has a footer with some CTA text via a button link",Total:0,Passes:0,Fails:0},Array.from(document.querySelectorAll(".card-deck .card")).forEach((e,a)=>{if(null==e.closest(".navbar")){var o=e.querySelector(".btn-link");null!=o&&o.textContent.length?t.Passes++:t.Fails++}}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"Article Decks need to have a background colour applied",Total:0,Passes:0,Fails:0},Array.from(document.querySelectorAll(".article-deck")).forEach((e,a)=>{var o=e.closest(".container");null!=o&&o.matches('[class*="bg-"]')?t.Passes++:t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"Tabs Carousel has a h2 title with a display-4 class. It should always have a strapline next to it also.",Total:0,Passes:0,Fails:0,Notes:"The site nav contains cards without a footer by design."},Array.from(document.querySelectorAll(".tabs__container--carousel")).forEach((e,a)=>{var o=e.querySelector("h2.display-4:first-child"),n=e.querySelector("h2.display-4:first-child + .strapline");null!=o&&null!=n?t.Passes++:t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"Split Containers can only have multiple of two columns. So either 2, 4, 6 and so on.",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--split")).forEach((e,a)=>{e.querySelectorAll(':scope > .row > [class*="col"]').length%2==0?t.Passes++:t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"Statement Containers with only one paragraph or text element should have the class of .h6",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--statement")).forEach((e,a)=>{1==e.querySelectorAll(":scope > *").length&&1==e.querySelectorAll(":scope > .h6:first-child").length?t.Passes++:1==e.querySelectorAll(":scope > *").length&&t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"CTA Containers title should always have the class of .h1",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--cta")).forEach((e,a)=>{1==e.querySelectorAll("h2.h1:first-child").length?t.Passes++:t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),console.log("%cImplementation Tests","font-size: 16px;font-weight:bold; margin-top: 20px;"),e.forEach(function(e){var t="green";0===e.Total?t="grey":0!=e.Fails&&(t="red"),"warning"==e.Type&&(t="orange"),console.groupCollapsed("%c %c"+e.Test,"background-color: "+t+"; margin-right: 10px","background-color: transparent"),console.table({Passed:{value:e.Passes},Failed:{value:e.Fails},Total:{value:e.Total}}),""!=e.Notes&&console.log(e.Notes),console.groupEnd()}),window.integrationTests=e;var o=[];t={Test:"There are XX padding classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="p-"],[class*="pt-"],[class*="pb-"],[class*="pl-"],[class*="pr-"],[class*="px-"],[class*="py-"]')).forEach((e,a)=>{t.Total++}),t.Test=t.Test.replace("XX",t.Total),o.push(t),t={Test:"There are XX margin classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="m-"],[class*="mt-"],[class*="mb-"],[class*="ml-"],[class*="mr-"],[class*="mx-"],[class*="my-"]')).forEach((e,a)=>{t.Total++}),t.Test=t.Test.replace("XX",t.Total),o.push(t),t={Test:"There are XX text modifier classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="text-"]')).forEach((e,a)=>{t.Total++}),t.Test=t.Test.replace("XX",t.Total),o.push(t),console.log("%cUtility classes","font-size: 16px;font-weight:bold;"),console.log("The use of certain utility classes is necessary at times but the over use of these classes will lead to design/layout inconsistencies."),o.forEach(function(e){var t="green";0===e.Total?t="grey":0!=e.Fails&&(t="red"),"warning"==e.Type&&(t="orange"),console.groupCollapsed("%c %c"+e.Test,"background-color: "+t+"; margin-right: 10px","background-color: transparent"),console.table({Total:{value:e.Total}}),""!=e.Notes&&console.log(e.Notes),console.groupEnd()}),console.log("%cAccessibility and Best practice Tests","font-size: 16px;font-weight:bold;");var n="green",r=1,s={};Array.from(document.querySelectorAll("h1,h2,h3,h4,h5,h6")).forEach((e,t)=>{var a=1,o=e.textContent;e.matches("h2")?a=2:e.matches("h3")?a=3:e.matches("h4")?a=4:e.matches("h5")?a=5:e.matches("h6")&&(a=6);var l=a-r<=1;0==t&&1!=a&&(l=!1);var c={"Heading Level":a,"In order":l};l?r=a:n="red",s[o]=c}),console.groupCollapsed("%c %cHeadings are in the correct order","background-color: "+n+"; margin-right: 10px","background-color: transparent"),console.table(s),console.groupEnd(),console.groupCollapsed("%c ? %cDo all of the headings make sense out of context and do they introduce the content that follows?","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("You should be able to read the below table and get an understanding of what the page content consists of. The titles should make sense when read in order and child titles should be relevant to the parent title."),console.table(s),console.groupEnd();var l={};Array.from(document.querySelectorAll("a")).forEach((e,t)=>{var a=e.getAttribute("href"),o={Text:e.textContent,Title:e.getAttribute("title")};l[a]=o}),console.groupCollapsed("%c ? %cDo all of the links make sense out of context and do they describe the page/section that it links to?","background-color: orange; margin-right: 10px","background-color: transparent"),console.table(l),console.groupEnd();var c={},i={};Array.from(document.querySelectorAll("img[alt]")).forEach((e,t)=>{var a=e.getAttribute("src"),o=e.getAttribute("alt");if(""!=o){var n={Alt:o};c[a]=n}else a=e.getAttribute("src"),i[a]={}}),console.groupCollapsed("%c ? %cDo all of the images with an alt tag make sense out of context and describes the image appropriately?","background-color: orange; margin-right: 10px","background-color: transparent"),console.table(c),console.log("%cImages with an empty alt tag:","font-weight: bold;"),console.table(i),console.groupEnd(),console.groupCollapsed("%c ? %cCan you navigation the page links by tabbing through the page?","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("Are all of the links, input fields and buttons accessible through using the keyboard only?"),console.groupEnd(),console.log("%cLighthouse","font-size: 16px;font-weight:bold;"),console.groupCollapsed("%c ? %cHave you ran a lighthouse report on this page","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("If you are in a modern version of chrome you can a lighthouse report by opening the lighthouse window within the devtools. This should appear as a tab link above."),console.log("This report will give you more detail about the above the tests aswell as extra tests. "),console.groupEnd(),console.log("%cImage sizes","font-size: 16px;font-weight:bold;"),console.log("The below tests work from the current screen size, so if you have your screen at a mobile viewport the scaling and sizes of images will reflect that. It is worth running the image tests in both mobile and desktop views. Simply change the screen size and refresh the page."),Array.from(document.querySelectorAll("img")).forEach((e,t)=>{if(!e.matches("[src*='http']")&&!e.matches("[src$='.svg']")){var a=e.getAttribute("src"),o=new XMLHttpRequest;o.open("HEAD",a,!0),o.onreadystatechange=function(){if(4==o.readyState)if(200==o.status){var t=o.getResponseHeader("Content-Length");if(t>1024){var a=e.naturalWidth,n=e.naturalHeight,r=e.clientWidth,s=e.clientHeight,l="0.00"==(r/a).toFixed(2)?"Hidden":(r/a).toFixed(2),c=Math.floor(t/1024),i=(t/(a*n)).toFixed(2),u="green",d="green",g="green",h="",p="";i>.5?(u="red",d="red",h="The image has a VERY large 'Bytes per pixel' score, trying optimising the image using https://tinypng.com/."):i>.2&&(u="orange",d="orange",h="The image has a large 'Bytes per pixel' score, trying optimising the image using https://tinypng.com/."),l>1.2?(u="red",g="red",p="The image size is smaller than the size shown on screen this may cause the image to appear blurry and low quality."):l<.5?(u="red",g="red",p="The image size is VERY large compared to the size shown on screen, this means unnecessary kb's are being downloaded. Try resizing the image in photoshop or other image editing software."):l<.8&&(u="orange",g="orange",p="The image size is large compared to the size shown on screen, this means unnecessary kb's are being downloaded. Try resizing the image in photoshop or other image editing software."),console.log("%c %c "+e.src,"background: url("+e.src+"); border: 3px solid "+u+"; line-height: 30px; width: 30px; background-size: cover;","background-color: transparent"),""!=h&&console.log("%c %c"+h,"background-color: "+d+"; margin-right: 10px","background-color: transparent"),""!=p&&console.log("%c %c"+p,"background-color: "+g+"; margin-right: 10px","background-color: transparent"),console.table({Image:{Dimensions:a+"x"+n,"Scaled to":r+"x"+s,Scale:l,Filesize:c+"Kb","Bytes per pixel":i}}),console.groupEnd()}}else console.log("%c %c"+e.src+" not loaded","background-color: red; margin-right: 10px","background-color: transparent")},o.send(null)}});var u=[];if(typeof window.integrationTests<"u"&&window.integrationTests.forEach(function(e){0!=e.Total&&"warning"!=e.Type&&u.push(e.Test)}),0!=u.length){var d=document.querySelector("#vmtests-display");if(null!=d){d.innerHTML='<div class="container">\n <h2>Integration notes</h2>\n <ul id="integrationTests"></ul>\n </div>';var g=document.getElementById("integrationTests");null!=g&&u.forEach(function(e){g.innerHTML+="<li>"+e+"</li>"})}}return null},r=Object.freeze({__proto__:null,default:n});["localhost"].includes(window.location.hostname)&&Promise.resolve().then(function(){return r}).then(e=>{window.iamTest=()=>{n()}}).catch(e=>{console.log(e.message)}),document.addEventListener("DOMContentLoaded",()=>{return t=void 0,a=void 0,n=function*(){var t,a;window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",e=>{var t=e.target.closest("[open] summary");if(t)window.dataLayer.push({event:"closeDetails",detailsTitle:t.textContent||""});else{var a=e.target.closest("summary"),o=e.target.closest("a"),n=e.target.closest("button");a&&window.dataLayer.push({event:"openDetails",detailsTitle:a.textContent||""}),o&&window.dataLayer.push({event:"linkClicked",linkText:o.hasAttribute("title")?o.getAttribute("title")||"":o.textContent||"",class:o.hasAttribute("class")&&o.getAttribute("class")||"",href:o.getAttribute("href")||""}),n&&window.dataLayer.push({event:"buttonClicked",buttonText:n.textContent||"",class:n.hasAttribute("class")&&n.getAttribute("class")||""})}}),document.addEventListener("change",t=>{t&&t.target instanceof HTMLElement&&t.target.closest("[data-change-events]")&&e(t.target,t.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("keyup",t=>{t&&t.target instanceof HTMLElement&&t.target.closest("[data-change-events]")&&e(t.target,t.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("click",t=>{t&&t.target instanceof HTMLElement&&t.target.closest("[data-click-events]")&&e(t.target,t.target.closest("[data-click-events]").getAttribute("data-click-events"))}),(a=document.body).classList.add("js-enabled"),(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0)&&a.classList.add("ie"),t=function(e){var t=document.querySelector('label[for="'.concat(e.replace("#",""),'"]')),a=document.querySelector(e+" summary"),o=document.querySelector("dialog".concat(e)),n=document.querySelector("detail".concat(e));t instanceof HTMLElement?t.click():a instanceof HTMLElement?a.click():o instanceof HTMLElement?o.showModal():n instanceof HTMLElement&&n.addAttribute("open")},location.hash&&t(location.hash),window.addEventListener("hashchange",function(){t(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state&&e.state.type&&"pagination"==e.state.type){var t=document.querySelector("#".concat(e.state.form)),a=document.querySelector("#".concat(e.state.form," [data-pagination]"));a?a.value=e.state.page:t.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(e.state.page,'" />'),t.dispatchEvent(new Event("submit"))}}),Array.from(document.querySelectorAll("form")).forEach(e=>{e?.closest("iam-form")||e.addEventListener("submit",t=>{var a;e.querySelector(":invalid")&&(e.classList.add("was-validated"),null===(a=e?.querySelector("input:invalid"))||void 0===a||a.scrollIntoView(),t.preventDefault())})}),document.addEventListener("click",e=>{var t;if(e&&e.target instanceof HTMLElement&&e.target.matches("form button:not([type=button])")){var a=e.target.closest("form");a?.closest("iam-form")||(Array.from(a.querySelectorAll("[data-password-type]")).forEach(e=>{e.setAttribute("type","password")}),(a.querySelector(":invalid")||a.querySelector('.pwd-checker[data-strength="1"]')||a.querySelector('.pwd-checker[data-strength="2"]'))&&(a.classList.add("was-validated"),null===(t=a?.querySelector("input:invalid"))||void 0===t||t.scrollIntoView(),e.preventDefault()),a.querySelector("iam-multiselect[data-is-required][data-error]")&&(a.classList.add("was-validated"),e.preventDefault()))}}),document.addEventListener("keydown",e=>{"Escape"===e.key&&document.querySelector(".dialog--transactional[open], .dialog--acknowledgement[open]")&&(e.preventDefault(),e.stopPropagation())}),Array.from(document.querySelectorAll("label progress")).forEach(e=>{e.closest("label").setAttribute("data-percent",e.getAttribute("value"))})},new((o=void 0)||(o=Promise))(function(e,r){function s(e){try{c(n.next(e))}catch(e){r(e)}}function l(e){try{c(n.throw(e))}catch(e){r(e)}}function c(t){t.done?e(t.value):function(e){return e instanceof o?e:new o(function(t){t(e)})}(t.value).then(s,l)}c((n=n.apply(t,a||[])).next())});var t,a,o,n})});
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
@use 'components/nav.preload';
|
|
8
|
+
@use 'components/header.preload';
|
|
8
9
|
@use 'components/carousel.config';
|
|
9
10
|
@use 'components/multi-step-modal.global';
|
|
10
11
|
|
|
@@ -30,18 +31,6 @@
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
/* #region Undefined web components */
|
|
34
|
-
|
|
35
|
-
iam-header {
|
|
36
|
-
grid-column: full-width;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@media screen and (min-width: 62em) {
|
|
40
|
-
iam-header:not(:defined) {
|
|
41
|
-
min-height: 29.375rem;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
34
|
/* #region Cards */
|
|
46
35
|
.card:not(:defined) {
|
|
47
36
|
box-shadow: var(--card-box-shadow);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@use '../elements/admin-panel' as *;
|
|
4
4
|
|
|
5
5
|
*, *::before, *::after {
|
|
6
|
-
|
|
6
|
+
box-sizing: border-box;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.container {
|
|
@@ -14,12 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
:host {
|
|
16
16
|
padding-top: 0 !important;
|
|
17
|
-
margin-bottom: 2rem;
|
|
18
17
|
display: block !important;
|
|
18
|
+
|
|
19
|
+
.container {
|
|
20
|
+
padding-bottom: var(--padding-bottom)!important;
|
|
21
|
+
}
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
.header-banner {
|
|
22
|
-
padding-top:
|
|
25
|
+
padding-top: var(--padding-top);
|
|
23
26
|
max-width: 120rem; /* 1920 */
|
|
24
27
|
margin-inline: auto;
|
|
25
28
|
display: block;
|
|
@@ -91,11 +94,6 @@
|
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
|
|
94
|
-
::slotted(*:not(.btn__group):last-child) {
|
|
95
|
-
/* padding-bottom: 0 !important; */
|
|
96
|
-
/* margin-bottom: 0 !important; */
|
|
97
|
-
}
|
|
98
|
-
|
|
99
97
|
/* #region Breadcrumbs */
|
|
100
98
|
:host(.has-breadcrumbs) {
|
|
101
99
|
|
|
@@ -195,7 +193,8 @@ slot[name="badge"] {
|
|
|
195
193
|
/* #region toolbox */
|
|
196
194
|
:host(.has-toolbox) {
|
|
197
195
|
|
|
198
|
-
|
|
196
|
+
--padding-bottom: 1rem!important;
|
|
197
|
+
margin-bottom: 4rem!important;
|
|
199
198
|
}
|
|
200
199
|
:host(.has-toolbox) [name="toolbox"]{
|
|
201
200
|
|
|
@@ -205,7 +204,6 @@ slot[name="badge"] {
|
|
|
205
204
|
margin-bottom: -3rem;
|
|
206
205
|
width: fit-content;
|
|
207
206
|
margin-inline: auto;
|
|
208
|
-
|
|
209
207
|
gap: 0.5rem;
|
|
210
208
|
}
|
|
211
209
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
iam-header {
|
|
2
|
+
--padding-top: 2.75rem;
|
|
3
|
+
--padding-bottom: 2rem;
|
|
4
|
+
display: block;
|
|
5
|
+
margin-bottom: 2rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
iam-header:not(:defined) {
|
|
9
|
+
|
|
10
|
+
--colour-heading: var(--colour-white);
|
|
11
|
+
--colour-body: var(--colour-white);
|
|
12
|
+
--colour-underline: var(--colour-white);
|
|
13
|
+
color-scheme: dark;
|
|
14
|
+
color: var(--colour-white);
|
|
15
|
+
margin-left: auto;
|
|
16
|
+
margin-right: auto;
|
|
17
|
+
grid-column: full-width !important;
|
|
18
|
+
padding: var(--padding-top) var(--container-padding-x) var(--padding-bottom) var(--container-padding-x);
|
|
19
|
+
width: 100%;
|
|
20
|
+
max-width: var(--max-width);
|
|
21
|
+
background-color: var(--colour-primary-theme);
|
|
22
|
+
|
|
23
|
+
hr[slot="toolbox"] {
|
|
24
|
+
display: none!important;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -223,7 +223,7 @@ $selector: 'iam-table, iam-table-basic, iam-table-no-submit, iam-table-submit, i
|
|
|
223
223
|
|
|
224
224
|
tr > *:not(:first-child):last-child {
|
|
225
225
|
position: absolute;
|
|
226
|
-
left: calc(100% - var(--cta-width));
|
|
226
|
+
left: calc(100% - var(--cta-width) + 1px);
|
|
227
227
|
top: auto;
|
|
228
228
|
background: transparent;
|
|
229
229
|
width: var(--cta-width);
|
|
@@ -238,75 +238,76 @@ $selector: 'iam-table, iam-table-basic, iam-table-no-submit, iam-table-submit, i
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
+
@layer components {
|
|
242
|
+
:is(#{$selector}) {
|
|
243
|
+
@container (width > 23.4375em) {
|
|
244
|
+
.th--fixed {
|
|
245
|
+
/*
|
|
246
|
+
&:after {
|
|
247
|
+
top: auto;
|
|
248
|
+
left: 0;
|
|
249
|
+
content: '';
|
|
250
|
+
position: absolute;
|
|
251
|
+
width: 100%;
|
|
252
|
+
height: calc(var(--row-height) - 2px);
|
|
253
|
+
background: linear-gradient(90deg, var(--row-bg) calc(100% - 1.5rem), transparent 100%);
|
|
254
|
+
}
|
|
255
|
+
*/
|
|
256
|
+
}
|
|
241
257
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
.th--fixed {
|
|
245
|
-
/*
|
|
246
|
-
&:after {
|
|
247
|
-
top: auto;
|
|
248
|
-
left: 0;
|
|
249
|
-
content: '';
|
|
258
|
+
.th--fixed,
|
|
259
|
+
.td--fixed {
|
|
250
260
|
position: absolute;
|
|
251
|
-
|
|
261
|
+
left: auto;
|
|
262
|
+
top: auto;
|
|
263
|
+
z-index: 3;
|
|
264
|
+
padding: 0 0 0 0;
|
|
265
|
+
min-width: 3.375rem;
|
|
252
266
|
height: calc(var(--row-height) - 2px);
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
*/
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.th--fixed,
|
|
259
|
-
.td--fixed {
|
|
260
|
-
position: absolute;
|
|
261
|
-
left: auto;
|
|
262
|
-
top: auto;
|
|
263
|
-
z-index: 3;
|
|
264
|
-
padding: 0 0 0 0;
|
|
265
|
-
min-width: 3.375rem;
|
|
266
|
-
height: calc(var(--row-height) - 2px);
|
|
267
|
-
text-align: left;
|
|
268
|
-
background: var(--row-bg);
|
|
267
|
+
text-align: left;
|
|
268
|
+
background: var(--row-bg);
|
|
269
269
|
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
&:has([open]) {
|
|
271
|
+
z-index: 4;
|
|
272
|
+
}
|
|
272
273
|
}
|
|
273
|
-
}
|
|
274
274
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
.th--fixed:has(+ th:not(.th--fixed)),
|
|
276
|
+
.td--fixed:has(+ td:not(.td--fixed)) {
|
|
277
|
+
background: linear-gradient(90deg, var(--row-bg) calc(100% - 1rem), transparent 100%);
|
|
278
|
+
}
|
|
279
279
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
280
|
+
.th--fixed + th:not(.th--fixed),
|
|
281
|
+
.td--fixed + td:not(.td--fixed) {
|
|
282
|
+
padding-left: 3.375rem !important;
|
|
283
|
+
}
|
|
284
284
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
285
|
+
.th--fixed + .th--fixed,
|
|
286
|
+
.td--fixed + .td--fixed {
|
|
287
|
+
left: 3rem;
|
|
288
|
+
}
|
|
289
289
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
290
|
+
.th--fixed + .th--fixed + th:not(.th--fixed),
|
|
291
|
+
.td--fixed + .td--fixed + td:not(.td--fixed) {
|
|
292
|
+
padding-left: 6.375rem !important; /* 48 + 48 + 6 */
|
|
293
|
+
}
|
|
294
294
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
295
|
+
.th--fixed + .th--fixed + .th--fixed,
|
|
296
|
+
.td--fixed + .td--fixed + .td--fixed {
|
|
297
|
+
left: 6rem; /* 48 + 48 */
|
|
298
|
+
}
|
|
299
299
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
300
|
+
.th--fixed + .th--fixed + .th--fixed + th:not(.th--fixed),
|
|
301
|
+
.td--fixed + .td--fixed + .td--fixed + td:not(.td--fixed) {
|
|
302
|
+
padding-left: 9.375rem !important; /* 48 + 48 + 48 + 6 */
|
|
303
|
+
}
|
|
304
304
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
305
|
+
.dialog__wrapper {
|
|
306
|
+
z-index: 10;
|
|
307
|
+
}
|
|
308
|
+
.dialog__wrapper:has([open]) {
|
|
309
|
+
z-index: 20;
|
|
310
|
+
}
|
|
310
311
|
}
|
|
311
312
|
}
|
|
312
313
|
}
|
|
@@ -9,81 +9,39 @@
|
|
|
9
9
|
@layer components {
|
|
10
10
|
|
|
11
11
|
:host {
|
|
12
|
-
|
|
12
|
+
max-width: max-content;
|
|
13
|
+
display: inline-block;
|
|
13
14
|
position: relative;
|
|
14
|
-
overflow-anchor: none;
|
|
15
|
+
overflow-anchor: none;
|
|
15
16
|
cursor: pointer;
|
|
16
|
-
margin-right: 0.25rem;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
slot {
|
|
20
|
-
display: inline;
|
|
21
17
|
}
|
|
22
|
-
|
|
23
|
-
:host(:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
vertical-align: text-top;
|
|
29
|
-
margin-right: 0;
|
|
18
|
+
|
|
19
|
+
:host(:hover) {
|
|
20
|
+
|
|
21
|
+
text-decoration: underline;
|
|
22
|
+
text-underline-offset: 0.3em;
|
|
23
|
+
text-decoration-style: dashed;
|
|
30
24
|
}
|
|
31
25
|
|
|
32
26
|
.tooltip__anchor {
|
|
33
|
-
|
|
34
27
|
anchor-name: --anchor;
|
|
35
28
|
position: relative;
|
|
36
29
|
display: inline-block;
|
|
37
30
|
}
|
|
38
31
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
margin-bottom: calc(calc(1lh - 1rem) / 2);
|
|
46
|
-
vertical-align: bottom;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.tooltip__anchor:after {
|
|
50
|
-
font-family: "Font Awesome 7 Pro";
|
|
51
|
-
font-weight: 900;
|
|
52
|
-
content: "\?";
|
|
53
|
-
display: block;
|
|
54
|
-
margin: 0;
|
|
55
|
-
line-height: 1;
|
|
56
|
-
color: var(--colour-white);
|
|
57
|
-
position: absolute;
|
|
58
|
-
top: 50%;
|
|
59
|
-
left: 50%;
|
|
60
|
-
translate: -50% -50%;
|
|
61
|
-
font-size: 0.6em;
|
|
62
|
-
font-weight: bold;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
:host([data-type="info"]) .tooltip__anchor:after {
|
|
66
|
-
|
|
67
|
-
content: "\f129";
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
::slotted(i:first-child:last-child){
|
|
71
|
-
height: 1rem;
|
|
72
|
-
width: 1rem;
|
|
73
|
-
background-color: var(--icon-colour, var(--colour-info));
|
|
74
|
-
color: var(--colour-primary);
|
|
75
|
-
font-size: 0.6em;
|
|
76
|
-
line-height: 1rem!important;
|
|
77
|
-
text-align: center;
|
|
78
|
-
border-radius: 50%;
|
|
32
|
+
::slotted([slot="icon"]){
|
|
33
|
+
display: inline!important;
|
|
34
|
+
color: var(--icon-colour, var(--colour-info));
|
|
35
|
+
font-size: 1em;
|
|
36
|
+
width: 1em;
|
|
37
|
+
height: 1lh;
|
|
79
38
|
}
|
|
80
39
|
|
|
81
|
-
|
|
82
40
|
.tooltip__content {
|
|
83
41
|
position: fixed;
|
|
84
42
|
position-anchor: --anchor;
|
|
85
43
|
position-area: center end;
|
|
86
|
-
position-try-fallbacks:
|
|
44
|
+
position-try-fallbacks: bottom span-all, top span-all, start;
|
|
87
45
|
|
|
88
46
|
container-type: anchored;
|
|
89
47
|
max-width: 16.875rem; /* 270 */
|
|
@@ -107,14 +65,14 @@
|
|
|
107
65
|
}
|
|
108
66
|
|
|
109
67
|
@media screen and (min-width: 62em) {
|
|
110
|
-
max-width: 22.5rem;
|
|
68
|
+
max-width: 22.5rem; /* 360 */
|
|
111
69
|
}
|
|
112
70
|
|
|
113
71
|
&::after {
|
|
114
72
|
content: '';
|
|
115
73
|
position: absolute;
|
|
116
74
|
bottom: 50%;
|
|
117
|
-
left: -0.45rem;
|
|
75
|
+
left: -0.45rem;
|
|
118
76
|
transform: translate(-50%, 0);
|
|
119
77
|
border-width: 0.5rem;
|
|
120
78
|
border-style: solid;
|
|
@@ -122,27 +80,24 @@
|
|
|
122
80
|
margin-bottom: -0.5rem;
|
|
123
81
|
|
|
124
82
|
@container anchored(fallback: top span-all) {
|
|
125
|
-
|
|
126
|
-
left: 50%;
|
|
83
|
+
left: 50%;
|
|
127
84
|
bottom: auto;
|
|
128
85
|
top: 100%;
|
|
129
86
|
border-color: var(--colour-primary) transparent transparent transparent;
|
|
130
87
|
margin-bottom: -1px;
|
|
131
88
|
}
|
|
132
|
-
|
|
133
|
-
@container anchored(fallback: bottom span-all) {
|
|
134
89
|
|
|
90
|
+
@container anchored(fallback: bottom span-all) {
|
|
135
91
|
top: auto;
|
|
136
92
|
bottom: 100%;
|
|
137
|
-
left: 50%;
|
|
93
|
+
left: 50%;
|
|
138
94
|
border-color: transparent transparent var(--colour-primary) transparent;
|
|
139
95
|
margin-bottom: -1px;
|
|
140
96
|
}
|
|
141
|
-
|
|
142
|
-
@container anchored(fallback: start) {
|
|
143
97
|
|
|
98
|
+
@container anchored(fallback: start) {
|
|
144
99
|
display: none;
|
|
145
100
|
}
|
|
146
101
|
}
|
|
147
102
|
}
|
|
148
|
-
}
|
|
103
|
+
}
|
|
@@ -14,7 +14,7 @@ class iamHeader extends HTMLElement {
|
|
|
14
14
|
? document.body.getAttribute('data-assets-location')
|
|
15
15
|
: '/assets';
|
|
16
16
|
|
|
17
|
-
const loadCSS = `@import "${assetLocation}/css/components/header.css";`;
|
|
17
|
+
const loadCSS = `@import "${assetLocation}/css/components/header.component.css";`;
|
|
18
18
|
|
|
19
19
|
const template = document.createElement('template');
|
|
20
20
|
template.innerHTML = /*HTML*/`
|
|
@@ -18,9 +18,10 @@ class iamTooltip extends HTMLElement {
|
|
|
18
18
|
<style>
|
|
19
19
|
${loadCSS}
|
|
20
20
|
</style>
|
|
21
|
-
<slot></slot>
|
|
22
21
|
<div class="tooltip__anchor">
|
|
22
|
+
<slot name="icon"></slot>
|
|
23
23
|
</div>
|
|
24
|
+
<slot></slot>
|
|
24
25
|
<div class="tooltip__content" id="tooltip"></div>
|
|
25
26
|
`;
|
|
26
27
|
|
|
@@ -33,6 +34,15 @@ class iamTooltip extends HTMLElement {
|
|
|
33
34
|
const contentWrapper = this.shadowRoot?.querySelector('.tooltip__content');
|
|
34
35
|
const anchor = this.shadowRoot?.querySelector('.tooltip__anchor');
|
|
35
36
|
|
|
37
|
+
|
|
38
|
+
// #region Set default icon
|
|
39
|
+
|
|
40
|
+
if(!this.querySelector('[slot="icon"]')){
|
|
41
|
+
|
|
42
|
+
this.insertAdjacentHTML('afterbegin',`<i class="fa-solid fa-circle-${this.hasAttribute('data-type') && this.getAttribute('data-type') == "info" ? "info" : "question"}" slot="icon"></i>`);
|
|
43
|
+
}
|
|
44
|
+
// #endregion
|
|
45
|
+
|
|
36
46
|
if(this.hasAttribute('data-heading'))
|
|
37
47
|
contentWrapper?.innerHTML += `<strong>${this.getAttribute('data-heading')}</strong>`;
|
|
38
48
|
|