@wikicasa-dev/components 1.2.54 → 1.2.56
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.
- package/dist/RadioButton.js +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/UIKit/Radio/RadioGroup.vue.d.ts +3 -2
- package/dist/chunks/{RadioButton.vue_vue_type_script_setup_true_lang.CJE9e0tE.js → RadioButton.vue_vue_type_script_setup_true_lang.SVKzj6co.js} +19 -20
- package/dist/chunks/{RadioGroup.vue_vue_type_script_setup_true_lang.C2qvBRnU.js → RadioGroup.vue_vue_type_script_setup_true_lang.CeBXDbf5.js} +16 -16
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/RadioButton.js
CHANGED
package/dist/RadioGroup.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RadioButtonType } from "@wikicasa-dev/types";
|
|
2
|
+
import { Nullable } from "@wikicasa-dev/types";
|
|
2
3
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
4
|
initialValue?: RadioButtonType | undefined;
|
|
4
5
|
radioValues?: RadioButtonType[] | undefined;
|
|
@@ -6,7 +7,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
6
7
|
}>, {
|
|
7
8
|
resetRadio: boolean;
|
|
8
9
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
-
"update:modelValue": (args_0: RadioButtonType) => void;
|
|
10
|
+
"update:modelValue": (args_0: Nullable<RadioButtonType>) => void;
|
|
10
11
|
resetted: () => void;
|
|
11
12
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
12
13
|
initialValue?: RadioButtonType | undefined;
|
|
@@ -15,7 +16,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
15
16
|
}>, {
|
|
16
17
|
resetRadio: boolean;
|
|
17
18
|
}>>> & {
|
|
18
|
-
"onUpdate:modelValue"?: ((args_0: RadioButtonType) => any) | undefined;
|
|
19
|
+
"onUpdate:modelValue"?: ((args_0: Nullable<RadioButtonType>) => any) | undefined;
|
|
19
20
|
onResetted?: (() => any) | undefined;
|
|
20
21
|
}, {
|
|
21
22
|
resetRadio: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as h, useAttrs as m, ref as p, openBlock as b, createElementBlock as f, normalizeClass as t, withModifiers as o, createElementVNode as s, createTextVNode as C, toDisplayString as _ } from "vue";
|
|
2
|
+
const w = ["id", "value", "name", "checked"], y = ["for"], $ = /* @__PURE__ */ h({
|
|
3
3
|
inheritAttrs: !1,
|
|
4
4
|
__name: "RadioButton",
|
|
5
5
|
props: {
|
|
@@ -7,22 +7,21 @@ const _ = ["id", "value", "name", "checked"], w = ["for"], v = /* @__PURE__ */ d
|
|
|
7
7
|
isChecked: { type: Boolean, default: !1 }
|
|
8
8
|
},
|
|
9
9
|
emits: ["change"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
name: e.name
|
|
10
|
+
setup(r, { emit: l }) {
|
|
11
|
+
const u = r, c = l, n = m(), a = () => {
|
|
12
|
+
c("change", {
|
|
13
|
+
id: n.id,
|
|
14
|
+
label: u.label,
|
|
15
|
+
name: n.name
|
|
17
16
|
});
|
|
18
|
-
}, i =
|
|
19
|
-
i.value && (i.value.checked = !i.value.checked,
|
|
20
|
-
},
|
|
21
|
-
|
|
17
|
+
}, i = p(null), k = () => {
|
|
18
|
+
i.value && (i.value.checked = !i.value.checked, a());
|
|
19
|
+
}, d = () => {
|
|
20
|
+
a();
|
|
22
21
|
};
|
|
23
|
-
return (e,
|
|
22
|
+
return (e, g) => (b(), f("div", {
|
|
24
23
|
class: t([e.$attrs.class, "uikit-mb-4 uikit-mr-4 uikit-inline-block"]),
|
|
25
|
-
onClick:
|
|
24
|
+
onClick: o(k, ["stop"])
|
|
26
25
|
}, [
|
|
27
26
|
s("input", {
|
|
28
27
|
id: e.$attrs.id,
|
|
@@ -33,8 +32,8 @@ const _ = ["id", "value", "name", "checked"], w = ["for"], v = /* @__PURE__ */ d
|
|
|
33
32
|
value: e.label,
|
|
34
33
|
name: e.$attrs.name,
|
|
35
34
|
checked: e.isChecked,
|
|
36
|
-
onChange:
|
|
37
|
-
}, null, 40,
|
|
35
|
+
onChange: o(d, ["stop"])
|
|
36
|
+
}, null, 40, w),
|
|
38
37
|
s("label", {
|
|
39
38
|
class: t([e.$attrs["label-classes"], "uikit-flex uikit-cursor-pointer uikit-items-center uikit-text-sm"]),
|
|
40
39
|
for: e.$attrs.id
|
|
@@ -44,11 +43,11 @@ const _ = ["id", "value", "name", "checked"], w = ["for"], v = /* @__PURE__ */ d
|
|
|
44
43
|
"uikit-border-w-primary uikit-bg-w-primary uikit-shadow-[0_0_0_2px_white_inset]": e.isChecked
|
|
45
44
|
}])
|
|
46
45
|
}, null, 2),
|
|
47
|
-
|
|
48
|
-
], 10,
|
|
46
|
+
C(" " + _(e.label), 1)
|
|
47
|
+
], 10, y)
|
|
49
48
|
], 2));
|
|
50
49
|
}
|
|
51
50
|
});
|
|
52
51
|
export {
|
|
53
|
-
|
|
52
|
+
$ as _
|
|
54
53
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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 u, createElementBlock as _, Fragment as C, renderList as $, createBlock as b } from "vue";
|
|
2
|
-
import { _ as y } from "./RadioButton.vue_vue_type_script_setup_true_lang.
|
|
2
|
+
import { _ as y } from "./RadioButton.vue_vue_type_script_setup_true_lang.SVKzj6co.js";
|
|
3
3
|
const B = ["data-cy"], E = /* @__PURE__ */ p({
|
|
4
4
|
inheritAttrs: !1,
|
|
5
5
|
__name: "RadioGroup",
|
|
@@ -10,22 +10,22 @@ const B = ["data-cy"], E = /* @__PURE__ */ p({
|
|
|
10
10
|
},
|
|
11
11
|
emits: ["resetted", "update:modelValue"],
|
|
12
12
|
setup(d, { emit: c }) {
|
|
13
|
-
const
|
|
14
|
-
a.value = e,
|
|
15
|
-
},
|
|
13
|
+
const t = d, n = c, a = f(null), l = (e) => {
|
|
14
|
+
a.value = e, n("update:modelValue", e);
|
|
15
|
+
}, s = () => {
|
|
16
16
|
a.value = null;
|
|
17
17
|
}, i = (e) => a.value ? a.value.id === e.id : !1;
|
|
18
18
|
return h(
|
|
19
|
-
() =>
|
|
19
|
+
() => t.resetRadio,
|
|
20
20
|
(e) => {
|
|
21
|
-
e && (
|
|
21
|
+
e && (s(), n("resetted"), n("update:modelValue", null));
|
|
22
22
|
}
|
|
23
23
|
), v(() => {
|
|
24
|
-
|
|
24
|
+
t.initialValue && l(t.initialValue);
|
|
25
25
|
}), (e, g) => o(e.$slots, "default", {
|
|
26
|
-
handleClick:
|
|
26
|
+
handleClick: l,
|
|
27
27
|
activeValue: a.value,
|
|
28
|
-
reset:
|
|
28
|
+
reset: s,
|
|
29
29
|
isActive: i
|
|
30
30
|
}, () => [
|
|
31
31
|
V("div", {
|
|
@@ -33,17 +33,17 @@ const B = ["data-cy"], E = /* @__PURE__ */ p({
|
|
|
33
33
|
"data-cy": e.$attrs["data-cy"] || ""
|
|
34
34
|
}, [
|
|
35
35
|
o(e.$slots, "radio_elements", {
|
|
36
|
-
handleClick:
|
|
36
|
+
handleClick: l,
|
|
37
37
|
activeValue: a.value,
|
|
38
|
-
reset:
|
|
38
|
+
reset: s,
|
|
39
39
|
isActive: i
|
|
40
40
|
}, () => [
|
|
41
|
-
(u(!0), _(C, null, $(e.radioValues, (
|
|
42
|
-
id:
|
|
41
|
+
(u(!0), _(C, null, $(e.radioValues, (r, m) => (u(), b(y, {
|
|
42
|
+
id: r.id,
|
|
43
43
|
key: m,
|
|
44
|
-
label: `${
|
|
45
|
-
"is-checked":
|
|
46
|
-
onChange:
|
|
44
|
+
label: `${r.label}`,
|
|
45
|
+
"is-checked": r.label === a.value?.label,
|
|
46
|
+
onChange: l
|
|
47
47
|
}, null, 8, ["id", "label", "is-checked"]))), 128))
|
|
48
48
|
])
|
|
49
49
|
], 10, B)
|
package/dist/index.js
CHANGED
|
@@ -6,8 +6,8 @@ import { _ as m } from "./chunks/BaseAccordionItem.vue_vue_type_script_setup_tru
|
|
|
6
6
|
import { _ as l } from "./chunks/SelectItem.vue_vue_type_script_setup_true_lang.BOLdDTLM.js";
|
|
7
7
|
import { default as B } from "./CheckboxBtn.js";
|
|
8
8
|
import { _ as n } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.DDtN9_Bg.js";
|
|
9
|
-
import { _ as c } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.
|
|
10
|
-
import { _ as b } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.
|
|
9
|
+
import { _ as c } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.SVKzj6co.js";
|
|
10
|
+
import { _ as b } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.CeBXDbf5.js";
|
|
11
11
|
import { _ as A } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.lyHlWiC5.js";
|
|
12
12
|
import { _ as C } from "./chunks/BaseAlert.vue_vue_type_script_setup_true_lang.HqYdk4yE.js";
|
|
13
13
|
import { _ as T } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.3aynnDI5.js";
|