@deck9/ui 0.16.0-0 → 0.17.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button/Button.vue.d.ts +2 -6
- package/dist/Checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/Input/Input.vue.d.ts +2 -2
- package/dist/Select/Select.vue.d.ts +2 -0
- package/dist/Switch/Switch.vue.d.ts +2 -4
- package/dist/index.d.ts +0 -1
- package/dist/src/ui.mjs +498 -2647
- package/dist/src/ui.umd.js +2 -5
- package/dist/types/types.d.ts +5 -0
- package/dist/utils/useFormClasses.d.ts +1 -1
- package/package.json +17 -18
- package/dist/SplitButton/SplitButton.vue.d.ts +0 -52
- package/dist/SplitButton/index.d.ts +0 -1
- package/tailwind.config.js +0 -57
package/dist/src/ui.umd.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
(function(T,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("@fortawesome/vue-fontawesome"),require("@fortawesome/fontawesome-svg-core"),require("@fortawesome/free-solid-svg-icons"),require("@fortawesome/free-brands-svg-icons")):typeof define=="function"&&define.amd?define(["exports","vue","@fortawesome/vue-fontawesome","@fortawesome/fontawesome-svg-core","@fortawesome/free-solid-svg-icons","@fortawesome/free-brands-svg-icons"],n):(T=typeof globalThis<"u"?globalThis:T||self,n(T.ui={},T.Vue,T.vueFontawesome,T.fontawesomeSvgCore,T.fasIcons,T.fabIcon))})(this,function(T,n,an,Oe,sn,cn){"use strict";function qe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,l.get?l:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const f=qe(sn),te=qe(cn);var Xe="fas",Ye="numeric-input",Qe=512,Ze=512,De=[],Je="",et="m409.445 111 2.112.004c34.066.146 46.74 3.848 59.517 10.681 13.037 6.973 23.268 17.204 30.24 30.241l.415.782c6.705 12.782 10.271 25.9 10.271 60.847v72.002c-.15 34.066-3.852 46.74-10.685 59.517-6.973 13.037-17.204 23.268-30.241 30.24l-.782.415C457.51 382.434 444.392 386 409.445 386h-306.89l-2.112-.004c-34.066-.146-46.74-3.848-59.517-10.681-13.037-6.973-23.268-17.204-30.24-30.241l-.415-.782C3.566 331.51 0 318.392 0 283.445v-69.89c0-35.66 3.713-48.592 10.685-61.629 6.973-13.037 17.204-23.268 30.241-30.24l.782-.415C54.49 114.566 67.608 111 102.555 111h306.89Zm.806 36H102.555l-2.387.005c-22.69.089-31.789 1.488-39.667 5.128l-.523.246c-.696.332-1.385.683-2.074 1.052-6.764 3.617-11.856 8.71-15.473 15.473l-.282.533c-4.492 8.62-6.116 17.401-6.148 43.312v71.502l.012 3.09c.161 24.044 1.9 32.308 6.418 40.755 3.617 6.764 8.71 11.856 15.473 15.473l.533.282c8.62 4.492 17.401 6.116 43.312 6.149h307.696c27.078 0 35.763-1.677 44.651-6.43 6.764-3.618 11.856-8.71 15.473-15.474l.282-.533c4.492-8.62 6.116-17.401 6.149-43.312v-70.696c0-27.078-1.677-35.763-6.43-44.651-3.618-6.764-8.71-11.856-15.474-15.473l-.533-.282c-8.62-4.492-17.401-6.116-43.312-6.149Zm-164.715 19c11.682 0 22.013 1.976 30.994 5.929 8.98 3.952 16.005 9.38 21.074 16.284 5.07 6.904 7.578 14.797 7.527 23.677.103 8.829-2.92 16.066-9.07 21.713-6.15 5.646-13.935 8.983-23.353 10.01v1.231c12.764 1.386 22.362 5.274 28.794 11.665 6.433 6.39 9.598 14.411 9.496 24.061.051 9.24-2.715 17.427-8.299 24.562-5.584 7.135-13.33 12.73-23.236 16.785-9.907 4.055-21.319 6.083-34.236 6.083-12.454 0-23.506-2.143-33.156-6.43-9.65-4.285-17.227-10.201-22.734-17.747-5.506-7.545-8.286-16.22-8.337-26.025h43.23c.051 3.029.99 5.737 2.817 8.124 1.827 2.386 4.336 4.247 7.527 5.582 3.19 1.334 6.845 2.002 10.962 2.002 3.962 0 7.462-.706 10.498-2.118 3.037-1.411 5.404-3.375 7.102-5.89 1.699-2.515 2.522-5.39 2.47-8.623.052-3.183-.913-6.006-2.894-8.47-1.982-2.464-4.748-4.389-8.299-5.775-3.55-1.386-7.642-2.079-12.274-2.079h-16.057v-29.566h16.057c4.271 0 8.041-.693 11.31-2.08 3.267-1.385 5.815-3.31 7.642-5.774s2.714-5.287 2.663-8.47c.051-3.08-.695-5.8-2.239-8.161-1.544-2.361-3.692-4.21-6.446-5.544-2.753-1.334-5.93-2.002-9.533-2.002-3.912 0-7.398.693-10.46 2.08-3.063 1.385-5.468 3.31-7.218 5.774s-2.65 5.287-2.702 8.47h-41.068c.051-9.65 2.715-18.172 7.99-25.563 5.275-7.392 12.518-13.192 21.73-17.401 9.212-4.21 19.788-6.314 31.728-6.314Zm-133.074 0c12.615 0 23.55 2.017 32.807 6.05 9.257 4.033 16.41 9.698 21.462 16.994 5.051 7.296 7.577 15.851 7.577 25.665 0 6.063-1.257 12.087-3.77 18.073-2.512 5.986-7.025 12.601-13.538 19.846-6.513 7.245-15.77 15.877-27.77 25.896l-14.768 12.331v.925H176V326H55.077v-30.829l58.77-48.709c3.897-3.237 7.243-6.28 10.038-9.133 2.794-2.851 4.948-5.793 6.461-8.824 1.513-3.032 2.27-6.397 2.27-10.097 0-4.059-.86-7.527-2.578-10.404-1.717-2.877-4.09-5.1-7.115-6.667-3.026-1.567-6.513-2.35-10.461-2.35-3.95 0-7.424.796-10.424 2.389-3 1.593-5.32 3.93-6.961 7.013-1.641 3.083-2.462 6.834-2.462 11.253H52c0-11.099 2.487-20.655 7.462-28.67 4.974-8.016 12-14.182 21.076-18.498 9.077-4.316 19.718-6.474 31.924-6.474Z";const tt={prefix:Xe,iconName:Ye,icon:[Qe,Ze,De,Je,et]},un={definition:tt,faAlignJustify:tt,prefix:Xe,iconName:Ye,width:Qe,height:Ze,ligatures:De,unicode:Je,svgPathData:et,aliases:De};Oe.library.add(f.faAlignCenter,f.faAlignLeft,f.faAlignRight,f.faArrowRight,f.faArrowUp19,f.faAsterisk,f.faAt,f.faBold,f.faBolt,f.faCalendar,f.faChartPie,f.faCheck,f.faCheckCircle,f.faChevronDown,f.faChevronLeft,f.faChevronRight,f.faChevronUp,f.faCircleCheck,f.faCircleNodes,f.faCircleNotch,f.faClipboard,f.faCloudDownload,f.faCloudUpload,f.faCode,f.faCodeBranch,f.faCodeFork,f.faCog,f.faCompass,f.faCrown,f.faDiagramProject,f.faDoorOpen,f.faDotCircle,f.faEllipsis,f.faEllipsisVertical,f.faEnvelope,f.faExclamationTriangle,f.faExternalLink,f.faEye,f.faEyeDropper,f.faEyeSlash,f.faFileLines,f.faFilePdf,f.faFileUpload,f.faFileVideo,f.faFileWaveform,f.faFilter,f.faFilter,f.faFingerprint,f.faFont,f.faGears,f.faGlobe,f.faGripHorizontal,f.faGripVertical,f.faHandPointRight,f.faHandPointRight,f.faHashtag,f.faHeading,f.faHeart,f.faImage,f.faInfoCircle,f.faItalic,f.faLayerGroup,f.faLink,f.faLinkSlash,f.faList,f.faListOl,f.faListUl,f.faLocationArrow,f.faLocationCrosshairs,f.faLock,f.faLockOpen,f.faMedal,f.faMessage,f.faMicrochip,f.faPencilAlt,f.faPenToSquare,f.faPhone,f.faPlayCircle,f.faPlus,f.faPlusCircle,f.faPoo,f.faPuzzlePiece,f.faQuestion,f.faQuoteLeft,f.faQuoteRight,f.faReply,f.faReplyAll,f.faRightLong,f.faRobot,f.faSave,f.faShield,f.faSignal,f.faSignature,f.faSignature,f.faSquareCheck,f.faStar,f.faStrikethrough,f.faTerminal,f.faTextSlash,f.faTimes,f.faTrash,f.faTree,f.faTrophy,f.faTurnDown,f.faUnderline,f.faUpload,f.faUser,f.faUserShield,f.faWandMagicSparkles,te.faTwitter,te.faInstagram,te.faGithub,te.faLinkedin,te.faFacebook,un.definition);const nt=[...Object.keys(Oe.library.definitions.fas)].sort(),Te=[...Object.keys(Oe.library.definitions.fab)].sort(),P=n.defineComponent({__name:"Icon",props:{name:{default:"user"}},setup(e){const t=e,r=n.computed(()=>Te.includes(t.name)?"fab":"fas"),l=n.computed(()=>nt.includes(t.name)||Te.includes(t.name)?!0:(console.warn("could not load icon, because it is not available",t.name),!1));return(o,i)=>l.value?(n.openBlock(),n.createBlock(n.unref(an.FontAwesomeIcon),n.mergeProps({key:0,icon:[r.value,o.name]},o.$attrs),null,16,["icon"])):n.createCommentVNode("",!0)}}),dn=["aria-label","tabindex"],fn={key:0,class:"absolute inset-0 flex items-center justify-center"},pn=n.defineComponent({__name:"Button",props:{label:{},size:{default:"medium"},color:{default:"primary"},isLoading:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},icon:{},iconPosition:{default:"right"}},emits:["onClick"],setup(e,{emit:t}){const r=t,l=e,o=n.computed(()=>{const u={"text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900":l.color==="primary","text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900":l.color==="light","text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900":l.color==="dark","text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900":l.color==="danger"},d={"pointer-events-none opacity-75 cursor-not-allowed":l.isDisabled},s={"px-4 py-1 text-xs leading-5 mono-100 rounded-lg":l.size==="small","px-5 py-2 text-sm leading-4 font-medium rounded-lg":l.size==="medium","px-8 py-3 text-base leading-6 font-medium rounded-lg":l.size==="large"};return{...u,...d,...s}}),i=n.computed(()=>{const u={"mr-2 -ml-1":["small","medium"].includes(l.size)&&l.iconPosition==="left","mr-4 -ml-2":["large"].includes(l.size)&&l.iconPosition==="left"},d={"ml-3 -mr-1":["small","medium"].includes(l.size)&&l.iconPosition==="right","ml-3 -mr-3":["large"].includes(l.size)&&l.iconPosition==="right"},s={"text-white":l.color==="primary","text-blue-600":l.color==="light","text-grey-50":l.color==="dark"};return{...u,...d,...s}});function a(){l.isDisabled||r("onClick")}return(u,d)=>(n.openBlock(),n.createElementBlock("button",{class:n.normalizeClass(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out",o.value]),type:"button","aria-label":u.label,tabindex:u.isDisabled?"-1":void 0,onClick:a},[n.createElementVNode("div",{class:n.normalizeClass(!u.isLoading||"invisible")},[u.icon&&u.iconPosition==="left"?(n.openBlock(),n.createBlock(P,{key:0,name:u.icon,class:n.normalizeClass(i.value)},null,8,["name","class"])):n.createCommentVNode("",!0),n.createElementVNode("span",null,n.toDisplayString(u.label),1),u.icon&&u.iconPosition==="right"?(n.openBlock(),n.createBlock(P,{key:1,name:u.icon,class:n.normalizeClass(i.value)},null,8,["name","class"])):n.createCommentVNode("",!0)],2),u.isLoading?(n.openBlock(),n.createElementBlock("span",fn,[n.createVNode(P,{class:"animate-spin",name:"circle-notch"})])):n.createCommentVNode("",!0)],10,dn))}});let ce;const mn=new Uint8Array(16);function gn(){if(!ce&&(ce=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ce))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ce(mn)}const _=[];for(let e=0;e<256;++e)_.push((e+256).toString(16).slice(1));function bn(e,t=0){return _[e[t+0]]+_[e[t+1]]+_[e[t+2]]+_[e[t+3]]+"-"+_[e[t+4]]+_[e[t+5]]+"-"+_[e[t+6]]+_[e[t+7]]+"-"+_[e[t+8]]+_[e[t+9]]+"-"+_[e[t+10]]+_[e[t+11]]+_[e[t+12]]+_[e[t+13]]+_[e[t+14]]+_[e[t+15]]}const ot={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function lt(e,t,r){if(ot.randomUUID&&!t&&!e)return ot.randomUUID();e=e||{};const l=e.random||(e.rng||gn)();if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=l[o];return t}return bn(l)}const hn={class:"relative flex items-start"},yn={class:"flex items-center h-5"},wn=["checked","id"],vn={class:"ml-2 text-sm leading-5"},xn=["for"],kn={key:0,class:"block text-xs text-grey-400 font-normal mono-0 casual-60"},Sn=n.defineComponent({__name:"Checkbox",props:{id:{default:lt()},label:{},modelValue:{type:Boolean},description:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=t,l=o=>{r("update:modelValue",o.target.checked)};return(o,i)=>(n.openBlock(),n.createElementBlock("div",hn,[n.createElementVNode("div",yn,[n.createElementVNode("input",{class:"h-4 w-4 border-grey-600 dark:text-blue-500 dark:border-grey-300 dark:checked:border-blue-500 dark:focus:ring-blue-900 dark:focus:ring-offset-grey-800 rounded-sm",type:"checkbox",checked:o.modelValue,onChange:l,id:o.id},null,40,wn)]),n.createElementVNode("div",vn,[n.createElementVNode("label",{for:o.id,class:"font-medium text-grey-700 dark:text-grey-200 casual-25"},n.toDisplayString(o.label),9,xn),o.description?(n.openBlock(),n.createElementBlock("p",kn,n.toDisplayString(o.description),1)):n.createCommentVNode("",!0)])]))}});function Cn(){const e=n.ref(!1);return n.getCurrentInstance()&&n.onMounted(()=>{e.value=!0}),e}function En(e){const t=Cn();return n.computed(()=>(t.value,!!e()))}function Rn(e={}){const{initialValue:t=""}=e,r=En(()=>typeof window<"u"&&"EyeDropper"in window),l=n.ref(t);async function o(i){if(!r.value)return;const u=await new window.EyeDropper().open(i);return l.value=u.sRGBHex,u}return{isSupported:r,sRGBHex:l,open:o}}const On=()=>{},Dn=Array.isArray,Tn=e=>typeof e=="function",_n=e=>typeof e=="symbol";let rt;const it=()=>rt||(rt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Pn;function Bn(e,t=Pn){t&&t.active&&t.effects.push(e)}const Ln=e=>{const t=new Set(e);return t.w=0,t.n=0,t},at=e=>(e.w&H)>0,st=e=>(e.n&H)>0,Vn=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=H},Nn=e=>{const{deps:t}=e;if(t.length){let r=0;for(let l=0;l<t.length;l++){const o=t[l];at(o)&&!st(o)?o.delete(e):t[r++]=o,o.w&=~H,o.n&=~H}t.length=r}};let ne=0,H=1;const _e=30;let A;class In{constructor(t,r=null,l){this.fn=t,this.scheduler=r,this.active=!0,this.deps=[],this.parent=void 0,Bn(this,l)}run(){if(!this.active)return this.fn();let t=A,r=ue;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=A,A=this,ue=!0,H=1<<++ne,ne<=_e?Vn(this):ct(this),this.fn()}finally{ne<=_e&&Nn(this),H=1<<--ne,A=this.parent,ue=r,this.parent=void 0,this.deferStop&&this.stop()}}stop(){A===this?this.deferStop=!0:this.active&&(ct(this),this.onStop&&this.onStop(),this.active=!1)}}function ct(e){const{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}let ue=!0;function An(e,t){let r=!1;ne<=_e?st(e)||(e.n|=H,r=!at(e)):r=!e.has(A),r&&(e.add(A),A.deps.push(e))}function $n(e,t){const r=Dn(e)?e:[...e];for(const l of r)l.computed&&ut(l);for(const l of r)l.computed||ut(l)}function ut(e,t){(e!==A||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(_n));function de(e){const t=e&&e.__v_raw;return t?de(t):e}function Mn(e){ue&&A&&(e=de(e),An(e.dep||(e.dep=Ln())))}function Fn(e,t){e=de(e);const r=e.dep;r&&$n(r)}class jn{constructor(t,r,l,o){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new In(t,()=>{this._dirty||(this._dirty=!0,Fn(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=l}get value(){const t=de(this);return Mn(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function zn(e,t,r=!1){let l,o;const i=Tn(e);return i?(l=e,o=On):(l=e.get,o=e.set),new jn(l,o,i||!o,r)}let Pe,dt="__VUE_INSTANCE_SETTERS__";(Pe=it()[dt])||(Pe=it()[dt]=[]),Pe.push(e=>e);let Un=!1;const Be=(e,t)=>zn(e,t,Un);function Le(e){const t=Be(()=>({"pl-3 pr-10 py-2":!e.icon&&e.type!=="color"&&e.size==="small","pl-4 pr-10 py-3":!e.icon&&e.type!=="color"&&e.size==="medium","pl-6 pr-10 py-3":!e.icon&&e.type!=="color"&&e.size==="large","pl-10 pr-10 py-1":(e.icon||e.type==="color")&&e.size==="small","pl-12 pr-10 py-3":(e.icon||e.type==="color")&&(e.size==="medium"||e.size==="large"),"w-full block":e.block===!0})),r=Be(()=>({"pointer-events-none opacity-50 cursor-not-allowed":e.isDisabled})),l=Be(()=>({"text-xs leading-4":e.size==="small","text-sm leading-4":e.size==="medium","text-base leading-5":e.size==="large"}));return{inputClasses:t,disabledClasses:r,textSizeClasses:l}}const Hn=["placeholder","type","tabindex","value"],Wn={class:"absolute inset-y-2 left-2 w-8 cursor-pointer"},Kn={inheritAttrs:!1},Gn=n.defineComponent({...Kn,__name:"Input",props:{modelValue:{},type:{default:"text"},placeholder:{},size:{default:"medium"},icon:{},min:{},max:{},isDisabled:{type:Boolean,default:!1},block:{type:Boolean},showColorPicker:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:r}){const l=e,o=n.ref(null),i=n.ref(l.modelValue??"");n.watch(()=>l.modelValue,v=>{typeof v<"u"&&v!==i.value&&(i.value=v)});const a=r,{inputClasses:u,disabledClasses:d,textSizeClasses:s}=Le(l),c=n.computed(()=>l.type==="color"?"text":l.type),{isSupported:p,open:b,sRGBHex:m}=Rn(),h=()=>{b()};n.watch(m,v=>{i.value=v,a("update:modelValue",v)});const g=function(v){const x=(v==null?void 0:v.target).value;if(l.type==="number"&&l.min&&parseInt(x)<l.min){i.value=l.min,o.value.value=i.value.toString(),a("update:modelValue",l.min);return}if(l.type==="number"&&l.max&&parseInt(x)>l.max){i.value=l.max,o.value.value=i.value.toString(),a("update:modelValue",l.max);return}i.value=(v==null?void 0:v.target).value,a("update:modelValue",i.value)},w=n.ref(null);return t({focus:()=>{l.isDisabled||w.value.focus()}}),(v,x)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["relative",[v.block?"w-full block":"inline-block"]])},[n.createElementVNode("input",n.mergeProps({class:["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded",[n.unref(u),n.unref(s),n.unref(d)]],placeholder:v.placeholder,type:c.value,tabindex:v.isDisabled?"-1":void 0,value:i.value},v.$attrs,{ref_key:"inputElement",ref:o,onInput:g}),null,16,Hn),v.type==="color"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("label",Wn,[n.withDirectives(n.createElementVNode("input",{class:"invisible",type:"color","onUpdate:modelValue":x[0]||(x[0]=k=>i.value=k),onInput:g},null,544),[[n.vModelText,i.value]]),n.createElementVNode("span",{class:"border-1 absolute inset-0 block rounded border border-grey-600/25 bg-clip-border shadow",style:n.normalizeStyle(`background-color: ${i.value}`)},null,4)]),n.unref(p)&&v.showColorPicker?(n.openBlock(),n.createElementBlock("button",{key:0,type:"button",class:"absolute inset-y-2 right-2 h-7 w-7 rounded-full hover:bg-grey-200",onClick:h},[n.createVNode(P,{size:"xs",name:"eyedropper"})])):n.createCommentVNode("",!0)],64)):v.icon?(n.openBlock(),n.createElementBlock("span",{key:1,class:n.normalizeClass(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4",n.unref(s)])},[n.createVNode(P,{name:v.icon},null,8,["name"])],2)):n.createCommentVNode("",!0)],2))}}),qn={class:"inline-block text-grey-700 dark:text-grey-200 text-sm font-medium casual-20"},Xn=["for"],Yn={key:0,class:"block text-xs text-grey-400 font-normal mono-0 casual-60"},Qn=n.defineComponent({__name:"Label",props:{id:{},label:{},description:{}},setup(e){return(t,r)=>(n.openBlock(),n.createElementBlock("span",qn,[n.createElementVNode("label",{for:t.id},n.toDisplayString(t.label),9,Xn),t.description?(n.openBlock(),n.createElementBlock("span",Yn,n.toDisplayString(t.description),1)):n.createCommentVNode("",!0)]))}});function N(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let l=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,N),l}var oe=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(oe||{}),Zn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Zn||{});function B({visible:e=!0,features:t=0,ourProps:r,theirProps:l,...o}){var i;let a=pt(l,r),u=Object.assign(o,{props:a});if(e||t&2&&a.static)return Ve(u);if(t&1){let d=(i=a.unmount)==null||i?0:1;return N(d,{0(){return null},1(){return Ve({...o,props:{...a,hidden:!0,style:{display:"none"}}})}})}return Ve(u)}function Ve({props:e,attrs:t,slots:r,slot:l,name:o}){var i,a;let{as:u,...d}=Ne(e,["unmount","static"]),s=(i=r.default)==null?void 0:i.call(r,l),c={};if(l){let p=!1,b=[];for(let[m,h]of Object.entries(l))typeof h=="boolean"&&(p=!0),h===!0&&b.push(m);p&&(c["data-headlessui-state"]=b.join(" "))}if(u==="template"){if(s=ft(s??[]),Object.keys(d).length>0||Object.keys(t).length>0){let[p,...b]=s??[];if(!Jn(p)||b.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${o} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(d).concat(Object.keys(t)).map(g=>g.trim()).filter((g,w,y)=>y.indexOf(g)===w).sort((g,w)=>g.localeCompare(w)).map(g=>` - ${g}`).join(`
|
|
2
|
-
|
|
3
|
-
`)].join(`
|
|
4
|
-
`));let m=pt((a=p.props)!=null?a:{},d),h=n.cloneVNode(p,m);for(let g in m)g.startsWith("on")&&(h.props||(h.props={}),h.props[g]=m[g]);return h}return Array.isArray(s)&&s.length===1?s[0]:s}return n.h(u,Object.assign({},d,c),{default:()=>s})}function ft(e){return e.flatMap(t=>t.type===n.Fragment?ft(t.children):[t])}function pt(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let l of e)for(let o in l)o.startsWith("on")&&typeof l[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(l[o])):t[o]=l[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(l=>[l,void 0])));for(let l in r)Object.assign(t,{[l](o,...i){let a=r[l];for(let u of a){if(o instanceof Event&&o.defaultPrevented)return;u(o,...i)}}});return t}function mt(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Ne(e,t=[]){let r=Object.assign({},e);for(let l of t)l in r&&delete r[l];return r}function Jn(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}let eo=0;function to(){return++eo}function $(){return to()}var R=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(R||{});function no(e){throw new Error("Unexpected object: "+e)}var D=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(D||{});function gt(e,t){let r=t.resolveItems();if(r.length<=0)return null;let l=t.resolveActiveIndex(),o=l??-1,i=(()=>{switch(e.focus){case 0:return r.findIndex(a=>!t.resolveDisabled(a));case 1:{let a=r.slice().reverse().findIndex((u,d,s)=>o!==-1&&s.length-d-1>=o?!1:!t.resolveDisabled(u));return a===-1?a:r.length-1-a}case 2:return r.findIndex((a,u)=>u<=o?!1:!t.resolveDisabled(a));case 3:{let a=r.slice().reverse().findIndex(u=>!t.resolveDisabled(u));return a===-1?a:r.length-1-a}case 4:return r.findIndex(a=>t.resolveId(a)===e.id);case 5:return null;default:no(e)}})();return i===-1?l:i}function E(e){var t;return e==null||e.value==null?null:(t=e.value.$el)!=null?t:e.value}let bt=Symbol("Context");var F=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(F||{});function ht(){return n.inject(bt,null)}function yt(e){n.provide(bt,e)}function wt(e,t){if(e)return e;let r=t??"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function Ie(e,t){let r=n.ref(wt(e.value.type,e.value.as));return n.onMounted(()=>{r.value=wt(e.value.type,e.value.as)}),n.watchEffect(()=>{var l;r.value||E(t)&&E(t)instanceof HTMLButtonElement&&!((l=E(t))!=null&&l.hasAttribute("type"))&&(r.value="button")}),r}var oo=Object.defineProperty,lo=(e,t,r)=>t in e?oo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vt=(e,t,r)=>(lo(e,typeof t!="symbol"?t+"":t,r),r);class ro{constructor(){vt(this,"current",this.detect()),vt(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let Ae=new ro;function $e(e){if(Ae.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=E(e);if(t)return t.ownerDocument}return document}function io({container:e,accept:t,walk:r,enabled:l}){n.watchEffect(()=>{let o=e.value;if(!o||l!==void 0&&!l.value)return;let i=$e(e);if(!i)return;let a=Object.assign(d=>t(d),{acceptNode:t}),u=i.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,a,!1);for(;u.nextNode();)r(u.currentNode)})}let Me=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Fe=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Fe||{}),ao=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(ao||{}),so=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(so||{});function xt(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Me)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var fe=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(fe||{});function pe(e,t=0){var r;return e===((r=$e(e))==null?void 0:r.body)?!1:N(t,{0(){return e.matches(Me)},1(){let l=e;for(;l!==null;){if(l.matches(Me))return!0;l=l.parentElement}return!1}})}function kt(e){let t=$e(e);n.nextTick(()=>{t&&!pe(t.activeElement,0)&&uo(e)})}var co=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(co||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function uo(e){e==null||e.focus({preventScroll:!0})}let fo=["textarea","input"].join(",");function po(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,fo))!=null?r:!1}function je(e,t=r=>r){return e.slice().sort((r,l)=>{let o=t(r),i=t(l);if(o===null||i===null)return 0;let a=o.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function mo(e,t){return go(xt(),t,{relativeTo:e})}function go(e,t,{sorted:r=!0,relativeTo:l=null,skipElements:o=[]}={}){var i;let a=(i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?i:document,u=Array.isArray(e)?r?je(e):e:xt(e);o.length>0&&u.length>1&&(u=u.filter(h=>!o.includes(h))),l=l??a.activeElement;let d=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,u.indexOf(l))-1;if(t&4)return Math.max(0,u.indexOf(l))+1;if(t&8)return u.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},p=0,b=u.length,m;do{if(p>=b||p+b<=0)return 0;let h=s+p;if(t&16)h=(h+b)%b;else{if(h<0)return 3;if(h>=b)return 1}m=u[h],m==null||m.focus(c),p+=d}while(m!==a.activeElement);return t&6&&po(m)&&m.select(),2}function me(e,t,r){Ae.isServer||n.watchEffect(l=>{document.addEventListener(e,t,r),l(()=>document.removeEventListener(e,t,r))})}function bo(e,t,r){Ae.isServer||n.watchEffect(l=>{window.addEventListener(e,t,r),l(()=>window.removeEventListener(e,t,r))})}function St(e,t,r=n.computed(()=>!0)){function l(i,a){if(!r.value||i.defaultPrevented)return;let u=a(i);if(u===null||!u.getRootNode().contains(u))return;let d=function s(c){return typeof c=="function"?s(c()):Array.isArray(c)||c instanceof Set?c:[c]}(e);for(let s of d){if(s===null)continue;let c=s instanceof HTMLElement?s:E(s);if(c!=null&&c.contains(u)||i.composed&&i.composedPath().includes(c))return}return!pe(u,fe.Loose)&&u.tabIndex!==-1&&i.preventDefault(),t(i,u)}let o=n.ref(null);me("pointerdown",i=>{var a,u;r.value&&(o.value=((u=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:u[0])||i.target)},!0),me("mousedown",i=>{var a,u;r.value&&(o.value=((u=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:u[0])||i.target)},!0),me("click",i=>{o.value&&(l(i,()=>o.value),o.value=null)},!0),me("touchend",i=>l(i,()=>i.target instanceof HTMLElement?i.target:null),!0),bo("blur",i=>l(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var ze=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ze||{});let Ct=n.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:r}){return()=>{let{features:l,...o}=e,i={"aria-hidden":(l&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(l&4)===4&&(l&2)!==2&&{display:"none"}}};return B({ourProps:i,theirProps:o,slot:{},attrs:r,slots:t,name:"Hidden"})}}});function Et(e={},t=null,r=[]){for(let[l,o]of Object.entries(e))Ot(r,Rt(t,l),o);return r}function Rt(e,t){return e?e+"["+t+"]":t}function Ot(e,t,r){if(Array.isArray(r))for(let[l,o]of r.entries())Ot(e,Rt(t,l.toString()),o);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):Et(r,t,e)}function ho(e){var t,r;let l=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(l){for(let o of l.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(r=l.requestSubmit)==null||r.call(l)}}function Dt(e,t,r){let l=n.ref(r==null?void 0:r.value),o=n.computed(()=>e.value!==void 0);return[n.computed(()=>o.value?e.value:l.value),function(i){return o.value||(l.value=i),t==null?void 0:t(i)}]}function Tt(e){return[e.screenX,e.screenY]}function _t(){let e=n.ref([-1,-1]);return{wasMoved(t){let r=Tt(t);return e.value[0]===r[0]&&e.value[1]===r[1]?!1:(e.value=r,!0)},update(t){e.value=Tt(t)}}}let Pt=Symbol("DescriptionContext");function yo(){let e=n.inject(Pt,null);if(e===null)throw new Error("Missing parent");return e}function wo({slot:e=n.ref({}),name:t="Description",props:r={}}={}){let l=n.ref([]);function o(i){return l.value.push(i),()=>{let a=l.value.indexOf(i);a!==-1&&l.value.splice(a,1)}}return n.provide(Pt,{register:o,slot:e,name:t,props:r}),n.computed(()=>l.value.length>0?l.value.join(" "):void 0)}n.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"},id:{type:String,default:()=>`headlessui-description-${$()}`}},setup(e,{attrs:t,slots:r}){let l=yo();return n.onMounted(()=>n.onUnmounted(l.register(e.id))),()=>{let{name:o="Description",slot:i=n.ref({}),props:a={}}=l,{id:u,...d}=e,s={...Object.entries(a).reduce((c,[p,b])=>Object.assign(c,{[p]:n.unref(b)}),{}),id:u};return B({ourProps:s,theirProps:d,slot:i.value,attrs:t,slots:r,name:o})}}});let Bt=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Lt(e){var t,r;let l=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return l;let i=!1;for(let u of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))u.remove(),i=!0;let a=i?(r=o.innerText)!=null?r:"":l;return Bt.test(a)&&(a=a.replace(Bt,"")),a}function vo(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let l=r.split(" ").map(o=>{let i=document.getElementById(o);if(i){let a=i.getAttribute("aria-label");return typeof a=="string"?a.trim():Lt(i).trim()}return null}).filter(Boolean);if(l.length>0)return l.join(", ")}return Lt(e).trim()}function Vt(e){let t=n.ref(""),r=n.ref("");return()=>{let l=E(e);if(!l)return"";let o=l.innerText;if(t.value===o)return r.value;let i=vo(l).trim().toLowerCase();return t.value=o,r.value=i,i}}function xo(e,t){return e===t}var ko=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ko||{}),So=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(So||{}),Co=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Co||{});function Eo(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let Nt=Symbol("ListboxContext");function le(e){let t=n.inject(Nt,null);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,le),r}return t}let Ro=n.defineComponent({name:"Listbox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>xo},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:t,attrs:r,emit:l}){let o=n.ref(1),i=n.ref(null),a=n.ref(null),u=n.ref(null),d=n.ref([]),s=n.ref(""),c=n.ref(null),p=n.ref(1);function b(x=k=>k){let k=c.value!==null?d.value[c.value]:null,S=je(x(d.value.slice()),C=>E(C.dataRef.domRef)),O=k?S.indexOf(k):null;return O===-1&&(O=null),{options:S,activeOptionIndex:O}}let m=n.computed(()=>e.multiple?1:0),[h,g]=Dt(n.computed(()=>e.modelValue),x=>l("update:modelValue",x),n.computed(()=>e.defaultValue)),w=n.computed(()=>h.value===void 0?N(m.value,{1:[],0:void 0}):h.value),y={listboxState:o,value:w,mode:m,compare(x,k){if(typeof e.by=="string"){let S=e.by;return(x==null?void 0:x[S])===(k==null?void 0:k[S])}return e.by(x,k)},orientation:n.computed(()=>e.horizontal?"horizontal":"vertical"),labelRef:i,buttonRef:a,optionsRef:u,disabled:n.computed(()=>e.disabled),options:d,searchQuery:s,activeOptionIndex:c,activationTrigger:p,closeListbox(){e.disabled||o.value!==1&&(o.value=1,c.value=null)},openListbox(){e.disabled||o.value!==0&&(o.value=0)},goToOption(x,k,S){if(e.disabled||o.value===1)return;let O=b(),C=gt(x===D.Specific?{focus:D.Specific,id:k}:{focus:x},{resolveItems:()=>O.options,resolveActiveIndex:()=>O.activeOptionIndex,resolveId:L=>L.id,resolveDisabled:L=>L.dataRef.disabled});s.value="",c.value=C,p.value=S??1,d.value=O.options},search(x){if(e.disabled||o.value===1)return;let k=s.value!==""?0:1;s.value+=x.toLowerCase();let S=(c.value!==null?d.value.slice(c.value+k).concat(d.value.slice(0,c.value+k)):d.value).find(C=>C.dataRef.textValue.startsWith(s.value)&&!C.dataRef.disabled),O=S?d.value.indexOf(S):-1;O===-1||O===c.value||(c.value=O,p.value=1)},clearSearch(){e.disabled||o.value!==1&&s.value!==""&&(s.value="")},registerOption(x,k){let S=b(O=>[...O,{id:x,dataRef:k}]);d.value=S.options,c.value=S.activeOptionIndex},unregisterOption(x){let k=b(S=>{let O=S.findIndex(C=>C.id===x);return O!==-1&&S.splice(O,1),S});d.value=k.options,c.value=k.activeOptionIndex,p.value=1},theirOnChange(x){e.disabled||g(x)},select(x){e.disabled||g(N(m.value,{0:()=>x,1:()=>{let k=n.toRaw(y.value.value).slice(),S=n.toRaw(x),O=k.findIndex(C=>y.compare(S,n.toRaw(C)));return O===-1?k.push(S):k.splice(O,1),k}}))}};St([a,u],(x,k)=>{var S;y.closeListbox(),pe(k,fe.Loose)||(x.preventDefault(),(S=E(a))==null||S.focus())},n.computed(()=>o.value===0)),n.provide(Nt,y),yt(n.computed(()=>N(o.value,{0:F.Open,1:F.Closed})));let v=n.computed(()=>{var x;return(x=E(a))==null?void 0:x.closest("form")});return n.onMounted(()=>{n.watch([v],()=>{if(!v.value||e.defaultValue===void 0)return;function x(){y.theirOnChange(e.defaultValue)}return v.value.addEventListener("reset",x),()=>{var k;(k=v.value)==null||k.removeEventListener("reset",x)}},{immediate:!0})}),()=>{let{name:x,modelValue:k,disabled:S,form:O,...C}=e,L={open:o.value===0,disabled:S,value:w.value};return n.h(n.Fragment,[...x!=null&&w.value!=null?Et({[x]:w.value}).map(([K,Re])=>n.h(Ct,mt({features:ze.Hidden,key:K,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:O,name:K,value:Re}))):[],B({ourProps:{},theirProps:{...r,...Ne(C,["defaultValue","onUpdate:modelValue","horizontal","multiple","by"])},slot:L,slots:t,attrs:r,name:"Listbox"})])}}});n.defineComponent({name:"ListboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:()=>`headlessui-listbox-label-${$()}`}},setup(e,{attrs:t,slots:r}){let l=le("ListboxLabel");function o(){var i;(i=E(l.buttonRef))==null||i.focus({preventScroll:!0})}return()=>{let i={open:l.listboxState.value===0,disabled:l.disabled.value},{id:a,...u}=e,d={id:a,ref:l.labelRef,onClick:o};return B({ourProps:d,theirProps:u,slot:i,attrs:t,slots:r,name:"ListboxLabel"})}}});let Oo=n.defineComponent({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:()=>`headlessui-listbox-button-${$()}`}},setup(e,{attrs:t,slots:r,expose:l}){let o=le("ListboxButton");l({el:o.buttonRef,$el:o.buttonRef});function i(s){switch(s.key){case R.Space:case R.Enter:case R.ArrowDown:s.preventDefault(),o.openListbox(),n.nextTick(()=>{var c;(c=E(o.optionsRef))==null||c.focus({preventScroll:!0}),o.value.value||o.goToOption(D.First)});break;case R.ArrowUp:s.preventDefault(),o.openListbox(),n.nextTick(()=>{var c;(c=E(o.optionsRef))==null||c.focus({preventScroll:!0}),o.value.value||o.goToOption(D.Last)});break}}function a(s){switch(s.key){case R.Space:s.preventDefault();break}}function u(s){o.disabled.value||(o.listboxState.value===0?(o.closeListbox(),n.nextTick(()=>{var c;return(c=E(o.buttonRef))==null?void 0:c.focus({preventScroll:!0})})):(s.preventDefault(),o.openListbox(),Eo(()=>{var c;return(c=E(o.optionsRef))==null?void 0:c.focus({preventScroll:!0})})))}let d=Ie(n.computed(()=>({as:e.as,type:t.type})),o.buttonRef);return()=>{var s,c;let p={open:o.listboxState.value===0,disabled:o.disabled.value,value:o.value.value},{id:b,...m}=e,h={ref:o.buttonRef,id:b,type:d.value,"aria-haspopup":"listbox","aria-controls":(s=E(o.optionsRef))==null?void 0:s.id,"aria-expanded":o.listboxState.value===0,"aria-labelledby":o.labelRef.value?[(c=E(o.labelRef))==null?void 0:c.id,b].join(" "):void 0,disabled:o.disabled.value===!0?!0:void 0,onKeydown:i,onKeyup:a,onClick:u};return B({ourProps:h,theirProps:m,slot:p,attrs:t,slots:r,name:"ListboxButton"})}}}),Do=n.defineComponent({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`headlessui-listbox-options-${$()}`}},setup(e,{attrs:t,slots:r,expose:l}){let o=le("ListboxOptions"),i=n.ref(null);l({el:o.optionsRef,$el:o.optionsRef});function a(s){switch(i.value&&clearTimeout(i.value),s.key){case R.Space:if(o.searchQuery.value!=="")return s.preventDefault(),s.stopPropagation(),o.search(s.key);case R.Enter:if(s.preventDefault(),s.stopPropagation(),o.activeOptionIndex.value!==null){let c=o.options.value[o.activeOptionIndex.value];o.select(c.dataRef.value)}o.mode.value===0&&(o.closeListbox(),n.nextTick(()=>{var c;return(c=E(o.buttonRef))==null?void 0:c.focus({preventScroll:!0})}));break;case N(o.orientation.value,{vertical:R.ArrowDown,horizontal:R.ArrowRight}):return s.preventDefault(),s.stopPropagation(),o.goToOption(D.Next);case N(o.orientation.value,{vertical:R.ArrowUp,horizontal:R.ArrowLeft}):return s.preventDefault(),s.stopPropagation(),o.goToOption(D.Previous);case R.Home:case R.PageUp:return s.preventDefault(),s.stopPropagation(),o.goToOption(D.First);case R.End:case R.PageDown:return s.preventDefault(),s.stopPropagation(),o.goToOption(D.Last);case R.Escape:s.preventDefault(),s.stopPropagation(),o.closeListbox(),n.nextTick(()=>{var c;return(c=E(o.buttonRef))==null?void 0:c.focus({preventScroll:!0})});break;case R.Tab:s.preventDefault(),s.stopPropagation();break;default:s.key.length===1&&(o.search(s.key),i.value=setTimeout(()=>o.clearSearch(),350));break}}let u=ht(),d=n.computed(()=>u!==null?(u.value&F.Open)===F.Open:o.listboxState.value===0);return()=>{var s,c,p,b;let m={open:o.listboxState.value===0},{id:h,...g}=e,w={"aria-activedescendant":o.activeOptionIndex.value===null||(s=o.options.value[o.activeOptionIndex.value])==null?void 0:s.id,"aria-multiselectable":o.mode.value===1?!0:void 0,"aria-labelledby":(b=(c=E(o.labelRef))==null?void 0:c.id)!=null?b:(p=E(o.buttonRef))==null?void 0:p.id,"aria-orientation":o.orientation.value,id:h,onKeydown:a,role:"listbox",tabIndex:0,ref:o.optionsRef};return B({ourProps:w,theirProps:g,slot:m,attrs:t,slots:r,features:oe.RenderStrategy|oe.Static,visible:d.value,name:"ListboxOptions"})}}}),To=n.defineComponent({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:()=>`headlessui-listbox.option-${$()}`}},setup(e,{slots:t,attrs:r,expose:l}){let o=le("ListboxOption"),i=n.ref(null);l({el:i,$el:i});let a=n.computed(()=>o.activeOptionIndex.value!==null?o.options.value[o.activeOptionIndex.value].id===e.id:!1),u=n.computed(()=>N(o.mode.value,{0:()=>o.compare(n.toRaw(o.value.value),n.toRaw(e.value)),1:()=>n.toRaw(o.value.value).some(y=>o.compare(n.toRaw(y),n.toRaw(e.value)))})),d=n.computed(()=>N(o.mode.value,{1:()=>{var y;let v=n.toRaw(o.value.value);return((y=o.options.value.find(x=>v.some(k=>o.compare(n.toRaw(k),n.toRaw(x.dataRef.value)))))==null?void 0:y.id)===e.id},0:()=>u.value})),s=Vt(i),c=n.computed(()=>({disabled:e.disabled,value:e.value,get textValue(){return s()},domRef:i}));n.onMounted(()=>o.registerOption(e.id,c)),n.onUnmounted(()=>o.unregisterOption(e.id)),n.onMounted(()=>{n.watch([o.listboxState,u],()=>{o.listboxState.value===0&&u.value&&N(o.mode.value,{1:()=>{d.value&&o.goToOption(D.Specific,e.id)},0:()=>{o.goToOption(D.Specific,e.id)}})},{immediate:!0})}),n.watchEffect(()=>{o.listboxState.value===0&&a.value&&o.activationTrigger.value!==0&&n.nextTick(()=>{var y,v;return(v=(y=E(i))==null?void 0:y.scrollIntoView)==null?void 0:v.call(y,{block:"nearest"})})});function p(y){if(e.disabled)return y.preventDefault();o.select(e.value),o.mode.value===0&&(o.closeListbox(),n.nextTick(()=>{var v;return(v=E(o.buttonRef))==null?void 0:v.focus({preventScroll:!0})}))}function b(){if(e.disabled)return o.goToOption(D.Nothing);o.goToOption(D.Specific,e.id)}let m=_t();function h(y){m.update(y)}function g(y){m.wasMoved(y)&&(e.disabled||a.value||o.goToOption(D.Specific,e.id,0))}function w(y){m.wasMoved(y)&&(e.disabled||a.value&&o.goToOption(D.Nothing))}return()=>{let{disabled:y}=e,v={active:a.value,selected:u.value,disabled:y},{id:x,value:k,disabled:S,...O}=e,C={id:x,ref:i,role:"option",tabIndex:y===!0?void 0:-1,"aria-disabled":y===!0?!0:void 0,"aria-selected":u.value,disabled:void 0,onClick:p,onFocus:b,onPointerenter:h,onMouseenter:h,onPointermove:g,onMousemove:g,onPointerleave:w,onMouseleave:w};return B({ourProps:C,theirProps:O,slot:v,attrs:r,slots:t,name:"ListboxOption"})}}});var _o=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(_o||{}),Po=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Po||{});function Bo(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let It=Symbol("MenuContext");function ge(e){let t=n.inject(It,null);if(t===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ge),r}return t}let Lo=n.defineComponent({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:r}){let l=n.ref(1),o=n.ref(null),i=n.ref(null),a=n.ref([]),u=n.ref(""),d=n.ref(null),s=n.ref(1);function c(b=m=>m){let m=d.value!==null?a.value[d.value]:null,h=je(b(a.value.slice()),w=>E(w.dataRef.domRef)),g=m?h.indexOf(m):null;return g===-1&&(g=null),{items:h,activeItemIndex:g}}let p={menuState:l,buttonRef:o,itemsRef:i,items:a,searchQuery:u,activeItemIndex:d,activationTrigger:s,closeMenu:()=>{l.value=1,d.value=null},openMenu:()=>l.value=0,goToItem(b,m,h){let g=c(),w=gt(b===D.Specific?{focus:D.Specific,id:m}:{focus:b},{resolveItems:()=>g.items,resolveActiveIndex:()=>g.activeItemIndex,resolveId:y=>y.id,resolveDisabled:y=>y.dataRef.disabled});u.value="",d.value=w,s.value=h??1,a.value=g.items},search(b){let m=u.value!==""?0:1;u.value+=b.toLowerCase();let h=(d.value!==null?a.value.slice(d.value+m).concat(a.value.slice(0,d.value+m)):a.value).find(w=>w.dataRef.textValue.startsWith(u.value)&&!w.dataRef.disabled),g=h?a.value.indexOf(h):-1;g===-1||g===d.value||(d.value=g,s.value=1)},clearSearch(){u.value=""},registerItem(b,m){let h=c(g=>[...g,{id:b,dataRef:m}]);a.value=h.items,d.value=h.activeItemIndex,s.value=1},unregisterItem(b){let m=c(h=>{let g=h.findIndex(w=>w.id===b);return g!==-1&&h.splice(g,1),h});a.value=m.items,d.value=m.activeItemIndex,s.value=1}};return St([o,i],(b,m)=>{var h;p.closeMenu(),pe(m,fe.Loose)||(b.preventDefault(),(h=E(o))==null||h.focus())},n.computed(()=>l.value===0)),n.provide(It,p),yt(n.computed(()=>N(l.value,{0:F.Open,1:F.Closed}))),()=>{let b={open:l.value===0,close:p.closeMenu};return B({ourProps:{},theirProps:e,slot:b,slots:t,attrs:r,name:"Menu"})}}}),Vo=n.defineComponent({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:()=>`headlessui-menu-button-${$()}`}},setup(e,{attrs:t,slots:r,expose:l}){let o=ge("MenuButton");l({el:o.buttonRef,$el:o.buttonRef});function i(s){switch(s.key){case R.Space:case R.Enter:case R.ArrowDown:s.preventDefault(),s.stopPropagation(),o.openMenu(),n.nextTick(()=>{var c;(c=E(o.itemsRef))==null||c.focus({preventScroll:!0}),o.goToItem(D.First)});break;case R.ArrowUp:s.preventDefault(),s.stopPropagation(),o.openMenu(),n.nextTick(()=>{var c;(c=E(o.itemsRef))==null||c.focus({preventScroll:!0}),o.goToItem(D.Last)});break}}function a(s){switch(s.key){case R.Space:s.preventDefault();break}}function u(s){e.disabled||(o.menuState.value===0?(o.closeMenu(),n.nextTick(()=>{var c;return(c=E(o.buttonRef))==null?void 0:c.focus({preventScroll:!0})})):(s.preventDefault(),o.openMenu(),Bo(()=>{var c;return(c=E(o.itemsRef))==null?void 0:c.focus({preventScroll:!0})})))}let d=Ie(n.computed(()=>({as:e.as,type:t.type})),o.buttonRef);return()=>{var s;let c={open:o.menuState.value===0},{id:p,...b}=e,m={ref:o.buttonRef,id:p,type:d.value,"aria-haspopup":"menu","aria-controls":(s=E(o.itemsRef))==null?void 0:s.id,"aria-expanded":o.menuState.value===0,onKeydown:i,onKeyup:a,onClick:u};return B({ourProps:m,theirProps:b,slot:c,attrs:t,slots:r,name:"MenuButton"})}}}),No=n.defineComponent({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`headlessui-menu-items-${$()}`}},setup(e,{attrs:t,slots:r,expose:l}){let o=ge("MenuItems"),i=n.ref(null);l({el:o.itemsRef,$el:o.itemsRef}),io({container:n.computed(()=>E(o.itemsRef)),enabled:n.computed(()=>o.menuState.value===0),accept(c){return c.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:c.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(c){c.setAttribute("role","none")}});function a(c){var p;switch(i.value&&clearTimeout(i.value),c.key){case R.Space:if(o.searchQuery.value!=="")return c.preventDefault(),c.stopPropagation(),o.search(c.key);case R.Enter:if(c.preventDefault(),c.stopPropagation(),o.activeItemIndex.value!==null){let b=o.items.value[o.activeItemIndex.value];(p=E(b.dataRef.domRef))==null||p.click()}o.closeMenu(),kt(E(o.buttonRef));break;case R.ArrowDown:return c.preventDefault(),c.stopPropagation(),o.goToItem(D.Next);case R.ArrowUp:return c.preventDefault(),c.stopPropagation(),o.goToItem(D.Previous);case R.Home:case R.PageUp:return c.preventDefault(),c.stopPropagation(),o.goToItem(D.First);case R.End:case R.PageDown:return c.preventDefault(),c.stopPropagation(),o.goToItem(D.Last);case R.Escape:c.preventDefault(),c.stopPropagation(),o.closeMenu(),n.nextTick(()=>{var b;return(b=E(o.buttonRef))==null?void 0:b.focus({preventScroll:!0})});break;case R.Tab:c.preventDefault(),c.stopPropagation(),o.closeMenu(),n.nextTick(()=>mo(E(o.buttonRef),c.shiftKey?Fe.Previous:Fe.Next));break;default:c.key.length===1&&(o.search(c.key),i.value=setTimeout(()=>o.clearSearch(),350));break}}function u(c){switch(c.key){case R.Space:c.preventDefault();break}}let d=ht(),s=n.computed(()=>d!==null?(d.value&F.Open)===F.Open:o.menuState.value===0);return()=>{var c,p;let b={open:o.menuState.value===0},{id:m,...h}=e,g={"aria-activedescendant":o.activeItemIndex.value===null||(c=o.items.value[o.activeItemIndex.value])==null?void 0:c.id,"aria-labelledby":(p=E(o.buttonRef))==null?void 0:p.id,id:m,onKeydown:a,onKeyup:u,role:"menu",tabIndex:0,ref:o.itemsRef};return B({ourProps:g,theirProps:h,slot:b,attrs:t,slots:r,features:oe.RenderStrategy|oe.Static,visible:s.value,name:"MenuItems"})}}}),Io=n.defineComponent({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:()=>`headlessui-menu-item-${$()}`}},setup(e,{slots:t,attrs:r,expose:l}){let o=ge("MenuItem"),i=n.ref(null);l({el:i,$el:i});let a=n.computed(()=>o.activeItemIndex.value!==null?o.items.value[o.activeItemIndex.value].id===e.id:!1),u=Vt(i),d=n.computed(()=>({disabled:e.disabled,get textValue(){return u()},domRef:i}));n.onMounted(()=>o.registerItem(e.id,d)),n.onUnmounted(()=>o.unregisterItem(e.id)),n.watchEffect(()=>{o.menuState.value===0&&a.value&&o.activationTrigger.value!==0&&n.nextTick(()=>{var g,w;return(w=(g=E(i))==null?void 0:g.scrollIntoView)==null?void 0:w.call(g,{block:"nearest"})})});function s(g){if(e.disabled)return g.preventDefault();o.closeMenu(),kt(E(o.buttonRef))}function c(){if(e.disabled)return o.goToItem(D.Nothing);o.goToItem(D.Specific,e.id)}let p=_t();function b(g){p.update(g)}function m(g){p.wasMoved(g)&&(e.disabled||a.value||o.goToItem(D.Specific,e.id,0))}function h(g){p.wasMoved(g)&&(e.disabled||a.value&&o.goToItem(D.Nothing))}return()=>{let{disabled:g}=e,w={active:a.value,disabled:g,close:o.closeMenu},{id:y,...v}=e;return B({ourProps:{id:y,ref:i,role:"menuitem",tabIndex:g===!0?void 0:-1,"aria-disabled":g===!0?!0:void 0,disabled:void 0,onClick:s,onFocus:c,onPointerenter:b,onMouseenter:b,onPointermove:m,onMousemove:m,onPointerleave:h,onMouseleave:h},theirProps:{...r,...v},slot:w,attrs:r,slots:t,name:"MenuItem"})}}}),At=Symbol("LabelContext");function $t(){let e=n.inject(At,null);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,$t),t}return e}function Ao({slot:e={},name:t="Label",props:r={}}={}){let l=n.ref([]);function o(i){return l.value.push(i),()=>{let a=l.value.indexOf(i);a!==-1&&l.value.splice(a,1)}}return n.provide(At,{register:o,slot:e,name:t,props:r}),n.computed(()=>l.value.length>0?l.value.join(" "):void 0)}n.defineComponent({name:"Label",props:{as:{type:[Object,String],default:"label"},passive:{type:[Boolean],default:!1},id:{type:String,default:()=>`headlessui-label-${$()}`}},setup(e,{slots:t,attrs:r}){let l=$t();return n.onMounted(()=>n.onUnmounted(l.register(e.id))),()=>{let{name:o="Label",slot:i={},props:a={}}=l,{id:u,passive:d,...s}=e,c={...Object.entries(a).reduce((p,[b,m])=>Object.assign(p,{[b]:n.unref(m)}),{}),id:u};return d&&(delete c.onClick,delete c.htmlFor,delete s.onClick),B({ourProps:c,theirProps:s,slot:i,attrs:r,slots:t,name:o})}}});let Mt=Symbol("GroupContext");n.defineComponent({name:"SwitchGroup",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:r}){let l=n.ref(null),o=Ao({name:"SwitchLabel",props:{htmlFor:n.computed(()=>{var a;return(a=l.value)==null?void 0:a.id}),onClick(a){l.value&&(a.currentTarget.tagName==="LABEL"&&a.preventDefault(),l.value.click(),l.value.focus({preventScroll:!0}))}}}),i=wo({name:"SwitchDescription"});return n.provide(Mt,{switchRef:l,labelledby:o,describedby:i}),()=>B({theirProps:e,ourProps:{},slot:{},slots:t,attrs:r,name:"SwitchGroup"})}});let $o=n.defineComponent({name:"Switch",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"button"},modelValue:{type:Boolean,default:void 0},defaultChecked:{type:Boolean,optional:!0},form:{type:String,optional:!0},name:{type:String,optional:!0},value:{type:String,optional:!0},id:{type:String,default:()=>`headlessui-switch-${$()}`}},inheritAttrs:!1,setup(e,{emit:t,attrs:r,slots:l,expose:o}){let i=n.inject(Mt,null),[a,u]=Dt(n.computed(()=>e.modelValue),w=>t("update:modelValue",w),n.computed(()=>e.defaultChecked));function d(){u(!a.value)}let s=n.ref(null),c=i===null?s:i.switchRef,p=Ie(n.computed(()=>({as:e.as,type:r.type})),c);o({el:c,$el:c});function b(w){w.preventDefault(),d()}function m(w){w.key===R.Space?(w.preventDefault(),d()):w.key===R.Enter&&ho(w.currentTarget)}function h(w){w.preventDefault()}let g=n.computed(()=>{var w,y;return(y=(w=E(c))==null?void 0:w.closest)==null?void 0:y.call(w,"form")});return n.onMounted(()=>{n.watch([g],()=>{if(!g.value||e.defaultChecked===void 0)return;function w(){u(e.defaultChecked)}return g.value.addEventListener("reset",w),()=>{var y;(y=g.value)==null||y.removeEventListener("reset",w)}},{immediate:!0})}),()=>{let{id:w,name:y,value:v,form:x,...k}=e,S={checked:a.value},O={id:w,ref:c,role:"switch",type:p.value,tabIndex:0,"aria-checked":a.value,"aria-labelledby":i==null?void 0:i.labelledby.value,"aria-describedby":i==null?void 0:i.describedby.value,onClick:b,onKeyup:m,onKeypress:h};return n.h(n.Fragment,[y!=null&&a.value!=null?n.h(Ct,mt({features:ze.Hidden,as:"input",type:"checkbox",hidden:!0,readOnly:!0,checked:a.value,form:x,name:y,value:v})):null,B({ourProps:O,theirProps:{...r,...Ne(k,["modelValue","defaultChecked"])},slot:S,attrs:r,slots:l,name:"Switch"})])}}});const be=Math.min,G=Math.max,he=Math.round,ye=Math.floor,W=e=>({x:e,y:e}),Mo={left:"right",right:"left",bottom:"top",top:"bottom"},Fo={start:"end",end:"start"};function Ft(e,t,r){return G(e,be(t,r))}function we(e,t){return typeof e=="function"?e(t):e}function q(e){return e.split("-")[0]}function ve(e){return e.split("-")[1]}function jt(e){return e==="x"?"y":"x"}function zt(e){return e==="y"?"height":"width"}function xe(e){return["top","bottom"].includes(q(e))?"y":"x"}function Ut(e){return jt(xe(e))}function jo(e,t,r){r===void 0&&(r=!1);const l=ve(e),o=Ut(e),i=zt(o);let a=o==="x"?l===(r?"end":"start")?"right":"left":l==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ke(a)),[a,ke(a)]}function zo(e){const t=ke(e);return[Ue(e),t,Ue(t)]}function Ue(e){return e.replace(/start|end/g,t=>Fo[t])}function Uo(e,t,r){const l=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:l:t?l:o;case"left":case"right":return t?i:a;default:return[]}}function Ho(e,t,r,l){const o=ve(e);let i=Uo(q(e),r==="start",l);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ue)))),i}function ke(e){return e.replace(/left|right|bottom|top/g,t=>Mo[t])}function Wo(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ko(e){return typeof e!="number"?Wo(e):{top:e,right:e,bottom:e,left:e}}function Se(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ht(e,t,r){let{reference:l,floating:o}=e;const i=xe(t),a=Ut(t),u=zt(a),d=q(t),s=i==="y",c=l.x+l.width/2-o.width/2,p=l.y+l.height/2-o.height/2,b=l[u]/2-o[u]/2;let m;switch(d){case"top":m={x:c,y:l.y-o.height};break;case"bottom":m={x:c,y:l.y+l.height};break;case"right":m={x:l.x+l.width,y:p};break;case"left":m={x:l.x-o.width,y:p};break;default:m={x:l.x,y:l.y}}switch(ve(t)){case"start":m[a]-=b*(r&&s?-1:1);break;case"end":m[a]+=b*(r&&s?-1:1);break}return m}const Go=async(e,t,r)=>{const{placement:l="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,u=i.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(t));let s=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:p}=Ht(s,l,d),b=l,m={},h=0;for(let g=0;g<u.length;g++){const{name:w,fn:y}=u[g],{x:v,y:x,data:k,reset:S}=await y({x:c,y:p,initialPlacement:l,placement:b,strategy:o,middlewareData:m,rects:s,platform:a,elements:{reference:e,floating:t}});if(c=v??c,p=x??p,m={...m,[w]:{...m[w],...k}},S&&h<=50){h++,typeof S=="object"&&(S.placement&&(b=S.placement),S.rects&&(s=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:c,y:p}=Ht(s,b,d)),g=-1;continue}}return{x:c,y:p,placement:b,strategy:o,middlewareData:m}};async function Wt(e,t){var r;t===void 0&&(t={});const{x:l,y:o,platform:i,rects:a,elements:u,strategy:d}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:b=!1,padding:m=0}=we(t,e),h=Ko(m),w=u[b?p==="floating"?"reference":"floating":p],y=Se(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:s,rootBoundary:c,strategy:d})),v=p==="floating"?{...a.floating,x:l,y:o}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),k=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},S=Se(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:x,strategy:d}):v);return{top:(y.top-S.top+h.top)/k.y,bottom:(S.bottom-y.bottom+h.bottom)/k.y,left:(y.left-S.left+h.left)/k.x,right:(S.right-y.right+h.right)/k.x}}const qo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,l;const{placement:o,middlewareData:i,rects:a,initialPlacement:u,platform:d,elements:s}=t,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...w}=we(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const y=q(o),v=q(u)===u,x=await(d.isRTL==null?void 0:d.isRTL(s.floating)),k=b||(v||!g?[ke(u)]:zo(u));!b&&h!=="none"&&k.push(...Ho(u,g,h,x));const S=[u,...k],O=await Wt(t,w),C=[];let L=((l=i.flip)==null?void 0:l.overflows)||[];if(c&&C.push(O[y]),p){const Y=jo(o,a,x);C.push(O[Y[0]],O[Y[1]])}if(L=[...L,{placement:o,overflows:C}],!C.every(Y=>Y<=0)){var K,Re;const Y=(((K=i.flip)==null?void 0:K.index)||0)+1,rn=S[Y];if(rn)return{data:{index:Y,overflows:L},reset:{placement:rn}};let ae=(Re=L.filter(J=>J.overflows[0]<=0).sort((J,ee)=>J.overflows[1]-ee.overflows[1])[0])==null?void 0:Re.placement;if(!ae)switch(m){case"bestFit":{var ln;const J=(ln=L.map(ee=>[ee.placement,ee.overflows.filter(se=>se>0).reduce((se,Zl)=>se+Zl,0)]).sort((ee,se)=>ee[1]-se[1])[0])==null?void 0:ln[0];J&&(ae=J);break}case"initialPlacement":ae=u;break}if(o!==ae)return{reset:{placement:ae}}}return{}}}};async function Xo(e,t){const{placement:r,platform:l,elements:o}=e,i=await(l.isRTL==null?void 0:l.isRTL(o.floating)),a=q(r),u=ve(r),d=xe(r)==="y",s=["left","top"].includes(a)?-1:1,c=i&&d?-1:1,p=we(t,e);let{mainAxis:b,crossAxis:m,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return u&&typeof h=="number"&&(m=u==="end"?h*-1:h),d?{x:m*c,y:b*s}:{x:b*s,y:m*c}}const Yo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,l;const{x:o,y:i,placement:a,middlewareData:u}=t,d=await Xo(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(l=u.arrow)!=null&&l.alignmentOffset?{}:{x:o+d.x,y:i+d.y,data:{...d,placement:a}}}}},Qo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:l,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:u={fn:w=>{let{x:y,y:v}=w;return{x:y,y:v}}},...d}=we(e,t),s={x:r,y:l},c=await Wt(t,d),p=xe(q(o)),b=jt(p);let m=s[b],h=s[p];if(i){const w=b==="y"?"top":"left",y=b==="y"?"bottom":"right",v=m+c[w],x=m-c[y];m=Ft(v,m,x)}if(a){const w=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=h+c[w],x=h-c[y];h=Ft(v,h,x)}const g=u.fn({...t,[b]:m,[p]:h});return{...g,data:{x:g.x-r,y:g.y-l}}}}};function j(e){return He(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function z(e){var t;return(t=(He(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function He(e){return e instanceof Node||e instanceof V(e).Node}function U(e){return e instanceof Element||e instanceof V(e).Element}function M(e){return e instanceof HTMLElement||e instanceof V(e).HTMLElement}function Kt(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof V(e).ShadowRoot}function re(e){const{overflow:t,overflowX:r,overflowY:l,display:o}=I(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+r)&&!["inline","contents"].includes(o)}function Zo(e){return["table","td","th"].includes(j(e))}function We(e){const t=Ke(),r=I(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(l=>(r.willChange||"").includes(l))||["paint","layout","strict","content"].some(l=>(r.contain||"").includes(l))}function Jo(e){let t=Q(e);for(;M(t)&&!Ce(t);){if(We(t))return t;t=Q(t)}return null}function Ke(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ce(e){return["html","body","#document"].includes(j(e))}function I(e){return V(e).getComputedStyle(e)}function Ee(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Q(e){if(j(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Kt(e)&&e.host||z(e);return Kt(t)?t.host:t}function Gt(e){const t=Q(e);return Ce(t)?e.ownerDocument?e.ownerDocument.body:e.body:M(t)&&re(t)?t:Gt(t)}function ie(e,t,r){var l;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Gt(e),i=o===((l=e.ownerDocument)==null?void 0:l.body),a=V(o);return i?t.concat(a,a.visualViewport||[],re(o)?o:[],a.frameElement&&r?ie(a.frameElement):[]):t.concat(o,ie(o,[],r))}function qt(e){const t=I(e);let r=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const o=M(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:l,u=he(r)!==i||he(l)!==a;return u&&(r=i,l=a),{width:r,height:l,$:u}}function Ge(e){return U(e)?e:e.contextElement}function Z(e){const t=Ge(e);if(!M(t))return W(1);const r=t.getBoundingClientRect(),{width:l,height:o,$:i}=qt(t);let a=(i?he(r.width):r.width)/l,u=(i?he(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const el=W(0);function Xt(e){const t=V(e);return!Ke()||!t.visualViewport?el:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tl(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==V(e)?!1:t}function X(e,t,r,l){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Ge(e);let a=W(1);t&&(l?U(l)&&(a=Z(l)):a=Z(e));const u=tl(i,r,l)?Xt(i):W(0);let d=(o.left+u.x)/a.x,s=(o.top+u.y)/a.y,c=o.width/a.x,p=o.height/a.y;if(i){const b=V(i),m=l&&U(l)?V(l):l;let h=b.frameElement;for(;h&&l&&m!==b;){const g=Z(h),w=h.getBoundingClientRect(),y=I(h),v=w.left+(h.clientLeft+parseFloat(y.paddingLeft))*g.x,x=w.top+(h.clientTop+parseFloat(y.paddingTop))*g.y;d*=g.x,s*=g.y,c*=g.x,p*=g.y,d+=v,s+=x,h=V(h).frameElement}}return Se({width:c,height:p,x:d,y:s})}function nl(e){let{rect:t,offsetParent:r,strategy:l}=e;const o=M(r),i=z(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},u=W(1);const d=W(0);if((o||!o&&l!=="fixed")&&((j(r)!=="body"||re(i))&&(a=Ee(r)),M(r))){const s=X(r);u=Z(r),d.x=s.x+r.clientLeft,d.y=s.y+r.clientTop}return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-a.scrollLeft*u.x+d.x,y:t.y*u.y-a.scrollTop*u.y+d.y}}function ol(e){return Array.from(e.getClientRects())}function Yt(e){return X(z(e)).left+Ee(e).scrollLeft}function ll(e){const t=z(e),r=Ee(e),l=e.ownerDocument.body,o=G(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),i=G(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let a=-r.scrollLeft+Yt(e);const u=-r.scrollTop;return I(l).direction==="rtl"&&(a+=G(t.clientWidth,l.clientWidth)-o),{width:o,height:i,x:a,y:u}}function rl(e,t){const r=V(e),l=z(e),o=r.visualViewport;let i=l.clientWidth,a=l.clientHeight,u=0,d=0;if(o){i=o.width,a=o.height;const s=Ke();(!s||s&&t==="fixed")&&(u=o.offsetLeft,d=o.offsetTop)}return{width:i,height:a,x:u,y:d}}function il(e,t){const r=X(e,!0,t==="fixed"),l=r.top+e.clientTop,o=r.left+e.clientLeft,i=M(e)?Z(e):W(1),a=e.clientWidth*i.x,u=e.clientHeight*i.y,d=o*i.x,s=l*i.y;return{width:a,height:u,x:d,y:s}}function Qt(e,t,r){let l;if(t==="viewport")l=rl(e,r);else if(t==="document")l=ll(z(e));else if(U(t))l=il(t,r);else{const o=Xt(e);l={...t,x:t.x-o.x,y:t.y-o.y}}return Se(l)}function Zt(e,t){const r=Q(e);return r===t||!U(r)||Ce(r)?!1:I(r).position==="fixed"||Zt(r,t)}function al(e,t){const r=t.get(e);if(r)return r;let l=ie(e,[],!1).filter(u=>U(u)&&j(u)!=="body"),o=null;const i=I(e).position==="fixed";let a=i?Q(e):e;for(;U(a)&&!Ce(a);){const u=I(a),d=We(a);!d&&u.position==="fixed"&&(o=null),(i?!d&&!o:!d&&u.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||re(a)&&!d&&Zt(e,a))?l=l.filter(c=>c!==a):o=u,a=Q(a)}return t.set(e,l),l}function sl(e){let{element:t,boundary:r,rootBoundary:l,strategy:o}=e;const a=[...r==="clippingAncestors"?al(t,this._c):[].concat(r),l],u=a[0],d=a.reduce((s,c)=>{const p=Qt(t,c,o);return s.top=G(p.top,s.top),s.right=be(p.right,s.right),s.bottom=be(p.bottom,s.bottom),s.left=G(p.left,s.left),s},Qt(t,u,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function cl(e){const{width:t,height:r}=qt(e);return{width:t,height:r}}function ul(e,t,r){const l=M(t),o=z(t),i=r==="fixed",a=X(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const d=W(0);if(l||!l&&!i)if((j(t)!=="body"||re(o))&&(u=Ee(t)),l){const s=X(t,!0,i,t);d.x=s.x+t.clientLeft,d.y=s.y+t.clientTop}else o&&(d.x=Yt(o));return{x:a.left+u.scrollLeft-d.x,y:a.top+u.scrollTop-d.y,width:a.width,height:a.height}}function Jt(e,t){return!M(e)||I(e).position==="fixed"?null:t?t(e):e.offsetParent}function en(e,t){const r=V(e);if(!M(e))return r;let l=Jt(e,t);for(;l&&Zo(l)&&I(l).position==="static";)l=Jt(l,t);return l&&(j(l)==="html"||j(l)==="body"&&I(l).position==="static"&&!We(l))?r:l||Jo(e)||r}const dl=async function(e){let{reference:t,floating:r,strategy:l}=e;const o=this.getOffsetParent||en,i=this.getDimensions;return{reference:ul(t,await o(r),l),floating:{x:0,y:0,...await i(r)}}};function fl(e){return I(e).direction==="rtl"}const pl={convertOffsetParentRelativeRectToViewportRelativeRect:nl,getDocumentElement:z,getClippingRect:sl,getOffsetParent:en,getElementRects:dl,getClientRects:ol,getDimensions:cl,getScale:Z,isElement:U,isRTL:fl};function ml(e,t){let r=null,l;const o=z(e);function i(){clearTimeout(l),r&&r.disconnect(),r=null}function a(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),i();const{left:s,top:c,width:p,height:b}=e.getBoundingClientRect();if(u||t(),!p||!b)return;const m=ye(c),h=ye(o.clientWidth-(s+p)),g=ye(o.clientHeight-(c+b)),w=ye(s),v={rootMargin:-m+"px "+-h+"px "+-g+"px "+-w+"px",threshold:G(0,be(1,d))||1};let x=!0;function k(S){const O=S[0].intersectionRatio;if(O!==d){if(!x)return a();O?a(!1,O):l=setTimeout(()=>{a(!1,1e-7)},100)}x=!1}try{r=new IntersectionObserver(k,{...v,root:o.ownerDocument})}catch{r=new IntersectionObserver(k,v)}r.observe(e)}return a(!0),i}function gl(e,t,r,l){l===void 0&&(l={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=l,s=Ge(e),c=o||i?[...s?ie(s):[],...ie(t)]:[];c.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),i&&y.addEventListener("resize",r)});const p=s&&u?ml(s,r):null;let b=-1,m=null;a&&(m=new ResizeObserver(y=>{let[v]=y;v&&v.target===s&&m&&(m.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{m&&m.observe(t)})),r()}),s&&!d&&m.observe(s),m.observe(t));let h,g=d?X(e):null;d&&w();function w(){const y=X(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&r(),g=y,h=requestAnimationFrame(w)}return r(),()=>{c.forEach(y=>{o&&y.removeEventListener("scroll",r),i&&y.removeEventListener("resize",r)}),p&&p(),m&&m.disconnect(),m=null,d&&cancelAnimationFrame(h)}}const bl=Qo,hl=qo,yl=(e,t,r)=>{const l=new Map,o={platform:pl,...r},i={...o.platform,_c:l};return Go(e,t,{...o,platform:i})};function wl(e){return e!=null&&typeof e=="object"&&"$el"in e}function tn(e){if(wl(e)){const t=e.$el;return He(t)&&j(t)==="#comment"?null:t}return e}function nn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function on(e,t){const r=nn(e);return Math.round(t*r)/r}function vl(e,t,r){r===void 0&&(r={});const l=r.whileElementsMounted,o=n.computed(()=>{var C;return(C=n.unref(r.open))!=null?C:!0}),i=n.computed(()=>n.unref(r.middleware)),a=n.computed(()=>{var C;return(C=n.unref(r.placement))!=null?C:"bottom"}),u=n.computed(()=>{var C;return(C=n.unref(r.strategy))!=null?C:"absolute"}),d=n.computed(()=>{var C;return(C=n.unref(r.transform))!=null?C:!0}),s=n.computed(()=>tn(e.value)),c=n.computed(()=>tn(t.value)),p=n.ref(0),b=n.ref(0),m=n.ref(u.value),h=n.ref(a.value),g=n.shallowRef({}),w=n.ref(!1),y=n.computed(()=>{const C={position:m.value,left:"0",top:"0"};if(!c.value)return C;const L=on(c.value,p.value),K=on(c.value,b.value);return d.value?{...C,transform:"translate("+L+"px, "+K+"px)",...nn(c.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:L+"px",top:K+"px"}});let v;function x(){s.value==null||c.value==null||yl(s.value,c.value,{middleware:i.value,placement:a.value,strategy:u.value}).then(C=>{p.value=C.x,b.value=C.y,m.value=C.strategy,h.value=C.placement,g.value=C.middlewareData,w.value=!0})}function k(){typeof v=="function"&&(v(),v=void 0)}function S(){if(k(),l===void 0){x();return}if(s.value!=null&&c.value!=null){v=l(s.value,c.value,x);return}}function O(){o.value||(w.value=!1)}return n.watch([i,a,u],x,{flush:"sync"}),n.watch([s,c],S,{flush:"sync"}),n.watch(o,O,{flush:"sync"}),n.getCurrentScope()&&n.onScopeDispose(k),{x:n.shallowReadonly(p),y:n.shallowReadonly(b),strategy:n.shallowReadonly(m),placement:n.shallowReadonly(h),middlewareData:n.shallowReadonly(g),isPositioned:n.shallowReadonly(w),floatingStyles:y,update:x}}const xl=n.defineComponent({__name:"MenuContainer",props:{position:{default:"left"},usePortal:{type:[Boolean,String],default:!1}},setup(e){const t=e,r=n.ref(null),l=n.ref(null),o=t.position==="left"?"bottom-end":"bottom-start",{floatingStyles:i}=vl(r,l,{placement:o,whileElementsMounted:gl,middleware:[Yo(6),hl(),bl({padding:6})]});return(a,u)=>(n.openBlock(),n.createBlock(n.unref(Lo),{as:"div",class:"inline-block text-left"},{default:n.withCtx(()=>[n.createVNode(n.unref(Vo),{class:"focus:outline-none",ref_key:"reference",ref:r},{default:n.withCtx(()=>[n.renderSlot(a.$slots,"button",{},()=>[n.createVNode(n.unref(P),{class:"fill-current",name:"ellipsis-h"})])]),_:3},512),(n.openBlock(),n.createBlock(n.Teleport,{to:typeof a.usePortal=="string"?a.usePortal:"body",disabled:!a.usePortal},[n.createElementVNode("div",{class:"w-56 z-20",style:n.normalizeStyle(n.unref(i)),ref_key:"floating",ref:l},[n.createVNode(n.Transition,{"enter-active-class":"transition duration-200 ease-in-out","enter-from-class":"transform -translate-y-4 opacity-0","enter-to-class":"transform opacity-100","leave-active-class":"transition duration-100 ease-in-out","leave-from-class":"transform opacity-100","leave-to-class":"transform -translate-y-2 opacity-0"},{default:n.withCtx(()=>[n.createVNode(n.unref(No),{class:n.normalizeClass(["z-40 mt-1 p-1 bg-white rounded shadow-lg text-grey-700 focus:outline-none w-full"])},{default:n.withCtx(()=>[n.renderSlot(a.$slots,"default")]),_:3})]),_:3})],4)],8,["to","disabled"]))]),_:3}))}}),kl={key:0,class:"bg-grey-300 px-2 rounded-lg max-w-[66px] truncate"},Sl=n.defineComponent({__name:"MenuLink",props:{label:{},meta:{},disabled:{type:Boolean},as:{}},setup(e){return(t,r)=>(n.openBlock(),n.createBlock(n.unref(Io),n.normalizeProps(n.guardReactiveProps({disabled:t.disabled})),{default:n.withCtx(({active:l})=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(t.as||"span"),{class:n.normalizeClass(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg",[l?"bg-grey-200":"",t.disabled?"opacity-50 pointer-events-none":"hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"]])},{default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(t.label),1),t.meta?(n.openBlock(),n.createElementBlock("span",kl,n.toDisplayString(t.meta),1)):n.createCommentVNode("",!0)]),_:2},1032,["class"]))]),_:1},16))}}),Cl={class:"relative"},El={key:0,class:"absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none"},Rl={key:1,class:"block truncate"},Ol=["innerHTML"],Dl={key:2,class:"text-grey-500 truncate"},Tl={class:"absolute right-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none"},_l={class:"absolute right-2 inset-y-0 flex items-center"},Pl={key:0,class:"bg-grey-500 text-grey-100 rounded text-xs px-2 py-1"},Bl=["innerHTML"],Ll=n.defineComponent({__name:"Select",props:{modelValue:{},size:{default:"medium"},icon:{},placeholder:{},isDisabled:{type:Boolean,default:!1},options:{},disabledBadge:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,l=r.modelValue?n.ref(r.modelValue):n.ref(void 0),o=t,{inputClasses:i,disabledClasses:a,textSizeClasses:u}=Le(r);return n.watch(()=>r.modelValue,d=>{var s;d&&d.id!==((s=l.value)==null?void 0:s.id)&&(l.value=d)}),n.watch(l,d=>{d&&o("update:modelValue",d)}),(d,s)=>(n.openBlock(),n.createBlock(n.unref(Ro),{as:"div",modelValue:n.unref(l),"onUpdate:modelValue":s[0]||(s[0]=c=>n.isRef(l)?l.value=c:null),disabled:d.isDisabled},{default:n.withCtx(()=>[n.createElementVNode("div",Cl,[n.createVNode(n.unref(Oo),{class:n.normalizeClass(["w-full mono-50 bg-white text-grey-800 placeholder-grey-600 border border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:ring-2 focus:border-blue-400 focus:ring-blue-400 focus:outline-none dark:focus:border-blue-800 dark:focus:ring-blue-800 cursor-default rounded font-normal text-left",[n.unref(i),n.unref(u),n.unref(a)]])},{default:n.withCtx(()=>{var c;return[d.icon?(n.openBlock(),n.createElementBlock("span",El,[n.createVNode(P,{name:((c=n.unref(l))==null?void 0:c.icon)??d.icon},null,8,["name"])])):n.createCommentVNode("",!0),n.unref(l)?(n.openBlock(),n.createElementBlock("span",Rl,[n.createElementVNode("span",{innerHTML:n.unref(l).label},null,8,Ol)])):(n.openBlock(),n.createElementBlock("span",Dl,n.toDisplayString(d.placeholder),1)),n.createElementVNode("span",Tl,[n.createVNode(P,{class:"text-grey-400",name:"chevron-down","aria-hidden":"true"})])]}),_:1},8,["class"]),n.createVNode(n.Transition,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:n.withCtx(()=>[n.createVNode(n.unref(Do),{class:"absolute z-10 mt-1 w-full bg-white dark:bg-grey-700 dark:text-grey-50 shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.options,c=>(n.openBlock(),n.createBlock(n.unref(To),{as:"template",key:c.id,value:c,disabled:c.disabled},{default:n.withCtx(({active:p,selected:b})=>[n.createElementVNode("li",{class:n.normalizeClass([p?"text-white bg-blue-500":"text-grey-900 dark:text-grey-50","cursor-default select-none relative py-2 pl-3 pr-12",{"opacity-50 bg-grey-100":c.disabled}])},[n.createElementVNode("div",_l,[c.disabled&&d.disabledBadge?(n.openBlock(),n.createElementBlock("span",Pl,n.toDisplayString(d.disabledBadge),1)):n.createCommentVNode("",!0)]),n.createElementVNode("span",{class:n.normalizeClass([b?"font-semibold":"font-normal","block truncate"])},[c.icon?(n.openBlock(),n.createBlock(P,{key:0,class:"inline-block mr-1",name:c.icon},null,8,["name"])):n.createCommentVNode("",!0),n.createElementVNode("span",{innerHTML:c.label},null,8,Bl)],2),b?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass([p?"text-blue-100":"text-blue-500","absolute inset-y-0 right-0 flex items-center pr-4"])},[n.createVNode(P,{name:"check",class:"h-5 w-5","aria-hidden":"true"})],2)):n.createCommentVNode("",!0)],2)]),_:2},1032,["value","disabled"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue","disabled"]))}}),Vl={class:"animate-pulse"},Nl={class:"flex items-center justify-between space-x-4"},Il={key:0,class:"w-12 h-12 bg-current rounded-full shrink-0"},Al={key:1,class:"w-full h-8 bg-current rounded-lg"},$l={key:0,class:"mt-6 space-y-2"},Ml={key:1,class:"w-1/3 h-10 mt-6 bg-current rounded-lg"},Fl=n.defineComponent({__name:"Skeleton",props:{avatar:{type:Boolean,default:!1},title:{type:Boolean,default:!0},lines:{default:3},footer:{type:Boolean,default:!1}},setup(e){const t=e,r=new Array(t.lines).fill(void 0).map(()=>{const l=[4,5,6,8,10,16,24,32];return{margin:`mr-${l[Math.floor(Math.random()*l.length)]}`}});return(l,o)=>(n.openBlock(),n.createElementBlock("div",Vl,[n.createElementVNode("div",Nl,[l.avatar?(n.openBlock(),n.createElementBlock("div",Il)):n.createCommentVNode("",!0),l.title?(n.openBlock(),n.createElementBlock("div",Al)):n.createCommentVNode("",!0)]),l.lines>0?(n.openBlock(),n.createElementBlock("div",$l,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(r),(i,a)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["h-4 bg-current rounded-lg",i.margin]),key:a},null,2))),128))])):n.createCommentVNode("",!0),l.footer?(n.openBlock(),n.createElementBlock("div",Ml)):n.createCommentVNode("",!0)]))}}),jl=n.defineComponent({__name:"Spinner",setup(e){return(t,r)=>(n.openBlock(),n.createBlock(n.unref(P),{class:"animate-spin",name:"circle-notch"}))}}),zl={class:"relative inline-flex items-center"},Ul=["aria-label","tabindex"],Hl={key:0,class:"absolute inset-0 flex items-center justify-center"},Wl=n.defineComponent({__name:"SplitButton",props:{label:{},size:{default:"medium"},color:{default:"primary"},isLoading:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},icon:{default:"plus"}},emits:["onClick","onClickSplit"],setup(e,{emit:t}){const r=t,l=e,o=n.computed(()=>{const s={"text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900":l.color==="primary","text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900":l.color==="light","text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900":l.color==="dark","text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900":l.color==="danger"},c={"px-4 py-1 text-xs leading-5 mono-100":l.size==="small","px-5 py-2 text-sm leading-4 font-medium":l.size==="medium","px-8 pr-4 py-3 text-base leading-6 font-medium":l.size==="large"},p={"pointer-events-none opacity-75 cursor-not-allowed":l.isDisabled};return{...s,...p,...c}}),i=n.computed(()=>{const s={"border-l-white/50 border-l":l.color==="primary","border-l-blue-100 border-l":l.color==="light","border-l-grey-600 border-l":l.color==="dark","border-l-red-600 border-l":l.color==="danger"},c={"pl-2 pr-3":l.size==="small","pl-3 pr-3":l.size==="medium","pl-4 pr-5":l.size==="large"};return{...s,...c}}),a=n.computed(()=>({...{"text-white":l.color==="primary","text-blue-600":l.color==="light","text-grey-50":l.color==="dark"}}));function u(){l.isDisabled||r("onClick")}function d(){l.isDisabled||r("onClickSplit")}return(s,c)=>(n.openBlock(),n.createElementBlock("div",zl,[n.createElementVNode("button",{type:"button","aria-label":s.label,tabindex:s.isDisabled?"-1":void 0,class:n.normalizeClass(["relative transition duration-150 ease-in-out rounded-l-lg",o.value]),onClick:u},[n.createElementVNode("div",{class:n.normalizeClass(!s.isLoading||"invisible")},[n.createElementVNode("span",null,n.toDisplayString(s.label),1)],2),s.isLoading?(n.openBlock(),n.createElementBlock("span",Hl,[n.createVNode(P,{class:"ml-3 animate-spin",name:"circle-notch"})])):n.createCommentVNode("",!0)],10,Ul),n.createElementVNode("button",{type:"button",class:n.normalizeClass(["border-l-white/50 border-l transition duration-150 ease-in-out rounded-r-lg",[o.value,i.value]]),onClick:d},[n.createVNode(P,{class:n.normalizeClass([a.value]),name:s.icon},null,8,["class","name"])],2)]))}}),Kl={class:"sr-only"},Gl=n.defineComponent({__name:"Switch",props:{id:{default:lt()},label:{},modelValue:{type:Boolean},description:{},onLabel:{default:"on"},offLabel:{default:"off"}},emits:["update:modelValue","change"],setup(e,{emit:t}){const r=t,l=o=>{r("update:modelValue",o),r("change",o)};return(o,i)=>(n.openBlock(),n.createBlock(n.unref($o),{modelValue:o.modelValue,label:o.label,class:n.normalizeClass([o.modelValue?"bg-blue-700":"bg-grey-700","relative inline-flex items-center h-6 transition rounded-full w-14 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-grey-900 focus:ring-blue-300"]),"onUpdate:modelValue":l},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(["absolute text-xs text-center text-white inset-x-2",o.modelValue?"pr-3":"pl-3"])},n.toDisplayString(o.modelValue===!0?o.onLabel:o.offLabel),3),n.createElementVNode("span",Kl,n.toDisplayString(o.label),1),n.createElementVNode("span",{class:n.normalizeClass([o.modelValue?"translate-x-9":"translate-x-1","inline-block w-4 h-4 transition bg-white rounded-full"])},null,2)]),_:1},8,["modelValue","label","class"]))}}),ql={class:"relative"},Xl=["tabindex","value"],Yl={inheritAttrs:!1},Ql=n.defineComponent({...Yl,__name:"Textarea",props:{modelValue:{},size:{default:"medium"},isDisabled:{type:Boolean,default:!1},block:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:r}){const l=e,o=r,{inputClasses:i,disabledClasses:a,textSizeClasses:u}=Le(l),d=function(p){o("update:modelValue",(p==null?void 0:p.target).value)},s=n.ref(null);return t({focus:()=>{l.isDisabled||s.value.focus()}}),(p,b)=>(n.openBlock(),n.createElementBlock("div",ql,[n.createElementVNode("textarea",n.mergeProps({class:["mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded",[n.unref(i),n.unref(u),n.unref(a)]],tabindex:p.isDisabled?"-1":void 0,value:p.modelValue??""},p.$attrs,{ref_key:"input",ref:s,cols:"56",rows:"8",onInput:d}),`
|
|
5
|
-
`,16,Xl)]))}});T.D9Button=pn,T.D9Checkbox=Sn,T.D9Icon=P,T.D9Input=Gn,T.D9Label=Qn,T.D9Menu=xl,T.D9MenuLink=Sl,T.D9Select=Ll,T.D9Skeleton=Fl,T.D9Spinner=jl,T.D9SplitButton=Wl,T.D9Switch=Gl,T.D9Textarea=Ql,T.brands=Te,T.icons=nt,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(i,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@fortawesome/vue-fontawesome"),require("@fortawesome/fontawesome-svg-core"),require("@fortawesome/free-solid-svg-icons"),require("@fortawesome/free-brands-svg-icons"),require("uuid"),require("@vueuse/core"),require("@headlessui/vue"),require("@floating-ui/vue")):typeof define=="function"&&define.amd?define(["exports","vue","@fortawesome/vue-fontawesome","@fortawesome/fontawesome-svg-core","@fortawesome/free-solid-svg-icons","@fortawesome/free-brands-svg-icons","uuid","@vueuse/core","@headlessui/vue","@floating-ui/vue"],e):(i=typeof globalThis<"u"?globalThis:i||self,e(i.ui={},i.Vue,i.vueFontawesome,i.fontawesomeSvgCore,i.fasIcons,i.fabIcon,i.uuid,i.VueUse,i.HeadlessUIVue,i.FloatingUIVue))})(this,function(i,e,U,x,j,O,D,R,g,C){"use strict";function S(n){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(o,r,l.get?l:{enumerable:!0,get:()=>n[r]})}}return o.default=n,Object.freeze(o)}const t=S(j),_=S(O);var L="fas",P="numeric-input",$=512,M=512,E=[],I="",T="m409.445 111 2.112.004c34.066.146 46.74 3.848 59.517 10.681 13.037 6.973 23.268 17.204 30.24 30.241l.415.782c6.705 12.782 10.271 25.9 10.271 60.847v72.002c-.15 34.066-3.852 46.74-10.685 59.517-6.973 13.037-17.204 23.268-30.241 30.24l-.782.415C457.51 382.434 444.392 386 409.445 386h-306.89l-2.112-.004c-34.066-.146-46.74-3.848-59.517-10.681-13.037-6.973-23.268-17.204-30.24-30.241l-.415-.782C3.566 331.51 0 318.392 0 283.445v-69.89c0-35.66 3.713-48.592 10.685-61.629 6.973-13.037 17.204-23.268 30.241-30.24l.782-.415C54.49 114.566 67.608 111 102.555 111h306.89Zm.806 36H102.555l-2.387.005c-22.69.089-31.789 1.488-39.667 5.128l-.523.246c-.696.332-1.385.683-2.074 1.052-6.764 3.617-11.856 8.71-15.473 15.473l-.282.533c-4.492 8.62-6.116 17.401-6.148 43.312v71.502l.012 3.09c.161 24.044 1.9 32.308 6.418 40.755 3.617 6.764 8.71 11.856 15.473 15.473l.533.282c8.62 4.492 17.401 6.116 43.312 6.149h307.696c27.078 0 35.763-1.677 44.651-6.43 6.764-3.618 11.856-8.71 15.473-15.474l.282-.533c4.492-8.62 6.116-17.401 6.149-43.312v-70.696c0-27.078-1.677-35.763-6.43-44.651-3.618-6.764-8.71-11.856-15.474-15.473l-.533-.282c-8.62-4.492-17.401-6.116-43.312-6.149Zm-164.715 19c11.682 0 22.013 1.976 30.994 5.929 8.98 3.952 16.005 9.38 21.074 16.284 5.07 6.904 7.578 14.797 7.527 23.677.103 8.829-2.92 16.066-9.07 21.713-6.15 5.646-13.935 8.983-23.353 10.01v1.231c12.764 1.386 22.362 5.274 28.794 11.665 6.433 6.39 9.598 14.411 9.496 24.061.051 9.24-2.715 17.427-8.299 24.562-5.584 7.135-13.33 12.73-23.236 16.785-9.907 4.055-21.319 6.083-34.236 6.083-12.454 0-23.506-2.143-33.156-6.43-9.65-4.285-17.227-10.201-22.734-17.747-5.506-7.545-8.286-16.22-8.337-26.025h43.23c.051 3.029.99 5.737 2.817 8.124 1.827 2.386 4.336 4.247 7.527 5.582 3.19 1.334 6.845 2.002 10.962 2.002 3.962 0 7.462-.706 10.498-2.118 3.037-1.411 5.404-3.375 7.102-5.89 1.699-2.515 2.522-5.39 2.47-8.623.052-3.183-.913-6.006-2.894-8.47-1.982-2.464-4.748-4.389-8.299-5.775-3.55-1.386-7.642-2.079-12.274-2.079h-16.057v-29.566h16.057c4.271 0 8.041-.693 11.31-2.08 3.267-1.385 5.815-3.31 7.642-5.774s2.714-5.287 2.663-8.47c.051-3.08-.695-5.8-2.239-8.161-1.544-2.361-3.692-4.21-6.446-5.544-2.753-1.334-5.93-2.002-9.533-2.002-3.912 0-7.398.693-10.46 2.08-3.063 1.385-5.468 3.31-7.218 5.774s-2.65 5.287-2.702 8.47h-41.068c.051-9.65 2.715-18.172 7.99-25.563 5.275-7.392 12.518-13.192 21.73-17.401 9.212-4.21 19.788-6.314 31.728-6.314Zm-133.074 0c12.615 0 23.55 2.017 32.807 6.05 9.257 4.033 16.41 9.698 21.462 16.994 5.051 7.296 7.577 15.851 7.577 25.665 0 6.063-1.257 12.087-3.77 18.073-2.512 5.986-7.025 12.601-13.538 19.846-6.513 7.245-15.77 15.877-27.77 25.896l-14.768 12.331v.925H176V326H55.077v-30.829l58.77-48.709c3.897-3.237 7.243-6.28 10.038-9.133 2.794-2.851 4.948-5.793 6.461-8.824 1.513-3.032 2.27-6.397 2.27-10.097 0-4.059-.86-7.527-2.578-10.404-1.717-2.877-4.09-5.1-7.115-6.667-3.026-1.567-6.513-2.35-10.461-2.35-3.95 0-7.424.796-10.424 2.389-3 1.593-5.32 3.93-6.961 7.013-1.641 3.083-2.462 6.834-2.462 11.253H52c0-11.099 2.487-20.655 7.462-28.67 4.974-8.016 12-14.182 21.076-18.498 9.077-4.316 19.718-6.474 31.924-6.474Z";const F={prefix:L,iconName:P,icon:[$,M,E,I,T]},q={definition:F,faAlignJustify:F,prefix:L,iconName:P,width:$,height:M,ligatures:E,unicode:I,svgPathData:T,aliases:E};x.library.add(t.faAlignCenter,t.faAlignLeft,t.faAlignRight,t.faArrowRight,t.faArrowUp19,t.faAsterisk,t.faAt,t.faBold,t.faBolt,t.faCalendar,t.faChartPie,t.faCheck,t.faCheckCircle,t.faChevronDown,t.faChevronLeft,t.faChevronRight,t.faChevronUp,t.faCircleCheck,t.faCircleNodes,t.faCircleNotch,t.faClipboard,t.faCloudDownload,t.faCloudUpload,t.faCode,t.faCodeBranch,t.faCodeFork,t.faCog,t.faCompass,t.faCrown,t.faDiagramProject,t.faDoorOpen,t.faDotCircle,t.faEllipsis,t.faEllipsisVertical,t.faEnvelope,t.faExclamationTriangle,t.faExternalLink,t.faEye,t.faEyeDropper,t.faEyeSlash,t.faFileLines,t.faFilePdf,t.faFileUpload,t.faFileVideo,t.faFileWaveform,t.faFilter,t.faFilter,t.faFingerprint,t.faFont,t.faGears,t.faGlobe,t.faGripHorizontal,t.faGripVertical,t.faHandPointRight,t.faHandPointRight,t.faHashtag,t.faHeading,t.faHeart,t.faImage,t.faInfoCircle,t.faItalic,t.faLayerGroup,t.faLink,t.faLinkSlash,t.faList,t.faListOl,t.faListUl,t.faLocationArrow,t.faLocationCrosshairs,t.faLock,t.faLockOpen,t.faMedal,t.faMessage,t.faMicrochip,t.faPencilAlt,t.faPenToSquare,t.faPhone,t.faPlayCircle,t.faPlus,t.faPlusCircle,t.faPoo,t.faPuzzlePiece,t.faQuestion,t.faQuoteLeft,t.faQuoteRight,t.faReply,t.faReplyAll,t.faRightLong,t.faRobot,t.faSave,t.faShield,t.faSignal,t.faSignature,t.faSignature,t.faSquareCheck,t.faStar,t.faStrikethrough,t.faTerminal,t.faTextSlash,t.faTimes,t.faTrash,t.faTree,t.faTrophy,t.faTurnDown,t.faUnderline,t.faUpload,t.faUser,t.faUserShield,t.faWandMagicSparkles,_.faTwitter,_.faInstagram,_.faGithub,_.faLinkedin,_.faFacebook,q.definition);const A=[...Object.keys(x.library.definitions.fas)].sort(),N=[...Object.keys(x.library.definitions.fab)].sort(),p=e.defineComponent({__name:"Icon",props:{name:{default:"user"}},setup(n){const o=n,r=e.computed(()=>N.includes(o.name)?"fab":"fas"),l=e.computed(()=>A.includes(o.name)||N.includes(o.name)?!0:(console.warn("could not load icon, because it is not available",o.name),!1));return(a,c)=>l.value?(e.openBlock(),e.createBlock(e.unref(U.FontAwesomeIcon),e.mergeProps({key:0,icon:[r.value,a.name]},a.$attrs),null,16,["icon"])):e.createCommentVNode("",!0)}}),G=["aria-label","disabled","aria-busy"],Z={key:0,class:"absolute inset-0 flex items-center justify-center"},Q=e.defineComponent({__name:"Button",props:{label:{},size:{default:"medium"},color:{default:"primary"},isLoading:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},icon:{},iconPosition:{default:"right"}},setup(n){const o=n,r=e.computed(()=>{const a={"text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900":o.color==="primary","text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900":o.color==="light","text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900":o.color==="dark","text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900":o.color==="danger"},c={"pointer-events-none opacity-75 cursor-not-allowed":o.isDisabled},d={"px-4 py-1 text-xs leading-5 mono-100 rounded-lg":o.size==="small","px-5 py-2 text-sm leading-4 font-medium rounded-lg":o.size==="medium","px-8 py-3 text-base leading-6 font-medium rounded-lg":o.size==="large"};return{...a,...c,...d}}),l=e.computed(()=>{const a={"mr-2 -ml-1":["small","medium"].includes(o.size)&&o.iconPosition==="left","mr-4 -ml-2":["large"].includes(o.size)&&o.iconPosition==="left"},c={"ml-3 -mr-1":["small","medium"].includes(o.size)&&o.iconPosition==="right","ml-3 -mr-3":["large"].includes(o.size)&&o.iconPosition==="right"},d={"text-white":o.color==="primary","text-blue-600":o.color==="light","text-grey-50":o.color==="dark"};return{...a,...c,...d}});return(a,c)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out",r.value]),type:"button","aria-label":a.label,disabled:a.isDisabled||a.isLoading,"aria-busy":a.isLoading},[e.createElementVNode("div",{class:e.normalizeClass(!a.isLoading||"invisible")},[a.icon&&a.iconPosition==="left"?(e.openBlock(),e.createBlock(p,{key:0,name:a.icon,class:e.normalizeClass(l.value)},null,8,["name","class"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a.label),1),a.icon&&a.iconPosition==="right"?(e.openBlock(),e.createBlock(p,{key:1,name:a.icon,class:e.normalizeClass(l.value)},null,8,["name","class"])):e.createCommentVNode("",!0)],2),a.isLoading?(e.openBlock(),e.createElementBlock("span",Z,[e.createVNode(p,{class:"animate-spin",name:"circle-notch"})])):e.createCommentVNode("",!0)],10,G))}}),W={class:"relative flex items-start"},J=["checked","id"],K={class:"ml-2 text-sm leading-5 peer-disabled:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:[&>label]:cursor-not-allowed"},X=["for"],Y={key:0,class:"block text-xs text-grey-400 font-normal mono-0 casual-60"},v={inheritAttrs:!1},ee=e.defineComponent({...v,__name:"Checkbox",props:{id:{default:()=>D.v4()},label:{},modelValue:{type:Boolean},description:{}},emits:["update:modelValue"],setup(n,{emit:o}){const r=o,l=a=>{r("update:modelValue",a.target.checked)};return(a,c)=>(e.openBlock(),e.createElementBlock("div",W,[e.createElementVNode("input",e.mergeProps({class:"peer mt-0.5 h-4 w-4 border-grey-600 dark:text-blue-500 dark:border-grey-300 dark:checked:border-blue-500 dark:focus:ring-blue-900 dark:focus:ring-offset-grey-800 rounded-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"checkbox",checked:a.modelValue,onChange:l,id:a.id},a.$attrs),null,16,J),e.createElementVNode("div",K,[e.createElementVNode("label",{for:a.id,class:"font-medium text-grey-700 dark:text-grey-200 casual-25"},e.toDisplayString(a.label),9,X),a.description?(e.openBlock(),e.createElementBlock("p",Y,e.toDisplayString(a.description),1)):e.createCommentVNode("",!0)])]))}});function z(n){const o=e.computed(()=>({"pl-3 pr-10 py-2":!n.icon&&n.type!=="color"&&n.size==="small","pl-4 pr-10 py-3":!n.icon&&n.type!=="color"&&n.size==="medium","pl-6 pr-10 py-3":!n.icon&&n.type!=="color"&&n.size==="large","pl-10 pr-10 py-1":(n.icon||n.type==="color")&&n.size==="small","pl-12 pr-10 py-3":(n.icon||n.type==="color")&&(n.size==="medium"||n.size==="large"),"w-full block":n.block===!0})),r=e.computed(()=>({"pointer-events-none opacity-50 cursor-not-allowed":n.isDisabled})),l=e.computed(()=>({"text-xs leading-4":n.size==="small","text-sm leading-4":n.size==="medium","text-base leading-5":n.size==="large"}));return{inputClasses:o,disabledClasses:r,textSizeClasses:l}}const te=["placeholder","type","min","max","disabled","value"],oe={class:"absolute inset-y-2 left-2 w-8 cursor-pointer"},ae=["disabled"],ne=["disabled"],le={inheritAttrs:!1},re=e.defineComponent({...le,__name:"Input",props:{modelValue:{},type:{default:"text"},placeholder:{},size:{default:"medium"},icon:{},min:{},max:{},isDisabled:{type:Boolean,default:!1},block:{type:Boolean},showColorPicker:{type:Boolean}},emits:["update:modelValue"],setup(n,{expose:o,emit:r}){const l=n,a=e.ref(null),c=e.ref(l.modelValue??""),d=s=>l.type==="number"&&s!==""&&s!==null?Number(s):s;e.watch(()=>l.modelValue,s=>{typeof s<"u"&&s!==d(c.value)&&(c.value=s)});const b=r,{inputClasses:h,disabledClasses:y,textSizeClasses:B}=z(l),u=e.computed(()=>l.type==="color"?"text":l.type),{isSupported:f,open:H,sRGBHex:m}=R.useEyeDropper(),w=()=>{H()};e.watch(m,s=>{c.value=s,b("update:modelValue",s)});const V=function(s){c.value=(s==null?void 0:s.target).value,b("update:modelValue",d(c.value))},Ae=function(){const s=d(c.value);if(typeof s!="number")return;const k=Math.min(Math.max(s,l.min??-1/0),l.max??1/0);k!==s&&(c.value=k,b("update:modelValue",k))};return o({focus:()=>{var s;l.isDisabled||(s=a.value)==null||s.focus()}}),(s,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative",[s.block?"w-full block":"inline-block"]])},[e.createElementVNode("input",e.mergeProps({class:["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded",[e.unref(h),e.unref(B),e.unref(y)]],placeholder:s.placeholder,type:u.value,min:s.min,max:s.max,disabled:s.isDisabled,value:c.value},s.$attrs,{ref_key:"inputElement",ref:a,onInput:V,onChange:Ae}),null,16,te),s.type==="color"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("label",oe,[e.withDirectives(e.createElementVNode("input",{class:"invisible",type:"color",disabled:s.isDisabled,"onUpdate:modelValue":k[0]||(k[0]=He=>c.value=He),onInput:V},null,40,ae),[[e.vModelText,c.value]]),e.createElementVNode("span",{class:"border-1 absolute inset-0 block rounded border border-grey-600/25 bg-clip-border shadow",style:e.normalizeStyle(`background-color: ${c.value}`)},null,4)]),e.unref(f)&&s.showColorPicker?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"absolute inset-y-2 right-2 h-7 w-7 rounded-full hover:bg-grey-200",disabled:s.isDisabled,onClick:w},[e.createVNode(p,{size:"xs",name:"eyedropper"})],8,ne)):e.createCommentVNode("",!0)],64)):s.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4",e.unref(B)])},[e.createVNode(p,{name:s.icon},null,8,["name"])],2)):e.createCommentVNode("",!0)],2))}}),se={class:"inline-block text-grey-700 dark:text-grey-200 text-sm font-medium casual-20"},ie=["id","for"],ce={key:0,class:"block text-xs text-grey-400 font-normal mono-0 casual-60"},de=e.defineComponent({__name:"Label",props:{id:{},label:{},description:{}},setup(n){return(o,r)=>(e.openBlock(),e.createElementBlock("span",se,[e.createElementVNode("label",{id:o.id?`${o.id}-label`:void 0,for:o.id},e.toDisplayString(o.label),9,ie),o.description?(e.openBlock(),e.createElementBlock("span",ce,e.toDisplayString(o.description),1)):e.createCommentVNode("",!0)]))}}),fe=e.defineComponent({__name:"MenuContainer",props:{position:{default:"left"},usePortal:{type:[Boolean,String],default:!1}},setup(n){const o=n,r=e.ref(null),l=e.ref(null),a=o.position==="left"?"bottom-end":"bottom-start",{floatingStyles:c}=C.useFloating(r,l,{placement:a,whileElementsMounted:C.autoUpdate,middleware:[C.offset(6),C.flip(),C.shift({padding:6})]});return(d,b)=>(e.openBlock(),e.createBlock(e.unref(g.Menu),{as:"div",class:"inline-block text-left"},{default:e.withCtx(()=>[e.createVNode(e.unref(g.MenuButton),{class:"focus:outline-none",ref_key:"reference",ref:r},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"button",{},()=>[e.createVNode(e.unref(p),{class:"fill-current",name:"ellipsis-h"})])]),_:3},512),(e.openBlock(),e.createBlock(e.Teleport,{to:typeof d.usePortal=="string"?d.usePortal:"body",disabled:!d.usePortal},[e.createElementVNode("div",{class:"w-56 z-20",style:e.normalizeStyle(e.unref(c)),ref_key:"floating",ref:l},[e.createVNode(e.Transition,{"enter-active-class":"transition duration-200 ease-in-out","enter-from-class":"transform -translate-y-4 opacity-0","enter-to-class":"transform opacity-100","leave-active-class":"transition duration-100 ease-in-out","leave-from-class":"transform opacity-100","leave-to-class":"transform -translate-y-2 opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(g.MenuItems),{class:e.normalizeClass(["z-40 mt-1 p-1 bg-white rounded shadow-lg text-grey-700 focus:outline-none w-full"])},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default")]),_:3})]),_:3})],4)],8,["to","disabled"]))]),_:3}))}}),me={key:0,class:"bg-grey-300 px-2 rounded-lg max-w-[66px] truncate"},pe=e.defineComponent({__name:"MenuLink",props:{label:{},meta:{},disabled:{type:Boolean},as:{}},setup(n){return(o,r)=>(e.openBlock(),e.createBlock(e.unref(g.MenuItem),e.normalizeProps(e.guardReactiveProps({disabled:o.disabled})),{default:e.withCtx(({active:l})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.as||"span"),{class:e.normalizeClass(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg",[l?"bg-grey-200":"",o.disabled?"opacity-50 pointer-events-none":"hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"]])},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(o.label),1),o.meta?(e.openBlock(),e.createElementBlock("span",me,e.toDisplayString(o.meta),1)):e.createCommentVNode("",!0)]),_:2},1032,["class"]))]),_:1},16))}}),ue={class:"relative"},ge={key:0,class:"absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none"},be={key:1,class:"block truncate"},ye=["innerHTML"],he={key:2,class:"text-grey-500 truncate"},ke={class:"absolute right-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none"},Ce={class:"absolute right-2 inset-y-0 flex items-center"},_e={key:0,class:"bg-grey-500 text-grey-100 rounded text-xs px-2 py-1"},Be=["innerHTML"],Ve=e.defineComponent({__name:"Select",props:{id:{},modelValue:{},size:{default:"medium"},icon:{},placeholder:{},isDisabled:{type:Boolean,default:!1},options:{},disabledBadge:{}},emits:["update:modelValue"],setup(n,{emit:o}){const r=n,l=e.ref(r.modelValue??null),a=o,{inputClasses:c,disabledClasses:d,textSizeClasses:b}=z(r),h=e.ref(!1),y=()=>{h.value=!!r.id&&!!document.getElementById(`${r.id}-label`)};e.onMounted(y),e.watch(()=>r.id,y,{flush:"post"});const B=e.computed(()=>h.value?`${r.id}-label ${r.id}`:void 0);e.watch(()=>r.modelValue,f=>{l.value=f??null});const u=f=>{l.value=f,a("update:modelValue",f)};return(f,H)=>(e.openBlock(),e.createBlock(e.unref(g.Listbox),{as:"div","model-value":l.value,"onUpdate:modelValue":u,disabled:f.isDisabled},{default:e.withCtx(()=>[e.createElementVNode("div",ue,[e.createVNode(e.unref(g.ListboxButton),{id:f.id,"aria-labelledby":B.value,class:e.normalizeClass(["w-full mono-50 bg-white text-grey-800 placeholder-grey-600 border border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:ring-2 focus:border-blue-400 focus:ring-blue-400 focus:outline-none dark:focus:border-blue-800 dark:focus:ring-blue-800 cursor-default rounded font-normal text-left",[e.unref(c),e.unref(b),e.unref(d)]])},{default:e.withCtx(()=>{var m;return[f.icon?(e.openBlock(),e.createElementBlock("span",ge,[e.createVNode(p,{name:((m=l.value)==null?void 0:m.icon)??f.icon},null,8,["name"])])):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("span",be,[e.createElementVNode("span",{innerHTML:l.value.label},null,8,ye)])):(e.openBlock(),e.createElementBlock("span",he,e.toDisplayString(f.placeholder),1)),e.createElementVNode("span",ke,[e.createVNode(p,{class:"text-grey-400",name:"chevron-down","aria-hidden":"true"})])]}),_:1},8,["id","aria-labelledby","class"]),e.createVNode(e.Transition,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(g.ListboxOptions),{class:"absolute z-10 mt-1 w-full bg-white dark:bg-grey-700 dark:text-grey-50 shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.options,m=>(e.openBlock(),e.createBlock(e.unref(g.ListboxOption),{as:"template",key:m.id,value:m,disabled:m.disabled},{default:e.withCtx(({active:w,selected:V})=>[e.createElementVNode("li",{class:e.normalizeClass([w?"text-white bg-blue-500":"text-grey-900 dark:text-grey-50","cursor-default select-none relative py-2 pl-3 pr-12",{"opacity-50 bg-grey-100":m.disabled}])},[e.createElementVNode("div",Ce,[m.disabled&&f.disabledBadge?(e.openBlock(),e.createElementBlock("span",_e,e.toDisplayString(f.disabledBadge),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",{class:e.normalizeClass([V?"font-semibold":"font-normal","block truncate"])},[m.icon?(e.openBlock(),e.createBlock(p,{key:0,class:"inline-block mr-1",name:m.icon},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",{innerHTML:m.label},null,8,Be)],2),V?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([w?"text-blue-100":"text-blue-500","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(p,{name:"check",class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]),_:2},1032,["value","disabled"]))),128))]),_:1})]),_:1})])]),_:1},8,["model-value","disabled"]))}}),we={class:"animate-pulse"},xe={class:"flex items-center justify-between space-x-4"},Ee={key:0,class:"w-12 h-12 bg-current rounded-full shrink-0"},Ne={key:1,class:"w-full h-8 bg-current rounded-lg"},ze={key:0,class:"mt-6 space-y-2"},De={key:1,class:"w-1/3 h-10 mt-6 bg-current rounded-lg"},Se=e.defineComponent({__name:"Skeleton",props:{avatar:{type:Boolean,default:!1},title:{type:Boolean,default:!0},lines:{default:3},footer:{type:Boolean,default:!1}},setup(n){const o=n,r=new Array(o.lines).fill(void 0).map(()=>{const l=[4,5,6,8,10,16,24,32];return{margin:`mr-${l[Math.floor(Math.random()*l.length)]}`}});return(l,a)=>(e.openBlock(),e.createElementBlock("div",we,[e.createElementVNode("div",xe,[l.avatar?(e.openBlock(),e.createElementBlock("div",Ee)):e.createCommentVNode("",!0),l.title?(e.openBlock(),e.createElementBlock("div",Ne)):e.createCommentVNode("",!0)]),l.lines>0?(e.openBlock(),e.createElementBlock("div",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["h-4 bg-current rounded-lg",c.margin]),key:d},null,2))),128))])):e.createCommentVNode("",!0),l.footer?(e.openBlock(),e.createElementBlock("div",De)):e.createCommentVNode("",!0)]))}}),Le=e.defineComponent({__name:"Spinner",setup(n){return(o,r)=>(e.openBlock(),e.createBlock(e.unref(p),{class:"animate-spin",name:"circle-notch"}))}}),Pe={class:"sr-only"},$e=e.defineComponent({__name:"Switch",props:{id:{default:()=>D.v4()},label:{},modelValue:{type:Boolean},onLabel:{default:"on"},offLabel:{default:"off"}},emits:["update:modelValue","change"],setup(n,{emit:o}){const r=o,l=a=>{r("update:modelValue",a),r("change",a)};return(a,c)=>(e.openBlock(),e.createBlock(e.unref(g.Switch),{id:a.id,modelValue:a.modelValue,class:e.normalizeClass([a.modelValue?"bg-blue-700":"bg-grey-700","relative inline-flex items-center h-6 transition rounded-full w-14 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-grey-900 focus:ring-blue-300"]),"onUpdate:modelValue":l},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["absolute text-xs text-center text-white inset-x-2",a.modelValue?"pr-3":"pl-3"])},e.toDisplayString(a.modelValue===!0?a.onLabel:a.offLabel),3),e.createElementVNode("span",Pe,e.toDisplayString(a.label),1),e.createElementVNode("span",{class:e.normalizeClass([a.modelValue?"translate-x-9":"translate-x-1","inline-block w-4 h-4 transition bg-white rounded-full"])},null,2)]),_:1},8,["id","modelValue","class"]))}}),Me={class:"relative"},Ie=["disabled","value"],Te={inheritAttrs:!1},Fe=e.defineComponent({...Te,__name:"Textarea",props:{modelValue:{},size:{default:"medium"},isDisabled:{type:Boolean,default:!1},block:{type:Boolean}},emits:["update:modelValue"],setup(n,{expose:o,emit:r}){const l=n,a=r,{inputClasses:c,disabledClasses:d,textSizeClasses:b}=z(l),h=function(u){a("update:modelValue",(u==null?void 0:u.target).value)},y=e.ref(null);return o({focus:()=>{l.isDisabled||y.value.focus()}}),(u,f)=>(e.openBlock(),e.createElementBlock("div",Me,[e.createElementVNode("textarea",e.mergeProps({class:["mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded",[e.unref(c),e.unref(b),e.unref(d)]],disabled:u.isDisabled,value:u.modelValue??""},u.$attrs,{ref_key:"input",ref:y,cols:"56",rows:"8",onInput:h}),`
|
|
2
|
+
`,16,Ie)]))}});i.D9Button=Q,i.D9Checkbox=ee,i.D9Icon=p,i.D9Input=re,i.D9Label=de,i.D9Menu=fe,i.D9MenuLink=pe,i.D9Select=Ve,i.D9Skeleton=Se,i.D9Spinner=Le,i.D9Switch=$e,i.D9Textarea=Fe,i.brands=N,i.icons=A,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type ColorScheme = "light" | "dark" | "primary" | "danger";
|
|
2
|
+
export type Size = "small" | "medium" | "large";
|
|
3
|
+
export type PositionHorizontal = "left" | "right";
|
|
4
|
+
export type PositionVertical = "top" | "bottom";
|
|
5
|
+
export type PositionBoth = PositionHorizontal | PositionVertical | "center";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deck9/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0-next.1",
|
|
4
4
|
"description": "The UI components used in deck9 software applications.",
|
|
5
5
|
"author": "Philipp Reinking <philipp@deck9.co> (https://deck9.co)",
|
|
6
6
|
"scripts": {
|
|
@@ -12,40 +12,33 @@
|
|
|
12
12
|
"build-storybook": "storybook build"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
-
"dist"
|
|
16
|
-
"tailwind.config.js"
|
|
15
|
+
"dist"
|
|
17
16
|
],
|
|
18
17
|
"main": "./dist/src/ui.umd.js",
|
|
19
18
|
"module": "./dist/src/ui.mjs",
|
|
20
|
-
"types": "./dist/
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
21
20
|
"exports": {
|
|
22
21
|
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
23
|
"import": "./dist/src/ui.mjs",
|
|
24
24
|
"require": "./dist/src/ui.umd.js"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"vue": "^3.3.0"
|
|
29
|
+
},
|
|
27
30
|
"dependencies": {
|
|
28
|
-
"@deck9/tailwindcss-recursive-font-helper": "^1.0.1",
|
|
29
31
|
"@floating-ui/vue": "^1.0.4",
|
|
30
32
|
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|
|
31
33
|
"@fortawesome/free-brands-svg-icons": "^6.3.0",
|
|
32
|
-
"@fortawesome/free-regular-svg-icons": "^6.3.0",
|
|
33
34
|
"@fortawesome/free-solid-svg-icons": "^6.3.0",
|
|
34
35
|
"@fortawesome/vue-fontawesome": "^3.0.3",
|
|
35
36
|
"@headlessui/vue": "^1.7.11",
|
|
36
|
-
"@
|
|
37
|
-
"
|
|
38
|
-
"@tailwindcss/typography": "^0.5.9",
|
|
39
|
-
"@types/web": "^0.0.122",
|
|
40
|
-
"@types/web-bluetooth": "^0.0.20",
|
|
41
|
-
"@vueuse/core": "^10.6.1",
|
|
42
|
-
"react": "^18.2.0",
|
|
43
|
-
"react-dom": "^18.2.0",
|
|
44
|
-
"tailwindcss": "^3.2.7",
|
|
45
|
-
"uuid": "^9.0.1",
|
|
46
|
-
"vue": "^3.3.9"
|
|
37
|
+
"@vueuse/core": "^10.6.1 || ^11.0.0",
|
|
38
|
+
"uuid": "^11.1.1"
|
|
47
39
|
},
|
|
48
40
|
"devDependencies": {
|
|
41
|
+
"@deck9/tailwindcss-recursive-font-helper": "^1.0.1",
|
|
49
42
|
"@storybook/addon-a11y": "^7.6.17",
|
|
50
43
|
"@storybook/addon-actions": "^7.6.17",
|
|
51
44
|
"@storybook/addon-docs": "^7.6.17",
|
|
@@ -54,8 +47,10 @@
|
|
|
54
47
|
"@storybook/addon-mdx-gfm": "^7.6.17",
|
|
55
48
|
"@storybook/vue3": "^7.6.17",
|
|
56
49
|
"@storybook/vue3-vite": "^7.6.17",
|
|
50
|
+
"@tailwindcss/forms": "^0.5.7",
|
|
51
|
+
"@tailwindcss/typography": "^0.5.9",
|
|
57
52
|
"@types/lodash": "^4.14.202",
|
|
58
|
-
"@types/
|
|
53
|
+
"@types/web": "^0.0.122",
|
|
59
54
|
"@typescript-eslint/eslint-plugin": "^5.28.0",
|
|
60
55
|
"@typescript-eslint/parser": "^5.28.0",
|
|
61
56
|
"@vitejs/plugin-vue": "^4.5.0",
|
|
@@ -70,11 +65,15 @@
|
|
|
70
65
|
"eslint-plugin-storybook": "^0.6.15",
|
|
71
66
|
"eslint-plugin-vue": "^9.1.1",
|
|
72
67
|
"lodash": "^4.17.21",
|
|
68
|
+
"react": "^18.2.0",
|
|
69
|
+
"react-dom": "^18.2.0",
|
|
73
70
|
"storybook": "^7.6.17",
|
|
74
71
|
"storybook-dark-mode": "^3.0.3",
|
|
72
|
+
"tailwindcss": "^3.2.7",
|
|
75
73
|
"typescript": "^4.9.3",
|
|
76
74
|
"vite": "^5.0.2",
|
|
77
75
|
"vite-plugin-dts": "^3.6.3",
|
|
76
|
+
"vue": "^3.3.9",
|
|
78
77
|
"vue-tsc": "^1.8.22"
|
|
79
78
|
},
|
|
80
79
|
"browserslist": [
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { ColorScheme, Size } from "../types/types";
|
|
2
|
-
interface ButtonProps {
|
|
3
|
-
label: string;
|
|
4
|
-
size?: Size;
|
|
5
|
-
color?: ColorScheme;
|
|
6
|
-
isLoading?: boolean;
|
|
7
|
-
isDisabled?: boolean;
|
|
8
|
-
icon?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ButtonProps>, {
|
|
11
|
-
size: string;
|
|
12
|
-
color: string;
|
|
13
|
-
isLoading: boolean;
|
|
14
|
-
isDisabled: boolean;
|
|
15
|
-
icon: string;
|
|
16
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
-
onClick: () => void;
|
|
18
|
-
onClickSplit: () => void;
|
|
19
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ButtonProps>, {
|
|
20
|
-
size: string;
|
|
21
|
-
color: string;
|
|
22
|
-
isLoading: boolean;
|
|
23
|
-
isDisabled: boolean;
|
|
24
|
-
icon: string;
|
|
25
|
-
}>>> & {
|
|
26
|
-
onOnClick?: (() => any) | undefined;
|
|
27
|
-
onOnClickSplit?: (() => any) | undefined;
|
|
28
|
-
}, {
|
|
29
|
-
icon: string;
|
|
30
|
-
size: Size;
|
|
31
|
-
color: ColorScheme;
|
|
32
|
-
isLoading: boolean;
|
|
33
|
-
isDisabled: boolean;
|
|
34
|
-
}, {}>;
|
|
35
|
-
export default _default;
|
|
36
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
37
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
38
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
39
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
40
|
-
} : {
|
|
41
|
-
type: import('vue').PropType<T[K]>;
|
|
42
|
-
required: true;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
type __VLS_WithDefaults<P, D> = {
|
|
46
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
47
|
-
default: D[K];
|
|
48
|
-
}> : P[K];
|
|
49
|
-
};
|
|
50
|
-
type __VLS_Prettify<T> = {
|
|
51
|
-
[K in keyof T]: T[K];
|
|
52
|
-
} & {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as D9SplitButton } from "./SplitButton.vue";
|
package/tailwind.config.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
const defaultTheme = require("tailwindcss/defaultTheme");
|
|
3
|
-
const colors = require("tailwindcss/colors");
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
content: [
|
|
7
|
-
"./src/**/*.{vue,ts,mdx}",
|
|
8
|
-
"./src/**/*.stories.{ts,tsx}",
|
|
9
|
-
],
|
|
10
|
-
|
|
11
|
-
darkMode: "class",
|
|
12
|
-
|
|
13
|
-
theme: {
|
|
14
|
-
extend: {
|
|
15
|
-
colors: {
|
|
16
|
-
black: "#050505",
|
|
17
|
-
white: "#ffffff",
|
|
18
|
-
grey: colors.slate,
|
|
19
|
-
red: colors.red,
|
|
20
|
-
yellow: colors.yellow,
|
|
21
|
-
blue: colors.blue,
|
|
22
|
-
},
|
|
23
|
-
container: {
|
|
24
|
-
center: true,
|
|
25
|
-
padding: "1rem",
|
|
26
|
-
},
|
|
27
|
-
fontFamily: {
|
|
28
|
-
sans: ["Recursive var", ...defaultTheme.fontFamily.sans],
|
|
29
|
-
},
|
|
30
|
-
opacity: {
|
|
31
|
-
10: "0.1",
|
|
32
|
-
20: "0.2",
|
|
33
|
-
30: "0.3",
|
|
34
|
-
40: "0.4",
|
|
35
|
-
50: "0.5",
|
|
36
|
-
60: "0.6",
|
|
37
|
-
70: "0.7",
|
|
38
|
-
80: "0.8",
|
|
39
|
-
90: "0.9",
|
|
40
|
-
},
|
|
41
|
-
keyframes: {
|
|
42
|
-
spinner: {
|
|
43
|
-
"0%, 70%, 100%": { transform: "scale3D(1,1,1);" },
|
|
44
|
-
"35%": { transform: "scale3D(0,0,1);" },
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
animation: {
|
|
48
|
-
spinner: "spinner 1.3s ease-in-out infinite",
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
plugins: [
|
|
53
|
-
require("@tailwindcss/forms"),
|
|
54
|
-
require("@tailwindcss/typography"),
|
|
55
|
-
require("@deck9/tailwindcss-recursive-font-helper"),
|
|
56
|
-
],
|
|
57
|
-
};
|