@abgov/react-components 4.15.0-alpha.4 → 4.15.0-alpha.6
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/package.json +1 -1
- package/react-components.esm.js +38 -35
- package/react-components.umd.js +38 -35
package/package.json
CHANGED
package/react-components.esm.js
CHANGED
|
@@ -98,10 +98,11 @@ $$.fragment&&$$.fragment.l(nodes);nodes.forEach(detach);}else {// eslint-disable
|
|
|
98
98
|
$$.fragment&&$$.fragment.c();}if(options.intro)transition_in(component.$$.fragment);mount_component(component,options.target,options.anchor,options.customElement);flush();}set_current_component(parent_component);}let SvelteElement;if(typeof HTMLElement==='function'){SvelteElement=class extends HTMLElement{constructor(){super();this.attachShadow({mode:'open'});}connectedCallback(){const{on_mount}=this.$$;this.$$.on_disconnect=on_mount.map(run).filter(is_function);// @ts-ignore todo: improve typings
|
|
99
99
|
for(const key in this.$$.slotted){// @ts-ignore todo: improve typings
|
|
100
100
|
this.appendChild(this.$$.slotted[key]);}}attributeChangedCallback(attr,_oldValue,newValue){this[attr]=newValue;}disconnectedCallback(){run_all(this.$$.on_disconnect);}$destroy(){destroy_component(this,1);this.$destroy=noop;}$on(type,callback){// TODO should this delegate to addEventListener?
|
|
101
|
-
if(!is_function(callback)){return noop;}const callbacks=this.$$.callbacks[type]||(this.$$.callbacks[type]=[]);callbacks.push(callback);return ()=>{const index=callbacks.indexOf(callback);if(index!==-1)callbacks.splice(index,1);};}$set($$props){if(this.$$set&&!is_empty($$props)){this.$$.skip_bound=true;this.$$set($$props);this.$$.skip_bound=false;}}};}const conversions={"0":"none","1":"3xs","2":"2xs","3":"xs","4":"s","5":"m","6":"l","7":"xl","8":"2xl","9":"3xl","10":"4xl"};function convertSpacing(size){if(!Number.isInteger(+size)){return size;}return conversions[size]||"";}function calculateMargin(mt,mr,mb,ml){mt=convertSpacing(mt);mb=convertSpacing(mb);ml=convertSpacing(ml);mr=convertSpacing(mr);return [mt&&`margin-top:var(--goa-space-${mt});`,mr&&`margin-right:var(--goa-space-${mr});`,mb&&`margin-bottom:var(--goa-space-${mb});`,ml&&`margin-left:var(--goa-space-${ml});`].join(" ");}function injectCss(el,rootSelector,css,media){const style=document.createElement("style");const _css=Object.entries(css).map(entry=>`${entry[0]}: ${entry[1]};`).join(" ");if(media){style.innerHTML=`@media (${media}) { ${rootSelector} {${_css}} }`;}else {style.innerHTML=`${rootSelector} {${_css}}`;}el.appendChild(style);}function toBoolean(value){if(value==="false"){return false;}if(value===""){return true;}return !!value;}function fromBoolean(value){return value?"true":"false";}function validateRequired(componentName,props){Object.entries(props).forEach(prop=>{if(!prop[1]){console.warn(`${componentName}: ${prop[0]} is required`);}});}function typeValidator(message,values,required=false){const validator=value=>{if(!required&&!value){return;}if(!values.includes(value)){console.error(`[${value}] is an invalid ${message.toLowerCase()}`);}};return [values,validator];}function getTimestamp(val){const months=["January","February","March","April","May","June","July","August","September","October","November","December"];const now=val||new Date();const hour24=now.getHours();const min0=now.getMinutes();const date=now.getDate();const month=months[now.getMonth()];const year=now.getFullYear();const hour=hour24===0&&12||hour24>12&&hour24-12||hour24;const meridium=hour24===0&&"AM"||hour24>=12&&"PM"||"AM";const min=min0<10&&`0${min0}`||min0;const ordinal=date%10===1&&date!==11&&"st"||date%10===2&&date!==12&&"nd"||date%10===3&&date!==13&&"rd"||"th";return `${month} ${date}${ordinal} ${year}, ${hour}:${min} ${meridium}`;}function cssVar(name,value){return value?`${name}: ${value};`:"";}/* libs/web-components/src/components/accordion/Accordion.svelte generated by Svelte v3.59.2 */function create_fragment$Z(ctx){let div3;let details;let summary;let goa_icon;let goa_icon_fillcolor_value;let t0;let div1;let span0;let t1;let span0_class_value;let span0_data_testid_value;let t2;let span1;let t3;let t4;let div0;let summary_class_value;let t5;let div2;let div3_style_value;let mounted;let dispose;return {c(){div3=element("div");details=element("details");summary=element("summary");goa_icon=element("goa-icon");t0=space();div1=element("div");span0=element("span");t1=text(/*heading*/ctx[0]);t2=space();span1=element("span");t3=text(/*secondarytext*/ctx[1]);t4=space();div0=element("div");div0.innerHTML=`<slot name="headingcontent"></slot>`;t5=space();div2=element("div");div2.innerHTML=`<slot></slot>`;this.c=noop;set_custom_element_data(goa_icon,"type","chevron-forward");set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value=/*_hovering*/ctx[8]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)");attr(span0,"class",span0_class_value="heading heading-"+/*headingsize*/ctx[2]);attr(span0,"data-testid",span0_data_testid_value=`${/*testid*/ctx[3]}-heading`);attr(span1,"class","secondary-text");attr(div0,"class","heading-content");attr(div1,"class","title");attr(summary,"class",summary_class_value=`container-${/*headingsize*/ctx[2]}`);attr(div2,"class","content");details.open=/*isOpen*/ctx[
|
|
101
|
+
if(!is_function(callback)){return noop;}const callbacks=this.$$.callbacks[type]||(this.$$.callbacks[type]=[]);callbacks.push(callback);return ()=>{const index=callbacks.indexOf(callback);if(index!==-1)callbacks.splice(index,1);};}$set($$props){if(this.$$set&&!is_empty($$props)){this.$$.skip_bound=true;this.$$set($$props);this.$$.skip_bound=false;}}};}const conversions={"0":"none","1":"3xs","2":"2xs","3":"xs","4":"s","5":"m","6":"l","7":"xl","8":"2xl","9":"3xl","10":"4xl"};function convertSpacing(size){if(!Number.isInteger(+size)){return size;}return conversions[size]||"";}function calculateMargin(mt,mr,mb,ml){mt=convertSpacing(mt);mb=convertSpacing(mb);ml=convertSpacing(ml);mr=convertSpacing(mr);return [mt&&`margin-top:var(--goa-space-${mt});`,mr&&`margin-right:var(--goa-space-${mr});`,mb&&`margin-bottom:var(--goa-space-${mb});`,ml&&`margin-left:var(--goa-space-${ml});`].join(" ");}function injectCss(el,rootSelector,css,media){const style=document.createElement("style");const _css=Object.entries(css).map(entry=>`${entry[0]}: ${entry[1]};`).join(" ");if(media){style.innerHTML=`@media (${media}) { ${rootSelector} {${_css}} }`;}else {style.innerHTML=`${rootSelector} {${_css}}`;}el.appendChild(style);}function toBoolean(value){if(value==="false"){return false;}if(value===""){return true;}return !!value;}function fromBoolean(value){return value?"true":"false";}function validateRequired(componentName,props){Object.entries(props).forEach(prop=>{if(!prop[1]){console.warn(`${componentName}: ${prop[0]} is required`);}});}function typeValidator(message,values,required=false){const validator=value=>{if(!required&&!value){return;}if(!values.includes(value)){console.error(`[${value}] is an invalid ${message.toLowerCase()}`);}};return [values,validator];}function getTimestamp(val){const months=["January","February","March","April","May","June","July","August","September","October","November","December"];const now=val||new Date();const hour24=now.getHours();const min0=now.getMinutes();const date=now.getDate();const month=months[now.getMonth()];const year=now.getFullYear();const hour=hour24===0&&12||hour24>12&&hour24-12||hour24;const meridium=hour24===0&&"AM"||hour24>=12&&"PM"||"AM";const min=min0<10&&`0${min0}`||min0;const ordinal=date%10===1&&date!==11&&"st"||date%10===2&&date!==12&&"nd"||date%10===3&&date!==13&&"rd"||"th";return `${month} ${date}${ordinal} ${year}, ${hour}:${min} ${meridium}`;}function cssVar(name,value){return value?`${name}: ${value};`:"";}/* libs/web-components/src/components/accordion/Accordion.svelte generated by Svelte v3.59.2 */function create_fragment$Z(ctx){let div3;let details;let summary;let goa_icon;let goa_icon_fillcolor_value;let t0;let div1;let span0;let t1;let span0_class_value;let span0_data_testid_value;let t2;let span1;let t3;let t4;let div0;let summary_class_value;let t5;let div2;let div3_style_value;let mounted;let dispose;return {c(){div3=element("div");details=element("details");summary=element("summary");goa_icon=element("goa-icon");t0=space();div1=element("div");span0=element("span");t1=text(/*heading*/ctx[0]);t2=space();span1=element("span");t3=text(/*secondarytext*/ctx[1]);t4=space();div0=element("div");div0.innerHTML=`<slot name="headingcontent"></slot>`;t5=space();div2=element("div");div2.innerHTML=`<slot></slot>`;this.c=noop;set_custom_element_data(goa_icon,"type","chevron-forward");set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value=/*_hovering*/ctx[8]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)");attr(span0,"class",span0_class_value="heading heading-"+/*headingsize*/ctx[2]);attr(span0,"data-testid",span0_data_testid_value=`${/*testid*/ctx[3]}-heading`);attr(span1,"class","secondary-text");attr(div0,"class","heading-content");toggle_class(div0,"heading-content-top",/*_headingContentSlotChildren*/ctx[10].length);attr(div1,"class","title");attr(summary,"class",summary_class_value=`container-${/*headingsize*/ctx[2]}`);attr(div2,"class","content");details.open=/*isOpen*/ctx[11];attr(div3,"style",div3_style_value=calculateMargin(/*mt*/ctx[4],/*mr*/ctx[5],/*mb*/ctx[6],/*ml*/ctx[7]));attr(div3,"class",`
|
|
102
102
|
goa-accordion
|
|
103
|
-
`);attr(div3,"data-testid",/*testid*/ctx[3]);},m(target,anchor){insert(target,div3,anchor);append(div3,details);append(details,summary);append(summary,goa_icon);append(summary,t0);append(summary,div1);append(div1,span0);append(span0,t1);append(div1,t2);append(div1,span1);append(span1,t3);append(div1,t4);append(div1,div0);append(details,t5);append(details,div2);if(!mounted){dispose=[listen(summary,"mouseover",/*mouseover_handler*/ctx[
|
|
104
|
-
|
|
103
|
+
`);attr(div3,"data-testid",/*testid*/ctx[3]);},m(target,anchor){insert(target,div3,anchor);append(div3,details);append(details,summary);append(summary,goa_icon);append(summary,t0);append(summary,div1);append(div1,span0);append(span0,t1);append(div1,t2);append(div1,span1);append(span1,t3);append(div1,t4);append(div1,div0);/*div1_binding*/ctx[13](div1);append(details,t5);append(details,div2);if(!mounted){dispose=[listen(summary,"mouseover",/*mouseover_handler*/ctx[14]),listen(summary,"mouseout",/*mouseout_handler*/ctx[15]),listen(summary,"focus",/*focus_handler*/ctx[16]),listen(summary,"blur",/*blur_handler*/ctx[17])];mounted=true;}},p(ctx,[dirty]){if(dirty&/*_hovering*/256&&goa_icon_fillcolor_value!==(goa_icon_fillcolor_value=/*_hovering*/ctx[8]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)")){set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value);}if(dirty&/*heading*/1)set_data(t1,/*heading*/ctx[0]);if(dirty&/*headingsize*/4&&span0_class_value!==(span0_class_value="heading heading-"+/*headingsize*/ctx[2])){attr(span0,"class",span0_class_value);}if(dirty&/*testid*/8&&span0_data_testid_value!==(span0_data_testid_value=`${/*testid*/ctx[3]}-heading`)){attr(span0,"data-testid",span0_data_testid_value);}if(dirty&/*secondarytext*/2)set_data(t3,/*secondarytext*/ctx[1]);if(dirty&/*_headingContentSlotChildren*/1024){toggle_class(div0,"heading-content-top",/*_headingContentSlotChildren*/ctx[10].length);}if(dirty&/*headingsize*/4&&summary_class_value!==(summary_class_value=`container-${/*headingsize*/ctx[2]}`)){attr(summary,"class",summary_class_value);}if(dirty&/*isOpen*/2048){details.open=/*isOpen*/ctx[11];}if(dirty&/*mt, mr, mb, ml*/240&&div3_style_value!==(div3_style_value=calculateMargin(/*mt*/ctx[4],/*mr*/ctx[5],/*mb*/ctx[6],/*ml*/ctx[7]))){attr(div3,"style",div3_style_value);}if(dirty&/*testid*/8){attr(div3,"data-testid",/*testid*/ctx[3]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div3);/*div1_binding*/ctx[13](null);mounted=false;run_all(dispose);}};}function instance$T($$self,$$props,$$invalidate){let isOpen;const[HeadingSizes,validateHeadingSize]=typeValidator("Accordion heading size",["small","medium"]);let{open="false"}=$$props;let{heading=""}=$$props;let{secondarytext=""}=$$props;let{headingsize="small"}=$$props;let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb="xs"}=$$props;let{ml=null}=$$props;let _hovering=false;let _titleEl=null;let _headingContentSlotChildren=[];onMount(()=>{validateRequired("GoAAccordion",{heading});validateHeadingSize(headingsize);$$invalidate(10,_headingContentSlotChildren=getChildren());});function getChildren(){if(_titleEl){const slot=_titleEl.querySelector("slot");if(slot){return [...slot.assignedElements()];}else {return [..._titleEl.children];// unit tests
|
|
104
|
+
}}return [];}function div1_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_titleEl=$$value;$$invalidate(9,_titleEl);});}const mouseover_handler=()=>$$invalidate(8,_hovering=true);const mouseout_handler=()=>$$invalidate(8,_hovering=false);const focus_handler=()=>$$invalidate(8,_hovering=false);const blur_handler=()=>$$invalidate(8,_hovering=false);$$self.$$set=$$props=>{if('open'in $$props)$$invalidate(12,open=$$props.open);if('heading'in $$props)$$invalidate(0,heading=$$props.heading);if('secondarytext'in $$props)$$invalidate(1,secondarytext=$$props.secondarytext);if('headingsize'in $$props)$$invalidate(2,headingsize=$$props.headingsize);if('testid'in $$props)$$invalidate(3,testid=$$props.testid);if('mt'in $$props)$$invalidate(4,mt=$$props.mt);if('mr'in $$props)$$invalidate(5,mr=$$props.mr);if('mb'in $$props)$$invalidate(6,mb=$$props.mb);if('ml'in $$props)$$invalidate(7,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*open*/4096){$$invalidate(11,isOpen=toBoolean(open));}};return [heading,secondarytext,headingsize,testid,mt,mr,mb,ml,_hovering,_titleEl,_headingContentSlotChildren,isOpen,open,div1_binding,mouseover_handler,mouseout_handler,focus_handler,blur_handler];}class Accordion extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4)}.goa-accordion,.goa-accordion *{box-sizing:border-box}summary{min-height:3.5rem;border-width:var(--goa-border-width-s);border-style:solid;border-radius:var(--goa-border-radius-m);background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);color:var(--goa-color-text-default);;;padding:0.875rem 1rem 0 0;cursor:pointer;list-style:none;display:flex;align-items:flex-start;position:relative}summary.container-medium{min-height:4rem}summary::marker,summary::-webkit-details-marker{display:none}summary .title{display:flex;align-items:center;flex:1}.title span{padding-bottom:var(--goa-space-3xs, 0)}summary .heading{font:var(--goa-typography-heading-s);padding-right:1rem}summary .secondary-text{font:var(--goa-typography-body-s);line-height:1.5rem;padding-right:1rem}summary .heading-content{flex:1
|
|
105
|
+
}.content{border-bottom:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-left:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-right:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-bottom-left-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m);padding:1.5rem;padding-left:3.5rem;padding-right:2rem}.content ::slotted(p:last-child){margin-bottom:0 !important}summary goa-icon{padding:0.125rem 1rem}summary.container-medium goa-icon{padding:0.375rem 1rem}details[open] goa-icon{transform:rotate(90deg)}details[open] summary{border-bottom-left-radius:var(--goa-border-radius-none);border-bottom-right-radius:var(--goa-border-radius-none)}summary:hover{background-color:var(--goa-color-greyscale-200)}summary:focus,summary:active{background-color:var(--goa-color-greyscale-100);outline:none}summary:active::before,summary:focus::before{content:"";position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:var(--goa-border-width-l) solid var(--goa-color-interactive-focus);border-radius:4px}summary .heading.heading-medium{line-height:2rem;font:var(--goa-typography-heading-m)}@media(max-width: 640px){summary{align-items:flex-start}summary .title{flex-direction:column;align-items:flex-start;padding-bottom:0.875rem}summary .title span{padding-bottom:0}summary .heading-content.heading-content-top{margin-top:var(--goa-space-xs)}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$T,create_fragment$Z,safe_not_equal,{open:12,heading:0,secondarytext:1,headingsize:2,testid:3,mt:4,mr:5,mb:6,ml:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["open","heading","secondarytext","headingsize","testid","mt","mr","mb","ml"];}get open(){return this.$$.ctx[12];}set open(open){this.$$set({open});flush();}get heading(){return this.$$.ctx[0];}set heading(heading){this.$$set({heading});flush();}get secondarytext(){return this.$$.ctx[1];}set secondarytext(secondarytext){this.$$set({secondarytext});flush();}get headingsize(){return this.$$.ctx[2];}set headingsize(headingsize){this.$$set({headingsize});flush();}get testid(){return this.$$.ctx[3];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[4];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[5];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[6];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[7];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-accordion",Accordion);/* libs/web-components/src/components/app-header/AppHeader.svelte generated by Svelte v3.59.2 */const{window:window_1$2}=globals;function create_else_block$d(ctx){let div;let img0;let img0_src_value;let t0;let img1;let img1_src_value;let t1;let if_block=/*heading*/ctx[0]&&create_if_block_7$1(ctx);return {c(){div=element("div");img0=element("img");t0=space();img1=element("img");t1=space();if(if_block)if_block.c();attr(img0,"alt","GoA Logo");attr(img0,"class","image-mobile");if(!src_url_equal(img0.src,img0_src_value=_mobileLogo))attr(img0,"src",img0_src_value);attr(img1,"alt","GoA Logo");attr(img1,"class","image-desktop");if(!src_url_equal(img1.src,img1_src_value=_desktopLogo))attr(img1,"src",img1_src_value);attr(div,"class","header-logo-title-area");},m(target,anchor){insert(target,div,anchor);append(div,img0);append(div,t0);append(div,img1);append(div,t1);if(if_block)if_block.m(div,null);},p(ctx,dirty){if(/*heading*/ctx[0]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_7$1(ctx);if_block.c();if_block.m(div,null);}}else if(if_block){if_block.d(1);if_block=null;}},d(detaching){if(detaching)detach(div);if(if_block)if_block.d();}};}// (89:4) {#if url}
|
|
105
106
|
function create_if_block_5$1(ctx){let a;let img0;let img0_src_value;let t0;let img1;let img1_src_value;let t1;let if_block=/*heading*/ctx[0]&&create_if_block_6$1(ctx);return {c(){a=element("a");img0=element("img");t0=space();img1=element("img");t1=space();if(if_block)if_block.c();attr(img0,"alt","GoA Logo");attr(img0,"class","image-mobile");if(!src_url_equal(img0.src,img0_src_value=_mobileLogo))attr(img0,"src",img0_src_value);attr(img1,"alt","GoA Logo");attr(img1,"class","image-desktop");if(!src_url_equal(img1.src,img1_src_value=_desktopLogo))attr(img1,"src",img1_src_value);attr(a,"href",/*url*/ctx[1]);attr(a,"class","header-logo-title-area");attr(a,"data-testid","url");},m(target,anchor){insert(target,a,anchor);append(a,img0);append(a,t0);append(a,img1);append(a,t1);if(if_block)if_block.m(a,null);},p(ctx,dirty){if(/*heading*/ctx[0]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_6$1(ctx);if_block.c();if_block.m(a,null);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*url*/2){attr(a,"href",/*url*/ctx[1]);}},d(detaching){if(detaching)detach(a);if(if_block)if_block.d();}};}// (101:8) {#if heading}
|
|
106
107
|
function create_if_block_7$1(ctx){let span;let t;return {c(){span=element("span");t=text(/*heading*/ctx[0]);attr(span,"data-testid","title");attr(span,"class","title");},m(target,anchor){insert(target,span,anchor);append(span,t);},p(ctx,dirty){if(dirty&/*heading*/1)set_data(t,/*heading*/ctx[0]);},d(detaching){if(detaching)detach(span);}};}// (93:8) {#if heading}
|
|
107
108
|
function create_if_block_6$1(ctx){let span;let t;return {c(){span=element("span");t=text(/*heading*/ctx[0]);attr(span,"data-testid","title");attr(span,"class","title");},m(target,anchor){insert(target,span,anchor);append(span,t);},p(ctx,dirty){if(dirty&/*heading*/1)set_data(t,/*heading*/ctx[0]);},d(detaching){if(detaching)detach(span);}};}// (108:4) {#if _showToggleMenu && _mobile}
|
|
@@ -164,34 +165,34 @@ function create_if_block_2$b(ctx){let div;let t;return {c(){div=element("div");t
|
|
|
164
165
|
goa-container--${/*type*/ctx[0]}
|
|
165
166
|
padding--${/*padding*/ctx[2]}
|
|
166
167
|
accent--${/*accent*/ctx[1]}
|
|
167
|
-
`)){attr(div3,"class",div3_class_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div3);}};}function instance$H($$self,$$props,$$invalidate){const[Types,validateType]=typeValidator("Container type",["interactive","info","error","success","important","non-interactive"]);const[Accents,validateAccent]=typeValidator("Container accent",["thick","thin","filled"]);const[Paddings,validatePadding]=typeValidator("Container padding",["relaxed","compact"]);let{type="interactive"}=$$props;let{accent="filled"}=$$props;let{padding="relaxed"}=$$props;let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb="m"}=$$props;let{ml=null}=$$props;onMount(()=>{validateType(type);validateAccent(accent);validatePadding(padding);});$$self.$$set=$$props=>{if('type'in $$props)$$invalidate(0,type=$$props.type);if('accent'in $$props)$$invalidate(1,accent=$$props.accent);if('padding'in $$props)$$invalidate(2,padding=$$props.padding);if('testid'in $$props)$$invalidate(3,testid=$$props.testid);if('mt'in $$props)$$invalidate(4,mt=$$props.mt);if('mr'in $$props)$$invalidate(5,mr=$$props.mr);if('mb'in $$props)$$invalidate(6,mb=$$props.mb);if('ml'in $$props)$$invalidate(7,ml=$$props.ml);};return [type,accent,padding,testid,mt,mr,mb,ml];}class Container extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4);display:flex;flex:1 1 auto}.goa-container{box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column}.goa-container *{box-sizing:border-box}header{display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:var(--goa-font-size-4);border-width:1px;border-style:solid;border-top-left-radius:var(--goa-border-radius-m);border-top-right-radius:var(--goa-border-radius-m)}.content{border-bottom:1px solid var(--goa-color-greyscale-200);border-left:1px solid var(--goa-color-greyscale-200);border-right:1px solid var(--goa-color-greyscale-200);border-bottom-left-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m);display:flex;flex:1 1 auto;flex-direction:column}.content ::slotted(p:last-child){margin-bottom:0 !important}.goa-container--non-interactive.accent--filled .content{border-color:var(--goa-color-greyscale-200);background-color:var(--goa-color-greyscale-100)}.goa-container--important.accent--filled .content{border-color:var(--goa-color-warning-default);background-color:var(--goa-color-warning-background)}.goa-container--error.accent--filled .content{border-color:var(--goa-color-emergency-default);background-color:var(--goa-color-emergency-background)}.goa-container--success.accent--filled .content{border-color:var(--goa-color-success-default);background-color:var(--goa-color-success-background)}.goa-container--info.accent--filled .content{border-color:var(--goa-color-info-default);background-color:var(--goa-color-info-background)}.title,.actions{padding:0.5rem 0}.padding--relaxed header{padding:0 1.5rem}.padding--relaxed .content{padding:1.5rem}.padding--compact header,.padding--compact .content{padding:0 1rem}.padding--compact header{padding:0 1rem}.padding--compact .content{padding:1rem}@media screen and (max-width: 480px){.padding--relaxed header{padding:0 1rem}.padding--relaxed .content{padding:1rem}}.goa-container--non-interactive header{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);color:var(--goa-color-greyscale-black)}.goa-container--interactive header{background-color:var(--goa-color-brand-default);border-color:var(--goa-color-brand-default);color:var(--goa-color-greyscale-white)}.goa-container--info header{background-color:var(--goa-color-info-default);border-color:var(--goa-color-info-default);color:var(--goa-color-greyscale-white)}.goa-container--error header{background-color:var(--goa-color-emergency-default);border-color:var(--goa-color-emergency-default);color:var(--goa-color-greyscale-white)}.goa-container--success header{background-color:var(--goa-color-success-default);border-color:var(--goa-color-success-default);color:var(--goa-color-greyscale-white)}.goa-container--important header{background-color:var(--goa-color-warning-default);border-color:var(--goa-color-warning-default);color:var(--goa-color-greyscale-white)}.heading--thick{padding:0.5rem 1.5rem;max-height:3rem;min-height:1rem}.heading--thick .title{line-height:2rem}.heading--thin{height:0.5rem}.heading--filled{display:none}.heading--filled~.content{border-top:1px solid var(--goa-color-greyscale-200);border-top-left-radius:var(--goa-border-radius-m);border-top-right-radius:var(--goa-border-radius-m)}.heading--thin .title,.heading--thin .actions{display:none}.actions{display:flex;align-items:center}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$H,create_fragment$K,safe_not_equal,{type:0,accent:1,padding:2,testid:3,mt:4,mr:5,mb:6,ml:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["type","accent","padding","testid","mt","mr","mb","ml"];}get type(){return this.$$.ctx[0];}set type(type){this.$$set({type});flush();}get accent(){return this.$$.ctx[1];}set accent(accent){this.$$set({accent});flush();}get padding(){return this.$$.ctx[2];}set padding(padding){this.$$set({padding});flush();}get testid(){return this.$$.ctx[3];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[4];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[5];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[6];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[7];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-container",Container);/* libs/web-components/src/components/details/Details.svelte generated by Svelte v3.59.2 */function create_fragment$J(ctx){let details;let summary;let goa_icon;let goa_icon_fillcolor_value;let t0;let span;let t1;let t2;let div;let details_style_value;let mounted;let dispose;return {c(){details=element("details");summary=element("summary");goa_icon=element("goa-icon");t0=space();span=element("span");t1=text(/*heading*/ctx[1]);t2=space();div=element("div");div.innerHTML=`<slot></slot>`;this.c=noop;set_custom_element_data(goa_icon,"mt","1");set_custom_element_data(goa_icon,"mr","2");set_custom_element_data(goa_icon,"type","chevron-forward");set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value=/*_isMouseOver*/ctx[6]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)");attr(div,"class","content");details.open=/*_isOpen*/ctx[9];attr(details,"style",details_style_value=calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5]));},m(target,anchor){insert(target,details,anchor);append(details,summary);append(summary,goa_icon);append(summary,t0);append(summary,span);append(span,t1);/*summary_binding*/ctx[10](summary);append(details,t2);append(details,div);/*details_binding*/ctx[11](details);if(!mounted){dispose=listen(details,"toggle",/*toggle_handler*/ctx[12]);mounted=true;}},p(ctx,[dirty]){if(dirty&/*_isMouseOver*/64&&goa_icon_fillcolor_value!==(goa_icon_fillcolor_value=/*_isMouseOver*/ctx[6]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)")){set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value);}if(dirty&/*heading*/2)set_data(t1,/*heading*/ctx[1]);if(dirty&/*_isOpen*/512){details.open=/*_isOpen*/ctx[9];}if(dirty&/*mt, mr, mb, ml*/60&&details_style_value!==(details_style_value=calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5]))){attr(details,"style",details_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(details);/*summary_binding*/ctx[10](null);/*details_binding*/ctx[11](null);mounted=false;dispose();}};}function instance$G($$self,$$props,$$invalidate){let _isOpen;let{heading}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{open="false"}=$$props;let _isMouseOver=false;let _summaryEl;let _detailsEl;onMount(()=>{validateRequired("Details",{heading});_summaryEl.addEventListener("mouseover",()=>{$$invalidate(6,_isMouseOver=true);});_summaryEl.addEventListener("mouseout",()=>{$$invalidate(6,_isMouseOver=false);});});function summary_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_summaryEl=$$value;$$invalidate(7,_summaryEl);});}function details_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_detailsEl=$$value;$$invalidate(8,_detailsEl);});}const toggle_handler=({target})=>$$invalidate(0,open=`${target.open}`);$$self.$$set=$$props=>{if('heading'in $$props)$$invalidate(1,heading=$$props.heading);if('mt'in $$props)$$invalidate(2,mt=$$props.mt);if('mr'in $$props)$$invalidate(3,mr=$$props.mr);if('mb'in $$props)$$invalidate(4,mb=$$props.mb);if('ml'in $$props)$$invalidate(5,ml=$$props.ml);if('open'in $$props)$$invalidate(0,open=$$props.open);};$$self.$$.update=()=>{if($$self.$$.dirty&/*open*/1){$$invalidate(9,_isOpen=toBoolean(open));}};return [open,heading,mt,mr,mb,ml,_isMouseOver,_summaryEl,_detailsEl,_isOpen,summary_binding,details_binding,toggle_handler];}class Details extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{font-family:var(--goa-font-family-sans)}details{max-width:75ch;position:relative}details ::slotted(*){font:var(--goa-typography-body-m)}summary{padding:0.5rem;margin-bottom:0.5rem;cursor:pointer;list-style:none;display:flex;align-items:flex-start}goa-icon{position:absolute}details[open] goa-icon{transform:translateX(-1px) rotate(90deg);top:0.75rem}details summary::-webkit-details-marker{display:none}summary{border-radius:var(--goa-border-radius-m)}summary:focus,summary:active{outline:3px solid var(--goa-color-interactive-focus);border-radius:var(--goa-border-radius-m);color:var(--goa-color-interactive-hover);background-color:var(--goa-color-greyscale-100)}summary:hover{background-color:var(--goa-color-greyscale-100)}summary span{margin-left:2rem;text-decoration:underline;color:var(--goa-color-interactive-default);padding-bottom:var(--font-valign-fix);line-height:var(--goa-line-height-3)}summary:hover span{color:var(--goa-color-interactive-hover)}.content{border-left:4px solid var(--goa-color-greyscale-200);padding:1rem;margin-left:1.1rem;margin-bottom:var(--goa-space-s)}.content ::slotted(p:last-child){margin-bottom:0 !important}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$G,create_fragment$J,safe_not_equal,{heading:1,mt:2,mr:3,mb:4,ml:5,open:0},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["heading","mt","mr","mb","ml","open"];}get heading(){return this.$$.ctx[1];}set heading(heading){this.$$set({heading});flush();}get mt(){return this.$$.ctx[2];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[3];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[4];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[5];}set ml(ml){this.$$set({ml});flush();}get open(){return this.$$.ctx[0];}set open(open){this.$$set({open});flush();}}customElements.define("goa-details",Details);/* libs/web-components/src/components/divider/Divider.svelte generated by Svelte v3.59.2 */function create_fragment$I(ctx){let hr;let hr_style_value;return {c(){hr=element("hr");this.c=noop;attr(hr,"data-testid",/*testid*/ctx[0]);attr(hr,"style",hr_style_value=calculateMargin(/*mt*/ctx[1],/*mr*/ctx[2],/*mb*/ctx[3],/*ml*/ctx[4]));},m(target,anchor){insert(target,hr,anchor);},p(ctx,[dirty]){if(dirty&/*testid*/1){attr(hr,"data-testid",/*testid*/ctx[0]);}if(dirty&/*mt, mr, mb, ml*/30&&hr_style_value!==(hr_style_value=calculateMargin(/*mt*/ctx[1],/*mr*/ctx[2],/*mb*/ctx[3],/*ml*/ctx[4]))){attr(hr,"style",hr_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(hr);}};}function instance$F($$self,$$props,$$invalidate){let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;$$self.$$set=$$props=>{if('testid'in $$props)$$invalidate(0,testid=$$props.testid);if('mt'in $$props)$$invalidate(1,mt=$$props.mt);if('mr'in $$props)$$invalidate(2,mr=$$props.mr);if('mb'in $$props)$$invalidate(3,mb=$$props.mb);if('ml'in $$props)$$invalidate(4,ml=$$props.ml);};return [testid,mt,mr,mb,ml];}class Divider extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`hr{padding:0;margin:0;height:1px;background-color:var(--goa-color-greyscale-200);border:none}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$F,create_fragment$I,safe_not_equal,{testid:0,mt:1,mr:2,mb:3,ml:4},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["testid","mt","mr","mb","ml"];}get testid(){return this.$$.ctx[0];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[1];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[2];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[3];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[4];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-divider",Divider);/* libs/web-components/src/components/dropdown/Dropdown.svelte generated by Svelte v3.59.2 */function get_each_context_1(ctx,list,i){const child_ctx=ctx.slice();child_ctx[70]=list[i];child_ctx[74]=i;return child_ctx;}function get_each_context$7(ctx,list,i){const child_ctx=ctx.slice();child_ctx[70]=list[i];return child_ctx;}// (506:2) {:else}
|
|
168
|
-
function create_else_block$a(ctx){let slot;let t0;let goa_popover;let div;let t1;let input;let input_style_value;let input_aria_controls_value;let input_aria_label_value;let input_id_value;let input_aria_owns_value;let input_readonly_value;let t2;let t3;let div_style_value;let t4;let ul;let ul_id_value;let ul_aria_label_value;let ul_style_value;let goa_popover_width_value;let mounted;let dispose;let if_block0=/*leadingicon*/ctx[4]&&create_if_block_4$3(ctx);let if_block1=/*_inputValue*/ctx[16]&&/*_filterable*/ctx[
|
|
168
|
+
`)){attr(div3,"class",div3_class_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div3);}};}function instance$H($$self,$$props,$$invalidate){const[Types,validateType]=typeValidator("Container type",["interactive","info","error","success","important","non-interactive"]);const[Accents,validateAccent]=typeValidator("Container accent",["thick","thin","filled"]);const[Paddings,validatePadding]=typeValidator("Container padding",["relaxed","compact"]);let{type="interactive"}=$$props;let{accent="filled"}=$$props;let{padding="relaxed"}=$$props;let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb="m"}=$$props;let{ml=null}=$$props;onMount(()=>{validateType(type);validateAccent(accent);validatePadding(padding);});$$self.$$set=$$props=>{if('type'in $$props)$$invalidate(0,type=$$props.type);if('accent'in $$props)$$invalidate(1,accent=$$props.accent);if('padding'in $$props)$$invalidate(2,padding=$$props.padding);if('testid'in $$props)$$invalidate(3,testid=$$props.testid);if('mt'in $$props)$$invalidate(4,mt=$$props.mt);if('mr'in $$props)$$invalidate(5,mr=$$props.mr);if('mb'in $$props)$$invalidate(6,mb=$$props.mb);if('ml'in $$props)$$invalidate(7,ml=$$props.ml);};return [type,accent,padding,testid,mt,mr,mb,ml];}class Container extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4);display:flex;flex:1 1 auto}.goa-container{box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column}.goa-container *{box-sizing:border-box}header{display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:var(--goa-font-size-4);border-width:1px;border-style:solid;border-top-left-radius:var(--goa-border-radius-m);border-top-right-radius:var(--goa-border-radius-m)}.content{border-bottom:1px solid var(--goa-color-greyscale-200);border-left:1px solid var(--goa-color-greyscale-200);border-right:1px solid var(--goa-color-greyscale-200);border-bottom-left-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m);display:flex;flex:1 1 auto;flex-direction:column}.content ::slotted(p:last-child){margin-bottom:0 !important}.goa-container--non-interactive.accent--filled .content{border-color:var(--goa-color-greyscale-200);background-color:var(--goa-color-greyscale-100)}.goa-container--important.accent--filled .content{border-color:var(--goa-color-warning-default);background-color:var(--goa-color-warning-background)}.goa-container--error.accent--filled .content{border-color:var(--goa-color-emergency-default);background-color:var(--goa-color-emergency-background)}.goa-container--success.accent--filled .content{border-color:var(--goa-color-success-default);background-color:var(--goa-color-success-background)}.goa-container--info.accent--filled .content{border-color:var(--goa-color-info-default);background-color:var(--goa-color-info-background)}.title,.actions{padding:0.5rem 0}.padding--relaxed header{padding:0 1.5rem}.padding--relaxed .content{padding:1.5rem}.padding--compact header,.padding--compact .content{padding:0 1rem}.padding--compact header{padding:0 1rem}.padding--compact .content{padding:1rem}@media screen and (max-width: 480px){.padding--relaxed header{padding:0 1rem}.padding--relaxed .content{padding:1rem}}.goa-container--non-interactive header{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);color:var(--goa-color-greyscale-black)}.goa-container--interactive header{background-color:var(--goa-color-brand-default);border-color:var(--goa-color-brand-default);color:var(--goa-color-greyscale-white)}.goa-container--info header{background-color:var(--goa-color-info-default);border-color:var(--goa-color-info-default);color:var(--goa-color-greyscale-white)}.goa-container--error header{background-color:var(--goa-color-emergency-default);border-color:var(--goa-color-emergency-default);color:var(--goa-color-greyscale-white)}.goa-container--success header{background-color:var(--goa-color-success-default);border-color:var(--goa-color-success-default);color:var(--goa-color-greyscale-white)}.goa-container--important header{background-color:var(--goa-color-warning-default);border-color:var(--goa-color-warning-default);color:var(--goa-color-greyscale-white)}.heading--thick{padding:0.5rem 1.5rem;max-height:3rem;min-height:1rem}.heading--thick .title{line-height:2rem}.heading--thin{height:0.5rem}.heading--filled{display:none}.heading--filled~.content{border-top:1px solid var(--goa-color-greyscale-200);border-top-left-radius:var(--goa-border-radius-m);border-top-right-radius:var(--goa-border-radius-m)}.heading--thin .title,.heading--thin .actions{display:none}.actions{display:flex;align-items:center}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$H,create_fragment$K,safe_not_equal,{type:0,accent:1,padding:2,testid:3,mt:4,mr:5,mb:6,ml:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["type","accent","padding","testid","mt","mr","mb","ml"];}get type(){return this.$$.ctx[0];}set type(type){this.$$set({type});flush();}get accent(){return this.$$.ctx[1];}set accent(accent){this.$$set({accent});flush();}get padding(){return this.$$.ctx[2];}set padding(padding){this.$$set({padding});flush();}get testid(){return this.$$.ctx[3];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[4];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[5];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[6];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[7];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-container",Container);/* libs/web-components/src/components/details/Details.svelte generated by Svelte v3.59.2 */function create_fragment$J(ctx){let details;let summary;let goa_icon;let goa_icon_fillcolor_value;let t0;let span;let t1;let t2;let div;let details_style_value;let mounted;let dispose;return {c(){details=element("details");summary=element("summary");goa_icon=element("goa-icon");t0=space();span=element("span");t1=text(/*heading*/ctx[1]);t2=space();div=element("div");div.innerHTML=`<slot></slot>`;this.c=noop;set_custom_element_data(goa_icon,"mt","1");set_custom_element_data(goa_icon,"mr","2");set_custom_element_data(goa_icon,"type","chevron-forward");set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value=/*_isMouseOver*/ctx[6]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)");attr(div,"class","content");details.open=/*_isOpen*/ctx[9];attr(details,"style",details_style_value=calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5]));},m(target,anchor){insert(target,details,anchor);append(details,summary);append(summary,goa_icon);append(summary,t0);append(summary,span);append(span,t1);/*summary_binding*/ctx[10](summary);append(details,t2);append(details,div);/*details_binding*/ctx[11](details);if(!mounted){dispose=listen(details,"toggle",/*toggle_handler*/ctx[12]);mounted=true;}},p(ctx,[dirty]){if(dirty&/*_isMouseOver*/64&&goa_icon_fillcolor_value!==(goa_icon_fillcolor_value=/*_isMouseOver*/ctx[6]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)")){set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value);}if(dirty&/*heading*/2)set_data(t1,/*heading*/ctx[1]);if(dirty&/*_isOpen*/512){details.open=/*_isOpen*/ctx[9];}if(dirty&/*mt, mr, mb, ml*/60&&details_style_value!==(details_style_value=calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5]))){attr(details,"style",details_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(details);/*summary_binding*/ctx[10](null);/*details_binding*/ctx[11](null);mounted=false;dispose();}};}function instance$G($$self,$$props,$$invalidate){let _isOpen;let{heading}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{open="false"}=$$props;let _isMouseOver=false;let _summaryEl;let _detailsEl;onMount(()=>{validateRequired("Details",{heading});_summaryEl.addEventListener("mouseover",()=>{$$invalidate(6,_isMouseOver=true);});_summaryEl.addEventListener("mouseout",()=>{$$invalidate(6,_isMouseOver=false);});});function summary_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_summaryEl=$$value;$$invalidate(7,_summaryEl);});}function details_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_detailsEl=$$value;$$invalidate(8,_detailsEl);});}const toggle_handler=({target})=>$$invalidate(0,open=`${target.open}`);$$self.$$set=$$props=>{if('heading'in $$props)$$invalidate(1,heading=$$props.heading);if('mt'in $$props)$$invalidate(2,mt=$$props.mt);if('mr'in $$props)$$invalidate(3,mr=$$props.mr);if('mb'in $$props)$$invalidate(4,mb=$$props.mb);if('ml'in $$props)$$invalidate(5,ml=$$props.ml);if('open'in $$props)$$invalidate(0,open=$$props.open);};$$self.$$.update=()=>{if($$self.$$.dirty&/*open*/1){$$invalidate(9,_isOpen=toBoolean(open));}};return [open,heading,mt,mr,mb,ml,_isMouseOver,_summaryEl,_detailsEl,_isOpen,summary_binding,details_binding,toggle_handler];}class Details extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{font-family:var(--goa-font-family-sans)}details{max-width:75ch;position:relative}details ::slotted(*){font:var(--goa-typography-body-m)}summary{padding:0.5rem;margin-bottom:0.5rem;cursor:pointer;list-style:none;display:flex;align-items:flex-start}goa-icon{position:absolute}details[open] goa-icon{transform:translateX(-1px) rotate(90deg);top:0.75rem}details summary::-webkit-details-marker{display:none}summary{border-radius:var(--goa-border-radius-m)}summary:focus,summary:active{outline:3px solid var(--goa-color-interactive-focus);border-radius:var(--goa-border-radius-m);color:var(--goa-color-interactive-hover);background-color:var(--goa-color-greyscale-100)}summary:hover{background-color:var(--goa-color-greyscale-100)}summary span{margin-left:2rem;text-decoration:underline;color:var(--goa-color-interactive-default);padding-bottom:var(--font-valign-fix);line-height:var(--goa-line-height-3)}summary:hover span{color:var(--goa-color-interactive-hover)}.content{border-left:4px solid var(--goa-color-greyscale-200);padding:1rem;margin-left:1.1rem;margin-bottom:var(--goa-space-s)}.content ::slotted(p:last-child){margin-bottom:0 !important}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$G,create_fragment$J,safe_not_equal,{heading:1,mt:2,mr:3,mb:4,ml:5,open:0},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["heading","mt","mr","mb","ml","open"];}get heading(){return this.$$.ctx[1];}set heading(heading){this.$$set({heading});flush();}get mt(){return this.$$.ctx[2];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[3];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[4];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[5];}set ml(ml){this.$$set({ml});flush();}get open(){return this.$$.ctx[0];}set open(open){this.$$set({open});flush();}}customElements.define("goa-details",Details);/* libs/web-components/src/components/divider/Divider.svelte generated by Svelte v3.59.2 */function create_fragment$I(ctx){let hr;let hr_style_value;return {c(){hr=element("hr");this.c=noop;attr(hr,"data-testid",/*testid*/ctx[0]);attr(hr,"style",hr_style_value=calculateMargin(/*mt*/ctx[1],/*mr*/ctx[2],/*mb*/ctx[3],/*ml*/ctx[4]));},m(target,anchor){insert(target,hr,anchor);},p(ctx,[dirty]){if(dirty&/*testid*/1){attr(hr,"data-testid",/*testid*/ctx[0]);}if(dirty&/*mt, mr, mb, ml*/30&&hr_style_value!==(hr_style_value=calculateMargin(/*mt*/ctx[1],/*mr*/ctx[2],/*mb*/ctx[3],/*ml*/ctx[4]))){attr(hr,"style",hr_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(hr);}};}function instance$F($$self,$$props,$$invalidate){let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;$$self.$$set=$$props=>{if('testid'in $$props)$$invalidate(0,testid=$$props.testid);if('mt'in $$props)$$invalidate(1,mt=$$props.mt);if('mr'in $$props)$$invalidate(2,mr=$$props.mr);if('mb'in $$props)$$invalidate(3,mb=$$props.mb);if('ml'in $$props)$$invalidate(4,ml=$$props.ml);};return [testid,mt,mr,mb,ml];}class Divider extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`hr{padding:0;margin:0;height:1px;background-color:var(--goa-color-greyscale-200);border:none}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$F,create_fragment$I,safe_not_equal,{testid:0,mt:1,mr:2,mb:3,ml:4},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["testid","mt","mr","mb","ml"];}get testid(){return this.$$.ctx[0];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[1];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[2];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[3];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[4];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-divider",Divider);/* libs/web-components/src/components/dropdown/Dropdown.svelte generated by Svelte v3.59.2 */function get_each_context_1(ctx,list,i){const child_ctx=ctx.slice();child_ctx[71]=list[i];child_ctx[75]=i;return child_ctx;}function get_each_context$7(ctx,list,i){const child_ctx=ctx.slice();child_ctx[71]=list[i];return child_ctx;}// (510:2) {:else}
|
|
169
|
+
function create_else_block$a(ctx){let slot;let t0;let goa_popover;let div;let t1;let input;let input_style_value;let input_aria_controls_value;let input_aria_label_value;let input_id_value;let input_aria_owns_value;let input_readonly_value;let t2;let t3;let div_style_value;let t4;let ul;let ul_id_value;let ul_aria_label_value;let ul_style_value;let goa_popover_width_value;let mounted;let dispose;let if_block0=/*leadingicon*/ctx[4]&&create_if_block_4$3(ctx);let if_block1=/*_inputValue*/ctx[16]&&/*_filterable*/ctx[20]&&create_if_block_3$a(ctx);let if_block2=(/*_filterable*/ctx[20]&&/*_inputValue*/ctx[16].length===0||!/*_filterable*/ctx[20])&&create_if_block_2$a(ctx);function select_block_type_1(ctx,dirty){if(/*_filteredOptions*/ctx[21].length>0)return create_if_block_1$c;return create_else_block_1;}let current_block_type=select_block_type_1(ctx);let if_block3=current_block_type(ctx);return {c(){slot=element("slot");t0=space();goa_popover=element("goa-popover");div=element("div");if(if_block0)if_block0.c();t1=space();input=element("input");t2=space();if(if_block1)if_block1.c();t3=space();if(if_block2)if_block2.c();t4=space();ul=element("ul");if_block3.c();attr(input,"style",input_style_value=`cursor: ${!/*_disabled*/ctx[29]?/*_filterable*/ctx[20]?"auto":"pointer":'default'}`);attr(input,"tabindex","1");attr(input,"type","text");attr(input,"role","combobox");attr(input,"autocomplete","off");attr(input,"aria-autocomplete","list");attr(input,"aria-controls",input_aria_controls_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`);attr(input,"aria-expanded",/*_isMenuVisible*/ctx[23]);attr(input,"aria-label",input_aria_label_value=/*arialabel*/ctx[2]||/*name*/ctx[1]);attr(input,"aria-labelledby",/*arialabelledby*/ctx[3]);attr(input,"id",input_id_value=`${/*id*/ctx[14]||/*name*/ctx[1]}`);attr(input,"aria-activedescendant",/*_activeDescendantId*/ctx[30]);attr(input,"aria-disabled",/*_disabled*/ctx[29]);attr(input,"aria-owns",input_aria_owns_value=/*_isMenuVisible*/ctx[23]?`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`:undefined);attr(input,"aria-haspopup","listbox");input.disabled=/*_disabled*/ctx[29];input.readOnly=input_readonly_value=!/*_filterable*/ctx[20];attr(input,"placeholder",/*placeholder*/ctx[6]);attr(input,"name",/*name*/ctx[1]);attr(div,"slot","target");attr(div,"style",div_style_value=`
|
|
169
170
|
${cssVar("width",/*width*/ctx[7])}
|
|
170
|
-
`);attr(div,"class","dropdown-input-group");toggle_class(div,"dropdown-input-group--disabled",/*_disabled*/ctx[
|
|
171
|
+
`);attr(div,"class","dropdown-input-group");toggle_class(div,"dropdown-input-group--disabled",/*_disabled*/ctx[29]);toggle_class(div,"error",/*_error*/ctx[31]);attr(ul,"id",ul_id_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`);attr(ul,"role","listbox");attr(ul,"tabindex","-1");attr(ul,"data-testid","dropdown-menu");attr(ul,"aria-label",ul_aria_label_value=/*arialabel*/ctx[2]||/*name*/ctx[1]);attr(ul,"aria-labelledby",/*arialabelledby*/ctx[3]);attr(ul,"style",ul_style_value=`
|
|
171
172
|
outline: none;
|
|
172
173
|
overflow-y: auto;
|
|
173
174
|
max-height: ${/*maxheight*/ctx[5]};
|
|
174
|
-
`);set_custom_element_data(goa_popover,"disabled",/*disabled*/ctx[8]);set_custom_element_data(goa_popover,"relative",/*relative*/ctx[9]);set_custom_element_data(goa_popover,"open",/*_isMenuVisible*/ctx[
|
|
175
|
+
`);set_custom_element_data(goa_popover,"disabled",/*disabled*/ctx[8]);set_custom_element_data(goa_popover,"relative",/*relative*/ctx[9]);set_custom_element_data(goa_popover,"open",/*_isMenuVisible*/ctx[23]);set_custom_element_data(goa_popover,"padded","false");set_custom_element_data(goa_popover,"width",goa_popover_width_value=/*width*/ctx[7]||/*_computedWidth*/ctx[24]);set_custom_element_data(goa_popover,"tabindex","-1");set_custom_element_data(goa_popover,"maxwidth",/*_inputWidth*/ctx[25]);},m(target,anchor){insert(target,slot,anchor);insert(target,t0,anchor);insert(target,goa_popover,anchor);append(goa_popover,div);if(if_block0)if_block0.m(div,null);append(div,t1);append(div,input);/*input_binding*/ctx[44](input);set_input_value(input,/*_inputValue*/ctx[16]);append(div,t2);if(if_block1)if_block1.m(div,null);append(div,t3);if(if_block2)if_block2.m(div,null);append(goa_popover,t4);append(goa_popover,ul);if_block3.m(ul,null);/*ul_binding*/ctx[48](ul);/*goa_popover_binding*/ctx[49](goa_popover);if(!mounted){dispose=[listen(input,"input",/*input_input_handler*/ctx[45]),listen(input,"keydown",/*onInputKeyDown*/ctx[35]),listen(goa_popover,"_open",/*showMenu*/ctx[32]),listen(goa_popover,"_close",/*closeMenu*/ctx[33])];mounted=true;}},p(ctx,dirty){if(/*leadingicon*/ctx[4]){if(if_block0){if_block0.p(ctx,dirty);}else {if_block0=create_if_block_4$3(ctx);if_block0.c();if_block0.m(div,t1);}}else if(if_block0){if_block0.d(1);if_block0=null;}if(dirty[0]&/*_disabled, _filterable*/537919488&&input_style_value!==(input_style_value=`cursor: ${!/*_disabled*/ctx[29]?/*_filterable*/ctx[20]?"auto":"pointer":'default'}`)){attr(input,"style",input_style_value);}if(dirty[0]&/*id, name*/16386&&input_aria_controls_value!==(input_aria_controls_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`)){attr(input,"aria-controls",input_aria_controls_value);}if(dirty[0]&/*_isMenuVisible*/8388608){attr(input,"aria-expanded",/*_isMenuVisible*/ctx[23]);}if(dirty[0]&/*arialabel, name*/6&&input_aria_label_value!==(input_aria_label_value=/*arialabel*/ctx[2]||/*name*/ctx[1])){attr(input,"aria-label",input_aria_label_value);}if(dirty[0]&/*arialabelledby*/8){attr(input,"aria-labelledby",/*arialabelledby*/ctx[3]);}if(dirty[0]&/*id, name*/16386&&input_id_value!==(input_id_value=`${/*id*/ctx[14]||/*name*/ctx[1]}`)){attr(input,"id",input_id_value);}if(dirty[0]&/*_activeDescendantId*/1073741824){attr(input,"aria-activedescendant",/*_activeDescendantId*/ctx[30]);}if(dirty[0]&/*_disabled*/536870912){attr(input,"aria-disabled",/*_disabled*/ctx[29]);}if(dirty[0]&/*_isMenuVisible, id, name*/8404994&&input_aria_owns_value!==(input_aria_owns_value=/*_isMenuVisible*/ctx[23]?`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`:undefined)){attr(input,"aria-owns",input_aria_owns_value);}if(dirty[0]&/*_disabled*/536870912){input.disabled=/*_disabled*/ctx[29];}if(dirty[0]&/*_filterable*/1048576&&input_readonly_value!==(input_readonly_value=!/*_filterable*/ctx[20])){input.readOnly=input_readonly_value;}if(dirty[0]&/*placeholder*/64){attr(input,"placeholder",/*placeholder*/ctx[6]);}if(dirty[0]&/*name*/2){attr(input,"name",/*name*/ctx[1]);}if(dirty[0]&/*_inputValue*/65536&&input.value!==/*_inputValue*/ctx[16]){set_input_value(input,/*_inputValue*/ctx[16]);}if(/*_inputValue*/ctx[16]&&/*_filterable*/ctx[20]){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block_3$a(ctx);if_block1.c();if_block1.m(div,t3);}}else if(if_block1){if_block1.d(1);if_block1=null;}if(/*_filterable*/ctx[20]&&/*_inputValue*/ctx[16].length===0||!/*_filterable*/ctx[20]){if(if_block2){if_block2.p(ctx,dirty);}else {if_block2=create_if_block_2$a(ctx);if_block2.c();if_block2.m(div,null);}}else if(if_block2){if_block2.d(1);if_block2=null;}if(dirty[0]&/*width*/128&&div_style_value!==(div_style_value=`
|
|
175
176
|
${cssVar("width",/*width*/ctx[7])}
|
|
176
|
-
`)){attr(div,"style",div_style_value);}if(dirty[0]&/*_disabled*/
|
|
177
|
+
`)){attr(div,"style",div_style_value);}if(dirty[0]&/*_disabled*/536870912){toggle_class(div,"dropdown-input-group--disabled",/*_disabled*/ctx[29]);}if(dirty[1]&/*_error*/1){toggle_class(div,"error",/*_error*/ctx[31]);}if(current_block_type===(current_block_type=select_block_type_1(ctx))&&if_block3){if_block3.p(ctx,dirty);}else {if_block3.d(1);if_block3=current_block_type(ctx);if(if_block3){if_block3.c();if_block3.m(ul,null);}}if(dirty[0]&/*id, name*/16386&&ul_id_value!==(ul_id_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`)){attr(ul,"id",ul_id_value);}if(dirty[0]&/*arialabel, name*/6&&ul_aria_label_value!==(ul_aria_label_value=/*arialabel*/ctx[2]||/*name*/ctx[1])){attr(ul,"aria-label",ul_aria_label_value);}if(dirty[0]&/*arialabelledby*/8){attr(ul,"aria-labelledby",/*arialabelledby*/ctx[3]);}if(dirty[0]&/*maxheight*/32&&ul_style_value!==(ul_style_value=`
|
|
177
178
|
outline: none;
|
|
178
179
|
overflow-y: auto;
|
|
179
180
|
max-height: ${/*maxheight*/ctx[5]};
|
|
180
|
-
`)){attr(ul,"style",ul_style_value);}if(dirty[0]&/*disabled*/256){set_custom_element_data(goa_popover,"disabled",/*disabled*/ctx[8]);}if(dirty[0]&/*relative*/512){set_custom_element_data(goa_popover,"relative",/*relative*/ctx[9]);}if(dirty[0]&/*_isMenuVisible*/
|
|
181
|
-
function create_if_block$o(ctx){let select;let slot;let select_aria_label_value;let select_id_value;let mounted;let dispose;let each_value=/*_options*/ctx[15];let each_blocks=[];for(let i=0;i<each_value.length;i+=1){each_blocks[i]=create_each_block$7(get_each_context$7(ctx,each_value,i));}return {c(){select=element("select");slot=element("slot");for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}select.disabled=/*_disabled*/ctx[
|
|
182
|
-
function create_if_block_4$3(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"class","dropdown-input--leading-icon");set_custom_element_data(goa_icon,"data-testid","leading-icon");set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[4]);},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty[0]&/*leadingicon*/16){set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[4]);}},d(detaching){if(detaching)detach(goa_icon);}};}// (
|
|
183
|
-
function create_if_block_3$a(ctx){let goa_icon;let goa_icon_tabindex_value;let goa_icon_arialabel_value;let mounted;let dispose;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"tabindex",goa_icon_tabindex_value=/*_disabled*/ctx[
|
|
184
|
-
function create_if_block_2$a(ctx){let goa_icon;let goa_icon_id_value;let goa_icon_arialabel_value;let goa_icon_ariacontrols_value;let goa_icon_ariaexpanded_value;let goa_icon_type_value;let mounted;let dispose;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"role","button");set_custom_element_data(goa_icon,"id",goa_icon_id_value=`${/*id*/ctx[14]||/*name*/ctx[1]}`);set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value=/*arialabel*/ctx[2]||/*name*/ctx[1]);set_custom_element_data(goa_icon,"ariacontrols",goa_icon_ariacontrols_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`);set_custom_element_data(goa_icon,"ariaexpanded",goa_icon_ariaexpanded_value=/*_isMenuVisible*/ctx[
|
|
185
|
-
function create_else_block_1(ctx){let li;return {c(){li=element("li");li.textContent="No matches found";attr(li,"class","dropdown-item");attr(li,"data-testid","dropdown-item-not-found");},m(target,anchor){insert(target,li,anchor);},p:noop,d(detaching){if(detaching)detach(li);}};}// (
|
|
186
|
-
function create_if_block_1$c(ctx){let each_blocks=[];let each_1_lookup=new Map();let each_1_anchor;let each_value_1=/*_filteredOptions*/ctx[
|
|
187
|
-
function create_each_block_1(key_1,ctx){let li;let t0_value=(/*option*/ctx[
|
|
188
|
-
function create_each_block$7(ctx){let option;let t0_value=/*option*/ctx[
|
|
181
|
+
`)){attr(ul,"style",ul_style_value);}if(dirty[0]&/*disabled*/256){set_custom_element_data(goa_popover,"disabled",/*disabled*/ctx[8]);}if(dirty[0]&/*relative*/512){set_custom_element_data(goa_popover,"relative",/*relative*/ctx[9]);}if(dirty[0]&/*_isMenuVisible*/8388608){set_custom_element_data(goa_popover,"open",/*_isMenuVisible*/ctx[23]);}if(dirty[0]&/*width, _computedWidth*/16777344&&goa_popover_width_value!==(goa_popover_width_value=/*width*/ctx[7]||/*_computedWidth*/ctx[24])){set_custom_element_data(goa_popover,"width",goa_popover_width_value);}if(dirty[0]&/*_inputWidth*/33554432){set_custom_element_data(goa_popover,"maxwidth",/*_inputWidth*/ctx[25]);}},d(detaching){if(detaching)detach(slot);if(detaching)detach(t0);if(detaching)detach(goa_popover);if(if_block0)if_block0.d();/*input_binding*/ctx[44](null);if(if_block1)if_block1.d();if(if_block2)if_block2.d();if_block3.d();/*ul_binding*/ctx[48](null);/*goa_popover_binding*/ctx[49](null);mounted=false;run_all(dispose);}};}// (490:2) {#if _native}
|
|
182
|
+
function create_if_block$o(ctx){let select;let slot;let select_aria_label_value;let select_id_value;let mounted;let dispose;let each_value=/*_options*/ctx[15];let each_blocks=[];for(let i=0;i<each_value.length;i+=1){each_blocks[i]=create_each_block$7(get_each_context$7(ctx,each_value,i));}return {c(){select=element("select");slot=element("slot");for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}select.disabled=/*_disabled*/ctx[29];attr(select,"aria-labelledby",/*arialabelledby*/ctx[3]);attr(select,"aria-label",select_aria_label_value=/*arialabel*/ctx[2]||/*name*/ctx[1]);attr(select,"id",select_id_value=/*id*/ctx[14]||/*name*/ctx[1]);attr(select,"name",/*name*/ctx[1]);toggle_class(select,"error",/*_error*/ctx[31]);},m(target,anchor){insert(target,select,anchor);append(select,slot);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(select,null);}}/*select_binding*/ctx[43](select);if(!mounted){dispose=listen(select,"change",/*onNativeSelect*/ctx[36]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*value, _options*/32769){each_value=/*_options*/ctx[15];let i;for(i=0;i<each_value.length;i+=1){const child_ctx=get_each_context$7(ctx,each_value,i);if(each_blocks[i]){each_blocks[i].p(child_ctx,dirty);}else {each_blocks[i]=create_each_block$7(child_ctx);each_blocks[i].c();each_blocks[i].m(select,null);}}for(;i<each_blocks.length;i+=1){each_blocks[i].d(1);}each_blocks.length=each_value.length;}if(dirty[0]&/*_disabled*/536870912){select.disabled=/*_disabled*/ctx[29];}if(dirty[0]&/*arialabelledby*/8){attr(select,"aria-labelledby",/*arialabelledby*/ctx[3]);}if(dirty[0]&/*arialabel, name*/6&&select_aria_label_value!==(select_aria_label_value=/*arialabel*/ctx[2]||/*name*/ctx[1])){attr(select,"aria-label",select_aria_label_value);}if(dirty[0]&/*id, name*/16386&&select_id_value!==(select_id_value=/*id*/ctx[14]||/*name*/ctx[1])){attr(select,"id",select_id_value);}if(dirty[0]&/*name*/2){attr(select,"name",/*name*/ctx[1]);}if(dirty[1]&/*_error*/1){toggle_class(select,"error",/*_error*/ctx[31]);}},d(detaching){if(detaching)detach(select);destroy_each(each_blocks,detaching);/*select_binding*/ctx[43](null);mounted=false;dispose();}};}// (533:8) {#if leadingicon}
|
|
183
|
+
function create_if_block_4$3(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"class","dropdown-input--leading-icon");set_custom_element_data(goa_icon,"data-testid","leading-icon");set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[4]);},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty[0]&/*leadingicon*/16){set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[4]);}},d(detaching){if(detaching)detach(goa_icon);}};}// (564:8) {#if _inputValue && _filterable}
|
|
184
|
+
function create_if_block_3$a(ctx){let goa_icon;let goa_icon_tabindex_value;let goa_icon_arialabel_value;let mounted;let dispose;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"tabindex",goa_icon_tabindex_value=/*_disabled*/ctx[29]?-1:0);set_custom_element_data(goa_icon,"role","button");set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value="clear "+(/*arialabel*/ctx[2]||/*name*/ctx[1]));set_custom_element_data(goa_icon,"class","dropdown-icon--clear");set_custom_element_data(goa_icon,"size","medium");set_custom_element_data(goa_icon,"type","close");toggle_class(goa_icon,"disabled",/*_disabled*/ctx[29]);},m(target,anchor){insert(target,goa_icon,anchor);if(!mounted){dispose=[listen(goa_icon,"click",stop_propagation(/*onClear*/ctx[38])),listen(goa_icon,"keydown",/*keydown_handler*/ctx[46])];mounted=true;}},p(ctx,dirty){if(dirty[0]&/*_disabled*/536870912&&goa_icon_tabindex_value!==(goa_icon_tabindex_value=/*_disabled*/ctx[29]?-1:0)){set_custom_element_data(goa_icon,"tabindex",goa_icon_tabindex_value);}if(dirty[0]&/*arialabel, name*/6&&goa_icon_arialabel_value!==(goa_icon_arialabel_value="clear "+(/*arialabel*/ctx[2]||/*name*/ctx[1]))){set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value);}if(dirty[0]&/*_disabled*/536870912){toggle_class(goa_icon,"disabled",/*_disabled*/ctx[29]);}},d(detaching){if(detaching)detach(goa_icon);mounted=false;run_all(dispose);}};}// (582:8) {#if (_filterable && _inputValue.length === 0) || !_filterable}
|
|
185
|
+
function create_if_block_2$a(ctx){let goa_icon;let goa_icon_id_value;let goa_icon_arialabel_value;let goa_icon_ariacontrols_value;let goa_icon_ariaexpanded_value;let goa_icon_type_value;let mounted;let dispose;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"role","button");set_custom_element_data(goa_icon,"id",goa_icon_id_value=`${/*id*/ctx[14]||/*name*/ctx[1]}`);set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value=/*arialabel*/ctx[2]||/*name*/ctx[1]);set_custom_element_data(goa_icon,"ariacontrols",goa_icon_ariacontrols_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`);set_custom_element_data(goa_icon,"ariaexpanded",goa_icon_ariaexpanded_value=/*_isMenuVisible*/ctx[23]?"true":"false");set_custom_element_data(goa_icon,"class","dropdown-icon--arrow");set_custom_element_data(goa_icon,"size","medium");set_custom_element_data(goa_icon,"type",goa_icon_type_value=/*_isMenuVisible*/ctx[23]?'chevron-up':'chevron-down');},m(target,anchor){insert(target,goa_icon,anchor);if(!mounted){dispose=listen(goa_icon,"click",/*onClick*/ctx[37]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*id, name*/16386&&goa_icon_id_value!==(goa_icon_id_value=`${/*id*/ctx[14]||/*name*/ctx[1]}`)){set_custom_element_data(goa_icon,"id",goa_icon_id_value);}if(dirty[0]&/*arialabel, name*/6&&goa_icon_arialabel_value!==(goa_icon_arialabel_value=/*arialabel*/ctx[2]||/*name*/ctx[1])){set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value);}if(dirty[0]&/*id, name*/16386&&goa_icon_ariacontrols_value!==(goa_icon_ariacontrols_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`)){set_custom_element_data(goa_icon,"ariacontrols",goa_icon_ariacontrols_value);}if(dirty[0]&/*_isMenuVisible*/8388608&&goa_icon_ariaexpanded_value!==(goa_icon_ariaexpanded_value=/*_isMenuVisible*/ctx[23]?"true":"false")){set_custom_element_data(goa_icon,"ariaexpanded",goa_icon_ariaexpanded_value);}if(dirty[0]&/*_isMenuVisible*/8388608&&goa_icon_type_value!==(goa_icon_type_value=/*_isMenuVisible*/ctx[23]?'chevron-up':'chevron-down')){set_custom_element_data(goa_icon,"type",goa_icon_type_value);}},d(detaching){if(detaching)detach(goa_icon);mounted=false;dispose();}};}// (628:8) {:else}
|
|
186
|
+
function create_else_block_1(ctx){let li;return {c(){li=element("li");li.textContent="No matches found";attr(li,"class","dropdown-item");attr(li,"data-testid","dropdown-item-not-found");},m(target,anchor){insert(target,li,anchor);},p:noop,d(detaching){if(detaching)detach(li);}};}// (611:8) {#if _filteredOptions.length > 0}
|
|
187
|
+
function create_if_block_1$c(ctx){let each_blocks=[];let each_1_lookup=new Map();let each_1_anchor;let each_value_1=/*_filteredOptions*/ctx[21];const get_key=ctx=>/*index*/ctx[75];for(let i=0;i<each_value_1.length;i+=1){let child_ctx=get_each_context_1(ctx,each_value_1,i);let key=get_key(child_ctx);each_1_lookup.set(key,each_blocks[i]=create_each_block_1(key,child_ctx));}return {c(){for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}each_1_anchor=empty();},m(target,anchor){for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(target,anchor);}}insert(target,each_1_anchor,anchor);},p(ctx,dirty){if(dirty[0]&/*_filteredOptions, value, _highlightedIndex*/2228225|dirty[1]&/*onSelect*/8){each_value_1=/*_filteredOptions*/ctx[21];each_blocks=update_keyed_each(each_blocks,dirty,get_key,1,ctx,each_value_1,each_1_lookup,each_1_anchor.parentNode,destroy_block,create_each_block_1,each_1_anchor,get_each_context_1);}},d(detaching){for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].d(detaching);}if(detaching)detach(each_1_anchor);}};}// (612:10) {#each _filteredOptions as option, index (index)}
|
|
188
|
+
function create_each_block_1(key_1,ctx){let li;let t0_value=(/*option*/ctx[71].label||/*option*/ctx[71].value)+"";let t0;let t1;let li_id_value;let li_aria_selected_value;let li_data_testid_value;let li_data_index_value;let li_data_value_value;let mounted;let dispose;function click_handler(){return(/*click_handler*/ctx[47](/*option*/ctx[71]));}return {key:key_1,first:null,c(){li=element("li");t0=text(t0_value);t1=space();attr(li,"id",li_id_value=/*option*/ctx[71].value);attr(li,"role","option");set_style(li,"display","block");attr(li,"aria-selected",li_aria_selected_value=/*value*/ctx[0]===/*option*/ctx[71].value);attr(li,"class","dropdown-item");attr(li,"data-testid",li_data_testid_value=`dropdown-item-${/*option*/ctx[71].value}`);attr(li,"data-index",li_data_index_value=/*index*/ctx[75]);attr(li,"data-value",li_data_value_value=/*option*/ctx[71].value);toggle_class(li,"dropdown-item--highlighted",/*index*/ctx[75]===/*_highlightedIndex*/ctx[17]);this.first=li;},m(target,anchor){insert(target,li,anchor);append(li,t0);append(li,t1);if(!mounted){dispose=listen(li,"click",click_handler);mounted=true;}},p(new_ctx,dirty){ctx=new_ctx;if(dirty[0]&/*_filteredOptions*/2097152&&t0_value!==(t0_value=(/*option*/ctx[71].label||/*option*/ctx[71].value)+""))set_data(t0,t0_value);if(dirty[0]&/*_filteredOptions*/2097152&&li_id_value!==(li_id_value=/*option*/ctx[71].value)){attr(li,"id",li_id_value);}if(dirty[0]&/*value, _filteredOptions*/2097153&&li_aria_selected_value!==(li_aria_selected_value=/*value*/ctx[0]===/*option*/ctx[71].value)){attr(li,"aria-selected",li_aria_selected_value);}if(dirty[0]&/*_filteredOptions*/2097152&&li_data_testid_value!==(li_data_testid_value=`dropdown-item-${/*option*/ctx[71].value}`)){attr(li,"data-testid",li_data_testid_value);}if(dirty[0]&/*_filteredOptions*/2097152&&li_data_index_value!==(li_data_index_value=/*index*/ctx[75])){attr(li,"data-index",li_data_index_value);}if(dirty[0]&/*_filteredOptions*/2097152&&li_data_value_value!==(li_data_value_value=/*option*/ctx[71].value)){attr(li,"data-value",li_data_value_value);}if(dirty[0]&/*_filteredOptions, _highlightedIndex*/2228224){toggle_class(li,"dropdown-item--highlighted",/*index*/ctx[75]===/*_highlightedIndex*/ctx[17]);}},d(detaching){if(detaching)detach(li);mounted=false;dispose();}};}// (502:6) {#each _options as option}
|
|
189
|
+
function create_each_block$7(ctx){let option;let t0_value=/*option*/ctx[71].label+"";let t0;let t1;let option_selected_value;let option_value_value;return {c(){option=element("option");t0=text(t0_value);t1=space();option.selected=option_selected_value=/*value*/ctx[0]===/*option*/ctx[71].value;option.__value=option_value_value=/*option*/ctx[71].value;option.value=option.__value;},m(target,anchor){insert(target,option,anchor);append(option,t0);append(option,t1);},p(ctx,dirty){if(dirty[0]&/*_options*/32768&&t0_value!==(t0_value=/*option*/ctx[71].label+""))set_data(t0,t0_value);if(dirty[0]&/*value, _options*/32769&&option_selected_value!==(option_selected_value=/*value*/ctx[0]===/*option*/ctx[71].value)){option.selected=option_selected_value;}if(dirty[0]&/*_options*/32768&&option_value_value!==(option_value_value=/*option*/ctx[71].value)){option.__value=option_value_value;option.value=option.__value;}},d(detaching){if(detaching)detach(option);}};}function create_fragment$H(ctx){let div;let div_data_testid_value;let div_style_value;function select_block_type(ctx,dirty){if(/*_native*/ctx[22])return create_if_block$o;return create_else_block$a;}let current_block_type=select_block_type(ctx);let if_block=current_block_type(ctx);return {c(){div=element("div");if_block.c();this.c=noop;attr(div,"data-testid",div_data_testid_value=`${/*name*/ctx[1]}-dropdown`);attr(div,"class","dropdown");attr(div,"style",div_style_value=`
|
|
189
190
|
${calculateMargin(/*mt*/ctx[10],/*mr*/ctx[11],/*mb*/ctx[12],/*ml*/ctx[13])}
|
|
190
|
-
--width: ${/*width*/ctx[7]||/*_computedWidth*/ctx[
|
|
191
|
-
`);toggle_class(div,"dropdown-native",/*_native*/ctx[
|
|
191
|
+
--width: ${/*width*/ctx[7]||/*_computedWidth*/ctx[24]}
|
|
192
|
+
`);toggle_class(div,"dropdown-native",/*_native*/ctx[22]);},m(target,anchor){insert(target,div,anchor);if_block.m(div,null);/*div_binding*/ctx[50](div);},p(ctx,dirty){if(current_block_type===(current_block_type=select_block_type(ctx))&&if_block){if_block.p(ctx,dirty);}else {if_block.d(1);if_block=current_block_type(ctx);if(if_block){if_block.c();if_block.m(div,null);}}if(dirty[0]&/*name*/2&&div_data_testid_value!==(div_data_testid_value=`${/*name*/ctx[1]}-dropdown`)){attr(div,"data-testid",div_data_testid_value);}if(dirty[0]&/*mt, mr, mb, ml, width, _computedWidth*/16792704&&div_style_value!==(div_style_value=`
|
|
192
193
|
${calculateMargin(/*mt*/ctx[10],/*mr*/ctx[11],/*mb*/ctx[12],/*ml*/ctx[13])}
|
|
193
|
-
--width: ${/*width*/ctx[7]||/*_computedWidth*/ctx[
|
|
194
|
-
`)){attr(div,"style",div_style_value);}if(dirty[0]&/*_native*/
|
|
194
|
+
--width: ${/*width*/ctx[7]||/*_computedWidth*/ctx[24]}
|
|
195
|
+
`)){attr(div,"style",div_style_value);}if(dirty[0]&/*_native*/4194304){toggle_class(div,"dropdown-native",/*_native*/ctx[22]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);if_block.d();/*div_binding*/ctx[50](null);}};}function isPrintableCharacter(inputChar){return inputChar.length===1&&inputChar.match(/\S| /)!=null;}// parse and convert values to strings to avoid later type comparison issues
|
|
195
196
|
function parseValues(selectedValue){let rawValue;try{rawValue=JSON.parse(selectedValue||`[""]`);}catch(e){rawValue=[selectedValue];}const rawValues=typeof rawValue==="object"?rawValue:[rawValue];// convert all values to strings to avoid later type comparison issues
|
|
196
197
|
return rawValues.map(val=>`${val}`);}function isMatched(option,query){if(query.length===0)return true;// in case query is "white whale", "b c"
|
|
197
198
|
const queryWords=query.toLowerCase().split(/\s+/);//In case option is "white whale", "american samoa"
|
|
@@ -205,7 +206,7 @@ return filterWords.some(word=>word.startsWith(queryWords[0]));}function instance
|
|
|
205
206
|
let _values=[];let _options=[];let _inputValue="";let _isMenuVisible=false;let _highlightedIndex=-1;// keep track highlighted option, for arrow up/down
|
|
206
207
|
let _computedWidth;let _selectedOption=undefined;// to keep track if value is matched to combobox option
|
|
207
208
|
let _previousSelectedValue="";// to keep track if value is changed from previously selected value - for clear button
|
|
208
|
-
let _el;let _menuEl;let _selectEl;let _popOverEl;let _inputEl;afterUpdate(()=>{if(_options.length===0)return;_isMenuVisible?_inputEl.focus():updateInputValue(_selectedOption);});onMount(async()=>{// watch for DOM changes within the slot => dynamic binding
|
|
209
|
+
let _inputWidth;let _el;let _menuEl;let _selectEl;let _popOverEl;let _inputEl;afterUpdate(()=>{if(_options.length===0)return;_isMenuVisible?_inputEl.focus():updateInputValue(_selectedOption);});onMount(async()=>{// watch for DOM changes within the slot => dynamic binding
|
|
209
210
|
const slot=_el.querySelector("slot");slot===null||slot===void 0?void 0:slot.addEventListener("slotchange",_e=>{_values=parseValues(value);$$invalidate(15,_options=getOptions());});});// Functions
|
|
210
211
|
function getChildren(){const slot=_el.querySelector("slot");if(slot){// default
|
|
211
212
|
return slot.assignedElements();}// unit tests
|
|
@@ -223,25 +224,25 @@ if(index<0){index=_filterable?items.length-1:0;}else if(index>=items.length){ind
|
|
|
223
224
|
*/function setSelectedOption(selectedValue){return _filterable?setSelectedOptionByInputValue():_selectedOption=_options.find(item=>item.value===selectedValue);}/**
|
|
224
225
|
* Update according to input's value (for filterable dropdown)
|
|
225
226
|
*/function setSelectedOptionByInputValue(){const filteredItems=_options.filter(item=>isMatched(item,_inputValue));const isTypingInputMatchedOption=filteredItems.length===1&&_isMenuVisible;if(!isTypingInputMatchedOption){// follow local value
|
|
226
|
-
_selectedOption=_options.find(item=>item.value===value);return;}_selectedOption=filteredItems[0];updateInputValue(_selectedOption);$$invalidate(
|
|
227
|
+
_selectedOption=_options.find(item=>item.value===value);return;}_selectedOption=filteredItems[0];updateInputValue(_selectedOption);$$invalidate(30,_activeDescendantId=undefined);}/**
|
|
227
228
|
* Update input's value according to selected dropdown option
|
|
228
229
|
* @param option
|
|
229
|
-
*/function updateInputValue(option){$$invalidate(17,_highlightedIndex=-1);$$invalidate(16,_inputValue=option?option.label:"");$$invalidate(0,value=option?option.value:"");if(!option){$$invalidate(
|
|
230
|
+
*/function updateInputValue(option){$$invalidate(17,_highlightedIndex=-1);$$invalidate(16,_inputValue=option?option.label:"");$$invalidate(0,value=option?option.value:"");if(!option){$$invalidate(30,_activeDescendantId=undefined);}}/**
|
|
230
231
|
* Keep track the component's local value based on new selected value
|
|
231
232
|
* @param newSelectedValue
|
|
232
233
|
*/function updateSelectedValue(newSelectedValue){if(_previousSelectedValue!==newSelectedValue){_previousSelectedValue=newSelectedValue;setSelectedOption(newSelectedValue);_values=[value];// Keep track _values, for multiSelect later
|
|
233
|
-
dispatchValue(value);}}function showMenu(){if(_disabled){return;}$$invalidate(
|
|
234
|
+
dispatchValue(value);}}function showMenu(){if(_disabled){return;}$$invalidate(23,_isMenuVisible=true);}function closeMenu(){$$invalidate(23,_isMenuVisible=false);}function dispatchValue(optionValue){const option=_options.find(item=>item.value===optionValue);const newValue=option?option.value:"";let detail;if(_multiselect){_values.push(newValue);detail={name,values:_values};}else {_values=[newValue];detail={name,value:newValue};}_el.dispatchEvent(new CustomEvent("_change",{composed:true,detail}));}// Event handlers
|
|
234
235
|
function onSelect(option){if(_disabled)return;$$invalidate(0,value=option.value);_selectedOption=option;if(!_native){closeMenu();$$invalidate(16,_inputValue=option.label);_inputEl.focus();}}function ComboboxKeyDownHandler(){const handle=e=>{let stopPropagation=false;switch(e.key){case"Enter":onEnter();stopPropagation=true;break;case"Escape":case'Esc':closeMenu();removeSelectedValue();stopPropagation=true;break;case'Up':case"ArrowUp":onArrowUp();stopPropagation=true;break;case"Down":case"ArrowDown":onArrowDown();stopPropagation=true;break;case"Tab":closeMenu();break;case'Home':_inputEl.setSelectionRange(0,0);stopPropagation=true;break;case'End':_inputEl.setSelectionRange(_inputValue.length,_inputValue.length);stopPropagation=true;break;case'Backspace':if(_inputValue.length===0){// backspace should not open the filterable dropdown if input has no words
|
|
235
236
|
stopPropagation=true;return;}onBackspace();break;case' ':if(_inputValue.length===0){// space should not open the filterable dropdown if input has no words
|
|
236
|
-
stopPropagation=true;}break;default:if(isPrintableCharacter(e.key)){if(!_isMenuVisible){showMenu();}if(!_inputValue.length){removeSelectedValue();}}break;}if(stopPropagation){e.preventDefault();e.stopPropagation();}};const onEnter=()=>{$$invalidate(
|
|
237
|
-
};const onArrowUp=()=>{showMenu();changeHighlightedOption(-1);};const onArrowDown=()=>{showMenu();changeHighlightedOption(1);};const onBackspace=()=>{showMenu();if(_inputValue.length===1){removeSelectedValue();}};const selectOption=option=>{closeMenu();if(option){$$invalidate(16,_inputValue=option.label);_selectedOption=option;$$invalidate(0,value=option.value);}};return {handle};}function DropdownKeyDownHandler(){const handle=e=>{let stopPropagation=false;switch(e.key){case" ":onSpace();stopPropagation=true;break;case"Enter":onEnter();stopPropagation=true;break;case"Escape":closeMenu();break;case"Up":case"ArrowUp":onArrowUp();stopPropagation=true;break;case"Down":case"ArrowDown":onArrowDown();stopPropagation=true;break;case"Tab":closeMenu();break;}if(stopPropagation){e.preventDefault();e.stopPropagation();}};const onSpace=()=>{$$invalidate(
|
|
238
|
-
if(_highlightedIndex>-1&&_filteredOptions[_highlightedIndex].value!==value)$$invalidate(0,value=_filteredOptions[_highlightedIndex].value);};const onEnter=()=>{$$invalidate(
|
|
239
|
-
onClear();}};const click_handler=option=>onSelect(option);function ul_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_menuEl=$$value;$$invalidate(
|
|
240
|
-
}if($$self.$$.dirty[0]&/*_el, value, _native, _options*/
|
|
241
|
-
if(_el){_values=parseValues(value);$$invalidate(15,_options=getOptions());if(!_native){$$invalidate(
|
|
242
|
-
updateSelectedValue(value);}}}if($$self.$$.dirty[0]&/*_filterable, _options, _inputValue*/
|
|
243
|
-
$$invalidate(
|
|
244
|
-
}};return [value,name,arialabel,arialabelledby,leadingicon,maxheight,placeholder,width,disabled,relative,mt,mr,mb,ml,id,_options,_inputValue,_highlightedIndex,_el,_filterable,_filteredOptions,_native,_isMenuVisible,_computedWidth,_menuEl,_selectEl,_popOverEl,
|
|
237
|
+
stopPropagation=true;}break;default:if(isPrintableCharacter(e.key)){if(!_isMenuVisible){showMenu();}if(!_inputValue.length){removeSelectedValue();}}break;}if(stopPropagation){e.preventDefault();e.stopPropagation();}};const onEnter=()=>{$$invalidate(23,_isMenuVisible=!_isMenuVisible);if(_highlightedIndex<0){const matchedOption=_filteredOptions.find(option=>option.label.toLowerCase()===(_inputValue===null||_inputValue===void 0?void 0:_inputValue.toLowerCase()));selectOption(matchedOption);return;}const highlightedOption=_filteredOptions[_highlightedIndex];selectOption(highlightedOption);$$invalidate(17,_highlightedIndex=-1);// reset highlighted option
|
|
238
|
+
};const onArrowUp=()=>{showMenu();changeHighlightedOption(-1);};const onArrowDown=()=>{showMenu();changeHighlightedOption(1);};const onBackspace=()=>{showMenu();if(_inputValue.length===1){removeSelectedValue();}};const selectOption=option=>{closeMenu();if(option){$$invalidate(16,_inputValue=option.label);_selectedOption=option;$$invalidate(0,value=option.value);}};return {handle};}function DropdownKeyDownHandler(){const handle=e=>{let stopPropagation=false;switch(e.key){case" ":onSpace();stopPropagation=true;break;case"Enter":onEnter();stopPropagation=true;break;case"Escape":closeMenu();break;case"Up":case"ArrowUp":onArrowUp();stopPropagation=true;break;case"Down":case"ArrowDown":onArrowDown();stopPropagation=true;break;case"Tab":closeMenu();break;}if(stopPropagation){e.preventDefault();e.stopPropagation();}};const onSpace=()=>{$$invalidate(23,_isMenuVisible=!_isMenuVisible);// toggle menu
|
|
239
|
+
if(_highlightedIndex>-1&&_filteredOptions[_highlightedIndex].value!==value)$$invalidate(0,value=_filteredOptions[_highlightedIndex].value);};const onEnter=()=>{$$invalidate(23,_isMenuVisible=!_isMenuVisible);if(_highlightedIndex>-1&&_filteredOptions[_highlightedIndex].value!==value){$$invalidate(0,value=_filteredOptions[_highlightedIndex].value);closeMenu();}};const onArrowUp=()=>{if(!_isMenuVisible)showMenu();changeHighlightedOption(-1);};const onArrowDown=()=>{if(!_isMenuVisible)showMenu();changeHighlightedOption(1);};return {handle};}const comboboxHandler=ComboboxKeyDownHandler();const dropdownHandler=DropdownKeyDownHandler();const onInputKeyDown=e=>{if(_disabled)return;if(_filterable){comboboxHandler.handle(e);}else {dropdownHandler.handle(e);}};function onNativeSelect(e){const target=e.currentTarget;const option=_options[target.selectedIndex];onSelect(option);}function removeSelectedValue(){if(_disabled)return;_previousSelectedValue=null;_selectedOption=undefined;updateInputValue(_selectedOption);}async function onClick(){if(_disabled)return;showMenu();if(_filterable){await tick();_inputEl.focus();}}function onClear(){removeSelectedValue();_inputEl.focus();onClick();}function select_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_selectEl=$$value;$$invalidate(27,_selectEl);((($$invalidate(15,_options),$$invalidate(18,_el)),$$invalidate(0,value)),$$invalidate(22,_native)),$$invalidate(42,native);});}function input_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_inputEl=$$value;$$invalidate(19,_inputEl);});}function input_input_handler(){_inputValue=this.value;$$invalidate(16,_inputValue);}const keydown_handler=e=>{if(e.key==='Enter'){// for keyboard accessibility to press the clear icon
|
|
240
|
+
onClear();}};const click_handler=option=>onSelect(option);function ul_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_menuEl=$$value;$$invalidate(26,_menuEl);});}function goa_popover_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_popOverEl=$$value;$$invalidate(28,_popOverEl);});}function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_el=$$value;$$invalidate(18,_el);});}$$self.$$set=$$props=>{if('name'in $$props)$$invalidate(1,name=$$props.name);if('arialabel'in $$props)$$invalidate(2,arialabel=$$props.arialabel);if('arialabelledby'in $$props)$$invalidate(3,arialabelledby=$$props.arialabelledby);if('value'in $$props)$$invalidate(0,value=$$props.value);if('filterable'in $$props)$$invalidate(39,filterable=$$props.filterable);if('leadingicon'in $$props)$$invalidate(4,leadingicon=$$props.leadingicon);if('maxheight'in $$props)$$invalidate(5,maxheight=$$props.maxheight);if('placeholder'in $$props)$$invalidate(6,placeholder=$$props.placeholder);if('width'in $$props)$$invalidate(7,width=$$props.width);if('disabled'in $$props)$$invalidate(8,disabled=$$props.disabled);if('error'in $$props)$$invalidate(40,error=$$props.error);if('multiselect'in $$props)$$invalidate(41,multiselect=$$props.multiselect);if('native'in $$props)$$invalidate(42,native=$$props.native);if('relative'in $$props)$$invalidate(9,relative=$$props.relative);if('mt'in $$props)$$invalidate(10,mt=$$props.mt);if('mr'in $$props)$$invalidate(11,mr=$$props.mr);if('mb'in $$props)$$invalidate(12,mb=$$props.mb);if('ml'in $$props)$$invalidate(13,ml=$$props.ml);if('id'in $$props)$$invalidate(14,id=$$props.id);};$$self.$$.update=()=>{if($$self.$$.dirty[0]&/*disabled*/256){$$invalidate(29,_disabled=toBoolean(disabled));}if($$self.$$.dirty[1]&/*error*/512){$$invalidate(31,_error=toBoolean(error));}if($$self.$$.dirty[1]&/*multiselect*/1024){_multiselect=toBoolean(multiselect);}if($$self.$$.dirty[1]&/*native*/2048){$$invalidate(22,_native=toBoolean(native));}if($$self.$$.dirty[0]&/*_native*/4194304|$$self.$$.dirty[1]&/*filterable*/256){$$invalidate(20,_filterable=toBoolean(filterable)&&!_native);// Will replace datalist for filterable true
|
|
241
|
+
}if($$self.$$.dirty[0]&/*_el, value, _native, _options*/4489217){// Reactive statement
|
|
242
|
+
if(_el){_values=parseValues(value);$$invalidate(15,_options=getOptions());if(!_native){$$invalidate(24,_computedWidth=getCustomDropdownWidth(_options));}if(_options.length){// Keep track of initialized value
|
|
243
|
+
updateSelectedValue(value);}}}if($$self.$$.dirty[0]&/*_filterable, _options, _inputValue*/1146880){$$invalidate(21,_filteredOptions=_filterable?_options.filter(option=>isMatched(option,_inputValue)):_options);}if($$self.$$.dirty[0]&/*_filteredOptions, _highlightedIndex*/2228224){// Accessibility
|
|
244
|
+
$$invalidate(30,_activeDescendantId=_filteredOptions[_highlightedIndex]?_filteredOptions[_highlightedIndex].value:undefined);//To keep track of active descendant for the accessibility
|
|
245
|
+
}if($$self.$$.dirty[0]&/*_inputEl, _options*/557056){if(_inputEl&&_options.length){$$invalidate(25,_inputWidth=`${_inputEl.getBoundingClientRect().width}px`);}}};return [value,name,arialabel,arialabelledby,leadingicon,maxheight,placeholder,width,disabled,relative,mt,mr,mb,ml,id,_options,_inputValue,_highlightedIndex,_el,_inputEl,_filterable,_filteredOptions,_native,_isMenuVisible,_computedWidth,_inputWidth,_menuEl,_selectEl,_popOverEl,_disabled,_activeDescendantId,_error,showMenu,closeMenu,onSelect,onInputKeyDown,onNativeSelect,onClick,onClear,filterable,error,multiselect,native,select_binding,input_binding,input_input_handler,keydown_handler,click_handler,ul_binding,goa_popover_binding,div_binding];}class Dropdown extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.dropdown{cursor:pointer;display:inline-block;width:var(--width, 100%)}.dropdown-input-group{box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);display:inline-flex;align-items:stretch;vertical-align:middle;background-color:var(--goa-color-greyscale-white);cursor:pointer;width:100%}.dropdown-input-group:hover{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}.dropdown-input-group:focus,.dropdown-input-group:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}@media(min-width: 640px){.dropdown-input-group{width:var(--width)}}.dropdown-input-group.error,.dropdown-input-group.error:hover{border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 1px var(--goa-color-interactive-error)}.dropdown-input-group.error:focus-within,.dropdown-input-group.error:focus{border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}.dropdown-icon--arrow,.dropdown-icon--clear{margin-right:var(--goa-space-s)}.dropdown-icon--clear:focus:not(.disabled),.dropdown-icon--clear:active:not(.disabled){color:var(--goa-color-interactive-focus);outline:none}.dropdown-input--leading-icon{margin-left:0.75rem}.dropdown-input--leading-icon+input{padding-left:0.5rem}input{display:inline-block;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);padding:var(--goa-space-xs);padding-left:var(--goa-space-s);line-height:calc(40px - calc(var(--goa-space-xs) * 2));background-color:transparent;width:100%;flex:1 1 auto;font-family:var(--goa-font-family-sans);z-index:1}input,input:focus,input:hover,input:active{outline:none;border:none}input[aria-disabled="true"]{color:var(--goa-color-text-secondary)}.dropdown-input-group--disabled,.dropdown-input-group--disabled:hover,.dropdown-input-group--disabled:active,.dropdown-input-group--disabled:focus{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200) !important;cursor:default;box-shadow:none !important}ul[role="listbox"]{border-radius:var(--goa-border-radius-m)}.dropdown-item{margin:0;padding:0.5rem;cursor:pointer;color:var(--goa-color-greyscale-black);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-item:hover,.dropdown-item--highlighted{background:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover)}.dropdown-item[aria-selected="true"]{background:var(--goa-color-interactive-default);color:var(--goa-color-greyscale-white)}.dropdown-item[aria-selected="true"]:hover,.dropdown-item[aria-selected="true"].dropdown-item--highlighted{background:var(--goa-color-interactive-hover);color:var(--goa-color-greyscale-white)}.dropdown-native{position:relative;border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);background-color:var(--goa-color-greyscale-white);transition:box-shadow 0.1s ease-in}.dropdown-native:has(select:disabled){background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);box-shadow:none;color:var(--goa-color-text-secondary);cursor:default}.dropdown-native:has(select.error){border:2px solid var(--goa-color-interactive-error)}.dropdown-native:hover{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}select{border:none;font:var(--goa-font-family-sans);background-color:transparent;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);appearance:none;padding:calc(var(--goa-space-xs) + 1px);padding-left:var(--goa-space-s);padding-right:3rem;outline:none;width:100%}.dropdown-native::after{content:"";position:absolute;right:0.6rem;top:0.6rem;pointer-events:none;width:1.5rem;height:1.5rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='none' stroke='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 184l144 144 144-144' /%3E%3C/svg%3E");background-repeat:none}.dropdown-native:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$E,create_fragment$H,safe_not_equal,{name:1,arialabel:2,arialabelledby:3,value:0,filterable:39,leadingicon:4,maxheight:5,placeholder:6,width:7,disabled:8,error:40,multiselect:41,native:42,relative:9,mt:10,mr:11,mb:12,ml:13,id:14},null,[-1,-1,-1]);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["name","arialabel","arialabelledby","value","filterable","leadingicon","maxheight","placeholder","width","disabled","error","multiselect","native","relative","mt","mr","mb","ml","id"];}get name(){return this.$$.ctx[1];}set name(name){this.$$set({name});flush();}get arialabel(){return this.$$.ctx[2];}set arialabel(arialabel){this.$$set({arialabel});flush();}get arialabelledby(){return this.$$.ctx[3];}set arialabelledby(arialabelledby){this.$$set({arialabelledby});flush();}get value(){return this.$$.ctx[0];}set value(value){this.$$set({value});flush();}get filterable(){return this.$$.ctx[39];}set filterable(filterable){this.$$set({filterable});flush();}get leadingicon(){return this.$$.ctx[4];}set leadingicon(leadingicon){this.$$set({leadingicon});flush();}get maxheight(){return this.$$.ctx[5];}set maxheight(maxheight){this.$$set({maxheight});flush();}get placeholder(){return this.$$.ctx[6];}set placeholder(placeholder){this.$$set({placeholder});flush();}get width(){return this.$$.ctx[7];}set width(width){this.$$set({width});flush();}get disabled(){return this.$$.ctx[8];}set disabled(disabled){this.$$set({disabled});flush();}get error(){return this.$$.ctx[40];}set error(error){this.$$set({error});flush();}get multiselect(){return this.$$.ctx[41];}set multiselect(multiselect){this.$$set({multiselect});flush();}get native(){return this.$$.ctx[42];}set native(native){this.$$set({native});flush();}get relative(){return this.$$.ctx[9];}set relative(relative){this.$$set({relative});flush();}get mt(){return this.$$.ctx[10];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[11];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[12];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[13];}set ml(ml){this.$$set({ml});flush();}get id(){return this.$$.ctx[14];}set id(id){this.$$set({id});flush();}}customElements.define("goa-dropdown",Dropdown);/* libs/web-components/src/components/dropdown/DropdownItem.svelte generated by Svelte v3.59.2 */function create_fragment$G(ctx){return {c(){this.c=noop;},m:noop,p:noop,i:noop,o:noop,d:noop};}function instance$D($$self,$$props,$$invalidate){let{filter=""}=$$props;let{label=""}=$$props;let{value=""}=$$props;$$self.$$set=$$props=>{if('filter'in $$props)$$invalidate(0,filter=$$props.filter);if('label'in $$props)$$invalidate(1,label=$$props.label);if('value'in $$props)$$invalidate(2,value=$$props.value);};return [filter,label,value];}class DropdownItem extends SvelteElement{constructor(options){super();init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$D,create_fragment$G,safe_not_equal,{filter:0,label:1,value:2},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["filter","label","value"];}get filter(){return this.$$.ctx[0];}set filter(filter){this.$$set({filter});flush();}get label(){return this.$$.ctx[1];}set label(label){this.$$set({label});flush();}get value(){return this.$$.ctx[2];}set value(value){this.$$set({value});flush();}}customElements.define("goa-dropdown-item",DropdownItem);/* libs/web-components/src/components/focus-trap/FocusTrap.svelte generated by Svelte v3.59.2 */function create_fragment$F(ctx){let div;return {c(){div=element("div");div.innerHTML=`<span data-tab-boundry="start" tabindex="0"></span>
|
|
245
246
|
<slot></slot>
|
|
246
247
|
|
|
247
248
|
<span data-tab-boundry="end" tabindex="0"></span>`;this.c=noop;},m(target,anchor){insert(target,div,anchor);/*div_binding*/ctx[1](div);},p:noop,i:noop,o:noop,d(detaching){if(detaching)detach(div);/*div_binding*/ctx[1](null);}};}function isFocusable(node){var _a;const element=node;const isTabbable=element.tabIndex>0||element.tabIndex===0&&element.getAttribute('tabIndex')!==null;if(isTabbable)return node;if(element["disabled"])return null;if(element.tabIndex<0||((_a=element.getAttribute)===null||_a===void 0?void 0:_a.call(element,"tabindex"))==="-1")return null;switch(element.nodeName){case'A':{const el=element;if(!!el.href&&el.rel!=='ignore')return node;}case'INPUT':{const el=element;if(el.type!=='hidden'&&el.type!=='file')return node;}case'BUTTON':case'SELECT':case'TEXTAREA':return node;default:return null;}}function instance$C($$self,$$props,$$invalidate){let rootEl;let boundryStartEl;let boundryEndEl;let isShiftPressed;// Hooks
|
|
@@ -360,6 +361,7 @@ $$invalidate(8,_pageCount=Math.ceil(itemcount/perpagecount));}};return [pagenumb
|
|
|
360
361
|
${cssVar("--offset-right",/*hoffset*/ctx[9])}
|
|
361
362
|
${cssVar("--focus-border-width",/*focusborderwidth*/ctx[10])}
|
|
362
363
|
${cssVar("--border-radius",/*borderradius*/ctx[11])}
|
|
364
|
+
${cssVar("width","100%")}
|
|
363
365
|
`);},m(target,anchor){insert(target,div1,anchor);append(div1,div0);append(div0,slot);/*div0_binding*/ctx[27](div0);append(div1,t);if(if_block)if_block.m(div1,null);/*div1_binding_1*/ctx[31](div1);if(!mounted){dispose=listen(div0,"click",/*openPopover*/ctx[20]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*tabindex*/128&&div0_tabindex_value!==(div0_tabindex_value=+/*tabindex*/ctx[7])){attr(div0,"tabindex",div0_tabindex_value);}if(/*_open*/ctx[13]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$e(ctx);if_block.c();if_block.m(div1,null);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty[0]&/*testid*/1){attr(div1,"data-testid",/*testid*/ctx[0]);}if(dirty[0]&/*_relative, mt, mr, mb, ml, voffset, hoffset, focusborderwidth, borderradius*/266104&&div1_style_value!==(div1_style_value=`
|
|
364
366
|
${/*_relative*/ctx[18]&&"position: relative;"}
|
|
365
367
|
${calculateMargin(/*mt*/ctx[3],/*mr*/ctx[4],/*mb*/ctx[5],/*ml*/ctx[6])}
|
|
@@ -369,6 +371,7 @@ $$invalidate(8,_pageCount=Math.ceil(itemcount/perpagecount));}};return [pagenumb
|
|
|
369
371
|
${cssVar("--offset-right",/*hoffset*/ctx[9])}
|
|
370
372
|
${cssVar("--focus-border-width",/*focusborderwidth*/ctx[10])}
|
|
371
373
|
${cssVar("--border-radius",/*borderradius*/ctx[11])}
|
|
374
|
+
${cssVar("width","100%")}
|
|
372
375
|
`)){attr(div1,"style",div1_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div1);/*div0_binding*/ctx[27](null);if(if_block)if_block.d();/*div1_binding_1*/ctx[31](null);mounted=false;dispose();}};}function getBoundingClientRectWithMargins(el){const rect=el.getBoundingClientRect();const style=window.getComputedStyle(el);const mTop=parseInt(style.marginTop,10)||0;const mRight=parseInt(style.marginRight,10)||0;const mBottom=parseInt(style.marginBottom,10)||0;const mLeft=parseInt(style.marginLeft,10)||0;return {top:rect.top-mTop,right:rect.right+mRight,bottom:rect.bottom+mBottom,left:rect.left-mLeft,width:rect.width+mLeft+mRight,height:rect.height+mTop+mBottom,x:rect.x-mLeft,y:rect.y-mTop};}function instance$n($$self,$$props,$$invalidate){let _padded;let _open;let _disabled;let _relative;let{testid="popover"}=$$props;let{maxwidth="320px"}=$$props;let{width=""}=$$props;let{padded="true"}=$$props;let{position="auto"}=$$props;let{relative="false"}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{open="false"}=$$props;let{disabled="false"}=$$props;let{tabindex="0"}=$$props;let{voffset=""}=$$props;let{hoffset=""}=$$props;let{focusborderwidth="var(--goa-border-width-l)"}=$$props;let{borderradius="var(--goa-border-radius-m)"}=$$props;// Private
|
|
373
376
|
let _rootEl;let _targetEl;let _popoverEl;let _focusTrapEl;let _initFocusedEl;let _sectionHeight;// Hooks
|
|
374
377
|
onMount(async()=>{await tick();_targetEl.addEventListener("keydown",onTargetEvent);const slot=_targetEl.querySelector("slot");let children;if(slot){children=slot.assignedElements();}else {// for unit tests only
|
|
@@ -392,7 +395,7 @@ const displayOnTop=position==="auto"?spaceBelow<contentRect.height&&spaceAbove>c
|
|
|
392
395
|
const usingNoScroll=document.body.style.overflow==="hidden";const windowOffset=usingNoScroll?0:window.scrollY;// If there's more space above, display the popover above the target element
|
|
393
396
|
if(_relative){$$invalidate(16,_popoverEl.style.top=displayOnTop?`-${contentRect.height}px`:`${rootRect.height}px`,_popoverEl);}else {$$invalidate(16,_popoverEl.style.top=displayOnTop?`${rootRect.top-contentRect.height+windowOffset}px`:`${rootRect.top+rootRect.height+windowOffset}px`,_popoverEl);}// Move the popover to the left if it is too far to the right and only if there is space to the left
|
|
394
397
|
const displayOnRight=document.body.clientWidth-targetRect.left<contentRect.width&&targetRect.left>contentRect.width;if(_relative){if(displayOnRight){$$invalidate(16,_popoverEl.style.right="0",_popoverEl);}else {$$invalidate(16,_popoverEl.style.left="0",_popoverEl);}}else {$$invalidate(16,_popoverEl.style.left=displayOnRight?`${rootRect.left+targetRect.width-contentRect.width}px`:`${rootRect.left}px`,_popoverEl);}}function div0_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_targetEl=$$value;$$invalidate(15,_targetEl);});}function div1_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_focusTrapEl=$$value;$$invalidate(17,_focusTrapEl);});}function section_elementresize_handler(){_sectionHeight=this.clientHeight;$$invalidate(12,_sectionHeight);}function section_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_popoverEl=$$value;$$invalidate(16,_popoverEl);});}function div1_binding_1($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(14,_rootEl);});}$$self.$$set=$$props=>{if('testid'in $$props)$$invalidate(0,testid=$$props.testid);if('maxwidth'in $$props)$$invalidate(1,maxwidth=$$props.maxwidth);if('width'in $$props)$$invalidate(2,width=$$props.width);if('padded'in $$props)$$invalidate(22,padded=$$props.padded);if('position'in $$props)$$invalidate(23,position=$$props.position);if('relative'in $$props)$$invalidate(24,relative=$$props.relative);if('mt'in $$props)$$invalidate(3,mt=$$props.mt);if('mr'in $$props)$$invalidate(4,mr=$$props.mr);if('mb'in $$props)$$invalidate(5,mb=$$props.mb);if('ml'in $$props)$$invalidate(6,ml=$$props.ml);if('open'in $$props)$$invalidate(25,open=$$props.open);if('disabled'in $$props)$$invalidate(26,disabled=$$props.disabled);if('tabindex'in $$props)$$invalidate(7,tabindex=$$props.tabindex);if('voffset'in $$props)$$invalidate(8,voffset=$$props.voffset);if('hoffset'in $$props)$$invalidate(9,hoffset=$$props.hoffset);if('focusborderwidth'in $$props)$$invalidate(10,focusborderwidth=$$props.focusborderwidth);if('borderradius'in $$props)$$invalidate(11,borderradius=$$props.borderradius);};$$self.$$.update=()=>{if($$self.$$.dirty[0]&/*padded*/4194304){// Reactive
|
|
395
|
-
$$invalidate(19,_padded=toBoolean(padded));}if($$self.$$.dirty[0]&/*open*/33554432){$$invalidate(13,_open=toBoolean(open));}if($$self.$$.dirty[0]&/*disabled*/67108864){_disabled=toBoolean(disabled);}if($$self.$$.dirty[0]&/*relative*/16777216){$$invalidate(18,_relative=toBoolean(relative));}if($$self.$$.dirty[0]&/*_open*/8192){(async()=>_open&&(await setPopoverPosition()))();}if($$self.$$.dirty[0]&/*_sectionHeight*/4096){(async()=>_sectionHeight&&(await setPopoverPosition()))();}if($$self.$$.dirty[0]&/*_open*/8192){{if(_open){window.addEventListener("popstate",handleUrlChange,true);}else {window.removeEventListener("popstate",handleUrlChange,true);}}}};return [testid,maxwidth,width,mt,mr,mb,ml,tabindex,voffset,hoffset,focusborderwidth,borderradius,_sectionHeight,_open,_rootEl,_targetEl,_popoverEl,_focusTrapEl,_relative,_padded,openPopover,closePopover,padded,position,relative,open,disabled,div0_binding,div1_binding,section_elementresize_handler,section_binding,div1_binding_1];}class Popover extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4);display:flex;align-items:center}.popover-target{
|
|
398
|
+
$$invalidate(19,_padded=toBoolean(padded));}if($$self.$$.dirty[0]&/*open*/33554432){$$invalidate(13,_open=toBoolean(open));}if($$self.$$.dirty[0]&/*disabled*/67108864){_disabled=toBoolean(disabled);}if($$self.$$.dirty[0]&/*relative*/16777216){$$invalidate(18,_relative=toBoolean(relative));}if($$self.$$.dirty[0]&/*_open*/8192){(async()=>_open&&(await setPopoverPosition()))();}if($$self.$$.dirty[0]&/*_sectionHeight*/4096){(async()=>_sectionHeight&&(await setPopoverPosition()))();}if($$self.$$.dirty[0]&/*_open*/8192){{if(_open){window.addEventListener("popstate",handleUrlChange,true);}else {window.removeEventListener("popstate",handleUrlChange,true);}}}};return [testid,maxwidth,width,mt,mr,mb,ml,tabindex,voffset,hoffset,focusborderwidth,borderradius,_sectionHeight,_open,_rootEl,_targetEl,_popoverEl,_focusTrapEl,_relative,_padded,openPopover,closePopover,padded,position,relative,open,disabled,div0_binding,div1_binding,section_elementresize_handler,section_binding,div1_binding_1];}class Popover extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4);display:flex;align-items:center}.popover-target{cursor:pointer}.popover-target:focus{outline:var(--focus-border-width) solid var(--goa-color-interactive-focus)}.popover-content{color:var(--goa-color-text-default);position:absolute;width:fit-content;max-width:260px;list-style-type:none;background:var(--goa-color-greyscale-white);border-radius:var(--border-radius);outline:none;filter:drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.2));z-index:99;width:max-content;margin-top:var(--offset-top, 3px);margin-bottom:var(--offset-bottom, 3px);margin-left:var(--offset-left, 0);margin-right:var(--offset-right, 0)}::slotted(ul){display:block;padding:0;margin:0;list-style-type:none;line-height:2rem}.popover-background{cursor:default;position:fixed;z-index:98;inset:0}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$n,create_fragment$q,safe_not_equal,{testid:0,maxwidth:1,width:2,padded:22,position:23,relative:24,mt:3,mr:4,mb:5,ml:6,open:25,disabled:26,tabindex:7,voffset:8,hoffset:9,focusborderwidth:10,borderradius:11},null,[-1,-1]);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["testid","maxwidth","width","padded","position","relative","mt","mr","mb","ml","open","disabled","tabindex","voffset","hoffset","focusborderwidth","borderradius"];}get testid(){return this.$$.ctx[0];}set testid(testid){this.$$set({testid});flush();}get maxwidth(){return this.$$.ctx[1];}set maxwidth(maxwidth){this.$$set({maxwidth});flush();}get width(){return this.$$.ctx[2];}set width(width){this.$$set({width});flush();}get padded(){return this.$$.ctx[22];}set padded(padded){this.$$set({padded});flush();}get position(){return this.$$.ctx[23];}set position(position){this.$$set({position});flush();}get relative(){return this.$$.ctx[24];}set relative(relative){this.$$set({relative});flush();}get mt(){return this.$$.ctx[3];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[4];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[5];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[6];}set ml(ml){this.$$set({ml});flush();}get open(){return this.$$.ctx[25];}set open(open){this.$$set({open});flush();}get disabled(){return this.$$.ctx[26];}set disabled(disabled){this.$$set({disabled});flush();}get tabindex(){return this.$$.ctx[7];}set tabindex(tabindex){this.$$set({tabindex});flush();}get voffset(){return this.$$.ctx[8];}set voffset(voffset){this.$$set({voffset});flush();}get hoffset(){return this.$$.ctx[9];}set hoffset(hoffset){this.$$set({hoffset});flush();}get focusborderwidth(){return this.$$.ctx[10];}set focusborderwidth(focusborderwidth){this.$$set({focusborderwidth});flush();}get borderradius(){return this.$$.ctx[11];}set borderradius(borderradius){this.$$set({borderradius});flush();}}customElements.define("goa-popover",Popover);/* libs/web-components/src/components/radio-group/RadioGroup.svelte generated by Svelte v3.59.2 */function get_each_context$3(ctx,list,i){const child_ctx=ctx.slice();child_ctx[22]=list[i];child_ctx[24]=i;return child_ctx;}// (105:6) {#if option.description}
|
|
396
399
|
function create_if_block$d(ctx){let div;let t_value=/*option*/ctx[22].description+"";let t;let div_id_value;return {c(){div=element("div");t=text(t_value);attr(div,"class","goa-radio-description");attr(div,"id",div_id_value=`description-${/*name*/ctx[1]}-${/*index*/ctx[24]}`);},m(target,anchor){insert(target,div,anchor);append(div,t);},p(ctx,dirty){if(dirty&/*options*/512&&t_value!==(t_value=/*option*/ctx[22].description+""))set_data(t,t_value);if(dirty&/*name, options*/514&&div_id_value!==(div_id_value=`description-${/*name*/ctx[1]}-${/*index*/ctx[24]}`)){attr(div,"id",div_id_value);}},d(detaching){if(detaching)detach(div);}};}// (82:2) {#each options as option, index (option.value)}
|
|
397
400
|
function create_each_block$3(key_1,ctx){let div1;let label;let input;let input_value_value;let input_checked_value;let input_aria_label_value;let input_aria_describedby_value;let t0;let div0;let t1;let span;let t2_value=(/*option*/ctx[22].label||/*option*/ctx[22].value)+"";let t2;let label_data_testid_value;let t3;let t4;let mounted;let dispose;function change_handler(){return(/*change_handler*/ctx[16](/*option*/ctx[22]));}let if_block=/*option*/ctx[22].description&&create_if_block$d(ctx);return {key:key_1,first:null,c(){div1=element("div");label=element("label");input=element("input");t0=space();div0=element("div");t1=space();span=element("span");t2=text(t2_value);t3=space();if(if_block)if_block.c();t4=space();attr(input,"type","radio");attr(input,"name",/*name*/ctx[1]);input.value=input_value_value=/*option*/ctx[22].value;input.disabled=/*isDisabled*/ctx[12];input.checked=input_checked_value=/*option*/ctx[22].value===/*value*/ctx[0];attr(input,"aria-label",input_aria_label_value=/*arialabel*/ctx[4]||/*name*/ctx[1]);attr(input,"aria-describedby",input_aria_describedby_value=`description-${/*name*/ctx[1]}-${/*index*/ctx[24]}`);attr(div0,"class","goa-radio-icon");attr(span,"class","goa-radio-label");attr(label,"data-testid",label_data_testid_value="radio-option-"+/*option*/ctx[22].value);attr(label,"class","goa-radio");toggle_class(label,"goa-radio--disabled",/*isDisabled*/ctx[12]);toggle_class(label,"goa-radio--error",/*isError*/ctx[11]);attr(div1,"class","goa-radio-container");this.first=div1;},m(target,anchor){insert(target,div1,anchor);append(div1,label);append(label,input);append(label,t0);append(label,div0);append(label,t1);append(label,span);append(span,t2);append(div1,t3);if(if_block)if_block.m(div1,null);append(div1,t4);if(!mounted){dispose=listen(input,"change",change_handler);mounted=true;}},p(new_ctx,dirty){ctx=new_ctx;if(dirty&/*name*/2){attr(input,"name",/*name*/ctx[1]);}if(dirty&/*options*/512&&input_value_value!==(input_value_value=/*option*/ctx[22].value)){input.value=input_value_value;}if(dirty&/*isDisabled*/4096){input.disabled=/*isDisabled*/ctx[12];}if(dirty&/*options, value*/513&&input_checked_value!==(input_checked_value=/*option*/ctx[22].value===/*value*/ctx[0])){input.checked=input_checked_value;}if(dirty&/*arialabel, name*/18&&input_aria_label_value!==(input_aria_label_value=/*arialabel*/ctx[4]||/*name*/ctx[1])){attr(input,"aria-label",input_aria_label_value);}if(dirty&/*name, options*/514&&input_aria_describedby_value!==(input_aria_describedby_value=`description-${/*name*/ctx[1]}-${/*index*/ctx[24]}`)){attr(input,"aria-describedby",input_aria_describedby_value);}if(dirty&/*options*/512&&t2_value!==(t2_value=(/*option*/ctx[22].label||/*option*/ctx[22].value)+""))set_data(t2,t2_value);if(dirty&/*options*/512&&label_data_testid_value!==(label_data_testid_value="radio-option-"+/*option*/ctx[22].value)){attr(label,"data-testid",label_data_testid_value);}if(dirty&/*isDisabled*/4096){toggle_class(label,"goa-radio--disabled",/*isDisabled*/ctx[12]);}if(dirty&/*isError*/2048){toggle_class(label,"goa-radio--error",/*isError*/ctx[11]);}if(/*option*/ctx[22].description){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$d(ctx);if_block.c();if_block.m(div1,t4);}}else if(if_block){if_block.d(1);if_block=null;}},d(detaching){if(detaching)detach(div1);if(if_block)if_block.d();mounted=false;dispose();}};}function create_fragment$p(ctx){let div;let slot;let t;let each_blocks=[];let each_1_lookup=new Map();let div_style_value;let div_class_value;let each_value=/*options*/ctx[9];const get_key=ctx=>/*option*/ctx[22].value;for(let i=0;i<each_value.length;i+=1){let child_ctx=get_each_context$3(ctx,each_value,i);let key=get_key(child_ctx);each_1_lookup.set(key,each_blocks[i]=create_each_block$3(key,child_ctx));}return {c(){div=element("div");slot=element("slot");t=space();for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}this.c=noop;attr(div,"style",div_style_value=calculateMargin(/*mt*/ctx[5],/*mr*/ctx[6],/*mb*/ctx[7],/*ml*/ctx[8]));attr(div,"class",div_class_value=`goa-radio-group--${/*orientation*/ctx[2]}`);attr(div,"data-testid",/*testid*/ctx[3]);},m(target,anchor){insert(target,div,anchor);append(div,slot);append(div,t);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(div,null);}}/*div_binding*/ctx[17](div);},p(ctx,[dirty]){if(dirty&/*name, options, isDisabled, isError, value, arialabel, onChange*/14867){each_value=/*options*/ctx[9];each_blocks=update_keyed_each(each_blocks,dirty,get_key,1,ctx,each_value,each_1_lookup,div,destroy_block,create_each_block$3,null,get_each_context$3);}if(dirty&/*mt, mr, mb, ml*/480&&div_style_value!==(div_style_value=calculateMargin(/*mt*/ctx[5],/*mr*/ctx[6],/*mb*/ctx[7],/*ml*/ctx[8]))){attr(div,"style",div_style_value);}if(dirty&/*orientation*/4&&div_class_value!==(div_class_value=`goa-radio-group--${/*orientation*/ctx[2]}`)){attr(div,"class",div_class_value);}if(dirty&/*testid*/8){attr(div,"data-testid",/*testid*/ctx[3]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].d();}/*div_binding*/ctx[17](null);}};}function instance$m($$self,$$props,$$invalidate){let isDisabled;let isError;const[Orientations,validateOrientation]=typeValidator("Radio group orientation",["vertical","horizontal"]);let{name}=$$props;let{value}=$$props;let{orientation="vertical"}=$$props;let{disabled="false"}=$$props;let{error="false"}=$$props;let{testid=""}=$$props;let{arialabel=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let options=[];let el;onMount(async()=>{await tick();$$invalidate(9,options=getOptions());});/**
|
|
398
401
|
* Allows the child elements to be obtainable within unit tests
|
package/react-components.umd.js
CHANGED
|
@@ -100,10 +100,11 @@
|
|
|
100
100
|
$$.fragment&&$$.fragment.c();}if(options.intro)transition_in(component.$$.fragment);mount_component(component,options.target,options.anchor,options.customElement);flush();}set_current_component(parent_component);}let SvelteElement;if(typeof HTMLElement==='function'){SvelteElement=class extends HTMLElement{constructor(){super();this.attachShadow({mode:'open'});}connectedCallback(){const{on_mount}=this.$$;this.$$.on_disconnect=on_mount.map(run).filter(is_function);// @ts-ignore todo: improve typings
|
|
101
101
|
for(const key in this.$$.slotted){// @ts-ignore todo: improve typings
|
|
102
102
|
this.appendChild(this.$$.slotted[key]);}}attributeChangedCallback(attr,_oldValue,newValue){this[attr]=newValue;}disconnectedCallback(){run_all(this.$$.on_disconnect);}$destroy(){destroy_component(this,1);this.$destroy=noop;}$on(type,callback){// TODO should this delegate to addEventListener?
|
|
103
|
-
if(!is_function(callback)){return noop;}const callbacks=this.$$.callbacks[type]||(this.$$.callbacks[type]=[]);callbacks.push(callback);return ()=>{const index=callbacks.indexOf(callback);if(index!==-1)callbacks.splice(index,1);};}$set($$props){if(this.$$set&&!is_empty($$props)){this.$$.skip_bound=true;this.$$set($$props);this.$$.skip_bound=false;}}};}const conversions={"0":"none","1":"3xs","2":"2xs","3":"xs","4":"s","5":"m","6":"l","7":"xl","8":"2xl","9":"3xl","10":"4xl"};function convertSpacing(size){if(!Number.isInteger(+size)){return size;}return conversions[size]||"";}function calculateMargin(mt,mr,mb,ml){mt=convertSpacing(mt);mb=convertSpacing(mb);ml=convertSpacing(ml);mr=convertSpacing(mr);return [mt&&`margin-top:var(--goa-space-${mt});`,mr&&`margin-right:var(--goa-space-${mr});`,mb&&`margin-bottom:var(--goa-space-${mb});`,ml&&`margin-left:var(--goa-space-${ml});`].join(" ");}function injectCss(el,rootSelector,css,media){const style=document.createElement("style");const _css=Object.entries(css).map(entry=>`${entry[0]}: ${entry[1]};`).join(" ");if(media){style.innerHTML=`@media (${media}) { ${rootSelector} {${_css}} }`;}else {style.innerHTML=`${rootSelector} {${_css}}`;}el.appendChild(style);}function toBoolean(value){if(value==="false"){return false;}if(value===""){return true;}return !!value;}function fromBoolean(value){return value?"true":"false";}function validateRequired(componentName,props){Object.entries(props).forEach(prop=>{if(!prop[1]){console.warn(`${componentName}: ${prop[0]} is required`);}});}function typeValidator(message,values,required=false){const validator=value=>{if(!required&&!value){return;}if(!values.includes(value)){console.error(`[${value}] is an invalid ${message.toLowerCase()}`);}};return [values,validator];}function getTimestamp(val){const months=["January","February","March","April","May","June","July","August","September","October","November","December"];const now=val||new Date();const hour24=now.getHours();const min0=now.getMinutes();const date=now.getDate();const month=months[now.getMonth()];const year=now.getFullYear();const hour=hour24===0&&12||hour24>12&&hour24-12||hour24;const meridium=hour24===0&&"AM"||hour24>=12&&"PM"||"AM";const min=min0<10&&`0${min0}`||min0;const ordinal=date%10===1&&date!==11&&"st"||date%10===2&&date!==12&&"nd"||date%10===3&&date!==13&&"rd"||"th";return `${month} ${date}${ordinal} ${year}, ${hour}:${min} ${meridium}`;}function cssVar(name,value){return value?`${name}: ${value};`:"";}/* libs/web-components/src/components/accordion/Accordion.svelte generated by Svelte v3.59.2 */function create_fragment$Z(ctx){let div3;let details;let summary;let goa_icon;let goa_icon_fillcolor_value;let t0;let div1;let span0;let t1;let span0_class_value;let span0_data_testid_value;let t2;let span1;let t3;let t4;let div0;let summary_class_value;let t5;let div2;let div3_style_value;let mounted;let dispose;return {c(){div3=element("div");details=element("details");summary=element("summary");goa_icon=element("goa-icon");t0=space();div1=element("div");span0=element("span");t1=text(/*heading*/ctx[0]);t2=space();span1=element("span");t3=text(/*secondarytext*/ctx[1]);t4=space();div0=element("div");div0.innerHTML=`<slot name="headingcontent"></slot>`;t5=space();div2=element("div");div2.innerHTML=`<slot></slot>`;this.c=noop;set_custom_element_data(goa_icon,"type","chevron-forward");set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value=/*_hovering*/ctx[8]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)");attr(span0,"class",span0_class_value="heading heading-"+/*headingsize*/ctx[2]);attr(span0,"data-testid",span0_data_testid_value=`${/*testid*/ctx[3]}-heading`);attr(span1,"class","secondary-text");attr(div0,"class","heading-content");attr(div1,"class","title");attr(summary,"class",summary_class_value=`container-${/*headingsize*/ctx[2]}`);attr(div2,"class","content");details.open=/*isOpen*/ctx[
|
|
103
|
+
if(!is_function(callback)){return noop;}const callbacks=this.$$.callbacks[type]||(this.$$.callbacks[type]=[]);callbacks.push(callback);return ()=>{const index=callbacks.indexOf(callback);if(index!==-1)callbacks.splice(index,1);};}$set($$props){if(this.$$set&&!is_empty($$props)){this.$$.skip_bound=true;this.$$set($$props);this.$$.skip_bound=false;}}};}const conversions={"0":"none","1":"3xs","2":"2xs","3":"xs","4":"s","5":"m","6":"l","7":"xl","8":"2xl","9":"3xl","10":"4xl"};function convertSpacing(size){if(!Number.isInteger(+size)){return size;}return conversions[size]||"";}function calculateMargin(mt,mr,mb,ml){mt=convertSpacing(mt);mb=convertSpacing(mb);ml=convertSpacing(ml);mr=convertSpacing(mr);return [mt&&`margin-top:var(--goa-space-${mt});`,mr&&`margin-right:var(--goa-space-${mr});`,mb&&`margin-bottom:var(--goa-space-${mb});`,ml&&`margin-left:var(--goa-space-${ml});`].join(" ");}function injectCss(el,rootSelector,css,media){const style=document.createElement("style");const _css=Object.entries(css).map(entry=>`${entry[0]}: ${entry[1]};`).join(" ");if(media){style.innerHTML=`@media (${media}) { ${rootSelector} {${_css}} }`;}else {style.innerHTML=`${rootSelector} {${_css}}`;}el.appendChild(style);}function toBoolean(value){if(value==="false"){return false;}if(value===""){return true;}return !!value;}function fromBoolean(value){return value?"true":"false";}function validateRequired(componentName,props){Object.entries(props).forEach(prop=>{if(!prop[1]){console.warn(`${componentName}: ${prop[0]} is required`);}});}function typeValidator(message,values,required=false){const validator=value=>{if(!required&&!value){return;}if(!values.includes(value)){console.error(`[${value}] is an invalid ${message.toLowerCase()}`);}};return [values,validator];}function getTimestamp(val){const months=["January","February","March","April","May","June","July","August","September","October","November","December"];const now=val||new Date();const hour24=now.getHours();const min0=now.getMinutes();const date=now.getDate();const month=months[now.getMonth()];const year=now.getFullYear();const hour=hour24===0&&12||hour24>12&&hour24-12||hour24;const meridium=hour24===0&&"AM"||hour24>=12&&"PM"||"AM";const min=min0<10&&`0${min0}`||min0;const ordinal=date%10===1&&date!==11&&"st"||date%10===2&&date!==12&&"nd"||date%10===3&&date!==13&&"rd"||"th";return `${month} ${date}${ordinal} ${year}, ${hour}:${min} ${meridium}`;}function cssVar(name,value){return value?`${name}: ${value};`:"";}/* libs/web-components/src/components/accordion/Accordion.svelte generated by Svelte v3.59.2 */function create_fragment$Z(ctx){let div3;let details;let summary;let goa_icon;let goa_icon_fillcolor_value;let t0;let div1;let span0;let t1;let span0_class_value;let span0_data_testid_value;let t2;let span1;let t3;let t4;let div0;let summary_class_value;let t5;let div2;let div3_style_value;let mounted;let dispose;return {c(){div3=element("div");details=element("details");summary=element("summary");goa_icon=element("goa-icon");t0=space();div1=element("div");span0=element("span");t1=text(/*heading*/ctx[0]);t2=space();span1=element("span");t3=text(/*secondarytext*/ctx[1]);t4=space();div0=element("div");div0.innerHTML=`<slot name="headingcontent"></slot>`;t5=space();div2=element("div");div2.innerHTML=`<slot></slot>`;this.c=noop;set_custom_element_data(goa_icon,"type","chevron-forward");set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value=/*_hovering*/ctx[8]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)");attr(span0,"class",span0_class_value="heading heading-"+/*headingsize*/ctx[2]);attr(span0,"data-testid",span0_data_testid_value=`${/*testid*/ctx[3]}-heading`);attr(span1,"class","secondary-text");attr(div0,"class","heading-content");toggle_class(div0,"heading-content-top",/*_headingContentSlotChildren*/ctx[10].length);attr(div1,"class","title");attr(summary,"class",summary_class_value=`container-${/*headingsize*/ctx[2]}`);attr(div2,"class","content");details.open=/*isOpen*/ctx[11];attr(div3,"style",div3_style_value=calculateMargin(/*mt*/ctx[4],/*mr*/ctx[5],/*mb*/ctx[6],/*ml*/ctx[7]));attr(div3,"class",`
|
|
104
104
|
goa-accordion
|
|
105
|
-
`);attr(div3,"data-testid",/*testid*/ctx[3]);},m(target,anchor){insert(target,div3,anchor);append(div3,details);append(details,summary);append(summary,goa_icon);append(summary,t0);append(summary,div1);append(div1,span0);append(span0,t1);append(div1,t2);append(div1,span1);append(span1,t3);append(div1,t4);append(div1,div0);append(details,t5);append(details,div2);if(!mounted){dispose=[listen(summary,"mouseover",/*mouseover_handler*/ctx[
|
|
106
|
-
|
|
105
|
+
`);attr(div3,"data-testid",/*testid*/ctx[3]);},m(target,anchor){insert(target,div3,anchor);append(div3,details);append(details,summary);append(summary,goa_icon);append(summary,t0);append(summary,div1);append(div1,span0);append(span0,t1);append(div1,t2);append(div1,span1);append(span1,t3);append(div1,t4);append(div1,div0);/*div1_binding*/ctx[13](div1);append(details,t5);append(details,div2);if(!mounted){dispose=[listen(summary,"mouseover",/*mouseover_handler*/ctx[14]),listen(summary,"mouseout",/*mouseout_handler*/ctx[15]),listen(summary,"focus",/*focus_handler*/ctx[16]),listen(summary,"blur",/*blur_handler*/ctx[17])];mounted=true;}},p(ctx,[dirty]){if(dirty&/*_hovering*/256&&goa_icon_fillcolor_value!==(goa_icon_fillcolor_value=/*_hovering*/ctx[8]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)")){set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value);}if(dirty&/*heading*/1)set_data(t1,/*heading*/ctx[0]);if(dirty&/*headingsize*/4&&span0_class_value!==(span0_class_value="heading heading-"+/*headingsize*/ctx[2])){attr(span0,"class",span0_class_value);}if(dirty&/*testid*/8&&span0_data_testid_value!==(span0_data_testid_value=`${/*testid*/ctx[3]}-heading`)){attr(span0,"data-testid",span0_data_testid_value);}if(dirty&/*secondarytext*/2)set_data(t3,/*secondarytext*/ctx[1]);if(dirty&/*_headingContentSlotChildren*/1024){toggle_class(div0,"heading-content-top",/*_headingContentSlotChildren*/ctx[10].length);}if(dirty&/*headingsize*/4&&summary_class_value!==(summary_class_value=`container-${/*headingsize*/ctx[2]}`)){attr(summary,"class",summary_class_value);}if(dirty&/*isOpen*/2048){details.open=/*isOpen*/ctx[11];}if(dirty&/*mt, mr, mb, ml*/240&&div3_style_value!==(div3_style_value=calculateMargin(/*mt*/ctx[4],/*mr*/ctx[5],/*mb*/ctx[6],/*ml*/ctx[7]))){attr(div3,"style",div3_style_value);}if(dirty&/*testid*/8){attr(div3,"data-testid",/*testid*/ctx[3]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div3);/*div1_binding*/ctx[13](null);mounted=false;run_all(dispose);}};}function instance$T($$self,$$props,$$invalidate){let isOpen;const[HeadingSizes,validateHeadingSize]=typeValidator("Accordion heading size",["small","medium"]);let{open="false"}=$$props;let{heading=""}=$$props;let{secondarytext=""}=$$props;let{headingsize="small"}=$$props;let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb="xs"}=$$props;let{ml=null}=$$props;let _hovering=false;let _titleEl=null;let _headingContentSlotChildren=[];onMount(()=>{validateRequired("GoAAccordion",{heading});validateHeadingSize(headingsize);$$invalidate(10,_headingContentSlotChildren=getChildren());});function getChildren(){if(_titleEl){const slot=_titleEl.querySelector("slot");if(slot){return [...slot.assignedElements()];}else {return [..._titleEl.children];// unit tests
|
|
106
|
+
}}return [];}function div1_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_titleEl=$$value;$$invalidate(9,_titleEl);});}const mouseover_handler=()=>$$invalidate(8,_hovering=true);const mouseout_handler=()=>$$invalidate(8,_hovering=false);const focus_handler=()=>$$invalidate(8,_hovering=false);const blur_handler=()=>$$invalidate(8,_hovering=false);$$self.$$set=$$props=>{if('open'in $$props)$$invalidate(12,open=$$props.open);if('heading'in $$props)$$invalidate(0,heading=$$props.heading);if('secondarytext'in $$props)$$invalidate(1,secondarytext=$$props.secondarytext);if('headingsize'in $$props)$$invalidate(2,headingsize=$$props.headingsize);if('testid'in $$props)$$invalidate(3,testid=$$props.testid);if('mt'in $$props)$$invalidate(4,mt=$$props.mt);if('mr'in $$props)$$invalidate(5,mr=$$props.mr);if('mb'in $$props)$$invalidate(6,mb=$$props.mb);if('ml'in $$props)$$invalidate(7,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*open*/4096){$$invalidate(11,isOpen=toBoolean(open));}};return [heading,secondarytext,headingsize,testid,mt,mr,mb,ml,_hovering,_titleEl,_headingContentSlotChildren,isOpen,open,div1_binding,mouseover_handler,mouseout_handler,focus_handler,blur_handler];}class Accordion extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4)}.goa-accordion,.goa-accordion *{box-sizing:border-box}summary{min-height:3.5rem;border-width:var(--goa-border-width-s);border-style:solid;border-radius:var(--goa-border-radius-m);background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);color:var(--goa-color-text-default);;;padding:0.875rem 1rem 0 0;cursor:pointer;list-style:none;display:flex;align-items:flex-start;position:relative}summary.container-medium{min-height:4rem}summary::marker,summary::-webkit-details-marker{display:none}summary .title{display:flex;align-items:center;flex:1}.title span{padding-bottom:var(--goa-space-3xs, 0)}summary .heading{font:var(--goa-typography-heading-s);padding-right:1rem}summary .secondary-text{font:var(--goa-typography-body-s);line-height:1.5rem;padding-right:1rem}summary .heading-content{flex:1
|
|
107
|
+
}.content{border-bottom:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-left:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-right:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-bottom-left-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m);padding:1.5rem;padding-left:3.5rem;padding-right:2rem}.content ::slotted(p:last-child){margin-bottom:0 !important}summary goa-icon{padding:0.125rem 1rem}summary.container-medium goa-icon{padding:0.375rem 1rem}details[open] goa-icon{transform:rotate(90deg)}details[open] summary{border-bottom-left-radius:var(--goa-border-radius-none);border-bottom-right-radius:var(--goa-border-radius-none)}summary:hover{background-color:var(--goa-color-greyscale-200)}summary:focus,summary:active{background-color:var(--goa-color-greyscale-100);outline:none}summary:active::before,summary:focus::before{content:"";position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:var(--goa-border-width-l) solid var(--goa-color-interactive-focus);border-radius:4px}summary .heading.heading-medium{line-height:2rem;font:var(--goa-typography-heading-m)}@media(max-width: 640px){summary{align-items:flex-start}summary .title{flex-direction:column;align-items:flex-start;padding-bottom:0.875rem}summary .title span{padding-bottom:0}summary .heading-content.heading-content-top{margin-top:var(--goa-space-xs)}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$T,create_fragment$Z,safe_not_equal,{open:12,heading:0,secondarytext:1,headingsize:2,testid:3,mt:4,mr:5,mb:6,ml:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["open","heading","secondarytext","headingsize","testid","mt","mr","mb","ml"];}get open(){return this.$$.ctx[12];}set open(open){this.$$set({open});flush();}get heading(){return this.$$.ctx[0];}set heading(heading){this.$$set({heading});flush();}get secondarytext(){return this.$$.ctx[1];}set secondarytext(secondarytext){this.$$set({secondarytext});flush();}get headingsize(){return this.$$.ctx[2];}set headingsize(headingsize){this.$$set({headingsize});flush();}get testid(){return this.$$.ctx[3];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[4];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[5];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[6];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[7];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-accordion",Accordion);/* libs/web-components/src/components/app-header/AppHeader.svelte generated by Svelte v3.59.2 */const{window:window_1$2}=globals;function create_else_block$d(ctx){let div;let img0;let img0_src_value;let t0;let img1;let img1_src_value;let t1;let if_block=/*heading*/ctx[0]&&create_if_block_7$1(ctx);return {c(){div=element("div");img0=element("img");t0=space();img1=element("img");t1=space();if(if_block)if_block.c();attr(img0,"alt","GoA Logo");attr(img0,"class","image-mobile");if(!src_url_equal(img0.src,img0_src_value=_mobileLogo))attr(img0,"src",img0_src_value);attr(img1,"alt","GoA Logo");attr(img1,"class","image-desktop");if(!src_url_equal(img1.src,img1_src_value=_desktopLogo))attr(img1,"src",img1_src_value);attr(div,"class","header-logo-title-area");},m(target,anchor){insert(target,div,anchor);append(div,img0);append(div,t0);append(div,img1);append(div,t1);if(if_block)if_block.m(div,null);},p(ctx,dirty){if(/*heading*/ctx[0]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_7$1(ctx);if_block.c();if_block.m(div,null);}}else if(if_block){if_block.d(1);if_block=null;}},d(detaching){if(detaching)detach(div);if(if_block)if_block.d();}};}// (89:4) {#if url}
|
|
107
108
|
function create_if_block_5$1(ctx){let a;let img0;let img0_src_value;let t0;let img1;let img1_src_value;let t1;let if_block=/*heading*/ctx[0]&&create_if_block_6$1(ctx);return {c(){a=element("a");img0=element("img");t0=space();img1=element("img");t1=space();if(if_block)if_block.c();attr(img0,"alt","GoA Logo");attr(img0,"class","image-mobile");if(!src_url_equal(img0.src,img0_src_value=_mobileLogo))attr(img0,"src",img0_src_value);attr(img1,"alt","GoA Logo");attr(img1,"class","image-desktop");if(!src_url_equal(img1.src,img1_src_value=_desktopLogo))attr(img1,"src",img1_src_value);attr(a,"href",/*url*/ctx[1]);attr(a,"class","header-logo-title-area");attr(a,"data-testid","url");},m(target,anchor){insert(target,a,anchor);append(a,img0);append(a,t0);append(a,img1);append(a,t1);if(if_block)if_block.m(a,null);},p(ctx,dirty){if(/*heading*/ctx[0]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_6$1(ctx);if_block.c();if_block.m(a,null);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*url*/2){attr(a,"href",/*url*/ctx[1]);}},d(detaching){if(detaching)detach(a);if(if_block)if_block.d();}};}// (101:8) {#if heading}
|
|
108
109
|
function create_if_block_7$1(ctx){let span;let t;return {c(){span=element("span");t=text(/*heading*/ctx[0]);attr(span,"data-testid","title");attr(span,"class","title");},m(target,anchor){insert(target,span,anchor);append(span,t);},p(ctx,dirty){if(dirty&/*heading*/1)set_data(t,/*heading*/ctx[0]);},d(detaching){if(detaching)detach(span);}};}// (93:8) {#if heading}
|
|
109
110
|
function create_if_block_6$1(ctx){let span;let t;return {c(){span=element("span");t=text(/*heading*/ctx[0]);attr(span,"data-testid","title");attr(span,"class","title");},m(target,anchor){insert(target,span,anchor);append(span,t);},p(ctx,dirty){if(dirty&/*heading*/1)set_data(t,/*heading*/ctx[0]);},d(detaching){if(detaching)detach(span);}};}// (108:4) {#if _showToggleMenu && _mobile}
|
|
@@ -166,34 +167,34 @@
|
|
|
166
167
|
goa-container--${/*type*/ctx[0]}
|
|
167
168
|
padding--${/*padding*/ctx[2]}
|
|
168
169
|
accent--${/*accent*/ctx[1]}
|
|
169
|
-
`)){attr(div3,"class",div3_class_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div3);}};}function instance$H($$self,$$props,$$invalidate){const[Types,validateType]=typeValidator("Container type",["interactive","info","error","success","important","non-interactive"]);const[Accents,validateAccent]=typeValidator("Container accent",["thick","thin","filled"]);const[Paddings,validatePadding]=typeValidator("Container padding",["relaxed","compact"]);let{type="interactive"}=$$props;let{accent="filled"}=$$props;let{padding="relaxed"}=$$props;let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb="m"}=$$props;let{ml=null}=$$props;onMount(()=>{validateType(type);validateAccent(accent);validatePadding(padding);});$$self.$$set=$$props=>{if('type'in $$props)$$invalidate(0,type=$$props.type);if('accent'in $$props)$$invalidate(1,accent=$$props.accent);if('padding'in $$props)$$invalidate(2,padding=$$props.padding);if('testid'in $$props)$$invalidate(3,testid=$$props.testid);if('mt'in $$props)$$invalidate(4,mt=$$props.mt);if('mr'in $$props)$$invalidate(5,mr=$$props.mr);if('mb'in $$props)$$invalidate(6,mb=$$props.mb);if('ml'in $$props)$$invalidate(7,ml=$$props.ml);};return [type,accent,padding,testid,mt,mr,mb,ml];}class Container extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4);display:flex;flex:1 1 auto}.goa-container{box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column}.goa-container *{box-sizing:border-box}header{display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:var(--goa-font-size-4);border-width:1px;border-style:solid;border-top-left-radius:var(--goa-border-radius-m);border-top-right-radius:var(--goa-border-radius-m)}.content{border-bottom:1px solid var(--goa-color-greyscale-200);border-left:1px solid var(--goa-color-greyscale-200);border-right:1px solid var(--goa-color-greyscale-200);border-bottom-left-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m);display:flex;flex:1 1 auto;flex-direction:column}.content ::slotted(p:last-child){margin-bottom:0 !important}.goa-container--non-interactive.accent--filled .content{border-color:var(--goa-color-greyscale-200);background-color:var(--goa-color-greyscale-100)}.goa-container--important.accent--filled .content{border-color:var(--goa-color-warning-default);background-color:var(--goa-color-warning-background)}.goa-container--error.accent--filled .content{border-color:var(--goa-color-emergency-default);background-color:var(--goa-color-emergency-background)}.goa-container--success.accent--filled .content{border-color:var(--goa-color-success-default);background-color:var(--goa-color-success-background)}.goa-container--info.accent--filled .content{border-color:var(--goa-color-info-default);background-color:var(--goa-color-info-background)}.title,.actions{padding:0.5rem 0}.padding--relaxed header{padding:0 1.5rem}.padding--relaxed .content{padding:1.5rem}.padding--compact header,.padding--compact .content{padding:0 1rem}.padding--compact header{padding:0 1rem}.padding--compact .content{padding:1rem}@media screen and (max-width: 480px){.padding--relaxed header{padding:0 1rem}.padding--relaxed .content{padding:1rem}}.goa-container--non-interactive header{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);color:var(--goa-color-greyscale-black)}.goa-container--interactive header{background-color:var(--goa-color-brand-default);border-color:var(--goa-color-brand-default);color:var(--goa-color-greyscale-white)}.goa-container--info header{background-color:var(--goa-color-info-default);border-color:var(--goa-color-info-default);color:var(--goa-color-greyscale-white)}.goa-container--error header{background-color:var(--goa-color-emergency-default);border-color:var(--goa-color-emergency-default);color:var(--goa-color-greyscale-white)}.goa-container--success header{background-color:var(--goa-color-success-default);border-color:var(--goa-color-success-default);color:var(--goa-color-greyscale-white)}.goa-container--important header{background-color:var(--goa-color-warning-default);border-color:var(--goa-color-warning-default);color:var(--goa-color-greyscale-white)}.heading--thick{padding:0.5rem 1.5rem;max-height:3rem;min-height:1rem}.heading--thick .title{line-height:2rem}.heading--thin{height:0.5rem}.heading--filled{display:none}.heading--filled~.content{border-top:1px solid var(--goa-color-greyscale-200);border-top-left-radius:var(--goa-border-radius-m);border-top-right-radius:var(--goa-border-radius-m)}.heading--thin .title,.heading--thin .actions{display:none}.actions{display:flex;align-items:center}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$H,create_fragment$K,safe_not_equal,{type:0,accent:1,padding:2,testid:3,mt:4,mr:5,mb:6,ml:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["type","accent","padding","testid","mt","mr","mb","ml"];}get type(){return this.$$.ctx[0];}set type(type){this.$$set({type});flush();}get accent(){return this.$$.ctx[1];}set accent(accent){this.$$set({accent});flush();}get padding(){return this.$$.ctx[2];}set padding(padding){this.$$set({padding});flush();}get testid(){return this.$$.ctx[3];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[4];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[5];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[6];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[7];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-container",Container);/* libs/web-components/src/components/details/Details.svelte generated by Svelte v3.59.2 */function create_fragment$J(ctx){let details;let summary;let goa_icon;let goa_icon_fillcolor_value;let t0;let span;let t1;let t2;let div;let details_style_value;let mounted;let dispose;return {c(){details=element("details");summary=element("summary");goa_icon=element("goa-icon");t0=space();span=element("span");t1=text(/*heading*/ctx[1]);t2=space();div=element("div");div.innerHTML=`<slot></slot>`;this.c=noop;set_custom_element_data(goa_icon,"mt","1");set_custom_element_data(goa_icon,"mr","2");set_custom_element_data(goa_icon,"type","chevron-forward");set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value=/*_isMouseOver*/ctx[6]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)");attr(div,"class","content");details.open=/*_isOpen*/ctx[9];attr(details,"style",details_style_value=calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5]));},m(target,anchor){insert(target,details,anchor);append(details,summary);append(summary,goa_icon);append(summary,t0);append(summary,span);append(span,t1);/*summary_binding*/ctx[10](summary);append(details,t2);append(details,div);/*details_binding*/ctx[11](details);if(!mounted){dispose=listen(details,"toggle",/*toggle_handler*/ctx[12]);mounted=true;}},p(ctx,[dirty]){if(dirty&/*_isMouseOver*/64&&goa_icon_fillcolor_value!==(goa_icon_fillcolor_value=/*_isMouseOver*/ctx[6]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)")){set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value);}if(dirty&/*heading*/2)set_data(t1,/*heading*/ctx[1]);if(dirty&/*_isOpen*/512){details.open=/*_isOpen*/ctx[9];}if(dirty&/*mt, mr, mb, ml*/60&&details_style_value!==(details_style_value=calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5]))){attr(details,"style",details_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(details);/*summary_binding*/ctx[10](null);/*details_binding*/ctx[11](null);mounted=false;dispose();}};}function instance$G($$self,$$props,$$invalidate){let _isOpen;let{heading}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{open="false"}=$$props;let _isMouseOver=false;let _summaryEl;let _detailsEl;onMount(()=>{validateRequired("Details",{heading});_summaryEl.addEventListener("mouseover",()=>{$$invalidate(6,_isMouseOver=true);});_summaryEl.addEventListener("mouseout",()=>{$$invalidate(6,_isMouseOver=false);});});function summary_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_summaryEl=$$value;$$invalidate(7,_summaryEl);});}function details_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_detailsEl=$$value;$$invalidate(8,_detailsEl);});}const toggle_handler=({target})=>$$invalidate(0,open=`${target.open}`);$$self.$$set=$$props=>{if('heading'in $$props)$$invalidate(1,heading=$$props.heading);if('mt'in $$props)$$invalidate(2,mt=$$props.mt);if('mr'in $$props)$$invalidate(3,mr=$$props.mr);if('mb'in $$props)$$invalidate(4,mb=$$props.mb);if('ml'in $$props)$$invalidate(5,ml=$$props.ml);if('open'in $$props)$$invalidate(0,open=$$props.open);};$$self.$$.update=()=>{if($$self.$$.dirty&/*open*/1){$$invalidate(9,_isOpen=toBoolean(open));}};return [open,heading,mt,mr,mb,ml,_isMouseOver,_summaryEl,_detailsEl,_isOpen,summary_binding,details_binding,toggle_handler];}class Details extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{font-family:var(--goa-font-family-sans)}details{max-width:75ch;position:relative}details ::slotted(*){font:var(--goa-typography-body-m)}summary{padding:0.5rem;margin-bottom:0.5rem;cursor:pointer;list-style:none;display:flex;align-items:flex-start}goa-icon{position:absolute}details[open] goa-icon{transform:translateX(-1px) rotate(90deg);top:0.75rem}details summary::-webkit-details-marker{display:none}summary{border-radius:var(--goa-border-radius-m)}summary:focus,summary:active{outline:3px solid var(--goa-color-interactive-focus);border-radius:var(--goa-border-radius-m);color:var(--goa-color-interactive-hover);background-color:var(--goa-color-greyscale-100)}summary:hover{background-color:var(--goa-color-greyscale-100)}summary span{margin-left:2rem;text-decoration:underline;color:var(--goa-color-interactive-default);padding-bottom:var(--font-valign-fix);line-height:var(--goa-line-height-3)}summary:hover span{color:var(--goa-color-interactive-hover)}.content{border-left:4px solid var(--goa-color-greyscale-200);padding:1rem;margin-left:1.1rem;margin-bottom:var(--goa-space-s)}.content ::slotted(p:last-child){margin-bottom:0 !important}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$G,create_fragment$J,safe_not_equal,{heading:1,mt:2,mr:3,mb:4,ml:5,open:0},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["heading","mt","mr","mb","ml","open"];}get heading(){return this.$$.ctx[1];}set heading(heading){this.$$set({heading});flush();}get mt(){return this.$$.ctx[2];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[3];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[4];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[5];}set ml(ml){this.$$set({ml});flush();}get open(){return this.$$.ctx[0];}set open(open){this.$$set({open});flush();}}customElements.define("goa-details",Details);/* libs/web-components/src/components/divider/Divider.svelte generated by Svelte v3.59.2 */function create_fragment$I(ctx){let hr;let hr_style_value;return {c(){hr=element("hr");this.c=noop;attr(hr,"data-testid",/*testid*/ctx[0]);attr(hr,"style",hr_style_value=calculateMargin(/*mt*/ctx[1],/*mr*/ctx[2],/*mb*/ctx[3],/*ml*/ctx[4]));},m(target,anchor){insert(target,hr,anchor);},p(ctx,[dirty]){if(dirty&/*testid*/1){attr(hr,"data-testid",/*testid*/ctx[0]);}if(dirty&/*mt, mr, mb, ml*/30&&hr_style_value!==(hr_style_value=calculateMargin(/*mt*/ctx[1],/*mr*/ctx[2],/*mb*/ctx[3],/*ml*/ctx[4]))){attr(hr,"style",hr_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(hr);}};}function instance$F($$self,$$props,$$invalidate){let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;$$self.$$set=$$props=>{if('testid'in $$props)$$invalidate(0,testid=$$props.testid);if('mt'in $$props)$$invalidate(1,mt=$$props.mt);if('mr'in $$props)$$invalidate(2,mr=$$props.mr);if('mb'in $$props)$$invalidate(3,mb=$$props.mb);if('ml'in $$props)$$invalidate(4,ml=$$props.ml);};return [testid,mt,mr,mb,ml];}class Divider extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`hr{padding:0;margin:0;height:1px;background-color:var(--goa-color-greyscale-200);border:none}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$F,create_fragment$I,safe_not_equal,{testid:0,mt:1,mr:2,mb:3,ml:4},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["testid","mt","mr","mb","ml"];}get testid(){return this.$$.ctx[0];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[1];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[2];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[3];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[4];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-divider",Divider);/* libs/web-components/src/components/dropdown/Dropdown.svelte generated by Svelte v3.59.2 */function get_each_context_1(ctx,list,i){const child_ctx=ctx.slice();child_ctx[70]=list[i];child_ctx[74]=i;return child_ctx;}function get_each_context$7(ctx,list,i){const child_ctx=ctx.slice();child_ctx[70]=list[i];return child_ctx;}// (506:2) {:else}
|
|
170
|
-
function create_else_block$a(ctx){let slot;let t0;let goa_popover;let div;let t1;let input;let input_style_value;let input_aria_controls_value;let input_aria_label_value;let input_id_value;let input_aria_owns_value;let input_readonly_value;let t2;let t3;let div_style_value;let t4;let ul;let ul_id_value;let ul_aria_label_value;let ul_style_value;let goa_popover_width_value;let mounted;let dispose;let if_block0=/*leadingicon*/ctx[4]&&create_if_block_4$3(ctx);let if_block1=/*_inputValue*/ctx[16]&&/*_filterable*/ctx[
|
|
170
|
+
`)){attr(div3,"class",div3_class_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div3);}};}function instance$H($$self,$$props,$$invalidate){const[Types,validateType]=typeValidator("Container type",["interactive","info","error","success","important","non-interactive"]);const[Accents,validateAccent]=typeValidator("Container accent",["thick","thin","filled"]);const[Paddings,validatePadding]=typeValidator("Container padding",["relaxed","compact"]);let{type="interactive"}=$$props;let{accent="filled"}=$$props;let{padding="relaxed"}=$$props;let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb="m"}=$$props;let{ml=null}=$$props;onMount(()=>{validateType(type);validateAccent(accent);validatePadding(padding);});$$self.$$set=$$props=>{if('type'in $$props)$$invalidate(0,type=$$props.type);if('accent'in $$props)$$invalidate(1,accent=$$props.accent);if('padding'in $$props)$$invalidate(2,padding=$$props.padding);if('testid'in $$props)$$invalidate(3,testid=$$props.testid);if('mt'in $$props)$$invalidate(4,mt=$$props.mt);if('mr'in $$props)$$invalidate(5,mr=$$props.mr);if('mb'in $$props)$$invalidate(6,mb=$$props.mb);if('ml'in $$props)$$invalidate(7,ml=$$props.ml);};return [type,accent,padding,testid,mt,mr,mb,ml];}class Container extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4);display:flex;flex:1 1 auto}.goa-container{box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column}.goa-container *{box-sizing:border-box}header{display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:var(--goa-font-size-4);border-width:1px;border-style:solid;border-top-left-radius:var(--goa-border-radius-m);border-top-right-radius:var(--goa-border-radius-m)}.content{border-bottom:1px solid var(--goa-color-greyscale-200);border-left:1px solid var(--goa-color-greyscale-200);border-right:1px solid var(--goa-color-greyscale-200);border-bottom-left-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m);display:flex;flex:1 1 auto;flex-direction:column}.content ::slotted(p:last-child){margin-bottom:0 !important}.goa-container--non-interactive.accent--filled .content{border-color:var(--goa-color-greyscale-200);background-color:var(--goa-color-greyscale-100)}.goa-container--important.accent--filled .content{border-color:var(--goa-color-warning-default);background-color:var(--goa-color-warning-background)}.goa-container--error.accent--filled .content{border-color:var(--goa-color-emergency-default);background-color:var(--goa-color-emergency-background)}.goa-container--success.accent--filled .content{border-color:var(--goa-color-success-default);background-color:var(--goa-color-success-background)}.goa-container--info.accent--filled .content{border-color:var(--goa-color-info-default);background-color:var(--goa-color-info-background)}.title,.actions{padding:0.5rem 0}.padding--relaxed header{padding:0 1.5rem}.padding--relaxed .content{padding:1.5rem}.padding--compact header,.padding--compact .content{padding:0 1rem}.padding--compact header{padding:0 1rem}.padding--compact .content{padding:1rem}@media screen and (max-width: 480px){.padding--relaxed header{padding:0 1rem}.padding--relaxed .content{padding:1rem}}.goa-container--non-interactive header{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);color:var(--goa-color-greyscale-black)}.goa-container--interactive header{background-color:var(--goa-color-brand-default);border-color:var(--goa-color-brand-default);color:var(--goa-color-greyscale-white)}.goa-container--info header{background-color:var(--goa-color-info-default);border-color:var(--goa-color-info-default);color:var(--goa-color-greyscale-white)}.goa-container--error header{background-color:var(--goa-color-emergency-default);border-color:var(--goa-color-emergency-default);color:var(--goa-color-greyscale-white)}.goa-container--success header{background-color:var(--goa-color-success-default);border-color:var(--goa-color-success-default);color:var(--goa-color-greyscale-white)}.goa-container--important header{background-color:var(--goa-color-warning-default);border-color:var(--goa-color-warning-default);color:var(--goa-color-greyscale-white)}.heading--thick{padding:0.5rem 1.5rem;max-height:3rem;min-height:1rem}.heading--thick .title{line-height:2rem}.heading--thin{height:0.5rem}.heading--filled{display:none}.heading--filled~.content{border-top:1px solid var(--goa-color-greyscale-200);border-top-left-radius:var(--goa-border-radius-m);border-top-right-radius:var(--goa-border-radius-m)}.heading--thin .title,.heading--thin .actions{display:none}.actions{display:flex;align-items:center}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$H,create_fragment$K,safe_not_equal,{type:0,accent:1,padding:2,testid:3,mt:4,mr:5,mb:6,ml:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["type","accent","padding","testid","mt","mr","mb","ml"];}get type(){return this.$$.ctx[0];}set type(type){this.$$set({type});flush();}get accent(){return this.$$.ctx[1];}set accent(accent){this.$$set({accent});flush();}get padding(){return this.$$.ctx[2];}set padding(padding){this.$$set({padding});flush();}get testid(){return this.$$.ctx[3];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[4];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[5];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[6];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[7];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-container",Container);/* libs/web-components/src/components/details/Details.svelte generated by Svelte v3.59.2 */function create_fragment$J(ctx){let details;let summary;let goa_icon;let goa_icon_fillcolor_value;let t0;let span;let t1;let t2;let div;let details_style_value;let mounted;let dispose;return {c(){details=element("details");summary=element("summary");goa_icon=element("goa-icon");t0=space();span=element("span");t1=text(/*heading*/ctx[1]);t2=space();div=element("div");div.innerHTML=`<slot></slot>`;this.c=noop;set_custom_element_data(goa_icon,"mt","1");set_custom_element_data(goa_icon,"mr","2");set_custom_element_data(goa_icon,"type","chevron-forward");set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value=/*_isMouseOver*/ctx[6]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)");attr(div,"class","content");details.open=/*_isOpen*/ctx[9];attr(details,"style",details_style_value=calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5]));},m(target,anchor){insert(target,details,anchor);append(details,summary);append(summary,goa_icon);append(summary,t0);append(summary,span);append(span,t1);/*summary_binding*/ctx[10](summary);append(details,t2);append(details,div);/*details_binding*/ctx[11](details);if(!mounted){dispose=listen(details,"toggle",/*toggle_handler*/ctx[12]);mounted=true;}},p(ctx,[dirty]){if(dirty&/*_isMouseOver*/64&&goa_icon_fillcolor_value!==(goa_icon_fillcolor_value=/*_isMouseOver*/ctx[6]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)")){set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value);}if(dirty&/*heading*/2)set_data(t1,/*heading*/ctx[1]);if(dirty&/*_isOpen*/512){details.open=/*_isOpen*/ctx[9];}if(dirty&/*mt, mr, mb, ml*/60&&details_style_value!==(details_style_value=calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5]))){attr(details,"style",details_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(details);/*summary_binding*/ctx[10](null);/*details_binding*/ctx[11](null);mounted=false;dispose();}};}function instance$G($$self,$$props,$$invalidate){let _isOpen;let{heading}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{open="false"}=$$props;let _isMouseOver=false;let _summaryEl;let _detailsEl;onMount(()=>{validateRequired("Details",{heading});_summaryEl.addEventListener("mouseover",()=>{$$invalidate(6,_isMouseOver=true);});_summaryEl.addEventListener("mouseout",()=>{$$invalidate(6,_isMouseOver=false);});});function summary_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_summaryEl=$$value;$$invalidate(7,_summaryEl);});}function details_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_detailsEl=$$value;$$invalidate(8,_detailsEl);});}const toggle_handler=({target})=>$$invalidate(0,open=`${target.open}`);$$self.$$set=$$props=>{if('heading'in $$props)$$invalidate(1,heading=$$props.heading);if('mt'in $$props)$$invalidate(2,mt=$$props.mt);if('mr'in $$props)$$invalidate(3,mr=$$props.mr);if('mb'in $$props)$$invalidate(4,mb=$$props.mb);if('ml'in $$props)$$invalidate(5,ml=$$props.ml);if('open'in $$props)$$invalidate(0,open=$$props.open);};$$self.$$.update=()=>{if($$self.$$.dirty&/*open*/1){$$invalidate(9,_isOpen=toBoolean(open));}};return [open,heading,mt,mr,mb,ml,_isMouseOver,_summaryEl,_detailsEl,_isOpen,summary_binding,details_binding,toggle_handler];}class Details extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{font-family:var(--goa-font-family-sans)}details{max-width:75ch;position:relative}details ::slotted(*){font:var(--goa-typography-body-m)}summary{padding:0.5rem;margin-bottom:0.5rem;cursor:pointer;list-style:none;display:flex;align-items:flex-start}goa-icon{position:absolute}details[open] goa-icon{transform:translateX(-1px) rotate(90deg);top:0.75rem}details summary::-webkit-details-marker{display:none}summary{border-radius:var(--goa-border-radius-m)}summary:focus,summary:active{outline:3px solid var(--goa-color-interactive-focus);border-radius:var(--goa-border-radius-m);color:var(--goa-color-interactive-hover);background-color:var(--goa-color-greyscale-100)}summary:hover{background-color:var(--goa-color-greyscale-100)}summary span{margin-left:2rem;text-decoration:underline;color:var(--goa-color-interactive-default);padding-bottom:var(--font-valign-fix);line-height:var(--goa-line-height-3)}summary:hover span{color:var(--goa-color-interactive-hover)}.content{border-left:4px solid var(--goa-color-greyscale-200);padding:1rem;margin-left:1.1rem;margin-bottom:var(--goa-space-s)}.content ::slotted(p:last-child){margin-bottom:0 !important}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$G,create_fragment$J,safe_not_equal,{heading:1,mt:2,mr:3,mb:4,ml:5,open:0},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["heading","mt","mr","mb","ml","open"];}get heading(){return this.$$.ctx[1];}set heading(heading){this.$$set({heading});flush();}get mt(){return this.$$.ctx[2];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[3];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[4];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[5];}set ml(ml){this.$$set({ml});flush();}get open(){return this.$$.ctx[0];}set open(open){this.$$set({open});flush();}}customElements.define("goa-details",Details);/* libs/web-components/src/components/divider/Divider.svelte generated by Svelte v3.59.2 */function create_fragment$I(ctx){let hr;let hr_style_value;return {c(){hr=element("hr");this.c=noop;attr(hr,"data-testid",/*testid*/ctx[0]);attr(hr,"style",hr_style_value=calculateMargin(/*mt*/ctx[1],/*mr*/ctx[2],/*mb*/ctx[3],/*ml*/ctx[4]));},m(target,anchor){insert(target,hr,anchor);},p(ctx,[dirty]){if(dirty&/*testid*/1){attr(hr,"data-testid",/*testid*/ctx[0]);}if(dirty&/*mt, mr, mb, ml*/30&&hr_style_value!==(hr_style_value=calculateMargin(/*mt*/ctx[1],/*mr*/ctx[2],/*mb*/ctx[3],/*ml*/ctx[4]))){attr(hr,"style",hr_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(hr);}};}function instance$F($$self,$$props,$$invalidate){let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;$$self.$$set=$$props=>{if('testid'in $$props)$$invalidate(0,testid=$$props.testid);if('mt'in $$props)$$invalidate(1,mt=$$props.mt);if('mr'in $$props)$$invalidate(2,mr=$$props.mr);if('mb'in $$props)$$invalidate(3,mb=$$props.mb);if('ml'in $$props)$$invalidate(4,ml=$$props.ml);};return [testid,mt,mr,mb,ml];}class Divider extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`hr{padding:0;margin:0;height:1px;background-color:var(--goa-color-greyscale-200);border:none}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$F,create_fragment$I,safe_not_equal,{testid:0,mt:1,mr:2,mb:3,ml:4},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["testid","mt","mr","mb","ml"];}get testid(){return this.$$.ctx[0];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[1];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[2];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[3];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[4];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-divider",Divider);/* libs/web-components/src/components/dropdown/Dropdown.svelte generated by Svelte v3.59.2 */function get_each_context_1(ctx,list,i){const child_ctx=ctx.slice();child_ctx[71]=list[i];child_ctx[75]=i;return child_ctx;}function get_each_context$7(ctx,list,i){const child_ctx=ctx.slice();child_ctx[71]=list[i];return child_ctx;}// (510:2) {:else}
|
|
171
|
+
function create_else_block$a(ctx){let slot;let t0;let goa_popover;let div;let t1;let input;let input_style_value;let input_aria_controls_value;let input_aria_label_value;let input_id_value;let input_aria_owns_value;let input_readonly_value;let t2;let t3;let div_style_value;let t4;let ul;let ul_id_value;let ul_aria_label_value;let ul_style_value;let goa_popover_width_value;let mounted;let dispose;let if_block0=/*leadingicon*/ctx[4]&&create_if_block_4$3(ctx);let if_block1=/*_inputValue*/ctx[16]&&/*_filterable*/ctx[20]&&create_if_block_3$a(ctx);let if_block2=(/*_filterable*/ctx[20]&&/*_inputValue*/ctx[16].length===0||!/*_filterable*/ctx[20])&&create_if_block_2$a(ctx);function select_block_type_1(ctx,dirty){if(/*_filteredOptions*/ctx[21].length>0)return create_if_block_1$c;return create_else_block_1;}let current_block_type=select_block_type_1(ctx);let if_block3=current_block_type(ctx);return {c(){slot=element("slot");t0=space();goa_popover=element("goa-popover");div=element("div");if(if_block0)if_block0.c();t1=space();input=element("input");t2=space();if(if_block1)if_block1.c();t3=space();if(if_block2)if_block2.c();t4=space();ul=element("ul");if_block3.c();attr(input,"style",input_style_value=`cursor: ${!/*_disabled*/ctx[29]?/*_filterable*/ctx[20]?"auto":"pointer":'default'}`);attr(input,"tabindex","1");attr(input,"type","text");attr(input,"role","combobox");attr(input,"autocomplete","off");attr(input,"aria-autocomplete","list");attr(input,"aria-controls",input_aria_controls_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`);attr(input,"aria-expanded",/*_isMenuVisible*/ctx[23]);attr(input,"aria-label",input_aria_label_value=/*arialabel*/ctx[2]||/*name*/ctx[1]);attr(input,"aria-labelledby",/*arialabelledby*/ctx[3]);attr(input,"id",input_id_value=`${/*id*/ctx[14]||/*name*/ctx[1]}`);attr(input,"aria-activedescendant",/*_activeDescendantId*/ctx[30]);attr(input,"aria-disabled",/*_disabled*/ctx[29]);attr(input,"aria-owns",input_aria_owns_value=/*_isMenuVisible*/ctx[23]?`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`:undefined);attr(input,"aria-haspopup","listbox");input.disabled=/*_disabled*/ctx[29];input.readOnly=input_readonly_value=!/*_filterable*/ctx[20];attr(input,"placeholder",/*placeholder*/ctx[6]);attr(input,"name",/*name*/ctx[1]);attr(div,"slot","target");attr(div,"style",div_style_value=`
|
|
171
172
|
${cssVar("width",/*width*/ctx[7])}
|
|
172
|
-
`);attr(div,"class","dropdown-input-group");toggle_class(div,"dropdown-input-group--disabled",/*_disabled*/ctx[
|
|
173
|
+
`);attr(div,"class","dropdown-input-group");toggle_class(div,"dropdown-input-group--disabled",/*_disabled*/ctx[29]);toggle_class(div,"error",/*_error*/ctx[31]);attr(ul,"id",ul_id_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`);attr(ul,"role","listbox");attr(ul,"tabindex","-1");attr(ul,"data-testid","dropdown-menu");attr(ul,"aria-label",ul_aria_label_value=/*arialabel*/ctx[2]||/*name*/ctx[1]);attr(ul,"aria-labelledby",/*arialabelledby*/ctx[3]);attr(ul,"style",ul_style_value=`
|
|
173
174
|
outline: none;
|
|
174
175
|
overflow-y: auto;
|
|
175
176
|
max-height: ${/*maxheight*/ctx[5]};
|
|
176
|
-
`);set_custom_element_data(goa_popover,"disabled",/*disabled*/ctx[8]);set_custom_element_data(goa_popover,"relative",/*relative*/ctx[9]);set_custom_element_data(goa_popover,"open",/*_isMenuVisible*/ctx[
|
|
177
|
+
`);set_custom_element_data(goa_popover,"disabled",/*disabled*/ctx[8]);set_custom_element_data(goa_popover,"relative",/*relative*/ctx[9]);set_custom_element_data(goa_popover,"open",/*_isMenuVisible*/ctx[23]);set_custom_element_data(goa_popover,"padded","false");set_custom_element_data(goa_popover,"width",goa_popover_width_value=/*width*/ctx[7]||/*_computedWidth*/ctx[24]);set_custom_element_data(goa_popover,"tabindex","-1");set_custom_element_data(goa_popover,"maxwidth",/*_inputWidth*/ctx[25]);},m(target,anchor){insert(target,slot,anchor);insert(target,t0,anchor);insert(target,goa_popover,anchor);append(goa_popover,div);if(if_block0)if_block0.m(div,null);append(div,t1);append(div,input);/*input_binding*/ctx[44](input);set_input_value(input,/*_inputValue*/ctx[16]);append(div,t2);if(if_block1)if_block1.m(div,null);append(div,t3);if(if_block2)if_block2.m(div,null);append(goa_popover,t4);append(goa_popover,ul);if_block3.m(ul,null);/*ul_binding*/ctx[48](ul);/*goa_popover_binding*/ctx[49](goa_popover);if(!mounted){dispose=[listen(input,"input",/*input_input_handler*/ctx[45]),listen(input,"keydown",/*onInputKeyDown*/ctx[35]),listen(goa_popover,"_open",/*showMenu*/ctx[32]),listen(goa_popover,"_close",/*closeMenu*/ctx[33])];mounted=true;}},p(ctx,dirty){if(/*leadingicon*/ctx[4]){if(if_block0){if_block0.p(ctx,dirty);}else {if_block0=create_if_block_4$3(ctx);if_block0.c();if_block0.m(div,t1);}}else if(if_block0){if_block0.d(1);if_block0=null;}if(dirty[0]&/*_disabled, _filterable*/537919488&&input_style_value!==(input_style_value=`cursor: ${!/*_disabled*/ctx[29]?/*_filterable*/ctx[20]?"auto":"pointer":'default'}`)){attr(input,"style",input_style_value);}if(dirty[0]&/*id, name*/16386&&input_aria_controls_value!==(input_aria_controls_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`)){attr(input,"aria-controls",input_aria_controls_value);}if(dirty[0]&/*_isMenuVisible*/8388608){attr(input,"aria-expanded",/*_isMenuVisible*/ctx[23]);}if(dirty[0]&/*arialabel, name*/6&&input_aria_label_value!==(input_aria_label_value=/*arialabel*/ctx[2]||/*name*/ctx[1])){attr(input,"aria-label",input_aria_label_value);}if(dirty[0]&/*arialabelledby*/8){attr(input,"aria-labelledby",/*arialabelledby*/ctx[3]);}if(dirty[0]&/*id, name*/16386&&input_id_value!==(input_id_value=`${/*id*/ctx[14]||/*name*/ctx[1]}`)){attr(input,"id",input_id_value);}if(dirty[0]&/*_activeDescendantId*/1073741824){attr(input,"aria-activedescendant",/*_activeDescendantId*/ctx[30]);}if(dirty[0]&/*_disabled*/536870912){attr(input,"aria-disabled",/*_disabled*/ctx[29]);}if(dirty[0]&/*_isMenuVisible, id, name*/8404994&&input_aria_owns_value!==(input_aria_owns_value=/*_isMenuVisible*/ctx[23]?`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`:undefined)){attr(input,"aria-owns",input_aria_owns_value);}if(dirty[0]&/*_disabled*/536870912){input.disabled=/*_disabled*/ctx[29];}if(dirty[0]&/*_filterable*/1048576&&input_readonly_value!==(input_readonly_value=!/*_filterable*/ctx[20])){input.readOnly=input_readonly_value;}if(dirty[0]&/*placeholder*/64){attr(input,"placeholder",/*placeholder*/ctx[6]);}if(dirty[0]&/*name*/2){attr(input,"name",/*name*/ctx[1]);}if(dirty[0]&/*_inputValue*/65536&&input.value!==/*_inputValue*/ctx[16]){set_input_value(input,/*_inputValue*/ctx[16]);}if(/*_inputValue*/ctx[16]&&/*_filterable*/ctx[20]){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block_3$a(ctx);if_block1.c();if_block1.m(div,t3);}}else if(if_block1){if_block1.d(1);if_block1=null;}if(/*_filterable*/ctx[20]&&/*_inputValue*/ctx[16].length===0||!/*_filterable*/ctx[20]){if(if_block2){if_block2.p(ctx,dirty);}else {if_block2=create_if_block_2$a(ctx);if_block2.c();if_block2.m(div,null);}}else if(if_block2){if_block2.d(1);if_block2=null;}if(dirty[0]&/*width*/128&&div_style_value!==(div_style_value=`
|
|
177
178
|
${cssVar("width",/*width*/ctx[7])}
|
|
178
|
-
`)){attr(div,"style",div_style_value);}if(dirty[0]&/*_disabled*/
|
|
179
|
+
`)){attr(div,"style",div_style_value);}if(dirty[0]&/*_disabled*/536870912){toggle_class(div,"dropdown-input-group--disabled",/*_disabled*/ctx[29]);}if(dirty[1]&/*_error*/1){toggle_class(div,"error",/*_error*/ctx[31]);}if(current_block_type===(current_block_type=select_block_type_1(ctx))&&if_block3){if_block3.p(ctx,dirty);}else {if_block3.d(1);if_block3=current_block_type(ctx);if(if_block3){if_block3.c();if_block3.m(ul,null);}}if(dirty[0]&/*id, name*/16386&&ul_id_value!==(ul_id_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`)){attr(ul,"id",ul_id_value);}if(dirty[0]&/*arialabel, name*/6&&ul_aria_label_value!==(ul_aria_label_value=/*arialabel*/ctx[2]||/*name*/ctx[1])){attr(ul,"aria-label",ul_aria_label_value);}if(dirty[0]&/*arialabelledby*/8){attr(ul,"aria-labelledby",/*arialabelledby*/ctx[3]);}if(dirty[0]&/*maxheight*/32&&ul_style_value!==(ul_style_value=`
|
|
179
180
|
outline: none;
|
|
180
181
|
overflow-y: auto;
|
|
181
182
|
max-height: ${/*maxheight*/ctx[5]};
|
|
182
|
-
`)){attr(ul,"style",ul_style_value);}if(dirty[0]&/*disabled*/256){set_custom_element_data(goa_popover,"disabled",/*disabled*/ctx[8]);}if(dirty[0]&/*relative*/512){set_custom_element_data(goa_popover,"relative",/*relative*/ctx[9]);}if(dirty[0]&/*_isMenuVisible*/
|
|
183
|
-
function create_if_block$o(ctx){let select;let slot;let select_aria_label_value;let select_id_value;let mounted;let dispose;let each_value=/*_options*/ctx[15];let each_blocks=[];for(let i=0;i<each_value.length;i+=1){each_blocks[i]=create_each_block$7(get_each_context$7(ctx,each_value,i));}return {c(){select=element("select");slot=element("slot");for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}select.disabled=/*_disabled*/ctx[
|
|
184
|
-
function create_if_block_4$3(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"class","dropdown-input--leading-icon");set_custom_element_data(goa_icon,"data-testid","leading-icon");set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[4]);},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty[0]&/*leadingicon*/16){set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[4]);}},d(detaching){if(detaching)detach(goa_icon);}};}// (
|
|
185
|
-
function create_if_block_3$a(ctx){let goa_icon;let goa_icon_tabindex_value;let goa_icon_arialabel_value;let mounted;let dispose;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"tabindex",goa_icon_tabindex_value=/*_disabled*/ctx[
|
|
186
|
-
function create_if_block_2$a(ctx){let goa_icon;let goa_icon_id_value;let goa_icon_arialabel_value;let goa_icon_ariacontrols_value;let goa_icon_ariaexpanded_value;let goa_icon_type_value;let mounted;let dispose;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"role","button");set_custom_element_data(goa_icon,"id",goa_icon_id_value=`${/*id*/ctx[14]||/*name*/ctx[1]}`);set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value=/*arialabel*/ctx[2]||/*name*/ctx[1]);set_custom_element_data(goa_icon,"ariacontrols",goa_icon_ariacontrols_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`);set_custom_element_data(goa_icon,"ariaexpanded",goa_icon_ariaexpanded_value=/*_isMenuVisible*/ctx[
|
|
187
|
-
function create_else_block_1(ctx){let li;return {c(){li=element("li");li.textContent="No matches found";attr(li,"class","dropdown-item");attr(li,"data-testid","dropdown-item-not-found");},m(target,anchor){insert(target,li,anchor);},p:noop,d(detaching){if(detaching)detach(li);}};}// (
|
|
188
|
-
function create_if_block_1$c(ctx){let each_blocks=[];let each_1_lookup=new Map();let each_1_anchor;let each_value_1=/*_filteredOptions*/ctx[
|
|
189
|
-
function create_each_block_1(key_1,ctx){let li;let t0_value=(/*option*/ctx[
|
|
190
|
-
function create_each_block$7(ctx){let option;let t0_value=/*option*/ctx[
|
|
183
|
+
`)){attr(ul,"style",ul_style_value);}if(dirty[0]&/*disabled*/256){set_custom_element_data(goa_popover,"disabled",/*disabled*/ctx[8]);}if(dirty[0]&/*relative*/512){set_custom_element_data(goa_popover,"relative",/*relative*/ctx[9]);}if(dirty[0]&/*_isMenuVisible*/8388608){set_custom_element_data(goa_popover,"open",/*_isMenuVisible*/ctx[23]);}if(dirty[0]&/*width, _computedWidth*/16777344&&goa_popover_width_value!==(goa_popover_width_value=/*width*/ctx[7]||/*_computedWidth*/ctx[24])){set_custom_element_data(goa_popover,"width",goa_popover_width_value);}if(dirty[0]&/*_inputWidth*/33554432){set_custom_element_data(goa_popover,"maxwidth",/*_inputWidth*/ctx[25]);}},d(detaching){if(detaching)detach(slot);if(detaching)detach(t0);if(detaching)detach(goa_popover);if(if_block0)if_block0.d();/*input_binding*/ctx[44](null);if(if_block1)if_block1.d();if(if_block2)if_block2.d();if_block3.d();/*ul_binding*/ctx[48](null);/*goa_popover_binding*/ctx[49](null);mounted=false;run_all(dispose);}};}// (490:2) {#if _native}
|
|
184
|
+
function create_if_block$o(ctx){let select;let slot;let select_aria_label_value;let select_id_value;let mounted;let dispose;let each_value=/*_options*/ctx[15];let each_blocks=[];for(let i=0;i<each_value.length;i+=1){each_blocks[i]=create_each_block$7(get_each_context$7(ctx,each_value,i));}return {c(){select=element("select");slot=element("slot");for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}select.disabled=/*_disabled*/ctx[29];attr(select,"aria-labelledby",/*arialabelledby*/ctx[3]);attr(select,"aria-label",select_aria_label_value=/*arialabel*/ctx[2]||/*name*/ctx[1]);attr(select,"id",select_id_value=/*id*/ctx[14]||/*name*/ctx[1]);attr(select,"name",/*name*/ctx[1]);toggle_class(select,"error",/*_error*/ctx[31]);},m(target,anchor){insert(target,select,anchor);append(select,slot);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(select,null);}}/*select_binding*/ctx[43](select);if(!mounted){dispose=listen(select,"change",/*onNativeSelect*/ctx[36]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*value, _options*/32769){each_value=/*_options*/ctx[15];let i;for(i=0;i<each_value.length;i+=1){const child_ctx=get_each_context$7(ctx,each_value,i);if(each_blocks[i]){each_blocks[i].p(child_ctx,dirty);}else {each_blocks[i]=create_each_block$7(child_ctx);each_blocks[i].c();each_blocks[i].m(select,null);}}for(;i<each_blocks.length;i+=1){each_blocks[i].d(1);}each_blocks.length=each_value.length;}if(dirty[0]&/*_disabled*/536870912){select.disabled=/*_disabled*/ctx[29];}if(dirty[0]&/*arialabelledby*/8){attr(select,"aria-labelledby",/*arialabelledby*/ctx[3]);}if(dirty[0]&/*arialabel, name*/6&&select_aria_label_value!==(select_aria_label_value=/*arialabel*/ctx[2]||/*name*/ctx[1])){attr(select,"aria-label",select_aria_label_value);}if(dirty[0]&/*id, name*/16386&&select_id_value!==(select_id_value=/*id*/ctx[14]||/*name*/ctx[1])){attr(select,"id",select_id_value);}if(dirty[0]&/*name*/2){attr(select,"name",/*name*/ctx[1]);}if(dirty[1]&/*_error*/1){toggle_class(select,"error",/*_error*/ctx[31]);}},d(detaching){if(detaching)detach(select);destroy_each(each_blocks,detaching);/*select_binding*/ctx[43](null);mounted=false;dispose();}};}// (533:8) {#if leadingicon}
|
|
185
|
+
function create_if_block_4$3(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"class","dropdown-input--leading-icon");set_custom_element_data(goa_icon,"data-testid","leading-icon");set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[4]);},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty[0]&/*leadingicon*/16){set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[4]);}},d(detaching){if(detaching)detach(goa_icon);}};}// (564:8) {#if _inputValue && _filterable}
|
|
186
|
+
function create_if_block_3$a(ctx){let goa_icon;let goa_icon_tabindex_value;let goa_icon_arialabel_value;let mounted;let dispose;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"tabindex",goa_icon_tabindex_value=/*_disabled*/ctx[29]?-1:0);set_custom_element_data(goa_icon,"role","button");set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value="clear "+(/*arialabel*/ctx[2]||/*name*/ctx[1]));set_custom_element_data(goa_icon,"class","dropdown-icon--clear");set_custom_element_data(goa_icon,"size","medium");set_custom_element_data(goa_icon,"type","close");toggle_class(goa_icon,"disabled",/*_disabled*/ctx[29]);},m(target,anchor){insert(target,goa_icon,anchor);if(!mounted){dispose=[listen(goa_icon,"click",stop_propagation(/*onClear*/ctx[38])),listen(goa_icon,"keydown",/*keydown_handler*/ctx[46])];mounted=true;}},p(ctx,dirty){if(dirty[0]&/*_disabled*/536870912&&goa_icon_tabindex_value!==(goa_icon_tabindex_value=/*_disabled*/ctx[29]?-1:0)){set_custom_element_data(goa_icon,"tabindex",goa_icon_tabindex_value);}if(dirty[0]&/*arialabel, name*/6&&goa_icon_arialabel_value!==(goa_icon_arialabel_value="clear "+(/*arialabel*/ctx[2]||/*name*/ctx[1]))){set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value);}if(dirty[0]&/*_disabled*/536870912){toggle_class(goa_icon,"disabled",/*_disabled*/ctx[29]);}},d(detaching){if(detaching)detach(goa_icon);mounted=false;run_all(dispose);}};}// (582:8) {#if (_filterable && _inputValue.length === 0) || !_filterable}
|
|
187
|
+
function create_if_block_2$a(ctx){let goa_icon;let goa_icon_id_value;let goa_icon_arialabel_value;let goa_icon_ariacontrols_value;let goa_icon_ariaexpanded_value;let goa_icon_type_value;let mounted;let dispose;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"role","button");set_custom_element_data(goa_icon,"id",goa_icon_id_value=`${/*id*/ctx[14]||/*name*/ctx[1]}`);set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value=/*arialabel*/ctx[2]||/*name*/ctx[1]);set_custom_element_data(goa_icon,"ariacontrols",goa_icon_ariacontrols_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`);set_custom_element_data(goa_icon,"ariaexpanded",goa_icon_ariaexpanded_value=/*_isMenuVisible*/ctx[23]?"true":"false");set_custom_element_data(goa_icon,"class","dropdown-icon--arrow");set_custom_element_data(goa_icon,"size","medium");set_custom_element_data(goa_icon,"type",goa_icon_type_value=/*_isMenuVisible*/ctx[23]?'chevron-up':'chevron-down');},m(target,anchor){insert(target,goa_icon,anchor);if(!mounted){dispose=listen(goa_icon,"click",/*onClick*/ctx[37]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*id, name*/16386&&goa_icon_id_value!==(goa_icon_id_value=`${/*id*/ctx[14]||/*name*/ctx[1]}`)){set_custom_element_data(goa_icon,"id",goa_icon_id_value);}if(dirty[0]&/*arialabel, name*/6&&goa_icon_arialabel_value!==(goa_icon_arialabel_value=/*arialabel*/ctx[2]||/*name*/ctx[1])){set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value);}if(dirty[0]&/*id, name*/16386&&goa_icon_ariacontrols_value!==(goa_icon_ariacontrols_value=`menu-${/*id*/ctx[14]||/*name*/ctx[1]}`)){set_custom_element_data(goa_icon,"ariacontrols",goa_icon_ariacontrols_value);}if(dirty[0]&/*_isMenuVisible*/8388608&&goa_icon_ariaexpanded_value!==(goa_icon_ariaexpanded_value=/*_isMenuVisible*/ctx[23]?"true":"false")){set_custom_element_data(goa_icon,"ariaexpanded",goa_icon_ariaexpanded_value);}if(dirty[0]&/*_isMenuVisible*/8388608&&goa_icon_type_value!==(goa_icon_type_value=/*_isMenuVisible*/ctx[23]?'chevron-up':'chevron-down')){set_custom_element_data(goa_icon,"type",goa_icon_type_value);}},d(detaching){if(detaching)detach(goa_icon);mounted=false;dispose();}};}// (628:8) {:else}
|
|
188
|
+
function create_else_block_1(ctx){let li;return {c(){li=element("li");li.textContent="No matches found";attr(li,"class","dropdown-item");attr(li,"data-testid","dropdown-item-not-found");},m(target,anchor){insert(target,li,anchor);},p:noop,d(detaching){if(detaching)detach(li);}};}// (611:8) {#if _filteredOptions.length > 0}
|
|
189
|
+
function create_if_block_1$c(ctx){let each_blocks=[];let each_1_lookup=new Map();let each_1_anchor;let each_value_1=/*_filteredOptions*/ctx[21];const get_key=ctx=>/*index*/ctx[75];for(let i=0;i<each_value_1.length;i+=1){let child_ctx=get_each_context_1(ctx,each_value_1,i);let key=get_key(child_ctx);each_1_lookup.set(key,each_blocks[i]=create_each_block_1(key,child_ctx));}return {c(){for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}each_1_anchor=empty();},m(target,anchor){for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(target,anchor);}}insert(target,each_1_anchor,anchor);},p(ctx,dirty){if(dirty[0]&/*_filteredOptions, value, _highlightedIndex*/2228225|dirty[1]&/*onSelect*/8){each_value_1=/*_filteredOptions*/ctx[21];each_blocks=update_keyed_each(each_blocks,dirty,get_key,1,ctx,each_value_1,each_1_lookup,each_1_anchor.parentNode,destroy_block,create_each_block_1,each_1_anchor,get_each_context_1);}},d(detaching){for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].d(detaching);}if(detaching)detach(each_1_anchor);}};}// (612:10) {#each _filteredOptions as option, index (index)}
|
|
190
|
+
function create_each_block_1(key_1,ctx){let li;let t0_value=(/*option*/ctx[71].label||/*option*/ctx[71].value)+"";let t0;let t1;let li_id_value;let li_aria_selected_value;let li_data_testid_value;let li_data_index_value;let li_data_value_value;let mounted;let dispose;function click_handler(){return(/*click_handler*/ctx[47](/*option*/ctx[71]));}return {key:key_1,first:null,c(){li=element("li");t0=text(t0_value);t1=space();attr(li,"id",li_id_value=/*option*/ctx[71].value);attr(li,"role","option");set_style(li,"display","block");attr(li,"aria-selected",li_aria_selected_value=/*value*/ctx[0]===/*option*/ctx[71].value);attr(li,"class","dropdown-item");attr(li,"data-testid",li_data_testid_value=`dropdown-item-${/*option*/ctx[71].value}`);attr(li,"data-index",li_data_index_value=/*index*/ctx[75]);attr(li,"data-value",li_data_value_value=/*option*/ctx[71].value);toggle_class(li,"dropdown-item--highlighted",/*index*/ctx[75]===/*_highlightedIndex*/ctx[17]);this.first=li;},m(target,anchor){insert(target,li,anchor);append(li,t0);append(li,t1);if(!mounted){dispose=listen(li,"click",click_handler);mounted=true;}},p(new_ctx,dirty){ctx=new_ctx;if(dirty[0]&/*_filteredOptions*/2097152&&t0_value!==(t0_value=(/*option*/ctx[71].label||/*option*/ctx[71].value)+""))set_data(t0,t0_value);if(dirty[0]&/*_filteredOptions*/2097152&&li_id_value!==(li_id_value=/*option*/ctx[71].value)){attr(li,"id",li_id_value);}if(dirty[0]&/*value, _filteredOptions*/2097153&&li_aria_selected_value!==(li_aria_selected_value=/*value*/ctx[0]===/*option*/ctx[71].value)){attr(li,"aria-selected",li_aria_selected_value);}if(dirty[0]&/*_filteredOptions*/2097152&&li_data_testid_value!==(li_data_testid_value=`dropdown-item-${/*option*/ctx[71].value}`)){attr(li,"data-testid",li_data_testid_value);}if(dirty[0]&/*_filteredOptions*/2097152&&li_data_index_value!==(li_data_index_value=/*index*/ctx[75])){attr(li,"data-index",li_data_index_value);}if(dirty[0]&/*_filteredOptions*/2097152&&li_data_value_value!==(li_data_value_value=/*option*/ctx[71].value)){attr(li,"data-value",li_data_value_value);}if(dirty[0]&/*_filteredOptions, _highlightedIndex*/2228224){toggle_class(li,"dropdown-item--highlighted",/*index*/ctx[75]===/*_highlightedIndex*/ctx[17]);}},d(detaching){if(detaching)detach(li);mounted=false;dispose();}};}// (502:6) {#each _options as option}
|
|
191
|
+
function create_each_block$7(ctx){let option;let t0_value=/*option*/ctx[71].label+"";let t0;let t1;let option_selected_value;let option_value_value;return {c(){option=element("option");t0=text(t0_value);t1=space();option.selected=option_selected_value=/*value*/ctx[0]===/*option*/ctx[71].value;option.__value=option_value_value=/*option*/ctx[71].value;option.value=option.__value;},m(target,anchor){insert(target,option,anchor);append(option,t0);append(option,t1);},p(ctx,dirty){if(dirty[0]&/*_options*/32768&&t0_value!==(t0_value=/*option*/ctx[71].label+""))set_data(t0,t0_value);if(dirty[0]&/*value, _options*/32769&&option_selected_value!==(option_selected_value=/*value*/ctx[0]===/*option*/ctx[71].value)){option.selected=option_selected_value;}if(dirty[0]&/*_options*/32768&&option_value_value!==(option_value_value=/*option*/ctx[71].value)){option.__value=option_value_value;option.value=option.__value;}},d(detaching){if(detaching)detach(option);}};}function create_fragment$H(ctx){let div;let div_data_testid_value;let div_style_value;function select_block_type(ctx,dirty){if(/*_native*/ctx[22])return create_if_block$o;return create_else_block$a;}let current_block_type=select_block_type(ctx);let if_block=current_block_type(ctx);return {c(){div=element("div");if_block.c();this.c=noop;attr(div,"data-testid",div_data_testid_value=`${/*name*/ctx[1]}-dropdown`);attr(div,"class","dropdown");attr(div,"style",div_style_value=`
|
|
191
192
|
${calculateMargin(/*mt*/ctx[10],/*mr*/ctx[11],/*mb*/ctx[12],/*ml*/ctx[13])}
|
|
192
|
-
--width: ${/*width*/ctx[7]||/*_computedWidth*/ctx[
|
|
193
|
-
`);toggle_class(div,"dropdown-native",/*_native*/ctx[
|
|
193
|
+
--width: ${/*width*/ctx[7]||/*_computedWidth*/ctx[24]}
|
|
194
|
+
`);toggle_class(div,"dropdown-native",/*_native*/ctx[22]);},m(target,anchor){insert(target,div,anchor);if_block.m(div,null);/*div_binding*/ctx[50](div);},p(ctx,dirty){if(current_block_type===(current_block_type=select_block_type(ctx))&&if_block){if_block.p(ctx,dirty);}else {if_block.d(1);if_block=current_block_type(ctx);if(if_block){if_block.c();if_block.m(div,null);}}if(dirty[0]&/*name*/2&&div_data_testid_value!==(div_data_testid_value=`${/*name*/ctx[1]}-dropdown`)){attr(div,"data-testid",div_data_testid_value);}if(dirty[0]&/*mt, mr, mb, ml, width, _computedWidth*/16792704&&div_style_value!==(div_style_value=`
|
|
194
195
|
${calculateMargin(/*mt*/ctx[10],/*mr*/ctx[11],/*mb*/ctx[12],/*ml*/ctx[13])}
|
|
195
|
-
--width: ${/*width*/ctx[7]||/*_computedWidth*/ctx[
|
|
196
|
-
`)){attr(div,"style",div_style_value);}if(dirty[0]&/*_native*/
|
|
196
|
+
--width: ${/*width*/ctx[7]||/*_computedWidth*/ctx[24]}
|
|
197
|
+
`)){attr(div,"style",div_style_value);}if(dirty[0]&/*_native*/4194304){toggle_class(div,"dropdown-native",/*_native*/ctx[22]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);if_block.d();/*div_binding*/ctx[50](null);}};}function isPrintableCharacter(inputChar){return inputChar.length===1&&inputChar.match(/\S| /)!=null;}// parse and convert values to strings to avoid later type comparison issues
|
|
197
198
|
function parseValues(selectedValue){let rawValue;try{rawValue=JSON.parse(selectedValue||`[""]`);}catch(e){rawValue=[selectedValue];}const rawValues=typeof rawValue==="object"?rawValue:[rawValue];// convert all values to strings to avoid later type comparison issues
|
|
198
199
|
return rawValues.map(val=>`${val}`);}function isMatched(option,query){if(query.length===0)return true;// in case query is "white whale", "b c"
|
|
199
200
|
const queryWords=query.toLowerCase().split(/\s+/);//In case option is "white whale", "american samoa"
|
|
@@ -207,7 +208,7 @@
|
|
|
207
208
|
let _values=[];let _options=[];let _inputValue="";let _isMenuVisible=false;let _highlightedIndex=-1;// keep track highlighted option, for arrow up/down
|
|
208
209
|
let _computedWidth;let _selectedOption=undefined;// to keep track if value is matched to combobox option
|
|
209
210
|
let _previousSelectedValue="";// to keep track if value is changed from previously selected value - for clear button
|
|
210
|
-
let _el;let _menuEl;let _selectEl;let _popOverEl;let _inputEl;afterUpdate(()=>{if(_options.length===0)return;_isMenuVisible?_inputEl.focus():updateInputValue(_selectedOption);});onMount(_async(function(){// watch for DOM changes within the slot => dynamic binding
|
|
211
|
+
let _inputWidth;let _el;let _menuEl;let _selectEl;let _popOverEl;let _inputEl;afterUpdate(()=>{if(_options.length===0)return;_isMenuVisible?_inputEl.focus():updateInputValue(_selectedOption);});onMount(_async(function(){// watch for DOM changes within the slot => dynamic binding
|
|
211
212
|
const slot=_el.querySelector("slot");slot===null||slot===void 0?void 0:slot.addEventListener("slotchange",_e=>{_values=parseValues(value);$$invalidate(15,_options=getOptions());});return _await();}));// Functions
|
|
212
213
|
function getChildren(){const slot=_el.querySelector("slot");if(slot){// default
|
|
213
214
|
return slot.assignedElements();}// unit tests
|
|
@@ -225,25 +226,25 @@
|
|
|
225
226
|
*/function setSelectedOption(selectedValue){return _filterable?setSelectedOptionByInputValue():_selectedOption=_options.find(item=>item.value===selectedValue);}/**
|
|
226
227
|
* Update according to input's value (for filterable dropdown)
|
|
227
228
|
*/function setSelectedOptionByInputValue(){const filteredItems=_options.filter(item=>isMatched(item,_inputValue));const isTypingInputMatchedOption=filteredItems.length===1&&_isMenuVisible;if(!isTypingInputMatchedOption){// follow local value
|
|
228
|
-
_selectedOption=_options.find(item=>item.value===value);return;}_selectedOption=filteredItems[0];updateInputValue(_selectedOption);$$invalidate(
|
|
229
|
+
_selectedOption=_options.find(item=>item.value===value);return;}_selectedOption=filteredItems[0];updateInputValue(_selectedOption);$$invalidate(30,_activeDescendantId=undefined);}/**
|
|
229
230
|
* Update input's value according to selected dropdown option
|
|
230
231
|
* @param option
|
|
231
|
-
*/function updateInputValue(option){$$invalidate(17,_highlightedIndex=-1);$$invalidate(16,_inputValue=option?option.label:"");$$invalidate(0,value=option?option.value:"");if(!option){$$invalidate(
|
|
232
|
+
*/function updateInputValue(option){$$invalidate(17,_highlightedIndex=-1);$$invalidate(16,_inputValue=option?option.label:"");$$invalidate(0,value=option?option.value:"");if(!option){$$invalidate(30,_activeDescendantId=undefined);}}/**
|
|
232
233
|
* Keep track the component's local value based on new selected value
|
|
233
234
|
* @param newSelectedValue
|
|
234
235
|
*/function updateSelectedValue(newSelectedValue){if(_previousSelectedValue!==newSelectedValue){_previousSelectedValue=newSelectedValue;setSelectedOption(newSelectedValue);_values=[value];// Keep track _values, for multiSelect later
|
|
235
|
-
dispatchValue(value);}}function showMenu(){if(_disabled){return;}$$invalidate(
|
|
236
|
+
dispatchValue(value);}}function showMenu(){if(_disabled){return;}$$invalidate(23,_isMenuVisible=true);}function closeMenu(){$$invalidate(23,_isMenuVisible=false);}function dispatchValue(optionValue){const option=_options.find(item=>item.value===optionValue);const newValue=option?option.value:"";let detail;if(_multiselect){_values.push(newValue);detail={name,values:_values};}else {_values=[newValue];detail={name,value:newValue};}_el.dispatchEvent(new CustomEvent("_change",{composed:true,detail}));}// Event handlers
|
|
236
237
|
function onSelect(option){if(_disabled)return;$$invalidate(0,value=option.value);_selectedOption=option;if(!_native){closeMenu();$$invalidate(16,_inputValue=option.label);_inputEl.focus();}}function ComboboxKeyDownHandler(){const handle=e=>{let stopPropagation=false;switch(e.key){case"Enter":onEnter();stopPropagation=true;break;case"Escape":case'Esc':closeMenu();removeSelectedValue();stopPropagation=true;break;case'Up':case"ArrowUp":onArrowUp();stopPropagation=true;break;case"Down":case"ArrowDown":onArrowDown();stopPropagation=true;break;case"Tab":closeMenu();break;case'Home':_inputEl.setSelectionRange(0,0);stopPropagation=true;break;case'End':_inputEl.setSelectionRange(_inputValue.length,_inputValue.length);stopPropagation=true;break;case'Backspace':if(_inputValue.length===0){// backspace should not open the filterable dropdown if input has no words
|
|
237
238
|
stopPropagation=true;return;}onBackspace();break;case' ':if(_inputValue.length===0){// space should not open the filterable dropdown if input has no words
|
|
238
|
-
stopPropagation=true;}break;default:if(isPrintableCharacter(e.key)){if(!_isMenuVisible){showMenu();}if(!_inputValue.length){removeSelectedValue();}}break;}if(stopPropagation){e.preventDefault();e.stopPropagation();}};const onEnter=()=>{$$invalidate(
|
|
239
|
-
};const onArrowUp=()=>{showMenu();changeHighlightedOption(-1);};const onArrowDown=()=>{showMenu();changeHighlightedOption(1);};const onBackspace=()=>{showMenu();if(_inputValue.length===1){removeSelectedValue();}};const selectOption=option=>{closeMenu();if(option){$$invalidate(16,_inputValue=option.label);_selectedOption=option;$$invalidate(0,value=option.value);}};return {handle};}function DropdownKeyDownHandler(){const handle=e=>{let stopPropagation=false;switch(e.key){case" ":onSpace();stopPropagation=true;break;case"Enter":onEnter();stopPropagation=true;break;case"Escape":closeMenu();break;case"Up":case"ArrowUp":onArrowUp();stopPropagation=true;break;case"Down":case"ArrowDown":onArrowDown();stopPropagation=true;break;case"Tab":closeMenu();break;}if(stopPropagation){e.preventDefault();e.stopPropagation();}};const onSpace=()=>{$$invalidate(
|
|
240
|
-
if(_highlightedIndex>-1&&_filteredOptions[_highlightedIndex].value!==value)$$invalidate(0,value=_filteredOptions[_highlightedIndex].value);};const onEnter=()=>{$$invalidate(
|
|
241
|
-
onClear();}};const click_handler=option=>onSelect(option);function ul_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_menuEl=$$value;$$invalidate(
|
|
242
|
-
}if($$self.$$.dirty[0]&/*_el, value, _native, _options*/
|
|
243
|
-
if(_el){_values=parseValues(value);$$invalidate(15,_options=getOptions());if(!_native){$$invalidate(
|
|
244
|
-
updateSelectedValue(value);}}}if($$self.$$.dirty[0]&/*_filterable, _options, _inputValue*/
|
|
245
|
-
$$invalidate(
|
|
246
|
-
}};return [value,name,arialabel,arialabelledby,leadingicon,maxheight,placeholder,width,disabled,relative,mt,mr,mb,ml,id,_options,_inputValue,_highlightedIndex,_el,_filterable,_filteredOptions,_native,_isMenuVisible,_computedWidth,_menuEl,_selectEl,_popOverEl,
|
|
239
|
+
stopPropagation=true;}break;default:if(isPrintableCharacter(e.key)){if(!_isMenuVisible){showMenu();}if(!_inputValue.length){removeSelectedValue();}}break;}if(stopPropagation){e.preventDefault();e.stopPropagation();}};const onEnter=()=>{$$invalidate(23,_isMenuVisible=!_isMenuVisible);if(_highlightedIndex<0){const matchedOption=_filteredOptions.find(option=>option.label.toLowerCase()===(_inputValue===null||_inputValue===void 0?void 0:_inputValue.toLowerCase()));selectOption(matchedOption);return;}const highlightedOption=_filteredOptions[_highlightedIndex];selectOption(highlightedOption);$$invalidate(17,_highlightedIndex=-1);// reset highlighted option
|
|
240
|
+
};const onArrowUp=()=>{showMenu();changeHighlightedOption(-1);};const onArrowDown=()=>{showMenu();changeHighlightedOption(1);};const onBackspace=()=>{showMenu();if(_inputValue.length===1){removeSelectedValue();}};const selectOption=option=>{closeMenu();if(option){$$invalidate(16,_inputValue=option.label);_selectedOption=option;$$invalidate(0,value=option.value);}};return {handle};}function DropdownKeyDownHandler(){const handle=e=>{let stopPropagation=false;switch(e.key){case" ":onSpace();stopPropagation=true;break;case"Enter":onEnter();stopPropagation=true;break;case"Escape":closeMenu();break;case"Up":case"ArrowUp":onArrowUp();stopPropagation=true;break;case"Down":case"ArrowDown":onArrowDown();stopPropagation=true;break;case"Tab":closeMenu();break;}if(stopPropagation){e.preventDefault();e.stopPropagation();}};const onSpace=()=>{$$invalidate(23,_isMenuVisible=!_isMenuVisible);// toggle menu
|
|
241
|
+
if(_highlightedIndex>-1&&_filteredOptions[_highlightedIndex].value!==value)$$invalidate(0,value=_filteredOptions[_highlightedIndex].value);};const onEnter=()=>{$$invalidate(23,_isMenuVisible=!_isMenuVisible);if(_highlightedIndex>-1&&_filteredOptions[_highlightedIndex].value!==value){$$invalidate(0,value=_filteredOptions[_highlightedIndex].value);closeMenu();}};const onArrowUp=()=>{if(!_isMenuVisible)showMenu();changeHighlightedOption(-1);};const onArrowDown=()=>{if(!_isMenuVisible)showMenu();changeHighlightedOption(1);};return {handle};}const comboboxHandler=ComboboxKeyDownHandler();const dropdownHandler=DropdownKeyDownHandler();const onInputKeyDown=e=>{if(_disabled)return;if(_filterable){comboboxHandler.handle(e);}else {dropdownHandler.handle(e);}};function onNativeSelect(e){const target=e.currentTarget;const option=_options[target.selectedIndex];onSelect(option);}function removeSelectedValue(){if(_disabled)return;_previousSelectedValue=null;_selectedOption=undefined;updateInputValue(_selectedOption);}function onClear(){removeSelectedValue();_inputEl.focus();onClick();}function select_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_selectEl=$$value;$$invalidate(27,_selectEl);((($$invalidate(15,_options),$$invalidate(18,_el)),$$invalidate(0,value)),$$invalidate(22,_native)),$$invalidate(42,native);});}function input_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_inputEl=$$value;$$invalidate(19,_inputEl);});}function input_input_handler(){_inputValue=this.value;$$invalidate(16,_inputValue);}const keydown_handler=e=>{if(e.key==='Enter'){// for keyboard accessibility to press the clear icon
|
|
242
|
+
onClear();}};const click_handler=option=>onSelect(option);function ul_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_menuEl=$$value;$$invalidate(26,_menuEl);});}function goa_popover_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_popOverEl=$$value;$$invalidate(28,_popOverEl);});}function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_el=$$value;$$invalidate(18,_el);});}$$self.$$set=$$props=>{if('name'in $$props)$$invalidate(1,name=$$props.name);if('arialabel'in $$props)$$invalidate(2,arialabel=$$props.arialabel);if('arialabelledby'in $$props)$$invalidate(3,arialabelledby=$$props.arialabelledby);if('value'in $$props)$$invalidate(0,value=$$props.value);if('filterable'in $$props)$$invalidate(39,filterable=$$props.filterable);if('leadingicon'in $$props)$$invalidate(4,leadingicon=$$props.leadingicon);if('maxheight'in $$props)$$invalidate(5,maxheight=$$props.maxheight);if('placeholder'in $$props)$$invalidate(6,placeholder=$$props.placeholder);if('width'in $$props)$$invalidate(7,width=$$props.width);if('disabled'in $$props)$$invalidate(8,disabled=$$props.disabled);if('error'in $$props)$$invalidate(40,error=$$props.error);if('multiselect'in $$props)$$invalidate(41,multiselect=$$props.multiselect);if('native'in $$props)$$invalidate(42,native=$$props.native);if('relative'in $$props)$$invalidate(9,relative=$$props.relative);if('mt'in $$props)$$invalidate(10,mt=$$props.mt);if('mr'in $$props)$$invalidate(11,mr=$$props.mr);if('mb'in $$props)$$invalidate(12,mb=$$props.mb);if('ml'in $$props)$$invalidate(13,ml=$$props.ml);if('id'in $$props)$$invalidate(14,id=$$props.id);};$$self.$$.update=()=>{if($$self.$$.dirty[0]&/*disabled*/256){$$invalidate(29,_disabled=toBoolean(disabled));}if($$self.$$.dirty[1]&/*error*/512){$$invalidate(31,_error=toBoolean(error));}if($$self.$$.dirty[1]&/*multiselect*/1024){_multiselect=toBoolean(multiselect);}if($$self.$$.dirty[1]&/*native*/2048){$$invalidate(22,_native=toBoolean(native));}if($$self.$$.dirty[0]&/*_native*/4194304|$$self.$$.dirty[1]&/*filterable*/256){$$invalidate(20,_filterable=toBoolean(filterable)&&!_native);// Will replace datalist for filterable true
|
|
243
|
+
}if($$self.$$.dirty[0]&/*_el, value, _native, _options*/4489217){// Reactive statement
|
|
244
|
+
if(_el){_values=parseValues(value);$$invalidate(15,_options=getOptions());if(!_native){$$invalidate(24,_computedWidth=getCustomDropdownWidth(_options));}if(_options.length){// Keep track of initialized value
|
|
245
|
+
updateSelectedValue(value);}}}if($$self.$$.dirty[0]&/*_filterable, _options, _inputValue*/1146880){$$invalidate(21,_filteredOptions=_filterable?_options.filter(option=>isMatched(option,_inputValue)):_options);}if($$self.$$.dirty[0]&/*_filteredOptions, _highlightedIndex*/2228224){// Accessibility
|
|
246
|
+
$$invalidate(30,_activeDescendantId=_filteredOptions[_highlightedIndex]?_filteredOptions[_highlightedIndex].value:undefined);//To keep track of active descendant for the accessibility
|
|
247
|
+
}if($$self.$$.dirty[0]&/*_inputEl, _options*/557056){if(_inputEl&&_options.length){$$invalidate(25,_inputWidth=`${_inputEl.getBoundingClientRect().width}px`);}}};return [value,name,arialabel,arialabelledby,leadingicon,maxheight,placeholder,width,disabled,relative,mt,mr,mb,ml,id,_options,_inputValue,_highlightedIndex,_el,_inputEl,_filterable,_filteredOptions,_native,_isMenuVisible,_computedWidth,_inputWidth,_menuEl,_selectEl,_popOverEl,_disabled,_activeDescendantId,_error,showMenu,closeMenu,onSelect,onInputKeyDown,onNativeSelect,onClick,onClear,filterable,error,multiselect,native,select_binding,input_binding,input_input_handler,keydown_handler,click_handler,ul_binding,goa_popover_binding,div_binding];}class Dropdown extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.dropdown{cursor:pointer;display:inline-block;width:var(--width, 100%)}.dropdown-input-group{box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);display:inline-flex;align-items:stretch;vertical-align:middle;background-color:var(--goa-color-greyscale-white);cursor:pointer;width:100%}.dropdown-input-group:hover{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}.dropdown-input-group:focus,.dropdown-input-group:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}@media(min-width: 640px){.dropdown-input-group{width:var(--width)}}.dropdown-input-group.error,.dropdown-input-group.error:hover{border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 1px var(--goa-color-interactive-error)}.dropdown-input-group.error:focus-within,.dropdown-input-group.error:focus{border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}.dropdown-icon--arrow,.dropdown-icon--clear{margin-right:var(--goa-space-s)}.dropdown-icon--clear:focus:not(.disabled),.dropdown-icon--clear:active:not(.disabled){color:var(--goa-color-interactive-focus);outline:none}.dropdown-input--leading-icon{margin-left:0.75rem}.dropdown-input--leading-icon+input{padding-left:0.5rem}input{display:inline-block;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);padding:var(--goa-space-xs);padding-left:var(--goa-space-s);line-height:calc(40px - calc(var(--goa-space-xs) * 2));background-color:transparent;width:100%;flex:1 1 auto;font-family:var(--goa-font-family-sans);z-index:1}input,input:focus,input:hover,input:active{outline:none;border:none}input[aria-disabled="true"]{color:var(--goa-color-text-secondary)}.dropdown-input-group--disabled,.dropdown-input-group--disabled:hover,.dropdown-input-group--disabled:active,.dropdown-input-group--disabled:focus{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200) !important;cursor:default;box-shadow:none !important}ul[role="listbox"]{border-radius:var(--goa-border-radius-m)}.dropdown-item{margin:0;padding:0.5rem;cursor:pointer;color:var(--goa-color-greyscale-black);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-item:hover,.dropdown-item--highlighted{background:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover)}.dropdown-item[aria-selected="true"]{background:var(--goa-color-interactive-default);color:var(--goa-color-greyscale-white)}.dropdown-item[aria-selected="true"]:hover,.dropdown-item[aria-selected="true"].dropdown-item--highlighted{background:var(--goa-color-interactive-hover);color:var(--goa-color-greyscale-white)}.dropdown-native{position:relative;border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);background-color:var(--goa-color-greyscale-white);transition:box-shadow 0.1s ease-in}.dropdown-native:has(select:disabled){background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);box-shadow:none;color:var(--goa-color-text-secondary);cursor:default}.dropdown-native:has(select.error){border:2px solid var(--goa-color-interactive-error)}.dropdown-native:hover{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}select{border:none;font:var(--goa-font-family-sans);background-color:transparent;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);appearance:none;padding:calc(var(--goa-space-xs) + 1px);padding-left:var(--goa-space-s);padding-right:3rem;outline:none;width:100%}.dropdown-native::after{content:"";position:absolute;right:0.6rem;top:0.6rem;pointer-events:none;width:1.5rem;height:1.5rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='none' stroke='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 184l144 144 144-144' /%3E%3C/svg%3E");background-repeat:none}.dropdown-native:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$E,create_fragment$H,safe_not_equal,{name:1,arialabel:2,arialabelledby:3,value:0,filterable:39,leadingicon:4,maxheight:5,placeholder:6,width:7,disabled:8,error:40,multiselect:41,native:42,relative:9,mt:10,mr:11,mb:12,ml:13,id:14},null,[-1,-1,-1]);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["name","arialabel","arialabelledby","value","filterable","leadingicon","maxheight","placeholder","width","disabled","error","multiselect","native","relative","mt","mr","mb","ml","id"];}get name(){return this.$$.ctx[1];}set name(name){this.$$set({name});flush();}get arialabel(){return this.$$.ctx[2];}set arialabel(arialabel){this.$$set({arialabel});flush();}get arialabelledby(){return this.$$.ctx[3];}set arialabelledby(arialabelledby){this.$$set({arialabelledby});flush();}get value(){return this.$$.ctx[0];}set value(value){this.$$set({value});flush();}get filterable(){return this.$$.ctx[39];}set filterable(filterable){this.$$set({filterable});flush();}get leadingicon(){return this.$$.ctx[4];}set leadingicon(leadingicon){this.$$set({leadingicon});flush();}get maxheight(){return this.$$.ctx[5];}set maxheight(maxheight){this.$$set({maxheight});flush();}get placeholder(){return this.$$.ctx[6];}set placeholder(placeholder){this.$$set({placeholder});flush();}get width(){return this.$$.ctx[7];}set width(width){this.$$set({width});flush();}get disabled(){return this.$$.ctx[8];}set disabled(disabled){this.$$set({disabled});flush();}get error(){return this.$$.ctx[40];}set error(error){this.$$set({error});flush();}get multiselect(){return this.$$.ctx[41];}set multiselect(multiselect){this.$$set({multiselect});flush();}get native(){return this.$$.ctx[42];}set native(native){this.$$set({native});flush();}get relative(){return this.$$.ctx[9];}set relative(relative){this.$$set({relative});flush();}get mt(){return this.$$.ctx[10];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[11];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[12];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[13];}set ml(ml){this.$$set({ml});flush();}get id(){return this.$$.ctx[14];}set id(id){this.$$set({id});flush();}}customElements.define("goa-dropdown",Dropdown);/* libs/web-components/src/components/dropdown/DropdownItem.svelte generated by Svelte v3.59.2 */function create_fragment$G(ctx){return {c(){this.c=noop;},m:noop,p:noop,i:noop,o:noop,d:noop};}function instance$D($$self,$$props,$$invalidate){let{filter=""}=$$props;let{label=""}=$$props;let{value=""}=$$props;$$self.$$set=$$props=>{if('filter'in $$props)$$invalidate(0,filter=$$props.filter);if('label'in $$props)$$invalidate(1,label=$$props.label);if('value'in $$props)$$invalidate(2,value=$$props.value);};return [filter,label,value];}class DropdownItem extends SvelteElement{constructor(options){super();init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$D,create_fragment$G,safe_not_equal,{filter:0,label:1,value:2},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["filter","label","value"];}get filter(){return this.$$.ctx[0];}set filter(filter){this.$$set({filter});flush();}get label(){return this.$$.ctx[1];}set label(label){this.$$set({label});flush();}get value(){return this.$$.ctx[2];}set value(value){this.$$set({value});flush();}}customElements.define("goa-dropdown-item",DropdownItem);/* libs/web-components/src/components/focus-trap/FocusTrap.svelte generated by Svelte v3.59.2 */function create_fragment$F(ctx){let div;return {c(){div=element("div");div.innerHTML=`<span data-tab-boundry="start" tabindex="0"></span>
|
|
247
248
|
<slot></slot>
|
|
248
249
|
|
|
249
250
|
<span data-tab-boundry="end" tabindex="0"></span>`;this.c=noop;},m(target,anchor){insert(target,div,anchor);/*div_binding*/ctx[1](div);},p:noop,i:noop,o:noop,d(detaching){if(detaching)detach(div);/*div_binding*/ctx[1](null);}};}function isFocusable(node){var _a;const element=node;const isTabbable=element.tabIndex>0||element.tabIndex===0&&element.getAttribute('tabIndex')!==null;if(isTabbable)return node;if(element["disabled"])return null;if(element.tabIndex<0||((_a=element.getAttribute)===null||_a===void 0?void 0:_a.call(element,"tabindex"))==="-1")return null;switch(element.nodeName){case'A':{const el=element;if(!!el.href&&el.rel!=='ignore')return node;}case'INPUT':{const el=element;if(el.type!=='hidden'&&el.type!=='file')return node;}case'BUTTON':case'SELECT':case'TEXTAREA':return node;default:return null;}}function instance$C($$self,$$props,$$invalidate){let rootEl;let boundryStartEl;let boundryEndEl;let isShiftPressed;// Hooks
|
|
@@ -362,6 +363,7 @@
|
|
|
362
363
|
${cssVar("--offset-right",/*hoffset*/ctx[9])}
|
|
363
364
|
${cssVar("--focus-border-width",/*focusborderwidth*/ctx[10])}
|
|
364
365
|
${cssVar("--border-radius",/*borderradius*/ctx[11])}
|
|
366
|
+
${cssVar("width","100%")}
|
|
365
367
|
`);},m(target,anchor){insert(target,div1,anchor);append(div1,div0);append(div0,slot);/*div0_binding*/ctx[27](div0);append(div1,t);if(if_block)if_block.m(div1,null);/*div1_binding_1*/ctx[31](div1);if(!mounted){dispose=listen(div0,"click",/*openPopover*/ctx[20]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*tabindex*/128&&div0_tabindex_value!==(div0_tabindex_value=+/*tabindex*/ctx[7])){attr(div0,"tabindex",div0_tabindex_value);}if(/*_open*/ctx[13]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$e(ctx);if_block.c();if_block.m(div1,null);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty[0]&/*testid*/1){attr(div1,"data-testid",/*testid*/ctx[0]);}if(dirty[0]&/*_relative, mt, mr, mb, ml, voffset, hoffset, focusborderwidth, borderradius*/266104&&div1_style_value!==(div1_style_value=`
|
|
366
368
|
${/*_relative*/ctx[18]&&"position: relative;"}
|
|
367
369
|
${calculateMargin(/*mt*/ctx[3],/*mr*/ctx[4],/*mb*/ctx[5],/*ml*/ctx[6])}
|
|
@@ -371,6 +373,7 @@
|
|
|
371
373
|
${cssVar("--offset-right",/*hoffset*/ctx[9])}
|
|
372
374
|
${cssVar("--focus-border-width",/*focusborderwidth*/ctx[10])}
|
|
373
375
|
${cssVar("--border-radius",/*borderradius*/ctx[11])}
|
|
376
|
+
${cssVar("width","100%")}
|
|
374
377
|
`)){attr(div1,"style",div1_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div1);/*div0_binding*/ctx[27](null);if(if_block)if_block.d();/*div1_binding_1*/ctx[31](null);mounted=false;dispose();}};}function getBoundingClientRectWithMargins(el){const rect=el.getBoundingClientRect();const style=window.getComputedStyle(el);const mTop=parseInt(style.marginTop,10)||0;const mRight=parseInt(style.marginRight,10)||0;const mBottom=parseInt(style.marginBottom,10)||0;const mLeft=parseInt(style.marginLeft,10)||0;return {top:rect.top-mTop,right:rect.right+mRight,bottom:rect.bottom+mBottom,left:rect.left-mLeft,width:rect.width+mLeft+mRight,height:rect.height+mTop+mBottom,x:rect.x-mLeft,y:rect.y-mTop};}function instance$n($$self,$$props,$$invalidate){const setPopoverPosition=function setPopoverPosition(){return _call(tick,function(){// Get target and content rectangles
|
|
375
378
|
const rootRect=_rootEl.getBoundingClientRect();const targetRect=getBoundingClientRectWithMargins(_targetEl);const contentRect=getBoundingClientRectWithMargins(_popoverEl);// Calculate available space above and below the target element
|
|
376
379
|
const spaceAbove=targetRect.top;const spaceBelow=window.innerHeight-targetRect.bottom;// Determine if there's more space above or below the target element
|
|
@@ -394,7 +397,7 @@
|
|
|
394
397
|
// the popover to be shown re-attains focus and that any window event binding
|
|
395
398
|
// is removed (it may not have been added if target was clicked)
|
|
396
399
|
function closePopover(){_initFocusedEl.focus();$$invalidate(13,_open=false);window.removeEventListener("popstate",handleUrlChange,true);_rootEl.dispatchEvent(new CustomEvent("_close",{composed:true}));}function div0_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_targetEl=$$value;$$invalidate(15,_targetEl);});}function div1_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_focusTrapEl=$$value;$$invalidate(17,_focusTrapEl);});}function section_elementresize_handler(){_sectionHeight=this.clientHeight;$$invalidate(12,_sectionHeight);}function section_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_popoverEl=$$value;$$invalidate(16,_popoverEl);});}function div1_binding_1($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(14,_rootEl);});}$$self.$$set=$$props=>{if('testid'in $$props)$$invalidate(0,testid=$$props.testid);if('maxwidth'in $$props)$$invalidate(1,maxwidth=$$props.maxwidth);if('width'in $$props)$$invalidate(2,width=$$props.width);if('padded'in $$props)$$invalidate(22,padded=$$props.padded);if('position'in $$props)$$invalidate(23,position=$$props.position);if('relative'in $$props)$$invalidate(24,relative=$$props.relative);if('mt'in $$props)$$invalidate(3,mt=$$props.mt);if('mr'in $$props)$$invalidate(4,mr=$$props.mr);if('mb'in $$props)$$invalidate(5,mb=$$props.mb);if('ml'in $$props)$$invalidate(6,ml=$$props.ml);if('open'in $$props)$$invalidate(25,open=$$props.open);if('disabled'in $$props)$$invalidate(26,disabled=$$props.disabled);if('tabindex'in $$props)$$invalidate(7,tabindex=$$props.tabindex);if('voffset'in $$props)$$invalidate(8,voffset=$$props.voffset);if('hoffset'in $$props)$$invalidate(9,hoffset=$$props.hoffset);if('focusborderwidth'in $$props)$$invalidate(10,focusborderwidth=$$props.focusborderwidth);if('borderradius'in $$props)$$invalidate(11,borderradius=$$props.borderradius);};$$self.$$.update=()=>{if($$self.$$.dirty[0]&/*padded*/4194304){// Reactive
|
|
397
|
-
$$invalidate(19,_padded=toBoolean(padded));}if($$self.$$.dirty[0]&/*open*/33554432){$$invalidate(13,_open=toBoolean(open));}if($$self.$$.dirty[0]&/*disabled*/67108864){_disabled=toBoolean(disabled);}if($$self.$$.dirty[0]&/*relative*/16777216){$$invalidate(18,_relative=toBoolean(relative));}if($$self.$$.dirty[0]&/*_open*/8192){_async(function(){const _open2=_open;return _open2&&setPopoverPosition();})();}if($$self.$$.dirty[0]&/*_sectionHeight*/4096){_async(function(){const _sectionHeight2=_sectionHeight;return _sectionHeight2&&setPopoverPosition();})();}if($$self.$$.dirty[0]&/*_open*/8192){{if(_open){window.addEventListener("popstate",handleUrlChange,true);}else {window.removeEventListener("popstate",handleUrlChange,true);}}}};return [testid,maxwidth,width,mt,mr,mb,ml,tabindex,voffset,hoffset,focusborderwidth,borderradius,_sectionHeight,_open,_rootEl,_targetEl,_popoverEl,_focusTrapEl,_relative,_padded,openPopover,closePopover,padded,position,relative,open,disabled,div0_binding,div1_binding,section_elementresize_handler,section_binding,div1_binding_1];}class Popover extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4);display:flex;align-items:center}.popover-target{
|
|
400
|
+
$$invalidate(19,_padded=toBoolean(padded));}if($$self.$$.dirty[0]&/*open*/33554432){$$invalidate(13,_open=toBoolean(open));}if($$self.$$.dirty[0]&/*disabled*/67108864){_disabled=toBoolean(disabled);}if($$self.$$.dirty[0]&/*relative*/16777216){$$invalidate(18,_relative=toBoolean(relative));}if($$self.$$.dirty[0]&/*_open*/8192){_async(function(){const _open2=_open;return _open2&&setPopoverPosition();})();}if($$self.$$.dirty[0]&/*_sectionHeight*/4096){_async(function(){const _sectionHeight2=_sectionHeight;return _sectionHeight2&&setPopoverPosition();})();}if($$self.$$.dirty[0]&/*_open*/8192){{if(_open){window.addEventListener("popstate",handleUrlChange,true);}else {window.removeEventListener("popstate",handleUrlChange,true);}}}};return [testid,maxwidth,width,mt,mr,mb,ml,tabindex,voffset,hoffset,focusborderwidth,borderradius,_sectionHeight,_open,_rootEl,_targetEl,_popoverEl,_focusTrapEl,_relative,_padded,openPopover,closePopover,padded,position,relative,open,disabled,div0_binding,div1_binding,section_elementresize_handler,section_binding,div1_binding_1];}class Popover extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4);display:flex;align-items:center}.popover-target{cursor:pointer}.popover-target:focus{outline:var(--focus-border-width) solid var(--goa-color-interactive-focus)}.popover-content{color:var(--goa-color-text-default);position:absolute;width:fit-content;max-width:260px;list-style-type:none;background:var(--goa-color-greyscale-white);border-radius:var(--border-radius);outline:none;filter:drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.2));z-index:99;width:max-content;margin-top:var(--offset-top, 3px);margin-bottom:var(--offset-bottom, 3px);margin-left:var(--offset-left, 0);margin-right:var(--offset-right, 0)}::slotted(ul){display:block;padding:0;margin:0;list-style-type:none;line-height:2rem}.popover-background{cursor:default;position:fixed;z-index:98;inset:0}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$n,create_fragment$q,safe_not_equal,{testid:0,maxwidth:1,width:2,padded:22,position:23,relative:24,mt:3,mr:4,mb:5,ml:6,open:25,disabled:26,tabindex:7,voffset:8,hoffset:9,focusborderwidth:10,borderradius:11},null,[-1,-1]);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["testid","maxwidth","width","padded","position","relative","mt","mr","mb","ml","open","disabled","tabindex","voffset","hoffset","focusborderwidth","borderradius"];}get testid(){return this.$$.ctx[0];}set testid(testid){this.$$set({testid});flush();}get maxwidth(){return this.$$.ctx[1];}set maxwidth(maxwidth){this.$$set({maxwidth});flush();}get width(){return this.$$.ctx[2];}set width(width){this.$$set({width});flush();}get padded(){return this.$$.ctx[22];}set padded(padded){this.$$set({padded});flush();}get position(){return this.$$.ctx[23];}set position(position){this.$$set({position});flush();}get relative(){return this.$$.ctx[24];}set relative(relative){this.$$set({relative});flush();}get mt(){return this.$$.ctx[3];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[4];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[5];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[6];}set ml(ml){this.$$set({ml});flush();}get open(){return this.$$.ctx[25];}set open(open){this.$$set({open});flush();}get disabled(){return this.$$.ctx[26];}set disabled(disabled){this.$$set({disabled});flush();}get tabindex(){return this.$$.ctx[7];}set tabindex(tabindex){this.$$set({tabindex});flush();}get voffset(){return this.$$.ctx[8];}set voffset(voffset){this.$$set({voffset});flush();}get hoffset(){return this.$$.ctx[9];}set hoffset(hoffset){this.$$set({hoffset});flush();}get focusborderwidth(){return this.$$.ctx[10];}set focusborderwidth(focusborderwidth){this.$$set({focusborderwidth});flush();}get borderradius(){return this.$$.ctx[11];}set borderradius(borderradius){this.$$set({borderradius});flush();}}customElements.define("goa-popover",Popover);/* libs/web-components/src/components/radio-group/RadioGroup.svelte generated by Svelte v3.59.2 */function get_each_context$3(ctx,list,i){const child_ctx=ctx.slice();child_ctx[22]=list[i];child_ctx[24]=i;return child_ctx;}// (105:6) {#if option.description}
|
|
398
401
|
function create_if_block$d(ctx){let div;let t_value=/*option*/ctx[22].description+"";let t;let div_id_value;return {c(){div=element("div");t=text(t_value);attr(div,"class","goa-radio-description");attr(div,"id",div_id_value=`description-${/*name*/ctx[1]}-${/*index*/ctx[24]}`);},m(target,anchor){insert(target,div,anchor);append(div,t);},p(ctx,dirty){if(dirty&/*options*/512&&t_value!==(t_value=/*option*/ctx[22].description+""))set_data(t,t_value);if(dirty&/*name, options*/514&&div_id_value!==(div_id_value=`description-${/*name*/ctx[1]}-${/*index*/ctx[24]}`)){attr(div,"id",div_id_value);}},d(detaching){if(detaching)detach(div);}};}// (82:2) {#each options as option, index (option.value)}
|
|
399
402
|
function create_each_block$3(key_1,ctx){let div1;let label;let input;let input_value_value;let input_checked_value;let input_aria_label_value;let input_aria_describedby_value;let t0;let div0;let t1;let span;let t2_value=(/*option*/ctx[22].label||/*option*/ctx[22].value)+"";let t2;let label_data_testid_value;let t3;let t4;let mounted;let dispose;function change_handler(){return(/*change_handler*/ctx[16](/*option*/ctx[22]));}let if_block=/*option*/ctx[22].description&&create_if_block$d(ctx);return {key:key_1,first:null,c(){div1=element("div");label=element("label");input=element("input");t0=space();div0=element("div");t1=space();span=element("span");t2=text(t2_value);t3=space();if(if_block)if_block.c();t4=space();attr(input,"type","radio");attr(input,"name",/*name*/ctx[1]);input.value=input_value_value=/*option*/ctx[22].value;input.disabled=/*isDisabled*/ctx[12];input.checked=input_checked_value=/*option*/ctx[22].value===/*value*/ctx[0];attr(input,"aria-label",input_aria_label_value=/*arialabel*/ctx[4]||/*name*/ctx[1]);attr(input,"aria-describedby",input_aria_describedby_value=`description-${/*name*/ctx[1]}-${/*index*/ctx[24]}`);attr(div0,"class","goa-radio-icon");attr(span,"class","goa-radio-label");attr(label,"data-testid",label_data_testid_value="radio-option-"+/*option*/ctx[22].value);attr(label,"class","goa-radio");toggle_class(label,"goa-radio--disabled",/*isDisabled*/ctx[12]);toggle_class(label,"goa-radio--error",/*isError*/ctx[11]);attr(div1,"class","goa-radio-container");this.first=div1;},m(target,anchor){insert(target,div1,anchor);append(div1,label);append(label,input);append(label,t0);append(label,div0);append(label,t1);append(label,span);append(span,t2);append(div1,t3);if(if_block)if_block.m(div1,null);append(div1,t4);if(!mounted){dispose=listen(input,"change",change_handler);mounted=true;}},p(new_ctx,dirty){ctx=new_ctx;if(dirty&/*name*/2){attr(input,"name",/*name*/ctx[1]);}if(dirty&/*options*/512&&input_value_value!==(input_value_value=/*option*/ctx[22].value)){input.value=input_value_value;}if(dirty&/*isDisabled*/4096){input.disabled=/*isDisabled*/ctx[12];}if(dirty&/*options, value*/513&&input_checked_value!==(input_checked_value=/*option*/ctx[22].value===/*value*/ctx[0])){input.checked=input_checked_value;}if(dirty&/*arialabel, name*/18&&input_aria_label_value!==(input_aria_label_value=/*arialabel*/ctx[4]||/*name*/ctx[1])){attr(input,"aria-label",input_aria_label_value);}if(dirty&/*name, options*/514&&input_aria_describedby_value!==(input_aria_describedby_value=`description-${/*name*/ctx[1]}-${/*index*/ctx[24]}`)){attr(input,"aria-describedby",input_aria_describedby_value);}if(dirty&/*options*/512&&t2_value!==(t2_value=(/*option*/ctx[22].label||/*option*/ctx[22].value)+""))set_data(t2,t2_value);if(dirty&/*options*/512&&label_data_testid_value!==(label_data_testid_value="radio-option-"+/*option*/ctx[22].value)){attr(label,"data-testid",label_data_testid_value);}if(dirty&/*isDisabled*/4096){toggle_class(label,"goa-radio--disabled",/*isDisabled*/ctx[12]);}if(dirty&/*isError*/2048){toggle_class(label,"goa-radio--error",/*isError*/ctx[11]);}if(/*option*/ctx[22].description){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$d(ctx);if_block.c();if_block.m(div1,t4);}}else if(if_block){if_block.d(1);if_block=null;}},d(detaching){if(detaching)detach(div1);if(if_block)if_block.d();mounted=false;dispose();}};}function create_fragment$p(ctx){let div;let slot;let t;let each_blocks=[];let each_1_lookup=new Map();let div_style_value;let div_class_value;let each_value=/*options*/ctx[9];const get_key=ctx=>/*option*/ctx[22].value;for(let i=0;i<each_value.length;i+=1){let child_ctx=get_each_context$3(ctx,each_value,i);let key=get_key(child_ctx);each_1_lookup.set(key,each_blocks[i]=create_each_block$3(key,child_ctx));}return {c(){div=element("div");slot=element("slot");t=space();for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}this.c=noop;attr(div,"style",div_style_value=calculateMargin(/*mt*/ctx[5],/*mr*/ctx[6],/*mb*/ctx[7],/*ml*/ctx[8]));attr(div,"class",div_class_value=`goa-radio-group--${/*orientation*/ctx[2]}`);attr(div,"data-testid",/*testid*/ctx[3]);},m(target,anchor){insert(target,div,anchor);append(div,slot);append(div,t);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(div,null);}}/*div_binding*/ctx[17](div);},p(ctx,[dirty]){if(dirty&/*name, options, isDisabled, isError, value, arialabel, onChange*/14867){each_value=/*options*/ctx[9];each_blocks=update_keyed_each(each_blocks,dirty,get_key,1,ctx,each_value,each_1_lookup,div,destroy_block,create_each_block$3,null,get_each_context$3);}if(dirty&/*mt, mr, mb, ml*/480&&div_style_value!==(div_style_value=calculateMargin(/*mt*/ctx[5],/*mr*/ctx[6],/*mb*/ctx[7],/*ml*/ctx[8]))){attr(div,"style",div_style_value);}if(dirty&/*orientation*/4&&div_class_value!==(div_class_value=`goa-radio-group--${/*orientation*/ctx[2]}`)){attr(div,"class",div_class_value);}if(dirty&/*testid*/8){attr(div,"data-testid",/*testid*/ctx[3]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].d();}/*div_binding*/ctx[17](null);}};}function instance$m($$self,$$props,$$invalidate){let isDisabled;let isError;const[Orientations,validateOrientation]=typeValidator("Radio group orientation",["vertical","horizontal"]);let{name}=$$props;let{value}=$$props;let{orientation="vertical"}=$$props;let{disabled="false"}=$$props;let{error="false"}=$$props;let{testid=""}=$$props;let{arialabel=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let options=[];let el;onMount(function(){return _call(tick,function(){$$invalidate(9,options=getOptions());});});/**
|
|
400
403
|
* Allows the child elements to be obtainable within unit tests
|