@frollo/frollo-web-ui 1.2.9 → 3.0.0

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 (67) hide show
  1. package/cjs/index.js +1116 -618
  2. package/esm/{add-to-unscopables-a5032b1d.js → add-to-unscopables-3f461c07.js} +3 -3
  3. package/esm/array-iteration-98e2cf9a.js +93 -0
  4. package/esm/array-method-is-strict-544b103f.js +14 -0
  5. package/esm/array-species-create-5fc23c89.js +98 -0
  6. package/esm/{classof-088c9833.js → classof-a45668b6.js} +2 -2
  7. package/esm/create-property-558a3c24.js +15 -0
  8. package/esm/{es.array.find-54b8f84b.js → es.array.find-36d8f2f0.js} +6 -6
  9. package/esm/{es.array.includes-9a6e4066.js → es.array.includes-df8e6e35.js} +4 -4
  10. package/esm/{es.function.name-2fa3a718.js → es.function.name-b642b74f.js} +1 -1
  11. package/esm/{es.number.constructor-b7faae1f.js → es.number.constructor-f279ce82.js} +3 -3
  12. package/esm/{function-name-c49146fc.js → function-name-e2f6ea36.js} +1 -1
  13. package/esm/fw-animations.js +7 -7
  14. package/esm/{fw-button-6aa9b68f.js → fw-button-df5c923f.js} +2 -2
  15. package/esm/fw-button.js +8 -8
  16. package/esm/fw-card-8d3f4ab5.js +95 -0
  17. package/esm/fw-card.js +2 -95
  18. package/esm/fw-checkbox.js +2 -2
  19. package/esm/fw-dropdown.js +10 -9
  20. package/esm/fw-image-ec7b02c5.js +770 -0
  21. package/esm/fw-image.js +19 -847
  22. package/esm/fw-input.js +6 -6
  23. package/esm/{fw-loading-spinner-649aa589.js → fw-loading-spinner-9b7c6855.js} +1 -1
  24. package/esm/fw-loading.js +5 -5
  25. package/esm/fw-modal.js +228 -11
  26. package/esm/fw-navigation-menu.js +8 -8
  27. package/esm/fw-progress-bar.js +5 -5
  28. package/esm/fw-table.js +8 -7
  29. package/esm/fw-tabs.js +9 -8
  30. package/esm/fw-tag.js +5 -5
  31. package/esm/fw-toast.js +372 -0
  32. package/esm/fw-transactions-card.js +118 -0
  33. package/esm/{index-403af654.js → index-4605e00e.js} +130 -88
  34. package/esm/index.js +82 -47
  35. package/esm/{is-forced-fd46b5f2.js → is-forced-ddf227e6.js} +2 -2
  36. package/esm/{object-keys-3c73c404.js → object-keys-6a890c6f.js} +2 -2
  37. package/esm/{to-string-c2bd1f4d.js → to-string-685748aa.js} +2 -2
  38. package/esm/uniqueId-fe08534a.js +279 -0
  39. package/esm/web.timers-4a6aaab8.js +82 -0
  40. package/frollo-web-ui.esm.js +1208 -668
  41. package/icons/bullseye.svg +3 -0
  42. package/icons/icons.stories.ts +3 -3
  43. package/icons/index.ts +7 -1
  44. package/icons/solid-check.svg +3 -0
  45. package/icons/solid-xmark.svg +3 -0
  46. package/index.d.ts +261 -22
  47. package/package.json +2 -1
  48. package/styles/web-components.scss +8 -0
  49. package/types/components/fw-modal/fw-modal.vue.d.ts +30 -0
  50. package/types/components/fw-modal/index.types.d.ts +2 -0
  51. package/types/components/fw-toast/fw-toast.vue.d.ts +121 -0
  52. package/types/components/fw-toast/index.d.ts +2 -0
  53. package/types/components/fw-toast/index.types.d.ts +13 -0
  54. package/types/components/fw-transactions-card/fw-transactions-card.vue.d.ts +58 -0
  55. package/types/components/fw-transactions-card/index.d.ts +2 -0
  56. package/types/components/fw-transactions-card/index.types.d.ts +6 -0
  57. package/types/components/index.d.ts +2 -0
  58. package/types/components/index.types.d.ts +2 -0
  59. package/types/icons/index.d.ts +4 -1
  60. package/types/index.browser-umd.d.ts +1 -0
  61. package/types/services/index.d.ts +1 -0
  62. package/types/services/modal.d.ts +2 -2
  63. package/types/services/toast.d.ts +9 -0
  64. package/web-components/index.js +21435 -0
  65. package/esm/array-iteration-4f83e223.js +0 -186
  66. package/esm/create-property-da6d232b.js +0 -26
  67. package/esm/index-61020c18.js +0 -475
