@vue/devtools-ui 7.7.2 → 7.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @unocss-include
|
|
2
2
|
|
|
3
|
-
"use strict";var
|
|
4
|
-
`),(c,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[e.createElementVNode("span",{class:"line",textContent:e.toDisplayString(c)},null,8,re),l[0]||(l[0]=e.createElementVNode("br",null,null,-1))],64))),128))])])],2))}}),C=e.defineComponent({__name:"Overlay",props:{dim:{type:Boolean},blur:{type:Boolean},position:{default:"fixed"}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["left-0 top-0 $ui-z-max h-full w-full $ui-fcc transition-opacity transition-duration-300 $ui-bg-base",[t.dim?"bg-opacity-50!":"bg-opacity-0!",t.blur?"backdrop-blur-sm":"",t.position]])},[e.renderSlot(t.$slots,"default")],2))}}),ne={class:"h7.5 w-full $ui-fbc"},le={class:"text-4.5"},se={class:"content transition-all transition-duration-300"},ie={class:"footer h8 w-full transition-all transition-duration-300 delay-250"},de={class:"$ui-fcc"},S=e.defineComponent({__name:"Dialog",props:{modelValue:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!0},title:{default:"Dialog"},width:{default:"32rem"},height:{default:"18rem"},closable:{type:Boolean,default:!0},mountTo:{default:"body"},dim:{type:Boolean},blur:{type:Boolean},position:{}},emits:["close","update:modelValue"],setup(a,{emit:t}){const o=a,i=t,r=m.useVModel(o,"modelValue",i,{passive:!0}),s=m.useScrollLock(()=>window.document.documentElement);e.watchEffect(()=>{r.value?s.value=!0:s.value=!1});function l(){r.value&&o.autoClose&&(r.value=!1)}m.onKeyStroke("Escape",()=>{l()});const c=e.ref(!1);return e.onMounted(()=>c.value=!0),(n,d)=>c.value||n.mountTo==="body"?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:n.mountTo},[e.createVNode(e.Transition,{"enter-from-class":"opacity-0 [&_.modal]:scale-95 [&_.content,&_.footer]:translate-y--2.5 [&_.content,&_.footer]:opacity-0","enter-to-class":"opacity-100 [&_.modal]:scale-100","leave-from-class":"opacity-100 [&_.modal]:scale-100","leave-to-class":"opacity-0 [&_.modal]:scale-95"},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(C,{key:0,dim:n.dim,blur:n.blur,position:n.position},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"modal relative grid grid-rows-[1.875rem_1fr_2.5rem] $ui-base max-h-[calc(100vh-6.25rem)] max-w-[calc(100vw-6.25rem)] min-h-6.25rem min-w-12.5rem gap-2.5 rounded-md bg-white px6 py4.5 color-gray-800 shadow-2xl transition-transform transition-duration-300 dark:bg-gray-900 dark:color-gray-200",style:e.normalizeStyle({width:o.width,height:o.height})},[e.createElementVNode("div",ne,[e.createElementVNode("div",le,[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])]),n.closable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"h6 w6 $ui-fcc cursor-pointer rounded-full transition-colors hover:bg-primary-100 dark:hover:bg-gray-700",onClick:l},d[0]||(d[0]=[e.createElementVNode("div",{class:"i-carbon-close"},null,-1)]))):e.createCommentVNode("",!0)]),e.createElementVNode("div",se,[e.renderSlot(n.$slots,"default")]),e.createElementVNode("div",ie,[e.renderSlot(n.$slots,"footer",{},()=>[e.renderSlot(n.$slots,"footer",{},()=>[e.createElementVNode("div",de,[e.createVNode(v,{type:"primary",onClick:l},{default:e.withCtx(()=>d[1]||(d[1]=[e.createTextVNode(" close ")])),_:1})])])])])],4)]),_:3},8,["dim","blur","position"])):e.createCommentVNode("",!0)]),_:3})],8,["to"])):e.createCommentVNode("",!0)}}),ce={class:"$ui-fec gap2.5"},ue=e.defineComponent({__name:"Confirm",props:{modelValue:{type:Boolean},content:{},cancelText:{default:"Cancel"},confirmText:{default:"Confirm"},width:{default:"20%"},height:{default:"9rem"},title:{default:"Warning"},loading:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!0}},emits:["update:modelValue","confirm","cancel","close"],setup(a,{emit:t}){const o=a,i=t,r=m.useVModel(o,"modelValue",i);e.watchEffect(()=>{r.value||i("close")});function s(l=!1){(o.autoClose||l)&&(r.value=!1)}return(l,c)=>(e.openBlock(),e.createBlock(S,{modelValue:e.unref(r),"onUpdate:modelValue":c[2]||(c[2]=n=>e.isRef(r)?r.value=n:null),width:l.width,height:l.height,title:l.title,closable:!1},{footer:e.withCtx(()=>[e.createElementVNode("div",ce,[e.createVNode(v,{onClick:c[0]||(c[0]=()=>{i("cancel"),s(!0)})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.cancelText),1)]),_:1}),e.createVNode(v,{loading:l.loading,type:"primary",onClick:c[1]||(c[1]=()=>{i("confirm"),s()})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.confirmText),1)]),_:1},8,["loading"])])]),default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{class:"h-auto w-auto"},()=>[e.createTextVNode(e.toDisplayString(l.content),1)])]),_:3},8,["modelValue","width","height","title"]))}}),_=e.defineComponent({__name:"Notification",props:{message:{},type:{default:"info"},classes:{},duration:{default:3e3},placement:{default:"top-center"},onClose:{}},setup(a){const t=a,o={success:"i-carbon-checkmark",info:"i-material-symbols-light-info",warning:"i-carbon-warning",error:"i-carbon-close"},i={success:"text-primary-500 border-primary-200 dark:text-primary-200 dark:border-primary-500",info:"text-blue-4 border-blue-2 dark:text-blue-2 dark:border-blue-4",warning:"text-amber-4 border-amber-2 dark:border-amber-4",error:"text-red-4 border-red-2 dark:border-red-4"},r=e.ref(!1);e.onMounted(()=>{r.value=!0,setTimeout(()=>{r.value=!1},t.duration)});const s=e.computed(()=>t.placement.startsWith("top")?"translate-y--300%":"translate-y-300%");return(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["fixed left-0 right-0 $ui-z-max-override text-center",[{"top-0":l.placement.startsWith("top")},{"bottom-0":l.placement.startsWith("bottom")}]])},[e.createVNode(e.Transition,{"enter-from-class":s.value,"leave-to-class":s.value,onAfterLeave:c[0]||(c[0]=()=>{var n;r.value||(n=l.onClose)==null||n.call(l)})},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"flex transition-all duration-300",style:e.normalizeStyle({justifyContent:l.placement.includes("right")?"right":l.placement.includes("left")?"left":"center"})},[e.createElementVNode("div",{class:e.normalizeClass(["m3 flex-inline items-center gap2 b-1 b-1 rounded px4 py1 shadow transition-all duration-300 $ui-bg-base",[l.classes,i[l.type]]])},[e.createElementVNode("div",{class:e.normalizeClass(o[l.type])},null,2),e.createElementVNode("div",null,e.toDisplayString(l.message),1)],2)],4)):e.createCommentVNode("",!0)]),_:1},8,["enter-from-class","leave-to-class"])],2))}});function pe(a){const t=document.createElement("div");t.classList.add("$ui-z-max-override","fixed"),document.body.appendChild(t);const o=a.onClose;function i(){e.render(null,t)}a.onClose=()=>{i(),o==null||o(),document.body.removeChild(t)};const r=e.h(_,a);e.render(r,t)}const T="__vue-devtools-theme__";function D(a={}){const t=m.useColorMode({...a,storageKey:T});return{colorMode:t,isDark:e.computed(()=>t.value==="dark")}}const me={class:"$ui-dark-toggle-vtr"},fe=e.defineComponent({__name:"DarkToggle",props:{isDark:{type:Boolean,default:!1},animation:{type:Boolean,default:!0},animationDuration:{default:400}},setup(a){const t=a,o=m.useVModel(t,"isDark"),{colorMode:i}=D({initialValue:o.value?"dark":"light",onChanged:c=>{o.value=c==="dark"}}),r=e.computed({get:()=>i.value==="dark",set:c=>i.value=c?"dark":"light"}),s=!!document.startViewTransition&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches;function l(c){if(!s||!c||!t.animation){r.value=!r.value;return}const n=c.clientX,d=c.clientY,p=Math.hypot(Math.max(n,innerWidth-n),Math.max(d,innerHeight-d));document.startViewTransition(async()=>{r.value=!r.value,await e.nextTick()}).ready.then(()=>{const g=[`circle(0px at ${n}px ${d}px)`,`circle(${p}px at ${n}px ${d}px)`];document.documentElement.animate({clipPath:r.value?[...g].reverse():g},{duration:t.animationDuration,easing:"ease-in",pseudoElement:r.value?"::view-transition-old(root)":"::view-transition-new(root)"})})}return(c,n)=>(e.openBlock(),e.createElementBlock("span",me,[e.renderSlot(c.$slots,"default",e.normalizeProps(e.guardReactiveProps({mode:e.unref(i),isDark:r.value,toggle:l})))]))}}),ge=e.defineComponent({__name:"Drawer",props:{modelValue:{type:Boolean},mountTo:{default:"body"},placement:{default:"right"},closeOutside:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},contentClass:{},permanent:{type:Boolean,default:!1},contentBlur:{type:Boolean,default:!1},top:{},dim:{type:Boolean},blur:{type:Boolean},position:{}},emits:["update:modelValue","close"],setup(a,{emit:t}){const o=a,i=t,{height:r}=m.useElementSize(()=>typeof o.top=="string"?document.querySelector(o.top):o.top,void 0,{box:"border-box"}),s=m.useVModel(o,"modelValue",i),l={left:{class:"left-0 h-full b-r",transition:"[&_.drawer]:translate-x--100%"},right:{class:"right-0 h-full b-l",transition:"[&_.drawer]:translate-x-full"},top:{class:"w-full b-b",transition:"[&_.drawer]:translate-y--100%"},bottom:{class:"bottom-0 w-full b-t",transition:"[&_.drawer]:translate-y-100%"}};m.onKeyStroke("Escape",()=>{o.closable&&(s.value=!1)});const c=e.computed(()=>l[o.placement]),n=e.ref(!1);return e.onMounted(()=>n.value=!0),(d,p)=>n.value||d.mountTo==="body"?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:d.mountTo},[e.createVNode(e.Transition,{"enter-from-class":`${c.value.transition}`,"leave-to-class":`${c.value.transition}`},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(C,{key:0,class:e.normalizeClass({"pointer-events-none":d.permanent}),dim:d.dim,blur:d.blur,position:d.position,onClick:p[2]||(p[2]=u=>d.closeOutside&&d.closable&&(s.value=!1))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([[c.value.class,d.contentClass??"",d.contentBlur?"$ui-glass-effect":"$ui-bg-base"],"drawer pointer-events-auto absolute min-w-25 of-auto $ui-border-base transition-transform transition-duration-300"]),style:e.normalizeStyle({top:d.placement==="bottom"?"auto":`${e.unref(r)}px`,height:["top","bottom"].includes(d.placement)?"auto":`calc(100% - ${e.unref(r)}px)`}),onClick:p[1]||(p[1]=e.withModifiers(()=>{},["stop"]))},[d.closable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"i-carbon-close absolute right-1.5 top-1.5 $ui-z-max cursor-pointer p1 text-lg $ui-text",onClick:p[0]||(p[0]=u=>s.value=!1)})):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"default")],6)]),_:3},8,["class","dim","blur","position"])):e.createCommentVNode("",!0)]),_:3},8,["enter-from-class","leave-to-class"])],8,["to"])):e.createCommentVNode("",!0)}}),ve={class:"overflow-hidden rounded-lg shadow-lg"},M=e.defineComponent({__name:"Dropdown",props:{label:{},buttonProps:{default:()=>({})},buttonClass:{default:""},trigger:{default:"click"},distance:{default:0},skidding:{},placement:{},disabled:{type:Boolean,default:!1},shown:{type:Boolean}},emits:["update:visible"],setup(a){const t=a;return e.provide("$ui-dropdown-disabled",e.computed(()=>t.disabled)),(o,i)=>(e.openBlock(),e.createBlock(e.unref(b.Dropdown),{disabled:o.disabled,class:"inline-block w-auto",shown:o.shown,triggers:[o.trigger],distance:o.distance+6,placement:o.placement,skidding:o.skidding,"onUpdate:shown":i[0]||(i[0]=r=>o.$emit("update:visible",r)),onClick:i[1]||(i[1]=r=>{r.stopPropagation()})},{popper:e.withCtx(({hide:r})=>[e.createElementVNode("div",ve,[e.renderSlot(o.$slots,"popper",e.normalizeProps(e.guardReactiveProps({hide:r})),()=>[i[2]||(i[2]=e.createElementVNode("div",{class:"p2 opacity-40"}," Empty... ",-1))])])]),default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{},()=>[e.createVNode(v,e.mergeProps({...o.buttonProps,disabled:o.disabled},{class:o.buttonClass}),e.createSlots({icon:e.withCtx(()=>[e.renderSlot(o.$slots,"button-icon")]),"icon-right":e.withCtx(()=>[e.renderSlot(o.$slots,"button-icon-right")]),_:2},[o.label?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),key:"0"}:void 0]),1040,["class"])])]),_:3},8,["disabled","shown","triggers","distance","placement","skidding"]))}}),be=e.defineComponent({__name:"DropdownButton",props:{type:{},round:{type:[String,Boolean]},loading:{type:Boolean},disabled:{type:Boolean},size:{},flat:{type:Boolean},outlined:{type:Boolean},keepOpen:{type:Boolean,default:!1}},setup(a){const t=a,o=e.inject("$ui-dropdown-disabled",void 0);return(i,r)=>e.withDirectives((e.openBlock(),e.createBlock(v,e.mergeProps({...t,round:!1},{disabled:e.unref(o),class:"w-full justify-start transition-colors not-action:bg-transparent!"}),{icon:e.withCtx(()=>[e.renderSlot(i.$slots,"icon")]),default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},16,["disabled"])),[[e.unref(b.VClosePopper)]])}}),y=e.defineComponent({__name:"Icon",props:{icon:{},inline:{type:Boolean},action:{type:Boolean,default:!1}},setup(a){return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.inline?"span":"div"),{class:e.normalizeClass(["$ui-base",[t.icon,t.action?"cursor-pointer hover:op50":""]])},null,8,["class"]))}}),he=["type","placeholder","disabled"],ye={key:3,class:"pointer-events-none absolute bottom--0.25 left-50% right-50% z-9999 h-0.75 bg-primary-500 opacity-0 transition-all duration-240 group-[&.focused]:left-0 group-[&.focused]:right-0 group-[&.focused]:opacity-100 group-[&.accent.focused]:bg-accent-500"},k="transition-colors $ui-fcc color-gray-500 dark:color-gray-300 group-[&.focused]:color-primary-500; group-[&.accent.focused]:color-accent-500",x=e.defineComponent({__name:"Input",props:{modelValue:{},placeholder:{default:""},variant:{default:"normal"},disabled:{type:Boolean,default:!1},leftIcon:{},rightIcon:{},loading:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},loadingDebounceTime:{default:0},readonly:{type:Boolean,default:!1},type:{default:"text"}},emits:["update:modelValue","updateFocused","keyTab"],setup(a,{emit:t}){const o=a,i=t,r=m.useVModel(o,"modelValue",i),s=m.refDebounced(e.computed(()=>o.loading),o.loadingDebounceTime),l=m.refWithControl(!1,{onChanged(u){i("updateFocused",u)}}),c=e.computed(()=>o.variant==="flat"||o.variant==="warning"||o.disabled||o.readonly),n=e.computed(()=>o.disabled||s.value),d=e.ref();let p=!1;return e.watchEffect(()=>{s.value&&l.value?p=!0:!s.value&&p&&(p=!1,e.nextTick(()=>{l.value=!0}))}),e.onMounted(()=>{o.autoFocus&&(l.value=!0)}),e.watchEffect(()=>{var u;l.value&&((u=d.value)==null||u.focus())}),(u,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["group relative w-50 w-auto flex items-center justify-between gap-0.5 overflow-hidden b-1 rounded-1 px3 py-0.75 color-gray-800 dark:color-gray-100",[{"border-none bg-transparent group":u.variant==="flat","cursor-not-allowed opacity-50":n.value,accent:u.variant==="accent",focused:e.unref(l)},[u.variant==="warning"?"border-warning-500 dark:border-warning-300":"border-primary-100 dark:border-gray-700"]]]),onClick:g[2]||(g[2]=()=>{l.value=!0})},[u.leftIcon?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(k)},[e.createVNode(y,{icon:u.leftIcon},null,8,["icon"])])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:d,"onUpdate:modelValue":g[0]||(g[0]=V=>e.isRef(r)?r.value=V:null),class:"$ui-base w-full bg-transparent color-inherit outline-none placeholder-color-gray-500 dark:placeholder-gray-300",type:u.type,placeholder:u.placeholder,disabled:n.value||u.readonly,onBlur:g[1]||(g[1]=V=>l.value=!1)},null,40,he),[[e.vModelDynamic,e.unref(r)]]),e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(k)},[e.createVNode(B)])):u.rightIcon?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(k)},[e.createVNode(y,{icon:u.rightIcon},null,8,["icon"])])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ye))],2))}}),ke={class:"$ui-base"},we=e.defineComponent({__name:"FormField",props:{modelValue:{},status:{default:"normal"},showMessage:{type:Boolean,default:!0},message:{default:""},placeholder:{}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,i=t,r=m.useVModel(o,"modelValue",i),s=e.ref(!1),l=e.computed(()=>o.message&&o.message.length&&o.showMessage),c={normal:"color-gray-600 dark:color-gray-400",warning:"color-warning-500 dark:color-warning-200",danger:"color-danger-500 dark:color-danger-200",success:"color-primary-700 dark:color-primary-500"},n={warning:"i-bx:bxs-error",danger:"i-ic-round-error",success:"i-ep:success-filled"};return(d,p)=>(e.openBlock(),e.createElementBlock("div",ke,[e.createVNode(x,{modelValue:e.unref(r),"onUpdate:modelValue":p[0]||(p[0]=u=>e.isRef(r)?r.value=u:null),placeholder:d.placeholder,onUpdateFocused:p[1]||(p[1]=u=>s.value=u)},null,8,["modelValue","placeholder"]),e.createElementVNode("div",{class:e.normalizeClass(["mt2 $ui-base text-3.5",[c[d.status],{"opacity-65":!s.value}]])},[d.status!=="normal"&&l.value?(e.openBlock(),e.createBlock(y,{key:0,inline:"",icon:n[d.status]},null,8,["icon"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.value?d.message:""),1)],2)]))}}),Be=["innerHTML"],Ce=e.defineComponent({__name:"IcIcon",props:{name:{}},setup(a){const t=a,o=e.computed(()=>H.icIcons[t.name]??"");return(i,r)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createElementBlock("svg",{class:"custom-svg h-1em w-1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",innerHTML:o.value},null,8,Be))]))}}),Ve={class:"m1 min-w-35 w-auto flex flex-col"},$e=["onClick"],Ee=e.defineComponent({__name:"Select",props:{modelValue:{},multiple:{default:!1},options:{},placeholder:{default:"Select..."},autoClose:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},labelRenderer:{type:Function,default:a=>String(a)},buttonProps:{default:()=>({})}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,i=t,r=e.useSlots(),s=e.computed({get:()=>o.modelValue,set:n=>i("update:modelValue",n)}),l=e.computed(()=>{const n=o.options.find(d=>d.value===s.value);return n!=null&&n.label?o.labelRenderer(n.label):o.placeholder});function c(n){o.multiple?s.value=s.value.includes(n.value)?s.value.filter(d=>d!==n.value):[...s.value,n.value]:s.value=n.value}return(n,d)=>(e.openBlock(),e.createBlock(M,e.mergeProps({label:l.value},{buttonProps:n.buttonProps,disabled:n.disabled}),e.createSlots({popper:e.withCtx(()=>[e.createElementVNode("div",Ve,[e.unref(r).item?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.options,p=>(e.openBlock(),e.createElementBlock("div",{key:p.value,class:"cursor-pointer",onClick:u=>c(p)},[e.renderSlot(n.$slots,"item",e.mergeProps({ref_for:!0},{item:p,active:n.multiple?s.value.includes(p.value):p.value===s.value,disabled:n.disabled}))],8,$e))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.options,p=>e.withDirectives((e.openBlock(),e.createBlock(v,{key:p.value,disabled:n.disabled,round:"normal",class:e.normalizeClass(["flex-[auto_1_1] not-hover:[&:not(.active)]:bg-transparent!",{active:n.multiple?s.value.includes(p.value):p.value===s.value}]),onClick:u=>c(p)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.label),1)]),_:2},1032,["disabled","class","onClick"])),[[e.unref(b.vClosePopper),n.autoClose]])),128))])]),"button-icon-right":e.withCtx(()=>[d[0]||(d[0]=e.createElementVNode("div",{class:"i-mdi-chevron-down"},null,-1))]),_:2},[e.unref(r).button?{name:"default",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"button")]),key:"0"}:void 0]),1040,["label"]))}}),Ne=e.defineComponent({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,i=t,r=m.useVModel(o,"modelValue",i),s=m.useToggle(r);return(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([[l.disabled?"cursor-not-allowed":"cursor-pointer"],"$ui-base $ui-if-sc cursor-pointer select-none gap1.25 vertical-mid text-3.5"]),role:"checkbox",onClick:c[0]||(c[0]=n=>!l.disabled&&e.unref(s)())},[e.renderSlot(l.$slots,"default"),e.createElementVNode("div",{class:e.normalizeClass([{selected:e.unref(r)},"group relative $ui-base h4 w8 rounded-2 bg-primary-100 transition-colors dark:bg-gray-700 [&.selected]:bg-primary-500!"])},[e.createElementVNode("div",{class:e.normalizeClass(["h4 w4 rounded-full bg-primary-800 transition-transform group-[&.selected]:transform-translate-x-4 dark:bg-white",[{"group-hover:opacity-75 group-active:scale-85":!l.disabled},{"opacity-65":l.disabled}]])},null,2)],2)],2))}}),Se=e.defineComponent({__name:"Tooltip",props:{trigger:{},distance:{},skidding:{},placement:{},disabled:{type:Boolean},shown:{type:Boolean}},setup(a){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(b.Tooltip),e.mergeProps({disabled:t.disabled,placement:t.placement},t.$attrs),{popper:e.withCtx(()=>[e.renderSlot(t.$slots,"popper")]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["disabled","placement"]))}});Object.defineProperty(exports,"vTooltip",{enumerable:!0,get:()=>b.vTooltip});exports.THEME_KEY=T;exports.VueBadge=A;exports.VueButton=v;exports.VueCard=Q;exports.VueCheckbox=Z;exports.VueCodeBlock=ae;exports.VueConfirm=ue;exports.VueDarkToggle=fe;exports.VueDialog=S;exports.VueDrawer=ge;exports.VueDropdown=M;exports.VueDropdownButton=be;exports.VueFormField=we;exports.VueIcIcon=Ce;exports.VueIcon=y;exports.VueInput=x;exports.VueLoadingIndicator=B;exports.VueNotification=_;exports.VueOverlay=C;exports.VueSelect=Ee;exports.VueSwitch=Ne;exports.VueTooltip=Se;exports.showVueNotification=pe;exports.useDevToolsColorMode=D;
|
|
3
|
+
"use strict";var x=Object.create;var $=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var R=(a,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of P(t))!L.call(a,r)&&r!==o&&$(a,r,{get:()=>t[r],enumerable:!(i=z(t,r))||i.enumerable});return a};var f=(a,t,o)=>(o=a!=null?x(I(a)):{},R(t||!a||!a.__esModule?$(o,"default",{value:a,enumerable:!0}):o,a));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("floating-vue");;/* empty css */;/* empty css */const e=require("vue"),m=require("@vueuse/core"),F=require("shiki/core"),H=require("shiki/engine/javascript"),j=require("./ic-icons-data-G1Zhc3L0.cjs"),w=(a,t)=>{const o=a.__vccOpts||a;for(const[i,r]of t)o[i]=r;return o},q={},O={class:"mx-0.5 $ui-base inline-block select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs"};function A(a,t){return e.openBlock(),e.createElementBlock("span",O,[e.renderSlot(a.$slots,"default")])}const W=w(q,[["render",A]]),K={},U={class:"h-3 w-3 $ui-inline-fcc"};function Y(a,t){return e.openBlock(),e.createElementBlock("div",U,t[0]||(t[0]=[e.createElementVNode("svg",{class:"animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)]))}const B=w(K,[["render",Y]]),J={key:2},v=e.defineComponent({inheritAttrs:!1,__name:"Button",props:{type:{default:"default"},round:{type:[String,Boolean],default:"normal"},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:"normal"},flat:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1}},emits:["click"],setup(a,{emit:t}){const o=a,i=t,r=e.useAttrs(),s=e.computed(()=>r.to?"router-link":r.href?"a":"button"),l=e.computed(()=>o.loading||o.disabled);function c(u){if(l.value){u.preventDefault(),u.stopPropagation(),u.stopImmediatePropagation();return}i("click",u)}const n={common:{default:"active:bg-primary-100-darker dark:active:bg-gray-800-darker",primary:"active:bg-primary-500-darker",accent:"active:bg-accent-500-darker",danger:"active:bg-danger-500-darker",warning:"active:bg-warning-500-darker",info:"active:bg-primary-100-darker dark:active:bg-gray-800-darker",success:"active:bg-primary-100-darker dark:active:bg-gray-800-darker"},normal:{default:"bg-primary-100 hover:bg-primary-100-lighter dark:bg-gray-800 dark:hover:bg-gray-800-lighter dark:hover:text-white",primary:" text-white bg-primary-500 hover:bg-primary-500-lighter dark:hover:bg-primary-500-darker",accent:"text-white bg-accent-500 hover:bg-accent-500-lighter dark:bg-accent-500-darker dark:bg-accent-300",danger:"text-white bg-danger-500 hover:bg-danger-500-lighter dark:hover:bg-danger-500-darker",warning:"text-white bg-warning-500 hover:bg-warning-500-lighter dark:hover:bg-warning-500-darker",info:"text-info-500 bg-primary-100 hover:bg-primary-100-lighter dark:bg-gray-800 dark:hover:bg-gray-800-lighter",success:"text-primary-500 bg-primary-100 hover:bg-primary-100-lighter dark:bg-gray-800 dark:hover:bg-gray-800-lighter"},flat:{default:"hover:bg-primary-100 hover:text-black !dark:text-white dark:hover:bg-primary-800",primary:"hover:bg-primary-500 hover:text-white",accent:"hover:bg-accent-500 hover:text-white",danger:"hover:bg-danger-500 hover:text-white",warning:"hover:bg-warning-500 hover:text-white",info:"hover:bg-primary-100 hover:text-info-500 dark:hover:bg-gray-800 dark:hover:text-info-400",success:"hover:bg-primary-100 hover:text-primary-500 dark:hover:bg-primary-800 dark:hover:text-primary-400"},outlined:{default:"hover:border-primary-100 hover:text-primary-300 hover:active:ring-primary-100:5 hover:active:bg-primary-100:5",primary:"hover:border-primary-500 hover:text-primary-500 active:ring-primary-500:5 active:bg-primary-500:5",accent:"hover:border-accent-500 hover:text-accent-500 active:ring-accent-500:5 active:bg-accent-500:5",danger:"hover:border-danger-500 hover:text-danger-500 active:ring-danger-500:5 active:bg-danger-500:5",warning:"hover:border-warning-500 hover:text-warning-500 active:ring-warning-500:5 active:bg-warning-500:5",info:"hover:border-info-500 hover:text-info-500 active:ring-info-500:5 active:bg-info-500:5",success:"hover:border-primary-500 hover:text-primary-500 active:ring-primary-500:5 active:bg-primary-500:5"}},d=e.useSlots(),p=e.computed(()=>o.flat?n.flat[o.type]:o.outlined?n.outlined[o.type]:n.normal[o.type]);return(u,g)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),e.mergeProps(u.$attrs,{role:"button","aria-disabled":l.value,class:["$ui-base $ui-inline-fcc inline-flex cursor-pointer select-none gap1.25 py-0 no-underline $ui-transition",[[n.common[o.type]],{"rounded-full":o.round==="full","$ui-base-br":o.round==="normal","opacity-50 cursor-not-allowed":l.value,"bg-transparent":o.flat||o.outlined},[u.outlined?"b-1 $ui-border-base active:ring-3 shadow-sm":"border-none",u.size==="mini"?"px1 text-3 h5.5":"px3.5 text-3.5 h8",p.value]]],onClickCapture:c}),{default:e.withCtx(()=>[u.loading?(e.openBlock(),e.createBlock(B,{key:0,class:"mt0.5 h-full w3"})):e.renderSlot(u.$slots,"icon",{key:1,class:"h-full w3 $ui-inline-fcc"}),e.unref(d).default?(e.openBlock(),e.createElementBlock("div",J,[e.renderSlot(u.$slots,"default")])):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"icon-right")]),_:3},16,["aria-disabled","class"]))}}),X={},G={class:"$ui-base border $ui-border-base rounded shadow-sm"};function Q(a,t){return e.openBlock(),e.createElementBlock("div",G,[e.renderSlot(a.$slots,"default")])}const Z=w(X,[["render",Q]]),ee=e.defineComponent({__name:"Checkbox",props:{modelValue:{type:Boolean},variant:{default:"normal"}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,i=t,r=m.useVModel(o,"modelValue",i);return(s,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative $ui-base h5 w5 $ui-inline-fcc cursor-pointer border-0.125rem rounded-1.25 transition-colors duration-200 ease-in-out",[e.unref(r)?s.variant==="normal"?"bg-primary-500 border-primary-200 dark:border-primary-100":"bg-accent-500 border-accent-200 dark:border-accent-100":""]]),onClick:l[0]||(l[0]=c=>r.value=!e.unref(r))},[e.createElementVNode("div",{class:e.normalizeClass([[e.unref(r)?"opacity-100":"opacity-0"],"h-60% w-35% transform-translate-y--0.25 transform-rotate-45 border-width-[0_0.125rem_0.125rem_0] border-white border-solid transition-opacity duration-200 ease-in-out"])},null,2)],2))}}),h=e.shallowRef();let E=null;function oe(a,t="text"){var i;if(!E&&!h.value){const r=H.createJavaScriptRegexEngine();E=F.createHighlighterCore({themes:[import("shiki/themes/vitesse-dark.mjs"),import("shiki/themes/vitesse-light.mjs")],langs:[import("shiki/langs/json.mjs"),import("shiki/langs/yaml.mjs"),import("shiki/langs/css.mjs"),import("shiki/langs/javascript.mjs"),import("shiki/langs/typescript.mjs"),import("shiki/langs/vue.mjs"),import("shiki/langs/vue-html.mjs"),import("shiki/langs/html.mjs"),import("shiki/langs/diff.mjs"),import("shiki/langs/shellscript.mjs")],engine:r}).then(s=>{h.value=s})}const o=(i=h.value)==null?void 0:i.getLoadedLanguages().includes(t);return o?{code:h.value.codeToHtml(a,{lang:t,themes:{dark:"vitesse-dark",light:"vitesse-light"}}),supported:!0}:{code:a,supported:o}}const te=["innerHTML"],re={class:"shiki"},ae=["textContent"],ne=e.defineComponent({__name:"CodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},transformRendered:{}},emits:["loaded"],setup(a,{emit:t}){const o=a,i=t,r=e.computed(()=>{const s=o.lang==="text"?{code:o.code,supported:!1}:oe(o.code,o.lang)||{code:o.code,supported:!1};return s.supported&&o.transformRendered&&(s.code=o.transformRendered(s.code)),s.supported&&e.nextTick(()=>i("loaded")),s});return(s,l)=>s.lang&&r.value.supported?(e.openBlock(),e.createElementBlock("pre",{key:0,class:e.normalizeClass(["code-block",s.lines?"code-block-lines":""]),innerHTML:r.value.code},null,10,te)):(e.openBlock(),e.createElementBlock("pre",{key:1,class:e.normalizeClass(["code-block",s.lines?"code-block-lines":""])},[e.createElementVNode("pre",re,[e.createElementVNode("code",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.code.split(`
|
|
4
|
+
`),(c,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[e.createElementVNode("span",{class:"line",textContent:e.toDisplayString(c)},null,8,ae),l[0]||(l[0]=e.createElementVNode("br",null,null,-1))],64))),128))])])],2))}}),C=e.defineComponent({__name:"Overlay",props:{dim:{type:Boolean},blur:{type:Boolean},position:{default:"fixed"}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["left-0 top-0 $ui-z-max h-full w-full $ui-fcc transition-opacity transition-duration-300 $ui-bg-base",[t.dim?"bg-opacity-50!":"bg-opacity-0!",t.blur?"backdrop-blur-sm":"",t.position]])},[e.renderSlot(t.$slots,"default")],2))}}),le={class:"h7.5 w-full $ui-fbc"},se={class:"text-4.5"},ie={class:"content transition-all transition-duration-300"},de={class:"footer h8 w-full transition-all transition-duration-300 delay-250"},ce={class:"$ui-fcc"},N=e.defineComponent({__name:"Dialog",props:{modelValue:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!0},title:{default:"Dialog"},width:{default:"32rem"},height:{default:"18rem"},closable:{type:Boolean,default:!0},mountTo:{default:"body"},dim:{type:Boolean},blur:{type:Boolean},position:{}},emits:["close","update:modelValue"],setup(a,{emit:t}){const o=a,i=t,r=m.useVModel(o,"modelValue",i,{passive:!0}),s=m.useScrollLock(()=>window.document.documentElement);e.watchEffect(()=>{r.value?s.value=!0:s.value=!1});function l(){r.value&&o.autoClose&&(r.value=!1)}m.onKeyStroke("Escape",()=>{l()});const c=e.ref(!1);return e.onMounted(()=>c.value=!0),(n,d)=>c.value||n.mountTo==="body"?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:n.mountTo},[e.createVNode(e.Transition,{"enter-from-class":"opacity-0 [&_.modal]:scale-95 [&_.content,&_.footer]:translate-y--2.5 [&_.content,&_.footer]:opacity-0","enter-to-class":"opacity-100 [&_.modal]:scale-100","leave-from-class":"opacity-100 [&_.modal]:scale-100","leave-to-class":"opacity-0 [&_.modal]:scale-95"},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(C,{key:0,dim:n.dim,blur:n.blur,position:n.position},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"modal relative grid grid-rows-[1.875rem_1fr_2.5rem] $ui-base max-h-[calc(100vh-6.25rem)] max-w-[calc(100vw-6.25rem)] min-h-6.25rem min-w-12.5rem gap-2.5 rounded-md bg-white px6 py4.5 color-gray-800 shadow-2xl transition-transform transition-duration-300 dark:bg-gray-900 dark:color-gray-200",style:e.normalizeStyle({width:o.width,height:o.height})},[e.createElementVNode("div",le,[e.createElementVNode("div",se,[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])]),n.closable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"h6 w6 $ui-fcc cursor-pointer rounded-full transition-colors hover:bg-primary-100 dark:hover:bg-gray-700",onClick:l},d[0]||(d[0]=[e.createElementVNode("div",{class:"i-carbon-close"},null,-1)]))):e.createCommentVNode("",!0)]),e.createElementVNode("div",ie,[e.renderSlot(n.$slots,"default")]),e.createElementVNode("div",de,[e.renderSlot(n.$slots,"footer",{},()=>[e.renderSlot(n.$slots,"footer",{},()=>[e.createElementVNode("div",ce,[e.createVNode(v,{type:"primary",onClick:l},{default:e.withCtx(()=>d[1]||(d[1]=[e.createTextVNode(" close ")])),_:1})])])])])],4)]),_:3},8,["dim","blur","position"])):e.createCommentVNode("",!0)]),_:3})],8,["to"])):e.createCommentVNode("",!0)}}),ue={class:"$ui-fec gap2.5"},pe=e.defineComponent({__name:"Confirm",props:{modelValue:{type:Boolean},content:{},cancelText:{default:"Cancel"},confirmText:{default:"Confirm"},width:{default:"20%"},height:{default:"9rem"},title:{default:"Warning"},loading:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!0}},emits:["update:modelValue","confirm","cancel","close"],setup(a,{emit:t}){const o=a,i=t,r=m.useVModel(o,"modelValue",i);e.watchEffect(()=>{r.value||i("close")});function s(l=!1){(o.autoClose||l)&&(r.value=!1)}return(l,c)=>(e.openBlock(),e.createBlock(N,{modelValue:e.unref(r),"onUpdate:modelValue":c[2]||(c[2]=n=>e.isRef(r)?r.value=n:null),width:l.width,height:l.height,title:l.title,closable:!1},{footer:e.withCtx(()=>[e.createElementVNode("div",ue,[e.createVNode(v,{onClick:c[0]||(c[0]=()=>{i("cancel"),s(!0)})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.cancelText),1)]),_:1}),e.createVNode(v,{loading:l.loading,type:"primary",onClick:c[1]||(c[1]=()=>{i("confirm"),s()})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.confirmText),1)]),_:1},8,["loading"])])]),default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{class:"h-auto w-auto"},()=>[e.createTextVNode(e.toDisplayString(l.content),1)])]),_:3},8,["modelValue","width","height","title"]))}}),S=e.defineComponent({__name:"Notification",props:{message:{},type:{default:"info"},classes:{},duration:{default:3e3},placement:{default:"top-center"},onClose:{}},setup(a){const t=a,o={success:"i-carbon-checkmark",info:"i-material-symbols-light-info",warning:"i-carbon-warning",error:"i-carbon-close"},i={success:"text-primary-500 border-primary-200 dark:text-primary-200 dark:border-primary-500",info:"text-blue-4 border-blue-2 dark:text-blue-2 dark:border-blue-4",warning:"text-amber-4 border-amber-2 dark:border-amber-4",error:"text-red-4 border-red-2 dark:border-red-4"},r=e.ref(!1);e.onMounted(()=>{r.value=!0,setTimeout(()=>{r.value=!1},t.duration)});const s=e.computed(()=>t.placement.startsWith("top")?"translate-y--300%":"translate-y-300%");return(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["fixed left-0 right-0 $ui-z-max-override text-center",[{"top-0":l.placement.startsWith("top")},{"bottom-0":l.placement.startsWith("bottom")}]])},[e.createVNode(e.Transition,{"enter-from-class":s.value,"leave-to-class":s.value,onAfterLeave:c[0]||(c[0]=()=>{var n;r.value||(n=l.onClose)==null||n.call(l)})},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"flex transition-all duration-300",style:e.normalizeStyle({justifyContent:l.placement.includes("right")?"right":l.placement.includes("left")?"left":"center"})},[e.createElementVNode("div",{class:e.normalizeClass(["m3 flex-inline items-center gap2 b-1 b-1 rounded px4 py1 shadow transition-all duration-300 $ui-bg-base",[l.classes,i[l.type]]])},[e.createElementVNode("div",{class:e.normalizeClass(o[l.type])},null,2),e.createElementVNode("div",null,e.toDisplayString(l.message),1)],2)],4)):e.createCommentVNode("",!0)]),_:1},8,["enter-from-class","leave-to-class"])],2))}});function me(a){const t=document.createElement("div");t.classList.add("$ui-z-max-override","fixed"),document.body.appendChild(t);const o=a.onClose;function i(){e.render(null,t)}a.onClose=()=>{i(),o==null||o(),document.body.removeChild(t)};const r=e.h(S,a);e.render(r,t)}const _="__vue-devtools-theme__";function T(a={}){const t=m.useColorMode({...a,storageKey:_});return{colorMode:t,isDark:e.computed(()=>t.value==="dark")}}const fe={class:"$ui-dark-toggle-vtr"},ge=e.defineComponent({__name:"DarkToggle",props:{isDark:{type:Boolean,default:!1},animation:{type:Boolean,default:!0},animationDuration:{default:400}},setup(a){const t=a,o=m.useVModel(t,"isDark"),{colorMode:i}=T({initialValue:o.value?"dark":"light",onChanged:c=>{o.value=c==="dark"}}),r=e.computed({get:()=>i.value==="dark",set:c=>i.value=c?"dark":"light"}),s=!!document.startViewTransition&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches;function l(c){if(!s||!c||!t.animation){r.value=!r.value;return}const n=c.clientX,d=c.clientY,p=Math.hypot(Math.max(n,innerWidth-n),Math.max(d,innerHeight-d));document.startViewTransition(async()=>{r.value=!r.value,await e.nextTick()}).ready.then(()=>{const g=[`circle(0px at ${n}px ${d}px)`,`circle(${p}px at ${n}px ${d}px)`];document.documentElement.animate({clipPath:r.value?[...g].reverse():g},{duration:t.animationDuration,easing:"ease-in",pseudoElement:r.value?"::view-transition-old(root)":"::view-transition-new(root)"})})}return(c,n)=>(e.openBlock(),e.createElementBlock("span",fe,[e.renderSlot(c.$slots,"default",e.normalizeProps(e.guardReactiveProps({mode:e.unref(i),isDark:r.value,toggle:l})))]))}}),ve=e.defineComponent({__name:"Drawer",props:{modelValue:{type:Boolean},mountTo:{default:"body"},placement:{default:"right"},closeOutside:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},contentClass:{},permanent:{type:Boolean,default:!1},contentBlur:{type:Boolean,default:!1},top:{},dim:{type:Boolean},blur:{type:Boolean},position:{}},emits:["update:modelValue","close"],setup(a,{emit:t}){const o=a,i=t,{height:r}=m.useElementSize(()=>typeof o.top=="string"?document.querySelector(o.top):o.top,void 0,{box:"border-box"}),s=m.useVModel(o,"modelValue",i),l={left:{class:"left-0 h-full b-r",transition:"[&_.drawer]:translate-x--100%"},right:{class:"right-0 h-full b-l",transition:"[&_.drawer]:translate-x-full"},top:{class:"w-full b-b",transition:"[&_.drawer]:translate-y--100%"},bottom:{class:"bottom-0 w-full b-t",transition:"[&_.drawer]:translate-y-100%"}};m.onKeyStroke("Escape",()=>{o.closable&&(s.value=!1)});const c=e.computed(()=>l[o.placement]),n=e.ref(!1);return e.onMounted(()=>n.value=!0),(d,p)=>n.value||d.mountTo==="body"?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:d.mountTo},[e.createVNode(e.Transition,{"enter-from-class":`${c.value.transition}`,"leave-to-class":`${c.value.transition}`},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(C,{key:0,class:e.normalizeClass({"pointer-events-none":d.permanent}),dim:d.dim,blur:d.blur,position:d.position,onClick:p[2]||(p[2]=u=>d.closeOutside&&d.closable&&(s.value=!1))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([[c.value.class,d.contentClass??"",d.contentBlur?"$ui-glass-effect":"$ui-bg-base"],"drawer pointer-events-auto absolute min-w-25 of-auto $ui-border-base transition-transform transition-duration-300"]),style:e.normalizeStyle({top:d.placement==="bottom"?"auto":`${e.unref(r)}px`,height:["top","bottom"].includes(d.placement)?"auto":`calc(100% - ${e.unref(r)}px)`}),onClick:p[1]||(p[1]=e.withModifiers(()=>{},["stop"]))},[d.closable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"i-carbon-close absolute right-1.5 top-1.5 $ui-z-max cursor-pointer p1 text-lg $ui-text",onClick:p[0]||(p[0]=u=>s.value=!1)})):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"default")],6)]),_:3},8,["class","dim","blur","position"])):e.createCommentVNode("",!0)]),_:3},8,["enter-from-class","leave-to-class"])],8,["to"])):e.createCommentVNode("",!0)}}),be={class:"overflow-hidden rounded-lg shadow-lg"},D=e.defineComponent({__name:"Dropdown",props:{label:{},buttonProps:{default:()=>({})},buttonClass:{default:""},trigger:{default:"click"},distance:{default:0},skidding:{},placement:{},disabled:{type:Boolean,default:!1},shown:{type:Boolean}},emits:["update:visible"],setup(a){const t=a;return e.provide("$ui-dropdown-disabled",e.computed(()=>t.disabled)),(o,i)=>(e.openBlock(),e.createBlock(e.unref(b.Dropdown),{disabled:o.disabled,class:"inline-block w-auto",shown:o.shown,triggers:[o.trigger],distance:o.distance+6,placement:o.placement,skidding:o.skidding,"onUpdate:shown":i[0]||(i[0]=r=>o.$emit("update:visible",r)),onClick:i[1]||(i[1]=r=>{r.stopPropagation()})},{popper:e.withCtx(({hide:r})=>[e.createElementVNode("div",be,[e.renderSlot(o.$slots,"popper",e.normalizeProps(e.guardReactiveProps({hide:r})),()=>[i[2]||(i[2]=e.createElementVNode("div",{class:"p2 opacity-40"}," Empty... ",-1))])])]),default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{},()=>[e.createVNode(v,e.mergeProps({...o.buttonProps,disabled:o.disabled},{class:o.buttonClass}),e.createSlots({icon:e.withCtx(()=>[e.renderSlot(o.$slots,"button-icon")]),"icon-right":e.withCtx(()=>[e.renderSlot(o.$slots,"button-icon-right")]),_:2},[o.label?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),key:"0"}:void 0]),1040,["class"])])]),_:3},8,["disabled","shown","triggers","distance","placement","skidding"]))}}),he=e.defineComponent({__name:"DropdownButton",props:{type:{},round:{type:[String,Boolean]},loading:{type:Boolean},disabled:{type:Boolean},size:{},flat:{type:Boolean},outlined:{type:Boolean},keepOpen:{type:Boolean,default:!1}},setup(a){const t=a,o=e.inject("$ui-dropdown-disabled",void 0);return(i,r)=>e.withDirectives((e.openBlock(),e.createBlock(v,e.mergeProps({...t,round:!1},{disabled:e.unref(o),class:"w-full justify-start transition-colors not-action:bg-transparent!"}),{icon:e.withCtx(()=>[e.renderSlot(i.$slots,"icon")]),default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},16,["disabled"])),[[e.unref(b.vClosePopper)]])}}),y=e.defineComponent({__name:"Icon",props:{icon:{},inline:{type:Boolean},action:{type:Boolean,default:!1}},setup(a){return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.inline?"span":"div"),{class:e.normalizeClass(["$ui-base",[t.icon,t.action?"cursor-pointer hover:op50":""]])},null,8,["class"]))}}),ye=["type","placeholder","disabled"],ke={key:3,class:"pointer-events-none absolute bottom--0.25 left-50% right-50% z-9999 h-0.75 bg-primary-500 opacity-0 transition-all duration-240 group-[&.focused]:left-0 group-[&.focused]:right-0 group-[&.focused]:opacity-100 group-[&.accent.focused]:bg-accent-500"},k="transition-colors $ui-fcc color-gray-500 dark:color-gray-300 group-[&.focused]:color-primary-500; group-[&.accent.focused]:color-accent-500",M=e.defineComponent({__name:"Input",props:{modelValue:{},placeholder:{default:""},variant:{default:"normal"},disabled:{type:Boolean,default:!1},leftIcon:{},rightIcon:{},loading:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},loadingDebounceTime:{default:0},readonly:{type:Boolean,default:!1},type:{default:"text"}},emits:["update:modelValue","updateFocused","keyTab"],setup(a,{emit:t}){const o=a,i=t,r=m.useVModel(o,"modelValue",i),s=m.refDebounced(e.computed(()=>o.loading),o.loadingDebounceTime),l=m.refWithControl(!1,{onChanged(u){i("updateFocused",u)}}),c=e.computed(()=>o.variant==="flat"||o.variant==="warning"||o.disabled||o.readonly),n=e.computed(()=>o.disabled||s.value),d=e.ref();let p=!1;return e.watchEffect(()=>{s.value&&l.value?p=!0:!s.value&&p&&(p=!1,e.nextTick(()=>{l.value=!0}))}),e.onMounted(()=>{o.autoFocus&&(l.value=!0)}),e.watchEffect(()=>{var u;l.value&&((u=d.value)==null||u.focus())}),(u,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["group relative w-50 w-auto flex items-center justify-between gap-0.5 overflow-hidden b-1 rounded-1 px3 py-0.75 color-gray-800 dark:color-gray-100",[{"border-none bg-transparent group":u.variant==="flat","cursor-not-allowed opacity-50":n.value,accent:u.variant==="accent",focused:e.unref(l)},[u.variant==="warning"?"border-warning-500 dark:border-warning-300":"border-primary-100 dark:border-gray-700"]]]),onClick:g[2]||(g[2]=()=>{l.value=!0})},[u.leftIcon?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(k)},[e.createVNode(y,{icon:u.leftIcon},null,8,["icon"])])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:d,"onUpdate:modelValue":g[0]||(g[0]=V=>e.isRef(r)?r.value=V:null),class:"$ui-base w-full bg-transparent color-inherit outline-none placeholder-color-gray-500 dark:placeholder-gray-300",type:u.type,placeholder:u.placeholder,disabled:n.value||u.readonly,onBlur:g[1]||(g[1]=V=>l.value=!1)},null,40,ye),[[e.vModelDynamic,e.unref(r)]]),e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(k)},[e.createVNode(B)])):u.rightIcon?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(k)},[e.createVNode(y,{icon:u.rightIcon},null,8,["icon"])])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ke))],2))}}),we={class:"$ui-base"},Be=e.defineComponent({__name:"FormField",props:{modelValue:{},status:{default:"normal"},showMessage:{type:Boolean,default:!0},message:{default:""},placeholder:{}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,i=t,r=m.useVModel(o,"modelValue",i),s=e.ref(!1),l=e.computed(()=>o.message&&o.message.length&&o.showMessage),c={normal:"color-gray-600 dark:color-gray-400",warning:"color-warning-500 dark:color-warning-200",danger:"color-danger-500 dark:color-danger-200",success:"color-primary-700 dark:color-primary-500"},n={warning:"i-bx:bxs-error",danger:"i-ic-round-error",success:"i-ep:success-filled"};return(d,p)=>(e.openBlock(),e.createElementBlock("div",we,[e.createVNode(M,{modelValue:e.unref(r),"onUpdate:modelValue":p[0]||(p[0]=u=>e.isRef(r)?r.value=u:null),placeholder:d.placeholder,onUpdateFocused:p[1]||(p[1]=u=>s.value=u)},null,8,["modelValue","placeholder"]),e.createElementVNode("div",{class:e.normalizeClass(["mt2 $ui-base text-3.5",[c[d.status],{"opacity-65":!s.value}]])},[d.status!=="normal"&&l.value?(e.openBlock(),e.createBlock(y,{key:0,inline:"",icon:n[d.status]},null,8,["icon"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.value?d.message:""),1)],2)]))}}),Ce=["innerHTML"],Ve=e.defineComponent({__name:"IcIcon",props:{name:{}},setup(a){const t=a,o=e.computed(()=>j.icIcons[t.name]??"");return(i,r)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createElementBlock("svg",{class:"custom-svg h-1em w-1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",innerHTML:o.value},null,8,Ce))]))}}),$e={class:"m1 min-w-35 w-auto flex flex-col"},Ee=["onClick"],Ne=e.defineComponent({__name:"Select",props:{modelValue:{},multiple:{default:!1},options:{},placeholder:{default:"Select..."},autoClose:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},labelRenderer:{type:Function,default:a=>String(a)},buttonProps:{default:()=>({})}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,i=t,r=e.useSlots(),s=e.computed({get:()=>o.modelValue,set:n=>i("update:modelValue",n)}),l=e.computed(()=>{const n=o.options.find(d=>d.value===s.value);return n!=null&&n.label?o.labelRenderer(n.label):o.placeholder});function c(n){o.multiple?s.value=s.value.includes(n.value)?s.value.filter(d=>d!==n.value):[...s.value,n.value]:s.value=n.value}return(n,d)=>(e.openBlock(),e.createBlock(D,e.mergeProps({label:l.value},{buttonProps:n.buttonProps,disabled:n.disabled}),e.createSlots({popper:e.withCtx(()=>[e.createElementVNode("div",$e,[e.unref(r).item?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.options,p=>(e.openBlock(),e.createElementBlock("div",{key:p.value,class:"cursor-pointer",onClick:u=>c(p)},[e.renderSlot(n.$slots,"item",e.mergeProps({ref_for:!0},{item:p,active:n.multiple?s.value.includes(p.value):p.value===s.value,disabled:n.disabled}))],8,Ee))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.options,p=>e.withDirectives((e.openBlock(),e.createBlock(v,{key:p.value,disabled:n.disabled,round:"normal",class:e.normalizeClass(["flex-[auto_1_1] not-hover:[&:not(.active)]:bg-transparent!",{active:n.multiple?s.value.includes(p.value):p.value===s.value}]),onClick:u=>c(p)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.label),1)]),_:2},1032,["disabled","class","onClick"])),[[e.unref(b.vClosePopper),n.autoClose]])),128))])]),"button-icon-right":e.withCtx(()=>[d[0]||(d[0]=e.createElementVNode("div",{class:"i-mdi-chevron-down"},null,-1))]),_:2},[e.unref(r).button?{name:"default",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"button")]),key:"0"}:void 0]),1040,["label"]))}}),Se=e.defineComponent({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,i=t,r=m.useVModel(o,"modelValue",i),s=m.useToggle(r);return(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([[l.disabled?"cursor-not-allowed":"cursor-pointer"],"$ui-base $ui-if-sc cursor-pointer select-none gap1.25 vertical-mid text-3.5"]),role:"checkbox",onClick:c[0]||(c[0]=n=>!l.disabled&&e.unref(s)())},[e.renderSlot(l.$slots,"default"),e.createElementVNode("div",{class:e.normalizeClass([{selected:e.unref(r)},"group relative $ui-base h4 w8 rounded-2 bg-primary-100 transition-colors dark:bg-gray-700 [&.selected]:bg-primary-500!"])},[e.createElementVNode("div",{class:e.normalizeClass(["h4 w4 rounded-full bg-primary-800 transition-transform group-[&.selected]:transform-translate-x-4 dark:bg-white",[{"group-hover:opacity-75 group-active:scale-85":!l.disabled},{"opacity-65":l.disabled}]])},null,2)],2)],2))}}),_e=e.defineComponent({__name:"Tooltip",props:{trigger:{},distance:{},skidding:{},placement:{},disabled:{type:Boolean},shown:{type:Boolean}},setup(a){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(b.Tooltip),e.mergeProps({disabled:t.disabled,placement:t.placement},t.$attrs),{popper:e.withCtx(()=>[e.renderSlot(t.$slots,"popper")]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["disabled","placement"]))}});Object.defineProperty(exports,"vTooltip",{enumerable:!0,get:()=>b.vTooltip});exports.THEME_KEY=_;exports.VueBadge=W;exports.VueButton=v;exports.VueCard=Z;exports.VueCheckbox=ee;exports.VueCodeBlock=ne;exports.VueConfirm=pe;exports.VueDarkToggle=ge;exports.VueDialog=N;exports.VueDrawer=ve;exports.VueDropdown=D;exports.VueDropdownButton=he;exports.VueFormField=Be;exports.VueIcIcon=Ve;exports.VueIcon=y;exports.VueInput=M;exports.VueLoadingIndicator=B;exports.VueNotification=S;exports.VueOverlay=C;exports.VueSelect=Ne;exports.VueSwitch=Se;exports.VueTooltip=_e;exports.showVueNotification=me;exports.useDevToolsColorMode=T;
|
package/dist/index.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
// @unocss-include
|
|
2
2
|
|
|
3
|
-
import { Dropdown as
|
|
3
|
+
import { Dropdown as ae, vClosePopper as Y, Tooltip as re } from "floating-vue";
|
|
4
4
|
import { vTooltip as Bt } from "floating-vue";
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { createElementBlock as f, openBlock as u, renderSlot as v, createElementVNode as m, defineComponent as h, useAttrs as
|
|
8
|
-
import { useVModel as T, useScrollLock as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { createElementBlock as f, openBlock as u, renderSlot as v, createElementVNode as m, defineComponent as h, useAttrs as ne, computed as k, useSlots as q, createBlock as w, resolveDynamicComponent as J, mergeProps as D, withCtx as g, createCommentVNode as $, unref as b, normalizeClass as y, shallowRef as le, nextTick as H, Fragment as E, renderList as R, toDisplayString as B, watchEffect as P, ref as S, onMounted as z, Teleport as X, createVNode as C, Transition as N, normalizeStyle as j, createTextVNode as _, isRef as x, h as se, render as U, normalizeProps as G, guardReactiveProps as Q, withModifiers as ie, provide as de, createSlots as Z, inject as ue, withDirectives as A, vModelDynamic as ce } from "vue";
|
|
8
|
+
import { useVModel as T, useScrollLock as pe, onKeyStroke as ee, useColorMode as me, useElementSize as fe, refDebounced as ge, refWithControl as ve, useToggle as be } from "@vueuse/core";
|
|
9
|
+
import { createHighlighterCore as ye } from "shiki/core";
|
|
10
|
+
import { createJavaScriptRegexEngine as he } from "shiki/engine/javascript";
|
|
11
|
+
import { i as ke } from "./ic-icons-data-B4q1VTSq.js";
|
|
11
12
|
const O = (l, t) => {
|
|
12
13
|
const e = l.__vccOpts || l;
|
|
13
14
|
for (const [s, o] of t)
|
|
14
15
|
e[s] = o;
|
|
15
16
|
return e;
|
|
16
|
-
},
|
|
17
|
-
function
|
|
18
|
-
return u(), f("span",
|
|
17
|
+
}, we = {}, $e = { class: "mx-0.5 $ui-base inline-block select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs" };
|
|
18
|
+
function Ce(l, t) {
|
|
19
|
+
return u(), f("span", $e, [
|
|
19
20
|
v(l.$slots, "default")
|
|
20
21
|
]);
|
|
21
22
|
}
|
|
22
|
-
const dt = /* @__PURE__ */ O(
|
|
23
|
-
function
|
|
24
|
-
return u(), f("div",
|
|
23
|
+
const dt = /* @__PURE__ */ O(we, [["render", Ce]]), Ve = {}, Be = { class: "h-3 w-3 $ui-inline-fcc" };
|
|
24
|
+
function _e(l, t) {
|
|
25
|
+
return u(), f("div", Be, t[0] || (t[0] = [
|
|
25
26
|
m("svg", {
|
|
26
27
|
class: "animate-spin",
|
|
27
28
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -44,7 +45,7 @@ function Te(l, t) {
|
|
|
44
45
|
], -1)
|
|
45
46
|
]));
|
|
46
47
|
}
|
|
47
|
-
const
|
|
48
|
+
const te = /* @__PURE__ */ O(Ve, [["render", _e]]), Te = { key: 2 }, M = /* @__PURE__ */ h({
|
|
48
49
|
inheritAttrs: !1,
|
|
49
50
|
__name: "Button",
|
|
50
51
|
props: {
|
|
@@ -58,7 +59,7 @@ const ee = /* @__PURE__ */ O(Be, [["render", Te]]), De = { key: 2 }, M = /* @__P
|
|
|
58
59
|
},
|
|
59
60
|
emits: ["click"],
|
|
60
61
|
setup(l, { emit: t }) {
|
|
61
|
-
const e = l, s = t, o =
|
|
62
|
+
const e = l, s = t, o = ne(), n = k(() => o.to ? "router-link" : o.href ? "a" : "button"), r = k(() => e.loading || e.disabled);
|
|
62
63
|
function d(c) {
|
|
63
64
|
if (r.value) {
|
|
64
65
|
c.preventDefault(), c.stopPropagation(), c.stopImmediatePropagation();
|
|
@@ -103,8 +104,8 @@ const ee = /* @__PURE__ */ O(Be, [["render", Te]]), De = { key: 2 }, M = /* @__P
|
|
|
103
104
|
info: "hover:border-info-500 hover:text-info-500 active:ring-info-500:5 active:bg-info-500:5",
|
|
104
105
|
success: "hover:border-primary-500 hover:text-primary-500 active:ring-primary-500:5 active:bg-primary-500:5"
|
|
105
106
|
}
|
|
106
|
-
}, i =
|
|
107
|
-
return (c, V) => (u(), w(
|
|
107
|
+
}, i = q(), p = k(() => e.flat ? a.flat[e.type] : e.outlined ? a.outlined[e.type] : a.normal[e.type]);
|
|
108
|
+
return (c, V) => (u(), w(J(n.value), D(c.$attrs, {
|
|
108
109
|
role: "button",
|
|
109
110
|
"aria-disabled": r.value,
|
|
110
111
|
class: ["$ui-base $ui-inline-fcc inline-flex cursor-pointer select-none gap1.25 py-0 no-underline $ui-transition", [
|
|
@@ -124,14 +125,14 @@ const ee = /* @__PURE__ */ O(Be, [["render", Te]]), De = { key: 2 }, M = /* @__P
|
|
|
124
125
|
onClickCapture: d
|
|
125
126
|
}), {
|
|
126
127
|
default: g(() => [
|
|
127
|
-
c.loading ? (u(), w(
|
|
128
|
+
c.loading ? (u(), w(te, {
|
|
128
129
|
key: 0,
|
|
129
130
|
class: "mt0.5 h-full w3"
|
|
130
131
|
})) : v(c.$slots, "icon", {
|
|
131
132
|
key: 1,
|
|
132
133
|
class: "h-full w3 $ui-inline-fcc"
|
|
133
134
|
}),
|
|
134
|
-
b(i).default ? (u(), f("div",
|
|
135
|
+
b(i).default ? (u(), f("div", Te, [
|
|
135
136
|
v(c.$slots, "default")
|
|
136
137
|
])) : $("", !0),
|
|
137
138
|
v(c.$slots, "icon-right")
|
|
@@ -139,13 +140,13 @@ const ee = /* @__PURE__ */ O(Be, [["render", Te]]), De = { key: 2 }, M = /* @__P
|
|
|
139
140
|
_: 3
|
|
140
141
|
}, 16, ["aria-disabled", "class"]));
|
|
141
142
|
}
|
|
142
|
-
}),
|
|
143
|
-
function
|
|
144
|
-
return u(), f("div",
|
|
143
|
+
}), De = {}, Me = { class: "$ui-base border $ui-border-base rounded shadow-sm" };
|
|
144
|
+
function Se(l, t) {
|
|
145
|
+
return u(), f("div", Me, [
|
|
145
146
|
v(l.$slots, "default")
|
|
146
147
|
]);
|
|
147
148
|
}
|
|
148
|
-
const ut = /* @__PURE__ */ O(
|
|
149
|
+
const ut = /* @__PURE__ */ O(De, [["render", Se]]), ct = /* @__PURE__ */ h({
|
|
149
150
|
__name: "Checkbox",
|
|
150
151
|
props: {
|
|
151
152
|
modelValue: { type: Boolean },
|
|
@@ -167,13 +168,13 @@ const ut = /* @__PURE__ */ O(Me, [["render", Ie]]), ct = /* @__PURE__ */ h({
|
|
|
167
168
|
}, null, 2)
|
|
168
169
|
], 2));
|
|
169
170
|
}
|
|
170
|
-
}), I =
|
|
171
|
+
}), I = le();
|
|
171
172
|
let K = null;
|
|
172
|
-
function
|
|
173
|
+
function Ie(l, t = "text") {
|
|
173
174
|
var s;
|
|
174
175
|
if (!K && !I.value) {
|
|
175
176
|
const o = he();
|
|
176
|
-
K =
|
|
177
|
+
K = ye({
|
|
177
178
|
themes: [
|
|
178
179
|
import("shiki/themes/vitesse-dark.mjs"),
|
|
179
180
|
import("shiki/themes/vitesse-light.mjs")
|
|
@@ -210,7 +211,7 @@ function Ee(l, t = "text") {
|
|
|
210
211
|
supported: e
|
|
211
212
|
};
|
|
212
213
|
}
|
|
213
|
-
const
|
|
214
|
+
const Ee = ["innerHTML"], Pe = { class: "shiki" }, ze = ["textContent"], pt = /* @__PURE__ */ h({
|
|
214
215
|
__name: "CodeBlock",
|
|
215
216
|
props: {
|
|
216
217
|
code: {},
|
|
@@ -221,32 +222,32 @@ const Pe = ["innerHTML"], ze = { class: "shiki" }, Le = ["textContent"], pt = /*
|
|
|
221
222
|
emits: ["loaded"],
|
|
222
223
|
setup(l, { emit: t }) {
|
|
223
224
|
const e = l, s = t, o = k(() => {
|
|
224
|
-
const n = e.lang === "text" ? { code: e.code, supported: !1 } :
|
|
225
|
+
const n = e.lang === "text" ? { code: e.code, supported: !1 } : Ie(e.code, e.lang) || { code: e.code, supported: !1 };
|
|
225
226
|
return n.supported && e.transformRendered && (n.code = e.transformRendered(n.code)), n.supported && H(() => s("loaded")), n;
|
|
226
227
|
});
|
|
227
228
|
return (n, r) => n.lang && o.value.supported ? (u(), f("pre", {
|
|
228
229
|
key: 0,
|
|
229
230
|
class: y(["code-block", n.lines ? "code-block-lines" : ""]),
|
|
230
231
|
innerHTML: o.value.code
|
|
231
|
-
}, null, 10,
|
|
232
|
+
}, null, 10, Ee)) : (u(), f("pre", {
|
|
232
233
|
key: 1,
|
|
233
234
|
class: y(["code-block", n.lines ? "code-block-lines" : ""])
|
|
234
235
|
}, [
|
|
235
|
-
m("pre",
|
|
236
|
+
m("pre", Pe, [
|
|
236
237
|
m("code", null, [
|
|
237
238
|
(u(!0), f(E, null, R(n.code.split(`
|
|
238
239
|
`), (d, a) => (u(), f(E, { key: a }, [
|
|
239
240
|
m("span", {
|
|
240
241
|
class: "line",
|
|
241
242
|
textContent: B(d)
|
|
242
|
-
}, null, 8,
|
|
243
|
+
}, null, 8, ze),
|
|
243
244
|
r[0] || (r[0] = m("br", null, null, -1))
|
|
244
245
|
], 64))), 128))
|
|
245
246
|
])
|
|
246
247
|
])
|
|
247
248
|
], 2));
|
|
248
249
|
}
|
|
249
|
-
}),
|
|
250
|
+
}), oe = /* @__PURE__ */ h({
|
|
250
251
|
__name: "Overlay",
|
|
251
252
|
props: {
|
|
252
253
|
dim: { type: Boolean },
|
|
@@ -264,7 +265,7 @@ const Pe = ["innerHTML"], ze = { class: "shiki" }, Le = ["textContent"], pt = /*
|
|
|
264
265
|
v(t.$slots, "default")
|
|
265
266
|
], 2));
|
|
266
267
|
}
|
|
267
|
-
}),
|
|
268
|
+
}), Le = { class: "h7.5 w-full $ui-fbc" }, Re = { class: "text-4.5" }, Fe = { class: "content transition-all transition-duration-300" }, He = { class: "footer h8 w-full transition-all transition-duration-300 delay-250" }, Ne = { class: "$ui-fcc" }, je = /* @__PURE__ */ h({
|
|
268
269
|
__name: "Dialog",
|
|
269
270
|
props: {
|
|
270
271
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -280,18 +281,18 @@ const Pe = ["innerHTML"], ze = { class: "shiki" }, Le = ["textContent"], pt = /*
|
|
|
280
281
|
},
|
|
281
282
|
emits: ["close", "update:modelValue"],
|
|
282
283
|
setup(l, { emit: t }) {
|
|
283
|
-
const e = l, o = T(e, "modelValue", t, { passive: !0 }), n =
|
|
284
|
+
const e = l, o = T(e, "modelValue", t, { passive: !0 }), n = pe(() => window.document.documentElement);
|
|
284
285
|
P(() => {
|
|
285
286
|
o.value ? n.value = !0 : n.value = !1;
|
|
286
287
|
});
|
|
287
288
|
function r() {
|
|
288
289
|
o.value && e.autoClose && (o.value = !1);
|
|
289
290
|
}
|
|
290
|
-
|
|
291
|
+
ee("Escape", () => {
|
|
291
292
|
r();
|
|
292
293
|
});
|
|
293
294
|
const d = S(!1);
|
|
294
|
-
return z(() => d.value = !0), (a, i) => d.value || a.mountTo === "body" ? (u(), w(
|
|
295
|
+
return z(() => d.value = !0), (a, i) => d.value || a.mountTo === "body" ? (u(), w(X, {
|
|
295
296
|
key: 0,
|
|
296
297
|
to: a.mountTo
|
|
297
298
|
}, [
|
|
@@ -302,7 +303,7 @@ const Pe = ["innerHTML"], ze = { class: "shiki" }, Le = ["textContent"], pt = /*
|
|
|
302
303
|
"leave-to-class": "opacity-0 [&_.modal]:scale-95"
|
|
303
304
|
}, {
|
|
304
305
|
default: g(() => [
|
|
305
|
-
b(o) ? (u(), w(
|
|
306
|
+
b(o) ? (u(), w(oe, {
|
|
306
307
|
key: 0,
|
|
307
308
|
dim: a.dim,
|
|
308
309
|
blur: a.blur,
|
|
@@ -316,8 +317,8 @@ const Pe = ["innerHTML"], ze = { class: "shiki" }, Le = ["textContent"], pt = /*
|
|
|
316
317
|
height: e.height
|
|
317
318
|
})
|
|
318
319
|
}, [
|
|
319
|
-
m("div",
|
|
320
|
-
m("div",
|
|
320
|
+
m("div", Le, [
|
|
321
|
+
m("div", Re, [
|
|
321
322
|
v(a.$slots, "title", {}, () => [
|
|
322
323
|
_(B(e.title), 1)
|
|
323
324
|
])
|
|
@@ -330,13 +331,13 @@ const Pe = ["innerHTML"], ze = { class: "shiki" }, Le = ["textContent"], pt = /*
|
|
|
330
331
|
m("div", { class: "i-carbon-close" }, null, -1)
|
|
331
332
|
]))) : $("", !0)
|
|
332
333
|
]),
|
|
333
|
-
m("div",
|
|
334
|
+
m("div", Fe, [
|
|
334
335
|
v(a.$slots, "default")
|
|
335
336
|
]),
|
|
336
|
-
m("div",
|
|
337
|
+
m("div", He, [
|
|
337
338
|
v(a.$slots, "footer", {}, () => [
|
|
338
339
|
v(a.$slots, "footer", {}, () => [
|
|
339
|
-
m("div",
|
|
340
|
+
m("div", Ne, [
|
|
340
341
|
C(M, {
|
|
341
342
|
type: "primary",
|
|
342
343
|
onClick: r
|
|
@@ -359,7 +360,7 @@ const Pe = ["innerHTML"], ze = { class: "shiki" }, Le = ["textContent"], pt = /*
|
|
|
359
360
|
})
|
|
360
361
|
], 8, ["to"])) : $("", !0);
|
|
361
362
|
}
|
|
362
|
-
}),
|
|
363
|
+
}), xe = { class: "$ui-fec gap2.5" }, mt = /* @__PURE__ */ h({
|
|
363
364
|
__name: "Confirm",
|
|
364
365
|
props: {
|
|
365
366
|
modelValue: { type: Boolean },
|
|
@@ -381,7 +382,7 @@ const Pe = ["innerHTML"], ze = { class: "shiki" }, Le = ["textContent"], pt = /*
|
|
|
381
382
|
function n(r = !1) {
|
|
382
383
|
(e.autoClose || r) && (o.value = !1);
|
|
383
384
|
}
|
|
384
|
-
return (r, d) => (u(), w(
|
|
385
|
+
return (r, d) => (u(), w(je, {
|
|
385
386
|
modelValue: b(o),
|
|
386
387
|
"onUpdate:modelValue": d[2] || (d[2] = (a) => x(o) ? o.value = a : null),
|
|
387
388
|
width: r.width,
|
|
@@ -390,7 +391,7 @@ const Pe = ["innerHTML"], ze = { class: "shiki" }, Le = ["textContent"], pt = /*
|
|
|
390
391
|
closable: !1
|
|
391
392
|
}, {
|
|
392
393
|
footer: g(() => [
|
|
393
|
-
m("div",
|
|
394
|
+
m("div", xe, [
|
|
394
395
|
C(M, {
|
|
395
396
|
onClick: d[0] || (d[0] = () => {
|
|
396
397
|
s("cancel"), n(!0);
|
|
@@ -423,7 +424,7 @@ const Pe = ["innerHTML"], ze = { class: "shiki" }, Le = ["textContent"], pt = /*
|
|
|
423
424
|
_: 3
|
|
424
425
|
}, 8, ["modelValue", "width", "height", "title"]));
|
|
425
426
|
}
|
|
426
|
-
}),
|
|
427
|
+
}), Ae = /* @__PURE__ */ h({
|
|
427
428
|
__name: "Notification",
|
|
428
429
|
props: {
|
|
429
430
|
message: {},
|
|
@@ -496,21 +497,21 @@ function ft(l) {
|
|
|
496
497
|
l.onClose = () => {
|
|
497
498
|
s(), e == null || e(), document.body.removeChild(t);
|
|
498
499
|
};
|
|
499
|
-
const o =
|
|
500
|
+
const o = se(Ae, l);
|
|
500
501
|
U(o, t);
|
|
501
502
|
}
|
|
502
|
-
const
|
|
503
|
-
function
|
|
504
|
-
const t =
|
|
503
|
+
const Oe = "__vue-devtools-theme__";
|
|
504
|
+
function We(l = {}) {
|
|
505
|
+
const t = me({
|
|
505
506
|
...l,
|
|
506
|
-
storageKey:
|
|
507
|
+
storageKey: Oe
|
|
507
508
|
});
|
|
508
509
|
return {
|
|
509
510
|
colorMode: t,
|
|
510
511
|
isDark: k(() => t.value === "dark")
|
|
511
512
|
};
|
|
512
513
|
}
|
|
513
|
-
const
|
|
514
|
+
const Ue = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
514
515
|
__name: "DarkToggle",
|
|
515
516
|
props: {
|
|
516
517
|
isDark: { type: Boolean, default: !1 },
|
|
@@ -518,7 +519,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
518
519
|
animationDuration: { default: 400 }
|
|
519
520
|
},
|
|
520
521
|
setup(l) {
|
|
521
|
-
const t = l, e = T(t, "isDark"), { colorMode: s } =
|
|
522
|
+
const t = l, e = T(t, "isDark"), { colorMode: s } = We({
|
|
522
523
|
initialValue: e.value ? "dark" : "light",
|
|
523
524
|
onChanged: (d) => {
|
|
524
525
|
e.value = d === "dark";
|
|
@@ -555,8 +556,8 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
555
556
|
);
|
|
556
557
|
});
|
|
557
558
|
}
|
|
558
|
-
return (d, a) => (u(), f("span",
|
|
559
|
-
v(d.$slots, "default",
|
|
559
|
+
return (d, a) => (u(), f("span", Ue, [
|
|
560
|
+
v(d.$slots, "default", G(Q({ mode: b(s), isDark: o.value, toggle: r })))
|
|
560
561
|
]));
|
|
561
562
|
}
|
|
562
563
|
}), vt = /* @__PURE__ */ h({
|
|
@@ -577,7 +578,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
577
578
|
},
|
|
578
579
|
emits: ["update:modelValue", "close"],
|
|
579
580
|
setup(l, { emit: t }) {
|
|
580
|
-
const e = l, s = t, { height: o } =
|
|
581
|
+
const e = l, s = t, { height: o } = fe(() => typeof e.top == "string" ? document.querySelector(e.top) : e.top, void 0, { box: "border-box" }), n = T(e, "modelValue", s), r = {
|
|
581
582
|
left: {
|
|
582
583
|
class: "left-0 h-full b-r",
|
|
583
584
|
transition: "[&_.drawer]:translate-x--100%"
|
|
@@ -595,11 +596,11 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
595
596
|
transition: "[&_.drawer]:translate-y-100%"
|
|
596
597
|
}
|
|
597
598
|
};
|
|
598
|
-
|
|
599
|
+
ee("Escape", () => {
|
|
599
600
|
e.closable && (n.value = !1);
|
|
600
601
|
});
|
|
601
602
|
const d = k(() => r[e.placement]), a = S(!1);
|
|
602
|
-
return z(() => a.value = !0), (i, p) => a.value || i.mountTo === "body" ? (u(), w(
|
|
603
|
+
return z(() => a.value = !0), (i, p) => a.value || i.mountTo === "body" ? (u(), w(X, {
|
|
603
604
|
key: 0,
|
|
604
605
|
to: i.mountTo
|
|
605
606
|
}, [
|
|
@@ -608,7 +609,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
608
609
|
"leave-to-class": `${d.value.transition}`
|
|
609
610
|
}, {
|
|
610
611
|
default: g(() => [
|
|
611
|
-
b(n) ? (u(), w(
|
|
612
|
+
b(n) ? (u(), w(oe, {
|
|
612
613
|
key: 0,
|
|
613
614
|
class: y({
|
|
614
615
|
"pointer-events-none": i.permanent
|
|
@@ -625,7 +626,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
625
626
|
top: i.placement === "bottom" ? "auto" : `${b(o)}px`,
|
|
626
627
|
height: ["top", "bottom"].includes(i.placement) ? "auto" : `calc(100% - ${b(o)}px)`
|
|
627
628
|
}),
|
|
628
|
-
onClick: p[1] || (p[1] =
|
|
629
|
+
onClick: p[1] || (p[1] = ie(() => {
|
|
629
630
|
}, ["stop"]))
|
|
630
631
|
}, [
|
|
631
632
|
i.closable ? (u(), f("div", {
|
|
@@ -643,7 +644,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
643
644
|
}, 8, ["enter-from-class", "leave-to-class"])
|
|
644
645
|
], 8, ["to"])) : $("", !0);
|
|
645
646
|
}
|
|
646
|
-
}),
|
|
647
|
+
}), Ke = { class: "overflow-hidden rounded-lg shadow-lg" }, Ye = /* @__PURE__ */ h({
|
|
647
648
|
__name: "Dropdown",
|
|
648
649
|
props: {
|
|
649
650
|
label: {},
|
|
@@ -659,7 +660,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
659
660
|
emits: ["update:visible"],
|
|
660
661
|
setup(l) {
|
|
661
662
|
const t = l;
|
|
662
|
-
return
|
|
663
|
+
return de("$ui-dropdown-disabled", k(() => t.disabled)), (e, s) => (u(), w(b(ae), {
|
|
663
664
|
disabled: e.disabled,
|
|
664
665
|
class: "inline-block w-auto",
|
|
665
666
|
shown: e.shown,
|
|
@@ -673,8 +674,8 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
673
674
|
})
|
|
674
675
|
}, {
|
|
675
676
|
popper: g(({ hide: o }) => [
|
|
676
|
-
m("div",
|
|
677
|
-
v(e.$slots, "popper",
|
|
677
|
+
m("div", Ke, [
|
|
678
|
+
v(e.$slots, "popper", G(Q({ hide: o })), () => [
|
|
678
679
|
s[2] || (s[2] = m("div", { class: "p2 opacity-40" }, " Empty... ", -1))
|
|
679
680
|
])
|
|
680
681
|
])
|
|
@@ -684,7 +685,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
684
685
|
C(M, D({
|
|
685
686
|
...e.buttonProps,
|
|
686
687
|
disabled: e.disabled
|
|
687
|
-
}, { class: e.buttonClass }),
|
|
688
|
+
}, { class: e.buttonClass }), Z({
|
|
688
689
|
icon: g(() => [
|
|
689
690
|
v(e.$slots, "button-icon")
|
|
690
691
|
]),
|
|
@@ -719,7 +720,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
719
720
|
keepOpen: { type: Boolean, default: !1 }
|
|
720
721
|
},
|
|
721
722
|
setup(l) {
|
|
722
|
-
const t = l, e =
|
|
723
|
+
const t = l, e = ue("$ui-dropdown-disabled", void 0);
|
|
723
724
|
return (s, o) => A((u(), w(M, D({
|
|
724
725
|
...t,
|
|
725
726
|
round: !1
|
|
@@ -735,7 +736,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
735
736
|
]),
|
|
736
737
|
_: 3
|
|
737
738
|
}, 16, ["disabled"])), [
|
|
738
|
-
[b(
|
|
739
|
+
[b(Y)]
|
|
739
740
|
]);
|
|
740
741
|
}
|
|
741
742
|
}), F = /* @__PURE__ */ h({
|
|
@@ -746,14 +747,14 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
746
747
|
action: { type: Boolean, default: !1 }
|
|
747
748
|
},
|
|
748
749
|
setup(l) {
|
|
749
|
-
return (t, e) => (u(), w(
|
|
750
|
+
return (t, e) => (u(), w(J(t.inline ? "span" : "div"), {
|
|
750
751
|
class: y(["$ui-base", [t.icon, t.action ? "cursor-pointer hover:op50" : ""]])
|
|
751
752
|
}, null, 8, ["class"]));
|
|
752
753
|
}
|
|
753
|
-
}),
|
|
754
|
+
}), qe = ["type", "placeholder", "disabled"], Je = {
|
|
754
755
|
key: 3,
|
|
755
756
|
class: "pointer-events-none absolute bottom--0.25 left-50% right-50% z-9999 h-0.75 bg-primary-500 opacity-0 transition-all duration-240 group-[&.focused]:left-0 group-[&.focused]:right-0 group-[&.focused]:opacity-100 group-[&.accent.focused]:bg-accent-500"
|
|
756
|
-
}, L = "transition-colors $ui-fcc color-gray-500 dark:color-gray-300 group-[&.focused]:color-primary-500; group-[&.accent.focused]:color-accent-500",
|
|
757
|
+
}, L = "transition-colors $ui-fcc color-gray-500 dark:color-gray-300 group-[&.focused]:color-primary-500; group-[&.accent.focused]:color-accent-500", Xe = /* @__PURE__ */ h({
|
|
757
758
|
__name: "Input",
|
|
758
759
|
props: {
|
|
759
760
|
modelValue: {},
|
|
@@ -770,7 +771,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
770
771
|
},
|
|
771
772
|
emits: ["update:modelValue", "updateFocused", "keyTab"],
|
|
772
773
|
setup(l, { emit: t }) {
|
|
773
|
-
const e = l, s = t, o = T(e, "modelValue", s), n =
|
|
774
|
+
const e = l, s = t, o = T(e, "modelValue", s), n = ge(k(() => e.loading), e.loadingDebounceTime), r = ve(!1, {
|
|
774
775
|
onChanged(c) {
|
|
775
776
|
s("updateFocused", c);
|
|
776
777
|
}
|
|
@@ -816,24 +817,24 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
816
817
|
placeholder: c.placeholder,
|
|
817
818
|
disabled: a.value || c.readonly,
|
|
818
819
|
onBlur: V[1] || (V[1] = (W) => r.value = !1)
|
|
819
|
-
}, null, 40,
|
|
820
|
-
[
|
|
820
|
+
}, null, 40, qe), [
|
|
821
|
+
[ce, b(o)]
|
|
821
822
|
]),
|
|
822
823
|
b(n) ? (u(), f("div", {
|
|
823
824
|
key: 1,
|
|
824
825
|
class: y(L)
|
|
825
826
|
}, [
|
|
826
|
-
C(
|
|
827
|
+
C(te)
|
|
827
828
|
])) : c.rightIcon ? (u(), f("div", {
|
|
828
829
|
key: 2,
|
|
829
830
|
class: y(L)
|
|
830
831
|
}, [
|
|
831
832
|
C(F, { icon: c.rightIcon }, null, 8, ["icon"])
|
|
832
833
|
])) : $("", !0),
|
|
833
|
-
d.value ? $("", !0) : (u(), f("div",
|
|
834
|
+
d.value ? $("", !0) : (u(), f("div", Je))
|
|
834
835
|
], 2));
|
|
835
836
|
}
|
|
836
|
-
}),
|
|
837
|
+
}), Ge = { class: "$ui-base" }, yt = /* @__PURE__ */ h({
|
|
837
838
|
__name: "FormField",
|
|
838
839
|
props: {
|
|
839
840
|
modelValue: {},
|
|
@@ -854,8 +855,8 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
854
855
|
danger: "i-ic-round-error",
|
|
855
856
|
success: "i-ep:success-filled"
|
|
856
857
|
};
|
|
857
|
-
return (i, p) => (u(), f("div",
|
|
858
|
-
C(
|
|
858
|
+
return (i, p) => (u(), f("div", Ge, [
|
|
859
|
+
C(Xe, {
|
|
859
860
|
modelValue: b(o),
|
|
860
861
|
"onUpdate:modelValue": p[0] || (p[0] = (c) => x(o) ? o.value = c : null),
|
|
861
862
|
placeholder: i.placeholder,
|
|
@@ -876,23 +877,23 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
876
877
|
], 2)
|
|
877
878
|
]));
|
|
878
879
|
}
|
|
879
|
-
}),
|
|
880
|
+
}), Qe = ["innerHTML"], ht = /* @__PURE__ */ h({
|
|
880
881
|
__name: "IcIcon",
|
|
881
882
|
props: {
|
|
882
883
|
name: {}
|
|
883
884
|
},
|
|
884
885
|
setup(l) {
|
|
885
|
-
const t = l, e = k(() =>
|
|
886
|
+
const t = l, e = k(() => ke[t.name] ?? "");
|
|
886
887
|
return (s, o) => (u(), f("div", null, [
|
|
887
888
|
(u(), f("svg", {
|
|
888
889
|
class: "custom-svg h-1em w-1em",
|
|
889
890
|
xmlns: "http://www.w3.org/2000/svg",
|
|
890
891
|
viewBox: "0 0 24 24",
|
|
891
892
|
innerHTML: e.value
|
|
892
|
-
}, null, 8,
|
|
893
|
+
}, null, 8, Qe))
|
|
893
894
|
]));
|
|
894
895
|
}
|
|
895
|
-
}),
|
|
896
|
+
}), Ze = { class: "m1 min-w-35 w-auto flex flex-col" }, et = ["onClick"], kt = /* @__PURE__ */ h({
|
|
896
897
|
__name: "Select",
|
|
897
898
|
props: {
|
|
898
899
|
modelValue: {},
|
|
@@ -906,7 +907,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
906
907
|
},
|
|
907
908
|
emits: ["update:modelValue"],
|
|
908
909
|
setup(l, { emit: t }) {
|
|
909
|
-
const e = l, s = t, o =
|
|
910
|
+
const e = l, s = t, o = q(), n = k({
|
|
910
911
|
get: () => e.modelValue,
|
|
911
912
|
set: (a) => s("update:modelValue", a)
|
|
912
913
|
}), r = k(() => {
|
|
@@ -916,12 +917,12 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
916
917
|
function d(a) {
|
|
917
918
|
e.multiple ? n.value = n.value.includes(a.value) ? n.value.filter((i) => i !== a.value) : [...n.value, a.value] : n.value = a.value;
|
|
918
919
|
}
|
|
919
|
-
return (a, i) => (u(), w(
|
|
920
|
+
return (a, i) => (u(), w(Ye, D({ label: r.value }, {
|
|
920
921
|
buttonProps: a.buttonProps,
|
|
921
922
|
disabled: a.disabled
|
|
922
|
-
}),
|
|
923
|
+
}), Z({
|
|
923
924
|
popper: g(() => [
|
|
924
|
-
m("div",
|
|
925
|
+
m("div", Ze, [
|
|
925
926
|
b(o).item ? (u(!0), f(E, { key: 0 }, R(a.options, (p) => (u(), f("div", {
|
|
926
927
|
key: p.value,
|
|
927
928
|
class: "cursor-pointer",
|
|
@@ -932,7 +933,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
932
933
|
active: a.multiple ? n.value.includes(p.value) : p.value === n.value,
|
|
933
934
|
disabled: a.disabled
|
|
934
935
|
}))
|
|
935
|
-
], 8,
|
|
936
|
+
], 8, et))), 128)) : (u(!0), f(E, { key: 1 }, R(a.options, (p) => A((u(), w(M, {
|
|
936
937
|
key: p.value,
|
|
937
938
|
disabled: a.disabled,
|
|
938
939
|
round: "normal",
|
|
@@ -946,7 +947,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
946
947
|
]),
|
|
947
948
|
_: 2
|
|
948
949
|
}, 1032, ["disabled", "class", "onClick"])), [
|
|
949
|
-
[b(
|
|
950
|
+
[b(Y), a.autoClose]
|
|
950
951
|
])), 128))
|
|
951
952
|
])
|
|
952
953
|
]),
|
|
@@ -972,7 +973,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
972
973
|
},
|
|
973
974
|
emits: ["update:modelValue"],
|
|
974
975
|
setup(l, { emit: t }) {
|
|
975
|
-
const o = T(l, "modelValue", t), n =
|
|
976
|
+
const o = T(l, "modelValue", t), n = be(o);
|
|
976
977
|
return (r, d) => (u(), f("div", {
|
|
977
978
|
class: y([[
|
|
978
979
|
r.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
@@ -1006,7 +1007,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
1006
1007
|
shown: { type: Boolean }
|
|
1007
1008
|
},
|
|
1008
1009
|
setup(l) {
|
|
1009
|
-
return (t, e) => (u(), w(b(
|
|
1010
|
+
return (t, e) => (u(), w(b(re), D({
|
|
1010
1011
|
disabled: t.disabled,
|
|
1011
1012
|
placement: t.placement
|
|
1012
1013
|
}, t.$attrs), {
|
|
@@ -1021,7 +1022,7 @@ const Ke = { class: "$ui-dark-toggle-vtr" }, gt = /* @__PURE__ */ h({
|
|
|
1021
1022
|
}
|
|
1022
1023
|
});
|
|
1023
1024
|
export {
|
|
1024
|
-
|
|
1025
|
+
Oe as THEME_KEY,
|
|
1025
1026
|
dt as VueBadge,
|
|
1026
1027
|
M as VueButton,
|
|
1027
1028
|
ut as VueCard,
|
|
@@ -1029,21 +1030,21 @@ export {
|
|
|
1029
1030
|
pt as VueCodeBlock,
|
|
1030
1031
|
mt as VueConfirm,
|
|
1031
1032
|
gt as VueDarkToggle,
|
|
1032
|
-
|
|
1033
|
+
je as VueDialog,
|
|
1033
1034
|
vt as VueDrawer,
|
|
1034
|
-
|
|
1035
|
+
Ye as VueDropdown,
|
|
1035
1036
|
bt as VueDropdownButton,
|
|
1036
1037
|
yt as VueFormField,
|
|
1037
1038
|
ht as VueIcIcon,
|
|
1038
1039
|
F as VueIcon,
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1040
|
+
Xe as VueInput,
|
|
1041
|
+
te as VueLoadingIndicator,
|
|
1042
|
+
Ae as VueNotification,
|
|
1043
|
+
oe as VueOverlay,
|
|
1043
1044
|
kt as VueSelect,
|
|
1044
1045
|
wt as VueSwitch,
|
|
1045
1046
|
$t as VueTooltip,
|
|
1046
1047
|
ft as showVueNotification,
|
|
1047
|
-
|
|
1048
|
+
We as useDevToolsColorMode,
|
|
1048
1049
|
Bt as vTooltip
|
|
1049
1050
|
};
|
|
@@ -3,11 +3,11 @@ import { ButtonProps } from './Button';
|
|
|
3
3
|
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly "onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
6
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:visible"> &
|
|
6
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:visible"> & ({
|
|
7
7
|
label?: string;
|
|
8
8
|
buttonProps?: ButtonProps;
|
|
9
9
|
buttonClass?: string;
|
|
10
|
-
} & FloatingVueCommonProps)
|
|
10
|
+
} & FloatingVueCommonProps) & Partial<{}>> & import('vue').PublicProps;
|
|
11
11
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
12
12
|
attrs: any;
|
|
13
13
|
slots: Readonly<{
|
|
@@ -28,5 +28,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
28
28
|
autoFocus: boolean;
|
|
29
29
|
loadingDebounceTime: number;
|
|
30
30
|
readonly: boolean;
|
|
31
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
32
|
+
inputRef: HTMLInputElement;
|
|
33
|
+
}, HTMLDivElement>;
|
|
32
34
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import { ButtonProps } from './Button';
|
|
|
2
2
|
declare const _default: <Value extends number | string, Label, M extends boolean>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
4
|
readonly "onUpdate:modelValue"?: ((value: M extends true ? Value[] : Value) => any) | undefined;
|
|
5
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> &
|
|
5
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & {
|
|
6
6
|
modelValue: M extends true ? Value[] : Value;
|
|
7
7
|
multiple?: M;
|
|
8
8
|
options: {
|
|
@@ -14,30 +14,10 @@ declare const _default: <Value extends number | string, Label, M extends boolean
|
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
labelRenderer?: (label: Label) => string;
|
|
16
16
|
buttonProps?: ButtonProps;
|
|
17
|
-
}> & import('vue').PublicProps;
|
|
17
|
+
} & any> & import('vue').PublicProps;
|
|
18
18
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
19
19
|
attrs: any;
|
|
20
|
-
slots:
|
|
21
|
-
item: (props: {
|
|
22
|
-
item: {
|
|
23
|
-
label: Label;
|
|
24
|
-
value: Value;
|
|
25
|
-
};
|
|
26
|
-
active: boolean;
|
|
27
|
-
disabled: boolean;
|
|
28
|
-
}) => any;
|
|
29
|
-
button: () => any;
|
|
30
|
-
}> & {
|
|
31
|
-
item: (props: {
|
|
32
|
-
item: {
|
|
33
|
-
label: Label;
|
|
34
|
-
value: Value;
|
|
35
|
-
};
|
|
36
|
-
active: boolean;
|
|
37
|
-
disabled: boolean;
|
|
38
|
-
}) => any;
|
|
39
|
-
button: () => any;
|
|
40
|
-
};
|
|
20
|
+
slots: any;
|
|
41
21
|
emit: (evt: "update:modelValue", value: M extends true ? Value[] : Value) => void;
|
|
42
22
|
}>) => import('vue').VNode & {
|
|
43
23
|
__ctx?: Awaited<typeof __VLS_setup>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/devtools-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.7.
|
|
4
|
+
"version": "7.7.3",
|
|
5
5
|
"author": "webfansplz",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -37,23 +37,23 @@
|
|
|
37
37
|
"vue": ">=3.0.0-0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@vueuse/components": "^12.
|
|
41
|
-
"@vueuse/core": "^12.
|
|
42
|
-
"@vueuse/integrations": "^12.
|
|
40
|
+
"@vueuse/components": "^12.8.2",
|
|
41
|
+
"@vueuse/core": "^12.8.2",
|
|
42
|
+
"@vueuse/integrations": "^12.8.2",
|
|
43
43
|
"colord": "^2.9.3",
|
|
44
|
-
"focus-trap": "^7.6.
|
|
45
|
-
"@vue/devtools-shared": "7.7.
|
|
44
|
+
"focus-trap": "^7.6.4",
|
|
45
|
+
"@vue/devtools-shared": "7.7.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@histoire/plugin-vue": "^0.17.17",
|
|
49
|
-
"@iconify-json/ic": "^1.2.
|
|
50
|
-
"@types/node": "^22.
|
|
51
|
-
"@unocss/reset": "^0.
|
|
52
|
-
"@vitejs/plugin-vue": "^5.2.
|
|
49
|
+
"@iconify-json/ic": "^1.2.2",
|
|
50
|
+
"@types/node": "^22.13.14",
|
|
51
|
+
"@unocss/reset": "^66.0.0",
|
|
52
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
53
53
|
"floating-vue": "5.2.2",
|
|
54
54
|
"histoire": "^0.17.17",
|
|
55
|
-
"unocss": "^0.
|
|
56
|
-
"vite-plugin-dts": "^4.3
|
|
55
|
+
"unocss": "^66.0.0",
|
|
56
|
+
"vite-plugin-dts": "^4.5.3"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "tsx ./scripts/update-icons.ts && vite build",
|