@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.
Files changed (69) hide show
  1. package/dist/components/collapsible/UluAccordion.vue.d.ts +4 -4
  2. package/dist/components/collapsible/UluCollapsible.vue.d.ts +2 -2
  3. package/dist/components/collapsible/UluModal.vue.d.ts +4 -4
  4. package/dist/components/collapsible/UluTabGroup.vue.d.ts +2 -2
  5. package/dist/components/elements/UluAlert.vue.d.ts +2 -2
  6. package/dist/components/elements/UluBadge.vue.d.ts +4 -4
  7. package/dist/components/elements/UluButton.vue.d.ts +10 -10
  8. package/dist/components/elements/UluButtonVerbose.vue.d.ts +4 -4
  9. package/dist/components/elements/UluCaptionedFigure.vue.d.ts +2 -2
  10. package/dist/components/elements/UluCard.vue.d.ts +4 -4
  11. package/dist/components/elements/UluList.vue.d.ts +2 -2
  12. package/dist/components/elements/UluSlider.vue.d.ts +2 -2
  13. package/dist/components/elements/UluTag.vue.d.ts +2 -2
  14. package/dist/components/forms/UluSearchForm.vue.d.ts +2 -2
  15. package/dist/components/layout/UluTitleRail.vue.d.ts +2 -2
  16. package/dist/components/systems/facets/UluFacetsList.vue.d.ts +2 -2
  17. package/dist/components/systems/facets/UluFacetsSearch.vue.d.ts +2 -2
  18. package/dist/components/systems/facets/UluFacetsSort.vue.d.ts +2 -2
  19. package/dist/components/utils/UluAction.vue.d.ts +2 -2
  20. package/dist/components/visualizations/UluProgressBar.vue.d.ts +2 -2
  21. package/dist/components/visualizations/UluProgressCircle.vue.d.ts +2 -2
  22. package/dist/composables/useUluFloating.d.ts.map +1 -1
  23. package/dist/composables/useUluFloating.js +26 -25
  24. package/dist/index.js +258 -240
  25. package/dist/mcp-data.json +2661 -1964
  26. package/dist/plugins/index.d.ts +2 -1
  27. package/dist/plugins/popovers/UluPopover.vue.d.ts +191 -8
  28. package/dist/plugins/popovers/UluPopover.vue.d.ts.map +1 -1
  29. package/dist/plugins/popovers/UluPopover.vue.js +90 -127
  30. package/dist/plugins/popovers/UluPopoverBase.vue.d.ts +58 -0
  31. package/dist/plugins/popovers/UluPopoverBase.vue.d.ts.map +1 -0
  32. package/dist/plugins/popovers/UluPopoverBase.vue.js +146 -0
  33. package/dist/plugins/popovers/UluTooltipPopover.vue.d.ts +1 -4
  34. package/dist/plugins/popovers/UluTooltipPopover.vue.d.ts.map +1 -1
  35. package/dist/plugins/popovers/UluTooltipPopover.vue.js +24 -45
  36. package/dist/plugins/popovers/index.d.ts +4 -0
  37. package/dist/plugins/popovers/index.d.ts.map +1 -1
  38. package/dist/plugins/popovers/index.js +54 -49
  39. package/dist/plugins/tour/UluTourContent.vue.d.ts +10 -0
  40. package/dist/plugins/tour/UluTourContent.vue.d.ts.map +1 -0
  41. package/dist/plugins/tour/UluTourContent.vue.js +39 -0
  42. package/dist/plugins/tour/UluTourDisplay.vue.d.ts +100 -0
  43. package/dist/plugins/tour/UluTourDisplay.vue.d.ts.map +1 -0
  44. package/dist/plugins/tour/UluTourDisplay.vue.js +133 -0
  45. package/dist/plugins/tour/UluTourPager.vue.d.ts +3 -0
  46. package/dist/plugins/tour/UluTourPager.vue.d.ts.map +1 -0
  47. package/dist/plugins/tour/UluTourPager.vue.js +31 -0
  48. package/dist/plugins/tour/api.d.ts +52 -0
  49. package/dist/plugins/tour/api.d.ts.map +1 -0
  50. package/dist/plugins/tour/api.js +52 -0
  51. package/dist/plugins/tour/index.d.ts +7 -0
  52. package/dist/plugins/tour/index.d.ts.map +1 -0
  53. package/dist/plugins/tour/index.js +14 -0
  54. package/dist/plugins/tour/useTour.d.ts +8 -0
  55. package/dist/plugins/tour/useTour.d.ts.map +1 -0
  56. package/dist/plugins/tour/useTour.js +8 -0
  57. package/lib/composables/useUluFloating.js +2 -0
  58. package/lib/plugins/index.js +3 -3
  59. package/lib/plugins/popovers/UluPopover.vue +61 -124
  60. package/lib/plugins/popovers/UluPopoverBase.vue +198 -0
  61. package/lib/plugins/popovers/UluTooltipPopover.vue +11 -33
  62. package/lib/plugins/popovers/index.js +15 -5
  63. package/lib/plugins/tour/UluTourContent.vue +37 -0
  64. package/lib/plugins/tour/UluTourDisplay.vue +182 -0
  65. package/lib/plugins/tour/UluTourPager.vue +36 -0
  66. package/lib/plugins/tour/api.js +83 -0
  67. package/lib/plugins/tour/index.js +29 -0
  68. package/lib/plugins/tour/useTour.js +10 -0
  69. package/package.json +1 -1
