@wikicasa-dev/components 1.2.52 → 1.2.54

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/BaseAutocomplete.vue_vue_type_script_setup_true_lang.Ct4_y9HP.js";
1
+ import { _ as f } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.3aynnDI5.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/dist/BaseModal.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import './assets/BaseModal.css';
2
2
  import { defineComponent as b, resolveComponent as n, openBlock as d, createBlock as r, Teleport as f, createElementVNode as e, normalizeClass as o, withModifiers as h, withCtx as y, createVNode as C, createCommentVNode as c, renderSlot as a, createElementBlock as w } from "vue";
3
- import "./chunks/js.cookie.BaTT4o7s.js";
3
+ import "./chunks/js.cookie.BQua9eWh.js";
4
4
  import { _ as M } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BrJbAMJ8.js";
5
5
  import { l as v } from "./chunks/CloseIcon.DiRdm5zi.js";
6
6
  import { useBreakpoints as g } from "./useBreakpoints.js";
@@ -1,5 +1,5 @@
1
1
  import c from "./BaseIcon.js";
2
- import "./chunks/js.cookie.BaTT4o7s.js";
2
+ import "./chunks/js.cookie.BQua9eWh.js";
3
3
  import { defineComponent as h, resolveComponent as d, openBlock as r, createElementBlock as n, createVNode as k, createCommentVNode as o, Fragment as l, renderList as g, toDisplayString as s, createElementVNode as f } from "vue";
4
4
  import { _ as v } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
5
5
  function p(i, t = !1) {
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.XwXYJ7VQ.js";
1
+ import { _ as f } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.DDtN9_Bg.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,59 +1,4 @@
1
- import { defineComponent as r, openBlock as a, createElementBlock as l, normalizeClass as n, withModifiers as o, createElementVNode as s, createTextVNode as d, toDisplayString as u } from "vue";
2
- import { _ as k } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
3
- const h = r({
4
- name: "RadioButton",
5
- inheritAttrs: !1,
6
- props: {
7
- label: { type: [String, Boolean], required: !0 },
8
- isChecked: { type: Boolean }
9
- },
10
- emits: ["change"],
11
- methods: {
12
- emitChange() {
13
- this.$emit("change", {
14
- id: this.$attrs.id,
15
- label: this.label,
16
- name: this.$attrs.name
17
- });
18
- },
19
- handleClick() {
20
- const i = this.$refs.checkbox;
21
- i.checked = !i.checked, this.emitChange();
22
- },
23
- handleOnInput() {
24
- this.emitChange();
25
- }
26
- }
27
- }), c = ["id", "value", "name", "checked"], m = ["for"];
28
- function p(i, e, b, f, C, $) {
29
- return a(), l("div", {
30
- class: n([i.$attrs.class, "uikit-mb-4 uikit-mr-4 uikit-inline-block"]),
31
- onClick: e[1] || (e[1] = o((...t) => i.handleClick && i.handleClick(...t), ["stop"]))
32
- }, [
33
- s("input", {
34
- id: i.$attrs.id,
35
- ref: "checkbox",
36
- type: "radio",
37
- class: "uikit-hidden",
38
- value: i.label,
39
- name: i.$attrs.name,
40
- checked: i.isChecked,
41
- onChange: e[0] || (e[0] = o((...t) => i.handleOnInput && i.handleOnInput(...t), ["stop"]))
42
- }, null, 40, c),
43
- s("label", {
44
- class: n([i.$attrs["label-classes"], "uikit-flex uikit-cursor-pointer uikit-items-center uikit-text-sm"]),
45
- for: i.$attrs.id
46
- }, [
47
- s("span", {
48
- class: n(["uikit-flex-no-shrink uikit-mr-2 uikit-inline-block uikit-h-4 uikit-w-4 uikit-transform uikit-rounded-full uikit-border uikit-border-solid uikit-border-w-secondary uikit-transition-colors uikit-duration-200", {
49
- "uikit-border-w-primary uikit-bg-w-primary uikit-shadow-[0_0_0_2px_white_inset]": i.isChecked
50
- }])
51
- }, null, 2),
52
- d(" " + u(i.label), 1)
53
- ], 10, m)
54
- ], 2);
55
- }
56
- const y = /* @__PURE__ */ k(h, [["render", p]]);
1
+ import { _ as f } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.CJE9e0tE.js";
57
2
  export {
58
- y as default
3
+ f as default
59
4
  };
@@ -1,66 +1,4 @@
1
- import n from "./RadioButton.js";
2
- import { defineComponent as o, resolveComponent as r, openBlock as a, createElementBlock as l, normalizeClass as d, renderSlot as u, Fragment as c, renderList as h, createBlock as p } from "vue";
3
- import { _ as m } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
4
- const f = o({
5
- name: "RadioGroup",
6
- components: { RadioButton: n },
7
- inheritAttrs: !1,
8
- props: {
9
- initialValue: { type: Object },
10
- radioValues: {
11
- type: Array
12
- },
13
- resetRadio: { type: Boolean, default: !1 }
14
- },
15
- emits: ["resetted", "update:modelValue"],
16
- data() {
17
- return {
18
- selectedValue: null
19
- };
20
- },
21
- watch: {
22
- resetRadio(e) {
23
- e && (this.reset(), this.$emit("resetted"));
24
- }
25
- },
26
- created() {
27
- this.initialValue && this.handleChange(this.initialValue);
28
- },
29
- methods: {
30
- handleChange(e) {
31
- this.selectedValue = e, this.$emit("update:modelValue", e);
32
- },
33
- reset() {
34
- this.selectedValue = null;
35
- },
36
- isActive(e) {
37
- return this.selectedValue ? this.selectedValue.id === e.id : !1;
38
- }
39
- }
40
- }), V = ["data-cy"];
41
- function C(e, $, b, g, y, k) {
42
- const s = r("radio-button");
43
- return a(), l("div", {
44
- class: d(["radio-group-container", e.$attrs.class || ""]),
45
- "data-cy": e.$attrs["data-cy"] || ""
46
- }, [
47
- u(e.$slots, "radio_element", {
48
- handleClick: e.handleChange,
49
- activeValue: e.selectedValue,
50
- reset: e.reset,
51
- isActive: e.isActive
52
- }, () => [
53
- (a(!0), l(c, null, h(e.radioValues, (t, i) => (a(), p(s, {
54
- id: t.id,
55
- key: i,
56
- label: `${t.label}`,
57
- "is-checked": t.label === e.selectedValue?.label,
58
- onChange: e.handleChange
59
- }, null, 8, ["id", "label", "is-checked", "onChange"]))), 128))
60
- ])
61
- ], 10, V);
62
- }
63
- const R = /* @__PURE__ */ m(f, [["render", C]]);
1
+ import { _ as f } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.C2qvBRnU.js";
64
2
  export {
65
- R as default
3
+ f as default
66
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/SwiperCarousel.vue_vue_type_style_index_0_lang.C_fZeeSF.js";
1
+ import { _ as f } from "./chunks/SwiperCarousel.vue_vue_type_style_index_0_lang.CBBHq8Cf.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -64,6 +64,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
64
64
  handleChange: (checkboxValue: CheckboxButtonType) => void;
65
65
  checkboxesData: Record<string, CheckboxButtonType>;
66
66
  }): any;
