dendelion-ui 0.0.14 → 0.0.16
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 +1 -1
- package/dist/dendelion-ui.es.js +90 -95
- package/dist/dendelion-ui.umd.js +1 -1
- package/dist/types/components/button/Button.vue.d.ts +2 -2
- package/dist/types/components/button/SimpleButton.vue.d.ts +1 -1
- package/dist/types/components/card/Card.vue.d.ts +2 -2
- package/dist/types/components/card/CardBody.vue.d.ts +1 -1
- package/dist/types/components/card/CardTitle.vue.d.ts +1 -1
- package/dist/types/components/container/Container.vue.d.ts +1 -1
- package/dist/types/components/modal/Modal.vue.d.ts +1 -1
- package/dist/types/components/modal/interface.d.ts +1 -1
- package/dist/types/components/search/SearchBar.vue.d.ts +1 -1
- package/dist/types/components/stepper/Step.vue.d.ts +1 -1
- package/dist/types/components/stepper/StepList.vue.d.ts +1 -1
- package/dist/types/components/stepper/StepPanels.vue.d.ts +3 -3
- package/dist/types/components/table/Table.vue.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/button/Button.vue +1 -1
- package/src/components/card/Card.vue +1 -1
- package/src/components/modal/Modal.vue +5 -5
- package/src/components/modal/interface.ts +1 -1
- package/src/components/table/Table.vue +1 -1
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="",i=0;i<arguments.length;i++){var f=arguments[i];f&&(a=s(a,c(f)))}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 f in a)n.call(a,f)&&a[f]&&(i=s(i,f));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))}}),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=u;var t=n(J());function n(r){return r&&r.__esModule?r:{default:r}}var o=Number.MAX_SAFE_INTEGER,c=function(l,d){return l.score-d.score},s=function(l,d){return l[0]-d[0]},a=new Set(` []()-–—'"“”`.split(""));function i(r){return a.has(r)}function f(r,l,d,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&&i(r[x-1]))return[.9,[[x,x+m-1]]];var k=l.indexOf(p);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 d.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 d=r.length,y=l.length,p=0,v=l[p],b=[],m=-1,g=-2,_=0;_<d;_+=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 d=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||i(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<d&&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 d=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;_?d+=.2:m?d+=.4:b>=3?d+=.8:d+=1.6}),[d,r]}function u(r,l){var d=(0,t.default)(l),y=d.split(" "),p=(0,t.default)(r),v=new Set(p.split(" ")),b=f(r,p,v,l,d,y,"smart");return b?{item:r,score:b[0],matches:[b[1]]}:null}function h(r,l){var d=l.strategy,y=d===void 0?"aggressive":d,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=f(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=(u,h)=>{s.onRowClick&&s.onRowClick(u,h)},f=(u,h)=>String(!u||typeof u!="object"?u:h.split(".").reduce((r,l)=>r&&(typeof r=="object"?r[l]:r),u)),S=(u,h)=>h.render===void 0?{}:h.render(f(u,h.data),u).props,M=u=>u&&typeof u=="object"&&"then"in u?e.defineAsyncComponent(()=>u):typeof u=="function"?e.defineAsyncComponent(u):u;e.onMounted(()=>{n.value=s.dataSource,o.value=s.dataSource}),e.watch(()=>s.dataSource,u=>{n.value=u,o.value=u},{immediate:!0}),e.watch(()=>s.searchValue,u=>{if(s.searchFunction){o.value=s.searchFunction(u??"");return}o.value=u?V(u):n.value},{immediate:!0});const V=u=>{const h=[];return n.value.length>0?(Object.keys(n.value[0]).forEach(l=>{const d=n.value.map(v=>f(v,l)),p=_e(d)(u);for(const v of p){const b=n.value.filter(m=>f(m,l)===v.item);h.push(...b)}}),h):[]};return(u,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:d=>i(r,l)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,d=>(e.openBlock(),e.createElementBlock("td",{key:d.title},[d.render?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f(r,d.data)),1)],64)),typeof d.render=="function"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[typeof d.render(f(r,d.data),r)=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:d.render(f(r,d.data),r)},null,8,Se)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M(d.render(f(r,d.data),r).component)),e.mergeProps({key:1,ref_for:!0},S(r,d)),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=f=>{s.value=f,a("update:value",f)};return e.provide("stepper",{value:s,updateValue:i}),e.watch(()=>c.value,f=>{s.value=f}),n({updateValue:i}),(f,S)=>e.renderSlot(f.$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==null?void 0: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(()=>{var s,a;return[(s=e.unref(n))!=null&&s.value?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(o.$slots,"default",{currentStep:(a=e.unref(n))==null?void 0:a.value})])):e.createCommentVNode("",!0)]}),_:3}))}}),Le={key:0},Fe=e.defineComponent({__name:"StepPanel",props:{value:{}},setup(t,{expose:n}){const o=e.computed(()=>c==null?void 0: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)),f=e.ref(z("modal",{"overflow-visible":a.overflow})),S=e.ref(z("btn",H.toClassName(a.closeButtonSize),"btn-circle","btn-ghost","absolute","right-2","top-2"));return n({showModal:()=>{var u;(u=c.value)==null||u.showModal()},closeModal:()=>{var u;(u=c.value)==null||u.close()}}),(u,h)=>(e.openBlock(),e.createElementBlock("dialog",{ref_key:"modal",ref:c,class:e.normalizeClass([f.value,u.$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)},[u.closeButton?(e.openBlock(),e.createElementBlock("form",Re,[e.createElementVNode("button",{class:e.normalizeClass(S.value)},"✕",2)])):e.createCommentVNode("",!0),e.renderSlot(u.$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,f)=>(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("label",Oe,[f[1]||(f[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:f[0]||(f[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)])]),f[2]||(f[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="",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;
|
package/dist/dendelion-ui.es.js
CHANGED
|
@@ -226,9 +226,9 @@ function Ce() {
|
|
|
226
226
|
(function() {
|
|
227
227
|
var t = {}.hasOwnProperty;
|
|
228
228
|
function s() {
|
|
229
|
-
for (var r = "",
|
|
230
|
-
var
|
|
231
|
-
|
|
229
|
+
for (var r = "", c = 0; c < arguments.length; c++) {
|
|
230
|
+
var i = arguments[c];
|
|
231
|
+
i && (r = a(r, u(i)));
|
|
232
232
|
}
|
|
233
233
|
return r;
|
|
234
234
|
}
|
|
@@ -241,13 +241,13 @@ 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
|
|
245
|
-
for (var
|
|
246
|
-
t.call(r,
|
|
247
|
-
return
|
|
244
|
+
var c = "";
|
|
245
|
+
for (var i in r)
|
|
246
|
+
t.call(r, i) && r[i] && (c = a(c, i));
|
|
247
|
+
return c;
|
|
248
248
|
}
|
|
249
|
-
function a(r,
|
|
250
|
-
return
|
|
249
|
+
function a(r, c) {
|
|
250
|
+
return c ? r ? r + " " + c : r + c : r;
|
|
251
251
|
}
|
|
252
252
|
e.exports ? (s.default = s, e.exports = s) : window.classNames = s;
|
|
253
253
|
})();
|
|
@@ -375,26 +375,26 @@ function fe() {
|
|
|
375
375
|
var E = {}, ae;
|
|
376
376
|
function se() {
|
|
377
377
|
if (ae) return E;
|
|
378
|
-
ae = 1, E.__esModule = !0, E.aggressiveFuzzyMatch = N, E.createFuzzySearchImpl = _, E.experimentalSmartFuzzyMatch = W, E.fuzzyMatchImpl =
|
|
378
|
+
ae = 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, l) {
|
|
384
384
|
return (
|
|
385
385
|
/*: number*/
|
|
386
|
-
o.score -
|
|
386
|
+
o.score - l.score
|
|
387
387
|
);
|
|
388
|
-
}, a = function(o,
|
|
388
|
+
}, a = function(o, l) {
|
|
389
389
|
return (
|
|
390
390
|
/*: number*/
|
|
391
|
-
o[0] -
|
|
391
|
+
o[0] - l[0]
|
|
392
392
|
);
|
|
393
393
|
}, r = new Set(` []()-–—'"“”`.split(""));
|
|
394
|
-
function
|
|
394
|
+
function c(n) {
|
|
395
395
|
return r.has(n);
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function i(n, o, l, 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 && c(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 && c(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 l.has(L);
|
|
414
414
|
})) {
|
|
415
415
|
var T = 1.5 + $ * 0.2;
|
|
416
416
|
return [T, g.map(function(L) {
|
|
@@ -421,7 +421,7 @@ 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 l = n.length, x = o.length, f = 0, g = o[f], b = [], p = -1, h = -2, S = 0; S < l; 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
427
|
return b.push([p, h]), O(b, n);
|
|
@@ -430,11 +430,11 @@ function se() {
|
|
|
430
430
|
return null;
|
|
431
431
|
}
|
|
432
432
|
function W(n, o) {
|
|
433
|
-
for (var
|
|
433
|
+
for (var l = 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 || c(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,7 +445,7 @@ function se() {
|
|
|
445
445
|
continue;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
for (p = b; p <
|
|
448
|
+
for (p = b; p < l && 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
451
|
return O(x, n);
|
|
@@ -453,14 +453,14 @@ function se() {
|
|
|
453
453
|
return null;
|
|
454
454
|
}
|
|
455
455
|
function O(n, o) {
|
|
456
|
-
var
|
|
456
|
+
var l = 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 ? l += 0.2 : p ? l += 0.4 : b >= 3 ? l += 0.8 : l += 1.6;
|
|
460
|
+
}), [l, n];
|
|
461
461
|
}
|
|
462
|
-
function
|
|
463
|
-
var
|
|
462
|
+
function d(n, o) {
|
|
463
|
+
var l = (0, e.default)(o), x = l.split(" "), f = (0, e.default)(n), g = new Set(f.split(" ")), b = i(n, f, g, o, l, 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 l = o.strategy, x = l === void 0 ? "aggressive" : l, f = o.getText, g = n.map(function(b) {
|
|
472
472
|
var p;
|
|
473
473
|
if (f)
|
|
474
474
|
p = f(b);
|
|
@@ -486,7 +486,7 @@ 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 q = $[F], be = q[0], ve = q[1], ge = q[2], A =
|
|
489
|
+
var q = $[F], be = q[0], ve = q[1], ge = q[2], A = i(be, ve, ge, b, h, S, x);
|
|
490
490
|
A ? (T = Math.min(T, A[0]), L.push(A[1])) : L.push(null);
|
|
491
491
|
}
|
|
492
492
|
T < s && p.push({
|
|
@@ -508,11 +508,11 @@ function Re() {
|
|
|
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, c) {
|
|
512
|
+
return c === void 0 && (c = {}), se().createFuzzySearchImpl(r, c);
|
|
513
513
|
}
|
|
514
|
-
function a(r,
|
|
515
|
-
return se().fuzzyMatchImpl(r,
|
|
514
|
+
function a(r, c) {
|
|
515
|
+
return se().fuzzyMatchImpl(r, c);
|
|
516
516
|
}
|
|
517
517
|
}(U)), U;
|
|
518
518
|
}
|
|
@@ -538,39 +538,39 @@ const Oe = /* @__PURE__ */ de(We), Ve = { key: 0 }, De = ["colspan"], Pe = ["onC
|
|
|
538
538
|
"table-pin-rows": a.pinRows,
|
|
539
539
|
"table-pin-cols ": a.pinCols
|
|
540
540
|
})
|
|
541
|
-
),
|
|
542
|
-
a.onRowClick && a.onRowClick(
|
|
543
|
-
},
|
|
541
|
+
), c = (d, _) => {
|
|
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 ? ee(() => d) : typeof d == "function" ? ee(d) : d;
|
|
544
544
|
j(() => {
|
|
545
545
|
t.value = a.dataSource, s.value = a.dataSource;
|
|
546
546
|
}), P(
|
|
547
547
|
() => a.dataSource,
|
|
548
|
-
(
|
|
549
|
-
t.value =
|
|
548
|
+
(d) => {
|
|
549
|
+
t.value = d, s.value = d;
|
|
550
550
|
},
|
|
551
551
|
{ immediate: !0 }
|
|
552
552
|
), P(
|
|
553
553
|
() => a.searchValue,
|
|
554
|
-
(
|
|
554
|
+
(d) => {
|
|
555
555
|
if (a.searchFunction) {
|
|
556
|
-
s.value = a.searchFunction(
|
|
556
|
+
s.value = a.searchFunction(d ?? "");
|
|
557
557
|
return;
|
|
558
558
|
}
|
|
559
|
-
s.value =
|
|
559
|
+
s.value = d ? O(d) : t.value;
|
|
560
560
|
},
|
|
561
561
|
{ immediate: !0 }
|
|
562
562
|
);
|
|
563
|
-
const O = (
|
|
563
|
+
const O = (d) => {
|
|
564
564
|
const _ = [];
|
|
565
565
|
return t.value.length > 0 ? (Object.keys(t.value[0]).forEach((o) => {
|
|
566
|
-
const
|
|
566
|
+
const l = t.value.map((g) => i(g, o)), f = Oe(l)(d);
|
|
567
567
|
for (const g of f) {
|
|
568
|
-
const b = t.value.filter((p) =>
|
|
568
|
+
const b = t.value.filter((p) => i(p, o) === g.item);
|
|
569
569
|
_.push(...b);
|
|
570
570
|
}
|
|
571
571
|
}), _) : [];
|
|
572
572
|
};
|
|
573
|
-
return (
|
|
573
|
+
return (d, _) => (v(), m("table", {
|
|
574
574
|
ref_key: "table",
|
|
575
575
|
ref: u,
|
|
576
576
|
class: z(r.value)
|
|
@@ -590,22 +590,22 @@ const Oe = /* @__PURE__ */ de(We), Ve = { key: 0 }, De = ["colspan"], Pe = ["onC
|
|
|
590
590
|
])) : (v(!0), m(V, { key: 1 }, X(s.value, (n, o) => (v(), m("tr", {
|
|
591
591
|
class: z(a.onRowClick ? "hover" : ""),
|
|
592
592
|
key: String(n),
|
|
593
|
-
onClick: (
|
|
593
|
+
onClick: (l) => c(n, o)
|
|
594
594
|
}, [
|
|
595
|
-
(v(!0), m(V, null, X(a.columns, (
|
|
596
|
-
key:
|
|
595
|
+
(v(!0), m(V, null, X(a.columns, (l) => (v(), m("td", {
|
|
596
|
+
key: l.title
|
|
597
597
|
}, [
|
|
598
|
-
|
|
599
|
-
ie(H(
|
|
598
|
+
l.render ? D("", !0) : (v(), m(V, { key: 0 }, [
|
|
599
|
+
ie(H(i(n, l.data)), 1)
|
|
600
600
|
], 64)),
|
|
601
|
-
typeof
|
|
602
|
-
typeof
|
|
601
|
+
typeof l.render == "function" ? (v(), m(V, { key: 1 }, [
|
|
602
|
+
typeof l.render(i(n, l.data), n) == "string" ? (v(), m("div", {
|
|
603
603
|
key: 0,
|
|
604
|
-
innerHTML:
|
|
605
|
-
}, null, 8, qe)) : (v(), G(ce(W(
|
|
604
|
+
innerHTML: l.render(i(n, l.data), n)
|
|
605
|
+
}, null, 8, qe)) : (v(), G(ce(W(l.render(i(n, l.data), n).component)), he({
|
|
606
606
|
key: 1,
|
|
607
607
|
ref_for: !0
|
|
608
|
-
}, N(n,
|
|
608
|
+
}, N(n, l)), null, 16))
|
|
609
609
|
], 64)) : D("", !0)
|
|
610
610
|
]))), 128))
|
|
611
611
|
], 10, Pe))), 128))
|
|
@@ -619,20 +619,20 @@ const Oe = /* @__PURE__ */ de(We), Ve = { key: 0 }, De = ["colspan"], Pe = ["onC
|
|
|
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,
|
|
623
|
-
a.value =
|
|
622
|
+
const u = e, a = w(u.value), r = s, c = (i) => {
|
|
623
|
+
a.value = i, r("update:value", i);
|
|
624
624
|
};
|
|
625
625
|
return me("stepper", {
|
|
626
626
|
value: a,
|
|
627
|
-
updateValue:
|
|
627
|
+
updateValue: c
|
|
628
628
|
}), P(
|
|
629
629
|
() => u.value,
|
|
630
|
-
(
|
|
631
|
-
a.value =
|
|
630
|
+
(i) => {
|
|
631
|
+
a.value = i;
|
|
632
632
|
}
|
|
633
633
|
), t({
|
|
634
|
-
updateValue:
|
|
635
|
-
}), (
|
|
634
|
+
updateValue: c
|
|
635
|
+
}), (i, N) => M(i.$slots, "default", { updateValue: c });
|
|
636
636
|
}
|
|
637
637
|
}), ct = /* @__PURE__ */ C({
|
|
638
638
|
__name: "Step",
|
|
@@ -642,7 +642,7 @@ const Oe = /* @__PURE__ */ de(We), Ve = { key: 0 }, De = ["colspan"], Pe = ["onC
|
|
|
642
642
|
setup(e) {
|
|
643
643
|
const t = e, s = Z("stepper"), u = w("");
|
|
644
644
|
return P(
|
|
645
|
-
() => s
|
|
645
|
+
() => s?.value.value,
|
|
646
646
|
(a) => {
|
|
647
647
|
a && t.value && (u.value = Number(a) >= Number(t.value) ? "step-primary" : "");
|
|
648
648
|
}
|
|
@@ -668,16 +668,13 @@ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__
|
|
|
668
668
|
name: "fade",
|
|
669
669
|
mode: "out-in"
|
|
670
670
|
}, {
|
|
671
|
-
default: le(() =>
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
])) : D("", !0)
|
|
679
|
-
];
|
|
680
|
-
}),
|
|
671
|
+
default: le(() => [
|
|
672
|
+
te(t)?.value ? (v(), m("div", Ue, [
|
|
673
|
+
M(s.$slots, "default", {
|
|
674
|
+
currentStep: te(t)?.value
|
|
675
|
+
})
|
|
676
|
+
])) : D("", !0)
|
|
677
|
+
]),
|
|
681
678
|
_: 3
|
|
682
679
|
}));
|
|
683
680
|
}
|
|
@@ -687,12 +684,12 @@ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__
|
|
|
687
684
|
value: {}
|
|
688
685
|
},
|
|
689
686
|
setup(e, { expose: t }) {
|
|
690
|
-
const s = oe(() => u
|
|
687
|
+
const s = oe(() => u?.value.value), u = Z("stepper"), a = (r) => {
|
|
691
688
|
u && u.updateValue(r.toString());
|
|
692
689
|
};
|
|
693
690
|
return t({
|
|
694
691
|
activateCallback: a
|
|
695
|
-
}), (r,
|
|
692
|
+
}), (r, c) => r.value === s.value ? (v(), m("div", Ke, [
|
|
696
693
|
M(r.$slots, "default", { activateCallback: a })
|
|
697
694
|
])) : D("", !0);
|
|
698
695
|
}
|
|
@@ -709,10 +706,10 @@ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__
|
|
|
709
706
|
},
|
|
710
707
|
emits: ["close"],
|
|
711
708
|
setup(e, { expose: t, emit: s }) {
|
|
712
|
-
const u = w(null), a = s, r = e,
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
709
|
+
const u = w(null), a = s, r = e, c = w(R("modal-box", r.extraBoxClasses, {
|
|
710
|
+
"overflow-visible": r.overflow
|
|
711
|
+
})), i = w(
|
|
712
|
+
R("modal")
|
|
716
713
|
), N = w(
|
|
717
714
|
R(
|
|
718
715
|
"btn",
|
|
@@ -726,31 +723,29 @@ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__
|
|
|
726
723
|
);
|
|
727
724
|
return t({
|
|
728
725
|
showModal: () => {
|
|
729
|
-
|
|
730
|
-
(c = u.value) == null || c.showModal();
|
|
726
|
+
u.value?.showModal();
|
|
731
727
|
},
|
|
732
728
|
closeModal: () => {
|
|
733
|
-
|
|
734
|
-
(c = u.value) == null || c.close();
|
|
729
|
+
u.value?.close();
|
|
735
730
|
}
|
|
736
|
-
}), (
|
|
731
|
+
}), (d, _) => (v(), m("dialog", {
|
|
737
732
|
ref_key: "modal",
|
|
738
733
|
ref: u,
|
|
739
|
-
class: z([
|
|
734
|
+
class: z([i.value, d.$attrs.class]),
|
|
740
735
|
"aria-modal": "true",
|
|
741
736
|
"aria-hidden": "true",
|
|
742
737
|
role: "dialog",
|
|
743
738
|
onClose: _[0] || (_[0] = (n) => a("close", n))
|
|
744
739
|
}, [
|
|
745
740
|
y("div", {
|
|
746
|
-
class: z(
|
|
741
|
+
class: z(c.value)
|
|
747
742
|
}, [
|
|
748
|
-
|
|
743
|
+
d.closeButton ? (v(), m("form", He, [
|
|
749
744
|
y("button", {
|
|
750
745
|
class: z(N.value)
|
|
751
746
|
}, "✕", 2)
|
|
752
747
|
])) : D("", !0),
|
|
753
|
-
M(
|
|
748
|
+
M(d.$slots, "default")
|
|
754
749
|
], 2),
|
|
755
750
|
_[1] || (_[1] = y("form", {
|
|
756
751
|
method: "dialog",
|
|
@@ -765,16 +760,16 @@ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__
|
|
|
765
760
|
props: ["modelValue"],
|
|
766
761
|
emits: ["update:modelValue"],
|
|
767
762
|
setup(e, { emit: t }) {
|
|
768
|
-
const s = e, u = w(null), a = t, r = (
|
|
769
|
-
(
|
|
763
|
+
const s = e, u = w(null), a = t, r = (c) => {
|
|
764
|
+
(c.ctrlKey || c.metaKey) && c.key.toLowerCase() === "k" && (c.preventDefault(), u.value && u.value.focus());
|
|
770
765
|
};
|
|
771
766
|
return j(() => {
|
|
772
767
|
document.addEventListener("keydown", r);
|
|
773
768
|
}), _e(() => {
|
|
774
769
|
document.removeEventListener("keydown", r);
|
|
775
|
-
}), (
|
|
770
|
+
}), (c, i) => (v(), m("div", Ge, [
|
|
776
771
|
y("label", je, [
|
|
777
|
-
|
|
772
|
+
i[1] || (i[1] = y("svg", {
|
|
778
773
|
class: "pointer-events-none absolute z-10 my-3.5 ms-4 text-base-content opacity-60",
|
|
779
774
|
"aria-hidden": "true",
|
|
780
775
|
width: "16",
|
|
@@ -796,12 +791,12 @@ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__
|
|
|
796
791
|
type: "search",
|
|
797
792
|
placeholder: "Zoeken...",
|
|
798
793
|
value: s.modelValue,
|
|
799
|
-
onInput:
|
|
794
|
+
onInput: i[0] || (i[0] = (N) => a("update:modelValue", N.target.value)),
|
|
800
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"
|
|
801
796
|
}, null, 40, Je)
|
|
802
797
|
])
|
|
803
798
|
]),
|
|
804
|
-
|
|
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" }, [
|
|
805
800
|
y("kbd", { class: "kbd kbd-sm" }, "ctrl"),
|
|
806
801
|
y("kbd", { class: "kbd kbd-sm" }, "K")
|
|
807
802
|
], -1))
|
package/dist/dendelion-ui.umd.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 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 f=arguments[u];f&&(a=s(a,c(f)))}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 f in a)n.call(a,f)&&a[f]&&(u=s(u,f));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})()}(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=i;var t=n(G());function n(r){return r&&r.__esModule?r:{default:r}}var o=Number.MAX_SAFE_INTEGER,c=function(l,d){return l.score-d.score},s=function(l,d){return l[0]-d[0]},a=new Set(` []()-–—'"“”`.split(""));function u(r){return a.has(r)}function f(r,l,d,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 d.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 d=r.length,k=l.length,p=0,h=l[p],g=[],m=-1,y=-2,B=0;B<d;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 d=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<d&&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 d=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?d+=.2:m?d+=.4:g>=3?d+=.8:d+=1.6}),[d,r]}function i(r,l){var d=(0,t.default)(l),k=d.split(" "),p=(0,t.default)(r),h=new Set(p.split(" ")),g=f(r,p,h,l,d,k,"smart");return g?{item:r,score:g[0],matches:[g[1]]}:null}function _(r,l){var d=l.strategy,k=d===void 0?"aggressive":d,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=f(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(M("table",X.toClassName(s.size),{"table-zebra":s.zebra,"table-pin-rows":s.pinRows,"table-pin-cols ":s.pinCols})),u=(i,_)=>{s.onRowClick&&s.onRowClick(i,_)},f=(i,_)=>String(!i||typeof i!="object"?i:_.split(".").reduce((r,l)=>r&&(typeof r=="object"?r[l]:r),i)),E=(i,_)=>_.render===void 0?{}:_.render(f(i,_.data),i).props,$=i=>i&&typeof i=="object"&&"then"in i?e.defineAsyncComponent(()=>i):typeof i=="function"?e.defineAsyncComponent(i):i;e.onMounted(()=>{n.value=s.dataSource,o.value=s.dataSource}),e.watch(()=>s.dataSource,i=>{n.value=i,o.value=i},{immediate:!0}),e.watch(()=>s.searchValue,i=>{if(s.searchFunction){o.value=s.searchFunction(i??"");return}o.value=i?T(i):n.value},{immediate:!0});const T=i=>{const _=[];return n.value.length>0?(Object.keys(n.value[0]).forEach(l=>{const d=n.value.map(h=>f(h,l)),p=he(d)(i);for(const h of p){const g=n.value.filter(m=>f(m,l)===h.item);_.push(...g)}}),_):[]};return(i,_)=>(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:d=>u(r,l)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,d=>(e.openBlock(),e.createElementBlock("td",{key:d.title},[d.render?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f(r,d.data)),1)],64)),typeof d.render=="function"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[typeof d.render(f(r,d.data),r)=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:d.render(f(r,d.data),r)},null,8,Be)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(d.render(f(r,d.data),r).component)),e.mergeProps({key:1,ref_for:!0},E(r,d)),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=f=>{s.value=f,a("update:value",f)};return e.provide("stepper",{value:s,updateValue:u}),e.watch(()=>c.value,f=>{s.value=f}),n({updateValue:u}),(f,E)=>e.renderSlot(f.$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==null?void 0: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(()=>{var s,a;return[(s=e.unref(n))!=null&&s.value?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(o.$slots,"default",{currentStep:(a=e.unref(n))==null?void 0:a.value})])):e.createCommentVNode("",!0)]}),_:3}))}}),$e={key:0},Te=e.defineComponent({__name:"StepPanel",props:{value:{}},setup(t,{expose:n}){const o=e.computed(()=>c==null?void 0: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(M("modal-box",a.extraBoxClasses)),f=e.ref(M("modal",{"overflow-visible":a.overflow})),E=e.ref(M("btn",A.toClassName(a.closeButtonSize),"btn-circle","btn-ghost","absolute","right-2","top-2"));return n({showModal:()=>{var i;(i=c.value)==null||i.showModal()},closeModal:()=>{var i;(i=c.value)==null||i.close()}}),(i,_)=>(e.openBlock(),e.createElementBlock("dialog",{ref_key:"modal",ref:c,class:e.normalizeClass([f.value,i.$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)},[i.closeButton?(e.openBlock(),e.createElementBlock("form",Le,[e.createElementVNode("button",{class:e.normalizeClass(E.value)},"✕",2)])):e.createCommentVNode("",!0),e.renderSlot(i.$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=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,f)=>(e.openBlock(),e.createElementBlock("div",ve,[e.createElementVNode("label",Re,[f[1]||(f[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:f[0]||(f[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)])]),f[2]||(f[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="",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"})});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Color } from '
|
|
1
|
+
import { Color } from '../../types';
|
|
2
2
|
import { ButtonProps } from './interface';
|
|
3
3
|
declare var __VLS_1: {};
|
|
4
4
|
type __VLS_Slots = {} & {
|
|
5
5
|
default?: (props: typeof __VLS_1) => any;
|
|
6
6
|
};
|
|
7
|
-
declare const __VLS_component: import("vue").DefineComponent<ButtonProps,
|
|
7
|
+
declare const __VLS_component: import("vue").DefineComponent<ButtonProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
|
|
8
8
|
type: import("./interface").Type;
|
|
9
9
|
color: Color;
|
|
10
10
|
soft: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{},
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CardProps } from './interface';
|
|
2
|
-
import { Color } from '
|
|
2
|
+
import { Color } from '../../types';
|
|
3
3
|
declare var __VLS_1: {};
|
|
4
4
|
type __VLS_Slots = {} & {
|
|
5
5
|
default?: (props: typeof __VLS_1) => any;
|
|
6
6
|
};
|
|
7
|
-
declare const __VLS_component: import("vue").DefineComponent<CardProps,
|
|
7
|
+
declare const __VLS_component: import("vue").DefineComponent<CardProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardProps> & Readonly<{}>, {
|
|
8
8
|
backgroundColor: Color;
|
|
9
9
|
shadow: boolean;
|
|
10
10
|
fullWidth: boolean;
|
|
@@ -2,7 +2,7 @@ declare var __VLS_1: {};
|
|
|
2
2
|
type __VLS_Slots = {} & {
|
|
3
3
|
default?: (props: typeof __VLS_1) => any;
|
|
4
4
|
};
|
|
5
|
-
declare const __VLS_component: import("vue").DefineComponent<{},
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
7
|
export default _default;
|
|
8
8
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -3,7 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
is?: string | object | Component;
|
|
4
4
|
text: string;
|
|
5
5
|
};
|
|
6
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props,
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
7
|
text: string;
|
|
8
8
|
is: string | object | Component;
|
|
9
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -3,7 +3,7 @@ declare var __VLS_1: {};
|
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
4
|
default?: (props: typeof __VLS_1) => any;
|
|
5
5
|
};
|
|
6
|
-
declare const __VLS_component: import("vue").DefineComponent<ContainerProps,
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<ContainerProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ContainerProps> & Readonly<{}>, {
|
|
7
7
|
container: boolean;
|
|
8
8
|
padding: boolean;
|
|
9
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
modelValue?: any;
|
|
3
|
-
},
|
|
3
|
+
}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
4
|
"update:modelValue": (...args: any[]) => void;
|
|
5
5
|
}, string, import("vue").PublicProps, Readonly<{
|
|
6
6
|
modelValue?: any;
|
|
@@ -3,7 +3,7 @@ declare var __VLS_1: {};
|
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
4
|
default?: (props: typeof __VLS_1) => any;
|
|
5
5
|
};
|
|
6
|
-
declare const __VLS_component: import("vue").DefineComponent<StepperProps,
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<StepperProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<StepperProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
8
8
|
export default _default;
|
|
9
9
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -2,7 +2,7 @@ declare var __VLS_1: {};
|
|
|
2
2
|
type __VLS_Slots = {} & {
|
|
3
3
|
default?: (props: typeof __VLS_1) => any;
|
|
4
4
|
};
|
|
5
|
-
declare const __VLS_component: import("vue").DefineComponent<{},
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
7
|
export default _default;
|
|
8
8
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_6: {
|
|
3
3
|
currentStep: Ref<string, string>;
|
|
4
4
|
};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_6) => any;
|
|
7
7
|
};
|
|
8
|
-
declare const __VLS_component: import("vue").DefineComponent<{},
|
|
8
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
9
9
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
10
10
|
export default _default;
|
|
11
11
|
type __VLS_WithSlots<T, S> = T & {
|
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.16",
|
|
6
6
|
"author": "ThatzOkay",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"homepage": "https://github.com/ThatzOkay/DendelionUI#readme",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script setup lang="ts">
|
|
9
|
-
import { Color, ButtonColorUtils } from '
|
|
9
|
+
import { Color, ButtonColorUtils } from '../../types';
|
|
10
10
|
import { ButtonProps } from './interface';
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import { computed } from 'vue';
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import { ref } from 'vue';
|
|
10
10
|
import { CardProps } from './interface';
|
|
11
|
-
import { Color, BackgroundColorUtils, RoundedSizeUtils } from '
|
|
11
|
+
import { Color, BackgroundColorUtils, RoundedSizeUtils } from '../../types';
|
|
12
12
|
|
|
13
13
|
const props = withDefaults(defineProps<CardProps>(), {
|
|
14
14
|
backgroundColor: Color.Primary,
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
import { ref } from 'vue';
|
|
24
24
|
import { ModalProps } from './interface';
|
|
25
25
|
import classNames from 'classnames';
|
|
26
|
-
import { Size, ButtonSizeUtils } from '
|
|
26
|
+
import { Size, ButtonSizeUtils } from '../../types';
|
|
27
27
|
|
|
28
28
|
const modal = ref<HTMLDialogElement | null>(null);
|
|
29
29
|
|
|
@@ -35,12 +35,12 @@ const props = withDefaults(defineProps<ModalProps>(), {
|
|
|
35
35
|
closeButtonSize: Size.SM,
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
const boxClasses = ref(classNames('modal-box', props.extraBoxClasses
|
|
38
|
+
const boxClasses = ref(classNames('modal-box', props.extraBoxClasses, {
|
|
39
|
+
'overflow-visible': props.overflow,
|
|
40
|
+
}));
|
|
39
41
|
|
|
40
42
|
const classes = ref(
|
|
41
|
-
classNames('modal',
|
|
42
|
-
'overflow-visible': props.overflow,
|
|
43
|
-
}),
|
|
43
|
+
classNames('modal'),
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
const closeButtonClasses = ref(
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
import { Component, defineAsyncComponent, onMounted, ref, watch } from 'vue';
|
|
38
38
|
import { Column, ColumnComponent, ComponentImport, ComponentOrImport, TableProps } from './interface';
|
|
39
39
|
import classNames from 'classnames';
|
|
40
|
-
import { Size, TableSizeUtils } from '
|
|
40
|
+
import { Size, TableSizeUtils } from '../../types';
|
|
41
41
|
import createFuzzySearch from '@nozbe/microfuzz';
|
|
42
42
|
|
|
43
43
|
const originalDataSource = ref<T[]>([]);
|