@black-kro/ui
Advanced tools
Comparing version 0.1.47 to 0.1.48
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("@vueuse/core"),o=require("@purge-icons/generated"),r=require("focus-trap");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(o),l=a(r);let s;const i=()=>{s=t.useLocalStorage("kro.theme","default-dark"),e.watch(()=>s.value,()=>{document.documentElement.className="kro-theme__"+s.value},{immediate:!0})},c=[{name:"to",description:"Denotes the target route of the link.",type:"string | object",values:"-",default:"undefined"},{name:"exact",description:"Exactly match the link. Without this, '/' will match every route.",type:"bool",values:"-",default:"undefined"},{name:"activeClass",description:"Configure the active CSS class applied when the link is active",type:"string",values:"-",default:"undefined"},{name:"exactActiveClass",description:"Configure the active CSS class applied when the link is active with exact match.",type:"string",values:"-",default:"undefined"},{name:"href",description:"Designates the component as anchor and applies the href attribute.",type:"string",values:"-",default:"undefined"},{name:"target",description:"Designates the target attribute. This should only be applied when using the href prop.",type:"string",values:"-",default:"undefined"}],d={to:{type:[String,Object]},href:String,target:{type:String,default:"_blank"},exact:{type:Boolean,default:!1},activeClass:String,exactActiveClass:String},u=t=>({tag:t.to?"router-link":t.href?"a":null,componentProps:e.computed(()=>t.to?{to:t.to}:t.href?{href:t.href}:{}),routeData:t}); | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("@vueuse/core");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(require("focus-trap"));let a;const n=()=>{a=t.useLocalStorage("kro.theme","default-dark"),e.watch(()=>a.value,()=>{document.documentElement.className="kro-theme__"+a.value},{immediate:!0})},l=Symbol("Provides instance of @purge-icons/generated");const s=[{name:"to",description:"Denotes the target route of the link.",type:"string | object",values:"-",default:"undefined"},{name:"exact",description:"Exactly match the link. Without this, '/' will match every route.",type:"bool",values:"-",default:"undefined"},{name:"activeClass",description:"Configure the active CSS class applied when the link is active",type:"string",values:"-",default:"undefined"},{name:"exactActiveClass",description:"Configure the active CSS class applied when the link is active with exact match.",type:"string",values:"-",default:"undefined"},{name:"href",description:"Designates the component as anchor and applies the href attribute.",type:"string",values:"-",default:"undefined"},{name:"target",description:"Designates the target attribute. This should only be applied when using the href prop.",type:"string",values:"-",default:"undefined"}],i={to:{type:[String,Object]},href:String,target:{type:String,default:"_blank"},exact:{type:Boolean,default:!1},activeClass:String,exactActiveClass:String},c=t=>({tag:t.to?"router-link":t.href?"a":null,componentProps:e.computed(()=>t.to?{to:t.to}:t.href?{href:t.href}:{}),routeData:t}); | ||
/*! ***************************************************************************** | ||
@@ -16,2 +16,2 @@ Copyright (c) Microsoft Corporation. | ||
***************************************************************************** */ | ||
function p(e,t,o,r){return new(o||(o=Promise))((function(a,n){function l(e){try{i(r.next(e))}catch(e){n(e)}}function s(e){try{i(r.throw(e))}catch(e){n(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(l,s)}i((r=r.apply(e,t||[])).next())}))}var m=e.defineComponent(Object.assign(Object.assign({},{name:"KroIcon"}),{props:{icon:{type:String,required:!0}},setup:function(t){const o=e.ref(null),r=()=>p(this,void 0,void 0,(function*(){if(o.value){yield e.nextTick();const r=n.default.renderSVG(t.icon,{});if(r)o.value.textContent="",o.value.appendChild(r);else{const e=document.createElement("span");e.className="iconify",e.dataset.icon=t.icon,o.value.textContent="",o.value.appendChild(e)}}}));return e.watch(()=>t.icon,r,{flush:"post"}),e.onMounted(r),{el:o}}}));m.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",{ref:"el",class:[t.$attrs.class,"kro-icon"]},null,2)},m.__file="src/components/Icon/Icon.vue";var f={name:"KroSpinner"};const v={class:"kro-spinner"};f.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",v)},f.__file="src/components/Spinner/Spinner.vue";var k={name:"KroSquircle"};const h={class:"kro-squircle",viewBox:"0 0 400 400","enable-background":"new 0 0 400 400","xml:space":"preserve"},y=e.createVNode("path",{d:"M 0,200 C 0,0 0,0 200,0 S 400,0 400,200 400,400 200,400 0,400 0,200"},null,-1);k.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("svg",h,[y])},k.__file="src/components/Squircle/Squircle.vue";var g={name:"KroButton",components:{KroIcon:m,KroSpinner:f,KroSquircle:k},props:Object.assign(Object.assign({},d),{loading:{type:Boolean,default:!1},type:String,primary:Boolean,outline:Boolean,raised:Boolean,icon:String,hideExternalIcon:Boolean,warning:Boolean,error:Boolean,success:Boolean}),setup(t){const{tag:o,componentProps:r}=u(t);return{componentProps:r,componentType:e.computed(()=>o||"button")}}};const b={class:"kro-button__spinner"};g.render=function(t,o,r,a,n,l){const s=e.resolveComponent("kro-squircle"),i=e.resolveComponent("kro-icon"),c=e.resolveComponent("kro-spinner");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.componentType),e.mergeProps({class:{"kro-button":!0,"kro-button--primary":r.primary,"kro-button--outline":r.outline,"kro-button--raised":r.raised,"kro-button--warning":r.warning,"kro-button--success":r.success,"kro-button--error":r.error,"kro-button--is-icon-button":r.icon&&!t.$slots.default},rel:"noreferrer"},a.componentProps,{target:t.href?t.target:""}),{default:e.withCtx(()=>[r.icon&&!t.$slots.default?(e.openBlock(),e.createBlock(s,{key:0,class:"kro-button__squircle"})):e.createCommentVNode("v-if",!0),e.createVNode("span",{class:{"kro-button__content":!0,"kro-button__content--is-loading":r.loading}},[r.icon?(e.openBlock(),e.createBlock(i,{key:0,class:"kro-button__icon",icon:r.icon},null,8,["icon"])):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"default"),!t.href||r.icon&&!t.$slots.default||r.hideExternalIcon?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(i,{key:1,icon:"external"}))],2),e.withDirectives(e.createVNode("span",b,[e.createVNode(c)],512),[[e.vShow,r.loading]])]),_:3},16,["class","target"])},g.__file="src/components/Button/Button.vue";const _={title:"KroButton",description:"A styled button with added functionality",props:[{name:"loading",description:"Displays a loading indicator over the button",type:"bool",values:"-",default:"false"},{name:"type",description:"The type of the button",type:"string",values:["button","reset","submit"],default:"button"},{name:"primary",description:"Applies a style to the button to indicate that it is a primary button",type:"bool",values:"-",default:"false"},{name:"outline",description:"Give the button an outline style",type:"bool",values:"-",default:"false"},{name:"raised",description:"Apply a shadow to the button",type:"string",values:"-",default:"false"},{name:"icon",description:"Adds an icon to the button",type:"string",values:"-",default:"undefined"},{name:"hideExternalIcon",description:"Hides the external link icon for buttons that are links.",type:"bool",values:"-",default:"false"},...c]};var B={name:"KroButtonGroup"};const x={class:"kro-button-group"};B.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",x,[e.renderSlot(t.$slots,"default")])},B.__file="src/components/ButtonGroup/ButtonGroup.vue";var S={name:"KroSwitch",props:{value:String},emits:["update:modelValue"],setup:(e,{emit:t,attrs:o})=>({update:r=>{r.target.checked?e.value?Array.isArray(o.modelValue)&&t("update:modelValue",[...o.modelValue,e.value]):t("update:modelValue",!0):e.value?Array.isArray(o.modelValue)&&t("update:modelValue",o.modelValue.filter(t=>t!==e.value)):t("update:modelValue",!1)}})};const w={class:"kro-switch"},V={class:"kro-switch__container"},C={class:"kro-switch__track"},N=e.createVNode("div",{class:"kro-switch__knob"},null,-1),K={key:0,class:"kro-switch__label"};S.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",w,[e.createVNode("div",V,[e.createVNode("input",{class:"kro-switch__input",checked:Array.isArray(t.$attrs.modelValue)?t.$attrs.modelValue.indexOf(r.value)>-1:!!t.$attrs.modelValue,type:"checkbox",onChange:o[1]||(o[1]=(...e)=>a.update(...e))},null,40,["checked"]),e.createVNode("div",C,[e.createVNode("div",{class:{"kro-switch__track-active":!0,"kro-switch__track-active--is-active":Array.isArray(t.$attrs.modelValue)?t.$attrs.modelValue.indexOf(r.value)>-1:!!t.$attrs.modelValue}},null,2)]),e.createVNode("div",{class:{"kro-switch__knob-container":!0,"kro-switch__knob-container--is-active":Array.isArray(t.$attrs.modelValue)?t.$attrs.modelValue.indexOf(r.value)>-1:!!t.$attrs.modelValue}},[N],2)]),t.$slots.default?(e.openBlock(),e.createBlock("div",K,[e.renderSlot(t.$slots,"default")])):e.createCommentVNode("v-if",!0)])},S.__file="src/components/Switch/Switch.vue";var $={name:"KroTextfield",props:{label:{type:String},type:{type:String,default:"text"},required:{type:Boolean},disabled:{type:Boolean},multiline:{type:Boolean},readonly:{type:Boolean},autofocus:{type:Boolean},min:{type:Number},max:{type:Number},maxlength:{type:Number},name:{type:String},id:{type:String},autoResize:{type:Boolean,default:!0},loading:{type:Boolean},success:{type:Boolean},error:{type:Boolean},message:{type:String}},emits:["update:modelValue"],setup(t){const o=e.ref(!1),r=e.ref();return{focused:o,runAutoResize:()=>{t.autoResize&&r.value&&(r.value.style.height="auto",r.value.style.height=r.value.scrollHeight+"px")},inputRef:r}}};const A={key:2,class:"block pr-2"},D={key:0,class:"pl-4 text-xs font-medium"};$.render=function(t,o,r,a,n,l){const s=e.resolveComponent("kro-spinner"),i=e.resolveComponent("kro-icon");return e.openBlock(),e.createBlock("div",{class:["kro-textfield",{"kro-textfield--is-textarea":r.multiline}]},[e.createVNode("div",{class:{"kro-textfield__container":!0,"kro-textfield--focused":a.focused,"kro-textfield--has-text":t.$attrs.modelValue,"kro-textfield--is-textarea":r.multiline}},[e.createVNode("label",{class:{"kro-textfield__label":!0,"kro-textfield--focused":a.focused,"kro-textfield--has-text":t.$attrs.modelValue},for:r.id},e.toDisplayString(r.label),11,["for"]),e.createVNode("span",{class:{"kro-textfield__pseudo-label":!0,"kro-textfield--focused":a.focused,"kro-textfield--has-text":t.$attrs.modelValue}},e.toDisplayString(r.label),3),r.multiline?(e.openBlock(),e.createBlock("textarea",{key:1,id:r.id,ref:"inputRef",class:"kro-textfield__input",disabled:r.disabled,required:r.required,readonly:r.readonly,autofocus:r.autofocus,maxlength:r.maxlength,name:r.name,value:t.$attrs.modelValue,onInput:o[4]||(o[4]=e=>{t.$emit("update:modelValue",e.target.value),a.runAutoResize()}),onFocus:o[5]||(o[5]=e=>a.focused=!0),onBlur:o[6]||(o[6]=e=>a.focused=!1)},null,40,["id","disabled","required","readonly","autofocus","maxlength","name","value"])):(e.openBlock(),e.createBlock("input",{key:0,class:"kro-textfield__input",id:r.id,disabled:r.disabled,required:r.required,readonly:r.readonly,autofocus:r.autofocus,type:r.type,min:r.min,max:r.max,maxlength:r.maxlength,name:r.name,value:t.$attrs.modelValue,onInput:o[1]||(o[1]=e=>t.$emit("update:modelValue",e.target.value)),onFocus:o[2]||(o[2]=e=>a.focused=!0),onBlur:o[3]||(o[3]=e=>a.focused=!1)},null,40,["id","disabled","required","readonly","autofocus","type","min","max","maxlength","name","value"])),r.loading||r.success||r.error?(e.openBlock(),e.createBlock("div",A,[r.loading?(e.openBlock(),e.createBlock(s,{key:0,class:"kro-textfield__spinner"})):r.success?(e.openBlock(),e.createBlock(i,{key:1,class:"kro-textfield__success-icon",icon:"mdi:check"})):r.error?(e.openBlock(),e.createBlock(i,{key:2,class:"kro-textfield__error-icon",icon:"mdi:alert"})):e.createCommentVNode("v-if",!0)])):e.createCommentVNode("v-if",!0)],2),t.$slots.default?(e.openBlock(),e.createBlock("div",D,[e.renderSlot(t.$slots,"default")])):e.createCommentVNode("v-if",!0)],2)},$.__file="src/components/Textfield/Textfield.vue";var T={name:"KroToolbar",props:{small:Boolean,padded:Boolean,raised:Boolean}};T.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",{class:{"kro-toolbar":!0,"kro-toolbar--small":r.small,"kro-toolbar--raised":r.raised,"kro-toolbar--padded":r.padded}},[e.renderSlot(t.$slots,"default")],2)},T.__file="src/components/Toolbar/Toolbar.vue";var M={name:"KroSurface",props:{padded:{type:Boolean,default:!0},raised:{type:Boolean,default:!0},outline:{type:Boolean,default:!1},icon:String,label:String}};const O={key:0,class:"kro-surface__label-container"},q={key:1,class:"kro-surface__label"};M.render=function(t,o,r,a,n,l){const s=e.resolveComponent("kro-icon");return e.openBlock(),e.createBlock("div",{class:{"kro-surface":!0,"kro-surface--padded":r.padded,"kro-surface--raised":r.raised,"kro-surface--outline":r.outline}},[r.icon||r.label?(e.openBlock(),e.createBlock("div",O,[r.icon?(e.openBlock(),e.createBlock(s,{key:0,class:"kro-surface__icon",icon:r.icon},null,8,["icon"])):e.createCommentVNode("v-if",!0),r.label?(e.openBlock(),e.createBlock("div",q,e.toDisplayString(r.label),1)):e.createCommentVNode("v-if",!0)])):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"default")],2)},M.__file="src/components/Surface/Surface.vue";const L=e.defineComponent({emits:["update:active","activate","deactivate"],props:{active:{type:Boolean,default:!0},escapeDeactivates:{type:Boolean,default:!0},returnFocusOnDeactivate:{type:Boolean,default:!0},allowOutsideClick:{type:Boolean,default:!0},initialFocus:{type:[String,Function],default:void 0},fallbackFocus:{type:[String,Function],default:void 0}},setup(t,{slots:o,emit:r}){let a;const n=e.ref(null);return e.onMounted(()=>{e.watch(()=>t.active,e=>{var o,s;e&&n.value?(a=l.default(n.value,{escapeDeactivates:t.escapeDeactivates,allowOutsideClick:()=>t.allowOutsideClick,returnFocusOnDeactivate:t.returnFocusOnDeactivate,onActivate:()=>{r("update:active",!0),r("activate")},onDeactivate:()=>{r("update:active",!1),r("deactivate")},initialFocus:"string"==typeof t.initialFocus?t.initialFocus:null!==(s=null===(o=t.initialFocus)||void 0===o?void 0:o.call(t))&&void 0!==s?s:n.value,fallbackFocus:t.fallbackFocus}),a.activate()):null==a||a.deactivate()},{immediate:!0})}),e.onUnmounted(()=>{null==a||a.deactivate(),a=null}),()=>{var t;const r=null===(t=o.default)||void 0===t?void 0:t.call(o);if(!r||!r.length||r.length>1)throw new Error("FocusTrap requires exactly one child");return e.cloneVNode(r[0],{ref:n})}}}),j=()=>({disableDocumentScroll:()=>{document.documentElement.classList.add("kro-helper--prevent-scroll")},enableDocumentScroll:()=>{document.documentElement.classList.remove("kro-helper--prevent-scroll")},disableDocumentSelect:()=>{document.documentElement.classList.add("kro-helper--prevent-select")},enableDocumentSelect:()=>{document.documentElement.classList.remove("kro-helper--prevent-select")},enableAppFocus:()=>{var e;null===(e=document.querySelector("#app"))||void 0===e||e.removeAttribute("tabindex")},disableAppFocus:()=>{var e;null===(e=document.querySelector("#app"))||void 0===e||e.setAttribute("tabindex","-1")}}),E={title:"Dialog Title",message:"Dialog Message",style:"default",resolveButton:{text:"Ok",attributes:{primary:!0}},rejectButton:{text:"Cancel"}},P={title:"Confirmation Dialog",message:"Dialog Message",icon:"mdi:help-circle",style:"default",resolveButton:{text:"Ok",attributes:{primary:!0}},rejectButton:{text:"Cancel"}},F=e.ref([]),I=(t,o,r)=>{const a=Object.assign(Object.assign({},t),{isOpen:e.ref(!0),resolve:o,reject:r,destroy(){F.value.splice(F.value.indexOf(this),1)}});F.value=[...F.value,a]};const z={name:"KroDialog",components:{KroSurface:M,FocusTrap:L},inheritAttrs:!1,emits:["update:modelValue","close","open","close-animation-end"]};var H=e.defineComponent(Object.assign(Object.assign({},z),{props:{persistent:{type:null,required:!1}},setup:function(t,{emit:o,attrs:r}){const{disableDocumentScroll:a,enableDocumentScroll:n}=j(),l=e.ref(null);let s=!1;e.onUpdated(()=>{s||!0!==r.modelValue||(o("update:modelValue",!0),o("open"),a(),window.addEventListener("keydown",c),l.value&&l.value.focus())});const i=()=>{s=!0,o("update:modelValue",!0),o("open"),a(),window.addEventListener("keydown",c),l.value&&l.value.focus()},c=e=>{(e=>"keydown"!==(null==e?void 0:e.type)||"Escape"===e.key&&!t.persistent)(e)&&(o("update:modelValue",!1),o("close"),window.removeEventListener("keydown",c),n(),s=!1)};return{dialog:l,onDialogLeaveAnimationComplete:()=>{o("close-animation-end")},open:i,close:c,toggle:()=>{r.modelValue?c(null):i()}}}}));const R={ref:"dialog",tabindex:"-1",class:"kro-dialog__container"},W={class:"grid grid-row gap-4"},G={key:0,class:"kro-dialog__header text-lg"},U={class:"kro-dialog__body"},X={key:1,class:"kro-dialog__footer"};H.render=function(t,o,r,a,n,l){const s=e.resolveComponent("focus-trap"),i=e.resolveComponent("kro-surface");return e.openBlock(),e.createBlock(e.Fragment,null,[e.renderSlot(t.$slots,"activator",{close:a.close,open:a.open,toggle:a.toggle}),(e.openBlock(),e.createBlock(e.Teleport,{to:"#kro-portal"},[e.createVNode(e.Transition,{appear:"",name:"kro-dialog-scrim"},{default:e.withCtx(()=>[t.$attrs.modelValue?(e.openBlock(),e.createBlock("div",{key:0,class:"kro-dialog__scrim fixed inset-0",onClick:o[1]||(o[1]=()=>{r.persistent||a.close()})})):e.createCommentVNode("v-if",!0)]),_:1}),e.createVNode("div",R,[e.createVNode(e.Transition,{appear:"",name:"kro-dialog","onAfter-leave":a.onDialogLeaveAnimationComplete},{default:e.withCtx(()=>[t.$attrs.modelValue?(e.openBlock(),e.createBlock(i,e.mergeProps({key:0,class:"kro-dialog"},t.$attrs),{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.$attrs.modelValue,"onUpdate:modelValue":o[2]||(o[2]=e=>t.$attrs.modelValue=e)},{default:e.withCtx(()=>[e.createVNode("div",W,[t.$slots.header?(e.openBlock(),e.createBlock("div",G,[e.renderSlot(t.$slots,"header",{open:a.open,close:a.close,toggle:a.toggle})])):e.createCommentVNode("v-if",!0),e.createVNode("div",U,[e.renderSlot(t.$slots,"default",{open:a.open,close:a.close,toggle:a.toggle})]),t.$slots.footer?(e.openBlock(),e.createBlock("div",X,[e.renderSlot(t.$slots,"footer",{open:a.open,close:a.close,toggle:a.toggle})])):e.createCommentVNode("v-if",!0)])]),_:3},8,["modelValue"])]),_:1},16)):e.createCommentVNode("v-if",!0)]),_:1},8,["onAfter-leave"])],512)]))],64)},H.__file="src/components/Dialog/Dialog.vue";var Y={name:"KroDivider",props:{vertical:Boolean,inset:Boolean,label:String}};const Q={key:0};Y.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",{class:["kro-divider",{"kro-divider--vertical":r.vertical,"kro-divider--inset":r.inset}]},[r.label?(e.openBlock(),e.createBlock("span",Q,e.toDisplayString(r.label),1)):e.createCommentVNode("v-if",!0)],2)},Y.__file="src/components/Divider/Divider.vue";var J={name:"KroAlert",components:{KroIcon:m,KroButton:g},props:{type:{type:String,default:"info"},dismissible:{type:Boolean,default:!1},tag:{type:String,default:"div"},icon:String,outline:{type:Boolean,default:!1}},emits:["dismissed","show"],setup(t,{emit:o}){const r=e.ref(!1);return{iconName:e.computed(()=>{const{type:e,icon:o}=t;return o||("warning"===e||"info"===e?"mdi:alert-circle":"error"===e?"mdi:alert":"success"===e?"mdi:check":null)}),isHidden:r,hide:()=>{o("dismissed"),r.value=!0},show:()=>{o("show"),r.value=!1}}}};const Z={class:"kro-alert__icon"},ee={key:0};J.render=function(t,o,r,a,n,l){const s=e.resolveComponent("kro-icon"),i=e.resolveComponent("kro-button");return e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.tag),{class:{"kro-alert":!0,"kro-alert--error":"error"===r.type,"kro-alert--info":"info"===r.type,"kro-alert--warning":"warning"===r.type,"kro-alert--success":"success"===r.type,"kro-alert--outline":r.outline,"kro-alert--has-icon":a.iconName,"kro-alert--is-dismissible":r.dismissible}},{default:e.withCtx(()=>[e.createVNode("div",Z,[a.iconName?(e.openBlock(),e.createBlock(s,{key:0,icon:a.iconName},null,8,["icon"])):e.createCommentVNode("v-if",!0)]),e.createVNode("div",null,[e.renderSlot(t.$slots,"default")]),r.dismissible?(e.openBlock(),e.createBlock("div",ee,[e.createVNode(i,{icon:"close",onClick:a.hide},null,8,["onClick"])])):e.createCommentVNode("v-if",!0)]),_:3},8,["class"])),[[e.vShow,!a.isHidden]])},J.__file="src/components/Alert/Alert.vue";var te=e.defineComponent(Object.assign(Object.assign({},{name:"ComposableDialogs"}),{setup:function(){return{instances:F}}}));te.render=function(t,o,r,a,n,l){const s=e.resolveComponent("kro-icon"),i=e.resolveComponent("kro-button"),c=e.resolveComponent("kro-dialog");return e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.instances,(t,o)=>(e.openBlock(),e.createBlock("div",{key:o},[e.createVNode(c,{modelValue:t.isOpen,"onUpdate:modelValue":e=>t.isOpen=e,class:{"kro-composable-dialog--centered":"centered"===t.style},"onClose-animation-end":e=>t.destroy()},{header:e.withCtx(()=>[e.createVNode("div",{class:["flex items-center",{"flex-col":"centered"===t.style}]},[t.icon?(e.openBlock(),e.createBlock(s,{key:0,style:{color:t.iconColor?t.iconColor:""},class:[{"kro-composable-dialog__icon--large":"centered"===t.style},"mr-4"],icon:t.icon},null,8,["style","class","icon"])):e.createCommentVNode("v-if",!0),e.createTextVNode(" "+e.toDisplayString(t.title),1)],2)]),default:e.withCtx(()=>[e.createVNode("div",{class:{"text-center":"centered"===t.style}},e.toDisplayString(t.message),3)]),footer:e.withCtx(({close:o})=>[e.createVNode("div",{class:["flex flex-row flex-1 gap-4",{"justify-end":"centered"!==t.style,"justify-center":"centered"===t.style}]},[t.rejectButton.hidden?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(i,e.mergeProps({key:0},t.rejectButton.attributes,{onClick:()=>{t.reject(),o()}}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.rejectButton.text),1)]),_:2},1040,["onClick"])),t.resolveButton.hidden?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(i,e.mergeProps({key:1},t.resolveButton.attributes,{onClick:()=>{t.resolve(),o()}}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.resolveButton.text),1)]),_:2},1040,["onClick"]))],2)]),_:2},1032,["modelValue","onUpdate:modelValue","class","onClose-animation-end"])]))),128)},te.__file="src/components/App/components/ComposableDialogs.vue";var oe={name:"KroApp",components:{ComposableDialogs:te}};const re={class:"kro-app"},ae={class:"kro-app__content"};oe.render=function(t,o,r,a,n,l){const s=e.resolveComponent("composable-dialogs");return e.openBlock(),e.createBlock("div",re,[e.createVNode("div",ae,[e.renderSlot(t.$slots,"default")]),e.createVNode(s)])},oe.__file="src/components/App/App.vue";var ne={name:"KroListItem",props:Object.assign(Object.assign({},d),{tag:{type:String,default:"div"}}),setup(t){const{tag:o,componentProps:r}=u(t);return{componentProps:r,componentType:e.computed(()=>o||"div")}}};const le={key:0,class:"kro-list-item__icon"},se={class:"kro-list-item__content"},ie={class:"kro-list-item__title"},ce={key:0,class:"kro-list-item__subtitle"},de={key:1,class:"kro-list-item__action"};ne.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.componentType),e.mergeProps(a.componentProps,{class:"kro-list-item"}),{default:e.withCtx(()=>[t.$slots.icon?(e.openBlock(),e.createBlock("div",le,[e.renderSlot(t.$slots,"icon")])):e.createCommentVNode("v-if",!0),e.createVNode("div",se,[e.createVNode("span",ie,[e.renderSlot(t.$slots,"default")]),t.$slots.subtitle?(e.openBlock(),e.createBlock("span",ce,[e.renderSlot(t.$slots,"subtitle")])):e.createCommentVNode("v-if",!0)]),t.$slots.action?(e.openBlock(),e.createBlock("div",de,[e.renderSlot(t.$slots,"action")])):e.createCommentVNode("v-if",!0)]),_:3},16)},ne.__file="src/components/List/ListItem.vue";const ue={title:"KroListItem",description:"",props:[{name:"tag",description:"",type:"string",values:"-",default:"div"},...c],slots:[{name:"#icon",description:"Item icon slot",props:[]},{name:"#subtitle",description:"Item subtitle slot",props:[]},{name:"#action",description:"Action on the right side of the item",props:[]},{name:"#default",description:"Main text of the item",props:[]}]};var pe={name:"KroMenu",props:{offsetX:{type:Boolean,default:!1},offsetY:{type:Boolean,default:!1},left:Boolean,right:Boolean,top:Boolean,bottom:Boolean},emits:["open","close"],setup(t,{emit:o}){const r=e.ref(!1),a=e.ref(null),n=e.ref(null),l=e.reactive({"kro-menu__content--y-bottom":!1,"kro-menu__content--y-bottom-offset":!1,"kro-menu__content--y-top":!1,"kro-menu__content--y-top-offset":!1,"kro-menu__content--x-left":!1,"kro-menu__content--x-left-offset":!1,"kro-menu__content--x-right":!1,"kro-menu__content--x-right-offset":!1}),s=()=>{Object.keys(l).forEach(e=>l[e]=!1);const{offsetX:e,offsetY:s,left:i,right:c,top:d,bottom:u}=t,{canFit:p}=((e,t,o)=>{if(!e.value||!t.value)return{canFit:{top:!1,bottom:!1,left:!1,right:!1}};const{innerWidth:r,innerHeight:a}=window,n=e.value.getBoundingClientRect(),l=t.value,s=o.offsetX?n.width:0,i=o.offsetY?n.height:0;return{canFit:{bottom:l.offsetHeight+n.top+i<a,top:l.offsetHeight<n.top,left:l.offsetTop<n.left,right:l.offsetWidth+n.left+s<r}}})(a,n,{offsetX:e,offsetY:s});p.top&&d?l["kro-menu__content--y-top"+(s?"-offset":"")]=!0:p.bottom&&u||p.bottom?l["kro-menu__content--y-bottom"+(s?"-offset":"")]=!0:p.top&&(l["kro-menu__content--y-top"+(s?"-offset":"")]=!0),p.left&&i?l["kro-menu__content--x-left"+(e?"-offset":"")]=!0:p.right&&c||p.right?l["kro-menu__content--x-right"+(e?"-offset":"")]=!0:p.left&&(l["kro-menu__content--x-left"+(e?"-offset":"")]=!0),o("open"),r.value=!0},i=()=>{o("close"),r.value=!1};return{isOpen:r,classes:l,open:s,close:i,toggle:()=>{r.value?i():s()},menu:n,container:a}}};const me={ref:"container",class:"kro-menu"};pe.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",me,[e.createVNode("div",{class:["kro-menu__scrim",{"kro-menu__scrim--is-open":a.isOpen}],onClick:o[1]||(o[1]=(...e)=>a.close(...e))},null,2),e.renderSlot(t.$slots,"activator",{open:a.open}),e.createVNode("div",{ref:"menu",class:["kro-menu__content",{...a.classes,"kro-menu__content--is-open":a.isOpen}]},[e.renderSlot(t.$slots,"default")],2)],512)},pe.__file="src/components/Menu/Menu.vue";var fe={name:"KroAvatar",props:{src:String,color:String,small:Boolean,large:Boolean}};fe.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",{class:["kro-avatar",{"kro-avatar__small":r.small,"kro-avatar__large":r.large}]},[r.src?(e.openBlock(),e.createBlock("img",{key:0,src:r.src,alt:""},null,8,["src"])):r.color?(e.openBlock(),e.createBlock("div",{key:1,style:{backgroundColor:r.color},class:"kro-avatar__color-circle"},null,4)):e.createCommentVNode("v-if",!0)],2)},fe.__file="src/components/Avatar/Avatar.vue";var ve={name:"KroProgressBar",props:{stream:Boolean,indeterminate:Boolean,rounded:{type:Boolean,default:!0},value:{type:Number,default:0},bufferValue:{type:Number,default:100}}};const ke=e.createVNode("div",{class:"kro-progress-bar__stream"},[e.createVNode("div",{class:"kro-progress-bar__stream-content"})],-1),he=e.createVNode("div",{class:"kro-progress-bar__indeterminate"},null,-1);ve.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",{class:{"kro-progress-bar":!0,"kro-progress-bar--is-stream":r.stream,"kro-progress-bar--is-indeterminate":r.indeterminate,"kro-progress-bar--rounded":r.rounded}},[ke,e.createVNode("div",{class:"kro-progress-bar__buffer",style:{"--kro-progress-bar-buffer-value":r.bufferValue-100+"%"}},null,4),e.createVNode("div",{class:"kro-progress-bar__progress",style:{"--kro-progress-bar-value":r.value-100+"%"}},null,4),he],2)},ve.__file="src/components/ProgressBar/ProgressBar.vue";var ye=e.defineComponent(Object.assign(Object.assign({},{name:"KroLayout",emits:["update:is-drawer-open","update:is-drawer-hidden"]}),{props:{absolute:{type:Boolean,required:!1},responsiveWidth:{type:Number,required:!1},temporary:{type:Boolean,required:!1},right:{type:Boolean,required:!1},toolbarHeight:{type:String,required:!1},clipToolbar:{type:Boolean,required:!1},mini:{type:Boolean,required:!1}},setup:function(o,r){const a=e.ref(!!r.slots.drawer),n=t.useMediaQuery(`(max-width: ${o.responsiveWidth||768}px)`),l=e.computed(()=>o.mini?"6rem":"16rem"),s=e.computed(()=>n.value||o.temporary||!a.value?"0":"var(--drawerWidth)"),i=e.computed(()=>o.toolbarHeight||"4rem"),c=e.computed(()=>o.clipToolbar?"var(--contentOffsetLeft)":"0"),d=e.computed(()=>o.clipToolbar||n.value||o.temporary?"0":"var(--toolbarHeight)");return e.onUpdated(()=>{a.value=!!r.slots.drawer}),e.watchEffect(()=>{r.emit("update:is-drawer-open",!(n.value||o.temporary)),r.emit("update:is-drawer-hidden",n.value||o.temporary)}),e.useCssVars(e=>({drawerWidth:l,toolbarHeight:i,toolbarLeftOffset:c,drawerOffsetTop:d,contentOffsetLeft:s})),{hasDrawer:a,isSmallScreen:n,drawerWidth:l,contentOffsetLeft:s,toolbarHeight:i,toolbarLeftOffset:c,drawerOffsetTop:d}}}));const ge={class:"kro-layout"},be={key:2,class:"kro-layout__toolbar"},_e={class:"kro-layout__container"},Be={key:0,class:"kro-layout__content"},xe={key:1,class:"kro-layout__footer"};ye.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",ge,[t.$slots.drawer?(e.openBlock(),e.createBlock("div",{key:0,class:["kro-layout__scrim",{"kro-layout__scrim--is-open":t.$attrs["is-drawer-open"]&&(a.isSmallScreen||r.temporary)}],onClick:o[1]||(o[1]=e=>t.$emit("update:is-drawer-open",!1))},null,2)):e.createCommentVNode("v-if",!0),t.$slots.drawer?(e.openBlock(),e.createBlock("div",{key:1,class:["kro-layout__drawer",{"kro-layout__drawer--hidden":a.isSmallScreen||r.temporary,"kro-layout__drawer--is-open":t.$attrs["is-drawer-open"]}]},[e.renderSlot(t.$slots,"drawer")],2)):e.createCommentVNode("v-if",!0),t.$slots.toolbar?(e.openBlock(),e.createBlock("div",be,[e.renderSlot(t.$slots,"toolbar")])):e.createCommentVNode("v-if",!0),e.createVNode("div",_e,[t.$slots.default?(e.openBlock(),e.createBlock("div",Be,[e.renderSlot(t.$slots,"default")])):e.createCommentVNode("v-if",!0),t.$slots.footer?(e.openBlock(),e.createBlock("div",xe,[e.renderSlot(t.$slots,"footer")])):e.createCommentVNode("v-if",!0)])])},ye.__file="src/components/Layout/Layout.vue";var Se={name:"KroSelect",props:{label:{type:String},required:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},autofocus:{type:Boolean},name:{type:String},id:{type:String}},emits:["update:modelValue"],setup(t,{attrs:o}){const r=e.ref(!1),a=e.ref(null);return e.onMounted(()=>{a.value&&Array.from(a.value.options).forEach(e=>{e.value===o.modelValue&&(e.selected=!0)})}),{focused:r,select:a}}};const we={class:"kro-select"},Ve={class:"kro-select__hidden-label"},Ce=e.createVNode("option",{selected:"",hidden:""},null,-1);Se.render=function(t,o,r,a,n,l){const s=e.resolveComponent("kro-icon");return e.openBlock(),e.createBlock("div",we,[e.createVNode("div",{class:{"kro-select__container":!0,"kro-select--focused":a.focused,"kro-select--has-text":t.$attrs.modelValue}},[e.createVNode("label",{class:{"kro-select__label":!0,"kro-select--focused":a.focused,"kro-select--has-text":t.$attrs.modelValue},for:r.id},e.toDisplayString(r.label),11,["for"]),e.createVNode("div",Ve,e.toDisplayString(r.label),1),e.createVNode("span",{class:{"kro-select__pseudo-label":!0,"kro-select--focused":a.focused,"kro-select--has-text":t.$attrs.modelValue}},e.toDisplayString(r.label),3),e.createVNode("select",{id:r.id,ref:"select",class:"kro-select__input",disabled:r.disabled,required:r.required,readonly:r.readonly,autofocus:r.autofocus,name:r.name,value:t.$attrs.modelValue,onChange:o[1]||(o[1]=e=>t.$emit("update:modelValue",e.target.value)),onFocus:o[2]||(o[2]=e=>a.focused=!0),onBlur:o[3]||(o[3]=e=>a.focused=!1)},[Ce,e.renderSlot(t.$slots,"default")],40,["id","disabled","required","readonly","autofocus","name","value"]),e.createVNode(s,{class:"kro-select__icon",icon:"mdi:chevron-down"})],2)])},Se.__file="src/components/Select/Select.vue";var Ne={name:"KroSlider",props:{disabled:{type:Boolean,default:!1},step:{type:Number,default:1},ticks:{default:!1,type:[Boolean,String]},min:{type:Number,default:0},max:{type:Number,default:100}},emits:["update:modelValue"],setup(o,{emit:r,attrs:a}){const n=e.ref(),l=e.ref(),{targetPercentage:s}=(o=>{const{x:r,elementPositionX:a,elementWidth:n}=t.useMouseInElement(o),l=e.computed(()=>Math.min(Math.max(0,r.value-a.value),n.value)/(n.value||1));return{elementWidth:n,targetPercentage:l}})(n),{elementWidth:i}=(o=>{const r=e.ref(0),a=e.ref(0),n=e.ref(0),l=e.ref(0),s=e=>{const{left:t,top:o,width:s,height:i}=e.getBoundingClientRect();r.value=s,a.value=i,n.value=t,l.value=o};e.watch(o,e=>{const t=e||document.body;s(t)});const i=t.useThrottleFn(()=>{const e=o.value||document.body;s(e)},250);return t.useEventListener("resize",i),{elementWidth:r,elementHeight:a,elementLeft:n,elementTop:l}})(n),c=e.ref(!1),{disableDocumentSelect:d,enableDocumentSelect:u}=j(),p=()=>{c.value=!1,u(),removeEventListener("touchcancel",p),removeEventListener("touchend",p),removeEventListener("mouseup",p)},m=()=>{c.value=!0,d(),addEventListener("touchcancel",p),addEventListener("touchend",p),addEventListener("mouseup",p)},f=e.computed(()=>i.value/Math.ceil((o.max-o.min)/o.step)),v=()=>{r("update:modelValue",Math.max(o.min,Math.min(o.max,a.modelValue-o.step)))},k=()=>{r("update:modelValue",Math.max(o.min,Math.min(o.max,a.modelValue+o.step)))};return e.onMounted(()=>{r("update:modelValue",Math.max(o.min,Math.min(a.modelValue||0,o.max)))}),e.watchEffect(()=>{c.value&&r("update:modelValue",Math.max(o.min,Math.min(Math.round(s.value*(o.max-o.min)/o.step)*o.step+o.min,o.max)))}),{knobRef:l,sliderRef:n,targetPercentage:s,enableEditing:m,trackSpacing:f,isEditing:c,onSliderClick:()=>{setTimeout(()=>{l.value.focus()},0),m()},incrementValue:e=>{"ArrowLeft"===e.key&&v(),"ArrowRight"===e.key&&k()},subtractValue:v,addValue:k}}};const Ke={class:"kro-slider__track-container"},$e={ref:"sliderRef",class:"kro-slider__track"},Ae=e.createVNode("div",{class:"kro-slider__progress"},null,-1),De={class:"kro-slider__knob-container"},Te=e.createVNode("div",{class:"kro-slider__thumb"},null,-1),Me={key:0},Oe={key:1};Ne.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",{class:"kro-slider",style:{"--kro-slider-progress":(t.$attrs.modelValue-r.min)/(r.max-r.min)*100-100+"%"},onTouchstartPassive:o[2]||(o[2]=(...e)=>a.enableEditing(...e)),onMousedown:o[3]||(o[3]=(...e)=>a.onSliderClick(...e))},[e.createVNode("div",Ke,[e.createVNode("div",$e,[r.ticks?(e.openBlock(),e.createBlock("div",{key:0,style:{"--kro-slider-tick-spacing":a.trackSpacing+"px"},class:"kro-slider__markers"},null,4)):e.createCommentVNode("v-if",!0),Ae],512),e.createVNode("div",De,[e.createVNode("button",{ref:"knobRef",class:"kro-slider__knob",tabindex:"0",onKeydown:o[1]||(o[1]=(...e)=>a.incrementValue(...e))},null,544),e.createVNode("div",{class:["kro-slider__preview-value",{"kro-slider__preview-value--is-active":a.isEditing}]},[Te,t.$slots.thumb?(e.openBlock(),e.createBlock("span",Oe,[e.renderSlot(t.$slots,"thumb",{value:t.$attrs.modelValue})])):(e.openBlock(),e.createBlock("span",Me,e.toDisplayString(t.$attrs.modelValue),1))],2)])])],36)},Ne.__file="src/components/Slider/Slider.vue";const qe={mounted(){console.log("Ok Tooltip")}};const Le=(je=Object.freeze({__proto__:null,KroButton:g,KroButtonGroup:B,KroIcon:m,KroSpinner:f,KroSquircle:k,KroSwitch:S,KroTextfield:$,KroToolbar:T,KroDialog:H,KroSurface:M,KroDivider:Y,KroAlert:J,KroApp:oe,KroListItem:ne,KroMenu:pe,KroAvatar:fe,KroProgressBar:ve,KroLayout:ye,KroSelect:Se,KroSlider:Ne}),Ee=Object.freeze({__proto__:null,Tooltip:qe}),{install(e){je&&Object.entries(je).forEach(([t,o])=>{o&&e.component(t,o)}),Ee&&Object.entries(Ee).forEach(([t,o])=>{o&&e.directive(t,o)}),i()}});var je,Ee,Pe=Object.freeze({__proto__:null,ButtonMetadata:_,ButtonGroupMetadata:{title:"KroButtonGroup",description:"A container for multiple related buttons"},IconMetadata:{title:"KroIcon",description:"Display an SVG icon",props:[{name:"icon",description:"The name of the icon to display",type:"string",values:"-",default:"undefined"}],css:[{name:"--kro-icon-size",description:"The size of the icon",type:"size",default:"1.5rem"}]},SpinnerMetadata:{title:"KroSpinner",description:"A loading indicator",css:[{name:"--kro-spinner-size",description:"Sets the size of the spinner",type:"size",default:"2.5rem"},{name:"--kro-spinner-thickness",description:"Sets the thickness of the spinner",type:"size",default:"0.35rem"},{name:"--kro-spinner-color",description:"Sets the color of the spinner",type:"size",default:"--kro-foreground"}]},SquircleMetadata:{title:"KroSquircle",description:"A component used for visual effect."},SwitchMetadata:{title:"KroSwitch",description:"",props:[{name:"v-model",description:"The value of the switch",type:"bool",values:"-",default:"undefined"}],css:[{name:"--kro-switch-track-background",description:"The color of the track background.",type:"color",default:"--kro-background-secondary"},{name:"--kro-switch-track-active-background",description:"The track color when the switch is set to true.",type:"color",default:"--kro-primary-darken"},{name:"--kro-switch-knob-color",description:"The color of the switch knob.",type:"color",default:"--kro-primary"},{name:"--kro-switch-knob-shadow",description:"The shadow of the switch knob.",type:"shadow",default:"--kro-shadow"}]},TextfieldMetadata:{title:"KroTextfield",description:"",props:[{name:"v-model",description:"The value of the textfield",type:"string",values:"-",default:"undefined"},{name:"label",description:"The textfield label",type:"string",values:"-",default:"undefined"},{name:"type",description:"The textfield type",type:"string",values:"text | tel | email | password | url | search",default:"text"},{name:"required",description:"Marks the textfield as required",type:"bool",values:"-",default:"false"},{name:"disabled",description:"Marks the textfield as disabled",type:"bool",values:"-",default:"false"},{name:"multiline",description:"Makes the textfield into a textarea than can support multiple lines.",type:"bool",values:"-",default:"false"},{name:"readonly",description:"Marks the textfield as readonly",type:"bool",values:"-",default:"false"},{name:"autofocus",description:"Autofocuses the textfield when the component loads.",type:"bool",values:"-",default:"false"},{name:"min",description:"Sets the min value if the textfield is a nubmer input",type:"number",values:"-",default:"undefined"},{name:"max",description:"Sets the max value if the textfield is a nubmer input",type:"number",values:"-",default:"undefined"},{name:"maxlength",description:"Sets the max amount of characters that the textfield will accept",type:"number",values:"-",default:"undefined"},{name:"name",description:"Sets the name of the textfield.",type:"string",values:"-",default:"undefined"},{name:"id",description:"Sets the id of the textfield",type:"string",values:"-",default:"undefined"},{name:"autoresize",description:"If the textfield is multiline, then this will autoresize the textfield vertically as the user types.",type:"bool",values:"-",default:"true"}],css:[{name:"--kro-textfield-border-color",description:"The border color of the textifled",type:"color",default:"--kro-divider"},{name:"--kro-textifled-focused-border-color",description:"The border color of the textifled when it is focused",type:"color",default:"--kro-primary"}]},ToolbarMetadata:{title:"KroToolbar",description:"",props:[{name:"small",description:"Makes the height of the toolbar smaller.",type:"bool",values:"-",default:"false"},{name:"padded",description:"Adds padding to the toolbar.",type:"bool",values:"-",default:"false"},{name:"raised",description:"Adds a shadow to the toolbar.",type:"bool",values:"-",default:"false"}],css:[{name:"--kro-toolbar-height",description:"The height of the toolbar",type:"size",default:"4rem"},{name:"--kro-toolbar-background",description:"The background color of the toolbar",type:"color",default:"--kro-background-secondary"},{name:"--kro-toolbar-shadow",description:"The shadow of a raised toolbar",type:"color",default:"--kro-background-shadow"}]},DialogMetadata:{title:"KroDialog",description:"Dialogs are used to display important information requiring the users immediate attention, often to confirm an action or to display an important error message, and should only be used when necessary.",props:[{name:"v-model",description:"Contorls the open state of the dialog",type:"bool",values:"-",default:"false"},{name:"persistent",description:"If enabled, the dialog can only be closed by the close button",type:"bool",values:"-",default:"false"}],events:[{name:"@open",description:"Fired when the dialog is opened",parameters:[]},{name:"@close",description:"Fired when the dialog is closed",parameters:[]}],slots:[{name:"#activator",description:"Slots the button that can be used to open the dialog",props:["open","close","toggle"]},{name:"#title",description:"Slot for the title of the dialog",props:["open","close","toggle"]},{name:"#controls",description:"Slot for the controls of the dialog",props:["open","close","toggle"]},{name:"#default",description:"Slot for the content of the dialog",props:[]}]},SurfaceMetadata:{title:"KroSurface",description:"A surface that contains content and can have a label",props:[{name:"padded",description:"Adds a padding to the container.",type:"bool",values:"-",default:"true"},{name:"raised",description:"Adds a shadow to the container.",type:"bool",values:"-",default:"true"},{name:"outline",description:"Adds an outline to the container.",type:"bool",values:"-",default:"false"},{name:"icon",description:"Adds an icon to the container.",type:"bool",values:"-",default:"undefined"},{name:"label",description:"Adds a label to the container.",type:"string",values:"-",default:"undefined"}],css:[{name:"--kro-surface-background",description:"",type:"color",default:"--kro-background-secondary"},{name:"--kro-surface-outline",description:"Sets the outline color of and outlined container",type:"color",default:"--kro-divider"},{name:"--kro-surface-shadow",description:"Sets the shadow of a raised container",type:"shadow",default:"--kro-shadow"}]},DividerMetadata:{title:"KroDivider",description:"",props:[{name:"vertical",description:"Makes the divider a vertical divider",type:"bool",values:"-",default:"false"}]},AlertMetadata:{title:"KroAlert",description:"",props:[{name:"type",description:"Defines the type of alert that is shown.",type:"string",values:["info","error","warning","success"],default:"info"},{name:"dismissible",description:"Shows a close icon on the alert allowing the user to dismiss the alert.",type:"bool",values:"-",default:"false"},{name:"icon",description:"Sets the icon that is displayed on the alert.",type:"string",values:"-",default:"undefined"},{name:"tag",description:"Sets the root tage of the alert",type:"string",values:"-",default:"div"},{name:"outline",description:"Give the alert an outline style.",type:"bool",values:"-",default:"false"}],events:[{name:"@dismissed",description:"Fires when the alert is dismissed",parameters:[]},{name:"@show",description:"Fires when the alert is shown after being dismissed",parameters:[]}],slots:[{name:"#default",description:"Slot for the text content of the alert.",props:[]}]},AppMetadata:{title:"KroApp",description:""},ListMetadata:ue,MenuMetadata:{title:"KroMenu",description:"",props:[{name:"offsetX",description:"Offsets the menu horizontally so it is not covering the activator element.",type:"bool",values:"-",default:"false"},{name:"offsetY",description:"Offsets the menu vertically so it is not coverting the activator element",type:"bool",values:"-",default:"false"},{name:"left",description:"Positions the menu to open to the left of the activator.",type:"bool",values:"-",default:"false"},{name:"right",description:"Positions the menu to open to the right of the activator.",type:"bool",values:"-",default:"false"},{name:"top",description:"Positions the menut to open above the activator.",type:"bool",values:"-",default:"false"},{name:"bottom",description:"Positions the element to open below the activator.",type:"bool",values:"-",default:"false"}],slots:[{name:"#default",description:"",props:[]}],css:[{name:"--kro-menu-min-width",description:"",type:"size",default:"200px"},{name:"--kro-menu-max-width",description:"",type:"size",default:"300px"}]},AvatarMetadata:{title:"KroAvatar",description:"",props:[{name:"src",description:"Sets the image of the avatar",type:"string",values:"-",default:"undefined"},{name:"color",description:"Sets the color of the avatar.",type:"string",values:"-",default:"undefined"},{name:"small",description:"Makes the avatar smaller.",type:"bool",values:"-",default:"false"},{name:"large",description:"Makes the avatar larger.",type:"bool",values:"-",default:"false"}],css:[{name:"--kro-avatar-size",description:"",default:"3rem",type:"CSS Size Unit"},{name:"--kro-avatar-radius",description:"",default:"50%",type:"CSS Size Unit"}]},ProgressBarMetadata:{title:"KroProgressBar",description:"",props:[{name:"stream",description:"Display a speical style to the progress bar to indicate it is a stream",type:"bool",values:"-",default:"false"},{name:"indeterminate",description:"Display a special style to the progress bar to indicate that is indeterminate.",type:"",values:"-",default:"false"},{name:"rounded",description:"Applies a rounded style to the progress bar.",type:"bool",values:"-",default:"true"},{name:"value",description:"Sets the value of the progress bar.",type:"number",values:"-",default:"0"},{name:"bufferValue",description:"Sets the buffer value of the progress bar.",type:"number",values:"-",default:"100"}],css:[]},LayoutMetadata:{title:"KroLayout",description:"",props:[{name:"responsiveWidth",default:"768",description:"The width at which the drawer is hidden",type:"number",values:[]},{name:"temporary",default:"false",description:"Hides the drawer by default",type:"bool",values:[]},{name:"clipToolbar",default:"false",description:"Shifts the toolbar to the right to make room for the drawer",type:"bool",values:[]},{name:"mini",default:"false",description:"Makes the drawer smaller",type:"bool",values:[]},{name:"v-model:is-drawer-open",default:"true or false",description:"Controls the open state of the drawer",type:"bool",values:[]},{name:"v-model:is-drawer-hidden",default:"true or false",description:"Indicates if the drawer is in a default hidden state",type:"bool",values:[]}],slots:[{name:"#drawer",description:"Contains the sidebar navigation of the page",props:[]},{name:"#toolbar",description:"Contains the toolbar of the page",props:[]},{name:"#footer",description:"Contains the footer content of the page",props:[]},{name:"#default",description:"Contains the contents of the page",props:[]}]},SelectMetadata:{title:"KroSelect",description:"A styled select component.",props:[{name:"label",description:"",type:"bool",values:"-",default:"false"},{name:"required",description:"",type:"bool",values:"-",default:"false"},{name:"disabled",description:"",type:"bool",values:"-",default:"false"},{name:"readonly",description:"",type:"bool",values:"-",default:"false"},{name:"autofocus",description:"",type:"string",values:"-",default:"undefined"},{name:"name",description:"",type:"string",values:"-",default:"undefined"},{name:"id",description:"",type:"string",values:"-",default:"undefined"}]},SliderMetadata:{title:"KroSlider",description:"",props:[{name:"v-model",description:"The value of the slider",type:"number",values:"-",default:"undefined"},{name:"disabled",description:"Disables the slider",type:"bool",values:"-",default:"false"},{name:"steps",description:"Sets the step amount for each tick",type:"number",values:"-",default:"1"},{name:"ticks",description:"Display the ticks on the slider",type:"bool",values:"-",default:"false"},{name:"min",description:"Set the min value of the slider",type:"number",values:"-",default:"0"},{name:"max",description:"Set the max value of the slider",type:"number",values:"-",default:"100"}],slots:[{name:"#thumb",description:"A slot to replace the default value of the thumb.",props:["value"]}],css:[{name:"--kro-slider-tick-color",description:"The color of the tick marks on the slider.",type:"color",default:"rgba(0, 0, 0, .24)"},{name:"--kro-slider-track-color",description:"The color of the slider track.",type:"color",default:"--kro-background-secondary"},{name:"--kro-slider-progress-color",description:"The color of the progress bar on the track.",type:"color",default:"--kro-primary"},{name:"--kro-slider-knob-color",description:"The color of the knob on the slider.",type:"color",default:"--kro-primary-lighten"},{name:"--kro-slider-thumb-foreground",description:"The foreground color of the thumb.",type:"color",default:"--kro-primary-foreground"},{name:"--kro-slider-thumb-background",description:"The background color of the thumb.",type:"color",default:"--kro-primary"}]}});exports.KroAlert=J,exports.KroApp=oe,exports.KroAvatar=fe,exports.KroButton=g,exports.KroButtonGroup=B,exports.KroDialog=H,exports.KroDivider=Y,exports.KroIcon=m,exports.KroLayout=ye,exports.KroListItem=ne,exports.KroMenu=pe,exports.KroProgressBar=ve,exports.KroSelect=Se,exports.KroSlider=Ne,exports.KroSpinner=f,exports.KroSquircle=k,exports.KroSurface=M,exports.KroSwitch=S,exports.KroTextfield=$,exports.KroToolbar=T,exports.KroUIBaseConfigurationPlugin=()=>({install(e,t){t.components&&Array.isArray(t.components)&&Object.entries(t.components).forEach(([t,o])=>{e.component(t,o)}),i()}}),exports.KroUIPlugin=Le,exports.Metadata=Pe,exports.useDialog=()=>({createDialog:e=>new Promise((t,o)=>{I(Object.assign(Object.assign({},E),e),t,o)}),createConfirmationDialog:e=>new Promise((t,o)=>{I(Object.assign(Object.assign({},P),e),t,o)})}),exports.useTheme=()=>({setTheme:e=>{s.value=e},getTheme:()=>s.value,theme:s}); | ||
function d(e,t,o,r){return new(o||(o=Promise))((function(a,n){function l(e){try{i(r.next(e))}catch(e){n(e)}}function s(e){try{i(r.throw(e))}catch(e){n(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(l,s)}i((r=r.apply(e,t||[])).next())}))}var u=e.defineComponent(Object.assign(Object.assign({},{name:"KroIcon"}),{props:{icon:{type:String,required:!0}},setup:function(t){const{icons:o}={icons:e.inject(l)},r=e.ref(null),a=()=>d(this,void 0,void 0,(function*(){if(r.value&&o){yield e.nextTick();const a=o.renderSVG(t.icon,{});if(a)r.value.textContent="",r.value.appendChild(a);else{const e=document.createElement("span");e.className="iconify",e.dataset.icon=t.icon,r.value.textContent="",r.value.appendChild(e)}}}));return e.watch(()=>t.icon,a,{flush:"post"}),e.onMounted(a),{el:r}}}));u.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",{ref:"el",class:[t.$attrs.class,"kro-icon"]},null,2)},u.__file="src/components/Icon/Icon.vue";var p={name:"KroSpinner"};const m={class:"kro-spinner"};p.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",m)},p.__file="src/components/Spinner/Spinner.vue";var f={name:"KroSquircle"};const v={class:"kro-squircle",viewBox:"0 0 400 400","enable-background":"new 0 0 400 400","xml:space":"preserve"},k=e.createVNode("path",{d:"M 0,200 C 0,0 0,0 200,0 S 400,0 400,200 400,400 200,400 0,400 0,200"},null,-1);f.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("svg",v,[k])},f.__file="src/components/Squircle/Squircle.vue";var h={name:"KroButton",components:{KroIcon:u,KroSpinner:p,KroSquircle:f},props:Object.assign(Object.assign({},i),{loading:{type:Boolean,default:!1},type:String,primary:Boolean,outline:Boolean,raised:Boolean,icon:String,hideExternalIcon:Boolean,warning:Boolean,error:Boolean,success:Boolean}),setup(t){const{tag:o,componentProps:r}=c(t);return{componentProps:r,componentType:e.computed(()=>o||"button")}}};const y={class:"kro-button__spinner"};h.render=function(t,o,r,a,n,l){const s=e.resolveComponent("kro-squircle"),i=e.resolveComponent("kro-icon"),c=e.resolveComponent("kro-spinner");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.componentType),e.mergeProps({class:{"kro-button":!0,"kro-button--primary":r.primary,"kro-button--outline":r.outline,"kro-button--raised":r.raised,"kro-button--warning":r.warning,"kro-button--success":r.success,"kro-button--error":r.error,"kro-button--is-icon-button":r.icon&&!t.$slots.default},rel:"noreferrer"},a.componentProps,{target:t.href?t.target:""}),{default:e.withCtx(()=>[r.icon&&!t.$slots.default?(e.openBlock(),e.createBlock(s,{key:0,class:"kro-button__squircle"})):e.createCommentVNode("v-if",!0),e.createVNode("span",{class:{"kro-button__content":!0,"kro-button__content--is-loading":r.loading}},[r.icon?(e.openBlock(),e.createBlock(i,{key:0,class:"kro-button__icon",icon:r.icon},null,8,["icon"])):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"default"),!t.href||r.icon&&!t.$slots.default||r.hideExternalIcon?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(i,{key:1,icon:"external"}))],2),e.withDirectives(e.createVNode("span",y,[e.createVNode(c)],512),[[e.vShow,r.loading]])]),_:3},16,["class","target"])},h.__file="src/components/Button/Button.vue";const g={title:"KroButton",description:"A styled button with added functionality",props:[{name:"loading",description:"Displays a loading indicator over the button",type:"bool",values:"-",default:"false"},{name:"type",description:"The type of the button",type:"string",values:["button","reset","submit"],default:"button"},{name:"primary",description:"Applies a style to the button to indicate that it is a primary button",type:"bool",values:"-",default:"false"},{name:"outline",description:"Give the button an outline style",type:"bool",values:"-",default:"false"},{name:"raised",description:"Apply a shadow to the button",type:"string",values:"-",default:"false"},{name:"icon",description:"Adds an icon to the button",type:"string",values:"-",default:"undefined"},{name:"hideExternalIcon",description:"Hides the external link icon for buttons that are links.",type:"bool",values:"-",default:"false"},...s]};var b={name:"KroButtonGroup"};const _={class:"kro-button-group"};b.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",_,[e.renderSlot(t.$slots,"default")])},b.__file="src/components/ButtonGroup/ButtonGroup.vue";var B={name:"KroSwitch",props:{value:String},emits:["update:modelValue"],setup:(e,{emit:t,attrs:o})=>({update:r=>{r.target.checked?e.value?Array.isArray(o.modelValue)&&t("update:modelValue",[...o.modelValue,e.value]):t("update:modelValue",!0):e.value?Array.isArray(o.modelValue)&&t("update:modelValue",o.modelValue.filter(t=>t!==e.value)):t("update:modelValue",!1)}})};const x={class:"kro-switch"},S={class:"kro-switch__container"},w={class:"kro-switch__track"},V=e.createVNode("div",{class:"kro-switch__knob"},null,-1),C={key:0,class:"kro-switch__label"};B.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",x,[e.createVNode("div",S,[e.createVNode("input",{class:"kro-switch__input",checked:Array.isArray(t.$attrs.modelValue)?t.$attrs.modelValue.indexOf(r.value)>-1:!!t.$attrs.modelValue,type:"checkbox",onChange:o[1]||(o[1]=(...e)=>a.update(...e))},null,40,["checked"]),e.createVNode("div",w,[e.createVNode("div",{class:{"kro-switch__track-active":!0,"kro-switch__track-active--is-active":Array.isArray(t.$attrs.modelValue)?t.$attrs.modelValue.indexOf(r.value)>-1:!!t.$attrs.modelValue}},null,2)]),e.createVNode("div",{class:{"kro-switch__knob-container":!0,"kro-switch__knob-container--is-active":Array.isArray(t.$attrs.modelValue)?t.$attrs.modelValue.indexOf(r.value)>-1:!!t.$attrs.modelValue}},[V],2)]),t.$slots.default?(e.openBlock(),e.createBlock("div",C,[e.renderSlot(t.$slots,"default")])):e.createCommentVNode("v-if",!0)])},B.__file="src/components/Switch/Switch.vue";var N={name:"KroTextfield",props:{label:{type:String},type:{type:String,default:"text"},required:{type:Boolean},disabled:{type:Boolean},multiline:{type:Boolean},readonly:{type:Boolean},autofocus:{type:Boolean},min:{type:Number},max:{type:Number},maxlength:{type:Number},name:{type:String},id:{type:String},autoResize:{type:Boolean,default:!0},loading:{type:Boolean},success:{type:Boolean},error:{type:Boolean},message:{type:String}},emits:["update:modelValue"],setup(t){const o=e.ref(!1),r=e.ref();return{focused:o,runAutoResize:()=>{t.autoResize&&r.value&&(r.value.style.height="auto",r.value.style.height=r.value.scrollHeight+"px")},inputRef:r}}};const K={key:2,class:"block pr-2"},$={key:0,class:"pl-4 text-xs font-medium"};N.render=function(t,o,r,a,n,l){const s=e.resolveComponent("kro-spinner"),i=e.resolveComponent("kro-icon");return e.openBlock(),e.createBlock("div",{class:["kro-textfield",{"kro-textfield--is-textarea":r.multiline}]},[e.createVNode("div",{class:{"kro-textfield__container":!0,"kro-textfield--focused":a.focused,"kro-textfield--has-text":t.$attrs.modelValue,"kro-textfield--is-textarea":r.multiline}},[e.createVNode("label",{class:{"kro-textfield__label":!0,"kro-textfield--focused":a.focused,"kro-textfield--has-text":t.$attrs.modelValue},for:r.id},e.toDisplayString(r.label),11,["for"]),e.createVNode("span",{class:{"kro-textfield__pseudo-label":!0,"kro-textfield--focused":a.focused,"kro-textfield--has-text":t.$attrs.modelValue}},e.toDisplayString(r.label),3),r.multiline?(e.openBlock(),e.createBlock("textarea",{key:1,id:r.id,ref:"inputRef",class:"kro-textfield__input",disabled:r.disabled,required:r.required,readonly:r.readonly,autofocus:r.autofocus,maxlength:r.maxlength,name:r.name,value:t.$attrs.modelValue,onInput:o[4]||(o[4]=e=>{t.$emit("update:modelValue",e.target.value),a.runAutoResize()}),onFocus:o[5]||(o[5]=e=>a.focused=!0),onBlur:o[6]||(o[6]=e=>a.focused=!1)},null,40,["id","disabled","required","readonly","autofocus","maxlength","name","value"])):(e.openBlock(),e.createBlock("input",{key:0,class:"kro-textfield__input",id:r.id,disabled:r.disabled,required:r.required,readonly:r.readonly,autofocus:r.autofocus,type:r.type,min:r.min,max:r.max,maxlength:r.maxlength,name:r.name,value:t.$attrs.modelValue,onInput:o[1]||(o[1]=e=>t.$emit("update:modelValue",e.target.value)),onFocus:o[2]||(o[2]=e=>a.focused=!0),onBlur:o[3]||(o[3]=e=>a.focused=!1)},null,40,["id","disabled","required","readonly","autofocus","type","min","max","maxlength","name","value"])),r.loading||r.success||r.error?(e.openBlock(),e.createBlock("div",K,[r.loading?(e.openBlock(),e.createBlock(s,{key:0,class:"kro-textfield__spinner"})):r.success?(e.openBlock(),e.createBlock(i,{key:1,class:"kro-textfield__success-icon",icon:"mdi:check"})):r.error?(e.openBlock(),e.createBlock(i,{key:2,class:"kro-textfield__error-icon",icon:"mdi:alert"})):e.createCommentVNode("v-if",!0)])):e.createCommentVNode("v-if",!0)],2),t.$slots.default?(e.openBlock(),e.createBlock("div",$,[e.renderSlot(t.$slots,"default")])):e.createCommentVNode("v-if",!0)],2)},N.__file="src/components/Textfield/Textfield.vue";var A={name:"KroToolbar",props:{small:Boolean,padded:Boolean,raised:Boolean}};A.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",{class:{"kro-toolbar":!0,"kro-toolbar--small":r.small,"kro-toolbar--raised":r.raised,"kro-toolbar--padded":r.padded}},[e.renderSlot(t.$slots,"default")],2)},A.__file="src/components/Toolbar/Toolbar.vue";var D={name:"KroSurface",props:{padded:{type:Boolean,default:!0},raised:{type:Boolean,default:!0},outline:{type:Boolean,default:!1},icon:String,label:String}};const T={key:0,class:"kro-surface__label-container"},M={key:1,class:"kro-surface__label"};D.render=function(t,o,r,a,n,l){const s=e.resolveComponent("kro-icon");return e.openBlock(),e.createBlock("div",{class:{"kro-surface":!0,"kro-surface--padded":r.padded,"kro-surface--raised":r.raised,"kro-surface--outline":r.outline}},[r.icon||r.label?(e.openBlock(),e.createBlock("div",T,[r.icon?(e.openBlock(),e.createBlock(s,{key:0,class:"kro-surface__icon",icon:r.icon},null,8,["icon"])):e.createCommentVNode("v-if",!0),r.label?(e.openBlock(),e.createBlock("div",M,e.toDisplayString(r.label),1)):e.createCommentVNode("v-if",!0)])):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"default")],2)},D.__file="src/components/Surface/Surface.vue";const O=e.defineComponent({emits:["update:active","activate","deactivate"],props:{active:{type:Boolean,default:!0},escapeDeactivates:{type:Boolean,default:!0},returnFocusOnDeactivate:{type:Boolean,default:!0},allowOutsideClick:{type:Boolean,default:!0},initialFocus:{type:[String,Function],default:void 0},fallbackFocus:{type:[String,Function],default:void 0}},setup(t,{slots:o,emit:a}){let n;const l=e.ref(null);return e.onMounted(()=>{e.watch(()=>t.active,e=>{var o,s;e&&l.value?(n=r.default(l.value,{escapeDeactivates:t.escapeDeactivates,allowOutsideClick:()=>t.allowOutsideClick,returnFocusOnDeactivate:t.returnFocusOnDeactivate,onActivate:()=>{a("update:active",!0),a("activate")},onDeactivate:()=>{a("update:active",!1),a("deactivate")},initialFocus:"string"==typeof t.initialFocus?t.initialFocus:null!==(s=null===(o=t.initialFocus)||void 0===o?void 0:o.call(t))&&void 0!==s?s:l.value,fallbackFocus:t.fallbackFocus}),n.activate()):null==n||n.deactivate()},{immediate:!0})}),e.onUnmounted(()=>{null==n||n.deactivate(),n=null}),()=>{var t;const r=null===(t=o.default)||void 0===t?void 0:t.call(o);if(!r||!r.length||r.length>1)throw new Error("FocusTrap requires exactly one child");return e.cloneVNode(r[0],{ref:l})}}}),q=()=>({disableDocumentScroll:()=>{document.documentElement.classList.add("kro-helper--prevent-scroll")},enableDocumentScroll:()=>{document.documentElement.classList.remove("kro-helper--prevent-scroll")},disableDocumentSelect:()=>{document.documentElement.classList.add("kro-helper--prevent-select")},enableDocumentSelect:()=>{document.documentElement.classList.remove("kro-helper--prevent-select")},enableAppFocus:()=>{var e;null===(e=document.querySelector("#app"))||void 0===e||e.removeAttribute("tabindex")},disableAppFocus:()=>{var e;null===(e=document.querySelector("#app"))||void 0===e||e.setAttribute("tabindex","-1")}}),j={title:"Dialog Title",message:"Dialog Message",style:"default",resolveButton:{text:"Ok",attributes:{primary:!0}},rejectButton:{text:"Cancel"}},L={title:"Confirmation Dialog",message:"Dialog Message",icon:"mdi:help-circle",style:"default",resolveButton:{text:"Ok",attributes:{primary:!0}},rejectButton:{text:"Cancel"}},P=e.ref([]),E=(t,o,r)=>{const a=Object.assign(Object.assign({},t),{isOpen:e.ref(!0),resolve:o,reject:r,destroy(){P.value.splice(P.value.indexOf(this),1)}});P.value=[...P.value,a]};const F={name:"KroDialog",components:{KroSurface:D,FocusTrap:O},inheritAttrs:!1,emits:["update:modelValue","close","open","close-animation-end"]};var I=e.defineComponent(Object.assign(Object.assign({},F),{props:{persistent:{type:null,required:!1}},setup:function(t,{emit:o,attrs:r}){const{disableDocumentScroll:a,enableDocumentScroll:n}=q(),l=e.ref(null);let s=!1;e.onUpdated(()=>{s||!0!==r.modelValue||(o("update:modelValue",!0),o("open"),a(),window.addEventListener("keydown",c),l.value&&l.value.focus())});const i=()=>{s=!0,o("update:modelValue",!0),o("open"),a(),window.addEventListener("keydown",c),l.value&&l.value.focus()},c=e=>{(e=>"keydown"!==(null==e?void 0:e.type)||"Escape"===e.key&&!t.persistent)(e)&&(o("update:modelValue",!1),o("close"),window.removeEventListener("keydown",c),n(),s=!1)};return{dialog:l,onDialogLeaveAnimationComplete:()=>{o("close-animation-end")},open:i,close:c,toggle:()=>{r.modelValue?c(null):i()}}}}));const z={ref:"dialog",tabindex:"-1",class:"kro-dialog__container"},H={class:"grid grid-row gap-4"},R={key:0,class:"kro-dialog__header text-lg"},W={class:"kro-dialog__body"},G={key:1,class:"kro-dialog__footer"};I.render=function(t,o,r,a,n,l){const s=e.resolveComponent("focus-trap"),i=e.resolveComponent("kro-surface");return e.openBlock(),e.createBlock(e.Fragment,null,[e.renderSlot(t.$slots,"activator",{close:a.close,open:a.open,toggle:a.toggle}),(e.openBlock(),e.createBlock(e.Teleport,{to:"#kro-portal"},[e.createVNode(e.Transition,{appear:"",name:"kro-dialog-scrim"},{default:e.withCtx(()=>[t.$attrs.modelValue?(e.openBlock(),e.createBlock("div",{key:0,class:"kro-dialog__scrim fixed inset-0",onClick:o[1]||(o[1]=()=>{r.persistent||a.close()})})):e.createCommentVNode("v-if",!0)]),_:1}),e.createVNode("div",z,[e.createVNode(e.Transition,{appear:"",name:"kro-dialog","onAfter-leave":a.onDialogLeaveAnimationComplete},{default:e.withCtx(()=>[t.$attrs.modelValue?(e.openBlock(),e.createBlock(i,e.mergeProps({key:0,class:"kro-dialog"},t.$attrs),{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.$attrs.modelValue,"onUpdate:modelValue":o[2]||(o[2]=e=>t.$attrs.modelValue=e)},{default:e.withCtx(()=>[e.createVNode("div",H,[t.$slots.header?(e.openBlock(),e.createBlock("div",R,[e.renderSlot(t.$slots,"header",{open:a.open,close:a.close,toggle:a.toggle})])):e.createCommentVNode("v-if",!0),e.createVNode("div",W,[e.renderSlot(t.$slots,"default",{open:a.open,close:a.close,toggle:a.toggle})]),t.$slots.footer?(e.openBlock(),e.createBlock("div",G,[e.renderSlot(t.$slots,"footer",{open:a.open,close:a.close,toggle:a.toggle})])):e.createCommentVNode("v-if",!0)])]),_:3},8,["modelValue"])]),_:1},16)):e.createCommentVNode("v-if",!0)]),_:1},8,["onAfter-leave"])],512)]))],64)},I.__file="src/components/Dialog/Dialog.vue";var U={name:"KroDivider",props:{vertical:Boolean,inset:Boolean,label:String}};const X={key:0};U.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",{class:["kro-divider",{"kro-divider--vertical":r.vertical,"kro-divider--inset":r.inset}]},[r.label?(e.openBlock(),e.createBlock("span",X,e.toDisplayString(r.label),1)):e.createCommentVNode("v-if",!0)],2)},U.__file="src/components/Divider/Divider.vue";var Y={name:"KroAlert",components:{KroIcon:u,KroButton:h},props:{type:{type:String,default:"info"},dismissible:{type:Boolean,default:!1},tag:{type:String,default:"div"},icon:String,outline:{type:Boolean,default:!1}},emits:["dismissed","show"],setup(t,{emit:o}){const r=e.ref(!1);return{iconName:e.computed(()=>{const{type:e,icon:o}=t;return o||("warning"===e||"info"===e?"mdi:alert-circle":"error"===e?"mdi:alert":"success"===e?"mdi:check":null)}),isHidden:r,hide:()=>{o("dismissed"),r.value=!0},show:()=>{o("show"),r.value=!1}}}};const Q={class:"kro-alert__icon"},J={key:0};Y.render=function(t,o,r,a,n,l){const s=e.resolveComponent("kro-icon"),i=e.resolveComponent("kro-button");return e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.tag),{class:{"kro-alert":!0,"kro-alert--error":"error"===r.type,"kro-alert--info":"info"===r.type,"kro-alert--warning":"warning"===r.type,"kro-alert--success":"success"===r.type,"kro-alert--outline":r.outline,"kro-alert--has-icon":a.iconName,"kro-alert--is-dismissible":r.dismissible}},{default:e.withCtx(()=>[e.createVNode("div",Q,[a.iconName?(e.openBlock(),e.createBlock(s,{key:0,icon:a.iconName},null,8,["icon"])):e.createCommentVNode("v-if",!0)]),e.createVNode("div",null,[e.renderSlot(t.$slots,"default")]),r.dismissible?(e.openBlock(),e.createBlock("div",J,[e.createVNode(i,{icon:"close",onClick:a.hide},null,8,["onClick"])])):e.createCommentVNode("v-if",!0)]),_:3},8,["class"])),[[e.vShow,!a.isHidden]])},Y.__file="src/components/Alert/Alert.vue";var Z=e.defineComponent(Object.assign(Object.assign({},{name:"ComposableDialogs"}),{setup:function(){return{instances:P}}}));Z.render=function(t,o,r,a,n,l){const s=e.resolveComponent("kro-icon"),i=e.resolveComponent("kro-button"),c=e.resolveComponent("kro-dialog");return e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.instances,(t,o)=>(e.openBlock(),e.createBlock("div",{key:o},[e.createVNode(c,{modelValue:t.isOpen,"onUpdate:modelValue":e=>t.isOpen=e,class:{"kro-composable-dialog--centered":"centered"===t.style},"onClose-animation-end":e=>t.destroy()},{header:e.withCtx(()=>[e.createVNode("div",{class:["flex items-center",{"flex-col":"centered"===t.style}]},[t.icon?(e.openBlock(),e.createBlock(s,{key:0,style:{color:t.iconColor?t.iconColor:""},class:[{"kro-composable-dialog__icon--large":"centered"===t.style},"mr-4"],icon:t.icon},null,8,["style","class","icon"])):e.createCommentVNode("v-if",!0),e.createTextVNode(" "+e.toDisplayString(t.title),1)],2)]),default:e.withCtx(()=>[e.createVNode("div",{class:{"text-center":"centered"===t.style}},e.toDisplayString(t.message),3)]),footer:e.withCtx(({close:o})=>[e.createVNode("div",{class:["flex flex-row flex-1 gap-4",{"justify-end":"centered"!==t.style,"justify-center":"centered"===t.style}]},[t.rejectButton.hidden?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(i,e.mergeProps({key:0},t.rejectButton.attributes,{onClick:()=>{t.reject(),o()}}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.rejectButton.text),1)]),_:2},1040,["onClick"])),t.resolveButton.hidden?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(i,e.mergeProps({key:1},t.resolveButton.attributes,{onClick:()=>{t.resolve(),o()}}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.resolveButton.text),1)]),_:2},1040,["onClick"]))],2)]),_:2},1032,["modelValue","onUpdate:modelValue","class","onClose-animation-end"])]))),128)},Z.__file="src/components/App/components/ComposableDialogs.vue";var ee={name:"KroApp",components:{ComposableDialogs:Z}};const te={class:"kro-app"},oe={class:"kro-app__content"};ee.render=function(t,o,r,a,n,l){const s=e.resolveComponent("composable-dialogs");return e.openBlock(),e.createBlock("div",te,[e.createVNode("div",oe,[e.renderSlot(t.$slots,"default")]),e.createVNode(s)])},ee.__file="src/components/App/App.vue";var re={name:"KroListItem",props:Object.assign(Object.assign({},i),{tag:{type:String,default:"div"}}),setup(t){const{tag:o,componentProps:r}=c(t);return{componentProps:r,componentType:e.computed(()=>o||"div")}}};const ae={key:0,class:"kro-list-item__icon"},ne={class:"kro-list-item__content"},le={class:"kro-list-item__title"},se={key:0,class:"kro-list-item__subtitle"},ie={key:1,class:"kro-list-item__action"};re.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.componentType),e.mergeProps(a.componentProps,{class:"kro-list-item"}),{default:e.withCtx(()=>[t.$slots.icon?(e.openBlock(),e.createBlock("div",ae,[e.renderSlot(t.$slots,"icon")])):e.createCommentVNode("v-if",!0),e.createVNode("div",ne,[e.createVNode("span",le,[e.renderSlot(t.$slots,"default")]),t.$slots.subtitle?(e.openBlock(),e.createBlock("span",se,[e.renderSlot(t.$slots,"subtitle")])):e.createCommentVNode("v-if",!0)]),t.$slots.action?(e.openBlock(),e.createBlock("div",ie,[e.renderSlot(t.$slots,"action")])):e.createCommentVNode("v-if",!0)]),_:3},16)},re.__file="src/components/List/ListItem.vue";const ce={title:"KroListItem",description:"",props:[{name:"tag",description:"",type:"string",values:"-",default:"div"},...s],slots:[{name:"#icon",description:"Item icon slot",props:[]},{name:"#subtitle",description:"Item subtitle slot",props:[]},{name:"#action",description:"Action on the right side of the item",props:[]},{name:"#default",description:"Main text of the item",props:[]}]};var de={name:"KroMenu",props:{offsetX:{type:Boolean,default:!1},offsetY:{type:Boolean,default:!1},left:Boolean,right:Boolean,top:Boolean,bottom:Boolean},emits:["open","close"],setup(t,{emit:o}){const r=e.ref(!1),a=e.ref(null),n=e.ref(null),l=e.reactive({"kro-menu__content--y-bottom":!1,"kro-menu__content--y-bottom-offset":!1,"kro-menu__content--y-top":!1,"kro-menu__content--y-top-offset":!1,"kro-menu__content--x-left":!1,"kro-menu__content--x-left-offset":!1,"kro-menu__content--x-right":!1,"kro-menu__content--x-right-offset":!1}),s=()=>{Object.keys(l).forEach(e=>l[e]=!1);const{offsetX:e,offsetY:s,left:i,right:c,top:d,bottom:u}=t,{canFit:p}=((e,t,o)=>{if(!e.value||!t.value)return{canFit:{top:!1,bottom:!1,left:!1,right:!1}};const{innerWidth:r,innerHeight:a}=window,n=e.value.getBoundingClientRect(),l=t.value,s=o.offsetX?n.width:0,i=o.offsetY?n.height:0;return{canFit:{bottom:l.offsetHeight+n.top+i<a,top:l.offsetHeight<n.top,left:l.offsetTop<n.left,right:l.offsetWidth+n.left+s<r}}})(a,n,{offsetX:e,offsetY:s});p.top&&d?l["kro-menu__content--y-top"+(s?"-offset":"")]=!0:p.bottom&&u||p.bottom?l["kro-menu__content--y-bottom"+(s?"-offset":"")]=!0:p.top&&(l["kro-menu__content--y-top"+(s?"-offset":"")]=!0),p.left&&i?l["kro-menu__content--x-left"+(e?"-offset":"")]=!0:p.right&&c||p.right?l["kro-menu__content--x-right"+(e?"-offset":"")]=!0:p.left&&(l["kro-menu__content--x-left"+(e?"-offset":"")]=!0),o("open"),r.value=!0},i=()=>{o("close"),r.value=!1};return{isOpen:r,classes:l,open:s,close:i,toggle:()=>{r.value?i():s()},menu:n,container:a}}};const ue={ref:"container",class:"kro-menu"};de.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",ue,[e.createVNode("div",{class:["kro-menu__scrim",{"kro-menu__scrim--is-open":a.isOpen}],onClick:o[1]||(o[1]=(...e)=>a.close(...e))},null,2),e.renderSlot(t.$slots,"activator",{open:a.open}),e.createVNode("div",{ref:"menu",class:["kro-menu__content",{...a.classes,"kro-menu__content--is-open":a.isOpen}]},[e.renderSlot(t.$slots,"default")],2)],512)},de.__file="src/components/Menu/Menu.vue";var pe={name:"KroAvatar",props:{src:String,color:String,small:Boolean,large:Boolean}};pe.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",{class:["kro-avatar",{"kro-avatar__small":r.small,"kro-avatar__large":r.large}]},[r.src?(e.openBlock(),e.createBlock("img",{key:0,src:r.src,alt:""},null,8,["src"])):r.color?(e.openBlock(),e.createBlock("div",{key:1,style:{backgroundColor:r.color},class:"kro-avatar__color-circle"},null,4)):e.createCommentVNode("v-if",!0)],2)},pe.__file="src/components/Avatar/Avatar.vue";var me={name:"KroProgressBar",props:{stream:Boolean,indeterminate:Boolean,rounded:{type:Boolean,default:!0},value:{type:Number,default:0},bufferValue:{type:Number,default:100}}};const fe=e.createVNode("div",{class:"kro-progress-bar__stream"},[e.createVNode("div",{class:"kro-progress-bar__stream-content"})],-1),ve=e.createVNode("div",{class:"kro-progress-bar__indeterminate"},null,-1);me.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",{class:{"kro-progress-bar":!0,"kro-progress-bar--is-stream":r.stream,"kro-progress-bar--is-indeterminate":r.indeterminate,"kro-progress-bar--rounded":r.rounded}},[fe,e.createVNode("div",{class:"kro-progress-bar__buffer",style:{"--kro-progress-bar-buffer-value":r.bufferValue-100+"%"}},null,4),e.createVNode("div",{class:"kro-progress-bar__progress",style:{"--kro-progress-bar-value":r.value-100+"%"}},null,4),ve],2)},me.__file="src/components/ProgressBar/ProgressBar.vue";var ke=e.defineComponent(Object.assign(Object.assign({},{name:"KroLayout",emits:["update:is-drawer-open","update:is-drawer-hidden"]}),{props:{absolute:{type:Boolean,required:!1},responsiveWidth:{type:Number,required:!1},temporary:{type:Boolean,required:!1},right:{type:Boolean,required:!1},toolbarHeight:{type:String,required:!1},clipToolbar:{type:Boolean,required:!1},mini:{type:Boolean,required:!1}},setup:function(o,r){const a=e.ref(!!r.slots.drawer),n=t.useMediaQuery(`(max-width: ${o.responsiveWidth||768}px)`),l=e.computed(()=>o.mini?"6rem":"16rem"),s=e.computed(()=>n.value||o.temporary||!a.value?"0":"var(--drawerWidth)"),i=e.computed(()=>o.toolbarHeight||"4rem"),c=e.computed(()=>o.clipToolbar?"var(--contentOffsetLeft)":"0"),d=e.computed(()=>o.clipToolbar||n.value||o.temporary?"0":"var(--toolbarHeight)");return e.onUpdated(()=>{a.value=!!r.slots.drawer}),e.watchEffect(()=>{r.emit("update:is-drawer-open",!(n.value||o.temporary)),r.emit("update:is-drawer-hidden",n.value||o.temporary)}),e.useCssVars(e=>({drawerWidth:l,toolbarHeight:i,toolbarLeftOffset:c,drawerOffsetTop:d,contentOffsetLeft:s})),{hasDrawer:a,isSmallScreen:n,drawerWidth:l,contentOffsetLeft:s,toolbarHeight:i,toolbarLeftOffset:c,drawerOffsetTop:d}}}));const he={class:"kro-layout"},ye={key:2,class:"kro-layout__toolbar"},ge={class:"kro-layout__container"},be={key:0,class:"kro-layout__content"},_e={key:1,class:"kro-layout__footer"};ke.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",he,[t.$slots.drawer?(e.openBlock(),e.createBlock("div",{key:0,class:["kro-layout__scrim",{"kro-layout__scrim--is-open":t.$attrs["is-drawer-open"]&&(a.isSmallScreen||r.temporary)}],onClick:o[1]||(o[1]=e=>t.$emit("update:is-drawer-open",!1))},null,2)):e.createCommentVNode("v-if",!0),t.$slots.drawer?(e.openBlock(),e.createBlock("div",{key:1,class:["kro-layout__drawer",{"kro-layout__drawer--hidden":a.isSmallScreen||r.temporary,"kro-layout__drawer--is-open":t.$attrs["is-drawer-open"]}]},[e.renderSlot(t.$slots,"drawer")],2)):e.createCommentVNode("v-if",!0),t.$slots.toolbar?(e.openBlock(),e.createBlock("div",ye,[e.renderSlot(t.$slots,"toolbar")])):e.createCommentVNode("v-if",!0),e.createVNode("div",ge,[t.$slots.default?(e.openBlock(),e.createBlock("div",be,[e.renderSlot(t.$slots,"default")])):e.createCommentVNode("v-if",!0),t.$slots.footer?(e.openBlock(),e.createBlock("div",_e,[e.renderSlot(t.$slots,"footer")])):e.createCommentVNode("v-if",!0)])])},ke.__file="src/components/Layout/Layout.vue";var Be={name:"KroSelect",props:{label:{type:String},required:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},autofocus:{type:Boolean},name:{type:String},id:{type:String}},emits:["update:modelValue"],setup(t,{attrs:o}){const r=e.ref(!1),a=e.ref(null);return e.onMounted(()=>{a.value&&Array.from(a.value.options).forEach(e=>{e.value===o.modelValue&&(e.selected=!0)})}),{focused:r,select:a}}};const xe={class:"kro-select"},Se={class:"kro-select__hidden-label"},we=e.createVNode("option",{selected:"",hidden:""},null,-1);Be.render=function(t,o,r,a,n,l){const s=e.resolveComponent("kro-icon");return e.openBlock(),e.createBlock("div",xe,[e.createVNode("div",{class:{"kro-select__container":!0,"kro-select--focused":a.focused,"kro-select--has-text":t.$attrs.modelValue}},[e.createVNode("label",{class:{"kro-select__label":!0,"kro-select--focused":a.focused,"kro-select--has-text":t.$attrs.modelValue},for:r.id},e.toDisplayString(r.label),11,["for"]),e.createVNode("div",Se,e.toDisplayString(r.label),1),e.createVNode("span",{class:{"kro-select__pseudo-label":!0,"kro-select--focused":a.focused,"kro-select--has-text":t.$attrs.modelValue}},e.toDisplayString(r.label),3),e.createVNode("select",{id:r.id,ref:"select",class:"kro-select__input",disabled:r.disabled,required:r.required,readonly:r.readonly,autofocus:r.autofocus,name:r.name,value:t.$attrs.modelValue,onChange:o[1]||(o[1]=e=>t.$emit("update:modelValue",e.target.value)),onFocus:o[2]||(o[2]=e=>a.focused=!0),onBlur:o[3]||(o[3]=e=>a.focused=!1)},[we,e.renderSlot(t.$slots,"default")],40,["id","disabled","required","readonly","autofocus","name","value"]),e.createVNode(s,{class:"kro-select__icon",icon:"mdi:chevron-down"})],2)])},Be.__file="src/components/Select/Select.vue";var Ve={name:"KroSlider",props:{disabled:{type:Boolean,default:!1},step:{type:Number,default:1},ticks:{default:!1,type:[Boolean,String]},min:{type:Number,default:0},max:{type:Number,default:100}},emits:["update:modelValue"],setup(o,{emit:r,attrs:a}){const n=e.ref(),l=e.ref(),{targetPercentage:s}=(o=>{const{x:r,elementPositionX:a,elementWidth:n}=t.useMouseInElement(o),l=e.computed(()=>Math.min(Math.max(0,r.value-a.value),n.value)/(n.value||1));return{elementWidth:n,targetPercentage:l}})(n),{elementWidth:i}=(o=>{const r=e.ref(0),a=e.ref(0),n=e.ref(0),l=e.ref(0),s=e=>{const{left:t,top:o,width:s,height:i}=e.getBoundingClientRect();r.value=s,a.value=i,n.value=t,l.value=o};e.watch(o,e=>{const t=e||document.body;s(t)});const i=t.useThrottleFn(()=>{const e=o.value||document.body;s(e)},250);return t.useEventListener("resize",i),{elementWidth:r,elementHeight:a,elementLeft:n,elementTop:l}})(n),c=e.ref(!1),{disableDocumentSelect:d,enableDocumentSelect:u}=q(),p=()=>{c.value=!1,u(),removeEventListener("touchcancel",p),removeEventListener("touchend",p),removeEventListener("mouseup",p)},m=()=>{c.value=!0,d(),addEventListener("touchcancel",p),addEventListener("touchend",p),addEventListener("mouseup",p)},f=e.computed(()=>i.value/Math.ceil((o.max-o.min)/o.step)),v=()=>{r("update:modelValue",Math.max(o.min,Math.min(o.max,a.modelValue-o.step)))},k=()=>{r("update:modelValue",Math.max(o.min,Math.min(o.max,a.modelValue+o.step)))};return e.onMounted(()=>{r("update:modelValue",Math.max(o.min,Math.min(a.modelValue||0,o.max)))}),e.watchEffect(()=>{c.value&&r("update:modelValue",Math.max(o.min,Math.min(Math.round(s.value*(o.max-o.min)/o.step)*o.step+o.min,o.max)))}),{knobRef:l,sliderRef:n,targetPercentage:s,enableEditing:m,trackSpacing:f,isEditing:c,onSliderClick:()=>{setTimeout(()=>{l.value.focus()},0),m()},incrementValue:e=>{"ArrowLeft"===e.key&&v(),"ArrowRight"===e.key&&k()},subtractValue:v,addValue:k}}};const Ce={class:"kro-slider__track-container"},Ne={ref:"sliderRef",class:"kro-slider__track"},Ke=e.createVNode("div",{class:"kro-slider__progress"},null,-1),$e={class:"kro-slider__knob-container"},Ae=e.createVNode("div",{class:"kro-slider__thumb"},null,-1),De={key:0},Te={key:1};Ve.render=function(t,o,r,a,n,l){return e.openBlock(),e.createBlock("div",{class:"kro-slider",style:{"--kro-slider-progress":(t.$attrs.modelValue-r.min)/(r.max-r.min)*100-100+"%"},onTouchstartPassive:o[2]||(o[2]=(...e)=>a.enableEditing(...e)),onMousedown:o[3]||(o[3]=(...e)=>a.onSliderClick(...e))},[e.createVNode("div",Ce,[e.createVNode("div",Ne,[r.ticks?(e.openBlock(),e.createBlock("div",{key:0,style:{"--kro-slider-tick-spacing":a.trackSpacing+"px"},class:"kro-slider__markers"},null,4)):e.createCommentVNode("v-if",!0),Ke],512),e.createVNode("div",$e,[e.createVNode("button",{ref:"knobRef",class:"kro-slider__knob",tabindex:"0",onKeydown:o[1]||(o[1]=(...e)=>a.incrementValue(...e))},null,544),e.createVNode("div",{class:["kro-slider__preview-value",{"kro-slider__preview-value--is-active":a.isEditing}]},[Ae,t.$slots.thumb?(e.openBlock(),e.createBlock("span",Te,[e.renderSlot(t.$slots,"thumb",{value:t.$attrs.modelValue})])):(e.openBlock(),e.createBlock("span",De,e.toDisplayString(t.$attrs.modelValue),1))],2)])])],36)},Ve.__file="src/components/Slider/Slider.vue";const Me={mounted(){console.log("Ok Tooltip")}};const Oe=(qe=Object.freeze({__proto__:null,KroButton:h,KroButtonGroup:b,KroIcon:u,KroSpinner:p,KroSquircle:f,KroSwitch:B,KroTextfield:N,KroToolbar:A,KroDialog:I,KroSurface:D,KroDivider:U,KroAlert:Y,KroApp:ee,KroListItem:re,KroMenu:de,KroAvatar:pe,KroProgressBar:me,KroLayout:ke,KroSelect:Be,KroSlider:Ve}),je=Object.freeze({__proto__:null,Tooltip:Me}),{install(e,t){qe&&Object.entries(qe).forEach(([t,o])=>{o&&e.component(t,o)}),je&&Object.entries(je).forEach(([t,o])=>{o&&e.directive(t,o)}),e.provide(l,t.icons),n()}});var qe,je,Le=Object.freeze({__proto__:null,ButtonMetadata:g,ButtonGroupMetadata:{title:"KroButtonGroup",description:"A container for multiple related buttons"},IconMetadata:{title:"KroIcon",description:"Display an SVG icon",props:[{name:"icon",description:"The name of the icon to display",type:"string",values:"-",default:"undefined"}],css:[{name:"--kro-icon-size",description:"The size of the icon",type:"size",default:"1.5rem"}]},SpinnerMetadata:{title:"KroSpinner",description:"A loading indicator",css:[{name:"--kro-spinner-size",description:"Sets the size of the spinner",type:"size",default:"2.5rem"},{name:"--kro-spinner-thickness",description:"Sets the thickness of the spinner",type:"size",default:"0.35rem"},{name:"--kro-spinner-color",description:"Sets the color of the spinner",type:"size",default:"--kro-foreground"}]},SquircleMetadata:{title:"KroSquircle",description:"A component used for visual effect."},SwitchMetadata:{title:"KroSwitch",description:"",props:[{name:"v-model",description:"The value of the switch",type:"bool",values:"-",default:"undefined"}],css:[{name:"--kro-switch-track-background",description:"The color of the track background.",type:"color",default:"--kro-background-secondary"},{name:"--kro-switch-track-active-background",description:"The track color when the switch is set to true.",type:"color",default:"--kro-primary-darken"},{name:"--kro-switch-knob-color",description:"The color of the switch knob.",type:"color",default:"--kro-primary"},{name:"--kro-switch-knob-shadow",description:"The shadow of the switch knob.",type:"shadow",default:"--kro-shadow"}]},TextfieldMetadata:{title:"KroTextfield",description:"",props:[{name:"v-model",description:"The value of the textfield",type:"string",values:"-",default:"undefined"},{name:"label",description:"The textfield label",type:"string",values:"-",default:"undefined"},{name:"type",description:"The textfield type",type:"string",values:"text | tel | email | password | url | search",default:"text"},{name:"required",description:"Marks the textfield as required",type:"bool",values:"-",default:"false"},{name:"disabled",description:"Marks the textfield as disabled",type:"bool",values:"-",default:"false"},{name:"multiline",description:"Makes the textfield into a textarea than can support multiple lines.",type:"bool",values:"-",default:"false"},{name:"readonly",description:"Marks the textfield as readonly",type:"bool",values:"-",default:"false"},{name:"autofocus",description:"Autofocuses the textfield when the component loads.",type:"bool",values:"-",default:"false"},{name:"min",description:"Sets the min value if the textfield is a nubmer input",type:"number",values:"-",default:"undefined"},{name:"max",description:"Sets the max value if the textfield is a nubmer input",type:"number",values:"-",default:"undefined"},{name:"maxlength",description:"Sets the max amount of characters that the textfield will accept",type:"number",values:"-",default:"undefined"},{name:"name",description:"Sets the name of the textfield.",type:"string",values:"-",default:"undefined"},{name:"id",description:"Sets the id of the textfield",type:"string",values:"-",default:"undefined"},{name:"autoresize",description:"If the textfield is multiline, then this will autoresize the textfield vertically as the user types.",type:"bool",values:"-",default:"true"}],css:[{name:"--kro-textfield-border-color",description:"The border color of the textifled",type:"color",default:"--kro-divider"},{name:"--kro-textifled-focused-border-color",description:"The border color of the textifled when it is focused",type:"color",default:"--kro-primary"}]},ToolbarMetadata:{title:"KroToolbar",description:"",props:[{name:"small",description:"Makes the height of the toolbar smaller.",type:"bool",values:"-",default:"false"},{name:"padded",description:"Adds padding to the toolbar.",type:"bool",values:"-",default:"false"},{name:"raised",description:"Adds a shadow to the toolbar.",type:"bool",values:"-",default:"false"}],css:[{name:"--kro-toolbar-height",description:"The height of the toolbar",type:"size",default:"4rem"},{name:"--kro-toolbar-background",description:"The background color of the toolbar",type:"color",default:"--kro-background-secondary"},{name:"--kro-toolbar-shadow",description:"The shadow of a raised toolbar",type:"color",default:"--kro-background-shadow"}]},DialogMetadata:{title:"KroDialog",description:"Dialogs are used to display important information requiring the users immediate attention, often to confirm an action or to display an important error message, and should only be used when necessary.",props:[{name:"v-model",description:"Contorls the open state of the dialog",type:"bool",values:"-",default:"false"},{name:"persistent",description:"If enabled, the dialog can only be closed by the close button",type:"bool",values:"-",default:"false"}],events:[{name:"@open",description:"Fired when the dialog is opened",parameters:[]},{name:"@close",description:"Fired when the dialog is closed",parameters:[]}],slots:[{name:"#activator",description:"Slots the button that can be used to open the dialog",props:["open","close","toggle"]},{name:"#title",description:"Slot for the title of the dialog",props:["open","close","toggle"]},{name:"#controls",description:"Slot for the controls of the dialog",props:["open","close","toggle"]},{name:"#default",description:"Slot for the content of the dialog",props:[]}]},SurfaceMetadata:{title:"KroSurface",description:"A surface that contains content and can have a label",props:[{name:"padded",description:"Adds a padding to the container.",type:"bool",values:"-",default:"true"},{name:"raised",description:"Adds a shadow to the container.",type:"bool",values:"-",default:"true"},{name:"outline",description:"Adds an outline to the container.",type:"bool",values:"-",default:"false"},{name:"icon",description:"Adds an icon to the container.",type:"bool",values:"-",default:"undefined"},{name:"label",description:"Adds a label to the container.",type:"string",values:"-",default:"undefined"}],css:[{name:"--kro-surface-background",description:"",type:"color",default:"--kro-background-secondary"},{name:"--kro-surface-outline",description:"Sets the outline color of and outlined container",type:"color",default:"--kro-divider"},{name:"--kro-surface-shadow",description:"Sets the shadow of a raised container",type:"shadow",default:"--kro-shadow"}]},DividerMetadata:{title:"KroDivider",description:"",props:[{name:"vertical",description:"Makes the divider a vertical divider",type:"bool",values:"-",default:"false"}]},AlertMetadata:{title:"KroAlert",description:"",props:[{name:"type",description:"Defines the type of alert that is shown.",type:"string",values:["info","error","warning","success"],default:"info"},{name:"dismissible",description:"Shows a close icon on the alert allowing the user to dismiss the alert.",type:"bool",values:"-",default:"false"},{name:"icon",description:"Sets the icon that is displayed on the alert.",type:"string",values:"-",default:"undefined"},{name:"tag",description:"Sets the root tage of the alert",type:"string",values:"-",default:"div"},{name:"outline",description:"Give the alert an outline style.",type:"bool",values:"-",default:"false"}],events:[{name:"@dismissed",description:"Fires when the alert is dismissed",parameters:[]},{name:"@show",description:"Fires when the alert is shown after being dismissed",parameters:[]}],slots:[{name:"#default",description:"Slot for the text content of the alert.",props:[]}]},AppMetadata:{title:"KroApp",description:""},ListMetadata:ce,MenuMetadata:{title:"KroMenu",description:"",props:[{name:"offsetX",description:"Offsets the menu horizontally so it is not covering the activator element.",type:"bool",values:"-",default:"false"},{name:"offsetY",description:"Offsets the menu vertically so it is not coverting the activator element",type:"bool",values:"-",default:"false"},{name:"left",description:"Positions the menu to open to the left of the activator.",type:"bool",values:"-",default:"false"},{name:"right",description:"Positions the menu to open to the right of the activator.",type:"bool",values:"-",default:"false"},{name:"top",description:"Positions the menut to open above the activator.",type:"bool",values:"-",default:"false"},{name:"bottom",description:"Positions the element to open below the activator.",type:"bool",values:"-",default:"false"}],slots:[{name:"#default",description:"",props:[]}],css:[{name:"--kro-menu-min-width",description:"",type:"size",default:"200px"},{name:"--kro-menu-max-width",description:"",type:"size",default:"300px"}]},AvatarMetadata:{title:"KroAvatar",description:"",props:[{name:"src",description:"Sets the image of the avatar",type:"string",values:"-",default:"undefined"},{name:"color",description:"Sets the color of the avatar.",type:"string",values:"-",default:"undefined"},{name:"small",description:"Makes the avatar smaller.",type:"bool",values:"-",default:"false"},{name:"large",description:"Makes the avatar larger.",type:"bool",values:"-",default:"false"}],css:[{name:"--kro-avatar-size",description:"",default:"3rem",type:"CSS Size Unit"},{name:"--kro-avatar-radius",description:"",default:"50%",type:"CSS Size Unit"}]},ProgressBarMetadata:{title:"KroProgressBar",description:"",props:[{name:"stream",description:"Display a speical style to the progress bar to indicate it is a stream",type:"bool",values:"-",default:"false"},{name:"indeterminate",description:"Display a special style to the progress bar to indicate that is indeterminate.",type:"",values:"-",default:"false"},{name:"rounded",description:"Applies a rounded style to the progress bar.",type:"bool",values:"-",default:"true"},{name:"value",description:"Sets the value of the progress bar.",type:"number",values:"-",default:"0"},{name:"bufferValue",description:"Sets the buffer value of the progress bar.",type:"number",values:"-",default:"100"}],css:[]},LayoutMetadata:{title:"KroLayout",description:"",props:[{name:"responsiveWidth",default:"768",description:"The width at which the drawer is hidden",type:"number",values:[]},{name:"temporary",default:"false",description:"Hides the drawer by default",type:"bool",values:[]},{name:"clipToolbar",default:"false",description:"Shifts the toolbar to the right to make room for the drawer",type:"bool",values:[]},{name:"mini",default:"false",description:"Makes the drawer smaller",type:"bool",values:[]},{name:"v-model:is-drawer-open",default:"true or false",description:"Controls the open state of the drawer",type:"bool",values:[]},{name:"v-model:is-drawer-hidden",default:"true or false",description:"Indicates if the drawer is in a default hidden state",type:"bool",values:[]}],slots:[{name:"#drawer",description:"Contains the sidebar navigation of the page",props:[]},{name:"#toolbar",description:"Contains the toolbar of the page",props:[]},{name:"#footer",description:"Contains the footer content of the page",props:[]},{name:"#default",description:"Contains the contents of the page",props:[]}]},SelectMetadata:{title:"KroSelect",description:"A styled select component.",props:[{name:"label",description:"",type:"bool",values:"-",default:"false"},{name:"required",description:"",type:"bool",values:"-",default:"false"},{name:"disabled",description:"",type:"bool",values:"-",default:"false"},{name:"readonly",description:"",type:"bool",values:"-",default:"false"},{name:"autofocus",description:"",type:"string",values:"-",default:"undefined"},{name:"name",description:"",type:"string",values:"-",default:"undefined"},{name:"id",description:"",type:"string",values:"-",default:"undefined"}]},SliderMetadata:{title:"KroSlider",description:"",props:[{name:"v-model",description:"The value of the slider",type:"number",values:"-",default:"undefined"},{name:"disabled",description:"Disables the slider",type:"bool",values:"-",default:"false"},{name:"steps",description:"Sets the step amount for each tick",type:"number",values:"-",default:"1"},{name:"ticks",description:"Display the ticks on the slider",type:"bool",values:"-",default:"false"},{name:"min",description:"Set the min value of the slider",type:"number",values:"-",default:"0"},{name:"max",description:"Set the max value of the slider",type:"number",values:"-",default:"100"}],slots:[{name:"#thumb",description:"A slot to replace the default value of the thumb.",props:["value"]}],css:[{name:"--kro-slider-tick-color",description:"The color of the tick marks on the slider.",type:"color",default:"rgba(0, 0, 0, .24)"},{name:"--kro-slider-track-color",description:"The color of the slider track.",type:"color",default:"--kro-background-secondary"},{name:"--kro-slider-progress-color",description:"The color of the progress bar on the track.",type:"color",default:"--kro-primary"},{name:"--kro-slider-knob-color",description:"The color of the knob on the slider.",type:"color",default:"--kro-primary-lighten"},{name:"--kro-slider-thumb-foreground",description:"The foreground color of the thumb.",type:"color",default:"--kro-primary-foreground"},{name:"--kro-slider-thumb-background",description:"The background color of the thumb.",type:"color",default:"--kro-primary"}]}});exports.KroAlert=Y,exports.KroApp=ee,exports.KroAvatar=pe,exports.KroButton=h,exports.KroButtonGroup=b,exports.KroDialog=I,exports.KroDivider=U,exports.KroIcon=u,exports.KroLayout=ke,exports.KroListItem=re,exports.KroMenu=de,exports.KroProgressBar=me,exports.KroSelect=Be,exports.KroSlider=Ve,exports.KroSpinner=p,exports.KroSquircle=f,exports.KroSurface=D,exports.KroSwitch=B,exports.KroTextfield=N,exports.KroToolbar=A,exports.KroUIBaseConfigurationPlugin=()=>({install(e,t){t.components&&Array.isArray(t.components)&&Object.entries(t.components).forEach(([t,o])=>{e.component(t,o)}),n()}}),exports.KroUIPlugin=Oe,exports.Metadata=Le,exports.useDialog=()=>({createDialog:e=>new Promise((t,o)=>{E(Object.assign(Object.assign({},j),e),t,o)}),createConfirmationDialog:e=>new Promise((t,o)=>{E(Object.assign(Object.assign({},L),e),t,o)})}),exports.useTheme=()=>({setTheme:e=>{a.value=e},getTheme:()=>a.value,theme:a}); |
@@ -1,2 +0,2 @@ | ||
import{watch as e,computed as t,defineComponent as o,ref as a,onMounted as r,nextTick as n,openBlock as s,createBlock as l,createVNode as i,resolveComponent as d,resolveDynamicComponent as c,mergeProps as u,withCtx as p,createCommentVNode as f,renderSlot as m,withDirectives as v,vShow as h,toDisplayString as y,onUnmounted as k,cloneVNode as b,onUpdated as g,Fragment as _,Teleport as x,Transition as w,renderList as S,createTextVNode as B,reactive as K,watchEffect as $,useCssVars as A}from"vue";import{useLocalStorage as V,useThrottleFn as T,useEventListener as M,useMediaQuery as O,useMouseInElement as C}from"@vueuse/core";import D from"@purge-icons/generated";import q from"focus-trap";let j;const L=()=>({setTheme:e=>{j.value=e},getTheme:()=>j.value,theme:j}),E=()=>{j=V("kro.theme","default-dark"),e(()=>j.value,()=>{document.documentElement.className="kro-theme__"+j.value},{immediate:!0})},F=[{name:"to",description:"Denotes the target route of the link.",type:"string | object",values:"-",default:"undefined"},{name:"exact",description:"Exactly match the link. Without this, '/' will match every route.",type:"bool",values:"-",default:"undefined"},{name:"activeClass",description:"Configure the active CSS class applied when the link is active",type:"string",values:"-",default:"undefined"},{name:"exactActiveClass",description:"Configure the active CSS class applied when the link is active with exact match.",type:"string",values:"-",default:"undefined"},{name:"href",description:"Designates the component as anchor and applies the href attribute.",type:"string",values:"-",default:"undefined"},{name:"target",description:"Designates the target attribute. This should only be applied when using the href prop.",type:"string",values:"-",default:"undefined"}],P={to:{type:[String,Object]},href:String,target:{type:String,default:"_blank"},exact:{type:Boolean,default:!1},activeClass:String,exactActiveClass:String},z=e=>({tag:e.to?"router-link":e.href?"a":null,componentProps:t(()=>e.to?{to:e.to}:e.href?{href:e.href}:{}),routeData:e}); | ||
import{watch as e,inject as t,computed as o,defineComponent as a,ref as r,onMounted as n,nextTick as s,openBlock as l,createBlock as i,createVNode as d,resolveComponent as c,resolveDynamicComponent as u,mergeProps as p,withCtx as f,createCommentVNode as m,renderSlot as v,withDirectives as h,vShow as y,toDisplayString as k,onUnmounted as b,cloneVNode as g,onUpdated as _,Fragment as x,Teleport as w,Transition as S,renderList as B,createTextVNode as K,reactive as $,watchEffect as A,useCssVars as V}from"vue";import{useLocalStorage as T,useThrottleFn as M,useEventListener as O,useMediaQuery as C,useMouseInElement as D}from"@vueuse/core";import q from"focus-trap";let j;const L=()=>({setTheme:e=>{j.value=e},getTheme:()=>j.value,theme:j}),E=()=>{j=T("kro.theme","default-dark"),e(()=>j.value,()=>{document.documentElement.className="kro-theme__"+j.value},{immediate:!0})},F=Symbol("Provides instance of @purge-icons/generated");const P=[{name:"to",description:"Denotes the target route of the link.",type:"string | object",values:"-",default:"undefined"},{name:"exact",description:"Exactly match the link. Without this, '/' will match every route.",type:"bool",values:"-",default:"undefined"},{name:"activeClass",description:"Configure the active CSS class applied when the link is active",type:"string",values:"-",default:"undefined"},{name:"exactActiveClass",description:"Configure the active CSS class applied when the link is active with exact match.",type:"string",values:"-",default:"undefined"},{name:"href",description:"Designates the component as anchor and applies the href attribute.",type:"string",values:"-",default:"undefined"},{name:"target",description:"Designates the target attribute. This should only be applied when using the href prop.",type:"string",values:"-",default:"undefined"}],z={to:{type:[String,Object]},href:String,target:{type:String,default:"_blank"},exact:{type:Boolean,default:!1},activeClass:String,exactActiveClass:String},I=e=>({tag:e.to?"router-link":e.href?"a":null,componentProps:o(()=>e.to?{to:e.to}:e.href?{href:e.href}:{}),routeData:e}); | ||
/*! ***************************************************************************** | ||
@@ -16,2 +16,2 @@ Copyright (c) Microsoft Corporation. | ||
***************************************************************************** */ | ||
function I(e,t,o,a){return new(o||(o=Promise))((function(r,n){function s(e){try{i(a.next(e))}catch(e){n(e)}}function l(e){try{i(a.throw(e))}catch(e){n(e)}}function i(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(s,l)}i((a=a.apply(e,t||[])).next())}))}var N=o(Object.assign(Object.assign({},{name:"KroIcon"}),{props:{icon:{type:String,required:!0}},setup:function(t){const o=a(null),s=()=>I(this,void 0,void 0,(function*(){if(o.value){yield n();const e=D.renderSVG(t.icon,{});if(e)o.value.textContent="",o.value.appendChild(e);else{const e=document.createElement("span");e.className="iconify",e.dataset.icon=t.icon,o.value.textContent="",o.value.appendChild(e)}}}));return e(()=>t.icon,s,{flush:"post"}),r(s),{el:o}}}));N.render=function(e,t,o,a,r,n){return s(),l("div",{ref:"el",class:[e.$attrs.class,"kro-icon"]},null,2)},N.__file="src/components/Icon/Icon.vue";var H={name:"KroSpinner"};const R={class:"kro-spinner"};H.render=function(e,t,o,a,r,n){return s(),l("div",R)},H.__file="src/components/Spinner/Spinner.vue";var W={name:"KroSquircle"};const G={class:"kro-squircle",viewBox:"0 0 400 400","enable-background":"new 0 0 400 400","xml:space":"preserve"},X=i("path",{d:"M 0,200 C 0,0 0,0 200,0 S 400,0 400,200 400,400 200,400 0,400 0,200"},null,-1);W.render=function(e,t,o,a,r,n){return s(),l("svg",G,[X])},W.__file="src/components/Squircle/Squircle.vue";var U={name:"KroButton",components:{KroIcon:N,KroSpinner:H,KroSquircle:W},props:Object.assign(Object.assign({},P),{loading:{type:Boolean,default:!1},type:String,primary:Boolean,outline:Boolean,raised:Boolean,icon:String,hideExternalIcon:Boolean,warning:Boolean,error:Boolean,success:Boolean}),setup(e){const{tag:o,componentProps:a}=z(e);return{componentProps:a,componentType:t(()=>o||"button")}}};const Y={class:"kro-button__spinner"};U.render=function(e,t,o,a,r,n){const y=d("kro-squircle"),k=d("kro-icon"),b=d("kro-spinner");return s(),l(c(a.componentType),u({class:{"kro-button":!0,"kro-button--primary":o.primary,"kro-button--outline":o.outline,"kro-button--raised":o.raised,"kro-button--warning":o.warning,"kro-button--success":o.success,"kro-button--error":o.error,"kro-button--is-icon-button":o.icon&&!e.$slots.default},rel:"noreferrer"},a.componentProps,{target:e.href?e.target:""}),{default:p(()=>[o.icon&&!e.$slots.default?(s(),l(y,{key:0,class:"kro-button__squircle"})):f("v-if",!0),i("span",{class:{"kro-button__content":!0,"kro-button__content--is-loading":o.loading}},[o.icon?(s(),l(k,{key:0,class:"kro-button__icon",icon:o.icon},null,8,["icon"])):f("v-if",!0),m(e.$slots,"default"),!e.href||o.icon&&!e.$slots.default||o.hideExternalIcon?f("v-if",!0):(s(),l(k,{key:1,icon:"external"}))],2),v(i("span",Y,[i(b)],512),[[h,o.loading]])]),_:3},16,["class","target"])},U.__file="src/components/Button/Button.vue";const J={title:"KroButton",description:"A styled button with added functionality",props:[{name:"loading",description:"Displays a loading indicator over the button",type:"bool",values:"-",default:"false"},{name:"type",description:"The type of the button",type:"string",values:["button","reset","submit"],default:"button"},{name:"primary",description:"Applies a style to the button to indicate that it is a primary button",type:"bool",values:"-",default:"false"},{name:"outline",description:"Give the button an outline style",type:"bool",values:"-",default:"false"},{name:"raised",description:"Apply a shadow to the button",type:"string",values:"-",default:"false"},{name:"icon",description:"Adds an icon to the button",type:"string",values:"-",default:"undefined"},{name:"hideExternalIcon",description:"Hides the external link icon for buttons that are links.",type:"bool",values:"-",default:"false"},...F]};var Q={name:"KroButtonGroup"};const Z={class:"kro-button-group"};Q.render=function(e,t,o,a,r,n){return s(),l("div",Z,[m(e.$slots,"default")])},Q.__file="src/components/ButtonGroup/ButtonGroup.vue";var ee={name:"KroSwitch",props:{value:String},emits:["update:modelValue"],setup:(e,{emit:t,attrs:o})=>({update:a=>{a.target.checked?e.value?Array.isArray(o.modelValue)&&t("update:modelValue",[...o.modelValue,e.value]):t("update:modelValue",!0):e.value?Array.isArray(o.modelValue)&&t("update:modelValue",o.modelValue.filter(t=>t!==e.value)):t("update:modelValue",!1)}})};const te={class:"kro-switch"},oe={class:"kro-switch__container"},ae={class:"kro-switch__track"},re=i("div",{class:"kro-switch__knob"},null,-1),ne={key:0,class:"kro-switch__label"};ee.render=function(e,t,o,a,r,n){return s(),l("div",te,[i("div",oe,[i("input",{class:"kro-switch__input",checked:Array.isArray(e.$attrs.modelValue)?e.$attrs.modelValue.indexOf(o.value)>-1:!!e.$attrs.modelValue,type:"checkbox",onChange:t[1]||(t[1]=(...e)=>a.update(...e))},null,40,["checked"]),i("div",ae,[i("div",{class:{"kro-switch__track-active":!0,"kro-switch__track-active--is-active":Array.isArray(e.$attrs.modelValue)?e.$attrs.modelValue.indexOf(o.value)>-1:!!e.$attrs.modelValue}},null,2)]),i("div",{class:{"kro-switch__knob-container":!0,"kro-switch__knob-container--is-active":Array.isArray(e.$attrs.modelValue)?e.$attrs.modelValue.indexOf(o.value)>-1:!!e.$attrs.modelValue}},[re],2)]),e.$slots.default?(s(),l("div",ne,[m(e.$slots,"default")])):f("v-if",!0)])},ee.__file="src/components/Switch/Switch.vue";var se={name:"KroTextfield",props:{label:{type:String},type:{type:String,default:"text"},required:{type:Boolean},disabled:{type:Boolean},multiline:{type:Boolean},readonly:{type:Boolean},autofocus:{type:Boolean},min:{type:Number},max:{type:Number},maxlength:{type:Number},name:{type:String},id:{type:String},autoResize:{type:Boolean,default:!0},loading:{type:Boolean},success:{type:Boolean},error:{type:Boolean},message:{type:String}},emits:["update:modelValue"],setup(e){const t=a(!1),o=a();return{focused:t,runAutoResize:()=>{e.autoResize&&o.value&&(o.value.style.height="auto",o.value.style.height=o.value.scrollHeight+"px")},inputRef:o}}};const le={key:2,class:"block pr-2"},ie={key:0,class:"pl-4 text-xs font-medium"};se.render=function(e,t,o,a,r,n){const c=d("kro-spinner"),u=d("kro-icon");return s(),l("div",{class:["kro-textfield",{"kro-textfield--is-textarea":o.multiline}]},[i("div",{class:{"kro-textfield__container":!0,"kro-textfield--focused":a.focused,"kro-textfield--has-text":e.$attrs.modelValue,"kro-textfield--is-textarea":o.multiline}},[i("label",{class:{"kro-textfield__label":!0,"kro-textfield--focused":a.focused,"kro-textfield--has-text":e.$attrs.modelValue},for:o.id},y(o.label),11,["for"]),i("span",{class:{"kro-textfield__pseudo-label":!0,"kro-textfield--focused":a.focused,"kro-textfield--has-text":e.$attrs.modelValue}},y(o.label),3),o.multiline?(s(),l("textarea",{key:1,id:o.id,ref:"inputRef",class:"kro-textfield__input",disabled:o.disabled,required:o.required,readonly:o.readonly,autofocus:o.autofocus,maxlength:o.maxlength,name:o.name,value:e.$attrs.modelValue,onInput:t[4]||(t[4]=t=>{e.$emit("update:modelValue",t.target.value),a.runAutoResize()}),onFocus:t[5]||(t[5]=e=>a.focused=!0),onBlur:t[6]||(t[6]=e=>a.focused=!1)},null,40,["id","disabled","required","readonly","autofocus","maxlength","name","value"])):(s(),l("input",{key:0,class:"kro-textfield__input",id:o.id,disabled:o.disabled,required:o.required,readonly:o.readonly,autofocus:o.autofocus,type:o.type,min:o.min,max:o.max,maxlength:o.maxlength,name:o.name,value:e.$attrs.modelValue,onInput:t[1]||(t[1]=t=>e.$emit("update:modelValue",t.target.value)),onFocus:t[2]||(t[2]=e=>a.focused=!0),onBlur:t[3]||(t[3]=e=>a.focused=!1)},null,40,["id","disabled","required","readonly","autofocus","type","min","max","maxlength","name","value"])),o.loading||o.success||o.error?(s(),l("div",le,[o.loading?(s(),l(c,{key:0,class:"kro-textfield__spinner"})):o.success?(s(),l(u,{key:1,class:"kro-textfield__success-icon",icon:"mdi:check"})):o.error?(s(),l(u,{key:2,class:"kro-textfield__error-icon",icon:"mdi:alert"})):f("v-if",!0)])):f("v-if",!0)],2),e.$slots.default?(s(),l("div",ie,[m(e.$slots,"default")])):f("v-if",!0)],2)},se.__file="src/components/Textfield/Textfield.vue";var de={name:"KroToolbar",props:{small:Boolean,padded:Boolean,raised:Boolean}};de.render=function(e,t,o,a,r,n){return s(),l("div",{class:{"kro-toolbar":!0,"kro-toolbar--small":o.small,"kro-toolbar--raised":o.raised,"kro-toolbar--padded":o.padded}},[m(e.$slots,"default")],2)},de.__file="src/components/Toolbar/Toolbar.vue";var ce={name:"KroSurface",props:{padded:{type:Boolean,default:!0},raised:{type:Boolean,default:!0},outline:{type:Boolean,default:!1},icon:String,label:String}};const ue={key:0,class:"kro-surface__label-container"},pe={key:1,class:"kro-surface__label"};ce.render=function(e,t,o,a,r,n){const i=d("kro-icon");return s(),l("div",{class:{"kro-surface":!0,"kro-surface--padded":o.padded,"kro-surface--raised":o.raised,"kro-surface--outline":o.outline}},[o.icon||o.label?(s(),l("div",ue,[o.icon?(s(),l(i,{key:0,class:"kro-surface__icon",icon:o.icon},null,8,["icon"])):f("v-if",!0),o.label?(s(),l("div",pe,y(o.label),1)):f("v-if",!0)])):f("v-if",!0),m(e.$slots,"default")],2)},ce.__file="src/components/Surface/Surface.vue";const fe=o({emits:["update:active","activate","deactivate"],props:{active:{type:Boolean,default:!0},escapeDeactivates:{type:Boolean,default:!0},returnFocusOnDeactivate:{type:Boolean,default:!0},allowOutsideClick:{type:Boolean,default:!0},initialFocus:{type:[String,Function],default:void 0},fallbackFocus:{type:[String,Function],default:void 0}},setup(t,{slots:o,emit:n}){let s;const l=a(null);return r(()=>{e(()=>t.active,e=>{var o,a;e&&l.value?(s=q(l.value,{escapeDeactivates:t.escapeDeactivates,allowOutsideClick:()=>t.allowOutsideClick,returnFocusOnDeactivate:t.returnFocusOnDeactivate,onActivate:()=>{n("update:active",!0),n("activate")},onDeactivate:()=>{n("update:active",!1),n("deactivate")},initialFocus:"string"==typeof t.initialFocus?t.initialFocus:null!==(a=null===(o=t.initialFocus)||void 0===o?void 0:o.call(t))&&void 0!==a?a:l.value,fallbackFocus:t.fallbackFocus}),s.activate()):null==s||s.deactivate()},{immediate:!0})}),k(()=>{null==s||s.deactivate(),s=null}),()=>{var e;const t=null===(e=o.default)||void 0===e?void 0:e.call(o);if(!t||!t.length||t.length>1)throw new Error("FocusTrap requires exactly one child");return b(t[0],{ref:l})}}}),me=()=>({disableDocumentScroll:()=>{document.documentElement.classList.add("kro-helper--prevent-scroll")},enableDocumentScroll:()=>{document.documentElement.classList.remove("kro-helper--prevent-scroll")},disableDocumentSelect:()=>{document.documentElement.classList.add("kro-helper--prevent-select")},enableDocumentSelect:()=>{document.documentElement.classList.remove("kro-helper--prevent-select")},enableAppFocus:()=>{var e;null===(e=document.querySelector("#app"))||void 0===e||e.removeAttribute("tabindex")},disableAppFocus:()=>{var e;null===(e=document.querySelector("#app"))||void 0===e||e.setAttribute("tabindex","-1")}}),ve={title:"Dialog Title",message:"Dialog Message",style:"default",resolveButton:{text:"Ok",attributes:{primary:!0}},rejectButton:{text:"Cancel"}},he={title:"Confirmation Dialog",message:"Dialog Message",icon:"mdi:help-circle",style:"default",resolveButton:{text:"Ok",attributes:{primary:!0}},rejectButton:{text:"Cancel"}},ye=a([]),ke=(e,t,o)=>{const r=Object.assign(Object.assign({},e),{isOpen:a(!0),resolve:t,reject:o,destroy(){ye.value.splice(ye.value.indexOf(this),1)}});ye.value=[...ye.value,r]},be=()=>({createDialog:e=>new Promise((t,o)=>{ke(Object.assign(Object.assign({},ve),e),t,o)}),createConfirmationDialog:e=>new Promise((t,o)=>{ke(Object.assign(Object.assign({},he),e),t,o)})});const ge={name:"KroDialog",components:{KroSurface:ce,FocusTrap:fe},inheritAttrs:!1,emits:["update:modelValue","close","open","close-animation-end"]};var _e=o(Object.assign(Object.assign({},ge),{props:{persistent:{type:null,required:!1}},setup:function(e,{emit:t,attrs:o}){const{disableDocumentScroll:r,enableDocumentScroll:n}=me(),s=a(null);let l=!1;g(()=>{l||!0!==o.modelValue||(t("update:modelValue",!0),t("open"),r(),window.addEventListener("keydown",d),s.value&&s.value.focus())});const i=()=>{l=!0,t("update:modelValue",!0),t("open"),r(),window.addEventListener("keydown",d),s.value&&s.value.focus()},d=o=>{(t=>"keydown"!==(null==t?void 0:t.type)||"Escape"===t.key&&!e.persistent)(o)&&(t("update:modelValue",!1),t("close"),window.removeEventListener("keydown",d),n(),l=!1)};return{dialog:s,onDialogLeaveAnimationComplete:()=>{t("close-animation-end")},open:i,close:d,toggle:()=>{o.modelValue?d(null):i()}}}}));const xe={ref:"dialog",tabindex:"-1",class:"kro-dialog__container"},we={class:"grid grid-row gap-4"},Se={key:0,class:"kro-dialog__header text-lg"},Be={class:"kro-dialog__body"},Ke={key:1,class:"kro-dialog__footer"};_e.render=function(e,t,o,a,r,n){const c=d("focus-trap"),v=d("kro-surface");return s(),l(_,null,[m(e.$slots,"activator",{close:a.close,open:a.open,toggle:a.toggle}),(s(),l(x,{to:"#kro-portal"},[i(w,{appear:"",name:"kro-dialog-scrim"},{default:p(()=>[e.$attrs.modelValue?(s(),l("div",{key:0,class:"kro-dialog__scrim fixed inset-0",onClick:t[1]||(t[1]=()=>{o.persistent||a.close()})})):f("v-if",!0)]),_:1}),i("div",xe,[i(w,{appear:"",name:"kro-dialog","onAfter-leave":a.onDialogLeaveAnimationComplete},{default:p(()=>[e.$attrs.modelValue?(s(),l(v,u({key:0,class:"kro-dialog"},e.$attrs),{default:p(()=>[i(c,{modelValue:e.$attrs.modelValue,"onUpdate:modelValue":t[2]||(t[2]=t=>e.$attrs.modelValue=t)},{default:p(()=>[i("div",we,[e.$slots.header?(s(),l("div",Se,[m(e.$slots,"header",{open:a.open,close:a.close,toggle:a.toggle})])):f("v-if",!0),i("div",Be,[m(e.$slots,"default",{open:a.open,close:a.close,toggle:a.toggle})]),e.$slots.footer?(s(),l("div",Ke,[m(e.$slots,"footer",{open:a.open,close:a.close,toggle:a.toggle})])):f("v-if",!0)])]),_:3},8,["modelValue"])]),_:1},16)):f("v-if",!0)]),_:1},8,["onAfter-leave"])],512)]))],64)},_e.__file="src/components/Dialog/Dialog.vue";var $e={name:"KroDivider",props:{vertical:Boolean,inset:Boolean,label:String}};const Ae={key:0};$e.render=function(e,t,o,a,r,n){return s(),l("div",{class:["kro-divider",{"kro-divider--vertical":o.vertical,"kro-divider--inset":o.inset}]},[o.label?(s(),l("span",Ae,y(o.label),1)):f("v-if",!0)],2)},$e.__file="src/components/Divider/Divider.vue";var Ve={name:"KroAlert",components:{KroIcon:N,KroButton:U},props:{type:{type:String,default:"info"},dismissible:{type:Boolean,default:!1},tag:{type:String,default:"div"},icon:String,outline:{type:Boolean,default:!1}},emits:["dismissed","show"],setup(e,{emit:o}){const r=a(!1);return{iconName:t(()=>{const{type:t,icon:o}=e;return o||("warning"===t||"info"===t?"mdi:alert-circle":"error"===t?"mdi:alert":"success"===t?"mdi:check":null)}),isHidden:r,hide:()=>{o("dismissed"),r.value=!0},show:()=>{o("show"),r.value=!1}}}};const Te={class:"kro-alert__icon"},Me={key:0};Ve.render=function(e,t,o,a,r,n){const u=d("kro-icon"),y=d("kro-button");return v((s(),l(c(o.tag),{class:{"kro-alert":!0,"kro-alert--error":"error"===o.type,"kro-alert--info":"info"===o.type,"kro-alert--warning":"warning"===o.type,"kro-alert--success":"success"===o.type,"kro-alert--outline":o.outline,"kro-alert--has-icon":a.iconName,"kro-alert--is-dismissible":o.dismissible}},{default:p(()=>[i("div",Te,[a.iconName?(s(),l(u,{key:0,icon:a.iconName},null,8,["icon"])):f("v-if",!0)]),i("div",null,[m(e.$slots,"default")]),o.dismissible?(s(),l("div",Me,[i(y,{icon:"close",onClick:a.hide},null,8,["onClick"])])):f("v-if",!0)]),_:3},8,["class"])),[[h,!a.isHidden]])},Ve.__file="src/components/Alert/Alert.vue";var Oe=o(Object.assign(Object.assign({},{name:"ComposableDialogs"}),{setup:function(){return{instances:ye}}}));Oe.render=function(e,t,o,a,r,n){const c=d("kro-icon"),m=d("kro-button"),v=d("kro-dialog");return s(!0),l(_,null,S(a.instances,(e,t)=>(s(),l("div",{key:t},[i(v,{modelValue:e.isOpen,"onUpdate:modelValue":t=>e.isOpen=t,class:{"kro-composable-dialog--centered":"centered"===e.style},"onClose-animation-end":t=>e.destroy()},{header:p(()=>[i("div",{class:["flex items-center",{"flex-col":"centered"===e.style}]},[e.icon?(s(),l(c,{key:0,style:{color:e.iconColor?e.iconColor:""},class:[{"kro-composable-dialog__icon--large":"centered"===e.style},"mr-4"],icon:e.icon},null,8,["style","class","icon"])):f("v-if",!0),B(" "+y(e.title),1)],2)]),default:p(()=>[i("div",{class:{"text-center":"centered"===e.style}},y(e.message),3)]),footer:p(({close:t})=>[i("div",{class:["flex flex-row flex-1 gap-4",{"justify-end":"centered"!==e.style,"justify-center":"centered"===e.style}]},[e.rejectButton.hidden?f("v-if",!0):(s(),l(m,u({key:0},e.rejectButton.attributes,{onClick:()=>{e.reject(),t()}}),{default:p(()=>[B(y(e.rejectButton.text),1)]),_:2},1040,["onClick"])),e.resolveButton.hidden?f("v-if",!0):(s(),l(m,u({key:1},e.resolveButton.attributes,{onClick:()=>{e.resolve(),t()}}),{default:p(()=>[B(y(e.resolveButton.text),1)]),_:2},1040,["onClick"]))],2)]),_:2},1032,["modelValue","onUpdate:modelValue","class","onClose-animation-end"])]))),128)},Oe.__file="src/components/App/components/ComposableDialogs.vue";var Ce={name:"KroApp",components:{ComposableDialogs:Oe}};const De={class:"kro-app"},qe={class:"kro-app__content"};Ce.render=function(e,t,o,a,r,n){const c=d("composable-dialogs");return s(),l("div",De,[i("div",qe,[m(e.$slots,"default")]),i(c)])},Ce.__file="src/components/App/App.vue";var je={name:"KroListItem",props:Object.assign(Object.assign({},P),{tag:{type:String,default:"div"}}),setup(e){const{tag:o,componentProps:a}=z(e);return{componentProps:a,componentType:t(()=>o||"div")}}};const Le={key:0,class:"kro-list-item__icon"},Ee={class:"kro-list-item__content"},Fe={class:"kro-list-item__title"},Pe={key:0,class:"kro-list-item__subtitle"},ze={key:1,class:"kro-list-item__action"};je.render=function(e,t,o,a,r,n){return s(),l(c(a.componentType),u(a.componentProps,{class:"kro-list-item"}),{default:p(()=>[e.$slots.icon?(s(),l("div",Le,[m(e.$slots,"icon")])):f("v-if",!0),i("div",Ee,[i("span",Fe,[m(e.$slots,"default")]),e.$slots.subtitle?(s(),l("span",Pe,[m(e.$slots,"subtitle")])):f("v-if",!0)]),e.$slots.action?(s(),l("div",ze,[m(e.$slots,"action")])):f("v-if",!0)]),_:3},16)},je.__file="src/components/List/ListItem.vue";const Ie={title:"KroListItem",description:"",props:[{name:"tag",description:"",type:"string",values:"-",default:"div"},...F],slots:[{name:"#icon",description:"Item icon slot",props:[]},{name:"#subtitle",description:"Item subtitle slot",props:[]},{name:"#action",description:"Action on the right side of the item",props:[]},{name:"#default",description:"Main text of the item",props:[]}]};var Ne={name:"KroMenu",props:{offsetX:{type:Boolean,default:!1},offsetY:{type:Boolean,default:!1},left:Boolean,right:Boolean,top:Boolean,bottom:Boolean},emits:["open","close"],setup(e,{emit:t}){const o=a(!1),r=a(null),n=a(null),s=K({"kro-menu__content--y-bottom":!1,"kro-menu__content--y-bottom-offset":!1,"kro-menu__content--y-top":!1,"kro-menu__content--y-top-offset":!1,"kro-menu__content--x-left":!1,"kro-menu__content--x-left-offset":!1,"kro-menu__content--x-right":!1,"kro-menu__content--x-right-offset":!1}),l=()=>{Object.keys(s).forEach(e=>s[e]=!1);const{offsetX:a,offsetY:l,left:i,right:d,top:c,bottom:u}=e,{canFit:p}=((e,t,o)=>{if(!e.value||!t.value)return{canFit:{top:!1,bottom:!1,left:!1,right:!1}};const{innerWidth:a,innerHeight:r}=window,n=e.value.getBoundingClientRect(),s=t.value,l=o.offsetX?n.width:0,i=o.offsetY?n.height:0;return{canFit:{bottom:s.offsetHeight+n.top+i<r,top:s.offsetHeight<n.top,left:s.offsetTop<n.left,right:s.offsetWidth+n.left+l<a}}})(r,n,{offsetX:a,offsetY:l});p.top&&c?s["kro-menu__content--y-top"+(l?"-offset":"")]=!0:p.bottom&&u||p.bottom?s["kro-menu__content--y-bottom"+(l?"-offset":"")]=!0:p.top&&(s["kro-menu__content--y-top"+(l?"-offset":"")]=!0),p.left&&i?s["kro-menu__content--x-left"+(a?"-offset":"")]=!0:p.right&&d||p.right?s["kro-menu__content--x-right"+(a?"-offset":"")]=!0:p.left&&(s["kro-menu__content--x-left"+(a?"-offset":"")]=!0),t("open"),o.value=!0},i=()=>{t("close"),o.value=!1};return{isOpen:o,classes:s,open:l,close:i,toggle:()=>{o.value?i():l()},menu:n,container:r}}};const He={ref:"container",class:"kro-menu"};Ne.render=function(e,t,o,a,r,n){return s(),l("div",He,[i("div",{class:["kro-menu__scrim",{"kro-menu__scrim--is-open":a.isOpen}],onClick:t[1]||(t[1]=(...e)=>a.close(...e))},null,2),m(e.$slots,"activator",{open:a.open}),i("div",{ref:"menu",class:["kro-menu__content",{...a.classes,"kro-menu__content--is-open":a.isOpen}]},[m(e.$slots,"default")],2)],512)},Ne.__file="src/components/Menu/Menu.vue";var Re={name:"KroAvatar",props:{src:String,color:String,small:Boolean,large:Boolean}};Re.render=function(e,t,o,a,r,n){return s(),l("div",{class:["kro-avatar",{"kro-avatar__small":o.small,"kro-avatar__large":o.large}]},[o.src?(s(),l("img",{key:0,src:o.src,alt:""},null,8,["src"])):o.color?(s(),l("div",{key:1,style:{backgroundColor:o.color},class:"kro-avatar__color-circle"},null,4)):f("v-if",!0)],2)},Re.__file="src/components/Avatar/Avatar.vue";var We={name:"KroProgressBar",props:{stream:Boolean,indeterminate:Boolean,rounded:{type:Boolean,default:!0},value:{type:Number,default:0},bufferValue:{type:Number,default:100}}};const Ge=i("div",{class:"kro-progress-bar__stream"},[i("div",{class:"kro-progress-bar__stream-content"})],-1),Xe=i("div",{class:"kro-progress-bar__indeterminate"},null,-1);We.render=function(e,t,o,a,r,n){return s(),l("div",{class:{"kro-progress-bar":!0,"kro-progress-bar--is-stream":o.stream,"kro-progress-bar--is-indeterminate":o.indeterminate,"kro-progress-bar--rounded":o.rounded}},[Ge,i("div",{class:"kro-progress-bar__buffer",style:{"--kro-progress-bar-buffer-value":o.bufferValue-100+"%"}},null,4),i("div",{class:"kro-progress-bar__progress",style:{"--kro-progress-bar-value":o.value-100+"%"}},null,4),Xe],2)},We.__file="src/components/ProgressBar/ProgressBar.vue";var Ue=o(Object.assign(Object.assign({},{name:"KroLayout",emits:["update:is-drawer-open","update:is-drawer-hidden"]}),{props:{absolute:{type:Boolean,required:!1},responsiveWidth:{type:Number,required:!1},temporary:{type:Boolean,required:!1},right:{type:Boolean,required:!1},toolbarHeight:{type:String,required:!1},clipToolbar:{type:Boolean,required:!1},mini:{type:Boolean,required:!1}},setup:function(e,o){const r=a(!!o.slots.drawer),n=O(`(max-width: ${e.responsiveWidth||768}px)`),s=t(()=>e.mini?"6rem":"16rem"),l=t(()=>n.value||e.temporary||!r.value?"0":"var(--drawerWidth)"),i=t(()=>e.toolbarHeight||"4rem"),d=t(()=>e.clipToolbar?"var(--contentOffsetLeft)":"0"),c=t(()=>e.clipToolbar||n.value||e.temporary?"0":"var(--toolbarHeight)");return g(()=>{r.value=!!o.slots.drawer}),$(()=>{o.emit("update:is-drawer-open",!(n.value||e.temporary)),o.emit("update:is-drawer-hidden",n.value||e.temporary)}),A(e=>({drawerWidth:s,toolbarHeight:i,toolbarLeftOffset:d,drawerOffsetTop:c,contentOffsetLeft:l})),{hasDrawer:r,isSmallScreen:n,drawerWidth:s,contentOffsetLeft:l,toolbarHeight:i,toolbarLeftOffset:d,drawerOffsetTop:c}}}));const Ye={class:"kro-layout"},Je={key:2,class:"kro-layout__toolbar"},Qe={class:"kro-layout__container"},Ze={key:0,class:"kro-layout__content"},et={key:1,class:"kro-layout__footer"};Ue.render=function(e,t,o,a,r,n){return s(),l("div",Ye,[e.$slots.drawer?(s(),l("div",{key:0,class:["kro-layout__scrim",{"kro-layout__scrim--is-open":e.$attrs["is-drawer-open"]&&(a.isSmallScreen||o.temporary)}],onClick:t[1]||(t[1]=t=>e.$emit("update:is-drawer-open",!1))},null,2)):f("v-if",!0),e.$slots.drawer?(s(),l("div",{key:1,class:["kro-layout__drawer",{"kro-layout__drawer--hidden":a.isSmallScreen||o.temporary,"kro-layout__drawer--is-open":e.$attrs["is-drawer-open"]}]},[m(e.$slots,"drawer")],2)):f("v-if",!0),e.$slots.toolbar?(s(),l("div",Je,[m(e.$slots,"toolbar")])):f("v-if",!0),i("div",Qe,[e.$slots.default?(s(),l("div",Ze,[m(e.$slots,"default")])):f("v-if",!0),e.$slots.footer?(s(),l("div",et,[m(e.$slots,"footer")])):f("v-if",!0)])])},Ue.__file="src/components/Layout/Layout.vue";var tt={name:"KroSelect",props:{label:{type:String},required:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},autofocus:{type:Boolean},name:{type:String},id:{type:String}},emits:["update:modelValue"],setup(e,{attrs:t}){const o=a(!1),n=a(null);return r(()=>{n.value&&Array.from(n.value.options).forEach(e=>{e.value===t.modelValue&&(e.selected=!0)})}),{focused:o,select:n}}};const ot={class:"kro-select"},at={class:"kro-select__hidden-label"},rt=i("option",{selected:"",hidden:""},null,-1);tt.render=function(e,t,o,a,r,n){const c=d("kro-icon");return s(),l("div",ot,[i("div",{class:{"kro-select__container":!0,"kro-select--focused":a.focused,"kro-select--has-text":e.$attrs.modelValue}},[i("label",{class:{"kro-select__label":!0,"kro-select--focused":a.focused,"kro-select--has-text":e.$attrs.modelValue},for:o.id},y(o.label),11,["for"]),i("div",at,y(o.label),1),i("span",{class:{"kro-select__pseudo-label":!0,"kro-select--focused":a.focused,"kro-select--has-text":e.$attrs.modelValue}},y(o.label),3),i("select",{id:o.id,ref:"select",class:"kro-select__input",disabled:o.disabled,required:o.required,readonly:o.readonly,autofocus:o.autofocus,name:o.name,value:e.$attrs.modelValue,onChange:t[1]||(t[1]=t=>e.$emit("update:modelValue",t.target.value)),onFocus:t[2]||(t[2]=e=>a.focused=!0),onBlur:t[3]||(t[3]=e=>a.focused=!1)},[rt,m(e.$slots,"default")],40,["id","disabled","required","readonly","autofocus","name","value"]),i(c,{class:"kro-select__icon",icon:"mdi:chevron-down"})],2)])},tt.__file="src/components/Select/Select.vue";var nt={name:"KroSlider",props:{disabled:{type:Boolean,default:!1},step:{type:Number,default:1},ticks:{default:!1,type:[Boolean,String]},min:{type:Number,default:0},max:{type:Number,default:100}},emits:["update:modelValue"],setup(o,{emit:n,attrs:s}){const l=a(),i=a(),{targetPercentage:d}=(e=>{const{x:o,elementPositionX:a,elementWidth:r}=C(e),n=t(()=>Math.min(Math.max(0,o.value-a.value),r.value)/(r.value||1));return{elementWidth:r,targetPercentage:n}})(l),{elementWidth:c}=(t=>{const o=a(0),r=a(0),n=a(0),s=a(0),l=e=>{const{left:t,top:a,width:l,height:i}=e.getBoundingClientRect();o.value=l,r.value=i,n.value=t,s.value=a};e(t,e=>{const t=e||document.body;l(t)});const i=T(()=>{const e=t.value||document.body;l(e)},250);return M("resize",i),{elementWidth:o,elementHeight:r,elementLeft:n,elementTop:s}})(l),u=a(!1),{disableDocumentSelect:p,enableDocumentSelect:f}=me(),m=()=>{u.value=!1,f(),removeEventListener("touchcancel",m),removeEventListener("touchend",m),removeEventListener("mouseup",m)},v=()=>{u.value=!0,p(),addEventListener("touchcancel",m),addEventListener("touchend",m),addEventListener("mouseup",m)},h=t(()=>c.value/Math.ceil((o.max-o.min)/o.step)),y=()=>{n("update:modelValue",Math.max(o.min,Math.min(o.max,s.modelValue-o.step)))},k=()=>{n("update:modelValue",Math.max(o.min,Math.min(o.max,s.modelValue+o.step)))};return r(()=>{n("update:modelValue",Math.max(o.min,Math.min(s.modelValue||0,o.max)))}),$(()=>{u.value&&n("update:modelValue",Math.max(o.min,Math.min(Math.round(d.value*(o.max-o.min)/o.step)*o.step+o.min,o.max)))}),{knobRef:i,sliderRef:l,targetPercentage:d,enableEditing:v,trackSpacing:h,isEditing:u,onSliderClick:()=>{setTimeout(()=>{i.value.focus()},0),v()},incrementValue:e=>{"ArrowLeft"===e.key&&y(),"ArrowRight"===e.key&&k()},subtractValue:y,addValue:k}}};const st={class:"kro-slider__track-container"},lt={ref:"sliderRef",class:"kro-slider__track"},it=i("div",{class:"kro-slider__progress"},null,-1),dt={class:"kro-slider__knob-container"},ct=i("div",{class:"kro-slider__thumb"},null,-1),ut={key:0},pt={key:1};nt.render=function(e,t,o,a,r,n){return s(),l("div",{class:"kro-slider",style:{"--kro-slider-progress":(e.$attrs.modelValue-o.min)/(o.max-o.min)*100-100+"%"},onTouchstartPassive:t[2]||(t[2]=(...e)=>a.enableEditing(...e)),onMousedown:t[3]||(t[3]=(...e)=>a.onSliderClick(...e))},[i("div",st,[i("div",lt,[o.ticks?(s(),l("div",{key:0,style:{"--kro-slider-tick-spacing":a.trackSpacing+"px"},class:"kro-slider__markers"},null,4)):f("v-if",!0),it],512),i("div",dt,[i("button",{ref:"knobRef",class:"kro-slider__knob",tabindex:"0",onKeydown:t[1]||(t[1]=(...e)=>a.incrementValue(...e))},null,544),i("div",{class:["kro-slider__preview-value",{"kro-slider__preview-value--is-active":a.isEditing}]},[ct,e.$slots.thumb?(s(),l("span",pt,[m(e.$slots,"thumb",{value:e.$attrs.modelValue})])):(s(),l("span",ut,y(e.$attrs.modelValue),1))],2)])])],36)},nt.__file="src/components/Slider/Slider.vue";const ft={mounted(){console.log("Ok Tooltip")}};const mt=()=>({install(e,t){t.components&&Array.isArray(t.components)&&Object.entries(t.components).forEach(([t,o])=>{e.component(t,o)}),E()}}),vt=(ht=Object.freeze({__proto__:null,KroButton:U,KroButtonGroup:Q,KroIcon:N,KroSpinner:H,KroSquircle:W,KroSwitch:ee,KroTextfield:se,KroToolbar:de,KroDialog:_e,KroSurface:ce,KroDivider:$e,KroAlert:Ve,KroApp:Ce,KroListItem:je,KroMenu:Ne,KroAvatar:Re,KroProgressBar:We,KroLayout:Ue,KroSelect:tt,KroSlider:nt}),yt=Object.freeze({__proto__:null,Tooltip:ft}),{install(e){ht&&Object.entries(ht).forEach(([t,o])=>{o&&e.component(t,o)}),yt&&Object.entries(yt).forEach(([t,o])=>{o&&e.directive(t,o)}),E()}});var ht,yt,kt=Object.freeze({__proto__:null,ButtonMetadata:J,ButtonGroupMetadata:{title:"KroButtonGroup",description:"A container for multiple related buttons"},IconMetadata:{title:"KroIcon",description:"Display an SVG icon",props:[{name:"icon",description:"The name of the icon to display",type:"string",values:"-",default:"undefined"}],css:[{name:"--kro-icon-size",description:"The size of the icon",type:"size",default:"1.5rem"}]},SpinnerMetadata:{title:"KroSpinner",description:"A loading indicator",css:[{name:"--kro-spinner-size",description:"Sets the size of the spinner",type:"size",default:"2.5rem"},{name:"--kro-spinner-thickness",description:"Sets the thickness of the spinner",type:"size",default:"0.35rem"},{name:"--kro-spinner-color",description:"Sets the color of the spinner",type:"size",default:"--kro-foreground"}]},SquircleMetadata:{title:"KroSquircle",description:"A component used for visual effect."},SwitchMetadata:{title:"KroSwitch",description:"",props:[{name:"v-model",description:"The value of the switch",type:"bool",values:"-",default:"undefined"}],css:[{name:"--kro-switch-track-background",description:"The color of the track background.",type:"color",default:"--kro-background-secondary"},{name:"--kro-switch-track-active-background",description:"The track color when the switch is set to true.",type:"color",default:"--kro-primary-darken"},{name:"--kro-switch-knob-color",description:"The color of the switch knob.",type:"color",default:"--kro-primary"},{name:"--kro-switch-knob-shadow",description:"The shadow of the switch knob.",type:"shadow",default:"--kro-shadow"}]},TextfieldMetadata:{title:"KroTextfield",description:"",props:[{name:"v-model",description:"The value of the textfield",type:"string",values:"-",default:"undefined"},{name:"label",description:"The textfield label",type:"string",values:"-",default:"undefined"},{name:"type",description:"The textfield type",type:"string",values:"text | tel | email | password | url | search",default:"text"},{name:"required",description:"Marks the textfield as required",type:"bool",values:"-",default:"false"},{name:"disabled",description:"Marks the textfield as disabled",type:"bool",values:"-",default:"false"},{name:"multiline",description:"Makes the textfield into a textarea than can support multiple lines.",type:"bool",values:"-",default:"false"},{name:"readonly",description:"Marks the textfield as readonly",type:"bool",values:"-",default:"false"},{name:"autofocus",description:"Autofocuses the textfield when the component loads.",type:"bool",values:"-",default:"false"},{name:"min",description:"Sets the min value if the textfield is a nubmer input",type:"number",values:"-",default:"undefined"},{name:"max",description:"Sets the max value if the textfield is a nubmer input",type:"number",values:"-",default:"undefined"},{name:"maxlength",description:"Sets the max amount of characters that the textfield will accept",type:"number",values:"-",default:"undefined"},{name:"name",description:"Sets the name of the textfield.",type:"string",values:"-",default:"undefined"},{name:"id",description:"Sets the id of the textfield",type:"string",values:"-",default:"undefined"},{name:"autoresize",description:"If the textfield is multiline, then this will autoresize the textfield vertically as the user types.",type:"bool",values:"-",default:"true"}],css:[{name:"--kro-textfield-border-color",description:"The border color of the textifled",type:"color",default:"--kro-divider"},{name:"--kro-textifled-focused-border-color",description:"The border color of the textifled when it is focused",type:"color",default:"--kro-primary"}]},ToolbarMetadata:{title:"KroToolbar",description:"",props:[{name:"small",description:"Makes the height of the toolbar smaller.",type:"bool",values:"-",default:"false"},{name:"padded",description:"Adds padding to the toolbar.",type:"bool",values:"-",default:"false"},{name:"raised",description:"Adds a shadow to the toolbar.",type:"bool",values:"-",default:"false"}],css:[{name:"--kro-toolbar-height",description:"The height of the toolbar",type:"size",default:"4rem"},{name:"--kro-toolbar-background",description:"The background color of the toolbar",type:"color",default:"--kro-background-secondary"},{name:"--kro-toolbar-shadow",description:"The shadow of a raised toolbar",type:"color",default:"--kro-background-shadow"}]},DialogMetadata:{title:"KroDialog",description:"Dialogs are used to display important information requiring the users immediate attention, often to confirm an action or to display an important error message, and should only be used when necessary.",props:[{name:"v-model",description:"Contorls the open state of the dialog",type:"bool",values:"-",default:"false"},{name:"persistent",description:"If enabled, the dialog can only be closed by the close button",type:"bool",values:"-",default:"false"}],events:[{name:"@open",description:"Fired when the dialog is opened",parameters:[]},{name:"@close",description:"Fired when the dialog is closed",parameters:[]}],slots:[{name:"#activator",description:"Slots the button that can be used to open the dialog",props:["open","close","toggle"]},{name:"#title",description:"Slot for the title of the dialog",props:["open","close","toggle"]},{name:"#controls",description:"Slot for the controls of the dialog",props:["open","close","toggle"]},{name:"#default",description:"Slot for the content of the dialog",props:[]}]},SurfaceMetadata:{title:"KroSurface",description:"A surface that contains content and can have a label",props:[{name:"padded",description:"Adds a padding to the container.",type:"bool",values:"-",default:"true"},{name:"raised",description:"Adds a shadow to the container.",type:"bool",values:"-",default:"true"},{name:"outline",description:"Adds an outline to the container.",type:"bool",values:"-",default:"false"},{name:"icon",description:"Adds an icon to the container.",type:"bool",values:"-",default:"undefined"},{name:"label",description:"Adds a label to the container.",type:"string",values:"-",default:"undefined"}],css:[{name:"--kro-surface-background",description:"",type:"color",default:"--kro-background-secondary"},{name:"--kro-surface-outline",description:"Sets the outline color of and outlined container",type:"color",default:"--kro-divider"},{name:"--kro-surface-shadow",description:"Sets the shadow of a raised container",type:"shadow",default:"--kro-shadow"}]},DividerMetadata:{title:"KroDivider",description:"",props:[{name:"vertical",description:"Makes the divider a vertical divider",type:"bool",values:"-",default:"false"}]},AlertMetadata:{title:"KroAlert",description:"",props:[{name:"type",description:"Defines the type of alert that is shown.",type:"string",values:["info","error","warning","success"],default:"info"},{name:"dismissible",description:"Shows a close icon on the alert allowing the user to dismiss the alert.",type:"bool",values:"-",default:"false"},{name:"icon",description:"Sets the icon that is displayed on the alert.",type:"string",values:"-",default:"undefined"},{name:"tag",description:"Sets the root tage of the alert",type:"string",values:"-",default:"div"},{name:"outline",description:"Give the alert an outline style.",type:"bool",values:"-",default:"false"}],events:[{name:"@dismissed",description:"Fires when the alert is dismissed",parameters:[]},{name:"@show",description:"Fires when the alert is shown after being dismissed",parameters:[]}],slots:[{name:"#default",description:"Slot for the text content of the alert.",props:[]}]},AppMetadata:{title:"KroApp",description:""},ListMetadata:Ie,MenuMetadata:{title:"KroMenu",description:"",props:[{name:"offsetX",description:"Offsets the menu horizontally so it is not covering the activator element.",type:"bool",values:"-",default:"false"},{name:"offsetY",description:"Offsets the menu vertically so it is not coverting the activator element",type:"bool",values:"-",default:"false"},{name:"left",description:"Positions the menu to open to the left of the activator.",type:"bool",values:"-",default:"false"},{name:"right",description:"Positions the menu to open to the right of the activator.",type:"bool",values:"-",default:"false"},{name:"top",description:"Positions the menut to open above the activator.",type:"bool",values:"-",default:"false"},{name:"bottom",description:"Positions the element to open below the activator.",type:"bool",values:"-",default:"false"}],slots:[{name:"#default",description:"",props:[]}],css:[{name:"--kro-menu-min-width",description:"",type:"size",default:"200px"},{name:"--kro-menu-max-width",description:"",type:"size",default:"300px"}]},AvatarMetadata:{title:"KroAvatar",description:"",props:[{name:"src",description:"Sets the image of the avatar",type:"string",values:"-",default:"undefined"},{name:"color",description:"Sets the color of the avatar.",type:"string",values:"-",default:"undefined"},{name:"small",description:"Makes the avatar smaller.",type:"bool",values:"-",default:"false"},{name:"large",description:"Makes the avatar larger.",type:"bool",values:"-",default:"false"}],css:[{name:"--kro-avatar-size",description:"",default:"3rem",type:"CSS Size Unit"},{name:"--kro-avatar-radius",description:"",default:"50%",type:"CSS Size Unit"}]},ProgressBarMetadata:{title:"KroProgressBar",description:"",props:[{name:"stream",description:"Display a speical style to the progress bar to indicate it is a stream",type:"bool",values:"-",default:"false"},{name:"indeterminate",description:"Display a special style to the progress bar to indicate that is indeterminate.",type:"",values:"-",default:"false"},{name:"rounded",description:"Applies a rounded style to the progress bar.",type:"bool",values:"-",default:"true"},{name:"value",description:"Sets the value of the progress bar.",type:"number",values:"-",default:"0"},{name:"bufferValue",description:"Sets the buffer value of the progress bar.",type:"number",values:"-",default:"100"}],css:[]},LayoutMetadata:{title:"KroLayout",description:"",props:[{name:"responsiveWidth",default:"768",description:"The width at which the drawer is hidden",type:"number",values:[]},{name:"temporary",default:"false",description:"Hides the drawer by default",type:"bool",values:[]},{name:"clipToolbar",default:"false",description:"Shifts the toolbar to the right to make room for the drawer",type:"bool",values:[]},{name:"mini",default:"false",description:"Makes the drawer smaller",type:"bool",values:[]},{name:"v-model:is-drawer-open",default:"true or false",description:"Controls the open state of the drawer",type:"bool",values:[]},{name:"v-model:is-drawer-hidden",default:"true or false",description:"Indicates if the drawer is in a default hidden state",type:"bool",values:[]}],slots:[{name:"#drawer",description:"Contains the sidebar navigation of the page",props:[]},{name:"#toolbar",description:"Contains the toolbar of the page",props:[]},{name:"#footer",description:"Contains the footer content of the page",props:[]},{name:"#default",description:"Contains the contents of the page",props:[]}]},SelectMetadata:{title:"KroSelect",description:"A styled select component.",props:[{name:"label",description:"",type:"bool",values:"-",default:"false"},{name:"required",description:"",type:"bool",values:"-",default:"false"},{name:"disabled",description:"",type:"bool",values:"-",default:"false"},{name:"readonly",description:"",type:"bool",values:"-",default:"false"},{name:"autofocus",description:"",type:"string",values:"-",default:"undefined"},{name:"name",description:"",type:"string",values:"-",default:"undefined"},{name:"id",description:"",type:"string",values:"-",default:"undefined"}]},SliderMetadata:{title:"KroSlider",description:"",props:[{name:"v-model",description:"The value of the slider",type:"number",values:"-",default:"undefined"},{name:"disabled",description:"Disables the slider",type:"bool",values:"-",default:"false"},{name:"steps",description:"Sets the step amount for each tick",type:"number",values:"-",default:"1"},{name:"ticks",description:"Display the ticks on the slider",type:"bool",values:"-",default:"false"},{name:"min",description:"Set the min value of the slider",type:"number",values:"-",default:"0"},{name:"max",description:"Set the max value of the slider",type:"number",values:"-",default:"100"}],slots:[{name:"#thumb",description:"A slot to replace the default value of the thumb.",props:["value"]}],css:[{name:"--kro-slider-tick-color",description:"The color of the tick marks on the slider.",type:"color",default:"rgba(0, 0, 0, .24)"},{name:"--kro-slider-track-color",description:"The color of the slider track.",type:"color",default:"--kro-background-secondary"},{name:"--kro-slider-progress-color",description:"The color of the progress bar on the track.",type:"color",default:"--kro-primary"},{name:"--kro-slider-knob-color",description:"The color of the knob on the slider.",type:"color",default:"--kro-primary-lighten"},{name:"--kro-slider-thumb-foreground",description:"The foreground color of the thumb.",type:"color",default:"--kro-primary-foreground"},{name:"--kro-slider-thumb-background",description:"The background color of the thumb.",type:"color",default:"--kro-primary"}]}});export{Ve as KroAlert,Ce as KroApp,Re as KroAvatar,U as KroButton,Q as KroButtonGroup,_e as KroDialog,$e as KroDivider,N as KroIcon,Ue as KroLayout,je as KroListItem,Ne as KroMenu,We as KroProgressBar,tt as KroSelect,nt as KroSlider,H as KroSpinner,W as KroSquircle,ce as KroSurface,ee as KroSwitch,se as KroTextfield,de as KroToolbar,mt as KroUIBaseConfigurationPlugin,vt as KroUIPlugin,kt as Metadata,be as useDialog,L as useTheme}; | ||
function N(e,t,o,a){return new(o||(o=Promise))((function(r,n){function s(e){try{i(a.next(e))}catch(e){n(e)}}function l(e){try{i(a.throw(e))}catch(e){n(e)}}function i(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(s,l)}i((a=a.apply(e,t||[])).next())}))}var H=a(Object.assign(Object.assign({},{name:"KroIcon"}),{props:{icon:{type:String,required:!0}},setup:function(o){const{icons:a}={icons:t(F)},l=r(null),i=()=>N(this,void 0,void 0,(function*(){if(l.value&&a){yield s();const e=a.renderSVG(o.icon,{});if(e)l.value.textContent="",l.value.appendChild(e);else{const e=document.createElement("span");e.className="iconify",e.dataset.icon=o.icon,l.value.textContent="",l.value.appendChild(e)}}}));return e(()=>o.icon,i,{flush:"post"}),n(i),{el:l}}}));H.render=function(e,t,o,a,r,n){return l(),i("div",{ref:"el",class:[e.$attrs.class,"kro-icon"]},null,2)},H.__file="src/components/Icon/Icon.vue";var R={name:"KroSpinner"};const W={class:"kro-spinner"};R.render=function(e,t,o,a,r,n){return l(),i("div",W)},R.__file="src/components/Spinner/Spinner.vue";var G={name:"KroSquircle"};const X={class:"kro-squircle",viewBox:"0 0 400 400","enable-background":"new 0 0 400 400","xml:space":"preserve"},U=d("path",{d:"M 0,200 C 0,0 0,0 200,0 S 400,0 400,200 400,400 200,400 0,400 0,200"},null,-1);G.render=function(e,t,o,a,r,n){return l(),i("svg",X,[U])},G.__file="src/components/Squircle/Squircle.vue";var Y={name:"KroButton",components:{KroIcon:H,KroSpinner:R,KroSquircle:G},props:Object.assign(Object.assign({},z),{loading:{type:Boolean,default:!1},type:String,primary:Boolean,outline:Boolean,raised:Boolean,icon:String,hideExternalIcon:Boolean,warning:Boolean,error:Boolean,success:Boolean}),setup(e){const{tag:t,componentProps:a}=I(e);return{componentProps:a,componentType:o(()=>t||"button")}}};const J={class:"kro-button__spinner"};Y.render=function(e,t,o,a,r,n){const s=c("kro-squircle"),k=c("kro-icon"),b=c("kro-spinner");return l(),i(u(a.componentType),p({class:{"kro-button":!0,"kro-button--primary":o.primary,"kro-button--outline":o.outline,"kro-button--raised":o.raised,"kro-button--warning":o.warning,"kro-button--success":o.success,"kro-button--error":o.error,"kro-button--is-icon-button":o.icon&&!e.$slots.default},rel:"noreferrer"},a.componentProps,{target:e.href?e.target:""}),{default:f(()=>[o.icon&&!e.$slots.default?(l(),i(s,{key:0,class:"kro-button__squircle"})):m("v-if",!0),d("span",{class:{"kro-button__content":!0,"kro-button__content--is-loading":o.loading}},[o.icon?(l(),i(k,{key:0,class:"kro-button__icon",icon:o.icon},null,8,["icon"])):m("v-if",!0),v(e.$slots,"default"),!e.href||o.icon&&!e.$slots.default||o.hideExternalIcon?m("v-if",!0):(l(),i(k,{key:1,icon:"external"}))],2),h(d("span",J,[d(b)],512),[[y,o.loading]])]),_:3},16,["class","target"])},Y.__file="src/components/Button/Button.vue";const Q={title:"KroButton",description:"A styled button with added functionality",props:[{name:"loading",description:"Displays a loading indicator over the button",type:"bool",values:"-",default:"false"},{name:"type",description:"The type of the button",type:"string",values:["button","reset","submit"],default:"button"},{name:"primary",description:"Applies a style to the button to indicate that it is a primary button",type:"bool",values:"-",default:"false"},{name:"outline",description:"Give the button an outline style",type:"bool",values:"-",default:"false"},{name:"raised",description:"Apply a shadow to the button",type:"string",values:"-",default:"false"},{name:"icon",description:"Adds an icon to the button",type:"string",values:"-",default:"undefined"},{name:"hideExternalIcon",description:"Hides the external link icon for buttons that are links.",type:"bool",values:"-",default:"false"},...P]};var Z={name:"KroButtonGroup"};const ee={class:"kro-button-group"};Z.render=function(e,t,o,a,r,n){return l(),i("div",ee,[v(e.$slots,"default")])},Z.__file="src/components/ButtonGroup/ButtonGroup.vue";var te={name:"KroSwitch",props:{value:String},emits:["update:modelValue"],setup:(e,{emit:t,attrs:o})=>({update:a=>{a.target.checked?e.value?Array.isArray(o.modelValue)&&t("update:modelValue",[...o.modelValue,e.value]):t("update:modelValue",!0):e.value?Array.isArray(o.modelValue)&&t("update:modelValue",o.modelValue.filter(t=>t!==e.value)):t("update:modelValue",!1)}})};const oe={class:"kro-switch"},ae={class:"kro-switch__container"},re={class:"kro-switch__track"},ne=d("div",{class:"kro-switch__knob"},null,-1),se={key:0,class:"kro-switch__label"};te.render=function(e,t,o,a,r,n){return l(),i("div",oe,[d("div",ae,[d("input",{class:"kro-switch__input",checked:Array.isArray(e.$attrs.modelValue)?e.$attrs.modelValue.indexOf(o.value)>-1:!!e.$attrs.modelValue,type:"checkbox",onChange:t[1]||(t[1]=(...e)=>a.update(...e))},null,40,["checked"]),d("div",re,[d("div",{class:{"kro-switch__track-active":!0,"kro-switch__track-active--is-active":Array.isArray(e.$attrs.modelValue)?e.$attrs.modelValue.indexOf(o.value)>-1:!!e.$attrs.modelValue}},null,2)]),d("div",{class:{"kro-switch__knob-container":!0,"kro-switch__knob-container--is-active":Array.isArray(e.$attrs.modelValue)?e.$attrs.modelValue.indexOf(o.value)>-1:!!e.$attrs.modelValue}},[ne],2)]),e.$slots.default?(l(),i("div",se,[v(e.$slots,"default")])):m("v-if",!0)])},te.__file="src/components/Switch/Switch.vue";var le={name:"KroTextfield",props:{label:{type:String},type:{type:String,default:"text"},required:{type:Boolean},disabled:{type:Boolean},multiline:{type:Boolean},readonly:{type:Boolean},autofocus:{type:Boolean},min:{type:Number},max:{type:Number},maxlength:{type:Number},name:{type:String},id:{type:String},autoResize:{type:Boolean,default:!0},loading:{type:Boolean},success:{type:Boolean},error:{type:Boolean},message:{type:String}},emits:["update:modelValue"],setup(e){const t=r(!1),o=r();return{focused:t,runAutoResize:()=>{e.autoResize&&o.value&&(o.value.style.height="auto",o.value.style.height=o.value.scrollHeight+"px")},inputRef:o}}};const ie={key:2,class:"block pr-2"},de={key:0,class:"pl-4 text-xs font-medium"};le.render=function(e,t,o,a,r,n){const s=c("kro-spinner"),u=c("kro-icon");return l(),i("div",{class:["kro-textfield",{"kro-textfield--is-textarea":o.multiline}]},[d("div",{class:{"kro-textfield__container":!0,"kro-textfield--focused":a.focused,"kro-textfield--has-text":e.$attrs.modelValue,"kro-textfield--is-textarea":o.multiline}},[d("label",{class:{"kro-textfield__label":!0,"kro-textfield--focused":a.focused,"kro-textfield--has-text":e.$attrs.modelValue},for:o.id},k(o.label),11,["for"]),d("span",{class:{"kro-textfield__pseudo-label":!0,"kro-textfield--focused":a.focused,"kro-textfield--has-text":e.$attrs.modelValue}},k(o.label),3),o.multiline?(l(),i("textarea",{key:1,id:o.id,ref:"inputRef",class:"kro-textfield__input",disabled:o.disabled,required:o.required,readonly:o.readonly,autofocus:o.autofocus,maxlength:o.maxlength,name:o.name,value:e.$attrs.modelValue,onInput:t[4]||(t[4]=t=>{e.$emit("update:modelValue",t.target.value),a.runAutoResize()}),onFocus:t[5]||(t[5]=e=>a.focused=!0),onBlur:t[6]||(t[6]=e=>a.focused=!1)},null,40,["id","disabled","required","readonly","autofocus","maxlength","name","value"])):(l(),i("input",{key:0,class:"kro-textfield__input",id:o.id,disabled:o.disabled,required:o.required,readonly:o.readonly,autofocus:o.autofocus,type:o.type,min:o.min,max:o.max,maxlength:o.maxlength,name:o.name,value:e.$attrs.modelValue,onInput:t[1]||(t[1]=t=>e.$emit("update:modelValue",t.target.value)),onFocus:t[2]||(t[2]=e=>a.focused=!0),onBlur:t[3]||(t[3]=e=>a.focused=!1)},null,40,["id","disabled","required","readonly","autofocus","type","min","max","maxlength","name","value"])),o.loading||o.success||o.error?(l(),i("div",ie,[o.loading?(l(),i(s,{key:0,class:"kro-textfield__spinner"})):o.success?(l(),i(u,{key:1,class:"kro-textfield__success-icon",icon:"mdi:check"})):o.error?(l(),i(u,{key:2,class:"kro-textfield__error-icon",icon:"mdi:alert"})):m("v-if",!0)])):m("v-if",!0)],2),e.$slots.default?(l(),i("div",de,[v(e.$slots,"default")])):m("v-if",!0)],2)},le.__file="src/components/Textfield/Textfield.vue";var ce={name:"KroToolbar",props:{small:Boolean,padded:Boolean,raised:Boolean}};ce.render=function(e,t,o,a,r,n){return l(),i("div",{class:{"kro-toolbar":!0,"kro-toolbar--small":o.small,"kro-toolbar--raised":o.raised,"kro-toolbar--padded":o.padded}},[v(e.$slots,"default")],2)},ce.__file="src/components/Toolbar/Toolbar.vue";var ue={name:"KroSurface",props:{padded:{type:Boolean,default:!0},raised:{type:Boolean,default:!0},outline:{type:Boolean,default:!1},icon:String,label:String}};const pe={key:0,class:"kro-surface__label-container"},fe={key:1,class:"kro-surface__label"};ue.render=function(e,t,o,a,r,n){const s=c("kro-icon");return l(),i("div",{class:{"kro-surface":!0,"kro-surface--padded":o.padded,"kro-surface--raised":o.raised,"kro-surface--outline":o.outline}},[o.icon||o.label?(l(),i("div",pe,[o.icon?(l(),i(s,{key:0,class:"kro-surface__icon",icon:o.icon},null,8,["icon"])):m("v-if",!0),o.label?(l(),i("div",fe,k(o.label),1)):m("v-if",!0)])):m("v-if",!0),v(e.$slots,"default")],2)},ue.__file="src/components/Surface/Surface.vue";const me=a({emits:["update:active","activate","deactivate"],props:{active:{type:Boolean,default:!0},escapeDeactivates:{type:Boolean,default:!0},returnFocusOnDeactivate:{type:Boolean,default:!0},allowOutsideClick:{type:Boolean,default:!0},initialFocus:{type:[String,Function],default:void 0},fallbackFocus:{type:[String,Function],default:void 0}},setup(t,{slots:o,emit:a}){let s;const l=r(null);return n(()=>{e(()=>t.active,e=>{var o,r;e&&l.value?(s=q(l.value,{escapeDeactivates:t.escapeDeactivates,allowOutsideClick:()=>t.allowOutsideClick,returnFocusOnDeactivate:t.returnFocusOnDeactivate,onActivate:()=>{a("update:active",!0),a("activate")},onDeactivate:()=>{a("update:active",!1),a("deactivate")},initialFocus:"string"==typeof t.initialFocus?t.initialFocus:null!==(r=null===(o=t.initialFocus)||void 0===o?void 0:o.call(t))&&void 0!==r?r:l.value,fallbackFocus:t.fallbackFocus}),s.activate()):null==s||s.deactivate()},{immediate:!0})}),b(()=>{null==s||s.deactivate(),s=null}),()=>{var e;const t=null===(e=o.default)||void 0===e?void 0:e.call(o);if(!t||!t.length||t.length>1)throw new Error("FocusTrap requires exactly one child");return g(t[0],{ref:l})}}}),ve=()=>({disableDocumentScroll:()=>{document.documentElement.classList.add("kro-helper--prevent-scroll")},enableDocumentScroll:()=>{document.documentElement.classList.remove("kro-helper--prevent-scroll")},disableDocumentSelect:()=>{document.documentElement.classList.add("kro-helper--prevent-select")},enableDocumentSelect:()=>{document.documentElement.classList.remove("kro-helper--prevent-select")},enableAppFocus:()=>{var e;null===(e=document.querySelector("#app"))||void 0===e||e.removeAttribute("tabindex")},disableAppFocus:()=>{var e;null===(e=document.querySelector("#app"))||void 0===e||e.setAttribute("tabindex","-1")}}),he={title:"Dialog Title",message:"Dialog Message",style:"default",resolveButton:{text:"Ok",attributes:{primary:!0}},rejectButton:{text:"Cancel"}},ye={title:"Confirmation Dialog",message:"Dialog Message",icon:"mdi:help-circle",style:"default",resolveButton:{text:"Ok",attributes:{primary:!0}},rejectButton:{text:"Cancel"}},ke=r([]),be=(e,t,o)=>{const a=Object.assign(Object.assign({},e),{isOpen:r(!0),resolve:t,reject:o,destroy(){ke.value.splice(ke.value.indexOf(this),1)}});ke.value=[...ke.value,a]},ge=()=>({createDialog:e=>new Promise((t,o)=>{be(Object.assign(Object.assign({},he),e),t,o)}),createConfirmationDialog:e=>new Promise((t,o)=>{be(Object.assign(Object.assign({},ye),e),t,o)})});const _e={name:"KroDialog",components:{KroSurface:ue,FocusTrap:me},inheritAttrs:!1,emits:["update:modelValue","close","open","close-animation-end"]};var xe=a(Object.assign(Object.assign({},_e),{props:{persistent:{type:null,required:!1}},setup:function(e,{emit:t,attrs:o}){const{disableDocumentScroll:a,enableDocumentScroll:n}=ve(),s=r(null);let l=!1;_(()=>{l||!0!==o.modelValue||(t("update:modelValue",!0),t("open"),a(),window.addEventListener("keydown",d),s.value&&s.value.focus())});const i=()=>{l=!0,t("update:modelValue",!0),t("open"),a(),window.addEventListener("keydown",d),s.value&&s.value.focus()},d=o=>{(t=>"keydown"!==(null==t?void 0:t.type)||"Escape"===t.key&&!e.persistent)(o)&&(t("update:modelValue",!1),t("close"),window.removeEventListener("keydown",d),n(),l=!1)};return{dialog:s,onDialogLeaveAnimationComplete:()=>{t("close-animation-end")},open:i,close:d,toggle:()=>{o.modelValue?d(null):i()}}}}));const we={ref:"dialog",tabindex:"-1",class:"kro-dialog__container"},Se={class:"grid grid-row gap-4"},Be={key:0,class:"kro-dialog__header text-lg"},Ke={class:"kro-dialog__body"},$e={key:1,class:"kro-dialog__footer"};xe.render=function(e,t,o,a,r,n){const s=c("focus-trap"),u=c("kro-surface");return l(),i(x,null,[v(e.$slots,"activator",{close:a.close,open:a.open,toggle:a.toggle}),(l(),i(w,{to:"#kro-portal"},[d(S,{appear:"",name:"kro-dialog-scrim"},{default:f(()=>[e.$attrs.modelValue?(l(),i("div",{key:0,class:"kro-dialog__scrim fixed inset-0",onClick:t[1]||(t[1]=()=>{o.persistent||a.close()})})):m("v-if",!0)]),_:1}),d("div",we,[d(S,{appear:"",name:"kro-dialog","onAfter-leave":a.onDialogLeaveAnimationComplete},{default:f(()=>[e.$attrs.modelValue?(l(),i(u,p({key:0,class:"kro-dialog"},e.$attrs),{default:f(()=>[d(s,{modelValue:e.$attrs.modelValue,"onUpdate:modelValue":t[2]||(t[2]=t=>e.$attrs.modelValue=t)},{default:f(()=>[d("div",Se,[e.$slots.header?(l(),i("div",Be,[v(e.$slots,"header",{open:a.open,close:a.close,toggle:a.toggle})])):m("v-if",!0),d("div",Ke,[v(e.$slots,"default",{open:a.open,close:a.close,toggle:a.toggle})]),e.$slots.footer?(l(),i("div",$e,[v(e.$slots,"footer",{open:a.open,close:a.close,toggle:a.toggle})])):m("v-if",!0)])]),_:3},8,["modelValue"])]),_:1},16)):m("v-if",!0)]),_:1},8,["onAfter-leave"])],512)]))],64)},xe.__file="src/components/Dialog/Dialog.vue";var Ae={name:"KroDivider",props:{vertical:Boolean,inset:Boolean,label:String}};const Ve={key:0};Ae.render=function(e,t,o,a,r,n){return l(),i("div",{class:["kro-divider",{"kro-divider--vertical":o.vertical,"kro-divider--inset":o.inset}]},[o.label?(l(),i("span",Ve,k(o.label),1)):m("v-if",!0)],2)},Ae.__file="src/components/Divider/Divider.vue";var Te={name:"KroAlert",components:{KroIcon:H,KroButton:Y},props:{type:{type:String,default:"info"},dismissible:{type:Boolean,default:!1},tag:{type:String,default:"div"},icon:String,outline:{type:Boolean,default:!1}},emits:["dismissed","show"],setup(e,{emit:t}){const a=r(!1);return{iconName:o(()=>{const{type:t,icon:o}=e;return o||("warning"===t||"info"===t?"mdi:alert-circle":"error"===t?"mdi:alert":"success"===t?"mdi:check":null)}),isHidden:a,hide:()=>{t("dismissed"),a.value=!0},show:()=>{t("show"),a.value=!1}}}};const Me={class:"kro-alert__icon"},Oe={key:0};Te.render=function(e,t,o,a,r,n){const s=c("kro-icon"),p=c("kro-button");return h((l(),i(u(o.tag),{class:{"kro-alert":!0,"kro-alert--error":"error"===o.type,"kro-alert--info":"info"===o.type,"kro-alert--warning":"warning"===o.type,"kro-alert--success":"success"===o.type,"kro-alert--outline":o.outline,"kro-alert--has-icon":a.iconName,"kro-alert--is-dismissible":o.dismissible}},{default:f(()=>[d("div",Me,[a.iconName?(l(),i(s,{key:0,icon:a.iconName},null,8,["icon"])):m("v-if",!0)]),d("div",null,[v(e.$slots,"default")]),o.dismissible?(l(),i("div",Oe,[d(p,{icon:"close",onClick:a.hide},null,8,["onClick"])])):m("v-if",!0)]),_:3},8,["class"])),[[y,!a.isHidden]])},Te.__file="src/components/Alert/Alert.vue";var Ce=a(Object.assign(Object.assign({},{name:"ComposableDialogs"}),{setup:function(){return{instances:ke}}}));Ce.render=function(e,t,o,a,r,n){const s=c("kro-icon"),u=c("kro-button"),v=c("kro-dialog");return l(!0),i(x,null,B(a.instances,(e,t)=>(l(),i("div",{key:t},[d(v,{modelValue:e.isOpen,"onUpdate:modelValue":t=>e.isOpen=t,class:{"kro-composable-dialog--centered":"centered"===e.style},"onClose-animation-end":t=>e.destroy()},{header:f(()=>[d("div",{class:["flex items-center",{"flex-col":"centered"===e.style}]},[e.icon?(l(),i(s,{key:0,style:{color:e.iconColor?e.iconColor:""},class:[{"kro-composable-dialog__icon--large":"centered"===e.style},"mr-4"],icon:e.icon},null,8,["style","class","icon"])):m("v-if",!0),K(" "+k(e.title),1)],2)]),default:f(()=>[d("div",{class:{"text-center":"centered"===e.style}},k(e.message),3)]),footer:f(({close:t})=>[d("div",{class:["flex flex-row flex-1 gap-4",{"justify-end":"centered"!==e.style,"justify-center":"centered"===e.style}]},[e.rejectButton.hidden?m("v-if",!0):(l(),i(u,p({key:0},e.rejectButton.attributes,{onClick:()=>{e.reject(),t()}}),{default:f(()=>[K(k(e.rejectButton.text),1)]),_:2},1040,["onClick"])),e.resolveButton.hidden?m("v-if",!0):(l(),i(u,p({key:1},e.resolveButton.attributes,{onClick:()=>{e.resolve(),t()}}),{default:f(()=>[K(k(e.resolveButton.text),1)]),_:2},1040,["onClick"]))],2)]),_:2},1032,["modelValue","onUpdate:modelValue","class","onClose-animation-end"])]))),128)},Ce.__file="src/components/App/components/ComposableDialogs.vue";var De={name:"KroApp",components:{ComposableDialogs:Ce}};const qe={class:"kro-app"},je={class:"kro-app__content"};De.render=function(e,t,o,a,r,n){const s=c("composable-dialogs");return l(),i("div",qe,[d("div",je,[v(e.$slots,"default")]),d(s)])},De.__file="src/components/App/App.vue";var Le={name:"KroListItem",props:Object.assign(Object.assign({},z),{tag:{type:String,default:"div"}}),setup(e){const{tag:t,componentProps:a}=I(e);return{componentProps:a,componentType:o(()=>t||"div")}}};const Ee={key:0,class:"kro-list-item__icon"},Fe={class:"kro-list-item__content"},Pe={class:"kro-list-item__title"},ze={key:0,class:"kro-list-item__subtitle"},Ie={key:1,class:"kro-list-item__action"};Le.render=function(e,t,o,a,r,n){return l(),i(u(a.componentType),p(a.componentProps,{class:"kro-list-item"}),{default:f(()=>[e.$slots.icon?(l(),i("div",Ee,[v(e.$slots,"icon")])):m("v-if",!0),d("div",Fe,[d("span",Pe,[v(e.$slots,"default")]),e.$slots.subtitle?(l(),i("span",ze,[v(e.$slots,"subtitle")])):m("v-if",!0)]),e.$slots.action?(l(),i("div",Ie,[v(e.$slots,"action")])):m("v-if",!0)]),_:3},16)},Le.__file="src/components/List/ListItem.vue";const Ne={title:"KroListItem",description:"",props:[{name:"tag",description:"",type:"string",values:"-",default:"div"},...P],slots:[{name:"#icon",description:"Item icon slot",props:[]},{name:"#subtitle",description:"Item subtitle slot",props:[]},{name:"#action",description:"Action on the right side of the item",props:[]},{name:"#default",description:"Main text of the item",props:[]}]};var He={name:"KroMenu",props:{offsetX:{type:Boolean,default:!1},offsetY:{type:Boolean,default:!1},left:Boolean,right:Boolean,top:Boolean,bottom:Boolean},emits:["open","close"],setup(e,{emit:t}){const o=r(!1),a=r(null),n=r(null),s=$({"kro-menu__content--y-bottom":!1,"kro-menu__content--y-bottom-offset":!1,"kro-menu__content--y-top":!1,"kro-menu__content--y-top-offset":!1,"kro-menu__content--x-left":!1,"kro-menu__content--x-left-offset":!1,"kro-menu__content--x-right":!1,"kro-menu__content--x-right-offset":!1}),l=()=>{Object.keys(s).forEach(e=>s[e]=!1);const{offsetX:r,offsetY:l,left:i,right:d,top:c,bottom:u}=e,{canFit:p}=((e,t,o)=>{if(!e.value||!t.value)return{canFit:{top:!1,bottom:!1,left:!1,right:!1}};const{innerWidth:a,innerHeight:r}=window,n=e.value.getBoundingClientRect(),s=t.value,l=o.offsetX?n.width:0,i=o.offsetY?n.height:0;return{canFit:{bottom:s.offsetHeight+n.top+i<r,top:s.offsetHeight<n.top,left:s.offsetTop<n.left,right:s.offsetWidth+n.left+l<a}}})(a,n,{offsetX:r,offsetY:l});p.top&&c?s["kro-menu__content--y-top"+(l?"-offset":"")]=!0:p.bottom&&u||p.bottom?s["kro-menu__content--y-bottom"+(l?"-offset":"")]=!0:p.top&&(s["kro-menu__content--y-top"+(l?"-offset":"")]=!0),p.left&&i?s["kro-menu__content--x-left"+(r?"-offset":"")]=!0:p.right&&d||p.right?s["kro-menu__content--x-right"+(r?"-offset":"")]=!0:p.left&&(s["kro-menu__content--x-left"+(r?"-offset":"")]=!0),t("open"),o.value=!0},i=()=>{t("close"),o.value=!1};return{isOpen:o,classes:s,open:l,close:i,toggle:()=>{o.value?i():l()},menu:n,container:a}}};const Re={ref:"container",class:"kro-menu"};He.render=function(e,t,o,a,r,n){return l(),i("div",Re,[d("div",{class:["kro-menu__scrim",{"kro-menu__scrim--is-open":a.isOpen}],onClick:t[1]||(t[1]=(...e)=>a.close(...e))},null,2),v(e.$slots,"activator",{open:a.open}),d("div",{ref:"menu",class:["kro-menu__content",{...a.classes,"kro-menu__content--is-open":a.isOpen}]},[v(e.$slots,"default")],2)],512)},He.__file="src/components/Menu/Menu.vue";var We={name:"KroAvatar",props:{src:String,color:String,small:Boolean,large:Boolean}};We.render=function(e,t,o,a,r,n){return l(),i("div",{class:["kro-avatar",{"kro-avatar__small":o.small,"kro-avatar__large":o.large}]},[o.src?(l(),i("img",{key:0,src:o.src,alt:""},null,8,["src"])):o.color?(l(),i("div",{key:1,style:{backgroundColor:o.color},class:"kro-avatar__color-circle"},null,4)):m("v-if",!0)],2)},We.__file="src/components/Avatar/Avatar.vue";var Ge={name:"KroProgressBar",props:{stream:Boolean,indeterminate:Boolean,rounded:{type:Boolean,default:!0},value:{type:Number,default:0},bufferValue:{type:Number,default:100}}};const Xe=d("div",{class:"kro-progress-bar__stream"},[d("div",{class:"kro-progress-bar__stream-content"})],-1),Ue=d("div",{class:"kro-progress-bar__indeterminate"},null,-1);Ge.render=function(e,t,o,a,r,n){return l(),i("div",{class:{"kro-progress-bar":!0,"kro-progress-bar--is-stream":o.stream,"kro-progress-bar--is-indeterminate":o.indeterminate,"kro-progress-bar--rounded":o.rounded}},[Xe,d("div",{class:"kro-progress-bar__buffer",style:{"--kro-progress-bar-buffer-value":o.bufferValue-100+"%"}},null,4),d("div",{class:"kro-progress-bar__progress",style:{"--kro-progress-bar-value":o.value-100+"%"}},null,4),Ue],2)},Ge.__file="src/components/ProgressBar/ProgressBar.vue";var Ye=a(Object.assign(Object.assign({},{name:"KroLayout",emits:["update:is-drawer-open","update:is-drawer-hidden"]}),{props:{absolute:{type:Boolean,required:!1},responsiveWidth:{type:Number,required:!1},temporary:{type:Boolean,required:!1},right:{type:Boolean,required:!1},toolbarHeight:{type:String,required:!1},clipToolbar:{type:Boolean,required:!1},mini:{type:Boolean,required:!1}},setup:function(e,t){const a=r(!!t.slots.drawer),n=C(`(max-width: ${e.responsiveWidth||768}px)`),s=o(()=>e.mini?"6rem":"16rem"),l=o(()=>n.value||e.temporary||!a.value?"0":"var(--drawerWidth)"),i=o(()=>e.toolbarHeight||"4rem"),d=o(()=>e.clipToolbar?"var(--contentOffsetLeft)":"0"),c=o(()=>e.clipToolbar||n.value||e.temporary?"0":"var(--toolbarHeight)");return _(()=>{a.value=!!t.slots.drawer}),A(()=>{t.emit("update:is-drawer-open",!(n.value||e.temporary)),t.emit("update:is-drawer-hidden",n.value||e.temporary)}),V(e=>({drawerWidth:s,toolbarHeight:i,toolbarLeftOffset:d,drawerOffsetTop:c,contentOffsetLeft:l})),{hasDrawer:a,isSmallScreen:n,drawerWidth:s,contentOffsetLeft:l,toolbarHeight:i,toolbarLeftOffset:d,drawerOffsetTop:c}}}));const Je={class:"kro-layout"},Qe={key:2,class:"kro-layout__toolbar"},Ze={class:"kro-layout__container"},et={key:0,class:"kro-layout__content"},tt={key:1,class:"kro-layout__footer"};Ye.render=function(e,t,o,a,r,n){return l(),i("div",Je,[e.$slots.drawer?(l(),i("div",{key:0,class:["kro-layout__scrim",{"kro-layout__scrim--is-open":e.$attrs["is-drawer-open"]&&(a.isSmallScreen||o.temporary)}],onClick:t[1]||(t[1]=t=>e.$emit("update:is-drawer-open",!1))},null,2)):m("v-if",!0),e.$slots.drawer?(l(),i("div",{key:1,class:["kro-layout__drawer",{"kro-layout__drawer--hidden":a.isSmallScreen||o.temporary,"kro-layout__drawer--is-open":e.$attrs["is-drawer-open"]}]},[v(e.$slots,"drawer")],2)):m("v-if",!0),e.$slots.toolbar?(l(),i("div",Qe,[v(e.$slots,"toolbar")])):m("v-if",!0),d("div",Ze,[e.$slots.default?(l(),i("div",et,[v(e.$slots,"default")])):m("v-if",!0),e.$slots.footer?(l(),i("div",tt,[v(e.$slots,"footer")])):m("v-if",!0)])])},Ye.__file="src/components/Layout/Layout.vue";var ot={name:"KroSelect",props:{label:{type:String},required:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},autofocus:{type:Boolean},name:{type:String},id:{type:String}},emits:["update:modelValue"],setup(e,{attrs:t}){const o=r(!1),a=r(null);return n(()=>{a.value&&Array.from(a.value.options).forEach(e=>{e.value===t.modelValue&&(e.selected=!0)})}),{focused:o,select:a}}};const at={class:"kro-select"},rt={class:"kro-select__hidden-label"},nt=d("option",{selected:"",hidden:""},null,-1);ot.render=function(e,t,o,a,r,n){const s=c("kro-icon");return l(),i("div",at,[d("div",{class:{"kro-select__container":!0,"kro-select--focused":a.focused,"kro-select--has-text":e.$attrs.modelValue}},[d("label",{class:{"kro-select__label":!0,"kro-select--focused":a.focused,"kro-select--has-text":e.$attrs.modelValue},for:o.id},k(o.label),11,["for"]),d("div",rt,k(o.label),1),d("span",{class:{"kro-select__pseudo-label":!0,"kro-select--focused":a.focused,"kro-select--has-text":e.$attrs.modelValue}},k(o.label),3),d("select",{id:o.id,ref:"select",class:"kro-select__input",disabled:o.disabled,required:o.required,readonly:o.readonly,autofocus:o.autofocus,name:o.name,value:e.$attrs.modelValue,onChange:t[1]||(t[1]=t=>e.$emit("update:modelValue",t.target.value)),onFocus:t[2]||(t[2]=e=>a.focused=!0),onBlur:t[3]||(t[3]=e=>a.focused=!1)},[nt,v(e.$slots,"default")],40,["id","disabled","required","readonly","autofocus","name","value"]),d(s,{class:"kro-select__icon",icon:"mdi:chevron-down"})],2)])},ot.__file="src/components/Select/Select.vue";var st={name:"KroSlider",props:{disabled:{type:Boolean,default:!1},step:{type:Number,default:1},ticks:{default:!1,type:[Boolean,String]},min:{type:Number,default:0},max:{type:Number,default:100}},emits:["update:modelValue"],setup(t,{emit:a,attrs:s}){const l=r(),i=r(),{targetPercentage:d}=(e=>{const{x:t,elementPositionX:a,elementWidth:r}=D(e),n=o(()=>Math.min(Math.max(0,t.value-a.value),r.value)/(r.value||1));return{elementWidth:r,targetPercentage:n}})(l),{elementWidth:c}=(t=>{const o=r(0),a=r(0),n=r(0),s=r(0),l=e=>{const{left:t,top:r,width:l,height:i}=e.getBoundingClientRect();o.value=l,a.value=i,n.value=t,s.value=r};e(t,e=>{const t=e||document.body;l(t)});const i=M(()=>{const e=t.value||document.body;l(e)},250);return O("resize",i),{elementWidth:o,elementHeight:a,elementLeft:n,elementTop:s}})(l),u=r(!1),{disableDocumentSelect:p,enableDocumentSelect:f}=ve(),m=()=>{u.value=!1,f(),removeEventListener("touchcancel",m),removeEventListener("touchend",m),removeEventListener("mouseup",m)},v=()=>{u.value=!0,p(),addEventListener("touchcancel",m),addEventListener("touchend",m),addEventListener("mouseup",m)},h=o(()=>c.value/Math.ceil((t.max-t.min)/t.step)),y=()=>{a("update:modelValue",Math.max(t.min,Math.min(t.max,s.modelValue-t.step)))},k=()=>{a("update:modelValue",Math.max(t.min,Math.min(t.max,s.modelValue+t.step)))};return n(()=>{a("update:modelValue",Math.max(t.min,Math.min(s.modelValue||0,t.max)))}),A(()=>{u.value&&a("update:modelValue",Math.max(t.min,Math.min(Math.round(d.value*(t.max-t.min)/t.step)*t.step+t.min,t.max)))}),{knobRef:i,sliderRef:l,targetPercentage:d,enableEditing:v,trackSpacing:h,isEditing:u,onSliderClick:()=>{setTimeout(()=>{i.value.focus()},0),v()},incrementValue:e=>{"ArrowLeft"===e.key&&y(),"ArrowRight"===e.key&&k()},subtractValue:y,addValue:k}}};const lt={class:"kro-slider__track-container"},it={ref:"sliderRef",class:"kro-slider__track"},dt=d("div",{class:"kro-slider__progress"},null,-1),ct={class:"kro-slider__knob-container"},ut=d("div",{class:"kro-slider__thumb"},null,-1),pt={key:0},ft={key:1};st.render=function(e,t,o,a,r,n){return l(),i("div",{class:"kro-slider",style:{"--kro-slider-progress":(e.$attrs.modelValue-o.min)/(o.max-o.min)*100-100+"%"},onTouchstartPassive:t[2]||(t[2]=(...e)=>a.enableEditing(...e)),onMousedown:t[3]||(t[3]=(...e)=>a.onSliderClick(...e))},[d("div",lt,[d("div",it,[o.ticks?(l(),i("div",{key:0,style:{"--kro-slider-tick-spacing":a.trackSpacing+"px"},class:"kro-slider__markers"},null,4)):m("v-if",!0),dt],512),d("div",ct,[d("button",{ref:"knobRef",class:"kro-slider__knob",tabindex:"0",onKeydown:t[1]||(t[1]=(...e)=>a.incrementValue(...e))},null,544),d("div",{class:["kro-slider__preview-value",{"kro-slider__preview-value--is-active":a.isEditing}]},[ut,e.$slots.thumb?(l(),i("span",ft,[v(e.$slots,"thumb",{value:e.$attrs.modelValue})])):(l(),i("span",pt,k(e.$attrs.modelValue),1))],2)])])],36)},st.__file="src/components/Slider/Slider.vue";const mt={mounted(){console.log("Ok Tooltip")}};const vt=()=>({install(e,t){t.components&&Array.isArray(t.components)&&Object.entries(t.components).forEach(([t,o])=>{e.component(t,o)}),E()}}),ht=(yt=Object.freeze({__proto__:null,KroButton:Y,KroButtonGroup:Z,KroIcon:H,KroSpinner:R,KroSquircle:G,KroSwitch:te,KroTextfield:le,KroToolbar:ce,KroDialog:xe,KroSurface:ue,KroDivider:Ae,KroAlert:Te,KroApp:De,KroListItem:Le,KroMenu:He,KroAvatar:We,KroProgressBar:Ge,KroLayout:Ye,KroSelect:ot,KroSlider:st}),kt=Object.freeze({__proto__:null,Tooltip:mt}),{install(e,t){yt&&Object.entries(yt).forEach(([t,o])=>{o&&e.component(t,o)}),kt&&Object.entries(kt).forEach(([t,o])=>{o&&e.directive(t,o)}),e.provide(F,t.icons),E()}});var yt,kt,bt=Object.freeze({__proto__:null,ButtonMetadata:Q,ButtonGroupMetadata:{title:"KroButtonGroup",description:"A container for multiple related buttons"},IconMetadata:{title:"KroIcon",description:"Display an SVG icon",props:[{name:"icon",description:"The name of the icon to display",type:"string",values:"-",default:"undefined"}],css:[{name:"--kro-icon-size",description:"The size of the icon",type:"size",default:"1.5rem"}]},SpinnerMetadata:{title:"KroSpinner",description:"A loading indicator",css:[{name:"--kro-spinner-size",description:"Sets the size of the spinner",type:"size",default:"2.5rem"},{name:"--kro-spinner-thickness",description:"Sets the thickness of the spinner",type:"size",default:"0.35rem"},{name:"--kro-spinner-color",description:"Sets the color of the spinner",type:"size",default:"--kro-foreground"}]},SquircleMetadata:{title:"KroSquircle",description:"A component used for visual effect."},SwitchMetadata:{title:"KroSwitch",description:"",props:[{name:"v-model",description:"The value of the switch",type:"bool",values:"-",default:"undefined"}],css:[{name:"--kro-switch-track-background",description:"The color of the track background.",type:"color",default:"--kro-background-secondary"},{name:"--kro-switch-track-active-background",description:"The track color when the switch is set to true.",type:"color",default:"--kro-primary-darken"},{name:"--kro-switch-knob-color",description:"The color of the switch knob.",type:"color",default:"--kro-primary"},{name:"--kro-switch-knob-shadow",description:"The shadow of the switch knob.",type:"shadow",default:"--kro-shadow"}]},TextfieldMetadata:{title:"KroTextfield",description:"",props:[{name:"v-model",description:"The value of the textfield",type:"string",values:"-",default:"undefined"},{name:"label",description:"The textfield label",type:"string",values:"-",default:"undefined"},{name:"type",description:"The textfield type",type:"string",values:"text | tel | email | password | url | search",default:"text"},{name:"required",description:"Marks the textfield as required",type:"bool",values:"-",default:"false"},{name:"disabled",description:"Marks the textfield as disabled",type:"bool",values:"-",default:"false"},{name:"multiline",description:"Makes the textfield into a textarea than can support multiple lines.",type:"bool",values:"-",default:"false"},{name:"readonly",description:"Marks the textfield as readonly",type:"bool",values:"-",default:"false"},{name:"autofocus",description:"Autofocuses the textfield when the component loads.",type:"bool",values:"-",default:"false"},{name:"min",description:"Sets the min value if the textfield is a nubmer input",type:"number",values:"-",default:"undefined"},{name:"max",description:"Sets the max value if the textfield is a nubmer input",type:"number",values:"-",default:"undefined"},{name:"maxlength",description:"Sets the max amount of characters that the textfield will accept",type:"number",values:"-",default:"undefined"},{name:"name",description:"Sets the name of the textfield.",type:"string",values:"-",default:"undefined"},{name:"id",description:"Sets the id of the textfield",type:"string",values:"-",default:"undefined"},{name:"autoresize",description:"If the textfield is multiline, then this will autoresize the textfield vertically as the user types.",type:"bool",values:"-",default:"true"}],css:[{name:"--kro-textfield-border-color",description:"The border color of the textifled",type:"color",default:"--kro-divider"},{name:"--kro-textifled-focused-border-color",description:"The border color of the textifled when it is focused",type:"color",default:"--kro-primary"}]},ToolbarMetadata:{title:"KroToolbar",description:"",props:[{name:"small",description:"Makes the height of the toolbar smaller.",type:"bool",values:"-",default:"false"},{name:"padded",description:"Adds padding to the toolbar.",type:"bool",values:"-",default:"false"},{name:"raised",description:"Adds a shadow to the toolbar.",type:"bool",values:"-",default:"false"}],css:[{name:"--kro-toolbar-height",description:"The height of the toolbar",type:"size",default:"4rem"},{name:"--kro-toolbar-background",description:"The background color of the toolbar",type:"color",default:"--kro-background-secondary"},{name:"--kro-toolbar-shadow",description:"The shadow of a raised toolbar",type:"color",default:"--kro-background-shadow"}]},DialogMetadata:{title:"KroDialog",description:"Dialogs are used to display important information requiring the users immediate attention, often to confirm an action or to display an important error message, and should only be used when necessary.",props:[{name:"v-model",description:"Contorls the open state of the dialog",type:"bool",values:"-",default:"false"},{name:"persistent",description:"If enabled, the dialog can only be closed by the close button",type:"bool",values:"-",default:"false"}],events:[{name:"@open",description:"Fired when the dialog is opened",parameters:[]},{name:"@close",description:"Fired when the dialog is closed",parameters:[]}],slots:[{name:"#activator",description:"Slots the button that can be used to open the dialog",props:["open","close","toggle"]},{name:"#title",description:"Slot for the title of the dialog",props:["open","close","toggle"]},{name:"#controls",description:"Slot for the controls of the dialog",props:["open","close","toggle"]},{name:"#default",description:"Slot for the content of the dialog",props:[]}]},SurfaceMetadata:{title:"KroSurface",description:"A surface that contains content and can have a label",props:[{name:"padded",description:"Adds a padding to the container.",type:"bool",values:"-",default:"true"},{name:"raised",description:"Adds a shadow to the container.",type:"bool",values:"-",default:"true"},{name:"outline",description:"Adds an outline to the container.",type:"bool",values:"-",default:"false"},{name:"icon",description:"Adds an icon to the container.",type:"bool",values:"-",default:"undefined"},{name:"label",description:"Adds a label to the container.",type:"string",values:"-",default:"undefined"}],css:[{name:"--kro-surface-background",description:"",type:"color",default:"--kro-background-secondary"},{name:"--kro-surface-outline",description:"Sets the outline color of and outlined container",type:"color",default:"--kro-divider"},{name:"--kro-surface-shadow",description:"Sets the shadow of a raised container",type:"shadow",default:"--kro-shadow"}]},DividerMetadata:{title:"KroDivider",description:"",props:[{name:"vertical",description:"Makes the divider a vertical divider",type:"bool",values:"-",default:"false"}]},AlertMetadata:{title:"KroAlert",description:"",props:[{name:"type",description:"Defines the type of alert that is shown.",type:"string",values:["info","error","warning","success"],default:"info"},{name:"dismissible",description:"Shows a close icon on the alert allowing the user to dismiss the alert.",type:"bool",values:"-",default:"false"},{name:"icon",description:"Sets the icon that is displayed on the alert.",type:"string",values:"-",default:"undefined"},{name:"tag",description:"Sets the root tage of the alert",type:"string",values:"-",default:"div"},{name:"outline",description:"Give the alert an outline style.",type:"bool",values:"-",default:"false"}],events:[{name:"@dismissed",description:"Fires when the alert is dismissed",parameters:[]},{name:"@show",description:"Fires when the alert is shown after being dismissed",parameters:[]}],slots:[{name:"#default",description:"Slot for the text content of the alert.",props:[]}]},AppMetadata:{title:"KroApp",description:""},ListMetadata:Ne,MenuMetadata:{title:"KroMenu",description:"",props:[{name:"offsetX",description:"Offsets the menu horizontally so it is not covering the activator element.",type:"bool",values:"-",default:"false"},{name:"offsetY",description:"Offsets the menu vertically so it is not coverting the activator element",type:"bool",values:"-",default:"false"},{name:"left",description:"Positions the menu to open to the left of the activator.",type:"bool",values:"-",default:"false"},{name:"right",description:"Positions the menu to open to the right of the activator.",type:"bool",values:"-",default:"false"},{name:"top",description:"Positions the menut to open above the activator.",type:"bool",values:"-",default:"false"},{name:"bottom",description:"Positions the element to open below the activator.",type:"bool",values:"-",default:"false"}],slots:[{name:"#default",description:"",props:[]}],css:[{name:"--kro-menu-min-width",description:"",type:"size",default:"200px"},{name:"--kro-menu-max-width",description:"",type:"size",default:"300px"}]},AvatarMetadata:{title:"KroAvatar",description:"",props:[{name:"src",description:"Sets the image of the avatar",type:"string",values:"-",default:"undefined"},{name:"color",description:"Sets the color of the avatar.",type:"string",values:"-",default:"undefined"},{name:"small",description:"Makes the avatar smaller.",type:"bool",values:"-",default:"false"},{name:"large",description:"Makes the avatar larger.",type:"bool",values:"-",default:"false"}],css:[{name:"--kro-avatar-size",description:"",default:"3rem",type:"CSS Size Unit"},{name:"--kro-avatar-radius",description:"",default:"50%",type:"CSS Size Unit"}]},ProgressBarMetadata:{title:"KroProgressBar",description:"",props:[{name:"stream",description:"Display a speical style to the progress bar to indicate it is a stream",type:"bool",values:"-",default:"false"},{name:"indeterminate",description:"Display a special style to the progress bar to indicate that is indeterminate.",type:"",values:"-",default:"false"},{name:"rounded",description:"Applies a rounded style to the progress bar.",type:"bool",values:"-",default:"true"},{name:"value",description:"Sets the value of the progress bar.",type:"number",values:"-",default:"0"},{name:"bufferValue",description:"Sets the buffer value of the progress bar.",type:"number",values:"-",default:"100"}],css:[]},LayoutMetadata:{title:"KroLayout",description:"",props:[{name:"responsiveWidth",default:"768",description:"The width at which the drawer is hidden",type:"number",values:[]},{name:"temporary",default:"false",description:"Hides the drawer by default",type:"bool",values:[]},{name:"clipToolbar",default:"false",description:"Shifts the toolbar to the right to make room for the drawer",type:"bool",values:[]},{name:"mini",default:"false",description:"Makes the drawer smaller",type:"bool",values:[]},{name:"v-model:is-drawer-open",default:"true or false",description:"Controls the open state of the drawer",type:"bool",values:[]},{name:"v-model:is-drawer-hidden",default:"true or false",description:"Indicates if the drawer is in a default hidden state",type:"bool",values:[]}],slots:[{name:"#drawer",description:"Contains the sidebar navigation of the page",props:[]},{name:"#toolbar",description:"Contains the toolbar of the page",props:[]},{name:"#footer",description:"Contains the footer content of the page",props:[]},{name:"#default",description:"Contains the contents of the page",props:[]}]},SelectMetadata:{title:"KroSelect",description:"A styled select component.",props:[{name:"label",description:"",type:"bool",values:"-",default:"false"},{name:"required",description:"",type:"bool",values:"-",default:"false"},{name:"disabled",description:"",type:"bool",values:"-",default:"false"},{name:"readonly",description:"",type:"bool",values:"-",default:"false"},{name:"autofocus",description:"",type:"string",values:"-",default:"undefined"},{name:"name",description:"",type:"string",values:"-",default:"undefined"},{name:"id",description:"",type:"string",values:"-",default:"undefined"}]},SliderMetadata:{title:"KroSlider",description:"",props:[{name:"v-model",description:"The value of the slider",type:"number",values:"-",default:"undefined"},{name:"disabled",description:"Disables the slider",type:"bool",values:"-",default:"false"},{name:"steps",description:"Sets the step amount for each tick",type:"number",values:"-",default:"1"},{name:"ticks",description:"Display the ticks on the slider",type:"bool",values:"-",default:"false"},{name:"min",description:"Set the min value of the slider",type:"number",values:"-",default:"0"},{name:"max",description:"Set the max value of the slider",type:"number",values:"-",default:"100"}],slots:[{name:"#thumb",description:"A slot to replace the default value of the thumb.",props:["value"]}],css:[{name:"--kro-slider-tick-color",description:"The color of the tick marks on the slider.",type:"color",default:"rgba(0, 0, 0, .24)"},{name:"--kro-slider-track-color",description:"The color of the slider track.",type:"color",default:"--kro-background-secondary"},{name:"--kro-slider-progress-color",description:"The color of the progress bar on the track.",type:"color",default:"--kro-primary"},{name:"--kro-slider-knob-color",description:"The color of the knob on the slider.",type:"color",default:"--kro-primary-lighten"},{name:"--kro-slider-thumb-foreground",description:"The foreground color of the thumb.",type:"color",default:"--kro-primary-foreground"},{name:"--kro-slider-thumb-background",description:"The background color of the thumb.",type:"color",default:"--kro-primary"}]}});export{Te as KroAlert,De as KroApp,We as KroAvatar,Y as KroButton,Z as KroButtonGroup,xe as KroDialog,Ae as KroDivider,H as KroIcon,Ye as KroLayout,Le as KroListItem,He as KroMenu,Ge as KroProgressBar,ot as KroSelect,st as KroSlider,R as KroSpinner,G as KroSquircle,ue as KroSurface,te as KroSwitch,le as KroTextfield,ce as KroToolbar,vt as KroUIBaseConfigurationPlugin,ht as KroUIPlugin,bt as Metadata,ge as useDialog,L as useTheme}; |
{ | ||
"name": "@black-kro/ui", | ||
"version": "0.1.47", | ||
"version": "0.1.48", | ||
"private": false, | ||
@@ -26,3 +26,3 @@ "main": "./dist/index.common.js", | ||
"docs": "cross-env NODE_ENV=production vite build", | ||
"prepublishOnly": "npm build", | ||
"prepublishOnly": "npm run build", | ||
"lint": "eslint ./src --fix" | ||
@@ -29,0 +29,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3071311
151
2890