dendelion-ui 0.0.16 → 0.0.17
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/dendelion-ui.cjs.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var P;function re(){return P||(P=1,function(t){(function(){var n={}.hasOwnProperty;function o(){for(var a="",u=0;u<arguments.length;u++){var d=arguments[u];d&&(a=s(a,c(d)))}return a}function c(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return o.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var u="";for(var d in a)n.call(a,d)&&a[d]&&(u=s(u,d));return u}function s(a,u){return u?a?a+" "+u:a+u:a}t.exports?(o.default=o,t.exports=o):window.classNames=o})()}(R)),R.exports}var ae=re();const z=Z(ae),se=["type","disabled"],oe={class:"group-[.is-loading]:text-transparent"},ce=e.defineComponent({__name:"Button",props:{type:{default:"button"},loading:{type:Boolean},color:{default:$.Neutral},soft:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},disabled:{type:Boolean},click:{}},setup(t){const n=t,o=e.computed(()=>z("btn","group",K.toClassName(n.color),n.soft?"btn-soft":"",n.outline?"btn-outline":"",n.loading?"is-loading":"",n.disabled?"disabled":""));return(c,s)=>(e.openBlock(),e.createElementBlock("button",{onClick:s[0]||(s[0]=a=>c.click?c.click:void 0),class:e.normalizeClass(o.value),type:c.type,disabled:c.disabled||c.loading},[s[1]||(s[1]=e.createElementVNode("span",{class:"loading loading-spinner loading-md absolute hidden group-[.is-loading]:block"},null,-1)),e.createElementVNode("span",oe,[e.renderSlot(c.$slots,"default")])],10,se))}}),O=(t,n)=>{const o=t.__vccOpts||t;for(const[c,s]of n)o[c]=s;return o},le={};function ue(t,n){return e.openBlock(),e.createElementBlock("button")}const ie=O(le,[["render",ue]]),de=e.defineComponent({__name:"Card",props:{backgroundColor:{default:$.Primary},shadow:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},rounded:{type:Boolean},roundedSize:{}},setup(t){const n=t,o=e.ref(z("card",I.toClassName(n.backgroundColor),n.shadow?"shadow-lg":"",n.fullWidth?"w-full":"",n.rounded&&!n.roundedSize?"rounded":n.roundedSize?j.toClassName(n.roundedSize):""));return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.value)},[e.renderSlot(c.$slots,"default")],2))}}),fe={},pe={class:"card-body"};function me(t,n){return e.openBlock(),e.createElementBlock("div",pe,[e.renderSlot(t.$slots,"default")])}const be=O(fe,[["render",me]]),ve=e.defineComponent({__name:"CardTitle",props:{is:{default:"h1"},text:{default:""}},setup(t){return(n,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.is),{class:"card-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.text),1)]),_:1}))}}),ge=e.defineComponent({__name:"Container",props:{container:{type:Boolean,default:!0},padding:{type:Boolean,default:!0}},setup(t){const n=t,o=e.ref([n.container?"container":"",n.padding?"p-6":""]);return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.value)},[e.renderSlot(c.$slots,"default")],2))}});var D={},W={},q;function J(){return q||(q=1,function(t){t.__esModule=!0,t.default=s;var n=/[\u0300-\u036f]/g,o=/ł/g,c=/ñ/g;function s(a){return a.toLowerCase().normalize("NFD").replace(n,"").replace(o,"l").replace(c,"n").trim()}}(W)),W}var N={},A;function U(){if(A)return N;A=1,N.__esModule=!0,N.aggressiveFuzzyMatch=S,N.createFuzzySearchImpl=h,N.experimentalSmartFuzzyMatch=M,N.fuzzyMatchImpl=f;var t=n(J());function n(r){return r&&r.__esModule?r:{default:r}}var o=Number.MAX_SAFE_INTEGER,c=function(l,i){return l.score-i.score},s=function(l,i){return l[0]-i[0]},a=new Set(` []()-–—'"“”`.split(""));function u(r){return a.has(r)}function d(r,l,i,y,p,v,b){if(r===y)return[0,[[0,r.length-1]]];var m=y.length,g=l.length,_=p.length;if(l===p)return[.1,[[0,g-1]]];if(l.startsWith(p))return[.5,[[0,_-1]]];var x=r.indexOf(y);if(x>-1&&u(r[x-1]))return[.9,[[x,x+m-1]]];var k=l.indexOf(p);if(k>-1&&u(l[k-1]))return[1,[[k,k+m-1]]];var B=v.length;if(B>1&&v.every(function(E){return i.has(E)})){var C=1.5+B*.2;return[C,v.map(function(E){var w=l.indexOf(E);return[w,w+E.length-1]}).sort(s)]}return k>-1?[2,[[k,k+m-1]]]:b==="aggressive"?S(l,p):b==="smart"?M(l,p):null}function S(r,l){for(var i=r.length,y=l.length,p=0,v=l[p],b=[],m=-1,g=-2,_=0;_<i;_+=1)if(r[_]===v){if(_!==g+1&&(m>=0&&b.push([m,g]),m=_),g=_,p+=1,p===y)return b.push([m,g]),V(b,r);v=l[p]}return null}function M(r,l){for(var i=r.length,y=[],p=0,v=l[p],b=-1,m=-2;;){var g=r.indexOf(v,m+1);if(g===-1)break;if(g===0||u(r[g-1]))b=g;else{var _=l.length-p,x=r.length-g,k=Math.min(3,_,x),B=l.slice(p,p+k);if(r.slice(g,g+k)===B)b=g;else{m+=1;continue}}for(m=b;m<i&&r[m]===v;m+=1)p+=1,v=l[p];if(m-=1,y.push([b,m]),p===l.length)return V(y,r)}return null}function V(r,l){var i=2;return r.forEach(function(y){var p=y[0],v=y[1],b=v-p+1,m=p===0||l[p]===" "||l[p-1]===" ",g=v===l.length-1||l[v]===" "||l[v+1]===" ",_=m&&g;_?i+=.2:m?i+=.4:b>=3?i+=.8:i+=1.6}),[i,r]}function f(r,l){var i=(0,t.default)(l),y=i.split(" "),p=(0,t.default)(r),v=new Set(p.split(" ")),b=d(r,p,v,l,i,y,"smart");return b?{item:r,score:b[0],matches:[b[1]]}:null}function h(r,l){var i=l.strategy,y=i===void 0?"aggressive":i,p=l.getText,v=r.map(function(b){var m;if(p)m=p(b);else{var g=l.key?b[l.key]:b;m=[g]}var _=m.map(function(x){var k=x||"",B=(0,t.default)(k),C=new Set(B.split(" "));return[k,B,C]});return[b,_]});return function(b){var m=[],g=(0,t.default)(b),_=g.split(" ");return g.length?(v.forEach(function(x){for(var k=x[0],B=x[1],C=o,E=[],w=0,Y=B.length;w<Y;w+=1){var L=B[w],Q=L[0],ee=L[1],te=L[2],F=d(Q,ee,te,b,g,_,y);F?(C=Math.min(C,F[0]),E.push(F[1])):E.push(null)}C<o&&m.push({item:k,score:C,matches:E})}),m.sort(c),m):[]}}return N}var X;function he(){return X||(X=1,function(t){t.__esModule=!0,t.default=c,t.fuzzyMatch=s;var n=o(J());t.normalizeText=n.default;function o(a){return a&&a.__esModule?a:{default:a}}function c(a,u){return u===void 0&&(u={}),U().createFuzzySearchImpl(a,u)}function s(a,u){return U().fuzzyMatchImpl(a,u)}}(D)),D}var ye=he();const _e=Z(ye),ke={key:0},xe=["colspan"],Be=["onClick"],Se=["innerHTML"],Ce=e.defineComponent({__name:"Table",props:{zebra:{type:Boolean,default:!1},pinRows:{type:Boolean,default:!1},pinCols:{type:Boolean,default:!1},size:{default:T.MD},columns:{},dataSource:{},ajax:{},searchValue:{},searchFunction:{},onRowClick:{}},setup(t){const n=e.ref([]),o=e.ref([]),c=e.ref(null),s=t,a=e.ref(z("table",G.toClassName(s.size),{"table-zebra":s.zebra,"table-pin-rows":s.pinRows,"table-pin-cols ":s.pinCols})),u=(f,h)=>{s.onRowClick&&s.onRowClick(f,h)},d=(f,h)=>String(!f||typeof f!="object"?f:h.split(".").reduce((r,l)=>r&&(typeof r=="object"?r[l]:r),f)),S=(f,h)=>h.render===void 0?{}:h.render(d(f,h.data),f).props,M=f=>f&&typeof f=="object"&&"then"in f?e.defineAsyncComponent(()=>f):typeof f=="function"?e.defineAsyncComponent(f):f;e.onMounted(()=>{n.value=s.dataSource,o.value=s.dataSource}),e.watch(()=>s.dataSource,f=>{n.value=f,o.value=f},{immediate:!0}),e.watch(()=>s.searchValue,f=>{if(s.searchFunction){o.value=s.searchFunction(f??"");return}o.value=f?V(f):n.value},{immediate:!0});const V=f=>{const h=[];return n.value.length>0?(Object.keys(n.value[0]).forEach(l=>{const i=n.value.map(v=>d(v,l)),p=_e(i)(f);for(const v of p){const b=n.value.filter(m=>d(m,l)===v.item);h.push(...b)}}),h):[]};return(f,h)=>(e.openBlock(),e.createElementBlock("table",{ref_key:"table",ref:c,class:e.normalizeClass(a.value)},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,r=>(e.openBlock(),e.createElementBlock("th",{key:r.title},e.toDisplayString(r.title),1))),128))])]),e.createElementVNode("tbody",null,[o.value.length===0?(e.openBlock(),e.createElementBlock("tr",ke,[e.createElementVNode("td",{colspan:s.columns.length},"No data found",8,xe)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(o.value,(r,l)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass(s.onRowClick?"hover":""),key:String(r),onClick:i=>u(r,l)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,i=>(e.openBlock(),e.createElementBlock("td",{key:i.title},[i.render?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d(r,i.data)),1)],64)),typeof i.render=="function"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[typeof i.render(d(r,i.data),r)=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:i.render(d(r,i.data),r)},null,8,Se)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M(i.render(d(r,i.data),r).component)),e.mergeProps({key:1,ref_for:!0},S(r,i)),null,16))],64)):e.createCommentVNode("",!0)]))),128))],10,Be))),128))])],2))}}),Ee=e.defineComponent({__name:"Stepper",props:{value:{}},emits:["update:value"],setup(t,{expose:n,emit:o}){const c=t,s=e.ref(c.value),a=o,u=d=>{s.value=d,a("update:value",d)};return e.provide("stepper",{value:s,updateValue:u}),e.watch(()=>c.value,d=>{s.value=d}),n({updateValue:u}),(d,S)=>e.renderSlot(d.$slots,"default",{updateValue:u})}}),Ne=e.defineComponent({__name:"Step",props:{value:{}},setup(t){const n=t,o=e.inject("stepper"),c=e.ref("");return e.watch(()=>o?.value.value,s=>{s&&n.value&&(c.value=Number(s)>=Number(n.value)?"step-primary":"")}),e.onMounted(()=>{o&&(c.value=o.value.value===n.value?"step-primary":"",Number(o.value.value)>=Number(n.value)&&(c.value="step-primary"))}),(s,a)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["step",c.value])},[e.renderSlot(s.$slots,"default")],2))}}),we={},ze={class:"steps"};function Me(t,n){return e.openBlock(),e.createElementBlock("ul",ze,[e.renderSlot(t.$slots,"default")])}const Ve=O(we,[["render",Me]]),$e={key:0},Te=e.defineComponent({__name:"StepPanels",setup(t){const n=e.inject("stepper");return(o,c)=>(e.openBlock(),e.createBlock(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[e.unref(n)?.value?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(o.$slots,"default",{currentStep:e.unref(n)?.value})])):e.createCommentVNode("",!0)]),_:3}))}}),Le={key:0},Fe=e.defineComponent({__name:"StepPanel",props:{value:{}},setup(t,{expose:n}){const o=e.computed(()=>c?.value.value),c=e.inject("stepper"),s=a=>{c&&c.updateValue(a.toString())};return n({activateCallback:s}),(a,u)=>a.value===o.value?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(a.$slots,"default",{activateCallback:s})])):e.createCommentVNode("",!0)}}),Re={key:0,method:"dialog"},De=e.defineComponent({__name:"Modal",props:{closeButton:{type:Boolean,default:!0},overflow:{type:Boolean,default:!1},closeButtonSize:{default:T.SM},extraBoxClasses:{}},emits:["close"],setup(t,{expose:n,emit:o}){const c=e.ref(null),s=o,a=t,u=e.ref(z("modal-box",a.extraBoxClasses,{"overflow-visible":a.overflow})),d=e.ref(z("modal")),S=e.ref(z("btn",H.toClassName(a.closeButtonSize),"btn-circle","btn-ghost","absolute","right-2","top-2"));return n({showModal:()=>{c.value?.showModal()},closeModal:()=>{c.value?.close()}}),(f,h)=>(e.openBlock(),e.createElementBlock("dialog",{ref_key:"modal",ref:c,class:e.normalizeClass([d.value,f.$attrs.class]),"aria-modal":"true","aria-hidden":"true",role:"dialog",onClose:h[0]||(h[0]=r=>s("close",r))},[e.createElementVNode("div",{class:e.normalizeClass(u.value)},[f.closeButton?(e.openBlock(),e.createElementBlock("form",Re,[e.createElementVNode("button",{class:e.normalizeClass(S.value)},"✕",2)])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"default")],2),h[1]||(h[1]=e.createElementVNode("form",{method:"dialog",class:"modal-backdrop"},[e.createElementVNode("button",null,"close")],-1))],34))}}),We={class:"hidden w-full max-w-sm lg:flex"},Oe={class:"relative mx-3 w-full"},Pe={class:"relative w-full max-w-full"},qe=["value"],Ae=e.defineComponent({__name:"SearchBar",props:["modelValue"],emits:["update:modelValue"],setup(t,{emit:n}){const o=t,c=e.ref(null),s=n,a=u=>{(u.ctrlKey||u.metaKey)&&u.key.toLowerCase()==="k"&&(u.preventDefault(),c.value&&c.value.focus())};return e.onMounted(()=>{document.addEventListener("keydown",a)}),e.onUnmounted(()=>{document.removeEventListener("keydown",a)}),(u,d)=>(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("label",Oe,[d[1]||(d[1]=e.createElementVNode("svg",{class:"pointer-events-none absolute z-10 my-3.5 ms-4 text-base-content opacity-60","aria-hidden":"true",width:"16",height:"16",viewBox:"0.48 0.48 23.04 23.04",fill:"currentColor"},[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElementVNode("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})],-1)),e.createElementVNode("div",Pe,[e.createElementVNode("form",null,[e.createElementVNode("input",{ref_key:"searchInput",ref:c,type:"search",placeholder:"Zoeken...",value:o.modelValue,onInput:d[0]||(d[0]=S=>s("update:modelValue",S.target.value)),class:"color-[inherit] w-full rounded-xl border-[2px] border-solid border-transparent bg-transparent px-3 py-2 ps-10 focus:border-[2px] focus:border-base-200 focus:outline-none"},null,40,qe)])]),d[2]||(d[2]=e.createElementVNode("div",{class:"pointer-events-none absolute end-10 top-2.5 hidden gap-1 opacity-50 lg:flex rtl:flex-row-reverse"},[e.createElementVNode("kbd",{class:"kbd kbd-sm"},"ctrl"),e.createElementVNode("kbd",{class:"kbd kbd-sm"},"K")],-1))])]))}}),Ue=["bg-primary","bg-primary-content","bg-secondary","bg-secondary-content","bg-accent","bg-accent-content","bg-neutral","bg-neutral-content","bg-base-100","bg-base-200","bg-base-300","bg-base-content","bg-info","bg-info-content","bg-success","bg-success-content","bg-warning","bg-warning-content","bg-error","bg-error-content","btn-primary","btn-primary-content","btn-secondary","btn-secondary-content","btn-accent","btn-accent-content","btn-neutral","btn-neutral-content","btn-base-100","btn-base-200","btn-base-300","btn-base-content","btn-info","btn-info-content","btn-success","btn-success-content","btn-warning","btn-warning-content","btn-error","btn-error-content","text-primary","text-primary-content","text-secondary","text-secondary-content","text-accent","text-accent-content","text-neutral","text-neutral-content","text-base-100","text-base-200","text-base-300","text-base-content","text-info","text-info-content","text-success","text-success-content","text-warning","text-warning-content","text-error","text-error-content","text-transparent","step","steps","modal","modal-box","btn","btn-sm","btn-circle","btn-ghost","absolute","right-2","top-2","shadow-lg","w-full","rounded-xs","rounded-sm","rounded-md","rounded-lg","rounded-xl","rounded-2xl","rounded-3xl","hidden","block"];exports.BackgroundColorUtils=I;exports.Button=ce;exports.ButtonColorUtils=K;exports.ButtonSizeUtils=H;exports.Card=de;exports.CardBody=be;exports.CardTitle=ve;exports.Color=$;exports.Container=ge;exports.Modal=De;exports.RoundedSizeUtils=j;exports.SearchBar=Ae;exports.SimpleButton=ie;exports.Size=T;exports.Step=Ne;exports.StepList=Ve;exports.StepPanel=Fe;exports.StepPanels=Te;exports.Stepper=Ee;exports.Table=Ce;exports.TableSizeUtils=G;exports.TextColorUtils=ne;exports.dendelionSafeList=Ue;
|
|
5
|
+
*/var P;function re(){return P||(P=1,function(t){(function(){var n={}.hasOwnProperty;function o(){for(var a="",i=0;i<arguments.length;i++){var d=arguments[i];d&&(a=s(a,c(d)))}return a}function c(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return o.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var i="";for(var d in a)n.call(a,d)&&a[d]&&(i=s(i,d));return i}function s(a,i){return i?a?a+" "+i:a+i:a}t.exports?(o.default=o,t.exports=o):window.classNames=o})()}(R)),R.exports}var ae=re();const z=Z(ae),se=["type","disabled"],oe={class:"group-[.is-loading]:text-transparent"},ce=e.defineComponent({__name:"Button",props:{type:{default:"button"},loading:{type:Boolean},color:{default:$.Neutral},soft:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},disabled:{type:Boolean},click:{}},setup(t){const n=t,o=e.computed(()=>z("btn","group",K.toClassName(n.color),n.soft?"btn-soft":"",n.outline?"btn-outline":"",n.loading?"is-loading":"",n.disabled?"disabled":""));return(c,s)=>(e.openBlock(),e.createElementBlock("button",{onClick:s[0]||(s[0]=a=>c.click?c.click:void 0),class:e.normalizeClass(o.value),type:c.type,disabled:c.disabled||c.loading},[s[1]||(s[1]=e.createElementVNode("span",{class:"loading loading-spinner loading-md absolute hidden group-[.is-loading]:block"},null,-1)),e.createElementVNode("span",oe,[e.renderSlot(c.$slots,"default")])],10,se))}}),O=(t,n)=>{const o=t.__vccOpts||t;for(const[c,s]of n)o[c]=s;return o},le={};function ue(t,n){return e.openBlock(),e.createElementBlock("button")}const ie=O(le,[["render",ue]]),de=e.defineComponent({__name:"Card",props:{backgroundColor:{default:$.Primary},shadow:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},rounded:{type:Boolean},roundedSize:{}},setup(t){const n=t,o=e.ref(z("card",I.toClassName(n.backgroundColor),n.shadow?"shadow-lg":"",n.fullWidth?"w-full":"",n.rounded&&!n.roundedSize?"rounded":n.roundedSize?j.toClassName(n.roundedSize):""));return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.value)},[e.renderSlot(c.$slots,"default")],2))}}),pe={},fe={class:"card-body"};function me(t,n){return e.openBlock(),e.createElementBlock("div",fe,[e.renderSlot(t.$slots,"default")])}const be=O(pe,[["render",me]]),ve=e.defineComponent({__name:"CardTitle",props:{is:{default:"h1"},text:{default:""}},setup(t){return(n,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.is),{class:"card-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.text),1)]),_:1}))}}),ge=e.defineComponent({__name:"Container",props:{container:{type:Boolean,default:!0},padding:{type:Boolean,default:!0}},setup(t){const n=t,o=e.ref([n.container?"container":"",n.padding?"p-6":""]);return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.value)},[e.renderSlot(c.$slots,"default")],2))}});var D={},W={},q;function J(){return q||(q=1,function(t){t.__esModule=!0,t.default=s;var n=/[\u0300-\u036f]/g,o=/ł/g,c=/ñ/g;function s(a){return a.toLowerCase().normalize("NFD").replace(n,"").replace(o,"l").replace(c,"n").trim()}}(W)),W}var N={},A;function U(){if(A)return N;A=1,N.__esModule=!0,N.aggressiveFuzzyMatch=S,N.createFuzzySearchImpl=h,N.experimentalSmartFuzzyMatch=M,N.fuzzyMatchImpl=p;var t=n(J());function n(r){return r&&r.__esModule?r:{default:r}}var o=Number.MAX_SAFE_INTEGER,c=function(l,u){return l.score-u.score},s=function(l,u){return l[0]-u[0]},a=new Set(` []()-–—'"“”`.split(""));function i(r){return a.has(r)}function d(r,l,u,y,f,v,b){if(r===y)return[0,[[0,r.length-1]]];var m=y.length,g=l.length,_=f.length;if(l===f)return[.1,[[0,g-1]]];if(l.startsWith(f))return[.5,[[0,_-1]]];var x=r.indexOf(y);if(x>-1&&i(r[x-1]))return[.9,[[x,x+m-1]]];var k=l.indexOf(f);if(k>-1&&i(l[k-1]))return[1,[[k,k+m-1]]];var B=v.length;if(B>1&&v.every(function(E){return u.has(E)})){var C=1.5+B*.2;return[C,v.map(function(E){var w=l.indexOf(E);return[w,w+E.length-1]}).sort(s)]}return k>-1?[2,[[k,k+m-1]]]:b==="aggressive"?S(l,f):b==="smart"?M(l,f):null}function S(r,l){for(var u=r.length,y=l.length,f=0,v=l[f],b=[],m=-1,g=-2,_=0;_<u;_+=1)if(r[_]===v){if(_!==g+1&&(m>=0&&b.push([m,g]),m=_),g=_,f+=1,f===y)return b.push([m,g]),V(b,r);v=l[f]}return null}function M(r,l){for(var u=r.length,y=[],f=0,v=l[f],b=-1,m=-2;;){var g=r.indexOf(v,m+1);if(g===-1)break;if(g===0||i(r[g-1]))b=g;else{var _=l.length-f,x=r.length-g,k=Math.min(3,_,x),B=l.slice(f,f+k);if(r.slice(g,g+k)===B)b=g;else{m+=1;continue}}for(m=b;m<u&&r[m]===v;m+=1)f+=1,v=l[f];if(m-=1,y.push([b,m]),f===l.length)return V(y,r)}return null}function V(r,l){var u=2;return r.forEach(function(y){var f=y[0],v=y[1],b=v-f+1,m=f===0||l[f]===" "||l[f-1]===" ",g=v===l.length-1||l[v]===" "||l[v+1]===" ",_=m&&g;_?u+=.2:m?u+=.4:b>=3?u+=.8:u+=1.6}),[u,r]}function p(r,l){var u=(0,t.default)(l),y=u.split(" "),f=(0,t.default)(r),v=new Set(f.split(" ")),b=d(r,f,v,l,u,y,"smart");return b?{item:r,score:b[0],matches:[b[1]]}:null}function h(r,l){var u=l.strategy,y=u===void 0?"aggressive":u,f=l.getText,v=r.map(function(b){var m;if(f)m=f(b);else{var g=l.key?b[l.key]:b;m=[g]}var _=m.map(function(x){var k=x||"",B=(0,t.default)(k),C=new Set(B.split(" "));return[k,B,C]});return[b,_]});return function(b){var m=[],g=(0,t.default)(b),_=g.split(" ");return g.length?(v.forEach(function(x){for(var k=x[0],B=x[1],C=o,E=[],w=0,Y=B.length;w<Y;w+=1){var L=B[w],Q=L[0],ee=L[1],te=L[2],F=d(Q,ee,te,b,g,_,y);F?(C=Math.min(C,F[0]),E.push(F[1])):E.push(null)}C<o&&m.push({item:k,score:C,matches:E})}),m.sort(c),m):[]}}return N}var X;function he(){return X||(X=1,function(t){t.__esModule=!0,t.default=c,t.fuzzyMatch=s;var n=o(J());t.normalizeText=n.default;function o(a){return a&&a.__esModule?a:{default:a}}function c(a,i){return i===void 0&&(i={}),U().createFuzzySearchImpl(a,i)}function s(a,i){return U().fuzzyMatchImpl(a,i)}}(D)),D}var ye=he();const _e=Z(ye),ke={key:0},xe=["colspan"],Be=["onClick"],Se=["innerHTML"],Ce=e.defineComponent({__name:"Table",props:{zebra:{type:Boolean,default:!1},pinRows:{type:Boolean,default:!1},pinCols:{type:Boolean,default:!1},size:{default:T.MD},columns:{},dataSource:{},ajax:{},searchValue:{},searchFunction:{},onRowClick:{}},setup(t){const n=e.ref([]),o=e.ref([]),c=e.ref(null),s=t,a=e.ref(z("table",G.toClassName(s.size),{"table-zebra":s.zebra,"table-pin-rows":s.pinRows,"table-pin-cols ":s.pinCols})),i=(p,h)=>{s.onRowClick&&s.onRowClick(p,h)},d=(p,h)=>String(!p||typeof p!="object"?p:h.split(".").reduce((r,l)=>r&&(typeof r=="object"?r[l]:r),p)),S=(p,h)=>h.render===void 0?{}:h.render(d(p,h.data),p).props,M=p=>(console.log("getComponent",p),p&&typeof p=="object"&&"then"in p?e.defineAsyncComponent(()=>p):typeof p=="function"?e.defineAsyncComponent(p):p);e.onMounted(()=>{n.value=s.dataSource,o.value=s.dataSource}),e.watch(()=>s.dataSource,p=>{n.value=p,o.value=p},{immediate:!0}),e.watch(()=>s.searchValue,p=>{if(s.searchFunction){o.value=s.searchFunction(p??"");return}o.value=p?V(p):n.value},{immediate:!0});const V=p=>{const h=[];return n.value.length>0?(Object.keys(n.value[0]).forEach(l=>{const u=n.value.map(v=>d(v,l)),f=_e(u)(p);for(const v of f){const b=n.value.filter(m=>d(m,l)===v.item);h.push(...b)}}),h):[]};return(p,h)=>(e.openBlock(),e.createElementBlock("table",{ref_key:"table",ref:c,class:e.normalizeClass(a.value)},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,r=>(e.openBlock(),e.createElementBlock("th",{key:r.title},e.toDisplayString(r.title),1))),128))])]),e.createElementVNode("tbody",null,[o.value.length===0?(e.openBlock(),e.createElementBlock("tr",ke,[e.createElementVNode("td",{colspan:s.columns.length},"No data found",8,xe)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(o.value,(r,l)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass(s.onRowClick?"hover":""),key:String(r),onClick:u=>i(r,l)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,u=>(e.openBlock(),e.createElementBlock("td",{key:u.title},[u.render?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d(r,u.data)),1)],64)),typeof u.render=="function"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[typeof u.render(d(r,u.data),r)=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:u.render(d(r,u.data),r)},null,8,Se)):e.isVNode(u.render(d(r,u.data),r))?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.render(d(r,u.data),r)),{key:1})):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M(u.render(d(r,u.data),r).component)),e.mergeProps({key:2,ref_for:!0},S(r,u)),null,16))],64)):e.createCommentVNode("",!0)]))),128))],10,Be))),128))])],2))}}),Ee=e.defineComponent({__name:"Stepper",props:{value:{}},emits:["update:value"],setup(t,{expose:n,emit:o}){const c=t,s=e.ref(c.value),a=o,i=d=>{s.value=d,a("update:value",d)};return e.provide("stepper",{value:s,updateValue:i}),e.watch(()=>c.value,d=>{s.value=d}),n({updateValue:i}),(d,S)=>e.renderSlot(d.$slots,"default",{updateValue:i})}}),Ne=e.defineComponent({__name:"Step",props:{value:{}},setup(t){const n=t,o=e.inject("stepper"),c=e.ref("");return e.watch(()=>o?.value.value,s=>{s&&n.value&&(c.value=Number(s)>=Number(n.value)?"step-primary":"")}),e.onMounted(()=>{o&&(c.value=o.value.value===n.value?"step-primary":"",Number(o.value.value)>=Number(n.value)&&(c.value="step-primary"))}),(s,a)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["step",c.value])},[e.renderSlot(s.$slots,"default")],2))}}),we={},ze={class:"steps"};function Me(t,n){return e.openBlock(),e.createElementBlock("ul",ze,[e.renderSlot(t.$slots,"default")])}const Ve=O(we,[["render",Me]]),$e={key:0},Te=e.defineComponent({__name:"StepPanels",setup(t){const n=e.inject("stepper");return(o,c)=>(e.openBlock(),e.createBlock(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[e.unref(n)?.value?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(o.$slots,"default",{currentStep:e.unref(n)?.value})])):e.createCommentVNode("",!0)]),_:3}))}}),Le={key:0},Fe=e.defineComponent({__name:"StepPanel",props:{value:{}},setup(t,{expose:n}){const o=e.computed(()=>c?.value.value),c=e.inject("stepper"),s=a=>{c&&c.updateValue(a.toString())};return n({activateCallback:s}),(a,i)=>a.value===o.value?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(a.$slots,"default",{activateCallback:s})])):e.createCommentVNode("",!0)}}),Re={key:0,method:"dialog"},De=e.defineComponent({__name:"Modal",props:{closeButton:{type:Boolean,default:!0},overflow:{type:Boolean,default:!1},closeButtonSize:{default:T.SM},extraBoxClasses:{}},emits:["close"],setup(t,{expose:n,emit:o}){const c=e.ref(null),s=o,a=t,i=e.ref(z("modal-box",a.extraBoxClasses,{"overflow-visible":a.overflow})),d=e.ref(z("modal")),S=e.ref(z("btn",H.toClassName(a.closeButtonSize),"btn-circle","btn-ghost","absolute","right-2","top-2"));return n({showModal:()=>{c.value?.showModal()},closeModal:()=>{c.value?.close()}}),(p,h)=>(e.openBlock(),e.createElementBlock("dialog",{ref_key:"modal",ref:c,class:e.normalizeClass([d.value,p.$attrs.class]),"aria-modal":"true","aria-hidden":"true",role:"dialog",onClose:h[0]||(h[0]=r=>s("close",r))},[e.createElementVNode("div",{class:e.normalizeClass(i.value)},[p.closeButton?(e.openBlock(),e.createElementBlock("form",Re,[e.createElementVNode("button",{class:e.normalizeClass(S.value)},"✕",2)])):e.createCommentVNode("",!0),e.renderSlot(p.$slots,"default")],2),h[1]||(h[1]=e.createElementVNode("form",{method:"dialog",class:"modal-backdrop"},[e.createElementVNode("button",null,"close")],-1))],34))}}),We={class:"hidden w-full max-w-sm lg:flex"},Oe={class:"relative mx-3 w-full"},Pe={class:"relative w-full max-w-full"},qe=["value"],Ae=e.defineComponent({__name:"SearchBar",props:["modelValue"],emits:["update:modelValue"],setup(t,{emit:n}){const o=t,c=e.ref(null),s=n,a=i=>{(i.ctrlKey||i.metaKey)&&i.key.toLowerCase()==="k"&&(i.preventDefault(),c.value&&c.value.focus())};return e.onMounted(()=>{document.addEventListener("keydown",a)}),e.onUnmounted(()=>{document.removeEventListener("keydown",a)}),(i,d)=>(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("label",Oe,[d[1]||(d[1]=e.createElementVNode("svg",{class:"pointer-events-none absolute z-10 my-3.5 ms-4 text-base-content opacity-60","aria-hidden":"true",width:"16",height:"16",viewBox:"0.48 0.48 23.04 23.04",fill:"currentColor"},[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElementVNode("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})],-1)),e.createElementVNode("div",Pe,[e.createElementVNode("form",null,[e.createElementVNode("input",{ref_key:"searchInput",ref:c,type:"search",placeholder:"Zoeken...",value:o.modelValue,onInput:d[0]||(d[0]=S=>s("update:modelValue",S.target.value)),class:"color-[inherit] w-full rounded-xl border-[2px] border-solid border-transparent bg-transparent px-3 py-2 ps-10 focus:border-[2px] focus:border-base-200 focus:outline-none"},null,40,qe)])]),d[2]||(d[2]=e.createElementVNode("div",{class:"pointer-events-none absolute end-10 top-2.5 hidden gap-1 opacity-50 lg:flex rtl:flex-row-reverse"},[e.createElementVNode("kbd",{class:"kbd kbd-sm"},"ctrl"),e.createElementVNode("kbd",{class:"kbd kbd-sm"},"K")],-1))])]))}}),Ue=["bg-primary","bg-primary-content","bg-secondary","bg-secondary-content","bg-accent","bg-accent-content","bg-neutral","bg-neutral-content","bg-base-100","bg-base-200","bg-base-300","bg-base-content","bg-info","bg-info-content","bg-success","bg-success-content","bg-warning","bg-warning-content","bg-error","bg-error-content","btn-primary","btn-primary-content","btn-secondary","btn-secondary-content","btn-accent","btn-accent-content","btn-neutral","btn-neutral-content","btn-base-100","btn-base-200","btn-base-300","btn-base-content","btn-info","btn-info-content","btn-success","btn-success-content","btn-warning","btn-warning-content","btn-error","btn-error-content","text-primary","text-primary-content","text-secondary","text-secondary-content","text-accent","text-accent-content","text-neutral","text-neutral-content","text-base-100","text-base-200","text-base-300","text-base-content","text-info","text-info-content","text-success","text-success-content","text-warning","text-warning-content","text-error","text-error-content","text-transparent","step","steps","modal","modal-box","btn","btn-sm","btn-circle","btn-ghost","absolute","right-2","top-2","shadow-lg","w-full","rounded-xs","rounded-sm","rounded-md","rounded-lg","rounded-xl","rounded-2xl","rounded-3xl","hidden","block"];exports.BackgroundColorUtils=I;exports.Button=ce;exports.ButtonColorUtils=K;exports.ButtonSizeUtils=H;exports.Card=de;exports.CardBody=be;exports.CardTitle=ve;exports.Color=$;exports.Container=ge;exports.Modal=De;exports.RoundedSizeUtils=j;exports.SearchBar=Ae;exports.SimpleButton=ie;exports.Size=T;exports.Step=Ne;exports.StepList=Ve;exports.StepPanel=Fe;exports.StepPanels=Te;exports.Stepper=Ee;exports.Table=Ce;exports.TableSizeUtils=G;exports.TextColorUtils=ne;exports.dendelionSafeList=Ue;
|
package/dist/dendelion-ui.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as C, computed as
|
|
2
|
-
var
|
|
3
|
-
class
|
|
1
|
+
import { defineComponent as C, computed as ce, createElementBlock as m, openBlock as v, normalizeClass as z, createElementVNode as y, renderSlot as M, ref as w, createBlock as P, resolveDynamicComponent as G, withCtx as le, createTextVNode as ie, toDisplayString as j, onMounted as Z, watch as q, Fragment as O, renderList as I, createCommentVNode as D, isVNode as he, mergeProps as me, defineAsyncComponent as te, provide as ye, inject as J, Transition as _e, unref as ne, onUnmounted as xe } from "vue";
|
|
2
|
+
var Y = /* @__PURE__ */ ((e) => (e[e.Primary = 0] = "Primary", e[e.PrimaryContent = 1] = "PrimaryContent", e[e.Secondary = 2] = "Secondary", e[e.SecondaryContent = 3] = "SecondaryContent", e[e.Accent = 4] = "Accent", e[e.AccentContent = 5] = "AccentContent", e[e.Neutral = 6] = "Neutral", e[e.NeutralContent = 7] = "NeutralContent", e[e.Base100 = 8] = "Base100", e[e.Base200 = 9] = "Base200", e[e.Base300 = 10] = "Base300", e[e.BaseContent = 11] = "BaseContent", e[e.Info = 12] = "Info", e[e.InfoContent = 13] = "InfoContent", e[e.Success = 14] = "Success", e[e.SuccessContent = 15] = "SuccessContent", e[e.Warning = 16] = "Warning", e[e.WarningContent = 17] = "WarningContent", e[e.Error = 18] = "Error", e[e.ErrorContent = 19] = "ErrorContent", e))(Y || {});
|
|
3
|
+
class Se {
|
|
4
4
|
static toClassName(t) {
|
|
5
5
|
switch (t) {
|
|
6
6
|
case 0:
|
|
@@ -48,7 +48,7 @@ class xe {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
class
|
|
51
|
+
class ke {
|
|
52
52
|
static toClassName(t) {
|
|
53
53
|
switch (t) {
|
|
54
54
|
case 0:
|
|
@@ -96,7 +96,7 @@ class Se {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
class
|
|
99
|
+
class et {
|
|
100
100
|
static toClassName(t) {
|
|
101
101
|
switch (t) {
|
|
102
102
|
case 0:
|
|
@@ -144,8 +144,8 @@ class Qe {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
var
|
|
148
|
-
class
|
|
147
|
+
var Q = /* @__PURE__ */ ((e) => (e[e.XS = 0] = "XS", e[e.SM = 1] = "SM", e[e.MD = 2] = "MD", e[e.LG = 3] = "LG", e[e.XL = 4] = "XL", e[e.TWOXL = 5] = "TWOXL", e[e.THREEXL = 6] = "THREEXL", e))(Q || {});
|
|
148
|
+
class we {
|
|
149
149
|
static toClassName(t) {
|
|
150
150
|
switch (t) {
|
|
151
151
|
case 0:
|
|
@@ -167,7 +167,7 @@ class ke {
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
class
|
|
170
|
+
class Be {
|
|
171
171
|
static toClassName(t) {
|
|
172
172
|
switch (t) {
|
|
173
173
|
case 0:
|
|
@@ -189,7 +189,7 @@ class we {
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
class
|
|
192
|
+
class Ce {
|
|
193
193
|
static toClassName(t) {
|
|
194
194
|
switch (t) {
|
|
195
195
|
case 0:
|
|
@@ -214,20 +214,20 @@ class Be {
|
|
|
214
214
|
function de(e) {
|
|
215
215
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
216
216
|
}
|
|
217
|
-
var
|
|
217
|
+
var U = { exports: {} };
|
|
218
218
|
/*!
|
|
219
219
|
Copyright (c) 2018 Jed Watson.
|
|
220
220
|
Licensed under the MIT License (MIT), see
|
|
221
221
|
http://jedwatson.github.io/classnames
|
|
222
222
|
*/
|
|
223
|
-
var
|
|
224
|
-
function
|
|
225
|
-
return
|
|
223
|
+
var re;
|
|
224
|
+
function $e() {
|
|
225
|
+
return re || (re = 1, function(e) {
|
|
226
226
|
(function() {
|
|
227
227
|
var t = {}.hasOwnProperty;
|
|
228
228
|
function s() {
|
|
229
|
-
for (var r = "",
|
|
230
|
-
var i = arguments[
|
|
229
|
+
for (var r = "", l = 0; l < arguments.length; l++) {
|
|
230
|
+
var i = arguments[l];
|
|
231
231
|
i && (r = a(r, u(i)));
|
|
232
232
|
}
|
|
233
233
|
return r;
|
|
@@ -241,36 +241,36 @@ function Ce() {
|
|
|
241
241
|
return s.apply(null, r);
|
|
242
242
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
243
243
|
return r.toString();
|
|
244
|
-
var
|
|
244
|
+
var l = "";
|
|
245
245
|
for (var i in r)
|
|
246
|
-
t.call(r, i) && r[i] && (
|
|
247
|
-
return
|
|
246
|
+
t.call(r, i) && r[i] && (l = a(l, i));
|
|
247
|
+
return l;
|
|
248
248
|
}
|
|
249
|
-
function a(r,
|
|
250
|
-
return
|
|
249
|
+
function a(r, l) {
|
|
250
|
+
return l ? r ? r + " " + l : r + l : r;
|
|
251
251
|
}
|
|
252
252
|
e.exports ? (s.default = s, e.exports = s) : window.classNames = s;
|
|
253
253
|
})();
|
|
254
|
-
}(
|
|
254
|
+
}(U)), U.exports;
|
|
255
255
|
}
|
|
256
|
-
var
|
|
257
|
-
const R = /* @__PURE__ */ de(
|
|
256
|
+
var Me = $e();
|
|
257
|
+
const R = /* @__PURE__ */ de(Me), Ne = ["type", "disabled"], ze = { class: "group-[.is-loading]:text-transparent" }, tt = /* @__PURE__ */ C({
|
|
258
258
|
__name: "Button",
|
|
259
259
|
props: {
|
|
260
260
|
type: { default: "button" },
|
|
261
261
|
loading: { type: Boolean },
|
|
262
|
-
color: { default:
|
|
262
|
+
color: { default: Y.Neutral },
|
|
263
263
|
soft: { type: Boolean, default: !1 },
|
|
264
264
|
outline: { type: Boolean, default: !1 },
|
|
265
265
|
disabled: { type: Boolean },
|
|
266
266
|
click: {}
|
|
267
267
|
},
|
|
268
268
|
setup(e) {
|
|
269
|
-
const t = e, s =
|
|
269
|
+
const t = e, s = ce(
|
|
270
270
|
() => R(
|
|
271
271
|
"btn",
|
|
272
272
|
"group",
|
|
273
|
-
|
|
273
|
+
ke.toClassName(t.color),
|
|
274
274
|
t.soft ? "btn-soft" : "",
|
|
275
275
|
t.outline ? "btn-outline" : "",
|
|
276
276
|
t.loading ? "is-loading" : "",
|
|
@@ -284,24 +284,24 @@ const R = /* @__PURE__ */ de($e), Me = ["type", "disabled"], Ne = { class: "grou
|
|
|
284
284
|
disabled: u.disabled || u.loading
|
|
285
285
|
}, [
|
|
286
286
|
a[1] || (a[1] = y("span", { class: "loading loading-spinner loading-md absolute hidden group-[.is-loading]:block" }, null, -1)),
|
|
287
|
-
y("span",
|
|
287
|
+
y("span", ze, [
|
|
288
288
|
M(u.$slots, "default")
|
|
289
289
|
])
|
|
290
|
-
], 10,
|
|
290
|
+
], 10, Ne));
|
|
291
291
|
}
|
|
292
|
-
}),
|
|
292
|
+
}), ee = (e, t) => {
|
|
293
293
|
const s = e.__vccOpts || e;
|
|
294
294
|
for (const [u, a] of t)
|
|
295
295
|
s[u] = a;
|
|
296
296
|
return s;
|
|
297
|
-
},
|
|
298
|
-
function
|
|
297
|
+
}, Te = {};
|
|
298
|
+
function Le(e, t) {
|
|
299
299
|
return v(), m("button");
|
|
300
300
|
}
|
|
301
|
-
const
|
|
301
|
+
const nt = /* @__PURE__ */ ee(Te, [["render", Le]]), rt = /* @__PURE__ */ C({
|
|
302
302
|
__name: "Card",
|
|
303
303
|
props: {
|
|
304
|
-
backgroundColor: { default:
|
|
304
|
+
backgroundColor: { default: Y.Primary },
|
|
305
305
|
shadow: { type: Boolean, default: !1 },
|
|
306
306
|
fullWidth: { type: Boolean, default: !1 },
|
|
307
307
|
rounded: { type: Boolean },
|
|
@@ -311,10 +311,10 @@ const tt = /* @__PURE__ */ Q(ze, [["render", Te]]), nt = /* @__PURE__ */ C({
|
|
|
311
311
|
const t = e, s = w(
|
|
312
312
|
R(
|
|
313
313
|
"card",
|
|
314
|
-
|
|
314
|
+
Se.toClassName(t.backgroundColor),
|
|
315
315
|
t.shadow ? "shadow-lg" : "",
|
|
316
316
|
t.fullWidth ? "w-full" : "",
|
|
317
|
-
t.rounded && !t.roundedSize ? "rounded" : t.roundedSize ?
|
|
317
|
+
t.rounded && !t.roundedSize ? "rounded" : t.roundedSize ? Be.toClassName(t.roundedSize) : ""
|
|
318
318
|
)
|
|
319
319
|
);
|
|
320
320
|
return (u, a) => (v(), m("div", {
|
|
@@ -323,27 +323,27 @@ const tt = /* @__PURE__ */ Q(ze, [["render", Te]]), nt = /* @__PURE__ */ C({
|
|
|
323
323
|
M(u.$slots, "default")
|
|
324
324
|
], 2));
|
|
325
325
|
}
|
|
326
|
-
}),
|
|
327
|
-
function
|
|
328
|
-
return v(), m("div",
|
|
326
|
+
}), Ee = {}, Fe = { class: "card-body" };
|
|
327
|
+
function Re(e, t) {
|
|
328
|
+
return v(), m("div", Fe, [
|
|
329
329
|
M(e.$slots, "default")
|
|
330
330
|
]);
|
|
331
331
|
}
|
|
332
|
-
const
|
|
332
|
+
const at = /* @__PURE__ */ ee(Ee, [["render", Re]]), st = /* @__PURE__ */ C({
|
|
333
333
|
__name: "CardTitle",
|
|
334
334
|
props: {
|
|
335
335
|
is: { default: "h1" },
|
|
336
336
|
text: { default: "" }
|
|
337
337
|
},
|
|
338
338
|
setup(e) {
|
|
339
|
-
return (t, s) => (v(), G(
|
|
339
|
+
return (t, s) => (v(), P(G(t.is), { class: "card-title" }, {
|
|
340
340
|
default: le(() => [
|
|
341
|
-
ie(
|
|
341
|
+
ie(j(t.text), 1)
|
|
342
342
|
]),
|
|
343
343
|
_: 1
|
|
344
344
|
}));
|
|
345
345
|
}
|
|
346
|
-
}),
|
|
346
|
+
}), ut = /* @__PURE__ */ C({
|
|
347
347
|
__name: "Container",
|
|
348
348
|
props: {
|
|
349
349
|
container: { type: Boolean, default: !0 },
|
|
@@ -362,39 +362,39 @@ const rt = /* @__PURE__ */ Q(Le, [["render", Fe]]), at = /* @__PURE__ */ C({
|
|
|
362
362
|
], 2));
|
|
363
363
|
}
|
|
364
364
|
});
|
|
365
|
-
var
|
|
365
|
+
var K = {}, H = {}, ae;
|
|
366
366
|
function fe() {
|
|
367
|
-
return
|
|
367
|
+
return ae || (ae = 1, function(e) {
|
|
368
368
|
e.__esModule = !0, e.default = a;
|
|
369
369
|
var t = /[\u0300-\u036f]/g, s = /ł/g, u = /ñ/g;
|
|
370
370
|
function a(r) {
|
|
371
371
|
return r.toLowerCase().normalize("NFD").replace(t, "").replace(s, "l").replace(u, "n").trim();
|
|
372
372
|
}
|
|
373
|
-
}(
|
|
373
|
+
}(H)), H;
|
|
374
374
|
}
|
|
375
|
-
var E = {},
|
|
376
|
-
function
|
|
377
|
-
if (
|
|
378
|
-
|
|
375
|
+
var E = {}, se;
|
|
376
|
+
function ue() {
|
|
377
|
+
if (se) return E;
|
|
378
|
+
se = 1, E.__esModule = !0, E.aggressiveFuzzyMatch = N, E.createFuzzySearchImpl = _, E.experimentalSmartFuzzyMatch = W, E.fuzzyMatchImpl = d;
|
|
379
379
|
var e = t(fe());
|
|
380
380
|
function t(n) {
|
|
381
381
|
return n && n.__esModule ? n : { default: n };
|
|
382
382
|
}
|
|
383
|
-
var s = Number.MAX_SAFE_INTEGER, u = function(o,
|
|
383
|
+
var s = Number.MAX_SAFE_INTEGER, u = function(o, c) {
|
|
384
384
|
return (
|
|
385
385
|
/*: number*/
|
|
386
|
-
o.score -
|
|
386
|
+
o.score - c.score
|
|
387
387
|
);
|
|
388
|
-
}, a = function(o,
|
|
388
|
+
}, a = function(o, c) {
|
|
389
389
|
return (
|
|
390
390
|
/*: number*/
|
|
391
|
-
o[0] -
|
|
391
|
+
o[0] - c[0]
|
|
392
392
|
);
|
|
393
393
|
}, r = new Set(` []()-–—'"“”`.split(""));
|
|
394
|
-
function
|
|
394
|
+
function l(n) {
|
|
395
395
|
return r.has(n);
|
|
396
396
|
}
|
|
397
|
-
function i(n, o,
|
|
397
|
+
function i(n, o, c, x, f, g, b) {
|
|
398
398
|
if (n === x)
|
|
399
399
|
return [0, [[0, n.length - 1]]];
|
|
400
400
|
var p = x.length, h = o.length, S = f.length;
|
|
@@ -403,14 +403,14 @@ function se() {
|
|
|
403
403
|
if (o.startsWith(f))
|
|
404
404
|
return [0.5, [[0, S - 1]]];
|
|
405
405
|
var B = n.indexOf(x);
|
|
406
|
-
if (B > -1 &&
|
|
406
|
+
if (B > -1 && l(n[B - 1]))
|
|
407
407
|
return [0.9, [[B, B + p - 1]]];
|
|
408
408
|
var k = o.indexOf(f);
|
|
409
|
-
if (k > -1 &&
|
|
409
|
+
if (k > -1 && l(o[k - 1]))
|
|
410
410
|
return [1, [[k, k + p - 1]]];
|
|
411
411
|
var $ = g.length;
|
|
412
412
|
if ($ > 1 && g.every(function(L) {
|
|
413
|
-
return
|
|
413
|
+
return c.has(L);
|
|
414
414
|
})) {
|
|
415
415
|
var T = 1.5 + $ * 0.2;
|
|
416
416
|
return [T, g.map(function(L) {
|
|
@@ -421,20 +421,20 @@ function se() {
|
|
|
421
421
|
return k > -1 ? [2, [[k, k + p - 1]]] : b === "aggressive" ? N(o, f) : b === "smart" ? W(o, f) : null;
|
|
422
422
|
}
|
|
423
423
|
function N(n, o) {
|
|
424
|
-
for (var
|
|
424
|
+
for (var c = n.length, x = o.length, f = 0, g = o[f], b = [], p = -1, h = -2, S = 0; S < c; S += 1)
|
|
425
425
|
if (n[S] === g) {
|
|
426
426
|
if (S !== h + 1 && (p >= 0 && b.push([p, h]), p = S), h = S, f += 1, f === x)
|
|
427
|
-
return b.push([p, h]),
|
|
427
|
+
return b.push([p, h]), V(b, n);
|
|
428
428
|
g = o[f];
|
|
429
429
|
}
|
|
430
430
|
return null;
|
|
431
431
|
}
|
|
432
432
|
function W(n, o) {
|
|
433
|
-
for (var
|
|
433
|
+
for (var c = n.length, x = [], f = 0, g = o[f], b = -1, p = -2; ; ) {
|
|
434
434
|
var h = n.indexOf(g, p + 1);
|
|
435
435
|
if (h === -1)
|
|
436
436
|
break;
|
|
437
|
-
if (h === 0 ||
|
|
437
|
+
if (h === 0 || l(n[h - 1]))
|
|
438
438
|
b = h;
|
|
439
439
|
else {
|
|
440
440
|
var S = o.length - f, B = n.length - h, k = Math.min(3, S, B), $ = o.slice(f, f + k);
|
|
@@ -445,22 +445,22 @@ function se() {
|
|
|
445
445
|
continue;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
for (p = b; p <
|
|
448
|
+
for (p = b; p < c && n[p] === g; p += 1)
|
|
449
449
|
f += 1, g = o[f];
|
|
450
450
|
if (p -= 1, x.push([b, p]), f === o.length)
|
|
451
|
-
return
|
|
451
|
+
return V(x, n);
|
|
452
452
|
}
|
|
453
453
|
return null;
|
|
454
454
|
}
|
|
455
|
-
function
|
|
456
|
-
var
|
|
455
|
+
function V(n, o) {
|
|
456
|
+
var c = 2;
|
|
457
457
|
return n.forEach(function(x) {
|
|
458
458
|
var f = x[0], g = x[1], b = g - f + 1, p = f === 0 || o[f] === " " || o[f - 1] === " ", h = g === o.length - 1 || o[g] === " " || o[g + 1] === " ", S = p && h;
|
|
459
|
-
S ?
|
|
460
|
-
}), [
|
|
459
|
+
S ? c += 0.2 : p ? c += 0.4 : b >= 3 ? c += 0.8 : c += 1.6;
|
|
460
|
+
}), [c, n];
|
|
461
461
|
}
|
|
462
462
|
function d(n, o) {
|
|
463
|
-
var
|
|
463
|
+
var c = (0, e.default)(o), x = c.split(" "), f = (0, e.default)(n), g = new Set(f.split(" ")), b = i(n, f, g, o, c, x, "smart");
|
|
464
464
|
return b ? {
|
|
465
465
|
item: n,
|
|
466
466
|
score: b[0],
|
|
@@ -468,7 +468,7 @@ function se() {
|
|
|
468
468
|
} : null;
|
|
469
469
|
}
|
|
470
470
|
function _(n, o) {
|
|
471
|
-
var
|
|
471
|
+
var c = o.strategy, x = c === void 0 ? "aggressive" : c, f = o.getText, g = n.map(function(b) {
|
|
472
472
|
var p;
|
|
473
473
|
if (f)
|
|
474
474
|
p = f(b);
|
|
@@ -486,8 +486,8 @@ function se() {
|
|
|
486
486
|
var p = [], h = (0, e.default)(b), S = h.split(" ");
|
|
487
487
|
return h.length ? (g.forEach(function(B) {
|
|
488
488
|
for (var k = B[0], $ = B[1], T = s, L = [], F = 0, pe = $.length; F < pe; F += 1) {
|
|
489
|
-
var
|
|
490
|
-
|
|
489
|
+
var A = $[F], be = A[0], ve = A[1], ge = A[2], X = i(be, ve, ge, b, h, S, x);
|
|
490
|
+
X ? (T = Math.min(T, X[0]), L.push(X[1])) : L.push(null);
|
|
491
491
|
}
|
|
492
492
|
T < s && p.push({
|
|
493
493
|
item: k,
|
|
@@ -499,31 +499,31 @@ function se() {
|
|
|
499
499
|
}
|
|
500
500
|
return E;
|
|
501
501
|
}
|
|
502
|
-
var
|
|
503
|
-
function
|
|
504
|
-
return
|
|
502
|
+
var oe;
|
|
503
|
+
function We() {
|
|
504
|
+
return oe || (oe = 1, function(e) {
|
|
505
505
|
e.__esModule = !0, e.default = u, e.fuzzyMatch = a;
|
|
506
506
|
var t = s(fe());
|
|
507
507
|
e.normalizeText = t.default;
|
|
508
508
|
function s(r) {
|
|
509
509
|
return r && r.__esModule ? r : { default: r };
|
|
510
510
|
}
|
|
511
|
-
function u(r,
|
|
512
|
-
return
|
|
511
|
+
function u(r, l) {
|
|
512
|
+
return l === void 0 && (l = {}), ue().createFuzzySearchImpl(r, l);
|
|
513
513
|
}
|
|
514
|
-
function a(r,
|
|
515
|
-
return
|
|
514
|
+
function a(r, l) {
|
|
515
|
+
return ue().fuzzyMatchImpl(r, l);
|
|
516
516
|
}
|
|
517
|
-
}(
|
|
517
|
+
}(K)), K;
|
|
518
518
|
}
|
|
519
|
-
var
|
|
520
|
-
const Oe = /* @__PURE__ */ de(
|
|
519
|
+
var Ve = We();
|
|
520
|
+
const Oe = /* @__PURE__ */ de(Ve), De = { key: 0 }, Pe = ["colspan"], qe = ["onClick"], Ae = ["innerHTML"], ot = /* @__PURE__ */ C({
|
|
521
521
|
__name: "Table",
|
|
522
522
|
props: {
|
|
523
523
|
zebra: { type: Boolean, default: !1 },
|
|
524
524
|
pinRows: { type: Boolean, default: !1 },
|
|
525
525
|
pinCols: { type: Boolean, default: !1 },
|
|
526
|
-
size: { default:
|
|
526
|
+
size: { default: Q.MD },
|
|
527
527
|
columns: {},
|
|
528
528
|
dataSource: {},
|
|
529
529
|
ajax: {},
|
|
@@ -533,37 +533,37 @@ const Oe = /* @__PURE__ */ de(We), Ve = { key: 0 }, De = ["colspan"], Pe = ["onC
|
|
|
533
533
|
},
|
|
534
534
|
setup(e) {
|
|
535
535
|
const t = w([]), s = w([]), u = w(null), a = e, r = w(
|
|
536
|
-
R("table",
|
|
536
|
+
R("table", Ce.toClassName(a.size), {
|
|
537
537
|
"table-zebra": a.zebra,
|
|
538
538
|
"table-pin-rows": a.pinRows,
|
|
539
539
|
"table-pin-cols ": a.pinCols
|
|
540
540
|
})
|
|
541
|
-
),
|
|
541
|
+
), l = (d, _) => {
|
|
542
542
|
a.onRowClick && a.onRowClick(d, _);
|
|
543
|
-
}, i = (d, _) => String(!d || typeof d != "object" ? d : _.split(".").reduce((n, o) => n && (typeof n == "object" ? n[o] : n), d)), N = (d, _) => _.render === void 0 ? {} : _.render(i(d, _.data), d).props, W = (d) => d && typeof d == "object" && "then" in d ?
|
|
544
|
-
|
|
543
|
+
}, i = (d, _) => String(!d || typeof d != "object" ? d : _.split(".").reduce((n, o) => n && (typeof n == "object" ? n[o] : n), d)), N = (d, _) => _.render === void 0 ? {} : _.render(i(d, _.data), d).props, W = (d) => (console.log("getComponent", d), d && typeof d == "object" && "then" in d ? te(() => d) : typeof d == "function" ? te(d) : d);
|
|
544
|
+
Z(() => {
|
|
545
545
|
t.value = a.dataSource, s.value = a.dataSource;
|
|
546
|
-
}),
|
|
546
|
+
}), q(
|
|
547
547
|
() => a.dataSource,
|
|
548
548
|
(d) => {
|
|
549
549
|
t.value = d, s.value = d;
|
|
550
550
|
},
|
|
551
551
|
{ immediate: !0 }
|
|
552
|
-
),
|
|
552
|
+
), q(
|
|
553
553
|
() => a.searchValue,
|
|
554
554
|
(d) => {
|
|
555
555
|
if (a.searchFunction) {
|
|
556
556
|
s.value = a.searchFunction(d ?? "");
|
|
557
557
|
return;
|
|
558
558
|
}
|
|
559
|
-
s.value = d ?
|
|
559
|
+
s.value = d ? V(d) : t.value;
|
|
560
560
|
},
|
|
561
561
|
{ immediate: !0 }
|
|
562
562
|
);
|
|
563
|
-
const
|
|
563
|
+
const V = (d) => {
|
|
564
564
|
const _ = [];
|
|
565
565
|
return t.value.length > 0 ? (Object.keys(t.value[0]).forEach((o) => {
|
|
566
|
-
const
|
|
566
|
+
const c = t.value.map((g) => i(g, o)), f = Oe(c)(d);
|
|
567
567
|
for (const g of f) {
|
|
568
568
|
const b = t.value.filter((p) => i(p, o) === g.item);
|
|
569
569
|
_.push(...b);
|
|
@@ -577,76 +577,76 @@ const Oe = /* @__PURE__ */ de(We), Ve = { key: 0 }, De = ["colspan"], Pe = ["onC
|
|
|
577
577
|
}, [
|
|
578
578
|
y("thead", null, [
|
|
579
579
|
y("tr", null, [
|
|
580
|
-
(v(!0), m(
|
|
580
|
+
(v(!0), m(O, null, I(a.columns, (n) => (v(), m("th", {
|
|
581
581
|
key: n.title
|
|
582
|
-
},
|
|
582
|
+
}, j(n.title), 1))), 128))
|
|
583
583
|
])
|
|
584
584
|
]),
|
|
585
585
|
y("tbody", null, [
|
|
586
|
-
s.value.length === 0 ? (v(), m("tr",
|
|
586
|
+
s.value.length === 0 ? (v(), m("tr", De, [
|
|
587
587
|
y("td", {
|
|
588
588
|
colspan: a.columns.length
|
|
589
|
-
}, "No data found", 8,
|
|
590
|
-
])) : (v(!0), m(
|
|
589
|
+
}, "No data found", 8, Pe)
|
|
590
|
+
])) : (v(!0), m(O, { key: 1 }, I(s.value, (n, o) => (v(), m("tr", {
|
|
591
591
|
class: z(a.onRowClick ? "hover" : ""),
|
|
592
592
|
key: String(n),
|
|
593
|
-
onClick: (
|
|
593
|
+
onClick: (c) => l(n, o)
|
|
594
594
|
}, [
|
|
595
|
-
(v(!0), m(
|
|
596
|
-
key:
|
|
595
|
+
(v(!0), m(O, null, I(a.columns, (c) => (v(), m("td", {
|
|
596
|
+
key: c.title
|
|
597
597
|
}, [
|
|
598
|
-
|
|
599
|
-
ie(
|
|
598
|
+
c.render ? D("", !0) : (v(), m(O, { key: 0 }, [
|
|
599
|
+
ie(j(i(n, c.data)), 1)
|
|
600
600
|
], 64)),
|
|
601
|
-
typeof
|
|
602
|
-
typeof
|
|
601
|
+
typeof c.render == "function" ? (v(), m(O, { key: 1 }, [
|
|
602
|
+
typeof c.render(i(n, c.data), n) == "string" ? (v(), m("div", {
|
|
603
603
|
key: 0,
|
|
604
|
-
innerHTML:
|
|
605
|
-
}, null, 8,
|
|
606
|
-
key:
|
|
604
|
+
innerHTML: c.render(i(n, c.data), n)
|
|
605
|
+
}, null, 8, Ae)) : he(c.render(i(n, c.data), n)) ? (v(), P(G(c.render(i(n, c.data), n)), { key: 1 })) : (v(), P(G(W(c.render(i(n, c.data), n).component)), me({
|
|
606
|
+
key: 2,
|
|
607
607
|
ref_for: !0
|
|
608
|
-
}, N(n,
|
|
608
|
+
}, N(n, c)), null, 16))
|
|
609
609
|
], 64)) : D("", !0)
|
|
610
610
|
]))), 128))
|
|
611
|
-
], 10,
|
|
611
|
+
], 10, qe))), 128))
|
|
612
612
|
])
|
|
613
613
|
], 2));
|
|
614
614
|
}
|
|
615
|
-
}),
|
|
615
|
+
}), ct = /* @__PURE__ */ C({
|
|
616
616
|
__name: "Stepper",
|
|
617
617
|
props: {
|
|
618
618
|
value: {}
|
|
619
619
|
},
|
|
620
620
|
emits: ["update:value"],
|
|
621
621
|
setup(e, { expose: t, emit: s }) {
|
|
622
|
-
const u = e, a = w(u.value), r = s,
|
|
622
|
+
const u = e, a = w(u.value), r = s, l = (i) => {
|
|
623
623
|
a.value = i, r("update:value", i);
|
|
624
624
|
};
|
|
625
|
-
return
|
|
625
|
+
return ye("stepper", {
|
|
626
626
|
value: a,
|
|
627
|
-
updateValue:
|
|
628
|
-
}),
|
|
627
|
+
updateValue: l
|
|
628
|
+
}), q(
|
|
629
629
|
() => u.value,
|
|
630
630
|
(i) => {
|
|
631
631
|
a.value = i;
|
|
632
632
|
}
|
|
633
633
|
), t({
|
|
634
|
-
updateValue:
|
|
635
|
-
}), (i, N) => M(i.$slots, "default", { updateValue:
|
|
634
|
+
updateValue: l
|
|
635
|
+
}), (i, N) => M(i.$slots, "default", { updateValue: l });
|
|
636
636
|
}
|
|
637
|
-
}),
|
|
637
|
+
}), lt = /* @__PURE__ */ C({
|
|
638
638
|
__name: "Step",
|
|
639
639
|
props: {
|
|
640
640
|
value: {}
|
|
641
641
|
},
|
|
642
642
|
setup(e) {
|
|
643
|
-
const t = e, s =
|
|
644
|
-
return
|
|
643
|
+
const t = e, s = J("stepper"), u = w("");
|
|
644
|
+
return q(
|
|
645
645
|
() => s?.value.value,
|
|
646
646
|
(a) => {
|
|
647
647
|
a && t.value && (u.value = Number(a) >= Number(t.value) ? "step-primary" : "");
|
|
648
648
|
}
|
|
649
|
-
),
|
|
649
|
+
), Z(() => {
|
|
650
650
|
s && (u.value = s.value.value === t.value ? "step-primary" : "", Number(s.value.value) >= Number(t.value) && (u.value = "step-primary"));
|
|
651
651
|
}), (a, r) => (v(), m("li", {
|
|
652
652
|
class: z(["step", u.value])
|
|
@@ -654,66 +654,66 @@ const Oe = /* @__PURE__ */ de(We), Ve = { key: 0 }, De = ["colspan"], Pe = ["onC
|
|
|
654
654
|
M(a.$slots, "default")
|
|
655
655
|
], 2));
|
|
656
656
|
}
|
|
657
|
-
}),
|
|
658
|
-
function
|
|
659
|
-
return v(), m("ul",
|
|
657
|
+
}), Xe = {}, Ie = { class: "steps" };
|
|
658
|
+
function Ue(e, t) {
|
|
659
|
+
return v(), m("ul", Ie, [
|
|
660
660
|
M(e.$slots, "default")
|
|
661
661
|
]);
|
|
662
662
|
}
|
|
663
|
-
const
|
|
663
|
+
const it = /* @__PURE__ */ ee(Xe, [["render", Ue]]), Ke = { key: 0 }, dt = /* @__PURE__ */ C({
|
|
664
664
|
__name: "StepPanels",
|
|
665
665
|
setup(e) {
|
|
666
|
-
const t =
|
|
667
|
-
return (s, u) => (v(),
|
|
666
|
+
const t = J("stepper");
|
|
667
|
+
return (s, u) => (v(), P(_e, {
|
|
668
668
|
name: "fade",
|
|
669
669
|
mode: "out-in"
|
|
670
670
|
}, {
|
|
671
671
|
default: le(() => [
|
|
672
|
-
|
|
672
|
+
ne(t)?.value ? (v(), m("div", Ke, [
|
|
673
673
|
M(s.$slots, "default", {
|
|
674
|
-
currentStep:
|
|
674
|
+
currentStep: ne(t)?.value
|
|
675
675
|
})
|
|
676
676
|
])) : D("", !0)
|
|
677
677
|
]),
|
|
678
678
|
_: 3
|
|
679
679
|
}));
|
|
680
680
|
}
|
|
681
|
-
}),
|
|
681
|
+
}), He = { key: 0 }, ft = /* @__PURE__ */ C({
|
|
682
682
|
__name: "StepPanel",
|
|
683
683
|
props: {
|
|
684
684
|
value: {}
|
|
685
685
|
},
|
|
686
686
|
setup(e, { expose: t }) {
|
|
687
|
-
const s =
|
|
687
|
+
const s = ce(() => u?.value.value), u = J("stepper"), a = (r) => {
|
|
688
688
|
u && u.updateValue(r.toString());
|
|
689
689
|
};
|
|
690
690
|
return t({
|
|
691
691
|
activateCallback: a
|
|
692
|
-
}), (r,
|
|
692
|
+
}), (r, l) => r.value === s.value ? (v(), m("div", He, [
|
|
693
693
|
M(r.$slots, "default", { activateCallback: a })
|
|
694
694
|
])) : D("", !0);
|
|
695
695
|
}
|
|
696
|
-
}),
|
|
696
|
+
}), Ge = {
|
|
697
697
|
key: 0,
|
|
698
698
|
method: "dialog"
|
|
699
|
-
},
|
|
699
|
+
}, pt = /* @__PURE__ */ C({
|
|
700
700
|
__name: "Modal",
|
|
701
701
|
props: {
|
|
702
702
|
closeButton: { type: Boolean, default: !0 },
|
|
703
703
|
overflow: { type: Boolean, default: !1 },
|
|
704
|
-
closeButtonSize: { default:
|
|
704
|
+
closeButtonSize: { default: Q.SM },
|
|
705
705
|
extraBoxClasses: {}
|
|
706
706
|
},
|
|
707
707
|
emits: ["close"],
|
|
708
708
|
setup(e, { expose: t, emit: s }) {
|
|
709
|
-
const u = w(null), a = s, r = e,
|
|
709
|
+
const u = w(null), a = s, r = e, l = w(R("modal-box", r.extraBoxClasses, {
|
|
710
710
|
"overflow-visible": r.overflow
|
|
711
711
|
})), i = w(
|
|
712
712
|
R("modal")
|
|
713
713
|
), N = w(
|
|
714
714
|
R(
|
|
715
715
|
"btn",
|
|
716
|
-
|
|
716
|
+
we.toClassName(r.closeButtonSize),
|
|
717
717
|
"btn-circle",
|
|
718
718
|
"btn-ghost",
|
|
719
719
|
"absolute",
|
|
@@ -738,9 +738,9 @@ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__
|
|
|
738
738
|
onClose: _[0] || (_[0] = (n) => a("close", n))
|
|
739
739
|
}, [
|
|
740
740
|
y("div", {
|
|
741
|
-
class: z(
|
|
741
|
+
class: z(l.value)
|
|
742
742
|
}, [
|
|
743
|
-
d.closeButton ? (v(), m("form",
|
|
743
|
+
d.closeButton ? (v(), m("form", Ge, [
|
|
744
744
|
y("button", {
|
|
745
745
|
class: z(N.value)
|
|
746
746
|
}, "✕", 2)
|
|
@@ -755,20 +755,20 @@ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__
|
|
|
755
755
|
], -1))
|
|
756
756
|
], 34));
|
|
757
757
|
}
|
|
758
|
-
}),
|
|
758
|
+
}), je = { class: "hidden w-full max-w-sm lg:flex" }, Ze = { class: "relative mx-3 w-full" }, Je = { class: "relative w-full max-w-full" }, Ye = ["value"], bt = /* @__PURE__ */ C({
|
|
759
759
|
__name: "SearchBar",
|
|
760
760
|
props: ["modelValue"],
|
|
761
761
|
emits: ["update:modelValue"],
|
|
762
762
|
setup(e, { emit: t }) {
|
|
763
|
-
const s = e, u = w(null), a = t, r = (
|
|
764
|
-
(
|
|
763
|
+
const s = e, u = w(null), a = t, r = (l) => {
|
|
764
|
+
(l.ctrlKey || l.metaKey) && l.key.toLowerCase() === "k" && (l.preventDefault(), u.value && u.value.focus());
|
|
765
765
|
};
|
|
766
|
-
return
|
|
766
|
+
return Z(() => {
|
|
767
767
|
document.addEventListener("keydown", r);
|
|
768
|
-
}),
|
|
768
|
+
}), xe(() => {
|
|
769
769
|
document.removeEventListener("keydown", r);
|
|
770
|
-
}), (
|
|
771
|
-
y("label",
|
|
770
|
+
}), (l, i) => (v(), m("div", je, [
|
|
771
|
+
y("label", Ze, [
|
|
772
772
|
i[1] || (i[1] = y("svg", {
|
|
773
773
|
class: "pointer-events-none absolute z-10 my-3.5 ms-4 text-base-content opacity-60",
|
|
774
774
|
"aria-hidden": "true",
|
|
@@ -783,7 +783,7 @@ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__
|
|
|
783
783
|
}),
|
|
784
784
|
y("path", { d: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })
|
|
785
785
|
], -1)),
|
|
786
|
-
y("div",
|
|
786
|
+
y("div", Je, [
|
|
787
787
|
y("form", null, [
|
|
788
788
|
y("input", {
|
|
789
789
|
ref_key: "searchInput",
|
|
@@ -793,7 +793,7 @@ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__
|
|
|
793
793
|
value: s.modelValue,
|
|
794
794
|
onInput: i[0] || (i[0] = (N) => a("update:modelValue", N.target.value)),
|
|
795
795
|
class: "color-[inherit] w-full rounded-xl border-[2px] border-solid border-transparent bg-transparent px-3 py-2 ps-10 focus:border-[2px] focus:border-base-200 focus:outline-none"
|
|
796
|
-
}, null, 40,
|
|
796
|
+
}, null, 40, Ye)
|
|
797
797
|
])
|
|
798
798
|
]),
|
|
799
799
|
i[2] || (i[2] = y("div", { class: "pointer-events-none absolute end-10 top-2.5 hidden gap-1 opacity-50 lg:flex rtl:flex-row-reverse" }, [
|
|
@@ -803,7 +803,7 @@ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__
|
|
|
803
803
|
])
|
|
804
804
|
]));
|
|
805
805
|
}
|
|
806
|
-
}),
|
|
806
|
+
}), vt = [
|
|
807
807
|
"bg-primary",
|
|
808
808
|
"bg-primary-content",
|
|
809
809
|
"bg-secondary",
|
|
@@ -889,27 +889,27 @@ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__
|
|
|
889
889
|
"block"
|
|
890
890
|
];
|
|
891
891
|
export {
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
892
|
+
Se as BackgroundColorUtils,
|
|
893
|
+
tt as Button,
|
|
894
|
+
ke as ButtonColorUtils,
|
|
895
|
+
we as ButtonSizeUtils,
|
|
896
|
+
rt as Card,
|
|
897
|
+
at as CardBody,
|
|
898
|
+
st as CardTitle,
|
|
899
|
+
Y as Color,
|
|
900
|
+
ut as Container,
|
|
901
|
+
pt as Modal,
|
|
902
|
+
Be as RoundedSizeUtils,
|
|
903
|
+
bt as SearchBar,
|
|
904
|
+
nt as SimpleButton,
|
|
905
|
+
Q as Size,
|
|
906
|
+
lt as Step,
|
|
907
|
+
it as StepList,
|
|
908
|
+
ft as StepPanel,
|
|
909
|
+
dt as StepPanels,
|
|
910
|
+
ct as Stepper,
|
|
911
|
+
ot as Table,
|
|
912
|
+
Ce as TableSizeUtils,
|
|
913
|
+
et as TextColorUtils,
|
|
914
|
+
vt as dendelionSafeList
|
|
915
915
|
};
|
package/dist/dendelion-ui.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b.DendelionUI={},b.Vue))})(this,function(b,e){"use strict";var L=(t=>(t[t.Primary=0]="Primary",t[t.PrimaryContent=1]="PrimaryContent",t[t.Secondary=2]="Secondary",t[t.SecondaryContent=3]="SecondaryContent",t[t.Accent=4]="Accent",t[t.AccentContent=5]="AccentContent",t[t.Neutral=6]="Neutral",t[t.NeutralContent=7]="NeutralContent",t[t.Base100=8]="Base100",t[t.Base200=9]="Base200",t[t.Base300=10]="Base300",t[t.BaseContent=11]="BaseContent",t[t.Info=12]="Info",t[t.InfoContent=13]="InfoContent",t[t.Success=14]="Success",t[t.SuccessContent=15]="SuccessContent",t[t.Warning=16]="Warning",t[t.WarningContent=17]="WarningContent",t[t.Error=18]="Error",t[t.ErrorContent=19]="ErrorContent",t))(L||{});class U{static toClassName(n){switch(n){case 0:return"bg-primary";case 1:return"bg-primary-content";case 2:return"bg-secondary";case 3:return"bg-secondary-content";case 4:return"bg-accent";case 5:return"bg-accent-content";case 6:return"bg-neutral";case 7:return"bg-neutral-content";case 8:return"base-100";case 9:return"bg-base-200";case 10:return"bg-base-300";case 11:return"bg-base-content";case 12:return"bg-info";case 13:return"bg-info-content";case 14:return"bg-success";case 15:return"bg-success-content";case 16:return"bg-warning";case 17:return"bg-warning-content";case 18:return"bg-error";case 19:return"bg-error-content";default:return"bg-base-content"}}}class q{static toClassName(n){switch(n){case 0:return"btn-primary";case 1:return"btn-primary-content";case 2:return"btn-secondary";case 3:return"btn-secondary-content";case 4:return"btn-accent";case 5:return"btn-accent-content";case 6:return"btn-neutral";case 7:return"btn-neutral-content";case 8:return"base-100";case 9:return"btn-base-200";case 10:return"btn-base-300";case 11:return"btn-base-content";case 12:return"btn-info";case 13:return"btn-info-content";case 14:return"btn-success";case 15:return"btn-success-content";case 16:return"btn-warning";case 17:return"btn-warning-content";case 18:return"btn-error";case 19:return"btn-error-content";default:return"btn-base-content"}}}class Q{static toClassName(n){switch(n){case 0:return"text-primary";case 1:return"text-primary-content";case 2:return"text-secondary";case 3:return"text-secondary-content";case 4:return"text-accent";case 5:return"text-accent-content";case 6:return"text-neutral";case 7:return"text-neutral-content";case 8:return"base-100";case 9:return"text-base-200";case 10:return"text-base-300";case 11:return"text-base-content";case 12:return"text-info";case 13:return"text-info-content";case 14:return"text-success";case 15:return"text-success-content";case 16:return"text-warning";case 17:return"text-warning-content";case 18:return"text-error";case 19:return"text-error-content";default:return"text-base-content"}}}var F=(t=>(t[t.XS=0]="XS",t[t.SM=1]="SM",t[t.MD=2]="MD",t[t.LG=3]="LG",t[t.XL=4]="XL",t[t.TWOXL=5]="TWOXL",t[t.THREEXL=6]="THREEXL",t))(F||{});class A{static toClassName(n){switch(n){case 0:return"btn-xs";case 1:return"btn-sm";case 2:return"btn-md";case 3:return"btn-lg";case 4:return"btn-xl";case 5:return"btn-2xl";case 6:return"btn-3xl";default:return"btn-md"}}}class I{static toClassName(n){switch(n){case 0:return"rounded-xs";case 1:return"rounded-sm";case 2:return"rounded-md";case 3:return"rounded-lg";case 4:return"rounded-xl";case 5:return"rounded-2xl";case 6:return"rounded-3xl";default:return"rounded-md"}}}class X{static toClassName(n){switch(n){case 0:return"table-xs";case 1:return"table-sm";case 2:return"table-md";case 3:return"table-lg";case 4:return"table-xl";case 5:return"table-2xl";case 6:return"table-3xl";default:return"table-md"}}}function K(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var
|
|
1
|
+
(function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b.DendelionUI={},b.Vue))})(this,function(b,e){"use strict";var L=(t=>(t[t.Primary=0]="Primary",t[t.PrimaryContent=1]="PrimaryContent",t[t.Secondary=2]="Secondary",t[t.SecondaryContent=3]="SecondaryContent",t[t.Accent=4]="Accent",t[t.AccentContent=5]="AccentContent",t[t.Neutral=6]="Neutral",t[t.NeutralContent=7]="NeutralContent",t[t.Base100=8]="Base100",t[t.Base200=9]="Base200",t[t.Base300=10]="Base300",t[t.BaseContent=11]="BaseContent",t[t.Info=12]="Info",t[t.InfoContent=13]="InfoContent",t[t.Success=14]="Success",t[t.SuccessContent=15]="SuccessContent",t[t.Warning=16]="Warning",t[t.WarningContent=17]="WarningContent",t[t.Error=18]="Error",t[t.ErrorContent=19]="ErrorContent",t))(L||{});class U{static toClassName(n){switch(n){case 0:return"bg-primary";case 1:return"bg-primary-content";case 2:return"bg-secondary";case 3:return"bg-secondary-content";case 4:return"bg-accent";case 5:return"bg-accent-content";case 6:return"bg-neutral";case 7:return"bg-neutral-content";case 8:return"base-100";case 9:return"bg-base-200";case 10:return"bg-base-300";case 11:return"bg-base-content";case 12:return"bg-info";case 13:return"bg-info-content";case 14:return"bg-success";case 15:return"bg-success-content";case 16:return"bg-warning";case 17:return"bg-warning-content";case 18:return"bg-error";case 19:return"bg-error-content";default:return"bg-base-content"}}}class q{static toClassName(n){switch(n){case 0:return"btn-primary";case 1:return"btn-primary-content";case 2:return"btn-secondary";case 3:return"btn-secondary-content";case 4:return"btn-accent";case 5:return"btn-accent-content";case 6:return"btn-neutral";case 7:return"btn-neutral-content";case 8:return"base-100";case 9:return"btn-base-200";case 10:return"btn-base-300";case 11:return"btn-base-content";case 12:return"btn-info";case 13:return"btn-info-content";case 14:return"btn-success";case 15:return"btn-success-content";case 16:return"btn-warning";case 17:return"btn-warning-content";case 18:return"btn-error";case 19:return"btn-error-content";default:return"btn-base-content"}}}class Q{static toClassName(n){switch(n){case 0:return"text-primary";case 1:return"text-primary-content";case 2:return"text-secondary";case 3:return"text-secondary-content";case 4:return"text-accent";case 5:return"text-accent-content";case 6:return"text-neutral";case 7:return"text-neutral-content";case 8:return"base-100";case 9:return"text-base-200";case 10:return"text-base-300";case 11:return"text-base-content";case 12:return"text-info";case 13:return"text-info-content";case 14:return"text-success";case 15:return"text-success-content";case 16:return"text-warning";case 17:return"text-warning-content";case 18:return"text-error";case 19:return"text-error-content";default:return"text-base-content"}}}var F=(t=>(t[t.XS=0]="XS",t[t.SM=1]="SM",t[t.MD=2]="MD",t[t.LG=3]="LG",t[t.XL=4]="XL",t[t.TWOXL=5]="TWOXL",t[t.THREEXL=6]="THREEXL",t))(F||{});class A{static toClassName(n){switch(n){case 0:return"btn-xs";case 1:return"btn-sm";case 2:return"btn-md";case 3:return"btn-lg";case 4:return"btn-xl";case 5:return"btn-2xl";case 6:return"btn-3xl";default:return"btn-md"}}}class I{static toClassName(n){switch(n){case 0:return"rounded-xs";case 1:return"rounded-sm";case 2:return"rounded-md";case 3:return"rounded-lg";case 4:return"rounded-xl";case 5:return"rounded-2xl";case 6:return"rounded-3xl";default:return"rounded-md"}}}class X{static toClassName(n){switch(n){case 0:return"table-xs";case 1:return"table-sm";case 2:return"table-md";case 3:return"table-lg";case 4:return"table-xl";case 5:return"table-2xl";case 6:return"table-3xl";default:return"table-md"}}}function K(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var R={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var j;function ee(){return j||(j=1,function(t){(function(){var n={}.hasOwnProperty;function o(){for(var a="",i=0;i<arguments.length;i++){var d=arguments[i];d&&(a=s(a,c(d)))}return a}function c(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return o.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var i="";for(var d in a)n.call(a,d)&&a[d]&&(i=s(i,d));return i}function s(a,i){return i?a?a+" "+i:a+i:a}t.exports?(o.default=o,t.exports=o):window.classNames=o})()}(v)),v.exports}var te=ee();const M=K(te),ne=["type","disabled"],re={class:"group-[.is-loading]:text-transparent"},ae=e.defineComponent({__name:"Button",props:{type:{default:"button"},loading:{type:Boolean},color:{default:L.Neutral},soft:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},disabled:{type:Boolean},click:{}},setup(t){const n=t,o=e.computed(()=>M("btn","group",q.toClassName(n.color),n.soft?"btn-soft":"",n.outline?"btn-outline":"",n.loading?"is-loading":"",n.disabled?"disabled":""));return(c,s)=>(e.openBlock(),e.createElementBlock("button",{onClick:s[0]||(s[0]=a=>c.click?c.click:void 0),class:e.normalizeClass(o.value),type:c.type,disabled:c.disabled||c.loading},[s[1]||(s[1]=e.createElementVNode("span",{class:"loading loading-spinner loading-md absolute hidden group-[.is-loading]:block"},null,-1)),e.createElementVNode("span",re,[e.renderSlot(c.$slots,"default")])],10,ne))}}),R=(t,n)=>{const o=t.__vccOpts||t;for(const[c,s]of n)o[c]=s;return o},se={};function oe(t,n){return e.openBlock(),e.createElementBlock("button")}const ce=R(se,[["render",oe]]),le=e.defineComponent({__name:"Card",props:{backgroundColor:{default:L.Primary},shadow:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},rounded:{type:Boolean},roundedSize:{}},setup(t){const n=t,o=e.ref(M("card",U.toClassName(n.backgroundColor),n.shadow?"shadow-lg":"",n.fullWidth?"w-full":"",n.rounded&&!n.roundedSize?"rounded":n.roundedSize?I.toClassName(n.roundedSize):""));return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.value)},[e.renderSlot(c.$slots,"default")],2))}}),ie={},ue={class:"card-body"};function de(t,n){return e.openBlock(),e.createElementBlock("div",ue,[e.renderSlot(t.$slots,"default")])}const fe=R(ie,[["render",de]]),pe=e.defineComponent({__name:"CardTitle",props:{is:{default:"h1"},text:{default:""}},setup(t){return(n,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.is),{class:"card-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.text),1)]),_:1}))}}),me=e.defineComponent({__name:"Container",props:{container:{type:Boolean,default:!0},padding:{type:Boolean,default:!0}},setup(t){const n=t,o=e.ref([n.container?"container":"",n.padding?"p-6":""]);return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.value)},[e.renderSlot(c.$slots,"default")],2))}});var D={},W={},H;function G(){return H||(H=1,function(t){t.__esModule=!0,t.default=s;var n=/[\u0300-\u036f]/g,o=/ł/g,c=/ñ/g;function s(a){return a.toLowerCase().normalize("NFD").replace(n,"").replace(o,"l").replace(c,"n").trim()}}(W)),W}var z={},Z;function J(){if(Z)return z;Z=1,z.__esModule=!0,z.aggressiveFuzzyMatch=E,z.createFuzzySearchImpl=_,z.experimentalSmartFuzzyMatch=$,z.fuzzyMatchImpl=f;var t=n(G());function n(r){return r&&r.__esModule?r:{default:r}}var o=Number.MAX_SAFE_INTEGER,c=function(l,u){return l.score-u.score},s=function(l,u){return l[0]-u[0]},a=new Set(` []()-–—'"“”`.split(""));function i(r){return a.has(r)}function d(r,l,u,k,p,h,g){if(r===k)return[0,[[0,r.length-1]]];var m=k.length,y=l.length,B=p.length;if(l===p)return[.1,[[0,y-1]]];if(l.startsWith(p))return[.5,[[0,B-1]]];var S=r.indexOf(k);if(S>-1&&i(r[S-1]))return[.9,[[S,S+m-1]]];var x=l.indexOf(p);if(x>-1&&i(l[x-1]))return[1,[[x,x+m-1]]];var C=h.length;if(C>1&&h.every(function(w){return u.has(w)})){var N=1.5+C*.2;return[N,h.map(function(w){var V=l.indexOf(w);return[V,V+w.length-1]}).sort(s)]}return x>-1?[2,[[x,x+m-1]]]:g==="aggressive"?E(l,p):g==="smart"?$(l,p):null}function E(r,l){for(var u=r.length,k=l.length,p=0,h=l[p],g=[],m=-1,y=-2,B=0;B<u;B+=1)if(r[B]===h){if(B!==y+1&&(m>=0&&g.push([m,y]),m=B),y=B,p+=1,p===k)return g.push([m,y]),T(g,r);h=l[p]}return null}function $(r,l){for(var u=r.length,k=[],p=0,h=l[p],g=-1,m=-2;;){var y=r.indexOf(h,m+1);if(y===-1)break;if(y===0||i(r[y-1]))g=y;else{var B=l.length-p,S=r.length-y,x=Math.min(3,B,S),C=l.slice(p,p+x);if(r.slice(y,y+x)===C)g=y;else{m+=1;continue}}for(m=g;m<u&&r[m]===h;m+=1)p+=1,h=l[p];if(m-=1,k.push([g,m]),p===l.length)return T(k,r)}return null}function T(r,l){var u=2;return r.forEach(function(k){var p=k[0],h=k[1],g=h-p+1,m=p===0||l[p]===" "||l[p-1]===" ",y=h===l.length-1||l[h]===" "||l[h+1]===" ",B=m&&y;B?u+=.2:m?u+=.4:g>=3?u+=.8:u+=1.6}),[u,r]}function f(r,l){var u=(0,t.default)(l),k=u.split(" "),p=(0,t.default)(r),h=new Set(p.split(" ")),g=d(r,p,h,l,u,k,"smart");return g?{item:r,score:g[0],matches:[g[1]]}:null}function _(r,l){var u=l.strategy,k=u===void 0?"aggressive":u,p=l.getText,h=r.map(function(g){var m;if(p)m=p(g);else{var y=l.key?g[l.key]:g;m=[y]}var B=m.map(function(S){var x=S||"",C=(0,t.default)(x),N=new Set(C.split(" "));return[x,C,N]});return[g,B]});return function(g){var m=[],y=(0,t.default)(g),B=y.split(" ");return y.length?(h.forEach(function(S){for(var x=S[0],C=S[1],N=o,w=[],V=0,Ue=C.length;V<Ue;V+=1){var O=C[V],qe=O[0],Ae=O[1],Ie=O[2],P=d(qe,Ae,Ie,g,y,B,k);P?(N=Math.min(N,P[0]),w.push(P[1])):w.push(null)}N<o&&m.push({item:x,score:N,matches:w})}),m.sort(c),m):[]}}return z}var Y;function be(){return Y||(Y=1,function(t){t.__esModule=!0,t.default=c,t.fuzzyMatch=s;var n=o(G());t.normalizeText=n.default;function o(a){return a&&a.__esModule?a:{default:a}}function c(a,i){return i===void 0&&(i={}),J().createFuzzySearchImpl(a,i)}function s(a,i){return J().fuzzyMatchImpl(a,i)}}(D)),D}var ge=be();const he=K(ge),ye={key:0},_e=["colspan"],ke=["onClick"],Be=["innerHTML"],xe=e.defineComponent({__name:"Table",props:{zebra:{type:Boolean,default:!1},pinRows:{type:Boolean,default:!1},pinCols:{type:Boolean,default:!1},size:{default:F.MD},columns:{},dataSource:{},ajax:{},searchValue:{},searchFunction:{},onRowClick:{}},setup(t){const n=e.ref([]),o=e.ref([]),c=e.ref(null),s=t,a=e.ref(M("table",X.toClassName(s.size),{"table-zebra":s.zebra,"table-pin-rows":s.pinRows,"table-pin-cols ":s.pinCols})),i=(f,_)=>{s.onRowClick&&s.onRowClick(f,_)},d=(f,_)=>String(!f||typeof f!="object"?f:_.split(".").reduce((r,l)=>r&&(typeof r=="object"?r[l]:r),f)),E=(f,_)=>_.render===void 0?{}:_.render(d(f,_.data),f).props,$=f=>f&&typeof f=="object"&&"then"in f?e.defineAsyncComponent(()=>f):typeof f=="function"?e.defineAsyncComponent(f):f;e.onMounted(()=>{n.value=s.dataSource,o.value=s.dataSource}),e.watch(()=>s.dataSource,f=>{n.value=f,o.value=f},{immediate:!0}),e.watch(()=>s.searchValue,f=>{if(s.searchFunction){o.value=s.searchFunction(f??"");return}o.value=f?T(f):n.value},{immediate:!0});const T=f=>{const _=[];return n.value.length>0?(Object.keys(n.value[0]).forEach(l=>{const u=n.value.map(h=>d(h,l)),p=he(u)(f);for(const h of p){const g=n.value.filter(m=>d(m,l)===h.item);_.push(...g)}}),_):[]};return(f,_)=>(e.openBlock(),e.createElementBlock("table",{ref_key:"table",ref:c,class:e.normalizeClass(a.value)},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,r=>(e.openBlock(),e.createElementBlock("th",{key:r.title},e.toDisplayString(r.title),1))),128))])]),e.createElementVNode("tbody",null,[o.value.length===0?(e.openBlock(),e.createElementBlock("tr",ye,[e.createElementVNode("td",{colspan:s.columns.length},"No data found",8,_e)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(o.value,(r,l)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass(s.onRowClick?"hover":""),key:String(r),onClick:u=>i(r,l)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,u=>(e.openBlock(),e.createElementBlock("td",{key:u.title},[u.render?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d(r,u.data)),1)],64)),typeof u.render=="function"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[typeof u.render(d(r,u.data),r)=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:u.render(d(r,u.data),r)},null,8,Be)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(u.render(d(r,u.data),r).component)),e.mergeProps({key:1,ref_for:!0},E(r,u)),null,16))],64)):e.createCommentVNode("",!0)]))),128))],10,ke))),128))])],2))}}),Se=e.defineComponent({__name:"Stepper",props:{value:{}},emits:["update:value"],setup(t,{expose:n,emit:o}){const c=t,s=e.ref(c.value),a=o,i=d=>{s.value=d,a("update:value",d)};return e.provide("stepper",{value:s,updateValue:i}),e.watch(()=>c.value,d=>{s.value=d}),n({updateValue:i}),(d,E)=>e.renderSlot(d.$slots,"default",{updateValue:i})}}),Ce=e.defineComponent({__name:"Step",props:{value:{}},setup(t){const n=t,o=e.inject("stepper"),c=e.ref("");return e.watch(()=>o?.value.value,s=>{s&&n.value&&(c.value=Number(s)>=Number(n.value)?"step-primary":"")}),e.onMounted(()=>{o&&(c.value=o.value.value===n.value?"step-primary":"",Number(o.value.value)>=Number(n.value)&&(c.value="step-primary"))}),(s,a)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["step",c.value])},[e.renderSlot(s.$slots,"default")],2))}}),Ee={},Ne={class:"steps"};function we(t,n){return e.openBlock(),e.createElementBlock("ul",Ne,[e.renderSlot(t.$slots,"default")])}const ze=R(Ee,[["render",we]]),Me={key:0},Ve=e.defineComponent({__name:"StepPanels",setup(t){const n=e.inject("stepper");return(o,c)=>(e.openBlock(),e.createBlock(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[e.unref(n)?.value?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(o.$slots,"default",{currentStep:e.unref(n)?.value})])):e.createCommentVNode("",!0)]),_:3}))}}),$e={key:0},Te=e.defineComponent({__name:"StepPanel",props:{value:{}},setup(t,{expose:n}){const o=e.computed(()=>c?.value.value),c=e.inject("stepper"),s=a=>{c&&c.updateValue(a.toString())};return n({activateCallback:s}),(a,i)=>a.value===o.value?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(a.$slots,"default",{activateCallback:s})])):e.createCommentVNode("",!0)}}),Le={key:0,method:"dialog"},Fe=e.defineComponent({__name:"Modal",props:{closeButton:{type:Boolean,default:!0},overflow:{type:Boolean,default:!1},closeButtonSize:{default:F.SM},extraBoxClasses:{}},emits:["close"],setup(t,{expose:n,emit:o}){const c=e.ref(null),s=o,a=t,i=e.ref(M("modal-box",a.extraBoxClasses,{"overflow-visible":a.overflow})),d=e.ref(M("modal")),E=e.ref(M("btn",A.toClassName(a.closeButtonSize),"btn-circle","btn-ghost","absolute","right-2","top-2"));return n({showModal:()=>{c.value?.showModal()},closeModal:()=>{c.value?.close()}}),(f,_)=>(e.openBlock(),e.createElementBlock("dialog",{ref_key:"modal",ref:c,class:e.normalizeClass([d.value,f.$attrs.class]),"aria-modal":"true","aria-hidden":"true",role:"dialog",onClose:_[0]||(_[0]=r=>s("close",r))},[e.createElementVNode("div",{class:e.normalizeClass(i.value)},[f.closeButton?(e.openBlock(),e.createElementBlock("form",Le,[e.createElementVNode("button",{class:e.normalizeClass(E.value)},"✕",2)])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"default")],2),_[1]||(_[1]=e.createElementVNode("form",{method:"dialog",class:"modal-backdrop"},[e.createElementVNode("button",null,"close")],-1))],34))}}),ve={class:"hidden w-full max-w-sm lg:flex"},Re={class:"relative mx-3 w-full"},De={class:"relative w-full max-w-full"},We=["value"],Oe=e.defineComponent({__name:"SearchBar",props:["modelValue"],emits:["update:modelValue"],setup(t,{emit:n}){const o=t,c=e.ref(null),s=n,a=i=>{(i.ctrlKey||i.metaKey)&&i.key.toLowerCase()==="k"&&(i.preventDefault(),c.value&&c.value.focus())};return e.onMounted(()=>{document.addEventListener("keydown",a)}),e.onUnmounted(()=>{document.removeEventListener("keydown",a)}),(i,d)=>(e.openBlock(),e.createElementBlock("div",ve,[e.createElementVNode("label",Re,[d[1]||(d[1]=e.createElementVNode("svg",{class:"pointer-events-none absolute z-10 my-3.5 ms-4 text-base-content opacity-60","aria-hidden":"true",width:"16",height:"16",viewBox:"0.48 0.48 23.04 23.04",fill:"currentColor"},[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElementVNode("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})],-1)),e.createElementVNode("div",De,[e.createElementVNode("form",null,[e.createElementVNode("input",{ref_key:"searchInput",ref:c,type:"search",placeholder:"Zoeken...",value:o.modelValue,onInput:d[0]||(d[0]=E=>s("update:modelValue",E.target.value)),class:"color-[inherit] w-full rounded-xl border-[2px] border-solid border-transparent bg-transparent px-3 py-2 ps-10 focus:border-[2px] focus:border-base-200 focus:outline-none"},null,40,We)])]),d[2]||(d[2]=e.createElementVNode("div",{class:"pointer-events-none absolute end-10 top-2.5 hidden gap-1 opacity-50 lg:flex rtl:flex-row-reverse"},[e.createElementVNode("kbd",{class:"kbd kbd-sm"},"ctrl"),e.createElementVNode("kbd",{class:"kbd kbd-sm"},"K")],-1))])]))}}),Pe=["bg-primary","bg-primary-content","bg-secondary","bg-secondary-content","bg-accent","bg-accent-content","bg-neutral","bg-neutral-content","bg-base-100","bg-base-200","bg-base-300","bg-base-content","bg-info","bg-info-content","bg-success","bg-success-content","bg-warning","bg-warning-content","bg-error","bg-error-content","btn-primary","btn-primary-content","btn-secondary","btn-secondary-content","btn-accent","btn-accent-content","btn-neutral","btn-neutral-content","btn-base-100","btn-base-200","btn-base-300","btn-base-content","btn-info","btn-info-content","btn-success","btn-success-content","btn-warning","btn-warning-content","btn-error","btn-error-content","text-primary","text-primary-content","text-secondary","text-secondary-content","text-accent","text-accent-content","text-neutral","text-neutral-content","text-base-100","text-base-200","text-base-300","text-base-content","text-info","text-info-content","text-success","text-success-content","text-warning","text-warning-content","text-error","text-error-content","text-transparent","step","steps","modal","modal-box","btn","btn-sm","btn-circle","btn-ghost","absolute","right-2","top-2","shadow-lg","w-full","rounded-xs","rounded-sm","rounded-md","rounded-lg","rounded-xl","rounded-2xl","rounded-3xl","hidden","block"];b.BackgroundColorUtils=U,b.Button=ae,b.ButtonColorUtils=q,b.ButtonSizeUtils=A,b.Card=le,b.CardBody=fe,b.CardTitle=pe,b.Color=L,b.Container=me,b.Modal=Fe,b.RoundedSizeUtils=I,b.SearchBar=Oe,b.SimpleButton=ce,b.Size=F,b.Step=Ce,b.StepList=ze,b.StepPanel=Te,b.StepPanels=Ve,b.Stepper=Se,b.Table=xe,b.TableSizeUtils=X,b.TextColorUtils=Q,b.dendelionSafeList=Pe,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|
|
5
|
+
*/var j;function ee(){return j||(j=1,function(t){(function(){var n={}.hasOwnProperty;function o(){for(var a="",u=0;u<arguments.length;u++){var d=arguments[u];d&&(a=s(a,c(d)))}return a}function c(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return o.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var u="";for(var d in a)n.call(a,d)&&a[d]&&(u=s(u,d));return u}function s(a,u){return u?a?a+" "+u:a+u:a}t.exports?(o.default=o,t.exports=o):window.classNames=o})()}(R)),R.exports}var te=ee();const V=K(te),ne=["type","disabled"],re={class:"group-[.is-loading]:text-transparent"},ae=e.defineComponent({__name:"Button",props:{type:{default:"button"},loading:{type:Boolean},color:{default:L.Neutral},soft:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},disabled:{type:Boolean},click:{}},setup(t){const n=t,o=e.computed(()=>V("btn","group",q.toClassName(n.color),n.soft?"btn-soft":"",n.outline?"btn-outline":"",n.loading?"is-loading":"",n.disabled?"disabled":""));return(c,s)=>(e.openBlock(),e.createElementBlock("button",{onClick:s[0]||(s[0]=a=>c.click?c.click:void 0),class:e.normalizeClass(o.value),type:c.type,disabled:c.disabled||c.loading},[s[1]||(s[1]=e.createElementVNode("span",{class:"loading loading-spinner loading-md absolute hidden group-[.is-loading]:block"},null,-1)),e.createElementVNode("span",re,[e.renderSlot(c.$slots,"default")])],10,ne))}}),v=(t,n)=>{const o=t.__vccOpts||t;for(const[c,s]of n)o[c]=s;return o},se={};function oe(t,n){return e.openBlock(),e.createElementBlock("button")}const ce=v(se,[["render",oe]]),le=e.defineComponent({__name:"Card",props:{backgroundColor:{default:L.Primary},shadow:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},rounded:{type:Boolean},roundedSize:{}},setup(t){const n=t,o=e.ref(V("card",U.toClassName(n.backgroundColor),n.shadow?"shadow-lg":"",n.fullWidth?"w-full":"",n.rounded&&!n.roundedSize?"rounded":n.roundedSize?I.toClassName(n.roundedSize):""));return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.value)},[e.renderSlot(c.$slots,"default")],2))}}),ie={},ue={class:"card-body"};function de(t,n){return e.openBlock(),e.createElementBlock("div",ue,[e.renderSlot(t.$slots,"default")])}const fe=v(ie,[["render",de]]),pe=e.defineComponent({__name:"CardTitle",props:{is:{default:"h1"},text:{default:""}},setup(t){return(n,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.is),{class:"card-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.text),1)]),_:1}))}}),me=e.defineComponent({__name:"Container",props:{container:{type:Boolean,default:!0},padding:{type:Boolean,default:!0}},setup(t){const n=t,o=e.ref([n.container?"container":"",n.padding?"p-6":""]);return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.value)},[e.renderSlot(c.$slots,"default")],2))}});var D={},W={},H;function G(){return H||(H=1,function(t){t.__esModule=!0,t.default=s;var n=/[\u0300-\u036f]/g,o=/ł/g,c=/ñ/g;function s(a){return a.toLowerCase().normalize("NFD").replace(n,"").replace(o,"l").replace(c,"n").trim()}}(W)),W}var z={},Z;function J(){if(Z)return z;Z=1,z.__esModule=!0,z.aggressiveFuzzyMatch=E,z.createFuzzySearchImpl=_,z.experimentalSmartFuzzyMatch=$,z.fuzzyMatchImpl=f;var t=n(G());function n(r){return r&&r.__esModule?r:{default:r}}var o=Number.MAX_SAFE_INTEGER,c=function(l,i){return l.score-i.score},s=function(l,i){return l[0]-i[0]},a=new Set(` []()-–—'"“”`.split(""));function u(r){return a.has(r)}function d(r,l,i,k,p,h,g){if(r===k)return[0,[[0,r.length-1]]];var m=k.length,y=l.length,B=p.length;if(l===p)return[.1,[[0,y-1]]];if(l.startsWith(p))return[.5,[[0,B-1]]];var S=r.indexOf(k);if(S>-1&&u(r[S-1]))return[.9,[[S,S+m-1]]];var x=l.indexOf(p);if(x>-1&&u(l[x-1]))return[1,[[x,x+m-1]]];var C=h.length;if(C>1&&h.every(function(w){return i.has(w)})){var N=1.5+C*.2;return[N,h.map(function(w){var M=l.indexOf(w);return[M,M+w.length-1]}).sort(s)]}return x>-1?[2,[[x,x+m-1]]]:g==="aggressive"?E(l,p):g==="smart"?$(l,p):null}function E(r,l){for(var i=r.length,k=l.length,p=0,h=l[p],g=[],m=-1,y=-2,B=0;B<i;B+=1)if(r[B]===h){if(B!==y+1&&(m>=0&&g.push([m,y]),m=B),y=B,p+=1,p===k)return g.push([m,y]),T(g,r);h=l[p]}return null}function $(r,l){for(var i=r.length,k=[],p=0,h=l[p],g=-1,m=-2;;){var y=r.indexOf(h,m+1);if(y===-1)break;if(y===0||u(r[y-1]))g=y;else{var B=l.length-p,S=r.length-y,x=Math.min(3,B,S),C=l.slice(p,p+x);if(r.slice(y,y+x)===C)g=y;else{m+=1;continue}}for(m=g;m<i&&r[m]===h;m+=1)p+=1,h=l[p];if(m-=1,k.push([g,m]),p===l.length)return T(k,r)}return null}function T(r,l){var i=2;return r.forEach(function(k){var p=k[0],h=k[1],g=h-p+1,m=p===0||l[p]===" "||l[p-1]===" ",y=h===l.length-1||l[h]===" "||l[h+1]===" ",B=m&&y;B?i+=.2:m?i+=.4:g>=3?i+=.8:i+=1.6}),[i,r]}function f(r,l){var i=(0,t.default)(l),k=i.split(" "),p=(0,t.default)(r),h=new Set(p.split(" ")),g=d(r,p,h,l,i,k,"smart");return g?{item:r,score:g[0],matches:[g[1]]}:null}function _(r,l){var i=l.strategy,k=i===void 0?"aggressive":i,p=l.getText,h=r.map(function(g){var m;if(p)m=p(g);else{var y=l.key?g[l.key]:g;m=[y]}var B=m.map(function(S){var x=S||"",C=(0,t.default)(x),N=new Set(C.split(" "));return[x,C,N]});return[g,B]});return function(g){var m=[],y=(0,t.default)(g),B=y.split(" ");return y.length?(h.forEach(function(S){for(var x=S[0],C=S[1],N=o,w=[],M=0,Ue=C.length;M<Ue;M+=1){var O=C[M],qe=O[0],Ae=O[1],Ie=O[2],P=d(qe,Ae,Ie,g,y,B,k);P?(N=Math.min(N,P[0]),w.push(P[1])):w.push(null)}N<o&&m.push({item:x,score:N,matches:w})}),m.sort(c),m):[]}}return z}var Y;function be(){return Y||(Y=1,function(t){t.__esModule=!0,t.default=c,t.fuzzyMatch=s;var n=o(G());t.normalizeText=n.default;function o(a){return a&&a.__esModule?a:{default:a}}function c(a,u){return u===void 0&&(u={}),J().createFuzzySearchImpl(a,u)}function s(a,u){return J().fuzzyMatchImpl(a,u)}}(D)),D}var ge=be();const he=K(ge),ye={key:0},_e=["colspan"],ke=["onClick"],Be=["innerHTML"],xe=e.defineComponent({__name:"Table",props:{zebra:{type:Boolean,default:!1},pinRows:{type:Boolean,default:!1},pinCols:{type:Boolean,default:!1},size:{default:F.MD},columns:{},dataSource:{},ajax:{},searchValue:{},searchFunction:{},onRowClick:{}},setup(t){const n=e.ref([]),o=e.ref([]),c=e.ref(null),s=t,a=e.ref(V("table",X.toClassName(s.size),{"table-zebra":s.zebra,"table-pin-rows":s.pinRows,"table-pin-cols ":s.pinCols})),u=(f,_)=>{s.onRowClick&&s.onRowClick(f,_)},d=(f,_)=>String(!f||typeof f!="object"?f:_.split(".").reduce((r,l)=>r&&(typeof r=="object"?r[l]:r),f)),E=(f,_)=>_.render===void 0?{}:_.render(d(f,_.data),f).props,$=f=>(console.log("getComponent",f),f&&typeof f=="object"&&"then"in f?e.defineAsyncComponent(()=>f):typeof f=="function"?e.defineAsyncComponent(f):f);e.onMounted(()=>{n.value=s.dataSource,o.value=s.dataSource}),e.watch(()=>s.dataSource,f=>{n.value=f,o.value=f},{immediate:!0}),e.watch(()=>s.searchValue,f=>{if(s.searchFunction){o.value=s.searchFunction(f??"");return}o.value=f?T(f):n.value},{immediate:!0});const T=f=>{const _=[];return n.value.length>0?(Object.keys(n.value[0]).forEach(l=>{const i=n.value.map(h=>d(h,l)),p=he(i)(f);for(const h of p){const g=n.value.filter(m=>d(m,l)===h.item);_.push(...g)}}),_):[]};return(f,_)=>(e.openBlock(),e.createElementBlock("table",{ref_key:"table",ref:c,class:e.normalizeClass(a.value)},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,r=>(e.openBlock(),e.createElementBlock("th",{key:r.title},e.toDisplayString(r.title),1))),128))])]),e.createElementVNode("tbody",null,[o.value.length===0?(e.openBlock(),e.createElementBlock("tr",ye,[e.createElementVNode("td",{colspan:s.columns.length},"No data found",8,_e)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(o.value,(r,l)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass(s.onRowClick?"hover":""),key:String(r),onClick:i=>u(r,l)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,i=>(e.openBlock(),e.createElementBlock("td",{key:i.title},[i.render?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d(r,i.data)),1)],64)),typeof i.render=="function"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[typeof i.render(d(r,i.data),r)=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:i.render(d(r,i.data),r)},null,8,Be)):e.isVNode(i.render(d(r,i.data),r))?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.render(d(r,i.data),r)),{key:1})):(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(i.render(d(r,i.data),r).component)),e.mergeProps({key:2,ref_for:!0},E(r,i)),null,16))],64)):e.createCommentVNode("",!0)]))),128))],10,ke))),128))])],2))}}),Se=e.defineComponent({__name:"Stepper",props:{value:{}},emits:["update:value"],setup(t,{expose:n,emit:o}){const c=t,s=e.ref(c.value),a=o,u=d=>{s.value=d,a("update:value",d)};return e.provide("stepper",{value:s,updateValue:u}),e.watch(()=>c.value,d=>{s.value=d}),n({updateValue:u}),(d,E)=>e.renderSlot(d.$slots,"default",{updateValue:u})}}),Ce=e.defineComponent({__name:"Step",props:{value:{}},setup(t){const n=t,o=e.inject("stepper"),c=e.ref("");return e.watch(()=>o?.value.value,s=>{s&&n.value&&(c.value=Number(s)>=Number(n.value)?"step-primary":"")}),e.onMounted(()=>{o&&(c.value=o.value.value===n.value?"step-primary":"",Number(o.value.value)>=Number(n.value)&&(c.value="step-primary"))}),(s,a)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["step",c.value])},[e.renderSlot(s.$slots,"default")],2))}}),Ee={},Ne={class:"steps"};function we(t,n){return e.openBlock(),e.createElementBlock("ul",Ne,[e.renderSlot(t.$slots,"default")])}const ze=v(Ee,[["render",we]]),Ve={key:0},Me=e.defineComponent({__name:"StepPanels",setup(t){const n=e.inject("stepper");return(o,c)=>(e.openBlock(),e.createBlock(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[e.unref(n)?.value?(e.openBlock(),e.createElementBlock("div",Ve,[e.renderSlot(o.$slots,"default",{currentStep:e.unref(n)?.value})])):e.createCommentVNode("",!0)]),_:3}))}}),$e={key:0},Te=e.defineComponent({__name:"StepPanel",props:{value:{}},setup(t,{expose:n}){const o=e.computed(()=>c?.value.value),c=e.inject("stepper"),s=a=>{c&&c.updateValue(a.toString())};return n({activateCallback:s}),(a,u)=>a.value===o.value?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(a.$slots,"default",{activateCallback:s})])):e.createCommentVNode("",!0)}}),Le={key:0,method:"dialog"},Fe=e.defineComponent({__name:"Modal",props:{closeButton:{type:Boolean,default:!0},overflow:{type:Boolean,default:!1},closeButtonSize:{default:F.SM},extraBoxClasses:{}},emits:["close"],setup(t,{expose:n,emit:o}){const c=e.ref(null),s=o,a=t,u=e.ref(V("modal-box",a.extraBoxClasses,{"overflow-visible":a.overflow})),d=e.ref(V("modal")),E=e.ref(V("btn",A.toClassName(a.closeButtonSize),"btn-circle","btn-ghost","absolute","right-2","top-2"));return n({showModal:()=>{c.value?.showModal()},closeModal:()=>{c.value?.close()}}),(f,_)=>(e.openBlock(),e.createElementBlock("dialog",{ref_key:"modal",ref:c,class:e.normalizeClass([d.value,f.$attrs.class]),"aria-modal":"true","aria-hidden":"true",role:"dialog",onClose:_[0]||(_[0]=r=>s("close",r))},[e.createElementVNode("div",{class:e.normalizeClass(u.value)},[f.closeButton?(e.openBlock(),e.createElementBlock("form",Le,[e.createElementVNode("button",{class:e.normalizeClass(E.value)},"✕",2)])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"default")],2),_[1]||(_[1]=e.createElementVNode("form",{method:"dialog",class:"modal-backdrop"},[e.createElementVNode("button",null,"close")],-1))],34))}}),Re={class:"hidden w-full max-w-sm lg:flex"},ve={class:"relative mx-3 w-full"},De={class:"relative w-full max-w-full"},We=["value"],Oe=e.defineComponent({__name:"SearchBar",props:["modelValue"],emits:["update:modelValue"],setup(t,{emit:n}){const o=t,c=e.ref(null),s=n,a=u=>{(u.ctrlKey||u.metaKey)&&u.key.toLowerCase()==="k"&&(u.preventDefault(),c.value&&c.value.focus())};return e.onMounted(()=>{document.addEventListener("keydown",a)}),e.onUnmounted(()=>{document.removeEventListener("keydown",a)}),(u,d)=>(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("label",ve,[d[1]||(d[1]=e.createElementVNode("svg",{class:"pointer-events-none absolute z-10 my-3.5 ms-4 text-base-content opacity-60","aria-hidden":"true",width:"16",height:"16",viewBox:"0.48 0.48 23.04 23.04",fill:"currentColor"},[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElementVNode("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})],-1)),e.createElementVNode("div",De,[e.createElementVNode("form",null,[e.createElementVNode("input",{ref_key:"searchInput",ref:c,type:"search",placeholder:"Zoeken...",value:o.modelValue,onInput:d[0]||(d[0]=E=>s("update:modelValue",E.target.value)),class:"color-[inherit] w-full rounded-xl border-[2px] border-solid border-transparent bg-transparent px-3 py-2 ps-10 focus:border-[2px] focus:border-base-200 focus:outline-none"},null,40,We)])]),d[2]||(d[2]=e.createElementVNode("div",{class:"pointer-events-none absolute end-10 top-2.5 hidden gap-1 opacity-50 lg:flex rtl:flex-row-reverse"},[e.createElementVNode("kbd",{class:"kbd kbd-sm"},"ctrl"),e.createElementVNode("kbd",{class:"kbd kbd-sm"},"K")],-1))])]))}}),Pe=["bg-primary","bg-primary-content","bg-secondary","bg-secondary-content","bg-accent","bg-accent-content","bg-neutral","bg-neutral-content","bg-base-100","bg-base-200","bg-base-300","bg-base-content","bg-info","bg-info-content","bg-success","bg-success-content","bg-warning","bg-warning-content","bg-error","bg-error-content","btn-primary","btn-primary-content","btn-secondary","btn-secondary-content","btn-accent","btn-accent-content","btn-neutral","btn-neutral-content","btn-base-100","btn-base-200","btn-base-300","btn-base-content","btn-info","btn-info-content","btn-success","btn-success-content","btn-warning","btn-warning-content","btn-error","btn-error-content","text-primary","text-primary-content","text-secondary","text-secondary-content","text-accent","text-accent-content","text-neutral","text-neutral-content","text-base-100","text-base-200","text-base-300","text-base-content","text-info","text-info-content","text-success","text-success-content","text-warning","text-warning-content","text-error","text-error-content","text-transparent","step","steps","modal","modal-box","btn","btn-sm","btn-circle","btn-ghost","absolute","right-2","top-2","shadow-lg","w-full","rounded-xs","rounded-sm","rounded-md","rounded-lg","rounded-xl","rounded-2xl","rounded-3xl","hidden","block"];b.BackgroundColorUtils=U,b.Button=ae,b.ButtonColorUtils=q,b.ButtonSizeUtils=A,b.Card=le,b.CardBody=fe,b.CardTitle=pe,b.Color=L,b.Container=me,b.Modal=Fe,b.RoundedSizeUtils=I,b.SearchBar=Oe,b.SimpleButton=ce,b.Size=F,b.Step=Ce,b.StepList=ze,b.StepPanel=Te,b.StepPanels=Me,b.Stepper=Se,b.Table=xe,b.TableSizeUtils=X,b.TextColorUtils=Q,b.dendelionSafeList=Pe,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Size } from '@/types';
|
|
2
|
-
import { Component } from 'vue';
|
|
2
|
+
import { Component, VNode } from 'vue';
|
|
3
3
|
export type TableProps<T> = {
|
|
4
4
|
zebra?: boolean;
|
|
5
5
|
pinRows?: boolean;
|
|
@@ -15,7 +15,7 @@ export type TableProps<T> = {
|
|
|
15
15
|
export type Column<T> = {
|
|
16
16
|
title: string;
|
|
17
17
|
data: string;
|
|
18
|
-
render?: (text: string, row: T) => string | ColumnComponent;
|
|
18
|
+
render?: (text: string, row: T) => string | ColumnComponent | VNode;
|
|
19
19
|
extraClasses?: ExtraClasses;
|
|
20
20
|
};
|
|
21
21
|
export type ExtraClasses = {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dendelion-ui",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "Simpel component library using Tailwind css and DaisyUI",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.17",
|
|
6
6
|
"author": "ThatzOkay",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"homepage": "https://github.com/ThatzOkay/DendelionUI#readme",
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
v-if="typeof column.render(getValue(row, column.data), row as T) === 'string'"
|
|
22
22
|
v-html="column.render(getValue(row, column.data), row as T)"
|
|
23
23
|
/>
|
|
24
|
+
|
|
25
|
+
<component v-else-if="isVNode(column.render(getValue(row, column.data), row as T))" :is="column.render(getValue(row, column.data), row as T)" />
|
|
26
|
+
|
|
24
27
|
<component
|
|
25
28
|
v-else
|
|
26
29
|
:is="getComponent((column.render(getValue(row, column.data), row as T) as ColumnComponent).component)"
|
|
@@ -34,7 +37,8 @@
|
|
|
34
37
|
</template>
|
|
35
38
|
|
|
36
39
|
<script setup lang="ts" generic="T">
|
|
37
|
-
import {
|
|
40
|
+
import { defineAsyncComponent, isVNode, onMounted, ref, watch } from 'vue';
|
|
41
|
+
import type { Component } from 'vue';
|
|
38
42
|
import { Column, ColumnComponent, ComponentImport, ComponentOrImport, TableProps } from './interface';
|
|
39
43
|
import classNames from 'classnames';
|
|
40
44
|
import { Size, TableSizeUtils } from '../../types';
|
|
@@ -83,6 +87,7 @@ const getProps = (row: any, column: Column<T>) => {
|
|
|
83
87
|
};
|
|
84
88
|
|
|
85
89
|
const getComponent = (component: ComponentOrImport) => {
|
|
90
|
+
console.log('getComponent', component);
|
|
86
91
|
if (component && typeof component === 'object' && 'then' in component) {
|
|
87
92
|
return defineAsyncComponent(() => component as ComponentImport);
|
|
88
93
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Size } from '@/types';
|
|
2
|
-
import { Component } from 'vue';
|
|
2
|
+
import { Component, VNode } from 'vue';
|
|
3
3
|
|
|
4
4
|
export type TableProps<T> = {
|
|
5
5
|
zebra?: boolean;
|
|
@@ -17,7 +17,7 @@ export type TableProps<T> = {
|
|
|
17
17
|
export type Column<T> = {
|
|
18
18
|
title: string;
|
|
19
19
|
data: string;
|
|
20
|
-
render?: (text: string, row: T) => string | ColumnComponent;
|
|
20
|
+
render?: (text: string, row: T) => string | ColumnComponent | VNode;
|
|
21
21
|
extraClasses?: ExtraClasses;
|
|
22
22
|
};
|
|
23
23
|
|