67
+ checkbox_elements?(_: {
68
+ isActive: (elem: CheckboxButtonType) => boolean;
69
+ handleChange: (checkboxValue: CheckboxButtonType) => void;
70
+ checkboxesData: Record<string, CheckboxButtonType>;
71
+ }): any;
67
72
  }>;
68
73
  export default _default;
69
74
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,26 +1,43 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- label: {
3
- type: (BooleanConstructor | StringConstructor)[];
4
- required: true;
5
- };
6
- isChecked: {
7
- type: BooleanConstructor;
8
- };
9
- }, unknown, unknown, {}, {
10
- emitChange(): void;
11
- handleClick(): void;
12
- handleOnInput(): void;
13
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14
- label: {
15
- type: (BooleanConstructor | StringConstructor)[];
16
- required: true;
17
- };
18
- isChecked: {
19
- type: BooleanConstructor;
20
- };
21
- }>> & {
22
- onChange?: ((...args: any[]) => any) | undefined;
1
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ label: string;
3
+ isChecked?: boolean | undefined;
4
+ }>, {
5
+ isChecked: boolean;
6
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ change: (args_0: {
8
+ id: string;
9
+ label: string;
10
+ name: string;
11
+ }) => void;
12
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
13
+ label: string;
14
+ isChecked?: boolean | undefined;
15
+ }>, {
16
+ isChecked: boolean;
17
+ }>>> & {
18
+ onChange?: ((args_0: {
19
+ id: string;
20
+ label: string;
21
+ name: string;
22
+ }) => any) | undefined;
23
23
  }, {
24
24
  isChecked: boolean;
25
25
  }, {}>;
26
26
  export default _default;
27
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
+ type __VLS_TypePropsToRuntimeProps<T> = {
29
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
30
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
31
+ } : {
32
+ type: import('vue').PropType<T[K]>;
33
+ required: true;
34
+ };
35
+ };
36
+ type __VLS_WithDefaults<P, D> = {
37
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
38
+ default: D[K];
39
+ }> : P[K];
40
+ };
41
+ type __VLS_Prettify<T> = {
42
+ [K in keyof T]: T[K];
43
+ } & {};
@@ -1,37 +1,64 @@
1
1
  import { RadioButtonType } from "@wikicasa-dev/types";
