@wikicasa-dev/components 2.0.14 → 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
  };
@@ -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
+ } & {};
@@ -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
  });
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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.0.14",
3
+ "version": "2.0.15",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",