@ulu/frontend-vue 0.6.23 → 0.6.25
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/components/collapsible/UluAccordion.vue.d.ts +4 -4
- package/dist/components/collapsible/UluCollapsible.vue.d.ts +2 -2
- package/dist/components/collapsible/UluModal.vue.d.ts +4 -4
- package/dist/components/collapsible/UluTabGroup.vue.d.ts +2 -2
- package/dist/components/elements/UluAlert.vue.d.ts +2 -2
- package/dist/components/elements/UluBadge.vue.d.ts +4 -4
- package/dist/components/elements/UluButton.vue.d.ts +10 -10
- package/dist/components/elements/UluButtonVerbose.vue.d.ts +4 -4
- package/dist/components/elements/UluCaptionedFigure.vue.d.ts +2 -2
- package/dist/components/elements/UluCard.vue.d.ts +4 -4
- package/dist/components/elements/UluList.vue.d.ts +2 -2
- package/dist/components/elements/UluSlider.vue.d.ts +2 -2
- package/dist/components/elements/UluTag.vue.d.ts +2 -2
- package/dist/components/forms/UluSearchForm.vue.d.ts +2 -2
- package/dist/components/layout/UluTitleRail.vue.d.ts +2 -2
- package/dist/components/systems/facets/UluFacetsList.vue.d.ts +2 -2
- package/dist/components/systems/facets/UluFacetsSearch.vue.d.ts +2 -2
- package/dist/components/systems/facets/UluFacetsSort.vue.d.ts +2 -2
- package/dist/components/utils/UluAction.vue.d.ts +2 -2
- package/dist/components/visualizations/UluProgressBar.vue.d.ts +2 -2
- package/dist/components/visualizations/UluProgressCircle.vue.d.ts +2 -2
- package/dist/composables/useUluFloating.d.ts.map +1 -1
- package/dist/composables/useUluFloating.js +26 -25
- package/dist/index.js +258 -240
- package/dist/mcp-data.json +2661 -1964
- package/dist/plugins/index.d.ts +2 -1
- package/dist/plugins/popovers/UluPopover.vue.d.ts +191 -8
- package/dist/plugins/popovers/UluPopover.vue.d.ts.map +1 -1
- package/dist/plugins/popovers/UluPopover.vue.js +90 -127
- package/dist/plugins/popovers/UluPopoverBase.vue.d.ts +58 -0
- package/dist/plugins/popovers/UluPopoverBase.vue.d.ts.map +1 -0
- package/dist/plugins/popovers/UluPopoverBase.vue.js +146 -0
- package/dist/plugins/popovers/UluTooltipPopover.vue.d.ts +1 -4
- package/dist/plugins/popovers/UluTooltipPopover.vue.d.ts.map +1 -1
- package/dist/plugins/popovers/UluTooltipPopover.vue.js +24 -45
- package/dist/plugins/popovers/index.d.ts +4 -0
- package/dist/plugins/popovers/index.d.ts.map +1 -1
- package/dist/plugins/popovers/index.js +54 -49
- package/dist/plugins/tour/UluTourContent.vue.d.ts +10 -0
- package/dist/plugins/tour/UluTourContent.vue.d.ts.map +1 -0
- package/dist/plugins/tour/UluTourContent.vue.js +39 -0
- package/dist/plugins/tour/UluTourDisplay.vue.d.ts +100 -0
- package/dist/plugins/tour/UluTourDisplay.vue.d.ts.map +1 -0
- package/dist/plugins/tour/UluTourDisplay.vue.js +133 -0
- package/dist/plugins/tour/UluTourPager.vue.d.ts +3 -0
- package/dist/plugins/tour/UluTourPager.vue.d.ts.map +1 -0
- package/dist/plugins/tour/UluTourPager.vue.js +31 -0
- package/dist/plugins/tour/api.d.ts +52 -0
- package/dist/plugins/tour/api.d.ts.map +1 -0
- package/dist/plugins/tour/api.js +52 -0
- package/dist/plugins/tour/index.d.ts +7 -0
- package/dist/plugins/tour/index.d.ts.map +1 -0
- package/dist/plugins/tour/index.js +14 -0
- package/dist/plugins/tour/useTour.d.ts +8 -0
- package/dist/plugins/tour/useTour.d.ts.map +1 -0
- package/dist/plugins/tour/useTour.js +8 -0
- package/lib/composables/useUluFloating.js +2 -0
- package/lib/plugins/index.js +3 -3
- package/lib/plugins/popovers/UluPopover.vue +61 -124
- package/lib/plugins/popovers/UluPopoverBase.vue +198 -0
- package/lib/plugins/popovers/UluTooltipPopover.vue +11 -33
- package/lib/plugins/popovers/index.js +15 -5
- package/lib/plugins/tour/UluTourContent.vue +37 -0
- package/lib/plugins/tour/UluTourDisplay.vue +182 -0
- package/lib/plugins/tour/UluTourPager.vue +36 -0
- package/lib/plugins/tour/api.js +83 -0
- package/lib/plugins/tour/index.js +29 -0
- package/lib/plugins/tour/useTour.js +10 -0
- package/package.json +1 -1
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as corePlugin } from './core/index.js';
|
|
2
2
|
export { default as breakpointsPlugin } from './breakpoints/index.js';
|
|
3
|
-
export { default as popoversPlugin, useTooltip, useTooltipFollow } from './popovers/index.js';
|
|
3
|
+
export { default as popoversPlugin, useTooltip, useTooltipFollow, UluPopover, UluPopoverBase, UluTooltipDisplay, UluTooltipPopover } from './popovers/index.js';
|
|
4
4
|
export { default as modalsPlugin, useModals } from './modals/index.js';
|
|
5
5
|
export { default as toastPlugin, useToast, UluToast, UluToastDisplay } from './toast/index.js';
|
|
6
|
+
export { default as tourPlugin, useTour, UluTourDisplay, UluTourPager, UluTourContent } from './tour/index.js';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -4,28 +4,47 @@ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
|
|
4
4
|
$slots: S;
|
|
5
5
|
});
|
|
6
6
|
declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* The reactive internal open/closed state of the popover
|
|
9
|
+
*/
|
|
10
|
+
isOpen: import('vue').WritableComputedRef<boolean, boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* Method to toggle the popover open/closed
|
|
13
|
+
*/
|
|
14
|
+
toggle: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Method to force the popover closed
|
|
17
|
+
*/
|
|
18
|
+
close: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Method to explicitly set the open state
|
|
21
|
+
* @param {Boolean} toOpen - The desired state
|
|
22
|
+
*/
|
|
23
|
+
changeTo: (toOpen: any) => void;
|
|
24
|
+
$emit: (event: "toggle" | "update:modelValue", ...args: any[]) => void;
|
|
25
|
+
clickOutsideCloses: boolean;
|
|
8
26
|
config: Record<string, any>;
|
|
9
27
|
disabled: boolean;
|
|
10
28
|
noPadding: boolean;
|
|
11
29
|
startOpen: boolean;
|
|
12
30
|
activeClass: string;
|
|
13
31
|
classes: Record<string, any>;
|
|
14
|
-
|
|
15
|
-
|
|
32
|
+
directFocus?: Function | undefined;
|
|
33
|
+
modelValue?: boolean | undefined;
|
|
16
34
|
triggerText?: string | undefined;
|
|
17
35
|
triggerAlt?: string | undefined;
|
|
18
36
|
tooltip?: string | undefined;
|
|
19
37
|
size?: string | undefined;
|
|
20
38
|
$props: {
|
|
39
|
+
readonly clickOutsideCloses?: boolean | undefined;
|
|
21
40
|
readonly config?: Record<string, any> | undefined;
|
|
22
41
|
readonly disabled?: boolean | undefined;
|
|
23
42
|
readonly noPadding?: boolean | undefined;
|
|
24
43
|
readonly startOpen?: boolean | undefined;
|
|
25
44
|
readonly activeClass?: string | undefined;
|
|
26
45
|
readonly classes?: Record<string, any> | undefined;
|
|
27
|
-
readonly clickOutsideCloses?: boolean | undefined;
|
|
28
46
|
readonly directFocus?: Function | undefined;
|
|
47
|
+
readonly modelValue?: boolean | undefined;
|
|
29
48
|
readonly triggerText?: string | undefined;
|
|
30
49
|
readonly triggerAlt?: string | undefined;
|
|
31
50
|
readonly tooltip?: string | undefined;
|
|
@@ -33,8 +52,101 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
|
33
52
|
};
|
|
34
53
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
35
54
|
trigger: HTMLButtonElement;
|
|
36
|
-
|
|
37
|
-
|
|
55
|
+
popoverBase: ({
|
|
56
|
+
$: import('vue').ComponentInternalInstance;
|
|
57
|
+
$data: {};
|
|
58
|
+
$props: Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>;
|
|
59
|
+
$attrs: {
|
|
60
|
+
[x: string]: unknown;
|
|
61
|
+
};
|
|
62
|
+
$refs: {
|
|
63
|
+
[x: string]: unknown;
|
|
64
|
+
} & {
|
|
65
|
+
contentEl: HTMLSpanElement;
|
|
66
|
+
contentArrow: HTMLSpanElement;
|
|
67
|
+
};
|
|
68
|
+
$slots: Readonly<{
|
|
69
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
70
|
+
}>;
|
|
71
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
72
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
73
|
+
$host: Element | null;
|
|
74
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
75
|
+
$el: HTMLSpanElement;
|
|
76
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
|
|
77
|
+
close: () => void;
|
|
78
|
+
update: Function;
|
|
79
|
+
content: import('vue').Ref<null, null>;
|
|
80
|
+
$emit: (event: "close" | "update:isOpen", ...args: any[]) => void;
|
|
81
|
+
isOpen: boolean;
|
|
82
|
+
clickOutsideCloses: boolean;
|
|
83
|
+
escapeCloses: boolean;
|
|
84
|
+
directFocus: Function;
|
|
85
|
+
trigger: Record<string, any>;
|
|
86
|
+
config: Record<string, any>;
|
|
87
|
+
modifiers?: string | Record<string, any> | unknown[] | undefined;
|
|
88
|
+
$props: {
|
|
89
|
+
readonly isOpen?: boolean | undefined;
|
|
90
|
+
readonly clickOutsideCloses?: boolean | undefined;
|
|
91
|
+
readonly escapeCloses?: boolean | undefined;
|
|
92
|
+
readonly directFocus?: Function | undefined;
|
|
93
|
+
readonly trigger?: Record<string, any> | undefined;
|
|
94
|
+
readonly config?: Record<string, any> | undefined;
|
|
95
|
+
readonly modifiers?: string | Record<string, any> | unknown[] | undefined;
|
|
96
|
+
};
|
|
97
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
98
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
99
|
+
created?: (() => void) | (() => void)[];
|
|
100
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
101
|
+
mounted?: (() => void) | (() => void)[];
|
|
102
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
103
|
+
updated?: (() => void) | (() => void)[];
|
|
104
|
+
activated?: (() => void) | (() => void)[];
|
|
105
|
+
deactivated?: (() => void) | (() => void)[];
|
|
106
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
107
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
108
|
+
destroyed?: (() => void) | (() => void)[];
|
|
109
|
+
unmounted?: (() => void) | (() => void)[];
|
|
110
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
111
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
112
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
113
|
+
};
|
|
114
|
+
$forceUpdate: () => void;
|
|
115
|
+
$nextTick: typeof import('vue').nextTick;
|
|
116
|
+
$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;
|
|
117
|
+
} & Readonly<{}> & Omit<Readonly<{}> & Readonly<{}>, "$props" | "$emit" | "isOpen" | "clickOutsideCloses" | "escapeCloses" | "directFocus" | "trigger" | "config" | "modifiers" | "content" | "close" | "update"> & import('vue').ShallowUnwrapRef<{
|
|
118
|
+
close: () => void;
|
|
119
|
+
update: Function;
|
|
120
|
+
content: import('vue').Ref<null, null>;
|
|
121
|
+
$emit: (event: "close" | "update:isOpen", ...args: any[]) => void;
|
|
122
|
+
isOpen: boolean;
|
|
123
|
+
clickOutsideCloses: boolean;
|
|
124
|
+
escapeCloses: boolean;
|
|
125
|
+
directFocus: Function;
|
|
126
|
+
trigger: Record<string, any>;
|
|
127
|
+
config: Record<string, any>;
|
|
128
|
+
modifiers?: string | Record<string, any> | unknown[] | undefined;
|
|
129
|
+
$props: {
|
|
130
|
+
readonly isOpen?: boolean | undefined;
|
|
131
|
+
readonly clickOutsideCloses?: boolean | undefined;
|
|
132
|
+
readonly escapeCloses?: boolean | undefined;
|
|
133
|
+
readonly directFocus?: Function | undefined;
|
|
134
|
+
readonly trigger?: Record<string, any> | undefined;
|
|
135
|
+
readonly config?: Record<string, any> | undefined;
|
|
136
|
+
readonly modifiers?: string | Record<string, any> | unknown[] | undefined;
|
|
137
|
+
};
|
|
138
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
139
|
+
$slots: {
|
|
140
|
+
default?(_: {
|
|
141
|
+
isOpen: boolean;
|
|
142
|
+
close: () => void;
|
|
143
|
+
}): any;
|
|
144
|
+
footer?(_: {
|
|
145
|
+
isOpen: boolean;
|
|
146
|
+
close: () => void;
|
|
147
|
+
}): any;
|
|
148
|
+
};
|
|
149
|
+
}) | null;
|
|
38
150
|
}, any>;
|
|
39
151
|
type __VLS_TemplateResult = {
|
|
40
152
|
attrs: Partial<{}>;
|
|
@@ -54,8 +166,79 @@ type __VLS_TemplateResult = {
|
|
|
54
166
|
};
|
|
55
167
|
refs: {
|
|
56
168
|
trigger: HTMLButtonElement;
|
|
57
|
-
|
|
58
|
-
|
|
169
|
+
popoverBase: ({
|
|
170
|
+
$: ComponentInternalInstance;
|
|
171
|
+
$data: {};
|
|
172
|
+
$props: Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>;
|
|
173
|
+
$attrs: Data;
|
|
174
|
+
$refs: Data & {
|
|
175
|
+
contentEl: HTMLSpanElement;
|
|
176
|
+
contentArrow: HTMLSpanElement;
|
|
177
|
+
};
|
|
178
|
+
$slots: Readonly<InternalSlots>;
|
|
179
|
+
$root: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null;
|
|
180
|
+
$parent: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null;
|
|
181
|
+
$host: Element | null;
|
|
182
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
183
|
+
$el: HTMLSpanElement;
|
|
184
|
+
$options: ComponentOptionsBase<ToResolvedProps<{}, {}>, {
|
|
185
|
+
close: () => void;
|
|
186
|
+
update: Function;
|
|
187
|
+
content: Ref<null, null>;
|
|
188
|
+
$emit: (event: "close" | "update:isOpen", ...args: any[]) => void;
|
|
189
|
+
isOpen: boolean;
|
|
190
|
+
clickOutsideCloses: boolean;
|
|
191
|
+
escapeCloses: boolean;
|
|
192
|
+
directFocus: Function;
|
|
193
|
+
trigger: Record<string, any>;
|
|
194
|
+
config: Record<string, any>;
|
|
195
|
+
modifiers?: string | Record<string, any> | unknown[] | undefined;
|
|
196
|
+
$props: {
|
|
197
|
+
readonly isOpen?: boolean | undefined;
|
|
198
|
+
readonly clickOutsideCloses?: boolean | undefined;
|
|
199
|
+
readonly escapeCloses?: boolean | undefined;
|
|
200
|
+
readonly directFocus?: Function | undefined;
|
|
201
|
+
readonly trigger?: Record<string, any> | undefined;
|
|
202
|
+
readonly config?: Record<string, any> | undefined;
|
|
203
|
+
readonly modifiers?: string | Record<string, any> | unknown[] | undefined;
|
|
204
|
+
};
|
|
205
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & MergedComponentOptionsOverride;
|
|
206
|
+
$forceUpdate: () => void;
|
|
207
|
+
$nextTick: typeof nextTick;
|
|
208
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R, args_2: OnCleanup) => any : (args_0: any, args_1: any, args_2: OnCleanup) => any, options?: WatchOptions<boolean> | undefined): WatchStopHandle;
|
|
209
|
+
} & Readonly<{}> & Omit<Readonly<{}> & Readonly<{}>, "$props" | "$emit" | "isOpen" | "clickOutsideCloses" | "escapeCloses" | "directFocus" | "trigger" | "config" | "modifiers" | "content" | "close" | "update"> & ShallowUnwrapRef<{
|
|
210
|
+
close: () => void;
|
|
211
|
+
update: Function;
|
|
212
|
+
content: Ref<null, null>;
|
|
213
|
+
$emit: (event: "close" | "update:isOpen", ...args: any[]) => void;
|
|
214
|
+
isOpen: boolean;
|
|
215
|
+
clickOutsideCloses: boolean;
|
|
216
|
+
escapeCloses: boolean;
|
|
217
|
+
directFocus: Function;
|
|
218
|
+
trigger: Record<string, any>;
|
|
219
|
+
config: Record<string, any>;
|
|
220
|
+
modifiers?: string | Record<string, any> | unknown[] | undefined;
|
|
221
|
+
$props: {
|
|
222
|
+
readonly isOpen?: boolean | undefined;
|
|
223
|
+
readonly clickOutsideCloses?: boolean | undefined;
|
|
224
|
+
readonly escapeCloses?: boolean | undefined;
|
|
225
|
+
readonly directFocus?: Function | undefined;
|
|
226
|
+
readonly trigger?: Record<string, any> | undefined;
|
|
227
|
+
readonly config?: Record<string, any> | undefined;
|
|
228
|
+
readonly modifiers?: string | Record<string, any> | unknown[] | undefined;
|
|
229
|
+
};
|
|
230
|
+
}> & ExtractComputedReturns<{}> & ComponentCustomProperties & {} & {
|
|
231
|
+
$slots: {
|
|
232
|
+
default?(_: {
|
|
233
|
+
isOpen: boolean;
|
|
234
|
+
close: () => void;
|
|
235
|
+
}): any;
|
|
236
|
+
footer?(_: {
|
|
237
|
+
isOpen: boolean;
|
|
238
|
+
close: () => void;
|
|
239
|
+
}): any;
|
|
240
|
+
};
|
|
241
|
+
}) | null;
|
|
59
242
|
};
|
|
60
243
|
rootEl: any;
|
|
61
244
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UluPopover.vue.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/UluPopover.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UluPopover.vue.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/UluPopover.vue"],"names":[],"mappings":"AA8CA;wBAmaqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAbjC;IAhLI;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAoLy8c,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QATnkd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAS68c,GAAG"}
|
|
@@ -1,184 +1,147 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { useRequiredInject as
|
|
3
|
-
import { POPOVER_OPTIONS_KEY as
|
|
4
|
-
import
|
|
5
|
-
import { newId as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "popover__footer"
|
|
10
|
-
}, ie = {
|
|
1
|
+
import { computed as O, ref as r, resolveDirective as I, createElementBlock as b, openBlock as y, Fragment as T, withDirectives as j, createVNode as z, unref as a, normalizeClass as C, renderSlot as d, createTextVNode as h, toDisplayString as w, createSlots as D, withCtx as k } from "vue";
|
|
2
|
+
import { useRequiredInject as E } from "../../composables/useRequiredInject.js";
|
|
3
|
+
import { POPOVER_OPTIONS_KEY as N } from "./index.js";
|
|
4
|
+
import A from "./defaults.js";
|
|
5
|
+
import { newId as B } from "../../utils/dom.js";
|
|
6
|
+
import R from "./UluPopoverBase.vue.js";
|
|
7
|
+
const q = ["id", "disabled", "aria-expanded", "aria-controls", "aria-label"], M = {
|
|
11
8
|
__name: "UluPopover",
|
|
12
9
|
props: {
|
|
13
10
|
/**
|
|
14
|
-
*
|
|
11
|
+
* V-model state to control the popover externally
|
|
15
12
|
*/
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
16
17
|
triggerText: String,
|
|
17
|
-
/**
|
|
18
|
-
* Add optional aria-label to button for icons/etc
|
|
19
|
-
*/
|
|
20
18
|
triggerAlt: String,
|
|
21
|
-
/**
|
|
22
|
-
* Disable trigger button
|
|
23
|
-
*/
|
|
24
19
|
disabled: Boolean,
|
|
25
|
-
/**
|
|
26
|
-
* Tooltip text for trigger button
|
|
27
|
-
*/
|
|
28
20
|
tooltip: String,
|
|
29
|
-
/**
|
|
30
|
-
* Popover size (ie large, etc)
|
|
31
|
-
*/
|
|
32
21
|
size: String,
|
|
33
|
-
/**
|
|
34
|
-
* No padding on popover content
|
|
35
|
-
*/
|
|
36
22
|
noPadding: Boolean,
|
|
37
|
-
/**
|
|
38
|
-
* Floating UI config (merged with defaults for popover)
|
|
39
|
-
* - See useUluFloating() composable for config API
|
|
40
|
-
*/
|
|
41
23
|
config: {
|
|
42
24
|
type: Object,
|
|
43
25
|
default: () => ({})
|
|
44
26
|
},
|
|
45
|
-
/**
|
|
46
|
-
* Mount this component already open state
|
|
47
|
-
*/
|
|
48
27
|
startOpen: Boolean,
|
|
49
|
-
/**
|
|
50
|
-
* Active class for trigger button
|
|
51
|
-
*/
|
|
52
28
|
activeClass: {
|
|
53
29
|
type: String,
|
|
54
30
|
default: "is-active"
|
|
55
31
|
},
|
|
56
|
-
/**
|
|
57
|
-
* Add custom classes to specific elements
|
|
58
|
-
* { trigger, content }
|
|
59
|
-
*/
|
|
60
32
|
classes: {
|
|
61
33
|
type: Object,
|
|
62
34
|
default: () => ({})
|
|
63
35
|
},
|
|
64
|
-
/**
|
|
65
|
-
* Close popover when click is outside
|
|
66
|
-
*/
|
|
67
36
|
clickOutsideCloses: {
|
|
68
37
|
type: Boolean,
|
|
69
38
|
default: !0
|
|
70
39
|
},
|
|
71
40
|
/**
|
|
72
|
-
* Direct focus when open/closing popover
|
|
41
|
+
* Direct focus when open/closing popover.
|
|
42
|
+
* Overrides UluPopoverBase's default focus management.
|
|
73
43
|
*/
|
|
74
|
-
directFocus:
|
|
75
|
-
type: Function,
|
|
76
|
-
default: ({ isOpen: e, content: g }) => {
|
|
77
|
-
e && g.focus({ preventScroll: !0 });
|
|
78
|
-
}
|
|
79
|
-
}
|
|
44
|
+
directFocus: Function
|
|
80
45
|
},
|
|
81
|
-
emits: ["toggle"],
|
|
82
|
-
setup(e, { emit:
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
o.value =
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
return
|
|
116
|
-
|
|
46
|
+
emits: ["toggle", "update:modelValue"],
|
|
47
|
+
setup(e, { expose: S, emit: V }) {
|
|
48
|
+
const c = V, l = e, u = B(), g = B(), f = E(N), $ = f ? f.popover : A.popover, F = O(() => ({ ...$, ...l.config })), m = r(l.startOpen || !1), p = r(null), P = r(null), o = O({
|
|
49
|
+
get() {
|
|
50
|
+
return l.modelValue !== void 0 ? l.modelValue : m.value;
|
|
51
|
+
},
|
|
52
|
+
set(t) {
|
|
53
|
+
l.modelValue !== void 0 ? c("update:modelValue", t) : m.value = t;
|
|
54
|
+
}
|
|
55
|
+
}), n = () => {
|
|
56
|
+
i(!o.value);
|
|
57
|
+
}, i = (t) => {
|
|
58
|
+
o.value = t, c("toggle", { isOpen: t });
|
|
59
|
+
}, s = () => i(!1);
|
|
60
|
+
return S({
|
|
61
|
+
/**
|
|
62
|
+
* The reactive internal open/closed state of the popover
|
|
63
|
+
*/
|
|
64
|
+
isOpen: o,
|
|
65
|
+
/**
|
|
66
|
+
* Method to toggle the popover open/closed
|
|
67
|
+
*/
|
|
68
|
+
toggle: n,
|
|
69
|
+
/**
|
|
70
|
+
* Method to force the popover closed
|
|
71
|
+
*/
|
|
72
|
+
close: s,
|
|
73
|
+
/**
|
|
74
|
+
* Method to explicitly set the open state
|
|
75
|
+
* @param {Boolean} toOpen - The desired state
|
|
76
|
+
*/
|
|
77
|
+
changeTo: i
|
|
78
|
+
}), (t, v) => {
|
|
79
|
+
const x = I("ulu-tooltip");
|
|
80
|
+
return y(), b(T, null, [
|
|
81
|
+
j((y(), b("button", {
|
|
117
82
|
type: "button",
|
|
118
83
|
ref_key: "trigger",
|
|
119
84
|
ref: p,
|
|
120
|
-
onClick:
|
|
121
|
-
id:
|
|
85
|
+
onClick: n,
|
|
86
|
+
id: a(g),
|
|
122
87
|
disabled: e.disabled,
|
|
123
|
-
class:
|
|
88
|
+
class: C([
|
|
124
89
|
{ [e.activeClass]: o.value },
|
|
125
90
|
e.classes.trigger
|
|
126
91
|
]),
|
|
127
92
|
"aria-expanded": o.value ? "true" : "false",
|
|
128
|
-
"aria-controls":
|
|
93
|
+
"aria-controls": a(u),
|
|
129
94
|
"aria-label": e.triggerAlt
|
|
130
95
|
}, [
|
|
131
|
-
|
|
96
|
+
d(t.$slots, "trigger", {
|
|
132
97
|
isOpen: o.value,
|
|
133
|
-
close:
|
|
98
|
+
close: s
|
|
134
99
|
}, () => [
|
|
135
|
-
|
|
100
|
+
h(w(e.triggerText), 1)
|
|
136
101
|
])
|
|
137
|
-
], 10,
|
|
138
|
-
[
|
|
102
|
+
], 10, q)), [
|
|
103
|
+
[x, e.tooltip ? e.tooltip : null]
|
|
139
104
|
]),
|
|
140
|
-
|
|
141
|
-
|
|
105
|
+
z(R, {
|
|
106
|
+
ref_key: "popoverBase",
|
|
107
|
+
ref: P,
|
|
108
|
+
trigger: p.value,
|
|
109
|
+
config: F.value,
|
|
110
|
+
isOpen: o.value,
|
|
111
|
+
clickOutsideCloses: e.clickOutsideCloses,
|
|
112
|
+
directFocus: e.directFocus,
|
|
113
|
+
class: C([
|
|
142
114
|
e.size ? `popover--${e.size}` : "",
|
|
143
115
|
{
|
|
144
|
-
"popover--no-padding": e.noPadding
|
|
145
|
-
"popover--fixed": t(I),
|
|
146
|
-
"is-active": o.value
|
|
116
|
+
"popover--no-padding": e.noPadding
|
|
147
117
|
},
|
|
148
118
|
e.classes.content
|
|
149
|
-
]
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
onKeydown: n[0] || (n[0] = q((_) => a(!1), ["esc"])),
|
|
157
|
-
tabindex: "-1"
|
|
158
|
-
}, [
|
|
159
|
-
x("span", X, [
|
|
160
|
-
m(l.$slots, "default", {
|
|
119
|
+
]),
|
|
120
|
+
"aria-labelledby": a(g),
|
|
121
|
+
id: a(u),
|
|
122
|
+
onClose: v[0] || (v[0] = (K) => i(!1))
|
|
123
|
+
}, D({
|
|
124
|
+
default: k(() => [
|
|
125
|
+
d(t.$slots, "default", {
|
|
161
126
|
isOpen: o.value,
|
|
162
|
-
toggle:
|
|
163
|
-
close:
|
|
127
|
+
toggle: n,
|
|
128
|
+
close: s
|
|
164
129
|
})
|
|
165
130
|
]),
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}, null, 4)) : h("", !0)
|
|
177
|
-
], 46, W)
|
|
131
|
+
_: 2
|
|
132
|
+
}, [
|
|
133
|
+
t.$slots.footer ? {
|
|
134
|
+
name: "footer",
|
|
135
|
+
fn: k(() => [
|
|
136
|
+
d(t.$slots, "footer", { close: s })
|
|
137
|
+
]),
|
|
138
|
+
key: "0"
|
|
139
|
+
} : void 0
|
|
140
|
+
]), 1032, ["trigger", "config", "isOpen", "clickOutsideCloses", "directFocus", "class", "aria-labelledby", "id"])
|
|
178
141
|
], 64);
|
|
179
142
|
};
|
|
180
143
|
}
|
|
181
144
|
};
|
|
182
145
|
export {
|
|
183
|
-
|
|
146
|
+
M as default
|
|
184
147
|
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
7
|
+
/**
|
|
8
|
+
* Emits the close event
|
|
9
|
+
*/
|
|
10
|
+
close: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Manually trigger a floating UI position update
|
|
13
|
+
*/
|
|
14
|
+
update: Function;
|
|
15
|
+
/**
|
|
16
|
+
* The internal root popover element reference
|
|
17
|
+
*/
|
|
18
|
+
content: import('vue').Ref<null, null>;
|
|
19
|
+
$emit: (event: "close" | "update:isOpen", ...args: any[]) => void;
|
|
20
|
+
isOpen: boolean;
|
|
21
|
+
clickOutsideCloses: boolean;
|
|
22
|
+
escapeCloses: boolean;
|
|
23
|
+
directFocus: Function;
|
|
24
|
+
trigger: Record<string, any>;
|
|
25
|
+
config: Record<string, any>;
|
|
26
|
+
modifiers?: string | Record<string, any> | unknown[] | undefined;
|
|
27
|
+
$props: {
|
|
28
|
+
readonly isOpen?: boolean | undefined;
|
|
29
|
+
readonly clickOutsideCloses?: boolean | undefined;
|
|
30
|
+
readonly escapeCloses?: boolean | undefined;
|
|
31
|
+
readonly directFocus?: Function | undefined;
|
|
32
|
+
readonly trigger?: Record<string, any> | undefined;
|
|
33
|
+
readonly config?: Record<string, any> | undefined;
|
|
34
|
+
readonly modifiers?: string | Record<string, any> | unknown[] | undefined;
|
|
35
|
+
};
|
|
36
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
37
|
+
contentEl: HTMLSpanElement;
|
|
38
|
+
contentArrow: HTMLSpanElement;
|
|
39
|
+
}, HTMLSpanElement>;
|
|
40
|
+
type __VLS_TemplateResult = {
|
|
41
|
+
attrs: Partial<{}>;
|
|
42
|
+
slots: {
|
|
43
|
+
default?(_: {
|
|
44
|
+
isOpen: boolean;
|
|
45
|
+
close: () => void;
|
|
46
|
+
}): any;
|
|
47
|
+
footer?(_: {
|
|
48
|
+
isOpen: boolean;
|
|
49
|
+
close: () => void;
|
|
50
|
+
}): any;
|
|
51
|
+
};
|
|
52
|
+
refs: {
|
|
53
|
+
contentEl: HTMLSpanElement;
|
|
54
|
+
contentArrow: HTMLSpanElement;
|
|
55
|
+
};
|
|
56
|
+
rootEl: HTMLSpanElement;
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=UluPopoverBase.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UluPopoverBase.vue.d.ts","sourceRoot":"","sources":["../../../lib/plugins/popovers/UluPopoverBase.vue"],"names":[],"mappings":"AA+BA;wBAoeqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAdjC;IAzHI;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;;oBA0HJ"}
|