@wikimedia/codex
Advanced tools
Comparing version
@@ -1,1 +0,1 @@ | ||
var eo=Object.defineProperty,to=Object.defineProperties;var no=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var ce=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var me=(p,t,V)=>t in p?eo(p,t,{enumerable:!0,configurable:!0,writable:!0,value:V}):p[t]=V,fe=(p,t)=>{for(var V in t||(t={}))ce.call(t,V)&&me(p,V,t[V]);if(j)for(var V of j(t))pe.call(t,V)&&me(p,V,t[V]);return p},he=(p,t)=>to(p,no(t));var G=(p,t)=>{var V={};for(var M in p)ce.call(p,M)&&t.indexOf(M)<0&&(V[M]=p[M]);if(p!=null&&j)for(var M of j(p))t.indexOf(M)<0&&pe.call(p,M)&&(V[M]=p[M]);return V};(function(p,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(p=typeof globalThis!="undefined"?globalThis:p||self,t(p.codex={},p.Vue))})(this,function(p,t){"use strict";const V="cdx",M=["default","progressive","destructive"],ge=["normal","primary","quiet"],be=["notice","warning","error","success"],ye=["text","search"],Ce=120,Be=500,q="cdx-menu-footer-item",Z=Symbol("CdxTabs"),ee=Symbol("CdxActiveTab");function H(e){return n=>typeof n=="string"&&e.indexOf(n)!==-1}var oo="",E=(e,n)=>{const l=e.__vccOpts||e;for(const[s,r]of n)l[s]=r;return l};const ke=H(ge),_e=H(M),$e=t.defineComponent({name:"CdxButton",props:{action:{type:String,default:"default",validator:_e},type:{type:String,default:"normal",validator:ke}},emits:["click"],setup(e,{emit:n}){return{rootClasses:t.computed(()=>({[`cdx-button--action-${e.action}`]:!0,[`cdx-button--type-${e.type}`]:!0,"cdx-button--framed":e.type!=="quiet"})),onClick:r=>{n("click",r)}}}});function we(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["cdx-button",e.rootClasses]),onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a))},[t.renderSlot(e.$slots,"default")],2)}var P=E($e,[["render",we]]);function N(e,n,l){return t.computed({get:()=>e.value,set:s=>n(l||"update:modelValue",s)})}var lo="";const Ae=t.defineComponent({name:"CdxCheckbox",props:{modelValue:{type:[Boolean,Array],default:!1},inputValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n}){const l=t.computed(()=>({"cdx-checkbox--inline":e.inline})),s=t.ref(),r=t.ref(),i=()=>{s.value.focus()},a=()=>{r.value.click()},d=N(t.toRef(e,"modelValue"),n);return{rootClasses:l,input:s,label:r,focusInput:i,clickLabel:a,wrappedModel:d}}}),Ie=["value","disabled",".indeterminate"],Se=t.createElementVNode("span",{class:"cdx-checkbox__icon"},null,-1),Ee={class:"cdx-checkbox__label-content"};function xe(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["cdx-checkbox",e.rootClasses])},[t.createElementVNode("label",{ref:"label",class:"cdx-checkbox__label",onClick:n[1]||(n[1]=(...a)=>e.focusInput&&e.focusInput(...a)),onKeydown:n[2]||(n[2]=t.withKeys(t.withModifiers((...a)=>e.clickLabel&&e.clickLabel(...a),["prevent"]),["enter"]))},[t.withDirectives(t.createElementVNode("input",{ref:"input","onUpdate:modelValue":n[0]||(n[0]=a=>e.wrappedModel=a),class:"cdx-checkbox__input",type:"checkbox",value:e.inputValue,disabled:e.disabled,".indeterminate":e.indeterminate},null,8,Ie),[[t.vModelCheckbox,e.wrappedModel]]),Se,t.createElementVNode("span",Ee,[t.renderSlot(e.$slots,"default")])],544)],2)}var Ve=E(Ae,[["render",xe]]),ve='<path d="M11.53 2.3A1.85 1.85 0 0010 1.21 1.85 1.85 0 008.48 2.3L.36 16.36C-.48 17.81.21 19 1.88 19h16.24c1.67 0 2.36-1.19 1.52-2.64zM11 16H9v-2h2zm0-4H9V6h2z"/>',De='<path d="M12.43 14.34A5 5 0 0110 15a5 5 0 113.95-2L17 16.09V3a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h10a2 2 0 001.45-.63z"/><circle cx="10" cy="10" r="3"/>',Me='<path d="M7 14.17 2.83 10l-1.41 1.41L7 17 19 5l-1.41-1.42z"/>',Ne='<path d="M10 0a10 10 0 1010 10A10 10 0 0010 0zm5.66 14.24-1.41 1.41L10 11.41l-4.24 4.25-1.42-1.42L8.59 10 4.34 5.76l1.42-1.42L10 8.59l4.24-4.24 1.41 1.41L11.41 10z"/>',Fe='<path d="m4.34 2.93 12.73 12.73-1.41 1.41L2.93 4.35z"/><path d="M17.07 4.34 4.34 17.07l-1.41-1.41L15.66 2.93z"/>',Te='<path d="M13.728 1H6.272L1 6.272v7.456L6.272 19h7.456L19 13.728V6.272zM11 15H9v-2h2zm0-4H9V5h2z"/>',Le='<path d="m17.5 4.75-7.5 7.5-7.5-7.5L1 6.25l9 9 9-9z"/>',Re='<path d="M19 3H1v14h18zM3 14l3.5-4.5 2.5 3L12.5 8l4.5 6z"/><path d="M19 5H1V3h18zm0 12H1v-2h18z"/>',ze='<path d="M8 19a1 1 0 001 1h2a1 1 0 001-1v-1H8zm9-12a7 7 0 10-12 4.9S7 14 7 15v1a1 1 0 001 1h4a1 1 0 001-1v-1c0-1 2-3.1 2-3.1A7 7 0 0017 7z"/>',Ke='<path d="M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0zM9 5h2v2H9zm0 4h2v6H9z"/>',qe='<path d="M7 1 5.6 2.5 13 10l-7.4 7.5L7 19l9-9z"/>',Ue='<path d="m4 10 9 9 1.4-1.5L7 10l7.4-7.5L13 1z"/>',Pe='<path d="M12.2 13.6a7 7 0 111.4-1.4l5.4 5.4-1.4 1.4-5.4-5.4zM3 8a5 5 0 1010 0A5 5 0 103 8z"/>';const Oe=ve,He=De,We=Me,Qe=Ne,je=Fe,Ge=Te,te=Le,Je=Re,Xe={langCodeMap:{ar:ze},default:Ke},Ye={ltr:qe,shouldFlip:!0},Ze={ltr:Ue,shouldFlip:!0},et=Pe;function tt(e,n,l){if(typeof e=="string"||"path"in e)return e;if("shouldFlip"in e)return e.ltr;if("rtl"in e)return l==="rtl"?e.rtl:e.ltr;const s=n in e.langCodeMap?e.langCodeMap[n]:e.default;return typeof s=="string"||"path"in s?s:s.ltr}function nt(e,n){if(typeof e=="string")return!1;if("langCodeMap"in e){const l=n in e.langCodeMap?e.langCodeMap[n]:e.default;if(typeof l=="string")return!1;e=l}if("shouldFlipExceptions"in e&&Array.isArray(e.shouldFlipExceptions)){const l=e.shouldFlipExceptions.indexOf(n);return l===void 0||l===-1}return"shouldFlip"in e?e.shouldFlip:!1}function J(e){const n=t.ref(null);return t.onMounted(()=>{const l=window.getComputedStyle(e.value).direction;n.value=l==="ltr"||l==="rtl"?l:null}),n}function ne(e){const n=t.ref("");return t.onMounted(()=>{let l=e.value;for(;l&&l.lang==="";)l=l.parentElement;n.value=l?l.lang:null}),n}var ao="";const ot=t.defineComponent({name:"CdxIcon",props:{icon:{type:[String,Object],required:!0},iconLabel:{type:String,default:""},lang:{type:String,default:null},dir:{type:String,default:null}},emits:["click"],setup(e,{emit:n}){const l=t.ref(),s=J(l),r=ne(l),i=t.computed(()=>e.dir||s.value),a=t.computed(()=>e.lang||r.value),d=t.computed(()=>({"cdx-icon--flipped":i.value==="rtl"&&a.value!==null&&nt(e.icon,a.value)})),o=t.computed(()=>tt(e.icon,a.value||"",i.value||"ltr")),c=t.computed(()=>typeof o.value=="string"?o.value:""),u=t.computed(()=>typeof o.value!="string"?o.value.path:"");return{rootElement:l,rootClasses:d,iconSvg:c,iconPath:u,onClick:_=>{n("click",_)}}}}),lt=["aria-hidden"],at={key:0},st=["innerHTML"],rt=["d"];function it(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("span",{ref:"rootElement",class:t.normalizeClass(["cdx-icon",e.rootClasses]),onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a))},[(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":!e.iconLabel},[e.iconLabel?(t.openBlock(),t.createElementBlock("title",at,t.toDisplayString(e.iconLabel),1)):t.createCommentVNode("",!0),e.iconSvg?(t.openBlock(),t.createElementBlock("g",{key:1,fill:"currentColor",innerHTML:e.iconSvg},null,8,st)):(t.openBlock(),t.createElementBlock("path",{key:2,d:e.iconPath,fill:"currentColor"},null,8,rt))],8,lt))],2)}var R=E(ot,[["render",it]]);function oe(e){return e.replace(/([\\{}()|.?*+\-^$[\]])/g,"\\$1")}const dt="[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]";function le(e,n){if(!e)return[n,"",""];const l=oe(e),s=new RegExp(l+dt+"*","i").exec(n);if(!s||s.index===void 0)return[n,"",""];const r=s.index,i=r+s[0].length,a=n.slice(r,i),d=n.slice(0,r),o=n.slice(i,n.length);return[d,a,o]}var ut=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",regExpEscape:oe,splitStringAtMatch:le}),so="";const ct=t.defineComponent({name:"CdxSearchResultTitle",props:{title:{type:String,required:!0},searchQuery:{type:String,default:""}},setup:e=>({titleChunks:t.computed(()=>le(e.searchQuery,String(e.title)))})}),pt={class:"cdx-search-result-title"},mt={class:"cdx-search-result-title__match"};function ft(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("span",pt,[t.createElementVNode("bdi",null,[t.createTextVNode(t.toDisplayString(e.titleChunks[0]),1),t.createElementVNode("span",mt,t.toDisplayString(e.titleChunks[1]),1),t.createTextVNode(t.toDisplayString(e.titleChunks[2]),1)])])}var ae=E(ct,[["render",ft]]),ro="";const ht=t.defineComponent({name:"CdxMenuItem",components:{CdxIcon:R,CdxSearchResultTitle:ae},props:{id:{type:String,required:!0},value:{type:[String,Number],required:!0},disabled:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},active:{type:Boolean,default:!1},highlighted:{type:Boolean,default:!1},label:{type:String,default:""},match:{type:String,default:""},url:{type:String,default:""},icon:{type:[String,Object],default:""},showThumbnail:{type:Boolean,default:!1},thumbnail:{type:[Object,null],default:null},description:{type:[String,null],default:""},searchQuery:{type:String,default:""},boldLabel:{type:Boolean,default:!1},hideDescriptionOverflow:{type:Boolean,default:!1},language:{type:Object,default:()=>({})}},emits:["change"],setup:(e,{emit:n})=>{const l=()=>{n("change","highlighted")},s=u=>{u.button===0&&n("change","active")},r=()=>{n("change","selected")},i=t.computed(()=>e.searchQuery.length>0),a=t.computed(()=>({"cdx-menu-item--selected":e.selected,"cdx-menu-item--active":e.active,"cdx-menu-item--highlighted":e.highlighted,"cdx-menu-item--enabled":!e.disabled,"cdx-menu-item--disabled":e.disabled,"cdx-menu-item--highlight-query":i.value,"cdx-menu-item--bold-label":e.boldLabel,"cdx-menu-item--hide-description-overflow":e.hideDescriptionOverflow})),d=t.computed(()=>e.url?"a":"span"),o=t.computed(()=>e.label||String(e.value)),c=t.computed(()=>e.thumbnail?`url("${e.thumbnail.url.replace(/([\\"\n])/g,"\\$1")}")`:"");return{onMouseEnter:l,onMouseDown:s,onClick:r,highlightQuery:i,rootClasses:a,contentTag:d,title:o,thumbnailBackgroundImage:c,defaultThumbnailIcon:Je}}}),gt=["id","aria-disabled","aria-selected"],bt={key:1,class:"cdx-menu-item__thumbnail-placeholder"},yt={class:"cdx-menu-item__text"},Ct=["lang"],Bt=t.createTextVNode(t.toDisplayString(" ")+" "),kt=["lang"],_t=["lang"];function $t(e,n,l,s,r,i){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-search-result-title");return t.openBlock(),t.createElementBlock("li",{id:e.id,role:"option",class:t.normalizeClass(["cdx-menu-item",e.rootClasses]),"aria-disabled":e.disabled,"aria-selected":e.selected,onMouseenter:n[0]||(n[0]=(...o)=>e.onMouseEnter&&e.onMouseEnter(...o)),onMousedown:n[1]||(n[1]=t.withModifiers((...o)=>e.onMouseDown&&e.onMouseDown(...o),["prevent"])),onClick:n[2]||(n[2]=(...o)=>e.onClick&&e.onClick(...o))},[t.renderSlot(e.$slots,"default",{},()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.contentTag),{href:e.url?e.url:void 0,class:"cdx-menu-item__content"},{default:t.withCtx(()=>{var o,c,u,b,_;return[e.showThumbnail&&e.thumbnail?(t.openBlock(),t.createElementBlock("span",{key:0,style:t.normalizeStyle({backgroundImage:e.thumbnailBackgroundImage}),class:"cdx-menu-item__thumbnail"},null,4)):e.showThumbnail?(t.openBlock(),t.createElementBlock("span",bt,[t.createVNode(a,{icon:e.defaultThumbnailIcon,class:"cdx-menu-item__thumbnail-placeholder__icon"},null,8,["icon"])])):e.icon?(t.openBlock(),t.createBlock(a,{key:2,icon:e.icon,class:"cdx-menu-item__icon"},null,8,["icon"])):t.createCommentVNode("",!0),t.createElementVNode("span",yt,[e.highlightQuery?(t.openBlock(),t.createBlock(d,{key:0,title:e.title,"search-query":e.searchQuery,lang:(o=e.language)==null?void 0:o.label},null,8,["title","search-query","lang"])):(t.openBlock(),t.createElementBlock("span",{key:1,class:"cdx-menu-item__text__label",lang:(c=e.language)==null?void 0:c.label},[t.createElementVNode("bdi",null,t.toDisplayString(e.title),1)],8,Ct)),e.match?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[Bt,e.highlightQuery?(t.openBlock(),t.createBlock(d,{key:0,title:e.match,"search-query":e.searchQuery,lang:(u=e.language)==null?void 0:u.match},null,8,["title","search-query","lang"])):(t.openBlock(),t.createElementBlock("span",{key:1,class:"cdx-menu-item__text__match",lang:(b=e.language)==null?void 0:b.match},[t.createElementVNode("bdi",null,t.toDisplayString(e.match),1)],8,kt))],64)):t.createCommentVNode("",!0),e.description?(t.openBlock(),t.createElementBlock("span",{key:3,class:"cdx-menu-item__text__description",lang:(_=e.language)==null?void 0:_.description},[t.createElementVNode("bdi",null,t.toDisplayString(e.description),1)],8,_t)):t.createCommentVNode("",!0)])]}),_:1},8,["href"]))])],42,gt)}var se=E(ht,[["render",$t]]),io="";const wt=t.defineComponent({name:"CdxProgressBar",props:{inline:{type:Boolean,default:!1}},setup(e){return{rootClasses:t.computed(()=>({"cdx-progress-bar--block":!e.inline,"cdx-progress-bar--inline":e.inline}))}}}),At=[t.createElementVNode("div",{class:"cdx-progress-bar__bar"},null,-1)];function It(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-progress-bar",e.rootClasses]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100"},At,2)}var re=E(wt,[["render",It]]);let X=0;function T(e){const n=t.getCurrentInstance(),l=(n==null?void 0:n.props.id)||(n==null?void 0:n.attrs.id);return e?`${V}-${e}-${X++}`:l?`${V}-${l}-${X++}`:`${V}-${X++}`}var co="";const St=t.defineComponent({name:"CdxMenu",components:{CdxMenuItem:se,CdxProgressBar:re},props:{menuItems:{type:Array,required:!0},selected:{type:[String,Number,null],required:!0},expanded:{type:Boolean,required:!0},showPending:{type:Boolean,default:!1},showThumbnail:{type:Boolean,default:!1},boldLabel:{type:Boolean,default:!1},hideDescriptionOverflow:{type:Boolean,default:!1},searchQuery:{type:String,default:""},showNoResultsSlot:{type:Boolean,default:null}},emits:["update:selected","update:expanded","menu-item-click","menu-item-keyboard-navigation"],expose:["clearActive","getHighlightedMenuItem","delegateKeyNavigation"],setup(e,{emit:n,slots:l}){const s=t.computed(()=>e.menuItems.map(m=>he(fe({},m),{id:T("menu-item")}))),r=t.computed(()=>l["no-results"]?e.showNoResultsSlot!==null?e.showNoResultsSlot:s.value.length===0:!1),i=t.ref(null),a=t.ref(null);function d(){return s.value.find(m=>m.value===e.selected)}function o(m,h){if(!(h&&h.disabled))switch(m){case"selected":n("update:selected",(h==null?void 0:h.value)||null),n("update:expanded",!1),a.value=null;break;case"highlighted":i.value=h||null;break;case"active":a.value=h||null;break}}const c=t.computed(()=>{if(i.value!==null)return s.value.findIndex(m=>m.value===i.value.value)});function u(m){!m||(o("highlighted",m),n("menu-item-keyboard-navigation",m))}function b(){var v;const m=x=>{for(let $=x-1;$>=0;$--)if(!s.value[$].disabled)return s.value[$]},h=(v=c.value)!=null?v:s.value.length,g=m(h)||m(s.value.length);u(g)}function _(){var v;const m=x=>s.value.find(($,F)=>!$.disabled&&F>x),h=(v=c.value)!=null?v:-1,g=m(h)||m(-1);u(g)}function A(m,h=!0){function g(){n("update:expanded",!0),o("highlighted",d())}function v(){h&&(m.preventDefault(),m.stopPropagation())}switch(m.key){case"Enter":case" ":return v(),e.expanded?(i.value&&n("update:selected",i.value.value),n("update:expanded",!1)):g(),!0;case"Tab":return e.expanded&&(i.value&&n("update:selected",i.value.value),n("update:expanded",!1)),!0;case"ArrowUp":return v(),e.expanded?(i.value===null&&o("highlighted",d()),b()):g(),!0;case"ArrowDown":return v(),e.expanded?(i.value===null&&o("highlighted",d()),_()):g(),!0;case"Escape":return v(),n("update:expanded",!1),!0;default:return!1}}function I(){o("active")}return t.onMounted(()=>{document.addEventListener("mouseup",I)}),t.onUnmounted(()=>{document.removeEventListener("mouseup",I)}),t.watch(t.toRef(e,"expanded"),m=>{!m&&i.value&&(i.value=null)}),{computedMenuItems:s,computedShowNoResultsSlot:r,highlightedMenuItem:i,activeMenuItem:a,handleMenuItemChange:o,handleKeyNavigation:A}},methods:{getHighlightedMenuItem(){return this.highlightedMenuItem},clearActive(){this.handleMenuItemChange("active")},delegateKeyNavigation(e,n=!0){return this.handleKeyNavigation(e,n)}}}),Et={class:"cdx-menu",role:"listbox","aria-multiselectable":"false"},xt={key:0,class:"cdx-menu__pending cdx-menu-item"},Vt={key:1,class:"cdx-menu__no-results cdx-menu-item"};function vt(e,n,l,s,r,i){const a=t.resolveComponent("cdx-menu-item"),d=t.resolveComponent("cdx-progress-bar");return t.withDirectives((t.openBlock(),t.createElementBlock("ul",Et,[e.showPending&&e.computedMenuItems.length===0&&e.$slots.pending?(t.openBlock(),t.createElementBlock("li",xt,[t.renderSlot(e.$slots,"pending")])):t.createCommentVNode("",!0),e.computedShowNoResultsSlot?(t.openBlock(),t.createElementBlock("li",Vt,[t.renderSlot(e.$slots,"no-results")])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedMenuItems,o=>{var c,u;return t.openBlock(),t.createBlock(a,t.mergeProps({key:o.value},o,{selected:o.value===e.selected,active:o.value===((c=e.activeMenuItem)==null?void 0:c.value),highlighted:o.value===((u=e.highlightedMenuItem)==null?void 0:u.value),"show-thumbnail":e.showThumbnail,"bold-label":e.boldLabel,"hide-description-overflow":e.hideDescriptionOverflow,"search-query":e.searchQuery,onChange:b=>e.handleMenuItemChange(b,o),onClick:b=>e.$emit("menu-item-click",o)}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{menuItem:o})]),_:2},1040,["selected","active","highlighted","show-thumbnail","bold-label","hide-description-overflow","search-query","onChange","onClick"])}),128)),e.showPending?(t.openBlock(),t.createBlock(d,{key:2,class:"cdx-menu__progress-bar",inline:!0})):t.createCommentVNode("",!0)],512)),[[t.vShow,e.expanded]])}var O=E(St,[["render",vt]]);function z(e,n=t.computed(()=>({}))){const l=t.computed(()=>{const i=G(n.value,[]);return e.class&&e.class.split(" ").forEach(d=>{i[d]=!0}),i}),s=t.computed(()=>{if("style"in e)return e.style}),r=t.computed(()=>{const o=e,{class:i,style:a}=o;return G(o,["class","style"])});return{rootClasses:l,rootStyle:s,otherAttrs:r}}var po="";const Dt=H(ye),Mt=t.defineComponent({name:"CdxTextInput",components:{CdxIcon:R},inheritAttrs:!1,expose:["focus"],props:{modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text",validator:Dt},disabled:{type:Boolean,default:!1},startIcon:{type:[String,Object],default:void 0},endIcon:{type:[String,Object],default:void 0},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","input","change","focus","blur"],setup(e,{emit:n,attrs:l}){const s=N(t.toRef(e,"modelValue"),n),r=t.computed(()=>e.clearable&&!!s.value&&!e.disabled),i=t.computed(()=>({"cdx-text-input--has-start-icon":!!e.startIcon,"cdx-text-input--has-end-icon":!!e.endIcon,"cdx-text-input--clearable":r.value})),{rootClasses:a,rootStyle:d,otherAttrs:o}=z(l,i),c=t.ref(!1),u=t.computed(()=>c.value||!!s.value),b=t.computed(()=>({"cdx-text-input__input--is-active":u.value}));return{wrappedModel:s,isClearable:r,rootClasses:a,rootStyle:d,otherAttrs:o,inputClasses:b,onClear:()=>{s.value=""},onInput:g=>{n("input",g)},onChange:g=>{n("change",g)},onFocus:g=>{c.value=!0,n("focus",g)},onBlur:g=>{c.value=!1,n("blur",g)},cdxIconClear:Qe}},methods:{focus(){this.$refs.input.focus()}}}),Nt=["type","disabled"];function Ft(e,n,l,s,r,i){const a=t.resolveComponent("cdx-icon");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-text-input",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.withDirectives(t.createElementVNode("input",t.mergeProps({ref:"input","onUpdate:modelValue":n[0]||(n[0]=d=>e.wrappedModel=d),class:["cdx-text-input__input",e.inputClasses]},e.otherAttrs,{type:e.inputType,disabled:e.disabled,onInput:n[1]||(n[1]=(...d)=>e.onInput&&e.onInput(...d)),onChange:n[2]||(n[2]=(...d)=>e.onChange&&e.onChange(...d)),onFocus:n[3]||(n[3]=(...d)=>e.onFocus&&e.onFocus(...d)),onBlur:n[4]||(n[4]=(...d)=>e.onBlur&&e.onBlur(...d))}),null,16,Nt),[[t.vModelDynamic,e.wrappedModel]]),e.startIcon?(t.openBlock(),t.createBlock(a,{key:0,icon:e.startIcon,class:"cdx-text-input__icon cdx-text-input__start-icon"},null,8,["icon"])):t.createCommentVNode("",!0),e.endIcon?(t.openBlock(),t.createBlock(a,{key:1,icon:e.endIcon,class:"cdx-text-input__icon cdx-text-input__end-icon"},null,8,["icon"])):t.createCommentVNode("",!0),e.isClearable?(t.openBlock(),t.createBlock(a,{key:2,icon:e.cdxIconClear,class:"cdx-text-input__icon cdx-text-input__clear-icon",onMousedown:n[5]||(n[5]=t.withModifiers(()=>{},["prevent"])),onClick:e.onClear},null,8,["icon","onClick"])):t.createCommentVNode("",!0)],6)}var W=E(Mt,[["render",Ft]]),mo="";const Tt=t.defineComponent({name:"CdxCombobox",components:{CdxButton:P,CdxIcon:R,CdxMenu:O,CdxTextInput:W},inheritAttrs:!1,props:{menuItems:{type:Array,required:!0},modelValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},menuConfig:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(e,{emit:n,attrs:l,slots:s}){const r=t.ref(),i=t.ref(),a=T("combobox"),d=N(t.toRef(e,"modelValue"),n),o=t.ref(!1),c=t.ref(!1),u=t.computed(()=>{var $,F;return(F=($=i.value)==null?void 0:$.getHighlightedMenuItem())==null?void 0:F.id}),b=t.computed(()=>({"cdx-combobox--disabled":e.disabled})),{rootClasses:_,rootStyle:A,otherAttrs:I}=z(l,b);function m(){c.value&&o.value?o.value=!1:(e.menuItems.length>0||s["no-results"])&&(o.value=!0)}function h(){o.value=c.value&&o.value}function g(){e.disabled||(c.value=!0)}function v(){var $;e.disabled||($=r.value)==null||$.focus()}function x($){!i.value||e.disabled||e.menuItems.length===0||$.key===" "&&o.value||i.value.delegateKeyNavigation($)}return t.watch(o,()=>{c.value=!1}),{input:r,menu:i,menuId:a,modelWrapper:d,expanded:o,highlightedId:u,onInputFocus:m,onInputBlur:h,onKeydown:x,onButtonClick:v,onButtonMousedown:g,cdxIconExpand:te,rootClasses:_,rootStyle:A,otherAttrs:I}}}),Lt={class:"cdx-combobox__input-wrapper"};function Rt(e,n,l,s,r,i){const a=t.resolveComponent("cdx-text-input"),d=t.resolveComponent("cdx-icon"),o=t.resolveComponent("cdx-button"),c=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-combobox",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("div",Lt,[t.createVNode(a,t.mergeProps({ref:"input",modelValue:e.modelWrapper,"onUpdate:modelValue":n[0]||(n[0]=u=>e.modelWrapper=u)},e.otherAttrs,{class:"cdx-combobox__input","aria-activedescendant":e.highlightedId,"aria-expanded":e.expanded,"aria-owns":e.menuId,disabled:e.disabled,"aria-autocomplete":"list",autocomplete:"off",role:"combobox",onKeydown:e.onKeydown,onFocus:e.onInputFocus,onBlur:e.onInputBlur}),null,16,["modelValue","aria-activedescendant","aria-expanded","aria-owns","disabled","onKeydown","onFocus","onBlur"]),t.createVNode(o,{class:"cdx-combobox__expand-button",disabled:e.disabled,tabindex:"-1",onMousedown:e.onButtonMousedown,onClick:e.onButtonClick},{default:t.withCtx(()=>[t.createVNode(d,{class:"cdx-combobox__expand-icon",icon:e.cdxIconExpand},null,8,["icon"])]),_:1},8,["disabled","onMousedown","onClick"])]),t.createVNode(c,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[1]||(n[1]=u=>e.modelWrapper=u),expanded:e.expanded,"onUpdate:expanded":n[2]||(n[2]=u=>e.expanded=u),"menu-items":e.menuItems},e.menuConfig),{default:t.withCtx(({menuItem:u})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:u})]),"no-results":t.withCtx(()=>[t.renderSlot(e.$slots,"no-results")]),_:3},16,["id","selected","expanded","menu-items"])],6)}var zt=E(Tt,[["render",Rt]]),fo="";const Kt=t.defineComponent({name:"CdxLookup",components:{CdxMenu:O,CdxTextInput:W},inheritAttrs:!1,props:{modelValue:{type:[String,Number,null],required:!0},menuItems:{type:Array,default:()=>[]},initialInputValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},menuConfig:{type:Object,default:()=>({})}},emits:["update:modelValue","new-input"],setup:(e,{emit:n,attrs:l,slots:s})=>{const r=t.ref(),i=T("lookup-menu"),a=t.ref(!1),d=t.ref(!1),o=t.ref(!1),c=t.toRef(e,"modelValue"),u=N(c,n),b=t.computed(()=>e.menuItems.find(B=>B.value===e.modelValue)),_=t.computed(()=>{var B,U;return(U=(B=r.value)==null?void 0:B.getHighlightedMenuItem())==null?void 0:U.id}),A=t.ref(e.initialInputValue),I=t.computed(()=>({"cdx-lookup--disabled":e.disabled,"cdx-lookup--pending":a.value})),{rootClasses:m,rootStyle:h,otherAttrs:g}=z(l,I);function v(B){b.value&&b.value.label!==B&&b.value.value!==B&&(u.value=null),B===""?d.value=!1:a.value=!0,n("new-input",B)}function x(){o.value=!0,A.value!==null&&A.value!==""&&(e.menuItems.length>0||s["no-results"])&&(d.value=!0)}function $(){o.value=!1,d.value=!1}function F(B){!r.value||e.disabled||e.menuItems.length===0&&!s["no-results"]||B.key===" "&&d.value||r.value.delegateKeyNavigation(B)}return t.watch(c,B=>{B!==null&&(A.value=b.value?b.value.label||b.value.value:"",n("new-input",A.value))}),t.watch(t.toRef(e,"menuItems"),B=>{o.value&&a.value&&(B.length>0||s["no-results"])&&(d.value=!0),B.length===0&&!s["no-results"]&&(d.value=!1),a.value=!1}),{menu:r,menuId:i,highlightedId:_,inputValue:A,modelWrapper:u,expanded:d,onBlur:$,rootClasses:m,rootStyle:h,otherAttrs:g,onUpdateInput:v,onFocus:x,onKeydown:F}}});function qt(e,n,l,s,r,i){const a=t.resolveComponent("cdx-text-input"),d=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-lookup",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createVNode(a,t.mergeProps({modelValue:e.inputValue,"onUpdate:modelValue":n[0]||(n[0]=o=>e.inputValue=o)},e.otherAttrs,{class:"cdx-lookup__input",role:"combobox",autocomplete:"off","aria-autocomplete":"list","aria-owns":e.menuId,"aria-expanded":e.expanded,"aria-activedescendant":e.highlightedId,disabled:e.disabled,"onUpdate:modelValue":e.onUpdateInput,onFocus:e.onFocus,onBlur:e.onBlur,onKeydown:e.onKeydown}),null,16,["modelValue","aria-owns","aria-expanded","aria-activedescendant","disabled","onUpdate:modelValue","onFocus","onBlur","onKeydown"]),t.createVNode(d,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[1]||(n[1]=o=>e.modelWrapper=o),expanded:e.expanded,"onUpdate:expanded":n[2]||(n[2]=o=>e.expanded=o),"menu-items":e.menuItems},e.menuConfig),{default:t.withCtx(({menuItem:o})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:o})]),"no-results":t.withCtx(()=>[t.renderSlot(e.$slots,"no-results")]),_:3},16,["id","selected","expanded","menu-items"])],6)}var Ut=E(Kt,[["render",qt]]),ho="";const Pt=H(be),Ot={notice:Xe,error:Ge,warning:Oe,success:We},Ht=t.defineComponent({name:"CdxMessage",components:{CdxButton:P,CdxIcon:R},props:{type:{type:String,default:"notice",validator:Pt},inline:{type:Boolean,default:!1},icon:{type:[String,Object],default:null},fadeIn:{type:Boolean,default:!1},dismissButtonLabel:{type:String,default:""},autoDismiss:{type:[Boolean,Number],default:!1,validator:e=>typeof e=="boolean"||typeof e=="number"&&e>0}},emits:["user-dismissed","auto-dismissed"],setup(e,{emit:n}){const l=t.ref(!1),s=t.computed(()=>e.inline===!1&&e.dismissButtonLabel.length>0),r=t.computed(()=>e.autoDismiss===!1?!1:e.autoDismiss===!0?4e3:e.autoDismiss),i=t.computed(()=>({"cdx-message--inline":e.inline,"cdx-message--block":!e.inline,"cdx-message--user-dismissable":s.value,[`cdx-message--${e.type}`]:!0})),a=t.computed(()=>e.icon&&e.type==="notice"?e.icon:Ot[e.type]),d=t.ref("");function o(c){l.value||(d.value=c==="user-dismissed"?"cdx-message-leave-active-user":"cdx-message-leave-active-system",l.value=!0,n(c))}return t.onMounted(()=>{r.value&&setTimeout(()=>o("auto-dismissed"),r.value)}),{dismissed:l,userDismissable:s,rootClasses:i,leaveActiveClass:d,computedIcon:a,onDismiss:o,cdxIconClose:je}}}),Wt=["aria-live","role"],Qt={class:"cdx-message__content"};function jt(e,n,l,s,r,i){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-button");return t.openBlock(),t.createBlock(t.Transition,{name:"cdx-message",appear:e.fadeIn,"leave-active-class":e.leaveActiveClass},{default:t.withCtx(()=>[e.dismissed?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["cdx-message",e.rootClasses]),"aria-live":e.type!=="error"?"polite":void 0,role:e.type==="error"?"alert":void 0},[t.createVNode(a,{class:"cdx-message__icon",icon:e.computedIcon},null,8,["icon"]),t.createElementVNode("div",Qt,[t.renderSlot(e.$slots,"default")]),e.userDismissable?(t.openBlock(),t.createBlock(d,{key:0,class:"cdx-message__dismiss-button",type:"quiet","aria-label":e.dismissButtonLabel,onClick:n[0]||(n[0]=o=>e.onDismiss("user-dismissed"))},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconClose,"icon-label":e.dismissButtonLabel},null,8,["icon","icon-label"])]),_:1},8,["aria-label"])):t.createCommentVNode("",!0)],10,Wt))]),_:3},8,["appear","leave-active-class"])}var Gt=E(Ht,[["render",jt]]),go="";const Jt=t.defineComponent({name:"CdxRadio",props:{modelValue:{type:[String,Number,Boolean],default:""},inputValue:{type:[String,Number,Boolean],default:!1},name:{type:String,default:""},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n}){const l=t.computed(()=>({"cdx-radio--inline":e.inline})),s=t.ref(),r=()=>{s.value.focus()},i=N(t.toRef(e,"modelValue"),n);return{rootClasses:l,input:s,focusInput:r,wrappedModel:i}}}),Xt=["name","value","disabled"],Yt=t.createElementVNode("span",{class:"cdx-radio__icon"},null,-1),Zt={class:"cdx-radio__label-content"};function en(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["cdx-radio",e.rootClasses])},[t.createElementVNode("label",{class:"cdx-radio__label",onClick:n[1]||(n[1]=(...a)=>e.focusInput&&e.focusInput(...a))},[t.withDirectives(t.createElementVNode("input",{ref:"input","onUpdate:modelValue":n[0]||(n[0]=a=>e.wrappedModel=a),class:"cdx-radio__input",type:"radio",name:e.name,value:e.inputValue,disabled:e.disabled},null,8,Xt),[[t.vModelRadio,e.wrappedModel]]),Yt,t.createElementVNode("span",Zt,[t.renderSlot(e.$slots,"default")])])],2)}var tn=E(Jt,[["render",en]]),bo="";const nn=t.defineComponent({name:"CdxSearchInput",components:{CdxButton:P,CdxTextInput:W},inheritAttrs:!1,props:{modelValue:{type:[String,Number],default:""},buttonLabel:{type:String,default:""}},emits:["update:modelValue","submit-click"],setup(e,{emit:n,attrs:l}){const s=N(t.toRef(e,"modelValue"),n),r=t.computed(()=>({"cdx-search-input--has-end-button":!!e.buttonLabel})),{rootClasses:i,rootStyle:a,otherAttrs:d}=z(l,r);return{wrappedModel:s,rootClasses:i,rootStyle:a,otherAttrs:d,handleSubmit:()=>{n("submit-click",s.value)},searchIcon:et}},methods:{focus(){this.$refs.textInput.focus()}}}),on={class:"cdx-search-input__input-wrapper"};function ln(e,n,l,s,r,i){const a=t.resolveComponent("cdx-text-input"),d=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-search-input",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("div",on,[t.createVNode(a,t.mergeProps({ref:"textInput",modelValue:e.wrappedModel,"onUpdate:modelValue":n[0]||(n[0]=o=>e.wrappedModel=o),class:"cdx-search-input__text-input","input-type":"search","start-icon":e.searchIcon},e.otherAttrs,{onKeydown:t.withKeys(e.handleSubmit,["enter"])}),null,16,["modelValue","start-icon","onKeydown"]),t.renderSlot(e.$slots,"default")]),e.buttonLabel?(t.openBlock(),t.createBlock(d,{key:0,class:"cdx-search-input__end-button",onClick:e.handleSubmit},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.buttonLabel),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)],6)}var ie=E(nn,[["render",ln]]),yo="";const an=t.defineComponent({name:"CdxSelect",components:{CdxIcon:R,CdxMenu:O},props:{menuItems:{type:Array,required:!0},modelValue:{type:[String,Number,null],default:null},defaultLabel:{type:String,default:""},disabled:{type:Boolean,default:!1},menuConfig:{type:Object,default:()=>({})},defaultIcon:{type:[String,Object],default:void 0}},emits:["update:modelValue"],setup(e,{emit:n}){const l=t.ref(),s=t.ref(),r=T("select-handle"),i=T("select-menu"),a=t.ref(!1),d=N(t.toRef(e,"modelValue"),n),o=t.computed(()=>e.menuItems.find(h=>h.value===e.modelValue)),c=t.computed(()=>o.value?o.value.label||o.value.value:e.defaultLabel),u=t.computed(()=>{if(e.defaultIcon&&!o.value)return e.defaultIcon;if(o.value&&o.value.icon)return o.value.icon}),b=t.computed(()=>({"cdx-select--enabled":!e.disabled,"cdx-select--disabled":e.disabled,"cdx-select--expanded":a.value,"cdx-select--value-selected":!!o.value,"cdx-select--no-selections":!o.value,"cdx-select--has-start-icon":!!u.value})),_=t.computed(()=>{var h,g;return(g=(h=s.value)==null?void 0:h.getHighlightedMenuItem())==null?void 0:g.id});function A(){a.value=!1}function I(){var h;e.disabled||(a.value=!a.value,(h=l.value)==null||h.focus())}function m(h){var g;e.disabled||(g=s.value)==null||g.delegateKeyNavigation(h)}return{handle:l,handleId:r,menu:s,menuId:i,modelWrapper:d,selectedMenuItem:o,highlightedId:_,expanded:a,onBlur:A,currentLabel:c,rootClasses:b,onClick:I,onKeydown:m,startIcon:u,cdxIconExpand:te}}}),sn=["aria-disabled"],rn=["aria-owns","aria-labelledby","aria-activedescendant","aria-expanded"],dn=["id"];function un(e,n,l,s,r,i){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-select",e.rootClasses]),"aria-disabled":e.disabled},[t.createElementVNode("div",{ref:"handle",class:"cdx-select__handle",tabindex:"0",role:"combobox","aria-autocomplete":"list","aria-owns":e.menuId,"aria-labelledby":e.handleId,"aria-activedescendant":e.highlightedId,"aria-haspopup":"listbox","aria-expanded":e.expanded,onClick:n[0]||(n[0]=(...o)=>e.onClick&&e.onClick(...o)),onBlur:n[1]||(n[1]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[2]||(n[2]=(...o)=>e.onKeydown&&e.onKeydown(...o))},[t.createElementVNode("span",{id:e.handleId,role:"textbox","aria-readonly":"true"},[t.renderSlot(e.$slots,"label",{selectedMenuItem:e.selectedMenuItem,defaultLabel:e.defaultLabel},()=>[t.createTextVNode(t.toDisplayString(e.currentLabel),1)])],8,dn),e.startIcon?(t.openBlock(),t.createBlock(a,{key:0,icon:e.startIcon,class:"cdx-select__start-icon"},null,8,["icon"])):t.createCommentVNode("",!0),t.createVNode(a,{icon:e.cdxIconExpand,class:"cdx-select__indicator"},null,8,["icon"])],40,rn),t.createVNode(d,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[3]||(n[3]=o=>e.modelWrapper=o),expanded:e.expanded,"onUpdate:expanded":n[4]||(n[4]=o=>e.expanded=o),"menu-items":e.menuItems},e.menuConfig),{default:t.withCtx(({menuItem:o})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:o})]),_:3},16,["id","selected","expanded","menu-items"])],10,sn)}var cn=E(an,[["render",un]]),Co="";const pn=t.defineComponent({name:"CdxTab",props:{name:{type:String,required:!0},label:{type:String,default:""},disabled:{type:Boolean,default:!1}},setup(e){const n=t.inject(Z),l=t.inject(ee);if(!n||!l)throw new Error("Tab component must be used inside a Tabs component");const s=n.value.get(e.name)||{},r=t.computed(()=>e.name===l.value);return{tab:s,isActive:r}}}),mn=["id","aria-hidden","aria-labelledby"];function fn(e,n,l,s,r,i){return t.withDirectives((t.openBlock(),t.createElementBlock("section",{id:e.tab.id,"aria-hidden":!e.isActive,"aria-labelledby":`${e.tab.id}-label`,class:"cdx-tab",role:"tabpanel",tabindex:"-1"},[t.renderSlot(e.$slots,"default")],8,mn)),[[t.vShow,e.isActive]])}var hn=E(pn,[["render",fn]]);function Y(e,n){const l=t.ref(!1);let s=!1;if(typeof window!="object"||!("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype))return l;const r=new window.IntersectionObserver(i=>{const a=i[0];a&&(l.value=a.isIntersecting)},n);return t.onMounted(()=>{s=!0,e.value&&r.observe(e.value)}),t.onUnmounted(()=>{s=!1,r.disconnect()}),t.watch(e,i=>{!s||(r.disconnect(),l.value=!1,i&&r.observe(i))}),l}var Bo="";const gn=t.defineComponent({name:"CdxTabs",components:{CdxButton:P,CdxIcon:R},props:{active:{type:String,required:!0},framed:{type:Boolean,default:!1}},emits:["update:active"],expose:["select","next","prev"],setup(e,{slots:n,emit:l}){const s=t.ref(),r=t.ref(),i=t.ref(),a=t.ref(),d=t.ref(),o=J(s),c=t.computed(()=>{var S;const y=[],k=(S=n.default)==null?void 0:S.call(n);k&&k.forEach(w);function w(C){C&&typeof C=="object"&&"type"in C&&(typeof C.type=="object"&&"name"in C.type&&C.type.name==="CdxTab"?y.push(C):"children"in C&&Array.isArray(C.children)&&C.children.forEach(w))}return y});if(!c.value||c.value.length===0)throw new Error("Slot content cannot be empty");const u=t.computed(()=>c.value.reduce((y,k)=>{var w;if(((w=k.props)==null?void 0:w.name)&&typeof k.props.name=="string"){if(y.get(k.props.name))throw new Error("Tab names must be unique");y.set(k.props.name,{name:k.props.name,id:T(k.props.name),label:k.props.label||k.props.name,disabled:k.props.disabled})}return y},new Map)),b=N(t.toRef(e,"active"),l,"update:active"),_=t.computed(()=>Array.from(u.value.keys())),A=t.computed(()=>_.value.indexOf(b.value)),I=t.computed(()=>{var y;return(y=u.value.get(b.value))==null?void 0:y.id});t.provide(ee,b),t.provide(Z,u);const m=t.ref(),h=t.ref(),g=Y(m,{threshold:.95}),v=Y(h,{threshold:.95});function x(y,k){const w=y;w&&(k===0?m.value=w:k===_.value.length-1&&(h.value=w))}function $(y){var S;const k=y===b.value,w=!!((S=u.value.get(y))==null?void 0:S.disabled);return{"cdx-tabs__list__item--selected":k,"cdx-tabs__list__item--enabled":!w,"cdx-tabs__list__item--disabled":w}}const F=t.computed(()=>({"cdx-tabs--framed":e.framed,"cdx-tabs--quiet":!e.framed}));function B(y){if(!r.value||!a.value||!d.value)return 0;const k=o.value==="rtl"?d.value:a.value,w=o.value==="rtl"?a.value:d.value,S=y.offsetLeft,C=S+y.clientWidth,L=r.value.scrollLeft+k.clientWidth,Q=r.value.scrollLeft+r.value.clientWidth-w.clientWidth;return S<L?S-L:C>Q?C-Q:0}function U(y){var C;if(!r.value||!a.value||!d.value)return;const k=y==="next"&&o.value==="ltr"||y==="prev"&&o.value==="rtl"?1:-1;let w=0,S=y==="next"?r.value.firstElementChild:r.value.lastElementChild;for(;S;){const L=y==="next"?S.nextElementSibling:S.previousElementSibling;if(w=B(S),Math.sign(w)===k){L&&Math.abs(w)<.25*r.value.clientWidth&&(w=B(L));break}S=L}r.value.scrollBy({left:w,behavior:"smooth"}),(C=i.value)==null||C.focus()}return t.watch(b,()=>{if(I.value===void 0||!r.value||!a.value||!d.value)return;const y=document.getElementById(`${I.value}-label`);!y||r.value.scrollBy({left:B(y),behavior:"smooth"})}),{activeTab:b,activeTabIndex:A,activeTabId:I,currentDirection:o,rootElement:s,listElement:r,focusHolder:i,prevScroller:a,nextScroller:d,rootClasses:F,tabNames:_,tabsData:u,firstLabelVisible:g,lastLabelVisible:v,getLabelClasses:$,assignTemplateRefIfNecessary:x,scrollTabs:U,cdxIconPrevious:Ze,cdxIconNext:Ye}},methods:{select(e){const n=this.tabsData.get(e);n&&!(n==null?void 0:n.disabled)&&(this.activeTab=e)},selectNonDisabled(e,n){const l=this.tabsData.get(this.tabNames[e+n]);l&&(l.disabled?this.selectNonDisabled(e+n,n):this.select(l.name))},next(){this.selectNonDisabled(this.activeTabIndex,1)},prev(){this.selectNonDisabled(this.activeTabIndex,-1)},onLeftArrowKeypress(){this.currentDirection==="rtl"?this.next():this.prev()},onRightArrowKeypress(){this.currentDirection==="rtl"?this.prev():this.next()},onDownArrowKeypress(){var e;this.activeTabId&&((e=document.getElementById(this.activeTabId))==null||e.focus())}}}),bn={ref:"focusHolder",tabindex:"-1"},yn={ref:"prevScroller",class:"cdx-tabs__prev-scroller"},Cn=["aria-activedescendant"],Bn=["id"],kn=["href","aria-selected","onClick","onKeyup"],_n={ref:"nextScroller",class:"cdx-tabs__next-scroller"},$n={class:"cdx-tabs__content"};function wn(e,n,l,s,r,i){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",{ref:"rootElement",class:t.normalizeClass(["cdx-tabs",e.rootClasses])},[t.createElementVNode("div",{class:"cdx-tabs__header",tabindex:"0",onKeydown:[n[4]||(n[4]=t.withKeys(t.withModifiers((...o)=>e.onRightArrowKeypress&&e.onRightArrowKeypress(...o),["prevent"]),["right"])),n[5]||(n[5]=t.withKeys(t.withModifiers((...o)=>e.onDownArrowKeypress&&e.onDownArrowKeypress(...o),["prevent"]),["down"])),n[6]||(n[6]=t.withKeys(t.withModifiers((...o)=>e.onLeftArrowKeypress&&e.onLeftArrowKeypress(...o),["prevent"]),["left"]))]},[t.createElementVNode("div",bn,null,512),t.withDirectives(t.createElementVNode("div",yn,[t.createVNode(d,{class:"cdx-tabs__scroll-button",type:"quiet",tabindex:"-1",onMousedown:n[0]||(n[0]=t.withModifiers(()=>{},["prevent"])),onClick:n[1]||(n[1]=o=>e.scrollTabs("prev"))},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconPrevious},null,8,["icon"])]),_:1})],512),[[t.vShow,!e.firstLabelVisible]]),t.createElementVNode("ul",{ref:"listElement",class:"cdx-tabs__list",role:"tablist","aria-activedescendant":e.activeTabId},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tabsData.values(),(o,c)=>(t.openBlock(),t.createElementBlock("li",{id:`${o.id}-label`,key:c,ref_for:!0,ref:u=>e.assignTemplateRefIfNecessary(u,c),class:t.normalizeClass([e.getLabelClasses(o.name),"cdx-tabs__list__item"]),role:"presentation"},[t.createElementVNode("a",{href:`#${o.id}`,role:"tab",tabIndex:"-1","aria-selected":o.name===e.activeTab,onClick:t.withModifiers(u=>e.select(o.name),["prevent"]),onKeyup:t.withKeys(u=>e.select(o.name),["enter"])},t.toDisplayString(o.label),41,kn)],10,Bn))),128))],8,Cn),t.withDirectives(t.createElementVNode("div",_n,[t.createVNode(d,{class:"cdx-tabs__scroll-button",type:"quiet",tabindex:"-1",onMousedown:n[2]||(n[2]=t.withModifiers(()=>{},["prevent"])),onClick:n[3]||(n[3]=o=>e.scrollTabs("next"))},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconNext},null,8,["icon"])]),_:1})],512),[[t.vShow,!e.lastLabelVisible]])],32),t.createElementVNode("div",$n,[t.renderSlot(e.$slots,"default")])],2)}var An=E(gn,[["render",wn]]),ko="";const In=t.defineComponent({name:"CdxToggleButton",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},quiet:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n}){return{rootClasses:t.computed(()=>({"cdx-toggle-button--quiet":e.quiet,"cdx-toggle-button--framed":!e.quiet,"cdx-toggle-button--toggled-on":e.modelValue,"cdx-toggle-button--toggled-off":!e.modelValue})),onClick:()=>{n("update:modelValue",!e.modelValue)}}}}),Sn=["aria-pressed","disabled"];function En(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["cdx-toggle-button",e.rootClasses]),"aria-pressed":e.modelValue,disabled:e.disabled,onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a))},[t.renderSlot(e.$slots,"default")],10,Sn)}var xn=E(In,[["render",En]]),_o="";const Vn=t.defineComponent({name:"CdxToggleSwitch",inheritAttrs:!1,props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{attrs:n,emit:l}){const s=t.ref(),r=T("toggle-switch"),{rootClasses:i,rootStyle:a,otherAttrs:d}=z(n),o=N(t.toRef(e,"modelValue"),l);return{input:s,inputId:r,rootClasses:i,rootStyle:a,otherAttrs:d,wrappedModel:o,clickInput:()=>{s.value.click()}}}}),vn=["for"],Dn=["id","disabled"],Mn={key:0,class:"cdx-toggle-switch__label-content"},Nn=t.createElementVNode("span",{class:"cdx-toggle-switch__switch"},[t.createElementVNode("span",{class:"cdx-toggle-switch__switch__grip"})],-1);function Fn(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["cdx-toggle-switch",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("label",{for:e.inputId,class:"cdx-toggle-switch__label"},[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:e.inputId,ref:"input","onUpdate:modelValue":n[0]||(n[0]=a=>e.wrappedModel=a),class:"cdx-toggle-switch__input",type:"checkbox",disabled:e.disabled},e.otherAttrs,{onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers((...a)=>e.clickInput&&e.clickInput(...a),["prevent"]),["enter"]))}),null,16,Dn),[[t.vModelCheckbox,e.wrappedModel]]),e.$slots.default?(t.openBlock(),t.createElementBlock("span",Mn,[t.renderSlot(e.$slots,"default")])):t.createCommentVNode("",!0),Nn],8,vn)],6)}var Tn=E(Vn,[["render",Fn]]),$o="";const Ln=t.defineComponent({name:"CdxTypeaheadSearch",components:{CdxIcon:R,CdxMenu:O,CdxSearchInput:ie},inheritAttrs:!1,props:{id:{type:String,required:!0},formAction:{type:String,required:!0},searchResultsLabel:{type:String,required:!0},searchResults:{type:Array,default:()=>[]},buttonLabel:{type:String,default:""},initialInputValue:{type:String,default:""},searchFooterUrl:{type:String,default:""},debounceInterval:{type:Number,default:Ce},highlightQuery:{type:Boolean,default:!1},showThumbnail:{type:Boolean,default:!1},autoExpandWidth:{type:Boolean,default:!1}},emits:["new-input","search-result-click","submit"],setup(e,{attrs:n,emit:l,slots:s}){const{searchResults:r,searchFooterUrl:i,debounceInterval:a}=t.toRefs(e),d=t.ref(),o=t.ref(),c=T("typeahead-search-menu"),u=t.ref(!1),b=t.ref(!1),_=t.ref(!1),A=t.ref(!1),I=t.ref(e.initialInputValue),m=t.ref(""),h=t.computed(()=>{var f,D;return(D=(f=o.value)==null?void 0:f.getHighlightedMenuItem())==null?void 0:D.id}),g=t.ref(null),v=t.computed(()=>({"cdx-typeahead-search__menu-message--with-thumbnail":e.showThumbnail})),x=t.computed(()=>e.searchResults.find(f=>f.value===g.value)),$=t.computed(()=>i.value?r.value.concat([{value:q,url:i.value}]):r.value),F=t.computed(()=>({"cdx-typeahead-search--active":A.value,"cdx-typeahead-search--show-thumbnail":e.showThumbnail,"cdx-typeahead-search--expanded":u.value,"cdx-typeahead-search--auto-expand-width":e.showThumbnail&&e.autoExpandWidth})),{rootClasses:B,rootStyle:U,otherAttrs:y}=z(n,F);function k(f){return f}const w=t.computed(()=>({showThumbnail:e.showThumbnail,boldLabel:!0,hideDescriptionOverflow:!0}));let S,C;function L(f,D=!1){x.value&&x.value.label!==f&&x.value.value!==f&&(g.value=null),C!==void 0&&(clearTimeout(C),C=void 0),f===""?u.value=!1:(b.value=!0,s["search-results-pending"]&&(C=setTimeout(()=>{A.value&&(u.value=!0),_.value=!0},Be))),S!==void 0&&(clearTimeout(S),S=void 0);const K=()=>{l("new-input",f)};D?K():S=setTimeout(()=>{K()},a.value)}function Q(f){if(f===q){g.value=null,I.value=m.value;return}g.value=f,f!==null&&(I.value=x.value?x.value.label||String(x.value.value):"")}function Wn(){A.value=!0,(m.value||_.value)&&(u.value=!0)}function Qn(){A.value=!1,u.value=!1}function de(f){const ue=f,{id:D}=ue,K=G(ue,["id"]),Yn={searchResult:K.value!==q?K:null,index:$.value.findIndex(Zn=>Zn.value===f.value),numberOfResults:r.value.length};l("search-result-click",Yn)}function jn(f){if(f.value===q){I.value=m.value;return}I.value=f.value?f.label||String(f.value):""}function Gn(f){var D;u.value=!1,(D=o.value)==null||D.clearActive(),de(f)}function Jn(){let f=null,D=-1;x.value&&(f=x.value,D=e.searchResults.indexOf(x.value));const K={searchResult:f,index:D,numberOfResults:r.value.length};l("submit",K)}function Xn(f){if(!o.value||!m.value||f.key===" "&&u.value)return;const D=o.value.getHighlightedMenuItem();switch(f.key){case"Enter":D&&(D.value===q?window.location.assign(i.value):o.value.delegateKeyNavigation(f,!1)),u.value=!1;break;case"Tab":u.value=!1;break;default:o.value.delegateKeyNavigation(f);break}}return t.onMounted(()=>{e.initialInputValue&&L(e.initialInputValue,!0)}),t.watch(t.toRef(e,"searchResults"),f=>{m.value=I.value.trim(),A.value&&b.value&&f.length>0&&(u.value=!0),C!==void 0&&(clearTimeout(C),C=void 0),b.value=!1,_.value=!1}),{form:d,menu:o,menuId:c,highlightedId:h,selection:g,menuMessageClass:v,searchResultsWithFooter:$,asSearchResult:k,inputValue:I,searchQuery:m,expanded:u,showPending:_,rootClasses:B,rootStyle:U,otherAttrs:y,menuConfig:w,onUpdateInputValue:L,onUpdateMenuSelection:Q,onFocus:Wn,onBlur:Qn,onSearchResultClick:de,onSearchResultKeyboardNavigation:jn,onSearchFooterClick:Gn,onSubmit:Jn,onKeydown:Xn,MenuFooterValue:q,articleIcon:He}},methods:{focus(){this.$refs.searchInput.focus()}}}),Rn=["id","action"],zn={class:"cdx-typeahead-search__menu-message__text"},Kn={class:"cdx-typeahead-search__menu-message__text"},qn=["href","onClickCapture"],Un={class:"cdx-typeahead-search__search-footer__text"},Pn={class:"cdx-typeahead-search__search-footer__query"};function On(e,n,l,s,r,i){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-menu"),o=t.resolveComponent("cdx-search-input");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-typeahead-search",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("form",{id:e.id,ref:"form",class:"cdx-typeahead-search__form",action:e.formAction,onSubmit:n[3]||(n[3]=(...c)=>e.onSubmit&&e.onSubmit(...c))},[t.createVNode(o,t.mergeProps({ref:"searchInput",modelValue:e.inputValue,"onUpdate:modelValue":n[2]||(n[2]=c=>e.inputValue=c),"button-label":e.buttonLabel},e.otherAttrs,{class:"cdx-typeahead-search__input",name:"search",role:"combobox",autocomplete:"off","aria-autocomplete":"list","aria-owns":e.menuId,"aria-expanded":e.expanded,"aria-activedescendant":e.highlightedId,autocapitalize:"off","onUpdate:modelValue":e.onUpdateInputValue,onFocus:e.onFocus,onBlur:e.onBlur,onKeydown:e.onKeydown}),{default:t.withCtx(()=>[t.createVNode(d,t.mergeProps({id:e.menuId,ref:"menu",expanded:e.expanded,"onUpdate:expanded":n[0]||(n[0]=c=>e.expanded=c),"show-pending":e.showPending,selected:e.selection,"menu-items":e.searchResultsWithFooter,"search-query":e.highlightQuery?e.searchQuery:"","show-no-results-slot":e.searchQuery.length>0&&e.searchResults.length===0},e.menuConfig,{"aria-label":e.searchResultsLabel,"onUpdate:selected":e.onUpdateMenuSelection,onMenuItemClick:n[1]||(n[1]=c=>e.onSearchResultClick(e.asSearchResult(c))),onMenuItemKeyboardNavigation:e.onSearchResultKeyboardNavigation}),{pending:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["cdx-typeahead-search__menu-message",e.menuMessageClass])},[t.createElementVNode("span",zn,[t.renderSlot(e.$slots,"search-results-pending")])],2)]),"no-results":t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["cdx-typeahead-search__menu-message",e.menuMessageClass])},[t.createElementVNode("span",Kn,[t.renderSlot(e.$slots,"search-no-results-text")])],2)]),default:t.withCtx(({menuItem:c})=>[c.value===e.MenuFooterValue?(t.openBlock(),t.createElementBlock("a",{key:0,class:"cdx-typeahead-search__search-footer",href:e.asSearchResult(c).url,onClickCapture:t.withModifiers(u=>e.onSearchFooterClick(e.asSearchResult(c)),["stop"])},[t.createVNode(a,{class:"cdx-typeahead-search__search-footer__icon",icon:e.articleIcon},null,8,["icon"]),t.createElementVNode("span",Un,[t.renderSlot(e.$slots,"search-footer-text",{searchQuery:e.searchQuery},()=>[t.createElementVNode("strong",Pn,t.toDisplayString(e.searchQuery),1)])])],40,qn)):t.createCommentVNode("",!0)]),_:3},16,["id","expanded","show-pending","selected","menu-items","search-query","show-no-results-slot","aria-label","onUpdate:selected","onMenuItemKeyboardNavigation"])]),_:3},16,["modelValue","button-label","aria-owns","aria-expanded","aria-activedescendant","onUpdate:modelValue","onFocus","onBlur","onKeydown"]),t.renderSlot(e.$slots,"default")],40,Rn)],6)}var Hn=E(Ln,[["render",On]]);p.CdxButton=P,p.CdxCheckbox=Ve,p.CdxCombobox=zt,p.CdxIcon=R,p.CdxLookup=Ut,p.CdxMenu=O,p.CdxMenuItem=se,p.CdxMessage=Gt,p.CdxProgressBar=re,p.CdxRadio=tn,p.CdxSearchInput=ie,p.CdxSearchResultTitle=ae,p.CdxSelect=cn,p.CdxTab=hn,p.CdxTabs=An,p.CdxTextInput=W,p.CdxToggleButton=xn,p.CdxToggleSwitch=Tn,p.CdxTypeaheadSearch=Hn,p.stringHelpers=ut,p.useComputedDirection=J,p.useComputedLanguage=ne,p.useGeneratedId=T,p.useIntersectionObserver=Y,p.useModelWrapper=N,p.useSplitAttributes=z,Object.defineProperty(p,"__esModule",{value:!0}),p[Symbol.toStringTag]="Module"}); | ||
var eo=Object.defineProperty,to=Object.defineProperties;var no=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var ce=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var me=(m,t,x)=>t in m?eo(m,t,{enumerable:!0,configurable:!0,writable:!0,value:x}):m[t]=x,fe=(m,t)=>{for(var x in t||(t={}))ce.call(t,x)&&me(m,x,t[x]);if(j)for(var x of j(t))pe.call(t,x)&&me(m,x,t[x]);return m},he=(m,t)=>to(m,no(t));var G=(m,t)=>{var x={};for(var N in m)ce.call(m,N)&&t.indexOf(N)<0&&(x[N]=m[N]);if(m!=null&&j)for(var N of j(m))t.indexOf(N)<0&&pe.call(m,N)&&(x[N]=m[N]);return x};(function(m,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(m=typeof globalThis!="undefined"?globalThis:m||self,t(m.codex={},m.Vue))})(this,function(m,t){"use strict";const x="cdx",N=["default","progressive","destructive"],ge=["normal","primary","quiet"],be=["notice","warning","error","success"],ye=["text","search"],Ce=120,Be=500,q="cdx-menu-footer-item",Z=Symbol("CdxTabs"),ee=Symbol("CdxActiveTab");function H(e){return n=>typeof n=="string"&&e.indexOf(n)!==-1}var oo="",S=(e,n)=>{const l=e.__vccOpts||e;for(const[s,r]of n)l[s]=r;return l};const ke=H(ge),_e=H(N),$e=t.defineComponent({name:"CdxButton",props:{action:{type:String,default:"default",validator:_e},type:{type:String,default:"normal",validator:ke}},emits:["click"],setup(e,{emit:n}){return{rootClasses:t.computed(()=>({[`cdx-button--action-${e.action}`]:!0,[`cdx-button--type-${e.type}`]:!0,"cdx-button--framed":e.type!=="quiet"})),onClick:r=>{n("click",r)}}}});function we(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["cdx-button",e.rootClasses]),onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a))},[t.renderSlot(e.$slots,"default")],2)}var P=S($e,[["render",we]]);function F(e,n,l){return t.computed({get:()=>e.value,set:s=>n(l||"update:modelValue",s)})}var lo="";const Ie=t.defineComponent({name:"CdxCheckbox",props:{modelValue:{type:[Boolean,Array],default:!1},inputValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n}){const l=t.computed(()=>({"cdx-checkbox--inline":e.inline})),s=t.ref(),r=t.ref(),i=()=>{s.value.focus()},a=()=>{r.value.click()},d=F(t.toRef(e,"modelValue"),n);return{rootClasses:l,input:s,label:r,focusInput:i,clickLabel:a,wrappedModel:d}}}),Ae=["value","disabled",".indeterminate"],Se=t.createElementVNode("span",{class:"cdx-checkbox__icon"},null,-1),Ee={class:"cdx-checkbox__label-content"};function xe(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["cdx-checkbox",e.rootClasses])},[t.createElementVNode("label",{ref:"label",class:"cdx-checkbox__label",onClick:n[1]||(n[1]=(...a)=>e.focusInput&&e.focusInput(...a)),onKeydown:n[2]||(n[2]=t.withKeys(t.withModifiers((...a)=>e.clickLabel&&e.clickLabel(...a),["prevent"]),["enter"]))},[t.withDirectives(t.createElementVNode("input",{ref:"input","onUpdate:modelValue":n[0]||(n[0]=a=>e.wrappedModel=a),class:"cdx-checkbox__input",type:"checkbox",value:e.inputValue,disabled:e.disabled,".indeterminate":e.indeterminate},null,8,Ae),[[t.vModelCheckbox,e.wrappedModel]]),Se,t.createElementVNode("span",Ee,[t.renderSlot(e.$slots,"default")])],544)],2)}var Ve=S(Ie,[["render",xe]]),Me='<path d="M11.53 2.3A1.85 1.85 0 0010 1.21 1.85 1.85 0 008.48 2.3L.36 16.36C-.48 17.81.21 19 1.88 19h16.24c1.67 0 2.36-1.19 1.52-2.64zM11 16H9v-2h2zm0-4H9V6h2z"/>',ve='<path d="M12.43 14.34A5 5 0 0110 15a5 5 0 113.95-2L17 16.09V3a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h10a2 2 0 001.45-.63z"/><circle cx="10" cy="10" r="3"/>',De='<path d="M7 14.17 2.83 10l-1.41 1.41L7 17 19 5l-1.41-1.42z"/>',Ne='<path d="M10 0a10 10 0 1010 10A10 10 0 0010 0zm5.66 14.24-1.41 1.41L10 11.41l-4.24 4.25-1.42-1.42L8.59 10 4.34 5.76l1.42-1.42L10 8.59l4.24-4.24 1.41 1.41L11.41 10z"/>',Fe='<path d="m4.34 2.93 12.73 12.73-1.41 1.41L2.93 4.35z"/><path d="M17.07 4.34 4.34 17.07l-1.41-1.41L15.66 2.93z"/>',Te='<path d="M13.728 1H6.272L1 6.272v7.456L6.272 19h7.456L19 13.728V6.272zM11 15H9v-2h2zm0-4H9V5h2z"/>',Le='<path d="m17.5 4.75-7.5 7.5-7.5-7.5L1 6.25l9 9 9-9z"/>',Re='<path d="M19 3H1v14h18zM3 14l3.5-4.5 2.5 3L12.5 8l4.5 6z"/><path d="M19 5H1V3h18zm0 12H1v-2h18z"/>',ze='<path d="M8 19a1 1 0 001 1h2a1 1 0 001-1v-1H8zm9-12a7 7 0 10-12 4.9S7 14 7 15v1a1 1 0 001 1h4a1 1 0 001-1v-1c0-1 2-3.1 2-3.1A7 7 0 0017 7z"/>',Ke='<path d="M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0zM9 5h2v2H9zm0 4h2v6H9z"/>',qe='<path d="M7 1 5.6 2.5 13 10l-7.4 7.5L7 19l9-9z"/>',Ue='<path d="m4 10 9 9 1.4-1.5L7 10l7.4-7.5L13 1z"/>',Pe='<path d="M12.2 13.6a7 7 0 111.4-1.4l5.4 5.4-1.4 1.4-5.4-5.4zM3 8a5 5 0 1010 0A5 5 0 103 8z"/>';const Oe=Me,He=ve,We=De,Qe=Ne,je=Fe,Ge=Te,te=Le,Je=Re,Xe={langCodeMap:{ar:ze},default:Ke},Ye={ltr:qe,shouldFlip:!0},Ze={ltr:Ue,shouldFlip:!0},et=Pe;function tt(e,n,l){if(typeof e=="string"||"path"in e)return e;if("shouldFlip"in e)return e.ltr;if("rtl"in e)return l==="rtl"?e.rtl:e.ltr;const s=n in e.langCodeMap?e.langCodeMap[n]:e.default;return typeof s=="string"||"path"in s?s:s.ltr}function nt(e,n){if(typeof e=="string")return!1;if("langCodeMap"in e){const l=n in e.langCodeMap?e.langCodeMap[n]:e.default;if(typeof l=="string")return!1;e=l}if("shouldFlipExceptions"in e&&Array.isArray(e.shouldFlipExceptions)){const l=e.shouldFlipExceptions.indexOf(n);return l===void 0||l===-1}return"shouldFlip"in e?e.shouldFlip:!1}function J(e){const n=t.ref(null);return t.onMounted(()=>{const l=window.getComputedStyle(e.value).direction;n.value=l==="ltr"||l==="rtl"?l:null}),n}function ne(e){const n=t.ref("");return t.onMounted(()=>{let l=e.value;for(;l&&l.lang==="";)l=l.parentElement;n.value=l?l.lang:null}),n}var ao="";const ot=t.defineComponent({name:"CdxIcon",props:{icon:{type:[String,Object],required:!0},iconLabel:{type:String,default:""},lang:{type:String,default:null},dir:{type:String,default:null}},emits:["click"],setup(e,{emit:n}){const l=t.ref(),s=J(l),r=ne(l),i=t.computed(()=>e.dir||s.value),a=t.computed(()=>e.lang||r.value),d=t.computed(()=>({"cdx-icon--flipped":i.value==="rtl"&&a.value!==null&&nt(e.icon,a.value)})),o=t.computed(()=>tt(e.icon,a.value||"",i.value||"ltr")),c=t.computed(()=>typeof o.value=="string"?o.value:""),u=t.computed(()=>typeof o.value!="string"?o.value.path:"");return{rootElement:l,rootClasses:d,iconSvg:c,iconPath:u,onClick:b=>{n("click",b)}}}}),lt=["aria-hidden"],at={key:0},st=["innerHTML"],rt=["d"];function it(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("span",{ref:"rootElement",class:t.normalizeClass(["cdx-icon",e.rootClasses]),onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a))},[(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":!e.iconLabel},[e.iconLabel?(t.openBlock(),t.createElementBlock("title",at,t.toDisplayString(e.iconLabel),1)):t.createCommentVNode("",!0),e.iconSvg?(t.openBlock(),t.createElementBlock("g",{key:1,fill:"currentColor",innerHTML:e.iconSvg},null,8,st)):(t.openBlock(),t.createElementBlock("path",{key:2,d:e.iconPath,fill:"currentColor"},null,8,rt))],8,lt))],2)}var R=S(ot,[["render",it]]);function oe(e){return e.replace(/([\\{}()|.?*+\-^$[\]])/g,"\\$1")}const dt="[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]";function le(e,n){if(!e)return[n,"",""];const l=oe(e),s=new RegExp(l+dt+"*","i").exec(n);if(!s||s.index===void 0)return[n,"",""];const r=s.index,i=r+s[0].length,a=n.slice(r,i),d=n.slice(0,r),o=n.slice(i,n.length);return[d,a,o]}var ut=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",regExpEscape:oe,splitStringAtMatch:le}),so="";const ct=t.defineComponent({name:"CdxSearchResultTitle",props:{title:{type:String,required:!0},searchQuery:{type:String,default:""}},setup:e=>({titleChunks:t.computed(()=>le(e.searchQuery,String(e.title)))})}),pt={class:"cdx-search-result-title"},mt={class:"cdx-search-result-title__match"};function ft(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("span",pt,[t.createElementVNode("bdi",null,[t.createTextVNode(t.toDisplayString(e.titleChunks[0]),1),t.createElementVNode("span",mt,t.toDisplayString(e.titleChunks[1]),1),t.createTextVNode(t.toDisplayString(e.titleChunks[2]),1)])])}var ae=S(ct,[["render",ft]]),ro="";const ht=t.defineComponent({name:"CdxMenuItem",components:{CdxIcon:R,CdxSearchResultTitle:ae},props:{id:{type:String,required:!0},value:{type:[String,Number],required:!0},disabled:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},active:{type:Boolean,default:!1},highlighted:{type:Boolean,default:!1},label:{type:String,default:""},match:{type:String,default:""},url:{type:String,default:""},icon:{type:[String,Object],default:""},showThumbnail:{type:Boolean,default:!1},thumbnail:{type:[Object,null],default:null},description:{type:[String,null],default:""},searchQuery:{type:String,default:""},boldLabel:{type:Boolean,default:!1},hideDescriptionOverflow:{type:Boolean,default:!1},language:{type:Object,default:()=>({})}},emits:["change"],setup:(e,{emit:n})=>{const l=t.ref(!1),s=t.ref({}),r=()=>{n("change","highlighted",!0)},i=()=>{n("change","highlighted",!1)},a=C=>{C.button===0&&n("change","active",!0)},d=()=>{n("change","selected",!0)},o=t.computed(()=>e.searchQuery.length>0),c=t.computed(()=>({"cdx-menu-item--selected":e.selected,"cdx-menu-item--active":e.active&&e.highlighted,"cdx-menu-item--highlighted":e.highlighted,"cdx-menu-item--enabled":!e.disabled,"cdx-menu-item--disabled":e.disabled,"cdx-menu-item--highlight-query":o.value,"cdx-menu-item--bold-label":e.boldLabel,"cdx-menu-item--has-description":!!e.description,"cdx-menu-item--hide-description-overflow":e.hideDescriptionOverflow})),u=t.computed(()=>e.url?"a":"span"),f=t.computed(()=>e.label||String(e.value)),b=C=>{const $=C.replace(/([\\"\n])/g,"\\$1"),p=new Image;p.onload=()=>{s.value={backgroundImage:`url("${$}")`},l.value=!0},p.onerror=()=>{l.value=!1},p.src=$};return t.onMounted(()=>{var C;((C=e.thumbnail)==null?void 0:C.url)&&e.showThumbnail&&b(e.thumbnail.url)}),{onMouseEnter:r,onMouseLeave:i,onMouseDown:a,onClick:d,highlightQuery:o,rootClasses:c,contentTag:u,title:f,defaultThumbnailIcon:Je,thumbnailStyle:s,thumbnailLoaded:l}}}),gt=["id","aria-disabled","aria-selected"],bt={key:0,class:"cdx-menu-item__thumbnail-placeholder"},yt={class:"cdx-menu-item__text"},Ct=["lang"],Bt=t.createTextVNode(t.toDisplayString(" ")+" "),kt=["lang"],_t=["lang"];function $t(e,n,l,s,r,i){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-search-result-title");return t.openBlock(),t.createElementBlock("li",{id:e.id,role:"option",class:t.normalizeClass(["cdx-menu-item",e.rootClasses]),"aria-disabled":e.disabled,"aria-selected":e.selected,onMouseenter:n[0]||(n[0]=(...o)=>e.onMouseEnter&&e.onMouseEnter(...o)),onMouseleave:n[1]||(n[1]=(...o)=>e.onMouseLeave&&e.onMouseLeave(...o)),onMousedown:n[2]||(n[2]=t.withModifiers((...o)=>e.onMouseDown&&e.onMouseDown(...o),["prevent"])),onClick:n[3]||(n[3]=(...o)=>e.onClick&&e.onClick(...o))},[t.renderSlot(e.$slots,"default",{},()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.contentTag),{href:e.url?e.url:void 0,class:"cdx-menu-item__content"},{default:t.withCtx(()=>{var o,c,u,f,b;return[e.showThumbnail?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.thumbnailLoaded?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",bt,[t.createVNode(a,{icon:e.defaultThumbnailIcon,class:"cdx-menu-item__thumbnail-placeholder__icon"},null,8,["icon"])])),t.createVNode(t.Transition,{name:"cdx-menu-item__thumbnail"},{default:t.withCtx(()=>[e.thumbnailLoaded?(t.openBlock(),t.createElementBlock("span",{key:0,style:t.normalizeStyle(e.thumbnailStyle),class:"cdx-menu-item__thumbnail"},null,4)):t.createCommentVNode("",!0)]),_:1})],64)):e.icon?(t.openBlock(),t.createBlock(a,{key:1,icon:e.icon,class:"cdx-menu-item__icon"},null,8,["icon"])):t.createCommentVNode("",!0),t.createElementVNode("span",yt,[e.highlightQuery?(t.openBlock(),t.createBlock(d,{key:0,title:e.title,"search-query":e.searchQuery,lang:(o=e.language)==null?void 0:o.label},null,8,["title","search-query","lang"])):(t.openBlock(),t.createElementBlock("span",{key:1,class:"cdx-menu-item__text__label",lang:(c=e.language)==null?void 0:c.label},[t.createElementVNode("bdi",null,t.toDisplayString(e.title),1)],8,Ct)),e.match?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[Bt,e.highlightQuery?(t.openBlock(),t.createBlock(d,{key:0,title:e.match,"search-query":e.searchQuery,lang:(u=e.language)==null?void 0:u.match},null,8,["title","search-query","lang"])):(t.openBlock(),t.createElementBlock("span",{key:1,class:"cdx-menu-item__text__match",lang:(f=e.language)==null?void 0:f.match},[t.createElementVNode("bdi",null,t.toDisplayString(e.match),1)],8,kt))],64)):t.createCommentVNode("",!0),e.description?(t.openBlock(),t.createElementBlock("span",{key:3,class:"cdx-menu-item__text__description",lang:(b=e.language)==null?void 0:b.description},[t.createElementVNode("bdi",null,t.toDisplayString(e.description),1)],8,_t)):t.createCommentVNode("",!0)])]}),_:1},8,["href"]))])],42,gt)}var se=S(ht,[["render",$t]]),io="";const wt=t.defineComponent({name:"CdxProgressBar",props:{inline:{type:Boolean,default:!1}},setup(e){return{rootClasses:t.computed(()=>({"cdx-progress-bar--block":!e.inline,"cdx-progress-bar--inline":e.inline}))}}}),It=[t.createElementVNode("div",{class:"cdx-progress-bar__bar"},null,-1)];function At(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-progress-bar",e.rootClasses]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100"},It,2)}var re=S(wt,[["render",At]]);let X=0;function T(e){const n=t.getCurrentInstance(),l=(n==null?void 0:n.props.id)||(n==null?void 0:n.attrs.id);return e?`${x}-${e}-${X++}`:l?`${x}-${l}-${X++}`:`${x}-${X++}`}var co="";const St=t.defineComponent({name:"CdxMenu",components:{CdxMenuItem:se,CdxProgressBar:re},props:{menuItems:{type:Array,required:!0},selected:{type:[String,Number,null],required:!0},expanded:{type:Boolean,required:!0},showPending:{type:Boolean,default:!1},showThumbnail:{type:Boolean,default:!1},boldLabel:{type:Boolean,default:!1},hideDescriptionOverflow:{type:Boolean,default:!1},searchQuery:{type:String,default:""},showNoResultsSlot:{type:Boolean,default:null}},emits:["update:selected","update:expanded","menu-item-click","menu-item-keyboard-navigation"],expose:["clearActive","getHighlightedMenuItem","delegateKeyNavigation"],setup(e,{emit:n,slots:l}){const s=t.computed(()=>e.menuItems.map(p=>he(fe({},p),{id:T("menu-item")}))),r=t.computed(()=>l["no-results"]?e.showNoResultsSlot!==null?e.showNoResultsSlot:s.value.length===0:!1),i=t.ref(null),a=t.ref(null);function d(){return s.value.find(p=>p.value===e.selected)}function o(p,h){var y;if(!(h&&h.disabled))switch(p){case"selected":n("update:selected",(y=h==null?void 0:h.value)!=null?y:null),n("update:expanded",!1),a.value=null;break;case"highlighted":i.value=h||null;break;case"active":a.value=h||null;break}}const c=t.computed(()=>{if(i.value!==null)return s.value.findIndex(p=>p.value===i.value.value)});function u(p){!p||(o("highlighted",p),n("menu-item-keyboard-navigation",p))}function f(){var V;const p=E=>{for(let v=E-1;v>=0;v--)if(!s.value[v].disabled)return s.value[v]},h=(V=c.value)!=null?V:s.value.length,y=p(h)||p(s.value.length);u(y)}function b(){var V;const p=E=>s.value.find((v,M)=>!v.disabled&&M>E),h=(V=c.value)!=null?V:-1,y=p(h)||p(-1);u(y)}function C(p,h=!0){function y(){n("update:expanded",!0),o("highlighted",d())}function V(){h&&(p.preventDefault(),p.stopPropagation())}switch(p.key){case"Enter":case" ":return V(),e.expanded?(i.value&&n("update:selected",i.value.value),n("update:expanded",!1)):y(),!0;case"Tab":return e.expanded&&(i.value&&n("update:selected",i.value.value),n("update:expanded",!1)),!0;case"ArrowUp":return V(),e.expanded?(i.value===null&&o("highlighted",d()),f()):y(),!0;case"ArrowDown":return V(),e.expanded?(i.value===null&&o("highlighted",d()),b()):y(),!0;case"Escape":return V(),n("update:expanded",!1),!0;default:return!1}}function $(){o("active")}return t.onMounted(()=>{document.addEventListener("mouseup",$)}),t.onUnmounted(()=>{document.removeEventListener("mouseup",$)}),t.watch(t.toRef(e,"expanded"),p=>{const h=d();!p&&i.value&&h===void 0&&o("highlighted"),p&&h!==void 0&&o("highlighted",h)}),{computedMenuItems:s,computedShowNoResultsSlot:r,highlightedMenuItem:i,activeMenuItem:a,handleMenuItemChange:o,handleKeyNavigation:C}},methods:{getHighlightedMenuItem(){return this.highlightedMenuItem},clearActive(){this.handleMenuItemChange("active")},delegateKeyNavigation(e,n=!0){return this.handleKeyNavigation(e,n)}}}),Et={class:"cdx-menu",role:"listbox","aria-multiselectable":"false"},xt={key:0,class:"cdx-menu__pending cdx-menu-item"},Vt={key:1,class:"cdx-menu__no-results cdx-menu-item"};function Mt(e,n,l,s,r,i){const a=t.resolveComponent("cdx-menu-item"),d=t.resolveComponent("cdx-progress-bar");return t.withDirectives((t.openBlock(),t.createElementBlock("ul",Et,[e.showPending&&e.computedMenuItems.length===0&&e.$slots.pending?(t.openBlock(),t.createElementBlock("li",xt,[t.renderSlot(e.$slots,"pending")])):t.createCommentVNode("",!0),e.computedShowNoResultsSlot?(t.openBlock(),t.createElementBlock("li",Vt,[t.renderSlot(e.$slots,"no-results")])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedMenuItems,o=>{var c,u;return t.openBlock(),t.createBlock(a,t.mergeProps({key:o.value},o,{selected:o.value===e.selected,active:o.value===((c=e.activeMenuItem)==null?void 0:c.value),highlighted:o.value===((u=e.highlightedMenuItem)==null?void 0:u.value),"show-thumbnail":e.showThumbnail,"bold-label":e.boldLabel,"hide-description-overflow":e.hideDescriptionOverflow,"search-query":e.searchQuery,onChange:(f,b)=>e.handleMenuItemChange(f,b&&o),onClick:f=>e.$emit("menu-item-click",o)}),{default:t.withCtx(()=>{var f,b;return[t.renderSlot(e.$slots,"default",{menuItem:o,active:o.value===((f=e.activeMenuItem)==null?void 0:f.value)&&o.value===((b=e.highlightedMenuItem)==null?void 0:b.value)})]}),_:2},1040,["selected","active","highlighted","show-thumbnail","bold-label","hide-description-overflow","search-query","onChange","onClick"])}),128)),e.showPending?(t.openBlock(),t.createBlock(d,{key:2,class:"cdx-menu__progress-bar",inline:!0})):t.createCommentVNode("",!0)],512)),[[t.vShow,e.expanded]])}var O=S(St,[["render",Mt]]);function z(e,n=t.computed(()=>({}))){const l=t.computed(()=>{const i=G(n.value,[]);return e.class&&e.class.split(" ").forEach(d=>{i[d]=!0}),i}),s=t.computed(()=>{if("style"in e)return e.style}),r=t.computed(()=>{const o=e,{class:i,style:a}=o;return G(o,["class","style"])});return{rootClasses:l,rootStyle:s,otherAttrs:r}}var po="";const vt=H(ye),Dt=t.defineComponent({name:"CdxTextInput",components:{CdxIcon:R},inheritAttrs:!1,expose:["focus"],props:{modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text",validator:vt},disabled:{type:Boolean,default:!1},startIcon:{type:[String,Object],default:void 0},endIcon:{type:[String,Object],default:void 0},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","input","change","focus","blur"],setup(e,{emit:n,attrs:l}){const s=F(t.toRef(e,"modelValue"),n),r=t.computed(()=>e.clearable&&!!s.value&&!e.disabled),i=t.computed(()=>({"cdx-text-input--has-start-icon":!!e.startIcon,"cdx-text-input--has-end-icon":!!e.endIcon,"cdx-text-input--clearable":r.value})),{rootClasses:a,rootStyle:d,otherAttrs:o}=z(l,i),c=t.computed(()=>({"cdx-text-input__input--has-value":!!s.value}));return{wrappedModel:s,isClearable:r,rootClasses:a,rootStyle:d,otherAttrs:o,inputClasses:c,onClear:()=>{s.value=""},onInput:p=>{n("input",p)},onChange:p=>{n("change",p)},onFocus:p=>{n("focus",p)},onBlur:p=>{n("blur",p)},cdxIconClear:Qe}},methods:{focus(){this.$refs.input.focus()}}}),Nt=["type","disabled"];function Ft(e,n,l,s,r,i){const a=t.resolveComponent("cdx-icon");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-text-input",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.withDirectives(t.createElementVNode("input",t.mergeProps({ref:"input","onUpdate:modelValue":n[0]||(n[0]=d=>e.wrappedModel=d),class:["cdx-text-input__input",e.inputClasses]},e.otherAttrs,{type:e.inputType,disabled:e.disabled,onInput:n[1]||(n[1]=(...d)=>e.onInput&&e.onInput(...d)),onChange:n[2]||(n[2]=(...d)=>e.onChange&&e.onChange(...d)),onFocus:n[3]||(n[3]=(...d)=>e.onFocus&&e.onFocus(...d)),onBlur:n[4]||(n[4]=(...d)=>e.onBlur&&e.onBlur(...d))}),null,16,Nt),[[t.vModelDynamic,e.wrappedModel]]),e.startIcon?(t.openBlock(),t.createBlock(a,{key:0,icon:e.startIcon,class:"cdx-text-input__icon cdx-text-input__start-icon"},null,8,["icon"])):t.createCommentVNode("",!0),e.endIcon?(t.openBlock(),t.createBlock(a,{key:1,icon:e.endIcon,class:"cdx-text-input__icon cdx-text-input__end-icon"},null,8,["icon"])):t.createCommentVNode("",!0),e.isClearable?(t.openBlock(),t.createBlock(a,{key:2,icon:e.cdxIconClear,class:"cdx-text-input__icon cdx-text-input__clear-icon",onMousedown:n[5]||(n[5]=t.withModifiers(()=>{},["prevent"])),onClick:e.onClear},null,8,["icon","onClick"])):t.createCommentVNode("",!0)],6)}var W=S(Dt,[["render",Ft]]),mo="";const Tt=t.defineComponent({name:"CdxCombobox",components:{CdxButton:P,CdxIcon:R,CdxMenu:O,CdxTextInput:W},inheritAttrs:!1,props:{menuItems:{type:Array,required:!0},selected:{type:[String,Number],required:!0},disabled:{type:Boolean,default:!1},menuConfig:{type:Object,default:()=>({})}},emits:["update:selected"],setup(e,{emit:n,attrs:l,slots:s}){const r=t.ref(),i=t.ref(),a=T("combobox"),d=t.toRef(e,"selected"),o=F(d,n,"update:selected"),c=t.ref(!1),u=t.ref(!1),f=t.computed(()=>{var M,k;return(k=(M=i.value)==null?void 0:M.getHighlightedMenuItem())==null?void 0:k.id}),b=t.computed(()=>({"cdx-combobox--disabled":e.disabled})),{rootClasses:C,rootStyle:$,otherAttrs:p}=z(l,b);function h(){u.value&&c.value?c.value=!1:(e.menuItems.length>0||s["no-results"])&&(c.value=!0)}function y(){c.value=u.value&&c.value}function V(){e.disabled||(u.value=!0)}function E(){var M;e.disabled||(M=r.value)==null||M.focus()}function v(M){!i.value||e.disabled||e.menuItems.length===0||M.key===" "&&c.value||i.value.delegateKeyNavigation(M)}return t.watch(c,()=>{u.value=!1}),{input:r,menu:i,menuId:a,modelWrapper:o,expanded:c,highlightedId:f,onInputFocus:h,onInputBlur:y,onKeydown:v,onButtonClick:E,onButtonMousedown:V,cdxIconExpand:te,rootClasses:C,rootStyle:$,otherAttrs:p}}}),Lt={class:"cdx-combobox__input-wrapper"};function Rt(e,n,l,s,r,i){const a=t.resolveComponent("cdx-text-input"),d=t.resolveComponent("cdx-icon"),o=t.resolveComponent("cdx-button"),c=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-combobox",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("div",Lt,[t.createVNode(a,t.mergeProps({ref:"input",modelValue:e.modelWrapper,"onUpdate:modelValue":n[0]||(n[0]=u=>e.modelWrapper=u)},e.otherAttrs,{class:"cdx-combobox__input","aria-activedescendant":e.highlightedId,"aria-expanded":e.expanded,"aria-owns":e.menuId,disabled:e.disabled,"aria-autocomplete":"list",autocomplete:"off",role:"combobox",onKeydown:e.onKeydown,onFocus:e.onInputFocus,onBlur:e.onInputBlur}),null,16,["modelValue","aria-activedescendant","aria-expanded","aria-owns","disabled","onKeydown","onFocus","onBlur"]),t.createVNode(o,{class:"cdx-combobox__expand-button","aria-hidden":"true",disabled:e.disabled,tabindex:"-1",onMousedown:e.onButtonMousedown,onClick:e.onButtonClick},{default:t.withCtx(()=>[t.createVNode(d,{class:"cdx-combobox__expand-icon",icon:e.cdxIconExpand},null,8,["icon"])]),_:1},8,["disabled","onMousedown","onClick"])]),t.createVNode(c,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[1]||(n[1]=u=>e.modelWrapper=u),expanded:e.expanded,"onUpdate:expanded":n[2]||(n[2]=u=>e.expanded=u),"menu-items":e.menuItems},e.menuConfig),{default:t.withCtx(({menuItem:u})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:u})]),"no-results":t.withCtx(()=>[t.renderSlot(e.$slots,"no-results")]),_:3},16,["id","selected","expanded","menu-items"])],6)}var zt=S(Tt,[["render",Rt]]),fo="";const Kt=t.defineComponent({name:"CdxLookup",components:{CdxMenu:O,CdxTextInput:W},inheritAttrs:!1,props:{selected:{type:[String,Number,null],required:!0},menuItems:{type:Array,required:!0},initialInputValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},menuConfig:{type:Object,default:()=>({})}},emits:["update:selected","input"],setup:(e,{emit:n,attrs:l,slots:s})=>{const r=t.ref(),i=T("lookup-menu"),a=t.ref(!1),d=t.ref(!1),o=t.ref(!1),c=t.toRef(e,"selected"),u=F(c,n,"update:selected"),f=t.computed(()=>e.menuItems.find(k=>k.value===e.selected)),b=t.computed(()=>{var k,U;return(U=(k=r.value)==null?void 0:k.getHighlightedMenuItem())==null?void 0:U.id}),C=t.ref(e.initialInputValue),$=t.computed(()=>({"cdx-lookup--disabled":e.disabled,"cdx-lookup--pending":a.value})),{rootClasses:p,rootStyle:h,otherAttrs:y}=z(l,$);function V(k){f.value&&f.value.label!==k&&f.value.value!==k&&(u.value=null),k===""?d.value=!1:a.value=!0,n("input",k)}function E(){o.value=!0,C.value!==null&&C.value!==""&&(e.menuItems.length>0||s["no-results"])&&(d.value=!0)}function v(){o.value=!1,d.value=!1}function M(k){!r.value||e.disabled||e.menuItems.length===0&&!s["no-results"]||k.key===" "&&d.value||r.value.delegateKeyNavigation(k)}return t.watch(c,k=>{k!==null&&(C.value=f.value?f.value.label||f.value.value:"",n("input",C.value))}),t.watch(t.toRef(e,"menuItems"),k=>{o.value&&a.value&&(k.length>0||s["no-results"])&&(d.value=!0),k.length===0&&!s["no-results"]&&(d.value=!1),a.value=!1}),{menu:r,menuId:i,highlightedId:b,inputValue:C,modelWrapper:u,expanded:d,onInputBlur:v,rootClasses:p,rootStyle:h,otherAttrs:y,onUpdateInput:V,onInputFocus:E,onKeydown:M}}});function qt(e,n,l,s,r,i){const a=t.resolveComponent("cdx-text-input"),d=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-lookup",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createVNode(a,t.mergeProps({modelValue:e.inputValue,"onUpdate:modelValue":n[0]||(n[0]=o=>e.inputValue=o)},e.otherAttrs,{class:"cdx-lookup__input",role:"combobox",autocomplete:"off","aria-autocomplete":"list","aria-owns":e.menuId,"aria-expanded":e.expanded,"aria-activedescendant":e.highlightedId,disabled:e.disabled,"onUpdate:modelValue":e.onUpdateInput,onFocus:e.onInputFocus,onBlur:e.onInputBlur,onKeydown:e.onKeydown}),null,16,["modelValue","aria-owns","aria-expanded","aria-activedescendant","disabled","onUpdate:modelValue","onFocus","onBlur","onKeydown"]),t.createVNode(d,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[1]||(n[1]=o=>e.modelWrapper=o),expanded:e.expanded,"onUpdate:expanded":n[2]||(n[2]=o=>e.expanded=o),"menu-items":e.menuItems},e.menuConfig),{default:t.withCtx(({menuItem:o})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:o})]),"no-results":t.withCtx(()=>[t.renderSlot(e.$slots,"no-results")]),_:3},16,["id","selected","expanded","menu-items"])],6)}var Ut=S(Kt,[["render",qt]]),ho="";const Pt=H(be),Ot={notice:Xe,error:Ge,warning:Oe,success:We},Ht=t.defineComponent({name:"CdxMessage",components:{CdxButton:P,CdxIcon:R},props:{type:{type:String,default:"notice",validator:Pt},inline:{type:Boolean,default:!1},icon:{type:[String,Object],default:null},fadeIn:{type:Boolean,default:!1},dismissButtonLabel:{type:String,default:""},autoDismiss:{type:[Boolean,Number],default:!1,validator:e=>typeof e=="boolean"||typeof e=="number"&&e>0}},emits:["user-dismissed","auto-dismissed"],setup(e,{emit:n}){const l=t.ref(!1),s=t.computed(()=>e.inline===!1&&e.dismissButtonLabel.length>0),r=t.computed(()=>e.autoDismiss===!1?!1:e.autoDismiss===!0?4e3:e.autoDismiss),i=t.computed(()=>({"cdx-message--inline":e.inline,"cdx-message--block":!e.inline,"cdx-message--user-dismissable":s.value,[`cdx-message--${e.type}`]:!0})),a=t.computed(()=>e.icon&&e.type==="notice"?e.icon:Ot[e.type]),d=t.ref("");function o(c){l.value||(d.value=c==="user-dismissed"?"cdx-message-leave-active-user":"cdx-message-leave-active-system",l.value=!0,n(c))}return t.onMounted(()=>{r.value&&setTimeout(()=>o("auto-dismissed"),r.value)}),{dismissed:l,userDismissable:s,rootClasses:i,leaveActiveClass:d,computedIcon:a,onDismiss:o,cdxIconClose:je}}}),Wt=["aria-live","role"],Qt={class:"cdx-message__content"};function jt(e,n,l,s,r,i){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-button");return t.openBlock(),t.createBlock(t.Transition,{name:"cdx-message",appear:e.fadeIn,"leave-active-class":e.leaveActiveClass},{default:t.withCtx(()=>[e.dismissed?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["cdx-message",e.rootClasses]),"aria-live":e.type!=="error"?"polite":void 0,role:e.type==="error"?"alert":void 0},[t.createVNode(a,{class:"cdx-message__icon",icon:e.computedIcon},null,8,["icon"]),t.createElementVNode("div",Qt,[t.renderSlot(e.$slots,"default")]),e.userDismissable?(t.openBlock(),t.createBlock(d,{key:0,class:"cdx-message__dismiss-button",type:"quiet","aria-label":e.dismissButtonLabel,onClick:n[0]||(n[0]=o=>e.onDismiss("user-dismissed"))},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconClose,"icon-label":e.dismissButtonLabel},null,8,["icon","icon-label"])]),_:1},8,["aria-label"])):t.createCommentVNode("",!0)],10,Wt))]),_:3},8,["appear","leave-active-class"])}var Gt=S(Ht,[["render",jt]]),go="";const Jt=t.defineComponent({name:"CdxRadio",props:{modelValue:{type:[String,Number,Boolean],default:""},inputValue:{type:[String,Number,Boolean],default:!1},name:{type:String,default:""},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n}){const l=t.computed(()=>({"cdx-radio--inline":e.inline})),s=t.ref(),r=()=>{s.value.focus()},i=F(t.toRef(e,"modelValue"),n);return{rootClasses:l,input:s,focusInput:r,wrappedModel:i}}}),Xt=["name","value","disabled"],Yt=t.createElementVNode("span",{class:"cdx-radio__icon"},null,-1),Zt={class:"cdx-radio__label-content"};function en(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["cdx-radio",e.rootClasses])},[t.createElementVNode("label",{class:"cdx-radio__label",onClick:n[1]||(n[1]=(...a)=>e.focusInput&&e.focusInput(...a))},[t.withDirectives(t.createElementVNode("input",{ref:"input","onUpdate:modelValue":n[0]||(n[0]=a=>e.wrappedModel=a),class:"cdx-radio__input",type:"radio",name:e.name,value:e.inputValue,disabled:e.disabled},null,8,Xt),[[t.vModelRadio,e.wrappedModel]]),Yt,t.createElementVNode("span",Zt,[t.renderSlot(e.$slots,"default")])])],2)}var tn=S(Jt,[["render",en]]),bo="";const nn=t.defineComponent({name:"CdxSearchInput",components:{CdxButton:P,CdxTextInput:W},inheritAttrs:!1,props:{modelValue:{type:[String,Number],default:""},buttonLabel:{type:String,default:""}},emits:["update:modelValue","submit-click"],setup(e,{emit:n,attrs:l}){const s=F(t.toRef(e,"modelValue"),n),r=t.computed(()=>({"cdx-search-input--has-end-button":!!e.buttonLabel})),{rootClasses:i,rootStyle:a,otherAttrs:d}=z(l,r);return{wrappedModel:s,rootClasses:i,rootStyle:a,otherAttrs:d,handleSubmit:()=>{n("submit-click",s.value)},searchIcon:et}},methods:{focus(){this.$refs.textInput.focus()}}}),on={class:"cdx-search-input__input-wrapper"};function ln(e,n,l,s,r,i){const a=t.resolveComponent("cdx-text-input"),d=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-search-input",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("div",on,[t.createVNode(a,t.mergeProps({ref:"textInput",modelValue:e.wrappedModel,"onUpdate:modelValue":n[0]||(n[0]=o=>e.wrappedModel=o),class:"cdx-search-input__text-input","input-type":"search","start-icon":e.searchIcon},e.otherAttrs,{onKeydown:t.withKeys(e.handleSubmit,["enter"])}),null,16,["modelValue","start-icon","onKeydown"]),t.renderSlot(e.$slots,"default")]),e.buttonLabel?(t.openBlock(),t.createBlock(d,{key:0,class:"cdx-search-input__end-button",onClick:e.handleSubmit},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.buttonLabel),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)],6)}var ie=S(nn,[["render",ln]]),yo="";const an=t.defineComponent({name:"CdxSelect",components:{CdxIcon:R,CdxMenu:O},props:{menuItems:{type:Array,required:!0},selected:{type:[String,Number,null],required:!0},defaultLabel:{type:String,default:""},disabled:{type:Boolean,default:!1},menuConfig:{type:Object,default:()=>({})},defaultIcon:{type:[String,Object],default:void 0}},emits:["update:selected"],setup(e,{emit:n}){const l=t.ref(),s=t.ref(),r=T("select-handle"),i=T("select-menu"),a=t.ref(!1),d=F(t.toRef(e,"selected"),n,"update:selected"),o=t.computed(()=>e.menuItems.find(h=>h.value===e.selected)),c=t.computed(()=>o.value?o.value.label||o.value.value:e.defaultLabel),u=t.computed(()=>{if(e.defaultIcon&&!o.value)return e.defaultIcon;if(o.value&&o.value.icon)return o.value.icon}),f=t.computed(()=>({"cdx-select--enabled":!e.disabled,"cdx-select--disabled":e.disabled,"cdx-select--expanded":a.value,"cdx-select--value-selected":!!o.value,"cdx-select--no-selections":!o.value,"cdx-select--has-start-icon":!!u.value})),b=t.computed(()=>{var h,y;return(y=(h=s.value)==null?void 0:h.getHighlightedMenuItem())==null?void 0:y.id});function C(){a.value=!1}function $(){var h;e.disabled||(a.value=!a.value,(h=l.value)==null||h.focus())}function p(h){var y;e.disabled||(y=s.value)==null||y.delegateKeyNavigation(h)}return{handle:l,handleId:r,menu:s,menuId:i,modelWrapper:d,selectedMenuItem:o,highlightedId:b,expanded:a,onBlur:C,currentLabel:c,rootClasses:f,onClick:$,onKeydown:p,startIcon:u,cdxIconExpand:te}}}),sn=["aria-disabled"],rn=["aria-owns","aria-labelledby","aria-activedescendant","aria-expanded"],dn=["id"];function un(e,n,l,s,r,i){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-select",e.rootClasses]),"aria-disabled":e.disabled},[t.createElementVNode("div",{ref:"handle",class:"cdx-select__handle",tabindex:"0",role:"combobox","aria-autocomplete":"list","aria-owns":e.menuId,"aria-labelledby":e.handleId,"aria-activedescendant":e.highlightedId,"aria-haspopup":"listbox","aria-expanded":e.expanded,onClick:n[0]||(n[0]=(...o)=>e.onClick&&e.onClick(...o)),onBlur:n[1]||(n[1]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[2]||(n[2]=(...o)=>e.onKeydown&&e.onKeydown(...o))},[t.createElementVNode("span",{id:e.handleId,role:"textbox","aria-readonly":"true"},[t.renderSlot(e.$slots,"label",{selectedMenuItem:e.selectedMenuItem,defaultLabel:e.defaultLabel},()=>[t.createTextVNode(t.toDisplayString(e.currentLabel),1)])],8,dn),e.startIcon?(t.openBlock(),t.createBlock(a,{key:0,icon:e.startIcon,class:"cdx-select__start-icon"},null,8,["icon"])):t.createCommentVNode("",!0),t.createVNode(a,{icon:e.cdxIconExpand,class:"cdx-select__indicator"},null,8,["icon"])],40,rn),t.createVNode(d,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[3]||(n[3]=o=>e.modelWrapper=o),expanded:e.expanded,"onUpdate:expanded":n[4]||(n[4]=o=>e.expanded=o),"menu-items":e.menuItems},e.menuConfig),{default:t.withCtx(({menuItem:o})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:o})]),_:3},16,["id","selected","expanded","menu-items"])],10,sn)}var cn=S(an,[["render",un]]),Co="";const pn=t.defineComponent({name:"CdxTab",props:{name:{type:String,required:!0},label:{type:String,default:""},disabled:{type:Boolean,default:!1}},setup(e){const n=t.inject(Z),l=t.inject(ee);if(!n||!l)throw new Error("Tab component must be used inside a Tabs component");const s=n.value.get(e.name)||{},r=t.computed(()=>e.name===l.value);return{tab:s,isActive:r}}}),mn=["id","aria-hidden","aria-labelledby"];function fn(e,n,l,s,r,i){return t.withDirectives((t.openBlock(),t.createElementBlock("section",{id:e.tab.id,"aria-hidden":!e.isActive,"aria-labelledby":`${e.tab.id}-label`,class:"cdx-tab",role:"tabpanel",tabindex:"-1"},[t.renderSlot(e.$slots,"default")],8,mn)),[[t.vShow,e.isActive]])}var hn=S(pn,[["render",fn]]);function Y(e,n){const l=t.ref(!1);let s=!1;if(typeof window!="object"||!("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype))return l;const r=new window.IntersectionObserver(i=>{const a=i[0];a&&(l.value=a.isIntersecting)},n);return t.onMounted(()=>{s=!0,e.value&&r.observe(e.value)}),t.onUnmounted(()=>{s=!1,r.disconnect()}),t.watch(e,i=>{!s||(r.disconnect(),l.value=!1,i&&r.observe(i))}),l}var Bo="";const gn=t.defineComponent({name:"CdxTabs",components:{CdxButton:P,CdxIcon:R},props:{active:{type:String,required:!0},framed:{type:Boolean,default:!1}},emits:["update:active"],expose:["select","next","prev"],setup(e,{slots:n,emit:l}){const s=t.ref(),r=t.ref(),i=t.ref(),a=t.ref(),d=t.ref(),o=J(s),c=t.computed(()=>{var A;const B=[],w=(A=n.default)==null?void 0:A.call(n);w&&w.forEach(I);function I(_){_&&typeof _=="object"&&"type"in _&&(typeof _.type=="object"&&"name"in _.type&&_.type.name==="CdxTab"?B.push(_):"children"in _&&Array.isArray(_.children)&&_.children.forEach(I))}return B});if(!c.value||c.value.length===0)throw new Error("Slot content cannot be empty");const u=t.computed(()=>c.value.reduce((B,w)=>{var I;if(((I=w.props)==null?void 0:I.name)&&typeof w.props.name=="string"){if(B.get(w.props.name))throw new Error("Tab names must be unique");B.set(w.props.name,{name:w.props.name,id:T(w.props.name),label:w.props.label||w.props.name,disabled:w.props.disabled})}return B},new Map)),f=F(t.toRef(e,"active"),l,"update:active"),b=t.computed(()=>Array.from(u.value.keys())),C=t.computed(()=>b.value.indexOf(f.value)),$=t.computed(()=>{var B;return(B=u.value.get(f.value))==null?void 0:B.id});t.provide(ee,f),t.provide(Z,u);const p=t.ref(),h=t.ref(),y=Y(p,{threshold:.95}),V=Y(h,{threshold:.95});function E(B,w){const I=B;I&&(w===0?p.value=I:w===b.value.length-1&&(h.value=I))}function v(B){var A;const w=B===f.value,I=!!((A=u.value.get(B))==null?void 0:A.disabled);return{"cdx-tabs__list__item--selected":w,"cdx-tabs__list__item--enabled":!I,"cdx-tabs__list__item--disabled":I}}const M=t.computed(()=>({"cdx-tabs--framed":e.framed,"cdx-tabs--quiet":!e.framed}));function k(B){if(!r.value||!a.value||!d.value)return 0;const w=o.value==="rtl"?d.value:a.value,I=o.value==="rtl"?a.value:d.value,A=B.offsetLeft,_=A+B.clientWidth,L=r.value.scrollLeft+w.clientWidth,Q=r.value.scrollLeft+r.value.clientWidth-I.clientWidth;return A<L?A-L:_>Q?_-Q:0}function U(B){var _;if(!r.value||!a.value||!d.value)return;const w=B==="next"&&o.value==="ltr"||B==="prev"&&o.value==="rtl"?1:-1;let I=0,A=B==="next"?r.value.firstElementChild:r.value.lastElementChild;for(;A;){const L=B==="next"?A.nextElementSibling:A.previousElementSibling;if(I=k(A),Math.sign(I)===w){L&&Math.abs(I)<.25*r.value.clientWidth&&(I=k(L));break}A=L}r.value.scrollBy({left:I,behavior:"smooth"}),(_=i.value)==null||_.focus()}return t.watch(f,()=>{if($.value===void 0||!r.value||!a.value||!d.value)return;const B=document.getElementById(`${$.value}-label`);!B||r.value.scrollBy({left:k(B),behavior:"smooth"})}),{activeTab:f,activeTabIndex:C,activeTabId:$,currentDirection:o,rootElement:s,listElement:r,focusHolder:i,prevScroller:a,nextScroller:d,rootClasses:M,tabNames:b,tabsData:u,firstLabelVisible:y,lastLabelVisible:V,getLabelClasses:v,assignTemplateRefIfNecessary:E,scrollTabs:U,cdxIconPrevious:Ze,cdxIconNext:Ye}},methods:{select(e){const n=this.tabsData.get(e);n&&!(n==null?void 0:n.disabled)&&(this.activeTab=e)},selectNonDisabled(e,n){const l=this.tabsData.get(this.tabNames[e+n]);l&&(l.disabled?this.selectNonDisabled(e+n,n):this.select(l.name))},next(){this.selectNonDisabled(this.activeTabIndex,1)},prev(){this.selectNonDisabled(this.activeTabIndex,-1)},onLeftArrowKeypress(){this.currentDirection==="rtl"?this.next():this.prev()},onRightArrowKeypress(){this.currentDirection==="rtl"?this.prev():this.next()},onDownArrowKeypress(){var e;this.activeTabId&&((e=document.getElementById(this.activeTabId))==null||e.focus())}}}),bn={ref:"focusHolder",tabindex:"-1"},yn={ref:"prevScroller",class:"cdx-tabs__prev-scroller"},Cn=["aria-activedescendant"],Bn=["id"],kn=["href","aria-selected","onClick","onKeyup"],_n={ref:"nextScroller",class:"cdx-tabs__next-scroller"},$n={class:"cdx-tabs__content"};function wn(e,n,l,s,r,i){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",{ref:"rootElement",class:t.normalizeClass(["cdx-tabs",e.rootClasses])},[t.createElementVNode("div",{class:"cdx-tabs__header",tabindex:"0",onKeydown:[n[4]||(n[4]=t.withKeys(t.withModifiers((...o)=>e.onRightArrowKeypress&&e.onRightArrowKeypress(...o),["prevent"]),["right"])),n[5]||(n[5]=t.withKeys(t.withModifiers((...o)=>e.onDownArrowKeypress&&e.onDownArrowKeypress(...o),["prevent"]),["down"])),n[6]||(n[6]=t.withKeys(t.withModifiers((...o)=>e.onLeftArrowKeypress&&e.onLeftArrowKeypress(...o),["prevent"]),["left"]))]},[t.createElementVNode("div",bn,null,512),t.withDirectives(t.createElementVNode("div",yn,[t.createVNode(d,{class:"cdx-tabs__scroll-button",type:"quiet",tabindex:"-1",onMousedown:n[0]||(n[0]=t.withModifiers(()=>{},["prevent"])),onClick:n[1]||(n[1]=o=>e.scrollTabs("prev"))},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconPrevious},null,8,["icon"])]),_:1})],512),[[t.vShow,!e.firstLabelVisible]]),t.createElementVNode("ul",{ref:"listElement",class:"cdx-tabs__list",role:"tablist","aria-activedescendant":e.activeTabId},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tabsData.values(),(o,c)=>(t.openBlock(),t.createElementBlock("li",{id:`${o.id}-label`,key:c,ref_for:!0,ref:u=>e.assignTemplateRefIfNecessary(u,c),class:t.normalizeClass([e.getLabelClasses(o.name),"cdx-tabs__list__item"]),role:"presentation"},[t.createElementVNode("a",{href:`#${o.id}`,role:"tab",tabIndex:"-1","aria-selected":o.name===e.activeTab,onClick:t.withModifiers(u=>e.select(o.name),["prevent"]),onKeyup:t.withKeys(u=>e.select(o.name),["enter"])},t.toDisplayString(o.label),41,kn)],10,Bn))),128))],8,Cn),t.withDirectives(t.createElementVNode("div",_n,[t.createVNode(d,{class:"cdx-tabs__scroll-button",type:"quiet",tabindex:"-1",onMousedown:n[2]||(n[2]=t.withModifiers(()=>{},["prevent"])),onClick:n[3]||(n[3]=o=>e.scrollTabs("next"))},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconNext},null,8,["icon"])]),_:1})],512),[[t.vShow,!e.lastLabelVisible]])],32),t.createElementVNode("div",$n,[t.renderSlot(e.$slots,"default")])],2)}var In=S(gn,[["render",wn]]),ko="";const An=t.defineComponent({name:"CdxToggleButton",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},quiet:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n}){return{rootClasses:t.computed(()=>({"cdx-toggle-button--quiet":e.quiet,"cdx-toggle-button--framed":!e.quiet,"cdx-toggle-button--toggled-on":e.modelValue,"cdx-toggle-button--toggled-off":!e.modelValue})),onClick:()=>{n("update:modelValue",!e.modelValue)}}}}),Sn=["aria-pressed","disabled"];function En(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["cdx-toggle-button",e.rootClasses]),"aria-pressed":e.modelValue,disabled:e.disabled,onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a))},[t.renderSlot(e.$slots,"default")],10,Sn)}var xn=S(An,[["render",En]]),_o="";const Vn=t.defineComponent({name:"CdxToggleSwitch",inheritAttrs:!1,props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{attrs:n,emit:l}){const s=t.ref(),r=T("toggle-switch"),{rootClasses:i,rootStyle:a,otherAttrs:d}=z(n),o=F(t.toRef(e,"modelValue"),l);return{input:s,inputId:r,rootClasses:i,rootStyle:a,otherAttrs:d,wrappedModel:o,clickInput:()=>{s.value.click()}}}}),Mn=["for"],vn=["id","disabled"],Dn={key:0,class:"cdx-toggle-switch__label-content"},Nn=t.createElementVNode("span",{class:"cdx-toggle-switch__switch"},[t.createElementVNode("span",{class:"cdx-toggle-switch__switch__grip"})],-1);function Fn(e,n,l,s,r,i){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["cdx-toggle-switch",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("label",{for:e.inputId,class:"cdx-toggle-switch__label"},[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:e.inputId,ref:"input","onUpdate:modelValue":n[0]||(n[0]=a=>e.wrappedModel=a),class:"cdx-toggle-switch__input",type:"checkbox",disabled:e.disabled},e.otherAttrs,{onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers((...a)=>e.clickInput&&e.clickInput(...a),["prevent"]),["enter"]))}),null,16,vn),[[t.vModelCheckbox,e.wrappedModel]]),e.$slots.default?(t.openBlock(),t.createElementBlock("span",Dn,[t.renderSlot(e.$slots,"default")])):t.createCommentVNode("",!0),Nn],8,Mn)],6)}var Tn=S(Vn,[["render",Fn]]),$o="";const Ln=t.defineComponent({name:"CdxTypeaheadSearch",components:{CdxIcon:R,CdxMenu:O,CdxSearchInput:ie},inheritAttrs:!1,props:{id:{type:String,required:!0},formAction:{type:String,required:!0},searchResultsLabel:{type:String,required:!0},searchResults:{type:Array,required:!0},buttonLabel:{type:String,default:""},initialInputValue:{type:String,default:""},searchFooterUrl:{type:String,default:""},debounceInterval:{type:Number,default:Ce},highlightQuery:{type:Boolean,default:!1},showThumbnail:{type:Boolean,default:!1},autoExpandWidth:{type:Boolean,default:!1}},emits:["input","search-result-click","submit"],setup(e,{attrs:n,emit:l,slots:s}){const{searchResults:r,searchFooterUrl:i,debounceInterval:a}=t.toRefs(e),d=t.ref(),o=t.ref(),c=T("typeahead-search-menu"),u=t.ref(!1),f=t.ref(!1),b=t.ref(!1),C=t.ref(!1),$=t.ref(e.initialInputValue),p=t.ref(""),h=t.computed(()=>{var g,D;return(D=(g=o.value)==null?void 0:g.getHighlightedMenuItem())==null?void 0:D.id}),y=t.ref(null),V=t.computed(()=>({"cdx-typeahead-search__menu-message--with-thumbnail":e.showThumbnail})),E=t.computed(()=>e.searchResults.find(g=>g.value===y.value)),v=t.computed(()=>i.value?r.value.concat([{value:q,url:i.value}]):r.value),M=t.computed(()=>({"cdx-typeahead-search--active":C.value,"cdx-typeahead-search--show-thumbnail":e.showThumbnail,"cdx-typeahead-search--expanded":u.value,"cdx-typeahead-search--auto-expand-width":e.showThumbnail&&e.autoExpandWidth})),{rootClasses:k,rootStyle:U,otherAttrs:B}=z(n,M);function w(g){return g}const I=t.computed(()=>({showThumbnail:e.showThumbnail,boldLabel:!0,hideDescriptionOverflow:!0}));let A,_;function L(g,D=!1){E.value&&E.value.label!==g&&E.value.value!==g&&(y.value=null),_!==void 0&&(clearTimeout(_),_=void 0),g===""?u.value=!1:(f.value=!0,s["search-results-pending"]&&(_=setTimeout(()=>{C.value&&(u.value=!0),b.value=!0},Be))),A!==void 0&&(clearTimeout(A),A=void 0);const K=()=>{l("input",g)};D?K():A=setTimeout(()=>{K()},a.value)}function Q(g){if(g===q){y.value=null,$.value=p.value;return}y.value=g,g!==null&&($.value=E.value?E.value.label||String(E.value.value):"")}function Wn(){C.value=!0,(p.value||b.value)&&(u.value=!0)}function Qn(){C.value=!1,u.value=!1}function de(g){const ue=g,{id:D}=ue,K=G(ue,["id"]),Yn={searchResult:K.value!==q?K:null,index:v.value.findIndex(Zn=>Zn.value===g.value),numberOfResults:r.value.length};l("search-result-click",Yn)}function jn(g){if(g.value===q){$.value=p.value;return}$.value=g.value?g.label||String(g.value):""}function Gn(g){var D;u.value=!1,(D=o.value)==null||D.clearActive(),de(g)}function Jn(){let g=null,D=-1;E.value&&(g=E.value,D=e.searchResults.indexOf(E.value));const K={searchResult:g,index:D,numberOfResults:r.value.length};l("submit",K)}function Xn(g){if(!o.value||!p.value||g.key===" "&&u.value)return;const D=o.value.getHighlightedMenuItem();switch(g.key){case"Enter":D&&(D.value===q?window.location.assign(i.value):o.value.delegateKeyNavigation(g,!1)),u.value=!1;break;case"Tab":u.value=!1;break;default:o.value.delegateKeyNavigation(g);break}}return t.onMounted(()=>{e.initialInputValue&&L(e.initialInputValue,!0)}),t.watch(t.toRef(e,"searchResults"),g=>{p.value=$.value.trim(),C.value&&f.value&&g.length>0&&(u.value=!0),_!==void 0&&(clearTimeout(_),_=void 0),f.value=!1,b.value=!1}),{form:d,menu:o,menuId:c,highlightedId:h,selection:y,menuMessageClass:V,searchResultsWithFooter:v,asSearchResult:w,inputValue:$,searchQuery:p,expanded:u,showPending:b,rootClasses:k,rootStyle:U,otherAttrs:B,menuConfig:I,onUpdateInputValue:L,onUpdateMenuSelection:Q,onFocus:Wn,onBlur:Qn,onSearchResultClick:de,onSearchResultKeyboardNavigation:jn,onSearchFooterClick:Gn,onSubmit:Jn,onKeydown:Xn,MenuFooterValue:q,articleIcon:He}},methods:{focus(){this.$refs.searchInput.focus()}}}),Rn=["id","action"],zn={class:"cdx-typeahead-search__menu-message__text"},Kn={class:"cdx-typeahead-search__menu-message__text"},qn=["href","onClickCapture"],Un={class:"cdx-typeahead-search__search-footer__text"},Pn={class:"cdx-typeahead-search__search-footer__query"};function On(e,n,l,s,r,i){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-menu"),o=t.resolveComponent("cdx-search-input");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-typeahead-search",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("form",{id:e.id,ref:"form",class:"cdx-typeahead-search__form",action:e.formAction,onSubmit:n[3]||(n[3]=(...c)=>e.onSubmit&&e.onSubmit(...c))},[t.createVNode(o,t.mergeProps({ref:"searchInput",modelValue:e.inputValue,"onUpdate:modelValue":n[2]||(n[2]=c=>e.inputValue=c),"button-label":e.buttonLabel},e.otherAttrs,{class:"cdx-typeahead-search__input",name:"search",role:"combobox",autocomplete:"off","aria-autocomplete":"list","aria-owns":e.menuId,"aria-expanded":e.expanded,"aria-activedescendant":e.highlightedId,autocapitalize:"off","onUpdate:modelValue":e.onUpdateInputValue,onFocus:e.onFocus,onBlur:e.onBlur,onKeydown:e.onKeydown}),{default:t.withCtx(()=>[t.createVNode(d,t.mergeProps({id:e.menuId,ref:"menu",expanded:e.expanded,"onUpdate:expanded":n[0]||(n[0]=c=>e.expanded=c),"show-pending":e.showPending,selected:e.selection,"menu-items":e.searchResultsWithFooter,"search-query":e.highlightQuery?e.searchQuery:"","show-no-results-slot":e.searchQuery.length>0&&e.searchResults.length===0},e.menuConfig,{"aria-label":e.searchResultsLabel,"onUpdate:selected":e.onUpdateMenuSelection,onMenuItemClick:n[1]||(n[1]=c=>e.onSearchResultClick(e.asSearchResult(c))),onMenuItemKeyboardNavigation:e.onSearchResultKeyboardNavigation}),{pending:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["cdx-typeahead-search__menu-message",e.menuMessageClass])},[t.createElementVNode("span",zn,[t.renderSlot(e.$slots,"search-results-pending")])],2)]),"no-results":t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["cdx-typeahead-search__menu-message",e.menuMessageClass])},[t.createElementVNode("span",Kn,[t.renderSlot(e.$slots,"search-no-results-text")])],2)]),default:t.withCtx(({menuItem:c,active:u})=>[c.value===e.MenuFooterValue?(t.openBlock(),t.createElementBlock("a",{key:0,class:t.normalizeClass(["cdx-typeahead-search__search-footer",{"cdx-typeahead-search__search-footer__active":u}]),href:e.asSearchResult(c).url,onClickCapture:t.withModifiers(f=>e.onSearchFooterClick(e.asSearchResult(c)),["stop"])},[t.createVNode(a,{class:"cdx-typeahead-search__search-footer__icon",icon:e.articleIcon},null,8,["icon"]),t.createElementVNode("span",Un,[t.renderSlot(e.$slots,"search-footer-text",{searchQuery:e.searchQuery},()=>[t.createElementVNode("strong",Pn,t.toDisplayString(e.searchQuery),1)])])],42,qn)):t.createCommentVNode("",!0)]),_:3},16,["id","expanded","show-pending","selected","menu-items","search-query","show-no-results-slot","aria-label","onUpdate:selected","onMenuItemKeyboardNavigation"])]),_:3},16,["modelValue","button-label","aria-owns","aria-expanded","aria-activedescendant","onUpdate:modelValue","onFocus","onBlur","onKeydown"]),t.renderSlot(e.$slots,"default")],40,Rn)],6)}var Hn=S(Ln,[["render",On]]);m.CdxButton=P,m.CdxCheckbox=Ve,m.CdxCombobox=zt,m.CdxIcon=R,m.CdxLookup=Ut,m.CdxMenu=O,m.CdxMenuItem=se,m.CdxMessage=Gt,m.CdxProgressBar=re,m.CdxRadio=tn,m.CdxSearchInput=ie,m.CdxSearchResultTitle=ae,m.CdxSelect=cn,m.CdxTab=hn,m.CdxTabs=In,m.CdxTextInput=W,m.CdxToggleButton=xn,m.CdxToggleSwitch=Tn,m.CdxTypeaheadSearch=Hn,m.stringHelpers=ut,m.useComputedDirection=J,m.useComputedLanguage=ne,m.useGeneratedId=T,m.useIntersectionObserver=Y,m.useModelWrapper=F,m.useSplitAttributes=z,Object.defineProperty(m,"__esModule",{value:!0}),m[Symbol.toStringTag]="Module"}); |
@@ -106,5 +106,5 @@ import { PropType } from 'vue'; | ||
disabled: boolean; | ||
indeterminate: boolean; | ||
modelValue: boolean | string[] | number[]; | ||
inputValue: string | number | boolean; | ||
indeterminate: boolean; | ||
}>; | ||
@@ -111,0 +111,0 @@ /** |
@@ -14,7 +14,7 @@ import { PropType } from 'vue'; | ||
* | ||
* Provided by `v-model` binding in the parent component. | ||
* Must be bound with `v-model:selected`. | ||
*/ | ||
modelValue: { | ||
selected: { | ||
type: PropType<string | number>; | ||
default: string; | ||
required: true; | ||
}; | ||
@@ -65,7 +65,3 @@ /** | ||
default: undefined; | ||
}; /** | ||
* When the selection value changes. | ||
* | ||
* @property {string | number} modelValue The new model value | ||
*/ | ||
}; | ||
endIcon: { | ||
@@ -116,7 +112,3 @@ type: PropType<import("@wikimedia/codex-icons").Icon | undefined>; | ||
default: undefined; | ||
}; /** | ||
* When the selection value changes. | ||
* | ||
* @property {string | number} modelValue The new model value | ||
*/ | ||
}; | ||
endIcon: { | ||
@@ -140,3 +132,3 @@ type: PropType<import("@wikimedia/codex-icons").Icon | undefined>; | ||
rootClasses: import("vue").ComputedRef<Record<string, boolean>>; | ||
rootStyle: import("vue").ComputedRef<Record<string, unknown> | undefined>; | ||
rootStyle: import("vue").ComputedRef<import("vue").StyleValue | undefined>; | ||
otherAttrs: import("vue").ComputedRef<{ | ||
@@ -146,3 +138,3 @@ [x: string]: unknown; | ||
inputClasses: import("vue").ComputedRef<{ | ||
'cdx-text-input__input--is-active': boolean; | ||
'cdx-text-input__input--has-value': boolean; | ||
}>; | ||
@@ -201,7 +193,3 @@ onClear: () => void; | ||
default: undefined; | ||
}; /** | ||
* When the selection value changes. | ||
* | ||
* @property {string | number} modelValue The new model value | ||
*/ | ||
}; | ||
endIcon: { | ||
@@ -225,3 +213,3 @@ type: PropType<import("@wikimedia/codex-icons").Icon | undefined>; | ||
rootClasses: import("vue").ComputedRef<Record<string, boolean>>; | ||
rootStyle: import("vue").ComputedRef<Record<string, unknown> | undefined>; | ||
rootStyle: import("vue").ComputedRef<import("vue").StyleValue | undefined>; | ||
otherAttrs: import("vue").ComputedRef<{ | ||
@@ -231,3 +219,3 @@ [x: string]: unknown; | ||
inputClasses: import("vue").ComputedRef<{ | ||
'cdx-text-input__input--is-active': boolean; | ||
'cdx-text-input__input--has-value': boolean; | ||
}>; | ||
@@ -240,3 +228,3 @@ onClear: () => void; | ||
cdxIconClear: string; | ||
}> & {} & {} & { | ||
}> & {} & { | ||
focus(): void; | ||
@@ -382,13 +370,3 @@ } & import("vue").ComponentCustomProperties) | undefined>; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -439,13 +417,3 @@ path: string; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -574,13 +542,3 @@ path: string; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -631,13 +589,3 @@ path: string; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -663,3 +611,3 @@ path: string; | ||
handleKeyNavigation: (e: KeyboardEvent, prevent?: boolean) => boolean; | ||
}> & {} & {} & { | ||
}> & {} & { | ||
getHighlightedMenuItem(): import("../../types").MenuItemDataWithId | null; | ||
@@ -680,7 +628,7 @@ clearActive(): void; | ||
rootClasses: import("vue").ComputedRef<Record<string, boolean>>; | ||
rootStyle: import("vue").ComputedRef<Record<string, unknown> | undefined>; | ||
rootStyle: import("vue").ComputedRef<import("vue").StyleValue | undefined>; | ||
otherAttrs: import("vue").ComputedRef<{ | ||
[x: string]: unknown; | ||
}>; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:selected"[], "update:selected", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
/** | ||
@@ -696,7 +644,7 @@ * Menu items. See the MenuItemData type. | ||
* | ||
* Provided by `v-model` binding in the parent component. | ||
* Must be bound with `v-model:selected`. | ||
*/ | ||
modelValue: { | ||
selected: { | ||
type: PropType<string | number>; | ||
default: string; | ||
required: true; | ||
}; | ||
@@ -720,6 +668,5 @@ /** | ||
}>> & { | ||
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; | ||
"onUpdate:selected"?: ((...args: any[]) => any) | undefined; | ||
}, { | ||
disabled: boolean; | ||
modelValue: string | number; | ||
menuConfig: MenuConfig; | ||
@@ -726,0 +673,0 @@ }>; |
@@ -7,5 +7,7 @@ import { PropType } from 'vue'; | ||
* | ||
* Provided by `v-model` binding in the parent component. | ||
* Must be bound with `v-model:selected`. | ||
* | ||
* The property should be initialized to `null` rather than using a falsy value. | ||
*/ | ||
modelValue: { | ||
selected: { | ||
type: PropType<string | number | null>; | ||
@@ -19,3 +21,3 @@ required: true; | ||
type: PropType<MenuItemData[]>; | ||
default: () => never[]; | ||
required: true; | ||
}; | ||
@@ -184,13 +186,3 @@ /** | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -241,13 +233,3 @@ path: string; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -376,13 +358,3 @@ path: string; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -433,13 +405,3 @@ path: string; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -465,3 +427,3 @@ path: string; | ||
handleKeyNavigation: (e: KeyboardEvent, prevent?: boolean) => boolean; | ||
}> & {} & {} & { | ||
}> & {} & { | ||
getHighlightedMenuItem(): import("../../types").MenuItemDataWithId | null; | ||
@@ -476,5 +438,5 @@ clearActive(): void; | ||
expanded: import("vue").Ref<boolean>; | ||
onBlur: () => void; | ||
onInputBlur: () => void; | ||
rootClasses: import("vue").ComputedRef<Record<string, boolean>>; | ||
rootStyle: import("vue").ComputedRef<Record<string, unknown> | undefined>; | ||
rootStyle: import("vue").ComputedRef<import("vue").StyleValue | undefined>; | ||
otherAttrs: import("vue").ComputedRef<{ | ||
@@ -484,11 +446,13 @@ [x: string]: unknown; | ||
onUpdateInput: (newVal: string | number) => void; | ||
onFocus: () => void; | ||
onInputFocus: () => void; | ||
onKeydown: (e: KeyboardEvent) => void; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "new-input")[], "update:modelValue" | "new-input", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "update:selected")[], "input" | "update:selected", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
/** | ||
* Value of the current selection. | ||
* | ||
* Provided by `v-model` binding in the parent component. | ||
* Must be bound with `v-model:selected`. | ||
* | ||
* The property should be initialized to `null` rather than using a falsy value. | ||
*/ | ||
modelValue: { | ||
selected: { | ||
type: PropType<string | number | null>; | ||
@@ -502,3 +466,3 @@ required: true; | ||
type: PropType<MenuItemData[]>; | ||
default: () => never[]; | ||
required: true; | ||
}; | ||
@@ -529,7 +493,6 @@ /** | ||
}>> & { | ||
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; | ||
"onNew-input"?: ((...args: any[]) => any) | undefined; | ||
onInput?: ((...args: any[]) => any) | undefined; | ||
"onUpdate:selected"?: ((...args: any[]) => any) | undefined; | ||
}, { | ||
disabled: boolean; | ||
menuItems: MenuItemData[]; | ||
menuConfig: MenuConfig; | ||
@@ -541,5 +504,5 @@ initialInputValue: string | number; | ||
* | ||
* Typical use will involve listening for `new-input` events, fetching or otherwise computing menu | ||
* Typical use will involve listening for `input` events, fetching or otherwise computing menu | ||
* items, then passing those menu items back to the Lookup for display. | ||
*/ | ||
export default _default; |
@@ -131,2 +131,3 @@ import { PropType } from 'vue'; | ||
onMouseEnter: () => void; | ||
onMouseLeave: () => void; | ||
onMouseDown: (e: MouseEvent) => void; | ||
@@ -138,4 +139,5 @@ onClick: () => void; | ||
title: import("vue").ComputedRef<string>; | ||
thumbnailBackgroundImage: import("vue").ComputedRef<string>; | ||
defaultThumbnailIcon: string; | ||
thumbnailStyle: import("vue").Ref<{}>; | ||
thumbnailLoaded: import("vue").Ref<boolean>; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
@@ -142,0 +144,0 @@ /** |
@@ -10,5 +10,7 @@ import { PropType } from 'vue'; | ||
/** | ||
* Value of the selected menu item, or null if no item is selected. | ||
* Value of the selected menu item, or undefined if no item is selected. | ||
* | ||
* Must be bound with `v-model:selected`. | ||
* | ||
* The property should be initialized to `null` rather than using a falsy value. | ||
*/ | ||
@@ -113,13 +115,3 @@ selected: { | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -170,13 +162,3 @@ path: string; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -238,5 +220,7 @@ path: string; | ||
/** | ||
* Value of the selected menu item, or null if no item is selected. | ||
* Value of the selected menu item, or undefined if no item is selected. | ||
* | ||
* Must be bound with `v-model:selected`. | ||
* | ||
* The property should be initialized to `null` rather than using a falsy value. | ||
*/ | ||
@@ -243,0 +227,0 @@ selected: { |
@@ -21,3 +21,3 @@ declare const _default: import("vue").DefineComponent<{ | ||
rootClasses: import("vue").ComputedRef<Record<string, boolean>>; | ||
rootStyle: import("vue").ComputedRef<Record<string, unknown> | undefined>; | ||
rootStyle: import("vue").ComputedRef<import("vue").StyleValue | undefined>; | ||
otherAttrs: import("vue").ComputedRef<{ | ||
@@ -24,0 +24,0 @@ [x: string]: unknown; |
@@ -15,7 +15,9 @@ import { PropType } from 'vue'; | ||
* | ||
* Provided by `v-model` binding in the parent component. | ||
* Must be bound with `v-model:selected`. | ||
* | ||
* The property should be initialized to `null` rather than using a falsy value. | ||
*/ | ||
modelValue: { | ||
selected: { | ||
type: PropType<string | number | null>; | ||
default: null; | ||
required: true; | ||
}; | ||
@@ -194,13 +196,3 @@ /** | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -251,13 +243,3 @@ path: string; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -386,13 +368,3 @@ path: string; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -443,13 +415,3 @@ path: string; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -475,3 +437,3 @@ path: string; | ||
handleKeyNavigation: (e: KeyboardEvent, prevent?: boolean) => boolean; | ||
}> & {} & {} & { | ||
}> & {} & { | ||
getHighlightedMenuItem(): import("../../types").MenuItemDataWithId | null; | ||
@@ -493,3 +455,3 @@ clearActive(): void; | ||
cdxIconExpand: string; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:selected"[], "update:selected", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
/** | ||
@@ -505,7 +467,9 @@ * Menu items. See the MenuItemData type. | ||
* | ||
* Provided by `v-model` binding in the parent component. | ||
* Must be bound with `v-model:selected`. | ||
* | ||
* The property should be initialized to `null` rather than using a falsy value. | ||
*/ | ||
modelValue: { | ||
selected: { | ||
type: PropType<string | number | null>; | ||
default: null; | ||
required: true; | ||
}; | ||
@@ -544,6 +508,5 @@ /** | ||
}>> & { | ||
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; | ||
"onUpdate:selected"?: ((...args: any[]) => any) | undefined; | ||
}, { | ||
disabled: boolean; | ||
modelValue: string | number | null; | ||
menuConfig: MenuConfig; | ||
@@ -550,0 +513,0 @@ defaultLabel: string; |
@@ -58,3 +58,3 @@ import { PropType } from 'vue'; | ||
rootClasses: import("vue").ComputedRef<Record<string, boolean>>; | ||
rootStyle: import("vue").ComputedRef<Record<string, unknown> | undefined>; | ||
rootStyle: import("vue").ComputedRef<import("vue").StyleValue | undefined>; | ||
otherAttrs: import("vue").ComputedRef<{ | ||
@@ -64,3 +64,3 @@ [x: string]: unknown; | ||
inputClasses: import("vue").ComputedRef<{ | ||
'cdx-text-input__input--is-active': boolean; | ||
'cdx-text-input__input--has-value': boolean; | ||
}>; | ||
@@ -67,0 +67,0 @@ onClear: () => void; |
@@ -22,3 +22,3 @@ declare const _default: import("vue").DefineComponent<{ | ||
rootClasses: import("vue").ComputedRef<Record<string, boolean>>; | ||
rootStyle: import("vue").ComputedRef<Record<string, unknown> | undefined>; | ||
rootStyle: import("vue").ComputedRef<import("vue").StyleValue | undefined>; | ||
otherAttrs: import("vue").ComputedRef<{ | ||
@@ -25,0 +25,0 @@ [x: string]: unknown; |
@@ -30,3 +30,3 @@ import { PropType } from 'vue'; | ||
type: PropType<SearchResult[]>; | ||
default: () => never[]; | ||
required: true; | ||
}; | ||
@@ -45,3 +45,3 @@ /** | ||
* | ||
* Triggers an initial new-input event on mount. | ||
* Triggers an initial `input` event on mount. | ||
*/ | ||
@@ -111,3 +111,5 @@ initialInputValue: { | ||
type: PropType<string | number | null>; | ||
required: true; | ||
required: true; /** | ||
* Label attribute for the list of search results. | ||
*/ | ||
}; | ||
@@ -126,10 +128,7 @@ expanded: { | ||
}; | ||
/** | ||
* Link for the final menu item. | ||
* | ||
* This will typically be a link to the search page for the current search query. | ||
*/ | ||
boldLabel: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
default: boolean; /** | ||
* Time interval for debouncing input events, in ms. | ||
*/ | ||
}; | ||
@@ -174,3 +173,5 @@ hideDescriptionOverflow: { | ||
type: PropType<string | number | null>; | ||
required: true; | ||
required: true; /** | ||
* Label attribute for the list of search results. | ||
*/ | ||
}; | ||
@@ -189,10 +190,7 @@ expanded: { | ||
}; | ||
/** | ||
* Link for the final menu item. | ||
* | ||
* This will typically be a link to the search page for the current search query. | ||
*/ | ||
boldLabel: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
default: boolean; /** | ||
* Time interval for debouncing input events, in ms. | ||
*/ | ||
}; | ||
@@ -246,13 +244,3 @@ hideDescriptionOverflow: { | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -303,13 +291,3 @@ path: string; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -373,3 +351,5 @@ path: string; | ||
type: PropType<string | number | null>; | ||
required: true; | ||
required: true; /** | ||
* Label attribute for the list of search results. | ||
*/ | ||
}; | ||
@@ -388,10 +368,7 @@ expanded: { | ||
}; | ||
/** | ||
* Link for the final menu item. | ||
* | ||
* This will typically be a link to the search page for the current search query. | ||
*/ | ||
boldLabel: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
default: boolean; /** | ||
* Time interval for debouncing input events, in ms. | ||
*/ | ||
}; | ||
@@ -445,13 +422,3 @@ hideDescriptionOverflow: { | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -502,13 +469,3 @@ path: string; | ||
} | { | ||
langCodeMap: { | ||
[x: string]: string | { | ||
path: string; | ||
} | { | ||
ltr: string | { | ||
path: string; | ||
}; | ||
shouldFlip: true; | ||
shouldFlipExceptions?: string[] | undefined; | ||
}; | ||
}; | ||
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>; | ||
default: string | { | ||
@@ -534,3 +491,3 @@ path: string; | ||
handleKeyNavigation: (e: KeyboardEvent, prevent?: boolean) => boolean; | ||
}> & {} & {} & { | ||
}> & {} & { | ||
getHighlightedMenuItem(): MenuItemDataWithId | null; | ||
@@ -553,3 +510,3 @@ clearActive(): void; | ||
rootClasses: import("vue").ComputedRef<Record<string, boolean>>; | ||
rootStyle: import("vue").ComputedRef<Record<string, unknown> | undefined>; | ||
rootStyle: import("vue").ComputedRef<import("vue").StyleValue | undefined>; | ||
otherAttrs: import("vue").ComputedRef<{ | ||
@@ -577,3 +534,3 @@ [x: string]: unknown; | ||
focus(): void; | ||
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("submit" | "new-input" | "search-result-click")[], "submit" | "new-input" | "search-result-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "submit" | "search-result-click")[], "input" | "submit" | "search-result-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
/** | ||
@@ -605,3 +562,3 @@ * ID attribute for the form. | ||
type: PropType<SearchResult[]>; | ||
default: () => never[]; | ||
required: true; | ||
}; | ||
@@ -620,3 +577,3 @@ /** | ||
* | ||
* Triggers an initial new-input event on mount. | ||
* Triggers an initial `input` event on mount. | ||
*/ | ||
@@ -668,4 +625,4 @@ initialInputValue: { | ||
}>> & { | ||
onInput?: ((...args: any[]) => any) | undefined; | ||
onSubmit?: ((...args: any[]) => any) | undefined; | ||
"onNew-input"?: ((...args: any[]) => any) | undefined; | ||
"onSearch-result-click"?: ((...args: any[]) => any) | undefined; | ||
@@ -677,3 +634,2 @@ }, { | ||
buttonLabel: string; | ||
searchResults: SearchResult[]; | ||
searchFooterUrl: string; | ||
@@ -680,0 +636,0 @@ debounceInterval: number; |
@@ -1,2 +0,2 @@ | ||
import { SetupContext, ComputedRef } from 'vue'; | ||
import { SetupContext, ComputedRef, StyleValue } from 'vue'; | ||
/** | ||
@@ -32,4 +32,4 @@ * Splits attributes so some can be applied to the root element and others to a child element. | ||
rootClasses: ComputedRef<Record<string, boolean>>; | ||
rootStyle: ComputedRef<Record<string, unknown> | undefined>; | ||
rootStyle: ComputedRef<StyleValue | undefined>; | ||
otherAttrs: ComputedRef<SetupContext['attrs']>; | ||
}; |
{ | ||
"name": "@wikimedia/codex", | ||
"version": "0.1.0-alpha.7", | ||
"version": "0.1.0-alpha.8", | ||
"description": "Codex is a toolkit for building user interfaces within the Wikimedia Design System", | ||
@@ -50,3 +50,3 @@ "keywords": [ | ||
"@vue/compiler-sfc": "^3.2.19", | ||
"@vue/test-utils": "^2.0.0-rc.19", | ||
"@vue/test-utils": "^2.0.1", | ||
"@vue/vue3-jest": "^27.0.0-alpha.1", | ||
@@ -68,4 +68,4 @@ "@wikimedia/codex-design-tokens": "*", | ||
"peerDependencies": { | ||
"vue": "^3.2.27" | ||
"vue": "^3.2.33" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
-100%408763
-0.64%7823
-1.8%