@wikicasa-dev/components 1.2.55 → 1.2.57
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/BaseAccordionItem.js +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/UIKit/Radio/RadioGroup.vue.d.ts +3 -2
- package/dist/chunks/{BaseAccordionItem.vue_vue_type_script_setup_true_lang.B6RfqbZ9.js → BaseAccordionItem.vue_vue_type_script_setup_true_lang.ofUooWrJ.js} +44 -43
- package/dist/chunks/{RadioGroup.vue_vue_type_script_setup_true_lang.BCllOKE6.js → RadioGroup.vue_vue_type_script_setup_true_lang.CeBXDbf5.js} +15 -15
- package/dist/index.js +2 -2
- package/package.json +2 -2
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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as f, ref as w, watch as d, openBlock as r, createElementBlock as u, normalizeClass as c, createElementVNode as p, withModifiers as b, createVNode as m, unref as v, createBlock as h, withCtx as i, renderSlot as
|
|
1
|
+
import { defineComponent as f, ref as w, watch as d, openBlock as r, createElementBlock as u, normalizeClass as c, createElementVNode as p, withModifiers as b, createVNode as m, unref as v, createBlock as h, withCtx as i, renderSlot as s, createCommentVNode as C } from "vue";
|
|
2
2
|
import { d as y } from "./ArrowIcon.CklBXJPN.js";
|
|
3
3
|
import { _ as g } from "./BaseAccordionContent.vue_vue_type_script_setup_true_lang.N7oILwdv.js";
|
|
4
4
|
import { _ as O } from "./BaseAccordionBtn.vue_vue_type_script_setup_true_lang.CrVwjQqr.js";
|
|
@@ -14,86 +14,87 @@ const B = { key: 0 }, E = ["id", "data-cy", "aria-expanded", "aria-controls"], A
|
|
|
14
14
|
},
|
|
15
15
|
emits: ["click", "accordionOpened", "accordionClosed", "update:accordionState"],
|
|
16
16
|
setup(k, { emit: $ }) {
|
|
17
|
-
const t = $,
|
|
18
|
-
d(
|
|
19
|
-
t(
|
|
17
|
+
const t = $, e = w(!1), n = k;
|
|
18
|
+
d(e, (o) => {
|
|
19
|
+
t(o ? "accordionOpened" : "accordionClosed", n), t("update:accordionState", o), e.value = o;
|
|
20
20
|
}), d(
|
|
21
21
|
() => n.active,
|
|
22
|
-
(
|
|
23
|
-
|
|
22
|
+
(o) => {
|
|
23
|
+
e.value = o;
|
|
24
24
|
},
|
|
25
25
|
{ immediate: !0 }
|
|
26
26
|
);
|
|
27
27
|
const a = () => {
|
|
28
|
-
|
|
28
|
+
e.value = !e.value;
|
|
29
29
|
};
|
|
30
|
-
return (
|
|
31
|
-
class: c(
|
|
30
|
+
return (o, l) => (r(), u("div", {
|
|
31
|
+
class: c(o.$attrs["root-classes"])
|
|
32
32
|
}, [
|
|
33
|
-
!
|
|
33
|
+
!o.$slots.custom_content && !o.$slots.custom_btn && !o.$slots.custom_accordion ? (r(), u("div", B, [
|
|
34
34
|
p("button", {
|
|
35
|
-
id: `accordion-title-${
|
|
35
|
+
id: `accordion-title-${o.id}`,
|
|
36
36
|
type: "button",
|
|
37
|
-
class: c(["uikit-flex uikit-w-full uikit-items-center uikit-justify-between uikit-border-0 uikit-bg-white uikit-px-5 uikit-py-4 uikit-text-left uikit-font-semibold uikit-transition-colors active:max-sm:uikit-bg-w-cultured hover:sm:uikit-bg-w-cultured",
|
|
38
|
-
"data-cy":
|
|
39
|
-
"aria-expanded":
|
|
40
|
-
"aria-controls": `accordion-text-${
|
|
37
|
+
class: c(["uikit-flex uikit-w-full uikit-items-center uikit-justify-between uikit-border-0 uikit-bg-white uikit-px-5 uikit-py-4 uikit-text-left uikit-font-semibold uikit-transition-colors active:max-sm:uikit-bg-w-cultured hover:sm:uikit-bg-w-cultured", o.$attrs["btn-classes"]]),
|
|
38
|
+
"data-cy": o.$attrs["data-cy"],
|
|
39
|
+
"aria-expanded": e.value,
|
|
40
|
+
"aria-controls": `accordion-text-${o.id}`,
|
|
41
41
|
onClick: l[0] || (l[0] = b((M) => {
|
|
42
42
|
a(), t("click");
|
|
43
43
|
}, ["prevent", "stop"]))
|
|
44
44
|
}, [
|
|
45
45
|
p("span", {
|
|
46
|
-
itemprop:
|
|
47
|
-
innerHTML:
|
|
46
|
+
itemprop: o.$attrs.itemprop,
|
|
47
|
+
innerHTML: o.title
|
|
48
48
|
}, null, 8, A),
|
|
49
49
|
m(v(y), {
|
|
50
50
|
class: c(["uikit-flex-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", [
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
e.value && "uikit-rotate-180",
|
|
52
|
+
o.$attrs["arrow-classes"]
|
|
53
53
|
]]),
|
|
54
|
-
"arrow-classes":
|
|
55
|
-
width:
|
|
56
|
-
height:
|
|
54
|
+
"arrow-classes": o.$attrs["arrow-classes"],
|
|
55
|
+
width: o.arrowWidth,
|
|
56
|
+
height: o.arrowWidth
|
|
57
57
|
}, null, 8, ["class", "arrow-classes", "width", "height"])
|
|
58
58
|
], 10, E)
|
|
59
|
-
])) : (
|
|
59
|
+
])) : (o.$slots.custom_content || o.$slots.custom_btn) && !o.$slots.custom_accordion ? (r(), h(O, {
|
|
60
60
|
key: 1,
|
|
61
|
-
id:
|
|
62
|
-
"btn-wrapper-classes":
|
|
63
|
-
"btn-classes":
|
|
64
|
-
"arrow-classes":
|
|
61
|
+
id: o.id,
|
|
62
|
+
"btn-wrapper-classes": o.$attrs["btn-wrapper-classes"],
|
|
63
|
+
"btn-classes": o.$attrs["btn-classes"],
|
|
64
|
+
"arrow-classes": o.$attrs["arrow-classes"],
|
|
65
65
|
"toggle-accordion": a,
|
|
66
|
-
"on-container-click-expand":
|
|
66
|
+
"on-container-click-expand": o.onContainerClickExpand,
|
|
67
|
+
"accordion-open": e.value
|
|
67
68
|
}, {
|
|
68
69
|
custom_content: i(() => [
|
|
69
|
-
|
|
70
|
+
s(o.$slots, "custom_content")
|
|
70
71
|
]),
|
|
71
72
|
custom_btn: i(() => [
|
|
72
|
-
|
|
73
|
-
btnId: `btn-${
|
|
74
|
-
isOpen:
|
|
73
|
+
s(o.$slots, "custom_btn", {
|
|
74
|
+
btnId: `btn-${o.id}`,
|
|
75
|
+
isOpen: e.value,
|
|
75
76
|
toggleAccordion: a
|
|
76
77
|
})
|
|
77
78
|
]),
|
|
78
79
|
_: 3
|
|
79
|
-
}, 8, ["id", "btn-wrapper-classes", "btn-classes", "arrow-classes", "on-container-click-expand"])) : C("", !0),
|
|
80
|
-
|
|
81
|
-
id:
|
|
82
|
-
isOpen:
|
|
80
|
+
}, 8, ["id", "btn-wrapper-classes", "btn-classes", "arrow-classes", "on-container-click-expand", "accordion-open"])) : C("", !0),
|
|
81
|
+
s(o.$slots, "custom_accordion", {
|
|
82
|
+
id: o.id,
|
|
83
|
+
isOpen: e.value,
|
|
83
84
|
toggleAccordion: a
|
|
84
85
|
}, () => [
|
|
85
86
|
m(g, {
|
|
86
|
-
id:
|
|
87
|
-
"accordion-open":
|
|
88
|
-
"accordion-open-classes":
|
|
89
|
-
"accordion-close-classes":
|
|
90
|
-
"accordion-classes":
|
|
87
|
+
id: o.id,
|
|
88
|
+
"accordion-open": e.value,
|
|
89
|
+
"accordion-open-classes": o.$attrs["accordion-open-classes"],
|
|
90
|
+
"accordion-close-classes": o.$attrs["accordion-close-classes"],
|
|
91
|
+
"accordion-classes": o.$attrs["accordion-classes"]
|
|
91
92
|
}, {
|
|
92
93
|
custom_accordion_content: i(() => [
|
|
93
|
-
|
|
94
|
+
s(o.$slots, "custom_accordion_content", { isOpen: e.value })
|
|
94
95
|
]),
|
|
95
96
|
default: i(() => [
|
|
96
|
-
|
|
97
|
+
s(o.$slots, "default", { isOpen: e.value })
|
|
97
98
|
]),
|
|
98
99
|
_: 3
|
|
99
100
|
}, 8, ["id", "accordion-open", "accordion-open-classes", "accordion-close-classes", "accordion-classes"])
|
|
@@ -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
|
@@ -2,12 +2,12 @@ import './assets/index.css';
|
|
|
2
2
|
import { _ as a } from "./chunks/BaseAccordion.vue_vue_type_script_setup_true_lang.CoE2D2rV.js";
|
|
3
3
|
import { _ as t } from "./chunks/BaseAccordionBtn.vue_vue_type_script_setup_true_lang.CrVwjQqr.js";
|
|
4
4
|
import { _ as f } from "./chunks/BaseAccordionContent.vue_vue_type_script_setup_true_lang.N7oILwdv.js";
|
|
5
|
-
import { _ as m } from "./chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.
|
|
5
|
+
import { _ as m } from "./chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.ofUooWrJ.js";
|
|
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
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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.57",
|
|
4
4
|
"description": "Wikicasa frontend components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@storybook/vue3-vite": "^8.0.2",
|
|
52
52
|
"@types/node": "^20.5.0",
|
|
53
53
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
54
|
-
"@wikicasa-dev/types": "^1.0.
|
|
54
|
+
"@wikicasa-dev/types": "^1.0.3",
|
|
55
55
|
"@wikicasa-dev/utilities": "^0.2.1",
|
|
56
56
|
"@wikicasa-dev/svg-icons": "^0.0.1",
|
|
57
57
|
"@wikicasa-dev/vue-composables": "^0.0.3",
|