@wikicasa-dev/components 2.2.9-alpha.53 → 2.2.9-alpha.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,5 +1,5 @@
1
1
  import { Autoplay as t } from "swiper/modules";
2
- import '../assets/swiper-controller.css';/* empty css */
2
+ import '../assets/swiper-thumbs.css';/* empty css */
3
3
  export {
4
4
  t as Autoplay
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Controller as e } from "swiper/modules";
2
- import '../assets/swiper-controller.css';/* empty css */
2
+ import '../assets/swiper-thumbs.css';/* empty css */
3
3
  export {
4
4
  e as Controller
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Keyboard as m } from "swiper/modules";
2
- import '../assets/swiper-controller.css';/* empty css */
2
+ import '../assets/swiper-thumbs.css';/* empty css */
3
3
  export {
4
4
  m as Keyboard
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Thumbs as p } from "swiper/modules";
2
- import '../assets/swiper-controller.css';/* empty css */
2
+ import '../assets/swiper-thumbs.css';/* empty css */
3
3
  export {
4
4
  p as Thumbs
5
5
  };
@@ -9,9 +9,11 @@ export type RadioButtonType<TID = string | number | null, TPayload = unknown> =
9
9
  declare const _default: <TID extends string | number | null, TPayload>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
10
10
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
11
11
  readonly "onUpdate:modelValue"?: ((args_0: Nullable<RadioButtonType<TID, TPayload>>) => any) | undefined;
12
+ readonly "onUpdate:refresh"?: ((value: boolean) => any) | undefined;
12
13
  readonly "onUpdate:resetRadio"?: ((value: Optional<boolean>) => any) | undefined;
13
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:resetRadio"> & ({
14
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:refresh" | "onUpdate:resetRadio"> & ({
14
15
  resetRadio?: Optional<boolean>;
16
+ refresh?: boolean;
15
17
  } & {
16
18
  radioValues?: RadioButtonType<TID, TPayload>[];
17
19
  dataCy?: string;
@@ -43,7 +45,7 @@ declare const _default: <TID extends string | number | null, TPayload>(__VLS_pro
43
45
  isActive: (elem: RadioButtonType<TID, TPayload>) => boolean;
44
46
  }): any;
45
47
  };
46
- emit: ((evt: "update:modelValue", args_0: Nullable<RadioButtonType<TID, TPayload>>) => void) & ((evt: "update:resetRadio", value: Optional<boolean>) => void);
48
+ emit: ((evt: "update:modelValue", args_0: Nullable<RadioButtonType<TID, TPayload>>) => void) & (((evt: "update:refresh", value: boolean) => void) & ((evt: "update:resetRadio", value: Optional<boolean>) => void));
47
49
  }>) => import('vue').VNode & {
48
50
  __ctx?: Awaited<typeof __VLS_setup>;
49
51
  };
