@wikicasa-dev/components 1.2.55 → 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/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;
|
|
@@ -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
|
@@ -7,7 +7,7 @@ import { _ as l } from "./chunks/SelectItem.vue_vue_type_script_setup_true_lang.
|
|
|
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
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.
|
|
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";
|