diff --git a/dist/plugin/VResizeDrawer.vue.d.ts b/dist/plugin/VResizeDrawer.vue.d.ts index 4c72487..11aef3a 100644 --- a/dist/plugin/VResizeDrawer.vue.d.ts +++ b/dist/plugin/VResizeDrawer.vue.d.ts @@ -1,5 +1,5 @@ -import { Props } from './types'; import { VNavigationDrawer } from 'vuetify/components'; +import { Props } from './types'; declare function __VLS_template(): { slots: { handle?(_: {}): any; @@ -20,9 +20,9 @@ declare function __VLS_template(): { tag: string; sticky: boolean; modelValue: boolean | null; - scrim: string | boolean; tile: boolean; floating: boolean; + scrim: string | boolean; touchless: boolean; disableResizeWatcher: boolean; disableRouteWatcher: boolean; @@ -86,9 +86,9 @@ declare function __VLS_template(): { tag: string; sticky: boolean; modelValue: boolean | null; - scrim: string | boolean; tile: boolean; floating: boolean; + scrim: string | boolean; touchless: boolean; disableResizeWatcher: boolean; disableRouteWatcher: boolean; @@ -148,9 +148,9 @@ declare function __VLS_template(): { sticky: boolean; modelValue: boolean | null; rounded: string | number | boolean; - scrim: string | boolean; tile: boolean; floating: boolean; + scrim: string | boolean; touchless: boolean; disableResizeWatcher: boolean; disableRouteWatcher: boolean; @@ -184,9 +184,9 @@ declare function __VLS_template(): { tag: string; sticky: boolean; modelValue: boolean | null; - scrim: string | boolean; tile: boolean; floating: boolean; + scrim: string | boolean; touchless: boolean; disableResizeWatcher: boolean; disableRouteWatcher: boolean; @@ -248,9 +248,9 @@ declare function __VLS_template(): { sticky: boolean; modelValue: boolean | null; rounded: string | number | boolean; - scrim: string | boolean; tile: boolean; floating: boolean; + scrim: string | boolean; touchless: boolean; disableResizeWatcher: boolean; disableRouteWatcher: boolean; @@ -290,10 +290,11 @@ declare const __VLS_component: import('vue').DefineComponent any) | undefined; "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; }>, { + location: "bottom" | "end" | "start" | "left" | "right" | "top"; + absolute: VNavigationDrawer["absolute"]; theme: string; tag: VNavigationDrawer["tag"]; name: string; - absolute: VNavigationDrawer["absolute"]; expandOnHover: VNavigationDrawer["expandOnHover"]; floating: VNavigationDrawer["floating"]; modelValue: VNavigationDrawer["modelValue"]; @@ -303,13 +304,13 @@ declare const __VLS_component: import('vue').DefineComponent; diff --git a/dist/plugin/index.d.ts b/dist/plugin/index.d.ts index 61d567b..240ed27 100644 --- a/dist/plugin/index.d.ts +++ b/dist/plugin/index.d.ts @@ -1,5 +1,5 @@ -import { App } from 'vue'; import { GlobalOptions } from './types'; +import { App } from 'vue'; import { default as VResizeDrawer } from './VResizeDrawer.vue'; export declare const globalOptions: unique symbol; export declare function createVResizeDrawer(options?: GlobalOptions): { diff --git a/dist/plugin/types/index.d.ts b/dist/plugin/types/index.d.ts index 9363bd8..31750df 100644 --- a/dist/plugin/types/index.d.ts +++ b/dist/plugin/types/index.d.ts @@ -1,7 +1,7 @@ import { CSSProperties, MaybeRef } from 'vue'; import { IconOptions, ThemeInstance } from 'vuetify'; -import { default as VResizeDrawer } from '../VResizeDrawer.vue'; import { VIcon, VNavigationDrawer } from 'vuetify/components'; +import { default as VResizeDrawer } from '../VResizeDrawer.vue'; export * from '../index'; export type Classes = { [key: string]: boolean | undefined; @@ -130,7 +130,7 @@ export interface UseGetIcon { name: Props['handlePosition']; }): Props['handleIcon']; } -declare module "vue" { +declare module 'vue' { interface ComponentCustomProperties { } interface GlobalComponents { diff --git a/dist/plugin/utils/globals.d.ts b/dist/plugin/utils/globals.d.ts index 6e524e3..55a6f13 100644 --- a/dist/plugin/utils/globals.d.ts +++ b/dist/plugin/utils/globals.d.ts @@ -1,3 +1,3 @@ declare const defaultWidth = 256; declare const componentName = "v-resize-drawer"; -export { defaultWidth, componentName }; +export { defaultWidth, componentName, }; diff --git a/dist/scss/_mixins.scss b/dist/scss/_mixins.scss index 17c2c5b..f4a9857 100644 --- a/dist/scss/_mixins.scss +++ b/dist/scss/_mixins.scss @@ -7,7 +7,7 @@ * @source vuetify/packages/vuetify/src/styles/tools/_functions.sass */ @function breakpoint-min($name, $breakpoints) { - $min: map-get($breakpoints, $name); + $min: map.get($breakpoints, $name); @return if($min !=0, $min, null); } @@ -33,7 +33,7 @@ } @mixin make-grid-columns($columns: settings.$grid-columns, $gutter: settings.$grid-gutter, $breakpoints: settings.$grid-breakpoints) { - @each $breakpoint in map-keys($breakpoints) { + @each $breakpoint in map.keys($breakpoints) { $infix: tools.breakpoint-infix($breakpoint, $breakpoints); @include media-breakpoint-up($breakpoint, $breakpoints) { diff --git a/dist/vuetify-resize-drawer.cjs.js b/dist/vuetify-resize-drawer.cjs.js index f2ecda3..9a655be 100644 --- a/dist/vuetify-resize-drawer.cjs.js +++ b/dist/vuetify-resize-drawer.cjs.js @@ -7,5 +7,5 @@ * @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 t=require("vue"),ee=require("vuetify"),ye=require("vuetify/components"),Ce=require("vuetify/lib/components/VIcon/index.mjs"),y="v-resize-drawer",be={handleBorderWidth:8,handleColor:"primary",handleIcon:void 0,handleIconSize:"x-small",handlePosition:"center",height:256,location:"start",maxHeight:window.innerHeight,maxWidth:window.innerWidth,minHeight:56,minWidth:56,modelValue:!0,name:void 0,rail:!1,railWidth:8,resizable:!0,saveWidth:!0,snapBack:!0,storageName:`${y}-width`,storageType:"local",tag:"nav",theme:void 0,touchless:!1,width:256};function R(s,l){return s==="local"?localStorage.getItem(l):s==="session"?sessionStorage.getItem(l):""}const T=s=>{const{action:l="update",rail:u,resizedAmount:i,saveAmount:F,storageName:e,storageType:c}=s;if(u&&!F)return;let v=i;v=v??void 0,l==="set"&&(v=R(c,e)??"",v=v||i),c==="local"&&localStorage.setItem(e,String(v)),c==="session"&&sessionStorage.setItem(e,String(v))},A=s=>{const{unit:l="px",value:u}=s;if(u!=null&&u!=="")return+u?`${Number(u)}${l}`:String(u)},M=s=>{const l=window.innerWidth,u=function(i){if(typeof i=="string"){const F=/(\d+(\.\d+)?)(\s*([a-zA-Z]+))?/,e=i.match(F);if(!e)return i;const c=parseFloat(e[1]),v=e[4];if(!isNaN(c)){const p=Math.round(c);return v?`${p} ${v}`:`${p}`}return i}return typeof i=="number"?Math.round(i):i}(s);return typeof s=="string"&&s.includes("%")?Number(s.replace("%",""))/100*l:typeof u=="string"?Number(u.replace(/\D/g,"")):u},te=s=>{if(!s)return 0;if(typeof s=="number")return s;const l=document.createElement("div");l.style.position="absolute",l.style.visibility="hidden",l.style.width=s;const u=document.body;u.appendChild(l);const i=getComputedStyle(l).width;return u.removeChild(l),parseFloat(i)};function ne(s){let l=function(g){const C={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(C).forEach(([b,$])=>{g.toLowerCase()!=b.toLowerCase()||(B=$)}),B}(s),u=0,i=0,F=0,e=0,c=0,v=0;if(l.substring(0,1)==="#")l=function(g){let C=g.replace("#","");C.length===3&&(C=C.split("").map(z=>z+z).join(""));const B=parseInt(C.substring(0,2),16),b=parseInt(C.substring(2,4),16),$=parseInt(C.substring(4,6),16);return[B,b,$]}(l);else if(l.includes("rgb"))l=[...l.matchAll(/\d+/g)].map(Number);else if(l.includes("hsl"))return l=[...l.matchAll(/\d+/g)].map(Number),u=l[0],i=l[1],F=l[2],`${u} ${i}% ${F}%`;[e,c,v]=l,e/=255,c/=255,v/=255;const p=Math.max(e,c,v),D=Math.min(e,c,v);if(p===null||!D===null||isNaN(p)||isNaN(D))return"0 0% 100% / 12%";if(u=(p+D)/2,i=(p+D)/2,F=(p+D)/2,p==D)u=i=0;else{const g=p-D;switch(i=F>.5?g/(2-p-D):g/(p+D),p){case e:u=(c-v)/g+(c{if(function(i){return i==="transparent"||i==="none"||i==="inherit"||i==="currentColor"||i==="initial"||i==="unset"}(s))return s;if(function(i){return i.includes("--v-theme")}(s))return`rgb(var(${s}))`;const u=function(i,F){var c;const e=((c=F.global.current.value)==null?void 0:c.colors)??{};return Object.entries(e).find(([v])=>v===i)}(s,l);return u?`hsl(${ne(u[1])})`:`hsl(${ne(s)})`},oe={default:"1.5em",large:"1.75em",small:"1.25em","x-large":"2em","x-small":"1em"},Ae={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"}},Ee={key:0,class:"v-resize-drawer--handle-slot"},re=t.defineComponent({__name:"VResizeDrawer",props:t.mergeDefaults({absolute:{},expandOnHover:{},floating:{},handleBorderWidth:{},handleColor:{},handleIcon:{},handleIconSize:{},handlePosition:{},height:{},image:{},location:{},maxHeight:{},maxWidth:{},minHeight:{},minWidth:{},modelValue:{},name:{},rail:{},railWidth:{},resizable:{type:Boolean},saveHeight:{type:Boolean},saveWidth:{type:Boolean},snapBack:{type:Boolean},storageName:{},storageType:{},tag:{},temporary:{},theme:{},touchless:{type:Boolean},width:{},widthSnapBack:{type:Boolean}},{...be}),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 u=l,i=s,F=t.inject(q,{}),e=t.ref({...i,...F});t.watchEffect(()=>{e.value={...i,...F}});const{handleIconSize:c,handlePosition:v}=t.toRefs(e.value),p=t.computed(()=>e.value),D=t.inject(Symbol.for("vuetify:icons")),g=t.ref(256),C=t.ref(256),B={mouseDown:!1,mouseUp:!0},b=t.ref(!1),$=t.ref(!1),z=t.ref(e.value.location),U=t.ref(),d=t.ref(256),N=t.useSlots(),V=ee.useTheme(),ie=ee.useDisplay(),f=t.computed(()=>z.value==="top"||z.value==="bottom"),G=t.computed(()=>`${e.value.storageName}-${e.value.location}`);t.onBeforeMount(()=>{e.value.name===void 0&&(e.value.name=String(Math.floor(1e8*Math.random())))}),t.onMounted(()=>{(function(){if(!Y.value)throw new Error("[VResizeDrawer]: 'bottom' location does not support 'bottom' or 'top' handle positions.");if(e.value.rail&&!f.value)return void(d.value=e.value.railWidth||void 0);const n=R(e.value.storageType,G.value),o=A({value:f.value?e.value.height:e.value.width});d.value=o,g.value=d.value,(e.value.saveHeight||e.value.saveWidth)&&n&&!e.value.rail&&(d.value=R(e.value.storageType,G.value)),d.value=M(d.value),T({action:"update",rail:e.value.rail,resizedAmount:d.value,saveAmount:e.value.saveHeight||e.value.saveWidth,storageName:G.value,storageType:e.value.storageType})})()}),t.onUnmounted(()=>{document.removeEventListener("mouseup",x,!1),document.removeEventListener("mousemove",O,!1),document.removeEventListener("touchend",H,!1),document.removeEventListener("touchstart",Z,!1)}),t.watch(()=>i.modelValue,n=>{u("update:modelValue",n),n||u("close")});const le=t.computed(()=>(n=>{const{absolute:o=!1,expandOnHover:a,floating:r,isMouseover:h,location:m,rail:S,railWidth:k,temporary:W}=n;let w=m==="left"||m==="start"||m===void 0;return m!=="top"&&m!=="bottom"||(w=!1),{[`${y}`]:!0,[`${y}--${m}`]:m==="bottom"||m==="top","v-navigation-drawer--absolute":o??!1,"v-navigation-drawer--custom-rail":Number(k)!==56,"v-navigation-drawer--fixed":!o,"v-navigation-drawer--floating":r,"v-navigation-drawer--is-mouseover":t.unref(h),"v-navigation-drawer--left":w,"v-navigation-drawer--open-on-hover":a,"v-navigation-drawer--rail":S??!1,"v-navigation-drawer--right":m==="right"||m==="end","v-navigation-drawer--temporary":W||!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})),ue=t.computed(()=>(n=>{const{isMouseDown:o,location:a,maxWidth:r,minWidth:h,rail:m,railWidth:S,resizedAmount:k,snapBack:W}=n;if(m)return{};let w=m?S:t.unref(k);W||(parseInt(w)>=parseInt(r)&&(w=parseInt(r)),parseInt(w)<=parseInt(h)&&(w=parseInt(h)));let Q={};return Q=a==="top"||a==="bottom"?{maxHeight:`${A({value:w})} !important`,minHeight:`${A({value:w})} !important`,transitionDuration:t.unref(o)?"0s":".2s",width:"100%"}:{transitionDuration:t.unref(o)?"0s":".2s",width:A({value:w})},Q})({isMouseDown:$,location:e.value.location,maxWidth:P.value,minWidth:I.value,rail:e.value.rail,railWidth:e.value.railWidth,resizedAmount:d.value,snapBack:e.value.snapBack||e.value.widthSnapBack})),se=t.computed(()=>{if(f.value||e.value.rail)return;const n=A({value:d.value});return M(n)}),de=t.computed(()=>(n=>{const{drawerLocation:o,handlePosition:a}=n;return{[`${y}--handle-container`]:!0,[`${y}--handle-container-position-${a}`]:!0,[`${y}--handle-container-parent-${o}`]:!0}})({drawerLocation:e.value.location,handlePosition:e.value.handlePosition})),ce=t.computed(()=>(n=>{const{borderWidth:o,handleColor:a,iconSizeUnit:r,location:h,position:m,theme:S}=n,k="translateX(-50%) "+(h==="top"?"rotate(90deg)":"rotate(-90deg)");let W=`${r}px`,w=`${r}px`;return m==="border"?(h==="bottom"||h==="top"?W=A({value:o}):(W="100%",w=A({value:o})),{backgroundColor:ae(a,S),height:W,width:w}):{backgroundColor:"transparent",height:W,transform:h==="top"||h==="bottom"?k:void 0,width:w}})({borderWidth:e.value.handleBorderWidth||1,handleColor:e.value.handleColor,iconSize:e.value.handleIconSize,iconSizeUnit:L.value,location:e.value.location,position:e.value.handlePosition,theme:V})),ve=t.computed(()=>(!e.value.touchless||!ie.mobile.value)&&!(!e.value.resizable||e.value.rail)&&!!Y.value),Y=t.computed(()=>e.value.location!=="bottom"&&e.value.location!=="top"||e.value.handlePosition!=="bottom"&&e.value.handlePosition!=="top"),he=t.computed(()=>(n=>{const{color:o,theme:a}=n;return{color:ae(o,a)}})({color:i.handleColor,theme:V})),me=t.computed(()=>(n=>{const{drawerLocation:o,handlePosition:a,iconOptions:r,isUserIcon:h}=n;return{[`${y}--handle-container-icon`]:!0,[`${y}--handle-container-icon-${a}-${o}`]:!0,[`${y}--handle-container-icon-user-icon`]:h,[`${y}--handle-container-icon-fa`]:(r==null?void 0:r.defaultSet)==="fa",[`${y}--handle-container-icon-fa-${a}`]:(r==null?void 0:r.defaultSet)==="fa"}})({drawerLocation:e.value.location,handlePosition:e.value.handlePosition,iconOptions:D,isUserIcon:e.value.handleIcon!=null&&e.value.handleIcon!==""})),Fe=t.computed(()=>(o=>{const{icon:a,iconOptions:r,name:h}=o;if(h==="border")return;if(a)return a;let m=((r==null?void 0:r.defaultSet)??"").toLowerCase();m=m==="fa"||m==="fasvg"?"fa":m;const S=Ae[m];if(!S)throw new Error(`[VResizeDrawer]: No default ${r==null?void 0:r.defaultSet} icon set found.`);const k=S[h];if(!k)throw new Error(`[VResizeDrawer]: No ${h} icon found.`);return k})({icon:e.value.handleIcon,iconOptions:D,name:e.value.handlePosition})),L=t.ref(te(String(c.value)));function pe(){b.value=!0,u("drawer:mouseenter",b.value)}function fe(){b.value=!1,u("drawer:mouseleave",b.value)}function j(n,o){let a=o;e.value.location!=="right"&&e.value.location!=="end"||(a=document.body.scrollWidth-a+L.value/2),e.value.location!=="left"&&e.value.location!=="start"||(a+=L.value/2),e.value.location==="top"&&(a-=function(r){const h=-29e-5*r*r+-.356*r+43.56;return Math.ceil(h)}(L.value)),e.value.location==="bottom"&&(a=window.innerHeight-a+L.value/2),d.value=A({value:a})||void 0,document.body.style.cursor="grabbing",E("handle:touchmove",n),E("handle:drag",n)}function _(n){var o,a;j(n,f.value?(o=n.touches[0])==null?void 0:o.clientY:(a=n.touches[0])==null?void 0:a.clientX)}function O(n){j(n,f.value?n.clientY:n.clientX)}Object.keys(oe).some(n=>n.includes(String(c.value)))&&(L.value=te(oe[String(c.value)]));const P=t.computed(()=>{const n=f.value?e.value.maxHeight:e.value.maxWidth;if(f.value&&e.value.maxHeight==="100%")return window.innerHeight;if(e.value.maxHeight==="100%")return window.innerWidth;if(String(n).includes("%")){const o=parseInt(String(n).replace("%",""));return(f.value?window.innerHeight:window.innerWidth)*o/100}return n}),I=t.computed(()=>{const n=f.value?e.value.minHeight:e.value.minWidth;if(f.value&&e.value.minHeight==="100%")return window.innerHeight;if(e.value.minWidth==="100%")return window.innerWidth;if(String(n).includes("%")){const o=parseInt(String(n).replace("%",""));return(f.value?window.innerHeight:window.innerWidth)*o/100}return n});function X(n){let o=n;parseInt(o)>=parseInt(P.value)&&(o=parseInt(P.value)),parseInt(o)<=parseInt(I.value)&&(o=parseInt(I.value)),typeof o=="number"&&(o=Math.round(o));let a=M(o);const r=M(P.value),h=M(I.value);return a>=r&&(a=r),h>=a&&(a=h),a}function ge(n){E("handle:click",n)}function we(n){d.value=g.value,f.value&&(d.value=C.value),T({rail:e.value.rail,resizedAmount:d.value,saveAmount:e.value.saveHeight||e.value.saveWidth,storageName:G.value,storageType:e.value.storageType}),E("handle:dblclick",n)}function K(n,o){n.preventDefault(),n.stopPropagation();const a=n.type;let r=L.value;$.value=!0,e.value.handlePosition==="border"&&(r=e.value.handleBorderWidth||1),B.mouseUp=!1,o{var n;return e.value.theme?e.value.theme:((n=V.global.current.value)==null?void 0:n.dark)===!0?"dark":"light"});function E(n,o){const a=parseInt(X(d.value))??0,r={e:o,eventName:n,offsetWidth:window.innerWidth-a+"px",resizedAmount:`${a}px`,resizedHeight:`${a}px`,resizedWidth:`${a}px`,width:`${a}px`};u(n,r)}return(n,o)=>(t.openBlock(),t.createBlock(t.unref(ye.VNavigationDrawer),t.mergeProps(t.unref(p),{ref_key:"resizeDrawer",ref:U,class:t.unref(le),location:t.unref(e).location,"model-value":n.modelValue,name:t.unref(e).name,style:t.unref(ue),tag:t.unref(e).tag,theme:t.unref(Be),width:t.unref(se),onMouseenter:pe,onMouseleave:fe}),{default:t.withCtx(()=>[t.unref(ve)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(de)),style:t.normalizeStyle(t.unref(ce)),onClick:ge,onDblclick:we,onMousedown:De,onMouseup:x,onTouchend:H,onTouchstart:Z},[t.unref(N).handle?(t.openBlock(),t.createElementBlock("div",Ee,[t.renderSlot(n.$slots,"handle")])):t.unref(v)!=="border"?(t.openBlock(),t.createBlock(Ce.VIcon,{key:1,class:t.normalizeClass(["v-resize-drawer--handle-icon",t.unref(me)]),icon:t.unref(Fe),size:t.unref(c),style:t.normalizeStyle(t.unref(he))},null,8,["class","icon","size","style"])):t.createCommentVNode("",!0)],38)):t.createCommentVNode("",!0),t.unref(N).prepend?t.renderSlot(n.$slots,"prepend",{key:1}):t.createCommentVNode("",!0),t.renderSlot(n.$slots,"default"),t.unref(N).append?t.renderSlot(n.$slots,"append",{key:2}):t.createCommentVNode("",!0)]),_:3},16,["class","location","model-value","name","style","tag","theme","width"]))}}),q=Symbol();exports.VResizeDrawer=re,exports.createVResizeDrawer=function(s={}){return{install:l=>{l.provide(q,s),l.component("VResizeDrawer",t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./VResizeDrawer-BHbwTRMl.js"))))}}},exports.default=re,exports.globalOptions=q; + */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),ee=require("vuetify"),ye=require("vuetify/components"),Ce=require("vuetify/lib/components/VIcon/index.mjs"),y="v-resize-drawer",A=s=>{const{unit:l="px",value:u}=s;if(u!=null&&u!=="")return+u?`${Number(u)}${l}`:String(u)},M=s=>{const l=window.innerWidth,u=function(i){if(typeof i=="string"){const F=/(\d+(\.\d+)?)(\s*([a-zA-Z]+))?/,e=i.match(F);if(!e)return i;const c=parseFloat(e[1]),v=e[4];if(!isNaN(c)){const p=Math.round(c);return v?`${p} ${v}`:`${p}`}return i}return typeof i=="number"?Math.round(i):i}(s);return typeof s=="string"&&s.includes("%")?Number(s.replace("%",""))/100*l:typeof u=="string"?Number(u.replace(/\D/g,"")):u},te=s=>{if(!s)return 0;if(typeof s=="number")return s;const l=document.createElement("div");l.style.position="absolute",l.style.visibility="hidden",l.style.width=s;const u=document.body;u.appendChild(l);const i=getComputedStyle(l).width;return u.removeChild(l),parseFloat(i)},be={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"}};function T(s,l){return s==="local"?localStorage.getItem(l):s==="session"?sessionStorage.getItem(l):""}const R=s=>{const{action:l="update",rail:u,resizedAmount:i,saveAmount:F,storageName:e,storageType:c}=s;if(u&&!F)return;let v=i;v=v??void 0,l==="set"&&(v=T(c,e)??"",v=v||i),c==="local"&&localStorage.setItem(e,String(v)),c==="session"&&sessionStorage.setItem(e,String(v))};function ne(s){let l=function(g){const C={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(C).forEach(([b,$])=>{g.toLowerCase()!=b.toLowerCase()||(B=$)}),B}(s),u=0,i=0,F=0,e=0,c=0,v=0;if(l.substring(0,1)==="#")l=function(g){let C=g.replace("#","");C.length===3&&(C=C.split("").map(z=>z+z).join(""));const B=parseInt(C.substring(0,2),16),b=parseInt(C.substring(2,4),16),$=parseInt(C.substring(4,6),16);return[B,b,$]}(l);else if(l.includes("rgb"))l=[...l.matchAll(/\d+/g)].map(Number);else if(l.includes("hsl"))return l=[...l.matchAll(/\d+/g)].map(Number),u=l[0],i=l[1],F=l[2],`${u} ${i}% ${F}%`;[e,c,v]=l,e/=255,c/=255,v/=255;const p=Math.max(e,c,v),D=Math.min(e,c,v);if(p===null||!D===null||isNaN(p)||isNaN(D))return"0 0% 100% / 12%";if(u=(p+D)/2,i=(p+D)/2,F=(p+D)/2,p==D)u=i=0;else{const g=p-D;switch(i=F>.5?g/(2-p-D):g/(p+D),p){case e:u=(c-v)/g+(c{if(function(i){return i==="transparent"||i==="none"||i==="inherit"||i==="currentColor"||i==="initial"||i==="unset"}(s))return s;if(function(i){return i.includes("--v-theme")}(s))return`rgb(var(${s}))`;const u=function(i,F){var c;const e=((c=F.global.current.value)==null?void 0:c.colors)??{};return Object.entries(e).find(([v])=>v===i)}(s,l);return u?`hsl(${ne(u[1])})`:`hsl(${ne(s)})`},oe={default:"1.5em",large:"1.75em",small:"1.25em","x-large":"2em","x-small":"1em"},Ae={handleBorderWidth:8,handleColor:"primary",handleIcon:void 0,handleIconSize:"x-small",handlePosition:"center",height:256,location:"start",maxHeight:window.innerHeight,maxWidth:window.innerWidth,minHeight:56,minWidth:56,modelValue:!0,name:void 0,rail:!1,railWidth:8,resizable:!0,saveWidth:!0,snapBack:!0,storageName:`${y}-width`,storageType:"local",tag:"nav",theme:void 0,touchless:!1,width:256},Ee={key:0,class:"v-resize-drawer--handle-slot"},re=t.defineComponent({__name:"VResizeDrawer",props:t.mergeDefaults({absolute:{},expandOnHover:{},floating:{},handleBorderWidth:{},handleColor:{},handleIcon:{},handleIconSize:{},handlePosition:{},height:{},image:{},location:{},maxHeight:{},maxWidth:{},minHeight:{},minWidth:{},modelValue:{},name:{},rail:{},railWidth:{},resizable:{type:Boolean},saveHeight:{type:Boolean},saveWidth:{type:Boolean},snapBack:{type:Boolean},storageName:{},storageType:{},tag:{},temporary:{},theme:{},touchless:{type:Boolean},width:{},widthSnapBack:{type:Boolean}},{...Ae}),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 u=l,i=s,F=t.inject(q,{}),e=t.ref({...i,...F});t.watchEffect(()=>{e.value={...i,...F}});const c=t.toRef(e.value,"handleIconSize"),v=t.toRef(e.value,"handlePosition"),p=t.computed(()=>e.value),D=t.inject(Symbol.for("vuetify:icons")),g=t.ref(256),C=t.ref(256),B={mouseDown:!1,mouseUp:!0},b=t.ref(!1),$=t.ref(!1),z=t.ref(e.value.location),U=t.ref(),d=t.ref(256),N=t.useSlots(),V=ee.useTheme(),ie=ee.useDisplay(),f=t.computed(()=>z.value==="top"||z.value==="bottom"),G=t.computed(()=>`${e.value.storageName}-${e.value.location}`);t.onBeforeMount(()=>{e.value.name===void 0&&(e.value.name=String(Math.floor(1e8*Math.random())))}),t.onMounted(()=>{(function(){if(!Y.value)throw new Error("[VResizeDrawer]: 'bottom' location does not support 'bottom' or 'top' handle positions.");if(e.value.rail&&!f.value)return void(d.value=e.value.railWidth||void 0);const n=T(e.value.storageType,G.value),o=A({value:f.value?e.value.height:e.value.width});d.value=o,g.value=d.value,(e.value.saveHeight||e.value.saveWidth)&&n&&!e.value.rail&&(d.value=T(e.value.storageType,G.value)),d.value=M(d.value),R({action:"update",rail:e.value.rail,resizedAmount:d.value,saveAmount:e.value.saveHeight||e.value.saveWidth,storageName:G.value,storageType:e.value.storageType})})()}),t.onUnmounted(()=>{document.removeEventListener("mouseup",x,!1),document.removeEventListener("mousemove",O,!1),document.removeEventListener("touchend",H,!1),document.removeEventListener("touchstart",Z,!1)}),t.watch(()=>i.modelValue,n=>{u("update:modelValue",n),n||u("close")});const le=t.computed(()=>(n=>{const{absolute:o=!1,expandOnHover:a,floating:r,isMouseover:h,location:m,rail:S,railWidth:k,temporary:W}=n;let w=m==="left"||m==="start"||m===void 0;return m!=="top"&&m!=="bottom"||(w=!1),{[`${y}`]:!0,[`${y}--${m}`]:m==="bottom"||m==="top","v-navigation-drawer--absolute":o??!1,"v-navigation-drawer--custom-rail":Number(k)!==56,"v-navigation-drawer--fixed":!o,"v-navigation-drawer--floating":r,"v-navigation-drawer--is-mouseover":t.unref(h),"v-navigation-drawer--left":w,"v-navigation-drawer--open-on-hover":a,"v-navigation-drawer--rail":S??!1,"v-navigation-drawer--right":m==="right"||m==="end","v-navigation-drawer--temporary":W||!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})),ue=t.computed(()=>(n=>{const{isMouseDown:o,location:a,maxWidth:r,minWidth:h,rail:m,railWidth:S,resizedAmount:k,snapBack:W}=n;if(m)return{};let w=m?S:t.unref(k);W||(parseInt(w)>=parseInt(r)&&(w=parseInt(r)),parseInt(w)<=parseInt(h)&&(w=parseInt(h)));let Q={};return Q=a==="top"||a==="bottom"?{maxHeight:`${A({value:w})} !important`,minHeight:`${A({value:w})} !important`,transitionDuration:t.unref(o)?"0s":".2s",width:"100%"}:{transitionDuration:t.unref(o)?"0s":".2s",width:A({value:w})},Q})({isMouseDown:$,location:e.value.location,maxWidth:P.value,minWidth:I.value,rail:e.value.rail,railWidth:e.value.railWidth,resizedAmount:d.value,snapBack:e.value.snapBack||e.value.widthSnapBack})),se=t.computed(()=>{if(f.value||e.value.rail)return;const n=A({value:d.value});return M(n)}),de=t.computed(()=>(n=>{const{drawerLocation:o,handlePosition:a}=n;return{[`${y}--handle-container`]:!0,[`${y}--handle-container-position-${a}`]:!0,[`${y}--handle-container-parent-${o}`]:!0}})({drawerLocation:e.value.location,handlePosition:e.value.handlePosition})),ce=t.computed(()=>(n=>{const{borderWidth:o,handleColor:a,iconSizeUnit:r,location:h,position:m,theme:S}=n,k="translateX(-50%) "+(h==="top"?"rotate(90deg)":"rotate(-90deg)");let W=`${r}px`,w=`${r}px`;return m==="border"?(h==="bottom"||h==="top"?W=A({value:o}):(W="100%",w=A({value:o})),{backgroundColor:ae(a,S),height:W,width:w}):{backgroundColor:"transparent",height:W,transform:h==="top"||h==="bottom"?k:void 0,width:w}})({borderWidth:e.value.handleBorderWidth||1,handleColor:e.value.handleColor,iconSize:e.value.handleIconSize,iconSizeUnit:L.value,location:e.value.location,position:e.value.handlePosition,theme:V})),ve=t.computed(()=>(!e.value.touchless||!ie.mobile.value)&&!(!e.value.resizable||e.value.rail)&&!!Y.value),Y=t.computed(()=>e.value.location!=="bottom"&&e.value.location!=="top"||e.value.handlePosition!=="bottom"&&e.value.handlePosition!=="top"),he=t.computed(()=>(n=>{const{color:o,theme:a}=n;return{color:ae(o,a)}})({color:i.handleColor,theme:V})),me=t.computed(()=>(n=>{const{drawerLocation:o,handlePosition:a,iconOptions:r,isUserIcon:h}=n;return{[`${y}--handle-container-icon`]:!0,[`${y}--handle-container-icon-${a}-${o}`]:!0,[`${y}--handle-container-icon-user-icon`]:h,[`${y}--handle-container-icon-fa`]:(r==null?void 0:r.defaultSet)==="fa",[`${y}--handle-container-icon-fa-${a}`]:(r==null?void 0:r.defaultSet)==="fa"}})({drawerLocation:e.value.location,handlePosition:e.value.handlePosition,iconOptions:D,isUserIcon:e.value.handleIcon!=null&&e.value.handleIcon!==""})),Fe=t.computed(()=>(o=>{const{icon:a,iconOptions:r,name:h}=o;if(h==="border")return;if(a)return a;let m=((r==null?void 0:r.defaultSet)??"").toLowerCase();m=m==="fa"||m==="fasvg"?"fa":m;const S=be[m];if(!S)throw new Error(`[VResizeDrawer]: No default ${r==null?void 0:r.defaultSet} icon set found.`);const k=S[h];if(!k)throw new Error(`[VResizeDrawer]: No ${h} icon found.`);return k})({icon:e.value.handleIcon,iconOptions:D,name:e.value.handlePosition})),L=t.ref(te(String(c.value)));function pe(){b.value=!0,u("drawer:mouseenter",b.value)}function fe(){b.value=!1,u("drawer:mouseleave",b.value)}function j(n,o){let a=o;e.value.location!=="right"&&e.value.location!=="end"||(a=document.body.scrollWidth-a+L.value/2),e.value.location!=="left"&&e.value.location!=="start"||(a+=L.value/2),e.value.location==="top"&&(a-=function(r){const h=-29e-5*r*r+-.356*r+43.56;return Math.ceil(h)}(L.value)),e.value.location==="bottom"&&(a=window.innerHeight-a+L.value/2),d.value=A({value:a})||void 0,document.body.style.cursor="grabbing",E("handle:touchmove",n),E("handle:drag",n)}function _(n){var o,a;j(n,f.value?(o=n.touches[0])==null?void 0:o.clientY:(a=n.touches[0])==null?void 0:a.clientX)}function O(n){j(n,f.value?n.clientY:n.clientX)}Object.keys(oe).some(n=>n.includes(String(c.value)))&&(L.value=te(oe[String(c.value)]));const P=t.computed(()=>{const n=f.value?e.value.maxHeight:e.value.maxWidth;if(f.value&&e.value.maxHeight==="100%")return window.innerHeight;if(e.value.maxHeight==="100%")return window.innerWidth;if(String(n).includes("%")){const o=parseInt(String(n).replace("%",""));return(f.value?window.innerHeight:window.innerWidth)*o/100}return n}),I=t.computed(()=>{const n=f.value?e.value.minHeight:e.value.minWidth;if(f.value&&e.value.minHeight==="100%")return window.innerHeight;if(e.value.minWidth==="100%")return window.innerWidth;if(String(n).includes("%")){const o=parseInt(String(n).replace("%",""));return(f.value?window.innerHeight:window.innerWidth)*o/100}return n});function X(n){let o=n;parseInt(o)>=parseInt(P.value)&&(o=parseInt(P.value)),parseInt(o)<=parseInt(I.value)&&(o=parseInt(I.value)),typeof o=="number"&&(o=Math.round(o));let a=M(o);const r=M(P.value),h=M(I.value);return a>=r&&(a=r),h>=a&&(a=h),a}function ge(n){E("handle:click",n)}function we(n){d.value=g.value,f.value&&(d.value=C.value),R({rail:e.value.rail,resizedAmount:d.value,saveAmount:e.value.saveHeight||e.value.saveWidth,storageName:G.value,storageType:e.value.storageType}),E("handle:dblclick",n)}function K(n,o){n.preventDefault(),n.stopPropagation();const a=n.type;let r=L.value;$.value=!0,e.value.handlePosition==="border"&&(r=e.value.handleBorderWidth||1),B.mouseUp=!1,o{var n;return e.value.theme?e.value.theme:((n=V.global.current.value)==null?void 0:n.dark)===!0?"dark":"light"});function E(n,o){const a=parseInt(X(d.value))??0,r={e:o,eventName:n,offsetWidth:window.innerWidth-a+"px",resizedAmount:`${a}px`,resizedHeight:`${a}px`,resizedWidth:`${a}px`,width:`${a}px`};u(n,r)}return(n,o)=>(t.openBlock(),t.createBlock(t.unref(ye.VNavigationDrawer),t.mergeProps(t.unref(p),{ref_key:"resizeDrawer",ref:U,class:t.unref(le),location:t.unref(e).location,"model-value":n.modelValue,name:t.unref(e).name,style:t.unref(ue),tag:t.unref(e).tag,theme:t.unref(Be),width:t.unref(se),onMouseenter:pe,onMouseleave:fe}),{default:t.withCtx(()=>[t.unref(ve)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(de)),style:t.normalizeStyle(t.unref(ce)),onClick:ge,onDblclick:we,onMousedown:De,onMouseup:x,onTouchend:H,onTouchstart:Z},[t.unref(N).handle?(t.openBlock(),t.createElementBlock("div",Ee,[t.renderSlot(n.$slots,"handle")])):t.unref(v)!=="border"?(t.openBlock(),t.createBlock(Ce.VIcon,{key:1,class:t.normalizeClass(["v-resize-drawer--handle-icon",t.unref(me)]),icon:t.unref(Fe),size:t.unref(c),style:t.normalizeStyle(t.unref(he))},null,8,["class","icon","size","style"])):t.createCommentVNode("",!0)],38)):t.createCommentVNode("",!0),t.unref(N).prepend?t.renderSlot(n.$slots,"prepend",{key:1}):t.createCommentVNode("",!0),t.renderSlot(n.$slots,"default"),t.unref(N).append?t.renderSlot(n.$slots,"append",{key:2}):t.createCommentVNode("",!0)]),_:3},16,["class","location","model-value","name","style","tag","theme","width"]))}}),q=Symbol();exports.VResizeDrawer=re,exports.createVResizeDrawer=function(s={}){return{install:l=>{l.provide(q,s),l.component("VResizeDrawer",t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./VResizeDrawer-BHbwTRMl.js"))))}}},exports.default=re,exports.globalOptions=q; (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}.v-resize-drawer--bottom{transition:min-height .3s}.v-resize-drawer--bottom .v-resize-drawer--handle-container-position-center{left:50%;top:0;transform:translate(-50%)}.v-resize-drawer--bottom .v-resize-drawer--handle-container-position-border{cursor:row-resize;left:0%;top:0!important;width:100%!important}.v-resize-drawer--top{top:0!important;transition:min-height .3s}.v-resize-drawer--top .v-resize-drawer--handle-container-position-center{bottom:1px;left:50%;top:unset;transform:translate(-50%)}.v-resize-drawer--top .v-resize-drawer--handle-container-position-border{bottom:0!important;cursor:row-resize;left:0%;top:unset;width:100%!important}.v-resize-drawer--bottom .v-navigation-drawer__content,.v-resize-drawer--top .v-navigation-drawer__content{flex:1 1 auto;position:relative}@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 408d1dd..3574270 100644 --- a/dist/vuetify-resize-drawer.es.js +++ b/dist/vuetify-resize-drawer.es.js @@ -1,4 +1,4 @@ -import { unref as d, defineComponent as $e, mergeDefaults as Le, inject as oe, ref as b, watchEffect as Me, toRefs as Ge, computed as p, useSlots as Ie, onBeforeMount as ze, onMounted as Pe, onUnmounted as xe, watch as He, openBlock as O, createBlock as ie, mergeProps as Ne, withCtx as Re, createElementBlock as re, normalizeClass as le, normalizeStyle as ue, renderSlot as T, createCommentVNode as V, defineAsyncComponent as Oe } from "vue"; +import { unref as d, defineComponent as Le, mergeDefaults as Me, inject as oe, ref as b, watchEffect as Ge, toRef as ie, computed as p, useSlots as Ie, onBeforeMount as ze, onMounted as Pe, onUnmounted as xe, watch as He, openBlock as O, createBlock as re, mergeProps as Ne, withCtx as Re, createElementBlock as le, normalizeClass as ue, normalizeStyle as se, renderSlot as T, createCommentVNode as V, defineAsyncComponent as Oe } from "vue"; import { useTheme as Te, useDisplay as Ve } from "vuetify"; import { VNavigationDrawer as qe } from "vuetify/components"; import { VIcon as Ue } from "vuetify/lib/components/VIcon/index.mjs"; @@ -12,16 +12,7 @@ import { VIcon as Ue } from "vuetify/lib/components/VIcon/index.mjs"; * @repository https://github.com/webdevnerdstuff/vuetify-resize-drawer * @license MIT License */ -const C = "v-resize-drawer", Ye = { handleBorderWidth: 8, handleColor: "primary", handleIcon: void 0, handleIconSize: "x-small", handlePosition: "center", height: 256, location: "start", maxHeight: window.innerHeight, maxWidth: window.innerWidth, minHeight: 56, minWidth: 56, modelValue: !0, name: void 0, rail: !1, railWidth: 8, resizable: !0, saveWidth: !0, snapBack: !0, storageName: `${C}-width`, storageType: "local", tag: "nav", theme: void 0, touchless: !1, width: 256 }; -function X(u, r) { - return u === "local" ? localStorage.getItem(r) : u === "session" ? sessionStorage.getItem(r) : ""; -} -const j = (u) => { - const { action: r = "update", rail: l, resizedAmount: i, saveAmount: F, storageName: e, storageType: c } = u; - if (l && !F) return; - let v = i; - v = v ?? void 0, r === "set" && (v = X(c, e) ?? "", v = v || i), c === "local" && localStorage.setItem(e, String(v)), c === "session" && sessionStorage.setItem(e, String(v)); -}, S = (u) => { +const C = "v-resize-drawer", S = (u) => { const { unit: r = "px", value: l } = u; if (l != null && l !== "") return +l ? `${Number(l)}${r}` : String(l); }, I = (u) => { @@ -39,7 +30,7 @@ const j = (u) => { return typeof i == "number" ? Math.round(i) : i; }(u); return typeof u == "string" && u.includes("%") ? Number(u.replace("%", "")) / 100 * r : typeof l == "string" ? Number(l.replace(/\D/g, "")) : l; -}, se = (u) => { +}, de = (u) => { if (!u) return 0; if (typeof u == "number") return u; const r = document.createElement("div"); @@ -48,8 +39,17 @@ const j = (u) => { l.appendChild(r); const i = getComputedStyle(r).width; return l.removeChild(r), parseFloat(i); +}, Ye = { 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" } }; +function X(u, r) { + return u === "local" ? localStorage.getItem(r) : u === "session" ? sessionStorage.getItem(r) : ""; +} +const j = (u) => { + const { action: r = "update", rail: l, resizedAmount: i, saveAmount: F, storageName: e, storageType: c } = u; + if (l && !F) return; + let v = i; + v = v ?? void 0, r === "set" && (v = X(c, e) ?? "", v = v || i), c === "local" && localStorage.setItem(e, String(v)), c === "session" && sessionStorage.setItem(e, String(v)); }; -function de(u) { +function ce(u) { let r = function(w) { const A = { 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 y = w; @@ -86,7 +86,7 @@ function de(u) { } return l = Math.round(360 * l), i = Math.round(100 * i), F = Math.round(100 * F), `${l} ${i}% ${F}%`; } -const ce = (u, r) => { +const ve = (u, r) => { if (/* @__PURE__ */ function(i) { return i === "transparent" || i === "none" || i === "inherit" || i === "currentColor" || i === "initial" || i === "unset"; }(u)) return u; @@ -98,13 +98,13 @@ const ce = (u, r) => { const e = ((c = F.global.current.value) == null ? void 0 : c.colors) ?? {}; return Object.entries(e).find(([v]) => v === i); }(u, r); - return l ? `hsl(${de(l[1])})` : `hsl(${de(u)})`; -}, ve = { default: "1.5em", large: "1.75em", small: "1.25em", "x-large": "2em", "x-small": "1em" }, je = { 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" }, Qe = $e({ __name: "VResizeDrawer", props: Le({ absolute: {}, expandOnHover: {}, floating: {}, handleBorderWidth: {}, handleColor: {}, handleIcon: {}, handleIconSize: {}, handlePosition: {}, height: {}, image: {}, location: {}, maxHeight: {}, maxWidth: {}, minHeight: {}, minWidth: {}, modelValue: {}, name: {}, rail: {}, railWidth: {}, resizable: { type: Boolean }, saveHeight: { type: Boolean }, saveWidth: { type: Boolean }, snapBack: { type: Boolean }, storageName: {}, storageType: {}, tag: {}, temporary: {}, theme: {}, touchless: { type: Boolean }, width: {}, widthSnapBack: { type: Boolean } }, { ...Ye }), 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(u, { emit: r }) { - const l = r, i = u, F = oe(he, {}), e = b({ ...i, ...F }); - Me(() => { + return l ? `hsl(${ce(l[1])})` : `hsl(${ce(u)})`; +}, he = { default: "1.5em", large: "1.75em", small: "1.25em", "x-large": "2em", "x-small": "1em" }, je = { handleBorderWidth: 8, handleColor: "primary", handleIcon: void 0, handleIconSize: "x-small", handlePosition: "center", height: 256, location: "start", maxHeight: window.innerHeight, maxWidth: window.innerWidth, minHeight: 56, minWidth: 56, modelValue: !0, name: void 0, rail: !1, railWidth: 8, resizable: !0, saveWidth: !0, snapBack: !0, storageName: `${C}-width`, storageType: "local", tag: "nav", theme: void 0, touchless: !1, width: 256 }, Xe = { key: 0, class: "v-resize-drawer--handle-slot" }, Qe = Le({ __name: "VResizeDrawer", props: Me({ absolute: {}, expandOnHover: {}, floating: {}, handleBorderWidth: {}, handleColor: {}, handleIcon: {}, handleIconSize: {}, handlePosition: {}, height: {}, image: {}, location: {}, maxHeight: {}, maxWidth: {}, minHeight: {}, minWidth: {}, modelValue: {}, name: {}, rail: {}, railWidth: {}, resizable: { type: Boolean }, saveHeight: { type: Boolean }, saveWidth: { type: Boolean }, snapBack: { type: Boolean }, storageName: {}, storageType: {}, tag: {}, temporary: {}, theme: {}, touchless: { type: Boolean }, width: {}, widthSnapBack: { type: Boolean } }, { ...je }), 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(u, { emit: r }) { + const l = r, i = u, F = oe(me, {}), e = b({ ...i, ...F }); + Ge(() => { e.value = { ...i, ...F }; }); - const { handleIconSize: c, handlePosition: v } = Ge(e.value), g = p(() => e.value), B = oe(Symbol.for("vuetify:icons")), w = b(256), A = b(256), y = { mouseDown: !1, mouseUp: !0 }, E = b(!1), M = b(!1), z = b(e.value.location), _ = b(), s = b(256), q = Ie(), U = Te(), me = Ve(), f = p(() => z.value === "top" || z.value === "bottom"), P = p(() => `${e.value.storageName}-${e.value.location}`); + const c = ie(e.value, "handleIconSize"), v = ie(e.value, "handlePosition"), g = p(() => e.value), B = oe(Symbol.for("vuetify:icons")), w = b(256), A = b(256), y = { mouseDown: !1, mouseUp: !0 }, E = b(!1), M = b(!1), z = b(e.value.location), _ = b(), s = b(256), q = Ie(), U = Te(), Fe = Ve(), f = p(() => z.value === "top" || z.value === "bottom"), P = p(() => `${e.value.storageName}-${e.value.location}`); ze(() => { e.value.name === void 0 && (e.value.name = String(Math.floor(1e8 * Math.random()))); }), Pe(() => { @@ -119,50 +119,50 @@ const ce = (u, r) => { }), He(() => i.modelValue, (a) => { l("update:modelValue", a), a || l("close"); }); - const Fe = p(() => ((a) => { + const pe = p(() => ((a) => { const { absolute: n = !1, expandOnHover: t, floating: o, isMouseover: h, location: m, rail: W, railWidth: $, temporary: L } = a; let D = m === "left" || m === "start" || m === void 0; return m !== "top" && m !== "bottom" || (D = !1), { [`${C}`]: !0, [`${C}--${m}`]: m === "bottom" || m === "top", "v-navigation-drawer--absolute": n ?? !1, "v-navigation-drawer--custom-rail": Number($) !== 56, "v-navigation-drawer--fixed": !n, "v-navigation-drawer--floating": o, "v-navigation-drawer--is-mouseover": d(h), "v-navigation-drawer--left": D, "v-navigation-drawer--open-on-hover": t, "v-navigation-drawer--rail": W ?? !1, "v-navigation-drawer--right": m === "right" || m === "end", "v-navigation-drawer--temporary": L || !1 }; - })({ absolute: e.value.absolute, expandOnHover: e.value.expandOnHover, floating: e.value.floating, isMouseover: E, location: e.value.location, rail: e.value.rail, railWidth: e.value.railWidth, temporary: e.value.temporary })), pe = p(() => ((a) => { + })({ absolute: e.value.absolute, expandOnHover: e.value.expandOnHover, floating: e.value.floating, isMouseover: E, location: e.value.location, rail: e.value.rail, railWidth: e.value.railWidth, temporary: e.value.temporary })), ge = p(() => ((a) => { const { isMouseDown: n, location: t, maxWidth: o, minWidth: h, rail: m, railWidth: W, resizedAmount: $, snapBack: L } = a; if (m) return {}; let D = m ? W : d($); L || (parseInt(D) >= parseInt(o) && (D = parseInt(o)), parseInt(D) <= parseInt(h) && (D = parseInt(h))); let ne = {}; return ne = t === "top" || t === "bottom" ? { maxHeight: `${S({ value: D })} !important`, minHeight: `${S({ value: D })} !important`, transitionDuration: d(n) ? "0s" : ".2s", width: "100%" } : { transitionDuration: d(n) ? "0s" : ".2s", width: S({ value: D }) }, ne; - })({ isMouseDown: M, location: e.value.location, maxWidth: H.value, minWidth: x.value, rail: e.value.rail, railWidth: e.value.railWidth, resizedAmount: s.value, snapBack: e.value.snapBack || e.value.widthSnapBack })), ge = p(() => { + })({ isMouseDown: M, location: e.value.location, maxWidth: H.value, minWidth: x.value, rail: e.value.rail, railWidth: e.value.railWidth, resizedAmount: s.value, snapBack: e.value.snapBack || e.value.widthSnapBack })), fe = p(() => { if (f.value || e.value.rail) return; const a = S({ value: s.value }); return I(a); - }), fe = p(() => ((a) => { + }), we = p(() => ((a) => { const { drawerLocation: n, handlePosition: t } = a; return { [`${C}--handle-container`]: !0, [`${C}--handle-container-position-${t}`]: !0, [`${C}--handle-container-parent-${n}`]: !0 }; - })({ drawerLocation: e.value.location, handlePosition: e.value.handlePosition })), we = p(() => ((a) => { + })({ drawerLocation: e.value.location, handlePosition: e.value.handlePosition })), De = p(() => ((a) => { const { borderWidth: n, handleColor: t, iconSizeUnit: o, location: h, position: m, theme: W } = a, $ = "translateX(-50%) " + (h === "top" ? "rotate(90deg)" : "rotate(-90deg)"); let L = `${o}px`, D = `${o}px`; - return m === "border" ? (h === "bottom" || h === "top" ? L = S({ value: n }) : (L = "100%", D = S({ value: n })), { backgroundColor: ce(t, W), height: L, width: D }) : { backgroundColor: "transparent", height: L, transform: h === "top" || h === "bottom" ? $ : void 0, width: D }; - })({ borderWidth: e.value.handleBorderWidth || 1, handleColor: e.value.handleColor, iconSize: e.value.handleIconSize, iconSizeUnit: G.value, location: e.value.location, position: e.value.handlePosition, theme: U })), De = p(() => (!e.value.touchless || !me.mobile.value) && !(!e.value.resizable || e.value.rail) && !!K.value), K = p(() => e.value.location !== "bottom" && e.value.location !== "top" || e.value.handlePosition !== "bottom" && e.value.handlePosition !== "top"), Be = p(() => ((a) => { + return m === "border" ? (h === "bottom" || h === "top" ? L = S({ value: n }) : (L = "100%", D = S({ value: n })), { backgroundColor: ve(t, W), height: L, width: D }) : { backgroundColor: "transparent", height: L, transform: h === "top" || h === "bottom" ? $ : void 0, width: D }; + })({ borderWidth: e.value.handleBorderWidth || 1, handleColor: e.value.handleColor, iconSize: e.value.handleIconSize, iconSizeUnit: G.value, location: e.value.location, position: e.value.handlePosition, theme: U })), Be = p(() => (!e.value.touchless || !Fe.mobile.value) && !(!e.value.resizable || e.value.rail) && !!K.value), K = p(() => e.value.location !== "bottom" && e.value.location !== "top" || e.value.handlePosition !== "bottom" && e.value.handlePosition !== "top"), ye = p(() => ((a) => { const { color: n, theme: t } = a; - return { color: ce(n, t) }; - })({ color: i.handleColor, theme: U })), ye = p(() => ((a) => { + return { color: ve(n, t) }; + })({ color: i.handleColor, theme: U })), Ce = p(() => ((a) => { const { drawerLocation: n, handlePosition: t, iconOptions: o, isUserIcon: h } = a; return { [`${C}--handle-container-icon`]: !0, [`${C}--handle-container-icon-${t}-${n}`]: !0, [`${C}--handle-container-icon-user-icon`]: h, [`${C}--handle-container-icon-fa`]: (o == null ? void 0 : o.defaultSet) === "fa", [`${C}--handle-container-icon-fa-${t}`]: (o == null ? void 0 : o.defaultSet) === "fa" }; - })({ drawerLocation: e.value.location, handlePosition: e.value.handlePosition, iconOptions: B, isUserIcon: e.value.handleIcon != null && e.value.handleIcon !== "" })), Ce = p(() => ((n) => { + })({ drawerLocation: e.value.location, handlePosition: e.value.handlePosition, iconOptions: B, isUserIcon: e.value.handleIcon != null && e.value.handleIcon !== "" })), Ae = p(() => ((n) => { const { icon: t, iconOptions: o, name: h } = n; if (h === "border") return; if (t) return t; let m = ((o == null ? void 0 : o.defaultSet) ?? "").toLowerCase(); m = m === "fa" || m === "fasvg" ? "fa" : m; - const W = je[m]; + const W = Ye[m]; if (!W) throw new Error(`[VResizeDrawer]: No default ${o == null ? void 0 : o.defaultSet} icon set found.`); const $ = W[h]; if (!$) throw new Error(`[VResizeDrawer]: No ${h} icon found.`); return $; - })({ icon: e.value.handleIcon, iconOptions: B, name: e.value.handlePosition })), G = b(se(String(c.value))); - function Ae() { + })({ icon: e.value.handleIcon, iconOptions: B, name: e.value.handlePosition })), G = b(de(String(c.value))); + function Ee() { E.value = !0, l("drawer:mouseenter", E.value); } - function Ee() { + function be() { E.value = !1, l("drawer:mouseleave", E.value); } function Z(a, n) { @@ -179,7 +179,7 @@ const ce = (u, r) => { function Y(a) { Z(a, f.value ? a.clientY : a.clientX); } - Object.keys(ve).some((a) => a.includes(String(c.value))) && (G.value = se(ve[String(c.value)])); + Object.keys(he).some((a) => a.includes(String(c.value))) && (G.value = de(he[String(c.value)])); const H = p(() => { const a = f.value ? e.value.maxHeight : e.value.maxWidth; if (f.value && e.value.maxHeight === "100%") return window.innerHeight; @@ -206,10 +206,10 @@ const ce = (u, r) => { const o = I(H.value), h = I(x.value); return t >= o && (t = o), h >= t && (t = h), t; } - function be(a) { + function Se(a) { k("handle:click", a); } - function Se(a) { + function ke(a) { s.value = w.value, f.value && (s.value = A.value), j({ rail: e.value.rail, resizedAmount: s.value, saveAmount: e.value.saveHeight || e.value.saveWidth, storageName: P.value, storageType: e.value.storageType }), k("handle:dblclick", a); } function ee(a, n) { @@ -218,7 +218,7 @@ const ce = (u, r) => { let o = G.value; M.value = !0, e.value.handlePosition === "border" && (o = e.value.handleBorderWidth || 1), y.mouseUp = !1, n < o && (t === "touchstart" ? document.addEventListener("touchmove", J, !1) : document.addEventListener("mousemove", Y, !1)), y.mouseDown || (y.mouseDown = !0, t === "touchstart" ? (document.addEventListener("touchend", R, !1), k("handle:touchstart", a)) : (document.addEventListener("mouseup", N, !1), k("handle:mousedown", a))); } - function ke(a) { + function We(a) { ee(a, f.value ? a.offsetY : a.offsetX); } function ae(a) { @@ -239,7 +239,7 @@ const ce = (u, r) => { function R(a) { te(a); } - const We = p(() => { + const $e = p(() => { var a; return e.value.theme ? e.value.theme : ((a = U.global.current.value) == null ? void 0 : a.dark) === !0 ? "dark" : "light"; }); @@ -247,17 +247,17 @@ const ce = (u, r) => { const t = parseInt(Q(s.value)) ?? 0, o = { e: n, eventName: a, offsetWidth: window.innerWidth - t + "px", resizedAmount: `${t}px`, resizedHeight: `${t}px`, resizedWidth: `${t}px`, width: `${t}px` }; l(a, o); } - return (a, n) => (O(), ie(d(qe), Ne(d(g), { ref_key: "resizeDrawer", ref: _, class: d(Fe), location: d(e).location, "model-value": a.modelValue, name: d(e).name, style: d(pe), tag: d(e).tag, theme: d(We), width: d(ge), onMouseenter: Ae, onMouseleave: Ee }), { default: Re(() => [d(De) ? (O(), re("div", { key: 0, class: le(d(fe)), style: ue(d(we)), onClick: be, onDblclick: Se, onMousedown: ke, onMouseup: N, onTouchend: R, onTouchstart: ae }, [d(q).handle ? (O(), re("div", Xe, [T(a.$slots, "handle")])) : d(v) !== "border" ? (O(), ie(Ue, { key: 1, class: le(["v-resize-drawer--handle-icon", d(ye)]), icon: d(Ce), size: d(c), style: ue(d(Be)) }, null, 8, ["class", "icon", "size", "style"])) : V("", !0)], 38)) : V("", !0), d(q).prepend ? T(a.$slots, "prepend", { key: 1 }) : V("", !0), T(a.$slots, "default"), d(q).append ? T(a.$slots, "append", { key: 2 }) : V("", !0)]), _: 3 }, 16, ["class", "location", "model-value", "name", "style", "tag", "theme", "width"])); -} }), he = Symbol(); + return (a, n) => (O(), re(d(qe), Ne(d(g), { ref_key: "resizeDrawer", ref: _, class: d(pe), location: d(e).location, "model-value": a.modelValue, name: d(e).name, style: d(ge), tag: d(e).tag, theme: d($e), width: d(fe), onMouseenter: Ee, onMouseleave: be }), { default: Re(() => [d(Be) ? (O(), le("div", { key: 0, class: ue(d(we)), style: se(d(De)), onClick: Se, onDblclick: ke, onMousedown: We, onMouseup: N, onTouchend: R, onTouchstart: ae }, [d(q).handle ? (O(), le("div", Xe, [T(a.$slots, "handle")])) : d(v) !== "border" ? (O(), re(Ue, { key: 1, class: ue(["v-resize-drawer--handle-icon", d(Ce)]), icon: d(Ae), size: d(c), style: se(d(ye)) }, null, 8, ["class", "icon", "size", "style"])) : V("", !0)], 38)) : V("", !0), d(q).prepend ? T(a.$slots, "prepend", { key: 1 }) : V("", !0), T(a.$slots, "default"), d(q).append ? T(a.$slots, "append", { key: 2 }) : V("", !0)]), _: 3 }, 16, ["class", "location", "model-value", "name", "style", "tag", "theme", "width"])); +} }), me = Symbol(); function ea(u = {}) { return { install: (r) => { - r.provide(he, u), r.component("VResizeDrawer", Oe(() => import("./VResizeDrawer-4DGmo2jm.mjs"))); + r.provide(me, u), r.component("VResizeDrawer", Oe(() => import("./VResizeDrawer-4DGmo2jm.mjs"))); } }; } export { Qe as VResizeDrawer, ea as createVResizeDrawer, Qe as default, - he as globalOptions + me 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}.v-resize-drawer--bottom{transition:min-height .3s}.v-resize-drawer--bottom .v-resize-drawer--handle-container-position-center{left:50%;top:0;transform:translate(-50%)}.v-resize-drawer--bottom .v-resize-drawer--handle-container-position-border{cursor:row-resize;left:0%;top:0!important;width:100%!important}.v-resize-drawer--top{top:0!important;transition:min-height .3s}.v-resize-drawer--top .v-resize-drawer--handle-container-position-center{bottom:1px;left:50%;top:unset;transform:translate(-50%)}.v-resize-drawer--top .v-resize-drawer--handle-container-position-border{bottom:0!important;cursor:row-resize;left:0%;top:unset;width:100%!important}.v-resize-drawer--bottom .v-navigation-drawer__content,.v-resize-drawer--top .v-navigation-drawer__content{flex:1 1 auto;position:relative}@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 7787db8..e355f64 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "dev": "NODE_OPTIONS='--no-warnings' vite", "watch": "pnpm dev", "play": "sh src/playground/configs/build.sh && NODE_ENV=playground pnpm dev", - "build": "vue-tsc && npm run test:build && vite build --config vite.build.config.mts", + "build": "tsc -p tsconfig.build.json && npm run test:build && vite build --config vite.build.config.mts", "build:docs": "vite build", "predeploy": "npm run build", "deploy": "gh-pages -d docs", diff --git a/src/documentation/types/docs.d.ts b/src/documentation/types/docs.d.ts index eb9550d..271851c 100644 --- a/src/documentation/types/docs.d.ts +++ b/src/documentation/types/docs.d.ts @@ -11,6 +11,7 @@ declare namespace Docs { color: string; dark: boolean; elevation: number; + widthSnapBack?: boolean | undefined; } export interface Links { diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..17e74f9 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,19 @@ +{ + "exclude": [ + "playground", + "src/**/*.spec.ts", + "src/**/*.test.ts", + "src/playground/**/*.ts", + "src/playground/**/*.vue", + "src/documentation/**/*.ts", + "src/documentation/**/*.tsx", + "src/documentation/**/*.vue", + "src/libraries/**/*.ts", + "src/plugins/**/*.ts", + "src/stores/**/*.ts", + "src/App.vue", + "src/main.ts", + "node_modules", + ], + "extends": "./tsconfig.json" +} diff --git a/tsconfig.node.json b/tsconfig.node.json index 9d9adce..be11f51 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -1,8 +1,9 @@ { "compilerOptions": { "composite": true, + "skipLibCheck": true, "module": "ESNext", - "moduleResolution": "Node", + "moduleResolution": "bundler", "allowSyntheticDefaultImports": true }, "include": [ diff --git a/vite.build.config.mts b/vite.build.config.mts index 0e7924a..b4a8a79 100644 --- a/vite.build.config.mts +++ b/vite.build.config.mts @@ -11,6 +11,7 @@ import vue from '@vitejs/plugin-vue'; import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'; import { viteStaticCopy } from 'vite-plugin-static-copy'; + const scopedPackageName = pkg.name; const packageName = scopedPackageName.split('/')[1]; @@ -74,10 +75,12 @@ export default defineConfig({ }), dts({ insertTypesEntry: true, + tsconfigPath: 'tsconfig.build.json', }), typescript({ check: true, include: ['./src/plugin/**/*.vue'], + tsconfig: 'tsconfig.build.json', }), vuetify({ autoImport: true,