Comparing version 0.1.13 to 0.1.14
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),o=Symbol();function t(){return{icons:e.inject(o)}}var r={props:{icon:{type:String,required:!0}},setup:function(o){var r=t().icons;return{iconDefinition:e.computed((function(){return r&&r[o.icon]?r[o.icon]:(console.error('Kro UI Error: No Icon Named "'+o.icon+'". Did you register your icon in the kro ui plugin?'),"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z")}))}}},n={class:"kro-icon",viewBox:"0 0 24 24"};r.render=function(o,t){return e.openBlock(),e.createBlock("svg",n,[e.createVNode("path",{d:o.iconDefinition},null,8,["d"])])},r.__file="src/components/Icon/Icon.vue";var l={};(l.__cssModules={}).$style={root:"_root_12mcj_1",KroSpinnerAnimation:"_KroSpinnerAnimation_12mcj_1"},l.render=function(o,t){return e.openBlock(),e.createBlock("div",{class:o.$style.root},null,2)},l.__file="src/components/Spinner/Spinner.vue";var a={},i=e.createVNode("path",{stroke:"none",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);(a.__cssModules={}).$style={root:"_root_3ccdr_1"},a.render=function(o,t){return e.openBlock(),e.createBlock("svg",{class:o.$style.root,viewBox:"0 0 400 400","enable-background":"new 0 0 400 400","xml:space":"preserve"},[i],2)},a.__file="src/components/Squircle/Squircle.vue";var c={components:{KroIcon:r,KroSpinner:l,KroSquircle:a},props:{loading:{type:Boolean,default:!1},href:String,target:{type:String,default:"_blank"},to:{type:[String,Object]},type:String,primary:Boolean,outline:Boolean,raised:Boolean,icon:String},setup:function(o){return{componentType:e.computed((function(){var e=o.to,t=o.href;return e?"router-link":t?"a":"button"}))}}},s={class:"kro-button__spinner"};c.render=function(o,t){var r=e.resolveComponent("kro-squircle"),n=e.resolveComponent("kro-icon"),l=e.resolveComponent("kro-spinner");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.componentType),{class:{"kro-button":!0,"kro-button--primary":o.primary,"kro-button--outline":o.outline,"kro-button--raised":o.raised,"kro-button--is-icon-button":o.icon&&!o.$slots.default},href:o.href,to:o.to,target:o.href?o.target:""},{default:e.withCtx((function(){return[e.createVNode("span",{class:{"kro-button__content":!0,"kro-button__content--is-loading":o.loading}},[o.icon&&!o.$slots.default?e.createVNode(r,{key:0,class:"kro-button__squircle"}):e.createCommentVNode("v-if",!0),o.icon?e.createVNode(n,{key:0,class:"kro-button__icon",icon:o.icon},null,8,["icon"]):e.createCommentVNode("v-if",!0),e.renderSlot(o.$slots,"default"),!o.href||o.icon&&!o.$slots.default?e.createCommentVNode("v-if",!0):e.createVNode(n,{key:0,icon:"external"})],2),e.withDirectives(e.createVNode("span",s,[e.createVNode(l)],512),[[e.vShow,o.loading]])]})),_:1},8,["class","href","to","target"])},c.__file="src/components/Button/Button.vue";var u={},d={class:"kro-button-group"};u.render=function(o,t){return e.openBlock(),e.createBlock("div",d,[e.renderSlot(o.$slots,"default")])},u.__file="src/components/ButtonGroup/ButtonGroup.vue";var p={props:{value:{type:Boolean,default:!1}}},f={class:"kro-switch"},v={class:"kro-switch__container"},k={class:"kro-switch__track"},m=e.createVNode("div",{class:"kro-switch__knob"},null,-1),g={key:0,class:"kro-switch__label"};p.render=function(o,t){return e.openBlock(),e.createBlock("div",f,[e.createVNode("div",v,[e.createVNode("input",{class:"kro-switch__input",checked:o.$attrs.modelValue,type:"checkbox",onChange:t[1]||(t[1]=function(e){return o.$emit("update:modelValue",e.target.checked)})},null,40,["checked"]),e.createVNode("div",k,[e.createVNode("div",{class:{"kro-switch__track-active":!0,"kro-switch__track-active--is-active":o.$attrs.modelValue}},null,2)]),e.createVNode("div",{class:{"kro-switch__knob-container":!0,"kro-switch__knob-container--is-active":o.$attrs.modelValue}},[m],2)]),o.$slots.default?(e.openBlock(),e.createBlock("div",g,[e.renderSlot(o.$slots,"default")])):e.createCommentVNode("v-if",!0)])},p.__file="src/components/Switch/Switch.vue";var _={props:{value:{type:String,default:""},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}},setup:function(){return{focused:e.ref(!1)}}},y={class:"kro-textfield"};_.render=function(o,t){return e.openBlock(),e.createBlock("div",y,[e.createVNode("div",{class:{"kro-textfield__container":!0,"kro-textfield--focused":o.focused,"kro-textfield--has-text":o.$attrs.modelValue}},[e.createVNode("label",{class:{"kro-textfield__label":!0,"kro-textfield--focused":o.focused,"kro-textfield--has-text":o.$attrs.modelValue},for:o.id},e.toDisplayString(o.label),11,["for"]),e.createVNode("span",{class:{"kro-textfield__pseudo-label":!0,"kro-textfield--focused":o.focused,"kro-textfield--has-text":o.$attrs.modelValue}},e.toDisplayString(o.label),3),e.createVNode("input",{class:"kro-textfield__input",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,id:o.id,value:o.$attrs.modelValue,onInput:t[1]||(t[1]=function(e){return o.$emit("update:modelValue",e.target.value)}),onFocus:t[2]||(t[2]=function(e){return o.focused=!0}),onBlur:t[3]||(t[3]=function(e){return o.focused=!1})},null,40,["disabled","required","readonly","autofocus","type","min","max","maxlength","name","id","value"])],2)])},_.__file="src/components/Textfield/Textfield.vue";var V={props:{small:Boolean,padded:Boolean,raised:Boolean}};V.render=function(o,t){return e.openBlock(),e.createBlock("div",{class:{"kro-toolbar":!0,"kro-toolbar--small":o.small,"kro-toolbar--raised":o.raised,"kro-toolbar--padded":o.padded}},[e.renderSlot(o.$slots,"default")],2)},V.__file="src/components/Toolbar/Toolbar.vue"; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),o=Symbol();function t(){return{icons:e.inject(o)}}var r={props:{icon:{type:String,required:!0}},setup:function(o){var r=t().icons;return{iconDefinition:e.computed((function(){return r&&r[o.icon]?r[o.icon]:(console.error('Kro UI Error: No Icon Named "'+o.icon+'". Did you register your icon in the kro ui plugin?'),"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z")}))}}},n={class:"kro-icon",viewBox:"0 0 24 24"};r.render=function(o,t){return e.openBlock(),e.createBlock("svg",n,[e.createVNode("path",{d:o.iconDefinition},null,8,["d"])])},r.__file="src/components/Icon/Icon.vue";var l={};(l.__cssModules={}).$style={root:"_root_12mcj_1",KroSpinnerAnimation:"_KroSpinnerAnimation_12mcj_1"},l.render=function(o,t){return e.openBlock(),e.createBlock("div",{class:o.$style.root},null,2)},l.__file="src/components/Spinner/Spinner.vue";var a={},i=e.createVNode("path",{stroke:"none",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);(a.__cssModules={}).$style={root:"_root_3ccdr_1"},a.render=function(o,t){return e.openBlock(),e.createBlock("svg",{class:o.$style.root,viewBox:"0 0 400 400","enable-background":"new 0 0 400 400","xml:space":"preserve"},[i],2)},a.__file="src/components/Squircle/Squircle.vue";var c={components:{KroIcon:r,KroSpinner:l,KroSquircle:a},props:{loading:{type:Boolean,default:!1},href:String,target:{type:String,default:"_blank"},to:{type:[String,Object]},type:String,primary:Boolean,outline:Boolean,raised:Boolean,icon:String},setup:function(o){return{componentType:e.computed((function(){var e=o.to,t=o.href;return e?"router-link":t?"a":"button"}))}}},s={class:"kro-button__spinner"};c.render=function(o,t){var r=e.resolveComponent("kro-squircle"),n=e.resolveComponent("kro-icon"),l=e.resolveComponent("kro-spinner");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.componentType),{class:{"kro-button":!0,"kro-button--primary":o.primary,"kro-button--outline":o.outline,"kro-button--raised":o.raised,"kro-button--is-icon-button":o.icon&&!o.$slots.default},href:o.href,to:o.to,target:o.href?o.target:""},{default:e.withCtx((function(){return[e.createVNode("span",{class:{"kro-button__content":!0,"kro-button__content--is-loading":o.loading}},[o.icon&&!o.$slots.default?e.createVNode(r,{key:0,class:"kro-button__squircle"}):e.createCommentVNode("v-if",!0),o.icon?e.createVNode(n,{key:0,class:"kro-button__icon",icon:o.icon},null,8,["icon"]):e.createCommentVNode("v-if",!0),e.renderSlot(o.$slots,"default"),!o.href||o.icon&&!o.$slots.default?e.createCommentVNode("v-if",!0):e.createVNode(n,{key:0,icon:"external"})],2),e.withDirectives(e.createVNode("span",s,[e.createVNode(l)],512),[[e.vShow,o.loading]])]})),_:1},8,["class","href","to","target"])},c.__file="src/components/Button/Button.vue";var u={},d={class:"kro-button-group"};u.render=function(o,t){return e.openBlock(),e.createBlock("div",d,[e.renderSlot(o.$slots,"default")])},u.__file="src/components/ButtonGroup/ButtonGroup.vue";var p={props:{value:{type:Boolean,default:!1}}},f={class:"kro-switch"},v={class:"kro-switch__container"},m={class:"kro-switch__track"},k=e.createVNode("div",{class:"kro-switch__knob"},null,-1),g={key:0,class:"kro-switch__label"};p.render=function(o,t){return e.openBlock(),e.createBlock("div",f,[e.createVNode("div",v,[e.createVNode("input",{class:"kro-switch__input",checked:o.$attrs.modelValue,type:"checkbox",onChange:t[1]||(t[1]=function(e){return o.$emit("update:modelValue",e.target.checked)})},null,40,["checked"]),e.createVNode("div",m,[e.createVNode("div",{class:{"kro-switch__track-active":!0,"kro-switch__track-active--is-active":o.$attrs.modelValue}},null,2)]),e.createVNode("div",{class:{"kro-switch__knob-container":!0,"kro-switch__knob-container--is-active":o.$attrs.modelValue}},[k],2)]),o.$slots.default?(e.openBlock(),e.createBlock("div",g,[e.renderSlot(o.$slots,"default")])):e.createCommentVNode("v-if",!0)])},p.__file="src/components/Switch/Switch.vue";var _={props:{value:{type:String,default:""},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}},setup:function(){return{focused:e.ref(!1)}}},y={class:"kro-textfield"};_.render=function(o,t){return e.openBlock(),e.createBlock("div",y,[e.createVNode("div",{class:{"kro-textfield__container":!0,"kro-textfield--focused":o.focused,"kro-textfield--has-text":o.$attrs.modelValue}},[e.createVNode("label",{class:{"kro-textfield__label":!0,"kro-textfield--focused":o.focused,"kro-textfield--has-text":o.$attrs.modelValue},for:o.id},e.toDisplayString(o.label),11,["for"]),e.createVNode("span",{class:{"kro-textfield__pseudo-label":!0,"kro-textfield--focused":o.focused,"kro-textfield--has-text":o.$attrs.modelValue}},e.toDisplayString(o.label),3),e.createVNode("input",{class:"kro-textfield__input",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,id:o.id,value:o.$attrs.modelValue,onInput:t[1]||(t[1]=function(e){return o.$emit("update:modelValue",e.target.value)}),onFocus:t[2]||(t[2]=function(e){return o.focused=!0}),onBlur:t[3]||(t[3]=function(e){return o.focused=!1})},null,40,["disabled","required","readonly","autofocus","type","min","max","maxlength","name","id","value"])],2)])},_.__file="src/components/Textfield/Textfield.vue";var V={props:{small:Boolean,padded:Boolean,raised:Boolean}};V.render=function(o,t){return e.openBlock(),e.createBlock("div",{class:{"kro-toolbar":!0,"kro-toolbar--small":o.small,"kro-toolbar--raised":o.raised,"kro-toolbar--padded":o.padded}},[e.renderSlot(o.$slots,"default")],2)},V.__file="src/components/Toolbar/Toolbar.vue"; | ||
/*! ***************************************************************************** | ||
@@ -16,3 +16,3 @@ Copyright (c) Microsoft Corporation. | ||
***************************************************************************** */ | ||
var B=function(){return(B=Object.assign||function(e){for(var o,t=1,r=arguments.length;t<r;t++)for(var n in o=arguments[t])Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);return e}).apply(this,arguments)};function h(e,o,t,r){return new(t||(t=Promise))((function(n,l){function a(e){try{c(r.next(e))}catch(e){l(e)}}function i(e){try{c(r.throw(e))}catch(e){l(e)}}function c(e){var o;e.done?n(e.value):(o=e.value,o instanceof t?o:new t((function(e){e(o)}))).then(a,i)}c((r=r.apply(e,o||[])).next())}))}function b(e,o){var t,r,n,l,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return l={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(l){return function(i){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(n=2&l[0]?r.return:l[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,l[1])).done)return n;switch(r=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){a.label=l[1];break}if(6===l[0]&&a.label<n[1]){a.label=n[1],n=l;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(l);break}n[2]&&a.ops.pop(),a.trys.pop();continue}l=o.call(e,a)}catch(e){l=[6,e],r=0}finally{t=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,i])}}}var C={props:{padded:{type:Boolean,default:!0},raised:{type:Boolean,default:!0},outline:{type:Boolean,default:!1},icon:String,label:String}},N={key:0,class:"kro-surface__label-container"},x={key:0,class:"kro-surface__label"};C.render=function(o,t){var r=e.resolveComponent("kro-icon");return e.openBlock(),e.createBlock("div",{class:{"kro-surface":!0,"kro-surface--padded":o.padded,"kro-surface--raised":o.raised,"kro-surface--outline":o.outline}},[o.icon||o.label?(e.openBlock(),e.createBlock("div",N,[o.icon?e.createVNode(r,{key:0,class:"kro-surface__icon",icon:o.icon},null,8,["icon"]):e.createCommentVNode("v-if",!0),o.label?(e.openBlock(),e.createBlock("div",x,e.toDisplayString(o.label),1)):e.createCommentVNode("v-if",!0)])):e.createCommentVNode("v-if",!0),e.renderSlot(o.$slots,"default")],2)},C.__file="src/components/Surface/Surface.vue";var S={components:{KroSurface:C},props:{open:Boolean,persistent:Boolean},setup:function(o,t){var r=this,n=t.emit,l=e.ref(!1),a=e.ref(!1),i=function(e){"keydown"===(null==e?void 0:e.type)?"Escape"===e.key&&(o.persistent||(l.value=!1,window.removeEventListener("keydown",i))):l.value=!1},c=function(){l.value=!0,a.value=!0,window.addEventListener("keydown",i),n("open")};return e.onMounted((function(){return h(r,void 0,void 0,(function(){return b(this,(function(e){return o.open&&window.setTimeout((function(){return c()}),0),[2]}))}))})),e.onUnmounted((function(){window.removeEventListener("keydown",i)})),{isOpen:l,shouldMountContent:a,open:c,close:i,toggle:function(){l?i(null):c()},onTransitionEnded:function(e){"transform"===e.propertyName&&(l.value||(a.value=!1,n("close")))}}}},L={key:0,class:"kro-dialog__title"},w={key:0,class:"kro-dialog__controls"};S.render=function(o,t){var r=e.resolveComponent("kro-surface");return e.openBlock(),e.createBlock("div",null,[e.renderSlot(o.$slots,"activator",{open:o.open,close:o.close,toggle:o.toggle}),e.createVNode(e.Teleport,{to:"#kro-portal"},[e.createVNode("div",{tabindex:o.isOpen?1:-1,class:{"kro-dialog":!0,"kro-dialog--is-open":o.isOpen}},[e.createVNode("div",{onClick:t[1]||(t[1]=function(){o.persistent||o.close()}),class:"kro-dialog__scrim"}),e.createVNode(r,{raised:"",class:"kro-dialog__content",onTransitionend:t[2]||(t[2]=function(e){return o.onTransitionEnded(e)})},{default:e.withCtx((function(){return[o.shouldMountContent?(e.openBlock(),e.createBlock(e.Fragment,{key:0},[o.$slots.title?(e.openBlock(),e.createBlock("div",L,[e.renderSlot(o.$slots,"title",{open:o.open,close:o.close,toggle:o.toggle})])):e.createCommentVNode("v-if",!0),e.renderSlot(o.$slots,"default",{open:o.open,close:o.close,toggle:o.toggle}),o.$slots.controls?(e.openBlock(),e.createBlock("div",w,[e.renderSlot(o.$slots,"controls",{open:o.open,close:o.close,toggle:o.toggle})])):e.createCommentVNode("v-if",!0)],64)):e.createCommentVNode("v-if",!0)]})),_:1})],10,["tabindex"])])])},S.__file="src/components/Dialog/Dialog.vue";var $={props:{vertical:Boolean,inset:Boolean}};$.render=function(o,t){return e.openBlock(),e.createBlock("hr",{class:{"kro-divider":!0,"kro-divider--vertical":o.vertical,"kro-divider--inset":o.inset}},null,2)},$.__file="src/components/Divider/Divider.vue";var T,A={components:{KroIcon:r,KroButton:c},props:{type:{type:String,default:"info"},dismissible:Boolean,icon:String,tag:{type:String,default:"div"}},setup:function(o){var t=e.ref(!1);return{iconName:e.computed((function(){var e=o.type,t=o.icon;return t||("warning"===e?"warning":"info"===e?"info":"error"===e?"error":"success"===e?"success":null)})),isHidden:t,hide:function(){t.value=!0},show:function(){t.value=!1}}}},K={class:"kro-alert__icon"},M={key:0};A.render=function(o,t){var r=e.resolveComponent("kro-icon"),n=e.resolveComponent("kro-button");return e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(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--has-icon":o.iconName,"kro-alert--is-dismissible":o.dismissible}},{default:e.withCtx((function(){return[e.createVNode("div",K,[o.iconName?e.createVNode(r,{key:0,icon:o.iconName},null,8,["icon"]):e.createCommentVNode("v-if",!0)]),e.createVNode("div",null,[e.renderSlot(o.$slots,"default")]),o.dismissible?(e.openBlock(),e.createBlock("div",M,[e.createVNode(n,{onClick:t[1]||(t[1]=function(e){return o.hide(e)}),icon:"close"})])):e.createCommentVNode("v-if",!0)]})),_:1},8,["class"])),[[e.vShow,!o.isHidden]])},A.__file="src/components/Alert/Alert.vue",(T=exports.DialogType||(exports.DialogType={}))[T.ALERT=0]="ALERT",T[T.CONFIRMATION=1]="CONFIRMATION";var H=e.ref(),D={setup:function(){var o=e.computed((function(){if(H.value){if(H.value.type===exports.DialogType.ALERT)return"error";if(H.value.type===exports.DialogType.CONFIRMATION)return"warning"}return null}));return{dialog:H,iconType:o}}},I={key:0};D.render=function(o,t){var r=e.resolveComponent("kro-icon"),n=e.resolveComponent("kro-button"),l=e.resolveComponent("kro-dialog");return e.openBlock(),e.createBlock("div",null,[o.dialog?(e.openBlock(),e.createBlock("div",I,[e.createVNode(l,{persistent:o.dialog.persistent||!1,onClose:t[3]||(t[3]=function(e){return o.dialog.successful=0}),open:""},{title:e.withCtx((function(){return[o.iconType?e.createVNode(r,{key:0,icon:o.iconType},null,8,["icon"]):e.createCommentVNode("v-if",!0),e.createTextVNode(" "+e.toDisplayString(o.dialog.title),1)]})),controls:e.withCtx((function(){return[o.dialog.canCancel?e.createVNode(n,{key:0,onClick:t[1]||(t[1]=function(e){return o.dialog.successful=0})},{default:e.withCtx((function(){return[e.createTextVNode(e.toDisplayString(o.dialog.cancelText||"Cancel"),1)]})),_:1}):e.createCommentVNode("v-if",!0),e.createVNode(n,{onClick:t[2]||(t[2]=function(e){return o.dialog.successful=1}),primary:""},{default:e.withCtx((function(){return[e.createTextVNode(e.toDisplayString(o.dialog.confirmText||"Ok"),1)]})),_:1})]})),default:e.withCtx((function(){return[e.createVNode("div",null,e.toDisplayString(o.dialog.message),1)]})),_:1},8,["persistent"])])):e.createCommentVNode("v-if",!0)])},D.__file="src/components/App/components/ComposableDialogs.vue";var E={components:{ComposableDialogs:D}},O={class:"kro-app"},q={class:"kro-app__content"},R=e.createVNode("div",{id:"kro-portal"},null,-1);E.render=function(o,t){var r=e.resolveComponent("composable-dialogs");return e.openBlock(),e.createBlock("div",O,[e.createVNode("div",q,[e.renderSlot(o.$slots,"default")]),R,e.createVNode(r)])},E.__file="src/components/App/App.vue";var Z={props:{disabled:Boolean,dense:Boolean}},P={class:"kro-list"};Z.render=function(o,t){return e.openBlock(),e.createBlock("div",P,[e.renderSlot(o.$slots,"default")])},Z.__file="src/components/List/List.vue";var F={props:{tag:{type:String,default:"div"}},setup:function(e){return{}}},G={key:0,class:"kro-list-item__icon"},j={class:"kro-list-item__content"},U={class:"kro-list-item__title"},Y={key:0,class:"kro-list-item__subtitle"},W={key:0,class:"kro-list-item__action"};F.render=function(o,t){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{class:"kro-list-item"},{default:e.withCtx((function(){return[o.$slots.icon?(e.openBlock(),e.createBlock("div",G,[e.renderSlot(o.$slots,"icon")])):e.createCommentVNode("v-if",!0),e.createVNode("div",j,[e.createVNode("span",U,[e.renderSlot(o.$slots,"default")]),o.$slots.subtitle?(e.openBlock(),e.createBlock("span",Y,[e.renderSlot(o.$slots,"subtitle")])):e.createCommentVNode("v-if",!0)]),o.$slots.action?(e.openBlock(),e.createBlock("div",W,[e.renderSlot(o.$slots,"action")])):e.createCommentVNode("v-if",!0)]})),_:1})},F.__file="src/components/List/ListItem.vue";var X={props:{offsetX:Boolean,offsetY:Boolean,left:Boolean,right:Boolean,top:Boolean,bottom:Boolean},setup:function(o){var t=e.ref(!1),r=e.ref(null),n=e.ref(null),l=function(){if(t.value=!0,n.value&&r.value){o.left||o.right;var e=o.bottom?-1:o.top?1:0,l=o.offsetX,a=o.offsetY,i=window.innerWidth,c=window.innerHeight,s=r.value.getBoundingClientRect(),u=s.top,d=(s.right,s.bottom,s.left),p=r.value,f=p.clientHeight,v=p.clientWidth,k=n.value,m=k.clientHeight,g=k.clientWidth,_=a?f:0,y=m+u+_<c,V=m<u,B=g<d,h=g+d+(l?v:0)<i;-1===e&&(y?n.value.style.setProperty("--kro-menu-offset-y",_+"px"):e=1),1===e&&(V?n.value.style.setProperty("--kro-menu-offset-y","-"+(_+m)+"px"):e=0),console.log(m+_),console.log("Can Fit Bottom",y),console.log("Can Fit Top",V),console.log("Can Fit Left",B),console.log("Can Fit Right",h)}},a=function(){t.value=!1};return{isOpen:t,open:l,close:a,toggle:function(){t.value?a():l()},menu:n,container:r}}},z={ref:"container",class:"kro-menu"},J={ref:"menu",class:"kro-menu__content"};X.render=function(o,t){return e.openBlock(),e.createBlock("div",z,[e.renderSlot(o.$slots,"activator",{open:o.open}),e.createVNode("div",J,[e.renderSlot(o.$slots,"default")],512)],512)},X.__file="src/components/Menu/Menu.vue";var Q={props:{src:String}},ee={class:"kro-avatar"};Q.render=function(o,t){return e.openBlock(),e.createBlock("div",ee,[e.createVNode("img",{src:o.src,alt:""},null,8,["src"])])},Q.__file="src/components/Avatar/Avatar.vue";var oe={props:{stream:Boolean,indeterminate:Boolean,active:Boolean,rounded:{type:Boolean,default:!1},value:{type:Number,default:0},bufferValue:{type:Number,default:100}},setup:function(){return{}}},te=e.createVNode("div",{class:"kro-progress-bar__stream"},[e.createVNode("div",{class:"kro-progress-bar__stream-content"})],-1),re=e.createVNode("div",{class:"kro-progress-bar__indeterminate"},null,-1);oe.render=function(o,t){return e.openBlock(),e.createBlock("div",{class:{"kro-progress-bar":!0,"kro-progress-bar--is-active":o.active,"kro-progress-bar--is-stream":o.stream,"kro-progress-bar--is-indeterminate":o.indeterminate,"kro-progress-bar--rounded":o.rounded}},[te,e.createVNode("div",{class:"kro-progress-bar__buffer",style:{"--kro-progress-bar-buffer-value":o.bufferValue}},null,4),e.createVNode("div",{class:"kro-progress-bar__progress",style:{"--kro-progress-bar-value":o.value}},null,4),re],2)},oe.__file="src/components/ProgressBar/ProgressBar.vue";var ne={components:{KroToolbar:V},props:{fixed:Boolean}},le={class:"kro-layout__container"},ae={class:"kro-layout__content"},ie={key:0,class:"kro-layout__footer"};ne.render=function(o,t){return e.openBlock(),e.createBlock("div",{class:{"kro-layout":!0,"kro-layout--has-navigation":!!o.$slots.navigation,"kro-layout--has-toolbar":!!o.$slots.toolbar,"kro-toolbar--has-content":!!o.$slots.content,"kro-toolbar--has-footer":!!o.$slots.footer}},[o.$slots.navigation?(e.openBlock(),e.createBlock("div",{key:0,class:{"kro-layout__navigation":!0,fixed:o.fixed}},[e.renderSlot(o.$slots,"navigation")],2)):e.createCommentVNode("v-if",!0),o.$slots.toolbar?(e.openBlock(),e.createBlock("div",{key:0,class:{"kro-layout__toolbar":!0,fixed:o.fixed}},[e.renderSlot(o.$slots,"toolbar")],2)):e.createCommentVNode("v-if",!0),e.createVNode("div",le,[e.createVNode("div",ae,[e.renderSlot(o.$slots,"default")]),o.$slots.footer?(e.openBlock(),e.createBlock("div",ie,[e.renderSlot(o.$slots,"footer")])):e.createCommentVNode("v-if",!0)])],2)},ne.__file="src/components/Layout/Layout.vue";var ce={props:{value:{type:Boolean,default:!1},temporary:{type:Boolean,default:!1}},setup:function(e,o){var t=o.emit;return{open:function(){return t("update:modelValue",!0)},close:function(){return t("update:modelValue",!1)}}}},se={class:"kro-navigation"};ce.render=function(o,t){return e.openBlock(),e.createBlock("div",se,[e.createVNode("div",{class:{"kro-navigation__scrim":!0,"kro-navigation--is-open":o.$attrs.modelValue,"kro-navigation--is-temporary":o.temporary},onClick:t[1]||(t[1]=function(e){return o.close(e)})},null,2),e.createVNode("div",{class:{"kro-navigation__content":!0,"kro-navigation--is-open":o.$attrs.modelValue,"kro-navigation--is-temporary":o.temporary}},[e.renderSlot(o.$slots,"default",{close:o.close,open:o.open})],2)])},ce.__file="src/components/Navigation/Navigation.vue";var ue={props:{value:{type:String,default:""},label:{type:String},required:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},autofocus:{type:Boolean},name:{type:String},id:{type:String}},setup:function(o,t){var r=t.attrs,n=e.ref(!1),l=e.ref(null);return e.onMounted((function(){l.value&&Array.from(l.value.options).forEach((function(e){null===r.modelValue?"KRO_EMPTY"===e.value&&(e.selected=!0):e.value===r.modelValue&&(e.selected=!0)}))})),{focused:n,select:l}}},de={class:"kro-select"},pe=e.createVNode("option",{selected:"",disabled:"",hidden:"",value:"KRO_EMPTY"},null,-1);ue.render=function(o,t){var r=e.resolveComponent("kro-icon");return e.openBlock(),e.createBlock("div",de,[e.createVNode("div",{class:{"kro-select__container":!0,"kro-select--focused":o.focused,"kro-select--has-text":o.$attrs.modelValue}},[e.createVNode("label",{class:{"kro-select__label":!0,"kro-select--focused":o.focused,"kro-select--has-text":o.$attrs.modelValue},for:o.id},e.toDisplayString(o.label),11,["for"]),e.createVNode("span",{class:{"kro-select__pseudo-label":!0,"kro-select--focused":o.focused,"kro-select--has-text":o.$attrs.modelValue}},e.toDisplayString(o.label),3),e.createVNode("select",{class:"kro-select__input",ref:"select",disabled:o.disabled,required:o.required,readonly:o.readonly,autofocus:o.autofocus,name:o.name,id:o.id,value:o.$attrs.modelValue,onChange:t[1]||(t[1]=function(e){return o.$emit("update:modelValue",e.target.value)}),onFocus:t[2]||(t[2]=function(e){return o.focused=!0}),onBlur:t[3]||(t[3]=function(e){return o.focused=!1})},[pe,e.renderSlot(o.$slots,"default")],40,["disabled","required","readonly","autofocus","name","id","value"]),e.createVNode(r,{class:"kro-select__icon",icon:"chevron-down"})],2)])},ue.__file="src/components/Select/Select.vue";var fe={LIGHT:"light",DARK:"dark",UNSET:"unset"},ve=function(e){document.documentElement.className="kro-theme__nord-"+e},ke=function(){var e=function(){return localStorage.getItem("kro.theme.mode")?localStorage.getItem("kro.theme.mode")||fe.UNSET:"matchMedia"in window?window.matchMedia("(prefers-color-scheme: light)").matches?fe.LIGHT:fe.DARK:fe.LIGHT},o=function(e){e===fe.UNSET?localStorage.removeItem("kro.theme.mode"):(localStorage.setItem("kro.theme.mode",e),ve(e))};return{setTheme:function(e){},setThemeMode:o,toggleThemeMode:function(){e()===fe.LIGHT?o(fe.DARK):o(fe.LIGHT)},getActiveThemeMode:e,getThemeMode:function(){return localStorage.getItem("kro.theme.mode")||fe.UNSET}}},me={explore:"M14.19,14.19L6,18L9.81,9.81L18,6M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,10.9A1.1,1.1 0 0,0 10.9,12A1.1,1.1 0 0,0 12,13.1A1.1,1.1 0 0,0 13.1,12A1.1,1.1 0 0,0 12,10.9Z",home:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z","arrow-right":"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z",menu:"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z",settings:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z",external:"M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z",search:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z",success:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",error:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z",warning:"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",info:"M10 3H14V14H10V3M10 21V17H14V21H10Z",close:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",invert:"M12,19.58V19.58C10.4,19.58 8.89,18.96 7.76,17.83C6.62,16.69 6,15.19 6,13.58C6,12 6.62,10.47 7.76,9.34L12,5.1M17.66,7.93L12,2.27V2.27L6.34,7.93C3.22,11.05 3.22,16.12 6.34,19.24C7.9,20.8 9.95,21.58 12,21.58C14.05,21.58 16.1,20.8 17.66,19.24C20.78,16.12 20.78,11.05 17.66,7.93Z","chevron-down":"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},ge=function(e){return{install:function(t,r){var n,l=B({},me);if(r.icons&&(l=B(B({},l),r.icons)),e)for(var a in e){var i=e[a];i&&t.component(a,i)}t.provide(o,l),n=ke().getActiveThemeMode,ve(n())}}}(Object.freeze({__proto__:null,KroButton:c,KroButtonGroup:u,KroIcon:r,KroSpinner:l,KroSquircle:a,KroSwitch:p,KroTextfield:_,KroToolbar:V,KroDialog:S,KroSurface:C,KroDivider:$,KroAlert:A,KroApp:E,KroList:Z,KroListItem:F,KroMenu:X,KroAvatar:Q,KroProgressBar:oe,KroLayout:ne,KroNavigation:ce,KroSelect:ue}));exports.KroAlert=A,exports.KroApp=E,exports.KroAvatar=Q,exports.KroButton=c,exports.KroButtonGroup=u,exports.KroDialog=S,exports.KroDivider=$,exports.KroIcon=r,exports.KroLayout=ne,exports.KroList=Z,exports.KroListItem=F,exports.KroMenu=X,exports.KroNavigation=ce,exports.KroProgressBar=oe,exports.KroSelect=ue,exports.KroSpinner=l,exports.KroSquircle=a,exports.KroSurface=C,exports.KroSwitch=p,exports.KroTextfield=_,exports.KroToolbar=V,exports.ThemeMode=fe,exports.default=ge,exports.useDialog=function(){var o=function(o){return new Promise((function(t,r){H.value=B(B({},o),{successful:-1});var n=e.watchEffect((function(){1===H.value.successful?(H.value=null,n(),t()):0===H.value.successful&&(H.value=null,n(),r())}))}))};return{createDialog:o,createAlert:function(e){return h(void 0,void 0,void 0,(function(){return b(this,(function(t){return[2,o(B(B({canCancel:!0},e),{type:exports.DialogType.ALERT}))]}))}))},createConfirmation:function(e){return h(void 0,void 0,void 0,(function(){return b(this,(function(t){return[2,o(B(B({canCancel:!0},e),{type:exports.DialogType.CONFIRMATION}))]}))}))}}},exports.useIcons=t,exports.useTheme=ke; | ||
var B=function(){return(B=Object.assign||function(e){for(var o,t=1,r=arguments.length;t<r;t++)for(var n in o=arguments[t])Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);return e}).apply(this,arguments)};function h(e,o,t,r){return new(t||(t=Promise))((function(n,l){function a(e){try{c(r.next(e))}catch(e){l(e)}}function i(e){try{c(r.throw(e))}catch(e){l(e)}}function c(e){var o;e.done?n(e.value):(o=e.value,o instanceof t?o:new t((function(e){e(o)}))).then(a,i)}c((r=r.apply(e,o||[])).next())}))}function b(e,o){var t,r,n,l,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return l={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(l){return function(i){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(n=2&l[0]?r.return:l[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,l[1])).done)return n;switch(r=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){a.label=l[1];break}if(6===l[0]&&a.label<n[1]){a.label=n[1],n=l;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(l);break}n[2]&&a.ops.pop(),a.trys.pop();continue}l=o.call(e,a)}catch(e){l=[6,e],r=0}finally{t=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,i])}}}var C={props:{padded:{type:Boolean,default:!0},raised:{type:Boolean,default:!0},outline:{type:Boolean,default:!1},icon:String,label:String}},N={key:0,class:"kro-surface__label-container"},x={key:0,class:"kro-surface__label"};C.render=function(o,t){var r=e.resolveComponent("kro-icon");return e.openBlock(),e.createBlock("div",{class:{"kro-surface":!0,"kro-surface--padded":o.padded,"kro-surface--raised":o.raised,"kro-surface--outline":o.outline}},[o.icon||o.label?(e.openBlock(),e.createBlock("div",N,[o.icon?e.createVNode(r,{key:0,class:"kro-surface__icon",icon:o.icon},null,8,["icon"]):e.createCommentVNode("v-if",!0),o.label?(e.openBlock(),e.createBlock("div",x,e.toDisplayString(o.label),1)):e.createCommentVNode("v-if",!0)])):e.createCommentVNode("v-if",!0),e.renderSlot(o.$slots,"default")],2)},C.__file="src/components/Surface/Surface.vue";var S={components:{KroSurface:C},props:{open:Boolean,persistent:Boolean},setup:function(o,t){var r=this,n=t.emit,l=e.ref(!1),a=e.ref(!1),i=function(e){"keydown"===(null==e?void 0:e.type)?"Escape"===e.key&&(o.persistent||(l.value=!1,window.removeEventListener("keydown",i),document.documentElement.classList.remove("kro-helper--prevent-scroll"))):(document.documentElement.classList.remove("kro-helper--prevent-scroll"),l.value=!1)},c=function(){l.value=!0,a.value=!0,window.addEventListener("keydown",i),document.documentElement.classList.add("kro-helper--prevent-scroll"),n("open")};return e.onMounted((function(){return h(r,void 0,void 0,(function(){return b(this,(function(e){return o.open&&window.setTimeout((function(){return c()}),0),[2]}))}))})),e.onUnmounted((function(){window.removeEventListener("keydown",i)})),{isOpen:l,shouldMountContent:a,open:c,close:i,toggle:function(){l?i(null):c()},onTransitionEnded:function(e){"transform"===e.propertyName&&(l.value||(a.value=!1,n("close")))}}}},L={key:0,class:"kro-dialog__title"},w={key:0,class:"kro-dialog__controls"};S.render=function(o,t){var r=e.resolveComponent("kro-surface");return e.openBlock(),e.createBlock("div",null,[e.renderSlot(o.$slots,"activator",{open:o.open,close:o.close,toggle:o.toggle}),e.createVNode(e.Teleport,{to:"#kro-portal"},[e.createVNode("div",{tabindex:o.isOpen?1:-1,class:{"kro-dialog":!0,"kro-dialog--is-open":o.isOpen}},[e.createVNode("div",{onClick:t[1]||(t[1]=function(){o.persistent||o.close()}),class:"kro-dialog__scrim"}),e.createVNode(r,{raised:"",class:"kro-dialog__content",onTransitionend:t[2]||(t[2]=function(e){return o.onTransitionEnded(e)})},{default:e.withCtx((function(){return[o.shouldMountContent?(e.openBlock(),e.createBlock(e.Fragment,{key:0},[o.$slots.title?(e.openBlock(),e.createBlock("div",L,[e.renderSlot(o.$slots,"title",{open:o.open,close:o.close,toggle:o.toggle})])):e.createCommentVNode("v-if",!0),e.renderSlot(o.$slots,"default",{open:o.open,close:o.close,toggle:o.toggle}),o.$slots.controls?(e.openBlock(),e.createBlock("div",w,[e.renderSlot(o.$slots,"controls",{open:o.open,close:o.close,toggle:o.toggle})])):e.createCommentVNode("v-if",!0)],64)):e.createCommentVNode("v-if",!0)]})),_:1})],10,["tabindex"])])])},S.__file="src/components/Dialog/Dialog.vue";var $={props:{vertical:Boolean,inset:Boolean}};$.render=function(o,t){return e.openBlock(),e.createBlock("hr",{class:{"kro-divider":!0,"kro-divider--vertical":o.vertical,"kro-divider--inset":o.inset}},null,2)},$.__file="src/components/Divider/Divider.vue";var T,A={components:{KroIcon:r,KroButton:c},props:{type:{type:String,default:"info"},dismissible:Boolean,icon:String,tag:{type:String,default:"div"}},setup:function(o){var t=e.ref(!1);return{iconName:e.computed((function(){var e=o.type,t=o.icon;return t||("warning"===e?"warning":"info"===e?"info":"error"===e?"error":"success"===e?"success":null)})),isHidden:t,hide:function(){t.value=!0},show:function(){t.value=!1}}}},K={class:"kro-alert__icon"},M={key:0};A.render=function(o,t){var r=e.resolveComponent("kro-icon"),n=e.resolveComponent("kro-button");return e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(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--has-icon":o.iconName,"kro-alert--is-dismissible":o.dismissible}},{default:e.withCtx((function(){return[e.createVNode("div",K,[o.iconName?e.createVNode(r,{key:0,icon:o.iconName},null,8,["icon"]):e.createCommentVNode("v-if",!0)]),e.createVNode("div",null,[e.renderSlot(o.$slots,"default")]),o.dismissible?(e.openBlock(),e.createBlock("div",M,[e.createVNode(n,{onClick:t[1]||(t[1]=function(e){return o.hide(e)}),icon:"close"})])):e.createCommentVNode("v-if",!0)]})),_:1},8,["class"])),[[e.vShow,!o.isHidden]])},A.__file="src/components/Alert/Alert.vue",(T=exports.DialogType||(exports.DialogType={}))[T.ALERT=0]="ALERT",T[T.CONFIRMATION=1]="CONFIRMATION";var H=e.ref(),D={setup:function(){var o=e.computed((function(){if(H.value){if(H.value.type===exports.DialogType.ALERT)return"error";if(H.value.type===exports.DialogType.CONFIRMATION)return"warning"}return null}));return{dialog:H,iconType:o}}},I={key:0};D.render=function(o,t){var r=e.resolveComponent("kro-icon"),n=e.resolveComponent("kro-button"),l=e.resolveComponent("kro-dialog");return e.openBlock(),e.createBlock("div",null,[o.dialog?(e.openBlock(),e.createBlock("div",I,[e.createVNode(l,{persistent:o.dialog.persistent||!1,onClose:t[3]||(t[3]=function(e){return o.dialog.successful=0}),open:""},{title:e.withCtx((function(){return[o.iconType?e.createVNode(r,{key:0,icon:o.iconType},null,8,["icon"]):e.createCommentVNode("v-if",!0),e.createTextVNode(" "+e.toDisplayString(o.dialog.title),1)]})),controls:e.withCtx((function(){return[o.dialog.canCancel?e.createVNode(n,{key:0,onClick:t[1]||(t[1]=function(e){return o.dialog.successful=0})},{default:e.withCtx((function(){return[e.createTextVNode(e.toDisplayString(o.dialog.cancelText||"Cancel"),1)]})),_:1}):e.createCommentVNode("v-if",!0),e.createVNode(n,{onClick:t[2]||(t[2]=function(e){return o.dialog.successful=1}),primary:""},{default:e.withCtx((function(){return[e.createTextVNode(e.toDisplayString(o.dialog.confirmText||"Ok"),1)]})),_:1})]})),default:e.withCtx((function(){return[e.createVNode("div",null,e.toDisplayString(o.dialog.message),1)]})),_:1},8,["persistent"])])):e.createCommentVNode("v-if",!0)])},D.__file="src/components/App/components/ComposableDialogs.vue";var E={components:{ComposableDialogs:D}},O={class:"kro-app"},q={class:"kro-app__content"},R=e.createVNode("div",{id:"kro-portal"},null,-1);E.render=function(o,t){var r=e.resolveComponent("composable-dialogs");return e.openBlock(),e.createBlock("div",O,[e.createVNode("div",q,[e.renderSlot(o.$slots,"default")]),R,e.createVNode(r)])},E.__file="src/components/App/App.vue";var Z={props:{disabled:Boolean,dense:Boolean}},P={class:"kro-list"};Z.render=function(o,t){return e.openBlock(),e.createBlock("div",P,[e.renderSlot(o.$slots,"default")])},Z.__file="src/components/List/List.vue";var F={props:{tag:{type:String,default:"div"}},setup:function(e){return{}}},G={key:0,class:"kro-list-item__icon"},j={class:"kro-list-item__content"},U={class:"kro-list-item__title"},Y={key:0,class:"kro-list-item__subtitle"},W={key:0,class:"kro-list-item__action"};F.render=function(o,t){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{class:"kro-list-item"},{default:e.withCtx((function(){return[o.$slots.icon?(e.openBlock(),e.createBlock("div",G,[e.renderSlot(o.$slots,"icon")])):e.createCommentVNode("v-if",!0),e.createVNode("div",j,[e.createVNode("span",U,[e.renderSlot(o.$slots,"default")]),o.$slots.subtitle?(e.openBlock(),e.createBlock("span",Y,[e.renderSlot(o.$slots,"subtitle")])):e.createCommentVNode("v-if",!0)]),o.$slots.action?(e.openBlock(),e.createBlock("div",W,[e.renderSlot(o.$slots,"action")])):e.createCommentVNode("v-if",!0)]})),_:1})},F.__file="src/components/List/ListItem.vue";var X={props:{offsetX:Boolean,offsetY:Boolean,left:Boolean,right:Boolean,top:Boolean,bottom:Boolean},setup:function(o){var t=e.ref(!1),r=e.ref(null),n=e.ref(null),l=function(){if(t.value=!0,n.value&&r.value){o.left||o.right;var e=o.bottom?-1:o.top?1:0,l=o.offsetX,a=o.offsetY,i=window.innerWidth,c=window.innerHeight,s=r.value.getBoundingClientRect(),u=s.top,d=(s.right,s.bottom,s.left),p=r.value,f=p.clientHeight,v=p.clientWidth,m=n.value,k=m.clientHeight,g=m.clientWidth,_=a?f:0,y=k+u+_<c,V=k<u,B=g<d,h=g+d+(l?v:0)<i;-1===e&&(y?n.value.style.setProperty("--kro-menu-offset-y",_+"px"):e=1),1===e&&(V?n.value.style.setProperty("--kro-menu-offset-y","-"+(_+k)+"px"):e=0),console.log(k+_),console.log("Can Fit Bottom",y),console.log("Can Fit Top",V),console.log("Can Fit Left",B),console.log("Can Fit Right",h)}},a=function(){t.value=!1};return{isOpen:t,open:l,close:a,toggle:function(){t.value?a():l()},menu:n,container:r}}},z={ref:"container",class:"kro-menu"},J={ref:"menu",class:"kro-menu__content"};X.render=function(o,t){return e.openBlock(),e.createBlock("div",z,[e.renderSlot(o.$slots,"activator",{open:o.open}),e.createVNode("div",J,[e.renderSlot(o.$slots,"default")],512)],512)},X.__file="src/components/Menu/Menu.vue";var Q={props:{src:String}},ee={class:"kro-avatar"};Q.render=function(o,t){return e.openBlock(),e.createBlock("div",ee,[e.createVNode("img",{src:o.src,alt:""},null,8,["src"])])},Q.__file="src/components/Avatar/Avatar.vue";var oe={props:{stream:Boolean,indeterminate:Boolean,active:Boolean,rounded:{type:Boolean,default:!1},value:{type:Number,default:0},bufferValue:{type:Number,default:100}},setup:function(){return{}}},te=e.createVNode("div",{class:"kro-progress-bar__stream"},[e.createVNode("div",{class:"kro-progress-bar__stream-content"})],-1),re=e.createVNode("div",{class:"kro-progress-bar__indeterminate"},null,-1);oe.render=function(o,t){return e.openBlock(),e.createBlock("div",{class:{"kro-progress-bar":!0,"kro-progress-bar--is-active":o.active,"kro-progress-bar--is-stream":o.stream,"kro-progress-bar--is-indeterminate":o.indeterminate,"kro-progress-bar--rounded":o.rounded}},[te,e.createVNode("div",{class:"kro-progress-bar__buffer",style:{"--kro-progress-bar-buffer-value":o.bufferValue}},null,4),e.createVNode("div",{class:"kro-progress-bar__progress",style:{"--kro-progress-bar-value":o.value}},null,4),re],2)},oe.__file="src/components/ProgressBar/ProgressBar.vue";var ne={components:{KroToolbar:V},props:{fixed:Boolean}},le={class:"kro-layout__container"},ae={class:"kro-layout__content"},ie={key:0,class:"kro-layout__footer"};ne.render=function(o,t){return e.openBlock(),e.createBlock("div",{class:{"kro-layout":!0,"kro-layout--has-navigation":!!o.$slots.navigation,"kro-layout--has-toolbar":!!o.$slots.toolbar,"kro-toolbar--has-content":!!o.$slots.content,"kro-toolbar--has-footer":!!o.$slots.footer}},[o.$slots.navigation?(e.openBlock(),e.createBlock("div",{key:0,class:{"kro-layout__navigation":!0,fixed:o.fixed}},[e.renderSlot(o.$slots,"navigation")],2)):e.createCommentVNode("v-if",!0),o.$slots.toolbar?(e.openBlock(),e.createBlock("div",{key:0,class:{"kro-layout__toolbar":!0,fixed:o.fixed}},[e.renderSlot(o.$slots,"toolbar")],2)):e.createCommentVNode("v-if",!0),e.createVNode("div",le,[e.createVNode("div",ae,[e.renderSlot(o.$slots,"default")]),o.$slots.footer?(e.openBlock(),e.createBlock("div",ie,[e.renderSlot(o.$slots,"footer")])):e.createCommentVNode("v-if",!0)])],2)},ne.__file="src/components/Layout/Layout.vue";var ce={props:{value:{type:Boolean,default:!1},temporary:{type:Boolean,default:!1}},setup:function(e,o){var t=o.emit;return{open:function(){return t("update:modelValue",!0)},close:function(){return t("update:modelValue",!1)}}}},se={class:"kro-navigation"};ce.render=function(o,t){return e.openBlock(),e.createBlock("div",se,[e.createVNode("div",{class:{"kro-navigation__scrim":!0,"kro-navigation--is-open":o.$attrs.modelValue,"kro-navigation--is-temporary":o.temporary},onClick:t[1]||(t[1]=function(e){return o.close(e)})},null,2),e.createVNode("div",{class:{"kro-navigation__content":!0,"kro-navigation--is-open":o.$attrs.modelValue,"kro-navigation--is-temporary":o.temporary}},[e.renderSlot(o.$slots,"default",{close:o.close,open:o.open})],2)])},ce.__file="src/components/Navigation/Navigation.vue";var ue={props:{value:{type:String,default:""},label:{type:String},required:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},autofocus:{type:Boolean},name:{type:String},id:{type:String}},setup:function(o,t){var r=t.attrs,n=e.ref(!1),l=e.ref(null);return e.onMounted((function(){l.value&&Array.from(l.value.options).forEach((function(e){null===r.modelValue?"KRO_EMPTY"===e.value&&(e.selected=!0):e.value===r.modelValue&&(e.selected=!0)}))})),{focused:n,select:l}}},de={class:"kro-select"},pe=e.createVNode("option",{selected:"",disabled:"",hidden:"",value:"KRO_EMPTY"},null,-1);ue.render=function(o,t){var r=e.resolveComponent("kro-icon");return e.openBlock(),e.createBlock("div",de,[e.createVNode("div",{class:{"kro-select__container":!0,"kro-select--focused":o.focused,"kro-select--has-text":o.$attrs.modelValue}},[e.createVNode("label",{class:{"kro-select__label":!0,"kro-select--focused":o.focused,"kro-select--has-text":o.$attrs.modelValue},for:o.id},e.toDisplayString(o.label),11,["for"]),e.createVNode("span",{class:{"kro-select__pseudo-label":!0,"kro-select--focused":o.focused,"kro-select--has-text":o.$attrs.modelValue}},e.toDisplayString(o.label),3),e.createVNode("select",{class:"kro-select__input",ref:"select",disabled:o.disabled,required:o.required,readonly:o.readonly,autofocus:o.autofocus,name:o.name,id:o.id,value:o.$attrs.modelValue,onChange:t[1]||(t[1]=function(e){return o.$emit("update:modelValue",e.target.value)}),onFocus:t[2]||(t[2]=function(e){return o.focused=!0}),onBlur:t[3]||(t[3]=function(e){return o.focused=!1})},[pe,e.renderSlot(o.$slots,"default")],40,["disabled","required","readonly","autofocus","name","id","value"]),e.createVNode(r,{class:"kro-select__icon",icon:"chevron-down"})],2)])},ue.__file="src/components/Select/Select.vue";var fe={LIGHT:"light",DARK:"dark",UNSET:"unset"},ve=function(e){document.documentElement.className="kro-theme__nord-"+e},me=function(){var e=function(){return localStorage.getItem("kro.theme.mode")?localStorage.getItem("kro.theme.mode")||fe.UNSET:"matchMedia"in window?window.matchMedia("(prefers-color-scheme: light)").matches?fe.LIGHT:fe.DARK:fe.LIGHT},o=function(e){e===fe.UNSET?localStorage.removeItem("kro.theme.mode"):(localStorage.setItem("kro.theme.mode",e),ve(e))};return{setTheme:function(e){},setThemeMode:o,toggleThemeMode:function(){e()===fe.LIGHT?o(fe.DARK):o(fe.LIGHT)},getActiveThemeMode:e,getThemeMode:function(){return localStorage.getItem("kro.theme.mode")||fe.UNSET}}},ke={explore:"M14.19,14.19L6,18L9.81,9.81L18,6M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,10.9A1.1,1.1 0 0,0 10.9,12A1.1,1.1 0 0,0 12,13.1A1.1,1.1 0 0,0 13.1,12A1.1,1.1 0 0,0 12,10.9Z",home:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z","arrow-right":"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z",menu:"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z",settings:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z",external:"M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z",search:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z",success:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",error:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z",warning:"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",info:"M10 3H14V14H10V3M10 21V17H14V21H10Z",close:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",invert:"M12,19.58V19.58C10.4,19.58 8.89,18.96 7.76,17.83C6.62,16.69 6,15.19 6,13.58C6,12 6.62,10.47 7.76,9.34L12,5.1M17.66,7.93L12,2.27V2.27L6.34,7.93C3.22,11.05 3.22,16.12 6.34,19.24C7.9,20.8 9.95,21.58 12,21.58C14.05,21.58 16.1,20.8 17.66,19.24C20.78,16.12 20.78,11.05 17.66,7.93Z","chevron-down":"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},ge=function(e){return{install:function(t,r){var n,l=B({},ke);if(r.icons&&(l=B(B({},l),r.icons)),e)for(var a in e){var i=e[a];i&&t.component(a,i)}t.provide(o,l),n=me().getActiveThemeMode,ve(n())}}}(Object.freeze({__proto__:null,KroButton:c,KroButtonGroup:u,KroIcon:r,KroSpinner:l,KroSquircle:a,KroSwitch:p,KroTextfield:_,KroToolbar:V,KroDialog:S,KroSurface:C,KroDivider:$,KroAlert:A,KroApp:E,KroList:Z,KroListItem:F,KroMenu:X,KroAvatar:Q,KroProgressBar:oe,KroLayout:ne,KroNavigation:ce,KroSelect:ue}));exports.KroAlert=A,exports.KroApp=E,exports.KroAvatar=Q,exports.KroButton=c,exports.KroButtonGroup=u,exports.KroDialog=S,exports.KroDivider=$,exports.KroIcon=r,exports.KroLayout=ne,exports.KroList=Z,exports.KroListItem=F,exports.KroMenu=X,exports.KroNavigation=ce,exports.KroProgressBar=oe,exports.KroSelect=ue,exports.KroSpinner=l,exports.KroSquircle=a,exports.KroSurface=C,exports.KroSwitch=p,exports.KroTextfield=_,exports.KroToolbar=V,exports.ThemeMode=fe,exports.default=ge,exports.useDialog=function(){var o=function(o){return new Promise((function(t,r){H.value=B(B({},o),{successful:-1});var n=e.watchEffect((function(){1===H.value.successful?(H.value=null,n(),t()):0===H.value.successful&&(H.value=null,n(),r())}))}))};return{createDialog:o,createAlert:function(e){return h(void 0,void 0,void 0,(function(){return b(this,(function(t){return[2,o(B(B({canCancel:!0},e),{type:exports.DialogType.ALERT}))]}))}))},createConfirmation:function(e){return h(void 0,void 0,void 0,(function(){return b(this,(function(t){return[2,o(B(B({canCancel:!0},e),{type:exports.DialogType.CONFIRMATION}))]}))}))}}},exports.useIcons=t,exports.useTheme=me; | ||
//# sourceMappingURL=kro-ui.common.js.map |
{ | ||
"name": "kro-ui", | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "main": "./dist/kro-ui.common.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
222002
121
824