sit-onyx 1.0.0-alpha.67 → 1.0.0-alpha.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),q={key:0,class:"onyx-app__nav"},M={class:"onyx-app__page"},D={key:1,class:"onyx-app__page-overlay"},A={key:2,class:"onyx-app__app-overlay"},P=e.defineComponent({__name:"OnyxAppLayout",props:{navBarAlignment:{default:"top"}},setup(o){const n=o,t=e.useSlots();return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-app",{"onyx-app--horizontal":n.navBarAlignment==="left"}])},[e.unref(t).navBar?(e.openBlock(),e.createElementBlock("nav",q,[e.renderSlot(l.$slots,"navBar")])):e.createCommentVNode("",!0),e.createElementVNode("div",M,[e.renderSlot(l.$slots,"default")]),e.unref(t).pageOverlay?(e.openBlock(),e.createElementBlock("div",D,[e.renderSlot(l.$slots,"pageOverlay")])):e.createCommentVNode("",!0),e.unref(t).appOverlay?(e.openBlock(),e.createElementBlock("div",A,[e.renderSlot(l.$slots,"appOverlay")])):e.createCommentVNode("",!0)],2))}}),U=["cozy","default","compact"],f=o=>({densityClass:e.computed(()=>({[`onyx-density-${o.density}`]:o.density}))}),R=["innerHTML"],k=e.defineComponent({__name:"OnyxIcon",props:{icon:{},size:{default:"24px"},color:{default:"currentColor"}},setup(o){const n=o;return(t,l)=>(e.openBlock(),e.createElementBlock("figure",{class:e.normalizeClass(["onyx-icon",[n.size!=="24px"?`onyx-icon--${n.size}`:"",n.color!=="currentColor"?`onyx-icon--${n.color}`:""]]),"aria-hidden":"true",innerHTML:n.icon},null,10,R))}}),C=(o,n)=>{const t=o.__vccOpts||o;for(const[l,a]of n)t[l]=a;return t},F={},Y={class:"onyx-circle-spinner",viewBox:"0 0 50 50"},j=e.createElementVNode("circle",{class:"onyx-circle-spinner__circle",cx:"50%",cy:"50%",r:"45%"},null,-1),Z=[j];function G(o,n){return e.openBlock(),e.createElementBlock("svg",Y,Z)}const H=C(F,[["render",G]]),K={},X={class:"onyx-loading-dots"},W=e.createElementVNode("span",{class:"onyx-loading-dots__center"},null,-1),J=[W];function Q(o,n){return e.openBlock(),e.createElementBlock("div",X,J)}const ee=C(K,[["render",Q]]),x=e.defineComponent({__name:"OnyxLoadingIndicator",props:{type:{default:"dots"}},setup(o){const n=o;return(t,l)=>n.type==="circle"?(e.openBlock(),e.createBlock(H,{key:0})):n.type==="dots"?(e.openBlock(),e.createBlock(ee,{key:1})):e.createCommentVNode("",!0)}}),te={},oe={"aria-hidden":"true",class:"onyx-skeleton"};function ne(o,n){return e.openBlock(),e.createElementBlock("figure",oe)}const _=C(te,[["render",ne]]),le=["disabled","type"],ae={key:2,class:"onyx-button__label onyx-truncation-ellipsis"},re=e.defineComponent({__name:"OnyxButton",props:{density:{},label:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},type:{default:"button"},variation:{default:"primary"},mode:{default:"default"},icon:{},skeleton:{type:Boolean,default:!1}},emits:["click"],setup(o,{emit:n}){const t=o,{densityClass:l}=f(t),a=n;return(s,p)=>t.skeleton?(e.openBlock(),e.createBlock(_,{key:0,class:e.normalizeClass(["onyx-button-skeleton",e.unref(l)])},null,8,["class"])):(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(["onyx-button",`onyx-button--${t.variation}`,`onyx-button--${t.mode}`,{"onyx-button--loading":t.loading},e.unref(l)]),disabled:t.disabled||t.loading,type:t.type,onClick:p[0]||(p[0]=r=>a("click"))},[t.icon&&!t.loading?(e.openBlock(),e.createBlock(k,{key:0,icon:t.icon},null,8,["icon"])):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(x,{key:1,class:"onyx-button__loading"})):(e.openBlock(),e.createElementBlock("span",ae,e.toDisplayString(t.label),1))],10,le))}}),se=["button","submit","reset"],ce=["primary","secondary","danger"],ie=["default","outline","plain"],w=e.defineComponent({__name:"OnyxBadge",props:{density:{},variation:{default:"primary"},icon:{}},setup(o){const n=o,{densityClass:t}=f(n);return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-badge",["onyx-truncation-ellipsis","onyx-text",`onyx-badge--${n.variation}`,e.unref(t)]])},[n.icon?(e.openBlock(),e.createBlock(k,{key:0,class:"onyx-badge__icon",icon:n.icon,size:n.density==="compact"?"16px":"24px"},null,8,["icon","size"])):e.renderSlot(l.$slots,"default",{key:1})],2))}}),de="(optional)",ue={tooShort:"Please lengthen this text to {minLength} characters or more (you are currently using 1 character) | Please lengthen this text to {minLength} characters or more (you are currently using {n} characters)",tooLong:"Please shorten this text to {maxLength} characters or less (you are currently using 1 character) | Please shorten this text to {maxLength} characters or less (you are currently using {n} characters)",rangeUnderflow:"Value must be greater than or equal to {min}",rangeOverflow:"Value must be less than or equal to {max}",patternMismatch:"Please match the format requested.",valueMissing:"Please fill in this field.",stepMismatch:"Please enter a value that is a multiple of {step}.",badInput:'"{value}" does not match the expected type.',typeMismatch:{generic:'"{value}" does not match the expected type.',email:'"{value}" must be a valid email address.',number:'"{value}" must be a number.',tel:'"{value}" must be a valid phone number.',url:'"{value}" must a valid URL.'}},pe={selectAll:"Select all",currentSelection:"{n} selected"},O={optional:de,validations:ue,selections:pe},T=Symbol(),L=o=>{const n=e.computed(()=>e.unref(o==null?void 0:o.locale)??"en-US"),t=e.computed(()=>o!=null&&o.messages&&n.value in o.messages?o.messages[n.value]:O),l=e.computed(()=>(a,s={})=>{let p=$(a,t.value)??$(a,O)??"";const r=typeof s.n=="number"?s.n:void 0;return p=ye(p,r),fe(p,s)});return{locale:n,t:l}},me=(o,n)=>o.provide(T,L(n)),E=()=>e.inject(T,()=>L(),!0),$=(o,n)=>{const t=o.split(".").reduce((l,a)=>!l||typeof l=="string"?l:l[a],n);return t&&typeof t=="string"?t:void 0},ye=(o,n)=>{const t=o.split(" | ").map(a=>a.trim());if(t.length<=1)return o;let l=1;return n===0&&(l=0),n&&(n<=0||n>1)&&(l=2),t.length===2?l===1?t[0]:t[1]:t[l]},fe=(o,n)=>n?Object.entries(n).reduce((l,[a,s])=>s===void 0?l:l.replace(new RegExp(`{${a}}`,"gi"),s.toString()),o).replace(/\s?{.*}\s?/gi,""):o,b=o=>({requiredTypeClass:e.computed(()=>({[`onyx-use-${o.requiredMarker}`]:o.requiredMarker})),requiredMarkerClass:e.computed(()=>({"onyx-required-marker":o.required,"onyx-optional-marker":!o.required}))}),_e=()=>Object.entries(Object.getOwnPropertyDescriptors(ValidityState.prototype)).filter(([o,n])=>n.enumerable).map(([o])=>o),ke=o=>_e().reduce((n,t)=>(n[t]=o[t],n),{}),xe=(o,n)=>{const t=Object.entries(o).filter(([a,s])=>s!==void 0),l=Object.entries(n).filter(([a,s])=>s!==void 0);return t.length!==l.length?!1:t.every(([a,s])=>s===n[a])},g=o=>{const n=e.ref(),t=e.ref(!1);return e.watch(()=>o.props.modelValue,()=>t.value=!0,{once:!0}),{vCustomValidity:{mounted:a=>{e.watchEffect(()=>a.setCustomValidity(o.props.customError??"")),e.watch([()=>o.props.customError,()=>o.props.modelValue,t],()=>{const s=ke(a.validity);!t.value||!n.value&&s.valid||n.value&&xe(s,n.value)||(n.value=s,o.emit("validityChange",n.value))},{immediate:!0})}}}},he={class:"onyx-checkbox__container"},ve=["aria-label","title","indeterminate","disabled","required"],B=e.defineComponent({__name:"OnyxCheckbox",props:{density:{},required:{type:Boolean,default:!1},requiredMarker:{},customError:{},modelValue:{type:Boolean,default:!1},label:{},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hideLabel:{type:Boolean},truncation:{default:"ellipsis"},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","validityChange"],setup(o,{emit:n}){const t=o,l=n,a=e.computed({get:()=>t.modelValue,set:c=>l("update:modelValue",c)}),{requiredMarkerClass:s,requiredTypeClass:p}=b(t),{densityClass:r}=f(t),{vCustomValidity:d}=g({props:t,emit:l});return(c,u)=>t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-checkbox-skeleton",e.unref(r)])},[e.createVNode(_,{class:"onyx-checkbox-skeleton__input"}),t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_,{key:0,class:"onyx-checkbox-skeleton__label"}))],2)):(e.openBlock(),e.createElementBlock("label",{key:1,class:e.normalizeClass(["onyx-checkbox",[e.unref(p),e.unref(r)]])},[e.createElementVNode("div",he,[t.loading?(e.openBlock(),e.createBlock(e.unref(x),{key:0,class:"onyx-checkbox__loading",type:"circle"})):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,"onUpdate:modelValue":u[0]||(u[0]=m=>a.value=m),"aria-label":t.hideLabel?t.label:void 0,title:t.hideLabel?t.label:void 0,class:"onyx-checkbox__input",type:"checkbox",indeterminate:t.indeterminate,disabled:t.disabled,required:t.required},null,8,ve)),[[e.vModelCheckbox,a.value],[e.unref(d)]])]),t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("p",{class:e.normalizeClass(["onyx-checkbox__label",[`onyx-truncation-${t.truncation}`,t.truncation==="multiline"?e.unref(s):void 0]])},e.toDisplayString(t.label),3),t.truncation==="ellipsis"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-checkbox__marker",[e.unref(s)]])},null,2)):e.createCommentVNode("",!0)],64))],2))}}),be=["disabled"],ge={key:0,class:"onyx-checkbox-group__label"},Be=e.defineComponent({__name:"OnyxCheckboxGroup",props:{density:{},options:{},modelValue:{default:()=>[]},headline:{},direction:{default:"vertical"},withCheckAll:{type:Boolean,default:!1},checkAllLabel:{},disabled:{type:Boolean,default:!1},skeleton:{}},emits:["update:modelValue"],setup(o,{emit:n}){const t=o,{densityClass:l}=f(t),a=n,{t:s}=E(),p=(u,m)=>{const i=m?[...t.modelValue,u]:t.modelValue.filter(y=>y!==u);a("update:modelValue",i)},r=e.computed(()=>t.options.filter(u=>!u.disabled&&!u.skeleton)),d=u=>{const m=u?r.value.map(({id:i})=>i):[];a("update:modelValue",m)},c=e.computed(()=>{const u=r.value.map(({id:i})=>i),m=t.modelValue.filter(i=>u.includes(i));return!u.length||!m.length?{modelValue:!1}:m.length===u.length?{modelValue:!0}:{indeterminate:!0,modelValue:!1}});return(u,m)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["onyx-checkbox-group",e.unref(l)]),disabled:t.disabled},[t.headline?(e.openBlock(),e.createElementBlock("legend",ge,[e.createVNode(e.unref(V),{is:"h3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.headline),1)]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["onyx-checkbox-group__content",{"onyx-checkbox-group__content--horizontal":t.direction==="horizontal"}])},[t.skeleton===void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.withCheckAll?(e.openBlock(),e.createBlock(B,e.mergeProps({key:0},c.value,{label:t.checkAllLabel||e.unref(s)("selections.selectAll"),"onUpdate:modelValue":d}),null,16,["label"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,i=>(e.openBlock(),e.createBlock(B,e.mergeProps({key:i.id.toString()},i,{"model-value":t.modelValue.includes(i.id),"onUpdate:modelValue":y=>p(i.id,y)}),null,16,["model-value","onUpdate:modelValue"]))),128))],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.skeleton,i=>(e.openBlock(),e.createBlock(B,{key:i,label:`Skeleton ${i}`,skeleton:""},null,8,["label"]))),128))],2)],10,be))}}),Ce='<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 32 32"><path d="M25.899 6.1C23.166 3.367 19.583 2 16 2S8.834 3.367 6.101 6.1c-5.467 5.467-5.467 14.332 0 19.799C8.834 28.633 12.417 30 16 30s7.166-1.367 9.899-4.101c5.468-5.467 5.468-14.331 0-19.799m-1.414 18.385C22.219 26.752 19.205 28 16 28s-6.219-1.248-8.485-3.515C5.248 22.219 4 19.205 4 16s1.248-6.219 3.515-8.485C9.781 5.248 12.795 4 16 4s6.219 1.248 8.485 3.515S28 12.795 28 16s-1.248 6.219-3.515 8.485"/><path d="M20.814 9.771 16 14.586l-4.814-4.815-1.415 1.414L14.586 16l-4.815 4.814 1.415 1.415L16 17.414l4.814 4.815 1.415-1.415L17.414 16l4.815-4.815z"/></svg>',Ee={class:"onyx-empty"},Ve={class:"onyx-empty__label onyx-text onyx-truncation-multiline"},Se=e.defineComponent({__name:"OnyxEmpty",setup(o){return(n,t)=>(e.openBlock(),e.createElementBlock("div",Ee,[e.renderSlot(n.$slots,"icon",{},()=>[e.createVNode(k,{icon:e.unref(Ce),size:"48px"},null,8,["icon"])]),e.createElementVNode("div",Ve,[e.renderSlot(n.$slots,"default")])]))}}),V=e.defineComponent({__name:"OnyxHeadline",props:{is:{},monospace:{type:Boolean,default:!1}},setup(o){const n=o;return(t,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.is),{class:e.normalizeClass(["onyx-headline",`onyx-headline--${n.is}`,n.monospace?"onyx-headline--monospace":""])},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["class"]))}}),Oe=["h1","h2","h3","h4","h5","h6"],$e=["12px","16px","24px","32px","48px","64px","96px"],Ne=["aria-label","title","disabled"],we=e.defineComponent({__name:"OnyxIconButton",props:{density:{},label:{},disabled:{type:Boolean,default:!1},type:{default:"button"},variation:{default:"primary"},loading:{type:Boolean},icon:{}},emits:["click"],setup(o,{emit:n}){const t=o,{densityClass:l}=f(t),a=n;return(s,p)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["onyx-icon-button",[`onyx-icon-button--${t.variation}`,{"onyx-icon-button--loading":t.loading},e.unref(l)]]),"aria-label":t.label,title:t.label,disabled:t.disabled||t.loading,onClick:p[0]||(p[0]=r=>a("click"))},[t.loading?(e.openBlock(),e.createBlock(x,{key:0,type:"circle"})):t.icon?(e.openBlock(),e.createBlock(k,{key:1,icon:t.icon},null,8,["icon"])):e.renderSlot(s.$slots,"default",{key:2})],10,Ne))}}),Te={class:"onyx-truncation-ellipsis"},Le={class:"onyx-input__wrapper"},Ie=["placeholder","type","required","autocapitalize","autocomplete","autofocus","name","pattern","readonly","disabled","minlength","maxlength","aria-label","title"],ze={key:0,class:"onyx-input__footer onyx-text--small"},qe={key:0,class:"onyx-truncation-ellipsis"},Me={key:1,class:"onyx-input__counter"},De=e.defineComponent({__name:"OnyxInput",props:{density:{},required:{type:Boolean,default:!1},requiredMarker:{},customError:{},label:{},modelValue:{default:""},type:{default:"text"},placeholder:{},autocapitalize:{default:"sentences"},autocomplete:{},autofocus:{type:Boolean},name:{},pattern:{},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},maxlength:{},minlength:{},withCounter:{type:Boolean},message:{},hideLabel:{type:Boolean}},emits:["update:modelValue","change","focus","blur","validityChange"],setup(o,{emit:n}){const t=o,l=n,{vCustomValidity:a}=g({props:t,emit:l}),{requiredMarkerClass:s,requiredTypeClass:p}=b(t),{densityClass:r}=f(t),d=e.computed({get:()=>t.modelValue,set:i=>l("update:modelValue",i)}),c=i=>{const y=i.target.value;l("change",y)},u=e.computed(()=>t.pattern instanceof RegExp?t.pattern.source:t.pattern),m=e.computed(()=>t.withCounter&&t.maxlength);return(i,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-input",e.unref(p),e.unref(r)])},[e.createElementVNode("label",null,[t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-input__label","onyx-text--small",e.unref(s)])},[e.createElementVNode("div",Te,e.toDisplayString(t.label),1)],2)),e.createElementVNode("div",Le,[t.loading?(e.openBlock(),e.createBlock(x,{key:0,class:"onyx-input__loading",type:"circle"})):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=h=>d.value=h),class:"onyx-input__native",placeholder:t.placeholder,type:t.type,required:t.required,autocapitalize:t.autocapitalize,autocomplete:t.autocomplete,autofocus:t.autofocus,name:t.name,pattern:u.value,readonly:t.readonly,disabled:t.disabled||t.loading,minlength:t.minlength,maxlength:t.maxlength,"aria-label":t.hideLabel?t.label:void 0,title:t.hideLabel?t.label:void 0,onChange:c,onFocus:y[1]||(y[1]=h=>l("focus")),onBlur:y[2]||(y[2]=h=>l("blur"))},null,40,Ie),[[e.vModelDynamic,d.value],[e.unref(a)]])])]),t.message||m.value?(e.openBlock(),e.createElementBlock("div",ze,[t.message?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(t.message),1)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("span",Me,e.toDisplayString(d.value.length)+"/"+e.toDisplayString(t.maxlength),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),Ae=["email","password","search","tel","text","url"],Pe=["none","sentences","words","characters"],Ue='<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 32 32"><path d="M12.2 10.55v2h5.836l-8.193 8.193 1.414 1.414 8.193-8.193V19.8h2v-9.25z"/></svg>',Re=o=>/^http(s?):\/\//.test(o),Fe=["href","target","rel"],Ye=e.defineComponent({__name:"OnyxLink",props:{href:{},target:{default:"_self"},withExternalIcon:{type:[Boolean,String],default:"auto"}},emits:["click"],setup(o,{emit:n}){const t=o,l=n,a=e.computed(()=>t.withExternalIcon!=="auto"?t.withExternalIcon:Re(t.href));return(s,p)=>(e.openBlock(),e.createElementBlock("a",{class:"onyx-link",href:t.href,target:t.target,rel:t.target==="_blank"?"noreferrer":void 0,onClick:p[0]||(p[0]=r=>l("click"))},[e.renderSlot(s.$slots,"default"),a.value?(e.openBlock(),e.createBlock(k,{key:0,class:"onyx-link__icon",icon:e.unref(Ue),size:"16px"},null,8,["icon"])):e.createCommentVNode("",!0)],8,Fe))}}),je=["_self","_blank","_parent","_top"],I=o=>o,Ze=(()=>{let o=1;return()=>o++})(),S=o=>`${o}-${Ze()}`,Ge=I(o=>{const n=e.computed(()=>e.unref(o.multiselect)??!1),t=new Map,l=r=>(t.has(r)||t.set(r,S("listbox-option")),t.get(r)),a=e.ref(!1);e.watchEffect(()=>{var d;if(o.activeOption.value==null||!a.value&&!o.controlled)return;const r=l(o.activeOption.value);(d=document.getElementById(r))==null||d.scrollIntoView({block:"nearest",inline:"nearest"})});const s=r=>{var d,c,u,m,i,y,h,v;switch(r.key){case" ":r.preventDefault(),o.activeOption.value!=null&&((d=o.onSelect)==null||d.call(o,o.activeOption.value));break;case"ArrowUp":if(r.preventDefault(),o.activeOption.value==null){(c=o.onActivateLast)==null||c.call(o);return}(u=o.onActivatePrevious)==null||u.call(o,o.activeOption.value);break;case"ArrowDown":if(r.preventDefault(),o.activeOption.value==null){(m=o.onActivateFirst)==null||m.call(o);return}(i=o.onActivateNext)==null||i.call(o,o.activeOption.value);break;case"Home":r.preventDefault(),(y=o.onActivateFirst)==null||y.call(o);break;case"End":r.preventDefault(),(h=o.onActivateLast)==null||h.call(o);break;default:(v=o.onTypeAhead)==null||v.call(o,r.key)}};return{elements:{listbox:e.computed(()=>o.controlled?{role:"listbox","aria-multiselectable":n.value,"aria-label":e.unref(o.label),tabindex:"-1"}:{role:"listbox","aria-multiselectable":n.value,"aria-label":e.unref(o.label),tabindex:"0","aria-activedescendant":o.activeOption.value!=null?l(o.activeOption.value):void 0,onFocus:()=>a.value=!0,onBlur:()=>a.value=!1,onKeydown:s}),group:e.computed(()=>r=>({role:"group","aria-label":r.label})),option:e.computed(()=>r=>{const d=r.selected??!1;return{id:l(r.value),role:"option","aria-label":r.label,"aria-checked":n.value?d:void 0,"aria-selected":n.value?void 0:d,"aria-disabled":r.disabled,onClick:()=>{var c;return(c=o.onSelect)==null?void 0:c.call(o,r.value)}}})},state:{isFocused:a},internals:{getOptionId:l}}}),He=I(o=>{const n=S("tooltip"),t=e.ref(!1);let l;const a=e.computed(()=>{const i=e.unref(o.open);return typeof i!="object"?200:i.debounce}),s=e.computed(()=>{const i=e.unref(o.open);return typeof i!="object"?i:i.type}),p=e.computed({get:()=>t.value,set:i=>{clearTimeout(l),l=setTimeout(()=>{t.value=i},a.value)}}),r=e.computed(()=>typeof s.value=="boolean"?s.value:p.value),d=()=>{t.value=!t.value},c=e.computed(()=>{if(s.value==="hover")return{onMouseover:()=>p.value=!0,onMouseout:()=>p.value=!1,onFocusin:()=>t.value=!0,onFocusout:()=>t.value=!1}}),u=i=>{i.key==="Escape"&&(t.value=!1)},m=i=>{var v;const y=(v=document.getElementById(n))==null?void 0:v.parentElement;if(!y||!(i.target instanceof Node))return;!y.contains(i.target)&&(t.value=!1)};return e.onBeforeMount(()=>{document.addEventListener("keydown",u),e.watchEffect(()=>{s.value==="click"?document.addEventListener("click",m):document.removeEventListener("click",m)})}),e.onBeforeUnmount(()=>{document.addEventListener("keydown",u),document.addEventListener("click",m)}),{elements:{trigger:e.computed(()=>({"aria-describedby":n,onClick:s.value==="click"?d:void 0,...c.value})),tooltip:e.computed(()=>({role:"tooltip",id:n,tabindex:"-1",...c.value}))},state:{isVisible:r}}}),Ke={class:"onyx-truncation-ellipsis"},Xe=e.defineComponent({__name:"OnyxListboxOption",props:{active:{type:Boolean}},setup(o){const n=o;return(t,l)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["onyx-listbox-option",{"onyx-listbox-option--active":n.active}])},[e.createElementVNode("span",Ke,[e.renderSlot(t.$slots,"default")])],2))}}),We={class:"onyx-listbox"},Je={key:0,class:"onyx-listbox__message onyx-text--small"},Qe=e.defineComponent({__name:"OnyxListbox",props:{label:{},options:{},message:{},modelValue:{}},emits:["update:modelValue"],setup(o,{emit:n}){const t=o,l=n,a=e.ref();e.watch(()=>t.modelValue,r=>{a.value=r});const{elements:{listbox:s,option:p}}=Ge({label:e.computed(()=>t.label),selectedOption:e.computed(()=>t.modelValue),activeOption:a,onSelect:r=>{t.modelValue===r?l("update:modelValue",void 0):l("update:modelValue",r)},onActivateFirst:()=>{var r;return a.value=(r=t.options.at(0))==null?void 0:r.id},onActivateLast:()=>{var r;return a.value=(r=t.options.at(-1))==null?void 0:r.id},onActivateNext:r=>{const d=t.options.findIndex(c=>c.id===r);d<t.options.length-1&&(a.value=t.options[d+1].id)},onActivatePrevious:r=>{const d=t.options.findIndex(c=>c.id===r);d>0&&(a.value=t.options[d-1].id)},onTypeAhead:r=>{const d=t.options.find(c=>c.label.toLowerCase().trim().startsWith(r.toLowerCase()));d&&(a.value=d.id)}});return(r,d)=>(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("ul",e.mergeProps(e.unref(s),{class:"onyx-listbox__options"}),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,c=>(e.openBlock(),e.createBlock(Xe,e.mergeProps({key:c.id.toString()},e.unref(p)({value:c.id,label:c.label,disabled:c.disabled,selected:c.id===t.modelValue}),{active:c.id===a.value}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1040,["active"]))),128))],16),t.message?(e.openBlock(),e.createElementBlock("span",Je,e.toDisplayString(t.message),1)):e.createCommentVNode("",!0)]))}}),et={key:0,class:"onyx-page__sidebar"},tt={class:"onyx-page__main"},ot={key:1,class:"onyx-page__footer"},nt={key:2,class:"onyx-page__toasts"},lt=e.defineComponent({__name:"OnyxPageLayout",props:{footerAsideSidebar:{type:Boolean},hideSidebar:{type:Boolean}},setup(o){const n=o,t=e.useSlots(),l=e.computed(()=>{let a="";return!t.footer&&t.sidebar&&(a="onyx-page--side-main"),t.footer&&(!t.sidebar||n.hideSidebar)&&(a="onyx-page--main-footer"),t.footer&&t.sidebar&&(n.footerAsideSidebar?a="onyx-page--side-main-footer-partial":a="onyx-page--side-main-footer-full"),a});return(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-page",l.value])},[e.unref(t).sidebar&&!n.hideSidebar?(e.openBlock(),e.createElementBlock("aside",et,[e.renderSlot(a.$slots,"sidebar")])):e.createCommentVNode("",!0),e.createElementVNode("main",tt,[e.renderSlot(a.$slots,"default")]),e.unref(t).footer?(e.openBlock(),e.createElementBlock("footer",ot,[e.renderSlot(a.$slots,"footer")])):e.createCommentVNode("",!0),e.unref(t).toasts?(e.openBlock(),e.createElementBlock("div",nt,[e.renderSlot(a.$slots,"toasts")])):e.createCommentVNode("",!0)],2))}}),at=["title"],rt=["required","name","value","checked","disabled"],N=e.defineComponent({__name:"OnyxRadioButton",props:{id:{},label:{},value:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},truncation:{default:"ellipsis"},skeleton:{type:Boolean},density:{},customError:{},name:{},selected:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","validityChange"],setup(o,{emit:n}){const t=o,l=n,{vCustomValidity:a}=g({props:t,emit:l}),{densityClass:s}=f(t);return(p,r)=>t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-radio-button-skeleton",e.unref(s)])},[e.createVNode(_,{class:"onyx-radio-button-skeleton__input"}),e.createVNode(_,{class:"onyx-radio-button-skeleton__label"})],2)):(e.openBlock(),e.createElementBlock("label",{key:1,class:e.normalizeClass(["onyx-radio-button",e.unref(s)]),title:t.customError},[t.loading?(e.openBlock(),e.createBlock(e.unref(x),{key:0,class:"onyx-radio-button__loading",type:"circle"})):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,class:"onyx-radio-button__selector",type:"radio",required:t.required,name:t.name,value:t.id,checked:t.selected,disabled:t.disabled},null,8,rt)),[[e.unref(a)]]),e.createElementVNode("span",{class:e.normalizeClass(["onyx-radio-button__label",[`onyx-truncation-${t.truncation}`]])},e.toDisplayString(t.label),3)],10,at))}}),st=["disabled"],ct={key:0,class:"onyx-radio-button-group__headline"},it=e.defineComponent({__name:"OnyxRadioButtonGroup",props:{density:{},required:{type:Boolean,default:!1},requiredMarker:{},customError:{},name:{default:()=>S("radio-button-group-name")},modelValue:{},headline:{default:""},disabled:{type:Boolean,default:!1},direction:{default:"vertical"},options:{},skeleton:{}},emits:["update:modelValue","validityChange"],setup(o,{emit:n}){const t=o,{densityClass:l}=f(t),{requiredMarkerClass:a,requiredTypeClass:s}=b(t),p=n,r=d=>p("update:modelValue",t.options.find(({id:c})=>d.target.value===c));return(d,c)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["onyx-radio-button-group",e.unref(l),e.unref(s)]),disabled:t.disabled,onChange:c[0]||(c[0]=u=>r(u))},[t.headline?(e.openBlock(),e.createElementBlock("legend",ct,[e.createVNode(V,{is:"h3",class:e.normalizeClass(e.unref(a))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.headline),1)]),_:1},8,["class"])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["onyx-radio-button-group__content",{"onyx-radio-button-group__content--horizontal":t.direction==="horizontal"}])},[t.skeleton===void 0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.options,(u,m)=>{var i;return e.openBlock(),e.createBlock(N,e.mergeProps({key:u.id.toString()},u,{name:t.name,"custom-error":t.customError,selected:u.id===((i=t.modelValue)==null?void 0:i.id),required:t.required,onValidityChange:y=>m===0&&p("validityChange",y)}),null,16,["name","custom-error","selected","required","onValidityChange"])}),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.skeleton,u=>(e.openBlock(),e.createBlock(N,{id:`skeleton-${u}`,key:u,label:"Skeleton ${i}",name:t.name,skeleton:""},null,8,["id","name"]))),128))],2)],42,st))}}),dt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="m22.29 18.83 1.41 1.41-7.71 7.71-7.71-7.71 1.41-1.41 6.29 6.29 6.29-6.29ZM16 6.87l6.29 6.29 1.41-1.41-7.71-7.71-7.71 7.71 1.41 1.41 6.29-6.29Z"/></svg>',ut={class:"onyx-truncation-ellipsis"},pt={class:"onyx-select__wrapper"},mt=["placeholder","required","disabled","aria-label","title"],yt={key:0,class:"onyx-select__footer onyx-text--small onyx-truncation-ellipsis"},ft=e.defineComponent({__name:"OnyxSelect",props:{density:{},required:{type:Boolean},requiredMarker:{},modelValue:{},label:{},hideLabel:{type:Boolean,default:!1},disabled:{type:Boolean},skeleton:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},placeholder:{},multiple:{},message:{}},emits:["update:modelValue"],setup(o){const n=o,{t}=E(),l=e.computed(()=>{var c;if(n.multiple)return typeof n.multiple=="boolean"?"summary":((c=n.multiple)==null?void 0:c.textMode)??"summary"}),a=e.computed(()=>{if(n.modelValue&&l.value==="preview")return n.modelValue.length}),s=e.computed(()=>{if(Array.isArray(n.modelValue)){const c=n.modelValue.length;if(!c)return"";if(c===1)return n.modelValue[0];switch(l.value){case"preview":return n.modelValue.join(", ");case"summary":default:return t.value("selections.currentSelection",{n:c})}}return n.modelValue??""}),{requiredMarkerClass:p,requiredTypeClass:r}=b(n),{densityClass:d}=f(n);return(c,u)=>n.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-select-skeleton",e.unref(d)])},[n.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(_),{key:0,class:"onyx-select-skeleton__label"})),e.createVNode(e.unref(_),{class:"onyx-select-skeleton__input"})],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["onyx-select",e.unref(r),e.unref(d),n.readonly?"onyx-select--readonly":"onyx-select--editable"])},[e.createElementVNode("label",null,[n.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-select__label","onyx-text--small",e.unref(p)])},[e.createElementVNode("div",ut,e.toDisplayString(n.label),1)],2)),e.createElementVNode("div",pt,[n.loading?(e.openBlock(),e.createBlock(x,{key:0,class:"onyx-select__loading",type:"circle"})):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":u[0]||(u[0]=m=>s.value=m),class:"onyx-select__input onyx-truncation-ellipsis",placeholder:n.placeholder,type:"text",role:"presentation",required:n.required,readonly:"",disabled:n.disabled||n.loading,"aria-label":n.hideLabel?n.label:void 0,title:n.hideLabel?n.label:void 0},null,8,mt),[[e.vModelText,s.value]]),a.value?(e.openBlock(),e.createBlock(e.unref(z),{key:1,text:s.value,position:"bottom"},{default:e.withCtx(()=>[e.createVNode(e.unref(w),{class:"onyx-select__badge",variation:"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1})]),_:1},8,["text"])):e.createCommentVNode("",!0),e.createVNode(e.unref(k),{icon:e.unref(dt),class:"onyx-select__icon"},null,8,["icon"])])]),n.message?(e.openBlock(),e.createElementBlock("div",yt,e.toDisplayString(n.message),1)):e.createCommentVNode("",!0)],2))}}),_t=["summary","preview"],kt='<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 32 32"><path d="m21.311 10.793-8.293 8.293-3.291-3.292-1.415 1.415 4.706 4.705 9.707-9.707z"/></svg>',xt='<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 32 32"><path d="m22.707 10.707-1.414-1.414L16 14.586l-5.293-5.293-1.414 1.414L14.586 16l-5.293 5.293 1.414 1.414L16 17.414l5.293 5.293 1.414-1.414L17.414 16z"/></svg>',ht=["title"],vt=["aria-label","disabled","required"],bt={class:"onyx-switch__container"},gt={class:"onyx-switch__icon"},Bt=e.createElementVNode("div",{class:"onyx-switch__frame"},null,-1),Ct=e.defineComponent({__name:"OnyxSwitch",props:{density:{},required:{type:Boolean},requiredMarker:{},customError:{},modelValue:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hideLabel:{type:Boolean},truncation:{default:"ellipsis"},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","validityChange"],setup(o,{emit:n}){const t=o,l=n,{requiredMarkerClass:a,requiredTypeClass:s}=b(t),{densityClass:p}=f(t),{vCustomValidity:r}=g({props:t,emit:l}),d=e.computed({get:()=>t.modelValue,set:c=>{l("update:modelValue",c)}});return(c,u)=>t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-switch-skeleton",e.unref(p)])},[e.createVNode(_,{class:"onyx-switch-skeleton__input"}),t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_,{key:0,class:"onyx-switch-skeleton__label"}))],2)):(e.openBlock(),e.createElementBlock("label",{key:1,class:e.normalizeClass(["onyx-switch",[e.unref(s),e.unref(p)]]),title:t.hideLabel?t.label:void 0},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":u[0]||(u[0]=m=>d.value=m),type:"checkbox",role:"switch",class:e.normalizeClass({"onyx-switch__input":!0,"onyx-switch__loading":t.loading}),"aria-label":t.hideLabel?t.label:void 0,disabled:t.disabled||t.loading,required:t.required},null,10,vt),[[e.vModelCheckbox,d.value],[e.unref(r)]]),e.createElementVNode("span",bt,[e.createElementVNode("span",gt,[t.loading?(e.openBlock(),e.createBlock(e.unref(x),{key:0,class:"onyx-switch__spinner",type:"circle"})):(e.openBlock(),e.createBlock(e.unref(k),{key:1,icon:d.value?e.unref(kt):e.unref(xt),size:"24px"},null,8,["icon"]))]),Bt]),t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["onyx-switch__label",[`onyx-truncation-${t.truncation}`,e.unref(a)]])},e.toDisplayString(t.label),3))],10,ht))}}),Et={class:"onyx-tooltip-wrapper"},z=e.defineComponent({__name:"OnyxTooltip",props:{text:{},icon:{},color:{default:"neutral"},position:{default:"top"},fitParent:{type:Boolean,default:!1},open:{type:[String,Boolean,Object],default:"hover"}},setup(o){const n=o,{elements:{trigger:t,tooltip:l},state:{isVisible:a}}=He({open:e.computed(()=>n.open)});return(s,p)=>(e.openBlock(),e.createElementBlock("div",Et,[e.createElementVNode("div",e.mergeProps(e.unref(l),{class:["onyx-tooltip onyx-text--small onyx-truncation-multiline",{"onyx-tooltip--danger":n.color==="danger","onyx-tooltip--bottom":n.position==="bottom","onyx-tooltip--fit-parent":n.fitParent,"onyx-tooltip--hidden":!e.unref(a)}]}),[n.icon?(e.openBlock(),e.createBlock(k,{key:0,icon:n.icon,size:"16px"},null,8,["icon"])):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"tooltip",{},()=>[e.createElementVNode("span",null,e.toDisplayString(n.text),1)])],16),e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(t))),[e.renderSlot(s.$slots,"default")],16)]))}}),Vt=["top","bottom"],St=["primary","secondary","neutral","danger","warning","success","info"],Ot=["small","default","large"],$t=["ellipsis","multiline"],Nt=["horizontal","vertical"],wt=o=>({install:n=>{me(n,o.i18n);const t=n.runWithContext(()=>E());e.watchEffect(()=>Tt(t.t.value("optional")))}}),Tt=o=>globalThis.document.body.style.setProperty("--onyx-global-optional-text",o);exports.AUTOCAPITALIZE=Pe;exports.BUTTON_MODES=ie;exports.BUTTON_TYPES=se;exports.BUTTON_VARIATIONS=ce;exports.DENSITY=U;exports.DIRECTIONS=Nt;exports.HEADLINE_TYPES=Oe;exports.ICON_SIZES=$e;exports.INPUT_TYPES=Ae;exports.LINK_TARGETS=je;exports.MULTISELECT_TEXT_MODE=_t;exports.ONYX_COLORS=St;exports.OnyxAppLayout=P;exports.OnyxBadge=w;exports.OnyxButton=re;exports.OnyxCheckboxGroup=Be;exports.OnyxEmpty=Se;exports.OnyxHeadline=V;exports.OnyxIcon=k;exports.OnyxIconButton=we;exports.OnyxInput=De;exports.OnyxLink=Ye;exports.OnyxListbox=Qe;exports.OnyxLoadingIndicator=x;exports.OnyxPageLayout=lt;exports.OnyxRadioButtonGroup=it;exports.OnyxSelect=ft;exports.OnyxSkeleton=_;exports.OnyxSwitch=Ct;exports.OnyxTooltip=z;exports.TEXT_SIZES=Ot;exports.TOOLTIP_POSITIONS=Vt;exports.TRUNCATION_TYPES=$t;exports.createOnyx=wt;exports.useDensity=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),q={key:0,class:"onyx-app__nav"},M={class:"onyx-app__page"},D={key:1,class:"onyx-app__page-overlay"},A={key:2,class:"onyx-app__app-overlay"},P=e.defineComponent({__name:"OnyxAppLayout",props:{navBarAlignment:{default:"top"}},setup(o){const n=o,t=e.useSlots();return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-app",{"onyx-app--horizontal":n.navBarAlignment==="left"}])},[e.unref(t).navBar?(e.openBlock(),e.createElementBlock("nav",q,[e.renderSlot(l.$slots,"navBar")])):e.createCommentVNode("",!0),e.createElementVNode("div",M,[e.renderSlot(l.$slots,"default")]),e.unref(t).pageOverlay?(e.openBlock(),e.createElementBlock("div",D,[e.renderSlot(l.$slots,"pageOverlay")])):e.createCommentVNode("",!0),e.unref(t).appOverlay?(e.openBlock(),e.createElementBlock("div",A,[e.renderSlot(l.$slots,"appOverlay")])):e.createCommentVNode("",!0)],2))}}),U=["cozy","default","compact"],f=o=>({densityClass:e.computed(()=>({[`onyx-density-${o.density}`]:o.density}))}),R=["innerHTML"],k=e.defineComponent({__name:"OnyxIcon",props:{icon:{},size:{default:"24px"},color:{default:"currentColor"}},setup(o){const n=o;return(t,l)=>(e.openBlock(),e.createElementBlock("figure",{class:e.normalizeClass(["onyx-icon",[n.size!=="24px"?`onyx-icon--${n.size}`:"",n.color!=="currentColor"?`onyx-icon--${n.color}`:""]]),"aria-hidden":"true",innerHTML:n.icon},null,10,R))}}),C=(o,n)=>{const t=o.__vccOpts||o;for(const[l,a]of n)t[l]=a;return t},F={},Y={class:"onyx-circle-spinner",viewBox:"0 0 50 50"},j=e.createElementVNode("circle",{class:"onyx-circle-spinner__circle",cx:"50%",cy:"50%",r:"45%"},null,-1),Z=[j];function G(o,n){return e.openBlock(),e.createElementBlock("svg",Y,Z)}const H=C(F,[["render",G]]),K={},X={class:"onyx-loading-dots"},W=e.createElementVNode("span",{class:"onyx-loading-dots__center"},null,-1),J=[W];function Q(o,n){return e.openBlock(),e.createElementBlock("div",X,J)}const ee=C(K,[["render",Q]]),x=e.defineComponent({__name:"OnyxLoadingIndicator",props:{type:{default:"dots"}},setup(o){const n=o;return(t,l)=>n.type==="circle"?(e.openBlock(),e.createBlock(H,{key:0})):n.type==="dots"?(e.openBlock(),e.createBlock(ee,{key:1})):e.createCommentVNode("",!0)}}),te={},oe={"aria-hidden":"true",class:"onyx-skeleton"};function ne(o,n){return e.openBlock(),e.createElementBlock("figure",oe)}const _=C(te,[["render",ne]]),le=["disabled","type"],ae={key:2,class:"onyx-button__label onyx-truncation-ellipsis"},re=e.defineComponent({__name:"OnyxButton",props:{density:{},label:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},type:{default:"button"},variation:{default:"primary"},mode:{default:"default"},icon:{},skeleton:{type:Boolean,default:!1}},emits:["click"],setup(o,{emit:n}){const t=o,{densityClass:l}=f(t),a=n;return(s,p)=>t.skeleton?(e.openBlock(),e.createBlock(_,{key:0,class:e.normalizeClass(["onyx-button-skeleton",e.unref(l)])},null,8,["class"])):(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(["onyx-button",`onyx-button--${t.variation}`,`onyx-button--${t.mode}`,{"onyx-button--loading":t.loading},e.unref(l)]),disabled:t.disabled||t.loading,type:t.type,onClick:p[0]||(p[0]=r=>a("click"))},[t.icon&&!t.loading?(e.openBlock(),e.createBlock(k,{key:0,icon:t.icon},null,8,["icon"])):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(x,{key:1,class:"onyx-button__loading"})):(e.openBlock(),e.createElementBlock("span",ae,e.toDisplayString(t.label),1))],10,le))}}),se=["button","submit","reset"],ce=["primary","secondary","danger"],ie=["default","outline","plain"],w=e.defineComponent({__name:"OnyxBadge",props:{density:{},variation:{default:"primary"},icon:{}},setup(o){const n=o,{densityClass:t}=f(n);return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-badge",["onyx-truncation-ellipsis","onyx-text",`onyx-badge--${n.variation}`,e.unref(t)]])},[n.icon?(e.openBlock(),e.createBlock(k,{key:0,class:"onyx-badge__icon",icon:n.icon,size:n.density==="cozy"?"24px":"16px"},null,8,["icon","size"])):e.renderSlot(l.$slots,"default",{key:1})],2))}}),de="(optional)",ue={tooShort:"Please lengthen this text to {minLength} characters or more (you are currently using 1 character) | Please lengthen this text to {minLength} characters or more (you are currently using {n} characters)",tooLong:"Please shorten this text to {maxLength} characters or less (you are currently using 1 character) | Please shorten this text to {maxLength} characters or less (you are currently using {n} characters)",rangeUnderflow:"Value must be greater than or equal to {min}",rangeOverflow:"Value must be less than or equal to {max}",patternMismatch:"Please match the format requested.",valueMissing:"Please fill in this field.",stepMismatch:"Please enter a value that is a multiple of {step}.",badInput:'"{value}" does not match the expected type.',typeMismatch:{generic:'"{value}" does not match the expected type.',email:'"{value}" must be a valid email address.',number:'"{value}" must be a number.',tel:'"{value}" must be a valid phone number.',url:'"{value}" must a valid URL.'}},pe={selectAll:"Select all",currentSelection:"{n} selected"},O={optional:de,validations:ue,selections:pe},T=Symbol(),L=o=>{const n=e.computed(()=>e.unref(o==null?void 0:o.locale)??"en-US"),t=e.computed(()=>o!=null&&o.messages&&n.value in o.messages?o.messages[n.value]:O),l=e.computed(()=>(a,s={})=>{let p=$(a,t.value)??$(a,O)??"";const r=typeof s.n=="number"?s.n:void 0;return p=ye(p,r),fe(p,s)});return{locale:n,t:l}},me=(o,n)=>o.provide(T,L(n)),E=()=>e.inject(T,()=>L(),!0),$=(o,n)=>{const t=o.split(".").reduce((l,a)=>!l||typeof l=="string"?l:l[a],n);return t&&typeof t=="string"?t:void 0},ye=(o,n)=>{const t=o.split(" | ").map(a=>a.trim());if(t.length<=1)return o;let l=1;return n===0&&(l=0),n&&(n<=0||n>1)&&(l=2),t.length===2?l===1?t[0]:t[1]:t[l]},fe=(o,n)=>n?Object.entries(n).reduce((l,[a,s])=>s===void 0?l:l.replace(new RegExp(`{${a}}`,"gi"),s.toString()),o).replace(/\s?{.*}\s?/gi,""):o,b=o=>({requiredTypeClass:e.computed(()=>({[`onyx-use-${o.requiredMarker}`]:o.requiredMarker})),requiredMarkerClass:e.computed(()=>({"onyx-required-marker":o.required,"onyx-optional-marker":!o.required}))}),_e=()=>Object.entries(Object.getOwnPropertyDescriptors(ValidityState.prototype)).filter(([o,n])=>n.enumerable).map(([o])=>o),ke=o=>_e().reduce((n,t)=>(n[t]=o[t],n),{}),xe=(o,n)=>{const t=Object.entries(o).filter(([a,s])=>s!==void 0),l=Object.entries(n).filter(([a,s])=>s!==void 0);return t.length!==l.length?!1:t.every(([a,s])=>s===n[a])},g=o=>{const n=e.ref(),t=e.ref(!1);return e.watch(()=>o.props.modelValue,()=>t.value=!0,{once:!0}),{vCustomValidity:{mounted:a=>{e.watchEffect(()=>a.setCustomValidity(o.props.customError??"")),e.watch([()=>o.props.customError,()=>o.props.modelValue,t],()=>{const s=ke(a.validity);!t.value||!n.value&&s.valid||n.value&&xe(s,n.value)||(n.value=s,o.emit("validityChange",n.value))},{immediate:!0})}}}},he={class:"onyx-checkbox__container"},ve=["aria-label","title","indeterminate","disabled","required"],B=e.defineComponent({__name:"OnyxCheckbox",props:{density:{},required:{type:Boolean,default:!1},requiredMarker:{},customError:{},modelValue:{type:Boolean,default:!1},label:{},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hideLabel:{type:Boolean},truncation:{default:"ellipsis"},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","validityChange"],setup(o,{emit:n}){const t=o,l=n,a=e.computed({get:()=>t.modelValue,set:c=>l("update:modelValue",c)}),{requiredMarkerClass:s,requiredTypeClass:p}=b(t),{densityClass:r}=f(t),{vCustomValidity:d}=g({props:t,emit:l});return(c,u)=>t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-checkbox-skeleton",e.unref(r)])},[e.createVNode(_,{class:"onyx-checkbox-skeleton__input"}),t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_,{key:0,class:"onyx-checkbox-skeleton__label"}))],2)):(e.openBlock(),e.createElementBlock("label",{key:1,class:e.normalizeClass(["onyx-checkbox",[e.unref(p),e.unref(r)]])},[e.createElementVNode("div",he,[t.loading?(e.openBlock(),e.createBlock(e.unref(x),{key:0,class:"onyx-checkbox__loading",type:"circle"})):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,"onUpdate:modelValue":u[0]||(u[0]=m=>a.value=m),"aria-label":t.hideLabel?t.label:void 0,title:t.hideLabel?t.label:void 0,class:"onyx-checkbox__input",type:"checkbox",indeterminate:t.indeterminate,disabled:t.disabled,required:t.required},null,8,ve)),[[e.vModelCheckbox,a.value],[e.unref(d)]])]),t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("p",{class:e.normalizeClass(["onyx-checkbox__label",[`onyx-truncation-${t.truncation}`,t.truncation==="multiline"?e.unref(s):void 0]])},e.toDisplayString(t.label),3),t.truncation==="ellipsis"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-checkbox__marker",[e.unref(s)]])},null,2)):e.createCommentVNode("",!0)],64))],2))}}),be=["disabled"],ge={key:0,class:"onyx-checkbox-group__label"},Be=e.defineComponent({__name:"OnyxCheckboxGroup",props:{density:{},options:{},modelValue:{default:()=>[]},headline:{},direction:{default:"vertical"},withCheckAll:{type:Boolean,default:!1},checkAllLabel:{},disabled:{type:Boolean,default:!1},skeleton:{}},emits:["update:modelValue"],setup(o,{emit:n}){const t=o,{densityClass:l}=f(t),a=n,{t:s}=E(),p=(u,m)=>{const i=m?[...t.modelValue,u]:t.modelValue.filter(y=>y!==u);a("update:modelValue",i)},r=e.computed(()=>t.options.filter(u=>!u.disabled&&!u.skeleton)),d=u=>{const m=u?r.value.map(({id:i})=>i):[];a("update:modelValue",m)},c=e.computed(()=>{const u=r.value.map(({id:i})=>i),m=t.modelValue.filter(i=>u.includes(i));return!u.length||!m.length?{modelValue:!1}:m.length===u.length?{modelValue:!0}:{indeterminate:!0,modelValue:!1}});return(u,m)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["onyx-checkbox-group",e.unref(l)]),disabled:t.disabled},[t.headline?(e.openBlock(),e.createElementBlock("legend",ge,[e.createVNode(e.unref(V),{is:"h3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.headline),1)]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["onyx-checkbox-group__content",{"onyx-checkbox-group__content--horizontal":t.direction==="horizontal"}])},[t.skeleton===void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.withCheckAll?(e.openBlock(),e.createBlock(B,e.mergeProps({key:0},c.value,{label:t.checkAllLabel||e.unref(s)("selections.selectAll"),"onUpdate:modelValue":d}),null,16,["label"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,i=>(e.openBlock(),e.createBlock(B,e.mergeProps({key:i.id.toString()},i,{"model-value":t.modelValue.includes(i.id),"onUpdate:modelValue":y=>p(i.id,y)}),null,16,["model-value","onUpdate:modelValue"]))),128))],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.skeleton,i=>(e.openBlock(),e.createBlock(B,{key:i,label:`Skeleton ${i}`,skeleton:""},null,8,["label"]))),128))],2)],10,be))}}),Ce='<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 32 32"><path d="M25.899 6.1C23.166 3.367 19.583 2 16 2S8.834 3.367 6.101 6.1c-5.467 5.467-5.467 14.332 0 19.799C8.834 28.633 12.417 30 16 30s7.166-1.367 9.899-4.101c5.468-5.467 5.468-14.331 0-19.799m-1.414 18.385C22.219 26.752 19.205 28 16 28s-6.219-1.248-8.485-3.515C5.248 22.219 4 19.205 4 16s1.248-6.219 3.515-8.485C9.781 5.248 12.795 4 16 4s6.219 1.248 8.485 3.515S28 12.795 28 16s-1.248 6.219-3.515 8.485"/><path d="M20.814 9.771 16 14.586l-4.814-4.815-1.415 1.414L14.586 16l-4.815 4.814 1.415 1.415L16 17.414l4.814 4.815 1.415-1.415L17.414 16l4.815-4.815z"/></svg>',Ee={class:"onyx-empty"},Ve={class:"onyx-empty__label onyx-text onyx-truncation-multiline"},Se=e.defineComponent({__name:"OnyxEmpty",setup(o){return(n,t)=>(e.openBlock(),e.createElementBlock("div",Ee,[e.renderSlot(n.$slots,"icon",{},()=>[e.createVNode(k,{icon:e.unref(Ce),size:"48px"},null,8,["icon"])]),e.createElementVNode("div",Ve,[e.renderSlot(n.$slots,"default")])]))}}),V=e.defineComponent({__name:"OnyxHeadline",props:{is:{},monospace:{type:Boolean,default:!1}},setup(o){const n=o;return(t,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.is),{class:e.normalizeClass(["onyx-headline",`onyx-headline--${n.is}`,n.monospace?"onyx-headline--monospace":""])},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["class"]))}}),Oe=["h1","h2","h3","h4","h5","h6"],$e=["12px","16px","24px","32px","48px","64px","96px"],Ne=["aria-label","title","disabled"],we=e.defineComponent({__name:"OnyxIconButton",props:{density:{},label:{},disabled:{type:Boolean,default:!1},type:{default:"button"},variation:{default:"primary"},loading:{type:Boolean},icon:{}},emits:["click"],setup(o,{emit:n}){const t=o,{densityClass:l}=f(t),a=n;return(s,p)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["onyx-icon-button",[`onyx-icon-button--${t.variation}`,{"onyx-icon-button--loading":t.loading},e.unref(l)]]),"aria-label":t.label,title:t.label,disabled:t.disabled||t.loading,onClick:p[0]||(p[0]=r=>a("click"))},[t.loading?(e.openBlock(),e.createBlock(x,{key:0,type:"circle"})):t.icon?(e.openBlock(),e.createBlock(k,{key:1,icon:t.icon},null,8,["icon"])):e.renderSlot(s.$slots,"default",{key:2})],10,Ne))}}),Te={class:"onyx-truncation-ellipsis"},Le={class:"onyx-input__wrapper"},Ie=["placeholder","type","required","autocapitalize","autocomplete","autofocus","name","pattern","readonly","disabled","minlength","maxlength","aria-label","title"],ze={key:0,class:"onyx-input__footer onyx-text--small"},qe={key:0,class:"onyx-truncation-ellipsis"},Me={key:1,class:"onyx-input__counter"},De=e.defineComponent({__name:"OnyxInput",props:{density:{},required:{type:Boolean,default:!1},requiredMarker:{},customError:{},label:{},modelValue:{default:""},type:{default:"text"},placeholder:{},autocapitalize:{default:"sentences"},autocomplete:{},autofocus:{type:Boolean},name:{},pattern:{},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},maxlength:{},minlength:{},withCounter:{type:Boolean},message:{},hideLabel:{type:Boolean}},emits:["update:modelValue","change","focus","blur","validityChange"],setup(o,{emit:n}){const t=o,l=n,{vCustomValidity:a}=g({props:t,emit:l}),{requiredMarkerClass:s,requiredTypeClass:p}=b(t),{densityClass:r}=f(t),d=e.computed({get:()=>t.modelValue,set:i=>l("update:modelValue",i)}),c=i=>{const y=i.target.value;l("change",y)},u=e.computed(()=>t.pattern instanceof RegExp?t.pattern.source:t.pattern),m=e.computed(()=>t.withCounter&&t.maxlength);return(i,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-input",e.unref(p),e.unref(r)])},[e.createElementVNode("label",null,[t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-input__label","onyx-text--small",e.unref(s)])},[e.createElementVNode("div",Te,e.toDisplayString(t.label),1)],2)),e.createElementVNode("div",Le,[t.loading?(e.openBlock(),e.createBlock(x,{key:0,class:"onyx-input__loading",type:"circle"})):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=h=>d.value=h),class:"onyx-input__native",placeholder:t.placeholder,type:t.type,required:t.required,autocapitalize:t.autocapitalize,autocomplete:t.autocomplete,autofocus:t.autofocus,name:t.name,pattern:u.value,readonly:t.readonly,disabled:t.disabled||t.loading,minlength:t.minlength,maxlength:t.maxlength,"aria-label":t.hideLabel?t.label:void 0,title:t.hideLabel?t.label:void 0,onChange:c,onFocus:y[1]||(y[1]=h=>l("focus")),onBlur:y[2]||(y[2]=h=>l("blur"))},null,40,Ie),[[e.vModelDynamic,d.value],[e.unref(a)]])])]),t.message||m.value?(e.openBlock(),e.createElementBlock("div",ze,[t.message?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(t.message),1)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("span",Me,e.toDisplayString(d.value.length)+"/"+e.toDisplayString(t.maxlength),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),Ae=["email","password","search","tel","text","url"],Pe=["none","sentences","words","characters"],Ue='<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 32 32"><path d="M12.2 10.55v2h5.836l-8.193 8.193 1.414 1.414 8.193-8.193V19.8h2v-9.25z"/></svg>',Re=o=>/^http(s?):\/\//.test(o),Fe=["href","target","rel"],Ye=e.defineComponent({__name:"OnyxLink",props:{href:{},target:{default:"_self"},withExternalIcon:{type:[Boolean,String],default:"auto"}},emits:["click"],setup(o,{emit:n}){const t=o,l=n,a=e.computed(()=>t.withExternalIcon!=="auto"?t.withExternalIcon:Re(t.href));return(s,p)=>(e.openBlock(),e.createElementBlock("a",{class:"onyx-link",href:t.href,target:t.target,rel:t.target==="_blank"?"noreferrer":void 0,onClick:p[0]||(p[0]=r=>l("click"))},[e.renderSlot(s.$slots,"default"),a.value?(e.openBlock(),e.createBlock(k,{key:0,class:"onyx-link__icon",icon:e.unref(Ue),size:"16px"},null,8,["icon"])):e.createCommentVNode("",!0)],8,Fe))}}),je=["_self","_blank","_parent","_top"],I=o=>o,Ze=(()=>{let o=1;return()=>o++})(),S=o=>`${o}-${Ze()}`,Ge=I(o=>{const n=e.computed(()=>e.unref(o.multiselect)??!1),t=new Map,l=r=>(t.has(r)||t.set(r,S("listbox-option")),t.get(r)),a=e.ref(!1);e.watchEffect(()=>{var d;if(o.activeOption.value==null||!a.value&&!o.controlled)return;const r=l(o.activeOption.value);(d=document.getElementById(r))==null||d.scrollIntoView({block:"nearest",inline:"nearest"})});const s=r=>{var d,c,u,m,i,y,h,v;switch(r.key){case" ":r.preventDefault(),o.activeOption.value!=null&&((d=o.onSelect)==null||d.call(o,o.activeOption.value));break;case"ArrowUp":if(r.preventDefault(),o.activeOption.value==null){(c=o.onActivateLast)==null||c.call(o);return}(u=o.onActivatePrevious)==null||u.call(o,o.activeOption.value);break;case"ArrowDown":if(r.preventDefault(),o.activeOption.value==null){(m=o.onActivateFirst)==null||m.call(o);return}(i=o.onActivateNext)==null||i.call(o,o.activeOption.value);break;case"Home":r.preventDefault(),(y=o.onActivateFirst)==null||y.call(o);break;case"End":r.preventDefault(),(h=o.onActivateLast)==null||h.call(o);break;default:(v=o.onTypeAhead)==null||v.call(o,r.key)}};return{elements:{listbox:e.computed(()=>o.controlled?{role:"listbox","aria-multiselectable":n.value,"aria-label":e.unref(o.label),tabindex:"-1"}:{role:"listbox","aria-multiselectable":n.value,"aria-label":e.unref(o.label),tabindex:"0","aria-activedescendant":o.activeOption.value!=null?l(o.activeOption.value):void 0,onFocus:()=>a.value=!0,onBlur:()=>a.value=!1,onKeydown:s}),group:e.computed(()=>r=>({role:"group","aria-label":r.label})),option:e.computed(()=>r=>{const d=r.selected??!1;return{id:l(r.value),role:"option","aria-label":r.label,"aria-checked":n.value?d:void 0,"aria-selected":n.value?void 0:d,"aria-disabled":r.disabled,onClick:()=>{var c;return(c=o.onSelect)==null?void 0:c.call(o,r.value)}}})},state:{isFocused:a},internals:{getOptionId:l}}}),He=I(o=>{const n=S("tooltip"),t=e.ref(!1);let l;const a=e.computed(()=>{const i=e.unref(o.open);return typeof i!="object"?200:i.debounce}),s=e.computed(()=>{const i=e.unref(o.open);return typeof i!="object"?i:i.type}),p=e.computed({get:()=>t.value,set:i=>{clearTimeout(l),l=setTimeout(()=>{t.value=i},a.value)}}),r=e.computed(()=>typeof s.value=="boolean"?s.value:p.value),d=()=>{t.value=!t.value},c=e.computed(()=>{if(s.value==="hover")return{onMouseover:()=>p.value=!0,onMouseout:()=>p.value=!1,onFocusin:()=>t.value=!0,onFocusout:()=>t.value=!1}}),u=i=>{i.key==="Escape"&&(t.value=!1)},m=i=>{var v;const y=(v=document.getElementById(n))==null?void 0:v.parentElement;if(!y||!(i.target instanceof Node))return;!y.contains(i.target)&&(t.value=!1)};return e.onBeforeMount(()=>{document.addEventListener("keydown",u),e.watchEffect(()=>{s.value==="click"?document.addEventListener("click",m):document.removeEventListener("click",m)})}),e.onBeforeUnmount(()=>{document.addEventListener("keydown",u),document.addEventListener("click",m)}),{elements:{trigger:e.computed(()=>({"aria-describedby":n,onClick:s.value==="click"?d:void 0,...c.value})),tooltip:e.computed(()=>({role:"tooltip",id:n,tabindex:"-1",...c.value}))},state:{isVisible:r}}}),Ke={class:"onyx-truncation-ellipsis"},Xe=e.defineComponent({__name:"OnyxListboxOption",props:{active:{type:Boolean}},setup(o){const n=o;return(t,l)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["onyx-listbox-option",{"onyx-listbox-option--active":n.active}])},[e.createElementVNode("span",Ke,[e.renderSlot(t.$slots,"default")])],2))}}),We={class:"onyx-listbox"},Je={key:0,class:"onyx-listbox__message onyx-text--small"},Qe=e.defineComponent({__name:"OnyxListbox",props:{label:{},options:{},message:{},modelValue:{}},emits:["update:modelValue"],setup(o,{emit:n}){const t=o,l=n,a=e.ref();e.watch(()=>t.modelValue,r=>{a.value=r});const{elements:{listbox:s,option:p}}=Ge({label:e.computed(()=>t.label),selectedOption:e.computed(()=>t.modelValue),activeOption:a,onSelect:r=>{t.modelValue===r?l("update:modelValue",void 0):l("update:modelValue",r)},onActivateFirst:()=>{var r;return a.value=(r=t.options.at(0))==null?void 0:r.id},onActivateLast:()=>{var r;return a.value=(r=t.options.at(-1))==null?void 0:r.id},onActivateNext:r=>{const d=t.options.findIndex(c=>c.id===r);d<t.options.length-1&&(a.value=t.options[d+1].id)},onActivatePrevious:r=>{const d=t.options.findIndex(c=>c.id===r);d>0&&(a.value=t.options[d-1].id)},onTypeAhead:r=>{const d=t.options.find(c=>c.label.toLowerCase().trim().startsWith(r.toLowerCase()));d&&(a.value=d.id)}});return(r,d)=>(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("ul",e.mergeProps(e.unref(s),{class:"onyx-listbox__options"}),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,c=>(e.openBlock(),e.createBlock(Xe,e.mergeProps({key:c.id.toString()},e.unref(p)({value:c.id,label:c.label,disabled:c.disabled,selected:c.id===t.modelValue}),{active:c.id===a.value}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1040,["active"]))),128))],16),t.message?(e.openBlock(),e.createElementBlock("span",Je,e.toDisplayString(t.message),1)):e.createCommentVNode("",!0)]))}}),et={key:0,class:"onyx-page__sidebar"},tt={class:"onyx-page__main"},ot={key:1,class:"onyx-page__footer"},nt={key:2,class:"onyx-page__toasts"},lt=e.defineComponent({__name:"OnyxPageLayout",props:{footerAsideSidebar:{type:Boolean},hideSidebar:{type:Boolean}},setup(o){const n=o,t=e.useSlots(),l=e.computed(()=>{let a="";return!t.footer&&t.sidebar&&(a="onyx-page--side-main"),t.footer&&(!t.sidebar||n.hideSidebar)&&(a="onyx-page--main-footer"),t.footer&&t.sidebar&&(n.footerAsideSidebar?a="onyx-page--side-main-footer-partial":a="onyx-page--side-main-footer-full"),a});return(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-page",l.value])},[e.unref(t).sidebar&&!n.hideSidebar?(e.openBlock(),e.createElementBlock("aside",et,[e.renderSlot(a.$slots,"sidebar")])):e.createCommentVNode("",!0),e.createElementVNode("main",tt,[e.renderSlot(a.$slots,"default")]),e.unref(t).footer?(e.openBlock(),e.createElementBlock("footer",ot,[e.renderSlot(a.$slots,"footer")])):e.createCommentVNode("",!0),e.unref(t).toasts?(e.openBlock(),e.createElementBlock("div",nt,[e.renderSlot(a.$slots,"toasts")])):e.createCommentVNode("",!0)],2))}}),at=["title"],rt=["required","name","value","checked","disabled"],N=e.defineComponent({__name:"OnyxRadioButton",props:{id:{},label:{},value:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},truncation:{default:"ellipsis"},skeleton:{type:Boolean},density:{},customError:{},name:{},selected:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","validityChange"],setup(o,{emit:n}){const t=o,l=n,{vCustomValidity:a}=g({props:t,emit:l}),{densityClass:s}=f(t);return(p,r)=>t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-radio-button-skeleton",e.unref(s)])},[e.createVNode(_,{class:"onyx-radio-button-skeleton__input"}),e.createVNode(_,{class:"onyx-radio-button-skeleton__label"})],2)):(e.openBlock(),e.createElementBlock("label",{key:1,class:e.normalizeClass(["onyx-radio-button",e.unref(s)]),title:t.customError},[t.loading?(e.openBlock(),e.createBlock(e.unref(x),{key:0,class:"onyx-radio-button__loading",type:"circle"})):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,class:"onyx-radio-button__selector",type:"radio",required:t.required,name:t.name,value:t.id,checked:t.selected,disabled:t.disabled},null,8,rt)),[[e.unref(a)]]),e.createElementVNode("span",{class:e.normalizeClass(["onyx-radio-button__label",[`onyx-truncation-${t.truncation}`]])},e.toDisplayString(t.label),3)],10,at))}}),st=["disabled"],ct={key:0,class:"onyx-radio-button-group__headline"},it=e.defineComponent({__name:"OnyxRadioButtonGroup",props:{density:{},required:{type:Boolean,default:!1},requiredMarker:{},customError:{},name:{default:()=>S("radio-button-group-name")},modelValue:{},headline:{default:""},disabled:{type:Boolean,default:!1},direction:{default:"vertical"},options:{},skeleton:{}},emits:["update:modelValue","validityChange"],setup(o,{emit:n}){const t=o,{densityClass:l}=f(t),{requiredMarkerClass:a,requiredTypeClass:s}=b(t),p=n,r=d=>p("update:modelValue",t.options.find(({id:c})=>d.target.value===c));return(d,c)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["onyx-radio-button-group",e.unref(l),e.unref(s)]),disabled:t.disabled,onChange:c[0]||(c[0]=u=>r(u))},[t.headline?(e.openBlock(),e.createElementBlock("legend",ct,[e.createVNode(V,{is:"h3",class:e.normalizeClass(e.unref(a))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.headline),1)]),_:1},8,["class"])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["onyx-radio-button-group__content",{"onyx-radio-button-group__content--horizontal":t.direction==="horizontal"}])},[t.skeleton===void 0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.options,(u,m)=>{var i;return e.openBlock(),e.createBlock(N,e.mergeProps({key:u.id.toString()},u,{name:t.name,"custom-error":t.customError,selected:u.id===((i=t.modelValue)==null?void 0:i.id),required:t.required,onValidityChange:y=>m===0&&p("validityChange",y)}),null,16,["name","custom-error","selected","required","onValidityChange"])}),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.skeleton,u=>(e.openBlock(),e.createBlock(N,{id:`skeleton-${u}`,key:u,label:"Skeleton ${i}",name:t.name,skeleton:""},null,8,["id","name"]))),128))],2)],42,st))}}),dt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="m22.29 18.83 1.41 1.41-7.71 7.71-7.71-7.71 1.41-1.41 6.29 6.29 6.29-6.29ZM16 6.87l6.29 6.29 1.41-1.41-7.71-7.71-7.71 7.71 1.41 1.41 6.29-6.29Z"/></svg>',ut={class:"onyx-truncation-ellipsis"},pt={class:"onyx-select__wrapper"},mt=["placeholder","required","disabled","aria-label","title"],yt={key:0,class:"onyx-select__footer onyx-text--small onyx-truncation-ellipsis"},ft=e.defineComponent({__name:"OnyxSelect",props:{density:{},required:{type:Boolean},requiredMarker:{},modelValue:{},label:{},hideLabel:{type:Boolean,default:!1},disabled:{type:Boolean},skeleton:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},placeholder:{},multiple:{},message:{}},emits:["update:modelValue"],setup(o){const n=o,{t}=E(),l=e.computed(()=>{var c;if(n.multiple)return typeof n.multiple=="boolean"?"summary":((c=n.multiple)==null?void 0:c.textMode)??"summary"}),a=e.computed(()=>{if(n.modelValue&&l.value==="preview")return n.modelValue.length}),s=e.computed(()=>{if(Array.isArray(n.modelValue)){const c=n.modelValue.length;if(!c)return"";if(c===1)return n.modelValue[0];switch(l.value){case"preview":return n.modelValue.join(", ");case"summary":default:return t.value("selections.currentSelection",{n:c})}}return n.modelValue??""}),{requiredMarkerClass:p,requiredTypeClass:r}=b(n),{densityClass:d}=f(n);return(c,u)=>n.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-select-skeleton",e.unref(d)])},[n.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(_),{key:0,class:"onyx-select-skeleton__label"})),e.createVNode(e.unref(_),{class:"onyx-select-skeleton__input"})],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["onyx-select",e.unref(r),e.unref(d),n.readonly?"onyx-select--readonly":"onyx-select--editable"])},[e.createElementVNode("label",null,[n.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-select__label","onyx-text--small",e.unref(p)])},[e.createElementVNode("div",ut,e.toDisplayString(n.label),1)],2)),e.createElementVNode("div",pt,[n.loading?(e.openBlock(),e.createBlock(x,{key:0,class:"onyx-select__loading",type:"circle"})):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":u[0]||(u[0]=m=>s.value=m),class:"onyx-select__input onyx-truncation-ellipsis",placeholder:n.placeholder,type:"text",role:"presentation",required:n.required,readonly:"",disabled:n.disabled||n.loading,"aria-label":n.hideLabel?n.label:void 0,title:n.hideLabel?n.label:void 0},null,8,mt),[[e.vModelText,s.value]]),a.value?(e.openBlock(),e.createBlock(e.unref(z),{key:1,text:s.value,position:"bottom"},{default:e.withCtx(()=>[e.createVNode(e.unref(w),{class:"onyx-select__badge",variation:"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1})]),_:1},8,["text"])):e.createCommentVNode("",!0),e.createVNode(e.unref(k),{icon:e.unref(dt),class:"onyx-select__icon"},null,8,["icon"])])]),n.message?(e.openBlock(),e.createElementBlock("div",yt,e.toDisplayString(n.message),1)):e.createCommentVNode("",!0)],2))}}),_t=["summary","preview"],kt='<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 32 32"><path d="m21.311 10.793-8.293 8.293-3.291-3.292-1.415 1.415 4.706 4.705 9.707-9.707z"/></svg>',xt='<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 32 32"><path d="m22.707 10.707-1.414-1.414L16 14.586l-5.293-5.293-1.414 1.414L14.586 16l-5.293 5.293 1.414 1.414L16 17.414l5.293 5.293 1.414-1.414L17.414 16z"/></svg>',ht=["title"],vt=["aria-label","disabled","required"],bt={class:"onyx-switch__container"},gt={class:"onyx-switch__icon"},Bt=e.createElementVNode("div",{class:"onyx-switch__frame"},null,-1),Ct=e.defineComponent({__name:"OnyxSwitch",props:{density:{},required:{type:Boolean},requiredMarker:{},customError:{},modelValue:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hideLabel:{type:Boolean},truncation:{default:"ellipsis"},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","validityChange"],setup(o,{emit:n}){const t=o,l=n,{requiredMarkerClass:a,requiredTypeClass:s}=b(t),{densityClass:p}=f(t),{vCustomValidity:r}=g({props:t,emit:l}),d=e.computed({get:()=>t.modelValue,set:c=>{l("update:modelValue",c)}});return(c,u)=>t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-switch-skeleton",e.unref(p)])},[e.createVNode(_,{class:"onyx-switch-skeleton__input"}),t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_,{key:0,class:"onyx-switch-skeleton__label"}))],2)):(e.openBlock(),e.createElementBlock("label",{key:1,class:e.normalizeClass(["onyx-switch",[e.unref(s),e.unref(p)]]),title:t.hideLabel?t.label:void 0},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":u[0]||(u[0]=m=>d.value=m),type:"checkbox",role:"switch",class:e.normalizeClass({"onyx-switch__input":!0,"onyx-switch__loading":t.loading}),"aria-label":t.hideLabel?t.label:void 0,disabled:t.disabled||t.loading,required:t.required},null,10,vt),[[e.vModelCheckbox,d.value],[e.unref(r)]]),e.createElementVNode("span",bt,[e.createElementVNode("span",gt,[t.loading?(e.openBlock(),e.createBlock(e.unref(x),{key:0,class:"onyx-switch__spinner",type:"circle"})):(e.openBlock(),e.createBlock(e.unref(k),{key:1,icon:d.value?e.unref(kt):e.unref(xt),size:"24px"},null,8,["icon"]))]),Bt]),t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["onyx-switch__label",[`onyx-truncation-${t.truncation}`,e.unref(a)]])},e.toDisplayString(t.label),3))],10,ht))}}),Et={class:"onyx-tooltip-wrapper"},z=e.defineComponent({__name:"OnyxTooltip",props:{text:{},icon:{},color:{default:"neutral"},position:{default:"top"},fitParent:{type:Boolean,default:!1},open:{type:[String,Boolean,Object],default:"hover"}},setup(o){const n=o,{elements:{trigger:t,tooltip:l},state:{isVisible:a}}=He({open:e.computed(()=>n.open)});return(s,p)=>(e.openBlock(),e.createElementBlock("div",Et,[e.createElementVNode("div",e.mergeProps(e.unref(l),{class:["onyx-tooltip onyx-text--small onyx-truncation-multiline",{"onyx-tooltip--danger":n.color==="danger","onyx-tooltip--bottom":n.position==="bottom","onyx-tooltip--fit-parent":n.fitParent,"onyx-tooltip--hidden":!e.unref(a)}]}),[n.icon?(e.openBlock(),e.createBlock(k,{key:0,icon:n.icon,size:"16px"},null,8,["icon"])):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"tooltip",{},()=>[e.createElementVNode("span",null,e.toDisplayString(n.text),1)])],16),e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(t))),[e.renderSlot(s.$slots,"default")],16)]))}}),Vt=["top","bottom"],St=["primary","secondary","neutral","danger","warning","success","info"],Ot=["small","default","large"],$t=["ellipsis","multiline"],Nt=["horizontal","vertical"],wt=o=>({install:n=>{me(n,o.i18n);const t=n.runWithContext(()=>E());e.watchEffect(()=>Tt(t.t.value("optional")))}}),Tt=o=>globalThis.document.body.style.setProperty("--onyx-global-optional-text",o);exports.AUTOCAPITALIZE=Pe;exports.BUTTON_MODES=ie;exports.BUTTON_TYPES=se;exports.BUTTON_VARIATIONS=ce;exports.DENSITY=U;exports.DIRECTIONS=Nt;exports.HEADLINE_TYPES=Oe;exports.ICON_SIZES=$e;exports.INPUT_TYPES=Ae;exports.LINK_TARGETS=je;exports.MULTISELECT_TEXT_MODE=_t;exports.ONYX_COLORS=St;exports.OnyxAppLayout=P;exports.OnyxBadge=w;exports.OnyxButton=re;exports.OnyxCheckboxGroup=Be;exports.OnyxEmpty=Se;exports.OnyxHeadline=V;exports.OnyxIcon=k;exports.OnyxIconButton=we;exports.OnyxInput=De;exports.OnyxLink=Ye;exports.OnyxListbox=Qe;exports.OnyxLoadingIndicator=x;exports.OnyxPageLayout=lt;exports.OnyxRadioButtonGroup=it;exports.OnyxSelect=ft;exports.OnyxSkeleton=_;exports.OnyxSwitch=Ct;exports.OnyxTooltip=z;exports.TEXT_SIZES=Ot;exports.TOOLTIP_POSITIONS=Vt;exports.TRUNCATION_TYPES=$t;exports.createOnyx=wt;exports.useDensity=f;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as k, useSlots as X, openBlock as l, createElementBlock as c, normalizeClass as x, unref as s, renderSlot as $, createCommentVNode as h, createElementVNode as v, computed as _, createBlock as f, toDisplayString as O, inject as ne, ref as M, watch as j, watchEffect as N, createVNode as C, withDirectives as P, vModelCheckbox as W, Fragment as S, withCtx as T, createTextVNode as U, mergeProps as q, renderList as A, resolveDynamicComponent as le, vModelDynamic as ae, onBeforeMount as oe, onBeforeUnmount as se, vModelText as ie, normalizeProps as re, guardReactiveProps as ce } from "vue";
1
+ import { defineComponent as k, useSlots as X, openBlock as l, createElementBlock as c, normalizeClass as x, unref as s, renderSlot as $, createCommentVNode as h, createElementVNode as v, computed as _, createBlock as f, toDisplayString as O, inject as ne, ref as M, watch as j, watchEffect as N, createVNode as C, withDirectives as z, vModelCheckbox as W, Fragment as S, withCtx as T, createTextVNode as U, mergeProps as q, renderList as A, resolveDynamicComponent as le, vModelDynamic as ae, onBeforeMount as oe, onBeforeUnmount as se, vModelText as ie, normalizeProps as re, guardReactiveProps as ce } from "vue";
2
2
  const ue = {
3
3
  key: 0,
4
4
  class: "onyx-app__nav"
@@ -32,7 +32,7 @@ const ue = {
32
32
  ])) : h("", !0)
33
33
  ], 2));
