sit-onyx 1.0.0-alpha.73 → 1.0.0-alpha.74

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.
@@ -0,0 +1,18 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<import("../..").DensityProp>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<import("../..").DensityProp>>>, {}, {}>, {
2
+ default?(_: {}): any;
3
+ }>;
4
+ export default _default;
5
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
6
+ type __VLS_TypePropsToRuntimeProps<T> = {
7
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
8
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
9
+ } : {
10
+ type: import('vue').PropType<T[K]>;
11
+ required: true;
12
+ };
13
+ };
14
+ type __VLS_WithTemplateSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,3 @@
1
+ import { DensityProp } from '../../composables/density';
2
+
3
+ export type OnyxTableProps = DensityProp & {};
@@ -0,0 +1,27 @@
1
+ import { OnyxTagProps } from './types';
2
+
3
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxTagProps>, {
4
+ color: string;
5
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxTagProps>, {
6
+ color: string;
7
+ }>>>, {
8
+ color: "primary" | "secondary" | "neutral" | "danger" | "warning" | "success" | "info";
9
+ }, {}>;
10
+ export default _default;
11
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
+ type __VLS_TypePropsToRuntimeProps<T> = {
13
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
14
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
+ } : {
16
+ type: import('vue').PropType<T[K]>;
17
+ required: true;
18
+ };
19
+ };
20
+ type __VLS_WithDefaults<P, D> = {
21
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
22
+ default: D[K];
23
+ }> : P[K];
24
+ };
25
+ type __VLS_Prettify<T> = {
26
+ [K in keyof T]: T[K];
27
+ } & {};
@@ -0,0 +1,17 @@
1
+ import { OnyxColor } from '../../types/colors';
2
+ import { DensityProp } from '../../composables/density';
3
+
4
+ export type OnyxTagProps = DensityProp & {
5
+ /**
6
+ * The text content of the tag.
7
+ */
8
+ label: string;
9
+ /**
10
+ * The color of the tag.
11
+ */
12
+ color?: OnyxColor;
13
+ /**
14
+ * An icon which will be displayed on the left side of the label.
15
+ */
16
+ icon?: string;
17
+ };
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"},U={class:"onyx-app__page"},H={key:1,class:"onyx-app__page-overlay"},G={key:2,class:"onyx-app__app-overlay"},j=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",U,[e.renderSlot(l.$slots,"default")]),e.unref(t).pageOverlay?(e.openBlock(),e.createElementBlock("div",H,[e.renderSlot(l.$slots,"pageOverlay")])):e.createCommentVNode("",!0),e.unref(t).appOverlay?(e.openBlock(),e.createElementBlock("div",G,[e.renderSlot(l.$slots,"appOverlay")])):e.createCommentVNode("",!0)],2))}}),K=["compact","default","cozy"],h=o=>({densityClass:e.computed(()=>({[`onyx-density-${o.density}`]:o.density}))}),Y=["innerHTML"],g=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,Y))}}),w=(o,n)=>{const t=o.__vccOpts||o;for(const[l,a]of n)t[l]=a;return t},Z={},X={class:"onyx-circle-spinner",viewBox:"0 0 50 50"},W=e.createElementVNode("circle",{class:"onyx-circle-spinner__circle",cx:"50%",cy:"50%",r:"45%"},null,-1),J=[W];function Q(o,n){return e.openBlock(),e.createElementBlock("svg",X,J)}const ee=w(Z,[["render",Q]]),te={},oe={class:"onyx-loading-dots"},ne=e.createElementVNode("span",{class:"onyx-loading-dots__center"},null,-1),le=[ne];function ae(o,n){return e.openBlock(),e.createElementBlock("div",oe,le)}const re=w(te,[["render",ae]]),x=e.defineComponent({__name:"OnyxLoadingIndicator",props:{type:{default:"dots"}},setup(o){const n=o;return(t,l)=>n.type==="circle"?(e.openBlock(),e.createBlock(ee,{key:0})):n.type==="dots"?(e.openBlock(),e.createBlock(re,{key:1})):e.createCommentVNode("",!0)}}),se={},ie={"aria-hidden":"true",class:"onyx-skeleton"};function ce(o,n){return e.openBlock(),e.createElementBlock("figure",ie)}const v=w(se,[["render",ce]]),de=["disabled","type"],ue={key:2,class:"onyx-button__label onyx-truncation-ellipsis"},pe=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}=h(t),a=n;return(r,s)=>t.skeleton?(e.openBlock(),e.createBlock(v,{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:s[0]||(s[0]=m=>a("click"))},[t.icon&&!t.loading?(e.openBlock(),e.createBlock(g,{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",ue,e.toDisplayString(t.label),1))],10,de))}}),me=["button","submit","reset"],ye=["primary","secondary","danger"],fe=["default","outline","plain"],$=e.defineComponent({__name:"OnyxBadge",props:{density:{},variation:{default:"primary"},icon:{}},setup(o){const n=o,{densityClass:t}=h(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(g,{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))}}),ke="(optional)",_e={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.'}},he={selectAll:"Select all",currentSelection:"{n} selected"},xe="No data available",L={optional:ke,validations:_e,selections:he,empty:xe},I=Symbol(),P=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]:L),l=e.computed(()=>(a,r={})=>{let s=O(a,t.value)??O(a,L)??"";const m=typeof r.n=="number"?r.n:void 0;return s=ge(s,m),be(s,r)});return{locale:n,t:l}},ve=(o,n)=>o.provide(I,P(n)),E=()=>e.inject(I,()=>P(),!0),O=(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},ge=(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]},be=(o,n)=>n?Object.entries(n).reduce((l,[a,r])=>r===void 0?l:l.replace(new RegExp(`{${a}}`,"gi"),r.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}))}),Be=()=>Object.entries(Object.getOwnPropertyDescriptors(ValidityState.prototype)).filter(([o,n])=>n.enumerable).map(([o])=>o),Ce=o=>Be().reduce((n,t)=>(n[t]=o[t],n),{}),Ee=(o,n)=>{const t=Object.entries(o).filter(([a,r])=>r!==void 0),l=Object.entries(n).filter(([a,r])=>r!==void 0);return t.length!==l.length?!1:t.every(([a,r])=>r===n[a])},V=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 r=Ce(a.validity);!t.value||!n.value&&r.valid||n.value&&Ee(r,n.value)||(n.value=r,o.emit("validityChange",n.value))},{immediate:!0})}}}},Ve={class:"onyx-checkbox__container"},Se=["aria-label","title","indeterminate","disabled","required"],S=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:u=>l("update:modelValue",u)}),{requiredMarkerClass:r,requiredTypeClass:s}=B(t),{densityClass:m}=h(t),{vCustomValidity:i}=V({props:t,emit:l});return(u,c)=>t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-checkbox-skeleton",e.unref(m)])},[e.createVNode(v,{class:"onyx-checkbox-skeleton__input"}),t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(v,{key:0,class:"onyx-checkbox-skeleton__label"}))],2)):(e.openBlock(),e.createElementBlock("label",{key:1,class:e.normalizeClass(["onyx-checkbox",[e.unref(s),e.unref(m)]])},[e.createElementVNode("div",Ve,[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":c[0]||(c[0]=y=>a.value=y),"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,Se)),[[e.vModelCheckbox,a.value],[e.unref(i)]])]),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(r):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(r)]])},null,2)):e.createCommentVNode("",!0)],64))],2))}}),we=["disabled"],Te={key:0,class:"onyx-checkbox-group__label"},Ne=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}=h(t),a=n,{t:r}=E(),s=(c,y)=>{const d=y?[...t.modelValue,c]:t.modelValue.filter(f=>f!==c);a("update:modelValue",d)},m=e.computed(()=>t.options.filter(c=>!c.disabled&&!c.skeleton)),i=c=>{const y=c?m.value.map(({id:d})=>d):[];a("update:modelValue",y)},u=e.computed(()=>{const c=m.value.map(({id:d})=>d),y=t.modelValue.filter(d=>c.includes(d));return!c.length||!y.length?{modelValue:!1}:y.length===c.length?{modelValue:!0}:{indeterminate:!0,modelValue:!1}});return(c,y)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["onyx-checkbox-group",e.unref(l)]),disabled:t.disabled},[t.headline?(e.openBlock(),e.createElementBlock("legend",Te,[e.createVNode(e.unref(T),{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(S,e.mergeProps({key:0},u.value,{label:t.checkAllLabel||e.unref(r)("selections.selectAll"),"onUpdate:modelValue":i}),null,16,["label"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,d=>(e.openBlock(),e.createBlock(S,e.mergeProps({key:d.id.toString()},d,{"model-value":t.modelValue.includes(d.id),"onUpdate:modelValue":f=>s(d.id,f)}),null,16,["model-value","onUpdate:modelValue"]))),128))],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.skeleton,d=>(e.openBlock(),e.createBlock(S,{key:d,label:`Skeleton ${d}`,skeleton:""},null,8,["label"]))),128))],2)],10,we))}}),Le='<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>',Oe={class:"onyx-empty"},Me={class:"onyx-empty__label onyx-text onyx-truncation-multiline"},A=e.defineComponent({__name:"OnyxEmpty",setup(o){return(n,t)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(n.$slots,"icon",{},()=>[e.createVNode(g,{icon:e.unref(Le),size:"48px"},null,8,["icon"])]),e.createElementVNode("div",Me,[e.renderSlot(n.$slots,"default")])]))}}),T=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"]))}}),$e=["h1","h2","h3","h4","h5","h6"],Ie=["12px","16px","24px","32px","48px","64px","96px"],Pe=["aria-label","title","disabled"],Ae=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}=h(t),a=n;return(r,s)=>(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:s[0]||(s[0]=m=>a("click"))},[t.loading?(e.openBlock(),e.createBlock(x,{key:0,type:"circle"})):t.icon?(e.openBlock(),e.createBlock(g,{key:1,icon:t.icon},null,8,["icon"])):e.renderSlot(r.$slots,"default",{key:2})],10,Pe))}}),De={class:"onyx-truncation-ellipsis"},Fe={class:"onyx-input__wrapper"},ze=["placeholder","type","required","autocapitalize","autocomplete","autofocus","name","pattern","readonly","disabled","minlength","maxlength","aria-label","title"],Re={key:0,class:"onyx-input__footer onyx-text--small"},qe={key:0,class:"onyx-truncation-ellipsis"},Ue={key:1,class:"onyx-input__counter"},He=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}=V({props:t,emit:l}),{requiredMarkerClass:r,requiredTypeClass:s}=B(t),{densityClass:m}=h(t),i=e.computed({get:()=>t.modelValue,set:d=>l("update:modelValue",d)}),u=d=>{const f=d.target.value;l("change",f)},c=e.computed(()=>t.pattern instanceof RegExp?t.pattern.source:t.pattern),y=e.computed(()=>t.withCounter&&t.maxlength);return(d,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-input",e.unref(s),e.unref(m)])},[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(r)])},[e.createElementVNode("div",De,e.toDisplayString(t.label),1)],2)),e.createElementVNode("div",Fe,[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":f[0]||(f[0]=p=>i.value=p),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:c.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:u,onFocus:f[1]||(f[1]=p=>l("focus")),onBlur:f[2]||(f[2]=p=>l("blur"))},null,40,ze),[[e.vModelDynamic,i.value],[e.unref(a)]])])]),t.message||y.value?(e.openBlock(),e.createElementBlock("div",Re,[t.message?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(t.message),1)):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("span",Ue,e.toDisplayString(i.value.length)+"/"+e.toDisplayString(t.maxlength),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),Ge=["email","password","search","tel","text","url"],je=["none","sentences","words","characters"],Ke='<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>',Ye=o=>/^http(s?):\/\//.test(o),Ze=["href","target","rel"],Xe=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:Ye(t.href));return(r,s)=>(e.openBlock(),e.createElementBlock("a",{class:"onyx-link",href:t.href,target:t.target,rel:t.target==="_blank"?"noreferrer":void 0,onClick:s[0]||(s[0]=m=>l("click"))},[e.renderSlot(r.$slots,"default"),a.value?(e.openBlock(),e.createBlock(g,{key:0,class:"onyx-link__icon",icon:e.unref(Ke),size:"16px"},null,8,["icon"])):e.createCommentVNode("",!0)],8,Ze))}}),We=["_self","_blank","_parent","_top"],D=o=>o,Je=(()=>{let o=1;return()=>o++})(),N=o=>`${o}-${Je()}`,Qe=o=>!tt.has(o),et=["Unidentified","Alt","AltGraph","CapsLock","Control","Fn","FnLock","Meta","NumLock","ScrollLock","Shift","Symbol","SymbolLock","Hyper","Super","Enter","Tab","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Home","PageDown","PageUp","Backspace","Clear","Copy","CrSel","Cut","Delete","EraseEof","ExSel","Insert","Paste","Redo","Undo","Accept","Again","Attn","Cancel","ContextMenu","Escape","Execute","Find","Help","Pause","Play","Props","Select","ZoomIn","ZoomOut","BrightnessDown","BrightnessUp","Eject","LogOff","Power","PowerOff","PrintScreen","Hibernate","Standby","WakeUp","AllCandidates","Alphanumeric","CodeInput","Compose","Convert","Dead","FinalMode","GroupFirst","GroupLast","GroupNext","GroupPrevious","ModeChange","NextCandidate","NonConvert","PreviousCandidate","Process","SingleCandidate","HangulMode","HanjaMode","JunjaMode","Eisu","Hankaku","Hiragana","HiraganaKatakana","KanaMode","KanjiMode","Katakana","Romaji","Zenkaku","ZenkakuHankaku","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","Soft1","Soft2","Soft3","Soft4","ChannelDown","ChannelUp","Close","MailForward","MailReply","MailSend","MediaClose","MediaFastForward","MediaPause","MediaPlay","MediaPlayPause","MediaRecord","MediaRewind","MediaStop","MediaTrackNext","MediaTrackPrevious","New","Open","Print","Save","SpellCheck","Key11","Key12","AudioBalanceLeft","AudioBalanceRight","AudioBassBoostDown","AudioBassBoostToggle","AudioBassBoostUp","AudioFaderFront","AudioFaderRear","AudioSurroundModeNext","AudioTrebleDown","AudioTrebleUp","AudioVolumeDown","AudioVolumeUp","AudioVolumeMute","MicrophoneToggle","MicrophoneVolumeDown","MicrophoneVolumeUp","MicrophoneVolumeMute","SpeechCorrectionList","SpeechInputToggle","LaunchApplication1","LaunchApplication2","LaunchCalendar","LaunchContacts","LaunchMail","LaunchMediaPlayer","LaunchMusicPlayer","LaunchPhone","LaunchScreenSaver","LaunchSpreadsheet","LaunchWebBrowser","LaunchWebCam","LaunchWordProcessor","BrowserBack","BrowserFavorites","BrowserForward","BrowserHome","BrowserRefresh","BrowserSearch","BrowserStop","AppSwitch","Call","Camera","CameraFocus","EndCall","GoBack","GoHome","HeadsetHook","LastNumberRedial","Notification","MannerMode","VoiceDial","TV","TV3DMode","TVAntennaCable","TVAudioDescription","TVAudioDescriptionMixDown","TVAudioDescriptionMixUp","TVContentsMenu","TVDataService","TVInput","TVInputComponent1","TVInputComponent2","TVInputComposite1","TVInputComposite2","TVInputHDMI1","TVInputHDMI2","TVInputHDMI3","TVInputHDMI4","TVInputVGA1","TVMediaContext","TVNetwork","TVNumberEntry","TVPower","TVRadioService","TVSatellite","TVSatelliteBS","TVSatelliteCS","TVSatelliteToggle","TVTerrestrialAnalog","TVTerrestrialDigital","TVTimer","AVRInput","AVRPower","ColorF0Red","ColorF1Green","ColorF2Yellow","ColorF3Blue","ColorF4Grey","ColorF5Brown","ClosedCaptionToggle","Dimmer","DisplaySwap","DVR","Exit","FavoriteClear0","FavoriteClear1","FavoriteClear2","FavoriteClear3","FavoriteRecall0","FavoriteRecall1","FavoriteRecall2","FavoriteRecall3","FavoriteStore0","FavoriteStore1","FavoriteStore2","FavoriteStore3","Guide","GuideNextDay","GuidePreviousDay","Info","InstantReplay","Link","ListProgram","LiveContent","Lock","MediaApps","MediaAudioTrack","MediaLast","MediaSkipBackward","MediaSkipForward","MediaStepBackward","MediaStepForward","MediaTopMenu","NavigateIn","NavigateNext","NavigateOut","NavigatePrevious","NextFavoriteChannel","NextUserProfile","OnDemand","Pairing","PinPDown","PinPMove","PinPToggle","PinPUp","PlaySpeedDown","PlaySpeedReset","PlaySpeedUp","RandomToggle","RcLowBattery","RecordSpeedNext","RfBypass","ScanChannelsToggle","ScreenModeNext","Settings","SplitScreenToggle","STBInput","STBPower","Subtitle","Teletext","VideoModeNext","Wink","ZoomToggle","AudioVolumeDown","AudioVolumeUp","AudioVolumeMute","BrowserBack","BrowserForward","ChannelDown","ChannelUp","ContextMenu","Eject","End","Enter","Home","MediaFastForward","MediaPlay","MediaPlayPause","MediaRecord","MediaRewind","MediaStop","MediaNextTrack","MediaPause","MediaPreviousTrack","Power","Unidentified"],tt=new Set(et),ot=(o,n)=>{let t;return(...l)=>{clearTimeout(t),t=setTimeout(()=>o(...l),n)}},nt=(o,n=500)=>{let t="";const l=ot(()=>t="",n);return a=>{Qe(a.key)&&(l(),t=`${t}${a.key}`,o(t))}},lt=D(o=>{const n=e.computed(()=>e.unref(o.multiselect)??!1),t=new Map,l=i=>(t.has(i)||t.set(i,N("listbox-option")),t.get(i)),a=e.ref(!1);e.watchEffect(()=>{var u;if(o.activeOption.value==null||!a.value&&!o.controlled)return;const i=l(o.activeOption.value);(u=document.getElementById(i))==null||u.scrollIntoView({block:"nearest",inline:"nearest"})});const r=nt(i=>{var u;return(u=o.onTypeAhead)==null?void 0:u.call(o,i)}),s=i=>{var u,c,y,d,f,p,k;switch(i.key){case" ":i.preventDefault(),o.activeOption.value!=null&&((u=o.onSelect)==null||u.call(o,o.activeOption.value));break;case"ArrowUp":if(i.preventDefault(),o.activeOption.value==null){(c=o.onActivateLast)==null||c.call(o);return}(y=o.onActivatePrevious)==null||y.call(o,o.activeOption.value);break;case"ArrowDown":if(i.preventDefault(),o.activeOption.value==null){(d=o.onActivateFirst)==null||d.call(o);return}(f=o.onActivateNext)==null||f.call(o,o.activeOption.value);break;case"Home":i.preventDefault(),(p=o.onActivateFirst)==null||p.call(o);break;case"End":i.preventDefault(),(k=o.onActivateLast)==null||k.call(o);break;default:r(i)}};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(()=>i=>({role:"group","aria-label":i.label})),option:e.computed(()=>i=>{const u=i.selected??!1;return{id:l(i.value),role:"option","aria-label":i.label,"aria-checked":n.value?u:void 0,"aria-selected":n.value?void 0:u,"aria-disabled":i.disabled,onClick:()=>{var c;return(c=o.onSelect)==null?void 0:c.call(o,i.value)}}})},state:{isFocused:a},internals:{getOptionId:l}}}),at=D(o=>{const n=N("tooltip"),t=e.ref(!1);let l;const a=e.computed(()=>{const d=e.unref(o.open);return typeof d!="object"?200:d.debounce}),r=e.computed(()=>{const d=e.unref(o.open);return typeof d!="object"?d:d.type}),s=e.computed({get:()=>t.value,set:d=>{clearTimeout(l),l=setTimeout(()=>{t.value=d},a.value)}}),m=e.computed(()=>typeof r.value=="boolean"?r.value:s.value),i=()=>{t.value=!t.value},u=e.computed(()=>{if(r.value==="hover")return{onMouseover:()=>s.value=!0,onMouseout:()=>s.value=!1,onFocusin:()=>t.value=!0,onFocusout:()=>t.value=!1}}),c=d=>{d.key==="Escape"&&(t.value=!1)},y=d=>{var k;const f=(k=document.getElementById(n))==null?void 0:k.parentElement;if(!f||!(d.target instanceof Node))return;!f.contains(d.target)&&(t.value=!1)};return e.onBeforeMount(()=>{document.addEventListener("keydown",c),e.watchEffect(()=>{r.value==="click"?document.addEventListener("click",y):document.removeEventListener("click",y)})}),e.onBeforeUnmount(()=>{document.addEventListener("keydown",c),document.addEventListener("click",y)}),{elements:{trigger:e.computed(()=>({"aria-describedby":n,onClick:r.value==="click"?i:void 0,...u.value})),tooltip:e.computed(()=>({role:"tooltip",id:n,tabindex:"-1",...u.value}))},state:{isVisible:m}}}),F=o=>{const t=e.ref(!1),l=r=>{const s=r.target;if(!(s instanceof Element))return;const m=e.unref(o.offset)??0;t.value=Math.abs(s.scrollTop)+s.clientHeight>=s.scrollHeight-m-1};return{vScrollEnd:{mounted:r=>{e.watchEffect(()=>{var m;(((m=o.enabled)==null?void 0:m.value)??!0)&&!o.loading.value?r.addEventListener("scroll",l):r.removeEventListener("scroll",l)})}},isScrollEnd:t}},rt={class:"onyx-truncation-ellipsis"},st=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",rt,[e.renderSlot(t.$slots,"default")])],2))}}),it=["aria-busy"],ct={key:0,class:"onyx-listbox__slot onyx-listbox__slot--loading"},dt={key:0,role:"presentation",class:"onyx-listbox__group-name onyx-text--small"},ut={key:0,class:"onyx-listbox__slot"},pt={key:1,class:"onyx-listbox__slot"},mt={key:3,class:"onyx-listbox__message onyx-text--small"},yt=e.defineComponent({__name:"OnyxListbox",props:{label:{},options:{},message:{},modelValue:{},loading:{type:Boolean,default:!1},lazyLoading:{}},emits:["update:modelValue","lazyLoad"],setup(o,{emit:n}){const t=o,l=n,a=e.useSlots(),{t:r}=E(),s=e.ref();e.watch(()=>t.modelValue,p=>{s.value=p});const{elements:{listbox:m,option:i,group:u}}=lt({label:e.computed(()=>t.label),selectedOption:e.computed(()=>t.modelValue),activeOption:s,onSelect:p=>{t.modelValue===p?l("update:modelValue",void 0):l("update:modelValue",p)},onActivateFirst:()=>{var p;return s.value=(p=t.options.at(0))==null?void 0:p.id},onActivateLast:()=>{var p;return s.value=(p=t.options.at(-1))==null?void 0:p.id},onActivateNext:p=>{const k=t.options.findIndex(_=>_.id===p);k<t.options.length-1&&(s.value=t.options[k+1].id)},onActivatePrevious:p=>{const k=t.options.findIndex(_=>_.id===p);k>0&&(s.value=t.options[k-1].id)},onTypeAhead:p=>{const k=t.options.find(_=>_.label.toLowerCase().trim().startsWith(p.toLowerCase()));k&&(s.value=k.id)}}),c=e.computed(()=>t.options.reduce((p,k)=>{const _=k.group??"";return p[_]=p[_]||[],p[_].push(k),p},{})),{vScrollEnd:y,isScrollEnd:d}=F({enabled:e.computed(()=>{var p;return((p=t.lazyLoading)==null?void 0:p.enabled)??!1}),loading:e.computed(()=>t.loading),offset:e.computed(()=>{var p;return(p=t.lazyLoading)==null?void 0:p.scrollOffset})});e.watchEffect(()=>{d.value&&l("lazyLoad")});const f=e.computed(()=>t.options.length===0);return(p,k)=>{var _;return e.openBlock(),e.createElementBlock("div",{class:"onyx-listbox","aria-busy":t.loading},[t.loading?(e.openBlock(),e.createElementBlock("div",ct,[e.createVNode(x,{class:"onyx-listbox__loading"})])):f.value?e.renderSlot(p.$slots,"empty",{key:1,defaultMessage:e.unref(r)("empty")},()=>[e.createVNode(A,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("empty")),1)]),_:1})]):e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps({key:2},e.unref(m),{class:"onyx-listbox__wrapper"}),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(R,C)=>(e.openBlock(),e.createElementBlock("ul",e.mergeProps({key:C,class:"onyx-listbox__group"},e.unref(u)({label:C})),[C!=""?(e.openBlock(),e.createElementBlock("li",dt,e.toDisplayString(C),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R,b=>(e.openBlock(),e.createBlock(st,e.mergeProps({key:b.id.toString()},e.unref(i)({value:b.id,label:b.label,disabled:b.disabled,selected:b.id===t.modelValue}),{active:b.id===s.value}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.label),1)]),_:2},1040,["active"]))),128))],16))),128)),(_=t.lazyLoading)!=null&&_.loading?(e.openBlock(),e.createElementBlock("li",ut,[e.createVNode(x,{class:"onyx-listbox__loading"})])):e.createCommentVNode("",!0),e.unref(a).optionsEnd?(e.openBlock(),e.createElementBlock("li",pt,[e.renderSlot(p.$slots,"optionsEnd")])):e.createCommentVNode("",!0)],16)),[[e.unref(y)]]),t.message?(e.openBlock(),e.createElementBlock("span",mt,e.toDisplayString(t.message),1)):e.createCommentVNode("",!0)],8,it)}}}),ft={key:0,class:"onyx-page__sidebar"},kt={class:"onyx-page__main"},_t={key:1,class:"onyx-page__footer"},ht={key:2,class:"onyx-page__toasts"},xt=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,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-page",l.value])},[e.unref(t).sidebar&&!n.hideSidebar?(e.openBlock(),e.createElementBlock("aside",ft,[e.renderSlot(a.$slots,"sidebar")])):e.createCommentVNode("",!0),e.createElementVNode("main",kt,[e.renderSlot(a.$slots,"default")]),e.unref(t).footer?(e.openBlock(),e.createElementBlock("footer",_t,[e.renderSlot(a.$slots,"footer")])):e.createCommentVNode("",!0),e.unref(t).toasts?(e.openBlock(),e.createElementBlock("div",ht,[e.renderSlot(a.$slots,"toasts")])):e.createCommentVNode("",!0)],2))}}),vt=["title"],gt=["required","name","value","checked","disabled"],M=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}=V({props:t,emit:l}),{densityClass:r}=h(t);return(s,m)=>t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-radio-button-skeleton",e.unref(r)])},[e.createVNode(v,{class:"onyx-radio-button-skeleton__input"}),e.createVNode(v,{class:"onyx-radio-button-skeleton__label"})],2)):(e.openBlock(),e.createElementBlock("label",{key:1,class:e.normalizeClass(["onyx-radio-button",e.unref(r)]),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,gt)),[[e.unref(a)]]),e.createElementVNode("span",{class:e.normalizeClass(["onyx-radio-button__label",[`onyx-truncation-${t.truncation}`]])},e.toDisplayString(t.label),3)],10,vt))}}),bt=["disabled"],Bt={key:0,class:"onyx-radio-button-group__headline"},Ct=e.defineComponent({__name:"OnyxRadioButtonGroup",props:{density:{},required:{type:Boolean,default:!1},requiredMarker:{},customError:{},name:{default:()=>N("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}=h(t),{requiredMarkerClass:a,requiredTypeClass:r}=B(t),s=n,m=i=>s("update:modelValue",t.options.find(({id:u})=>i.target.value===u));return(i,u)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["onyx-radio-button-group",e.unref(l),e.unref(r)]),disabled:t.disabled,onChange:u[0]||(u[0]=c=>m(c))},[t.headline?(e.openBlock(),e.createElementBlock("legend",Bt,[e.createVNode(T,{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,(c,y)=>{var d;return e.openBlock(),e.createBlock(M,e.mergeProps({key:c.id.toString()},c,{name:t.name,"custom-error":t.customError,selected:c.id===((d=t.modelValue)==null?void 0:d.id),required:t.required,onValidityChange:f=>y===0&&s("validityChange",f)}),null,16,["name","custom-error","selected","required","onValidityChange"])}),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.skeleton,c=>(e.openBlock(),e.createBlock(M,{id:`skeleton-${c}`,key:c,label:"Skeleton ${i}",name:t.name,skeleton:""},null,8,["id","name"]))),128))],2)],42,bt))}}),Et='<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>',Vt={class:"onyx-truncation-ellipsis"},St={class:"onyx-select__wrapper"},wt=["placeholder","required","disabled","aria-label","title"],Tt={key:0,class:"onyx-select__footer onyx-text--small onyx-truncation-ellipsis"},Nt=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 u;if(n.multiple)return typeof n.multiple=="boolean"?"summary":((u=n.multiple)==null?void 0:u.textMode)??"summary"}),a=e.computed(()=>{if(n.modelValue&&l.value==="preview")return n.modelValue.length}),r=e.computed(()=>{if(Array.isArray(n.modelValue)){const u=n.modelValue.length;if(!u)return"";if(u===1)return n.modelValue[0];switch(l.value){case"preview":return n.modelValue.join(", ");case"summary":default:return t.value("selections.currentSelection",{n:u})}}return n.modelValue??""}),{requiredMarkerClass:s,requiredTypeClass:m}=B(n),{densityClass:i}=h(n);return(u,c)=>n.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-select-skeleton",e.unref(i)])},[n.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(v),{key:0,class:"onyx-select-skeleton__label"})),e.createVNode(e.unref(v),{class:"onyx-select-skeleton__input"})],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["onyx-select",e.unref(m),e.unref(i),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(s)])},[e.createElementVNode("div",Vt,e.toDisplayString(n.label),1)],2)),e.createElementVNode("div",St,[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":c[0]||(c[0]=y=>r.value=y),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,wt),[[e.vModelText,r.value]]),a.value?(e.openBlock(),e.createBlock(e.unref(z),{key:1,text:r.value,position:"bottom"},{default:e.withCtx(()=>[e.createVNode(e.unref($),{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(g),{icon:e.unref(Et),class:"onyx-select__icon"},null,8,["icon"])])]),n.message?(e.openBlock(),e.createElementBlock("div",Tt,e.toDisplayString(n.message),1)):e.createCommentVNode("",!0)],2))}}),Lt=["summary","preview"],Ot='<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>',Mt='<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>',$t=["title"],It=["aria-label","disabled","required"],Pt={class:"onyx-switch__container"},At={class:"onyx-switch__icon"},Dt=e.createElementVNode("div",{class:"onyx-switch__frame"},null,-1),Ft=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:r}=B(t),{densityClass:s}=h(t),{vCustomValidity:m}=V({props:t,emit:l}),i=e.computed({get:()=>t.modelValue,set:u=>{l("update:modelValue",u)}});return(u,c)=>t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-switch-skeleton",e.unref(s)])},[e.createVNode(v,{class:"onyx-switch-skeleton__input"}),t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(v,{key:0,class:"onyx-switch-skeleton__label"}))],2)):(e.openBlock(),e.createElementBlock("label",{key:1,class:e.normalizeClass(["onyx-switch",[e.unref(r),e.unref(s)]]),title:t.hideLabel?t.label:void 0},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=y=>i.value=y),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,It),[[e.vModelCheckbox,i.value],[e.unref(m)]]),e.createElementVNode("span",Pt,[e.createElementVNode("span",At,[t.loading?(e.openBlock(),e.createBlock(e.unref(x),{key:0,class:"onyx-switch__spinner",type:"circle"})):(e.openBlock(),e.createBlock(e.unref(g),{key:1,icon:i.value?e.unref(Ot):e.unref(Mt),size:"24px"},null,8,["icon"]))]),Dt]),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,$t))}}),zt={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}}=at({open:e.computed(()=>n.open)});return(r,s)=>(e.openBlock(),e.createElementBlock("div",zt,[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(g,{key:0,icon:n.icon,size:"16px"},null,8,["icon"])):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"tooltip",{},()=>[e.createElementVNode("span",null,e.toDisplayString(n.text),1)])],16),e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(t))),[e.renderSlot(r.$slots,"default")],16)]))}}),Rt=["top","bottom"],qt=["primary","secondary","neutral","danger","warning","success","info"],Ut=["small","default","large"],Ht=["ellipsis","multiline"],Gt=["horizontal","vertical"],jt=o=>({install:n=>{ve(n,o.i18n);const t=n.runWithContext(()=>E());e.watchEffect(()=>Kt(t.t.value("optional")))}}),Kt=o=>globalThis.document.body.style.setProperty("--onyx-global-optional-text",o);exports.AUTOCAPITALIZE=je;exports.BUTTON_MODES=fe;exports.BUTTON_TYPES=me;exports.BUTTON_VARIATIONS=ye;exports.DENSITIES=K;exports.DIRECTIONS=Gt;exports.HEADLINE_TYPES=$e;exports.ICON_SIZES=Ie;exports.INPUT_TYPES=Ge;exports.LINK_TARGETS=We;exports.MULTISELECT_TEXT_MODE=Lt;exports.ONYX_COLORS=qt;exports.OnyxAppLayout=j;exports.OnyxBadge=$;exports.OnyxButton=pe;exports.OnyxCheckboxGroup=Ne;exports.OnyxEmpty=A;exports.OnyxHeadline=T;exports.OnyxIcon=g;exports.OnyxIconButton=Ae;exports.OnyxInput=He;exports.OnyxLink=Xe;exports.OnyxListbox=yt;exports.OnyxLoadingIndicator=x;exports.OnyxPageLayout=xt;exports.OnyxRadioButtonGroup=Ct;exports.OnyxSelect=Nt;exports.OnyxSkeleton=v;exports.OnyxSwitch=Ft;exports.OnyxTooltip=z;exports.TEXT_SIZES=Ut;exports.TOOLTIP_POSITIONS=Rt;exports.TRUNCATION_TYPES=Ht;exports.createOnyx=jt;exports.useDensity=h;exports.useScrollEnd=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),q={key:0,class:"onyx-app__nav"},U={class:"onyx-app__page"},H={key:1,class:"onyx-app__page-overlay"},G={key:2,class:"onyx-app__app-overlay"},j=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",U,[e.renderSlot(l.$slots,"default")]),e.unref(t).pageOverlay?(e.openBlock(),e.createElementBlock("div",H,[e.renderSlot(l.$slots,"pageOverlay")])):e.createCommentVNode("",!0),e.unref(t).appOverlay?(e.openBlock(),e.createElementBlock("div",G,[e.renderSlot(l.$slots,"appOverlay")])):e.createCommentVNode("",!0)],2))}}),K=["compact","default","cozy"],x=o=>({densityClass:e.computed(()=>({[`onyx-density-${o.density}`]:o.density}))}),Y=["innerHTML"],g=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,Y))}}),T=(o,n)=>{const t=o.__vccOpts||o;for(const[l,a]of n)t[l]=a;return t},Z={},X={class:"onyx-circle-spinner",viewBox:"0 0 50 50"},W=e.createElementVNode("circle",{class:"onyx-circle-spinner__circle",cx:"50%",cy:"50%",r:"45%"},null,-1),J=[W];function Q(o,n){return e.openBlock(),e.createElementBlock("svg",X,J)}const ee=T(Z,[["render",Q]]),te={},oe={class:"onyx-loading-dots"},ne=e.createElementVNode("span",{class:"onyx-loading-dots__center"},null,-1),le=[ne];function ae(o,n){return e.openBlock(),e.createElementBlock("div",oe,le)}const re=T(te,[["render",ae]]),h=e.defineComponent({__name:"OnyxLoadingIndicator",props:{type:{default:"dots"}},setup(o){const n=o;return(t,l)=>n.type==="circle"?(e.openBlock(),e.createBlock(ee,{key:0})):n.type==="dots"?(e.openBlock(),e.createBlock(re,{key:1})):e.createCommentVNode("",!0)}}),se={},ie={"aria-hidden":"true",class:"onyx-skeleton"};function ce(o,n){return e.openBlock(),e.createElementBlock("figure",ie)}const v=T(se,[["render",ce]]),de=["disabled","type"],ue={key:2,class:"onyx-button__label onyx-truncation-ellipsis"},pe=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}=x(t),a=n;return(r,s)=>t.skeleton?(e.openBlock(),e.createBlock(v,{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:s[0]||(s[0]=m=>a("click"))},[t.icon&&!t.loading?(e.openBlock(),e.createBlock(g,{key:0,icon:t.icon},null,8,["icon"])):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(h,{key:1,class:"onyx-button__loading"})):(e.openBlock(),e.createElementBlock("span",ue,e.toDisplayString(t.label),1))],10,de))}}),me=["button","submit","reset"],ye=["primary","secondary","danger"],fe=["default","outline","plain"],M=e.defineComponent({__name:"OnyxBadge",props:{density:{},variation:{default:"primary"},icon:{}},setup(o){const n=o,{densityClass:t}=x(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(g,{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))}}),_e="(optional)",ke={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.'}},xe={selectAll:"Select all",currentSelection:"{n} selected"},he="No data available",O={optional:_e,validations:ke,selections:xe,empty:he},I=Symbol(),P=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,r={})=>{let s=L(a,t.value)??L(a,O)??"";const m=typeof r.n=="number"?r.n:void 0;return s=ge(s,m),be(s,r)});return{locale:n,t:l}},ve=(o,n)=>o.provide(I,P(n)),E=()=>e.inject(I,()=>P(),!0),L=(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},ge=(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]},be=(o,n)=>n?Object.entries(n).reduce((l,[a,r])=>r===void 0?l:l.replace(new RegExp(`{${a}}`,"gi"),r.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}))}),Be=()=>Object.entries(Object.getOwnPropertyDescriptors(ValidityState.prototype)).filter(([o,n])=>n.enumerable).map(([o])=>o),Ce=o=>Be().reduce((n,t)=>(n[t]=o[t],n),{}),Ee=(o,n)=>{const t=Object.entries(o).filter(([a,r])=>r!==void 0),l=Object.entries(n).filter(([a,r])=>r!==void 0);return t.length!==l.length?!1:t.every(([a,r])=>r===n[a])},V=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 r=Ce(a.validity);!t.value||!n.value&&r.valid||n.value&&Ee(r,n.value)||(n.value=r,o.emit("validityChange",n.value))},{immediate:!0})}}}},Ve={class:"onyx-checkbox__container"},Se=["aria-label","title","indeterminate","disabled","required"],S=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:u=>l("update:modelValue",u)}),{requiredMarkerClass:r,requiredTypeClass:s}=B(t),{densityClass:m}=x(t),{vCustomValidity:i}=V({props:t,emit:l});return(u,c)=>t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-checkbox-skeleton",e.unref(m)])},[e.createVNode(v,{class:"onyx-checkbox-skeleton__input"}),t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(v,{key:0,class:"onyx-checkbox-skeleton__label"}))],2)):(e.openBlock(),e.createElementBlock("label",{key:1,class:e.normalizeClass(["onyx-checkbox",[e.unref(s),e.unref(m)]])},[e.createElementVNode("div",Ve,[t.loading?(e.openBlock(),e.createBlock(e.unref(h),{key:0,class:"onyx-checkbox__loading",type:"circle"})):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,"onUpdate:modelValue":c[0]||(c[0]=y=>a.value=y),"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,Se)),[[e.vModelCheckbox,a.value],[e.unref(i)]])]),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(r):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(r)]])},null,2)):e.createCommentVNode("",!0)],64))],2))}}),Te=["disabled"],we={key:0,class:"onyx-checkbox-group__label"},Ne=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}=x(t),a=n,{t:r}=E(),s=(c,y)=>{const d=y?[...t.modelValue,c]:t.modelValue.filter(f=>f!==c);a("update:modelValue",d)},m=e.computed(()=>t.options.filter(c=>!c.disabled&&!c.skeleton)),i=c=>{const y=c?m.value.map(({id:d})=>d):[];a("update:modelValue",y)},u=e.computed(()=>{const c=m.value.map(({id:d})=>d),y=t.modelValue.filter(d=>c.includes(d));return!c.length||!y.length?{modelValue:!1}:y.length===c.length?{modelValue:!0}:{indeterminate:!0,modelValue:!1}});return(c,y)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["onyx-checkbox-group",e.unref(l)]),disabled:t.disabled},[t.headline?(e.openBlock(),e.createElementBlock("legend",we,[e.createVNode(e.unref(w),{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(S,e.mergeProps({key:0},u.value,{label:t.checkAllLabel||e.unref(r)("selections.selectAll"),"onUpdate:modelValue":i}),null,16,["label"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,d=>(e.openBlock(),e.createBlock(S,e.mergeProps({key:d.id.toString()},d,{"model-value":t.modelValue.includes(d.id),"onUpdate:modelValue":f=>s(d.id,f)}),null,16,["model-value","onUpdate:modelValue"]))),128))],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.skeleton,d=>(e.openBlock(),e.createBlock(S,{key:d,label:`Skeleton ${d}`,skeleton:""},null,8,["label"]))),128))],2)],10,Te))}}),Oe='<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>',Le={class:"onyx-empty"},$e={class:"onyx-empty__label onyx-text onyx-truncation-multiline"},A=e.defineComponent({__name:"OnyxEmpty",setup(o){return(n,t)=>(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(n.$slots,"icon",{},()=>[e.createVNode(g,{icon:e.unref(Oe),size:"48px"},null,8,["icon"])]),e.createElementVNode("div",$e,[e.renderSlot(n.$slots,"default")])]))}}),w=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"]))}}),Me=["h1","h2","h3","h4","h5","h6"],Ie=["12px","16px","24px","32px","48px","64px","96px"],Pe=["aria-label","title","disabled"],Ae=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}=x(t),a=n;return(r,s)=>(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:s[0]||(s[0]=m=>a("click"))},[t.loading?(e.openBlock(),e.createBlock(h,{key:0,type:"circle"})):t.icon?(e.openBlock(),e.createBlock(g,{key:1,icon:t.icon},null,8,["icon"])):e.renderSlot(r.$slots,"default",{key:2})],10,Pe))}}),De={class:"onyx-truncation-ellipsis"},ze={class:"onyx-input__wrapper"},Fe=["placeholder","type","required","autocapitalize","autocomplete","autofocus","name","pattern","readonly","disabled","minlength","maxlength","aria-label","title"],Re={key:0,class:"onyx-input__footer onyx-text--small"},qe={key:0,class:"onyx-truncation-ellipsis"},Ue={key:1,class:"onyx-input__counter"},He=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}=V({props:t,emit:l}),{requiredMarkerClass:r,requiredTypeClass:s}=B(t),{densityClass:m}=x(t),i=e.computed({get:()=>t.modelValue,set:d=>l("update:modelValue",d)}),u=d=>{const f=d.target.value;l("change",f)},c=e.computed(()=>t.pattern instanceof RegExp?t.pattern.source:t.pattern),y=e.computed(()=>t.withCounter&&t.maxlength);return(d,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-input",e.unref(s),e.unref(m)])},[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(r)])},[e.createElementVNode("div",De,e.toDisplayString(t.label),1)],2)),e.createElementVNode("div",ze,[t.loading?(e.openBlock(),e.createBlock(h,{key:0,class:"onyx-input__loading",type:"circle"})):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":f[0]||(f[0]=p=>i.value=p),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:c.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:u,onFocus:f[1]||(f[1]=p=>l("focus")),onBlur:f[2]||(f[2]=p=>l("blur"))},null,40,Fe),[[e.vModelDynamic,i.value],[e.unref(a)]])])]),t.message||y.value?(e.openBlock(),e.createElementBlock("div",Re,[t.message?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(t.message),1)):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("span",Ue,e.toDisplayString(i.value.length)+"/"+e.toDisplayString(t.maxlength),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),Ge=["email","password","search","tel","text","url"],je=["none","sentences","words","characters"],Ke='<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>',Ye=o=>/^http(s?):\/\//.test(o),Ze=["href","target","rel"],Xe=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:Ye(t.href));return(r,s)=>(e.openBlock(),e.createElementBlock("a",{class:"onyx-link",href:t.href,target:t.target,rel:t.target==="_blank"?"noreferrer":void 0,onClick:s[0]||(s[0]=m=>l("click"))},[e.renderSlot(r.$slots,"default"),a.value?(e.openBlock(),e.createBlock(g,{key:0,class:"onyx-link__icon",icon:e.unref(Ke),size:"16px"},null,8,["icon"])):e.createCommentVNode("",!0)],8,Ze))}}),We=["_self","_blank","_parent","_top"],D=o=>o,Je=(()=>{let o=1;return()=>o++})(),N=o=>`${o}-${Je()}`,Qe=o=>!tt.has(o),et=["Unidentified","Alt","AltGraph","CapsLock","Control","Fn","FnLock","Meta","NumLock","ScrollLock","Shift","Symbol","SymbolLock","Hyper","Super","Enter","Tab","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Home","PageDown","PageUp","Backspace","Clear","Copy","CrSel","Cut","Delete","EraseEof","ExSel","Insert","Paste","Redo","Undo","Accept","Again","Attn","Cancel","ContextMenu","Escape","Execute","Find","Help","Pause","Play","Props","Select","ZoomIn","ZoomOut","BrightnessDown","BrightnessUp","Eject","LogOff","Power","PowerOff","PrintScreen","Hibernate","Standby","WakeUp","AllCandidates","Alphanumeric","CodeInput","Compose","Convert","Dead","FinalMode","GroupFirst","GroupLast","GroupNext","GroupPrevious","ModeChange","NextCandidate","NonConvert","PreviousCandidate","Process","SingleCandidate","HangulMode","HanjaMode","JunjaMode","Eisu","Hankaku","Hiragana","HiraganaKatakana","KanaMode","KanjiMode","Katakana","Romaji","Zenkaku","ZenkakuHankaku","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","Soft1","Soft2","Soft3","Soft4","ChannelDown","ChannelUp","Close","MailForward","MailReply","MailSend","MediaClose","MediaFastForward","MediaPause","MediaPlay","MediaPlayPause","MediaRecord","MediaRewind","MediaStop","MediaTrackNext","MediaTrackPrevious","New","Open","Print","Save","SpellCheck","Key11","Key12","AudioBalanceLeft","AudioBalanceRight","AudioBassBoostDown","AudioBassBoostToggle","AudioBassBoostUp","AudioFaderFront","AudioFaderRear","AudioSurroundModeNext","AudioTrebleDown","AudioTrebleUp","AudioVolumeDown","AudioVolumeUp","AudioVolumeMute","MicrophoneToggle","MicrophoneVolumeDown","MicrophoneVolumeUp","MicrophoneVolumeMute","SpeechCorrectionList","SpeechInputToggle","LaunchApplication1","LaunchApplication2","LaunchCalendar","LaunchContacts","LaunchMail","LaunchMediaPlayer","LaunchMusicPlayer","LaunchPhone","LaunchScreenSaver","LaunchSpreadsheet","LaunchWebBrowser","LaunchWebCam","LaunchWordProcessor","BrowserBack","BrowserFavorites","BrowserForward","BrowserHome","BrowserRefresh","BrowserSearch","BrowserStop","AppSwitch","Call","Camera","CameraFocus","EndCall","GoBack","GoHome","HeadsetHook","LastNumberRedial","Notification","MannerMode","VoiceDial","TV","TV3DMode","TVAntennaCable","TVAudioDescription","TVAudioDescriptionMixDown","TVAudioDescriptionMixUp","TVContentsMenu","TVDataService","TVInput","TVInputComponent1","TVInputComponent2","TVInputComposite1","TVInputComposite2","TVInputHDMI1","TVInputHDMI2","TVInputHDMI3","TVInputHDMI4","TVInputVGA1","TVMediaContext","TVNetwork","TVNumberEntry","TVPower","TVRadioService","TVSatellite","TVSatelliteBS","TVSatelliteCS","TVSatelliteToggle","TVTerrestrialAnalog","TVTerrestrialDigital","TVTimer","AVRInput","AVRPower","ColorF0Red","ColorF1Green","ColorF2Yellow","ColorF3Blue","ColorF4Grey","ColorF5Brown","ClosedCaptionToggle","Dimmer","DisplaySwap","DVR","Exit","FavoriteClear0","FavoriteClear1","FavoriteClear2","FavoriteClear3","FavoriteRecall0","FavoriteRecall1","FavoriteRecall2","FavoriteRecall3","FavoriteStore0","FavoriteStore1","FavoriteStore2","FavoriteStore3","Guide","GuideNextDay","GuidePreviousDay","Info","InstantReplay","Link","ListProgram","LiveContent","Lock","MediaApps","MediaAudioTrack","MediaLast","MediaSkipBackward","MediaSkipForward","MediaStepBackward","MediaStepForward","MediaTopMenu","NavigateIn","NavigateNext","NavigateOut","NavigatePrevious","NextFavoriteChannel","NextUserProfile","OnDemand","Pairing","PinPDown","PinPMove","PinPToggle","PinPUp","PlaySpeedDown","PlaySpeedReset","PlaySpeedUp","RandomToggle","RcLowBattery","RecordSpeedNext","RfBypass","ScanChannelsToggle","ScreenModeNext","Settings","SplitScreenToggle","STBInput","STBPower","Subtitle","Teletext","VideoModeNext","Wink","ZoomToggle","AudioVolumeDown","AudioVolumeUp","AudioVolumeMute","BrowserBack","BrowserForward","ChannelDown","ChannelUp","ContextMenu","Eject","End","Enter","Home","MediaFastForward","MediaPlay","MediaPlayPause","MediaRecord","MediaRewind","MediaStop","MediaNextTrack","MediaPause","MediaPreviousTrack","Power","Unidentified"],tt=new Set(et),ot=(o,n)=>{let t;return(...l)=>{clearTimeout(t),t=setTimeout(()=>o(...l),n)}},nt=(o,n=500)=>{let t="";const l=ot(()=>t="",n);return a=>{Qe(a.key)&&(l(),t=`${t}${a.key}`,o(t))}},lt=D(o=>{const n=e.computed(()=>e.unref(o.multiselect)??!1),t=new Map,l=i=>(t.has(i)||t.set(i,N("listbox-option")),t.get(i)),a=e.ref(!1);e.watchEffect(()=>{var u;if(o.activeOption.value==null||!a.value&&!o.controlled)return;const i=l(o.activeOption.value);(u=document.getElementById(i))==null||u.scrollIntoView({block:"nearest",inline:"nearest"})});const r=nt(i=>{var u;return(u=o.onTypeAhead)==null?void 0:u.call(o,i)}),s=i=>{var u,c,y,d,f,p,_;switch(i.key){case" ":i.preventDefault(),o.activeOption.value!=null&&((u=o.onSelect)==null||u.call(o,o.activeOption.value));break;case"ArrowUp":if(i.preventDefault(),o.activeOption.value==null){(c=o.onActivateLast)==null||c.call(o);return}(y=o.onActivatePrevious)==null||y.call(o,o.activeOption.value);break;case"ArrowDown":if(i.preventDefault(),o.activeOption.value==null){(d=o.onActivateFirst)==null||d.call(o);return}(f=o.onActivateNext)==null||f.call(o,o.activeOption.value);break;case"Home":i.preventDefault(),(p=o.onActivateFirst)==null||p.call(o);break;case"End":i.preventDefault(),(_=o.onActivateLast)==null||_.call(o);break;default:r(i)}};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(()=>i=>({role:"group","aria-label":i.label})),option:e.computed(()=>i=>{const u=i.selected??!1;return{id:l(i.value),role:"option","aria-label":i.label,"aria-checked":n.value?u:void 0,"aria-selected":n.value?void 0:u,"aria-disabled":i.disabled,onClick:()=>{var c;return(c=o.onSelect)==null?void 0:c.call(o,i.value)}}})},state:{isFocused:a},internals:{getOptionId:l}}}),at=D(o=>{const n=N("tooltip"),t=e.ref(!1);let l;const a=e.computed(()=>{const d=e.unref(o.open);return typeof d!="object"?200:d.debounce}),r=e.computed(()=>{const d=e.unref(o.open);return typeof d!="object"?d:d.type}),s=e.computed({get:()=>t.value,set:d=>{clearTimeout(l),l=setTimeout(()=>{t.value=d},a.value)}}),m=e.computed(()=>typeof r.value=="boolean"?r.value:s.value),i=()=>{t.value=!t.value},u=e.computed(()=>{if(r.value==="hover")return{onMouseover:()=>s.value=!0,onMouseout:()=>s.value=!1,onFocusin:()=>t.value=!0,onFocusout:()=>t.value=!1}}),c=d=>{d.key==="Escape"&&(t.value=!1)},y=d=>{var _;const f=(_=document.getElementById(n))==null?void 0:_.parentElement;if(!f||!(d.target instanceof Node))return;!f.contains(d.target)&&(t.value=!1)};return e.onBeforeMount(()=>{document.addEventListener("keydown",c),e.watchEffect(()=>{r.value==="click"?document.addEventListener("click",y):document.removeEventListener("click",y)})}),e.onBeforeUnmount(()=>{document.addEventListener("keydown",c),document.addEventListener("click",y)}),{elements:{trigger:e.computed(()=>({"aria-describedby":n,onClick:r.value==="click"?i:void 0,...u.value})),tooltip:e.computed(()=>({role:"tooltip",id:n,tabindex:"-1",...u.value}))},state:{isVisible:m}}}),z=o=>{const t=e.ref(!1),l=r=>{const s=r.target;if(!(s instanceof Element))return;const m=e.unref(o.offset)??0;t.value=Math.abs(s.scrollTop)+s.clientHeight>=s.scrollHeight-m-1};return{vScrollEnd:{mounted:r=>{e.watchEffect(()=>{var m;(((m=o.enabled)==null?void 0:m.value)??!0)&&!o.loading.value?r.addEventListener("scroll",l):r.removeEventListener("scroll",l)})}},isScrollEnd:t}},rt={class:"onyx-truncation-ellipsis"},st=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",rt,[e.renderSlot(t.$slots,"default")])],2))}}),it=["aria-busy"],ct={key:0,class:"onyx-listbox__slot onyx-listbox__slot--loading"},dt={key:0,role:"presentation",class:"onyx-listbox__group-name onyx-text--small"},ut={key:0,class:"onyx-listbox__slot"},pt={key:1,class:"onyx-listbox__slot"},mt={key:3,class:"onyx-listbox__message onyx-text--small"},yt=e.defineComponent({__name:"OnyxListbox",props:{label:{},options:{},message:{},modelValue:{},loading:{type:Boolean,default:!1},lazyLoading:{}},emits:["update:modelValue","lazyLoad"],setup(o,{emit:n}){const t=o,l=n,a=e.useSlots(),{t:r}=E(),s=e.ref();e.watch(()=>t.modelValue,p=>{s.value=p});const{elements:{listbox:m,option:i,group:u}}=lt({label:e.computed(()=>t.label),selectedOption:e.computed(()=>t.modelValue),activeOption:s,onSelect:p=>{t.modelValue===p?l("update:modelValue",void 0):l("update:modelValue",p)},onActivateFirst:()=>{var p;return s.value=(p=t.options.at(0))==null?void 0:p.id},onActivateLast:()=>{var p;return s.value=(p=t.options.at(-1))==null?void 0:p.id},onActivateNext:p=>{const _=t.options.findIndex(k=>k.id===p);_<t.options.length-1&&(s.value=t.options[_+1].id)},onActivatePrevious:p=>{const _=t.options.findIndex(k=>k.id===p);_>0&&(s.value=t.options[_-1].id)},onTypeAhead:p=>{const _=t.options.find(k=>k.label.toLowerCase().trim().startsWith(p.toLowerCase()));_&&(s.value=_.id)}}),c=e.computed(()=>t.options.reduce((p,_)=>{const k=_.group??"";return p[k]=p[k]||[],p[k].push(_),p},{})),{vScrollEnd:y,isScrollEnd:d}=z({enabled:e.computed(()=>{var p;return((p=t.lazyLoading)==null?void 0:p.enabled)??!1}),loading:e.computed(()=>t.loading),offset:e.computed(()=>{var p;return(p=t.lazyLoading)==null?void 0:p.scrollOffset})});e.watchEffect(()=>{d.value&&l("lazyLoad")});const f=e.computed(()=>t.options.length===0);return(p,_)=>{var k;return e.openBlock(),e.createElementBlock("div",{class:"onyx-listbox","aria-busy":t.loading},[t.loading?(e.openBlock(),e.createElementBlock("div",ct,[e.createVNode(h,{class:"onyx-listbox__loading"})])):f.value?e.renderSlot(p.$slots,"empty",{key:1,defaultMessage:e.unref(r)("empty")},()=>[e.createVNode(A,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("empty")),1)]),_:1})]):e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps({key:2},e.unref(m),{class:"onyx-listbox__wrapper"}),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(R,C)=>(e.openBlock(),e.createElementBlock("ul",e.mergeProps({key:C,class:"onyx-listbox__group"},e.unref(u)({label:C})),[C!=""?(e.openBlock(),e.createElementBlock("li",dt,e.toDisplayString(C),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R,b=>(e.openBlock(),e.createBlock(st,e.mergeProps({key:b.id.toString()},e.unref(i)({value:b.id,label:b.label,disabled:b.disabled,selected:b.id===t.modelValue}),{active:b.id===s.value}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.label),1)]),_:2},1040,["active"]))),128))],16))),128)),(k=t.lazyLoading)!=null&&k.loading?(e.openBlock(),e.createElementBlock("li",ut,[e.createVNode(h,{class:"onyx-listbox__loading"})])):e.createCommentVNode("",!0),e.unref(a).optionsEnd?(e.openBlock(),e.createElementBlock("li",pt,[e.renderSlot(p.$slots,"optionsEnd")])):e.createCommentVNode("",!0)],16)),[[e.unref(y)]]),t.message?(e.openBlock(),e.createElementBlock("span",mt,e.toDisplayString(t.message),1)):e.createCommentVNode("",!0)],8,it)}}}),ft={key:0,class:"onyx-page__sidebar"},_t={class:"onyx-page__main"},kt={key:1,class:"onyx-page__footer"},xt={key:2,class:"onyx-page__toasts"},ht=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,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-page",l.value])},[e.unref(t).sidebar&&!n.hideSidebar?(e.openBlock(),e.createElementBlock("aside",ft,[e.renderSlot(a.$slots,"sidebar")])):e.createCommentVNode("",!0),e.createElementVNode("main",_t,[e.renderSlot(a.$slots,"default")]),e.unref(t).footer?(e.openBlock(),e.createElementBlock("footer",kt,[e.renderSlot(a.$slots,"footer")])):e.createCommentVNode("",!0),e.unref(t).toasts?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(a.$slots,"toasts")])):e.createCommentVNode("",!0)],2))}}),vt=["title"],gt=["required","name","value","checked","disabled"],$=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}=V({props:t,emit:l}),{densityClass:r}=x(t);return(s,m)=>t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-radio-button-skeleton",e.unref(r)])},[e.createVNode(v,{class:"onyx-radio-button-skeleton__input"}),e.createVNode(v,{class:"onyx-radio-button-skeleton__label"})],2)):(e.openBlock(),e.createElementBlock("label",{key:1,class:e.normalizeClass(["onyx-radio-button",e.unref(r)]),title:t.customError},[t.loading?(e.openBlock(),e.createBlock(e.unref(h),{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,gt)),[[e.unref(a)]]),e.createElementVNode("span",{class:e.normalizeClass(["onyx-radio-button__label",[`onyx-truncation-${t.truncation}`]])},e.toDisplayString(t.label),3)],10,vt))}}),bt=["disabled"],Bt={key:0,class:"onyx-radio-button-group__headline"},Ct=e.defineComponent({__name:"OnyxRadioButtonGroup",props:{density:{},required:{type:Boolean,default:!1},requiredMarker:{},customError:{},name:{default:()=>N("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}=x(t),{requiredMarkerClass:a,requiredTypeClass:r}=B(t),s=n,m=i=>s("update:modelValue",t.options.find(({id:u})=>i.target.value===u));return(i,u)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["onyx-radio-button-group",e.unref(l),e.unref(r)]),disabled:t.disabled,onChange:u[0]||(u[0]=c=>m(c))},[t.headline?(e.openBlock(),e.createElementBlock("legend",Bt,[e.createVNode(w,{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,(c,y)=>{var d;return e.openBlock(),e.createBlock($,e.mergeProps({key:c.id.toString()},c,{name:t.name,"custom-error":t.customError,selected:c.id===((d=t.modelValue)==null?void 0:d.id),required:t.required,onValidityChange:f=>y===0&&s("validityChange",f)}),null,16,["name","custom-error","selected","required","onValidityChange"])}),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.skeleton,c=>(e.openBlock(),e.createBlock($,{id:`skeleton-${c}`,key:c,label:"Skeleton ${i}",name:t.name,skeleton:""},null,8,["id","name"]))),128))],2)],42,bt))}}),Et='<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>',Vt={class:"onyx-truncation-ellipsis"},St={class:"onyx-select__wrapper"},Tt=["placeholder","required","disabled","aria-label","title"],wt={key:0,class:"onyx-select__footer onyx-text--small onyx-truncation-ellipsis"},Nt=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 u;if(n.multiple)return typeof n.multiple=="boolean"?"summary":((u=n.multiple)==null?void 0:u.textMode)??"summary"}),a=e.computed(()=>{if(n.modelValue&&l.value==="preview")return n.modelValue.length}),r=e.computed(()=>{if(Array.isArray(n.modelValue)){const u=n.modelValue.length;if(!u)return"";if(u===1)return n.modelValue[0];switch(l.value){case"preview":return n.modelValue.join(", ");case"summary":default:return t.value("selections.currentSelection",{n:u})}}return n.modelValue??""}),{requiredMarkerClass:s,requiredTypeClass:m}=B(n),{densityClass:i}=x(n);return(u,c)=>n.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-select-skeleton",e.unref(i)])},[n.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(v),{key:0,class:"onyx-select-skeleton__label"})),e.createVNode(e.unref(v),{class:"onyx-select-skeleton__input"})],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["onyx-select",e.unref(m),e.unref(i),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(s)])},[e.createElementVNode("div",Vt,e.toDisplayString(n.label),1)],2)),e.createElementVNode("div",St,[n.loading?(e.openBlock(),e.createBlock(h,{key:0,class:"onyx-select__loading",type:"circle"})):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=y=>r.value=y),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,Tt),[[e.vModelText,r.value]]),a.value?(e.openBlock(),e.createBlock(e.unref(F),{key:1,text:r.value,position:"bottom"},{default:e.withCtx(()=>[e.createVNode(e.unref(M),{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(g),{icon:e.unref(Et),class:"onyx-select__icon"},null,8,["icon"])])]),n.message?(e.openBlock(),e.createElementBlock("div",wt,e.toDisplayString(n.message),1)):e.createCommentVNode("",!0)],2))}}),Ot=["summary","preview"],Lt='<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>',$t='<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>',Mt=["title"],It=["aria-label","disabled","required"],Pt={class:"onyx-switch__container"},At={class:"onyx-switch__icon"},Dt=e.createElementVNode("div",{class:"onyx-switch__frame"},null,-1),zt=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:r}=B(t),{densityClass:s}=x(t),{vCustomValidity:m}=V({props:t,emit:l}),i=e.computed({get:()=>t.modelValue,set:u=>{l("update:modelValue",u)}});return(u,c)=>t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["onyx-switch-skeleton",e.unref(s)])},[e.createVNode(v,{class:"onyx-switch-skeleton__input"}),t.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(v,{key:0,class:"onyx-switch-skeleton__label"}))],2)):(e.openBlock(),e.createElementBlock("label",{key:1,class:e.normalizeClass(["onyx-switch",[e.unref(r),e.unref(s)]]),title:t.hideLabel?t.label:void 0},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=y=>i.value=y),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,It),[[e.vModelCheckbox,i.value],[e.unref(m)]]),e.createElementVNode("span",Pt,[e.createElementVNode("span",At,[t.loading?(e.openBlock(),e.createBlock(e.unref(h),{key:0,class:"onyx-switch__spinner",type:"circle"})):(e.openBlock(),e.createBlock(e.unref(g),{key:1,icon:i.value?e.unref(Lt):e.unref($t),size:"24px"},null,8,["icon"]))]),Dt]),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,Mt))}}),Ft={class:"onyx-table"},Rt=e.defineComponent({__name:"OnyxTable",props:{density:{}},setup(o){return(n,t)=>(e.openBlock(),e.createElementBlock("table",Ft,[e.renderSlot(n.$slots,"default")]))}}),qt={class:"onyx-tooltip-wrapper"},F=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}}=at({open:e.computed(()=>n.open)});return(r,s)=>(e.openBlock(),e.createElementBlock("div",qt,[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(g,{key:0,icon:n.icon,size:"16px"},null,8,["icon"])):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"tooltip",{},()=>[e.createElementVNode("span",null,e.toDisplayString(n.text),1)])],16),e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(t))),[e.renderSlot(r.$slots,"default")],16)]))}}),Ut=["top","bottom"],Ht={class:"onyx-text onyx-truncation-ellipsis"},Gt=e.defineComponent({__name:"OnyxTag",props:{density:{},label:{},color:{default:"primary"},icon:{}},setup(o){const n=o,{densityClass:t}=x(n);return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["onyx-tag",`onyx-tag--${n.color}`,e.unref(t)])},[n.icon?(e.openBlock(),e.createBlock(g,{key:0,icon:n.icon,size:"16px"},null,8,["icon"])):e.createCommentVNode("",!0),e.createElementVNode("span",Ht,e.toDisplayString(n.label),1)],2))}}),jt=["primary","secondary","neutral","danger","warning","success","info"],Kt=["small","default","large"],Yt=["ellipsis","multiline"],Zt=["horizontal","vertical"],Xt=o=>({install:n=>{ve(n,o.i18n);const t=n.runWithContext(()=>E());e.watchEffect(()=>Wt(t.t.value("optional")))}}),Wt=o=>globalThis.document.body.style.setProperty("--onyx-global-optional-text",o);exports.AUTOCAPITALIZE=je;exports.BUTTON_MODES=fe;exports.BUTTON_TYPES=me;exports.BUTTON_VARIATIONS=ye;exports.DENSITIES=K;exports.DIRECTIONS=Zt;exports.HEADLINE_TYPES=Me;exports.ICON_SIZES=Ie;exports.INPUT_TYPES=Ge;exports.LINK_TARGETS=We;exports.MULTISELECT_TEXT_MODE=Ot;exports.ONYX_COLORS=jt;exports.OnyxAppLayout=j;exports.OnyxBadge=M;exports.OnyxButton=pe;exports.OnyxCheckboxGroup=Ne;exports.OnyxEmpty=A;exports.OnyxHeadline=w;exports.OnyxIcon=g;exports.OnyxIconButton=Ae;exports.OnyxInput=He;exports.OnyxLink=Xe;exports.OnyxListbox=yt;exports.OnyxLoadingIndicator=h;exports.OnyxPageLayout=ht;exports.OnyxRadioButtonGroup=Ct;exports.OnyxSelect=Nt;exports.OnyxSkeleton=v;exports.OnyxSwitch=zt;exports.OnyxTable=Rt;exports.OnyxTag=Gt;exports.OnyxTooltip=F;exports.TEXT_SIZES=Kt;exports.TOOLTIP_POSITIONS=Ut;exports.TRUNCATION_TYPES=Yt;exports.createOnyx=Xt;exports.useDensity=x;exports.useScrollEnd=z;
package/dist/index.d.ts CHANGED
@@ -33,8 +33,12 @@ export * from './components/OnyxSelect/types';
33
33
  export { default as OnyxSkeleton } from './components/OnyxSkeleton/OnyxSkeleton.vue';
34
34
  export { default as OnyxSwitch } from './components/OnyxSwitch/OnyxSwitch.vue';
35
35
  export * from './components/OnyxSwitch/types';
36
+ export { default as OnyxTable } from './components/OnyxTable/OnyxTable.vue';
37
+ export * from './components/OnyxTable/types';
36
38
  export { default as OnyxTooltip } from './components/OnyxTooltip/OnyxTooltip.vue';
37
39
  export * from './components/OnyxTooltip/types';
40
+ export { default as OnyxTag } from './components/OnyxTag/OnyxTag.vue';
41
+ export * from './components/OnyxTag/types';
38
42
  export * from './composables/density';
39
43
  export * from './composables/scrollEnd';
40
44
  export type { OnyxTranslations, ProvideI18nOptions } from './i18n';