@wikicasa-dev/components 1.8.18 → 1.9.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,4 +1,4 @@
1
- import { _ as f } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.hlLBDl0A.js";
1
+ import { _ as f } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.CMkn7bj5.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1 +1 @@
1
- .card[data-v-f1252e69]{--card-height: 240px;position:relative;z-index:0;display:flex;max-width:930px;overflow:hidden;border-radius:20px;--tw-shadow: 0 0 8px #2222221F;--tw-shadow-colored: 0 0 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 576px){.card[data-v-f1252e69]{height:var(--card-height)}}.card .card-body[data-v-f1252e69]{width:100%;padding:10px 15px}.card .card-img[data-v-f1252e69]{height:var(--card-height);width:100%;max-width:none}@media (min-width: 576px){.card .card-img[data-v-f1252e69]{max-width:300px}}.card.vertical[data-v-f1252e69]{flex-direction:column}@media not all and (min-width: 576px){.card.vertical[data-v-f1252e69]{min-height:100px;min-width:335px}}@media (min-width: 576px){.card.vertical[data-v-f1252e69]{height:-moz-fit-content;height:fit-content}}.card.vertical .card-img[data-v-f1252e69]{width:100%;max-width:100%}@media not all and (min-width: 576px){.card.vertical .card-img[data-v-f1252e69]{max-width:100%}}.map-card[data-v-f1252e69]{max-height:100px;max-width:370px}.map-card .card-img[data-v-f1252e69]{max-height:110px;max-width:120px}.card.news-card[data-v-f1252e69]{height:100px}@media not all and (min-width: 576px){.card.news-card[data-v-f1252e69]{width:320px}}@media (min-width: 576px){.card.news-card[data-v-f1252e69]{height:270px;flex-direction:column}}@media not all and (min-width: 576px){.card.news-card .card-img[data-v-f1252e69]{width:100px;height:100px}}@media (min-width: 576px){.card.news-card .card-img[data-v-f1252e69]{height:150px;max-width:100%}}
1
+ .card[data-v-f1252e69]{--card-height: 240px;position:relative;z-index:0;display:flex;max-width:930px;overflow:hidden;border-radius:20px;--tw-shadow: 0 0 8px #2222221F;--tw-shadow-colored: 0 0 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 576px){.card[data-v-f1252e69]{height:var(--card-height)}}.card .card-body[data-v-f1252e69]{width:100%;padding:10px 15px}.card .card-img[data-v-f1252e69]{height:var(--card-height);width:100%;max-width:none}@media (min-width: 576px){.card .card-img[data-v-f1252e69]{max-width:300px}}.card.vertical[data-v-f1252e69]{flex-direction:column}@media not all and (min-width: 576px){.card.vertical[data-v-f1252e69]{min-height:100px;min-width:335px}}@media (min-width: 576px){.card.vertical[data-v-f1252e69]{height:-moz-fit-content;height:fit-content}}.card.vertical .card-img[data-v-f1252e69]{width:100%;max-width:100%}@media not all and (min-width: 576px){.card.vertical .card-img[data-v-f1252e69]{max-width:100%}}.card.mini[data-v-f1252e69]{max-height:100px;max-width:370px}.card.mini .card-img[data-v-f1252e69]{max-height:110px;max-width:120px}.card.news-card[data-v-f1252e69]{height:100px}@media not all and (min-width: 576px){.card.news-card[data-v-f1252e69]{width:320px}}@media (min-width: 576px){.card.news-card[data-v-f1252e69]{height:270px;flex-direction:column}}@media not all and (min-width: 576px){.card.news-card .card-img[data-v-f1252e69]{width:100px;height:100px}}@media (min-width: 576px){.card.news-card .card-img[data-v-f1252e69]{height:150px;max-width:100%}}
@@ -1,24 +1,24 @@
1
- import { defineComponent as L, mergeModels as S, useModel as H, ref as u, computed as k, onBeforeMount as K, watch as f, openBlock as y, createBlock as V, normalizeClass as z, withCtx as c, createVNode as N, renderSlot as B, createElementBlock as U, Fragment as A, renderList as F, unref as W, createElementVNode as j } from "vue";
1
+ import { defineComponent as L, mergeModels as B, useModel as H, ref as s, computed as k, onBeforeMount as K, watch as f, openBlock as y, createBlock as S, normalizeClass as z, withCtx as c, createVNode as A, renderSlot as V, createElementBlock as N, Fragment as U, renderList as F, unref as W, createElementVNode as j } from "vue";
2
2
  import q from "../BaseInput.js";
3
3
  import { _ as G } from "./BaseDropDown.vue_vue_type_script_setup_true_lang.CLzTJaGp.js";
4
4
  import "./js.cookie.CkZE2oaL.js";
5
5
  import { _ as J } from "./SelectItem.vue_vue_type_script_setup_true_lang.Colhxc7n.js";
6
6
  import { useKeyboardController as Q } from "../useKeyboardController.js";
7
- function R(a, v) {
8
- return (...m) => new Promise((l, d) => {
9
- a.id && clearTimeout(a.id), a.id = setTimeout(() => {
7
+ function R(r, m) {
8
+ return (...v) => new Promise((l, d) => {
9
+ r.id && clearTimeout(r.id), r.id = setTimeout(() => {
10
10
  try {
11
- const i = v(...m);
11
+ const i = m(...v);
12
12
  l(i);
13
13
  } catch (i) {
14
14
  d(i);
15
15
  }
16
- }, a.delay);
16
+ }, r.delay);
17
17
  });
18
18
  }
19
19
  const X = ["innerHTML"], oe = /* @__PURE__ */ L({
20
20
  __name: "BaseAutocomplete",
21
- props: /* @__PURE__ */ S({
21
+ props: /* @__PURE__ */ B({
22
22
  border: { type: Boolean, default: !0 },
23
23
  isValid: { default: null },
24
24
  theme: { default: "" },
@@ -38,9 +38,9 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ L({
38
38
  },
39
39
  modelModifiers: {}
40
40
  }),
41
- emits: /* @__PURE__ */ S(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
42
- setup(a, { expose: v, emit: m }) {
43
- const l = a, d = H(a, "modelValue"), i = m, s = u(""), n = u([]), h = u(null), p = u(!1), o = u(!1), g = u(null), O = k(() => n.value.length);
41
+ emits: /* @__PURE__ */ B(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
42
+ setup(r, { expose: m, emit: v }) {
43
+ const l = r, d = H(r, "modelValue"), i = v, u = s(""), n = s([]), h = s(null), p = s(!1), o = s(!1), g = s(null), O = k(() => n.value.length);
44
44
  K(() => {
45
45
  h.value = R({ delay: 300 }, l.onInputChangeCb);
46
46
  });
@@ -83,7 +83,7 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ L({
83
83
  return "";
84
84
  }
85
85
  }), D = async (e) => {
86
- if (s.value !== e && (i("changedValue", e), s.value = e, !!l.onInputChangeCb)) {
86
+ if (console.log("BaseAutocomplete", { v: e }), u.value !== e && (i("changedValue", e), u.value = e, !!l.onInputChangeCb)) {
87
87
  if (!e || p.value) {
88
88
  n.value = [], p.value = !1, C.value = -1, w.value = -1, d.value && (d.value.label = ""), o.value = !1, await h.value(null);
89
89
  return;
@@ -91,14 +91,14 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ L({
91
91
  l.disableCb || (n.value = await h.value(e), o.value = !!n.value.length);
92
92
  }
93
93
  }, $ = (e, t) => {
94
- l.onOptionSelectedCb && l.onOptionSelectedCb(e), l.cleanupOnClose && (n.value = []), p.value = !0, s.value = e.label, d.value = e, o.value = !1, C.value = t;
94
+ l.onOptionSelectedCb && l.onOptionSelectedCb(e), l.cleanupOnClose && (n.value = []), p.value = !0, u.value = e.label, d.value = e, o.value = !1, C.value = t;
95
95
  }, E = () => {
96
96
  n.value.length && l.keepState !== "closed" && (o.value = !0);
97
97
  };
98
98
  return f(
99
99
  d,
100
100
  (e, t) => {
101
- e !== t && (s.value = e?.label || "");
101
+ e === t || e?.label === u.value || (u.value = e?.label || "");
102
102
  },
103
103
  { immediate: !0 }
104
104
  ), f(C, (e) => {
@@ -112,11 +112,11 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ L({
112
112
  }
113
113
  ), f(o, (e) => {
114
114
  i("update:dropdownState", e);
115
- }), v({
115
+ }), m({
116
116
  select: () => {
117
117
  g.value?.select();
118
118
  }
119
- }), (e, t) => (y(), V(G, {
119
+ }), (e, t) => (y(), S(G, {
120
120
  class: z(e.$attrs["root-classes"]),
121
121
  "data-cy": `ac_${e.$attrs.id}`,
122
122
  "dropdown-element": "ul",
@@ -133,20 +133,20 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ L({
133
133
  ],
134
134
  "open-dropdown": o.value,
135
135
  "keep-state": !n.value.length || l.keepState === "closed" ? "closed" : "opened",
136
- "onUpdate:dropdownState": t[3] || (t[3] = (r) => o.value = r),
137
- onClick: t[4] || (t[4] = (r) => {
136
+ "onUpdate:dropdownState": t[3] || (t[3] = (a) => o.value = a),
137
+ onClick: t[4] || (t[4] = (a) => {
138
138
  i("click"), E();
139
139
  }),
140
140
  "close-when-clicked-outside": e.closeDropdownOnBodyPressed
141
141
  }, {
142
142
  btn_slot: c(() => [
143
- N(q, {
143
+ A(q, {
144
144
  id: `ac_input_${e.$attrs.id}`,
145
145
  ref_key: "baseInput",
146
146
  ref: g,
147
147
  "data-cy": `ac_input_${e.$attrs.id}`,
148
148
  "label-text": e.label,
149
- "model-value": s.value,
149
+ "model-value": u.value,
150
150
  "is-valid": e.isValid,
151
151
  disabled: e.$attrs.disabled,
152
152
  placeholder: e.$attrs.placeholder,
@@ -158,30 +158,30 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ L({
158
158
  "!uikit-ml-0 !uikit-w-full"
159
159
  ],
160
160
  "fieldset-classes": [I.value, e.$attrs["fieldset-classes"]],
161
- "onUpdate:modelValue": t[0] || (t[0] = (r) => D(r === void 0 ? "" : `${r}`)),
162
- onKeydown: t[1] || (t[1] = (r) => i("keydown", r)),
161
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => D(a === void 0 ? "" : `${a}`)),
162
+ onKeydown: t[1] || (t[1] = (a) => i("keydown", a)),
163
163
  onKeydownEnterPressed: t[2] || (t[2] = () => i("keydownEnterPressed"))
164
164
  }, {
165
165
  leftIcon: c(() => [
166
- B(e.$slots, "lefticon")
166
+ V(e.$slots, "lefticon")
167
167
  ]),
168
- righticon: c(({ handleClean: r }) => [
169
- B(e.$slots, "righticon", { handleClean: r })
168
+ righticon: c(({ handleClean: a }) => [
169
+ V(e.$slots, "righticon", { handleClean: a })
170
170
  ]),
171
171
  _: 3
172
172
  }, 8, ["id", "data-cy", "label-text", "model-value", "is-valid", "disabled", "placeholder", "with-left-icon", "with-right-icon", "input-class", "fieldset-classes"])
173
173
  ]),
174
174
  default: c(() => [
175
- (y(!0), U(A, null, F(n.value, (r, b) => (y(), V(J, {
175
+ (y(!0), N(U, null, F(n.value, (a, b) => (y(), S(J, {
176
176
  key: b,
177
177
  active: W(w) === b,
178
178
  class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
179
- onClick: (T) => $(r, b),
179
+ onClick: (T) => $(a, b),
180
180
  onMouseover: (T) => w.value = b
181
181
  }, {
182
182
  default: c(() => [
183
183
  j("span", {
184
- innerHTML: r.label
184
+ innerHTML: a.label
185
185
  }, null, 8, X)
186
186
  ]),
187
187
  _: 2
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import { _ as g } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang
11
11
  import { _ as h } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.BYlMCUWP.js";
12
12
  import { _ as I } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.CM86-jVN.js";
13
13
  import { _ as w } from "./chunks/BaseAlert.vue_vue_type_style_index_0_lang.BtqP_iYL.js";
14
- import { _ as k } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.hlLBDl0A.js";
14
+ import { _ as k } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.CMkn7bj5.js";
15
15
  import { _ as D } from "./chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js";
16
16
  import { _ as G } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.dlLTK59i.js";
17
17
  import { default as O } from "./BaseCard.js";
package/dist/types.d.ts CHANGED
@@ -11,5 +11,5 @@ export type TabType = {
11
11
  renderFn: any;
12
12
  tabId: string;
13
13
  } & BaseTabProps;
14
- export type CardTypes = "map-card" | "vertical" | "news" | "";
14
+ export type CardTypes = "mini" | "vertical" | "news" | "";
15
15
  export type CardRootTypes = "div" | "article";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "1.8.18",
3
+ "version": "1.9.1",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",