@wikicasa-dev/components 2.2.7 → 2.2.8-alpha.0

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,7 +1,7 @@
1
- import { defineComponent as y, ref as p, computed as i, watch as v, renderSlot as b, createElementVNode as D, normalizeClass as E, createElementBlock as $, createCommentVNode as B, openBlock as C, Fragment as A, renderList as I, createBlock as R, unref as K } from "vue";
1
+ import { defineComponent as x, ref as p, computed as h, watch as v, renderSlot as b, createElementVNode as D, normalizeClass as E, createElementBlock as $, createCommentVNode as B, openBlock as g, Fragment as A, renderList as I, createBlock as R, unref as K } from "vue";
2
2
  import { stringToHyphened as V, isArrNullOrEmpty as L } from "@wikicasa-dev/utilities";
3
- import G from "../../../../../UIKit/Checkbox/CheckboxBtn.js";
4
- const N = ["id", "data-cy"], O = /* @__PURE__ */ y({
3
+ import G from "./CheckboxBtn.vue.js";
4
+ const N = ["id", "data-cy"], O = /* @__PURE__ */ x({
5
5
  inheritAttrs: !1,
6
6
  __name: "CheckboxGroup",
7
7
  props: {
@@ -19,12 +19,12 @@ const N = ["id", "data-cy"], O = /* @__PURE__ */ y({
19
19
  dataCy: { default: "" }
20
20
  },
21
21
  emits: ["resetted", "update:modelValue", "checkedGroup"],
22
- setup(t, { emit: g }) {
23
- const o = t, s = g, l = p(/* @__PURE__ */ new Map()), r = i(() => {
22
+ setup(t, { emit: C }) {
23
+ const o = t, s = C, l = p(/* @__PURE__ */ new Map()), r = h(() => {
24
24
  for (const e of o.checkboxData)
25
25
  if (e.reset) return e;
26
26
  return null;
27
- }), x = i(() => o.checkboxData.length), f = i(() => {
27
+ }), y = h(() => o.checkboxData.length), f = h(() => {
28
28
  let e = 0;
29
29
  return l.value.forEach((a) => {
30
30
  a.checked && e++;
@@ -54,10 +54,10 @@ const N = ["id", "data-cy"], O = /* @__PURE__ */ y({
54
54
  });
55
55
  }, m = () => {
56
56
  k(), s("update:modelValue", []), s("resetted");
57
- }, d = (e) => l.value.get(o.getKey(e))?.checked ?? !1, h = (e) => {
57
+ }, d = (e) => l.value.get(o.getKey(e))?.checked ?? !1, i = (e) => {
58
58
  if (L(o.checkboxData)) return;
59
59
  const a = l.value.get(e.id);
60
- a?.reset && e.checked ? k() : r.value && !a?.reset && u(o.getKey(r.value), { checked: !1 }), u(`${e.id}`), o.autoCheckResetAll && r.value && f.value === x.value - 1 && l.value.forEach((n) => {
60
+ a?.reset && e.checked ? k() : r.value && !a?.reset && u(o.getKey(r.value), { checked: !1 }), u(`${e.id}`), o.autoCheckResetAll && r.value && f.value === y.value - 1 && l.value.forEach((n) => {
61
61
  n.checked = !!n.reset;
62
62
  }), o.autoCheckResetEmpty && r.value && !f.value && (!o.manualToggleResetButton || !a?.reset) && u(o.getKey(r.value), { checked: !0 });
63
63
  const c = [];
@@ -72,7 +72,7 @@ const N = ["id", "data-cy"], O = /* @__PURE__ */ y({
72
72
  }
73
73
  ), (e, a) => b(e.$slots, "default", {
74
74
  isActive: d,
75
- handleChange: h,
75
+ handleChange: i,
76
76
  checkboxesData: t.checkboxData
77
77
  }, () => [
78
78
  D("div", {
@@ -82,11 +82,11 @@ const N = ["id", "data-cy"], O = /* @__PURE__ */ y({
82
82
  }, [
83
83
  b(e.$slots, "checkbox_elements", {
84
84
  isActive: d,
85
- handleChange: h,
85
+ handleChange: i,
86
86
  checkboxesData: t.checkboxData,
87
87
  reset: m
88
88
  }, () => [
89
- t.checkboxData ? (C(!0), $(A, { key: 0 }, I(t.checkboxData, (c, n) => (C(), R(G, {
89
+ t.checkboxData ? (g(!0), $(A, { key: 0 }, I(t.checkboxData, (c, n) => (g(), R(G, {
90
90
  id: t.getKey(c),
91
91
  key: n,
92
92
  "data-cy": c.dataCy ?? `checkbox_${K(V)(`${c.label}`)}`,
@@ -97,7 +97,7 @@ const N = ["id", "data-cy"], O = /* @__PURE__ */ y({
97
97
  t.formCheckInline ? "uikit-mr-10px" : "uikit-mb-10px",
98
98
  t.checkboxContainerClasses
99
99
  ],
100
- onChange: h
100
+ onChange: i
101
101
  }, null, 8, ["id", "data-cy", "label", "inline", "model-value", "container-class"]))), 128)) : B("", !0)
102
102
  ])
103
103
  ], 10, N)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.2.7",
3
+ "version": "2.2.8-alpha.0",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1 +0,0 @@
1
- .checked-bg[data-v-8649caa8]:checked{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg transform='translate(-307 -2432)'%3E%3Crect width='16' height='16' fill='%232b5dff' data-name='Rettangolo 2689' rx='3' transform='translate(307 2432)'/%3E%3Cpath fill='none' stroke='%23f4f7ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m319.499 2437.499-6 6Zm-9 3 3 3Z' data-name='Unione 5'/%3E%3C/g%3E%3C/svg%3E")}.checked-bg-invalid[data-v-8649caa8]:checked{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cg transform='translate(-307 -2432)'%3E%3Crect width='16' height='16' fill='%23FA4F64' data-name='Rettangolo 2689' rx='3' transform='translate(307 2432)'/%3E%3Cpath fill='none' stroke='%23f4f7ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m319.499 2437.499-6 6Zm-9 3 3 3Z' data-name='Unione 5'/%3E%3C/g%3E%3C/svg%3E")}