34
34
  }
35
- }), Pt = ["cozy", "default", "compact"], w = (t) => ({
35
+ }), zt = ["cozy", "default", "compact"], w = (t) => ({
36
36
  densityClass: _(() => ({ [`onyx-density-${t.density}`]: t.density }))
37
37
  }), me = ["innerHTML"], B = /* @__PURE__ */ k({
38
38
  __name: "OnyxIcon",
@@ -96,7 +96,7 @@ function Le(t, n) {
96
96
  const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee = {
97
97
  key: 2,
98
98
  class: "onyx-button__label onyx-truncation-ellipsis"
99
- }, zt = /* @__PURE__ */ k({
99
+ }, Pt = /* @__PURE__ */ k({
100
100
  __name: "OnyxButton",
101
101
  props: {
102
102
  density: {},
@@ -159,7 +159,7 @@ const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee
159
159
  key: 0,
160
160
  class: "onyx-badge__icon",
161
161
  icon: n.icon,
162
- size: n.density === "compact" ? "16px" : "24px"
162
+ size: n.density === "cozy" ? "24px" : "16px"
163
163
  }, null, 8, ["icon", "size"])) : $(a.$slots, "default", { key: 1 })
164
164
  ], 2));
165
165
  }
@@ -190,19 +190,19 @@ const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee
190
190
  const n = _(() => s(t == null ? void 0 : t.locale) ?? "en-US"), e = _(() => t != null && t.messages && n.value in t.messages ? t.messages[n.value] : H), a = _(() => (o, r = {}) => {
191
191
  let m = K(o, e.value) ?? K(o, H) ?? "";
192
192
  const i = typeof r.n == "number" ? r.n : void 0;
193
- return m = Pe(m, i), ze(m, r);
193
+ return m = ze(m, i), Pe(m, r);
194
194
  });
