@wikicasa-dev/components 1.8.0 → 1.8.1

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.
@@ -1,11 +1,11 @@
1
- import { defineComponent as $, mergeModels as f, useModel as x, ref as L, watch as M, onBeforeMount as B, openBlock as n, createElementBlock as k, normalizeClass as s, createElementVNode as r, unref as a, withModifiers as o, createCommentVNode as p, createVNode as F, nextTick as z } from "vue";
2
- import E from "./BaseFloatingLabel.js";
3
- import { useFloatingLabel as I } from "./useFloatingLabel.js";
4
- import { _ as C } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
1
+ import { defineComponent as h, mergeModels as f, useModel as x, ref as L, watch as M, onBeforeMount as B, openBlock as k, createElementBlock as b, normalizeClass as s, createElementVNode as o, unref as l, withModifiers as d, createCommentVNode as p, createVNode as F, nextTick as z } from "vue";
2
+ import C from "./BaseFloatingLabel.js";
3
+ import { useFloatingLabel as E } from "./useFloatingLabel.js";
4
+ import { _ as I } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
5
5
  import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled", "aria-labelledby", "readonly", "value"], q = {
6
6
  key: 0,
7
7
  class: "uikit-visible uikit-float-none uikit-ml-2 uikit-block uikit-h-3 uikit-w-auto uikit-max-w-full uikit-overflow-hidden uikit-whitespace-nowrap uikit-p-0 uikit-text uikit-duration-[50s] uikit-ease-out"
