@frollo/frollo-web-ui 1.2.3 → 1.2.5

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 (51) hide show
  1. package/cjs/index.js +1451 -719
  2. package/esm/{add-to-unscopables-44076600.js → add-to-unscopables-a5032b1d.js} +4 -4
  3. package/esm/{array-iteration-10670eca.js → array-iteration-4f83e223.js} +4 -4
  4. package/esm/{classof-b2d09c70.js → classof-088c9833.js} +2 -2
  5. package/esm/create-property-da6d232b.js +26 -0
  6. package/esm/es.array.find-54b8f84b.js +52 -0
  7. package/esm/{es.array.includes-b402df81.js → es.array.includes-9a6e4066.js} +4 -4
  8. package/esm/{es.function.name-383fcdbc.js → es.function.name-2fa3a718.js} +1 -1
  9. package/esm/{es.number.constructor-6def8fd9.js → es.number.constructor-b7faae1f.js} +5 -3
  10. package/esm/{function-name-0d296891.js → function-name-c49146fc.js} +1 -1
  11. package/esm/fw-animations.js +5 -5
  12. package/esm/{fw-button-fb8e3fe2.js → fw-button-d5d2cf19.js} +1 -1
  13. package/esm/fw-button.js +6 -6
  14. package/esm/fw-checkbox.js +2 -2
  15. package/esm/fw-dropdown.js +9 -54
  16. package/esm/fw-image.js +848 -0
  17. package/esm/fw-input.js +6 -6
  18. package/esm/fw-loading-bar-da7d53fb.js +22 -0
  19. package/esm/fw-loading.js +96 -0
  20. package/esm/fw-modal.js +7 -7
  21. package/esm/fw-navigation-menu.js +6 -6
  22. package/esm/fw-progress-bar.js +5 -5
  23. package/esm/fw-table.js +466 -8
  24. package/esm/fw-tabs.js +8 -8
  25. package/esm/fw-tag.js +5 -5
  26. package/esm/{index-26d82b11.js → index-7d8c95be.js} +2 -2
  27. package/esm/{index-ed9adbea.js → index-b3aa1664.js} +94 -80
  28. package/esm/index.js +36 -199
  29. package/esm/{is-forced-2369382d.js → is-forced-fd46b5f2.js} +2 -2
  30. package/esm/{object-keys-f9d76c12.js → object-keys-3c73c404.js} +2 -2
  31. package/esm/{to-string-2588bbbe.js → to-string-c2bd1f4d.js} +2 -2
  32. package/frollo-web-ui.esm.js +1635 -829
  33. package/icons/index.ts +3 -1
  34. package/icons/user.svg +3 -0
  35. package/index.d.ts +149 -17
  36. package/package.json +1 -1
  37. package/types/components/fw-image/fw-image.vue.d.ts +84 -0
  38. package/types/components/fw-image/index.d.ts +2 -0
  39. package/types/components/fw-image/index.types.d.ts +8 -0
  40. package/types/components/fw-loading/fw-loading-bar.vue.d.ts +2 -0
  41. package/types/components/fw-loading/fw-loading-card.vue.d.ts +2 -0
  42. package/types/components/fw-loading/fw-loading-table.vue.d.ts +25 -0
  43. package/types/components/fw-loading/index.d.ts +4 -0
  44. package/types/components/fw-table/fw-table.vue.d.ts +11 -1
  45. package/types/components/fw-table/index.types.d.ts +1 -0
  46. package/types/components/index.d.ts +2 -0
  47. package/types/components/index.types.d.ts +1 -0
  48. package/types/directives/index.d.ts +2 -0
  49. package/types/directives/lazy-loader.d.ts +3 -0
  50. package/types/icons/index.d.ts +2 -1
  51. package/esm/index-2ee67707.js +0 -454
