@wikicasa-dev/components 2.2.9-alpha.51 → 2.2.9-alpha.53

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-thumbs.css';/* empty css */
2
+ import '../assets/swiper-controller.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-thumbs.css';/* empty css */
2
+ import '../assets/swiper-controller.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-thumbs.css';/* empty css */
2
+ import '../assets/swiper-controller.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-thumbs.css';/* empty css */
2
+ import '../assets/swiper-controller.css';/* empty css */
3
3
  export {
4
4
  p as Thumbs
5
5
  };
@@ -1,7 +1,7 @@
1
1
  import o from "../packages/components/lib/UIKit/BaseInput.vue.js";
2
2
  import '../assets/BaseInput.css';/* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8c930d63"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9dab04c5"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -33,14 +33,14 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
33
33
  open?: Optional<boolean>;
34
34
  refresh?: Optional<boolean>;
35
35
  } & SnackbarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
36
- "update:open": (value: Optional<boolean>) => any;
37
36
  "update:refresh": (value: Optional<boolean>) => any;
37
+ "update:open": (value: Optional<boolean>) => any;
38
38
  }, string, import('vue').PublicProps, Readonly<{
39
39
  open?: Optional<boolean>;
40
40
  refresh?: Optional<boolean>;
41
41
  } & SnackbarProps> & Readonly<{
42
- "onUpdate:open"?: ((value: Optional<boolean>) => any) | undefined;
43
42
  "onUpdate:refresh"?: ((value: Optional<boolean>) => any) | undefined;
43
+ "onUpdate:open"?: ((value: Optional<boolean>) => any) | undefined;
44
44
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
45
45
  trigger?(_: {
46
46
  open: () => boolean;
@@ -34,9 +34,12 @@ export type CheckboxGroupProps<TID = string | number, TLabel = string | number,
34
34
  declare const _default: <TID extends string | number, TLabel extends string | number, 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<{
35
35
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
36
36
  readonly "onUpdate:modelValue"?: ((args_0: CheckboxButtonType<TID, TLabel, TPayload>[]) => any) | undefined;
37
+ readonly "onUpdate:refresh"?: ((value: boolean) => any) | undefined;
37
38
  readonly onResetted?: (() => any) | undefined;
38
39
  readonly onCheckedGroup?: ((args_0: string) => any) | undefined;
39
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onResetted" | "onCheckedGroup"> & CheckboxGroupProps<TID, TLabel, TPayload> & Partial<{}>> & import('vue').PublicProps;
40
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:refresh" | "onResetted" | "onCheckedGroup"> & ({
41
+ refresh?: boolean;
42
+ } & CheckboxGroupProps<TID, TLabel, TPayload>) & Partial<{}>> & import('vue').PublicProps;
40
43
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
41
44
  attrs: any;
42
45
  slots: {
@@ -52,7 +55,7 @@ declare const _default: <TID extends string | number, TLabel extends string | nu
52
55
  reset: () => void;
53
56
  }): any;
54
57
  };
55
- emit: ((evt: "update:modelValue", args_0: CheckboxButtonType<TID, TLabel, TPayload>[]) => void) & ((evt: "resetted") => void) & ((evt: "checkedGroup", args_0: string) => void);
58
+ emit: (((evt: "update:modelValue", args_0: CheckboxButtonType<TID, TLabel, TPayload>[]) => void) & ((evt: "resetted") => void) & ((evt: "checkedGroup", args_0: string) => void)) & ((evt: "update:refresh", value: boolean) => void);
56
59
  }>) => import('vue').VNode & {
57
60
  __ctx?: Awaited<typeof __VLS_setup>;
58
61
  };
@@ -1,28 +1,32 @@
1
- import { Nullable } from '@wikicasa-dev/types';
2
1
  import { ClassTypeProp } from '../types';
3
- type __VLS_Props = {
4
- id?: Nullable<string | number>;
5
- name?: string;
6
- label: string;
7
- modelValue?: boolean;
8
- inputClasses?: ClassTypeProp;
9
- labelClasses?: ClassTypeProp;
10
- };
11
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
- "update:modelValue": (args_0: boolean) => any;
13
- change: (args_0: {
14
- id: string | number;
15
- label: string;
2
+ declare const _default: <TID extends string | number | null>(__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<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly "onUpdate:modelValue"?: ((args_0: boolean) => any) | undefined;
5
+ readonly onChange?: ((args_0: {
6
+ id: NonNullable<TID>;
7
+ label: string;
8
+ name?: string;
9
+ }) => any) | undefined;
10
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onChange"> & {
11
+ id?: TID;
16
12
  name?: string;
17
- }) => any;
18
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
19
- "onUpdate:modelValue"?: ((args_0: boolean) => any) | undefined;
20
- onChange?: ((args_0: {
21
- id: string | number;
13
+ label: string;
14
+ modelValue?: boolean;
15
+ inputClasses?: ClassTypeProp;
16
+ labelClasses?: ClassTypeProp;
17
+ } & Partial<{}>> & import('vue').PublicProps;
18
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
19
+ attrs: any;
20
+ slots: {};
21
+ emit: ((evt: "update:modelValue", args_0: boolean) => void) & ((evt: "change", args_0: {
22
+ id: NonNullable<TID>;
22
23
  label: string;
23
24
  name?: string;
24
- }) => any) | undefined;
25
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
26
- checkbox: HTMLInputElement;
27
- }, HTMLDivElement>;
25
+ }) => void);
26
+ }>) => import('vue').VNode & {
27
+ __ctx?: Awaited<typeof __VLS_setup>;
28
+ };
28
29
  export default _default;
30
+ type __VLS_PrettifyLocal<T> = {
31
+ [K in keyof T]: T[K];
32
+ } & {};
@@ -1,56 +1,53 @@
1
1
  import { Nullable, Optional } from '@wikicasa-dev/types';
2
2
  import { ClassTypeProp } from '../types';
3
- export type RadioButtonType<T = unknown> = {
4
- id?: string | number | null;
5
- label: string | number;
6
- payload?: T;
3
+ export type RadioButtonType<TID = string | number | null, TPayload = unknown> = {
4
+ id?: TID;
5
+ label: string;
6
+ payload?: TPayload;
7
7
  active?: boolean;
8
8
  };
9
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
10
- resetRadio?: Optional<boolean>;
11
- } & {
12
- radioValues?: RadioButtonType[];
13
- dataCy?: string;
14
- radioContainerClasses?: ClassTypeProp;
15
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
- "update:modelValue": (args_0: Nullable<RadioButtonType<unknown>>) => any;
17
- "update:resetRadio": (value: Optional<boolean>) => any;
18
- }, string, import('vue').PublicProps, Readonly<{
19
- resetRadio?: Optional<boolean>;
20
- } & {
21
- radioValues?: RadioButtonType[];
22
- dataCy?: string;
23
- radioContainerClasses?: ClassTypeProp;
24
- }> & Readonly<{
25
- "onUpdate:modelValue"?: ((args_0: Nullable<RadioButtonType<unknown>>) => any) | undefined;
26
- "onUpdate:resetRadio"?: ((value: Optional<boolean>) => any) | undefined;
27
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
28
- default?(_: {
29
- handleClick: (elem: RadioButtonType) => void;
30
- activeValue: {
31
- id?: string | number | null | undefined;
32
- label: string | number;
33
- payload?: unknown;
34
- active?: boolean | undefined;
35
- } | null;
36
- reset: () => void;
37
- isActive: (elem: RadioButtonType) => boolean;
38
- }): any;
39
- radio_elements?(_: {
40
- handleClick: (elem: RadioButtonType) => void;
41
- activeValue: {
42
- id?: string | number | null | undefined;
43
- label: string | number;
44
- payload?: unknown;
45
- active?: boolean | undefined;
46
- } | null;
47
- reset: () => void;
48
- isActive: (elem: RadioButtonType) => boolean;
49
- }): any;
50
- }>;
51
- export default _default;
52
- type __VLS_WithTemplateSlots<T, S> = T & {
53
- new (): {
54
- $slots: S;
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
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
11
+ readonly "onUpdate:modelValue"?: ((args_0: Nullable<RadioButtonType<TID, TPayload>>) => any) | undefined;
12
+ readonly "onUpdate:resetRadio"?: ((value: Optional<boolean>) => any) | undefined;
13
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:resetRadio"> & ({
14
+ resetRadio?: Optional<boolean>;
15
+ } & {
16
+ radioValues?: RadioButtonType<TID, TPayload>[];
17
+ dataCy?: string;
18
+ radioContainerClasses?: ClassTypeProp;
19
+ }) & Partial<{}>> & import('vue').PublicProps;
20
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
21
+ attrs: any;
22
+ slots: {
23
+ default?(_: {
24
+ handleClick: (elem: RadioButtonType<TID, TPayload>) => void;
25
+ activeValue: {
26
+ id?: import('vue').UnwrapRef<TID> | undefined;
27
+ label: string;
28
+ payload?: import('vue').UnwrapRef<TPayload> | undefined;
29
+ active?: boolean | undefined;
30
+ } | null;
31
+ reset: () => void;
32
+ isActive: (elem: RadioButtonType<TID, TPayload>) => boolean;
33
+ }): any;
34
+ radio_elements?(_: {
35
+ handleClick: (elem: RadioButtonType<TID, TPayload>) => void;
36
+ activeValue: {
37
+ id?: import('vue').UnwrapRef<TID> | undefined;
38
+ label: string;
39
+ payload?: import('vue').UnwrapRef<TPayload> | undefined;
40
+ active?: boolean | undefined;
41
+ } | null;
42
+ reset: () => void;
43
+ isActive: (elem: RadioButtonType<TID, TPayload>) => boolean;
44
+ }): any;
55
45
  };
46
+ emit: ((evt: "update:modelValue", args_0: Nullable<RadioButtonType<TID, TPayload>>) => void) & ((evt: "update:resetRadio", value: Optional<boolean>) => void);
47
+ }>) => import('vue').VNode & {
48
+ __ctx?: Awaited<typeof __VLS_setup>;
56
49
  };
50
+ export default _default;
51
+ type __VLS_PrettifyLocal<T> = {
52
+ [K in keyof T]: T[K];
53
+ } & {};
@@ -1 +1 @@
1
- .input-wrapper[data-v-8c930d63]{--icon-default-size: 44px}.invalid-bg[data-v-8c930d63]{--invalid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMicgaGVpZ2h0PScxMicgZmlsbD0nbm9uZScgc3Ryb2tlPScjRkE0RjY0Jz48Y2lyY2xlIGN4PSc2JyBjeT0nNicgcj0nNC41Jy8+PHBhdGggc3Ryb2tlLWxpbmVqb2luPSdyb3VuZCcgZD0nTTUuOCAzLjZoLjRMNiA2LjV6Jy8+PGNpcmNsZSBjeD0nNicgY3k9JzguMicgcj0nLjYnIGZpbGw9JyNGQTRGNjQnIHN0cm9rZT0nbm9uZScvPjwvc3ZnPg==);background-image:var(--invalid-img)}.valid-bg[data-v-8c930d63]{--valid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA4IDgnPjxwYXRoIGZpbGw9JyMyQjVERkYnIGQ9J00yLjMgNi43My42IDQuNTNjLS40LTEuMDQuNDYtMS40IDEuMS0uOGwxLjEgMS40IDMuNC0zLjhjLjYtLjYzIDEuNi0uMjcgMS4yLjdsLTQgNC42Yy0uNDMuNS0uOC40LTEuMS4xeicvPjwvc3ZnPg==);background-image:var(--valid-img)}.invalid-bg[data-v-8c930d63],.valid-bg[data-v-8c930d63]{background-position:top 10px right 12px;background-size:20px}.has-right-icon[data-v-8c930d63]>label.inline-label{right:var(--icon-default-size)}.has-left-icon[data-v-8c930d63]>label.inline-label{left:var(--icon-default-size)}[data-v-8c930d63] .text-input-icon{position:absolute;z-index:20;box-sizing:border-box;--icon-size-sm: 16px;--icon-size-md: 20px;--icon-size-lg: 25px}[data-v-8c930d63] .text-input-icon.left{left:5px}[data-v-8c930d63] .text-input-icon.right{right:5px}[data-v-8c930d63] .text-input-icon{--icon-top: 5px;--icon-size: var(--icon-size-sm);width:var(--icon-default-size);height:var(--icon-default-size);padding:calc((var(--icon-default-size) - var(--icon-size)) / 2);top:var(--icon-top)}[data-v-8c930d63] .text-input-icon.md{--icon-size: var(--icon-size-md)}[data-v-8c930d63] .text-input-icon.lg{--icon-top: 0;--icon-size: var(--icon-size-lg)}.under-label[data-v-8c930d63]{left:4px;font-style:italic}
1
+ .input-wrapper[data-v-9dab04c5]{--icon-default-size: 44px}.invalid-bg[data-v-9dab04c5]{--invalid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMicgaGVpZ2h0PScxMicgZmlsbD0nbm9uZScgc3Ryb2tlPScjRkE0RjY0Jz48Y2lyY2xlIGN4PSc2JyBjeT0nNicgcj0nNC41Jy8+PHBhdGggc3Ryb2tlLWxpbmVqb2luPSdyb3VuZCcgZD0nTTUuOCAzLjZoLjRMNiA2LjV6Jy8+PGNpcmNsZSBjeD0nNicgY3k9JzguMicgcj0nLjYnIGZpbGw9JyNGQTRGNjQnIHN0cm9rZT0nbm9uZScvPjwvc3ZnPg==);background-image:var(--invalid-img)}.valid-bg[data-v-9dab04c5]{--valid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA4IDgnPjxwYXRoIGZpbGw9JyMyQjVERkYnIGQ9J00yLjMgNi43My42IDQuNTNjLS40LTEuMDQuNDYtMS40IDEuMS0uOGwxLjEgMS40IDMuNC0zLjhjLjYtLjYzIDEuNi0uMjcgMS4yLjdsLTQgNC42Yy0uNDMuNS0uOC40LTEuMS4xeicvPjwvc3ZnPg==);background-image:var(--valid-img)}.invalid-bg[data-v-9dab04c5],.valid-bg[data-v-9dab04c5]{background-position:top 10px right 12px;background-size:20px}.has-right-icon[data-v-9dab04c5]>label.inline-label{right:var(--icon-default-size)}.has-left-icon[data-v-9dab04c5]>label.inline-label{left:var(--icon-default-size)}[data-v-9dab04c5] .text-input-icon{position:absolute;z-index:20;box-sizing:border-box;--icon-size-sm: 16px;--icon-size-md: 20px;--icon-size-lg: 25px}[data-v-9dab04c5] .text-input-icon.left{left:5px}[data-v-9dab04c5] .text-input-icon.right{right:5px}[data-v-9dab04c5] .text-input-icon{--icon-top: 5px;--icon-size: var(--icon-size-sm);width:var(--icon-default-size);height:var(--icon-default-size);padding:calc((var(--icon-default-size) - var(--icon-size)) / 2);top:var(--icon-top)}[data-v-9dab04c5] .text-input-icon.md{--icon-size: var(--icon-size-md)}[data-v-9dab04c5] .text-input-icon.lg{--icon-top: 0;--icon-size: var(--icon-size-lg)}.under-label[data-v-9dab04c5]{left:4px;font-style:italic}
@@ -1,13 +1,13 @@
1
- import { defineComponent as N, mergeModels as T, useModel as O, ref as m, useId as j, computed as D, watch as y, useAttrs as G, createElementBlock as r, openBlock as u, normalizeClass as v, unref as d, renderSlot as h, createElementVNode as g, createBlock as J, createCommentVNode as x, withKeys as Q, withModifiers as $, Fragment as B, renderList as M } from "vue";
1
+ import { defineComponent as A, mergeModels as C, useModel as N, ref as m, useId as O, computed as j, watch as y, useAttrs as D, createElementBlock as r, openBlock as u, normalizeClass as v, unref as d, renderSlot as h, createElementVNode as g, createBlock as G, createCommentVNode as x, withKeys as J, withModifiers as Q, Fragment as T, renderList as B } from "vue";
2
2
  import W from "../../../../UIKit/BaseFloatingLabel.js";
3
3
  import { useFloatingLabel as X } from "../../../../composables/useFloatingLabel.js";
4
4
  const Y = ["id", "data-cy", "name", "autocomplete", "disabled", "aria-labelledby", "readonly", "type", "pattern", "min", "max", "maxlength", "inputmode", "placeholder", "value"], Z = { class: "uikit-invisible uikit-float-none uikit-mb-2 uikit-ml-2 uikit-block uikit-h-3 uikit-w-auto uikit-max-w-full uikit-overflow-hidden uikit-whitespace-nowrap uikit-p-0 uikit-text uikit-transition-[max-width] uikit-duration-[50ms] uikit-ease-out" }, U = ["innerHTML"], p = ["innerHTML"], _ = ["innerHTML"], ee = {
5
5
  key: 1,
6
6
  class: "under-label uikit-absolute uikit-text-12"
7
- }, ne = /* @__PURE__ */ N({
7
+ }, ne = /* @__PURE__ */ A({
8
8
  inheritAttrs: !1,
9
9
  __name: "BaseInput",
10
- props: /* @__PURE__ */ T({
10
+ props: /* @__PURE__ */ C({
11
11
  id: {},
12
12
  inputClass: {},
13
13
  labelText: { default: "" },
@@ -27,42 +27,42 @@ const Y = ["id", "data-cy", "name", "autocomplete", "disabled", "aria-labelledby
27
27
  modelValue: { default: "" },
28
28
  modelModifiers: {}
29
29
  }),
30
- emits: /* @__PURE__ */ T(["click", "keydownEnterPressed", "focusin", "focusout", "keydown", "keyup"], ["update:modelValue"]),
31
- setup(e, { expose: E, emit: H }) {
32
- const o = O(e, "modelValue"), a = m(""), k = H, {
30
+ emits: /* @__PURE__ */ C(["click", "keydownEnterPressed", "focusin", "focusout", "keydown", "keyup"], ["update:modelValue"]),
31
+ setup(e, { expose: M, emit: E }) {
32
+ const o = N(e, "modelValue"), a = m(""), k = E, {
33
33
  labelState: s,
34
- handleFocusIn: R,
35
- handleFocusOut: I,
36
- setInlineLabel: V,
37
- setFloatingLabel: L
38
- } = X(k), P = j(), f = D(() => e.id || P), n = m("text"), b = m({}), c = m(null), q = () => {
34
+ handleFocusIn: H,
35
+ handleFocusOut: $,
36
+ setInlineLabel: I,
37
+ setFloatingLabel: V
38
+ } = X(k), R = O(), f = j(() => e.id || R), n = m("text"), b = m({}), c = m(null), P = () => {
39
39
  e.feedback && (b.value = e.feedback, e.feedback.valid && typeof e.feedback.valid == "string" && (b.value.valid = [e.feedback.valid]), e.feedback.invalid && typeof e.feedback.invalid == "string" && (b.value.invalid = [e.feedback.invalid]));
40
- }, F = (t, i) => {
40
+ }, L = (t, i) => {
41
41
  if (!e.formatter || !e.formatter.formatFn)
42
42
  return a.value = t, "";
43
43
  const l = t.length ? e.formatter.formatFn(t) : t;
44
44
  return i && (i.value = l), a.value = l, l;
45
- }, C = (t, i = !0) => {
45
+ }, F = (t, i = !0) => {
46
46
  if (i && (!e.formatter || !e.formatter.unFormatFn))
47
47
  return o.value = t, t;
48
48
  if (!i || !e.formatter || !e.formatter.unFormatFn) return;
49
49
  const l = e.formatter.unFormatFn(t);
50
50
  return o.value = l ?? "", l;
51
- }, K = ({ target: t }) => {
52
- const i = t, l = C(i.value);
53
- F(
51
+ }, q = ({ target: t }) => {
52
+ const i = t, l = F(i.value);
53
+ L(
54
54
  `${l}`,
55
55
  l === o.value ? i : void 0
56
56
  );
57
+ }, K = () => {
58
+ o.value = "", I();
57
59
  }, S = () => {
58
- o.value = "", V();
59
- }, z = () => {
60
60
  n.value === "password" ? n.value = "text" : n.value === "text" && (n.value = "password");
61
61
  };
62
62
  y(
63
63
  () => e.feedback,
64
64
  () => {
65
- q();
65
+ P();
66
66
  },
67
67
  {
68
68
  immediate: !0
@@ -70,10 +70,10 @@ const Y = ["id", "data-cy", "name", "autocomplete", "disabled", "aria-labelledby
70
70
  ), y(
71
71
  o,
72
72
  (t) => {
73
- F(
73
+ L(
74
74
  `${t}`,
75
- C(`${t}`, !1) === t ? c.value : void 0
76
- ), a.value != null && a.value.length > 0 && s.value !== "floating-label" ? L() : !a.value && document && document.activeElement !== c.value && V();
75
+ F(`${t}`, !1) === t ? c.value : void 0
76
+ ), a.value != null && a.value.length > 0 && s.value !== "floating-label" ? V() : !a.value && document && document.activeElement !== c.value && I();
77
77
  },
78
78
  {
79
79
  immediate: !0
@@ -81,11 +81,11 @@ const Y = ["id", "data-cy", "name", "autocomplete", "disabled", "aria-labelledby
81
81
  ), y(
82
82
  () => e.keepFloatingLabel,
83
83
  (t) => {
84
- t ? L() : I(o.value);
84
+ t ? V() : $(o.value);
85
85
  }
86
86
  );
87
- const A = G();
88
- return n.value = A.type || "text", E({
87
+ const z = D();
88
+ return n.value = z.type || "text", M({
89
89
  select: () => {
90
90
  c.value?.select();
91
91
  }
@@ -105,8 +105,8 @@ const Y = ["id", "data-cy", "name", "autocomplete", "disabled", "aria-labelledby
105
105
  }, [
106
106
  h(t.$slots, "leftIcon", {}, void 0, !0),
107
107
  h(t.$slots, "righticon", {
108
- handleClean: S,
109
- handleShowPasswd: z,
108
+ handleClean: K,
109
+ handleShowPasswd: S,
110
110
  curType: n.value
111
111
  }, void 0, !0),
112
112
  g("input", {
@@ -141,11 +141,11 @@ const Y = ["id", "data-cy", "name", "autocomplete", "disabled", "aria-labelledby
141
141
  placeholder: t.$attrs.placeholder,
142
142
  value: a.value,
143
143
  onClick: i[0] || (i[0] = (l) => k("click", l)),
144
- onFocusin: i[1] || (i[1] = $(() => e.labelText && d(R)(), ["stop"])),
145
- onFocusout: i[2] || (i[2] = $((l) => e.labelText && !e.keepFloatingLabel && d(I)(a.value), ["stop"])),
146
- onInput: $(K, ["stop"]),
144
+ onFocusin: i[1] || (i[1] = () => e.labelText && d(H)()),
145
+ onFocusout: i[2] || (i[2] = (l) => e.labelText && !e.keepFloatingLabel && d($)(a.value)),
146
+ onInput: Q(q, ["stop"]),
147
147
  onKeydown: [
148
- i[3] || (i[3] = Q(() => k("keydownEnterPressed"), ["enter"])),
148
+ i[3] || (i[3] = J(() => k("keydownEnterPressed"), ["enter"])),
149
149
  i[4] || (i[4] = (l) => k("keydown", l))
150
150
  ],
151
151
  onKeyup: i[5] || (i[5] = (l) => k("keyup", l))
@@ -176,7 +176,7 @@ const Y = ["id", "data-cy", "name", "autocomplete", "disabled", "aria-labelledby
176
176
  }, null, 10, U)
177
177
  ])
178
178
  ], 2),
179
- e.labelText ? (u(), J(W, {
179
+ e.labelText ? (u(), G(W, {
180
180
  key: 0,
181
181
  for: f.value,
182
182
  "label-text": e.labelText,
@@ -191,11 +191,11 @@ const Y = ["id", "data-cy", "name", "autocomplete", "disabled", "aria-labelledby
191
191
  "label-text-classes": e.labelTextClasses
192
192
  }, null, 8, ["for", "label-text", "label-state", "is-valid", "required", "disabled", "label-classes", "label-text-classes"])) : x("", !0),
193
193
  h(t.$slots, "feedback", {}, () => [
194
- e.isValid === !1 ? (u(!0), r(B, { key: 0 }, M(b.value.invalid, (l, w) => (u(), r("div", {
194
+ e.isValid === !1 ? (u(!0), r(T, { key: 0 }, B(b.value.invalid, (l, w) => (u(), r("div", {
195
195
  key: `${f.value}_invalid_${w}`,
196
196
  class: "uikit-mt-1 uikit-text-12 uikit-text-w-danger",
197
197
  innerHTML: l
198
- }, null, 8, p))), 128)) : e.isValid === !0 ? (u(!0), r(B, { key: 1 }, M(b.value.valid, (l, w) => (u(), r("div", {
198
+ }, null, 8, p))), 128)) : e.isValid === !0 ? (u(!0), r(T, { key: 1 }, B(b.value.valid, (l, w) => (u(), r("div", {
199
199
  key: `${f.value}_valid_${w}`,
200
200
  class: "uikit-mt-1 uikit-text-12 uikit-text-w-primary",
201
201
  innerHTML: l
@@ -1,11 +1,11 @@
1
- import { defineComponent as v, ref as D, computed as h, watch as E, renderSlot as b, createElementVNode as $, normalizeClass as g, createElementBlock as B, createCommentVNode as A, openBlock as C, Fragment as I, renderList as R, createBlock as K, unref as V } from "vue";
2
- import { stringToHyphened as L, isArrNullOrEmpty as G } from "@wikicasa-dev/utilities";
3
- import N from "./CheckboxBtn.vue.js";
1
+ import { defineComponent as B, mergeModels as y, useModel as A, ref as I, computed as i, watch as C, renderSlot as p, createElementVNode as M, normalizeClass as x, createElementBlock as R, createCommentVNode as K, openBlock as v, Fragment as V, renderList as w, createBlock as L, unref as G } from "vue";
2
+ import { stringToHyphened as N, isArrNullOrEmpty as T } from "@wikicasa-dev/utilities";
3
+ import F from "./CheckboxBtn.vue.js";
4
4
  import '../../../../../assets/CheckboxBtn.css';/* empty css */
5
- const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
5
+ const O = ["id", "data-cy"], q = /* @__PURE__ */ B({
6
6
  inheritAttrs: !1,
7
7
  __name: "CheckboxGroup",
8
- props: {
8
+ props: /* @__PURE__ */ y({
9
9
  checkboxData: { default() {
10
10
  return [];
11
11
  } },
@@ -18,95 +18,100 @@ const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
18
18
  getKey: { type: Function, default: (a) => typeof a == "string" || typeof a == "number" ? `${a}` : `${a.id}` },
19
19
  groupId: { default: "" },
20
20
  dataCy: { default: "" }
21
- },
22
- emits: ["resetted", "update:modelValue", "checkedGroup"],
23
- setup(a, { emit: y }) {
24
- const o = a, s = y, l = D(
21
+ }, {
22
+ refresh: { type: Boolean, default: !1 },
23
+ refreshModifiers: {}
24
+ }),
25
+ emits: /* @__PURE__ */ y(["resetted", "update:modelValue", "checkedGroup"], ["update:refresh"]),
26
+ setup(a, { emit: D }) {
27
+ const o = a, s = D, f = A(a, "refresh"), l = I(
25
28
  /* @__PURE__ */ new Map()
26
- ), r = h(() => {
29
+ ), r = i(() => {
27
30
  for (const e of o.checkboxData)
28
31
  if (e.reset) return e;
29
32
  return null;
30
- }), x = h(() => o.checkboxData.length), f = h(() => {
33
+ }), E = i(() => o.checkboxData.length), k = i(() => {
31
34
  let e = 0;
32
- return l.value.forEach((t) => {
33
- t.checked && e++;
35
+ return l.value.forEach((c) => {
36
+ c.checked && e++;
34
37
  }), e;
35
- });
36
- (() => {
37
- const e = [];
38
+ }), m = () => {
39
+ const e = [], c = /* @__PURE__ */ new Map();
38
40
  for (const t of o.checkboxData)
39
- l.value.set(`${t.id}`, {
41
+ c.set(`${t.id}`, {
40
42
  ...t,
41
43
  checked: !!t.checked
42
44
  }), t.checked && e.push(t);
43
- s("update:modelValue", e);
44
- })();
45
- const u = (e, t) => {
46
- const c = l.value.get(e);
47
- if (c) {
48
- if (t) {
49
- l.value.set(e, { ...c, ...t });
45
+ l.value = c, s("update:modelValue", e);
46
+ };
47
+ m();
48
+ const u = (e, c) => {
49
+ const t = l.value.get(e);
50
+ if (t) {
51
+ if (c) {
52
+ l.value.set(e, { ...t, ...c });
50
53
  return;
51
54
  }
52
- l.value.set(e, { ...c, checked: !c.checked });
55
+ l.value.set(e, { ...t, checked: !t.checked });
53
56
  }
54
- }, k = () => {
57
+ }, b = () => {
55
58
  l.value.forEach((e) => {
56
59
  e.checked = !1;
57
60
  });
58
- }, m = () => {
59
- k(), s("update:modelValue", []), s("resetted");
60
- }, d = (e) => l.value.get(o.getKey(e))?.checked ?? !1, i = (e) => {
61
- if (G(o.checkboxData)) return;
62
- const t = l.value.get(e.id);
63
- t?.reset && e.checked ? k() : r.value && !t?.reset && u(o.getKey(r.value), { checked: !1 }), u(`${e.id}`), o.autoCheckResetAll && r.value && f.value === x.value - 1 && l.value.forEach((n) => {
61
+ }, g = () => {
62
+ b(), s("update:modelValue", []), s("resetted");
63
+ }, d = (e) => l.value.get(o.getKey(e))?.checked ?? !1, h = (e) => {
64
+ if (T(o.checkboxData)) return;
65
+ const c = l.value.get(e.id);
66
+ c?.reset && e.checked ? b() : r.value && !c?.reset && u(o.getKey(r.value), { checked: !1 }), u(`${e.id}`), o.autoCheckResetAll && r.value && k.value === E.value - 1 && l.value.forEach((n) => {
64
67
  n.checked = !!n.reset;
65
- }), o.autoCheckResetEmpty && r.value && !f.value && (!o.manualToggleResetButton || !t?.reset) && u(o.getKey(r.value), { checked: !0 });
66
- const c = [];
68
+ }), o.autoCheckResetEmpty && r.value && !k.value && (!o.manualToggleResetButton || !c?.reset) && u(o.getKey(r.value), { checked: !0 });
69
+ const t = [];
67
70
  l.value.forEach((n) => {
68
- n.checked && c.push(n);
69
- }), s("update:modelValue", c), s("checkedGroup", o.groupId);
71
+ n.checked && t.push(n);
72
+ }), s("update:modelValue", t), s("checkedGroup", o.groupId);
70
73
  };
71
- return E(
74
+ return C(
72
75
  () => o.reset,
73
76
  (e) => {
74
- e && m();
77
+ e && g();
75
78
  }
76
- ), (e, t) => b(e.$slots, "default", {
79
+ ), C(f, (e) => {
80
+ e && (m(), f.value = !1);
81
+ }), (e, c) => p(e.$slots, "default", {
77
82
  isActive: d,
78
- handleChange: i,
83
+ handleChange: h,
79
84
  checkboxesData: a.checkboxData
80
85
  }, () => [
81
- $("div", {
86
+ M("div", {
82
87
  id: a.groupId,
83
- class: g(["checkbox-group-container", e.$attrs.class || ""]),
88
+ class: x(["checkbox-group-container", e.$attrs.class || ""]),
84
89
  "data-cy": a.dataCy
85
90
  }, [
86
- b(e.$slots, "checkbox_elements", {
91
+ p(e.$slots, "checkbox_elements", {
87
92
  isActive: d,
88
- handleChange: i,
93
+ handleChange: h,
89
94
  checkboxesData: a.checkboxData,
90
- reset: m
95
+ reset: g
91
96
  }, () => [
92
- a.checkboxData ? (C(!0), B(I, { key: 0 }, R(a.checkboxData, (c, n) => (C(), K(N, {
93
- id: a.getKey(c),
97
+ a.checkboxData ? (v(!0), R(V, { key: 0 }, w(a.checkboxData, (t, n) => (v(), L(F, {
98
+ id: a.getKey(t),
94
99
  key: n,
95
- "data-cy": c.dataCy ?? `checkbox_${V(L)(`${c.label}`)}`,
96
- label: c.label,
100
+ "data-cy": t.dataCy ?? `checkbox_${G(N)(`${t.label}`)}`,
101
+ label: t.label,
97
102
  inline: a.formCheckInline,
98
- "model-value": d(c),
99
- class: g([
103
+ "model-value": d(t),
104
+ class: x([
100
105
  a.formCheckInline ? "uikit-mr-10px" : "uikit-mb-10px",
101
106
  a.checkboxContainerClasses
102
107
  ]),
103
- onChange: t[0] || (t[0] = (p) => i(p))
104
- }, null, 8, ["id", "data-cy", "label", "inline", "model-value", "class"]))), 128)) : A("", !0)
108
+ onChange: c[0] || (c[0] = ($) => h($))
109
+ }, null, 8, ["id", "data-cy", "label", "inline", "model-value", "class"]))), 128)) : K("", !0)
105
110
  ])
106
- ], 10, T)
111
+ ], 10, O)
107
112
  ]);
108
113
  }
109
114
  });
110
115
  export {
111
- j as default
116
+ q as default
112
117
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as C, mergeModels as d, useModel as h, ref as $, watch as V, renderSlot as u, createElementVNode as p, normalizeClass as c, createElementBlock as k, openBlock as m, Fragment as y, renderList as R, createBlock as g } from "vue";
2
- import B from "./RadioButton.vue.js";
3
- const b = ["data-cy"], z = /* @__PURE__ */ C({
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({
4
4
  inheritAttrs: !1,
5
5
  __name: "RadioGroup",
6
- props: /* @__PURE__ */ d({
6
+ props: /* @__PURE__ */ u({
7
7
  radioValues: { default: () => [] },
8
8
  dataCy: {},
9
9
  radioContainerClasses: {}
@@ -11,9 +11,9 @@ const b = ["data-cy"], z = /* @__PURE__ */ C({
11
11
  resetRadio: { type: Boolean, default: !1 },
12
12
  resetRadioModifiers: {}
13
13
  }),
14
- emits: /* @__PURE__ */ d(["update:modelValue"], ["update:resetRadio"]),
15
- setup(t, { emit: f }) {
16
- const n = f, i = h(t, "resetRadio"), a = $(null), l = (e) => {
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
17
  a.value = e, n("update:modelValue", e);
18
18
  }, s = () => {
19
19
  a.value = null, i.value = !1, n("update:modelValue", null);
@@ -24,37 +24,37 @@ const b = ["data-cy"], z = /* @__PURE__ */ C({
24
24
  l(e);
25
25
  return;
26
26
  }
27
- })(), V(i, (e) => {
27
+ })(), k(i, (e) => {
28
28
  e && s();
29
- }), (e, A) => u(e.$slots, "default", {
29
+ }), (e, d) => c(e.$slots, "default", {
30
30
  handleClick: l,
31
31
  activeValue: a.value,
32
32
  reset: s,
33
33
  isActive: r
34
34
  }, () => [
35
- p("div", {
36
- class: c(["radio-group-container", e.$attrs.class]),
35
+ y("div", {
36
+ class: m(["radio-group-container", e.$attrs.class]),
37
37
  "data-cy": t.dataCy
38
38
  }, [
39
- u(e.$slots, "radio_elements", {
39
+ c(e.$slots, "radio_elements", {
40
40
  handleClick: l,
41
41
  activeValue: a.value,
42
42
  reset: s,
43
43
  isActive: r
44
44
  }, () => [
45
- (m(!0), k(y, null, R(t.radioValues, (o, v) => (m(), g(B, {
45
+ (f(!0), R(g, null, B(t.radioValues, (o, C) => (f(), b(M, {
46
46
  id: o.id,
47
- key: v,
48
- class: c(t.radioContainerClasses),
47
+ key: C,
48
+ class: m(t.radioContainerClasses),
49
49
  label: `${o.label}`,
50
50
  "model-value": `${o.id}` == `${a.value?.id}`,
51
- onChange: l
51
+ onChange: d[0] || (d[0] = ($) => l($))
52
52
  }, null, 8, ["id", "class", "label", "model-value"]))), 128))
53
53
  ])
54
- ], 10, b)
54
+ ], 10, A)
55
55
  ]);
56
56
  }
57
57
  });
58
58
  export {
59
- z as default
59
+ F as default
60
60
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.2.9-alpha.51",
3
+ "version": "2.2.9-alpha.53",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",