@dronico/droni-kit 1.22.1 → 1.22.2
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.22.2](https://github.com/Droni-app/droni-kit/compare/v1.22.1...v1.22.2) (2026-08-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* null option in File form ([eb8f244](https://github.com/Droni-app/droni-kit/commit/eb8f24475783ae5c7f01b538713ab1d965c1da6b))
|
|
7
|
+
|
|
1
8
|
## [1.22.1](https://github.com/Droni-app/droni-kit/compare/v1.22.0...v1.22.1) (2026-08-17)
|
|
2
9
|
|
|
3
10
|
|
package/dist/droni-kit.cjs.js
CHANGED
|
@@ -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`}},f=e.computed(()=>{var y;const l=(((y=v[r.variant])==null?void 0:y[r.color])||"")+" "+v[r.variant].base,c=m[r.size]||"",b=r.block?"dk:w-full":"",g=s[r.rounded]||"";return[ne,l,c,b,g].join(" ")});return(l,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),e.mergeProps(k.value,{class:f.value,title:r.title,disabled:r.disabled||r.loading}),{default:e.withCtx(()=>[r.loading?(e.openBlock(),e.createElementBlock("span",ae,"Cargando...")):e.renderSlot(l.$slots,"default",{},void 0,void 0,0)]),_:3},16,["class","title","disabled"]))}}),le=["accept"],ke=e.defineComponent({inheritAttrs:!1,__name:"DuiFile",props:{modelValue:{type:String,default:
|
|
156
|
+
dk:dark:hover:bg-amber-800`}},f=e.computed(()=>{var y;const l=(((y=v[r.variant])==null?void 0:y[r.color])||"")+" "+v[r.variant].base,c=m[r.size]||"",b=r.block?"dk:w-full":"",g=s[r.rounded]||"";return[ne,l,c,b,g].join(" ")});return(l,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),e.mergeProps(k.value,{class:f.value,title:r.title,disabled:r.disabled||r.loading}),{default:e.withCtx(()=>[r.loading?(e.openBlock(),e.createElementBlock("span",ae,"Cargando...")):e.renderSlot(l.$slots,"default",{},void 0,void 0,0)]),_:3},16,["class","title","disabled"]))}}),le=["accept"],ke=e.defineComponent({inheritAttrs:!1,__name:"DuiFile",props:{modelValue:{type:String,default:null},accept:{type:String,default:"*"},size:{type:String,default:"md"},block:{type:Boolean,default:!0},rounded:{type:String,default:"all"},uploadBtn:{type:Boolean,default:!0},browserBtn:{type:Boolean,default:!0}},emits:["update:modelValue","open-browser","upload-file","open-file"],setup(t,{emit:r}){const d=t,k=r,m=e.ref(null),s=e.ref(""),v={sm:"dk:gap-1 dk:px-2 dk:py-1",md:"dk:gap-2 dk:px-3 dk:py-2",lg:"dk:gap-3 dk:px-4 dk:py-3"},f={all:"dk:rounded-xl",top:"dk:rounded-t-xl",bottom:"dk:rounded-b-xl",left:"dk:rounded-l-xl",right:"dk:rounded-r-xl",none:"dk:rounded-none"},l=e.computed(()=>d.block?"dk:w-full":"dk:inline-flex dk:max-w-full"),c=e.computed(()=>{const o=v[d.size]||v.md,a=f[d.rounded]||f.all;return["dk:flex dk:w-full dk:flex-col dk:items-stretch dk:justify-between dk:border-b dk:border-zinc-300 dk:bg-zinc-50 dk:text-zinc-800 dk:shadow-sm dk:transition-colors","dk:dark:border-zinc-600 dk:dark:bg-zinc-800 dk:dark:text-zinc-100","dk:sm:flex-row dk:sm:items-center",o,a].join(" ")}),b=e.computed(()=>"dk:min-w-0 dk:flex-1"),g=e.computed(()=>["dk:flex dk:flex-col dk:gap-2 dk:w-full","dk:sm:w-auto dk:sm:flex-row dk:sm:items-center dk:sm:justify-end"].join(" ")),y=e.computed(()=>["dk:mt-1 dk:max-w-full dk:overflow-hidden dk:text-ellipsis dk:whitespace-nowrap dk:text-sm",d.modelValue||s.value?"dk:text-zinc-900 dk:dark:text-zinc-100":"dk:text-zinc-500 dk:dark:text-zinc-400"].join(" ")),B=e.computed(()=>s.value?s.value:d.modelValue?p(d.modelValue):"No hay archivo seleccionado");e.watch(()=>d.modelValue,o=>{o&&(s.value="")});function p(o){const a=o.split("/");return a[a.length-1]}function i(){k("open-browser")}function n(){var o;(o=m.value)==null||o.click()}function u(o){var w;const a=o.target,h=(w=a.files)==null?void 0:w[0];h&&(s.value=h.name,k("upload-file",h),x(a))}function x(o){o.value=""}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.value)},[e.createElementVNode("div",{class:e.normalizeClass(c.value)},[e.createElementVNode("div",{class:e.normalizeClass(b.value)},[d.modelValue??s.value?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(y.value)},[e.createElementVNode("a",{href:"#",onClick:a[0]||(a[0]=e.withModifiers(h=>k("open-file",d.modelValue??s.value),["prevent"])),class:"dk:ml-2 dk:text-pink-500 dk:underline dk:transition-colors dk:hover:text-pink-800 dk:dark:text-pink-400 dk:dark:hover:text-pink-300"},e.toDisplayString(B.value),1)],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(g.value)},[d.browserBtn?(e.openBlock(),e.createBlock(F,{key:0,color:"primary",variant:"outline",size:"sm",block:!1,title:"Abrir navegador de archivos",onClick:i},{default:e.withCtx(()=>[...a[1]||(a[1]=[e.createElementVNode("i",{class:"mdi mdi-folder-search-outline","aria-hidden":"true"},null,-1)])]),_:1})):e.createCommentVNode("",!0),d.uploadBtn?(e.openBlock(),e.createBlock(F,{key:1,color:"neutral",variant:"solid",size:"sm",block:!1,title:"Subir nuevo archivo",onClick:n},{default:e.withCtx(()=>[...a[2]||(a[2]=[e.createElementVNode("i",{class:"mdi mdi-upload","aria-hidden":"true"},null,-1)])]),_:1})):e.createCommentVNode("",!0)],2)],2),e.createElementVNode("input",{ref_key:"fileInputRef",ref:m,type:"file",class:"dk:hidden",accept:d.accept,onChange:u},null,40,le)],2))}}),se=["value"],ie=`
|
|
157
157
|
dk:border-b
|
|
158
158
|
dk:border-zinc-300
|
|
159
159
|
dk:bg-zinc-50
|
package/dist/droni-kit.es.js
CHANGED
|
@@ -3,8 +3,8 @@ declare const meta: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
5
|
modelValue: {
|
|
6
|
-
type:
|
|
7
|
-
default:
|
|
6
|
+
type: () => string | null;
|
|
7
|
+
default: null;
|
|
8
8
|
};
|
|
9
9
|
accept: {
|
|
10
10
|
type: StringConstructor;
|
|
@@ -37,8 +37,8 @@ declare const meta: {
|
|
|
37
37
|
"open-file": (value: string) => any;
|
|
38
38
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
39
39
|
modelValue: {
|
|
40
|
-
type:
|
|
41
|
-
default:
|
|
40
|
+
type: () => string | null;
|
|
41
|
+
default: null;
|
|
42
42
|
};
|
|
43
43
|
accept: {
|
|
44
44
|
type: StringConstructor;
|
|
@@ -73,7 +73,7 @@ declare const meta: {
|
|
|
73
73
|
size: "sm" | "md" | "lg";
|
|
74
74
|
block: boolean;
|
|
75
75
|
rounded: "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
76
|
-
modelValue: string;
|
|
76
|
+
modelValue: string | null;
|
|
77
77
|
accept: string;
|
|
78
78
|
uploadBtn: boolean;
|
|
79
79
|
browserBtn: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
2
|
modelValue: {
|
|
3
|
-
type:
|
|
4
|
-
default:
|
|
3
|
+
type: () => string | null;
|
|
4
|
+
default: null;
|
|
5
5
|
};
|
|
6
6
|
accept: {
|
|
7
7
|
type: StringConstructor;
|
|
@@ -34,8 +34,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
34
34
|
"open-file": (value: string) => any;
|
|
35
35
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
36
36
|
modelValue: {
|
|
37
|
-
type:
|
|
38
|
-
default:
|
|
37
|
+
type: () => string | null;
|
|
38
|
+
default: null;
|
|
39
39
|
};
|
|
40
40
|
accept: {
|
|
41
41
|
type: StringConstructor;
|
|
@@ -70,7 +70,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
70
70
|
size: "sm" | "md" | "lg";
|
|
71
71
|
block: boolean;
|
|
72
72
|
rounded: "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
73
|
-
modelValue: string;
|
|
73
|
+
modelValue: string | null;
|
|
74
74
|
accept: string;
|
|
75
75
|
uploadBtn: boolean;
|
|
76
76
|
browserBtn: boolean;
|