8
- }, A = ["innerHTML"], N = ["innerHTML"], D = /* @__PURE__ */ $({
8
+ }, A = ["innerHTML"], N = ["innerHTML"], D = /* @__PURE__ */ h({
9
9
  inheritAttrs: !1,
10
10
  __name: "BaseTextarea",
11
11
  props: /* @__PURE__ */ f({
@@ -17,22 +17,22 @@ import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled
17
17
  modelValue: { default: "" },
18
18
  modelModifiers: {}
19
19
  }),
20
- emits: /* @__PURE__ */ f(["focusin", "focusout", "keydown"], ["update:modelValue"]),
20
+ emits: /* @__PURE__ */ f(["focusin", "focusout", "click", "keydown"], ["update:modelValue"]),
21
21
  setup(v, { expose: m, emit: c }) {
22
- const u = x(v, "modelValue"), b = c, {
23
- labelState: t,
22
+ const u = x(v, "modelValue"), n = c, {
23
+ labelState: a,
24
24
  setInitialLabelState: w,
25
25
  handleFocusIn: g,
26
26
  handleFocusOut: y,
27
27
  setFloatingLabel: V,
28
28
  setInlineLabel: T
29
- } = I(b), i = L(null);
29
+ } = E(n), i = L(null);
30
30
  M(u, (e) => {
31
- `${e}`.length && t.value !== "floating-label" ? V() : !e?.length && t.value !== "inline-label" && document.activeElement !== i.value && T();
31
+ `${e}`.length && a.value !== "floating-label" ? V() : !e?.length && a.value !== "inline-label" && document.activeElement !== i.value && T();
32
32
  }), B(() => {
33
33
  w(u.value);
34
34
  });
35
- const h = ({ target: e }) => {
35
+ const $ = ({ target: e }) => {
36
36
  u.value = e.value;
37
37
  };
38
38
  return m({
@@ -47,15 +47,15 @@ import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled
47
47
  i.value && i.value.focus();
48
48
  }));
49
49
  }
50
- }), (e, l) => (n(), k("div", {
50
+ }), (e, t) => (k(), b("div", {
51
51
  class: s(e.$attrs["wrapper-classes"])
52
52
  }, [
53
- r("div", {
53
+ o("div", {
54
54
  class: s(["input-wrapper uikit-relative uikit-rounded-xs uikit-px-0", [
55
- a(t) === "floating-label" ? "floating-state" : "inline-state"
55
+ l(a) === "floating-label" ? "floating-state" : "inline-state"
56
56
  ]])
57
57
  }, [
58
- r("textarea", {
58
+ o("textarea", {
59
59
  id: e.$attrs.id,
60
60
  ref_key: "textarea",
61
61
  ref: i,
@@ -70,13 +70,14 @@ import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled
70
70
  disabled: e.$attrs.disabled,
71
71
  "aria-labelledby": e.$attrs.id,
72
72
  readonly: e.$attrs.readonly,
73
- onFocusin: l[0] || (l[0] = o((d) => a(g)(), ["stop"])),
74
- onFocusout: l[1] || (l[1] = o((d) => a(y)(`${u.value}`.trim()), ["stop"])),
75
- onInput: o(h, ["stop"]),
76
- onKeydown: l[2] || (l[2] = o((d) => b("keydown", d), ["stop"])),
73
+ onFocusin: t[0] || (t[0] = d((r) => l(g)(), ["stop"])),
74
+ onFocusout: t[1] || (t[1] = d((r) => l(y)(`${u.value}`.trim()), ["stop"])),
75
+ onInput: d($, ["stop"]),
76
+ onKeydown: t[2] || (t[2] = d((r) => n("keydown", r), ["stop"])),
77
+ onClick: t[3] || (t[3] = (r) => n("click", r)),
77
78
  value: u.value
78
79
  }, null, 42, H),
79
- r("fieldset", {
80
+ o("fieldset", {
80
81
  class: s(["uikit-pointer-events-none uikit-absolute -uikit-top-0 uikit-bottom-[3px] uikit-left-0 uikit-right-0 uikit-m-0 uikit-min-w-0 uikit-overflow-hidden uikit-rounded-xs uikit-border uikit-border-solid uikit-bg-white uikit-p-0 uikit-px-2 uikit-text-start uikit-transition-[border] uikit-duration-100 uikit-ease-out peer-focus/fieldset:uikit-border-2 peer-focus/fieldset:uikit-border-w-primary peer-disabled/fieldset:uikit-bg-w-cultured peer-[&.disabled]/fieldset:uikit-bg-w-cultured peer-focus/fieldset:[&.is-invalid]:uikit-border-w-danger", [
81
82
  { "is-invalid": e.isValid === !1, "is-valid": e.isValid },
82
83
  { "uikit-border-w-danger": e.isValid === !1 },
@@ -84,33 +85,33 @@ import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled
84
85
  { "uikit-border-w-secondary": e.isValid === null }
85
86
  ]])
86
87
  }, [
87
- e.labelText ? (n(), k("legend", q, [
88
- r("span", {
88
+ e.labelText ? (k(), b("legend", q, [
89
+ o("span", {
89
90
  class: s(["uikit-px-5px uikit-opacity-0", [
90
91
  {
91
- "uikit-visible uikit-inline-block": a(t) === "floating-label"
92
+ "uikit-visible uikit-inline-block": l(a) === "floating-label"
92
93
  },
93
94
  {
94
- "uikit-invisible uikit-hidden": a(t) === "inline-label"
95
+ "uikit-invisible uikit-hidden": l(a) === "inline-label"
95
96
  }
96
97
  ]]),
97
98
  innerHTML: e.labelText
98
99
  }, null, 10, A)
99
100
  ])) : p("", !0)
100
101
  ], 2),
101
- F(E, {
102
+ F(C, {
102
103
  for: e.$attrs.id,
103
104
  "label-text": e.labelText,
104
- "label-state": a(t),
105
+ "label-state": l(a),
105
106
  required: e.$attrs.required,
106
107
  "is-valid": e.isValid,
107
108
  "label-classes": [
108
- a(t) === "floating-label" ? "!-uikit-top-1" : "!uikit-top-4",
109
+ l(a) === "floating-label" ? "!-uikit-top-1" : "!uikit-top-4",
109
110
  e.$attrs["label-classes"]
110
111
  ]
111
112
  }, null, 8, ["for", "label-text", "label-state", "required", "is-valid", "label-classes"])
112
113
  ], 2),
113
- (e.isValid || e.isValid === !1) && e.feedback ? (n(), k("div", {
114
+ (e.isValid || e.isValid === !1) && e.feedback ? (k(), b("div", {
114
115
  key: 0,
115
116
  class: s(
116
117
  e.isValid === !1 ? "uikit-mt-1 uikit-text-12 uikit-text-w-danger" : "uikit-mt-1 uikit-text-12 uikit-text-w-primary"
@@ -119,7 +120,7 @@ import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled
119
120
  }, null, 10, N)) : p("", !0)
120
121
  ], 2));
121
122
  }
122
- }), Q = /* @__PURE__ */ C(D, [["__scopeId", "data-v-464d61f2"]]);
123
+ }), Q = /* @__PURE__ */ I(D, [["__scopeId", "data-v-70e71328"]]);
123
124
  export {
124
125
  Q as default
125
126
  };
@@ -22,6 +22,7 @@ declare const _default: import('vue').DefineComponent<{
22
22
  clearTextareaElem: () => void;
23
23
  focusDisabledTextarea: () => void;
24
24
  }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
+ click: (args_0: MouseEvent) => void;
25
26
  focusin: () => void;
26
27
  focusout: () => void;
27
28
  keydown: (args_0: KeyboardEvent) => void;
@@ -46,6 +47,7 @@ declare const _default: import('vue').DefineComponent<{
46
47
  onFocusin?: (() => any) | undefined;
47
48
  onFocusout?: (() => any) | undefined;
48
49
  onKeydown?: ((args_0: KeyboardEvent) => any) | undefined;
50
+ onClick?: ((args_0: MouseEvent) => any) | undefined;
49
51
  }, {
50
52
  resize: boolean;
51
53
  isValid: Nullable<boolean>;
@@ -1 +1 @@
1
- .invalid-bg[data-v-464d61f2]{--invalid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMicgaGVpZ2h0PScxMicgZmlsbD0nbm9uZScgc3Ryb2tlPScjRkE0RjY0Jz48Y2lyY2xlIGN4PSc2JyBjeT0nNicgcj0nNC41Jy8+PHBhdGggc3Ryb2tlLWxpbmVqb2luPSdyb3VuZCcgZD0nTTUuOCAzLjZoLjRMNiA2LjV6Jy8+PGNpcmNsZSBjeD0nNicgY3k9JzguMicgcj0nLjYnIGZpbGw9JyNGQTRGNjQnIHN0cm9rZT0nbm9uZScvPjwvc3ZnPg==);background-image:var(--invalid-img)}.valid-bg[data-v-464d61f2]{--valid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA4IDgnPjxwYXRoIGZpbGw9JyMyQjVERkYnIGQ9J00yLjMgNi43My42IDQuNTNjLS40LTEuMDQuNDYtMS40IDEuMS0uOGwxLjEgMS40IDMuNC0zLjhjLjYtLjYzIDEuNi0uMjcgMS4yLjdsLTQgNC42Yy0uNDMuNS0uOC40LTEuMS4xeicvPjwvc3ZnPg==);background-image:var(--valid-img)}.invalid-bg[data-v-464d61f2],.valid-bg[data-v-464d61f2]{background-position:top 0px right 12px;background-size:20px}.textarea-scrollbar[data-v-464d61f2]::-webkit-scrollbar{width:8px;height:6px}.textarea-scrollbar[data-v-464d61f2]::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(244 247 255 / var(--tw-bg-opacity))}.textarea-scrollbar[data-v-464d61f2]::-webkit-scrollbar-thumb{border-radius:5px;--tw-bg-opacity: 1;background-color:rgb(180 194 240 / var(--tw-bg-opacity))}.is-valid.textarea-scrollbar[data-v-464d61f2]::-webkit-scrollbar-thumb{background-color:#2b5dff!important}.is-invalid.textarea-scrollbar[data-v-464d61f2]::-webkit-scrollbar-thumb{background-color:#fa4f64!important}
1
+ .invalid-bg[data-v-70e71328]{--invalid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMicgaGVpZ2h0PScxMicgZmlsbD0nbm9uZScgc3Ryb2tlPScjRkE0RjY0Jz48Y2lyY2xlIGN4PSc2JyBjeT0nNicgcj0nNC41Jy8+PHBhdGggc3Ryb2tlLWxpbmVqb2luPSdyb3VuZCcgZD0nTTUuOCAzLjZoLjRMNiA2LjV6Jy8+PGNpcmNsZSBjeD0nNicgY3k9JzguMicgcj0nLjYnIGZpbGw9JyNGQTRGNjQnIHN0cm9rZT0nbm9uZScvPjwvc3ZnPg==);background-image:var(--invalid-img)}.valid-bg[data-v-70e71328]{--valid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA4IDgnPjxwYXRoIGZpbGw9JyMyQjVERkYnIGQ9J00yLjMgNi43My42IDQuNTNjLS40LTEuMDQuNDYtMS40IDEuMS0uOGwxLjEgMS40IDMuNC0zLjhjLjYtLjYzIDEuNi0uMjcgMS4yLjdsLTQgNC42Yy0uNDMuNS0uOC40LTEuMS4xeicvPjwvc3ZnPg==);background-image:var(--valid-img)}.invalid-bg[data-v-70e71328],.valid-bg[data-v-70e71328]{background-position:top 0px right 12px;background-size:20px}.textarea-scrollbar[data-v-70e71328]::-webkit-scrollbar{width:8px;height:6px}.textarea-scrollbar[data-v-70e71328]::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(244 247 255 / var(--tw-bg-opacity))}.textarea-scrollbar[data-v-70e71328]::-webkit-scrollbar-thumb{border-radius:5px;--tw-bg-opacity: 1;background-color:rgb(180 194 240 / var(--tw-bg-opacity))}.is-valid.textarea-scrollbar[data-v-70e71328]::-webkit-scrollbar-thumb{background-color:#2b5dff!important}.is-invalid.textarea-scrollbar[data-v-70e71328]::-webkit-scrollbar-thumb{background-color:#fa4f64!important}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",