2
- import { Nullable } from "@wikicasa-dev/types";
3
- declare const _default: import("vue").DefineComponent<{
4
- initialValue: {
5
- type: () => RadioButtonType;
6
- };
7
- radioValues: {
8
- type: () => RadioButtonType[];
9
- };
10
- resetRadio: {
11
- type: BooleanConstructor;
12
- default: boolean;
13
- };
14
- }, unknown, {
15
- selectedValue: Nullable<RadioButtonType>;
16
- }, {}, {
17
- handleChange(elem: RadioButtonType): void;
18
- reset(): void;
19
- isActive(elem: RadioButtonType): boolean;
20
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "resetted")[], "update:modelValue" | "resetted", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
- initialValue: {
22
- type: () => RadioButtonType;
23
- };
24
- radioValues: {
25
- type: () => RadioButtonType[];
26
- };
27
- resetRadio: {
28
- type: BooleanConstructor;
29
- default: boolean;
30
- };
31
- }>> & {
32
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
33
- onResetted?: ((...args: any[]) => any) | undefined;
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ initialValue?: RadioButtonType | undefined;
4
+ radioValues?: RadioButtonType[] | undefined;
5
+ resetRadio?: boolean | undefined;
6
+ }>, {
7
+ resetRadio: boolean;
8
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:modelValue": (args_0: RadioButtonType) => void;
10
+ resetted: () => void;
11
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
12
+ initialValue?: RadioButtonType | undefined;
13
+ radioValues?: RadioButtonType[] | undefined;
14
+ resetRadio?: boolean | undefined;
15
+ }>, {
16
+ resetRadio: boolean;
17
+ }>>> & {
18
+ "onUpdate:modelValue"?: ((args_0: RadioButtonType) => any) | undefined;
19
+ onResetted?: (() => any) | undefined;
34
20
  }, {
35
21
  resetRadio: boolean;
36
- }, {}>;
22
+ }, {}>, {
23
+ default?(_: {
24
+ handleClick: (elem: RadioButtonType) => void;
25
+ activeValue: {
26
+ id?: string | number | null | undefined;
27
+ label: string | number;
28
+ } | null;
29
+ reset: () => void;
30
+ isActive: (elem: RadioButtonType) => boolean;
31
+ }): any;
32
+ radio_elements?(_: {
33
+ handleClick: (elem: RadioButtonType) => void;
34
+ activeValue: {
35
+ id?: string | number | null | undefined;
36
+ label: string | number;
37
+ } | null;
38
+ reset: () => void;
39
+ isActive: (elem: RadioButtonType) => boolean;
40
+ }): any;
41
+ }>;
37
42
  export default _default;
43
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
44
+ type __VLS_TypePropsToRuntimeProps<T> = {
45
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
46
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
47
+ } : {
48
+ type: import('vue').PropType<T[K]>;
49
+ required: true;
50
+ };
51
+ };
52
+ type __VLS_WithDefaults<P, D> = {
53
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
54
+ default: D[K];
55
+ }> : P[K];
56
+ };
57
+ type __VLS_Prettify<T> = {
58
+ [K in keyof T]: T[K];
59
+ } & {};
60
+ type __VLS_WithTemplateSlots<T, S> = T & {
61
+ new (): {
62
+ $slots: S;
63
+ };
64
+ };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as z, mergeModels as V, useModel as E, ref as s, computed as f, onBeforeMount as N, watch as C, openBlock as g, createBlock as S, normalizeClass as U, withCtx as b, createVNode as A, renderSlot as B, createElementBlock as F, Fragment as K, renderList as P, unref as W, createElementVNode as j } from "vue";
2
2
  import q from "../BaseInput.js";
3
3
  import { _ as G } from "./BaseDropDown.vue_vue_type_script_setup_true_lang.C4VH7V0e.js";
4
- import "./js.cookie.BaTT4o7s.js";
4
+ import "./js.cookie.BQua9eWh.js";
5
5
  import { _ as J } from "./SelectItem.vue_vue_type_script_setup_true_lang.BOLdDTLM.js";
6
6
  import { useKeyboardController as Q } from "../useKeyboardController.js";
