@dronico/droni-kit 1.7.7 → 1.7.8

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.7.8](https://github.com/Droni-app/droni-kit/compare/v1.7.7...v1.7.8) (2025-05-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * readonly on textarea ([f72d1e2](https://github.com/Droni-app/droni-kit/commit/f72d1e278e252ccfd7410b23a9dc06fd5210618d))
7
+
1
8
  ## [1.7.7](https://github.com/Droni-app/droni-kit/compare/v1.7.6...v1.7.7) (2025-05-09)
2
9
 
3
10
 
@@ -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]`,_=e.defineComponent({__name:"DuiInput",props:{modelValue:{type:String,default:""},type:{type:String,default:"text"},size:{type:String,default:"md"},block:{type:Boolean,default:!1},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"}},emits:["update:modelValue"],setup(l,{emit:r}){const d=l,b=r;function n(t){const o=t.target;b("update:modelValue",o.value)}const s={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"},i={sm:"dk:text-sm dk:pb-0.5",md:"dk:text-base dk:pb-1",lg:"dk:text-lg dk:pb-2"},c=e.computed(()=>{const t=s[d.size]||"",o=d.block?"dk:w-full":"",a=k[d.rounded]||"";return[C,t,o,a].join(" ")}),u=e.computed(()=>{const t=i[d.size]||"",o=d.block?"dk:w-full":"";return[t,o].join(" ")});return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[d.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:d.id,class:e.normalizeClass([u.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",f,"*")):e.createCommentVNode("",!0)],10,z)):e.createCommentVNode("",!0),e.createElementVNode("input",{type:d.type,class:e.normalizeClass(c.value),value:l.modelValue,disabled:d.disabled,placeholder:d.placeholder,required:d.required,name:d.name,id:d.id,pattern:d.pattern,readonly:d.readonly,"aria-label":d.placeholder,"aria-disabled":d.disabled,"aria-required":d.required,onInput:n},null,42,S)]))}}),B=["for"],w={key:0,class:"dk:text-rose-500"},V=["value","disabled","placeholder","required","name","id","aria-label","aria-disabled","aria-required"],q=`
168
+ dk:dark:[color-scheme:dark]`,_=e.defineComponent({__name:"DuiInput",props:{modelValue:{type:String,default:""},type:{type:String,default:"text"},size:{type:String,default:"md"},block:{type:Boolean,default:!1},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"}},emits:["update:modelValue"],setup(l,{emit:r}){const d=l,b=r;function n(t){const o=t.target;b("update:modelValue",o.value)}const s={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"},i={sm:"dk:text-sm dk:pb-0.5",md:"dk:text-base dk:pb-1",lg:"dk:text-lg dk:pb-2"},c=e.computed(()=>{const t=s[d.size]||"",o=d.block?"dk:w-full":"",a=k[d.rounded]||"";return[C,t,o,a].join(" ")}),u=e.computed(()=>{const t=i[d.size]||"",o=d.block?"dk:w-full":"";return[t,o].join(" ")});return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[d.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:d.id,class:e.normalizeClass([u.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",f,"*")):e.createCommentVNode("",!0)],10,z)):e.createCommentVNode("",!0),e.createElementVNode("input",{type:d.type,class:e.normalizeClass(c.value),value:l.modelValue,disabled:d.disabled,placeholder:d.placeholder,required:d.required,name:d.name,id:d.id,pattern:d.pattern,readonly:d.readonly,"aria-label":d.placeholder,"aria-disabled":d.disabled,"aria-required":d.required,onInput:n},null,42,S)]))}}),B=["for"],w={key:0,class:"dk:text-rose-500"},V=["value","disabled","placeholder","required","name","id","readonly","aria-label","aria-disabled","aria-required"],q=`
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]`,$=e.defineComponent({__name:"DuiTextarea",props:{modelValue:{type:String,default:""},size:{type:String,default:"md"},block:{type:Boolean,default:!1},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},rounded:{type:String,default:"all"},autoheight:{type:Boolean,default:!0},resize:{type:String,default:"none"}},emits:["update:modelValue"],setup(l,{emit:r}){const d=l,b=r;function n(a){const p=a.target;d.autoheight&&o(p),b("update:modelValue",p.value)}const s={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"},i={sm:"dk:text-sm dk:pb-0.5",md:"dk:text-base dk:pb-1",lg:"dk:text-lg dk:pb-2"},c={none:"dk:resize-none",both:"dk:resize",horizontal:"dk:resize-x",vertical:"dk:resize-y"},u=e.computed(()=>{const a=s[d.size]||"",p=d.block?"dk:w-full":"",m=k[d.rounded]||"",g=c[d.resize]||"";return[q,a,p,m,g].join(" ")}),t=e.computed(()=>{const a=i[d.size]||"",p=d.block?"dk:w-full":"";return[a,p].join(" ")}),o=a=>{a.style.height="auto",a.style.height=`${a.scrollHeight+5}px`};return(a,p)=>(e.openBlock(),e.createElementBlock("div",null,[d.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:d.id,class:e.normalizeClass([t.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,B)):e.createCommentVNode("",!0),e.createElementVNode("textarea",{class:e.normalizeClass(u.value),value:l.modelValue,disabled:d.disabled,placeholder:d.placeholder,required:d.required,name:d.name,id:d.id,"aria-label":d.placeholder,"aria-disabled":d.disabled,"aria-required":d.required,onInput:n},null,42,V)]))}}),E=["title"],D={key:1},N=`
180
+ dk:dark:[color-scheme:dark]`,$=e.defineComponent({__name:"DuiTextarea",props:{modelValue:{type:String,default:""},size:{type:String,default:"md"},block:{type:Boolean,default:!1},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:"none"}},emits:["update:modelValue"],setup(l,{emit:r}){const d=l,b=r;function n(a){const p=a.target;d.autoheight&&o(p),b("update:modelValue",p.value)}const s={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"},i={sm:"dk:text-sm dk:pb-0.5",md:"dk:text-base dk:pb-1",lg:"dk:text-lg dk:pb-2"},c={none:"dk:resize-none",both:"dk:resize",horizontal:"dk:resize-x",vertical:"dk:resize-y"},u=e.computed(()=>{const a=s[d.size]||"",p=d.block?"dk:w-full":"",m=k[d.rounded]||"",g=c[d.resize]||"";return[q,a,p,m,g].join(" ")}),t=e.computed(()=>{const a=i[d.size]||"",p=d.block?"dk:w-full":"";return[a,p].join(" ")}),o=a=>{a.style.height="auto",a.style.height=`${a.scrollHeight+5}px`};return(a,p)=>(e.openBlock(),e.createElementBlock("div",null,[d.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:d.id,class:e.normalizeClass([t.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,B)):e.createCommentVNode("",!0),e.createElementVNode("textarea",{class:e.normalizeClass(u.value),value:l.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:n},null,42,V)]))}}),E=["title"],D={key:1},N=`
181
181
  dk:transition
