@frollo/frollo-web-ui 9.0.1 → 9.0.2

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 (96) hide show
  1. package/cjs/index.js +10733 -3060
  2. package/esm/{_rollupPluginBabelHelpers-DODWUb5N.js → _rollupPluginBabelHelpers-BKlDnZ7n.js} +1 -1
  3. package/esm/fw-accordion.js +15 -18
  4. package/esm/fw-alert.js +32 -25
  5. package/esm/fw-bar-chart.js +265 -93
  6. package/esm/fw-button-DZTHZLjk.js +318 -0
  7. package/esm/fw-button.js +2 -2
  8. package/esm/{fw-card-D45R4kN-.js → fw-card-XGtsK2bM.js} +7 -10
  9. package/esm/fw-card.js +2 -2
  10. package/esm/fw-checkbox.js +8 -11
  11. package/esm/fw-date-picker.js +85 -49
  12. package/esm/fw-drawer.js +8 -8
  13. package/esm/{fw-dropdown-58wyuzsW.js → fw-dropdown-CSmYTm5O.js} +11 -14
  14. package/esm/fw-dropdown.js +7 -6
  15. package/esm/fw-form.js +1 -1
  16. package/esm/fw-icons.js +11 -12
  17. package/esm/fw-image-A2lXYs0u.js +325 -0
  18. package/esm/fw-image.js +5 -4
  19. package/esm/{fw-input-C2-cZ-BY.js → fw-input-BiPWWfK3.js} +12 -19
  20. package/esm/fw-input.js +3 -3
  21. package/esm/fw-loading-bar-3x4tkF1B.js +37 -0
  22. package/esm/fw-loading.js +89 -40
  23. package/esm/fw-media-picker.js +10 -653
  24. package/esm/fw-modal.js +11 -10
  25. package/esm/fw-navigation-menu.js +36 -41
  26. package/esm/fw-popover-BZ-zqUme.js +330 -0
  27. package/esm/fw-popover.js +2 -3
  28. package/esm/fw-progress-bar.js +1 -1
  29. package/esm/fw-provider-list.js +109 -87
  30. package/esm/fw-sidebar-menu.js +58 -51
  31. package/esm/fw-slider.js +64 -61
  32. package/esm/fw-switch.js +76 -49
  33. package/esm/fw-table-row-D6FdCJMs.js +447 -0
  34. package/esm/fw-table.js +5 -6
  35. package/esm/fw-tabs.js +87 -35
  36. package/esm/fw-tag-BRxPc4zc.js +199 -0
  37. package/esm/fw-tag.js +4 -4
  38. package/esm/fw-toast.js +58 -76
  39. package/esm/fw-transactions-card.js +20 -20
  40. package/esm/{get-root-colours-DCjlYelc.js → get-root-colours-DCCAnRF4.js} +3 -1
  41. package/esm/index-C8z11jcJ.js +7583 -0
  42. package/esm/index-DHyRsKsZ.js +843 -0
  43. package/esm/index-eP2GMSdQ.js +755 -0
  44. package/esm/index.js +54 -61
  45. package/esm/{uniqueId-DZdGzBh8.js → uniqueId-DK6xzFd8.js} +1 -1
  46. package/esm/{vee-validate.esm-3ptvCDR1.js → vee-validate-0dtT5GSQ.js} +182 -305
  47. package/frollo-web-ui.esm.js +10790 -3115
  48. package/icons/circle-check.svg +4 -0
  49. package/index.d.ts +1522 -586
  50. package/package.json +11 -11
  51. package/types/components/fw-accordion/fw-accordion.vue.d.ts +9 -7
  52. package/types/components/fw-alert/fw-alert.vue.d.ts +11 -6
  53. package/types/components/fw-bar-chart/fw-bar-chart.vue.d.ts +15 -64
  54. package/types/components/fw-button/fw-button.vue.d.ts +11 -7
  55. package/types/components/fw-card/fw-card.vue.d.ts +6 -6
  56. package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +365 -5
  57. package/types/components/fw-date-picker/fw-date-picker.vue.d.ts +3 -242
  58. package/types/components/fw-drawer/fw-drawer.vue.d.ts +11 -8
  59. package/types/components/fw-dropdown/fw-dropdown.vue.d.ts +20 -12
  60. package/types/components/fw-icons/fw-success-animation.vue.d.ts +1 -1
  61. package/types/components/fw-image/fw-image.vue.d.ts +33 -7
  62. package/types/components/fw-input/fw-input.vue.d.ts +368 -10
  63. package/types/components/fw-loading/fw-loading-bar.vue.d.ts +7 -5
  64. package/types/components/fw-loading/fw-loading-card.vue.d.ts +3 -1
  65. package/types/components/fw-loading/fw-loading-dots.vue.d.ts +8 -1
  66. package/types/components/fw-loading/fw-loading-table.vue.d.ts +11 -6
  67. package/types/components/fw-media-picker/fw-media-picker.vue.d.ts +27 -18
  68. package/types/components/fw-modal/fw-modal.vue.d.ts +11 -7
  69. package/types/components/fw-navigation-menu/fw-navigation-menu.vue.d.ts +12 -8
  70. package/types/components/fw-popover/fw-popover.vue.d.ts +16 -21
  71. package/types/components/fw-progress-bar/fw-progress-bar.vue.d.ts +6 -4
  72. package/types/components/fw-provider-list/fw-provider-list.vue.d.ts +20 -45
  73. package/types/components/fw-sidebar-menu/fw-sidebar-menu.vue.d.ts +13 -7
  74. package/types/components/fw-slider/fw-slider.vue.d.ts +11 -8
  75. package/types/components/fw-switch/fw-switch.vue.d.ts +383 -9
  76. package/types/components/fw-switch/index.types.d.ts +1 -0
  77. package/types/components/fw-table/fw-table-head.vue.d.ts +1 -1
  78. package/types/components/fw-table/fw-table-row.vue.d.ts +1 -1
  79. package/types/components/fw-table/fw-table.vue.d.ts +40 -19
  80. package/types/components/fw-table/index.types.d.ts +36 -2
  81. package/types/components/fw-tabs/fw-tab.vue.d.ts +4 -8
  82. package/types/components/fw-tabs/fw-tabs.vue.d.ts +11 -8
  83. package/types/components/fw-tabs/index.types.d.ts +14 -4
  84. package/types/components/fw-tag/fw-tag.vue.d.ts +14 -8
  85. package/types/components/fw-toast/fw-toast.vue.d.ts +17 -22
  86. package/types/components/fw-transactions-card/fw-transactions-card.vue.d.ts +6 -3
  87. package/types/directives/lazy-loader.d.ts +11 -2
  88. package/types/helpers/get-root-colours.d.ts +1 -0
  89. package/web-components/index.js +16793 -7700
  90. package/esm/fw-button-YMoW4x4c.js +0 -296
  91. package/esm/fw-image-D-OHafdw.js +0 -217
  92. package/esm/fw-loading-bar-DecYSBC_.js +0 -45
  93. package/esm/fw-popover-B4bsfuxm.js +0 -620
  94. package/esm/fw-table-row-Cgi8871h.js +0 -389
  95. package/esm/fw-tag-fDo50Nw7.js +0 -177
  96. package/esm/index-BsEH8YYr.js +0 -979