7
7
  function R(i, k) {
@@ -1,8 +1,8 @@
1
- import { defineComponent as O, useAttrs as v, reactive as g, computed as n, watch as y, onBeforeMount as C, openBlock as u, createElementBlock as b, normalizeClass as B, renderSlot as V, Fragment as $, renderList as R, createBlock as A, unref as K, createCommentVNode as w } from "vue";
1
+ import { defineComponent as O, useAttrs as v, reactive as g, computed as d, watch as y, onBeforeMount as C, renderSlot as k, createElementVNode as V, normalizeClass as B, openBlock as b, createElementBlock as $, Fragment as R, renderList as A, createBlock as K, unref as w, createCommentVNode as E } from "vue";
2
2
  import { i as L } from "./ObjectUtils.B1Dk4qsM.js";
3
- import "./js.cookie.BaTT4o7s.js";
4
- import E from "../CheckboxBtn.js";
5
- const G = (l = "") => !l || !l.trim() ? "" : (l = l.trim(), l.replace(" ", "-").toLowerCase()), I = ["id", "data-cy"], N = /* @__PURE__ */ O({
3
+ import "./js.cookie.BQua9eWh.js";
4
+ import G from "../CheckboxBtn.js";
5
+ const D = (l = "") => !l || !l.trim() ? "" : (l = l.trim(), l.replace(" ", "-").toLowerCase()), I = ["id", "data-cy"], S = /* @__PURE__ */ O({
6
6
  inheritAttrs: !1,
7
7
  __name: "CheckboxGroup",
8
8
  props: {
@@ -23,16 +23,16 @@ const G = (l = "") => !l || !l.trim() ? "" : (l = l.trim(), l.replace(" ", "-").
23
23
  setup(l, { emit: f }) {
24
24
  const m = v(), t = l, o = f, s = g({
25
25
  checkedValuesObj: {}
26
- }), c = n(() => {
26
+ }), c = d(() => {
27
27
  for (const e in t.valuesObj) {
28
28
  const a = t.valuesObj[e];
29
29
  if (a.reset)
30
30
  return a;
31
31
  }
32
32
  return null;
33
- }), p = n(
33
+ }), p = d(
34
34
  () => Object.keys(t.valuesObj).length
35
- ), d = n(
35
+ ), h = d(
36
36
  () => Object.values(s.checkedValuesObj).reduce(
37
37
  (e, a) => a.checked ? e + 1 : e,
38
38
  0
@@ -52,12 +52,12 @@ const G = (l = "") => !l || !l.trim() ? "" : (l = l.trim(), l.replace(" ", "-").
52
52
  const i = () => {
53
53
  for (const e in s.checkedValuesObj)
54
54
  s.checkedValuesObj[e].checked = !1;
55
- }, h = (e) => s.checkedValuesObj[t.getKey(e)].checked, k = (e) => {
55
+ }, n = (e) => s.checkedValuesObj[t.getKey(e)].checked, u = (e) => {
56
56
  if (!(!t.valuesObj || L(t.valuesObj))) {
57
- if (t.valuesObj[e.id].reset && e.checked ? i() : c.value && !t.valuesObj[e.id].reset && (s.checkedValuesObj[t.getKey(c.value)].checked = !1), s.checkedValuesObj[e.id].checked = !!e.checked, t.autoCheckResetAll && c.value && d.value === p.value - 1)
57
+ if (t.valuesObj[e.id].reset && e.checked ? i() : c.value && !t.valuesObj[e.id].reset && (s.checkedValuesObj[t.getKey(c.value)].checked = !1), s.checkedValuesObj[e.id].checked = !!e.checked, t.autoCheckResetAll && c.value && h.value === p.value - 1)
58
58
  for (const a in s.checkedValuesObj)
59
59
  s.checkedValuesObj[a].checked = !!s.checkedValuesObj[a].reset;
60
- console.log({ checkboxClicked: t.valuesObj[e.id] }), t.autoCheckResetEmpty && c.value && !d.value && (!t.manualToggleResetButton || !t.valuesObj[e.id].reset) && (s.checkedValuesObj[t.getKey(c.value)].checked = !0), o(
60
+ t.autoCheckResetEmpty && c.value && !h.value && (!t.manualToggleResetButton || !t.valuesObj[e.id].reset) && (s.checkedValuesObj[t.getKey(c.value)].checked = !0), o(
61
61
  "update:modelValue",
62
62
  Object.values(s.checkedValuesObj).filter(
63
63
  (a) => a.checked
@@ -65,30 +65,36 @@ const G = (l = "") => !l || !l.trim() ? "" : (l = l.trim(), l.replace(" ", "-").
65
65
  ), o("checkedGroup", m["group-id"] || "");
66
66
  }
67
67
  };
68
- return (e, a) => (u(), b("div", {
69
- id: e.$attrs["group-id"] || "",
70
- class: B(["checkbox-group-container", e.$attrs.class || ""]),
71
- "data-cy": e.$attrs["data-cy"] || ""
72
- }, [
73
- V(e.$slots, "default", {
74
- isActive: h,
75
- handleChange: k,
76
- checkboxesData: e.valuesObj
77
- }, () => [
78
- e.valuesObj ? (u(!0), b($, { key: 0 }, R(e.valuesObj, (r, T, j) => (u(), A(E, {
79
- id: e.getKey(r),
80
- key: j,
81
- "data-cy": `checkbox_${K(G)(`${r.label}`)}`,
82
- label: r.label,
83
- inline: e.formCheckInline,
84
- "wrapper-margin-y": e.$attrs["checkbox-padding-y"],
85
- "model-value": h(r),
86
- onChange: k
87
- }, null, 8, ["id", "data-cy", "label", "inline", "wrapper-margin-y", "model-value"]))), 128)) : w("", !0)
88
- ])
89
- ], 10, I));
68
+ return (e, a) => k(e.$slots, "default", {
69
+ isActive: n,
70
+ handleChange: u,
71
+ checkboxesData: e.valuesObj
72
+ }, () => [
73
+ V("div", {
74
+ id: e.$attrs["group-id"] || "",
75
+ class: B(["checkbox-group-container", e.$attrs.class || ""]),
76
+ "data-cy": e.$attrs["data-cy"] || ""
77
+ }, [
78
+ k(e.$slots, "checkbox_elements", {
79
+ isActive: n,
80
+ handleChange: u,
81
+ checkboxesData: e.valuesObj
82
+ }, () => [
83
+ e.valuesObj ? (b(!0), $(R, { key: 0 }, A(e.valuesObj, (r, N, j) => (b(), K(G, {
84
+ id: e.getKey(r),
85
+ key: j,
86
+ "data-cy": `checkbox_${w(D)(`${r.label}`)}`,
87
+ label: r.label,
88
+ inline: e.formCheckInline,
89
+ "wrapper-margin-y": e.$attrs["checkbox-padding-y"],
90
+ "model-value": n(r),
91
+ onChange: u
92
+ }, null, 8, ["id", "data-cy", "label", "inline", "wrapper-margin-y", "model-value"]))), 128)) : E("", !0)
93
+ ])
94
+ ], 10, I)
95
+ ]);
90
96
  }
91
97
  });
92
98
  export {
93
- N as _
99
+ S as _
94
100
  };
@@ -0,0 +1,54 @@
1
+ import { defineComponent as d, ref as h, openBlock as m, createElementBlock as p, normalizeClass as t, withModifiers as a, createElementVNode as s, createTextVNode as b, toDisplayString as f, useAttrs as C } from "vue";
2
+ const _ = ["id", "value", "name", "checked"], w = ["for"], v = /* @__PURE__ */ d({
3
+ inheritAttrs: !1,
4
+ __name: "RadioButton",
5
+ props: {
6
+ label: {},
7
+ isChecked: { type: Boolean, default: !1 }
8
+ },
9
+ emits: ["change"],
10
+ setup(o, { emit: r }) {
11
+ const l = o, u = r, n = () => {
12
+ const e = C();
13
+ u("change", {
14
+ id: e.id,
15
+ label: l.label,
16
+ name: e.name
17
+ });
18
+ }, i = h(null), c = () => {
19
+ i.value && (i.value.checked = !i.value.checked, n());
20
+ }, k = () => {
21
+ n();
22
+ };
23
+ return (e, y) => (m(), p("div", {
24
+ class: t([e.$attrs.class, "uikit-mb-4 uikit-mr-4 uikit-inline-block"]),
25
+ onClick: a(c, ["stop"])
26
+ }, [
27
+ s("input", {
28
+ id: e.$attrs.id,
29
+ ref_key: "checkbox",
30
+ ref: i,
31
+ type: "radio",
32
+ class: "uikit-hidden",
33
+ value: e.label,
34
+ name: e.$attrs.name,
35
+ checked: e.isChecked,
36
+ onChange: a(k, ["stop"])
37
+ }, null, 40, _),
38
+ s("label", {
39
+ class: t([e.$attrs["label-classes"], "uikit-flex uikit-cursor-pointer uikit-items-center uikit-text-sm"]),
40
+ for: e.$attrs.id
41
+ }, [
42
+ s("span", {
43
+ class: t(["uikit-flex-no-shrink uikit-mr-2 uikit-inline-block uikit-h-4 uikit-w-4 uikit-transform uikit-rounded-full uikit-border uikit-border-solid uikit-border-w-secondary uikit-transition-colors uikit-duration-200", {
44
+ "uikit-border-w-primary uikit-bg-w-primary uikit-shadow-[0_0_0_2px_white_inset]": e.isChecked
45
+ }])
46
+ }, null, 2),
47
+ b(" " + f(e.label), 1)
48
+ ], 10, w)
49
+ ], 2));
50
+ }
51
+ });
52
+ export {
53
+ v as _
54
+ };
@@ -0,0 +1,55 @@
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.CJE9e0tE.js";
3
+ const B = ["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(d, { emit: c }) {
13
+ const l = d, r = c, a = f(null), t = (e) => {
14
+ a.value = e, r("update:modelValue", e);
15
+ }, n = () => {
16
+ a.value = null;
17
+ }, i = (e) => a.value ? a.value.id === e.id : !1;
18
+ return h(
19
+ () => l.resetRadio,
20
+ (e) => {
21
+ e && (n(), r("resetted"));
22
+ }
23
+ ), v(() => {
24
+ l.initialValue && t(l.initialValue);
25
+ }), (e, g) => o(e.$slots, "default", {
26
+ handleClick: t,
27
+ activeValue: a.value,
28
+ reset: n,
29
+ isActive: i
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: n,
39
+ isActive: i
40
+ }, () => [
41
+ (u(!0), _(C, null, $(e.radioValues, (s, m) => (u(), b(y, {
42
+ id: s.id,
43
+ key: m,
44
+ label: `${s.label}`,
45
+ "is-checked": s.label === a.value?.label,
46
+ onChange: t
47
+ }, null, 8, ["id", "label", "is-checked"]))), 128))
48
+ ])
49
+ ], 10, B)
50
+ ]);
51
+ }
52
+ });
53
+ export {
54
+ E as _
55
+ };
@@ -2,7 +2,7 @@ import '../assets/SwiperCarousel.css';
2
2
  import { defineComponent as Ce, reactive as ze, ref as ge, computed as D, onMounted as Xe, openBlock as Y, createElementBlock as $, normalizeClass as M, createElementVNode as k, renderSlot as Ye, Fragment as re, renderList as he, mergeProps as we, createCommentVNode as J, withModifiers as ne, nextTick as $e } from "vue";
3
3
  import { Swiper as ve } from "swiper";
4
4
  import { r as Me } from "./ObjectUtils.B1Dk4qsM.js";
5
- import "./js.cookie.BaTT4o7s.js";
5
+ import "./js.cookie.BQua9eWh.js";
6
6
  function Ee(r) {
7
7
  return r !== null && typeof r == "object" && "constructor" in r && r.constructor === Object;
8
8
  }
@@ -551,11 +551,11 @@ const De = ["id"], ke = ["id", "data-cy"], Ie = ["data-idx", "loading", "alt", "
551
551
  };
552
552
  return Xe(async () => {
553
553
  if (H(), I.value) {
554
- const { Keyboard: c } = await import("./index.CAhFeT_E.js");
554
+ const { Keyboard: c } = await import("./index.JiJftlAR.js");
555
555
  d.swiperParams.modules?.push(c), d.swiperParams.keyboard = o.swiperOptions.keyboard;
556
556
  }
557
557
  if (t.value) {
558
- const { Pagination: c } = await import("./index.CAhFeT_E.js");
558
+ const { Pagination: c } = await import("./index.JiJftlAR.js");
559
559
  d.swiperParams.modules?.push(c), d.swiperParams.pagination = {
560
560
  el: ".swiper-pagination",
561
561
  renderFraction: (h, b) => `<div class="tw-rounded-xs tw-border-w-black tw-border tw-border-solid tw-px-3 tw-bg-white tw-pt-[3px] tw-pb-[3px]">
@@ -567,7 +567,7 @@ const De = ["id"], ke = ["id", "data-cy"], Ie = ["data-idx", "loading", "alt", "
567
567
  };
568
568
  }
569
569
  if (m.value) {
570
- const { Navigation: c } = await import("./index.CAhFeT_E.js");
570
+ const { Navigation: c } = await import("./index.JiJftlAR.js");
571
571
  d.swiperParams.modules?.push(c);
572
572
  const h = {
573
573
  ...o.swiperOptions.navigation.nextEl ?? {
@@ -583,7 +583,7 @@ const De = ["id"], ke = ["id", "data-cy"], Ie = ["data-idx", "loading", "alt", "
583
583
  };
584
584
  }
585
585
  if (i.value) {
586
- const { Autoplay: c } = await import("./index.CAhFeT_E.js");
586
+ const { Autoplay: c } = await import("./index.JiJftlAR.js");
587
587
  d.swiperParams.modules?.push(c), d.swiperParams.autoplay = o.swiperOptions.autoplay;
588
588
  }
589
589
  const l = {
@@ -596,7 +596,7 @@ const De = ["id"], ke = ["id", "data-cy"], Ie = ["data-idx", "loading", "alt", "
596
596
  };
597
597
  let f = null;
598
598
  if (o.thumbSwiperOptions) {
599
- const { Thumbs: c, FreeMode: h, Controller: b } = await import("./index.CAhFeT_E.js");
599
+ const { Thumbs: c, FreeMode: h, Controller: b } = await import("./index.JiJftlAR.js");
600
600
  d.swiperParams.modules?.push(c), d.swiperParams.modules?.push(b), f = new ve(`#thumb_${o.id}`, {
601
601
  ...o.thumbSwiperOptions,
602
602
  modules: [h]
@@ -1,5 +1,5 @@
1
- import { g as N, a as W, e as R, b as X, c as G, d as Y, m as D, f as Z, h as j, n as J, i as F, j as Q, k as q } from "./SwiperCarousel.vue_vue_type_style_index_0_lang.C_fZeeSF.js";
2
- import { Z as ce } from "./SwiperCarousel.vue_vue_type_style_index_0_lang.C_fZeeSF.js";
1
+ import { g as N, a as W, e as R, b as X, c as G, d as Y, m as D, f as Z, h as j, n as J, i as F, j as Q, k as q } from "./SwiperCarousel.vue_vue_type_style_index_0_lang.CBBHq8Cf.js";
2
+ import { Z as ce } from "./SwiperCarousel.vue_vue_type_style_index_0_lang.CBBHq8Cf.js";
3
3
  function te(k) {
4
4
  let {
5
5
  swiper: e,
@@ -0,0 +1,101 @@
1
+ let g;
2
+ const h = new Uint8Array(16);
3
+ function s() {
4
+ if (!g && (g = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !g))
5
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
6
+ return g(h);
7
+ }
8
+ const o = [];
9
+ for (let n = 0; n < 256; ++n)
10
+ o.push((n + 256).toString(16).slice(1));
11
+ function x(n, e = 0) {
12
+ return o[n[e + 0]] + o[n[e + 1]] + o[n[e + 2]] + o[n[e + 3]] + "-" + o[n[e + 4]] + o[n[e + 5]] + "-" + o[n[e + 6]] + o[n[e + 7]] + "-" + o[n[e + 8]] + o[n[e + 9]] + "-" + o[n[e + 10]] + o[n[e + 11]] + o[n[e + 12]] + o[n[e + 13]] + o[n[e + 14]] + o[n[e + 15]];
13
+ }
14
+ const C = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), U = {
15
+ randomUUID: C
16
+ };
17
+ function a(n, e, c) {
18
+ if (U.randomUUID && !e && !n)
19
+ return U.randomUUID();
20
+ n = n || {};
21
+ const i = n.random || (n.rng || s)();
22
+ if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, e) {
23
+ c = c || 0;
24
+ for (let r = 0; r < 16; ++r)
25
+ e[c + r] = i[r];
26
+ return e;
27
+ }
28
+ return x(i);
29
+ }
30
+ a();
31
+ /*! js-cookie v3.0.5 | MIT */
32
+ function l(n) {
33
+ for (var e = 1; e < arguments.length; e++) {
34
+ var c = arguments[e];
35
+ for (var i in c)
36
+ n[i] = c[i];
37
+ }
38
+ return n;
39
+ }
40
+ var I = {
41
+ read: function(n) {
42
+ return n[0] === '"' && (n = n.slice(1, -1)), n.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
43
+ },
44
+ write: function(n) {
45
+ return encodeURIComponent(n).replace(
46
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
47
+ decodeURIComponent
48
+ );
49
+ }
50
+ };
51
+ function v(n, e) {
52
+ function c(r, p, t) {
53
+ if (!(typeof document > "u")) {
54
+ t = l({}, e, t), typeof t.expires == "number" && (t.expires = new Date(Date.now() + t.expires * 864e5)), t.expires && (t.expires = t.expires.toUTCString()), r = encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
55
+ var d = "";
56
+ for (var u in t)
57
+ t[u] && (d += "; " + u, t[u] !== !0 && (d += "=" + t[u].split(";")[0]));
58
+ return document.cookie = r + "=" + n.write(p, r) + d;
59
+ }
60
+ }
61
+ function i(r) {
62
+ if (!(typeof document > "u" || arguments.length && !r)) {
63
+ for (var p = document.cookie ? document.cookie.split("; ") : [], t = {}, d = 0; d < p.length; d++) {
64
+ var u = p[d].split("="), y = u.slice(1).join("=");
65
+ try {
66
+ var m = decodeURIComponent(u[0]);
67
+ if (t[m] = n.read(y, m), r === m)
68
+ break;
69
+ } catch {
70
+ }
71
+ }
72
+ return r ? t[r] : t;
73
+ }
74
+ }
75
+ return Object.create(
76
+ {
77
+ set: c,
78
+ get: i,
79
+ remove: function(r, p) {
80
+ c(
81
+ r,
82
+ "",
83
+ l({}, p, {
84
+ expires: -1
85
+ })
86
+ );
87
+ },
88
+ withAttributes: function(r) {
89
+ return v(this.converter, l({}, this.attributes, r));
90
+ },
91
+ withConverter: function(r) {
92
+ return v(l({}, this.converter, r), this.attributes);
93
+ }
94
+ },
95
+ {
96
+ attributes: { value: Object.freeze(e) },
97
+ converter: { value: Object.freeze(n) }
98
+ }
99
+ );
100
+ }
101
+ v(I, { path: "/" });
package/dist/index.js CHANGED
@@ -5,12 +5,12 @@ import { _ as f } from "./chunks/BaseAccordionContent.vue_vue_type_script_setup_
5
5
  import { _ as m } from "./chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.B6RfqbZ9.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
- import { _ as n } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.XwXYJ7VQ.js";
9
- import { default as c } from "./RadioButton.js";
10
- import { default as b } from "./RadioGroup.js";
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.CJE9e0tE.js";
10
+ import { _ as b } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.C2qvBRnU.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
- import { _ as T } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.Ct4_y9HP.js";
13
+ import { _ as T } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.3aynnDI5.js";
14
14
  import { _ as w } from "./chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js";
15
15
  import { _ as k } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BrJbAMJ8.js";
16
16
  import { _ as F } from "./chunks/BaseCard.vue_vue_type_style_index_0_lang.w5aEohzG.js";
@@ -31,7 +31,7 @@ import { default as te } from "./BaseUploadFile.js";
31
31
  import { default as fe } from "./BaseModal.js";
32
32
  import { _ as me } from "./chunks/IntersectionObservable.vue_vue_type_script_setup_true_lang.BBMxY-re.js";
33
33
  import { _ as le } from "./chunks/IntersectionObserver.vue_vue_type_script_setup_true_lang.CQHjzQc3.js";
34
- import { _ as Be } from "./chunks/SwiperCarousel.vue_vue_type_style_index_0_lang.C_fZeeSF.js";
34
+ import { _ as Be } from "./chunks/SwiperCarousel.vue_vue_type_style_index_0_lang.CBBHq8Cf.js";
35
35
  import { default as ne } from "./SwiperSlide.js";
36
36
  import { useValidator as ce } from "./useValidator.js";
37
37
  export {
@@ -1,4 +1,4 @@
1
- import { reactive as s, onBeforeMount as o, onUnmounted as t, toRefs as r } from "vue";
1
+ import { reactive as s, onBeforeMount as t, onUnmounted as o, toRefs as r } from "vue";
2
2
  var i = /* @__PURE__ */ ((e) => (e[e.SMALL = 576] = "SMALL", e[e.MEDIUM = 768] = "MEDIUM", e[e.LARGE = 992] = "LARGE", e[e.EXTRA_LARGE = 1200] = "EXTRA_LARGE", e))(i || {});
3
3
  function d() {
4
4
  const e = s({
@@ -10,9 +10,9 @@ function d() {
10
10
  }), n = () => {
11
11
  e.isDesktopMode = window.innerWidth > i.SMALL, e.isSmall = window.innerWidth <= i.SMALL, e.isMedium = window.innerWidth > i.SMALL, e.isLarge = window.innerWidth > i.MEDIUM, e.isExtraLarge = window.innerWidth > i.LARGE;
12
12
  };
13
- return o(() => {
13
+ return t(() => {
14
14
  n(), window.addEventListener("resize", n);
15
- }), t(() => {
15
+ }), o(() => {
16
16
  window.removeEventListener("resize", n);
17
17
  }), r(e);
18
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "1.2.52",
3
+ "version": "1.2.54",
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": "^0.9.2",
54
+ "@wikicasa-dev/types": "^1.0.2",
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",
@@ -1,101 +0,0 @@
1
- let g;
2
- const h = new Uint8Array(16);
3
- function s() {
4
- if (!g && (g = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !g))
5
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
6
- return g(h);
7
- }
8
- const r = [];
9
- for (let e = 0; e < 256; ++e)
10
- r.push((e + 256).toString(16).slice(1));
11
- function x(e, n = 0) {
12
- return (r[e[n + 0]] + r[e[n + 1]] + r[e[n + 2]] + r[e[n + 3]] + "-" + r[e[n + 4]] + r[e[n + 5]] + "-" + r[e[n + 6]] + r[e[n + 7]] + "-" + r[e[n + 8]] + r[e[n + 9]] + "-" + r[e[n + 10]] + r[e[n + 11]] + r[e[n + 12]] + r[e[n + 13]] + r[e[n + 14]] + r[e[n + 15]]).toLowerCase();
13
- }
14
- const C = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), U = {
15
- randomUUID: C
16
- };
17
- function a(e, n, c) {
18
- if (U.randomUUID && !n && !e)
19
- return U.randomUUID();
20
- e = e || {};
21
- const i = e.random || (e.rng || s)();
22
- if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, n) {
23
- c = c || 0;
24
- for (let o = 0; o < 16; ++o)
25
- n[c + o] = i[o];
26
- return n;
27
- }
28
- return x(i);
29
- }
30
- a();
31
- /*! js-cookie v3.0.5 | MIT */
32
- function l(e) {
33
- for (var n = 1; n < arguments.length; n++) {
34
- var c = arguments[n];
35
- for (var i in c)
36
- e[i] = c[i];
37
- }
38
- return e;
39
- }
40
- var I = {
41
- read: function(e) {
42
- return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
43
- },
44
- write: function(e) {
45
- return encodeURIComponent(e).replace(
46
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
47
- decodeURIComponent
48
- );
49
- }
50
- };
51
- function v(e, n) {
52
- function c(o, p, t) {
53
- if (!(typeof document > "u")) {
54
- t = l({}, n, t), typeof t.expires == "number" && (t.expires = new Date(Date.now() + t.expires * 864e5)), t.expires && (t.expires = t.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
55
- var d = "";
56
- for (var u in t)
57
- t[u] && (d += "; " + u, t[u] !== !0 && (d += "=" + t[u].split(";")[0]));
58
- return document.cookie = o + "=" + e.write(p, o) + d;
59
- }
60
- }
61
- function i(o) {
62
- if (!(typeof document > "u" || arguments.length && !o)) {
63
- for (var p = document.cookie ? document.cookie.split("; ") : [], t = {}, d = 0; d < p.length; d++) {
64
- var u = p[d].split("="), y = u.slice(1).join("=");
65
- try {
66
- var m = decodeURIComponent(u[0]);
67
- if (t[m] = e.read(y, m), o === m)
68
- break;
69
- } catch {
70
- }
71
- }
72
- return o ? t[o] : t;
73
- }
74
- }
75
- return Object.create(
76
- {
77
- set: c,
78
- get: i,
79
- remove: function(o, p) {
80
- c(
81
- o,
82
- "",
83
- l({}, p, {
84
- expires: -1
85
- })
86
- );
87
- },
88
- withAttributes: function(o) {
89
- return v(this.converter, l({}, this.attributes, o));
90
- },
91
- withConverter: function(o) {
92
- return v(l({}, this.converter, o), this.attributes);
93
- }
94
- },
95
- {
96
- attributes: { value: Object.freeze(n) },
97
- converter: { value: Object.freeze(e) }
98
- }
99
- );
100
- }
101
- v(I, { path: "/" });