diff --git a/CHANGELOG.md b/CHANGELOG.md index 45491fb..fe3a595 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to the "vuetify-resize-drawer" plugin will be documented in this file. +## v3.1.4 +2024-03-13 +[main] (@webdevnerdstuff) +* Change component to use `defineAsyncComponent` + ## v3.1.3 2024-02-26 [main] (@webdevnerdstuff) diff --git a/dist/VResizeDrawer-BDG6QtZv.mjs b/dist/VResizeDrawer-BDG6QtZv.mjs new file mode 100644 index 0000000..e136438 --- /dev/null +++ b/dist/VResizeDrawer-BDG6QtZv.mjs @@ -0,0 +1,14 @@ +import o from "./vuetify-resize-drawer.es.js"; +/** + * @name @wdns/vuetify-resize-drawer + * @version 3.1.4 + * @description The vuetify-resize-drawer component extends the functionality of the v-navigation-drawer so that it is resizable by the user. + * @author WebDevNerdStuff & Bunnies... lots and lots of bunnies! (https://webdevnerdstuff.com) + * @copyright Copyright 2024, WebDevNerdStuff + * @homepage https://webdevnerdstuff.github.io/vuetify-resize-drawer/ + * @repository https://github.com/webdevnerdstuff/vuetify-resize-drawer + * @license MIT License + */ +export { + o as default +}; diff --git a/dist/VResizeDrawer-C7RKUquK.js b/dist/VResizeDrawer-C7RKUquK.js new file mode 100644 index 0000000..df3f5ff --- /dev/null +++ b/dist/VResizeDrawer-C7RKUquK.js @@ -0,0 +1,10 @@ +"use strict";/** + * @name @wdns/vuetify-resize-drawer + * @version 3.1.4 + * @description The vuetify-resize-drawer component extends the functionality of the v-navigation-drawer so that it is resizable by the user. + * @author WebDevNerdStuff & Bunnies... lots and lots of bunnies! (https://webdevnerdstuff.com) + * @copyright Copyright 2024, WebDevNerdStuff + * @homepage https://webdevnerdstuff.github.io/vuetify-resize-drawer/ + * @repository https://github.com/webdevnerdstuff/vuetify-resize-drawer + * @license MIT License + */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./vuetify-resize-drawer.cjs.js");exports.default=e.default; diff --git a/dist/vuetify-resize-drawer.cjs.js b/dist/vuetify-resize-drawer.cjs.js index 89c4416..a2ccbf2 100644 --- a/dist/vuetify-resize-drawer.cjs.js +++ b/dist/vuetify-resize-drawer.cjs.js @@ -1,11 +1,11 @@ "use strict";/** * @name @wdns/vuetify-resize-drawer - * @version 3.1.3 + * @version 3.1.4 * @description The vuetify-resize-drawer component extends the functionality of the v-navigation-drawer so that it is resizable by the user. * @author WebDevNerdStuff & Bunnies... lots and lots of bunnies! (https://webdevnerdstuff.com) * @copyright Copyright 2024, WebDevNerdStuff * @homepage https://webdevnerdstuff.github.io/vuetify-resize-drawer/ * @repository https://github.com/webdevnerdstuff/vuetify-resize-drawer * @license MIT License - */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),_=require("vuetify"),he=require("vuetify/components"),ve=require("vuetify/lib/components/VIcon/index.mjs"),w="v-resize-drawer",me={handleBorderWidth:8,handleColor:"primary",handleIcon:void 0,handleIconSize:"x-small",handlePosition:"center",height:void 0,location:"start",maxWidth:window.innerWidth,minWidth:56,modelValue:!0,name:void 0,rail:!1,railWidth:8,resizable:!0,saveWidth:!0,storageName:`${w}-width`,storageType:"local",tag:"nav",theme:void 0,touchless:!1,width:256,widthSnapBack:!0};function T(s,u){return s==="local"?localStorage.getItem(u):s==="session"?sessionStorage.getItem(u):""}const P=s=>{const{action:u="update",rail:i,resizedWidth:r,saveWidth:v,storageName:e,storageType:h}=s;if(!v||i)return;let c=r;c=c??void 0,u==="set"&&(c=T(h,e)??"",c=c||r),h==="local"&&localStorage.setItem(e,String(c)),h==="session"&&sessionStorage.setItem(e,String(c))},b=s=>{const{unit:u="px",value:i}=s;if(i!=null&&i!=="")return+i?`${Number(i)}${u}`:String(i)},W=s=>{const u=window.innerWidth,i=function(r){if(typeof r=="string"){const v=/(\d+(\.\d+)?)(\s*([a-zA-Z]+))?/,e=r.match(v);if(!e)return r;const h=parseFloat(e[1]),c=e[4];if(!isNaN(h)){const m=Math.round(h);return c?`${m} ${c}`:`${m}`}return r}return typeof r=="number"?Math.round(r):r}(s);return typeof s=="string"&&s.includes("%")?Number(s.replace("%",""))/100*u:typeof i=="string"?Number(i.replace(/\D/g,"")):i};function Y(s){let u=function(g){const F={AliceBlue:"#F0F8FF",AntiqueWhite:"#FAEBD7",Aqua:"#00FFFF",Aquamarine:"#7FFFD4",Azure:"#F0FFFF",Beige:"#F5F5DC",Bisque:"#FFE4C4",Black:"#000000",BlanchedAlmond:"#FFEBCD",Blue:"#0000FF",BlueViolet:"#8A2BE2",Brown:"#A52A2A",BurlyWood:"#DEB887",CadetBlue:"#5F9EA0",Chartreuse:"#7FFF00",Chocolate:"#D2691E",Coral:"#FF7F50",CornflowerBlue:"#6495ED",Cornsilk:"#FFF8DC",Crimson:"#DC143C",Cyan:"#00FFFF",DarkBlue:"#00008B",DarkCyan:"#008B8B",DarkGoldenRod:"#B8860B",DarkGray:"#A9A9A9",DarkGreen:"#006400",DarkGrey:"#A9A9A9",DarkKhaki:"#BDB76B",DarkMagenta:"#8B008B",DarkOliveGreen:"#556B2F",DarkOrange:"#FF8C00",DarkOrchid:"#9932CC",DarkRed:"#8B0000",DarkSalmon:"#E9967A",DarkSeaGreen:"#8FBC8F",DarkSlateBlue:"#483D8B",DarkSlateGray:"#2F4F4F",DarkSlateGrey:"#2F4F4F",DarkTurquoise:"#00CED1",DarkViolet:"#9400D3",DeepPink:"#FF1493",DeepSkyBlue:"#00BFFF",DimGray:"#696969",DimGrey:"#696969",DodgerBlue:"#1E90FF",FireBrick:"#B22222",FloralWhite:"#FFFAF0",ForestGreen:"#228B22",Fuchsia:"#FF00FF",Gainsboro:"#DCDCDC",GhostWhite:"#F8F8FF",Gold:"#FFD700",GoldenRod:"#DAA520",Gray:"#808080",Green:"#008000",GreenYellow:"#ADFF2F",Grey:"#808080",HoneyDew:"#F0FFF0",HotPink:"#FF69B4",IndianRed:"#CD5C5C",Indigo:"#4B0082",Ivory:"#FFFFF0",Khaki:"#F0E68C",Lavender:"#E6E6FA",LavenderBlush:"#FFF0F5",LawnGreen:"#7CFC00",LemonChiffon:"#FFFACD",LightBlue:"#ADD8E6",LightCoral:"#F08080",LightCyan:"#E0FFFF",LightGoldenRodYellow:"#FAFAD2",LightGray:"#D3D3D3",LightGreen:"#90EE90",LightGrey:"#D3D3D3",LightPink:"#FFB6C1",LightSalmon:"#FFA07A",LightSeaGreen:"#20B2AA",LightSkyBlue:"#87CEFA",LightSlateGray:"#778899",LightSlateGrey:"#778899",LightSteelBlue:"#B0C4DE",LightYellow:"#FFFFE0",Lime:"#00FF00",LimeGreen:"#32CD32",Linen:"#FAF0E6",Magenta:"#FF00FF",Maroon:"#800000",MediumAquaMarine:"#66CDAA",MediumBlue:"#0000CD",MediumOrchid:"#BA55D3",MediumPurple:"#9370DB",MediumSeaGreen:"#3CB371",MediumSlateBlue:"#7B68EE",MediumSpringGreen:"#00FA9A",MediumTurquoise:"#48D1CC",MediumVioletRed:"#C71585",MidnightBlue:"#191970",MintCream:"#F5FFFA",MistyRose:"#FFE4E1",Moccasin:"#FFE4B5",NavajoWhite:"#FFDEAD",Navy:"#000080",OldLace:"#FDF5E6",Olive:"#808000",OliveDrab:"#6B8E23",Orange:"#FFA500",OrangeRed:"#FF4500",Orchid:"#DA70D6",PaleGoldenRod:"#EEE8AA",PaleGreen:"#98FB98",PaleTurquoise:"#AFEEEE",PaleVioletRed:"#DB7093",PapayaWhip:"#FFEFD5",PeachPuff:"#FFDAB9",Peru:"#CD853F",Pink:"#FFC0CB",Plum:"#DDA0DD",PowderBlue:"#B0E0E6",Purple:"#800080",RebeccaPurple:"#663399",Red:"#FF0000",RosyBrown:"#BC8F8F",RoyalBlue:"#4169E1",SaddleBrown:"#8B4513",Salmon:"#FA8072",SandyBrown:"#F4A460",SeaGreen:"#2E8B57",SeaShell:"#FFF5EE",Sienna:"#A0522D",Silver:"#C0C0C0",SkyBlue:"#87CEEB",SlateBlue:"#6A5ACD",SlateGray:"#708090",SlateGrey:"#708090",Snow:"#FFFAFA",SpringGreen:"#00FF7F",SteelBlue:"#4682B4",Tan:"#D2B48C",Teal:"#008080",Thistle:"#D8BFD8",Tomato:"#FF6347",Turquoise:"#40E0D0",Violet:"#EE82EE",Wheat:"#F5DEB3",White:"#FFFFFF",WhiteSmoke:"#F5F5F5",Yellow:"#FFFF00",YellowGreen:"#9ACD32"};let B=g;return Object.entries(F).forEach(([E,k])=>{g.toLowerCase()!=E.toLowerCase()||(B=k)}),B}(s),i=0,r=0,v=0,e=0,h=0,c=0;if(u.substring(0,1)==="#")u=function(g){let F=g.replace("#","");F.length===3&&(F=F.split("").map(d=>d+d).join(""));const B=parseInt(F.substring(0,2),16),E=parseInt(F.substring(2,4),16),k=parseInt(F.substring(4,6),16);return[B,E,k]}(u);else if(u.includes("rgb"))u=[...u.matchAll(/\d+/g)].map(Number);else if(u.includes("hsl"))return u=[...u.matchAll(/\d+/g)].map(Number),i=u[0],r=u[1],v=u[2],`${i} ${r}% ${v}%`;[e,h,c]=u,e/=255,h/=255,c/=255;const m=Math.max(e,h,c),D=Math.min(e,h,c);if(m===null||!D===null||isNaN(m)||isNaN(D))return"0 0% 100% / 12%";if(i=(m+D)/2,r=(m+D)/2,v=(m+D)/2,m==D)i=r=0;else{const g=m-D;switch(r=v>.5?g/(2-m-D):g/(m+D),m){case e:i=(h-c)/g+(h{if(function(r){return r==="transparent"||r==="none"||r==="inherit"||r==="currentColor"||r==="initial"||r==="unset"}(s))return s;if(function(r){return r.includes("--v-theme")}(s))return`rgb(var(${s}))`;const i=function(r,v){const e=v.global.current.value.colors;return Object.entries(e).find(([h])=>h===r)}(s,u);return i?`hsl(${Y(i[1])})`:`hsl(${Y(s)})`},Fe={default:"1.5em",large:"1.75em",small:"1.25em","x-large":"2em","x-small":"1em"},pe={fa:{bottom:"fas fa-grip",center:"fas fa-angles-right",top:"fas fa-grip"},mdi:{bottom:"mdi:mdi-dots-grid",center:"mdi:mdi-chevron-double-right",top:"mdi:mdi-dots-grid"}},fe={key:0,class:"v-resize-drawer--handle-slot"},V=n.defineComponent({__name:"VResizeDrawer",props:n.mergeDefaults({absolute:{},expandOnHover:{},floating:{},handleBorderWidth:{},handleColor:{},handleIcon:{},handleIconSize:{},handlePosition:{},height:{},image:{},location:{},maxWidth:{},minWidth:{},modelValue:{},name:{},rail:{},railWidth:{},resizable:{type:Boolean},saveWidth:{type:Boolean},storageName:{},storageType:{},tag:{},temporary:{},theme:{},touchless:{type:Boolean},width:{},widthSnapBack:{type:Boolean}},{...me}),emits:["close","drawer:mouseenter","drawer:mouseleave","handle:click","handle:dblclick","handle:drag","handle:mousedown","handle:mouseup","handle:touchend","handle:touchmove","handle:touchstart","update:modelValue"],setup(s,{emit:u}){const i=u,r=s,v=n.inject(x,{}),e=n.ref({...r,...v});n.watchEffect(()=>{e.value={...r,...v}});const{handleIconSize:h,handlePosition:c}=n.toRefs(e.value),m=n.computed(()=>e.value),D=n.inject(Symbol.for("vuetify:icons")),g=n.ref(256),F={mouseDown:!1,mouseUp:!0},B=n.ref(!1),E=n.ref(!1),k=n.ref(),d=n.ref(256),$=n.useSlots(),z=_.useTheme(),K=_.useDisplay();n.onBeforeMount(()=>{e.value.name===void 0&&(e.value.name=String(Math.floor(1e8*Math.random())))}),n.onMounted(()=>{(function(){if(e.value.location!=="start"&&e.value.location!=="end"&&e.value.location!=="left"&&e.value.location!=="right")throw new Error("[VResizeDrawer]: 'top' and 'bottom' locations are not supported.");if(e.value.rail)return void(d.value=e.value.railWidth||void 0);const a=T(e.value.storageType,e.value.storageName),t=b({value:e.value.width});d.value=t,g.value=d.value,e.value.saveWidth&&a&&!e.value.rail&&(d.value=T(e.value.storageType,e.value.storageName)),d.value=W(d.value),P({action:"update",rail:e.value.rail,resizedWidth:d.value,saveWidth:e.value.saveWidth,storageName:e.value.storageName,storageType:e.value.storageType})})()}),n.onUnmounted(()=>{document.removeEventListener("mouseup",G,!1),document.removeEventListener("mousemove",N,!1),document.removeEventListener("touchend",I,!1),document.removeEventListener("touchstart",U,!1)}),n.watch(()=>r.modelValue,a=>{i("update:modelValue",a),a||i("close")});const Z=n.computed(()=>(a=>{const{absolute:t=!1,expandOnHover:o,floating:l,isMouseover:p,location:f,rail:y,railWidth:A,temporary:S}=a;return{[`${w}`]:!0,"v-navigation-drawer--absolute":t??!1,"v-navigation-drawer--custom-rail":Number(A)!==56,"v-navigation-drawer--fixed":!t,"v-navigation-drawer--floating":l,"v-navigation-drawer--is-mouseover":n.unref(p),"v-navigation-drawer--left":f==="left"||f==="start"||f===void 0,"v-navigation-drawer--open-on-hover":o,"v-navigation-drawer--rail":y??!1,"v-navigation-drawer--right":f==="right"||f==="end","v-navigation-drawer--temporary":S||!1}})({absolute:e.value.absolute,expandOnHover:e.value.expandOnHover,floating:e.value.floating,isMouseover:B,location:e.value.location,rail:e.value.rail,railWidth:e.value.railWidth,temporary:e.value.temporary})),J=n.computed(()=>(a=>{const{isMouseDown:t,maxWidth:o,minWidth:l,rail:p,railWidth:f,resizedWidth:y,widthSnapBack:A}=a;if(p)return{};let S=p?f:n.unref(y);return A||(parseInt(S)>=parseInt(o)&&(S=parseInt(o)),parseInt(S)<=parseInt(l)&&(S=parseInt(l))),{transitionDuration:n.unref(t)?"0s":".2s",width:b({value:S})}})({isMouseDown:E,maxWidth:M.value,minWidth:L.value,rail:e.value.rail,railWidth:e.value.railWidth,resizedWidth:d,widthSnapBack:e.value.widthSnapBack})),Q=n.computed(()=>{if(e.value.rail)return;const a=b({value:d.value});return W(a)}),ee=n.computed(()=>(a=>{const{drawerLocation:t,handlePosition:o}=a;return{[`${w}--handle-container`]:!0,[`${w}--handle-container-position-${o}`]:!0,[`${w}--handle-container-parent-${t}`]:!0}})({drawerLocation:e.value.location,handlePosition:e.value.handlePosition})),ne=n.computed(()=>(a=>{const{borderWidth:t,handleColor:o,iconSize:l,position:p,theme:f}=a;if(p==="border")return{backgroundColor:X(o,f),height:"100%",width:b({value:t})};const y=Fe[l];return{backgroundColor:"transparent",height:y,width:y}})({borderWidth:e.value.handleBorderWidth||1,handleColor:e.value.handleColor,iconSize:e.value.handleIconSize,position:e.value.handlePosition,theme:z})),ae=n.computed(()=>(!e.value.touchless||!K.mobile.value)&&!(!e.value.resizable||e.value.rail)),te=n.computed(()=>(a=>{const{color:t,theme:o}=a;return{color:X(t,o)}})({color:r.handleColor,theme:z})),oe=n.computed(()=>(a=>{const{drawerLocation:t,handlePosition:o,iconOptions:l,isUserIcon:p}=a;return{[`${w}--handle-container-icon`]:!0,[`${w}--handle-container-icon-${o}-${t}`]:!0,[`${w}--handle-container-icon-user-icon`]:p,[`${w}--handle-container-icon-fa`]:(l==null?void 0:l.defaultSet)==="fa",[`${w}--handle-container-icon-fa-${o}`]:(l==null?void 0:l.defaultSet)==="fa"}})({drawerLocation:e.value.location,handlePosition:e.value.handlePosition,iconOptions:D,isUserIcon:e.value.handleIcon!==void 0&&e.value.handleIcon!==null})),re=n.computed(()=>(t=>{const{icon:o,iconOptions:l,name:p}=t;if(p==="border")return;if(o)return o;let f=((l==null?void 0:l.defaultSet)??"").toLowerCase();f=f==="fa"||f==="fasvg"?"fa":f;const y=pe[f];if(!y)throw new Error(`[VResizeDrawer]: No default ${l==null?void 0:l.defaultSet} icon set found.`);const A=y[p];if(!A)throw new Error(`[VResizeDrawer]: No ${p} icon found.`);return A})({icon:e.value.handleIcon,iconOptions:D,name:e.value.handlePosition}));function ie(){B.value=!0,i("drawer:mouseenter",B.value)}function le(){B.value=!1,i("drawer:mouseleave",B.value)}function O(a,t){let o=t;e.value.location!=="right"&&e.value.location!=="end"||(o=document.body.scrollWidth-o),d.value=b({value:o})||void 0,document.body.style.cursor="grabbing",C("handle:touchmove",a),C("handle:drag",a)}function R(a){var t;O(a,((t=a.touches[0])==null?void 0:t.clientX)??0)}function N(a){O(a,a.clientX)}const M=n.computed(()=>{if(e.value.maxWidth==="100%")return window.innerWidth;if(String(e.value.maxWidth).includes("%")){const a=parseInt(String(e.value.maxWidth).replace("%",""));return window.innerWidth*a/100}return e.value.maxWidth}),L=n.computed(()=>{if(e.value.minWidth==="100%")return window.innerWidth;if(String(e.value.minWidth).includes("%")){const a=parseInt(String(e.value.minWidth).replace("%",""));return window.innerWidth*a/100}return e.value.minWidth});function q(a){let t=a;parseInt(t)>=parseInt(M.value)&&(t=parseInt(M.value)),parseInt(t)<=parseInt(L.value)&&(t=parseInt(L.value)),typeof t=="number"&&(t=Math.round(t));let o=W(t);const l=W(M.value),p=W(L.value);return o>=l&&(o=l),p>=o&&(o=p),o}function ue(a){C("handle:click",a)}function de(a){d.value=W(g.value),P({rail:e.value.rail,resizedWidth:d.value,saveWidth:e.value.saveWidth,storageName:e.value.storageName,storageType:e.value.storageType}),C("handle:dblclick",a)}function j(a,t){a.preventDefault(),a.stopPropagation();const o=a.type;let l=25;E.value=!0,e.value.handlePosition==="border"&&(l=e.value.handleBorderWidth||1),F.mouseUp=!1,te.value.theme?e.value.theme:z.global.current.value.dark===!0?"dark":"light");function C(a,t){const o=parseInt(q(d.value))??0,l={e:t,eventName:a,offsetWidth:window.innerWidth-o+"px",resizedWidth:`${o}px`,width:`${o}px`};i(a,l)}return(a,t)=>(n.openBlock(),n.createBlock(n.unref(he.VNavigationDrawer),n.mergeProps(n.unref(m),{ref_key:"resizeDrawer",ref:k,class:n.unref(Z),location:n.unref(e).location,"model-value":a.modelValue,name:n.unref(e).name,style:n.unref(J),tag:n.unref(e).tag,theme:n.unref(ce),width:n.unref(Q),onMouseenter:ie,onMouseleave:le}),{default:n.withCtx(()=>[n.unref(ae)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(n.unref(ee)),style:n.normalizeStyle(n.unref(ne)),onClick:ue,onDblclick:de,onMousedown:se,onMouseup:G,onTouchend:I,onTouchstart:U},[n.unref($).handle?(n.openBlock(),n.createElementBlock("div",fe,[n.renderSlot(a.$slots,"handle")])):n.unref(c)!=="border"?(n.openBlock(),n.createBlock(ve.VIcon,{key:1,class:n.normalizeClass(["v-resize-drawer--handle-icon",n.unref(oe)]),icon:n.unref(re),size:n.unref(h),style:n.normalizeStyle(n.unref(te))},null,8,["class","icon","size","style"])):n.createCommentVNode("",!0)],38)):n.createCommentVNode("",!0),n.unref($).prepend?n.renderSlot(a.$slots,"prepend",{key:1}):n.createCommentVNode("",!0),n.renderSlot(a.$slots,"default"),n.unref($).append?n.renderSlot(a.$slots,"append",{key:2}):n.createCommentVNode("",!0)]),_:3},16,["class","location","model-value","name","style","tag","theme","width"]))}}),x=Symbol();exports.VResizeDrawer=V,exports.createVResizeDrawer=function(s={}){return{install:u=>{u.provide(x,s),u.component("VResizeDrawer",V)}}},exports.default=V,exports.globalOptions=x; + */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),H=require("vuetify"),he=require("vuetify/components"),ve=require("vuetify/lib/components/VIcon/index.mjs"),w="v-resize-drawer",me={handleBorderWidth:8,handleColor:"primary",handleIcon:void 0,handleIconSize:"x-small",handlePosition:"center",height:void 0,location:"start",maxWidth:window.innerWidth,minWidth:56,modelValue:!0,name:void 0,rail:!1,railWidth:8,resizable:!0,saveWidth:!0,storageName:`${w}-width`,storageType:"local",tag:"nav",theme:void 0,touchless:!1,width:256,widthSnapBack:!0};function V(s,u){return s==="local"?localStorage.getItem(u):s==="session"?sessionStorage.getItem(u):""}const N=s=>{const{action:u="update",rail:i,resizedWidth:r,saveWidth:v,storageName:e,storageType:h}=s;if(!v||i)return;let c=r;c=c??void 0,u==="set"&&(c=V(h,e)??"",c=c||r),h==="local"&&localStorage.setItem(e,String(c)),h==="session"&&sessionStorage.setItem(e,String(c))},b=s=>{const{unit:u="px",value:i}=s;if(i!=null&&i!=="")return+i?`${Number(i)}${u}`:String(i)},W=s=>{const u=window.innerWidth,i=function(r){if(typeof r=="string"){const v=/(\d+(\.\d+)?)(\s*([a-zA-Z]+))?/,e=r.match(v);if(!e)return r;const h=parseFloat(e[1]),c=e[4];if(!isNaN(h)){const m=Math.round(h);return c?`${m} ${c}`:`${m}`}return r}return typeof r=="number"?Math.round(r):r}(s);return typeof s=="string"&&s.includes("%")?Number(s.replace("%",""))/100*u:typeof i=="string"?Number(i.replace(/\D/g,"")):i};function _(s){let u=function(g){const F={AliceBlue:"#F0F8FF",AntiqueWhite:"#FAEBD7",Aqua:"#00FFFF",Aquamarine:"#7FFFD4",Azure:"#F0FFFF",Beige:"#F5F5DC",Bisque:"#FFE4C4",Black:"#000000",BlanchedAlmond:"#FFEBCD",Blue:"#0000FF",BlueViolet:"#8A2BE2",Brown:"#A52A2A",BurlyWood:"#DEB887",CadetBlue:"#5F9EA0",Chartreuse:"#7FFF00",Chocolate:"#D2691E",Coral:"#FF7F50",CornflowerBlue:"#6495ED",Cornsilk:"#FFF8DC",Crimson:"#DC143C",Cyan:"#00FFFF",DarkBlue:"#00008B",DarkCyan:"#008B8B",DarkGoldenRod:"#B8860B",DarkGray:"#A9A9A9",DarkGreen:"#006400",DarkGrey:"#A9A9A9",DarkKhaki:"#BDB76B",DarkMagenta:"#8B008B",DarkOliveGreen:"#556B2F",DarkOrange:"#FF8C00",DarkOrchid:"#9932CC",DarkRed:"#8B0000",DarkSalmon:"#E9967A",DarkSeaGreen:"#8FBC8F",DarkSlateBlue:"#483D8B",DarkSlateGray:"#2F4F4F",DarkSlateGrey:"#2F4F4F",DarkTurquoise:"#00CED1",DarkViolet:"#9400D3",DeepPink:"#FF1493",DeepSkyBlue:"#00BFFF",DimGray:"#696969",DimGrey:"#696969",DodgerBlue:"#1E90FF",FireBrick:"#B22222",FloralWhite:"#FFFAF0",ForestGreen:"#228B22",Fuchsia:"#FF00FF",Gainsboro:"#DCDCDC",GhostWhite:"#F8F8FF",Gold:"#FFD700",GoldenRod:"#DAA520",Gray:"#808080",Green:"#008000",GreenYellow:"#ADFF2F",Grey:"#808080",HoneyDew:"#F0FFF0",HotPink:"#FF69B4",IndianRed:"#CD5C5C",Indigo:"#4B0082",Ivory:"#FFFFF0",Khaki:"#F0E68C",Lavender:"#E6E6FA",LavenderBlush:"#FFF0F5",LawnGreen:"#7CFC00",LemonChiffon:"#FFFACD",LightBlue:"#ADD8E6",LightCoral:"#F08080",LightCyan:"#E0FFFF",LightGoldenRodYellow:"#FAFAD2",LightGray:"#D3D3D3",LightGreen:"#90EE90",LightGrey:"#D3D3D3",LightPink:"#FFB6C1",LightSalmon:"#FFA07A",LightSeaGreen:"#20B2AA",LightSkyBlue:"#87CEFA",LightSlateGray:"#778899",LightSlateGrey:"#778899",LightSteelBlue:"#B0C4DE",LightYellow:"#FFFFE0",Lime:"#00FF00",LimeGreen:"#32CD32",Linen:"#FAF0E6",Magenta:"#FF00FF",Maroon:"#800000",MediumAquaMarine:"#66CDAA",MediumBlue:"#0000CD",MediumOrchid:"#BA55D3",MediumPurple:"#9370DB",MediumSeaGreen:"#3CB371",MediumSlateBlue:"#7B68EE",MediumSpringGreen:"#00FA9A",MediumTurquoise:"#48D1CC",MediumVioletRed:"#C71585",MidnightBlue:"#191970",MintCream:"#F5FFFA",MistyRose:"#FFE4E1",Moccasin:"#FFE4B5",NavajoWhite:"#FFDEAD",Navy:"#000080",OldLace:"#FDF5E6",Olive:"#808000",OliveDrab:"#6B8E23",Orange:"#FFA500",OrangeRed:"#FF4500",Orchid:"#DA70D6",PaleGoldenRod:"#EEE8AA",PaleGreen:"#98FB98",PaleTurquoise:"#AFEEEE",PaleVioletRed:"#DB7093",PapayaWhip:"#FFEFD5",PeachPuff:"#FFDAB9",Peru:"#CD853F",Pink:"#FFC0CB",Plum:"#DDA0DD",PowderBlue:"#B0E0E6",Purple:"#800080",RebeccaPurple:"#663399",Red:"#FF0000",RosyBrown:"#BC8F8F",RoyalBlue:"#4169E1",SaddleBrown:"#8B4513",Salmon:"#FA8072",SandyBrown:"#F4A460",SeaGreen:"#2E8B57",SeaShell:"#FFF5EE",Sienna:"#A0522D",Silver:"#C0C0C0",SkyBlue:"#87CEEB",SlateBlue:"#6A5ACD",SlateGray:"#708090",SlateGrey:"#708090",Snow:"#FFFAFA",SpringGreen:"#00FF7F",SteelBlue:"#4682B4",Tan:"#D2B48C",Teal:"#008080",Thistle:"#D8BFD8",Tomato:"#FF6347",Turquoise:"#40E0D0",Violet:"#EE82EE",Wheat:"#F5DEB3",White:"#FFFFFF",WhiteSmoke:"#F5F5F5",Yellow:"#FFFF00",YellowGreen:"#9ACD32"};let B=g;return Object.entries(F).forEach(([E,k])=>{g.toLowerCase()!=E.toLowerCase()||(B=k)}),B}(s),i=0,r=0,v=0,e=0,h=0,c=0;if(u.substring(0,1)==="#")u=function(g){let F=g.replace("#","");F.length===3&&(F=F.split("").map(d=>d+d).join(""));const B=parseInt(F.substring(0,2),16),E=parseInt(F.substring(2,4),16),k=parseInt(F.substring(4,6),16);return[B,E,k]}(u);else if(u.includes("rgb"))u=[...u.matchAll(/\d+/g)].map(Number);else if(u.includes("hsl"))return u=[...u.matchAll(/\d+/g)].map(Number),i=u[0],r=u[1],v=u[2],`${i} ${r}% ${v}%`;[e,h,c]=u,e/=255,h/=255,c/=255;const m=Math.max(e,h,c),D=Math.min(e,h,c);if(m===null||!D===null||isNaN(m)||isNaN(D))return"0 0% 100% / 12%";if(i=(m+D)/2,r=(m+D)/2,v=(m+D)/2,m==D)i=r=0;else{const g=m-D;switch(r=v>.5?g/(2-m-D):g/(m+D),m){case e:i=(h-c)/g+(h{if(function(r){return r==="transparent"||r==="none"||r==="inherit"||r==="currentColor"||r==="initial"||r==="unset"}(s))return s;if(function(r){return r.includes("--v-theme")}(s))return`rgb(var(${s}))`;const i=function(r,v){const e=v.global.current.value.colors;return Object.entries(e).find(([h])=>h===r)}(s,u);return i?`hsl(${_(i[1])})`:`hsl(${_(s)})`},Fe={default:"1.5em",large:"1.75em",small:"1.25em","x-large":"2em","x-small":"1em"},pe={fa:{bottom:"fas fa-grip",center:"fas fa-angles-right",top:"fas fa-grip"},mdi:{bottom:"mdi:mdi-dots-grid",center:"mdi:mdi-chevron-double-right",top:"mdi:mdi-dots-grid"}},fe={key:0,class:"v-resize-drawer--handle-slot"},X=n.defineComponent({__name:"VResizeDrawer",props:n.mergeDefaults({absolute:{},expandOnHover:{},floating:{},handleBorderWidth:{},handleColor:{},handleIcon:{},handleIconSize:{},handlePosition:{},height:{},image:{},location:{},maxWidth:{},minWidth:{},modelValue:{},name:{},rail:{},railWidth:{},resizable:{type:Boolean},saveWidth:{type:Boolean},storageName:{},storageType:{},tag:{},temporary:{},theme:{},touchless:{type:Boolean},width:{},widthSnapBack:{type:Boolean}},{...me}),emits:["close","drawer:mouseenter","drawer:mouseleave","handle:click","handle:dblclick","handle:drag","handle:mousedown","handle:mouseup","handle:touchend","handle:touchmove","handle:touchstart","update:modelValue"],setup(s,{emit:u}){const i=u,r=s,v=n.inject(T,{}),e=n.ref({...r,...v});n.watchEffect(()=>{e.value={...r,...v}});const{handleIconSize:h,handlePosition:c}=n.toRefs(e.value),m=n.computed(()=>e.value),D=n.inject(Symbol.for("vuetify:icons")),g=n.ref(256),F={mouseDown:!1,mouseUp:!0},B=n.ref(!1),E=n.ref(!1),k=n.ref(),d=n.ref(256),$=n.useSlots(),z=H.useTheme(),K=H.useDisplay();n.onBeforeMount(()=>{e.value.name===void 0&&(e.value.name=String(Math.floor(1e8*Math.random())))}),n.onMounted(()=>{(function(){if(e.value.location!=="start"&&e.value.location!=="end"&&e.value.location!=="left"&&e.value.location!=="right")throw new Error("[VResizeDrawer]: 'top' and 'bottom' locations are not supported.");if(e.value.rail)return void(d.value=e.value.railWidth||void 0);const t=V(e.value.storageType,e.value.storageName),a=b({value:e.value.width});d.value=a,g.value=d.value,e.value.saveWidth&&t&&!e.value.rail&&(d.value=V(e.value.storageType,e.value.storageName)),d.value=W(d.value),N({action:"update",rail:e.value.rail,resizedWidth:d.value,saveWidth:e.value.saveWidth,storageName:e.value.storageName,storageType:e.value.storageType})})()}),n.onUnmounted(()=>{document.removeEventListener("mouseup",G,!1),document.removeEventListener("mousemove",P,!1),document.removeEventListener("touchend",I,!1),document.removeEventListener("touchstart",j,!1)}),n.watch(()=>r.modelValue,t=>{i("update:modelValue",t),t||i("close")});const Z=n.computed(()=>(t=>{const{absolute:a=!1,expandOnHover:o,floating:l,isMouseover:p,location:f,rail:y,railWidth:A,temporary:S}=t;return{[`${w}`]:!0,"v-navigation-drawer--absolute":a??!1,"v-navigation-drawer--custom-rail":Number(A)!==56,"v-navigation-drawer--fixed":!a,"v-navigation-drawer--floating":l,"v-navigation-drawer--is-mouseover":n.unref(p),"v-navigation-drawer--left":f==="left"||f==="start"||f===void 0,"v-navigation-drawer--open-on-hover":o,"v-navigation-drawer--rail":y??!1,"v-navigation-drawer--right":f==="right"||f==="end","v-navigation-drawer--temporary":S||!1}})({absolute:e.value.absolute,expandOnHover:e.value.expandOnHover,floating:e.value.floating,isMouseover:B,location:e.value.location,rail:e.value.rail,railWidth:e.value.railWidth,temporary:e.value.temporary})),J=n.computed(()=>(t=>{const{isMouseDown:a,maxWidth:o,minWidth:l,rail:p,railWidth:f,resizedWidth:y,widthSnapBack:A}=t;if(p)return{};let S=p?f:n.unref(y);return A||(parseInt(S)>=parseInt(o)&&(S=parseInt(o)),parseInt(S)<=parseInt(l)&&(S=parseInt(l))),{transitionDuration:n.unref(a)?"0s":".2s",width:b({value:S})}})({isMouseDown:E,maxWidth:M.value,minWidth:L.value,rail:e.value.rail,railWidth:e.value.railWidth,resizedWidth:d,widthSnapBack:e.value.widthSnapBack})),Q=n.computed(()=>{if(e.value.rail)return;const t=b({value:d.value});return W(t)}),ee=n.computed(()=>(t=>{const{drawerLocation:a,handlePosition:o}=t;return{[`${w}--handle-container`]:!0,[`${w}--handle-container-position-${o}`]:!0,[`${w}--handle-container-parent-${a}`]:!0}})({drawerLocation:e.value.location,handlePosition:e.value.handlePosition})),ne=n.computed(()=>(t=>{const{borderWidth:a,handleColor:o,iconSize:l,position:p,theme:f}=t;if(p==="border")return{backgroundColor:Y(o,f),height:"100%",width:b({value:a})};const y=Fe[l];return{backgroundColor:"transparent",height:y,width:y}})({borderWidth:e.value.handleBorderWidth||1,handleColor:e.value.handleColor,iconSize:e.value.handleIconSize,position:e.value.handlePosition,theme:z})),te=n.computed(()=>(!e.value.touchless||!K.mobile.value)&&!(!e.value.resizable||e.value.rail)),ae=n.computed(()=>(t=>{const{color:a,theme:o}=t;return{color:Y(a,o)}})({color:r.handleColor,theme:z})),oe=n.computed(()=>(t=>{const{drawerLocation:a,handlePosition:o,iconOptions:l,isUserIcon:p}=t;return{[`${w}--handle-container-icon`]:!0,[`${w}--handle-container-icon-${o}-${a}`]:!0,[`${w}--handle-container-icon-user-icon`]:p,[`${w}--handle-container-icon-fa`]:(l==null?void 0:l.defaultSet)==="fa",[`${w}--handle-container-icon-fa-${o}`]:(l==null?void 0:l.defaultSet)==="fa"}})({drawerLocation:e.value.location,handlePosition:e.value.handlePosition,iconOptions:D,isUserIcon:e.value.handleIcon!==void 0&&e.value.handleIcon!==null})),re=n.computed(()=>(a=>{const{icon:o,iconOptions:l,name:p}=a;if(p==="border")return;if(o)return o;let f=((l==null?void 0:l.defaultSet)??"").toLowerCase();f=f==="fa"||f==="fasvg"?"fa":f;const y=pe[f];if(!y)throw new Error(`[VResizeDrawer]: No default ${l==null?void 0:l.defaultSet} icon set found.`);const A=y[p];if(!A)throw new Error(`[VResizeDrawer]: No ${p} icon found.`);return A})({icon:e.value.handleIcon,iconOptions:D,name:e.value.handlePosition}));function ie(){B.value=!0,i("drawer:mouseenter",B.value)}function le(){B.value=!1,i("drawer:mouseleave",B.value)}function x(t,a){let o=a;e.value.location!=="right"&&e.value.location!=="end"||(o=document.body.scrollWidth-o),d.value=b({value:o})||void 0,document.body.style.cursor="grabbing",C("handle:touchmove",t),C("handle:drag",t)}function O(t){var a;x(t,((a=t.touches[0])==null?void 0:a.clientX)??0)}function P(t){x(t,t.clientX)}const M=n.computed(()=>{if(e.value.maxWidth==="100%")return window.innerWidth;if(String(e.value.maxWidth).includes("%")){const t=parseInt(String(e.value.maxWidth).replace("%",""));return window.innerWidth*t/100}return e.value.maxWidth}),L=n.computed(()=>{if(e.value.minWidth==="100%")return window.innerWidth;if(String(e.value.minWidth).includes("%")){const t=parseInt(String(e.value.minWidth).replace("%",""));return window.innerWidth*t/100}return e.value.minWidth});function R(t){let a=t;parseInt(a)>=parseInt(M.value)&&(a=parseInt(M.value)),parseInt(a)<=parseInt(L.value)&&(a=parseInt(L.value)),typeof a=="number"&&(a=Math.round(a));let o=W(a);const l=W(M.value),p=W(L.value);return o>=l&&(o=l),p>=o&&(o=p),o}function ue(t){C("handle:click",t)}function de(t){d.value=W(g.value),N({rail:e.value.rail,resizedWidth:d.value,saveWidth:e.value.saveWidth,storageName:e.value.storageName,storageType:e.value.storageType}),C("handle:dblclick",t)}function q(t,a){t.preventDefault(),t.stopPropagation();const o=t.type;let l=25;E.value=!0,e.value.handlePosition==="border"&&(l=e.value.handleBorderWidth||1),F.mouseUp=!1,ae.value.theme?e.value.theme:z.global.current.value.dark===!0?"dark":"light");function C(t,a){const o=parseInt(R(d.value))??0,l={e:a,eventName:t,offsetWidth:window.innerWidth-o+"px",resizedWidth:`${o}px`,width:`${o}px`};i(t,l)}return(t,a)=>(n.openBlock(),n.createBlock(n.unref(he.VNavigationDrawer),n.mergeProps(n.unref(m),{ref_key:"resizeDrawer",ref:k,class:n.unref(Z),location:n.unref(e).location,"model-value":t.modelValue,name:n.unref(e).name,style:n.unref(J),tag:n.unref(e).tag,theme:n.unref(ce),width:n.unref(Q),onMouseenter:ie,onMouseleave:le}),{default:n.withCtx(()=>[n.unref(te)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(n.unref(ee)),style:n.normalizeStyle(n.unref(ne)),onClick:ue,onDblclick:de,onMousedown:se,onMouseup:G,onTouchend:I,onTouchstart:j},[n.unref($).handle?(n.openBlock(),n.createElementBlock("div",fe,[n.renderSlot(t.$slots,"handle")])):n.unref(c)!=="border"?(n.openBlock(),n.createBlock(ve.VIcon,{key:1,class:n.normalizeClass(["v-resize-drawer--handle-icon",n.unref(oe)]),icon:n.unref(re),size:n.unref(h),style:n.normalizeStyle(n.unref(ae))},null,8,["class","icon","size","style"])):n.createCommentVNode("",!0)],38)):n.createCommentVNode("",!0),n.unref($).prepend?n.renderSlot(t.$slots,"prepend",{key:1}):n.createCommentVNode("",!0),n.renderSlot(t.$slots,"default"),n.unref($).append?n.renderSlot(t.$slots,"append",{key:2}):n.createCommentVNode("",!0)]),_:3},16,["class","location","model-value","name","style","tag","theme","width"]))}}),T=Symbol();exports.VResizeDrawer=X,exports.createVResizeDrawer=function(s={}){return{install:u=>{u.provide(T,s),u.component("VResizeDrawer",n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./VResizeDrawer-C7RKUquK.js"))))}}},exports.default=X,exports.globalOptions=T; (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode(".v-resize-drawer{container-name:v-resize-drawer;container-type:inline-size}.v-resize-drawer--handle-container{align-items:center;cursor:grab;display:flex;justify-content:center;position:absolute;z-index:1}.v-resize-drawer--handle-container-icon-parent-end,.v-resize-drawer--handle-container-icon-parent-right{left:initial;right:0}.v-resize-drawer--handle-container-icon-center-end,.v-resize-drawer--handle-container-icon-center-right{transform:rotate(180deg)}.v-resize-drawer--handle-container-icon-user-icon{transform:none}.v-resize-drawer--handle-container-icon-fa{font-size:.7rem!important}.v-resize-drawer--handle-container-parent-left,.v-resize-drawer--handle-container-parent-start,.v-resize-drawer--handle-container-parent-undefined{right:0}.v-resize-drawer--handle-container-parent-end,.v-resize-drawer--handle-container-parent-right{left:0}.v-resize-drawer--handle-container-position-top{top:0}.v-resize-drawer--handle-container-position-center{top:50%;transform:translateY(-50%)}.v-resize-drawer--handle-container-position-bottom{bottom:0}.v-resize-drawer--handle-container-position-border{cursor:col-resize;height:100%;top:0;width:8px}@container v-resize-drawer (width > 0) and (max-width: 599.98px){.v-col-xs-12{flex:0 0 100%!important;flex-basis:0;flex-grow:1;max-width:100%!important}}@container v-resize-drawer (min-width: 600px){.v-col-sm-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.v-col-sm-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.v-col-sm-3{flex:0 0 25%;max-width:25%}.v-col-sm-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.v-col-sm-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.v-col-sm-6{flex:0 0 50%;max-width:50%}.v-col-sm-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.v-col-sm-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.v-col-sm-9{flex:0 0 75%;max-width:75%}.v-col-sm-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.v-col-sm-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.v-col-sm-12{flex:0 0 100%;max-width:100%}}@container v-resize-drawer (min-width: 960px){.v-col-md-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.v-col-md-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.v-col-md-3{flex:0 0 25%;max-width:25%}.v-col-md-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.v-col-md-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.v-col-md-6{flex:0 0 50%;max-width:50%}.v-col-md-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.v-col-md-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.v-col-md-9{flex:0 0 75%;max-width:75%}.v-col-md-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.v-col-md-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.v-col-md-12{flex:0 0 100%;max-width:100%}}@container v-resize-drawer (min-width: 1280px){.v-col-lg-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.v-col-lg-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.v-col-lg-3{flex:0 0 25%;max-width:25%}.v-col-lg-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.v-col-lg-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.v-col-lg-6{flex:0 0 50%;max-width:50%}.v-col-lg-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.v-col-lg-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.v-col-lg-9{flex:0 0 75%;max-width:75%}.v-col-lg-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.v-col-lg-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.v-col-lg-12{flex:0 0 100%;max-width:100%}}@container v-resize-drawer (min-width: 1920px){.v-col-xl-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.v-col-xl-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.v-col-xl-3{flex:0 0 25%;max-width:25%}.v-col-xl-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.v-col-xl-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.v-col-xl-6{flex:0 0 50%;max-width:50%}.v-col-xl-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.v-col-xl-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.v-col-xl-9{flex:0 0 75%;max-width:75%}.v-col-xl-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.v-col-xl-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.v-col-xl-12{flex:0 0 100%;max-width:100%}}@container v-resize-drawer (min-width: 2560px){.v-col-xxl-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.v-col-xxl-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.v-col-xxl-3{flex:0 0 25%;max-width:25%}.v-col-xxl-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.v-col-xxl-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.v-col-xxl-6{flex:0 0 50%;max-width:50%}.v-col-xxl-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.v-col-xxl-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.v-col-xxl-9{flex:0 0 75%;max-width:75%}.v-col-xxl-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.v-col-xxl-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.v-col-xxl-12{flex:0 0 100%;max-width:100%}}@container v-resize-drawer only print{.hidden-print-only{display:none!important}}@container v-resize-drawer only print{.d-print-only-none{display:none!important}.d-print-only-inline{display:inline!important}.d-print-only-inline-block{display:inline-block!important}.d-print-only-block{display:block!important}.d-print-only-table{display:table!important}.d-print-only-table-row{display:table-row!important}.d-print-only-table-cell{display:table-cell!important}.d-print-only-flex{display:flex!important}.d-print-only-inline-flex{display:inline-flex!important}}@container v-resize-drawer only screen{.hidden-screen-only{display:none!important}}@container v-resize-drawer only screen{.d-screen-only-none{display:none!important}.d-screen-only-inline{display:inline!important}.d-screen-only-inline-block{display:inline-block!important}.d-screen-only-block{display:block!important}.d-screen-only-table{display:table!important}.d-screen-only-table-row{display:table-row!important}.d-screen-only-table-cell{display:table-cell!important}.d-screen-only-flex{display:flex!important}.d-screen-only-inline-flex{display:inline-flex!important}}@container v-resize-drawer (max-width: 599.98px){.hidden-xs{display:none!important}}@container v-resize-drawer (max-width: 599.98px){.d-xs-none{display:none!important}.d-xs-inline{display:inline!important}.d-xs-inline-block{display:inline-block!important}.d-xs-block{display:block!important}.d-xs-table{display:table!important}.d-xs-table-row{display:table-row!important}.d-xs-table-cell{display:table-cell!important}.d-xs-flex{display:flex!important}.d-xs-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 600px) and (max-width: 959.98px){.hidden-sm{display:none!important}}@container v-resize-drawer (min-width: 600px) and (max-width: 959.98px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 960px) and (max-width: 1279.98px){.hidden-md{display:none!important}}@container v-resize-drawer (min-width: 960px) and (max-width: 1279.98px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 1280px) and (max-width: 1919.98px){.hidden-lg{display:none!important}}@container v-resize-drawer (min-width: 1280px) and (max-width: 1919.98px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 1920px) and (max-width: 2559.98px){.hidden-xl{display:none!important}}@container v-resize-drawer (min-width: 1920px) and (max-width: 2559.98px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 2560px){.hidden-xxl{display:none!important}}@container v-resize-drawer (min-width: 2560px){.d-xxl-none{display:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 600px){.hidden-sm-and-up{display:none!important}}@container v-resize-drawer (min-width: 600px){.d-sm-and-up-none{display:none!important}.d-sm-and-up-inline{display:inline!important}.d-sm-and-up-inline-block{display:inline-block!important}.d-sm-and-up-block{display:block!important}.d-sm-and-up-table{display:table!important}.d-sm-and-up-table-row{display:table-row!important}.d-sm-and-up-table-cell{display:table-cell!important}.d-sm-and-up-flex{display:flex!important}.d-sm-and-up-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 960px){.hidden-md-and-up{display:none!important}}@container v-resize-drawer (min-width: 960px){.d-md-and-up-none{display:none!important}.d-md-and-up-inline{display:inline!important}.d-md-and-up-inline-block{display:inline-block!important}.d-md-and-up-block{display:block!important}.d-md-and-up-table{display:table!important}.d-md-and-up-table-row{display:table-row!important}.d-md-and-up-table-cell{display:table-cell!important}.d-md-and-up-flex{display:flex!important}.d-md-and-up-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 1280px){.hidden-lg-and-up{display:none!important}}@container v-resize-drawer (min-width: 1280px){.d-lg-and-up-none{display:none!important}.d-lg-and-up-inline{display:inline!important}.d-lg-and-up-inline-block{display:inline-block!important}.d-lg-and-up-block{display:block!important}.d-lg-and-up-table{display:table!important}.d-lg-and-up-table-row{display:table-row!important}.d-lg-and-up-table-cell{display:table-cell!important}.d-lg-and-up-flex{display:flex!important}.d-lg-and-up-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 1920px){.hidden-xl-and-up{display:none!important}}@container v-resize-drawer (min-width: 1920px){.d-xl-and-up-none{display:none!important}.d-xl-and-up-inline{display:inline!important}.d-xl-and-up-inline-block{display:inline-block!important}.d-xl-and-up-block{display:block!important}.d-xl-and-up-table{display:table!important}.d-xl-and-up-table-row{display:table-row!important}.d-xl-and-up-table-cell{display:table-cell!important}.d-xl-and-up-flex{display:flex!important}.d-xl-and-up-inline-flex{display:inline-flex!important}}@container v-resize-drawer (max-width: 959.98px){.hidden-sm-and-down{display:none!important}}@container v-resize-drawer (max-width: 959.98px){.d-sm-and-down-none{display:none!important}.d-sm-and-down-inline{display:inline!important}.d-sm-and-down-inline-block{display:inline-block!important}.d-sm-and-down-block{display:block!important}.d-sm-and-down-table{display:table!important}.d-sm-and-down-table-row{display:table-row!important}.d-sm-and-down-table-cell{display:table-cell!important}.d-sm-and-down-flex{display:flex!important}.d-sm-and-down-inline-flex{display:inline-flex!important}}@container v-resize-drawer (max-width: 1279.98px){.hidden-md-and-down{display:none!important}}@container v-resize-drawer (max-width: 1279.98px){.d-md-and-down-none{display:none!important}.d-md-and-down-inline{display:inline!important}.d-md-and-down-inline-block{display:inline-block!important}.d-md-and-down-block{display:block!important}.d-md-and-down-table{display:table!important}.d-md-and-down-table-row{display:table-row!important}.d-md-and-down-table-cell{display:table-cell!important}.d-md-and-down-flex{display:flex!important}.d-md-and-down-inline-flex{display:inline-flex!important}}@container v-resize-drawer (max-width: 1919.98px){.hidden-lg-and-down{display:none!important}}@container v-resize-drawer (max-width: 1919.98px){.d-lg-and-down-none{display:none!important}.d-lg-and-down-inline{display:inline!important}.d-lg-and-down-inline-block{display:inline-block!important}.d-lg-and-down-block{display:block!important}.d-lg-and-down-table{display:table!important}.d-lg-and-down-table-row{display:table-row!important}.d-lg-and-down-table-cell{display:table-cell!important}.d-lg-and-down-flex{display:flex!important}.d-lg-and-down-inline-flex{display:inline-flex!important}}@container v-resize-drawer (max-width: 2559.98px){.hidden-xl-and-down{display:none!important}}@container v-resize-drawer (max-width: 2559.98px){.d-xl-and-down-none{display:none!important}.d-xl-and-down-inline{display:inline!important}.d-xl-and-down-inline-block{display:inline-block!important}.d-xl-and-down-block{display:block!important}.d-xl-and-down-table{display:table!important}.d-xl-and-down-table-row{display:table-row!important}.d-xl-and-down-table-cell{display:table-cell!important}.d-xl-and-down-flex{display:flex!important}.d-xl-and-down-inline-flex{display:inline-flex!important}}")),document.head.appendChild(n)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})(); diff --git a/dist/vuetify-resize-drawer.es.js b/dist/vuetify-resize-drawer.es.js index 4b05b83..0397347 100644 --- a/dist/vuetify-resize-drawer.es.js +++ b/dist/vuetify-resize-drawer.es.js @@ -1,10 +1,10 @@ -import { unref as d, defineComponent as we, mergeDefaults as Be, inject as K, ref as L, watchEffect as ye, toRefs as Ce, computed as D, useSlots as Ee, onBeforeMount as We, onMounted as Se, onUnmounted as Ae, watch as ke, openBlock as P, createBlock as Z, mergeProps as be, withCtx as Le, createElementBlock as J, normalizeClass as Q, normalizeStyle as ee, renderSlot as N, createCommentVNode as x } from "vue"; -import { useTheme as Ie, useDisplay as Ge } from "vuetify"; +import { unref as d, defineComponent as we, mergeDefaults as Be, inject as K, ref as L, watchEffect as ye, toRefs as Ce, computed as D, useSlots as Ee, onBeforeMount as We, onMounted as Se, onUnmounted as Ae, watch as ke, openBlock as P, createBlock as Z, mergeProps as be, withCtx as Le, createElementBlock as J, normalizeClass as Q, normalizeStyle as ee, renderSlot as N, createCommentVNode as x, defineAsyncComponent as $e } from "vue"; +import { useTheme as Ge, useDisplay as Ie } from "vuetify"; import { VNavigationDrawer as Me } from "vuetify/components"; -import { VIcon as $e } from "vuetify/lib/components/VIcon/index.mjs"; +import { VIcon as ze } from "vuetify/lib/components/VIcon/index.mjs"; /** * @name @wdns/vuetify-resize-drawer - * @version 3.1.3 + * @version 3.1.4 * @description The vuetify-resize-drawer component extends the functionality of the v-navigation-drawer so that it is resizable by the user. * @author WebDevNerdStuff & Bunnies... lots and lots of bunnies! (https://webdevnerdstuff.com) * @copyright Copyright 2024, WebDevNerdStuff @@ -12,7 +12,7 @@ import { VIcon as $e } from "vuetify/lib/components/VIcon/index.mjs"; * @repository https://github.com/webdevnerdstuff/vuetify-resize-drawer * @license MIT License */ -const y = "v-resize-drawer", ze = { handleBorderWidth: 8, handleColor: "primary", handleIcon: void 0, handleIconSize: "x-small", handlePosition: "center", height: void 0, location: "start", maxWidth: window.innerWidth, minWidth: 56, modelValue: !0, name: void 0, rail: !1, railWidth: 8, resizable: !0, saveWidth: !0, storageName: `${y}-width`, storageType: "local", tag: "nav", theme: void 0, touchless: !1, width: 256, widthSnapBack: !0 }; +const y = "v-resize-drawer", Pe = { handleBorderWidth: 8, handleColor: "primary", handleIcon: void 0, handleIconSize: "x-small", handlePosition: "center", height: void 0, location: "start", maxWidth: window.innerWidth, minWidth: 56, modelValue: !0, name: void 0, rail: !1, railWidth: 8, resizable: !0, saveWidth: !0, storageName: `${y}-width`, storageType: "local", tag: "nav", theme: void 0, touchless: !1, width: 256, widthSnapBack: !0 }; function q(s, l) { return s === "local" ? localStorage.getItem(l) : s === "session" ? sessionStorage.getItem(l) : ""; } @@ -22,7 +22,7 @@ const V = (s) => { return; let c = o; c = c ?? void 0, l === "set" && (c = q(h, e) ?? "", c = c || o), h === "local" && localStorage.setItem(e, String(c)), h === "session" && sessionStorage.setItem(e, String(c)); -}, I = (s) => { +}, $ = (s) => { const { unit: l = "px", value: r } = s; if (r != null && r !== "") return +r ? `${Number(r)}${l}` : String(r); @@ -98,12 +98,12 @@ const te = (s, l) => { return Object.entries(e).find(([h]) => h === o); }(s, l); return r ? `hsl(${ae(r[1])})` : `hsl(${ae(s)})`; -}, Pe = { default: "1.5em", large: "1.75em", small: "1.25em", "x-large": "2em", "x-small": "1em" }, Ne = { fa: { bottom: "fas fa-grip", center: "fas fa-angles-right", top: "fas fa-grip" }, mdi: { bottom: "mdi:mdi-dots-grid", center: "mdi:mdi-chevron-double-right", top: "mdi:mdi-dots-grid" } }, xe = { key: 0, class: "v-resize-drawer--handle-slot" }, Te = we({ __name: "VResizeDrawer", props: Be({ absolute: {}, expandOnHover: {}, floating: {}, handleBorderWidth: {}, handleColor: {}, handleIcon: {}, handleIconSize: {}, handlePosition: {}, height: {}, image: {}, location: {}, maxWidth: {}, minWidth: {}, modelValue: {}, name: {}, rail: {}, railWidth: {}, resizable: { type: Boolean }, saveWidth: { type: Boolean }, storageName: {}, storageType: {}, tag: {}, temporary: {}, theme: {}, touchless: { type: Boolean }, width: {}, widthSnapBack: { type: Boolean } }, { ...ze }), emits: ["close", "drawer:mouseenter", "drawer:mouseleave", "handle:click", "handle:dblclick", "handle:drag", "handle:mousedown", "handle:mouseup", "handle:touchend", "handle:touchmove", "handle:touchstart", "update:modelValue"], setup(s, { emit: l }) { +}, Ne = { default: "1.5em", large: "1.75em", small: "1.25em", "x-large": "2em", "x-small": "1em" }, xe = { fa: { bottom: "fas fa-grip", center: "fas fa-angles-right", top: "fas fa-grip" }, mdi: { bottom: "mdi:mdi-dots-grid", center: "mdi:mdi-chevron-double-right", top: "mdi:mdi-dots-grid" } }, Te = { key: 0, class: "v-resize-drawer--handle-slot" }, Ue = we({ __name: "VResizeDrawer", props: Be({ absolute: {}, expandOnHover: {}, floating: {}, handleBorderWidth: {}, handleColor: {}, handleIcon: {}, handleIconSize: {}, handlePosition: {}, height: {}, image: {}, location: {}, maxWidth: {}, minWidth: {}, modelValue: {}, name: {}, rail: {}, railWidth: {}, resizable: { type: Boolean }, saveWidth: { type: Boolean }, storageName: {}, storageType: {}, tag: {}, temporary: {}, theme: {}, touchless: { type: Boolean }, width: {}, widthSnapBack: { type: Boolean } }, { ...Pe }), emits: ["close", "drawer:mouseenter", "drawer:mouseleave", "handle:click", "handle:dblclick", "handle:drag", "handle:mousedown", "handle:mouseup", "handle:touchend", "handle:touchmove", "handle:touchstart", "update:modelValue"], setup(s, { emit: l }) { const r = l, o = s, v = K(ne, {}), e = L({ ...o, ...v }); ye(() => { e.value = { ...o, ...v }; }); - const { handleIconSize: h, handlePosition: c } = Ce(e.value), m = D(() => e.value), w = K(Symbol.for("vuetify:icons")), f = L(256), F = { mouseDown: !1, mouseUp: !0 }, B = L(!1), W = L(!1), k = L(), u = L(256), T = Ee(), R = Ie(), oe = Ge(); + const { handleIconSize: h, handlePosition: c } = Ce(e.value), m = D(() => e.value), w = K(Symbol.for("vuetify:icons")), f = L(256), F = { mouseDown: !1, mouseUp: !0 }, B = L(!1), W = L(!1), k = L(), u = L(256), T = Ee(), R = Ge(), oe = Ie(); We(() => { e.value.name === void 0 && (e.value.name = String(Math.floor(1e8 * Math.random()))); }), Se(() => { @@ -112,11 +112,11 @@ const te = (s, l) => { throw new Error("[VResizeDrawer]: 'top' and 'bottom' locations are not supported."); if (e.value.rail) return void (u.value = e.value.railWidth || void 0); - const a = q(e.value.storageType, e.value.storageName), t = I({ value: e.value.width }); + const a = q(e.value.storageType, e.value.storageName), t = $({ value: e.value.width }); u.value = t, f.value = u.value, e.value.saveWidth && a && !e.value.rail && (u.value = q(e.value.storageType, e.value.storageName)), u.value = A(u.value), V({ action: "update", rail: e.value.rail, resizedWidth: u.value, saveWidth: e.value.saveWidth, storageName: e.value.storageName, storageType: e.value.storageType }); })(); }), Ae(() => { - document.removeEventListener("mouseup", $, !1), document.removeEventListener("mousemove", O, !1), document.removeEventListener("touchend", z, !1), document.removeEventListener("touchstart", X, !1); + document.removeEventListener("mouseup", M, !1), document.removeEventListener("mousemove", O, !1), document.removeEventListener("touchend", z, !1), document.removeEventListener("touchstart", X, !1); }), ke(() => o.modelValue, (a) => { r("update:modelValue", a), a || r("close"); }); @@ -128,11 +128,11 @@ const te = (s, l) => { if (p) return {}; let S = p ? g : d(C); - return b || (parseInt(S) >= parseInt(n) && (S = parseInt(n)), parseInt(S) <= parseInt(i) && (S = parseInt(i))), { transitionDuration: d(t) ? "0s" : ".2s", width: I({ value: S }) }; - })({ isMouseDown: W, maxWidth: M.value, minWidth: G.value, rail: e.value.rail, railWidth: e.value.railWidth, resizedWidth: u, widthSnapBack: e.value.widthSnapBack })), le = D(() => { + return b || (parseInt(S) >= parseInt(n) && (S = parseInt(n)), parseInt(S) <= parseInt(i) && (S = parseInt(i))), { transitionDuration: d(t) ? "0s" : ".2s", width: $({ value: S }) }; + })({ isMouseDown: W, maxWidth: I.value, minWidth: G.value, rail: e.value.rail, railWidth: e.value.railWidth, resizedWidth: u, widthSnapBack: e.value.widthSnapBack })), le = D(() => { if (e.value.rail) return; - const a = I({ value: u.value }); + const a = $({ value: u.value }); return A(a); }), ue = D(() => ((a) => { const { drawerLocation: t, handlePosition: n } = a; @@ -140,8 +140,8 @@ const te = (s, l) => { })({ drawerLocation: e.value.location, handlePosition: e.value.handlePosition })), se = D(() => ((a) => { const { borderWidth: t, handleColor: n, iconSize: i, position: p, theme: g } = a; if (p === "border") - return { backgroundColor: te(n, g), height: "100%", width: I({ value: t }) }; - const C = Pe[i]; + return { backgroundColor: te(n, g), height: "100%", width: $({ value: t }) }; + const C = Ne[i]; return { backgroundColor: "transparent", height: C, width: C }; })({ borderWidth: e.value.handleBorderWidth || 1, handleColor: e.value.handleColor, iconSize: e.value.handleIconSize, position: e.value.handlePosition, theme: R })), de = D(() => (!e.value.touchless || !oe.mobile.value) && !(!e.value.resizable || e.value.rail)), ce = D(() => ((a) => { const { color: t, theme: n } = a; @@ -157,7 +157,7 @@ const te = (s, l) => { return n; let g = ((i == null ? void 0 : i.defaultSet) ?? "").toLowerCase(); g = g === "fa" || g === "fasvg" ? "fa" : g; - const C = Ne[g]; + const C = xe[g]; if (!C) throw new Error(`[VResizeDrawer]: No default ${i == null ? void 0 : i.defaultSet} icon set found.`); const b = C[p]; @@ -173,7 +173,7 @@ const te = (s, l) => { } function U(a, t) { let n = t; - e.value.location !== "right" && e.value.location !== "end" || (n = document.body.scrollWidth - n), u.value = I({ value: n }) || void 0, document.body.style.cursor = "grabbing", E("handle:touchmove", a), E("handle:drag", a); + e.value.location !== "right" && e.value.location !== "end" || (n = document.body.scrollWidth - n), u.value = $({ value: n }) || void 0, document.body.style.cursor = "grabbing", E("handle:touchmove", a), E("handle:drag", a); } function H(a) { var t; @@ -182,7 +182,7 @@ const te = (s, l) => { function O(a) { U(a, a.clientX); } - const M = D(() => { + const I = D(() => { if (e.value.maxWidth === "100%") return window.innerWidth; if (String(e.value.maxWidth).includes("%")) { @@ -201,9 +201,9 @@ const te = (s, l) => { }); function j(a) { let t = a; - parseInt(t) >= parseInt(M.value) && (t = parseInt(M.value)), parseInt(t) <= parseInt(G.value) && (t = parseInt(G.value)), typeof t == "number" && (t = Math.round(t)); + parseInt(t) >= parseInt(I.value) && (t = parseInt(I.value)), parseInt(t) <= parseInt(G.value) && (t = parseInt(G.value)), typeof t == "number" && (t = Math.round(t)); let n = A(t); - const i = A(M.value), p = A(G.value); + const i = A(I.value), p = A(G.value); return n >= i && (n = i), p >= n && (n = p), n; } function pe(a) { @@ -216,7 +216,7 @@ const te = (s, l) => { a.preventDefault(), a.stopPropagation(); const n = a.type; let i = 25; - W.value = !0, e.value.handlePosition === "border" && (i = e.value.handleBorderWidth || 1), F.mouseUp = !1, t < i && (n === "touchstart" ? document.addEventListener("touchmove", H, !1) : document.addEventListener("mousemove", O, !1)), F.mouseDown || (F.mouseDown = !0, n === "touchstart" ? (document.addEventListener("touchend", z, !1), E("handle:touchstart", a)) : (document.addEventListener("mouseup", $, !1), E("handle:mousedown", a))); + W.value = !0, e.value.handlePosition === "border" && (i = e.value.handleBorderWidth || 1), F.mouseUp = !1, t < i && (n === "touchstart" ? document.addEventListener("touchmove", H, !1) : document.addEventListener("mousemove", O, !1)), F.mouseDown || (F.mouseDown = !0, n === "touchstart" ? (document.addEventListener("touchend", z, !1), E("handle:touchstart", a)) : (document.addEventListener("mouseup", M, !1), E("handle:mousedown", a))); } function fe(a) { Y(a, a.offsetX); @@ -230,9 +230,9 @@ const te = (s, l) => { const t = a.type, n = k.value; W.value = !1, F.mouseDown = !1, u.value = (n == null ? void 0 : n.width) ?? f.value, document.body.style.cursor = ""; const i = u.value; - String(i).includes("-") && (u.value = G.value), u.value = j(u.value), u.value = I({ value: u.value }) || void 0, u.value = A(u.value), V({ rail: e.value.rail, resizedWidth: u.value, saveWidth: e.value.saveWidth, storageName: e.value.storageName, storageType: e.value.storageType }), F.mouseUp || (F.mouseUp = !0, t === "touchend" ? (document.removeEventListener("touchend", z, !1), document.removeEventListener("touchmove", H, !1), E("handle:touchend", a)) : (document.removeEventListener("mouseup", $, !1), document.removeEventListener("mousemove", O, !1), E("handle:mouseup", a))); + String(i).includes("-") && (u.value = G.value), u.value = j(u.value), u.value = $({ value: u.value }) || void 0, u.value = A(u.value), V({ rail: e.value.rail, resizedWidth: u.value, saveWidth: e.value.saveWidth, storageName: e.value.storageName, storageType: e.value.storageType }), F.mouseUp || (F.mouseUp = !0, t === "touchend" ? (document.removeEventListener("touchend", z, !1), document.removeEventListener("touchmove", H, !1), E("handle:touchend", a)) : (document.removeEventListener("mouseup", M, !1), document.removeEventListener("mousemove", O, !1), E("handle:mouseup", a))); } - function $(a) { + function M(a) { _(a); } function z(a) { @@ -243,17 +243,17 @@ const te = (s, l) => { const n = parseInt(j(u.value)) ?? 0, i = { e: t, eventName: a, offsetWidth: window.innerWidth - n + "px", resizedWidth: `${n}px`, width: `${n}px` }; r(a, i); } - return (a, t) => (P(), Z(d(Me), be(d(m), { ref_key: "resizeDrawer", ref: k, class: d(re), location: d(e).location, "model-value": a.modelValue, name: d(e).name, style: d(ie), tag: d(e).tag, theme: d(De), width: d(le), onMouseenter: me, onMouseleave: Fe }), { default: Le(() => [d(de) ? (P(), J("div", { key: 0, class: Q(d(ue)), style: ee(d(se)), onClick: pe, onDblclick: ge, onMousedown: fe, onMouseup: $, onTouchend: z, onTouchstart: X }, [d(T).handle ? (P(), J("div", xe, [N(a.$slots, "handle")])) : d(c) !== "border" ? (P(), Z($e, { key: 1, class: Q(["v-resize-drawer--handle-icon", d(he)]), icon: d(ve), size: d(h), style: ee(d(ce)) }, null, 8, ["class", "icon", "size", "style"])) : x("", !0)], 38)) : x("", !0), d(T).prepend ? N(a.$slots, "prepend", { key: 1 }) : x("", !0), N(a.$slots, "default"), d(T).append ? N(a.$slots, "append", { key: 2 }) : x("", !0)]), _: 3 }, 16, ["class", "location", "model-value", "name", "style", "tag", "theme", "width"])); + return (a, t) => (P(), Z(d(Me), be(d(m), { ref_key: "resizeDrawer", ref: k, class: d(re), location: d(e).location, "model-value": a.modelValue, name: d(e).name, style: d(ie), tag: d(e).tag, theme: d(De), width: d(le), onMouseenter: me, onMouseleave: Fe }), { default: Le(() => [d(de) ? (P(), J("div", { key: 0, class: Q(d(ue)), style: ee(d(se)), onClick: pe, onDblclick: ge, onMousedown: fe, onMouseup: M, onTouchend: z, onTouchstart: X }, [d(T).handle ? (P(), J("div", Te, [N(a.$slots, "handle")])) : d(c) !== "border" ? (P(), Z(ze, { key: 1, class: Q(["v-resize-drawer--handle-icon", d(he)]), icon: d(ve), size: d(h), style: ee(d(ce)) }, null, 8, ["class", "icon", "size", "style"])) : x("", !0)], 38)) : x("", !0), d(T).prepend ? N(a.$slots, "prepend", { key: 1 }) : x("", !0), N(a.$slots, "default"), d(T).append ? N(a.$slots, "append", { key: 2 }) : x("", !0)]), _: 3 }, 16, ["class", "location", "model-value", "name", "style", "tag", "theme", "width"])); } }), ne = Symbol(); -function Ue(s = {}) { +function He(s = {}) { return { install: (l) => { - l.provide(ne, s), l.component("VResizeDrawer", Te); + l.provide(ne, s), l.component("VResizeDrawer", $e(() => import("./VResizeDrawer-BDG6QtZv.mjs"))); } }; } export { - Te as VResizeDrawer, - Ue as createVResizeDrawer, - Te as default, + Ue as VResizeDrawer, + He as createVResizeDrawer, + Ue as default, ne as globalOptions }; (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode(".v-resize-drawer{container-name:v-resize-drawer;container-type:inline-size}.v-resize-drawer--handle-container{align-items:center;cursor:grab;display:flex;justify-content:center;position:absolute;z-index:1}.v-resize-drawer--handle-container-icon-parent-end,.v-resize-drawer--handle-container-icon-parent-right{left:initial;right:0}.v-resize-drawer--handle-container-icon-center-end,.v-resize-drawer--handle-container-icon-center-right{transform:rotate(180deg)}.v-resize-drawer--handle-container-icon-user-icon{transform:none}.v-resize-drawer--handle-container-icon-fa{font-size:.7rem!important}.v-resize-drawer--handle-container-parent-left,.v-resize-drawer--handle-container-parent-start,.v-resize-drawer--handle-container-parent-undefined{right:0}.v-resize-drawer--handle-container-parent-end,.v-resize-drawer--handle-container-parent-right{left:0}.v-resize-drawer--handle-container-position-top{top:0}.v-resize-drawer--handle-container-position-center{top:50%;transform:translateY(-50%)}.v-resize-drawer--handle-container-position-bottom{bottom:0}.v-resize-drawer--handle-container-position-border{cursor:col-resize;height:100%;top:0;width:8px}@container v-resize-drawer (width > 0) and (max-width: 599.98px){.v-col-xs-12{flex:0 0 100%!important;flex-basis:0;flex-grow:1;max-width:100%!important}}@container v-resize-drawer (min-width: 600px){.v-col-sm-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.v-col-sm-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.v-col-sm-3{flex:0 0 25%;max-width:25%}.v-col-sm-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.v-col-sm-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.v-col-sm-6{flex:0 0 50%;max-width:50%}.v-col-sm-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.v-col-sm-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.v-col-sm-9{flex:0 0 75%;max-width:75%}.v-col-sm-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.v-col-sm-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.v-col-sm-12{flex:0 0 100%;max-width:100%}}@container v-resize-drawer (min-width: 960px){.v-col-md-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.v-col-md-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.v-col-md-3{flex:0 0 25%;max-width:25%}.v-col-md-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.v-col-md-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.v-col-md-6{flex:0 0 50%;max-width:50%}.v-col-md-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.v-col-md-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.v-col-md-9{flex:0 0 75%;max-width:75%}.v-col-md-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.v-col-md-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.v-col-md-12{flex:0 0 100%;max-width:100%}}@container v-resize-drawer (min-width: 1280px){.v-col-lg-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.v-col-lg-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.v-col-lg-3{flex:0 0 25%;max-width:25%}.v-col-lg-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.v-col-lg-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.v-col-lg-6{flex:0 0 50%;max-width:50%}.v-col-lg-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.v-col-lg-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.v-col-lg-9{flex:0 0 75%;max-width:75%}.v-col-lg-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.v-col-lg-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.v-col-lg-12{flex:0 0 100%;max-width:100%}}@container v-resize-drawer (min-width: 1920px){.v-col-xl-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.v-col-xl-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.v-col-xl-3{flex:0 0 25%;max-width:25%}.v-col-xl-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.v-col-xl-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.v-col-xl-6{flex:0 0 50%;max-width:50%}.v-col-xl-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.v-col-xl-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.v-col-xl-9{flex:0 0 75%;max-width:75%}.v-col-xl-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.v-col-xl-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.v-col-xl-12{flex:0 0 100%;max-width:100%}}@container v-resize-drawer (min-width: 2560px){.v-col-xxl-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.v-col-xxl-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.v-col-xxl-3{flex:0 0 25%;max-width:25%}.v-col-xxl-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.v-col-xxl-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.v-col-xxl-6{flex:0 0 50%;max-width:50%}.v-col-xxl-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.v-col-xxl-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.v-col-xxl-9{flex:0 0 75%;max-width:75%}.v-col-xxl-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.v-col-xxl-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.v-col-xxl-12{flex:0 0 100%;max-width:100%}}@container v-resize-drawer only print{.hidden-print-only{display:none!important}}@container v-resize-drawer only print{.d-print-only-none{display:none!important}.d-print-only-inline{display:inline!important}.d-print-only-inline-block{display:inline-block!important}.d-print-only-block{display:block!important}.d-print-only-table{display:table!important}.d-print-only-table-row{display:table-row!important}.d-print-only-table-cell{display:table-cell!important}.d-print-only-flex{display:flex!important}.d-print-only-inline-flex{display:inline-flex!important}}@container v-resize-drawer only screen{.hidden-screen-only{display:none!important}}@container v-resize-drawer only screen{.d-screen-only-none{display:none!important}.d-screen-only-inline{display:inline!important}.d-screen-only-inline-block{display:inline-block!important}.d-screen-only-block{display:block!important}.d-screen-only-table{display:table!important}.d-screen-only-table-row{display:table-row!important}.d-screen-only-table-cell{display:table-cell!important}.d-screen-only-flex{display:flex!important}.d-screen-only-inline-flex{display:inline-flex!important}}@container v-resize-drawer (max-width: 599.98px){.hidden-xs{display:none!important}}@container v-resize-drawer (max-width: 599.98px){.d-xs-none{display:none!important}.d-xs-inline{display:inline!important}.d-xs-inline-block{display:inline-block!important}.d-xs-block{display:block!important}.d-xs-table{display:table!important}.d-xs-table-row{display:table-row!important}.d-xs-table-cell{display:table-cell!important}.d-xs-flex{display:flex!important}.d-xs-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 600px) and (max-width: 959.98px){.hidden-sm{display:none!important}}@container v-resize-drawer (min-width: 600px) and (max-width: 959.98px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 960px) and (max-width: 1279.98px){.hidden-md{display:none!important}}@container v-resize-drawer (min-width: 960px) and (max-width: 1279.98px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 1280px) and (max-width: 1919.98px){.hidden-lg{display:none!important}}@container v-resize-drawer (min-width: 1280px) and (max-width: 1919.98px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 1920px) and (max-width: 2559.98px){.hidden-xl{display:none!important}}@container v-resize-drawer (min-width: 1920px) and (max-width: 2559.98px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 2560px){.hidden-xxl{display:none!important}}@container v-resize-drawer (min-width: 2560px){.d-xxl-none{display:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 600px){.hidden-sm-and-up{display:none!important}}@container v-resize-drawer (min-width: 600px){.d-sm-and-up-none{display:none!important}.d-sm-and-up-inline{display:inline!important}.d-sm-and-up-inline-block{display:inline-block!important}.d-sm-and-up-block{display:block!important}.d-sm-and-up-table{display:table!important}.d-sm-and-up-table-row{display:table-row!important}.d-sm-and-up-table-cell{display:table-cell!important}.d-sm-and-up-flex{display:flex!important}.d-sm-and-up-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 960px){.hidden-md-and-up{display:none!important}}@container v-resize-drawer (min-width: 960px){.d-md-and-up-none{display:none!important}.d-md-and-up-inline{display:inline!important}.d-md-and-up-inline-block{display:inline-block!important}.d-md-and-up-block{display:block!important}.d-md-and-up-table{display:table!important}.d-md-and-up-table-row{display:table-row!important}.d-md-and-up-table-cell{display:table-cell!important}.d-md-and-up-flex{display:flex!important}.d-md-and-up-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 1280px){.hidden-lg-and-up{display:none!important}}@container v-resize-drawer (min-width: 1280px){.d-lg-and-up-none{display:none!important}.d-lg-and-up-inline{display:inline!important}.d-lg-and-up-inline-block{display:inline-block!important}.d-lg-and-up-block{display:block!important}.d-lg-and-up-table{display:table!important}.d-lg-and-up-table-row{display:table-row!important}.d-lg-and-up-table-cell{display:table-cell!important}.d-lg-and-up-flex{display:flex!important}.d-lg-and-up-inline-flex{display:inline-flex!important}}@container v-resize-drawer (min-width: 1920px){.hidden-xl-and-up{display:none!important}}@container v-resize-drawer (min-width: 1920px){.d-xl-and-up-none{display:none!important}.d-xl-and-up-inline{display:inline!important}.d-xl-and-up-inline-block{display:inline-block!important}.d-xl-and-up-block{display:block!important}.d-xl-and-up-table{display:table!important}.d-xl-and-up-table-row{display:table-row!important}.d-xl-and-up-table-cell{display:table-cell!important}.d-xl-and-up-flex{display:flex!important}.d-xl-and-up-inline-flex{display:inline-flex!important}}@container v-resize-drawer (max-width: 959.98px){.hidden-sm-and-down{display:none!important}}@container v-resize-drawer (max-width: 959.98px){.d-sm-and-down-none{display:none!important}.d-sm-and-down-inline{display:inline!important}.d-sm-and-down-inline-block{display:inline-block!important}.d-sm-and-down-block{display:block!important}.d-sm-and-down-table{display:table!important}.d-sm-and-down-table-row{display:table-row!important}.d-sm-and-down-table-cell{display:table-cell!important}.d-sm-and-down-flex{display:flex!important}.d-sm-and-down-inline-flex{display:inline-flex!important}}@container v-resize-drawer (max-width: 1279.98px){.hidden-md-and-down{display:none!important}}@container v-resize-drawer (max-width: 1279.98px){.d-md-and-down-none{display:none!important}.d-md-and-down-inline{display:inline!important}.d-md-and-down-inline-block{display:inline-block!important}.d-md-and-down-block{display:block!important}.d-md-and-down-table{display:table!important}.d-md-and-down-table-row{display:table-row!important}.d-md-and-down-table-cell{display:table-cell!important}.d-md-and-down-flex{display:flex!important}.d-md-and-down-inline-flex{display:inline-flex!important}}@container v-resize-drawer (max-width: 1919.98px){.hidden-lg-and-down{display:none!important}}@container v-resize-drawer (max-width: 1919.98px){.d-lg-and-down-none{display:none!important}.d-lg-and-down-inline{display:inline!important}.d-lg-and-down-inline-block{display:inline-block!important}.d-lg-and-down-block{display:block!important}.d-lg-and-down-table{display:table!important}.d-lg-and-down-table-row{display:table-row!important}.d-lg-and-down-table-cell{display:table-cell!important}.d-lg-and-down-flex{display:flex!important}.d-lg-and-down-inline-flex{display:inline-flex!important}}@container v-resize-drawer (max-width: 2559.98px){.hidden-xl-and-down{display:none!important}}@container v-resize-drawer (max-width: 2559.98px){.d-xl-and-down-none{display:none!important}.d-xl-and-down-inline{display:inline!important}.d-xl-and-down-inline-block{display:inline-block!important}.d-xl-and-down-block{display:block!important}.d-xl-and-down-table{display:table!important}.d-xl-and-down-table-row{display:table-row!important}.d-xl-and-down-table-cell{display:table-cell!important}.d-xl-and-down-flex{display:flex!important}.d-xl-and-down-inline-flex{display:inline-flex!important}}")),document.head.appendChild(n)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})(); diff --git a/package.json b/package.json index 767107c..3f5826b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@wdns/vuetify-resize-drawer", - "version": "3.1.3", + "version": "3.1.4", "description": "The vuetify-resize-drawer component extends the functionality of the v-navigation-drawer so that it is resizable by the user.", "private": false, "publishConfig": { diff --git a/src/plugin/index.ts b/src/plugin/index.ts index 3b69428..c573e29 100644 --- a/src/plugin/index.ts +++ b/src/plugin/index.ts @@ -10,7 +10,7 @@ export function createVResizeDrawer(options: GlobalOptions = {}) { const install = (app: App) => { app.provide(globalOptions, options); - app.component('VResizeDrawer', VResizeDrawer); + app.component('VResizeDrawer', defineAsyncComponent(() => import('./VResizeDrawer.vue'))); }; return {