@wikicasa-dev/components 2.2.9-alpha.57 → 2.2.9-alpha.59

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,5 +1,5 @@
1
1
  import { Autoplay as t } from "swiper/modules";
2
- import '../assets/swiper-thumbs.css';/* empty css */
2
+ import '../assets/swiper-keyboard.css';/* empty css */
3
3
  export {
4
4
  t as Autoplay
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Controller as e } from "swiper/modules";
2
- import '../assets/swiper-thumbs.css';/* empty css */
2
+ import '../assets/swiper-keyboard.css';/* empty css */
3
3
  export {
4
4
  e as Controller
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Keyboard as m } from "swiper/modules";
2
- import '../assets/swiper-thumbs.css';/* empty css */
2
+ import '../assets/swiper-keyboard.css';/* empty css */
3
3
  export {
4
4
  m as Keyboard
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Thumbs as p } from "swiper/modules";
2
- import '../assets/swiper-thumbs.css';/* empty css */
2
+ import '../assets/swiper-keyboard.css';/* empty css */
3
3
  export {
4
4
  p as Thumbs
5
5
  };
@@ -21,7 +21,10 @@ declare const _default: <TID extends string | number, TLabel extends string | nu
21
21
  label?: TLabel;
22
22
  modelValue?: boolean;
23
23
  } & Partial<{}>> & import('vue').PublicProps;
24
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
24
+ expose(exposed: import('vue').ShallowUnwrapRef<{
25
+ getRootElement: () => HTMLLabelElement | null;
26
+ getCheckboxElement: () => any;
27
+ }>): void;
25
28
  attrs: any;
26
29
  slots: {
27
30
  label?(_: {}): any;
@@ -1,7 +1,7 @@
1
- import { defineComponent as s, useId as m, watch as f, createElementBlock as h, openBlock as d, createVNode as o, renderSlot as b, unref as i, normalizeClass as C, withCtx as u, createBlock as x, createCommentVNode as y, createTextVNode as V, toDisplayString as g } from "vue";
2
- import { CheckIcon as B } from "@wikicasa-dev/svg-icons";
3
- import { CheckboxRoot as p, CheckboxIndicator as w } from "reka-ui";
4
- const z = /* @__PURE__ */ s({
1
+ import { defineComponent as b, useId as x, useTemplateRef as o, watch as C, createElementBlock as y, openBlock as d, createVNode as c, renderSlot as g, unref as a, normalizeClass as V, withCtx as u, createBlock as p, createCommentVNode as B, createTextVNode as R, toDisplayString as w } from "vue";
2
+ import { CheckIcon as v } from "@wikicasa-dev/svg-icons";
3
+ import { CheckboxRoot as E, CheckboxIndicator as I } from "reka-ui";
4
+ const T = /* @__PURE__ */ b({
5
5
  __name: "CheckboxBtn",
6
6
  props: {
7
7
  id: {},
@@ -15,59 +15,64 @@ const z = /* @__PURE__ */ s({
15
15
  modelValue: { type: Boolean, default: !1 }
16
16
  },
17
17
  emits: ["click", "update:modelValue", "change"],
18
- setup(e, { emit: c }) {
19
- const n = m(), a = c;
20
- f(
18
+ setup(e, { expose: n, emit: r }) {
19
+ const k = x(), s = o("root"), m = o("checkboxRoot"), l = r;
20
+ C(
21
21
  () => e.checked,
22
22
  (t) => {
23
- t !== void 0 && a("update:modelValue", t);
23
+ t !== void 0 && l("update:modelValue", t);
24
24
  }
25
25
  );
26
- const k = (t) => {
27
- t !== "indeterminate" && (a("change", {
28
- id: e.id ?? n,
26
+ const f = (t) => {
27
+ t !== "indeterminate" && (l("change", {
28
+ id: e.id ?? k,
29
29
  label: e.label,
30
30
  checked: t
31
- }), a("update:modelValue", t));
31
+ }), l("update:modelValue", t));
32
32
  };
33
- return (t, l) => (d(), h("label", {
33
+ return n({
34
+ getRootElement: () => s.value,
35
+ getCheckboxElement: () => m.value?.$el
36
+ }), (t, i) => (d(), y("label", {
37
+ ref: "root",
34
38
  class: "uikit-checkbox-btn uikit-flex uikit-items-center uikit-gap-[12px]",
35
- onClick: l[0] || (l[0] = (r) => a("click", r))
39
+ onClick: i[0] || (i[0] = (h) => l("click", h))
36
40
  }, [
37
- o(i(p), {
41
+ c(a(E), {
42
+ ref: "checkboxRoot",
38
43
  "model-value": e.modelValue,
39
44
  "data-cy": e.dataCy,
40
45
  disabled: e.disabled,
41
- class: C(["uikit-inline-flex uikit-size-[20px] uikit-shrink-0 uikit-items-center uikit-justify-center uikit-rounded-[4px] uikit-p-0 data-[state='unchecked']:uikit-border data-[state='unchecked']:uikit-border-solid data-[state='unchecked']:uikit-border-w-lightgray", [
46
+ class: V(["uikit-inline-flex uikit-size-[20px] uikit-shrink-0 uikit-items-center uikit-justify-center uikit-rounded-[4px] uikit-p-0 data-[state='unchecked']:uikit-border data-[state='unchecked']:uikit-border-solid data-[state='unchecked']:uikit-border-w-lightgray", [
42
47
  {
43
48
  "uikit-bg-white": !e.modelValue,
44
49
  "uikit-bg-w-primary": e.modelValue
45
50
  },
46
51
  e.inputClass
47
52
  ]]),
48
- "onUpdate:modelValue": k
53
+ "onUpdate:modelValue": f
49
54
  }, {
50
55
  default: u(() => [
51
- o(i(w), { class: "uikit-flex" }, {
56
+ c(a(I), { class: "uikit-flex" }, {
52
57
  default: u(() => [
53
- e.modelValue === !0 ? (d(), x(i(B), {
58
+ e.modelValue === !0 ? (d(), p(a(v), {
54
59
  key: 0,
55
60
  "fill-color": "#fff",
56
61
  width: 12,
57
62
  height: 14
58
- })) : y("", !0)
63
+ })) : B("", !0)
59
64
  ]),
60
65
  _: 1
61
66
  })
62
67
  ]),
63
68
  _: 1
64
69
  }, 8, ["model-value", "data-cy", "disabled", "class"]),
65
- b(t.$slots, "label", {}, () => [
66
- V(g(e.label), 1)
70
+ g(t.$slots, "label", {}, () => [
71
+ R(w(e.label), 1)
67
72
  ])
68
- ]));
73
+ ], 512));
69
74
  }
70
75
  });
71
76
  export {
72
- z as default
77
+ T as default
73
78
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.2.9-alpha.57",
3
+ "version": "2.2.9-alpha.59",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",