@wikicasa-dev/components 1.7.25 → 1.7.26

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/RadioGroup.vue_vue_type_script_setup_true_lang.DTUA_Q5e.js";
1
+ import { _ as f } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.BYlMCUWP.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -0,0 +1,59 @@
1
+ import { defineComponent as f, ref as h, watch as o, renderSlot as d, createElementVNode as v, normalizeClass as V, openBlock as u, createElementBlock as k, Fragment as _, renderList as C, createBlock as $ } from "vue";
2
+ import { _ as y } from "./RadioButton.vue_vue_type_script_setup_true_lang.DR6a7QAi.js";
3
+ const g = ["data-cy"], A = /* @__PURE__ */ f({
4
+ inheritAttrs: !1,
5
+ __name: "RadioGroup",
6
+ props: {
7
+ initialValue: {},
8
+ radioValues: {},
9
+ resetRadio: { type: Boolean, default: !1 }
10
+ },
11
+ emits: ["resetted", "update:modelValue"],
12
+ setup(c, { emit: m }) {
13
+ const n = c, l = m, a = h(null), t = (e) => {
14
+ a.value = e, l("update:modelValue", e);
15
+ }, s = () => {
16
+ a.value = null;
17
+ }, r = (e) => a.value ? a.value.id === e.id : !1;
18
+ return o(
19
+ () => n.resetRadio,
20
+ (e) => {
21
+ e && (s(), l("resetted"), l("update:modelValue", null));
22
+ }
23
+ ), o(
24
+ () => n.initialValue,
25
+ (e) => {
26
+ e && t(e);
27
+ },
28
+ { immediate: !0 }
29
+ ), (e, B) => d(e.$slots, "default", {
30
+ handleClick: t,
31
+ activeValue: a.value,
32
+ reset: s,
33
+ isActive: r
34
+ }, () => [
35
+ v("div", {
36
+ class: V(["radio-group-container", e.$attrs.class || ""]),
37
+ "data-cy": e.$attrs["data-cy"] || ""
38
+ }, [
39
+ d(e.$slots, "radio_elements", {
40
+ handleClick: t,
41
+ activeValue: a.value,
42
+ reset: s,
43
+ isActive: r
44
+ }, () => [
45
+ (u(!0), k(_, null, C(e.radioValues, (i, p) => (u(), $(y, {
46
+ id: i.id,
47
+ key: p,
48
+ label: `${i.label}`,
49
+ "is-checked": i.id === a.value?.id,
50
+ onChange: t
51
+ }, null, 8, ["id", "label", "is-checked"]))), 128))
52
+ ])
53
+ ], 10, g)
54
+ ]);
55
+ }
56
+ });
57
+ export {
58
+ A as _
59
+ };
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { _ } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.DD
9
9
  import { _ as i } from "./chunks/BaseTab.vue_vue_type_script_setup_true_lang.BRubYI9e.js";
10
10
  import { _ as b } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.DRECN-Oz.js";
11
11
  import { _ as C } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.DR6a7QAi.js";
12
- import { _ as I } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.DTUA_Q5e.js";
12
+ import { _ as I } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.BYlMCUWP.js";
13
13
  import { _ as T } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.5pqk7vlZ.js";
14
14
  import { _ as w } from "./chunks/BaseAlert.vue_vue_type_style_index_0_lang.BtqP_iYL.js";
15
15
  import { _ as v } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.CVffB0Ai.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "1.7.25",
3
+ "version": "1.7.26",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,55 +0,0 @@
1
- import { defineComponent as p, ref as f, watch as h, onBeforeMount as v, renderSlot as o, createElementVNode as V, normalizeClass as k, openBlock as d, createElementBlock as _, Fragment as C, renderList as $, createBlock as y } from "vue";
2
- import { _ as B } from "./RadioButton.vue_vue_type_script_setup_true_lang.DR6a7QAi.js";
3
- const g = ["data-cy"], E = /* @__PURE__ */ p({
4
- inheritAttrs: !1,
5
- __name: "RadioGroup",
6
- props: {
7
- initialValue: {},
8
- radioValues: {},
9
- resetRadio: { type: Boolean, default: !1 }
10
- },
11
- emits: ["resetted", "update:modelValue"],
12
- setup(u, { emit: c }) {
13
- const l = u, n = c, a = f(null), t = (e) => {
14
- a.value = e, n("update:modelValue", e);
15
- }, s = () => {
16
- a.value = null;
17
- }, r = (e) => a.value ? a.value.id === e.id : !1;
18
- return h(
19
- () => l.resetRadio,
20
- (e) => {
21
- e && (s(), n("resetted"), n("update:modelValue", null));
22
- }
23
- ), v(() => {
24
- l.initialValue && t(l.initialValue);
25
- }), (e, b) => o(e.$slots, "default", {
26
- handleClick: t,
27
- activeValue: a.value,
28
- reset: s,
29
- isActive: r
30
- }, () => [
31
- V("div", {
32
- class: k(["radio-group-container", e.$attrs.class || ""]),
33
- "data-cy": e.$attrs["data-cy"] || ""
34
- }, [
35
- o(e.$slots, "radio_elements", {
36
- handleClick: t,
37
- activeValue: a.value,
38
- reset: s,
39
- isActive: r
40
- }, () => [
41
- (d(!0), _(C, null, $(e.radioValues, (i, m) => (d(), y(B, {
42
- id: i.id,
43
- key: m,
44
- label: `${i.label}`,
45
- "is-checked": i.id === a.value?.id,
46
- onChange: t
47
- }, null, 8, ["id", "label", "is-checked"]))), 128))
48
- ])
49
- ], 10, g)
50
- ]);
51
- }
52
- });
53
- export {
54
- E as _
55
- };