@frollo/frollo-web-ui 2.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +17802 -1708
- package/esm/add-to-unscopables-2400f45b.js +25 -0
- package/esm/array-iteration-107f927f.js +92 -0
- package/esm/array-method-has-species-support-3d413468.js +23 -0
- package/esm/array-method-is-strict-055b1830.js +14 -0
- package/esm/array-species-create-a5f5503b.js +97 -0
- package/esm/{classof-088c9833.js → classof-39c30bd5.js} +1 -2
- package/esm/create-property-534611fd.js +14 -0
- package/esm/delete-property-or-throw-8032646c.js +31 -0
- package/esm/does-not-exceed-safe-integer-31d08811.js +11 -0
- package/esm/es.array.concat-987938be.js +69 -0
- package/esm/{es.array.find-54b8f84b.js → es.array.find-dfa1f42f.js} +5 -6
- package/esm/{es.array.includes-9a6e4066.js → es.array.includes-91be7771.js} +3 -4
- package/esm/{es.function.name-2fa3a718.js → es.function.name-557cb1f9.js} +1 -1
- package/esm/{es.number.constructor-b7faae1f.js → es.number.constructor-1249bd78.js} +2 -3
- package/esm/es.string.iterator-284b31d4.js +470 -0
- package/esm/{object-keys-3c73c404.js → export-a37ba078.js} +2 -13
- package/esm/function-apply-ce251590.js +14 -0
- package/esm/fw-accordion.js +2 -8
- package/esm/fw-animations.js +6 -20
- package/esm/fw-bar-chart.js +19 -0
- package/esm/{fw-button-765b9d52.js → fw-button-1486e2d9.js} +6 -24
- package/esm/fw-button.js +9 -8
- package/esm/fw-card-1b6a67fe.js +90 -0
- package/esm/fw-card.js +2 -95
- package/esm/fw-checkbox.js +27 -17
- package/esm/fw-dropdown.js +17 -33
- package/esm/fw-image-4727ac61.js +289 -0
- package/esm/fw-image.js +22 -847
- package/esm/fw-input.js +24 -25
- package/esm/fw-loading-bar-f5ca605c.js +22 -0
- package/esm/{fw-loading-spinner-01b9a040.js → fw-loading-spinner-df1627c0.js} +1 -2
- package/esm/fw-loading.js +6 -9
- package/esm/fw-modal.js +218 -11
- package/esm/fw-navigation-menu.js +11 -19
- package/esm/fw-progress-bar.js +4 -11
- package/esm/fw-table.js +12 -56
- package/esm/fw-tabs.js +60 -20
- package/esm/fw-tag.js +8 -8
- package/esm/fw-toast.js +276 -0
- package/esm/fw-transactions-card.js +115 -0
- package/esm/index-1a41e7bf.js +15838 -0
- package/esm/{index-7833cf39.js → index-4605e00e.js} +114 -86
- package/esm/index.js +87 -73
- package/esm/is-forced-752b5893.js +927 -0
- package/esm/{add-to-unscopables-a5032b1d.js → object-create-f6f3a673.js} +3 -25
- package/esm/object-keys-4f5bf4e7.js +13 -0
- package/esm/{to-string-c2bd1f4d.js → to-string-12728fd2.js} +2 -2
- package/esm/uniqueId-fe08534a.js +279 -0
- package/esm/web.timers-0f117224.js +72 -0
- package/frollo-web-ui.esm.js +18020 -1824
- package/icons/index.ts +5 -1
- package/icons/solid-check.svg +3 -0
- package/icons/solid-xmark.svg +3 -0
- package/index.d.ts +344 -22
- package/package.json +5 -1
- package/styles/web-components.scss +8 -0
- package/types/components/fw-bar-chart/fw-bar-chart.vue.d.ts +83 -0
- package/types/components/fw-bar-chart/index.d.ts +2 -0
- package/types/components/fw-bar-chart/index.types.d.ts +11 -0
- package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +3 -1
- package/types/components/fw-input/fw-input.vue.d.ts +1 -0
- package/types/components/fw-modal/fw-modal.vue.d.ts +16 -0
- package/types/components/fw-modal/index.types.d.ts +1 -0
- package/types/components/fw-toast/fw-toast.vue.d.ts +121 -0
- package/types/components/fw-toast/index.d.ts +2 -0
- package/types/components/fw-toast/index.types.d.ts +13 -0
- package/types/components/fw-transactions-card/fw-transactions-card.vue.d.ts +58 -0
- package/types/components/fw-transactions-card/index.d.ts +2 -0
- package/types/components/fw-transactions-card/index.types.d.ts +6 -0
- package/types/components/index.d.ts +3 -0
- package/types/components/index.types.d.ts +3 -0
- package/types/icons/index.d.ts +3 -1
- package/types/index.browser-umd.d.ts +1 -0
- package/types/services/index.d.ts +1 -0
- package/types/services/modal.d.ts +1 -1
- package/types/services/toast.d.ts +9 -0
- package/web-components/index.js +36612 -0
- package/esm/array-iteration-4f83e223.js +0 -186
- package/esm/create-property-da6d232b.js +0 -26
- package/esm/function-name-c49146fc.js +0 -492
- package/esm/fw-loading-bar-da7d53fb.js +0 -22
- package/esm/index-06f4e5f1.js +0 -482
- package/esm/is-forced-fd46b5f2.js +0 -438
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import './es.array.includes-91be7771.js';
|
|
2
|
+
import './es.number.constructor-1249bd78.js';
|
|
3
|
+
import { defineComponent, computed, ref, resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, withKeys, createElementVNode, createVNode, renderSlot } from 'vue';
|
|
4
|
+
import './es.array.find-dfa1f42f.js';
|
|
5
|
+
import './es.string.iterator-284b31d4.js';
|
|
6
|
+
import './web.timers-0f117224.js';
|
|
7
|
+
import { a as documentCreateElement$1, g as global$1, c as createNonEnumerableProperty$1 } from './is-forced-752b5893.js';
|
|
8
|
+
import { _ as _export } from './export-a37ba078.js';
|
|
9
|
+
import { a as arrayIteration } from './array-iteration-107f927f.js';
|
|
10
|
+
import { a as arrayMethodIsStrict$1 } from './array-method-is-strict-055b1830.js';
|
|
11
|
+
import { s as script$1 } from './fw-loading-bar-f5ca605c.js';
|
|
12
|
+
import { r as render$1 } from './index-4605e00e.js';
|
|
13
|
+
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
14
|
+
|
|
15
|
+
var es_array_forEach = {};
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
var $forEach = arrayIteration.forEach;
|
|
19
|
+
var arrayMethodIsStrict = arrayMethodIsStrict$1;
|
|
20
|
+
|
|
21
|
+
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
|
22
|
+
|
|
23
|
+
// `Array.prototype.forEach` method implementation
|
|
24
|
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
25
|
+
var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
|
26
|
+
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
27
|
+
// eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
|
|
28
|
+
} : [].forEach;
|
|
29
|
+
|
|
30
|
+
'use strict';
|
|
31
|
+
var $ = _export;
|
|
32
|
+
var forEach$1 = arrayForEach;
|
|
33
|
+
|
|
34
|
+
// `Array.prototype.forEach` method
|
|
35
|
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
36
|
+
// eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
|
|
37
|
+
$({ target: 'Array', proto: true, forced: [].forEach != forEach$1 }, {
|
|
38
|
+
forEach: forEach$1
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var web_domCollections_forEach = {};
|
|
42
|
+
|
|
43
|
+
// iterable DOM collections
|
|
44
|
+
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
45
|
+
var domIterables = {
|
|
46
|
+
CSSRuleList: 0,
|
|
47
|
+
CSSStyleDeclaration: 0,
|
|
48
|
+
CSSValueList: 0,
|
|
49
|
+
ClientRectList: 0,
|
|
50
|
+
DOMRectList: 0,
|
|
51
|
+
DOMStringList: 0,
|
|
52
|
+
DOMTokenList: 1,
|
|
53
|
+
DataTransferItemList: 0,
|
|
54
|
+
FileList: 0,
|
|
55
|
+
HTMLAllCollection: 0,
|
|
56
|
+
HTMLCollection: 0,
|
|
57
|
+
HTMLFormElement: 0,
|
|
58
|
+
HTMLSelectElement: 0,
|
|
59
|
+
MediaList: 0,
|
|
60
|
+
MimeTypeArray: 0,
|
|
61
|
+
NamedNodeMap: 0,
|
|
62
|
+
NodeList: 1,
|
|
63
|
+
PaintRequestList: 0,
|
|
64
|
+
Plugin: 0,
|
|
65
|
+
PluginArray: 0,
|
|
66
|
+
SVGLengthList: 0,
|
|
67
|
+
SVGNumberList: 0,
|
|
68
|
+
SVGPathSegList: 0,
|
|
69
|
+
SVGPointList: 0,
|
|
70
|
+
SVGStringList: 0,
|
|
71
|
+
SVGTransformList: 0,
|
|
72
|
+
SourceBufferList: 0,
|
|
73
|
+
StyleSheetList: 0,
|
|
74
|
+
TextTrackCueList: 0,
|
|
75
|
+
TextTrackList: 0,
|
|
76
|
+
TouchList: 0
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
|
80
|
+
var documentCreateElement = documentCreateElement$1;
|
|
81
|
+
|
|
82
|
+
var classList = documentCreateElement('span').classList;
|
|
83
|
+
var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
|
|
84
|
+
|
|
85
|
+
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
86
|
+
|
|
87
|
+
var global = global$1;
|
|
88
|
+
var DOMIterables = domIterables;
|
|
89
|
+
var DOMTokenListPrototype = domTokenListPrototype;
|
|
90
|
+
var forEach = arrayForEach;
|
|
91
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$1;
|
|
92
|
+
|
|
93
|
+
var handlePrototype = function (CollectionPrototype) {
|
|
94
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
95
|
+
if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
|
|
96
|
+
createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
|
|
97
|
+
} catch (error) {
|
|
98
|
+
CollectionPrototype.forEach = forEach;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
for (var COLLECTION_NAME in DOMIterables) {
|
|
103
|
+
if (DOMIterables[COLLECTION_NAME]) {
|
|
104
|
+
handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
handlePrototype(DOMTokenListPrototype);
|
|
109
|
+
|
|
110
|
+
var lazyLoadDirective = {
|
|
111
|
+
mounted: function mounted(el) {
|
|
112
|
+
var loadImage = function loadImage() {
|
|
113
|
+
var imageElement = Array.from(el.children).find(function (element) {
|
|
114
|
+
return element.nodeName === 'IMG';
|
|
115
|
+
});
|
|
116
|
+
if (imageElement) {
|
|
117
|
+
var type = el.getAttribute('type');
|
|
118
|
+
var url = imageElement.dataset.url;
|
|
119
|
+
imageElement.addEventListener('load', function () {
|
|
120
|
+
setTimeout(function () {
|
|
121
|
+
return el.classList.add('fw-image--loaded');
|
|
122
|
+
}, 100);
|
|
123
|
+
setTimeout(function () {
|
|
124
|
+
var _el$querySelector;
|
|
125
|
+
return (_el$querySelector = el.querySelector('.fw-image--loading')) === null || _el$querySelector === void 0 ? void 0 : _el$querySelector.remove();
|
|
126
|
+
}, 600);
|
|
127
|
+
});
|
|
128
|
+
if (url) {
|
|
129
|
+
imageElement.src = url;
|
|
130
|
+
}
|
|
131
|
+
if (type === 'background') {
|
|
132
|
+
el.style.backgroundImage = "url('".concat(url, "')");
|
|
133
|
+
imageElement.remove();
|
|
134
|
+
}
|
|
135
|
+
imageElement.addEventListener('error', function () {
|
|
136
|
+
setTimeout(function () {
|
|
137
|
+
return el.classList.add('fw-image--loaded-error');
|
|
138
|
+
}, 100);
|
|
139
|
+
setTimeout(function () {
|
|
140
|
+
var _el$querySelector2;
|
|
141
|
+
return (_el$querySelector2 = el.querySelector('.fw-image--loading')) === null || _el$querySelector2 === void 0 ? void 0 : _el$querySelector2.remove();
|
|
142
|
+
}, 600);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
var handleIntersect = function handleIntersect(entries, observer) {
|
|
147
|
+
entries.forEach(function (entry) {
|
|
148
|
+
if (entry.isIntersecting) {
|
|
149
|
+
loadImage();
|
|
150
|
+
observer.unobserve(el);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
var createObserver = function createObserver() {
|
|
155
|
+
var options = {
|
|
156
|
+
root: null,
|
|
157
|
+
threshold: Number(el.getAttribute('threshold')) || 0
|
|
158
|
+
};
|
|
159
|
+
var observer = new IntersectionObserver(handleIntersect, options);
|
|
160
|
+
observer.observe(el);
|
|
161
|
+
};
|
|
162
|
+
if (window.IntersectionObserver) {
|
|
163
|
+
createObserver();
|
|
164
|
+
} else {
|
|
165
|
+
loadImage();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
var script = defineComponent({
|
|
171
|
+
name: 'FwImage',
|
|
172
|
+
directives: {
|
|
173
|
+
lazyload: lazyLoadDirective
|
|
174
|
+
},
|
|
175
|
+
components: {
|
|
176
|
+
FwLoadingBar: script$1,
|
|
177
|
+
FileExclamationSvg: render$1
|
|
178
|
+
},
|
|
179
|
+
props: {
|
|
180
|
+
/**
|
|
181
|
+
* The src attribute of the image
|
|
182
|
+
*/
|
|
183
|
+
src: String,
|
|
184
|
+
/**
|
|
185
|
+
* The alt attribute of the image
|
|
186
|
+
*/
|
|
187
|
+
alt: String,
|
|
188
|
+
/**
|
|
189
|
+
* The type of component. Accepts 'background' and defaults to the native html5 element.
|
|
190
|
+
*/
|
|
191
|
+
type: {
|
|
192
|
+
type: String,
|
|
193
|
+
"default": 'native',
|
|
194
|
+
validator: function validator(value) {
|
|
195
|
+
return ['native', 'background'].includes(value);
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
/**
|
|
199
|
+
* Whether the loading bar and error state are rounded.
|
|
200
|
+
*/
|
|
201
|
+
rounded: {
|
|
202
|
+
type: Boolean,
|
|
203
|
+
"default": false
|
|
204
|
+
},
|
|
205
|
+
/**
|
|
206
|
+
* The class for the native image element
|
|
207
|
+
*/
|
|
208
|
+
imageClass: {
|
|
209
|
+
type: String
|
|
210
|
+
},
|
|
211
|
+
/**
|
|
212
|
+
* Controls the threshold before the component triggers the src url.
|
|
213
|
+
*/
|
|
214
|
+
threshold: {
|
|
215
|
+
type: Number,
|
|
216
|
+
"default": 0
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
setup: function setup(props) {
|
|
220
|
+
var isBackground = computed(function () {
|
|
221
|
+
return props.type === 'background';
|
|
222
|
+
});
|
|
223
|
+
var fwImageRef = ref(null);
|
|
224
|
+
return {
|
|
225
|
+
fwImageRef: fwImageRef,
|
|
226
|
+
isBackground: isBackground
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
var _hoisted_1 = ["type", "threshold"];
|
|
232
|
+
var _hoisted_2 = ["data-url", "alt"];
|
|
233
|
+
var _hoisted_3 = {
|
|
234
|
+
"class": "fw-image--error-wrapper flex flex-col items-center justify-center"
|
|
235
|
+
};
|
|
236
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
237
|
+
var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
|
|
238
|
+
var _component_FileExclamationSvg = resolveComponent("FileExclamationSvg");
|
|
239
|
+
var _directive_lazyload = resolveDirective("lazyload");
|
|
240
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
241
|
+
ref: "fwImageRef",
|
|
242
|
+
type: _ctx.type,
|
|
243
|
+
threshold: _ctx.threshold,
|
|
244
|
+
"class": normalizeClass(["fw-image", {
|
|
245
|
+
'fw-image--background': _ctx.isBackground,
|
|
246
|
+
'rounded-full': _ctx.rounded
|
|
247
|
+
}]),
|
|
248
|
+
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
249
|
+
return _ctx.$emit('click', $event);
|
|
250
|
+
}),
|
|
251
|
+
onKeyup: _cache[1] || (_cache[1] = withKeys(function ($event) {
|
|
252
|
+
return _ctx.$emit('click', $event);
|
|
253
|
+
}, ["enter"])),
|
|
254
|
+
onMouseover: _cache[2] || (_cache[2] = function ($event) {
|
|
255
|
+
return _ctx.$emit('mouseover');
|
|
256
|
+
}),
|
|
257
|
+
onMouseout: _cache[3] || (_cache[3] = function ($event) {
|
|
258
|
+
return _ctx.$emit('mouseout');
|
|
259
|
+
}),
|
|
260
|
+
onFocusin: _cache[4] || (_cache[4] = function ($event) {
|
|
261
|
+
return _ctx.$emit('mouseover');
|
|
262
|
+
}),
|
|
263
|
+
onFocusout: _cache[5] || (_cache[5] = function ($event) {
|
|
264
|
+
return _ctx.$emit('mouseout');
|
|
265
|
+
})
|
|
266
|
+
}, [createElementVNode("img", {
|
|
267
|
+
"data-url": _ctx.src,
|
|
268
|
+
alt: _ctx.alt,
|
|
269
|
+
"class": normalizeClass(_ctx.imageClass)
|
|
270
|
+
}, null, 10, _hoisted_2), createVNode(_component_FwLoadingBar, {
|
|
271
|
+
"class": normalizeClass(["fw-image--loading w-full h-full", {
|
|
272
|
+
'rounded-full': _ctx.rounded
|
|
273
|
+
}])
|
|
274
|
+
}, null, 8, ["class"]), createElementVNode("div", {
|
|
275
|
+
"class": normalizeClass(["fw-image--error bg-grey-20", {
|
|
276
|
+
'rounded-full': _ctx.rounded
|
|
277
|
+
}])
|
|
278
|
+
}, [createElementVNode("div", _hoisted_3, [createVNode(_component_FileExclamationSvg, {
|
|
279
|
+
"class": "w-full h-full scale-[0.3] opacity-80 text-alert max-w-[150px]"
|
|
280
|
+
})])], 2), renderSlot(_ctx.$slots, "default")], 42, _hoisted_1)), [[_directive_lazyload]]);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
var css_248z = ".fw-image{position:relative}.fw-image img{-webkit-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;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;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}";
|
|
284
|
+
var stylesheet = ".fw-image{position:relative}.fw-image img{-webkit-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;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;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}";
|
|
285
|
+
styleInject(css_248z);
|
|
286
|
+
|
|
287
|
+
script.render = render;
|
|
288
|
+
|
|
289
|
+
export { script as s };
|