@wikicasa-dev/components 2.0.13 → 2.0.15

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.i1drmEOH.js";
1
+ import { _ as f } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.CCR6X0si.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/dist/BaseModal.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.CautEumd.js";
1
+ import { _ as f } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.cWjybS9o.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,57 +1,54 @@
1
1
  import { AccessibleSelectOptions } from './types';
2
2
  import { ClassType, Optional } from '@wikicasa-dev/types';
3
- declare let __VLS_typeProps: {
4
- label?: string;
5
- dropdownPosition?: "top" | "bottom";
6
- namespace?: string;
7
- options: AccessibleSelectOptions[];
8
- isValid?: boolean | null;
9
- feedback?: Partial<{
10
- valid: string;
11
- invalid: string;
12
- }>;
13
- /**
14
- * If true, we will close the dropdown when we touch the body of the document
15
- */
16
- closeOnBodyPressed?: boolean;
17
- border?: boolean;
18
- fieldsetClasses?: ClassType;
19
- legendClasses?: ClassType;
20
- dropdownClasses?: ClassType;
21
- labelClasses?: ClassType;
22
- btnClasses?: ClassType;
23
- dropdownItemClasses?: ClassType;
24
- btnTextClasses?: ClassType;
25
- arrowIcon?: Partial<{
26
- width: number;
27
- height: number;
28
- strokeColor: `#${string}`;
29
- classes: ClassType;
30
- }>;
31
- dataCy?: string;
32
- };
33
- type __VLS_PublicProps = {
34
- modelValue?: Optional<AccessibleSelectOptions>;
35
- } & typeof __VLS_typeProps;
36
- declare function __VLS_template(): {
3
+ declare const _default: <T, LabelID extends string | number | undefined>(__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<{
4
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
+ readonly "onUpdate:modelValue"?: ((modelValue: Optional<AccessibleSelectOptions<T, LabelID>>) => any) | undefined;
6
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & ({
7
+ modelValue?: Optional<AccessibleSelectOptions<T, LabelID>>;
8
+ } & {
9
+ label?: string;
10
+ dropdownPosition?: "top" | "bottom";
11
+ namespace?: string;
12
+ options: AccessibleSelectOptions<T, LabelID>[];
13
+ isValid?: boolean | null;
14
+ feedback?: Partial<{
15
+ valid: string;
16
+ invalid: string;
17
+ }>;
18
+ /**
19
+ * If true, we will close the dropdown when we touch the body of the document
20
+ */
21
+ closeOnBodyPressed?: boolean;
22
+ border?: boolean;
23
+ fieldsetClasses?: ClassType;
24
+ legendClasses?: ClassType;
25
+ dropdownClasses?: ClassType;
26
+ labelClasses?: ClassType;
27
+ btnClasses?: ClassType;
28
+ dropdownItemClasses?: ClassType;
29
+ btnTextClasses?: ClassType;
30
+ arrowIcon?: Partial<{
31
+ width: number;
32
+ height: number;
33
+ strokeColor: `#${string}`;
34
+ classes: ClassType;
35
+ }>;
36
+ dataCy?: string;
37
+ })> & import('vue').PublicProps;
38
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
39
+ attrs: any;
37
40
  slots: {
38
41
  lefticon?(_: {}): any;
39
42
  };
40
- refs: {
41
- btnEl: HTMLButtonElement;
43
+ emit: {
44
+ 'update:modelValue': [modelValue: Optional<AccessibleSelectOptions<T, LabelID>>];
42
45
  };
43
- attrs: Partial<{}>;
46
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
47
+ [key: string]: any;
48
+ }> & {
49
+ __ctx?: Awaited<typeof __VLS_setup>;
44
50
  };
45
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
46
- declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
47
- "update:modelValue": (modelValue: Optional<AccessibleSelectOptions>) => any;
48
- }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
49
- "onUpdate:modelValue"?: ((modelValue: Optional<AccessibleSelectOptions>) => any) | undefined;
50
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
51
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
52
51
  export default _default;
53
- type __VLS_WithTemplateSlots<T, S> = T & {
54
- new (): {
55
- $slots: S;
56
- };
57
- };
52
+ type __VLS_PrettifyLocal<T> = {
53
+ [K in keyof T]: T[K];
54
+ } & {};
@@ -1,197 +1,51 @@
1
1
  import { Nullable, BaseAutocompleteThemes } from '@wikicasa-dev/types';
2
2
  import { AccessibleSelectOptions, ClassTypeProp } from './types';
3
- type ModelValueType<T = unknown> = AccessibleSelectOptions<T>;
4
- declare let __VLS_typeProps: {
5
- isValid?: Nullable<boolean>;
6
- theme?: BaseAutocompleteThemes;
7
- label?: string;
8
- disableCb?: boolean;
9
- onInputChangeCb: (v: string) => Promise<AccessibleSelectOptions[]>;
10
- onOptionSelectedCb?: Nullable<(v: AccessibleSelectOptions) => void>;
11
- keepState?: Nullable<"closed" | "open">;
12
- cleanupOnClose?: boolean;
13
- dropdownClasses?: string;
14
- /**
15
- * If true, we will close the dropdown when the user clicks or touches the body of the document
16
- */
17
- closeDropdownOnBodyPressed?: boolean;
18
- inputClasses?: ClassTypeProp;
19
- fieldsetClasses?: ClassTypeProp;
20
- };
21
- type __VLS_PublicProps = {
22
- modelValue?: ModelValueType | undefined;
23
- } & typeof __VLS_typeProps;
24
- declare function __VLS_template(): {
3
+ declare const _default: <T, LabelID extends string | number | undefined>(__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<{
4
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
+ readonly onClick?: (() => any) | undefined;
6
+ readonly "onUpdate:modelValue"?: ((modelValue: AccessibleSelectOptions<T, LabelID> | undefined) => any) | undefined;
7
+ readonly onKeydown?: ((args_0: KeyboardEvent) => any) | undefined;
8
+ readonly onKeydownEnterPressed?: (() => any) | undefined;
9
+ readonly "onUpdate:dropdownState"?: ((args_0: boolean) => any) | undefined;
10
+ readonly onChangedValue?: ((args_0: string) => any) | undefined;
11
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onClick" | "onKeydown" | "onUpdate:modelValue" | "onKeydownEnterPressed" | "onUpdate:dropdownState" | "onChangedValue"> & ({
12
+ modelValue?: AccessibleSelectOptions<T, LabelID> | undefined;
13
+ } & {
14
+ isValid?: Nullable<boolean>;
15
+ theme?: BaseAutocompleteThemes;
16
+ label?: string;
17
+ disableCb?: boolean;
18
+ onInputChangeCb: (v: string) => Promise<AccessibleSelectOptions<T, LabelID>[]>;
19
+ onOptionSelectedCb?: Nullable<(v: AccessibleSelectOptions<T, LabelID>) => void>;
20
+ keepState?: Nullable<"closed" | "open">;
21
+ cleanupOnClose?: boolean;
22
+ dropdownClasses?: string;
23
+ /**
24
+ * If true, we will close the dropdown when the user clicks or touches the body of the document
25
+ */
26
+ closeDropdownOnBodyPressed?: boolean;
27
+ inputClasses?: ClassTypeProp;
28
+ fieldsetClasses?: ClassTypeProp;
29
+ })> & import('vue').PublicProps;
30
+ expose(exposed: import('vue').ShallowUnwrapRef<{
31
+ select: () => void;
32
+ }>): void;
33
+ attrs: any;
25
34
  slots: {
26
35
  lefticon?(_: {}): any;
27
36
  righticon?(_: {
28
37
  handleClean: () => void;
29
38
  }): any;
30
39
  };
31
- refs: {
32
- baseInput: ({
33
- $: import('vue').ComponentInternalInstance;
34
- $data: {};
35
- $props: {
36
- readonly modelValue?: string | number | undefined;
37
- readonly inputClass?: import('./types').ClassType | import('./types').ClassType[];
38
- readonly labelText?: string | undefined;
39
- readonly feedback?: import('./types').FeedbackLabels | undefined;
40
- readonly isValid?: Nullable<boolean> | undefined;
41
- readonly keepFloatingLabel?: boolean | undefined;
42
- readonly formatter?: Nullable<Partial<{
43
- formatFn: (n: number | string) => string;
44
- unFormatFn: (v: string) => string | number | null;
45
- }>> | undefined;
46
- readonly labelClasses?: ClassTypeProp;
47
- readonly fieldsetClasses?: ClassTypeProp;
48
- readonly labelTextClasses?: ClassTypeProp;
49
- readonly withLeftIcon?: boolean | undefined;
50
- readonly withRightIcon?: boolean | undefined;
51
- readonly dataCy?: string | undefined;
52
- readonly onClick?: ((args_0: MouseEvent) => any) | undefined;
53
- readonly "onUpdate:modelValue"?: ((modelValue: string | number | undefined) => any) | undefined;
54
- readonly onFocusin?: (() => any) | undefined;
55
- readonly onFocusout?: (() => any) | undefined;
56
- readonly onKeydown?: ((args_0: KeyboardEvent) => any) | undefined;
57
- readonly onKeyup?: ((args_0: KeyboardEvent) => any) | undefined;
58
- readonly onKeydownEnterPressed?: (() => any) | undefined;
59
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
60
- $attrs: {
61
- [x: string]: unknown;
62
- };
63
- $refs: {
64
- [x: string]: unknown;
65
- };
66
- $slots: Readonly<{
67
- [name: string]: import('vue').Slot<any> | undefined;
68
- }>;
69
- $root: import('vue').ComponentPublicInstance | null;
70
- $parent: import('vue').ComponentPublicInstance | null;
71
- $host: Element | null;
72
- $emit: ((event: "click", args_0: MouseEvent) => void) & ((event: "update:modelValue", modelValue: string | number | undefined) => void) & ((event: "focusin") => void) & ((event: "focusout") => void) & ((event: "keydown", args_0: KeyboardEvent) => void) & ((event: "keyup", args_0: KeyboardEvent) => void) & ((event: "keydownEnterPressed") => void);
73
- $el: any;
74
- $options: import('vue').ComponentOptionsBase<Readonly<{
75
- modelValue?: string | number | undefined;
76
- } & {
77
- inputClass?: import('./types').ClassType | import('./types').ClassType[];
78
- labelText?: string;
79
- feedback?: import('./types').FeedbackLabels;
80
- isValid?: Nullable<boolean>;
81
- keepFloatingLabel?: boolean;
82
- formatter?: Nullable<Partial<{
83
- formatFn: (n: number | string) => string;
84
- unFormatFn: (v: string) => string | number | null;
85
- }>>;
86
- labelClasses?: ClassTypeProp;
87
- fieldsetClasses?: ClassTypeProp;
88
- labelTextClasses?: ClassTypeProp;
89
- withLeftIcon?: boolean;
90
- withRightIcon?: boolean;
91
- dataCy?: string;
92
- }> & Readonly<{
93
- onClick?: ((args_0: MouseEvent) => any) | undefined;
94
- "onUpdate:modelValue"?: ((modelValue: string | number | undefined) => any) | undefined;
95
- onFocusin?: (() => any) | undefined;
96
- onFocusout?: (() => any) | undefined;
97
- onKeydown?: ((args_0: KeyboardEvent) => any) | undefined;
98
- onKeyup?: ((args_0: KeyboardEvent) => any) | undefined;
99
- onKeydownEnterPressed?: (() => any) | undefined;
100
- }>, {
101
- select: () => void;
102
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
103
- click: (args_0: MouseEvent) => any;
104
- "update:modelValue": (modelValue: string | number | undefined) => any;
105
- focusin: () => any;
106
- focusout: () => any;
107
- keydown: (args_0: KeyboardEvent) => any;
108
- keyup: (args_0: KeyboardEvent) => any;
109
- keydownEnterPressed: () => any;
110
- }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
111
- beforeCreate?: (() => void) | (() => void)[];
112
- created?: (() => void) | (() => void)[];
113
- beforeMount?: (() => void) | (() => void)[];
114
- mounted?: (() => void) | (() => void)[];
115
- beforeUpdate?: (() => void) | (() => void)[];
116
- updated?: (() => void) | (() => void)[];
117
- activated?: (() => void) | (() => void)[];
118
- deactivated?: (() => void) | (() => void)[];
119
- beforeDestroy?: (() => void) | (() => void)[];
120
- beforeUnmount?: (() => void) | (() => void)[];
121
- destroyed?: (() => void) | (() => void)[];
122
- unmounted?: (() => void) | (() => void)[];
123
- renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
124
- renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
125
- errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
126
- };
127
- $forceUpdate: () => void;
128
- $nextTick: typeof import('vue').nextTick;
129
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
130
- } & Readonly<{}> & Omit<Readonly<{
131
- modelValue?: string | number | undefined;
132
- } & {
133
- inputClass?: import('./types').ClassType | import('./types').ClassType[];
134
- labelText?: string;
135
- feedback?: import('./types').FeedbackLabels;
136
- isValid?: Nullable<boolean>;
137
- keepFloatingLabel?: boolean;
138
- formatter?: Nullable<Partial<{
139
- formatFn: (n: number | string) => string;
140
- unFormatFn: (v: string) => string | number | null;
141
- }>>;
142
- labelClasses?: ClassTypeProp;
143
- fieldsetClasses?: ClassTypeProp;
144
- labelTextClasses?: ClassTypeProp;
145
- withLeftIcon?: boolean;
146
- withRightIcon?: boolean;
147
- dataCy?: string;
148
- }> & Readonly<{
149
- onClick?: ((args_0: MouseEvent) => any) | undefined;
150
- "onUpdate:modelValue"?: ((modelValue: string | number | undefined) => any) | undefined;
151
- onFocusin?: (() => any) | undefined;
152
- onFocusout?: (() => any) | undefined;
153
- onKeydown?: ((args_0: KeyboardEvent) => any) | undefined;
154
- onKeyup?: ((args_0: KeyboardEvent) => any) | undefined;
155
- onKeydownEnterPressed?: (() => any) | undefined;
156
- }>, "select"> & import('vue').ShallowUnwrapRef<{
157
- select: () => void;
158
- }> & {} & import('vue').ComponentCustomProperties & {} & {
159
- $slots: {
160
- leftIcon?(_: {}): any;
161
- righticon?(_: {
162
- handleClean: () => void;
163
- handleShowPasswd: () => void;
164
- curType: import('@wikicasa-dev/types').InputTypeHTMLAttribute;
165
- }): any;
166
- feedback?(_: {}): any;
167
- "under-label"?(_: {}): any;
168
- };
169
- }) | null;
40
+ emit: (((evt: "click") => void) & ((evt: "keydown", args_0: KeyboardEvent) => void) & ((evt: "keydownEnterPressed") => void) & ((evt: "update:dropdownState", args_0: boolean) => void) & ((evt: "changedValue", args_0: string) => void)) & {
41
+ 'update:modelValue': [modelValue: AccessibleSelectOptions<T, LabelID> | undefined];
170
42
  };
171
- attrs: Partial<{}>;
43
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
44
+ [key: string]: any;
45
+ }> & {
46
+ __ctx?: Awaited<typeof __VLS_setup>;
172
47
  };
173
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
174
- declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
175
- select: () => void;
176
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
177
- click: () => any;
178
- "update:modelValue": (modelValue: ModelValueType<unknown> | undefined) => any;
179
- keydown: (args_0: KeyboardEvent) => any;
180
- keydownEnterPressed: () => any;
181
- "update:dropdownState": (args_0: boolean) => any;
182
- changedValue: (args_0: string) => any;
183
- }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
184
- onClick?: (() => any) | undefined;
185
- "onUpdate:modelValue"?: ((modelValue: ModelValueType<unknown> | undefined) => any) | undefined;
186
- onKeydown?: ((args_0: KeyboardEvent) => any) | undefined;
187
- onKeydownEnterPressed?: (() => any) | undefined;
188
- "onUpdate:dropdownState"?: ((args_0: boolean) => any) | undefined;
189
- onChangedValue?: ((args_0: string) => any) | undefined;
190
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
191
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
192
48
  export default _default;
193
- type __VLS_WithTemplateSlots<T, S> = T & {
194
- new (): {
195
- $slots: S;
196
- };
197
- };
49
+ type __VLS_PrettifyLocal<T> = {
50
+ [K in keyof T]: T[K];
51
+ } & {};
@@ -1,4 +1,4 @@
1
- import { ClassType } from '@wikicasa-dev/types';
1
+ import { ClassTypeProp } from './types';
2
2
  declare function __VLS_template(): {
3
3
  slots: {
4
4
  header?(_: {
@@ -22,14 +22,13 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
22
  declare const __VLS_component: import('vue').DefineComponent<{
23
23
  id?: string;
24
24
  size?: "modal-sm" | "modal-md" | "modal-lg" | "modal-xxl" | "modal-full";
25
- customBackdropClasses?: ClassType;
26
- customModalDialogClasses?: ClassType;
27
- customModalHeaderClasses?: ClassType;
28
- customModalBodyClasses?: ClassType;
29
- customModalFooterClasses?: ClassType;
25
+ customBackdropClasses?: ClassTypeProp;
26
+ customModalDialogClasses?: ClassTypeProp;
27
+ customModalHeaderClasses?: ClassTypeProp;
28
+ customModalBodyClasses?: ClassTypeProp;
29
+ customModalFooterClasses?: ClassTypeProp;
30
30
  withCloseIcon?: boolean;
31
31
  showModal?: boolean;
32
- closeIcon?: string;
33
32
  headerTitle?: string;
34
33
  autoClose?: number;
35
34
  fullHeight?: boolean;
@@ -38,20 +37,22 @@ declare const __VLS_component: import('vue').DefineComponent<{
38
37
  * If true, the modal will be centered in desktop mode
39
38
  */
40
39
  centered?: boolean;
40
+ dataCy?: string;
41
+ closeIconBtnClasses?: ClassTypeProp;
42
+ titleClasses?: ClassTypeProp;
41
43
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
42
44
  opened: () => any;
43
45
  closed: () => any;
44
46
  }, string, import('vue').PublicProps, Readonly<{
45
47
  id?: string;
46
48
  size?: "modal-sm" | "modal-md" | "modal-lg" | "modal-xxl" | "modal-full";
47
- customBackdropClasses?: ClassType;
48
- customModalDialogClasses?: ClassType;
49
- customModalHeaderClasses?: ClassType;
50
- customModalBodyClasses?: ClassType;
51
- customModalFooterClasses?: ClassType;
49
+ customBackdropClasses?: ClassTypeProp;
50
+ customModalDialogClasses?: ClassTypeProp;
51
+ customModalHeaderClasses?: ClassTypeProp;
52
+ customModalBodyClasses?: ClassTypeProp;
53
+ customModalFooterClasses?: ClassTypeProp;
52
54
  withCloseIcon?: boolean;
53
55
  showModal?: boolean;
54
- closeIcon?: string;
55
56
  headerTitle?: string;
56
57
  autoClose?: number;
57
58
  fullHeight?: boolean;
@@ -60,25 +61,13 @@ declare const __VLS_component: import('vue').DefineComponent<{
60
61
  * If true, the modal will be centered in desktop mode
61
62
  */
62
63
  centered?: boolean;
64
+ dataCy?: string;
65
+ closeIconBtnClasses?: ClassTypeProp;
66
+ titleClasses?: ClassTypeProp;
63
67
  }> & Readonly<{
64
68
  onOpened?: (() => any) | undefined;
65
69
  onClosed?: (() => any) | undefined;
66
- }>, {
67
- id: string;
68
- size: "modal-sm" | "modal-md" | "modal-lg" | "modal-xxl" | "modal-full";
69
- headerTitle: string;
70
- customBackdropClasses: ClassType;
71
- customModalDialogClasses: ClassType;
72
- customModalHeaderClasses: ClassType;
73
- customModalBodyClasses: ClassType;
74
- customModalFooterClasses: ClassType;
75
- withCloseIcon: boolean;
76
- showModal: boolean;
77
- closeIcon: string;
78
- fullHeight: boolean;
79
- closeOnClickOut: boolean;
80
- centered: boolean;
81
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
70
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
82
71
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
83
72
  export default _default;
84
73
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -41,7 +41,10 @@ const R = ["innerHTML"], le = /* @__PURE__ */ T({
41
41
  }),
42
42
  emits: /* @__PURE__ */ $(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
43
43
  setup(t, { expose: p, emit: v }) {
44
- const d = L(t, "modelValue"), u = v, a = r(""), n = r([]), m = r(null), c = r(!1), o = r(!1), y = r(null), B = k(() => n.value.length);
44
+ const d = L(
45
+ t,
46
+ "modelValue"
47
+ ), u = v, a = r(""), n = r([]), m = r(null), c = r(!1), o = r(!1), y = r(null), B = k(() => n.value.length);
45
48
  F(() => {
46
49
  m.value = Q({ delay: 300 }, t.onInputChangeCb);
47
50
  });
@@ -1,76 +1,77 @@
1
- import { defineComponent as L, ref as d, onUnmounted as B, watch as E, openBlock as k, createBlock as y, Teleport as $, createElementVNode as l, normalizeClass as o, withModifiers as v, withCtx as T, createVNode as z, unref as H, createCommentVNode as h, renderSlot as n, createElementBlock as O, nextTick as I } from "vue";
1
+ import { defineComponent as x, ref as u, onUnmounted as B, watch as L, openBlock as c, createBlock as E, Teleport as T, createElementVNode as l, normalizeClass as s, withModifiers as f, createElementBlock as y, createVNode as z, unref as H, createCommentVNode as v, renderSlot as n, nextTick as O } from "vue";
2
2
  import "./types-B0dZ7OiV.D29wNgoj.js";
3
- import { _ as K } from "./BaseButton.vue_vue_type_script_setup_true_lang.BWZPE2Gf.js";
4
- import { l as N } from "./CloseIcon.DIkr4soH.js";
3
+ import { l as $ } from "./CloseIcon.DIkr4soH.js";
5
4
  import "./PharmacyIcon.56ql_DYl.js";
6
- import '../assets/BaseModal.css';const w = () => navigator?.userAgent.includes("Windows"), V = (a, r) => new Promise((s, u) => {
5
+ import '../assets/BaseModal.css';const h = () => navigator?.userAgent.includes("Windows"), I = (o, d) => new Promise((a, t) => {
7
6
  setTimeout(() => {
8
7
  try {
9
- a && a(), s();
8
+ o && o(), a();
10
9
  } catch {
11
- u();
10
+ t();
12
11
  }
13
- }, r);
14
- }), A = ["id", "data-cy"], D = ["innerHTML"], j = /* @__PURE__ */ L({
12
+ }, d);
13
+ }), K = ["id", "data-cy"], N = ["innerHTML"], P = /* @__PURE__ */ x({
15
14
  __name: "BaseModal",
16
15
  props: {
17
16
  id: { default: "base-bt-modal" },
18
17
  size: { default: "modal-md" },
19
- customBackdropClasses: { default: "" },
20
- customModalDialogClasses: { default: "" },
21
- customModalHeaderClasses: { default: "" },
22
- customModalBodyClasses: { default: "" },
23
- customModalFooterClasses: { default: "" },
18
+ customBackdropClasses: {},
19
+ customModalDialogClasses: {},
20
+ customModalHeaderClasses: {},
21
+ customModalBodyClasses: {},
22
+ customModalFooterClasses: {},
24
23
  withCloseIcon: { type: Boolean, default: !0 },
25
24
  showModal: { type: Boolean, default: !0 },
26
- closeIcon: { default: "" },
27
25
  headerTitle: { default: "" },
28
26
  autoClose: {},
29
27
  fullHeight: { type: Boolean, default: !1 },
30
28
  closeOnClickOut: { type: Boolean, default: !0 },
31
- centered: { type: Boolean, default: !1 }
29
+ centered: { type: Boolean, default: !1 },
30
+ dataCy: {},
31
+ closeIconBtnClasses: {},
32
+ titleClasses: {}
32
33
  },
33
34
  emits: ["closed", "opened"],
34
- setup(a, { emit: r }) {
35
- const s = a, u = r, t = d(!1), m = d(null), g = d(null), c = d(!1), p = ({ key: e }) => {
35
+ setup(o, { emit: d }) {
36
+ const a = d, t = u(!1), k = u(null), w = u(null), r = u(!1), m = ({ key: e }) => {
36
37
  e === "Escape" && i();
37
38
  }, C = () => {
38
- document?.body.addEventListener("keydown", p);
39
- }, f = () => {
40
- document?.body.removeEventListener("keydown", p);
41
- }, x = async () => {
42
- t.value = !0, I(() => {
43
- C(), document?.documentElement.classList.add("uikit-no-scrolling"), w() ? document?.body.classList.add("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.add("uikit-no-scrolling");
44
- }), u("opened"), s.autoClose !== void 0 && setTimeout(() => {
39
+ document?.body.addEventListener("keydown", m);
40
+ }, p = () => {
41
+ document?.body.removeEventListener("keydown", m);
42
+ }, g = async () => {
43
+ t.value = !0, O(() => {
44
+ C(), document?.documentElement.classList.add("uikit-no-scrolling"), h() ? document?.body.classList.add("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.add("uikit-no-scrolling");
45
+ }), a("opened"), o.autoClose !== void 0 && setTimeout(() => {
45
46
  i();
46
- }, s.autoClose);
47
+ }, o.autoClose);
47
48
  }, M = async () => {
48
- s.closeOnClickOut && await i();
49
+ o.closeOnClickOut && await i();
49
50
  }, i = async () => {
50
- t.value = !1, f(), document?.documentElement.classList.remove("uikit-no-scrolling"), navigator.userAgent.includes("Windows") ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling"), await V(() => {
51
- m.value?.classList.add("uikit-hidden"), u("closed");
51
+ t.value = !1, p(), document?.documentElement.classList.remove("uikit-no-scrolling"), navigator.userAgent.includes("Windows") ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling"), await I(() => {
52
+ k.value?.classList.add("uikit-hidden"), a("closed");
52
53
  }, 250);
53
54
  };
54
55
  return B(() => {
55
- f(), document?.documentElement.classList.remove("uikit-no-scrolling"), w() ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling");
56
- }), E(
57
- () => s.showModal,
56
+ p(), document?.documentElement.classList.remove("uikit-no-scrolling"), h() ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling");
57
+ }), L(
58
+ () => o.showModal,
58
59
  async (e) => {
59
- !e && !t.value ? c.value = !0 : c.value = !1, e && !t.value && await x(), !e && t.value && await i(), t.value = e;
60
+ !e && !t.value ? r.value = !0 : r.value = !1, e && !t.value && await g(), !e && t.value && await i(), t.value = e;
60
61
  },
61
62
  { immediate: !0 }
62
- ), (e, b) => (k(), y($, { to: "body" }, [
63
+ ), (e, b) => (c(), E(T, { to: "body" }, [
63
64
  l("div", {
64
65
  ref_key: "backdropEl",
65
- ref: m,
66
- class: o(["bbt-backdrop uikit-fixed uikit-left-0 uikit-top-0 uikit-h-full uikit-w-full", [
66
+ ref: k,
67
+ class: s(["bbt-backdrop uikit-fixed uikit-left-0 uikit-top-0 uikit-h-full uikit-w-full", [
67
68
  e.customBackdropClasses,
68
69
  {
69
70
  "uikit-animate-[backdrop-opacity_0.3s_ease-out_0s_backwards] uikit-bg-w-secondary/70": t.value
70
71
  },
71
72
  { "uikit-bg-transparent": !t.value },
72
73
  { "sm:uikit-pt-[30px]": !e.centered },
73
- { hide: c.value }
74
+ { hide: r.value }
74
75
  ]]),
75
76
  style: { "z-index": "1062" },
76
77
  onClick: M
@@ -78,9 +79,9 @@ import '../assets/BaseModal.css';const w = () => navigator?.userAgent.includes("
78
79
  l("dialog", {
79
80
  id: e.id,
80
81
  ref_key: "modalEl",
81
- ref: g,
82
- "data-cy": e.$attrs["data-cy"],
83
- class: o(["uikit-modal-dialog transition-y uikit-mx-auto uikit-block uikit-w-full uikit-overflow-y-auto uikit-overflow-x-hidden uikit-rounded uikit-border-none uikit-bg-transparent uikit-bg-white uikit-p-0 uikit-shadow-lg uikit-no-scrollbar uikit-safe-bottom max-sm:uikit-fixed max-sm:uikit-bottom-0 max-sm:uikit-max-h-[95%] max-sm:uikit-rounded-bl-none max-sm:uikit-rounded-br-none sm:uikit-h-auto", [
82
+ ref: w,
83
+ "data-cy": e.dataCy,
84
+ class: s(["uikit-modal-dialog transition-y uikit-mx-auto uikit-block uikit-w-full uikit-overflow-y-auto uikit-overflow-x-hidden uikit-rounded uikit-border-none uikit-bg-transparent uikit-bg-white uikit-p-0 uikit-shadow-lg uikit-no-scrollbar uikit-safe-bottom max-sm:uikit-fixed max-sm:uikit-bottom-0 max-sm:uikit-max-h-[95%] max-sm:uikit-rounded-bl-none max-sm:uikit-rounded-br-none sm:uikit-h-auto", [
84
85
  e.customModalDialogClasses,
85
86
  { show: t.value },
86
87
  { "closed uikit-overflow-hidden": !t.value },
@@ -88,55 +89,51 @@ import '../assets/BaseModal.css';const w = () => navigator?.userAgent.includes("
88
89
  `base-${e.size}`,
89
90
  e.fullHeight ? "uikit-h-[95%]" : "uikit-h-auto"
90
91
  ]]),
91
- onClick: b[0] || (b[0] = v(() => {
92
+ onClick: b[0] || (b[0] = f(() => {
92
93
  }, ["stop"]))
93
94
  }, [
94
95
  l("div", {
95
- class: o(["default-header uikit-sticky uikit-top-0 uikit-z-10 uikit-rounded-t uikit-border-0 uikit-bg-white uikit-px-4 uikit-pb-10px uikit-pt-20px sm:uikit-px-6", [e.customModalHeaderClasses]])
96
+ class: s(["default-header uikit-sticky uikit-top-0 uikit-z-10 uikit-rounded-t uikit-border-0 uikit-bg-white uikit-px-4 uikit-pb-10px uikit-pt-20px sm:uikit-px-6", [e.customModalHeaderClasses]])
96
97
  }, [
97
- e.withCloseIcon ? (k(), y(K, {
98
+ e.withCloseIcon ? (c(), y("button", {
98
99
  key: 0,
99
100
  id: "close-icon-btn",
100
101
  "data-cy": "bbt-default-close-icon-btn",
101
- class: o(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent", e.$attrs["close-icon-btn-classes"]]),
102
+ class: s(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent", e.closeIconBtnClasses]),
102
103
  type: "button",
103
104
  "aria-label": "Close",
104
- "with-min-width": !0,
105
- onClick: v(i, ["prevent", "stop"])
106
- }, {
107
- default: T(() => [
108
- z(H(N), {
109
- class: "bbt-close-icon uikit-box-border uikit-p-5px",
110
- width: 30,
111
- height: 30
112
- })
113
- ]),
114
- _: 1
115
- }, 8, ["class"])) : h("", !0),
105
+ onClick: f(i, ["prevent", "stop"])
106
+ }, [
107
+ z(H($), {
108
+ class: "bbt-close-icon uikit-box-border uikit-p-5px",
109
+ width: 30,
110
+ height: 30
111
+ })
112
+ ], 2)) : v("", !0),
116
113
  n(e.$slots, "header", { closeModal: i }, () => [
117
114
  l("span", {
118
- class: o(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", e.$attrs["title-classes"]]),
115
+ class: s(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", e.titleClasses]),
119
116
  innerHTML: e.headerTitle
120
- }, null, 10, D)
117
+ }, null, 10, N)
121
118
  ])
122
119
  ], 2),
123
120
  l("div", {
124
- class: o(["uikit-bbt-body uikit-flex-auto uikit-overflow-y-auto uikit-overflow-x-hidden uikit-px-4 uikit-pb-0 uikit-no-scrollbar sm:uikit-px-6 sm:uikit-pb-25px", [e.customModalBodyClasses]])
121
+ class: s(["uikit-bbt-body uikit-flex-auto uikit-overflow-y-auto uikit-overflow-x-hidden uikit-px-4 uikit-pb-0 uikit-no-scrollbar sm:uikit-px-6 sm:uikit-pb-25px", [e.customModalBodyClasses]])
125
122
  }, [
126
123
  n(e.$slots, "body", { closeModal: i })
127
124
  ], 2),
128
- e.$slots.footer ? (k(), O("div", {
125
+ e.$slots.footer ? (c(), y("div", {
129
126
  key: 0,
130
- class: o(["uikit-bbt-footer uikit-sticky uikit-bottom-0 uikit-border-0 uikit-bg-white uikit-px-4 uikit-py-15px sm:uikit-px-6", e.customModalFooterClasses])
127
+ class: s(["uikit-bbt-footer uikit-sticky uikit-bottom-0 uikit-border-0 uikit-bg-white uikit-px-4 uikit-py-15px sm:uikit-px-6", e.customModalFooterClasses])
131
128
  }, [
132
129
  n(e.$slots, "footer", { closeModal: i })
133
- ], 2)) : h("", !0),
130
+ ], 2)) : v("", !0),
134
131
  n(e.$slots, "fixed-bottom")
135
- ], 10, A)
132
+ ], 10, K)
136
133
  ], 2)
137
134
  ]));
138
135
  }
139
136
  });
140
137
  export {
141
- j as _
138
+ P as _
142
139
  };
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import { _ as g } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang
11
11
  import { _ as h } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.BalzO73O.js";
12
12
  import { _ as I } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.CfwgKf93.js";
13
13
  import { _ as w } from "./chunks/BaseAlert.vue_vue_type_style_index_0_lang.BtqP_iYL.js";
14
- import { _ as k } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.i1drmEOH.js";
14
+ import { _ as k } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.CCR6X0si.js";
15
15
  import { _ as v } from "./chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js";
16
16
  import { _ as G } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BWZPE2Gf.js";
17
17
  import { default as O } from "./BaseCard.js";
@@ -27,7 +27,7 @@ import { default as Z } from "./BaseTextarea.js";
27
27
  import { default as ee } from "./BaseToggle.js";
28
28
  import { default as re } from "./BaseTooltip.js";
29
29
  import { _ as te } from "./chunks/BaseUploadFile.vue_vue_type_script_setup_true_lang.2elmVcZt.js";
30
- import { _ as fe } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.CautEumd.js";
30
+ import { _ as fe } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.cWjybS9o.js";
31
31
  import { default as me } from "./BaseSnackbar.js";
32
32
  import { default as le } from "./StaticSpinner.js";
33
33
  import { default as de } from "./BaseShimmerLoader.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.0.13",
3
+ "version": "2.0.15",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",