@@ -1,454 +0,0 @@
1
- import { c as fails$3, t as toObject$2, h as tryToString$1, j as toPropertyKey$1, o as objectDefineProperty, e as engineUserAgent, f as functionUncurryThis, k as aCallable$1, l as engineV8Version } from './function-name-0d296891.js';
2
- import { _ as _export, o as objectKeys } from './object-keys-f9d76c12.js';
3
- import { a as createPropertyDescriptor$1, b as toAbsoluteIndex$1, l as lengthOfArrayLike$2 } from './is-forced-2369382d.js';
4
- import { t as toString$1 } from './to-string-2588bbbe.js';
5
- import { a as render$3 } from './index-ed9adbea.js';
6
- import { defineComponent, computed, ref, resolveComponent, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, withKeys, toDisplayString, createVNode, createCommentVNode, renderSlot } from 'vue';
7
-
8
- 'use strict';
9
- var fails$2 = fails$3;
10
-
11
- var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
12
- var method = [][METHOD_NAME];
13
- return !!method && fails$2(function () {
14
- // eslint-disable-next-line no-useless-call -- required for testing
15
- method.call(null, argument || function () { return 1; }, 1);
16
- });
17
- };
18
-
19
- var es_object_keys = {};
20
-
21
- var $$1 = _export;
22
- var toObject$1 = toObject$2;
23
- var nativeKeys = objectKeys;
24
- var fails$1 = fails$3;
25
-
26
- var FAILS_ON_PRIMITIVES = fails$1(function () { nativeKeys(1); });
27
-
28
- // `Object.keys` method
29
- // https://tc39.es/ecma262/#sec-object.keys
30
- $$1({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
31
- keys: function keys(it) {
32
- return nativeKeys(toObject$1(it));
33
- }
34
- });
35
-
36
- var es_array_sort = {};
37
-
38
- 'use strict';
39
- var tryToString = tryToString$1;
40
-
41
- var $TypeError = TypeError;
42
-
43
- var deletePropertyOrThrow$1 = function (O, P) {
44
- if (!delete O[P]) throw $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
45
- };
46
-
47
- 'use strict';
48
- var toPropertyKey = toPropertyKey$1;
49
- var definePropertyModule = objectDefineProperty;
50
- var createPropertyDescriptor = createPropertyDescriptor$1;
51
-
52
- var createProperty$1 = function (object, key, value) {
53
- var propertyKey = toPropertyKey(key);
54
- if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
55
- else object[propertyKey] = value;
56
- };
57
-
58
- var toAbsoluteIndex = toAbsoluteIndex$1;
59
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
60
- var createProperty = createProperty$1;
61
-
62
- var $Array = Array;
63
- var max = Math.max;
64
-
65
- var arraySliceSimple = function (O, start, end) {
66
- var length = lengthOfArrayLike$1(O);
67
- var k = toAbsoluteIndex(start, length);
68
- var fin = toAbsoluteIndex(end === undefined ? length : end, length);
69
- var result = $Array(max(fin - k, 0));
70
- for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
71
- result.length = n;
72
- return result;
73
- };
74
-
75
- var arraySlice = arraySliceSimple;
76
-
77
- var floor = Math.floor;
78
-
79
- var mergeSort = function (array, comparefn) {
80
- var length = array.length;
81
- var middle = floor(length / 2);
82
- return length < 8 ? insertionSort(array, comparefn) : merge(
83
- array,
84
- mergeSort(arraySlice(array, 0, middle), comparefn),
85
- mergeSort(arraySlice(array, middle), comparefn),
86
- comparefn
87
- );
88
- };
89
-
90
- var insertionSort = function (array, comparefn) {
91
- var length = array.length;
92
- var i = 1;
93
- var element, j;
94
-
95
- while (i < length) {
96
- j = i;
97
- element = array[i];
98
- while (j && comparefn(array[j - 1], element) > 0) {
99
- array[j] = array[--j];
100
- }
101
- if (j !== i++) array[j] = element;
102
- } return array;
103
- };
104
-
105
- var merge = function (array, left, right, comparefn) {
106
- var llength = left.length;
107
- var rlength = right.length;
108
- var lindex = 0;
109
- var rindex = 0;
110
-
111
- while (lindex < llength || rindex < rlength) {
112
- array[lindex + rindex] = (lindex < llength && rindex < rlength)
113
- ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
114
- : lindex < llength ? left[lindex++] : right[rindex++];
115
- } return array;
116
- };
117
-
118
- var arraySort = mergeSort;
119
-
120
- var userAgent$1 = engineUserAgent;
121
-
122
- var firefox = userAgent$1.match(/firefox\/(\d+)/i);
123
-
124
- var engineFfVersion = !!firefox && +firefox[1];
125
-
126
- var UA = engineUserAgent;
127
-
128
- var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
129
-
130
- var userAgent = engineUserAgent;
131
-
132
- var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
133
-
134
- var engineWebkitVersion = !!webkit && +webkit[1];
135
-
136
- 'use strict';
137
- var $ = _export;
138
- var uncurryThis = functionUncurryThis;
139
- var aCallable = aCallable$1;
140
- var toObject = toObject$2;
141
- var lengthOfArrayLike = lengthOfArrayLike$2;
142
- var deletePropertyOrThrow = deletePropertyOrThrow$1;
143
- var toString = toString$1;
144
- var fails = fails$3;
145
- var internalSort = arraySort;
146
- var arrayMethodIsStrict = arrayMethodIsStrict$1;
147
- var FF = engineFfVersion;
148
- var IE_OR_EDGE = engineIsIeOrEdge;
149
- var V8 = engineV8Version;
150
- var WEBKIT = engineWebkitVersion;
151
-
152
- var test = [];
153
- var un$Sort = uncurryThis(test.sort);
154
- var push = uncurryThis(test.push);
155
-
156
- // IE8-
157
- var FAILS_ON_UNDEFINED = fails(function () {
158
- test.sort(undefined);
159
- });
160
- // V8 bug
161
- var FAILS_ON_NULL = fails(function () {
162
- test.sort(null);
163
- });
164
- // Old WebKit
165
- var STRICT_METHOD = arrayMethodIsStrict('sort');
166
-
167
- var STABLE_SORT = !fails(function () {
168
- // feature detection can be too slow, so check engines versions
169
- if (V8) return V8 < 70;
170
- if (FF && FF > 3) return;
171
- if (IE_OR_EDGE) return true;
172
- if (WEBKIT) return WEBKIT < 603;
173
-
174
- var result = '';
175
- var code, chr, value, index;
176
-
177
- // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
178
- for (code = 65; code < 76; code++) {
179
- chr = String.fromCharCode(code);
180
-
181
- switch (code) {
182
- case 66: case 69: case 70: case 72: value = 3; break;
183
- case 68: case 71: value = 4; break;
184
- default: value = 2;
185
- }
186
-
187
- for (index = 0; index < 47; index++) {
188
- test.push({ k: chr + index, v: value });
189
- }
190
- }
191
-
192
- test.sort(function (a, b) { return b.v - a.v; });
193
-
194
- for (index = 0; index < test.length; index++) {
195
- chr = test[index].k.charAt(0);
196
- if (result.charAt(result.length - 1) !== chr) result += chr;
197
- }
198
-
199
- return result !== 'DGBEFHACIJK';
200
- });
201
-
202
- var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
203
-
204
- var getSortCompare = function (comparefn) {
205
- return function (x, y) {
206
- if (y === undefined) return -1;
207
- if (x === undefined) return 1;
208
- if (comparefn !== undefined) return +comparefn(x, y) || 0;
209
- return toString(x) > toString(y) ? 1 : -1;
210
- };
211
- };
212
-
213
- // `Array.prototype.sort` method
214
- // https://tc39.es/ecma262/#sec-array.prototype.sort
215
- $({ target: 'Array', proto: true, forced: FORCED }, {
216
- sort: function sort(comparefn) {
217
- if (comparefn !== undefined) aCallable(comparefn);
218
-
219
- var array = toObject(this);
220
-
221
- if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
222
-
223
- var items = [];
224
- var arrayLength = lengthOfArrayLike(array);
225
- var itemsLength, index;
226
-
227
- for (index = 0; index < arrayLength; index++) {
228
- if (index in array) push(items, array[index]);
229
- }
230
-
231
- internalSort(items, getSortCompare(comparefn));
232
-
233
- itemsLength = items.length;
234
- index = 0;
235
-
236
- while (index < itemsLength) array[index] = items[index++];
237
- while (index < arrayLength) deletePropertyOrThrow(array, index++);
238
-
239
- return array;
240
- }
241
- });
242
-
243
- var script$2 = defineComponent({
244
- name: 'FwTable',
245
- components: {
246
- CaretDownSvg: render$3
247
- },
248
- props: {
249
- items: {
250
- type: Array,
251
- required: true
252
- },
253
- options: {
254
- type: Object,
255
- required: false
256
- }
257
- },
258
- setup: function setup(props) {
259
- var columns = computed(function () {
260
- return Object.keys(props.items[0]);
261
- });
262
- var sortBy = ref('');
263
- var sortDirection = ref('asc');
264
- var currentSortedColumn = ref('');
265
-
266
- var sortColumn = function sortColumn(column) {
267
- if (!isColumnSortable(column)) return;
268
- currentSortedColumn.value = column;
269
-
270
- if (sortBy.value === column) {
271
- sortDirection.value = sortDirection.value === 'asc' ? 'desc' : 'asc';
272
- } else {
273
- sortBy.value = column;
274
- sortDirection.value = 'asc';
275
- }
276
- };
277
-
278
- var sortedData = computed(function () {
279
- if (!sortBy.value) {
280
- return props.items;
281
- }
282
-
283
- var data = props.items;
284
- data.sort(function (a, b) {
285
- var sortVal = a[sortBy.value] > b[sortBy.value] ? 1 : -1;
286
- return sortDirection.value === 'asc' ? sortVal : -sortVal;
287
- });
288
- return data;
289
- });
290
-
291
- var formattedText = function formattedText(row, column) {
292
- var _props$options$column;
293
-
294
- if (props.options && props.options[column] && (_props$options$column = props.options[column]) !== null && _props$options$column !== void 0 && _props$options$column.formatter) {
295
- var _props$options$column2;
296
-
297
- var colFormatter = (_props$options$column2 = props.options[column]) === null || _props$options$column2 === void 0 ? void 0 : _props$options$column2.formatter;
298
-
299
- if (colFormatter) {
300
- return colFormatter(row[column]);
301
- }
302
- }
303
-
304
- return row[column];
305
- };
306
-
307
- var sortedIcon = function sortedIcon(sortDir, column) {
308
- if (currentSortedColumn.value === column) {
309
- if (sortDirection.value === sortDir) {
310
- return 'text-body';
311
- }
312
- }
313
-
314
- return 'text-grey-light';
315
- };
316
-
317
- var isColumnSortable = function isColumnSortable(column) {
318
- if (props.options && props.options[column]) {
319
- var _props$options$column3;
320
-
321
- return (_props$options$column3 = props.options[column]) === null || _props$options$column3 === void 0 ? void 0 : _props$options$column3.isSortable;
322
- }
323
-
324
- return false;
325
- };
326
-
327
- var isDisabled = function isDisabled(column) {
328
- var _props$options$column4;
329
-
330
- if (props.options && (_props$options$column4 = props.options[column]) !== null && _props$options$column4 !== void 0 && _props$options$column4.disabled) {
331
- return true;
332
- }
333
-
334
- return false;
335
- };
336
-
337
- return {
338
- columns: columns,
339
- sortBy: sortBy,
340
- sortDirection: sortDirection,
341
- sortColumn: sortColumn,
342
- sortedData: sortedData,
343
- currentSortedColumn: currentSortedColumn,
344
- sortedIcon: sortedIcon,
345
- formattedText: formattedText,
346
- isColumnSortable: isColumnSortable,
347
- isDisabled: isDisabled
348
- };
349
- }
350
- });
351
-
352
- var _hoisted_1$2 = {
353
- "class": "table-auto table-responsive rounded border border-grey-40 border-spacing-px border-separate bg-grey-40"
354
- };
355
- var _hoisted_2$1 = {
356
- "class": "text-p-small bg-grey-20"
357
- };
358
- var _hoisted_3$1 = ["tabindex", "onKeydown", "onClick"];
359
- var _hoisted_4 = {
360
- "class": "flex flex-row items-center space-x-1"
361
- };
362
- var _hoisted_5 = {
363
- "class": "w-full"
364
- };
365
- var _hoisted_6 = {
366
- key: 0
367
- };
368
- var _hoisted_7 = {
369
- "class": "flex flex-col"
370
- };
371
- var _hoisted_8 = {
372
- "class": "text-p-small bg-white font-light"
373
- };
374
- var _hoisted_9 = ["innerHTML"];
375
- function render$2(_ctx, _cache, $props, $setup, $data, $options) {
376
- var _component_CaretDownSvg = resolveComponent("CaretDownSvg");
377
-
378
- return openBlock(), createElementBlock("table", _hoisted_1$2, [createElementVNode("thead", _hoisted_2$1, [createElementVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, thKey) {
379
- return openBlock(), createElementBlock(Fragment, {
380
- key: thKey
381
- }, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("th", {
382
- key: 0,
383
- "class": normalizeClass(["py-3 px-4 text-center", _ctx.isColumnSortable(column) ? 'cursor-pointer hover:bg-grey-40' : '']),
384
- tabindex: _ctx.isColumnSortable(column) ? 1 : -1,
385
- onKeydown: withKeys(function ($event) {
386
- return _ctx.sortColumn(column);
387
- }, ["enter", "space"]),
388
- onClick: function onClick($event) {
389
- return _ctx.sortColumn(column);
390
- }
391
- }, [createElementVNode("div", _hoisted_4, [createElementVNode("span", _hoisted_5, toDisplayString(column), 1), _ctx.isColumnSortable(column) ? (openBlock(), createElementBlock("span", _hoisted_6, [createElementVNode("span", _hoisted_7, [createVNode(_component_CaretDownSvg, {
392
- "class": normalizeClass(["inline-block w-[12px] rotate-180", _ctx.sortedIcon('asc', column)])
393
- }, null, 8, ["class"]), createVNode(_component_CaretDownSvg, {
394
- "class": normalizeClass(["inline-block w-[12px] mt-[2px]", _ctx.sortedIcon('desc', column)])
395
- }, null, 8, ["class"])])])) : createCommentVNode("", true)])], 42, _hoisted_3$1)) : createCommentVNode("", true)], 64);
396
- }), 128)), _ctx.$slots.head ? renderSlot(_ctx.$slots, "head", {
397
- key: 0
398
- }) : createCommentVNode("", true)])]), createElementVNode("tbody", _hoisted_8, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.sortedData, function (row, trKey) {
399
- return openBlock(), createElementBlock("tr", {
400
- "class": "border-b border-grey-40 hover:bg-grey-lightest",
401
- key: trKey
402
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, colKey) {
403
- return openBlock(), createElementBlock(Fragment, {
404
- key: colKey
405
- }, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("td", {
406
- key: 0,
407
- "class": "py-3 px-4 text-left whitespace-nowrap",
408
- innerHTML: _ctx.formattedText(row, column)
409
- }, null, 8, _hoisted_9)) : createCommentVNode("", true)], 64);
410
- }), 128)), _ctx.$slots.row ? renderSlot(_ctx.$slots, "row", {
411
- key: 0,
412
- row: row
413
- }) : createCommentVNode("", true)]);
414
- }), 128))])]);
415
- }
416
-
417
- script$2.render = render$2;
418
-
419
- var script$1 = defineComponent({
420
- name: 'FwTableHead'
421
- });
422
-
423
- var _hoisted_1$1 = {
424
- "class": "py-3 px-4 text-center"
425
- };
426
- var _hoisted_2 = {
427
- "class": "flex flex-row items-center space-x-1"
428
- };
429
- var _hoisted_3 = {
430
- key: 0,
431
- "class": "w-full"
432
- };
433
- function render$1(_ctx, _cache, $props, $setup, $data, $options) {
434
- return openBlock(), createElementBlock("th", _hoisted_1$1, [createElementVNode("div", _hoisted_2, [_ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_3, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)])]);
435
- }
436
-
437
- script$1.render = render$1;
438
-
439
- var script = defineComponent({
440
- name: 'FwTableRow'
441
- });
442
-
443
- var _hoisted_1 = {
444
- "class": "py-3 px-4 text-left whitespace-nowrap"
445
- };
446
- function render(_ctx, _cache, $props, $setup, $data, $options) {
447
- return openBlock(), createElementBlock("td", _hoisted_1, [_ctx.$slots["default"] ? renderSlot(_ctx.$slots, "default", {
448
- key: 0
449
- }) : createCommentVNode("", true)]);
450
- }
451
-
452
- script.render = render;
453
-
454
- export { arrayMethodIsStrict$1 as a, script$1 as b, script as c, script$2 as s };