@@ -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
- $emit: (event: "toggle", ...args: any[]) => void;
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
- clickOutsideCloses: boolean;
15
- directFocus: Function;
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
- content: HTMLSpanElement;
37
- contentArrow: HTMLSpanElement;
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
- content: HTMLSpanElement;
58
- contentArrow: HTMLSpanElement;
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":"AAuDA;wBAwfqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAZjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QASG"}
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 V, ref as v, resolveDirective as D, createElementBlock as d, openBlock as u, Fragment as K, withDirectives as L, createElementVNode as x, unref as t, normalizeClass as F, renderSlot as m, createTextVNode as R, toDisplayString as U, withKeys as q, normalizeStyle as T, createCommentVNode as h, nextTick as H } from "vue";
2
- import { useRequiredInject as Y } from "../../composables/useRequiredInject.js";
3
- import { POPOVER_OPTIONS_KEY as G } from "./index.js";
4
- import J from "./defaults.js";
5
- import { newId as A } from "../../utils/dom.js";
6
- import { useUluFloating as M } from "../../composables/useUluFloating.js";
7
- const Q = ["id", "disabled", "aria-expanded", "aria-controls", "aria-label"], W = ["aria-labelledby", "id", "data-placement"], X = { class: "popover__inner" }, Z = {
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
- * Text for popover button
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: g }) {
83
- const y = g, i = e, O = A(), b = A(), k = Y(G), B = k ? k.popover : J.popover, S = V(() => ({ ...B, ...i.config })), o = v(i.startOpen || !1), p = v(null), r = v(null), {
84
- floatingStyles: E,
85
- placement: P,
86
- update: $,
87
- arrowStyles: z,
88
- contentArrow: j,
89
- isFixedStrategy: I
90
- } = M(p, r, S), w = () => {
91
- a(!o.value);
92
- }, a = (l) => {
93
- o.value = l;
94
- const n = {
95
- trigger: t(p),
96
- content: t(r),
97
- isOpen: t(o)
98
- }, c = { isOpen: n.isOpen };
99
- H(() => {
100
- o.value ? ($(), window.setTimeout(() => {
101
- N(), i.directFocus(n), y("toggle", c);
102
- }, 0)) : (C(), i.directFocus(n), y("toggle", c));
103
- });
104
- };
105
- let s;
106
- const N = () => {
107
- i.clickOutsideCloses && (s && C(), s = (l) => {
108
- r.value && !r.value.contains(l.target) && a(!1);
109
- }, document.addEventListener("click", s));
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", {
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: w,
121
- id: t(b),
85
+ onClick: n,
86
+ id: a(g),
122
87
  disabled: e.disabled,
123
- class: F([
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": t(O),
93
+ "aria-controls": a(u),
129
94
  "aria-label": e.triggerAlt
130
95
  }, [
131
- m(l.$slots, "trigger", {
96
+ d(t.$slots, "trigger", {
132
97
  isOpen: o.value,
133
- close: f
98
+ close: s
134
99
  }, () => [
135
- R(U(e.triggerText), 1)
100
+ h(w(e.triggerText), 1)
136
101
  ])
137
- ], 10, Q)), [
138
- [c, e.tooltip ? e.tooltip : null]
102
+ ], 10, q)), [
103
+ [x, e.tooltip ? e.tooltip : null]
139
104
  ]),
140
- x("span", {
141
- class: F(["popover", [
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
- ref_key: "content",
151
- ref: r,
152
- "aria-labelledby": t(b),
153
- id: t(O),
154
- style: T(t(E)),
155
- "data-placement": t(P),
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: w,
163
- close: f
127
+ toggle: n,
128
+ close: s
164
129
  })
165
130
  ]),
166
- l.$slots.footer ? (u(), d("span", Z, [
167
- m(l.$slots, "footer", { close: f })
168
- ])) : h("", !0),
169
- S.value.arrow ? (u(), d("span", {
170
- key: 1,
171
- class: "popover__arrow",
172
- ref_key: "contentArrow",
173
- ref: j,
174
- style: T(t(z)),
175
- "data-ulu-popover-arrow": ""
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
- ie as default
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"}