182
182
  dk:text-center
183
183
  dk:disabled:opacity-50
@@ -1,4 +1,4 @@
1
- import { defineComponent as v, computed as x, createElementBlock as k, openBlock as a, normalizeClass as m, renderSlot as z, createCommentVNode as h, createElementVNode as f, createTextVNode as S, toDisplayString as y, Fragment as C, renderList as q } from "vue";
1
+ import { defineComponent as v, computed as x, createElementBlock as a, openBlock as k, normalizeClass as m, renderSlot as z, createCommentVNode as h, createElementVNode as f, createTextVNode as S, toDisplayString as y, Fragment as C, renderList as q } from "vue";
2
2
  const $ = ["type", "title", "disabled"], B = { key: 1 }, V = `
3
3
  dk:transition
4
4
  dk:text-center
@@ -239,13 +239,13 @@ const $ = ["type", "title", "disabled"], B = { key: 1 }, V = `
239
239
  const o = (((r = s[d.variant]) == null ? void 0 : r[d.color]) || "") + " " + s[d.variant].base, b = e[d.size] || "", u = d.block ? "dk:w-full" : "", p = c[d.rounded] || "";
240
240
  return [V, o, b, u, p].join(" ");
241
241
  });
242
- return (o, b) => (a(), k("button", {
242
+ return (o, b) => (k(), a("button", {
243
243
  type: d.type,
244
244
  class: m(i.value),
245
245
  title: d.title,
246
246
  disabled: d.disabled || d.loading
247
247
  }, [
248
- d.loading ? (a(), k("span", B, "Cargando...")) : z(o.$slots, "default", { key: 0 })
248
+ d.loading ? (k(), a("span", B, "Cargando...")) : z(o.$slots, "default", { key: 0 })
249
249
  ], 10, $));
250
250
  }
251
251
  }), D = ["for"], j = {
@@ -348,14 +348,14 @@ const $ = ["type", "title", "disabled"], B = { key: 1 }, V = `
348
348
  const r = b[e.size] || "", l = e.block ? "dk:w-full" : "";
349
349
  return [r, l].join(" ");
350
350
  });
351
- return (r, l) => (a(), k("div", null, [
352
- e.label ? (a(), k("label", {
351
+ return (r, l) => (k(), a("div", null, [
352
+ e.label ? (k(), a("label", {
353
353
  key: 0,
354
354
  for: e.id,
355
355
  class: m([p.value, "dk:text-start dk:block dk:text-zinc-700 dk:dark:text-zinc-200 dk:px-0"])
356
356
  }, [
357
357
  S(y(e.label) + " ", 1),
358
- e.required ? (a(), k("span", j, "*")) : h("", !0)
358
+ e.required ? (k(), a("span", j, "*")) : h("", !0)
359
359
  ], 10, D)) : h("", !0),
360
360
  f("input", {
361
361
  type: e.type,
@@ -378,7 +378,7 @@ const $ = ["type", "title", "disabled"], B = { key: 1 }, V = `
378
378
  }), I = ["for"], N = {
379
379
  key: 0,
380
380
  class: "dk:text-rose-500"
381
- }, T = ["value", "disabled", "placeholder", "required", "name", "id", "aria-label", "aria-disabled", "aria-required"], E = `
381
+ }, T = ["value", "disabled", "placeholder", "required", "name", "id", "readonly", "aria-label", "aria-disabled", "aria-required"], E = `
382
382
  dk:border-b
