@fiscozen/dropdown 1.0.6 → 1.0.8

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.
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './src/index'
2
+ export {}
@@ -1,6 +1,7 @@
1
+ import { ComponentPublicInstance } from 'vue';
1
2
  import { FzActionProps } from '@fiscozen/action';
2
- import { FzDropdownSlots } from './types';
3
-
3
+ import { FzDropdownProps, FzDropdownSlots } from './types';
4
+ type __VLS_Props = FzDropdownProps;
4
5
  /**
5
6
  * @deprecated Use the isOpen model instead
6
7
  */
@@ -9,93 +10,260 @@ declare function open(): void;
9
10
  * @deprecated Use the isOpen model instead
10
11
  */
11
12
  declare function close(): void;
12
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
13
- isOpen: import('vue').PropType<boolean>;
14
- size: {
15
- type: import('vue').PropType<import('@fiscozen/button').ButtonSize>;
13
+ type __VLS_PublicProps = {
14
+ 'isOpen'?: boolean;
15
+ } & __VLS_Props;
16
+ declare function __VLS_template(): {
17
+ attrs: Partial<{}>;
18
+ slots: Readonly<FzDropdownSlots> & FzDropdownSlots;
19
+ refs: {
20
+ container: ({
21
+ $: import('vue').ComponentInternalInstance;
22
+ $data: {};
23
+ $props: {
24
+ readonly isOpen?: boolean | undefined;
25
+ readonly position?: import('@fiscozen/composables').FzFloatingPosition | undefined;
26
+ readonly container?: string | null | undefined;
27
+ readonly contentClass?: (string | string[] | Record<string, boolean | undefined> | Array<string | Record<string, boolean | undefined>>) | undefined;
28
+ readonly openerClass?: (string | string[] | Record<string, boolean | undefined> | Array<string | Record<string, boolean | undefined>>) | undefined;
29
+ readonly overrideContentClass?: boolean | undefined;
30
+ readonly overrideOpener?: import('vue').Ref<HTMLElement> | undefined;
31
+ readonly teleport?: boolean | undefined;
32
+ readonly useViewport?: boolean | undefined;
33
+ readonly "onFzfloating:setPosition"?: ((...args: any[]) => any) | undefined;
34
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
35
+ $attrs: {
36
+ [x: string]: unknown;
37
+ };
38
+ $refs: {
39
+ [x: string]: unknown;
40
+ } & {
41
+ opener: HTMLDivElement;
42
+ content: HTMLDivElement;
43
+ };
44
+ $slots: Readonly<{
45
+ [name: string]: import('vue').Slot<any> | undefined;
46
+ }>;
47
+ $root: ComponentPublicInstance | null;
48
+ $parent: ComponentPublicInstance | null;
49
+ $host: Element | null;
50
+ $emit: (event: "fzfloating:setPosition", ...args: any[]) => void;
51
+ $el: HTMLDivElement;
52
+ $options: import('vue').ComponentOptionsBase<Readonly<import('@fiscozen/composables').FzFloatingProps> & Readonly<{
53
+ "onFzfloating:setPosition"?: ((...args: any[]) => any) | undefined;
54
+ }>, {
55
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
56
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
57
+ "fzfloating:setPosition": (...args: any[]) => void;
58
+ }, string, {
59
+ position: import('@fiscozen/composables').FzFloatingPosition;
60
+ isOpen: boolean;
61
+ teleport: boolean;
62
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
63
+ beforeCreate?: (() => void) | (() => void)[];
64
+ created?: (() => void) | (() => void)[];
65
+ beforeMount?: (() => void) | (() => void)[];
66
+ mounted?: (() => void) | (() => void)[];
67
+ beforeUpdate?: (() => void) | (() => void)[];
68
+ updated?: (() => void) | (() => void)[];
69
+ activated?: (() => void) | (() => void)[];
70
+ deactivated?: (() => void) | (() => void)[];
71
+ beforeDestroy?: (() => void) | (() => void)[];
72
+ beforeUnmount?: (() => void) | (() => void)[];
73
+ destroyed?: (() => void) | (() => void)[];
74
+ unmounted?: (() => void) | (() => void)[];
75
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
76
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
77
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
78
+ };
79
+ $forceUpdate: () => void;
80
+ $nextTick: typeof import('vue').nextTick;
81
+ $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;
82
+ } & Readonly<{
83
+ position: import('@fiscozen/composables').FzFloatingPosition;
84
+ isOpen: boolean;
85
+ teleport: boolean;
86
+ }> & Omit<Readonly<import('@fiscozen/composables').FzFloatingProps> & Readonly<{
87
+ "onFzfloating:setPosition"?: ((...args: any[]) => any) | undefined;
88
+ }>, "setPosition" | ("position" | "isOpen" | "teleport")> & import('vue').ShallowUnwrapRef<{
89
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
90
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
91
+ $slots: {
92
+ 'opener-start'?(_: {}): any;
93
+ opener?(_: {
94
+ isOpen: boolean;
95
+ floating: {
96
+ float: import('@fiscozen/composables').FzRect;
97
+ rect: import('vue').Ref<DOMRect | undefined>;
98
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
99
+ position: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition>;
100
+ actualPosition?: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition | undefined>;
101
+ openerRect: import('vue').Ref<DOMRect | undefined>;
102
+ containerRect: import('vue').Ref<DOMRect | undefined>;
103
+ };
104
+ }): any;
105
+ 'opener-end'?(_: {}): any;
106
+ default?(_: {
107
+ isOpen: boolean;
108
+ floating: {
109
+ float: import('@fiscozen/composables').FzRect;
110
+ rect: import('vue').Ref<DOMRect | undefined>;
111
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
112
+ position: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition>;
113
+ actualPosition?: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition | undefined>;
114
+ openerRect: import('vue').Ref<DOMRect | undefined>;
115
+ containerRect: import('vue').Ref<DOMRect | undefined>;
116
+ };
117
+ }): 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
+ };
131
+ }) | null;
16
132
  };
17
- disabled: {
18
- type: import('vue').PropType<boolean>;
19
- };
20
- environment: {
21
- type: import('vue').PropType<"backoffice" | "frontoffice">;
22
- default: string;
23
- };
24
- listClass: {
25
- type: import('vue').PropType<string>;
26
- };
27
- teleport: {
28
- type: import('vue').PropType<boolean>;
29
- default: boolean;
30
- };
31
- buttonVariant: {
32
- type: import('vue').PropType<import('@fiscozen/button').ButtonVariant>;
33
- };
34
- actions: {
35
- type: import('vue').PropType<(FzActionProps | (import('@fiscozen/action').FzActionSectionProps & {
36
- type: "section";
37
- }))[]>;
38
- required: true;
39
- default: () => never[];
40
- };
41
- align: {
42
- type: import('vue').PropType<"right" | "left" | "center">;
43
- };
44
- closeOnActionClick: {
45
- type: import('vue').PropType<boolean>;
46
- default: boolean;
47
- };
48
- }>, {
133
+ rootEl: HTMLDivElement;
134
+ };
135
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
136
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
49
137
  open: typeof open;
50
138
  close: typeof close;
51
139
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
52
- "fzaction:click": (actionIndex: number, action: FzActionProps) => void;
53
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
54
- isOpen: import('vue').PropType<boolean>;
55
- size: {
56
- type: import('vue').PropType<import('@fiscozen/button').ButtonSize>;
57
- };
58
- disabled: {
59
- type: import('vue').PropType<boolean>;
60
- };
61
- environment: {
62
- type: import('vue').PropType<"backoffice" | "frontoffice">;
63
- default: string;
64
- };
65
- listClass: {
66
- type: import('vue').PropType<string>;
67
- };
68
- teleport: {
69
- type: import('vue').PropType<boolean>;
70
- default: boolean;
71
- };
72
- buttonVariant: {
73
- type: import('vue').PropType<import('@fiscozen/button').ButtonVariant>;
74
- };
75
- actions: {
76
- type: import('vue').PropType<(FzActionProps | (import('@fiscozen/action').FzActionSectionProps & {
77
- type: "section";
78
- }))[]>;
79
- required: true;
80
- default: () => never[];
81
- };
82
- align: {
83
- type: import('vue').PropType<"right" | "left" | "center">;
84
- };
85
- closeOnActionClick: {
86
- type: import('vue').PropType<boolean>;
87
- default: boolean;
88
- };
89
- }>> & Readonly<{
140
+ "fzaction:click": (actionIndex: number, action: FzActionProps) => any;
141
+ "update:isOpen": (value: boolean) => any;
142
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
90
143
  "onFzaction:click"?: ((actionIndex: number, action: FzActionProps) => any) | undefined;
144
+ "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
91
145
  }>, {
92
- environment: "backoffice" | "frontoffice";
146
+ environment: "frontoffice" | "backoffice";
93
147
  teleport: boolean;
94
148
  actions: (FzActionProps | (import('@fiscozen/action').FzActionSectionProps & {
95
149
  type: "section";
96
150
  }))[];
97
151
  closeOnActionClick: boolean;
98
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, Readonly<FzDropdownSlots> & FzDropdownSlots>;
152
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
153
+ container: ({
154
+ $: import('vue').ComponentInternalInstance;
155
+ $data: {};
156
+ $props: {
157
+ readonly isOpen?: boolean | undefined;
158
+ readonly position?: import('@fiscozen/composables').FzFloatingPosition | undefined;
159
+ readonly container?: string | null | undefined;
160
+ readonly contentClass?: (string | string[] | Record<string, boolean | undefined> | Array<string | Record<string, boolean | undefined>>) | undefined;
161
+ readonly openerClass?: (string | string[] | Record<string, boolean | undefined> | Array<string | Record<string, boolean | undefined>>) | undefined;
162
+ readonly overrideContentClass?: boolean | undefined;
163
+ readonly overrideOpener?: import('vue').Ref<HTMLElement> | undefined;
164
+ readonly teleport?: boolean | undefined;
165
+ readonly useViewport?: boolean | undefined;
166
+ readonly "onFzfloating:setPosition"?: ((...args: any[]) => any) | undefined;
167
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
168
+ $attrs: {
169
+ [x: string]: unknown;
170
+ };
171
+ $refs: {
172
+ [x: string]: unknown;
173
+ } & {
174
+ opener: HTMLDivElement;
175
+ content: HTMLDivElement;
176
+ };
177
+ $slots: Readonly<{
178
+ [name: string]: import('vue').Slot<any> | undefined;
179
+ }>;
180
+ $root: ComponentPublicInstance | null;
181
+ $parent: ComponentPublicInstance | null;
182
+ $host: Element | null;
183
+ $emit: (event: "fzfloating:setPosition", ...args: any[]) => void;
184
+ $el: HTMLDivElement;
185
+ $options: import('vue').ComponentOptionsBase<Readonly<import('@fiscozen/composables').FzFloatingProps> & Readonly<{
186
+ "onFzfloating:setPosition"?: ((...args: any[]) => any) | undefined;
187
+ }>, {
188
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
189
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
190
+ "fzfloating:setPosition": (...args: any[]) => void;
191
+ }, string, {
192
+ position: import('@fiscozen/composables').FzFloatingPosition;
193
+ isOpen: boolean;
194
+ teleport: boolean;
195
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
196
+ beforeCreate?: (() => void) | (() => void)[];
197
+ created?: (() => void) | (() => void)[];
198
+ beforeMount?: (() => void) | (() => void)[];
199
+ mounted?: (() => void) | (() => void)[];
200
+ beforeUpdate?: (() => void) | (() => void)[];
201
+ updated?: (() => void) | (() => void)[];
202
+ activated?: (() => void) | (() => void)[];
203
+ deactivated?: (() => void) | (() => void)[];
204
+ beforeDestroy?: (() => void) | (() => void)[];
205
+ beforeUnmount?: (() => void) | (() => void)[];
206
+ destroyed?: (() => void) | (() => void)[];
207
+ unmounted?: (() => void) | (() => void)[];
208
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
209
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
210
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
211
+ };
212
+ $forceUpdate: () => void;
213
+ $nextTick: typeof import('vue').nextTick;
214
+ $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;
215
+ } & Readonly<{
216
+ position: import('@fiscozen/composables').FzFloatingPosition;
217
+ isOpen: boolean;
218
+ teleport: boolean;
219
+ }> & Omit<Readonly<import('@fiscozen/composables').FzFloatingProps> & Readonly<{
220
+ "onFzfloating:setPosition"?: ((...args: any[]) => any) | undefined;
221
+ }>, "setPosition" | ("position" | "isOpen" | "teleport")> & import('vue').ShallowUnwrapRef<{
222
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
223
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
224
+ $slots: {
225
+ 'opener-start'?(_: {}): any;
226
+ opener?(_: {
227
+ isOpen: boolean;
228
+ floating: {
229
+ float: import('@fiscozen/composables').FzRect;
230
+ rect: import('vue').Ref<DOMRect | undefined>;
231
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
232
+ position: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition>;
233
+ actualPosition?: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition | undefined>;
234
+ openerRect: import('vue').Ref<DOMRect | undefined>;
235
+ containerRect: import('vue').Ref<DOMRect | undefined>;
236
+ };
237
+ }): any;
238
+ 'opener-end'?(_: {}): any;
239
+ default?(_: {
240
+ isOpen: boolean;
241
+ floating: {
242
+ float: import('@fiscozen/composables').FzRect;
243
+ rect: import('vue').Ref<DOMRect | undefined>;
244
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
245
+ position: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition>;
246
+ actualPosition?: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition | undefined>;
247
+ openerRect: import('vue').Ref<DOMRect | undefined>;
248
+ containerRect: import('vue').Ref<DOMRect | undefined>;
249
+ };
250
+ }): any;
251
+ default?(_: {
252
+ isOpen: boolean;
253
+ floating: {
254
+ float: import('@fiscozen/composables').FzRect;
255
+ rect: import('vue').Ref<DOMRect | undefined>;
256
+ setPosition: (ignoreCallback?: boolean) => Promise<void>;
257
+ position: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition>;
258
+ actualPosition?: import('vue').Ref<import('@fiscozen/composables').FzFloatingPosition | undefined>;
259
+ openerRect: import('vue').Ref<DOMRect | undefined>;
260
+ containerRect: import('vue').Ref<DOMRect | undefined>;
261
+ };
262
+ }): any;
263
+ };
264
+ }) | null;
265
+ }, HTMLDivElement>;
266
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
99
267
  export default _default;
100
268
  type __VLS_WithTemplateSlots<T, S> = T & {
101
269
  new (): {