@fiscozen/dropdown 1.0.6 → 1.0.7

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,53 +1,433 @@
1
1
  import { FzIconDropdownProps, FzIconDropdownSlots } from './types';
2
2
  import { FzActionProps } from '@fiscozen/action';
3
-
4
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FzIconDropdownProps>, {
5
- iconName: string;
6
- closeOnActionClick: boolean;
7
- align: string;
8
- teleport: boolean;
9
- environment: string;
10
- buttonVariant: string;
11
- label: string;
12
- }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
- "fzaction:click": (index: number, action: FzActionProps) => void;
14
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FzIconDropdownProps>, {
15
- iconName: string;
16
- closeOnActionClick: boolean;
17
- align: string;
18
- teleport: boolean;
19
- environment: string;
20
- buttonVariant: string;
21
- label: string;
22
- }>>> & Readonly<{
3
+ declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
5
+ slots: Readonly<FzIconDropdownSlots> & FzIconDropdownSlots;
6
+ refs: {
7
+ dropdown: ({
8
+ $: import('vue').ComponentInternalInstance;
9
+ $data: {};
10
+ $props: {
11
+ readonly isOpen?: boolean | undefined;
12
+ readonly size?: import('@fiscozen/button').ButtonSize | undefined;
13
+ readonly environment?: "frontoffice" | "backoffice" | undefined;
14
+ readonly actions: (FzActionProps | (import('@fiscozen/action').FzActionSectionProps & {
15
+ type: "section";
16
+ }))[];
17
+ readonly align?: "left" | "right" | "center" | undefined;
18
+ readonly closeOnActionClick?: boolean | undefined;
19
+ readonly listClass?: string | undefined;
20
+ readonly disabled?: boolean | undefined;
21
+ readonly buttonVariant?: import('@fiscozen/button').ButtonVariant | undefined;
22
+ readonly teleport?: boolean | undefined;
23
+ readonly "onFzaction:click"?: ((actionIndex: number, action: FzActionProps) => any) | undefined;
24
+ readonly "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
25
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
26
+ $attrs: {
27
+ [x: string]: unknown;
28
+ };
29
+ $refs: {
30
+ [x: string]: unknown;
31
+ } & {
32
+ container: ({
33
+ $: import('vue').ComponentInternalInstance;
34
+ $data: {};
35
+ $props: {
36
+ readonly isOpen?: boolean | undefined;
37
+ readonly position?: import('@fiscozen/composables').FzFloatingPosition | undefined;
38
+ readonly container?: string | null | undefined;
39
+ readonly contentClass?: (string | string[] | Record<string, boolean | undefined> | Array<string | Record<string, boolean | undefined>>) | undefined;
40
+ readonly openerClass?: (string | string[] | Record<string, boolean | undefined> | Array<string | Record<string, boolean | undefined>>) | undefined;
41
+ readonly overrideContentClass?: boolean | undefined;
42
+ readonly overrideOpener?: import('vue').Ref<HTMLElement> | undefined;
43
+ readonly teleport?: boolean | undefined;
44
+ readonly useViewport?: boolean | undefined;
45
+ readonly "onFzfloating:setPosition"?: ((...args: any[]) => any) | undefined;
46
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
47
+ $attrs: {
48
+ [x: string]: unknown;
49
+ };
50
+ $refs: {
51
+ [x: string]: unknown;
52
+ } & {
53
+ opener: HTMLDivElement;
54
+ content: HTMLDivElement;
55
+ };
56
+ $slots: Readonly<{
57
+ [name: string]: import('vue').Slot<any> | undefined;
58
+ }>;
59
+ $root: import('vue').ComponentPublicInstance | null;
60
+ $parent: import('vue').ComponentPublicInstance | null;
61
+ $host: Element | null;
62
+ $emit: (event: "fzfloating:setPosition", ...args: any[]) => void;
63
+ $el: HTMLDivElement;
64
+ $options: import('vue').ComponentOptionsBase<Readonly<import('@fiscozen/composables').FzFloatingProps> & Readonly<{
65
+ "onFzfloating:setPosition"?: ((...args: any[]) => any) | undefined;
66
+ }>, {
67
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
68
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
69
+ "fzfloating:setPosition": (...args: any[]) => void;
70
+ }, string, {
71
+ position: import('@fiscozen/composables').FzFloatingPosition;
72
+ isOpen: boolean;
73
+ teleport: boolean;
74
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
75
+ beforeCreate?: (() => void) | (() => void)[];
76
+ created?: (() => void) | (() => void)[];
77
+ beforeMount?: (() => void) | (() => void)[];
78
+ mounted?: (() => void) | (() => void)[];
79
+ beforeUpdate?: (() => void) | (() => void)[];
80
+ updated?: (() => void) | (() => void)[];
81
+ activated?: (() => void) | (() => void)[];
82
+ deactivated?: (() => void) | (() => void)[];
83
+ beforeDestroy?: (() => void) | (() => void)[];
84
+ beforeUnmount?: (() => void) | (() => void)[];
85
+ destroyed?: (() => void) | (() => void)[];
86
+ unmounted?: (() => void) | (() => void)[];
87
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
88
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
89
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
90
+ };
91
+ $forceUpdate: () => void;
92
+ $nextTick: typeof import('vue').nextTick;
93
+ $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;
94
+ } & Readonly<{
95
+ position: import('@fiscozen/composables').FzFloatingPosition;
96
+ isOpen: boolean;
97
+ teleport: boolean;
98
+ }> & Omit<Readonly<import('@fiscozen/composables').FzFloatingProps> & Readonly<{
99
+ "onFzfloating:setPosition"?: ((...args: any[]) => any) | undefined;
100
+ }>, "setPosition" | ("position" | "isOpen" | "teleport")> & import('vue').ShallowUnwrapRef<{
101
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
102
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
103
+ $slots: {
104
+ 'opener-start'?(_: {}): any;
105
+ opener?(_: {
106
+ isOpen: boolean;
107
+ floating: {
108
+ float: import('@fiscozen/composables').FzRect;
109
+ rect: import('vue').Ref<DOMRect | undefined>;
110
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
111
+ position: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition>;
112
+ actualPosition?: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition | undefined>;
113
+ openerRect: import('vue').Ref<DOMRect | undefined>;
114
+ containerRect: import('vue').Ref<DOMRect | undefined>;
115
+ };
116
+ }): any;
117
+ 'opener-end'?(_: {}): any;
118
+ default?(_: {
119
+ isOpen: boolean;
120
+ floating: {
121
+ float: import('@fiscozen/composables').FzRect;
122
+ rect: import('vue').Ref<DOMRect | undefined>;
123
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
124
+ position: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition>;
125
+ actualPosition?: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition | undefined>;
126
+ openerRect: import('vue').Ref<DOMRect | undefined>;
127
+ containerRect: import('vue').Ref<DOMRect | undefined>;
128
+ };
129
+ }): any;
130
+ default?(_: {
131
+ isOpen: boolean;
132
+ floating: {
133
+ float: import('@fiscozen/composables').FzRect;
134
+ rect: import('vue').Ref<DOMRect | undefined>;
135
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
136
+ position: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition>;
137
+ actualPosition?: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition | undefined>;
138
+ openerRect: import('vue').Ref<DOMRect | undefined>;
139
+ containerRect: import('vue').Ref<DOMRect | undefined>;
140
+ };
141
+ }): any;
142
+ };
143
+ }) | null;
144
+ };
145
+ $slots: Readonly<{
146
+ [name: string]: import('vue').Slot<any> | undefined;
147
+ }>;
148
+ $root: import('vue').ComponentPublicInstance | null;
149
+ $parent: import('vue').ComponentPublicInstance | null;
150
+ $host: Element | null;
151
+ $emit: ((event: "fzaction:click", actionIndex: number, action: FzActionProps) => void) & ((event: "update:isOpen", value: boolean) => void);
152
+ $el: HTMLDivElement;
153
+ $options: import('vue').ComponentOptionsBase<Readonly<{
154
+ isOpen?: boolean;
155
+ } & import('./types').FzDropdownProps> & Readonly<{
156
+ "onFzaction:click"?: ((actionIndex: number, action: FzActionProps) => any) | undefined;
157
+ "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
158
+ }>, {
159
+ open: () => void;
160
+ close: () => void;
161
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
162
+ "fzaction:click": (actionIndex: number, action: FzActionProps) => any;
163
+ "update:isOpen": (value: boolean) => any;
164
+ }, string, {
165
+ environment: "frontoffice" | "backoffice";
166
+ teleport: boolean;
167
+ actions: (FzActionProps | (import('@fiscozen/action').FzActionSectionProps & {
168
+ type: "section";
169
+ }))[];
170
+ closeOnActionClick: boolean;
171
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
172
+ beforeCreate?: (() => void) | (() => void)[];
173
+ created?: (() => void) | (() => void)[];
174
+ beforeMount?: (() => void) | (() => void)[];
175
+ mounted?: (() => void) | (() => void)[];
176
+ beforeUpdate?: (() => void) | (() => void)[];
177
+ updated?: (() => void) | (() => void)[];
178
+ activated?: (() => void) | (() => void)[];
179
+ deactivated?: (() => void) | (() => void)[];
180
+ beforeDestroy?: (() => void) | (() => void)[];
181
+ beforeUnmount?: (() => void) | (() => void)[];
182
+ destroyed?: (() => void) | (() => void)[];
183
+ unmounted?: (() => void) | (() => void)[];
184
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
185
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
186
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
187
+ };
188
+ $forceUpdate: () => void;
189
+ $nextTick: typeof import('vue').nextTick;
190
+ $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;
191
+ } & Readonly<{
192
+ environment: "frontoffice" | "backoffice";
193
+ teleport: boolean;
194
+ actions: (FzActionProps | (import('@fiscozen/action').FzActionSectionProps & {
195
+ type: "section";
196
+ }))[];
197
+ closeOnActionClick: boolean;
198
+ }> & Omit<Readonly<{
199
+ isOpen?: boolean;
200
+ } & import('./types').FzDropdownProps> & Readonly<{
201
+ "onFzaction:click"?: ((actionIndex: number, action: FzActionProps) => any) | undefined;
202
+ "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
203
+ }>, "close" | "open" | ("environment" | "teleport" | "actions" | "closeOnActionClick")> & import('vue').ShallowUnwrapRef<{
204
+ open: () => void;
205
+ close: () => void;
206
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
207
+ $slots: Readonly<import('./types').FzDropdownSlots> & import('./types').FzDropdownSlots;
208
+ }) | null;
209
+ };
210
+ rootEl: HTMLDivElement;
211
+ };
212
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
213
+ declare const __VLS_component: import('vue').DefineComponent<FzIconDropdownProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
214
+ "fzaction:click": (index: number, action: FzActionProps) => any;
215
+ }, string, import('vue').PublicProps, Readonly<FzIconDropdownProps> & Readonly<{
23
216
  "onFzaction:click"?: ((index: number, action: FzActionProps) => any) | undefined;
24
217
  }>, {
25
218
  label: string;
26
- environment: "backoffice" | "frontoffice";
219
+ environment: "frontoffice" | "backoffice";
27
220
  iconName: string;
28
221
  teleport: boolean;
29
- buttonVariant: import('@fiscozen/button').CommonButtonVariant;
30
- align: "right" | "left" | "center";
222
+ buttonVariant: import('@fiscozen/button').IconButtonVariant;
223
+ align: "left" | "right" | "center";
31
224
  closeOnActionClick: boolean;
32
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, Readonly<FzIconDropdownSlots> & FzIconDropdownSlots>;
225
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
226
+ dropdown: ({
227
+ $: import('vue').ComponentInternalInstance;
228
+ $data: {};
229
+ $props: {
230
+ readonly isOpen?: boolean | undefined;
231
+ readonly size?: import('@fiscozen/button').ButtonSize | undefined;
232
+ readonly environment?: "frontoffice" | "backoffice" | undefined;
233
+ readonly actions: (FzActionProps | (import('@fiscozen/action').FzActionSectionProps & {
234
+ type: "section";
235
+ }))[];
236
+ readonly align?: "left" | "right" | "center" | undefined;
237
+ readonly closeOnActionClick?: boolean | undefined;
238
+ readonly listClass?: string | undefined;
239
+ readonly disabled?: boolean | undefined;
240
+ readonly buttonVariant?: import('@fiscozen/button').ButtonVariant | undefined;
241
+ readonly teleport?: boolean | undefined;
242
+ readonly "onFzaction:click"?: ((actionIndex: number, action: FzActionProps) => any) | undefined;
243
+ readonly "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
244
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
245
+ $attrs: {
246
+ [x: string]: unknown;
247
+ };
248
+ $refs: {
249
+ [x: string]: unknown;
250
+ } & {
251
+ container: ({
252
+ $: import('vue').ComponentInternalInstance;
253
+ $data: {};
254
+ $props: {
255
+ readonly isOpen?: boolean | undefined;
256
+ readonly position?: import('@fiscozen/composables').FzFloatingPosition | undefined;
257
+ readonly container?: string | null | undefined;
258
+ readonly contentClass?: (string | string[] | Record<string, boolean | undefined> | Array<string | Record<string, boolean | undefined>>) | undefined;
259
+ readonly openerClass?: (string | string[] | Record<string, boolean | undefined> | Array<string | Record<string, boolean | undefined>>) | undefined;
260
+ readonly overrideContentClass?: boolean | undefined;
261
+ readonly overrideOpener?: import('vue').Ref<HTMLElement> | undefined;
262
+ readonly teleport?: boolean | undefined;
263
+ readonly useViewport?: boolean | undefined;
264
+ readonly "onFzfloating:setPosition"?: ((...args: any[]) => any) | undefined;
265
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
266
+ $attrs: {
267
+ [x: string]: unknown;
268
+ };
269
+ $refs: {
270
+ [x: string]: unknown;
271
+ } & {
272
+ opener: HTMLDivElement;
273
+ content: HTMLDivElement;
274
+ };
275
+ $slots: Readonly<{
276
+ [name: string]: import('vue').Slot<any> | undefined;
277
+ }>;
278
+ $root: import('vue').ComponentPublicInstance | null;
279
+ $parent: import('vue').ComponentPublicInstance | null;
280
+ $host: Element | null;
281
+ $emit: (event: "fzfloating:setPosition", ...args: any[]) => void;
282
+ $el: HTMLDivElement;
283
+ $options: import('vue').ComponentOptionsBase<Readonly<import('@fiscozen/composables').FzFloatingProps> & Readonly<{
284
+ "onFzfloating:setPosition"?: ((...args: any[]) => any) | undefined;
285
+ }>, {
286
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
287
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
288
+ "fzfloating:setPosition": (...args: any[]) => void;
289
+ }, string, {
290
+ position: import('@fiscozen/composables').FzFloatingPosition;
291
+ isOpen: boolean;
292
+ teleport: boolean;
293
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
294
+ beforeCreate?: (() => void) | (() => void)[];
295
+ created?: (() => void) | (() => void)[];
296
+ beforeMount?: (() => void) | (() => void)[];
297
+ mounted?: (() => void) | (() => void)[];
298
+ beforeUpdate?: (() => void) | (() => void)[];
299
+ updated?: (() => void) | (() => void)[];
300
+ activated?: (() => void) | (() => void)[];
301
+ deactivated?: (() => void) | (() => void)[];
302
+ beforeDestroy?: (() => void) | (() => void)[];
303
+ beforeUnmount?: (() => void) | (() => void)[];
304
+ destroyed?: (() => void) | (() => void)[];
305
+ unmounted?: (() => void) | (() => void)[];
306
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
307
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
308
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
309
+ };
310
+ $forceUpdate: () => void;
311
+ $nextTick: typeof import('vue').nextTick;
312
+ $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;
313
+ } & Readonly<{
314
+ position: import('@fiscozen/composables').FzFloatingPosition;
315
+ isOpen: boolean;
316
+ teleport: boolean;
317
+ }> & Omit<Readonly<import('@fiscozen/composables').FzFloatingProps> & Readonly<{
318
+ "onFzfloating:setPosition"?: ((...args: any[]) => any) | undefined;
319
+ }>, "setPosition" | ("position" | "isOpen" | "teleport")> & import('vue').ShallowUnwrapRef<{
320
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
321
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
322
+ $slots: {
323
+ 'opener-start'?(_: {}): any;
324
+ opener?(_: {
325
+ isOpen: boolean;
326
+ floating: {
327
+ float: import('@fiscozen/composables').FzRect;
328
+ rect: import('vue').Ref<DOMRect | undefined>;
329
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
330
+ position: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition>;
331
+ actualPosition?: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition | undefined>;
332
+ openerRect: import('vue').Ref<DOMRect | undefined>;
333
+ containerRect: import('vue').Ref<DOMRect | undefined>;
334
+ };
335
+ }): any;
336
+ 'opener-end'?(_: {}): any;
337
+ default?(_: {
338
+ isOpen: boolean;
339
+ floating: {
340
+ float: import('@fiscozen/composables').FzRect;
341
+ rect: import('vue').Ref<DOMRect | undefined>;
342
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
343
+ position: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition>;
344
+ actualPosition?: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition | undefined>;
345
+ openerRect: import('vue').Ref<DOMRect | undefined>;
346
+ containerRect: import('vue').Ref<DOMRect | undefined>;
347
+ };
348
+ }): any;
349
+ default?(_: {
350
+ isOpen: boolean;
351
+ floating: {
352
+ float: import('@fiscozen/composables').FzRect;
353
+ rect: import('vue').Ref<DOMRect | undefined>;
354
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
355
+ position: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition>;
356
+ actualPosition?: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition | undefined>;
357
+ openerRect: import('vue').Ref<DOMRect | undefined>;
358
+ containerRect: import('vue').Ref<DOMRect | undefined>;
359
+ };
360
+ }): any;
361
+ };
362
+ }) | null;
363
+ };
364
+ $slots: Readonly<{
365
+ [name: string]: import('vue').Slot<any> | undefined;
366
+ }>;
367
+ $root: import('vue').ComponentPublicInstance | null;
368
+ $parent: import('vue').ComponentPublicInstance | null;
369
+ $host: Element | null;
370
+ $emit: ((event: "fzaction:click", actionIndex: number, action: FzActionProps) => void) & ((event: "update:isOpen", value: boolean) => void);
371
+ $el: HTMLDivElement;
372
+ $options: import('vue').ComponentOptionsBase<Readonly<{
373
+ isOpen?: boolean;
374
+ } & import('./types').FzDropdownProps> & Readonly<{
375
+ "onFzaction:click"?: ((actionIndex: number, action: FzActionProps) => any) | undefined;
376
+ "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
377
+ }>, {
378
+ open: () => void;
379
+ close: () => void;
380
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
381
+ "fzaction:click": (actionIndex: number, action: FzActionProps) => any;
382
+ "update:isOpen": (value: boolean) => any;
383
+ }, string, {
384
+ environment: "frontoffice" | "backoffice";
385
+ teleport: boolean;
386
+ actions: (FzActionProps | (import('@fiscozen/action').FzActionSectionProps & {
387
+ type: "section";
388
+ }))[];
389
+ closeOnActionClick: boolean;
390
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
391
+ beforeCreate?: (() => void) | (() => void)[];
392
+ created?: (() => void) | (() => void)[];
393
+ beforeMount?: (() => void) | (() => void)[];
394
+ mounted?: (() => void) | (() => void)[];
395
+ beforeUpdate?: (() => void) | (() => void)[];
396
+ updated?: (() => void) | (() => void)[];
397
+ activated?: (() => void) | (() => void)[];
398
+ deactivated?: (() => void) | (() => void)[];
399
+ beforeDestroy?: (() => void) | (() => void)[];
400
+ beforeUnmount?: (() => void) | (() => void)[];
401
+ destroyed?: (() => void) | (() => void)[];
402
+ unmounted?: (() => void) | (() => void)[];
403
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
404
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
405
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
406
+ };
407
+ $forceUpdate: () => void;
408
+ $nextTick: typeof import('vue').nextTick;
409
+ $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;
410
+ } & Readonly<{
411
+ environment: "frontoffice" | "backoffice";
412
+ teleport: boolean;
413
+ actions: (FzActionProps | (import('@fiscozen/action').FzActionSectionProps & {
414
+ type: "section";
415
+ }))[];
416
+ closeOnActionClick: boolean;
417
+ }> & Omit<Readonly<{
418
+ isOpen?: boolean;
419
+ } & import('./types').FzDropdownProps> & Readonly<{
420
+ "onFzaction:click"?: ((actionIndex: number, action: FzActionProps) => any) | undefined;
421
+ "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
422
+ }>, "close" | "open" | ("environment" | "teleport" | "actions" | "closeOnActionClick")> & import('vue').ShallowUnwrapRef<{
423
+ open: () => void;
424
+ close: () => void;
425
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
426
+ $slots: Readonly<import('./types').FzDropdownSlots> & import('./types').FzDropdownSlots;
427
+ }) | null;
428
+ }, HTMLDivElement>;
429
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
33
430
  export default _default;
34
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
35
- type __VLS_TypePropsToRuntimeProps<T> = {
36
- [K in keyof T]-?: {} extends Pick<T, K> ? {
37
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
38
- } : {
39
- type: import('vue').PropType<T[K]>;
40
- required: true;
41
- };
42
- };
43
- type __VLS_WithDefaults<P, D> = {
44
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
45
- default: D[K];
46
- }> : P[K];
47
- };
48
- type __VLS_Prettify<T> = {
49
- [K in keyof T]: T[K];
50
- } & {};
51
431
  type __VLS_WithTemplateSlots<T, S> = T & {
52
432
  new (): {
53
433
  $slots: S;
@@ -1,7 +1,6 @@
1
1
  import { ButtonSize, IconButtonVariant, ButtonVariant } from '@fiscozen/button';
2
2
  import { FzActionProps, FzActionSectionProps } from '@fiscozen/action';
3
3
  import { VNode } from 'vue';
4
-
5
4
  type FzDropdownProps = {
6
5
  /**
7
6
  * @deprecated Use the environment prop instead
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@fiscozen/dropdown",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Design System Dropdown component",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
7
7
  "keywords": [],
8
8
  "author": "Alen Ajam",
9
9
  "dependencies": {
10
- "@fiscozen/button": "3.0.0",
11
- "@fiscozen/composables": "1.0.3",
12
- "@fiscozen/action": "3.0.0"
10
+ "@fiscozen/action": "3.0.1",
11
+ "@fiscozen/button": "3.0.1",
12
+ "@fiscozen/composables": "1.0.3"
13
13
  },
14
14
  "peerDependencies": {
15
15
  "tailwindcss": "^3.4.1",
@@ -19,21 +19,21 @@
19
19
  "@rushstack/eslint-patch": "^1.3.3",
20
20
  "@types/jsdom": "^21.1.6",
21
21
  "@types/node": "^18.19.3",
22
- "@vitejs/plugin-vue": "^4.5.2",
23
- "@vitest/coverage-v8": "^1.2.1",
22
+ "@vitejs/plugin-vue": "^6.0.5",
23
+ "@vitest/coverage-v8": "^4.1.1",
24
24
  "@vue/test-utils": "^2.4.3",
25
25
  "@vue/tsconfig": "^0.5.0",
26
- "vite-plugin-dts": "^3.8.3",
26
+ "vite-plugin-dts": "^4.5.0",
27
27
  "eslint": "^8.49.0",
28
28
  "jsdom": "^23.0.1",
29
29
  "prettier": "^3.0.3",
30
- "typescript": "~5.3.0",
31
- "vite": "^5.0.10",
32
- "vitest": "^1.2.0",
33
- "vue-tsc": "^1.8.25",
30
+ "typescript": "~5.7.0",
31
+ "vite": "^8.0.0",
32
+ "vitest": "^4.1.1",
33
+ "vue-tsc": "^2.2.12",
34
34
  "@fiscozen/eslint-config": "^0.1.0",
35
- "@fiscozen/prettier-config": "^0.1.0",
36
- "@fiscozen/tsconfig": "^0.1.0"
35
+ "@fiscozen/tsconfig": "^0.1.0",
36
+ "@fiscozen/prettier-config": "^0.1.0"
37
37
  },
38
38
  "license": "MIT",
39
39
  "scripts": {
@@ -6,20 +6,18 @@ import { FzAction } from '@fiscozen/action'
6
6
 
7
7
  describe('FzDropdown', () => {
8
8
  beforeEach(() => {
9
- const mockIntersectionObserver = vi.fn()
10
- mockIntersectionObserver.mockReturnValue({
11
- observe: () => null,
12
- unobserve: () => null,
13
- disconnect: () => null
9
+ window.IntersectionObserver = vi.fn().mockImplementation(function (this: any) {
10
+ this.observe = vi.fn()
11
+ this.unobserve = vi.fn()
12
+ this.disconnect = vi.fn()
14
13
  })
15
- window.IntersectionObserver = mockIntersectionObserver
16
14
 
17
15
  // Mock ResizeObserver for FzFloating component
18
- global.ResizeObserver = vi.fn().mockImplementation(() => ({
19
- observe: vi.fn(),
20
- unobserve: vi.fn(),
21
- disconnect: vi.fn()
22
- }))
16
+ global.ResizeObserver = vi.fn().mockImplementation(function (this: any) {
17
+ this.observe = vi.fn()
18
+ this.unobserve = vi.fn()
19
+ this.disconnect = vi.fn()
20
+ })
23
21
 
24
22
  // Mock matchMedia for useMediaQuery composable
25
23
  Object.defineProperty(window, 'matchMedia', {
@@ -1040,20 +1038,18 @@ describe('FzDropdown', () => {
1040
1038
 
1041
1039
  describe('FzIconDropdown', () => {
1042
1040
  beforeEach(() => {
1043
- const mockIntersectionObserver = vi.fn()
1044
- mockIntersectionObserver.mockReturnValue({
1045
- observe: () => null,
1046
- unobserve: () => null,
1047
- disconnect: () => null
1041
+ window.IntersectionObserver = vi.fn().mockImplementation(function (this: any) {
1042
+ this.observe = vi.fn()
1043
+ this.unobserve = vi.fn()
1044
+ this.disconnect = vi.fn()
1048
1045
  })
1049
- window.IntersectionObserver = mockIntersectionObserver
1050
1046
 
1051
1047
  // Mock ResizeObserver for FzFloating component
1052
- global.ResizeObserver = vi.fn().mockImplementation(() => ({
1053
- observe: vi.fn(),
1054
- unobserve: vi.fn(),
1055
- disconnect: vi.fn()
1056
- }))
1048
+ global.ResizeObserver = vi.fn().mockImplementation(function (this: any) {
1049
+ this.observe = vi.fn()
1050
+ this.unobserve = vi.fn()
1051
+ this.disconnect = vi.fn()
1052
+ })
1057
1053
 
1058
1054
  // Mock matchMedia for useMediaQuery composable
1059
1055
  Object.defineProperty(window, 'matchMedia', {