@@ -1,620 +0,0 @@
1
- import { c as _asyncToGenerator, d as _regeneratorRuntime, e as _defineProperty } from './_rollupPluginBabelHelpers-DODWUb5N.js';
2
- import { defineComponent, ref, computed, watchEffect, onBeforeUnmount, onMounted, onUpdated, useCssVars, pushScopeId, popScopeId, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode, createTextVNode, toDisplayString } from 'vue';
3
- import { c as createPopper } from './index-BVcOAKar.js';
4
- import { r as root, i as isSymbol, u as uniqueId } from './uniqueId-DZdGzBh8.js';
5
- import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
6
-
7
- /**
8
- * Gets the first element of `array`.
9
- *
10
- * @static
11
- * @memberOf _
12
- * @since 0.1.0
13
- * @alias first
14
- * @category Array
15
- * @param {Array} array The array to query.
16
- * @returns {*} Returns the first element of `array`.
17
- * @example
18
- *
19
- * _.head([1, 2, 3]);
20
- * // => 1
21
- *
22
- * _.head([]);
23
- * // => undefined
24
- */
25
- function head(array) {
26
- return (array && array.length) ? array[0] : undefined;
27
- }
28
-
29
- /**
30
- * Checks if `value` is the
31
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
32
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
33
- *
34
- * @static
35
- * @memberOf _
36
- * @since 0.1.0
37
- * @category Lang
38
- * @param {*} value The value to check.
39
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
40
- * @example
41
- *
42
- * _.isObject({});
43
- * // => true
44
- *
45
- * _.isObject([1, 2, 3]);
46
- * // => true
47
- *
48
- * _.isObject(_.noop);
49
- * // => true
50
- *
51
- * _.isObject(null);
52
- * // => false
53
- */
54
- function isObject(value) {
55
- var type = typeof value;
56
- return value != null && (type == 'object' || type == 'function');
57
- }
58
-
59
- /**
60
- * Gets the timestamp of the number of milliseconds that have elapsed since
61
- * the Unix epoch (1 January 1970 00:00:00 UTC).
62
- *
63
- * @static
64
- * @memberOf _
65
- * @since 2.4.0
66
- * @category Date
67
- * @returns {number} Returns the timestamp.
68
- * @example
69
- *
70
- * _.defer(function(stamp) {
71
- * console.log(_.now() - stamp);
72
- * }, _.now());
73
- * // => Logs the number of milliseconds it took for the deferred invocation.
74
- */
75
- var now = function() {
76
- return root.Date.now();
77
- };
78
-
79
- /** Used to match a single whitespace character. */
80
- var reWhitespace = /\s/;
81
-
82
- /**
83
- * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
84
- * character of `string`.
85
- *
86
- * @private
87
- * @param {string} string The string to inspect.
88
- * @returns {number} Returns the index of the last non-whitespace character.
89
- */
90
- function trimmedEndIndex(string) {
91
- var index = string.length;
92
-
93
- while (index-- && reWhitespace.test(string.charAt(index))) {}
94
- return index;
95
- }
96
-
97
- /** Used to match leading whitespace. */
98
- var reTrimStart = /^\s+/;
99
-
100
- /**
101
- * The base implementation of `_.trim`.
102
- *
103
- * @private
104
- * @param {string} string The string to trim.
105
- * @returns {string} Returns the trimmed string.
106
- */
107
- function baseTrim(string) {
108
- return string
109
- ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
110
- : string;
111
- }
112
-
113
- /** Used as references for various `Number` constants. */
114
- var NAN = 0 / 0;
115
-
116
- /** Used to detect bad signed hexadecimal string values. */
117
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
118
-
119
- /** Used to detect binary string values. */
120
- var reIsBinary = /^0b[01]+$/i;
121
-
122
- /** Used to detect octal string values. */
123
- var reIsOctal = /^0o[0-7]+$/i;
124
-
125
- /** Built-in method references without a dependency on `root`. */
126
- var freeParseInt = parseInt;
127
-
128
- /**
129
- * Converts `value` to a number.
130
- *
131
- * @static
132
- * @memberOf _
133
- * @since 4.0.0
134
- * @category Lang
135
- * @param {*} value The value to process.
136
- * @returns {number} Returns the number.
137
- * @example
138
- *
139
- * _.toNumber(3.2);
140
- * // => 3.2
141
- *
142
- * _.toNumber(Number.MIN_VALUE);
143
- * // => 5e-324
144
- *
145
- * _.toNumber(Infinity);
146
- * // => Infinity
147
- *
148
- * _.toNumber('3.2');
149
- * // => 3.2
150
- */
151
- function toNumber(value) {
152
- if (typeof value == 'number') {
153
- return value;
154
- }
155
- if (isSymbol(value)) {
156
- return NAN;
157
- }
158
- if (isObject(value)) {
159
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
160
- value = isObject(other) ? (other + '') : other;
161
- }
162
- if (typeof value != 'string') {
163
- return value === 0 ? value : +value;
164
- }
165
- value = baseTrim(value);
166
- var isBinary = reIsBinary.test(value);
167
- return (isBinary || reIsOctal.test(value))
168
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
169
- : (reIsBadHex.test(value) ? NAN : +value);
170
- }
171
-
172
- /** Error message constants. */
173
- var FUNC_ERROR_TEXT = 'Expected a function';
174
-
175
- /* Built-in method references for those with the same name as other `lodash` methods. */
176
- var nativeMax = Math.max,
177
- nativeMin = Math.min;
178
-
179
- /**
180
- * Creates a debounced function that delays invoking `func` until after `wait`
181
- * milliseconds have elapsed since the last time the debounced function was
182
- * invoked. The debounced function comes with a `cancel` method to cancel
183
- * delayed `func` invocations and a `flush` method to immediately invoke them.
184
- * Provide `options` to indicate whether `func` should be invoked on the
185
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
186
- * with the last arguments provided to the debounced function. Subsequent
187
- * calls to the debounced function return the result of the last `func`
188
- * invocation.
189
- *
190
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
191
- * invoked on the trailing edge of the timeout only if the debounced function
192
- * is invoked more than once during the `wait` timeout.
193
- *
194
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
195
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
196
- *
197
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
198
- * for details over the differences between `_.debounce` and `_.throttle`.
199
- *
200
- * @static
201
- * @memberOf _
202
- * @since 0.1.0
203
- * @category Function
204
- * @param {Function} func The function to debounce.
205
- * @param {number} [wait=0] The number of milliseconds to delay.
206
- * @param {Object} [options={}] The options object.
207
- * @param {boolean} [options.leading=false]
208
- * Specify invoking on the leading edge of the timeout.
209
- * @param {number} [options.maxWait]
210
- * The maximum time `func` is allowed to be delayed before it's invoked.
211
- * @param {boolean} [options.trailing=true]
212
- * Specify invoking on the trailing edge of the timeout.
213
- * @returns {Function} Returns the new debounced function.
214
- * @example
215
- *
216
- * // Avoid costly calculations while the window size is in flux.
217
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
218
- *
219
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
220
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
221
- * 'leading': true,
222
- * 'trailing': false
223
- * }));
224
- *
225
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
226
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
227
- * var source = new EventSource('/stream');
228
- * jQuery(source).on('message', debounced);
229
- *
230
- * // Cancel the trailing debounced invocation.
231
- * jQuery(window).on('popstate', debounced.cancel);
232
- */
233
- function debounce(func, wait, options) {
234
- var lastArgs,
235
- lastThis,
236
- maxWait,
237
- result,
238
- timerId,
239
- lastCallTime,
240
- lastInvokeTime = 0,
241
- leading = false,
242
- maxing = false,
243
- trailing = true;
244
-
245
- if (typeof func != 'function') {
246
- throw new TypeError(FUNC_ERROR_TEXT);
247
- }
248
- wait = toNumber(wait) || 0;
249
- if (isObject(options)) {
250
- leading = !!options.leading;
251
- maxing = 'maxWait' in options;
252
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
253
- trailing = 'trailing' in options ? !!options.trailing : trailing;
254
- }
255
-
256
- function invokeFunc(time) {
257
- var args = lastArgs,
258
- thisArg = lastThis;
259
-
260
- lastArgs = lastThis = undefined;
261
- lastInvokeTime = time;
262
- result = func.apply(thisArg, args);
263
- return result;
264
- }
265
-
266
- function leadingEdge(time) {
267
- // Reset any `maxWait` timer.
268
- lastInvokeTime = time;
269
- // Start the timer for the trailing edge.
270
- timerId = setTimeout(timerExpired, wait);
271
- // Invoke the leading edge.
272
- return leading ? invokeFunc(time) : result;
273
- }
274
-
275
- function remainingWait(time) {
276
- var timeSinceLastCall = time - lastCallTime,
277
- timeSinceLastInvoke = time - lastInvokeTime,
278
- timeWaiting = wait - timeSinceLastCall;
279
-
280
- return maxing
281
- ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
282
- : timeWaiting;
283
- }
284
-
285
- function shouldInvoke(time) {
286
- var timeSinceLastCall = time - lastCallTime,
287
- timeSinceLastInvoke = time - lastInvokeTime;
288
-
289
- // Either this is the first call, activity has stopped and we're at the
290
- // trailing edge, the system time has gone backwards and we're treating
291
- // it as the trailing edge, or we've hit the `maxWait` limit.
292
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
293
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
294
- }
295
-
296
- function timerExpired() {
297
- var time = now();
298
- if (shouldInvoke(time)) {
299
- return trailingEdge(time);
300
- }
301
- // Restart the timer.
302
- timerId = setTimeout(timerExpired, remainingWait(time));
303
- }
304
-
305
- function trailingEdge(time) {
306
- timerId = undefined;
307
-
308
- // Only invoke if we have `lastArgs` which means `func` has been
309
- // debounced at least once.
310
- if (trailing && lastArgs) {
311
- return invokeFunc(time);
312
- }
313
- lastArgs = lastThis = undefined;
314
- return result;
315
- }
316
-
317
- function cancel() {
318
- if (timerId !== undefined) {
319
- clearTimeout(timerId);
320
- }
321
- lastInvokeTime = 0;
322
- lastArgs = lastCallTime = lastThis = timerId = undefined;
323
- }
324
-
325
- function flush() {
326
- return timerId === undefined ? result : trailingEdge(now());
327
- }
328
-
329
- function debounced() {
330
- var time = now(),
331
- isInvoking = shouldInvoke(time);
332
-
333
- lastArgs = arguments;
334
- lastThis = this;
335
- lastCallTime = time;
336
-
337
- if (isInvoking) {
338
- if (timerId === undefined) {
339
- return leadingEdge(lastCallTime);
340
- }
341
- if (maxing) {
342
- // Handle invocations in a tight loop.
343
- clearTimeout(timerId);
344
- timerId = setTimeout(timerExpired, wait);
345
- return invokeFunc(lastCallTime);
346
- }
347
- }
348
- if (timerId === undefined) {
349
- timerId = setTimeout(timerExpired, wait);
350
- }
351
- return result;
352
- }
353
- debounced.cancel = cancel;
354
- debounced.flush = flush;
355
- return debounced;
356
- }
357
-
358
- var __default__ = defineComponent({
359
- name: 'FwPopover',
360
- props: {
361
- /**
362
- * The title of the popover
363
- */
364
- title: String,
365
- /**
366
- * The side of the target element the popover should be placed against. Accepts 'top', 'right', 'bottom' and 'left'
367
- */
368
- placement: {
369
- type: String,
370
- "default": 'bottom',
371
- validator: function validator(value) {
372
- return ['top', 'right', 'bottom', 'left', 'auto', 'auto-start', 'auto-end', 'top-start', 'top-end', 'bottom-start', 'bottom-end', 'right-start', 'right-end', 'left-start', 'left-end'].includes(value);
373
- }
374
- },
375
- /**
376
- * Whether to use `fixed` or `absolute` positioning.
377
- * Absolute is more performant if you have a lot of popovers; fixed is more robust
378
- */
379
- position: {
380
- type: String,
381
- "default": 'absolute',
382
- validator: function validator(value) {
383
- return ['fixed', 'absolute'].includes(value);
384
- }
385
- },
386
- /**
387
- * The input event which causes the popover to show. Accepts 'click' and 'hover'
388
- */
389
- trigger: {
390
- type: String,
391
- "default": 'click',
392
- validator: function validator(value) {
393
- return ['click', 'hover', 'focus'].includes(value);
394
- }
395
- },
396
- /**
397
- * Whether to show component on top of all components by setting the highest z-index
398
- */
399
- showOnTop: {
400
- type: Boolean,
401
- "default": false
402
- },
403
- /**
404
- * Close the popover automatically when the user clicks inside of the popover
405
- */
406
- closeOnClick: {
407
- type: Boolean,
408
- "default": false
409
- },
410
- /**
411
- * Close the popover automatically when the user clicks outside of the popover
412
- */
413
- closeOnClickOutside: {
414
- type: Boolean,
415
- "default": true
416
- },
417
- /**
418
- * The text alignment of the popover content should be placed against. Accepts 'center', 'right' and 'left'
419
- */
420
- textAlign: {
421
- type: String,
422
- "default": 'left',
423
- validator: function validator(value) {
424
- return ['center', 'left', 'right'].includes(value);
425
- }
426
- },
427
- /**
428
- * Whether to show the arrow
429
- **/
430
- showArrow: {
431
- type: Boolean,
432
- "default": false
433
- }
434
- },
435
- emits: ['closed'],
436
- setup: function setup(props, ctx) {
437
- var targetElement = ref();
438
- var contentElement = ref();
439
- var timer = ref();
440
- var spacingSize = computed(function () {
441
- return props.showArrow ? '12px' : '2px';
442
- });
443
- var visible = ref(false);
444
- var computedVisible = computed(function () {
445
- return visible.value && (props.title || ctx.slots.content);
446
- });
447
- var onHover = function onHover() {
448
- if (props.trigger === 'hover' || props.trigger === 'focus') {
449
- visible.value = true;
450
- }
451
- };
452
- var onLeave = function onLeave() {
453
- if (props.trigger === 'hover' || props.trigger === 'focus') {
454
- clearTimeout(timer.value);
455
- timer.value = setTimeout(function () {
456
- visible.value = false;
457
- }, 500);
458
- }
459
- };
460
- var onClick = function onClick() {
461
- if (props.trigger === 'click') {
462
- visible.value = !visible.value;
463
- }
464
- };
465
- var onClickOutside = function onClickOutside(e) {
466
- var _contentElement$value, _targetElement$value;
467
- if (props.closeOnClickOutside && e.target instanceof Node &&
468
- // Check if the click happened inside the popover
469
- !((_contentElement$value = contentElement.value) !== null && _contentElement$value !== void 0 && _contentElement$value.contains(e.target)) &&
470
- // Check if the click happened inside the button
471
- !((_targetElement$value = targetElement.value) !== null && _targetElement$value !== void 0 && _targetElement$value.contains(e.target))) {
472
- visible.value = false;
473
- ctx.emit('closed');
474
- }
475
- };
476
- var autoCloseContent = function autoCloseContent(e) {
477
- var _contentElement$value2;
478
- if (props.closeOnClick && (_contentElement$value2 = contentElement.value) !== null && _contentElement$value2 !== void 0 && _contentElement$value2.contains(e.target)) {
479
- visible.value = false;
480
- ctx.emit('closed');
481
- }
482
- };
483
- watchEffect(function () {
484
- if (computedVisible.value) {
485
- document.addEventListener('click', onClickOutside);
486
- } else {
487
- document.removeEventListener('click', onClickOutside);
488
- }
489
- });
490
- onBeforeUnmount(function () {
491
- return document.removeEventListener('click', onClickOutside);
492
- });
493
- var popper = ref(null);
494
- var popperPlacement = computed(function () {
495
- return props.placement;
496
- });
497
- var popperStrategy = computed(function () {
498
- return props.position;
499
- });
500
- onMounted(function () {
501
- if (targetElement.value && contentElement.value) {
502
- popper.value = createPopper(targetElement.value, contentElement.value, {
503
- placement: popperPlacement.value,
504
- strategy: popperStrategy.value,
505
- modifiers: [{
506
- name: 'arrow',
507
- options: {
508
- padding: 5
509
- }
510
- }]
511
- });
512
- }
513
- });
514
- onUpdated(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
515
- return _regeneratorRuntime().wrap(function _callee$(_context) {
516
- while (1) switch (_context.prev = _context.next) {
517
- case 0:
518
- if (!popper.value) {
519
- _context.next = 3;
520
- break;
521
- }
522
- _context.next = 3;
523
- return popper.value.update();
524
- case 3:
525
- case "end":
526
- return _context.stop();
527
- }
528
- }, _callee);
529
- })));
530
- var contentElementId = uniqueId();
531
- var setTargetElementAriaDescribedBy = function setTargetElementAriaDescribedBy() {
532
- var _targetElement$value2;
533
- var targetElementFirstChild = head((_targetElement$value2 = targetElement.value) === null || _targetElement$value2 === void 0 ? void 0 : _targetElement$value2.children);
534
- if (targetElementFirstChild && targetElementFirstChild.getAttribute('aria-describedby') === null) {
535
- targetElementFirstChild.setAttribute('aria-describedby', contentElementId);
536
- }
537
- };
538
- onMounted(setTargetElementAriaDescribedBy);
539
- watchEffect(setTargetElementAriaDescribedBy);
540
- return {
541
- targetElement: targetElement,
542
- contentElement: contentElement,
543
- contentElementId: contentElementId,
544
- computedVisible: computedVisible,
545
- onHover: onHover,
546
- onClick: onClick,
547
- onLeave: onLeave,
548
- autoCloseContent: autoCloseContent,
549
- visible: visible,
550
- spacingSize: spacingSize,
551
- debounce: debounce
552
- };
553
- }
554
- });
555
- var __injectCSSVars__ = function __injectCSSVars__() {
556
- useCssVars(function (_ctx) {
557
- return {
558
- "2c723333": _ctx.spacingSize
559
- };
560
- });
561
- };
562
- var __setup__ = __default__.setup;
563
- __default__.setup = __setup__ ? function (props, ctx) {
564
- __injectCSSVars__();
565
- return __setup__(props, ctx);
566
- } : __injectCSSVars__;
567
-
568
- var _withScopeId = function _withScopeId(n) {
569
- return pushScopeId("data-v-5557f17e"), n = n(), popScopeId(), n;
570
- };
571
- var _hoisted_1 = ["id", "aria-hidden"];
572
- var _hoisted_2 = {
573
- key: 0,
574
- "data-popper-arrow": "",
575
- "class": "fw-popover__arrow after:content-[''] after:bg-white after:border after:border-grey-light after:absolute"
576
- };
577
- function render(_ctx, _cache, $props, $setup, $data, $options) {
578
- return openBlock(), createElementBlock("span", {
579
- "class": normalizeClass(["fw-popover", _defineProperty(_defineProperty({
580
- 'fw-popover--visible': _ctx.computedVisible
581
- }, "fw-popover--placement-".concat(_ctx.placement), !!_ctx.placement), 'fw-visibile-on-top', _ctx.showOnTop)]),
582
- onMouseenter: _cache[2] || (_cache[2] = function () {
583
- return _ctx.onHover && _ctx.onHover.apply(_ctx, arguments);
584
- }),
585
- onMouseleave: _cache[3] || (_cache[3] = function () {
586
- return _ctx.onLeave && _ctx.onLeave.apply(_ctx, arguments);
587
- }),
588
- onFocusin: _cache[4] || (_cache[4] = function () {
589
- return _ctx.onHover && _ctx.onHover.apply(_ctx, arguments);
590
- }),
591
- onFocusout: _cache[5] || (_cache[5] = function () {
592
- return _ctx.onLeave && _ctx.onLeave.apply(_ctx, arguments);
593
- })
594
- }, [createElementVNode("div", {
595
- ref: "targetElement",
596
- "class": "fw-popover__target",
597
- onClick: _cache[0] || (_cache[0] = function () {
598
- return _ctx.onClick && _ctx.onClick.apply(_ctx, arguments);
599
- })
600
- }, [renderSlot(_ctx.$slots, "default")], 512), createElementVNode("span", {
601
- id: _ctx.contentElementId,
602
- ref: "contentElement",
603
- "aria-hidden": !_ctx.computedVisible,
604
- "class": normalizeClass(["fw-popover__content rounded bg-white border border-grey-light shadow-card pointer-events-none", _defineProperty({}, "fw-popover__content--".concat(_ctx.textAlign), !!_ctx.textAlign)]),
605
- onClick: _cache[1] || (_cache[1] = function () {
606
- return _ctx.autoCloseContent && _ctx.autoCloseContent.apply(_ctx, arguments);
607
- })
608
- }, [renderSlot(_ctx.$slots, "content", {}, function () {
609
- return [createTextVNode(toDisplayString(_ctx.title), 1)];
610
- }), _ctx.showArrow ? (openBlock(), createElementBlock("span", _hoisted_2)) : createCommentVNode("", true)], 10, _hoisted_1)], 34);
611
- }
612
-
613
- var css_248z = ".fw-popover__content[data-v-5557f17e]{opacity:0;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;transition:all .3s ease;white-space:normal;z-index:9999}.fw-popover__content--center[data-v-5557f17e]{text-align:center}.fw-popover__content--left[data-v-5557f17e]{text-align:left}.fw-popover__content--right[data-v-5557f17e]{text-align:right}.fw-popover--visible .fw-popover__content[data-v-5557f17e]{opacity:1;pointer-events:all}.fw-popover__arrow[data-v-5557f17e]:after{height:var(--2c723333);left:0;top:0;-webkit-transform:translate(-50%,-50%) rotate(45deg);-moz-transform:translate(-50%,-50%) rotate(45deg);-ms-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg);width:var(--2c723333)}.fw-popover__content[data-popper-placement^=top][data-v-5557f17e]{margin-bottom:var(--2c723333)!important}.fw-popover__content[data-popper-placement^=right][data-v-5557f17e]{margin-left:var(--2c723333)!important}.fw-popover__content[data-popper-placement^=bottom][data-v-5557f17e]{margin-top:var(--2c723333)!important}.fw-popover__content[data-popper-placement^=left][data-v-5557f17e]{margin-right:var(--2c723333)!important}.fw-popover__content[data-popper-placement^=top] .fw-popover__arrow[data-v-5557f17e]{bottom:0}.fw-popover__content[data-popper-placement^=right] .fw-popover__arrow[data-v-5557f17e]{left:0}.fw-popover__content[data-popper-placement^=bottom] .fw-popover__arrow[data-v-5557f17e]{top:0}.fw-popover__content[data-popper-placement^=left] .fw-popover__arrow[data-v-5557f17e]{right:0}.fw-popover__content[data-popper-placement^=top] .fw-popover__arrow[data-v-5557f17e]{bottom:-1px}.fw-popover__content[data-popper-placement^=top] .fw-popover__arrow[data-v-5557f17e]:after{border-left:none;border-top:none}.fw-popover__content[data-popper-placement^=right] .fw-popover__arrow[data-v-5557f17e]{left:-1px}.fw-popover__content[data-popper-placement^=right] .fw-popover__arrow[data-v-5557f17e]:after{border-right:none;border-top:none}.fw-popover__content[data-popper-placement^=bottom] .fw-popover__arrow[data-v-5557f17e]{top:-1px}.fw-popover__content[data-popper-placement^=bottom] .fw-popover__arrow[data-v-5557f17e]:after{border-bottom:none;border-right:none}.fw-popover__content[data-popper-placement^=left] .fw-popover__arrow[data-v-5557f17e]{right:-1px}.fw-popover__content[data-popper-placement^=left] .fw-popover__arrow[data-v-5557f17e]:after{border-bottom:none;border-left:none}";
614
- var stylesheet = ".fw-popover__content[data-v-5557f17e]{opacity:0;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;transition:all .3s ease;white-space:normal;z-index:9999}.fw-popover__content--center[data-v-5557f17e]{text-align:center}.fw-popover__content--left[data-v-5557f17e]{text-align:left}.fw-popover__content--right[data-v-5557f17e]{text-align:right}.fw-popover--visible .fw-popover__content[data-v-5557f17e]{opacity:1;pointer-events:all}.fw-popover__arrow[data-v-5557f17e]:after{height:var(--2c723333);left:0;top:0;-webkit-transform:translate(-50%,-50%) rotate(45deg);-moz-transform:translate(-50%,-50%) rotate(45deg);-ms-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg);width:var(--2c723333)}.fw-popover__content[data-popper-placement^=top][data-v-5557f17e]{margin-bottom:var(--2c723333)!important}.fw-popover__content[data-popper-placement^=right][data-v-5557f17e]{margin-left:var(--2c723333)!important}.fw-popover__content[data-popper-placement^=bottom][data-v-5557f17e]{margin-top:var(--2c723333)!important}.fw-popover__content[data-popper-placement^=left][data-v-5557f17e]{margin-right:var(--2c723333)!important}.fw-popover__content[data-popper-placement^=top] .fw-popover__arrow[data-v-5557f17e]{bottom:0}.fw-popover__content[data-popper-placement^=right] .fw-popover__arrow[data-v-5557f17e]{left:0}.fw-popover__content[data-popper-placement^=bottom] .fw-popover__arrow[data-v-5557f17e]{top:0}.fw-popover__content[data-popper-placement^=left] .fw-popover__arrow[data-v-5557f17e]{right:0}.fw-popover__content[data-popper-placement^=top] .fw-popover__arrow[data-v-5557f17e]{bottom:-1px}.fw-popover__content[data-popper-placement^=top] .fw-popover__arrow[data-v-5557f17e]:after{border-left:none;border-top:none}.fw-popover__content[data-popper-placement^=right] .fw-popover__arrow[data-v-5557f17e]{left:-1px}.fw-popover__content[data-popper-placement^=right] .fw-popover__arrow[data-v-5557f17e]:after{border-right:none;border-top:none}.fw-popover__content[data-popper-placement^=bottom] .fw-popover__arrow[data-v-5557f17e]{top:-1px}.fw-popover__content[data-popper-placement^=bottom] .fw-popover__arrow[data-v-5557f17e]:after{border-bottom:none;border-right:none}.fw-popover__content[data-popper-placement^=left] .fw-popover__arrow[data-v-5557f17e]{right:-1px}.fw-popover__content[data-popper-placement^=left] .fw-popover__arrow[data-v-5557f17e]:after{border-bottom:none;border-left:none}";
615
- styleInject(css_248z);
616
-
617
- __default__.render = render;
618
- __default__.__scopeId = "data-v-5557f17e";
619
-
620
- export { __default__ as _ };