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