383
383
  dk:border-zinc-300
384
384
  dk:bg-zinc-50
@@ -429,6 +429,10 @@ const $ = ["type", "title", "disabled"], B = { key: 1 }, V = `
429
429
  type: String,
430
430
  default: void 0
431
431
  },
432
+ readonly: {
433
+ type: Boolean,
434
+ default: !1
435
+ },
432
436
  rounded: {
433
437
  type: String,
434
438
  default: "all"
@@ -478,14 +482,14 @@ const $ = ["type", "title", "disabled"], B = { key: 1 }, V = `
478
482
  }), l = (t) => {
479
483
  t.style.height = "auto", t.style.height = `${t.scrollHeight + 5}px`;
480
484
  };
481
- return (t, g) => (a(), k("div", null, [
482
- e.label ? (a(), k("label", {
485
+ return (t, g) => (k(), a("div", null, [
486
+ e.label ? (k(), a("label", {
483
487
  key: 0,
484
488
  for: e.id,
485
489
  class: m([r.value, "dk:text-start dk:block dk:text-zinc-700 dk:dark:text-zinc-200 dk:px-0"])
486
490
  }, [
487
491
  S(y(e.label) + " ", 1),
488
- e.required ? (a(), k("span", N, "*")) : h("", !0)
492
+ e.required ? (k(), a("span", N, "*")) : h("", !0)
489
493
  ], 10, I)) : h("", !0),
490
494
  f("textarea", {
491
495
  class: m(p.value),
@@ -495,6 +499,7 @@ const $ = ["type", "title", "disabled"], B = { key: 1 }, V = `
495
499
  required: e.required,
496
500
  name: e.name,
497
501
  id: e.id,
502
+ readonly: e.readonly,
498
503
  "aria-label": e.placeholder,
499
504
  "aria-disabled": e.disabled,
500
505
  "aria-required": e.required,
@@ -734,11 +739,11 @@ const $ = ["type", "title", "disabled"], B = { key: 1 }, V = `
734
739
  const o = (((r = s[d.variant]) == null ? void 0 : r[d.color]) || "") + " " + s[d.variant].base, b = e[d.size] || "", u = d.block ? "dk:block" : "dk:inline-block", p = c[d.rounded] || "";
735
740
  return [R, o, b, u, p].join(" ");
736
741
  });
737
- return (o, b) => (a(), k("span", {
742
+ return (o, b) => (k(), a("span", {
738
743
  class: m(i.value),
739
744
  title: d.title
740
745
  }, [
741
- d.loading ? (a(), k("span", H, "Cargando...")) : z(o.$slots, "default", { key: 0 })
746
+ d.loading ? (k(), a("span", H, "Cargando...")) : z(o.$slots, "default", { key: 0 })
742
747
  ], 10, F));
743
748
  }
744
749
  }), G = ["for"], J = {
@@ -851,14 +856,14 @@ const $ = ["type", "title", "disabled"], B = { key: 1 }, V = `
851
856
  const r = b[e.size] || "", l = e.block ? "dk:w-full" : "";
852
857
  return [r, l].join(" ");
853
858
  });
854
- return (r, l) => (a(), k("div", null, [
855
- e.label ? (a(), k("label", {
859
+ return (r, l) => (k(), a("div", null, [
860
+ e.label ? (k(), a("label", {
856
861
  key: 0,
857
862
  for: e.id,
858
863
  class: m([p.value, "dk:text-start dk:block dk:text-zinc-700 dk:dark:text-zinc-200 dk:px-0"])
859
864
  }, [
860
865
  S(y(e.label) + " ", 1),
861
- e.required ? (a(), k("span", J, "*")) : h("", !0)
866
+ e.required ? (k(), a("span", J, "*")) : h("", !0)
862
867
  ], 10, G)) : h("", !0),
863
868
  f("select", {
864
869
  id: e.id,
@@ -872,8 +877,8 @@ const $ = ["type", "title", "disabled"], B = { key: 1 }, V = `
872
877
  "aria-required": e.required,
873
878
  onChange: s
874
879
  }, [
875
- e.placeholder ? (a(), k("option", M, y(e.placeholder), 1)) : h("", !0),
876
- (a(!0), k(C, null, q(e.options, (t, g) => (a(), k("option", {
880
+ e.placeholder ? (k(), a("option", M, y(e.placeholder), 1)) : h("", !0),
881
+ (k(!0), a(C, null, q(e.options, (t, g) => (k(), a("option", {
877
882
  key: g,
878
883
  value: t[e.itemValue] ?? "",
879
884
  selected: t[e.itemValue] == e.modelValue
@@ -944,7 +949,7 @@ const $ = ["type", "title", "disabled"], B = { key: 1 }, V = `
944
949
  const i = ((u = c[d.variant]) == null ? void 0 : u[d.color]) || "", o = c[d.variant].base || "", b = e[d.rounded] || "";
945
950
  return [Q, o, i, b].join(" ");
946
951
  });
947
- return (i, o) => (a(), k("div", {
952
+ return (i, o) => (k(), a("div", {
948
953
  class: m(s.value),
949
954
  role: "alert"
950
955
  }, [
@@ -38,6 +38,10 @@ declare const meta: {
38
38
  type: StringConstructor;
39
39
  default: undefined;
40
40
  };
41
+ readonly: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
41
45
  rounded: {
42
46
  type: () => "all" | "top" | "bottom" | "left" | "right" | "none";
43
47
  default: string;
@@ -89,6 +93,10 @@ declare const meta: {
89
93
  type: StringConstructor;
90
94
  default: undefined;
91
95
  };
96
+ readonly: {
97
+ type: BooleanConstructor;
98
+ default: boolean;
99
+ };
92
100
  rounded: {
93
101
  type: () => "all" | "top" | "bottom" | "left" | "right" | "none";
94
102
  default: string;
@@ -114,6 +122,7 @@ declare const meta: {
114
122
  name: string;
115
123
  id: string;
116
124
  required: boolean;
125
+ readonly: boolean;
117
126
  autoheight: boolean;
118
127
  resize: "none" | "both" | "horizontal" | "vertical";
119
128
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
@@ -182,6 +191,12 @@ declare const meta: {
182
191
  options: string[];
183
192
  defaultValue: string;
184
193
  };
194
+ readonly: {
195
+ control: {
196
+ type: "boolean";
197
+ };
198
+ defaultValue: boolean;
199
+ };
185
200
  };
186
201
  };
187
202
  export default meta;
@@ -35,6 +35,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
35
35
  type: StringConstructor;
36
36
  default: undefined;
37
37
  };
38
+ readonly: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
38
42
  rounded: {
39
43
  type: () => "all" | "top" | "bottom" | "left" | "right" | "none";
40
44
  default: string;
@@ -86,6 +90,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
86
90
  type: StringConstructor;
87
91
  default: undefined;
88
92
  };
93
+ readonly: {
94
+ type: BooleanConstructor;
95
+ default: boolean;
96
+ };
89
97
  rounded: {
90
98
  type: () => "all" | "top" | "bottom" | "left" | "right" | "none";
91
99
  default: string;
@@ -111,6 +119,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
111
119
  name: string;
112
120
  id: string;
113
121
  required: boolean;
122
+ readonly: boolean;
114
123
  autoheight: boolean;
115
124
  resize: "none" | "both" | "horizontal" | "vertical";
116
125
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dronico/droni-kit",
3
3
  "author": "Gustavo Barragan <dev@droni.co>",
4
- "version": "1.7.7",
4
+ "version": "1.7.8",
5
5
  "private": false,
6
6
  "access": "public",
7
7
  "publishConfig": {