@@ -1,60 +1,64 @@
1
- import { defineComponent as V, mergeModels as u, useModel as h, ref as p, watch as k, renderSlot as c, createElementVNode as y, normalizeClass as m, createElementBlock as R, openBlock as f, Fragment as g, renderList as B, createBlock as b } from "vue";
2
- import M from "./RadioButton.vue.js";
3
- const A = ["data-cy"], F = /* @__PURE__ */ V({
1
+ import { defineComponent as k, mergeModels as f, useModel as m, ref as R, watch as v, renderSlot as h, createElementVNode as g, normalizeClass as C, createElementBlock as B, openBlock as $, Fragment as M, renderList as b, createBlock as A } from "vue";
2
+ import E from "./RadioButton.vue.js";
3
+ const w = ["data-cy"], G = /* @__PURE__ */ k({
4
4
  inheritAttrs: !1,
5
5
  __name: "RadioGroup",
6
- props: /* @__PURE__ */ u({
6
+ props: /* @__PURE__ */ f({
7
7
  radioValues: { default: () => [] },
8
8
  dataCy: {},
9
9
  radioContainerClasses: {}
10
10
  }, {
11
11
  resetRadio: { type: Boolean, default: !1 },
12
- resetRadioModifiers: {}
12
+ resetRadioModifiers: {},
13
+ refresh: { type: Boolean, default: !1 },
14
+ refreshModifiers: {}
13
15
  }),
14
- emits: /* @__PURE__ */ u(["update:modelValue"], ["update:resetRadio"]),
15
- setup(t, { emit: v }) {
16
- const n = v, i = h(t, "resetRadio"), a = p(null), l = (e) => {
17
- a.value = e, n("update:modelValue", e);
16
+ emits: /* @__PURE__ */ f(["update:modelValue"], ["update:resetRadio", "update:refresh"]),
17
+ setup(l, { emit: V }) {
18
+ const o = V, n = m(l, "resetRadio"), i = m(l, "refresh"), a = R(null), t = (e) => {
19
+ a.value = e, o("update:modelValue", e);
18
20
  }, s = () => {
19
- a.value = null, i.value = !1, n("update:modelValue", null);
20
- }, r = (e) => a.value ? `${a.value.id}` == `${e.id}` : !1;
21
- return (() => {
22
- for (const e of t.radioValues)
21
+ a.value = null, n.value = !1, o("update:modelValue", null);
22
+ }, d = (e) => a.value ? `${a.value.id}` == `${e.id}` : !1, u = () => {
23
+ for (const e of l.radioValues)
23
24
  if (e.active) {
24
- l(e);
25
+ t(e);
25
26
  return;
26
27
  }
27
- })(), k(i, (e) => {
28
+ };
29
+ return u(), v(n, (e) => {
28
30
  e && s();
29
- }), (e, d) => c(e.$slots, "default", {
30
- handleClick: l,
31
+ }), v(i, (e) => {
32
+ e && (u(), i.value = !1);
33
+ }), (e, c) => h(e.$slots, "default", {
34
+ handleClick: t,
31
35
  activeValue: a.value,
32
36
  reset: s,
33
- isActive: r
37
+ isActive: d
34
38
  }, () => [
35
- y("div", {
36
- class: m(["radio-group-container", e.$attrs.class]),
37
- "data-cy": t.dataCy
39
+ g("div", {
40
+ class: C(["radio-group-container", e.$attrs.class]),
41
+ "data-cy": l.dataCy
38
42
  }, [
39
- c(e.$slots, "radio_elements", {
40
- handleClick: l,
43
+ h(e.$slots, "radio_elements", {
44
+ handleClick: t,
41
45
  activeValue: a.value,
42
46
  reset: s,
43
- isActive: r
47
+ isActive: d
44
48
  }, () => [
45
- (f(!0), R(g, null, B(t.radioValues, (o, C) => (f(), b(M, {
46
- id: o.id,
47
- key: C,
48
- class: m(t.radioContainerClasses),
49
- label: `${o.label}`,
50
- "model-value": `${o.id}` == `${a.value?.id}`,
51
- onChange: d[0] || (d[0] = ($) => l($))
49
+ ($(!0), B(M, null, b(l.radioValues, (r, p) => ($(), A(E, {
50
+ id: r.id,
51
+ key: p,
52
+ class: C(l.radioContainerClasses),
53
+ label: `${r.label}`,
54
+ "model-value": `${r.id}` == `${a.value?.id}`,
55
+ onChange: c[0] || (c[0] = (y) => t(y))
52
56
  }, null, 8, ["id", "class", "label", "model-value"]))), 128))
53
57
  ])
54
- ], 10, A)
58
+ ], 10, w)
55
59
  ]);
56
60
  }
57
61
  });
58
62
  export {
59
- F as default
63
+ G as default
60
64
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.2.9-alpha.53",
3
+ "version": "2.2.9-alpha.54",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -46,7 +46,7 @@
46
46
  "date-fns": "^4.0.0",
47
47
  "@wikicasa-dev/svg-icons": "^1.2.28-alpha.1",
48
48
  "@wikicasa-dev/vue-composables": "0.0.33-alpha.4",
49
- "@wikicasa-dev/types": "^2.4.0",
49
+ "@wikicasa-dev/types": "^2.5.0",
50
50
  "@wikicasa-dev/utilities": "^1.2.0"
51
51
  },
52
52
  "dependencies": {
@@ -67,7 +67,7 @@
67
67
  "@wikicasa-dev/svg-icons": "1.2.28-alpha.1",
68
68
  "@wikicasa-dev/vue-composables": "0.0.33-alpha.4",
69
69
  "@wikicasa-dev/tailwind-plugins": "^0.0.3",
70
- "@wikicasa-dev/types": "2.4.6",
70
+ "@wikicasa-dev/types": "2.5.0",
71
71
  "@wikicasa-dev/utilities": "1.2.0",
72
72
  "autoprefixer": "^10.4.22",
73
73
  "date-fns": "4.1.0",