@wikicasa-dev/components 1.8.1 → 1.8.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.
@@ -1,11 +1,11 @@
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
- import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled", "aria-labelledby", "readonly", "value"], q = {
1
+ import { defineComponent as $, mergeModels as f, useModel as h, ref as x, watch as L, openBlock as k, createElementBlock as b, normalizeClass as s, createElementVNode as o, unref as l, withModifiers as d, createCommentVNode as p, createVNode as M, nextTick as F } from "vue";
2
+ import B from "./BaseFloatingLabel.js";
3
+ import { useFloatingLabel as z } from "./useFloatingLabel.js";
4
+ import { _ as C } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
5
+ import './assets/BaseTextarea.css';const E = ["id", "data-cy", "rows", "disabled", "aria-labelledby", "readonly", "value"], H = {
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__ */ h({
8
+ }, I = ["innerHTML"], q = ["innerHTML"], A = /* @__PURE__ */ $({
9
9
  inheritAttrs: !1,
10
10
  __name: "BaseTextarea",
11
11
  props: /* @__PURE__ */ f({
@@ -19,21 +19,22 @@ import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled
19
19
  }),
20
20
  emits: /* @__PURE__ */ f(["focusin", "focusout", "click", "keydown"], ["update:modelValue"]),
21
21
  setup(v, { expose: m, emit: c }) {
22
- const u = x(v, "modelValue"), n = c, {
22
+ const r = h(v, "modelValue"), n = c, {
23
23
  labelState: a,
24
- setInitialLabelState: w,
25
- handleFocusIn: g,
26
- handleFocusOut: y,
27
- setFloatingLabel: V,
28
- setInlineLabel: T
29
- } = E(n), i = L(null);
30
- M(u, (e) => {
31
- `${e}`.length && a.value !== "floating-label" ? V() : !e?.length && a.value !== "inline-label" && document.activeElement !== i.value && T();
32
- }), B(() => {
33
- w(u.value);
34
- });
35
- const $ = ({ target: e }) => {
36
- u.value = e.value;
24
+ handleFocusIn: w,
25
+ handleFocusOut: g,
26
+ setFloatingLabel: y,
27
+ setInlineLabel: V
28
+ } = z(n), i = x(null);
29
+ L(
30
+ r,
31
+ (e) => {
32
+ `${e}`.length && a.value !== "floating-label" ? y() : !e?.length && a.value !== "inline-label" && document.activeElement !== i.value && V();
33
+ },
34
+ { immediate: !0 }
35
+ );
36
+ const T = ({ target: e }) => {
37
+ r.value = e.value;
37
38
  };
38
39
  return m({
39
40
  disableTextarea: () => {
@@ -43,7 +44,7 @@ import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled
43
44
  i.value && (i.value.value = "");
44
45
  },
45
46
  focusDisabledTextarea: () => {
46
- i.value && (i.value.removeAttribute("readonly"), i.value.classList.remove("disabled"), z(() => {
47
+ i.value && (i.value.removeAttribute("readonly"), i.value.classList.remove("disabled"), F(() => {
47
48
  i.value && i.value.focus();
48
49
  }));
49
50
  }
@@ -70,13 +71,13 @@ import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled
70
71
  disabled: e.$attrs.disabled,
71
72
  "aria-labelledby": e.$attrs.id,
72
73
  readonly: e.$attrs.readonly,
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)),
78
- value: u.value
79
- }, null, 42, H),
74
+ onFocusin: t[0] || (t[0] = d((u) => l(w)(), ["stop"])),
75
+ onFocusout: t[1] || (t[1] = d((u) => l(g)(`${r.value}`.trim()), ["stop"])),
76
+ onInput: d(T, ["stop"]),
77
+ onKeydown: t[2] || (t[2] = d((u) => n("keydown", u), ["stop"])),
78
+ onClick: t[3] || (t[3] = (u) => n("click", u)),
79
+ value: r.value
80
+ }, null, 42, E),
80
81
  o("fieldset", {
81
82
  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", [
82
83
  { "is-invalid": e.isValid === !1, "is-valid": e.isValid },
@@ -85,7 +86,7 @@ import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled
85
86
  { "uikit-border-w-secondary": e.isValid === null }
86
87
  ]])
87
88
  }, [
88
- e.labelText ? (k(), b("legend", q, [
89
+ e.labelText ? (k(), b("legend", H, [
89
90
  o("span", {
90
91
  class: s(["uikit-px-5px uikit-opacity-0", [
91
92
  {
@@ -96,10 +97,10 @@ import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled
96
97
  }
97
98
  ]]),
98
99
  innerHTML: e.labelText
99
- }, null, 10, A)
100
+ }, null, 10, I)
100
101
  ])) : p("", !0)
101
102
  ], 2),
102
- F(C, {
103
+ M(B, {
103
104
  for: e.$attrs.id,
104
105
  "label-text": e.labelText,
105
106
  "label-state": l(a),
@@ -117,10 +118,10 @@ import './assets/BaseTextarea.css';const H = ["id", "data-cy", "rows", "disabled
117
118
  e.isValid === !1 ? "uikit-mt-1 uikit-text-12 uikit-text-w-danger" : "uikit-mt-1 uikit-text-12 uikit-text-w-primary"
118
119
  ),
119
120
  innerHTML: e.isValid === !1 ? e.feedback.invalid : e.feedback.valid
120
- }, null, 10, N)) : p("", !0)
121
+ }, null, 10, q)) : p("", !0)
121
122
  ], 2));