@@ -0,0 +1,770 @@
1
+ import './es.array.includes-df8e6e35.js';
2
+ import { o as objectSetPrototypeOf } from './es.number.constructor-f279ce82.js';
3
+ import { defineComponent, computed, ref, resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, withKeys, createElementVNode, createVNode, renderSlot } from 'vue';
4
+ import './es.array.find-36d8f2f0.js';
5
+ import { a as documentCreateElement$1, g as global$1, b as functionCall, c as anObject$3, e as getMethod$2, w as wellKnownSymbol$6, h as aCallable$1, t as tryToString$1, i as toObject$2, f as functionUncurryThis, r as requireObjectCoercible$1, j as fails$2, k as hasOwnProperty_1, l as isCallable$3, m as isPure, o as objectDefineProperty, n as functionName } from './function-name-e2f6ea36.js';
6
+ import { _ as _export } from './object-keys-6a890c6f.js';
7
+ import { a as arrayIteration, f as functionBindContext } from './array-iteration-98e2cf9a.js';
8
+ import { i as isConstructor$1 } from './array-species-create-5fc23c89.js';
9
+ import { c as createNonEnumerableProperty$2, l as lengthOfArrayLike$1, a as toIntegerOrInfinity$1, s as sharedKey$1, d as defineBuiltIn$2, b as createPropertyDescriptor$1, i as internalState } from './is-forced-ddf227e6.js';
10
+ import { c as createProperty$1 } from './create-property-558a3c24.js';
11
+ import { c as classof$1 } from './classof-a45668b6.js';
12
+ import { t as toString$2 } from './to-string-685748aa.js';
13
+ import { o as objectCreate } from './add-to-unscopables-3f461c07.js';
14
+ import './web.timers-4a6aaab8.js';
15
+ import { a as arrayMethodIsStrict$1 } from './array-method-is-strict-544b103f.js';
16
+ import { s as script$1 } from './fw-loading-bar-da7d53fb.js';
17
+ import { r as render$1 } from './index-4605e00e.js';
18
+ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
19
+
20
+ var es_array_forEach = {};
21
+
22
+ 'use strict';
23
+ var $forEach = arrayIteration.forEach;
24
+ var arrayMethodIsStrict = arrayMethodIsStrict$1;
25
+
26
+ var STRICT_METHOD = arrayMethodIsStrict('forEach');
27
+
28
+ // `Array.prototype.forEach` method implementation
29
+ // https://tc39.es/ecma262/#sec-array.prototype.foreach
30
+ var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
31
+ return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
32
+ // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
33
+ } : [].forEach;
34
+
35
+ 'use strict';
36
+ var $$2 = _export;
37
+ var forEach$1 = arrayForEach;
38
+
39
+ // `Array.prototype.forEach` method
40
+ // https://tc39.es/ecma262/#sec-array.prototype.foreach
41
+ // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
42
+ $$2({ target: 'Array', proto: true, forced: [].forEach != forEach$1 }, {
43
+ forEach: forEach$1
44
+ });
45
+
46
+ var web_domCollections_forEach = {};
47
+
48
+ // iterable DOM collections
49
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
50
+ var domIterables = {
51
+ CSSRuleList: 0,
52
+ CSSStyleDeclaration: 0,
53
+ CSSValueList: 0,
54
+ ClientRectList: 0,
55
+ DOMRectList: 0,
56
+ DOMStringList: 0,
57
+ DOMTokenList: 1,
58
+ DataTransferItemList: 0,
59
+ FileList: 0,
60
+ HTMLAllCollection: 0,
61
+ HTMLCollection: 0,
62
+ HTMLFormElement: 0,
63
+ HTMLSelectElement: 0,
64
+ MediaList: 0,
65
+ MimeTypeArray: 0,
66
+ NamedNodeMap: 0,
67
+ NodeList: 1,
68
+ PaintRequestList: 0,
69
+ Plugin: 0,
70
+ PluginArray: 0,
71
+ SVGLengthList: 0,
72
+ SVGNumberList: 0,
73
+ SVGPathSegList: 0,
74
+ SVGPointList: 0,
75
+ SVGStringList: 0,
76
+ SVGTransformList: 0,
77
+ SourceBufferList: 0,
78
+ StyleSheetList: 0,
79
+ TextTrackCueList: 0,
80
+ TextTrackList: 0,
81
+ TouchList: 0
82
+ };
83
+
84
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
85
+ var documentCreateElement = documentCreateElement$1;
86
+
87
+ var classList = documentCreateElement('span').classList;
88
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
89
+
90
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
91
+
92
+ var global = global$1;
93
+ var DOMIterables = domIterables;
94
+ var DOMTokenListPrototype = domTokenListPrototype;
95
+ var forEach = arrayForEach;
96
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
97
+
98
+ var handlePrototype = function (CollectionPrototype) {
99
+ // some Chrome versions have non-configurable methods on DOMTokenList
100
+ if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
101
+ createNonEnumerableProperty$1(CollectionPrototype, 'forEach', forEach);
102
+ } catch (error) {
103
+ CollectionPrototype.forEach = forEach;
104
+ }
105
+ };
106
+
107
+ for (var COLLECTION_NAME in DOMIterables) {
108
+ if (DOMIterables[COLLECTION_NAME]) {
109
+ handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
110
+ }
111
+ }
112
+
113
+ handlePrototype(DOMTokenListPrototype);
114
+
115
+ var es_array_from = {};
116
+
117
+ var call$3 = functionCall;
118
+ var anObject$2 = anObject$3;
119
+ var getMethod$1 = getMethod$2;
120
+
121
+ var iteratorClose$1 = function (iterator, kind, value) {
122
+ var innerResult, innerError;
123
+ anObject$2(iterator);
124
+ try {
125
+ innerResult = getMethod$1(iterator, 'return');
126
+ if (!innerResult) {
127
+ if (kind === 'throw') throw value;
128
+ return value;
129
+ }
130
+ innerResult = call$3(innerResult, iterator);
131
+ } catch (error) {
132
+ innerError = true;
133
+ innerResult = error;
134
+ }
135
+ if (kind === 'throw') throw value;
136
+ if (innerError) throw innerResult;
137
+ anObject$2(innerResult);
138
+ return value;
139
+ };
140
+
141
+ var anObject$1 = anObject$3;
142
+ var iteratorClose = iteratorClose$1;
143
+
144
+ // call something on iterator step with safe closing on error
145
+ var callWithSafeIterationClosing$1 = function (iterator, fn, value, ENTRIES) {
146
+ try {
147
+ return ENTRIES ? fn(anObject$1(value)[0], value[1]) : fn(value);
148
+ } catch (error) {
149
+ iteratorClose(iterator, 'throw', error);
150
+ }
151
+ };
152
+
153
+ var iterators = {};
154
+
155
+ var wellKnownSymbol$5 = wellKnownSymbol$6;
156
+ var Iterators$3 = iterators;
157
+
158
+ var ITERATOR$4 = wellKnownSymbol$5('iterator');
159
+ var ArrayPrototype = Array.prototype;
160
+
161
+ // check on default Array iterator
162
+ var isArrayIteratorMethod$1 = function (it) {
163
+ return it !== undefined && (Iterators$3.Array === it || ArrayPrototype[ITERATOR$4] === it);
164
+ };
165
+
166
+ var classof = classof$1;
167
+ var getMethod = getMethod$2;
168
+ var Iterators$2 = iterators;
169
+ var wellKnownSymbol$4 = wellKnownSymbol$6;
170
+
171
+ var ITERATOR$3 = wellKnownSymbol$4('iterator');
172
+
173
+ var getIteratorMethod$2 = function (it) {
174
+ if (it != undefined) return getMethod(it, ITERATOR$3)
175
+ || getMethod(it, '@@iterator')
176
+ || Iterators$2[classof(it)];
177
+ };
178
+
179
+ var call$2 = functionCall;
180
+ var aCallable = aCallable$1;
181
+ var anObject = anObject$3;
182
+ var tryToString = tryToString$1;
183
+ var getIteratorMethod$1 = getIteratorMethod$2;
184
+
185
+ var $TypeError = TypeError;
186
+
187
+ var getIterator$1 = function (argument, usingIterator) {
188
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
189
+ if (aCallable(iteratorMethod)) return anObject(call$2(iteratorMethod, argument));
190
+ throw $TypeError(tryToString(argument) + ' is not iterable');
191
+ };
192
+
193
+ 'use strict';
194
+ var bind = functionBindContext;
195
+ var call$1 = functionCall;
196
+ var toObject$1 = toObject$2;
197
+ var callWithSafeIterationClosing = callWithSafeIterationClosing$1;
198
+ var isArrayIteratorMethod = isArrayIteratorMethod$1;
199
+ var isConstructor = isConstructor$1;
200
+ var lengthOfArrayLike = lengthOfArrayLike$1;
201
+ var createProperty = createProperty$1;
202
+ var getIterator = getIterator$1;
203
+ var getIteratorMethod = getIteratorMethod$2;
204
+
205
+ var $Array = Array;
206
+
207
+ // `Array.from` method implementation
208
+ // https://tc39.es/ecma262/#sec-array.from
209
+ var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
210
+ var O = toObject$1(arrayLike);
211
+ var IS_CONSTRUCTOR = isConstructor(this);
212
+ var argumentsLength = arguments.length;
213
+ var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
214
+ var mapping = mapfn !== undefined;
215
+ if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
216
+ var iteratorMethod = getIteratorMethod(O);
217
+ var index = 0;
218
+ var length, result, step, iterator, next, value;
219
+ // if the target is not iterable or it's an array with the default iterator - use a simple case
220
+ if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {
221
+ iterator = getIterator(O, iteratorMethod);
222
+ next = iterator.next;
223
+ result = IS_CONSTRUCTOR ? new this() : [];
224
+ for (;!(step = call$1(next, iterator)).done; index++) {
225
+ value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
226
+ createProperty(result, index, value);
227
+ }
228
+ } else {
229
+ length = lengthOfArrayLike(O);
230
+ result = IS_CONSTRUCTOR ? new this(length) : $Array(length);
231
+ for (;length > index; index++) {
232
+ value = mapping ? mapfn(O[index], index) : O[index];
233
+ createProperty(result, index, value);
234
+ }
235
+ }
236
+ result.length = index;
237
+ return result;
238
+ };
239
+
240
+ var wellKnownSymbol$3 = wellKnownSymbol$6;
241
+
242
+ var ITERATOR$2 = wellKnownSymbol$3('iterator');
243
+ var SAFE_CLOSING = false;
244
+
245
+ try {
246
+ var called = 0;
247
+ var iteratorWithReturn = {
248
+ next: function () {
249
+ return { done: !!called++ };
250
+ },
251
+ 'return': function () {
252
+ SAFE_CLOSING = true;
253
+ }
254
+ };
255
+ iteratorWithReturn[ITERATOR$2] = function () {
256
+ return this;
257
+ };
258
+ // eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing
259
+ Array.from(iteratorWithReturn, function () { throw 2; });
260
+ } catch (error) { /* empty */ }
261
+
262
+ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
263
+ if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
264
+ var ITERATION_SUPPORT = false;
265
+ try {
266
+ var object = {};
267
+ object[ITERATOR$2] = function () {
268
+ return {
269
+ next: function () {
270
+ return { done: ITERATION_SUPPORT = true };
271
+ }
272
+ };
273
+ };
274
+ exec(object);
275
+ } catch (error) { /* empty */ }
276
+ return ITERATION_SUPPORT;
277
+ };
278
+
279
+ var $$1 = _export;
280
+ var from = arrayFrom;
281
+ var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
282
+
283
+ var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
284
+ // eslint-disable-next-line es-x/no-array-from -- required for testing
285
+ Array.from(iterable);
286
+ });
287
+
288
+ // `Array.from` method
289
+ // https://tc39.es/ecma262/#sec-array.from
290
+ $$1({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
291
+ from: from
292
+ });
293
+
294
+ var es_string_iterator = {};
295
+
296
+ var uncurryThis = functionUncurryThis;
297
+ var toIntegerOrInfinity = toIntegerOrInfinity$1;
298
+ var toString$1 = toString$2;
299
+ var requireObjectCoercible = requireObjectCoercible$1;
300
+
301
+ var charAt$1 = uncurryThis(''.charAt);
302
+ var charCodeAt = uncurryThis(''.charCodeAt);
303
+ var stringSlice = uncurryThis(''.slice);
304
+
305
+ var createMethod = function (CONVERT_TO_STRING) {
306
+ return function ($this, pos) {
307
+ var S = toString$1(requireObjectCoercible($this));
308
+ var position = toIntegerOrInfinity(pos);
309
+ var size = S.length;
310
+ var first, second;
311
+ if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
312
+ first = charCodeAt(S, position);
313
+ return first < 0xD800 || first > 0xDBFF || position + 1 === size
314
+ || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
315
+ ? CONVERT_TO_STRING
316
+ ? charAt$1(S, position)
317
+ : first
318
+ : CONVERT_TO_STRING
319
+ ? stringSlice(S, position, position + 2)
320
+ : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
321
+ };
322
+ };
323
+
324
+ var stringMultibyte = {
325
+ // `String.prototype.codePointAt` method
326
+ // https://tc39.es/ecma262/#sec-string.prototype.codepointat
327
+ codeAt: createMethod(false),
328
+ // `String.prototype.at` method
329
+ // https://github.com/mathiasbynens/String.prototype.at
330
+ charAt: createMethod(true)
331
+ };
332
+
333
+ var fails$1 = fails$2;
334
+
335
+ var correctPrototypeGetter = !fails$1(function () {
336
+ function F() { /* empty */ }
337
+ F.prototype.constructor = null;
338
+ // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
339
+ return Object.getPrototypeOf(new F()) !== F.prototype;
340
+ });
341
+
342
+ var hasOwn$1 = hasOwnProperty_1;
343
+ var isCallable$2 = isCallable$3;
344
+ var toObject = toObject$2;
345
+ var sharedKey = sharedKey$1;
346
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
347
+
348
+ var IE_PROTO = sharedKey('IE_PROTO');
349
+ var $Object = Object;
350
+ var ObjectPrototype = $Object.prototype;
351
+
352
+ // `Object.getPrototypeOf` method
353
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
354
+ // eslint-disable-next-line es-x/no-object-getprototypeof -- safe
355
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
356
+ var object = toObject(O);
357
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
358
+ var constructor = object.constructor;
359
+ if (isCallable$2(constructor) && object instanceof constructor) {
360
+ return constructor.prototype;
361
+ } return object instanceof $Object ? ObjectPrototype : null;
362
+ };
363
+
364
+ 'use strict';
365
+ var fails = fails$2;
366
+ var isCallable$1 = isCallable$3;
367
+ var create$1 = objectCreate;
368
+ var getPrototypeOf$1 = objectGetPrototypeOf;
369
+ var defineBuiltIn$1 = defineBuiltIn$2;
370
+ var wellKnownSymbol$2 = wellKnownSymbol$6;
371
+ var IS_PURE$1 = isPure;
372
+
373
+ var ITERATOR$1 = wellKnownSymbol$2('iterator');
374
+ var BUGGY_SAFARI_ITERATORS$1 = false;
375
+
376
+ // `%IteratorPrototype%` object
377
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
378
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
379
+
380
+ /* eslint-disable es-x/no-array-prototype-keys -- safe */
381
+ if ([].keys) {
382
+ arrayIterator = [].keys();
383
+ // Safari 8 has buggy iterators w/o `next`
384
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
385
+ else {
386
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
387
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
388
+ }
389
+ }
390
+
391
+ var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails(function () {
392
+ var test = {};
393
+ // FF44- legacy iterators case
394
+ return IteratorPrototype$2[ITERATOR$1].call(test) !== test;
395
+ });
396
+
397
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
398
+ else if (IS_PURE$1) IteratorPrototype$2 = create$1(IteratorPrototype$2);
399
+
400
+ // `%IteratorPrototype%[@@iterator]()` method
401
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
402
+ if (!isCallable$1(IteratorPrototype$2[ITERATOR$1])) {
403
+ defineBuiltIn$1(IteratorPrototype$2, ITERATOR$1, function () {
404
+ return this;
405
+ });
406
+ }
407
+
408
+ var iteratorsCore = {
409
+ IteratorPrototype: IteratorPrototype$2,
410
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
411
+ };
412
+
413
+ var defineProperty = objectDefineProperty.f;
414
+ var hasOwn = hasOwnProperty_1;
415
+ var wellKnownSymbol$1 = wellKnownSymbol$6;
416
+
417
+ var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
418
+
419
+ var setToStringTag$2 = function (target, TAG, STATIC) {
420
+ if (target && !STATIC) target = target.prototype;
421
+ if (target && !hasOwn(target, TO_STRING_TAG)) {
422
+ defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
423
+ }
424
+ };
425
+
426
+ 'use strict';
427
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
428
+ var create = objectCreate;
429
+ var createPropertyDescriptor = createPropertyDescriptor$1;
430
+ var setToStringTag$1 = setToStringTag$2;
431
+ var Iterators$1 = iterators;
432
+
433
+ var returnThis$1 = function () { return this; };
434
+
435
+ var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
436
+ var TO_STRING_TAG = NAME + ' Iterator';
437
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
438
+ setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false, true);
439
+ Iterators$1[TO_STRING_TAG] = returnThis$1;
440
+ return IteratorConstructor;
441
+ };
442
+
443
+ 'use strict';
444
+ var $ = _export;
445
+ var call = functionCall;
446
+ var IS_PURE = isPure;
447
+ var FunctionName = functionName;
448
+ var isCallable = isCallable$3;
449
+ var createIteratorConstructor = createIteratorConstructor$1;
450
+ var getPrototypeOf = objectGetPrototypeOf;
451
+ var setPrototypeOf = objectSetPrototypeOf;
452
+ var setToStringTag = setToStringTag$2;
453
+ var createNonEnumerableProperty = createNonEnumerableProperty$2;
454
+ var defineBuiltIn = defineBuiltIn$2;
455
+ var wellKnownSymbol = wellKnownSymbol$6;
456
+ var Iterators = iterators;
457
+ var IteratorsCore = iteratorsCore;
458
+
459
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
460
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
461
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
462
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
463
+ var ITERATOR = wellKnownSymbol('iterator');
464
+ var KEYS = 'keys';
465
+ var VALUES = 'values';
466
+ var ENTRIES = 'entries';
467
+
468
+ var returnThis = function () { return this; };
469
+
470
+ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
471
+ createIteratorConstructor(IteratorConstructor, NAME, next);
472
+
473
+ var getIterationMethod = function (KIND) {
474
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
475
+ if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
476
+ switch (KIND) {
477
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
478
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
479
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
480
+ } return function () { return new IteratorConstructor(this); };
481
+ };
482
+
483
+ var TO_STRING_TAG = NAME + ' Iterator';
484
+ var INCORRECT_VALUES_NAME = false;
485
+ var IterablePrototype = Iterable.prototype;
486
+ var nativeIterator = IterablePrototype[ITERATOR]
487
+ || IterablePrototype['@@iterator']
488
+ || DEFAULT && IterablePrototype[DEFAULT];
489
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
490
+ var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
491
+ var CurrentIteratorPrototype, methods, KEY;
492
+
493
+ // fix native
494
+ if (anyNativeIterator) {
495
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
496
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
497
+ if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
498
+ if (setPrototypeOf) {
499
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
500
+ } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {
501
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);
502
+ }
503
+ }
504
+ // Set @@toStringTag to native iterators
505
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
506
+ if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
507
+ }
508
+ }
509
+
510
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
511
+ if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
512
+ if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {
513
+ createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
514
+ } else {
515
+ INCORRECT_VALUES_NAME = true;
516
+ defaultIterator = function values() { return call(nativeIterator, this); };
517
+ }
518
+ }
519
+
520
+ // export additional methods
521
+ if (DEFAULT) {
522
+ methods = {
523
+ values: getIterationMethod(VALUES),
524
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
525
+ entries: getIterationMethod(ENTRIES)
526
+ };
527
+ if (FORCED) for (KEY in methods) {
528
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
529
+ defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
530
+ }
531
+ } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
532
+ }
533
+
534
+ // define iterator
535
+ if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
536
+ defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });
537
+ }
538
+ Iterators[NAME] = defaultIterator;
539
+
540
+ return methods;
541
+ };
542
+
543
+ 'use strict';
544
+ var charAt = stringMultibyte.charAt;
545
+ var toString = toString$2;
546
+ var InternalStateModule = internalState;
547
+ var defineIterator = defineIterator$1;
548
+
549
+ var STRING_ITERATOR = 'String Iterator';
550
+ var setInternalState = InternalStateModule.set;
551
+ var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
552
+
553
+ // `String.prototype[@@iterator]` method
554
+ // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
555
+ defineIterator(String, 'String', function (iterated) {
556
+ setInternalState(this, {
557
+ type: STRING_ITERATOR,
558
+ string: toString(iterated),
559
+ index: 0
560
+ });
561
+ // `%StringIteratorPrototype%.next` method
562
+ // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
563
+ }, function next() {
564
+ var state = getInternalState(this);
565
+ var string = state.string;
566
+ var index = state.index;
567
+ var point;
568
+ if (index >= string.length) return { value: undefined, done: true };
569
+ point = charAt(string, index);
570
+ state.index += point.length;
571
+ return { value: point, done: false };
572
+ });
573
+
574
+ var lazyLoadDirective = {
575
+ mounted: function mounted(el) {
576
+ var loadImage = function loadImage() {
577
+ var imageElement = Array.from(el.children).find(function (element) {
578
+ return element.nodeName === 'IMG';
579
+ });
580
+
581
+ if (imageElement) {
582
+ var type = el.getAttribute('type');
583
+ var url = imageElement.dataset.url;
584
+ imageElement.addEventListener('load', function () {
585
+ setTimeout(function () {
586
+ return el.classList.add('fw-image--loaded');
587
+ }, 100);
588
+ setTimeout(function () {
589
+ var _el$querySelector;
590
+
591
+ return (_el$querySelector = el.querySelector('.fw-image--loading')) === null || _el$querySelector === void 0 ? void 0 : _el$querySelector.remove();
592
+ }, 600);
593
+ });
594
+
595
+ if (url) {
596
+ imageElement.src = url;
597
+ }
598
+
599
+ if (type === 'background') {
600
+ el.style.backgroundImage = "url('".concat(url, "')");
601
+ imageElement.remove();
602
+ }
603
+
604
+ imageElement.addEventListener('error', function () {
605
+ setTimeout(function () {
606
+ return el.classList.add('fw-image--loaded-error');
607
+ }, 100);
608
+ setTimeout(function () {
609
+ var _el$querySelector2;
610
+
611
+ return (_el$querySelector2 = el.querySelector('.fw-image--loading')) === null || _el$querySelector2 === void 0 ? void 0 : _el$querySelector2.remove();
612
+ }, 600);
613
+ });
614
+ }
615
+ };
616
+
617
+ var handleIntersect = function handleIntersect(entries, observer) {
618
+ entries.forEach(function (entry) {
619
+ if (entry.isIntersecting) {
620
+ loadImage();
621
+ observer.unobserve(el);
622
+ }
623
+ });
624
+ };
625
+
626
+ var createObserver = function createObserver() {
627
+ var options = {
628
+ root: null,
629
+ threshold: Number(el.getAttribute('threshold')) || 0
630
+ };
631
+ var observer = new IntersectionObserver(handleIntersect, options);
632
+ observer.observe(el);
633
+ };
634
+
635
+ if (window.IntersectionObserver) {
636
+ createObserver();
637
+ } else {
638
+ loadImage();
639
+ }
640
+ }
641
+ };
642
+
643
+ var script = defineComponent({
644
+ name: 'FwImage',
645
+ directives: {
646
+ lazyload: lazyLoadDirective
647
+ },
648
+ components: {
649
+ FwLoadingBar: script$1,
650
+ FileExclamationSvg: render$1
651
+ },
652
+ props: {
653
+ /**
654
+ * The src attribute of the image
655
+ */
656
+ src: String,
657
+
658
+ /**
659
+ * The alt attribute of the image
660
+ */
661
+ alt: String,
662
+
663
+ /**
664
+ * The type of component. Accepts 'background' and defaults to the native html5 element.
665
+ */
666
+ type: {
667
+ type: String,
668
+ "default": 'native',
669
+ validator: function validator(value) {
670
+ return ['native', 'background'].includes(value);
671
+ }
672
+ },
673
+
674
+ /**
675
+ * Whether the loading bar and error state are rounded.
676
+ */
677
+ rounded: {
678
+ type: Boolean,
679
+ "default": false
680
+ },
681
+
682
+ /**
683
+ * The class for the native image element
684
+ */
685
+ imageClass: {
686
+ type: String
687
+ },
688
+
689
+ /**
690
+ * Controls the threshold before the component triggers the src url.
691
+ */
692
+ threshold: {
693
+ type: Number,
694
+ "default": 0
695
+ }
696
+ },
697
+ setup: function setup(props) {
698
+ var isBackground = computed(function () {
699
+ return props.type === 'background';
700
+ });
701
+ var fwImageRef = ref(null);
702
+ return {
703
+ fwImageRef: fwImageRef,
704
+ isBackground: isBackground
705
+ };
706
+ }
707
+ });
708
+
709
+ var _hoisted_1 = ["type", "threshold"];
710
+ var _hoisted_2 = ["data-url", "alt"];
711
+ var _hoisted_3 = {
712
+ "class": "fw-image--error-wrapper flex flex-col items-center justify-center"
713
+ };
714
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
715
+ var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
716
+
717
+ var _component_FileExclamationSvg = resolveComponent("FileExclamationSvg");
718
+
719
+ var _directive_lazyload = resolveDirective("lazyload");
720
+
721
+ return withDirectives((openBlock(), createElementBlock("div", {
722
+ ref: "fwImageRef",
723
+ type: _ctx.type,
724
+ threshold: _ctx.threshold,
725
+ "class": normalizeClass(["fw-image", {
726
+ 'fw-image--background': _ctx.isBackground,
727
+ 'rounded-full': _ctx.rounded
728
+ }]),
729
+ onClick: _cache[0] || (_cache[0] = function ($event) {
730
+ return _ctx.$emit('click', $event);
731
+ }),
732
+ onKeyup: _cache[1] || (_cache[1] = withKeys(function ($event) {
733
+ return _ctx.$emit('click', $event);
734
+ }, ["enter"])),
735
+ onMouseover: _cache[2] || (_cache[2] = function ($event) {
736
+ return _ctx.$emit('mouseover');
737
+ }),
738
+ onMouseout: _cache[3] || (_cache[3] = function ($event) {
739
+ return _ctx.$emit('mouseout');
740
+ }),
741
+ onFocusin: _cache[4] || (_cache[4] = function ($event) {
742
+ return _ctx.$emit('mouseover');
743
+ }),
744
+ onFocusout: _cache[5] || (_cache[5] = function ($event) {
745
+ return _ctx.$emit('mouseout');
746
+ })
747
+ }, [createElementVNode("img", {
748
+ "data-url": _ctx.src,
749
+ alt: _ctx.alt,
750
+ "class": normalizeClass(_ctx.imageClass)
751
+ }, null, 10, _hoisted_2), createVNode(_component_FwLoadingBar, {
752
+ "class": normalizeClass(["fw-image--loading w-full h-full", {
753
+ 'rounded-full': _ctx.rounded
754
+ }])
755
+ }, null, 8, ["class"]), createElementVNode("div", {
756
+ "class": normalizeClass(["fw-image--error bg-grey-20", {
757
+ 'rounded-full': _ctx.rounded
758
+ }])
759
+ }, [createElementVNode("div", _hoisted_3, [createVNode(_component_FileExclamationSvg, {
760
+ "class": "w-full h-full scale-[0.3] opacity-80 text-alert max-w-[150px]"
761
+ })])], 2), renderSlot(_ctx.$slots, "default")], 42, _hoisted_1)), [[_directive_lazyload]]);
762
+ }
763
+
764
+ var css_248z = ".fw-image{position:relative}.fw-image img{-webkit-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.fw-image img,.fw-image--error{opacity:0;visibility:hidden;width:100%}.fw-image--error{height:100%;left:0;position:relative;position:absolute;top:0;-webkit-transition:all .5s ease-in;-o-transition:all .5s ease-in;transition:all .5s ease-in}.fw-image--error-wrapper{font-size:inherit;left:50%;position:absolute;text-align:center;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:100%}.fw-image--loading{height:100%;left:0;position:absolute!important;top:0;-webkit-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out;width:100%}.fw-image--loaded img,.fw-image--loading{opacity:1;visibility:visible}.fw-image--loaded .fw-image--loading{opacity:0;visibility:hidden;width:100%}.fw-image--loaded-error img{display:none}.fw-image--loaded-error .fw-image--error{opacity:1;visibility:visible}.fw-image--background{background-position:50%;background-repeat:no-repeat;background-size:cover}";
765
+ var stylesheet = ".fw-image{position:relative}.fw-image img{-webkit-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.fw-image img,.fw-image--error{opacity:0;visibility:hidden;width:100%}.fw-image--error{height:100%;left:0;position:relative;position:absolute;top:0;-webkit-transition:all .5s ease-in;-o-transition:all .5s ease-in;transition:all .5s ease-in}.fw-image--error-wrapper{font-size:inherit;left:50%;position:absolute;text-align:center;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:100%}.fw-image--loading{height:100%;left:0;position:absolute!important;top:0;-webkit-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out;width:100%}.fw-image--loaded img,.fw-image--loading{opacity:1;visibility:visible}.fw-image--loaded .fw-image--loading{opacity:0;visibility:hidden;width:100%}.fw-image--loaded-error img{display:none}.fw-image--loaded-error .fw-image--error{opacity:1;visibility:visible}.fw-image--background{background-position:50%;background-repeat:no-repeat;background-size:cover}";
766
+ styleInject(css_248z);
767
+
768
+ script.render = render;
769
+
770
+ export { script as s };