195
195
  return { locale: n, t: a };
196
196
  }, Ae = (t, n) => t.provide(J, Q(n)), Y = () => ne(J, () => Q(), !0), K = (t, n) => {
197
197
  const e = t.split(".").reduce((a, o) => !a || typeof a == "string" ? a : a[o], n);
198
198
  return e && typeof e == "string" ? e : void 0;
199
- }, Pe = (t, n) => {
199
+ }, ze = (t, n) => {
200
200
  const e = t.split(" | ").map((o) => o.trim());
201
201
  if (e.length <= 1)
202
202
  return t;
203
203
  let a = 1;
204
204
  return n === 0 && (a = 0), n && (n <= 0 || n > 1) && (a = 2), e.length === 2 ? a === 1 ? e[0] : e[1] : e[a];
205
- }, ze = (t, n) => n ? Object.entries(n).reduce((a, [o, r]) => r === void 0 ? a : a.replace(new RegExp(`{${o}}`, "gi"), r.toString()), t).replace(/\s?{.*}\s?/gi, "") : t, z = (t) => ({
205
+ }, Pe = (t, n) => n ? Object.entries(n).reduce((a, [o, r]) => r === void 0 ? a : a.replace(new RegExp(`{${o}}`, "gi"), r.toString()), t).replace(/\s?{.*}\s?/gi, "") : t, P = (t) => ({
206
206
  /**
207
207
  * Class that configures which type of required marker is used.
208
208
  */
@@ -263,7 +263,7 @@ const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee
263
263
  const e = t, a = n, o = _({
264
264
  get: () => e.modelValue,
265
265
  set: (u) => a("update:modelValue", u)
266
- }), { requiredMarkerClass: r, requiredTypeClass: m } = z(e), { densityClass: i } = w(e), { vCustomValidity: p } = D({ props: e, emit: a });
266
+ }), { requiredMarkerClass: r, requiredTypeClass: m } = P(e), { densityClass: i } = w(e), { vCustomValidity: p } = D({ props: e, emit: a });
267
267
  return (u, y) => e.skeleton ? (l(), c("div", {
268
268
  key: 0,
269
269
  class: x(["onyx-checkbox-skeleton", s(i)])
@@ -282,7 +282,7 @@ const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee
282
282
  key: 0,
283
283
  class: "onyx-checkbox__loading",
284
284
  type: "circle"
285
- })) : P((l(), c("input", {
285
+ })) : z((l(), c("input", {
286
286
  key: 1,
287
287
  "onUpdate:modelValue": y[0] || (y[0] = (b) => o.value = b),
288
288
  "aria-label": e.hideLabel ? e.label : void 0,
@@ -480,7 +480,7 @@ const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee
480
480
  },
481
481
  emits: ["update:modelValue", "change", "focus", "blur", "validityChange"],
482
482
  setup(t, { emit: n }) {
483
- const e = t, a = n, { vCustomValidity: o } = D({ props: e, emit: a }), { requiredMarkerClass: r, requiredTypeClass: m } = z(e), { densityClass: i } = w(e), p = _({
483
+ const e = t, a = n, { vCustomValidity: o } = D({ props: e, emit: a }), { requiredMarkerClass: r, requiredTypeClass: m } = P(e), { densityClass: i } = w(e), p = _({
484
484
  get: () => e.modelValue,
485
485
  set: (d) => a("update:modelValue", d)
486
486
  }), u = (d) => {
@@ -503,7 +503,7 @@ const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee
503
503
  class: "onyx-input__loading",
504
504
  type: "circle"
505
505
  })) : h("", !0),
506
- P(v("input", {
506
+ z(v("input", {
507
507
  "onUpdate:modelValue": g[0] || (g[0] = (L) => p.value = L),
508
508
  class: "onyx-input__native",
509
509
  placeholder: e.placeholder,
@@ -871,7 +871,7 @@ const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee
871
871
  key: 0,
872
872
  class: "onyx-radio-button__loading",
873
873
  type: "circle"
874
- })) : P((l(), c("input", {
874
+ })) : z((l(), c("input", {
875
875
  key: 1,
876
876
  class: "onyx-radio-button__selector",
877
877
  type: "radio",
@@ -908,7 +908,7 @@ const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee
908
908
  },
909
909
  emits: ["update:modelValue", "validityChange"],
910
910
  setup(t, { emit: n }) {
911
- const e = t, { densityClass: a } = w(e), { requiredMarkerClass: o, requiredTypeClass: r } = z(e), m = n, i = (p) => m("update:modelValue", e.options.find(({ id: u }) => p.target.value === u));
911
+ const e = t, { densityClass: a } = w(e), { requiredMarkerClass: o, requiredTypeClass: r } = P(e), m = n, i = (p) => m("update:modelValue", e.options.find(({ id: u }) => p.target.value === u));
912
912
  return (p, u) => (l(), c("fieldset", {
913
913
  class: x(["onyx-radio-button-group", s(a), s(r)]),
914
914
  disabled: e.disabled,
@@ -994,7 +994,7 @@ const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee
994
994
  }
995
995
  }
996
996
  return n.modelValue ?? "";
997
- }), { requiredMarkerClass: m, requiredTypeClass: i } = z(n), { densityClass: p } = w(n);
997
+ }), { requiredMarkerClass: m, requiredTypeClass: i } = P(n), { densityClass: p } = w(n);
998
998
  return (u, y) => n.skeleton ? (l(), c("div", {
999
999
  key: 0,
1000
1000
  class: x(["onyx-select-skeleton", s(p)])
@@ -1026,7 +1026,7 @@ const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee
1026
1026
  class: "onyx-select__loading",
1027
1027
  type: "circle"
1028
1028
  })) : h("", !0),
1029
- P(v("input", {
1029
+ z(v("input", {
1030
1030
  "onUpdate:modelValue": y[0] || (y[0] = (b) => r.value = b),
1031
1031
  class: "onyx-select__input onyx-truncation-ellipsis",
1032
1032
  placeholder: n.placeholder,
@@ -1084,7 +1084,7 @@ const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee
1084
1084
  },
1085
1085
  emits: ["update:modelValue", "validityChange"],
1086
1086
  setup(t, { emit: n }) {
1087
- const e = t, a = n, { requiredMarkerClass: o, requiredTypeClass: r } = z(e), { densityClass: m } = w(e), { vCustomValidity: i } = D({ props: e, emit: a }), p = _({
1087
+ const e = t, a = n, { requiredMarkerClass: o, requiredTypeClass: r } = P(e), { densityClass: m } = w(e), { vCustomValidity: i } = D({ props: e, emit: a }), p = _({
1088
1088
  get: () => e.modelValue,
1089
1089
  set: (u) => {
1090
1090
  a("update:modelValue", u);
@@ -1104,7 +1104,7 @@ const V = /* @__PURE__ */ F(Ve, [["render", Le]]), Se = ["disabled", "type"], Ee
1104
1104
  class: x(["onyx-switch", [s(r), s(m)]]),
1105
1105
  title: e.hideLabel ? e.label : void 0
1106
1106
  }, [
1107
- P(v("input", {
1107
+ z(v("input", {
1108
1108
  "onUpdate:modelValue": y[0] || (y[0] = (b) => p.value = b),
1109
1109
  type: "checkbox",
1110
1110
  role: "switch",
@@ -1196,7 +1196,7 @@ export {
1196
1196
  Dt as BUTTON_MODES,
1197
1197
  Nt as BUTTON_TYPES,
1198
1198
  Ut as BUTTON_VARIATIONS,
1199
- Pt as DENSITY,
1199
+ zt as DENSITY,
1200
1200
  cn as DIRECTIONS,
1201
1201
  Ft as HEADLINE_TYPES,
1202
1202
  Yt as ICON_SIZES,
@@ -1206,7 +1206,7 @@ export {
1206
1206
  on as ONYX_COLORS,
1207
1207
  At as OnyxAppLayout,
1208
1208
  Te as OnyxBadge,
1209
- zt as OnyxButton,
1209
+ Pt as OnyxButton,
1210
1210
  Rt as OnyxCheckboxGroup,
1211
1211
  jt as OnyxEmpty,
1212
1212
  ee as OnyxHeadline,