@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.
- package/cjs/index.js +10733 -3060
- package/esm/{_rollupPluginBabelHelpers-DODWUb5N.js → _rollupPluginBabelHelpers-BKlDnZ7n.js} +1 -1
- package/esm/fw-accordion.js +15 -18
- package/esm/fw-alert.js +32 -25
- package/esm/fw-bar-chart.js +265 -93
- package/esm/fw-button-DZTHZLjk.js +318 -0
- package/esm/fw-button.js +2 -2
- package/esm/{fw-card-D45R4kN-.js → fw-card-XGtsK2bM.js} +7 -10
- package/esm/fw-card.js +2 -2
- package/esm/fw-checkbox.js +8 -11
- package/esm/fw-date-picker.js +85 -49
- package/esm/fw-drawer.js +8 -8
- package/esm/{fw-dropdown-58wyuzsW.js → fw-dropdown-CSmYTm5O.js} +11 -14
- package/esm/fw-dropdown.js +7 -6
- package/esm/fw-form.js +1 -1
- package/esm/fw-icons.js +11 -12
- package/esm/fw-image-A2lXYs0u.js +325 -0
- package/esm/fw-image.js +5 -4
- package/esm/{fw-input-C2-cZ-BY.js → fw-input-BiPWWfK3.js} +12 -19
- package/esm/fw-input.js +3 -3
- package/esm/fw-loading-bar-3x4tkF1B.js +37 -0
- package/esm/fw-loading.js +89 -40
- package/esm/fw-media-picker.js +10 -653
- package/esm/fw-modal.js +11 -10
- package/esm/fw-navigation-menu.js +36 -41
- package/esm/fw-popover-BZ-zqUme.js +330 -0
- package/esm/fw-popover.js +2 -3
- package/esm/fw-progress-bar.js +1 -1
- package/esm/fw-provider-list.js +109 -87
- package/esm/fw-sidebar-menu.js +58 -51
- package/esm/fw-slider.js +64 -61
- package/esm/fw-switch.js +76 -49
- package/esm/fw-table-row-D6FdCJMs.js +447 -0
- package/esm/fw-table.js +5 -6
- package/esm/fw-tabs.js +87 -35
- package/esm/fw-tag-BRxPc4zc.js +199 -0
- package/esm/fw-tag.js +4 -4
- package/esm/fw-toast.js +58 -76
- package/esm/fw-transactions-card.js +20 -20
- package/esm/{get-root-colours-DCjlYelc.js → get-root-colours-DCCAnRF4.js} +3 -1
- package/esm/index-C8z11jcJ.js +7583 -0
- package/esm/index-DHyRsKsZ.js +843 -0
- package/esm/index-eP2GMSdQ.js +755 -0
- package/esm/index.js +54 -61
- package/esm/{uniqueId-DZdGzBh8.js → uniqueId-DK6xzFd8.js} +1 -1
- package/esm/{vee-validate.esm-3ptvCDR1.js → vee-validate-0dtT5GSQ.js} +182 -305
- package/frollo-web-ui.esm.js +10790 -3115
- package/icons/circle-check.svg +4 -0
- package/index.d.ts +1522 -586
- package/package.json +11 -11
- package/types/components/fw-accordion/fw-accordion.vue.d.ts +9 -7
- package/types/components/fw-alert/fw-alert.vue.d.ts +11 -6
- package/types/components/fw-bar-chart/fw-bar-chart.vue.d.ts +15 -64
- package/types/components/fw-button/fw-button.vue.d.ts +11 -7
- package/types/components/fw-card/fw-card.vue.d.ts +6 -6
- package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +365 -5
- package/types/components/fw-date-picker/fw-date-picker.vue.d.ts +3 -242
- package/types/components/fw-drawer/fw-drawer.vue.d.ts +11 -8
- package/types/components/fw-dropdown/fw-dropdown.vue.d.ts +20 -12
- package/types/components/fw-icons/fw-success-animation.vue.d.ts +1 -1
- package/types/components/fw-image/fw-image.vue.d.ts +33 -7
- package/types/components/fw-input/fw-input.vue.d.ts +368 -10
- package/types/components/fw-loading/fw-loading-bar.vue.d.ts +7 -5
- package/types/components/fw-loading/fw-loading-card.vue.d.ts +3 -1
- package/types/components/fw-loading/fw-loading-dots.vue.d.ts +8 -1
- package/types/components/fw-loading/fw-loading-table.vue.d.ts +11 -6
- package/types/components/fw-media-picker/fw-media-picker.vue.d.ts +27 -18
- package/types/components/fw-modal/fw-modal.vue.d.ts +11 -7
- package/types/components/fw-navigation-menu/fw-navigation-menu.vue.d.ts +12 -8
- package/types/components/fw-popover/fw-popover.vue.d.ts +16 -21
- package/types/components/fw-progress-bar/fw-progress-bar.vue.d.ts +6 -4
- package/types/components/fw-provider-list/fw-provider-list.vue.d.ts +20 -45
- package/types/components/fw-sidebar-menu/fw-sidebar-menu.vue.d.ts +13 -7
- package/types/components/fw-slider/fw-slider.vue.d.ts +11 -8
- package/types/components/fw-switch/fw-switch.vue.d.ts +383 -9
- package/types/components/fw-switch/index.types.d.ts +1 -0
- package/types/components/fw-table/fw-table-head.vue.d.ts +1 -1
- package/types/components/fw-table/fw-table-row.vue.d.ts +1 -1
- package/types/components/fw-table/fw-table.vue.d.ts +40 -19
- package/types/components/fw-table/index.types.d.ts +36 -2
- package/types/components/fw-tabs/fw-tab.vue.d.ts +4 -8
- package/types/components/fw-tabs/fw-tabs.vue.d.ts +11 -8
- package/types/components/fw-tabs/index.types.d.ts +14 -4
- package/types/components/fw-tag/fw-tag.vue.d.ts +14 -8
- package/types/components/fw-toast/fw-toast.vue.d.ts +17 -22
- package/types/components/fw-transactions-card/fw-transactions-card.vue.d.ts +6 -3
- package/types/directives/lazy-loader.d.ts +11 -2
- package/types/helpers/get-root-colours.d.ts +1 -0
- package/web-components/index.js +16793 -7700
- package/esm/fw-button-YMoW4x4c.js +0 -296
- package/esm/fw-image-D-OHafdw.js +0 -217
- package/esm/fw-loading-bar-DecYSBC_.js +0 -45
- package/esm/fw-popover-B4bsfuxm.js +0 -620
- package/esm/fw-table-row-Cgi8871h.js +0 -389
- package/esm/fw-tag-fDo50Nw7.js +0 -177
- package/esm/index-BsEH8YYr.js +0 -979
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, useCssVars, resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, withKeys, normalizeClass, createElementVNode, createCommentVNode, renderSlot, createVNode, vShow } from 'vue';
|
|
2
|
+
import { f as _createForOfIteratorHelper } from './_rollupPluginBabelHelpers-BKlDnZ7n.js';
|
|
3
|
+
import { s as script } from './fw-loading-bar-3x4tkF1B.js';
|
|
4
|
+
import { u as render$1 } from './index-DHyRsKsZ.js';
|
|
5
|
+
import { u as useColours } from './get-root-colours-DCCAnRF4.js';
|
|
6
|
+
import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
|
|
7
|
+
|
|
8
|
+
var stateMap = new WeakMap();
|
|
9
|
+
function getState(el) {
|
|
10
|
+
var s = stateMap.get(el);
|
|
11
|
+
if (!s) {
|
|
12
|
+
s = {};
|
|
13
|
+
stateMap.set(el, s);
|
|
14
|
+
}
|
|
15
|
+
return s;
|
|
16
|
+
}
|
|
17
|
+
function findImg(el, s) {
|
|
18
|
+
if (s.img && el.contains(s.img)) return s.img;
|
|
19
|
+
var img = el.querySelector('img');
|
|
20
|
+
s.img = img;
|
|
21
|
+
return img;
|
|
22
|
+
}
|
|
23
|
+
function loadImage(el, binding) {
|
|
24
|
+
var _ref, _binding$src, _binding$onStart;
|
|
25
|
+
var s = getState(el);
|
|
26
|
+
var img = findImg(el, s);
|
|
27
|
+
if (!img) return;
|
|
28
|
+
var url = (_ref = (_binding$src = binding === null || binding === void 0 ? void 0 : binding.src) !== null && _binding$src !== void 0 ? _binding$src : img.dataset.src) !== null && _ref !== void 0 ? _ref : img.dataset.url;
|
|
29
|
+
if (!url) {
|
|
30
|
+
var _binding$onError;
|
|
31
|
+
binding === null || binding === void 0 || (_binding$onError = binding.onError) === null || _binding$onError === void 0 || _binding$onError.call(binding);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
binding === null || binding === void 0 || (_binding$onStart = binding.onStart) === null || _binding$onStart === void 0 || _binding$onStart.call(binding);
|
|
35
|
+
// attach listeners BEFORE setting src to avoid missing cached loads
|
|
36
|
+
var handleLoad = function handleLoad() {
|
|
37
|
+
var _binding$onLoad;
|
|
38
|
+
binding === null || binding === void 0 || (_binding$onLoad = binding.onLoad) === null || _binding$onLoad === void 0 || _binding$onLoad.call(binding);
|
|
39
|
+
cleanup();
|
|
40
|
+
};
|
|
41
|
+
var handleError = function handleError() {
|
|
42
|
+
var _binding$onError2;
|
|
43
|
+
binding === null || binding === void 0 || (_binding$onError2 = binding.onError) === null || _binding$onError2 === void 0 || _binding$onError2.call(binding);
|
|
44
|
+
cleanup();
|
|
45
|
+
};
|
|
46
|
+
var cleanup = function cleanup() {
|
|
47
|
+
img.removeEventListener('load', handleLoad);
|
|
48
|
+
img.removeEventListener('error', handleError);
|
|
49
|
+
};
|
|
50
|
+
img.addEventListener('load', handleLoad, {
|
|
51
|
+
once: true
|
|
52
|
+
});
|
|
53
|
+
img.addEventListener('error', handleError, {
|
|
54
|
+
once: true
|
|
55
|
+
});
|
|
56
|
+
img.src = url;
|
|
57
|
+
s.lastSrc = url;
|
|
58
|
+
}
|
|
59
|
+
function createObserver(el, binding) {
|
|
60
|
+
var _s$observer, _binding$threshold, _binding$rootMargin;
|
|
61
|
+
var s = getState(el);
|
|
62
|
+
// disconnect any previous observer first
|
|
63
|
+
(_s$observer = s.observer) === null || _s$observer === void 0 || _s$observer.disconnect();
|
|
64
|
+
var threshold = (_binding$threshold = binding === null || binding === void 0 ? void 0 : binding.threshold) !== null && _binding$threshold !== void 0 ? _binding$threshold : 0;
|
|
65
|
+
var rootMargin = (_binding$rootMargin = binding === null || binding === void 0 ? void 0 : binding.rootMargin) !== null && _binding$rootMargin !== void 0 ? _binding$rootMargin : '0px';
|
|
66
|
+
var observer = new IntersectionObserver(function (entries, obs) {
|
|
67
|
+
var _iterator = _createForOfIteratorHelper(entries),
|
|
68
|
+
_step;
|
|
69
|
+
try {
|
|
70
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
71
|
+
var entry = _step.value;
|
|
72
|
+
if (entry.isIntersecting) {
|
|
73
|
+
loadImage(entry.target, binding);
|
|
74
|
+
obs.unobserve(entry.target);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
} catch (err) {
|
|
78
|
+
_iterator.e(err);
|
|
79
|
+
} finally {
|
|
80
|
+
_iterator.f();
|
|
81
|
+
}
|
|
82
|
+
}, {
|
|
83
|
+
root: null,
|
|
84
|
+
threshold: threshold,
|
|
85
|
+
rootMargin: rootMargin
|
|
86
|
+
});
|
|
87
|
+
s.observer = observer;
|
|
88
|
+
observer.observe(el);
|
|
89
|
+
}
|
|
90
|
+
function shouldReload(el, binding) {
|
|
91
|
+
var _ref2, _binding$src2;
|
|
92
|
+
var s = getState(el);
|
|
93
|
+
var img = findImg(el, s);
|
|
94
|
+
if (!img) return false;
|
|
95
|
+
var next = (_ref2 = (_binding$src2 = binding === null || binding === void 0 ? void 0 : binding.src) !== null && _binding$src2 !== void 0 ? _binding$src2 : img.dataset.src) !== null && _ref2 !== void 0 ? _ref2 : img.dataset.url;
|
|
96
|
+
if (!next) return false;
|
|
97
|
+
// only reload if src actually changed
|
|
98
|
+
return next !== s.lastSrc;
|
|
99
|
+
}
|
|
100
|
+
var lazyLoadDirective = {
|
|
101
|
+
mounted: function mounted(el, binding) {
|
|
102
|
+
if ('IntersectionObserver' in window) {
|
|
103
|
+
createObserver(el, binding.value);
|
|
104
|
+
} else {
|
|
105
|
+
loadImage(el, binding.value);
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
updated: function updated(el, binding) {
|
|
109
|
+
if (!shouldReload(el, binding.value)) return;
|
|
110
|
+
var s = getState(el);
|
|
111
|
+
var img = findImg(el, s);
|
|
112
|
+
if (img) {
|
|
113
|
+
// reset before re-observing
|
|
114
|
+
img.removeAttribute('src');
|
|
115
|
+
s.lastSrc = undefined;
|
|
116
|
+
}
|
|
117
|
+
if ('IntersectionObserver' in window) {
|
|
118
|
+
createObserver(el, binding.value);
|
|
119
|
+
} else {
|
|
120
|
+
loadImage(el, binding.value);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
unmounted: function unmounted(el) {
|
|
124
|
+
var _s$observer2;
|
|
125
|
+
var s = stateMap.get(el);
|
|
126
|
+
s === null || s === void 0 || (_s$observer2 = s.observer) === null || _s$observer2 === void 0 || _s$observer2.disconnect();
|
|
127
|
+
stateMap["delete"](el);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
var __default__ = defineComponent({
|
|
132
|
+
name: 'FwImage',
|
|
133
|
+
directives: {
|
|
134
|
+
lazyload: lazyLoadDirective
|
|
135
|
+
},
|
|
136
|
+
components: {
|
|
137
|
+
FwLoadingBar: script,
|
|
138
|
+
FileExclamationSvg: render$1
|
|
139
|
+
},
|
|
140
|
+
props: {
|
|
141
|
+
/**
|
|
142
|
+
* The src attribute of the image
|
|
143
|
+
*/
|
|
144
|
+
src: String,
|
|
145
|
+
/**
|
|
146
|
+
* The alt attribute of the image
|
|
147
|
+
*/
|
|
148
|
+
alt: String,
|
|
149
|
+
/**
|
|
150
|
+
* The type of component. Accepts 'background' and defaults to the native html5 element.
|
|
151
|
+
*/
|
|
152
|
+
type: {
|
|
153
|
+
type: String,
|
|
154
|
+
"default": 'native',
|
|
155
|
+
validator: function validator(value) {
|
|
156
|
+
return ['native', 'background'].includes(value);
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
/**
|
|
160
|
+
* Whether the loading bar and error state are rounded.
|
|
161
|
+
*/
|
|
162
|
+
rounded: {
|
|
163
|
+
type: Boolean,
|
|
164
|
+
"default": false
|
|
165
|
+
},
|
|
166
|
+
/**
|
|
167
|
+
* The class for the native image element
|
|
168
|
+
*/
|
|
169
|
+
imageClass: {
|
|
170
|
+
type: String
|
|
171
|
+
},
|
|
172
|
+
/**
|
|
173
|
+
* Controls the threshold before the component triggers the src url.
|
|
174
|
+
*/
|
|
175
|
+
threshold: {
|
|
176
|
+
type: Number,
|
|
177
|
+
"default": 0
|
|
178
|
+
},
|
|
179
|
+
/**
|
|
180
|
+
* Controls the error UI when an image src is unavailable.
|
|
181
|
+
*/
|
|
182
|
+
enableErrors: {
|
|
183
|
+
type: Boolean,
|
|
184
|
+
"default": true
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
emits: ['click', 'mouseover', 'mouseout'],
|
|
188
|
+
setup: function setup(props) {
|
|
189
|
+
var fwImageRef = ref(null);
|
|
190
|
+
var imgRef = ref(null);
|
|
191
|
+
var status = ref('idle');
|
|
192
|
+
var isBackground = computed(function () {
|
|
193
|
+
return props.type === 'background';
|
|
194
|
+
});
|
|
195
|
+
var _useColours = useColours(),
|
|
196
|
+
colorErrorTextFade5 = _useColours.colorErrorTextFade5;
|
|
197
|
+
var rootClasses = computed(function () {
|
|
198
|
+
return {
|
|
199
|
+
'fw-image--background': isBackground.value,
|
|
200
|
+
'rounded-full': props.rounded,
|
|
201
|
+
'fw-image--loaded': status.value === 'loaded',
|
|
202
|
+
'fw-image--error-state': status.value === 'error'
|
|
203
|
+
};
|
|
204
|
+
});
|
|
205
|
+
var onStart = function onStart() {
|
|
206
|
+
status.value = 'loading';
|
|
207
|
+
};
|
|
208
|
+
var onLoad = function onLoad() {
|
|
209
|
+
status.value = 'loaded';
|
|
210
|
+
if (isBackground.value && fwImageRef.value && props.src) {
|
|
211
|
+
fwImageRef.value.style.backgroundImage = "url('".concat(props.src, "')");
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
var onError = function onError() {
|
|
215
|
+
status.value = 'error';
|
|
216
|
+
if (isBackground.value && fwImageRef.value) {
|
|
217
|
+
fwImageRef.value.style.backgroundImage = '';
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
var handleLoad = function handleLoad() {
|
|
221
|
+
onLoad();
|
|
222
|
+
};
|
|
223
|
+
var handleError = function handleError() {
|
|
224
|
+
onError();
|
|
225
|
+
};
|
|
226
|
+
return {
|
|
227
|
+
fwImageRef: fwImageRef,
|
|
228
|
+
imgRef: imgRef,
|
|
229
|
+
status: status,
|
|
230
|
+
isBackground: isBackground,
|
|
231
|
+
rootClasses: rootClasses,
|
|
232
|
+
colorErrorTextFade5: colorErrorTextFade5,
|
|
233
|
+
onStart: onStart,
|
|
234
|
+
onLoad: onLoad,
|
|
235
|
+
onError: onError,
|
|
236
|
+
handleLoad: handleLoad,
|
|
237
|
+
handleError: handleError
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
var __injectCSSVars__ = function __injectCSSVars__() {
|
|
242
|
+
useCssVars(function (_ctx) {
|
|
243
|
+
return {
|
|
244
|
+
"v9f14e934": _ctx.colorErrorTextFade5
|
|
245
|
+
};
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
var __setup__ = __default__.setup;
|
|
249
|
+
__default__.setup = __setup__ ? function (props, ctx) {
|
|
250
|
+
__injectCSSVars__();
|
|
251
|
+
return __setup__(props, ctx);
|
|
252
|
+
} : __injectCSSVars__;
|
|
253
|
+
|
|
254
|
+
var _hoisted_1 = ["data-src", "alt"];
|
|
255
|
+
var _hoisted_2 = {
|
|
256
|
+
"class": "fw-image__error-wrapper flex flex-col items-center justify-center"
|
|
257
|
+
};
|
|
258
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
259
|
+
var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
|
|
260
|
+
var _component_FileExclamationSvg = resolveComponent("FileExclamationSvg");
|
|
261
|
+
var _directive_lazyload = resolveDirective("lazyload");
|
|
262
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
263
|
+
ref: "fwImageRef",
|
|
264
|
+
"class": normalizeClass(["fw-image", _ctx.rootClasses]),
|
|
265
|
+
onClick: _cache[2] || (_cache[2] = function ($event) {
|
|
266
|
+
return _ctx.$emit('click', $event);
|
|
267
|
+
}),
|
|
268
|
+
onKeyup: _cache[3] || (_cache[3] = withKeys(function ($event) {
|
|
269
|
+
return _ctx.$emit('click', $event);
|
|
270
|
+
}, ["enter"])),
|
|
271
|
+
onMouseover: _cache[4] || (_cache[4] = function ($event) {
|
|
272
|
+
return _ctx.$emit('mouseover');
|
|
273
|
+
}),
|
|
274
|
+
onMouseout: _cache[5] || (_cache[5] = function ($event) {
|
|
275
|
+
return _ctx.$emit('mouseout');
|
|
276
|
+
}),
|
|
277
|
+
onFocusin: _cache[6] || (_cache[6] = function ($event) {
|
|
278
|
+
return _ctx.$emit('mouseover');
|
|
279
|
+
}),
|
|
280
|
+
onFocusout: _cache[7] || (_cache[7] = function ($event) {
|
|
281
|
+
return _ctx.$emit('mouseout');
|
|
282
|
+
})
|
|
283
|
+
}, [createElementVNode("img", {
|
|
284
|
+
ref: "imgRef",
|
|
285
|
+
"data-src": _ctx.src,
|
|
286
|
+
alt: _ctx.alt,
|
|
287
|
+
loading: "lazy",
|
|
288
|
+
decoding: "async",
|
|
289
|
+
fetchpriority: "auto",
|
|
290
|
+
"class": normalizeClass([_ctx.rounded ? 'rounded-full' : '', _ctx.imageClass, 'fw-image__img']),
|
|
291
|
+
onLoad: _cache[0] || (_cache[0] = function () {
|
|
292
|
+
return _ctx.onLoad && _ctx.onLoad.apply(_ctx, arguments);
|
|
293
|
+
}),
|
|
294
|
+
onError: _cache[1] || (_cache[1] = function () {
|
|
295
|
+
return _ctx.onError && _ctx.onError.apply(_ctx, arguments);
|
|
296
|
+
})
|
|
297
|
+
}, null, 42, _hoisted_1), withDirectives(createVNode(_component_FwLoadingBar, {
|
|
298
|
+
"class": normalizeClass(["fw-image__loading w-full h-full", {
|
|
299
|
+
'rounded-full': _ctx.rounded
|
|
300
|
+
}])
|
|
301
|
+
}, null, 8, ["class"]), [[vShow, _ctx.status === 'loading']]), _ctx.enableErrors ? withDirectives((openBlock(), createElementBlock("div", {
|
|
302
|
+
key: 0,
|
|
303
|
+
"class": normalizeClass(["fw-image__error rounded", {
|
|
304
|
+
'rounded-full': _ctx.rounded
|
|
305
|
+
}])
|
|
306
|
+
}, [createElementVNode("div", _hoisted_2, [createVNode(_component_FileExclamationSvg, {
|
|
307
|
+
name: "file-exclamation",
|
|
308
|
+
"class": "w-full h-full scale-[0.25] opacity-40 text-brand-warning-text max-w-[150px]"
|
|
309
|
+
})])], 2)), [[vShow, _ctx.status === 'error']]) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 34)), [[_directive_lazyload, {
|
|
310
|
+
src: _ctx.src,
|
|
311
|
+
type: _ctx.type,
|
|
312
|
+
threshold: _ctx.threshold,
|
|
313
|
+
onStart: _ctx.onStart,
|
|
314
|
+
onLoad: _ctx.onLoad,
|
|
315
|
+
onError: _ctx.onError
|
|
316
|
+
}]]);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
var css_248z = ".fw-image{position:relative}.fw-image__img{opacity:0;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);transform:translateZ(0);-webkit-transition:opacity .32s ease,-webkit-transform .32s ease;transition:opacity .32s ease,-webkit-transform .32s ease;-moz-transition:opacity .32s ease,transform .32s ease,-moz-transform .32s ease;transition:opacity .32s ease,transform .32s ease;transition:opacity .32s ease,transform .32s ease,-webkit-transform .32s ease,-moz-transform .32s ease;visibility:hidden;width:100%}.fw-image__loading{opacity:1;position:absolute!important}.fw-image__error,.fw-image__loading{inset:0;-webkit-transition:opacity .22s ease;-moz-transition:opacity .22s ease;transition:opacity .22s ease}.fw-image__error{background-color:var(--v9f14e934);opacity:0;position:absolute;visibility:hidden}.fw-image__error-wrapper{font-size:inherit;left:50%;position:absolute;text-align:center;top:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:100%}.fw-image--loaded .fw-image__img{opacity:1;visibility:visible}.fw-image--loaded .fw-image__loading{opacity:0;pointer-events:none}.fw-image--error-state .fw-image__img{opacity:0;visibility:hidden}.fw-image--error-state .fw-image__loading{opacity:0;pointer-events:none}.fw-image--error-state .fw-image__error{opacity:1;visibility:visible}.fw-image--background{background-position:50%;background-repeat:no-repeat;background-size:cover}.fw-image--background.fw-image--loaded .fw-image__img{display:none}@media (prefers-reduced-motion:reduce){.fw-image__error,.fw-image__img,.fw-image__loading{-webkit-transition:none!important;-moz-transition:none!important;transition:none!important}}";
|
|
320
|
+
var stylesheet = ".fw-image{position:relative}.fw-image__img{opacity:0;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);transform:translateZ(0);-webkit-transition:opacity .32s ease,-webkit-transform .32s ease;transition:opacity .32s ease,-webkit-transform .32s ease;-moz-transition:opacity .32s ease,transform .32s ease,-moz-transform .32s ease;transition:opacity .32s ease,transform .32s ease;transition:opacity .32s ease,transform .32s ease,-webkit-transform .32s ease,-moz-transform .32s ease;visibility:hidden;width:100%}.fw-image__loading{opacity:1;position:absolute!important}.fw-image__error,.fw-image__loading{inset:0;-webkit-transition:opacity .22s ease;-moz-transition:opacity .22s ease;transition:opacity .22s ease}.fw-image__error{background-color:var(--v9f14e934);opacity:0;position:absolute;visibility:hidden}.fw-image__error-wrapper{font-size:inherit;left:50%;position:absolute;text-align:center;top:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:100%}.fw-image--loaded .fw-image__img{opacity:1;visibility:visible}.fw-image--loaded .fw-image__loading{opacity:0;pointer-events:none}.fw-image--error-state .fw-image__img{opacity:0;visibility:hidden}.fw-image--error-state .fw-image__loading{opacity:0;pointer-events:none}.fw-image--error-state .fw-image__error{opacity:1;visibility:visible}.fw-image--background{background-position:50%;background-repeat:no-repeat;background-size:cover}.fw-image--background.fw-image--loaded .fw-image__img{display:none}@media (prefers-reduced-motion:reduce){.fw-image__error,.fw-image__img,.fw-image__loading{-webkit-transition:none!important;-moz-transition:none!important;transition:none!important}}";
|
|
321
|
+
styleInject(css_248z);
|
|
322
|
+
|
|
323
|
+
__default__.render = render;
|
|
324
|
+
|
|
325
|
+
export { __default__ as _ };
|
package/esm/fw-image.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { _ as FwImage } from './fw-image-
|
|
1
|
+
export { _ as FwImage } from './fw-image-A2lXYs0u.js';
|
|
2
2
|
import 'vue';
|
|
3
|
-
import './
|
|
4
|
-
import './
|
|
3
|
+
import './_rollupPluginBabelHelpers-BKlDnZ7n.js';
|
|
4
|
+
import './fw-loading-bar-3x4tkF1B.js';
|
|
5
|
+
import './get-root-colours-DCCAnRF4.js';
|
|
5
6
|
import './style-inject.es-tgCJW-Cu.js';
|
|
6
|
-
import './index-
|
|
7
|
+
import './index-DHyRsKsZ.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, useCssVars, resolveComponent, createElementBlock, openBlock, createVNode, withCtx, createElementVNode, createCommentVNode, normalizeClass, createTextVNode, toDisplayString, renderSlot, mergeProps, Transition } from 'vue';
|
|
2
|
-
import { a as Field } from './vee-validate
|
|
3
|
-
import { u as useColours } from './get-root-colours-
|
|
2
|
+
import { a as Field } from './vee-validate-0dtT5GSQ.js';
|
|
3
|
+
import { u as useColours } from './get-root-colours-DCCAnRF4.js';
|
|
4
4
|
import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
|
|
5
5
|
|
|
6
6
|
var __default__ = defineComponent({
|
|
@@ -109,8 +109,7 @@ var __default__ = defineComponent({
|
|
|
109
109
|
"default": false
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
|
-
emits: ['update:modelValue', /** Fired on native
|
|
113
|
-
'input', /** Fired on native focus in */
|
|
112
|
+
emits: ['update:modelValue', /** Fired on native focus in */
|
|
114
113
|
'focus', /** Fired on native input blur */
|
|
115
114
|
'blur'],
|
|
116
115
|
setup: function setup(props, ctx) {
|
|
@@ -123,9 +122,6 @@ var __default__ = defineComponent({
|
|
|
123
122
|
return ctx.emit('update:modelValue', state);
|
|
124
123
|
}
|
|
125
124
|
});
|
|
126
|
-
var onInput = function onInput(e) {
|
|
127
|
-
return ctx.emit('input', e);
|
|
128
|
-
};
|
|
129
125
|
var onFocus = function onFocus(e) {
|
|
130
126
|
return ctx.emit('focus', e);
|
|
131
127
|
};
|
|
@@ -138,7 +134,6 @@ var __default__ = defineComponent({
|
|
|
138
134
|
return {
|
|
139
135
|
inputBaseClass: inputBaseClass,
|
|
140
136
|
inputValue: inputValue,
|
|
141
|
-
onInput: onInput,
|
|
142
137
|
onFocus: onFocus,
|
|
143
138
|
onBlur: onBlur,
|
|
144
139
|
primaryFade5: primaryFade5,
|
|
@@ -149,8 +144,8 @@ var __default__ = defineComponent({
|
|
|
149
144
|
var __injectCSSVars__ = function __injectCSSVars__() {
|
|
150
145
|
useCssVars(function (_ctx) {
|
|
151
146
|
return {
|
|
152
|
-
"
|
|
153
|
-
"
|
|
147
|
+
"v33aab865": _ctx.primaryFade5,
|
|
148
|
+
"v68d8ed4e": _ctx.colorErrorTextFade5
|
|
154
149
|
};
|
|
155
150
|
});
|
|
156
151
|
};
|
|
@@ -184,7 +179,7 @@ var _hoisted_8 = {
|
|
|
184
179
|
key: 0,
|
|
185
180
|
"class": "flex text-body absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
|
|
186
181
|
};
|
|
187
|
-
var _hoisted_9 = ["id", "placeholder", "type", "readonly", "tabindex", "disabled", "autocomplete", "maxlength"];
|
|
182
|
+
var _hoisted_9 = ["id", "name", "placeholder", "type", "readonly", "tabindex", "disabled", "autocomplete", "maxlength"];
|
|
188
183
|
var _hoisted_10 = {
|
|
189
184
|
key: 1,
|
|
190
185
|
"class": "flex text-black absolute w-10 h-full inset-y-0 right-0 items-center pr-3"
|
|
@@ -205,7 +200,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
205
200
|
var _component_InputField = resolveComponent("InputField");
|
|
206
201
|
return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_InputField, {
|
|
207
202
|
modelValue: _ctx.inputValue,
|
|
208
|
-
"onUpdate:modelValue": _cache[
|
|
203
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) {
|
|
209
204
|
return _ctx.inputValue = $event;
|
|
210
205
|
}),
|
|
211
206
|
name: _ctx.name,
|
|
@@ -225,6 +220,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
225
220
|
"class": "h-full"
|
|
226
221
|
})])) : createCommentVNode("", true), createElementVNode("input", mergeProps(field, {
|
|
227
222
|
id: "fw-input-".concat(_ctx.name),
|
|
223
|
+
name: "fw-input-".concat(_ctx.name),
|
|
228
224
|
placeholder: _ctx.placeholder,
|
|
229
225
|
type: _ctx.type,
|
|
230
226
|
readonly: _ctx.readonly,
|
|
@@ -236,13 +232,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
236
232
|
'pl-10': !!_ctx.$slots.prefix,
|
|
237
233
|
'pr-20': !!_ctx.$slots.suffix
|
|
238
234
|
}, (errorMessage || errors[0]) && meta.touched ? 'input--error-state border-brand-error-text caret-brand-error-text' : 'caret-primary bg-white border-grey-100 hover:border-brand-text3 focus:border-brand-text3', _ctx.inputBaseClass, _ctx.rounded ? 'rounded-full' : 'rounded-lg'],
|
|
239
|
-
|
|
240
|
-
return _ctx.onInput && _ctx.onInput.apply(_ctx, arguments);
|
|
241
|
-
}),
|
|
242
|
-
onFocus: _cache[1] || (_cache[1] = function () {
|
|
235
|
+
onFocus: _cache[0] || (_cache[0] = function () {
|
|
243
236
|
return _ctx.onFocus && _ctx.onFocus.apply(_ctx, arguments);
|
|
244
237
|
}),
|
|
245
|
-
onBlur: _cache[
|
|
238
|
+
onBlur: _cache[1] || (_cache[1] = function () {
|
|
246
239
|
return _ctx.onBlur && _ctx.onBlur.apply(_ctx, arguments);
|
|
247
240
|
})
|
|
248
241
|
}), null, 16, _hoisted_9), _ctx.$slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_10, [renderSlot(_ctx.$slots, "suffix", {
|
|
@@ -261,8 +254,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
261
254
|
}, 8, ["modelValue", "name", "rules"])]);
|
|
262
255
|
}
|
|
263
256
|
|
|
264
|
-
var css_248z = ".fwFadeIn-enter-active{-webkit-
|
|
265
|
-
var stylesheet = ".fwFadeIn-enter-active{-webkit-
|
|
257
|
+
var css_248z = ".fwFadeIn-enter-active,.fwFadeIn-leave-active{-webkit-transition:opacity .12s ease,-webkit-transform .12s ease;transition:opacity .12s ease,-webkit-transform .12s ease;-moz-transition:opacity .12s ease,transform .12s ease,-moz-transform .12s ease;transition:opacity .12s ease,transform .12s ease;transition:opacity .12s ease,transform .12s ease,-webkit-transform .12s ease,-moz-transform .12s ease;will-change:opacity,transform}.fwFadeIn-enter-from,.fwFadeIn-leave-to{opacity:0;-webkit-transform:translateY(-2px);-moz-transform:translateY(-2px);-ms-transform:translateY(-2px);transform:translateY(-2px)}.fw-input input:focus{background-color:var(--v33aab865)}.fw-input input.input--error-state{background-color:var(--v68d8ed4e)}";
|
|
258
|
+
var stylesheet = ".fwFadeIn-enter-active,.fwFadeIn-leave-active{-webkit-transition:opacity .12s ease,-webkit-transform .12s ease;transition:opacity .12s ease,-webkit-transform .12s ease;-moz-transition:opacity .12s ease,transform .12s ease,-moz-transform .12s ease;transition:opacity .12s ease,transform .12s ease;transition:opacity .12s ease,transform .12s ease,-webkit-transform .12s ease,-moz-transform .12s ease;will-change:opacity,transform}.fwFadeIn-enter-from,.fwFadeIn-leave-to{opacity:0;-webkit-transform:translateY(-2px);-moz-transform:translateY(-2px);-ms-transform:translateY(-2px);transform:translateY(-2px)}.fw-input input:focus{background-color:var(--v33aab865)}.fw-input input.input--error-state{background-color:var(--v68d8ed4e)}";
|
|
266
259
|
styleInject(css_248z);
|
|
267
260
|
|
|
268
261
|
__default__.render = render;
|
package/esm/fw-input.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { _ as FwInput } from './fw-input-
|
|
1
|
+
export { _ as FwInput } from './fw-input-BiPWWfK3.js';
|
|
2
2
|
import 'vue';
|
|
3
|
-
import './vee-validate
|
|
4
|
-
import './get-root-colours-
|
|
3
|
+
import './vee-validate-0dtT5GSQ.js';
|
|
4
|
+
import './get-root-colours-DCCAnRF4.js';
|
|
5
5
|
import './style-inject.es-tgCJW-Cu.js';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, normalizeStyle } from 'vue';
|
|
2
|
+
import { u as useColours } from './get-root-colours-DCCAnRF4.js';
|
|
3
|
+
import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
|
|
4
|
+
|
|
5
|
+
var script = defineComponent({
|
|
6
|
+
name: 'FwLoadingBar',
|
|
7
|
+
setup: function setup() {
|
|
8
|
+
var _useColours = useColours(),
|
|
9
|
+
primaryFade10 = _useColours.primaryFade10,
|
|
10
|
+
primaryFade20 = _useColours.primaryFade20;
|
|
11
|
+
var barVars = computed(function () {
|
|
12
|
+
return {
|
|
13
|
+
'--fw-bar-light': primaryFade10,
|
|
14
|
+
'--fw-bar-dark': primaryFade20
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
return {
|
|
18
|
+
barVars: barVars
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
24
|
+
return openBlock(), createElementBlock("div", {
|
|
25
|
+
"class": "fw-loading-bar rounded",
|
|
26
|
+
"aria-hidden": "true",
|
|
27
|
+
style: normalizeStyle(_ctx.barVars)
|
|
28
|
+
}, null, 4);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var css_248z = ".fw-loading-bar{background:var(--fw-bar-dark);contain:paint;overflow:hidden;position:relative}.fw-loading-bar:before{-webkit-animation:fwShimmer 1.1s ease-in-out infinite;-moz-animation:fwShimmer 1.1s ease-in-out infinite;animation:fwShimmer 1.1s ease-in-out infinite;background-image:-webkit-linear-gradient(350deg,transparent 0,var(--fw-bar-light) 50%,transparent 100%);background-image:-moz-linear-gradient(350deg,transparent 0,var(--fw-bar-light) 50%,transparent 100%);background-image:linear-gradient(100deg,transparent 0,var(--fw-bar-light) 50%,transparent 100%);background-repeat:no-repeat;background-size:60% 100%;content:\"\";inset:0;position:absolute;-webkit-transform:translate3d(-100%,0,0);-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);will-change:transform}@-webkit-keyframes fwShimmer{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-moz-keyframes fwShimmer{to{-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fwShimmer{to{-webkit-transform:translate3d(100%,0,0);-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@media (prefers-reduced-motion:reduce){.fw-loading-bar:before{-webkit-animation:none;-moz-animation:none;animation:none;opacity:.35}}";
|
|
32
|
+
var stylesheet = ".fw-loading-bar{background:var(--fw-bar-dark);contain:paint;overflow:hidden;position:relative}.fw-loading-bar:before{-webkit-animation:fwShimmer 1.1s ease-in-out infinite;-moz-animation:fwShimmer 1.1s ease-in-out infinite;animation:fwShimmer 1.1s ease-in-out infinite;background-image:-webkit-linear-gradient(350deg,transparent 0,var(--fw-bar-light) 50%,transparent 100%);background-image:-moz-linear-gradient(350deg,transparent 0,var(--fw-bar-light) 50%,transparent 100%);background-image:linear-gradient(100deg,transparent 0,var(--fw-bar-light) 50%,transparent 100%);background-repeat:no-repeat;background-size:60% 100%;content:\"\";inset:0;position:absolute;-webkit-transform:translate3d(-100%,0,0);-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);will-change:transform}@-webkit-keyframes fwShimmer{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-moz-keyframes fwShimmer{to{-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fwShimmer{to{-webkit-transform:translate3d(100%,0,0);-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@media (prefers-reduced-motion:reduce){.fw-loading-bar:before{-webkit-animation:none;-moz-animation:none;animation:none;opacity:.35}}";
|
|
33
|
+
styleInject(css_248z);
|
|
34
|
+
|
|
35
|
+
script.render = render;
|
|
36
|
+
|
|
37
|
+
export { script as s };
|