122
123
  }
123
- }), Q = /* @__PURE__ */ I(D, [["__scopeId", "data-v-70e71328"]]);
124
+ }), J = /* @__PURE__ */ C(A, [["__scopeId", "data-v-b3053514"]]);
124
125
  export {
125
- Q as default
126
+ J as default
126
127
  };
@@ -1 +1 @@
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}
1
+ .invalid-bg[data-v-b3053514]{--invalid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMicgaGVpZ2h0PScxMicgZmlsbD0nbm9uZScgc3Ryb2tlPScjRkE0RjY0Jz48Y2lyY2xlIGN4PSc2JyBjeT0nNicgcj0nNC41Jy8+PHBhdGggc3Ryb2tlLWxpbmVqb2luPSdyb3VuZCcgZD0nTTUuOCAzLjZoLjRMNiA2LjV6Jy8+PGNpcmNsZSBjeD0nNicgY3k9JzguMicgcj0nLjYnIGZpbGw9JyNGQTRGNjQnIHN0cm9rZT0nbm9uZScvPjwvc3ZnPg==);background-image:var(--invalid-img)}.valid-bg[data-v-b3053514]{--valid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA4IDgnPjxwYXRoIGZpbGw9JyMyQjVERkYnIGQ9J00yLjMgNi43My42IDQuNTNjLS40LTEuMDQuNDYtMS40IDEuMS0uOGwxLjEgMS40IDMuNC0zLjhjLjYtLjYzIDEuNi0uMjcgMS4yLjdsLTQgNC42Yy0uNDMuNS0uOC40LTEuMS4xeicvPjwvc3ZnPg==);background-image:var(--valid-img)}.invalid-bg[data-v-b3053514],.valid-bg[data-v-b3053514]{background-position:top 0px right 12px;background-size:20px}.textarea-scrollbar[data-v-b3053514]::-webkit-scrollbar{width:8px;height:6px}.textarea-scrollbar[data-v-b3053514]::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(244 247 255 / var(--tw-bg-opacity))}.textarea-scrollbar[data-v-b3053514]::-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-b3053514]::-webkit-scrollbar-thumb{background-color:#2b5dff!important}.is-invalid.textarea-scrollbar[data-v-b3053514]::-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.1",
3
+ "version": "1.8.2",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",