@wikicasa-dev/components 2.2.9-alpha.14 → 2.2.9-alpha.15

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.
@@ -16,7 +16,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
16
16
  title?: string;
17
17
  dataCy?: string;
18
18
  type?: "button" | "submit" | "reset" | undefined;
19
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
+ }, {
20
+ getRootElement: () => HTMLButtonElement | null;
21
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
22
  click: (e: Event) => any;
21
23
  mouseover: (e: Event) => any;
22
24
  mouseout: (e: Event) => any;
@@ -39,7 +41,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
39
41
  onClick?: ((e: Event) => any) | undefined;
40
42
  onMouseover?: ((e: Event) => any) | undefined;
41
43
  onMouseout?: ((e: Event) => any) | undefined;
42
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>, {
44
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
45
+ buttonEl: HTMLButtonElement;
46
+ }, HTMLButtonElement>, {
43
47
  default?(_: {
44
48
  hover: boolean;
45
49
  }): any;
@@ -1,6 +1,6 @@
1
- import { defineComponent as c, ref as b, computed as l, createElementBlock as f, openBlock as v, withModifiers as s, normalizeStyle as B, normalizeClass as C, renderSlot as u, createVNode as M } from "vue";
2
- import z from "../../../../UIKit/StaticSpinner.js";
3
- const L = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "title"], $ = /* @__PURE__ */ c({
1
+ import { defineComponent as y, useTemplateRef as v, shallowRef as B, computed as n, createElementBlock as C, openBlock as M, withModifiers as s, normalizeStyle as h, normalizeClass as z, renderSlot as u, createVNode as L } from "vue";
2
+ import g from "../../../../UIKit/StaticSpinner.js";
3
+ const w = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "title"], A = /* @__PURE__ */ y({
4
4
  __name: "BaseButton",
5
5
  props: {
6
6
  btnClass: { default: "uikit-btn-w-primary" },
@@ -16,17 +16,20 @@ const L = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
16
16
  type: {}
17
17
  },
18
18
  emits: ["mouseover", "mouseout", "click"],
19
- setup(e, { emit: d }) {
20
- const o = d, n = b(!1), r = l(() => e.size ? `uikit-btn-${e.size}` : ""), m = l(() => e.outlined ? "uikit-btn-outline" : ""), k = () => {
21
- n.value = !0;
22
- }, y = () => {
23
- n.value = !1;
19
+ setup(e, { expose: d, emit: r }) {
20
+ const a = r, m = v("buttonEl"), l = B(!1), b = n(() => e.size ? `uikit-btn-${e.size}` : ""), c = n(() => e.outlined ? "uikit-btn-outline" : ""), f = () => {
21
+ l.value = !0;
22
+ }, k = () => {
23
+ l.value = !1;
24
24
  };
25
- return (a, t) => (v(), f("button", {
26
- id: a.$attrs.id,
25
+ return d({
26
+ getRootElement: () => m.value
27
+ }), (o, t) => (M(), C("button", {
28
+ ref: "buttonEl",
29
+ id: o.$attrs.id,
27
30
  "data-cy": e.dataCy,
28
31
  type: e.type,
29
- class: C([
32
+ class: z([
30
33
  "uikit-btn",
31
34
  {
32
35
  "uikit-btn-empty": !e.withMinWidth,
@@ -34,33 +37,33 @@ const L = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
34
37
  "uikit-flex uikit-items-center uikit-justify-center": e.isLoading
35
38
  },
36
39
  e.btnClass,
37
- r.value,
38
- m.value
40
+ b.value,
41
+ c.value
39
42
  ]),
40
- style: B(a.$attrs.style),
43
+ style: h(o.$attrs.style),
41
44
  "data-active": e.keepActive,
42
45
  disabled: e.isLoading || e.disabled,
43
46
  "aria-label": e.ariaLabel,
44
47
  title: e.title,
45
48
  onMouseover: t[0] || (t[0] = s((i) => {
46
- k(), o("mouseover", i);
49
+ f(), a("mouseover", i);
47
50
  }, ["stop"])),
48
51
  onMouseout: t[1] || (t[1] = s((i) => {
49
- y(), o("mouseout", i);
52
+ k(), a("mouseout", i);
50
53
  }, ["stop"])),
51
- onClick: t[2] || (t[2] = (i) => o("click", i))
54
+ onClick: t[2] || (t[2] = (i) => a("click", i))
52
55
  }, [
53
- e.isLoading ? u(a.$slots, "spinner", { key: 1 }, () => [
54
- M(z, {
56
+ e.isLoading ? u(o.$slots, "spinner", { key: 1 }, () => [
57
+ L(g, {
55
58
  "stroke-color": e.outlined ? "#ACB4C3" : "#fff"
56
59
  }, null, 8, ["stroke-color"])
57
- ]) : u(a.$slots, "default", {
60
+ ]) : u(o.$slots, "default", {
58
61
  key: 0,
59
- hover: n.value
62
+ hover: l.value
60
63
  })
61
- ], 46, L));
64
+ ], 46, w));
62
65
  }
63
66
  });
64
67
  export {
65
- $ as default
68
+ A as default
66
69
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as u, useTemplateRef as r, watch as m, nextTick as c, createElementBlock as d, openBlock as f, normalizeClass as k, renderSlot as v, createElementVNode as x } from "vue";
2
- const p = ["tabindex"], b = ["innerHTML"], $ = /* @__PURE__ */ u({
1
+ import { defineComponent as u, useTemplateRef as c, watch as d, nextTick as m, createElementBlock as r, openBlock as f, normalizeClass as v, renderSlot as k, createElementVNode as x } from "vue";
2
+ const b = ["data-active", "tabindex"], p = ["innerHTML"], $ = /* @__PURE__ */ u({
3
3
  __name: "SelectItem",
4
4
  props: {
5
5
  label: { default: "" },
@@ -7,33 +7,34 @@ const p = ["tabindex"], b = ["innerHTML"], $ = /* @__PURE__ */ u({
7
7
  idx: { default: -1 }
8
8
  },
9
9
  emits: ["click", "mouseover"],
10
- setup(l, { emit: a }) {
11
- const n = a, t = l, o = r("liItem");
12
- return m(
13
- () => t.active,
10
+ setup(t, { emit: o }) {
11
+ const a = o, i = t, n = c("liItem");
12
+ return d(
13
+ () => i.active,
14
14
  (e) => {
15
- e && c(() => {
16
- o.value && o.value.focus();
15
+ e && m(() => {
16
+ n.value && n.value.focus();
17
17
  });
18
18
  },
19
19
  { immediate: !0 }
20
- ), (e, i) => (f(), d("li", {
20
+ ), (e, l) => (f(), r("li", {
21
21
  ref: "liItem",
22
- class: k(["uikit-list-none uikit-text-w-black", [
23
- { "active uikit-bg-w-cultured": l.active },
22
+ class: v(["uikit-list-none uikit-text-w-black", [
23
+ { "active uikit-bg-w-cultured": t.active },
24
24
  "uikit-outline-none",
25
25
  e.$attrs.class
26
26
  ]]),
27
+ "data-active": t.active,
27
28
  tabindex: e.$attrs.tabindex ?? -1,
28
- onClick: i[0] || (i[0] = (s) => n("click", t.idx)),
29
- onMouseover: i[1] || (i[1] = (s) => n("mouseover", t.idx))
29
+ onClick: l[0] || (l[0] = (s) => a("click", i.idx)),
30
+ onMouseover: l[1] || (l[1] = (s) => a("mouseover", i.idx))
30
31
  }, [
31
- v(e.$slots, "default", { itemIdx: l.idx }, () => [
32
+ k(e.$slots, "default", { itemIdx: t.idx }, () => [
32
33
  x("span", {
33
- innerHTML: t.label
34
- }, null, 8, b)
34
+ innerHTML: i.label
35
+ }, null, 8, p)
35
36
  ])
36
- ], 42, p));
37
+ ], 42, b));
37
38
  }
38
39
  });
39
40
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.2.9-alpha.14",
3
+ "version": "2.2.9-alpha.15",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",