@dronico/droni-kit 1.8.5 → 1.8.6
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.8.6](https://github.com/Droni-app/droni-kit/compare/v1.8.5...v1.8.6) (2025-09-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add support to vue router on action component ([e0e96fd](https://github.com/Droni-app/droni-kit/commit/e0e96fd41378af702cc825c1a41e5d9a32575100))
|
|
7
|
+
|
|
1
8
|
## [1.8.5](https://github.com/Droni-app/droni-kit/compare/v1.8.4...v1.8.5) (2025-09-29)
|
|
2
9
|
|
|
3
10
|
|
package/dist/droni-kit.cjs.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
dk:text-ellipsis
|
|
10
10
|
dk:whitespace-nowrap
|
|
11
11
|
dk:active:scale-95
|
|
12
|
-
dk:max-w-full`,y=e.defineComponent({__name:"DuiButton",props:{variant:{default:"solid"},color:{default:"neutral"},size:{default:"md"},type:{default:"button"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1},title:{default:void 0},rounded:{default:"all"},to:{default:void 0}},setup(
|
|
12
|
+
dk:max-w-full`,y=e.defineComponent({__name:"DuiButton",props:{variant:{default:"solid"},color:{default:"neutral"},size:{default:"md"},type:{default:"button"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1},title:{default:void 0},rounded:{default:"all"},to:{default:void 0}},setup(i){const r=i,d=e.getCurrentInstance(),o=d==null?void 0:d.appContext.app,l=e.computed(()=>{try{return!!(o!=null&&o.config.globalProperties.$router||o!=null&&o.config.globalProperties.$route||globalThis.VueRouter||o!=null&&o.component("RouterLink"))}catch{return!1}}),c=e.computed(()=>{try{return!!(globalThis.$nuxt||globalThis.useNuxtApp||globalThis.navigateTo||typeof window<"u"&&window.$nuxt||o!=null&&o.component("NuxtLink"))}catch{return!1}}),k=e.computed(()=>r.to?c.value?"NuxtLink":l.value?"RouterLink":"a":"button"),u=e.computed(()=>{const t={};return k.value==="button"?t.type=r.type:k.value==="a"?(t.href=typeof r.to=="string"?r.to:"#",t.role="button"):t.to=r.to,t}),b={sm:"dk:text-sm dk:px-3 dk:py-1.5",md:"dk:text-base dk:px-4 dk:py-2",lg:"dk:text-lg dk:px-5 dk:py-3"},p={all:"dk:rounded",top:"dk:rounded-t",bottom:"dk:rounded-b",left:"dk:rounded-l",right:"dk:rounded-r",none:"dk:rounded-none"},a={solid:{base:"dk:border-b",neutral:`
|
|
13
13
|
dk:border-zinc-500
|
|
14
14
|
dk:dark:border-zinc-600
|
|
15
15
|
dk:bg-zinc-200
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
dk:text-amber-600
|
|
154
154
|
dk:hover:bg-amber-50
|
|
155
155
|
dk:dark:text-amber-100
|
|
156
|
-
dk:dark:hover:bg-amber-800`}},n=e.computed(()=>{var x;const t=(((x=
|
|
156
|
+
dk:dark:hover:bg-amber-800`}},n=e.computed(()=>{var x;const t=(((x=a[r.variant])==null?void 0:x[r.color])||"")+" "+a[r.variant].base,s=b[r.size]||"",m=r.block?"dk:w-full":"",g=p[r.rounded]||"";return[v,t,s,m,g].join(" ")});return(t,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k.value),e.mergeProps(u.value,{class:n.value,title:r.title,disabled:r.disabled||r.loading}),{default:e.withCtx(()=>[r.loading?(e.openBlock(),e.createElementBlock("span",h,"Cargando...")):e.renderSlot(t.$slots,"default",{key:0})]),_:3},16,["class","title","disabled"]))}}),f=["for"],z={key:0,class:"dk:text-rose-500"},S=["type","value","disabled","placeholder","required","name","id","pattern","readonly","min","max","step","aria-label","aria-disabled","aria-required"],_=`
|
|
157
157
|
dk:border-b
|
|
158
158
|
dk:border-zinc-300
|
|
159
159
|
dk:bg-zinc-50
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
dk:dark:bg-zinc-800
|
|
166
166
|
dk:dark:text-zinc-100
|
|
167
167
|
dk:dark:focus:bg-zinc-700
|
|
168
|
-
dk:dark:[color-scheme:dark]`,B=e.defineComponent({__name:"DuiInput",props:{modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},size:{type:String,default:"md"},block:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},name:{type:String,default:void 0},id:{type:String,default:void 0},required:{type:Boolean,default:!1},label:{type:String,default:void 0},pattern:{type:String,default:void 0},readonly:{type:Boolean,default:!1},rounded:{type:String,default:"all"},min:{type:[String,Number],default:void 0},max:{type:[String,Number],default:void 0},step:{type:[String,Number],default:void 0},autocomplete:{type:String,default:void 0}},emits:["update:modelValue"],setup(
|
|
168
|
+
dk:dark:[color-scheme:dark]`,B=e.defineComponent({__name:"DuiInput",props:{modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},size:{type:String,default:"md"},block:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},name:{type:String,default:void 0},id:{type:String,default:void 0},required:{type:Boolean,default:!1},label:{type:String,default:void 0},pattern:{type:String,default:void 0},readonly:{type:Boolean,default:!1},rounded:{type:String,default:"all"},min:{type:[String,Number],default:void 0},max:{type:[String,Number],default:void 0},step:{type:[String,Number],default:void 0},autocomplete:{type:String,default:void 0}},emits:["update:modelValue"],setup(i,{emit:r}){const d=i,o=r;function l(a){const n=a.target;o("update:modelValue",n.value)}const c={sm:"dk:text-sm dk:px-3 dk:py-1.5",md:"dk:text-base dk:px-4 dk:py-2",lg:"dk:text-lg dk:px-5 dk:py-3"},k={all:"dk:rounded",top:"dk:rounded-t",bottom:"dk:rounded-b",left:"dk:rounded-l",right:"dk:rounded-r",none:"dk:rounded-none"},u={sm:"dk:text-sm dk:pb-0.5",md:"dk:text-base dk:pb-1",lg:"dk:text-lg dk:pb-2"},b=e.computed(()=>{const a=c[d.size]||"",n=d.block?"dk:w-full":"",t=k[d.rounded]||"";return[_,a,n,t].join(" ")}),p=e.computed(()=>{const a=u[d.size]||"",n=d.block?"dk:w-full":"";return[a,n].join(" ")});return(a,n)=>(e.openBlock(),e.createElementBlock("div",null,[d.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:d.id,class:e.normalizeClass([p.value,"dk:text-start dk:block dk:text-zinc-700 dk:dark:text-zinc-200 dk:px-0"])},[e.createTextVNode(e.toDisplayString(d.label)+" ",1),d.required?(e.openBlock(),e.createElementBlock("span",z,"*")):e.createCommentVNode("",!0)],10,f)):e.createCommentVNode("",!0),e.createElementVNode("input",{type:d.type,class:e.normalizeClass(b.value),value:i.modelValue,disabled:d.disabled,placeholder:d.placeholder,required:d.required,name:d.name,id:d.id,pattern:d.pattern,readonly:d.readonly,min:d.min,max:d.max,step:d.step,"aria-label":d.placeholder,"aria-disabled":d.disabled,"aria-required":d.required,onInput:l},null,42,S)]))}}),C=["for"],w={key:0,class:"dk:text-rose-500"},V=["value","disabled","placeholder","required","name","id","readonly","aria-label","aria-disabled","aria-required"],$=`
|
|
169
169
|
dk:border-b
|
|
170
170
|
dk:border-zinc-300
|
|
171
171
|
dk:bg-zinc-50
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
dk:dark:bg-zinc-800
|
|
178
178
|
dk:dark:text-zinc-100
|
|
179
179
|
dk:dark:focus:bg-zinc-700
|
|
180
|
-
dk:dark:[color-scheme:dark]`,
|
|
180
|
+
dk:dark:[color-scheme:dark]`,N=e.defineComponent({__name:"DuiTextarea",props:{modelValue:{type:String,default:""},size:{type:String,default:"md"},block:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},name:{type:String,default:void 0},id:{type:String,default:void 0},required:{type:Boolean,default:!1},label:{type:String,default:void 0},readonly:{type:Boolean,default:!1},rounded:{type:String,default:"all"},autoheight:{type:Boolean,default:!0},resize:{type:String,default:"vertical"}},emits:["update:modelValue"],setup(i,{emit:r}){const d=i,o=r;function l(t){const s=t.target;d.autoheight&&n(s),o("update:modelValue",s.value)}const c={sm:"dk:text-sm dk:px-3 dk:py-1.5",md:"dk:text-base dk:px-3 dk:py-2",lg:"dk:text-lg dk:px-5 dk:py-3"},k={all:"dk:rounded",top:"dk:rounded-t",bottom:"dk:rounded-b",left:"dk:rounded-l",right:"dk:rounded-r",none:"dk:rounded-none"},u={sm:"dk:text-sm dk:pb-0.5",md:"dk:text-base dk:pb-1",lg:"dk:text-lg dk:pb-2"},b={none:"dk:resize-none",both:"dk:resize",horizontal:"dk:resize-x",vertical:"dk:resize-y"},p=e.computed(()=>{const t=c[d.size]||"",s=d.block?"dk:w-full":"",m=k[d.rounded]||"",g=b[d.resize]||"";return[$,t,s,m,g].join(" ")}),a=e.computed(()=>{const t=u[d.size]||"",s=d.block?"dk:w-full":"";return[t,s].join(" ")}),n=t=>{t.style.height="auto",t.style.height=`${t.scrollHeight+5}px`};return(t,s)=>(e.openBlock(),e.createElementBlock("div",null,[d.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:d.id,class:e.normalizeClass([a.value,"dk:text-start dk:block dk:text-zinc-700 dk:dark:text-zinc-200 dk:px-0"])},[e.createTextVNode(e.toDisplayString(d.label)+" ",1),d.required?(e.openBlock(),e.createElementBlock("span",w,"*")):e.createCommentVNode("",!0)],10,C)):e.createCommentVNode("",!0),e.createElementVNode("textarea",{class:e.normalizeClass(p.value),value:i.modelValue,disabled:d.disabled,placeholder:d.placeholder,required:d.required,name:d.name,id:d.id,readonly:d.readonly,"aria-label":d.placeholder,"aria-disabled":d.disabled,"aria-required":d.required,onInput:l},null,42,V)]))}}),E={key:1},q=`
|
|
181
181
|
dk:transition
|
|
182
182
|
dk:text-center
|
|
183
183
|
dk:disabled:opacity-50
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
dk:text-ellipsis
|
|
189
189
|
dk:whitespace-nowrap
|
|
190
190
|
dk:active:scale-95
|
|
191
|
-
dk:max-w-full`,
|
|
191
|
+
dk:max-w-full`,D=e.defineComponent({__name:"DuiAction",props:{variant:{default:"solid"},color:{default:"neutral"},size:{default:"md"},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1},title:{default:void 0},rounded:{default:"all"},to:{default:void 0}},setup(i){const r=i,d=e.getCurrentInstance(),o=d==null?void 0:d.appContext.app,l=e.computed(()=>{try{return!!(o!=null&&o.config.globalProperties.$router||o!=null&&o.config.globalProperties.$route||globalThis.VueRouter||o!=null&&o.component("RouterLink"))}catch{return!1}}),c=e.computed(()=>{try{return!!(globalThis.$nuxt||globalThis.useNuxtApp||globalThis.navigateTo||typeof window<"u"&&window.$nuxt||o!=null&&o.component("NuxtLink"))}catch{return!1}}),k=e.computed(()=>r.to?c.value?"NuxtLink":l.value?"RouterLink":"a":"span"),u=e.computed(()=>{const t={};return k.value==="a"?(t.href=typeof r.to=="string"?r.to:"#",t.role="button"):k.value!=="span"&&(t.to=r.to),t}),b={sm:"dk:text-sm dk:px-3 dk:py-1.5",md:"dk:text-base dk:px-4 dk:py-2",lg:"dk:text-lg dk:px-5 dk:py-3"},p={all:"dk:rounded",top:"dk:rounded-t",bottom:"dk:rounded-b",left:"dk:rounded-l",right:"dk:rounded-r",none:"dk:rounded-none"},a={solid:{base:"dk:border-b",neutral:`
|
|
192
192
|
dk:border-zinc-500
|
|
193
193
|
dk:dark:border-zinc-600
|
|
194
194
|
dk:bg-zinc-200
|
|
@@ -332,7 +332,7 @@
|
|
|
332
332
|
dk:text-amber-600
|
|
333
333
|
dk:hover:bg-amber-50
|
|
334
334
|
dk:dark:text-amber-100
|
|
335
|
-
dk:dark:hover:bg-amber-800`}},
|
|
335
|
+
dk:dark:hover:bg-amber-800`}},n=e.computed(()=>{var x;const t=(((x=a[r.variant])==null?void 0:x[r.color])||"")+" "+a[r.variant].base,s=b[r.size]||"",m=r.block?"dk:block":"dk:inline-block",g=p[r.rounded]||"";return[q,t,s,m,g].join(" ")});return(t,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k.value),e.mergeProps(u.value,{class:n.value,title:r.title}),{default:e.withCtx(()=>[r.loading?(e.openBlock(),e.createElementBlock("span",E,"Cargando...")):e.renderSlot(t.$slots,"default",{key:0})]),_:3},16,["class","title"]))}}),T=["for"],L={key:0,class:"dk:text-rose-500"},P=["id","name","disabled","required","readonly","aria-label","aria-disabled","aria-required"],R={key:0,disabled:"",selected:"",hidden:""},j=["value","selected"],A=`
|
|
336
336
|
dk:border-b
|
|
337
337
|
dk:border-zinc-300
|
|
338
338
|
dk:bg-zinc-50
|
|
@@ -345,10 +345,10 @@
|
|
|
345
345
|
dk:dark:text-zinc-100
|
|
346
346
|
dk:dark:focus:bg-zinc-700
|
|
347
347
|
dk:dark:[color-scheme:dark]
|
|
348
|
-
`,
|
|
348
|
+
`,I=e.defineComponent({__name:"DuiSelect",props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default:()=>[]},size:{type:String,default:"md"},block:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},name:{type:String,default:void 0},id:{type:String,default:void 0},required:{type:Boolean,default:!1},label:{type:String,default:void 0},placeholder:{type:String,default:void 0},readonly:{type:Boolean,default:!1},rounded:{type:String,default:"all"},itemLabel:{type:String,default:"label"},itemValue:{type:String,default:"value"}},emits:["update:modelValue"],setup(i,{emit:r}){const d=i,o=r;function l(a){const t=a.target.value,s=Number(t);!isNaN(s)&&t!==""?o("update:modelValue",s):o("update:modelValue",t)}const c={sm:"dk:text-sm dk:px-3 dk:py-1.5",md:"dk:text-base dk:px-4 dk:py-2",lg:"dk:text-lg dk:px-5 dk:py-3"},k={all:"dk:rounded",top:"dk:rounded-t",bottom:"dk:rounded-b",left:"dk:rounded-l",right:"dk:rounded-r",none:"dk:rounded-none"},u={sm:"dk:text-sm dk:pb-0.5",md:"dk:text-base dk:pb-1",lg:"dk:text-lg dk:pb-2"},b=e.computed(()=>{const a=c[d.size]||"",n=d.block?"dk:w-full":"",t=k[d.rounded]||"";return[A,a,n,t].join(" ")}),p=e.computed(()=>{const a=u[d.size]||"",n=d.block?"dk:w-full":"";return[a,n].join(" ")});return(a,n)=>(e.openBlock(),e.createElementBlock("div",null,[d.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:d.id,class:e.normalizeClass([p.value,"dk:text-start dk:block dk:text-zinc-700 dk:dark:text-zinc-200 dk:px-0"])},[e.createTextVNode(e.toDisplayString(d.label)+" ",1),d.required?(e.openBlock(),e.createElementBlock("span",L,"*")):e.createCommentVNode("",!0)],10,T)):e.createCommentVNode("",!0),e.createElementVNode("select",{id:d.id,name:d.name,disabled:d.disabled,required:d.required,class:e.normalizeClass(b.value),readonly:d.readonly,"aria-label":d.label||"select input","aria-disabled":d.disabled,"aria-required":d.required,onChange:l},[d.placeholder?(e.openBlock(),e.createElementBlock("option",R,e.toDisplayString(d.placeholder),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.options,(t,s)=>(e.openBlock(),e.createElementBlock("option",{key:s,value:t[d.itemValue]??"",selected:t[d.itemValue]==d.modelValue},e.toDisplayString(t[d.itemLabel]??""),9,j))),128))],42,P)]))}}),F=`
|
|
349
349
|
dk:px-4
|
|
350
350
|
dk:py-3
|
|
351
351
|
dk:text-sm
|
|
352
352
|
dk:leading-relaxed
|
|
353
353
|
dk:max-w-full
|
|
354
|
-
`,
|
|
354
|
+
`,H=e.defineComponent({__name:"DuiAlert",props:{variant:{type:String,default:"solid"},color:{type:String,default:"neutral"},rounded:{type:String,default:"all"}},setup(i){const r=i,d={all:"dk:rounded",top:"dk:rounded-t",bottom:"dk:rounded-b",left:"dk:rounded-l",right:"dk:rounded-r",none:"dk:rounded-none"},o={solid:{base:"",neutral:"dk:bg-zinc-200 dk:text-zinc-800 dk:dark:bg-zinc-700 dk:dark:text-zinc-100",primary:"dk:bg-slate-200 dk:text-slate-800 dk:dark:bg-slate-700 dk:dark:text-slate-100",secondary:"dk:bg-pink-200 dk:text-pink-800 dk:dark:bg-pink-700 dk:dark:text-pink-100",success:"dk:bg-emerald-200 dk:text-emerald-800 dk:dark:bg-emerald-700 dk:dark:text-emerald-100",warning:"dk:bg-amber-200 dk:text-amber-800 dk:dark:bg-amber-700 dk:dark:text-amber-100",danger:"dk:bg-rose-200 dk:text-rose-800 dk:dark:bg-rose-700 dk:dark:text-rose-100"},outline:{base:"dk:border",neutral:"dk:border-zinc-400 dk:text-zinc-700 dk:dark:border-zinc-500 dk:dark:text-zinc-200",primary:"dk:border-slate-400 dk:text-slate-700 dk:dark:border-slate-500 dk:dark:text-slate-200",secondary:"dk:border-pink-400 dk:text-pink-700 dk:dark:border-pink-500 dk:dark:text-pink-200",success:"dk:border-green-400 dk:text-green-700 dk:dark:border-green-500 dk:dark:text-green-200",warning:"dk:border-yellow-400 dk:text-yellow-700 dk:dark:border-yellow-500 dk:dark:text-yellow-200",danger:"dk:border-red-400 dk:text-red-700 dk:dark:border-red-500 dk:dark:text-red-200"},ghost:{base:"",neutral:"dk:text-zinc-700 dk:dark:text-zinc-200 dk:bg-zinc-50 dk:dark:bg-zinc-800",primary:"dk:text-slate-700 dk:dark:text-slate-200 dk:bg-slate-50 dk:dark:bg-slate-800",secondary:"dk:text-pink-700 dk:dark:text-pink-200 dk:bg-pink-50 dk:dark:bg-pink-800",success:"dk:text-emerald-700 dk:dark:text-emerald-200 dk:bg-emerald-50 dk:dark:bg-emerald-800",warning:"dk:text-amber-700 dk:dark:text-amber-200 dk:bg-amber-50 dk:dark:bg-amber-800",danger:"dk:text-rose-700 dk:dark:text-rose-200 dk:bg-rose-50 dk:dark:bg-rose-800"}},l=e.computed(()=>{var b;const c=((b=o[r.variant])==null?void 0:b[r.color])||"",k=o[r.variant].base||"",u=d[r.rounded]||"";return[F,k,c,u].join(" ")});return(c,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.value),role:"alert"},[e.renderSlot(c.$slots,"default")],2))}}),M={class:"dk:relative dk:overflow-x-auto dk:shadow-md dk:sm:rounded-lg"},O={class:"dk:w-full dk:text-sm dk:text-left dk:text-gray-700 dk:dark:text-gray-300"},G={class:"dk:text-xs dk:uppercase dk:bg-gray-100 dk:dark:bg-gray-700 dk:dark:text-gray-200"},J=e.defineComponent({__name:"DuiTable",props:{columns:{type:Array,required:!0},rows:{type:Array,required:!0}},setup(i){const r=i;return(d,o)=>(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("table",O,[e.createElementVNode("thead",G,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.columns,l=>(e.openBlock(),e.createElementBlock("th",{key:l.name,class:e.normalizeClass(["dk:px-6 dk:py-3",l.classes])},e.toDisplayString(l.label),3))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.rows,(l,c)=>(e.openBlock(),e.createElementBlock("tr",{key:c,class:"dk:bg-white dk:border-b dk:border-gray-200 dk:dark:bg-gray-800 dk:dark:border-gray-700 dk:hover:bg-gray-50 dk:dark:hover:bg-gray-600 dk:transition-colors"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.columns,k=>(e.openBlock(),e.createElementBlock("td",{key:k.name,class:"dk:px-6 dk:py-4 dk:text-gray-900 dk:dark:text-gray-100"},[e.renderSlot(d.$slots,k.name,e.mergeProps({ref_for:!0},l),()=>[e.createTextVNode(e.toDisplayString(l[k.name]),1)])]))),128))]))),128))])])]))}});exports.DuiAction=D;exports.DuiAlert=H;exports.DuiButton=y;exports.DuiInput=B;exports.DuiSelect=I;exports.DuiTable=J;exports.DuiTextarea=N;
|
package/dist/droni-kit.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as f, getCurrentInstance as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as f, getCurrentInstance as B, computed as b, createBlock as N, openBlock as a, resolveDynamicComponent as L, mergeProps as V, withCtx as T, renderSlot as $, createElementBlock as o, createCommentVNode as v, createElementVNode as h, normalizeClass as m, createTextVNode as q, toDisplayString as y, Fragment as w, renderList as C } from "vue";
|
|
2
|
+
const D = { key: 1 }, R = `
|
|
3
3
|
dk:transition
|
|
4
4
|
dk:text-center
|
|
5
5
|
dk:disabled:opacity-50
|
|
@@ -10,7 +10,7 @@ const T = { key: 1 }, j = `
|
|
|
10
10
|
dk:text-ellipsis
|
|
11
11
|
dk:whitespace-nowrap
|
|
12
12
|
dk:active:scale-95
|
|
13
|
-
dk:max-w-full`,
|
|
13
|
+
dk:max-w-full`, te = /* @__PURE__ */ f({
|
|
14
14
|
__name: "DuiButton",
|
|
15
15
|
props: {
|
|
16
16
|
variant: { default: "solid" },
|
|
@@ -24,25 +24,25 @@ const T = { key: 1 }, j = `
|
|
|
24
24
|
rounded: { default: "all" },
|
|
25
25
|
to: { default: void 0 }
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const d =
|
|
27
|
+
setup(u) {
|
|
28
|
+
const d = u, e = B(), t = e == null ? void 0 : e.appContext.app, n = b(() => {
|
|
29
29
|
try {
|
|
30
30
|
return !!(t != null && t.config.globalProperties.$router || t != null && t.config.globalProperties.$route || globalThis.VueRouter || // Check if RouterLink component is globally registered
|
|
31
31
|
t != null && t.component("RouterLink"));
|
|
32
32
|
} catch {
|
|
33
33
|
return !1;
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
35
|
+
}), c = b(() => {
|
|
36
36
|
try {
|
|
37
37
|
return !!(globalThis.$nuxt || globalThis.useNuxtApp || globalThis.navigateTo || typeof window < "u" && window.$nuxt || // Check if NuxtLink component is globally available
|
|
38
38
|
t != null && t.component("NuxtLink"));
|
|
39
39
|
} catch {
|
|
40
40
|
return !1;
|
|
41
41
|
}
|
|
42
|
-
}), l =
|
|
42
|
+
}), l = b(() => d.to ? c.value ? "NuxtLink" : n.value ? "RouterLink" : "a" : "button"), g = b(() => {
|
|
43
43
|
const r = {};
|
|
44
44
|
return l.value === "button" ? r.type = d.type : l.value === "a" ? (r.href = typeof d.to == "string" ? d.to : "#", r.role = "button") : r.to = d.to, r;
|
|
45
|
-
}),
|
|
45
|
+
}), p = {
|
|
46
46
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
47
47
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
48
48
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
@@ -53,7 +53,7 @@ const T = { key: 1 }, j = `
|
|
|
53
53
|
left: "dk:rounded-l",
|
|
54
54
|
right: "dk:rounded-r",
|
|
55
55
|
none: "dk:rounded-none"
|
|
56
|
-
},
|
|
56
|
+
}, k = {
|
|
57
57
|
solid: {
|
|
58
58
|
base: "dk:border-b",
|
|
59
59
|
neutral: `
|
|
@@ -225,26 +225,26 @@ const T = { key: 1 }, j = `
|
|
|
225
225
|
dk:dark:text-amber-100
|
|
226
226
|
dk:dark:hover:bg-amber-800`
|
|
227
227
|
}
|
|
228
|
-
}, s =
|
|
229
|
-
var
|
|
230
|
-
const r = (((
|
|
231
|
-
return [
|
|
228
|
+
}, s = b(() => {
|
|
229
|
+
var S;
|
|
230
|
+
const r = (((S = k[d.variant]) == null ? void 0 : S[d.color]) || "") + " " + k[d.variant].base, i = p[d.size] || "", z = d.block ? "dk:w-full" : "", _ = x[d.rounded] || "";
|
|
231
|
+
return [R, r, i, z, _].join(" ");
|
|
232
232
|
});
|
|
233
|
-
return (r,
|
|
233
|
+
return (r, i) => (a(), N(L(l.value), V(g.value, {
|
|
234
234
|
class: s.value,
|
|
235
235
|
title: d.title,
|
|
236
236
|
disabled: d.disabled || d.loading
|
|
237
237
|
}), {
|
|
238
|
-
default:
|
|
239
|
-
d.loading ? (a(),
|
|
238
|
+
default: T(() => [
|
|
239
|
+
d.loading ? (a(), o("span", D, "Cargando...")) : $(r.$slots, "default", { key: 0 })
|
|
240
240
|
]),
|
|
241
241
|
_: 3
|
|
242
242
|
}, 16, ["class", "title", "disabled"]));
|
|
243
243
|
}
|
|
244
|
-
}),
|
|
244
|
+
}), j = ["for"], A = {
|
|
245
245
|
key: 0,
|
|
246
246
|
class: "dk:text-rose-500"
|
|
247
|
-
},
|
|
247
|
+
}, P = ["type", "value", "disabled", "placeholder", "required", "name", "id", "pattern", "readonly", "min", "max", "step", "aria-label", "aria-disabled", "aria-required"], I = `
|
|
248
248
|
dk:border-b
|
|
249
249
|
dk:border-zinc-300
|
|
250
250
|
dk:bg-zinc-50
|
|
@@ -256,7 +256,7 @@ const T = { key: 1 }, j = `
|
|
|
256
256
|
dk:dark:bg-zinc-800
|
|
257
257
|
dk:dark:text-zinc-100
|
|
258
258
|
dk:dark:focus:bg-zinc-700
|
|
259
|
-
dk:dark:[color-scheme:dark]`,
|
|
259
|
+
dk:dark:[color-scheme:dark]`, ae = /* @__PURE__ */ f({
|
|
260
260
|
__name: "DuiInput",
|
|
261
261
|
props: {
|
|
262
262
|
modelValue: {
|
|
@@ -329,13 +329,13 @@ const T = { key: 1 }, j = `
|
|
|
329
329
|
}
|
|
330
330
|
},
|
|
331
331
|
emits: ["update:modelValue"],
|
|
332
|
-
setup(
|
|
333
|
-
const e =
|
|
334
|
-
function n(
|
|
335
|
-
const s =
|
|
332
|
+
setup(u, { emit: d }) {
|
|
333
|
+
const e = u, t = d;
|
|
334
|
+
function n(k) {
|
|
335
|
+
const s = k.target;
|
|
336
336
|
t("update:modelValue", s.value);
|
|
337
337
|
}
|
|
338
|
-
const
|
|
338
|
+
const c = {
|
|
339
339
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
340
340
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
341
341
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
@@ -346,30 +346,30 @@ const T = { key: 1 }, j = `
|
|
|
346
346
|
left: "dk:rounded-l",
|
|
347
347
|
right: "dk:rounded-r",
|
|
348
348
|
none: "dk:rounded-none"
|
|
349
|
-
},
|
|
349
|
+
}, g = {
|
|
350
350
|
sm: "dk:text-sm dk:pb-0.5",
|
|
351
351
|
md: "dk:text-base dk:pb-1",
|
|
352
352
|
lg: "dk:text-lg dk:pb-2"
|
|
353
|
-
},
|
|
354
|
-
const
|
|
355
|
-
return [
|
|
356
|
-
}), x =
|
|
357
|
-
const
|
|
358
|
-
return [
|
|
353
|
+
}, p = b(() => {
|
|
354
|
+
const k = c[e.size] || "", s = e.block ? "dk:w-full" : "", r = l[e.rounded] || "";
|
|
355
|
+
return [I, k, s, r].join(" ");
|
|
356
|
+
}), x = b(() => {
|
|
357
|
+
const k = g[e.size] || "", s = e.block ? "dk:w-full" : "";
|
|
358
|
+
return [k, s].join(" ");
|
|
359
359
|
});
|
|
360
|
-
return (
|
|
361
|
-
e.label ? (a(),
|
|
360
|
+
return (k, s) => (a(), o("div", null, [
|
|
361
|
+
e.label ? (a(), o("label", {
|
|
362
362
|
key: 0,
|
|
363
363
|
for: e.id,
|
|
364
364
|
class: m([x.value, "dk:text-start dk:block dk:text-zinc-700 dk:dark:text-zinc-200 dk:px-0"])
|
|
365
365
|
}, [
|
|
366
|
-
|
|
367
|
-
e.required ? (a(),
|
|
368
|
-
], 10,
|
|
366
|
+
q(y(e.label) + " ", 1),
|
|
367
|
+
e.required ? (a(), o("span", A, "*")) : v("", !0)
|
|
368
|
+
], 10, j)) : v("", !0),
|
|
369
369
|
h("input", {
|
|
370
370
|
type: e.type,
|
|
371
|
-
class: m(
|
|
372
|
-
value:
|
|
371
|
+
class: m(p.value),
|
|
372
|
+
value: u.modelValue,
|
|
373
373
|
disabled: e.disabled,
|
|
374
374
|
placeholder: e.placeholder,
|
|
375
375
|
required: e.required,
|
|
@@ -384,7 +384,7 @@ const T = { key: 1 }, j = `
|
|
|
384
384
|
"aria-disabled": e.disabled,
|
|
385
385
|
"aria-required": e.required,
|
|
386
386
|
onInput: n
|
|
387
|
-
}, null, 42,
|
|
387
|
+
}, null, 42, P)
|
|
388
388
|
]));
|
|
389
389
|
}
|
|
390
390
|
}), E = ["for"], F = {
|
|
@@ -459,13 +459,13 @@ const T = { key: 1 }, j = `
|
|
|
459
459
|
}
|
|
460
460
|
},
|
|
461
461
|
emits: ["update:modelValue"],
|
|
462
|
-
setup(
|
|
463
|
-
const e =
|
|
462
|
+
setup(u, { emit: d }) {
|
|
463
|
+
const e = u, t = d;
|
|
464
464
|
function n(r) {
|
|
465
|
-
const
|
|
466
|
-
e.autoheight && s(
|
|
465
|
+
const i = r.target;
|
|
466
|
+
e.autoheight && s(i), t("update:modelValue", i.value);
|
|
467
467
|
}
|
|
468
|
-
const
|
|
468
|
+
const c = {
|
|
469
469
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
470
470
|
md: "dk:text-base dk:px-3 dk:py-2",
|
|
471
471
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
@@ -476,36 +476,36 @@ const T = { key: 1 }, j = `
|
|
|
476
476
|
left: "dk:rounded-l",
|
|
477
477
|
right: "dk:rounded-r",
|
|
478
478
|
none: "dk:rounded-none"
|
|
479
|
-
},
|
|
479
|
+
}, g = {
|
|
480
480
|
sm: "dk:text-sm dk:pb-0.5",
|
|
481
481
|
md: "dk:text-base dk:pb-1",
|
|
482
482
|
lg: "dk:text-lg dk:pb-2"
|
|
483
|
-
},
|
|
483
|
+
}, p = {
|
|
484
484
|
none: "dk:resize-none",
|
|
485
485
|
both: "dk:resize",
|
|
486
486
|
horizontal: "dk:resize-x",
|
|
487
487
|
vertical: "dk:resize-y"
|
|
488
|
-
}, x =
|
|
489
|
-
const r =
|
|
490
|
-
return [G, r,
|
|
491
|
-
}),
|
|
492
|
-
const r =
|
|
493
|
-
return [r,
|
|
488
|
+
}, x = b(() => {
|
|
489
|
+
const r = c[e.size] || "", i = e.block ? "dk:w-full" : "", z = l[e.rounded] || "", _ = p[e.resize] || "";
|
|
490
|
+
return [G, r, i, z, _].join(" ");
|
|
491
|
+
}), k = b(() => {
|
|
492
|
+
const r = g[e.size] || "", i = e.block ? "dk:w-full" : "";
|
|
493
|
+
return [r, i].join(" ");
|
|
494
494
|
}), s = (r) => {
|
|
495
495
|
r.style.height = "auto", r.style.height = `${r.scrollHeight + 5}px`;
|
|
496
496
|
};
|
|
497
|
-
return (r,
|
|
498
|
-
e.label ? (a(),
|
|
497
|
+
return (r, i) => (a(), o("div", null, [
|
|
498
|
+
e.label ? (a(), o("label", {
|
|
499
499
|
key: 0,
|
|
500
500
|
for: e.id,
|
|
501
|
-
class: m([
|
|
501
|
+
class: m([k.value, "dk:text-start dk:block dk:text-zinc-700 dk:dark:text-zinc-200 dk:px-0"])
|
|
502
502
|
}, [
|
|
503
|
-
|
|
504
|
-
e.required ? (a(),
|
|
503
|
+
q(y(e.label) + " ", 1),
|
|
504
|
+
e.required ? (a(), o("span", F, "*")) : v("", !0)
|
|
505
505
|
], 10, E)) : v("", !0),
|
|
506
506
|
h("textarea", {
|
|
507
507
|
class: m(x.value),
|
|
508
|
-
value:
|
|
508
|
+
value: u.modelValue,
|
|
509
509
|
disabled: e.disabled,
|
|
510
510
|
placeholder: e.placeholder,
|
|
511
511
|
required: e.required,
|
|
@@ -519,7 +519,7 @@ const T = { key: 1 }, j = `
|
|
|
519
519
|
}, null, 42, H)
|
|
520
520
|
]));
|
|
521
521
|
}
|
|
522
|
-
}), J =
|
|
522
|
+
}), J = { key: 1 }, K = `
|
|
523
523
|
dk:transition
|
|
524
524
|
dk:text-center
|
|
525
525
|
dk:disabled:opacity-50
|
|
@@ -530,51 +530,46 @@ const T = { key: 1 }, j = `
|
|
|
530
530
|
dk:text-ellipsis
|
|
531
531
|
dk:whitespace-nowrap
|
|
532
532
|
dk:active:scale-95
|
|
533
|
-
dk:max-w-full`,
|
|
533
|
+
dk:max-w-full`, ke = /* @__PURE__ */ f({
|
|
534
534
|
__name: "DuiAction",
|
|
535
535
|
props: {
|
|
536
|
-
variant: {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
},
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
}
|
|
544
|
-
size: {
|
|
545
|
-
type: String,
|
|
546
|
-
default: "md"
|
|
547
|
-
},
|
|
548
|
-
loading: {
|
|
549
|
-
type: Boolean,
|
|
550
|
-
default: !1
|
|
551
|
-
},
|
|
552
|
-
block: {
|
|
553
|
-
type: Boolean,
|
|
554
|
-
default: !1
|
|
555
|
-
},
|
|
556
|
-
title: {
|
|
557
|
-
type: String,
|
|
558
|
-
default: void 0
|
|
559
|
-
},
|
|
560
|
-
rounded: {
|
|
561
|
-
type: String,
|
|
562
|
-
default: "all"
|
|
563
|
-
}
|
|
536
|
+
variant: { default: "solid" },
|
|
537
|
+
color: { default: "neutral" },
|
|
538
|
+
size: { default: "md" },
|
|
539
|
+
loading: { type: Boolean, default: !1 },
|
|
540
|
+
block: { type: Boolean, default: !1 },
|
|
541
|
+
title: { default: void 0 },
|
|
542
|
+
rounded: { default: "all" },
|
|
543
|
+
to: { default: void 0 }
|
|
564
544
|
},
|
|
565
|
-
setup(
|
|
566
|
-
const d =
|
|
545
|
+
setup(u) {
|
|
546
|
+
const d = u, e = B(), t = e == null ? void 0 : e.appContext.app, n = b(() => {
|
|
547
|
+
try {
|
|
548
|
+
return !!(t != null && t.config.globalProperties.$router || t != null && t.config.globalProperties.$route || globalThis.VueRouter || t != null && t.component("RouterLink"));
|
|
549
|
+
} catch {
|
|
550
|
+
return !1;
|
|
551
|
+
}
|
|
552
|
+
}), c = b(() => {
|
|
553
|
+
try {
|
|
554
|
+
return !!(globalThis.$nuxt || globalThis.useNuxtApp || globalThis.navigateTo || typeof window < "u" && window.$nuxt || t != null && t.component("NuxtLink"));
|
|
555
|
+
} catch {
|
|
556
|
+
return !1;
|
|
557
|
+
}
|
|
558
|
+
}), l = b(() => d.to ? c.value ? "NuxtLink" : n.value ? "RouterLink" : "a" : "span"), g = b(() => {
|
|
559
|
+
const r = {};
|
|
560
|
+
return l.value === "a" ? (r.href = typeof d.to == "string" ? d.to : "#", r.role = "button") : l.value !== "span" && (r.to = d.to), r;
|
|
561
|
+
}), p = {
|
|
567
562
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
568
563
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
569
564
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
570
|
-
},
|
|
565
|
+
}, x = {
|
|
571
566
|
all: "dk:rounded",
|
|
572
567
|
top: "dk:rounded-t",
|
|
573
568
|
bottom: "dk:rounded-b",
|
|
574
569
|
left: "dk:rounded-l",
|
|
575
570
|
right: "dk:rounded-r",
|
|
576
571
|
none: "dk:rounded-none"
|
|
577
|
-
},
|
|
572
|
+
}, k = {
|
|
578
573
|
solid: {
|
|
579
574
|
base: "dk:border-b",
|
|
580
575
|
neutral: `
|
|
@@ -746,27 +741,30 @@ const T = { key: 1 }, j = `
|
|
|
746
741
|
dk:dark:text-amber-100
|
|
747
742
|
dk:dark:hover:bg-amber-800`
|
|
748
743
|
}
|
|
749
|
-
},
|
|
750
|
-
var
|
|
751
|
-
const
|
|
752
|
-
return [
|
|
744
|
+
}, s = b(() => {
|
|
745
|
+
var S;
|
|
746
|
+
const r = (((S = k[d.variant]) == null ? void 0 : S[d.color]) || "") + " " + k[d.variant].base, i = p[d.size] || "", z = d.block ? "dk:block" : "dk:inline-block", _ = x[d.rounded] || "";
|
|
747
|
+
return [K, r, i, z, _].join(" ");
|
|
753
748
|
});
|
|
754
|
-
return (
|
|
755
|
-
class:
|
|
749
|
+
return (r, i) => (a(), N(L(l.value), V(g.value, {
|
|
750
|
+
class: s.value,
|
|
756
751
|
title: d.title
|
|
757
|
-
},
|
|
758
|
-
|
|
759
|
-
|
|
752
|
+
}), {
|
|
753
|
+
default: T(() => [
|
|
754
|
+
d.loading ? (a(), o("span", J, "Cargando...")) : $(r.$slots, "default", { key: 0 })
|
|
755
|
+
]),
|
|
756
|
+
_: 3
|
|
757
|
+
}, 16, ["class", "title"]));
|
|
760
758
|
}
|
|
761
|
-
}),
|
|
759
|
+
}), M = ["for"], O = {
|
|
762
760
|
key: 0,
|
|
763
761
|
class: "dk:text-rose-500"
|
|
764
|
-
},
|
|
762
|
+
}, Q = ["id", "name", "disabled", "required", "readonly", "aria-label", "aria-disabled", "aria-required"], U = {
|
|
765
763
|
key: 0,
|
|
766
764
|
disabled: "",
|
|
767
765
|
selected: "",
|
|
768
766
|
hidden: ""
|
|
769
|
-
},
|
|
767
|
+
}, W = ["value", "selected"], X = `
|
|
770
768
|
dk:border-b
|
|
771
769
|
dk:border-zinc-300
|
|
772
770
|
dk:bg-zinc-50
|
|
@@ -779,7 +777,7 @@ const T = { key: 1 }, j = `
|
|
|
779
777
|
dk:dark:text-zinc-100
|
|
780
778
|
dk:dark:focus:bg-zinc-700
|
|
781
779
|
dk:dark:[color-scheme:dark]
|
|
782
|
-
`,
|
|
780
|
+
`, le = /* @__PURE__ */ f({
|
|
783
781
|
__name: "DuiSelect",
|
|
784
782
|
props: {
|
|
785
783
|
modelValue: {
|
|
@@ -840,13 +838,13 @@ const T = { key: 1 }, j = `
|
|
|
840
838
|
}
|
|
841
839
|
},
|
|
842
840
|
emits: ["update:modelValue"],
|
|
843
|
-
setup(
|
|
844
|
-
const e =
|
|
845
|
-
function n(
|
|
846
|
-
const r =
|
|
847
|
-
!isNaN(
|
|
841
|
+
setup(u, { emit: d }) {
|
|
842
|
+
const e = u, t = d;
|
|
843
|
+
function n(k) {
|
|
844
|
+
const r = k.target.value, i = Number(r);
|
|
845
|
+
!isNaN(i) && r !== "" ? t("update:modelValue", i) : t("update:modelValue", r);
|
|
848
846
|
}
|
|
849
|
-
const
|
|
847
|
+
const c = {
|
|
850
848
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
851
849
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
852
850
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
@@ -857,54 +855,54 @@ const T = { key: 1 }, j = `
|
|
|
857
855
|
left: "dk:rounded-l",
|
|
858
856
|
right: "dk:rounded-r",
|
|
859
857
|
none: "dk:rounded-none"
|
|
860
|
-
},
|
|
858
|
+
}, g = {
|
|
861
859
|
sm: "dk:text-sm dk:pb-0.5",
|
|
862
860
|
md: "dk:text-base dk:pb-1",
|
|
863
861
|
lg: "dk:text-lg dk:pb-2"
|
|
864
|
-
},
|
|
865
|
-
const
|
|
866
|
-
return [
|
|
867
|
-
}), x =
|
|
868
|
-
const
|
|
869
|
-
return [
|
|
862
|
+
}, p = b(() => {
|
|
863
|
+
const k = c[e.size] || "", s = e.block ? "dk:w-full" : "", r = l[e.rounded] || "";
|
|
864
|
+
return [X, k, s, r].join(" ");
|
|
865
|
+
}), x = b(() => {
|
|
866
|
+
const k = g[e.size] || "", s = e.block ? "dk:w-full" : "";
|
|
867
|
+
return [k, s].join(" ");
|
|
870
868
|
});
|
|
871
|
-
return (
|
|
872
|
-
e.label ? (a(),
|
|
869
|
+
return (k, s) => (a(), o("div", null, [
|
|
870
|
+
e.label ? (a(), o("label", {
|
|
873
871
|
key: 0,
|
|
874
872
|
for: e.id,
|
|
875
873
|
class: m([x.value, "dk:text-start dk:block dk:text-zinc-700 dk:dark:text-zinc-200 dk:px-0"])
|
|
876
874
|
}, [
|
|
877
|
-
|
|
878
|
-
e.required ? (a(),
|
|
879
|
-
], 10,
|
|
875
|
+
q(y(e.label) + " ", 1),
|
|
876
|
+
e.required ? (a(), o("span", O, "*")) : v("", !0)
|
|
877
|
+
], 10, M)) : v("", !0),
|
|
880
878
|
h("select", {
|
|
881
879
|
id: e.id,
|
|
882
880
|
name: e.name,
|
|
883
881
|
disabled: e.disabled,
|
|
884
882
|
required: e.required,
|
|
885
|
-
class: m(
|
|
883
|
+
class: m(p.value),
|
|
886
884
|
readonly: e.readonly,
|
|
887
885
|
"aria-label": e.label || "select input",
|
|
888
886
|
"aria-disabled": e.disabled,
|
|
889
887
|
"aria-required": e.required,
|
|
890
888
|
onChange: n
|
|
891
889
|
}, [
|
|
892
|
-
e.placeholder ? (a(),
|
|
893
|
-
(a(!0),
|
|
894
|
-
key:
|
|
890
|
+
e.placeholder ? (a(), o("option", U, y(e.placeholder), 1)) : v("", !0),
|
|
891
|
+
(a(!0), o(w, null, C(e.options, (r, i) => (a(), o("option", {
|
|
892
|
+
key: i,
|
|
895
893
|
value: r[e.itemValue] ?? "",
|
|
896
894
|
selected: r[e.itemValue] == e.modelValue
|
|
897
|
-
}, y(r[e.itemLabel] ?? ""), 9,
|
|
898
|
-
], 42,
|
|
895
|
+
}, y(r[e.itemLabel] ?? ""), 9, W))), 128))
|
|
896
|
+
], 42, Q)
|
|
899
897
|
]));
|
|
900
898
|
}
|
|
901
|
-
}),
|
|
899
|
+
}), Y = `
|
|
902
900
|
dk:px-4
|
|
903
901
|
dk:py-3
|
|
904
902
|
dk:text-sm
|
|
905
903
|
dk:leading-relaxed
|
|
906
904
|
dk:max-w-full
|
|
907
|
-
`,
|
|
905
|
+
`, ne = /* @__PURE__ */ f({
|
|
908
906
|
__name: "DuiAlert",
|
|
909
907
|
props: {
|
|
910
908
|
variant: {
|
|
@@ -920,8 +918,8 @@ const T = { key: 1 }, j = `
|
|
|
920
918
|
default: "all"
|
|
921
919
|
}
|
|
922
920
|
},
|
|
923
|
-
setup(
|
|
924
|
-
const d =
|
|
921
|
+
setup(u) {
|
|
922
|
+
const d = u, e = {
|
|
925
923
|
all: "dk:rounded",
|
|
926
924
|
top: "dk:rounded-t",
|
|
927
925
|
bottom: "dk:rounded-b",
|
|
@@ -956,19 +954,19 @@ const T = { key: 1 }, j = `
|
|
|
956
954
|
warning: "dk:text-amber-700 dk:dark:text-amber-200 dk:bg-amber-50 dk:dark:bg-amber-800",
|
|
957
955
|
danger: "dk:text-rose-700 dk:dark:text-rose-200 dk:bg-rose-50 dk:dark:bg-rose-800"
|
|
958
956
|
}
|
|
959
|
-
}, n =
|
|
960
|
-
var
|
|
961
|
-
const
|
|
962
|
-
return [
|
|
957
|
+
}, n = b(() => {
|
|
958
|
+
var p;
|
|
959
|
+
const c = ((p = t[d.variant]) == null ? void 0 : p[d.color]) || "", l = t[d.variant].base || "", g = e[d.rounded] || "";
|
|
960
|
+
return [Y, l, c, g].join(" ");
|
|
963
961
|
});
|
|
964
|
-
return (
|
|
962
|
+
return (c, l) => (a(), o("div", {
|
|
965
963
|
class: m(n.value),
|
|
966
964
|
role: "alert"
|
|
967
965
|
}, [
|
|
968
|
-
|
|
966
|
+
$(c.$slots, "default")
|
|
969
967
|
], 2));
|
|
970
968
|
}
|
|
971
|
-
}),
|
|
969
|
+
}), Z = { class: "dk:relative dk:overflow-x-auto dk:shadow-md dk:sm:rounded-lg" }, ee = { class: "dk:w-full dk:text-sm dk:text-left dk:text-gray-700 dk:dark:text-gray-300" }, de = { class: "dk:text-xs dk:uppercase dk:bg-gray-100 dk:dark:bg-gray-700 dk:dark:text-gray-200" }, se = /* @__PURE__ */ f({
|
|
972
970
|
__name: "DuiTable",
|
|
973
971
|
props: {
|
|
974
972
|
columns: {
|
|
@@ -980,29 +978,29 @@ const T = { key: 1 }, j = `
|
|
|
980
978
|
required: !0
|
|
981
979
|
}
|
|
982
980
|
},
|
|
983
|
-
setup(
|
|
984
|
-
const d =
|
|
985
|
-
return (e, t) => (a(),
|
|
986
|
-
h("table",
|
|
987
|
-
h("thead",
|
|
981
|
+
setup(u) {
|
|
982
|
+
const d = u;
|
|
983
|
+
return (e, t) => (a(), o("div", Z, [
|
|
984
|
+
h("table", ee, [
|
|
985
|
+
h("thead", de, [
|
|
988
986
|
h("tr", null, [
|
|
989
|
-
(a(!0),
|
|
987
|
+
(a(!0), o(w, null, C(d.columns, (n) => (a(), o("th", {
|
|
990
988
|
key: n.name,
|
|
991
989
|
class: m(["dk:px-6 dk:py-3", n.classes])
|
|
992
990
|
}, y(n.label), 3))), 128))
|
|
993
991
|
])
|
|
994
992
|
]),
|
|
995
993
|
h("tbody", null, [
|
|
996
|
-
(a(!0),
|
|
997
|
-
key:
|
|
994
|
+
(a(!0), o(w, null, C(d.rows, (n, c) => (a(), o("tr", {
|
|
995
|
+
key: c,
|
|
998
996
|
class: "dk:bg-white dk:border-b dk:border-gray-200 dk:dark:bg-gray-800 dk:dark:border-gray-700 dk:hover:bg-gray-50 dk:dark:hover:bg-gray-600 dk:transition-colors"
|
|
999
997
|
}, [
|
|
1000
|
-
(a(!0),
|
|
998
|
+
(a(!0), o(w, null, C(d.columns, (l) => (a(), o("td", {
|
|
1001
999
|
key: l.name,
|
|
1002
1000
|
class: "dk:px-6 dk:py-4 dk:text-gray-900 dk:dark:text-gray-100"
|
|
1003
1001
|
}, [
|
|
1004
|
-
|
|
1005
|
-
|
|
1002
|
+
$(e.$slots, l.name, V({ ref_for: !0 }, n), () => [
|
|
1003
|
+
q(y(n[l.name]), 1)
|
|
1006
1004
|
])
|
|
1007
1005
|
]))), 128))
|
|
1008
1006
|
]))), 128))
|
|
@@ -1012,11 +1010,11 @@ const T = { key: 1 }, j = `
|
|
|
1012
1010
|
}
|
|
1013
1011
|
});
|
|
1014
1012
|
export {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1013
|
+
ke as DuiAction,
|
|
1014
|
+
ne as DuiAlert,
|
|
1015
|
+
te as DuiButton,
|
|
1016
|
+
ae as DuiInput,
|
|
1017
|
+
le as DuiSelect,
|
|
1018
|
+
se as DuiTable,
|
|
1021
1019
|
oe as DuiTextarea
|
|
1022
1020
|
};
|
|
@@ -2,36 +2,7 @@ import { StoryObj } from '@storybook/vue3';
|
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: {
|
|
5
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').
|
|
6
|
-
variant: {
|
|
7
|
-
type: () => "solid" | "outline" | "ghost";
|
|
8
|
-
default: string;
|
|
9
|
-
};
|
|
10
|
-
color: {
|
|
11
|
-
type: () => "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
12
|
-
default: string;
|
|
13
|
-
};
|
|
14
|
-
size: {
|
|
15
|
-
type: () => "sm" | "md" | "lg";
|
|
16
|
-
default: string;
|
|
17
|
-
};
|
|
18
|
-
loading: {
|
|
19
|
-
type: BooleanConstructor;
|
|
20
|
-
default: boolean;
|
|
21
|
-
};
|
|
22
|
-
block: {
|
|
23
|
-
type: BooleanConstructor;
|
|
24
|
-
default: boolean;
|
|
25
|
-
};
|
|
26
|
-
title: {
|
|
27
|
-
type: StringConstructor;
|
|
28
|
-
default: undefined;
|
|
29
|
-
};
|
|
30
|
-
rounded: {
|
|
31
|
-
type: () => "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
32
|
-
default: string;
|
|
33
|
-
};
|
|
34
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
5
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./DuiAction.vue').DuiActionProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
35
6
|
variant: "solid" | "outline" | "ghost";
|
|
36
7
|
color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
37
8
|
size: "sm" | "md" | "lg";
|
|
@@ -39,43 +10,15 @@ declare const meta: {
|
|
|
39
10
|
block: boolean;
|
|
40
11
|
title: string;
|
|
41
12
|
rounded: "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
42
|
-
|
|
13
|
+
to: import('../Forms/DuiButton.vue').RouteTo;
|
|
14
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
43
15
|
P: {};
|
|
44
16
|
B: {};
|
|
45
17
|
D: {};
|
|
46
18
|
C: {};
|
|
47
19
|
M: {};
|
|
48
20
|
Defaults: {};
|
|
49
|
-
}, Readonly<import('vue').
|
|
50
|
-
variant: {
|
|
51
|
-
type: () => "solid" | "outline" | "ghost";
|
|
52
|
-
default: string;
|
|
53
|
-
};
|
|
54
|
-
color: {
|
|
55
|
-
type: () => "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
56
|
-
default: string;
|
|
57
|
-
};
|
|
58
|
-
size: {
|
|
59
|
-
type: () => "sm" | "md" | "lg";
|
|
60
|
-
default: string;
|
|
61
|
-
};
|
|
62
|
-
loading: {
|
|
63
|
-
type: BooleanConstructor;
|
|
64
|
-
default: boolean;
|
|
65
|
-
};
|
|
66
|
-
block: {
|
|
67
|
-
type: BooleanConstructor;
|
|
68
|
-
default: boolean;
|
|
69
|
-
};
|
|
70
|
-
title: {
|
|
71
|
-
type: StringConstructor;
|
|
72
|
-
default: undefined;
|
|
73
|
-
};
|
|
74
|
-
rounded: {
|
|
75
|
-
type: () => "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
76
|
-
default: string;
|
|
77
|
-
};
|
|
78
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
21
|
+
}, Readonly<import('./DuiAction.vue').DuiActionProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
79
22
|
variant: "solid" | "outline" | "ghost";
|
|
80
23
|
color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
81
24
|
size: "sm" | "md" | "lg";
|
|
@@ -83,40 +26,12 @@ declare const meta: {
|
|
|
83
26
|
block: boolean;
|
|
84
27
|
title: string;
|
|
85
28
|
rounded: "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
29
|
+
to: import('../Forms/DuiButton.vue').RouteTo;
|
|
86
30
|
}>;
|
|
87
31
|
__isFragment?: never;
|
|
88
32
|
__isTeleport?: never;
|
|
89
33
|
__isSuspense?: never;
|
|
90
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('vue').
|
|
91
|
-
variant: {
|
|
92
|
-
type: () => "solid" | "outline" | "ghost";
|
|
93
|
-
default: string;
|
|
94
|
-
};
|
|
95
|
-
color: {
|
|
96
|
-
type: () => "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
97
|
-
default: string;
|
|
98
|
-
};
|
|
99
|
-
size: {
|
|
100
|
-
type: () => "sm" | "md" | "lg";
|
|
101
|
-
default: string;
|
|
102
|
-
};
|
|
103
|
-
loading: {
|
|
104
|
-
type: BooleanConstructor;
|
|
105
|
-
default: boolean;
|
|
106
|
-
};
|
|
107
|
-
block: {
|
|
108
|
-
type: BooleanConstructor;
|
|
109
|
-
default: boolean;
|
|
110
|
-
};
|
|
111
|
-
title: {
|
|
112
|
-
type: StringConstructor;
|
|
113
|
-
default: undefined;
|
|
114
|
-
};
|
|
115
|
-
rounded: {
|
|
116
|
-
type: () => "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
117
|
-
default: string;
|
|
118
|
-
};
|
|
119
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
34
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./DuiAction.vue').DuiActionProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
120
35
|
variant: "solid" | "outline" | "ghost";
|
|
121
36
|
color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
122
37
|
size: "sm" | "md" | "lg";
|
|
@@ -124,6 +39,7 @@ declare const meta: {
|
|
|
124
39
|
block: boolean;
|
|
125
40
|
title: string;
|
|
126
41
|
rounded: "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
42
|
+
to: import('../Forms/DuiButton.vue').RouteTo;
|
|
127
43
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
128
44
|
$slots: {
|
|
129
45
|
default?(_: {}): any;
|
|
@@ -183,8 +99,19 @@ declare const meta: {
|
|
|
183
99
|
options: string[];
|
|
184
100
|
defaultValue: string;
|
|
185
101
|
};
|
|
102
|
+
to: {
|
|
103
|
+
control: {
|
|
104
|
+
type: "text";
|
|
105
|
+
};
|
|
106
|
+
defaultValue: undefined;
|
|
107
|
+
description: string;
|
|
108
|
+
};
|
|
186
109
|
};
|
|
187
110
|
};
|
|
188
111
|
export default meta;
|
|
189
112
|
type Story = StoryObj<typeof meta>;
|
|
190
113
|
export declare const Default: Story;
|
|
114
|
+
export declare const WithRouting: Story;
|
|
115
|
+
export declare const WithComplexRoute: Story;
|
|
116
|
+
export declare const ExternalLink: Story;
|
|
117
|
+
export declare const LoadingWithRoute: Story;
|
|
@@ -1,71 +1,24 @@
|
|
|
1
|
+
import { RouteTo } from '../Forms/DuiButton.vue';
|
|
2
|
+
export interface DuiActionProps {
|
|
3
|
+
variant?: 'solid' | 'outline' | 'ghost';
|
|
4
|
+
color?: 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
5
|
+
size?: 'sm' | 'md' | 'lg';
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
block?: boolean;
|
|
8
|
+
title?: string;
|
|
9
|
+
rounded?: 'all' | 'top' | 'bottom' | 'left' | 'right' | 'none';
|
|
10
|
+
to?: RouteTo;
|
|
11
|
+
}
|
|
1
12
|
declare function __VLS_template(): {
|
|
2
13
|
attrs: Partial<{}>;
|
|
3
14
|
slots: {
|
|
4
15
|
default?(_: {}): any;
|
|
5
16
|
};
|
|
6
17
|
refs: {};
|
|
7
|
-
rootEl:
|
|
18
|
+
rootEl: any;
|
|
8
19
|
};
|
|
9
20
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').
|
|
11
|
-
variant: {
|
|
12
|
-
type: () => "solid" | "outline" | "ghost";
|
|
13
|
-
default: string;
|
|
14
|
-
};
|
|
15
|
-
color: {
|
|
16
|
-
type: () => "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
17
|
-
default: string;
|
|
18
|
-
};
|
|
19
|
-
size: {
|
|
20
|
-
type: () => "sm" | "md" | "lg";
|
|
21
|
-
default: string;
|
|
22
|
-
};
|
|
23
|
-
loading: {
|
|
24
|
-
type: BooleanConstructor;
|
|
25
|
-
default: boolean;
|
|
26
|
-
};
|
|
27
|
-
block: {
|
|
28
|
-
type: BooleanConstructor;
|
|
29
|
-
default: boolean;
|
|
30
|
-
};
|
|
31
|
-
title: {
|
|
32
|
-
type: StringConstructor;
|
|
33
|
-
default: undefined;
|
|
34
|
-
};
|
|
35
|
-
rounded: {
|
|
36
|
-
type: () => "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
37
|
-
default: string;
|
|
38
|
-
};
|
|
39
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
40
|
-
variant: {
|
|
41
|
-
type: () => "solid" | "outline" | "ghost";
|
|
42
|
-
default: string;
|
|
43
|
-
};
|
|
44
|
-
color: {
|
|
45
|
-
type: () => "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
46
|
-
default: string;
|
|
47
|
-
};
|
|
48
|
-
size: {
|
|
49
|
-
type: () => "sm" | "md" | "lg";
|
|
50
|
-
default: string;
|
|
51
|
-
};
|
|
52
|
-
loading: {
|
|
53
|
-
type: BooleanConstructor;
|
|
54
|
-
default: boolean;
|
|
55
|
-
};
|
|
56
|
-
block: {
|
|
57
|
-
type: BooleanConstructor;
|
|
58
|
-
default: boolean;
|
|
59
|
-
};
|
|
60
|
-
title: {
|
|
61
|
-
type: StringConstructor;
|
|
62
|
-
default: undefined;
|
|
63
|
-
};
|
|
64
|
-
rounded: {
|
|
65
|
-
type: () => "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
66
|
-
default: string;
|
|
67
|
-
};
|
|
68
|
-
}>> & Readonly<{}>, {
|
|
21
|
+
declare const __VLS_component: import('vue').DefineComponent<DuiActionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DuiActionProps> & Readonly<{}>, {
|
|
69
22
|
variant: "solid" | "outline" | "ghost";
|
|
70
23
|
color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
71
24
|
size: "sm" | "md" | "lg";
|
|
@@ -73,7 +26,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
73
26
|
block: boolean;
|
|
74
27
|
title: string;
|
|
75
28
|
rounded: "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
76
|
-
|
|
29
|
+
to: RouteTo;
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
77
31
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
78
32
|
export default _default;
|
|
79
33
|
type __VLS_WithTemplateSlots<T, S> = T & {
|