@frollo/frollo-web-ui 9.0.1 → 9.0.3
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 -3062
- 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 +9 -9
- 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 +108 -88
- 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-BU0xaybR.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 -3117
- package/icons/circle-check.svg +4 -0
- package/index.d.ts +1522 -586
- package/package.json +11 -11
- package/styles/tailwind.css +34 -2
- 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 -7702
- 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
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, resolveComponent, createBlock, openBlock, resolveDynamicComponent, normalizeClass, withCtx, createElementBlock, createCommentVNode, createElementVNode, renderSlot, Fragment, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
-
import { g as render$1 } from './index-BsEH8YYr.js';
|
|
3
|
-
import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
|
|
4
|
-
|
|
5
|
-
var script = defineComponent({
|
|
6
|
-
name: 'FwButton',
|
|
7
|
-
components: {
|
|
8
|
-
LoadingSvg: render$1
|
|
9
|
-
},
|
|
10
|
-
props: {
|
|
11
|
-
/**
|
|
12
|
-
* The label text of the button.
|
|
13
|
-
* Overrides the default slot content.
|
|
14
|
-
*/
|
|
15
|
-
label: {
|
|
16
|
-
type: String
|
|
17
|
-
},
|
|
18
|
-
/**
|
|
19
|
-
* A `router-link` path or object
|
|
20
|
-
*/
|
|
21
|
-
to: {
|
|
22
|
-
type: [String, Object]
|
|
23
|
-
},
|
|
24
|
-
/**
|
|
25
|
-
* A URL to link to using a native anchor element
|
|
26
|
-
*/
|
|
27
|
-
href: String,
|
|
28
|
-
/**
|
|
29
|
-
* The size of the button. Accepts: 'sm', 'md', 'lg', 'xl', '2xl'
|
|
30
|
-
*/
|
|
31
|
-
size: {
|
|
32
|
-
type: String,
|
|
33
|
-
"default": 'lg',
|
|
34
|
-
validator: function validator(value) {
|
|
35
|
-
return ['sm', 'md', 'lg', 'xl', '2xl'].includes(value);
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
/**
|
|
39
|
-
* The colour variant of the button.
|
|
40
|
-
* Accepts 'primary', 'secondary', 'tertiary', 'quaternary', 'error', 'success', 'link', 'text', 'transparent', 'gradient'
|
|
41
|
-
*/
|
|
42
|
-
variant: {
|
|
43
|
-
type: String,
|
|
44
|
-
"default": 'primary',
|
|
45
|
-
validator: function validator(value) {
|
|
46
|
-
return ['primary', 'secondary', 'tertiary', 'quaternary', 'error', 'success', 'link', 'text', 'transparent', 'gradient'].includes(value);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
/**
|
|
50
|
-
* The type attribute of the button
|
|
51
|
-
*/
|
|
52
|
-
buttonType: {
|
|
53
|
-
type: String,
|
|
54
|
-
"default": 'button',
|
|
55
|
-
validator: function validator(value) {
|
|
56
|
-
return ['button', 'submit', 'reset'].includes(value);
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
/**
|
|
60
|
-
* The animation type of the hover & focus states.
|
|
61
|
-
* Accepts 'alternate' and 'fade'
|
|
62
|
-
*/
|
|
63
|
-
animation: {
|
|
64
|
-
type: String,
|
|
65
|
-
"default": 'alternate',
|
|
66
|
-
validator: function validator(value) {
|
|
67
|
-
return ['alternate', 'fade'].includes(value);
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
/**
|
|
71
|
-
* Whether the button is rounded or not
|
|
72
|
-
*/
|
|
73
|
-
rounded: {
|
|
74
|
-
type: Boolean,
|
|
75
|
-
"default": true
|
|
76
|
-
},
|
|
77
|
-
/**
|
|
78
|
-
* Whether the loading animation is shown or not
|
|
79
|
-
*/
|
|
80
|
-
loading: {
|
|
81
|
-
type: Boolean,
|
|
82
|
-
"default": false
|
|
83
|
-
},
|
|
84
|
-
/**
|
|
85
|
-
* Whether the link should open in a new tab
|
|
86
|
-
*/
|
|
87
|
-
external: {
|
|
88
|
-
type: Boolean
|
|
89
|
-
},
|
|
90
|
-
/**
|
|
91
|
-
* Whether the button selected state is active
|
|
92
|
-
*/
|
|
93
|
-
selected: {
|
|
94
|
-
type: Boolean
|
|
95
|
-
},
|
|
96
|
-
/**
|
|
97
|
-
* Whether the button is disabled
|
|
98
|
-
*/
|
|
99
|
-
disabled: {
|
|
100
|
-
type: Boolean,
|
|
101
|
-
"default": false
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
emits: [/** Fired on native click */
|
|
105
|
-
'click', /** Fired on native hover in */
|
|
106
|
-
'mouseover', /** Fired on native hover out */
|
|
107
|
-
'mouseout', /** Fired on native focus in */
|
|
108
|
-
'focusin', /** Fired on native focus out */
|
|
109
|
-
'focusout'],
|
|
110
|
-
setup: function setup(props, ctx) {
|
|
111
|
-
var baseClass = ref("inline-block text-center transition-colors ease-in-out whitespace-nowrap\n duration-200 focus:outline-0 border focus-visible:outline-0 focus:ring-none ring-offset-1 focus-visible:ring\n ");
|
|
112
|
-
var buttonClasses = ref({
|
|
113
|
-
primary: {
|
|
114
|
-
text: '',
|
|
115
|
-
background: 'fw-button--primary',
|
|
116
|
-
border: ''
|
|
117
|
-
},
|
|
118
|
-
secondary: {
|
|
119
|
-
text: '',
|
|
120
|
-
background: 'fw-button--secondary',
|
|
121
|
-
border: ''
|
|
122
|
-
},
|
|
123
|
-
tertiary: {
|
|
124
|
-
text: '',
|
|
125
|
-
background: 'fw-button--tertiary',
|
|
126
|
-
border: ''
|
|
127
|
-
},
|
|
128
|
-
quaternary: {
|
|
129
|
-
text: '',
|
|
130
|
-
background: 'fw-button--quaternary',
|
|
131
|
-
border: ''
|
|
132
|
-
},
|
|
133
|
-
gradient: {
|
|
134
|
-
text: '',
|
|
135
|
-
background: 'fw-button--gradient',
|
|
136
|
-
border: ''
|
|
137
|
-
},
|
|
138
|
-
success: {
|
|
139
|
-
text: 'text-white hover:text-brand-success-text active:text-brand-success-new',
|
|
140
|
-
background: 'bg-brand-success-new hover:bg-white active:bg-white',
|
|
141
|
-
border: 'border-brand-success-new focus-visible:ring-brand-success-new'
|
|
142
|
-
},
|
|
143
|
-
error: {
|
|
144
|
-
text: 'text-white hover:text-brand-error-text active:text-brand-error-text',
|
|
145
|
-
background: 'bg-brand-error-text hover:bg-white active:bg-white',
|
|
146
|
-
border: 'border-brand-error-text focus-visible:ring-brand-error-text'
|
|
147
|
-
},
|
|
148
|
-
link: {
|
|
149
|
-
text: 'text-link font-normal no-underline hover:underline focus-visible:underline',
|
|
150
|
-
background: '',
|
|
151
|
-
border: 'border-none focus-visible:ring-2 focus-visible:ring-link'
|
|
152
|
-
},
|
|
153
|
-
text: {
|
|
154
|
-
text: 'text-body hover:text-white active:text-white',
|
|
155
|
-
background: 'bg-white hover:bg-body active:bg-body',
|
|
156
|
-
border: 'border-transparent focus-visible:ring-body'
|
|
157
|
-
},
|
|
158
|
-
transparent: {
|
|
159
|
-
text: '',
|
|
160
|
-
background: 'fw-button--transparent',
|
|
161
|
-
border: ''
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
var sizes = ref({
|
|
165
|
-
sm: 'px-3 py-1 text-sm',
|
|
166
|
-
md: 'px-6 py-2 text-p-small',
|
|
167
|
-
lg: 'px-7 py-2 text-p',
|
|
168
|
-
xl: 'px-12 py-3 text-p',
|
|
169
|
-
'2xl': 'px-16 py-4 text-2xl'
|
|
170
|
-
});
|
|
171
|
-
var iconSizes = ref({
|
|
172
|
-
sm: {
|
|
173
|
-
spacing: 'pr-7',
|
|
174
|
-
size: 'size-7 p-2'
|
|
175
|
-
},
|
|
176
|
-
md: {
|
|
177
|
-
spacing: 'pr-8',
|
|
178
|
-
size: 'size-8 p-2.5'
|
|
179
|
-
},
|
|
180
|
-
lg: {
|
|
181
|
-
spacing: 'pr-10',
|
|
182
|
-
size: 'size-10 p-3'
|
|
183
|
-
},
|
|
184
|
-
xl: {
|
|
185
|
-
spacing: 'pr-12',
|
|
186
|
-
size: 'size-12 p-3'
|
|
187
|
-
},
|
|
188
|
-
'2xl': {
|
|
189
|
-
spacing: 'pr-14',
|
|
190
|
-
size: 'size-14 p-3.5'
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
var textColorClass = computed(function () {
|
|
194
|
-
return buttonClasses.value[props.variant].text;
|
|
195
|
-
});
|
|
196
|
-
var bgColorClass = computed(function () {
|
|
197
|
-
return buttonClasses.value[props.variant].background;
|
|
198
|
-
});
|
|
199
|
-
var sizeClass = computed(function () {
|
|
200
|
-
return sizes.value[props.size];
|
|
201
|
-
});
|
|
202
|
-
var borderClass = computed(function () {
|
|
203
|
-
return buttonClasses.value[props.variant].border;
|
|
204
|
-
});
|
|
205
|
-
var iconSize = computed(function () {
|
|
206
|
-
return iconSizes.value[props.size];
|
|
207
|
-
});
|
|
208
|
-
var onClick = function onClick(e) {
|
|
209
|
-
return ctx.emit('click', e);
|
|
210
|
-
};
|
|
211
|
-
var onMouseover = function onMouseover(e) {
|
|
212
|
-
return ctx.emit('mouseover', e);
|
|
213
|
-
};
|
|
214
|
-
var onMouseout = function onMouseout(e) {
|
|
215
|
-
return ctx.emit('mouseout', e);
|
|
216
|
-
};
|
|
217
|
-
var onFocusin = function onFocusin(e) {
|
|
218
|
-
return ctx.emit('focusin', e);
|
|
219
|
-
};
|
|
220
|
-
var onFocusout = function onFocusout(e) {
|
|
221
|
-
return ctx.emit('focusout', e);
|
|
222
|
-
};
|
|
223
|
-
var tagName = computed(function () {
|
|
224
|
-
if (props.to) return 'router-link';
|
|
225
|
-
if (props.href) return 'a';
|
|
226
|
-
return 'button';
|
|
227
|
-
});
|
|
228
|
-
return {
|
|
229
|
-
baseClass: baseClass,
|
|
230
|
-
textColorClass: textColorClass,
|
|
231
|
-
bgColorClass: bgColorClass,
|
|
232
|
-
sizeClass: sizeClass,
|
|
233
|
-
borderClass: borderClass,
|
|
234
|
-
onClick: onClick,
|
|
235
|
-
onMouseover: onMouseover,
|
|
236
|
-
onMouseout: onMouseout,
|
|
237
|
-
onFocusin: onFocusin,
|
|
238
|
-
onFocusout: onFocusout,
|
|
239
|
-
tagName: tagName,
|
|
240
|
-
iconSize: iconSize
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
var _hoisted_1 = {
|
|
246
|
-
key: 0,
|
|
247
|
-
"class": "fw-button--label"
|
|
248
|
-
};
|
|
249
|
-
var _hoisted_2 = {
|
|
250
|
-
key: 1,
|
|
251
|
-
"class": "w-full h-full button-icon"
|
|
252
|
-
};
|
|
253
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
254
|
-
var _component_LoadingSvg = resolveComponent("LoadingSvg");
|
|
255
|
-
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), {
|
|
256
|
-
"class": normalizeClass(["fw-button", [_ctx.baseClass, _ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass, _ctx.rounded && _ctx.variant !== 'link' ? 'rounded-full' : 'rounded', _ctx.variant === 'link' ? 'pl-0 pr-0 pt-0 pb-0 font-normal rounded-1' : '', _ctx.animation === 'fade' ? 'animation--fade' : 'animation--alternate', _ctx.loading === true ? 'fw-button--loading cursor-progress pointer-events-none' : 'cursor-pointer', _ctx.loading || _ctx.$slots.suffixIcon ? 'relative' : '', _ctx.selected === true ? 'selected' : '']]),
|
|
257
|
-
type: _ctx.tagName === 'button' ? _ctx.buttonType : null,
|
|
258
|
-
to: _ctx.to ? _ctx.to : null,
|
|
259
|
-
href: _ctx.href ? _ctx.href : null,
|
|
260
|
-
tabindex: _ctx.to ? 0 : null,
|
|
261
|
-
disabled: _ctx.disabled,
|
|
262
|
-
loading: _ctx.loading,
|
|
263
|
-
target: !!_ctx.external ? '_blank' : null,
|
|
264
|
-
onClick: _ctx.onClick,
|
|
265
|
-
onFocusin: _ctx.onFocusin,
|
|
266
|
-
onFocusout: _ctx.onFocusout,
|
|
267
|
-
onMouseover: _ctx.onMouseover,
|
|
268
|
-
onMouseout: _ctx.onMouseout
|
|
269
|
-
}, {
|
|
270
|
-
"default": withCtx(function () {
|
|
271
|
-
return [_ctx.$slots["default"] || _ctx.label ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", {
|
|
272
|
-
"class": normalizeClass(["fw-button--label-wrapper", _ctx.loading || _ctx.$slots.suffixIcon ? _ctx.iconSize.spacing : 'pr-0 ml-0'])
|
|
273
|
-
}, [_ctx.label ? (openBlock(), createElementBlock(Fragment, {
|
|
274
|
-
key: 0
|
|
275
|
-
}, [createTextVNode(toDisplayString(_ctx.label), 1)], 64)) : _ctx.$slots["default"] ? renderSlot(_ctx.$slots, "default", {
|
|
276
|
-
key: 1
|
|
277
|
-
}) : createCommentVNode("", true)], 2), _ctx.loading || _ctx.$slots.suffixIcon ? (openBlock(), createElementBlock("div", {
|
|
278
|
-
key: 0,
|
|
279
|
-
"class": normalizeClass([_ctx.iconSize.size, "inline-flex absolute top-2/4 -translate-y-2/4 right-0 bg-black/20 rounded-full"])
|
|
280
|
-
}, [_ctx.loading ? (openBlock(), createBlock(_component_LoadingSvg, {
|
|
281
|
-
key: 0,
|
|
282
|
-
name: "loading",
|
|
283
|
-
"class": "w-full h-full animate-spin"
|
|
284
|
-
})) : _ctx.$slots.suffixIcon ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "suffixIcon")])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true)])) : createCommentVNode("", true)];
|
|
285
|
-
}),
|
|
286
|
-
_: 3
|
|
287
|
-
}, 40, ["class", "type", "to", "href", "tabindex", "disabled", "loading", "target", "onClick", "onFocusin", "onFocusout", "onMouseover", "onMouseout"]);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
var css_248z = ".fw-button{line-height:normal}.fw-button--label-wrapper{-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:margin,padding;-moz-transition-property:margin,padding;transition-property:margin,padding;-webkit-transition-timing-function:ease-in-out;-moz-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.fw-button--primary{background-color:var(--colorButtonPrimary);border-color:var(--colorButtonPrimary);color:var(--colorButtonPrimaryText)}.fw-button--primary.fw-button--loading,.fw-button--primary.router-link-active,.fw-button--primary.selected,.fw-button--primary:hover{background-color:var(--colorButtonPrimaryFade);border-color:var(--colorButtonPrimaryFade)}.fw-button--primary:focus-visible{--tw-ring-color:var(--colorButtonPrimary)}.fw-button--primary:disabled{--tw-border-opacity:1!important;--tw-bg-opacity:1!important;background-color:rgb(222 224 227/var(--tw-bg-opacity))!important;border-color:rgb(222 224 227/var(--tw-border-opacity))!important;color:var(--colorText3)!important}.fw-button--secondary{background-color:var(--colorButtonSecondary);border-color:var(--colorButtonSecondary);color:var(--colorButtonSecondaryText)}.fw-button--secondary.animation--alternate.fw-button--loading,.fw-button--secondary.animation--alternate.router-link-active,.fw-button--secondary.animation--alternate.selected,.fw-button--secondary.animation--alternate:hover{background-color:var(--colorButtonSecondaryFade);border-color:var(--colorButtonSecondaryFade);color:var(--colorButtonSecondaryText)}.fw-button--secondary.animation--fade.fw-button--loading,.fw-button--secondary.animation--fade.router-link-active,.fw-button--secondary.animation--fade.selected,.fw-button--secondary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--secondary:focus-visible{--tw-ring-color:var(--colorButtonSecondary)}.fw-button--secondary:disabled{--tw-border-opacity:1!important;--tw-bg-opacity:1!important;background-color:rgb(222 224 227/var(--tw-bg-opacity))!important;border-color:rgb(222 224 227/var(--tw-border-opacity))!important;color:var(--colorText3)!important}.fw-button--tertiary{background-color:transparent;border-color:var(--colorButtonTertiaryText);color:var(--colorButtonTertiaryText)}.fw-button--tertiary.animation--alternate.fw-button--loading,.fw-button--tertiary.animation--alternate.router-link-active,.fw-button--tertiary.animation--alternate.selected,.fw-button--tertiary.animation--alternate:hover{background-color:var(--colorButtonTertiaryFade)}.fw-button--tertiary.animation--fade.fw-button--loading,.fw-button--tertiary.animation--fade.router-link-active,.fw-button--tertiary.animation--fade.selected,.fw-button--tertiary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--tertiary:focus-visible{--tw-ring-color:var(--colorButtonTertiaryText)}.fw-button--tertiary:disabled{--tw-border-opacity:1!important;background-color:transparent!important;border-color:rgb(222 224 227/var(--tw-border-opacity))!important;color:var(--colorText3)!important}.fw-button--quaternary{background-color:transparent;border-color:var(--colorButtonQuaternaryText);color:var(--colorButtonQuaternaryText)}.fw-button--quaternary.animation--alternate.fw-button--loading,.fw-button--quaternary.animation--alternate.router-link-active,.fw-button--quaternary.animation--alternate.selected,.fw-button--quaternary.animation--alternate:hover{background-color:var(--colorButtonQuaternary);border-color:var(--colorButtonQuaternaryText);color:var(--colorBody)}.fw-button--quaternary.animation--fade.fw-button--loading,.fw-button--quaternary.animation--fade.router-link-active,.fw-button--quaternary.animation--fade.selected,.fw-button--quaternary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--quaternary:focus-visible{--tw-ring-color:var(--colorButtonQuaternaryText)}.fw-button--quaternary:disabled{background-color:transparent!important;border-color:var(--colorBorder1)!important;color:var(--colorText3)!important}.fw-button--quaternary:disabled.router-link-active,.fw-button--quaternary:disabled.selected{--tw-bg-opacity:1!important;background-color:rgb(222 224 227/var(--tw-bg-opacity))!important}.fw-button--gradient{background-image:var(--colorButtonGradient);background-size:135% auto;border:none;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.15),0 0 40px rgba(142,125,255,.3);box-shadow:0 2px 4px rgba(0,0,0,.15),0 0 40px rgba(142,125,255,.3);color:var(--colorButtonGradientText);-webkit-transition:.4s;-moz-transition:.4s;transition:.4s}.fw-button--gradient.animation--alternate.fw-button--loading,.fw-button--gradient.animation--alternate.router-link-active,.fw-button--gradient.animation--alternate.selected,.fw-button--gradient.animation--alternate:hover{background-size:120% auto;-webkit-transition:.4s;-moz-transition:.4s;transition:.4s}@-webkit-keyframes pulse{50%{opacity:.5}}@-moz-keyframes pulse{50%{opacity:.5}}.fw-button--gradient.animation--alternate.fw-button--loading .button-icon,.fw-button--gradient.animation--alternate.router-link-active .button-icon,.fw-button--gradient.animation--alternate.selected .button-icon,.fw-button--gradient.animation--alternate:hover .button-icon{-webkit-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;-moz-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.fw-button--gradient.animation--fade.fw-button--loading,.fw-button--gradient.animation--fade.router-link-active,.fw-button--gradient.animation--fade.selected,.fw-button--gradient.animation--fade:hover{background-size:120% auto;-webkit-transition:.4s;-moz-transition:.4s;transition:.4s}@keyframes pulse{50%{opacity:.5}}.fw-button--gradient.animation--fade.fw-button--loading .button-icon,.fw-button--gradient.animation--fade.router-link-active .button-icon,.fw-button--gradient.animation--fade.selected .button-icon,.fw-button--gradient.animation--fade:hover .button-icon{-webkit-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;-moz-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.fw-button--gradient:focus-visible{--tw-ring-color:var(--colorButtonQuaternaryText)}.fw-button--gradient:disabled{--tw-bg-opacity:1!important;background-color:rgb(222 224 227/var(--tw-bg-opacity))!important;background-image:none!important;border-color:var(--colorBorder1)!important;color:var(--colorText3)!important}.fw-button--transparent{border-color:transparent;color:var(--colorBody);-webkit-text-decoration-line:none;-moz-text-decoration-line:none;text-decoration-line:none}.fw-button--transparent:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 -webkit-calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 -moz-calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:var(--colorPrimary);-webkit-box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.fw-button--transparent.fw-button--loading,.fw-button--transparent.router-link-active,.fw-button--transparent.selected,.fw-button--transparent:hover{background-color:var(--colorButtonTertiaryFade);color:var(--colorPrimary);-webkit-text-decoration-line:underline;-moz-text-decoration-line:underline;text-decoration-line:underline}.fw-button:disabled{cursor:not-allowed}";
|
|
291
|
-
var stylesheet = ".fw-button{line-height:normal}.fw-button--label-wrapper{-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:margin,padding;-moz-transition-property:margin,padding;transition-property:margin,padding;-webkit-transition-timing-function:ease-in-out;-moz-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.fw-button--primary{background-color:var(--colorButtonPrimary);border-color:var(--colorButtonPrimary);color:var(--colorButtonPrimaryText)}.fw-button--primary.fw-button--loading,.fw-button--primary.router-link-active,.fw-button--primary.selected,.fw-button--primary:hover{background-color:var(--colorButtonPrimaryFade);border-color:var(--colorButtonPrimaryFade)}.fw-button--primary:focus-visible{--tw-ring-color:var(--colorButtonPrimary)}.fw-button--primary:disabled{--tw-border-opacity:1!important;--tw-bg-opacity:1!important;background-color:rgb(222 224 227/var(--tw-bg-opacity))!important;border-color:rgb(222 224 227/var(--tw-border-opacity))!important;color:var(--colorText3)!important}.fw-button--secondary{background-color:var(--colorButtonSecondary);border-color:var(--colorButtonSecondary);color:var(--colorButtonSecondaryText)}.fw-button--secondary.animation--alternate.fw-button--loading,.fw-button--secondary.animation--alternate.router-link-active,.fw-button--secondary.animation--alternate.selected,.fw-button--secondary.animation--alternate:hover{background-color:var(--colorButtonSecondaryFade);border-color:var(--colorButtonSecondaryFade);color:var(--colorButtonSecondaryText)}.fw-button--secondary.animation--fade.fw-button--loading,.fw-button--secondary.animation--fade.router-link-active,.fw-button--secondary.animation--fade.selected,.fw-button--secondary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--secondary:focus-visible{--tw-ring-color:var(--colorButtonSecondary)}.fw-button--secondary:disabled{--tw-border-opacity:1!important;--tw-bg-opacity:1!important;background-color:rgb(222 224 227/var(--tw-bg-opacity))!important;border-color:rgb(222 224 227/var(--tw-border-opacity))!important;color:var(--colorText3)!important}.fw-button--tertiary{background-color:transparent;border-color:var(--colorButtonTertiaryText);color:var(--colorButtonTertiaryText)}.fw-button--tertiary.animation--alternate.fw-button--loading,.fw-button--tertiary.animation--alternate.router-link-active,.fw-button--tertiary.animation--alternate.selected,.fw-button--tertiary.animation--alternate:hover{background-color:var(--colorButtonTertiaryFade)}.fw-button--tertiary.animation--fade.fw-button--loading,.fw-button--tertiary.animation--fade.router-link-active,.fw-button--tertiary.animation--fade.selected,.fw-button--tertiary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--tertiary:focus-visible{--tw-ring-color:var(--colorButtonTertiaryText)}.fw-button--tertiary:disabled{--tw-border-opacity:1!important;background-color:transparent!important;border-color:rgb(222 224 227/var(--tw-border-opacity))!important;color:var(--colorText3)!important}.fw-button--quaternary{background-color:transparent;border-color:var(--colorButtonQuaternaryText);color:var(--colorButtonQuaternaryText)}.fw-button--quaternary.animation--alternate.fw-button--loading,.fw-button--quaternary.animation--alternate.router-link-active,.fw-button--quaternary.animation--alternate.selected,.fw-button--quaternary.animation--alternate:hover{background-color:var(--colorButtonQuaternary);border-color:var(--colorButtonQuaternaryText);color:var(--colorBody)}.fw-button--quaternary.animation--fade.fw-button--loading,.fw-button--quaternary.animation--fade.router-link-active,.fw-button--quaternary.animation--fade.selected,.fw-button--quaternary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--quaternary:focus-visible{--tw-ring-color:var(--colorButtonQuaternaryText)}.fw-button--quaternary:disabled{background-color:transparent!important;border-color:var(--colorBorder1)!important;color:var(--colorText3)!important}.fw-button--quaternary:disabled.router-link-active,.fw-button--quaternary:disabled.selected{--tw-bg-opacity:1!important;background-color:rgb(222 224 227/var(--tw-bg-opacity))!important}.fw-button--gradient{background-image:var(--colorButtonGradient);background-size:135% auto;border:none;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.15),0 0 40px rgba(142,125,255,.3);box-shadow:0 2px 4px rgba(0,0,0,.15),0 0 40px rgba(142,125,255,.3);color:var(--colorButtonGradientText);-webkit-transition:.4s;-moz-transition:.4s;transition:.4s}.fw-button--gradient.animation--alternate.fw-button--loading,.fw-button--gradient.animation--alternate.router-link-active,.fw-button--gradient.animation--alternate.selected,.fw-button--gradient.animation--alternate:hover{background-size:120% auto;-webkit-transition:.4s;-moz-transition:.4s;transition:.4s}@-webkit-keyframes pulse{50%{opacity:.5}}@-moz-keyframes pulse{50%{opacity:.5}}.fw-button--gradient.animation--alternate.fw-button--loading .button-icon,.fw-button--gradient.animation--alternate.router-link-active .button-icon,.fw-button--gradient.animation--alternate.selected .button-icon,.fw-button--gradient.animation--alternate:hover .button-icon{-webkit-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;-moz-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.fw-button--gradient.animation--fade.fw-button--loading,.fw-button--gradient.animation--fade.router-link-active,.fw-button--gradient.animation--fade.selected,.fw-button--gradient.animation--fade:hover{background-size:120% auto;-webkit-transition:.4s;-moz-transition:.4s;transition:.4s}@keyframes pulse{50%{opacity:.5}}.fw-button--gradient.animation--fade.fw-button--loading .button-icon,.fw-button--gradient.animation--fade.router-link-active .button-icon,.fw-button--gradient.animation--fade.selected .button-icon,.fw-button--gradient.animation--fade:hover .button-icon{-webkit-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;-moz-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.fw-button--gradient:focus-visible{--tw-ring-color:var(--colorButtonQuaternaryText)}.fw-button--gradient:disabled{--tw-bg-opacity:1!important;background-color:rgb(222 224 227/var(--tw-bg-opacity))!important;background-image:none!important;border-color:var(--colorBorder1)!important;color:var(--colorText3)!important}.fw-button--transparent{border-color:transparent;color:var(--colorBody);-webkit-text-decoration-line:none;-moz-text-decoration-line:none;text-decoration-line:none}.fw-button--transparent:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 -webkit-calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 -moz-calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:var(--colorPrimary);-webkit-box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.fw-button--transparent.fw-button--loading,.fw-button--transparent.router-link-active,.fw-button--transparent.selected,.fw-button--transparent:hover{background-color:var(--colorButtonTertiaryFade);color:var(--colorPrimary);-webkit-text-decoration-line:underline;-moz-text-decoration-line:underline;text-decoration-line:underline}.fw-button:disabled{cursor:not-allowed}";
|
|
292
|
-
styleInject(css_248z);
|
|
293
|
-
|
|
294
|
-
script.render = render;
|
|
295
|
-
|
|
296
|
-
export { script as s };
|
package/esm/fw-image-D-OHafdw.js
DELETED
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, useCssVars, resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, withKeys, normalizeClass, createElementVNode, createVNode, renderSlot, createBlock, createCommentVNode } from 'vue';
|
|
2
|
-
import { _ as __default__$1 } from './fw-loading-bar-DecYSBC_.js';
|
|
3
|
-
import { u as render$1 } from './index-BsEH8YYr.js';
|
|
4
|
-
import { u as useColours } from './get-root-colours-DCjlYelc.js';
|
|
5
|
-
import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
|
|
6
|
-
|
|
7
|
-
var handleIntersect = function handleIntersect(entries, observer) {
|
|
8
|
-
entries.forEach(function (entry) {
|
|
9
|
-
if (entry.isIntersecting) {
|
|
10
|
-
loadImage(entry.target);
|
|
11
|
-
observer.unobserve(entry.target);
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
var createObserver = function createObserver(el) {
|
|
16
|
-
var options = {
|
|
17
|
-
root: null,
|
|
18
|
-
threshold: Number(el.getAttribute('threshold')) || 0
|
|
19
|
-
};
|
|
20
|
-
var observer = new IntersectionObserver(handleIntersect, options);
|
|
21
|
-
observer.observe(el);
|
|
22
|
-
};
|
|
23
|
-
var loadImage = function loadImage(el) {
|
|
24
|
-
var imageElement = Array.from(el.children).find(function (element) {
|
|
25
|
-
return element.nodeName === 'IMG';
|
|
26
|
-
});
|
|
27
|
-
if (imageElement) {
|
|
28
|
-
var type = el.getAttribute('type');
|
|
29
|
-
var url = imageElement.dataset.url;
|
|
30
|
-
var setImgError = function setImgError() {
|
|
31
|
-
setTimeout(function () {
|
|
32
|
-
return el.classList.add('fw-image--loaded-error');
|
|
33
|
-
}, 100);
|
|
34
|
-
setTimeout(function () {
|
|
35
|
-
var _el$querySelector;
|
|
36
|
-
return (_el$querySelector = el.querySelector('.fw-image--loading')) === null || _el$querySelector === void 0 ? void 0 : _el$querySelector.remove();
|
|
37
|
-
}, 600);
|
|
38
|
-
};
|
|
39
|
-
if (url) {
|
|
40
|
-
imageElement.src = url;
|
|
41
|
-
} else {
|
|
42
|
-
setImgError();
|
|
43
|
-
}
|
|
44
|
-
imageElement.addEventListener('load', function () {
|
|
45
|
-
setTimeout(function () {
|
|
46
|
-
return el.classList.add('fw-image--loaded');
|
|
47
|
-
}, 100);
|
|
48
|
-
setTimeout(function () {
|
|
49
|
-
var _el$querySelector2;
|
|
50
|
-
return (_el$querySelector2 = el.querySelector('.fw-image--loading')) === null || _el$querySelector2 === void 0 ? void 0 : _el$querySelector2.remove();
|
|
51
|
-
}, 600);
|
|
52
|
-
});
|
|
53
|
-
imageElement.addEventListener('error', function () {
|
|
54
|
-
setImgError();
|
|
55
|
-
});
|
|
56
|
-
if (type === 'background') {
|
|
57
|
-
el.style.backgroundImage = "url('".concat(url, "')");
|
|
58
|
-
imageElement.classList.add('!invisible');
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
var lazyLoadDirective = {
|
|
63
|
-
mounted: function mounted(el) {
|
|
64
|
-
if (window.IntersectionObserver) {
|
|
65
|
-
createObserver(el);
|
|
66
|
-
} else {
|
|
67
|
-
loadImage(el);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
var __default__ = defineComponent({
|
|
73
|
-
name: 'FwImage',
|
|
74
|
-
directives: {
|
|
75
|
-
lazyload: lazyLoadDirective
|
|
76
|
-
},
|
|
77
|
-
components: {
|
|
78
|
-
FwLoadingBar: __default__$1,
|
|
79
|
-
FileExclamationSvg: render$1
|
|
80
|
-
},
|
|
81
|
-
props: {
|
|
82
|
-
/**
|
|
83
|
-
* The src attribute of the image
|
|
84
|
-
*/
|
|
85
|
-
src: String,
|
|
86
|
-
/**
|
|
87
|
-
* The alt attribute of the image
|
|
88
|
-
*/
|
|
89
|
-
alt: String,
|
|
90
|
-
/**
|
|
91
|
-
* The type of component. Accepts 'background' and defaults to the native html5 element.
|
|
92
|
-
*/
|
|
93
|
-
type: {
|
|
94
|
-
type: String,
|
|
95
|
-
"default": 'native',
|
|
96
|
-
validator: function validator(value) {
|
|
97
|
-
return ['native', 'background'].includes(value);
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
/**
|
|
101
|
-
* Whether the loading bar and error state are rounded.
|
|
102
|
-
*/
|
|
103
|
-
rounded: {
|
|
104
|
-
type: Boolean,
|
|
105
|
-
"default": false
|
|
106
|
-
},
|
|
107
|
-
/**
|
|
108
|
-
* The class for the native image element
|
|
109
|
-
*/
|
|
110
|
-
imageClass: {
|
|
111
|
-
type: String
|
|
112
|
-
},
|
|
113
|
-
/**
|
|
114
|
-
* Controls the threshold before the component triggers the src url.
|
|
115
|
-
*/
|
|
116
|
-
threshold: {
|
|
117
|
-
type: Number,
|
|
118
|
-
"default": 0
|
|
119
|
-
},
|
|
120
|
-
/**
|
|
121
|
-
* Controls the error UI when an image src is unavailable.
|
|
122
|
-
*/
|
|
123
|
-
enableErrors: {
|
|
124
|
-
type: Boolean,
|
|
125
|
-
"default": true
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
emits: ['click', 'mouseover', 'mouseout'],
|
|
129
|
-
setup: function setup(props) {
|
|
130
|
-
var isBackground = computed(function () {
|
|
131
|
-
return props.type === 'background';
|
|
132
|
-
});
|
|
133
|
-
var fwImageRef = ref(null);
|
|
134
|
-
var _useColours = useColours(),
|
|
135
|
-
colorErrorTextFade5 = _useColours.colorErrorTextFade5;
|
|
136
|
-
return {
|
|
137
|
-
fwImageRef: fwImageRef,
|
|
138
|
-
isBackground: isBackground,
|
|
139
|
-
colorErrorTextFade5: colorErrorTextFade5
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
var __injectCSSVars__ = function __injectCSSVars__() {
|
|
144
|
-
useCssVars(function (_ctx) {
|
|
145
|
-
return {
|
|
146
|
-
"eb5c76bc": _ctx.colorErrorTextFade5
|
|
147
|
-
};
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
var __setup__ = __default__.setup;
|
|
151
|
-
__default__.setup = __setup__ ? function (props, ctx) {
|
|
152
|
-
__injectCSSVars__();
|
|
153
|
-
return __setup__(props, ctx);
|
|
154
|
-
} : __injectCSSVars__;
|
|
155
|
-
|
|
156
|
-
var _hoisted_1 = ["type", "threshold"];
|
|
157
|
-
var _hoisted_2 = ["data-url", "alt"];
|
|
158
|
-
var _hoisted_3 = {
|
|
159
|
-
"class": "fw-image--error-wrapper flex flex-col items-center justify-center"
|
|
160
|
-
};
|
|
161
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
162
|
-
var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
|
|
163
|
-
var _component_FileExclamationSvg = resolveComponent("FileExclamationSvg");
|
|
164
|
-
var _directive_lazyload = resolveDirective("lazyload");
|
|
165
|
-
return withDirectives((openBlock(), createElementBlock("div", {
|
|
166
|
-
ref: "fwImageRef",
|
|
167
|
-
type: _ctx.type,
|
|
168
|
-
threshold: _ctx.threshold,
|
|
169
|
-
"class": normalizeClass(["fw-image", {
|
|
170
|
-
'fw-image--background': _ctx.isBackground,
|
|
171
|
-
'rounded-full': _ctx.rounded
|
|
172
|
-
}]),
|
|
173
|
-
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
174
|
-
return _ctx.$emit('click', $event);
|
|
175
|
-
}),
|
|
176
|
-
onKeyup: _cache[1] || (_cache[1] = withKeys(function ($event) {
|
|
177
|
-
return _ctx.$emit('click', $event);
|
|
178
|
-
}, ["enter"])),
|
|
179
|
-
onMouseover: _cache[2] || (_cache[2] = function ($event) {
|
|
180
|
-
return _ctx.$emit('mouseover');
|
|
181
|
-
}),
|
|
182
|
-
onMouseout: _cache[3] || (_cache[3] = function ($event) {
|
|
183
|
-
return _ctx.$emit('mouseout');
|
|
184
|
-
}),
|
|
185
|
-
onFocusin: _cache[4] || (_cache[4] = function ($event) {
|
|
186
|
-
return _ctx.$emit('mouseover');
|
|
187
|
-
}),
|
|
188
|
-
onFocusout: _cache[5] || (_cache[5] = function ($event) {
|
|
189
|
-
return _ctx.$emit('mouseout');
|
|
190
|
-
})
|
|
191
|
-
}, [createElementVNode("img", {
|
|
192
|
-
"data-url": _ctx.src,
|
|
193
|
-
alt: _ctx.alt,
|
|
194
|
-
loading: "lazy",
|
|
195
|
-
"class": normalizeClass([_ctx.rounded ? 'rounded-full' : '', _ctx.imageClass])
|
|
196
|
-
}, null, 10, _hoisted_2), createVNode(_component_FwLoadingBar, {
|
|
197
|
-
"class": normalizeClass(["fw-image--loading w-full h-full", {
|
|
198
|
-
'rounded-full': _ctx.rounded
|
|
199
|
-
}])
|
|
200
|
-
}, null, 8, ["class"]), createElementVNode("div", {
|
|
201
|
-
"class": normalizeClass(["fw-image--error rounded", {
|
|
202
|
-
'rounded-full': _ctx.rounded
|
|
203
|
-
}])
|
|
204
|
-
}, [createElementVNode("div", _hoisted_3, [_ctx.enableErrors ? (openBlock(), createBlock(_component_FileExclamationSvg, {
|
|
205
|
-
key: 0,
|
|
206
|
-
name: "file-exclamation",
|
|
207
|
-
"class": "w-full h-full scale-[0.25] opacity-40 text-brand-warning-text max-w-[150px]"
|
|
208
|
-
})) : createCommentVNode("", true)])], 2), renderSlot(_ctx.$slots, "default")], 42, _hoisted_1)), [[_directive_lazyload]]);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
var css_248z = ".fw-image{position:relative}.fw-image img{-webkit-transition:all .5s ease-in-out;-moz-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{background-color:var(--eb5c76bc);height:100%;left:0;position:relative;position:absolute;top:0;-webkit-transition:all .5s ease-in;-moz-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%);-moz-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;-moz-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}";
|
|
212
|
-
var stylesheet = ".fw-image{position:relative}.fw-image img{-webkit-transition:all .5s ease-in-out;-moz-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{background-color:var(--eb5c76bc);height:100%;left:0;position:relative;position:absolute;top:0;-webkit-transition:all .5s ease-in;-moz-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%);-moz-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;-moz-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}";
|
|
213
|
-
styleInject(css_248z);
|
|
214
|
-
|
|
215
|
-
__default__.render = render;
|
|
216
|
-
|
|
217
|
-
export { __default__ as _ };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, createElementBlock, openBlock } from 'vue';
|
|
2
|
-
import { u as useColours } from './get-root-colours-DCjlYelc.js';
|
|
3
|
-
import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
|
|
4
|
-
|
|
5
|
-
var __default__ = defineComponent({
|
|
6
|
-
name: 'FwLoadingBar',
|
|
7
|
-
setup: function setup() {
|
|
8
|
-
var _useColours = useColours(),
|
|
9
|
-
primaryFade5 = _useColours.primaryFade5,
|
|
10
|
-
primaryFade20 = _useColours.primaryFade20;
|
|
11
|
-
return {
|
|
12
|
-
primaryFade5: primaryFade5,
|
|
13
|
-
primaryFade20: primaryFade20
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
var __injectCSSVars__ = function __injectCSSVars__() {
|
|
18
|
-
useCssVars(function (_ctx) {
|
|
19
|
-
return {
|
|
20
|
-
"96bc2d4c": _ctx.primaryFade20,
|
|
21
|
-
"57716cce": _ctx.primaryFade5
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
var __setup__ = __default__.setup;
|
|
26
|
-
__default__.setup = __setup__ ? function (props, ctx) {
|
|
27
|
-
__injectCSSVars__();
|
|
28
|
-
return __setup__(props, ctx);
|
|
29
|
-
} : __injectCSSVars__;
|
|
30
|
-
|
|
31
|
-
var _hoisted_1 = {
|
|
32
|
-
"class": "fw-loading-bar rounded",
|
|
33
|
-
"aria-hidden": "true"
|
|
34
|
-
};
|
|
35
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
36
|
-
return openBlock(), createElementBlock("div", _hoisted_1);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
var css_248z = ".fw-loading-bar{-webkit-animation:fwSkeletonLoading 1.5s linear infinite running;-moz-animation:fwSkeletonLoading 1.5s linear infinite running;animation:fwSkeletonLoading 1.5s linear infinite running;background-image:-webkit-linear-gradient(350deg,var(--96bc2d4c),var(--57716cce),var(--96bc2d4c));background-image:-moz-linear-gradient(350deg,var(--96bc2d4c),var(--57716cce),var(--96bc2d4c));background-image:linear-gradient(100deg,var(--96bc2d4c),var(--57716cce),var(--96bc2d4c));background-size:200% 200%}@-webkit-keyframes fwSkeletonLoading{0%{background-position-x:200%}50%{background-position-x:100%}to{background-position-x:0}}@-moz-keyframes fwSkeletonLoading{0%{background-position-x:200%}50%{background-position-x:100%}to{background-position-x:0}}@keyframes fwSkeletonLoading{0%{background-position-x:200%}50%{background-position-x:100%}to{background-position-x:0}}";
|
|
40
|
-
var stylesheet = ".fw-loading-bar{-webkit-animation:fwSkeletonLoading 1.5s linear infinite running;-moz-animation:fwSkeletonLoading 1.5s linear infinite running;animation:fwSkeletonLoading 1.5s linear infinite running;background-image:-webkit-linear-gradient(350deg,var(--96bc2d4c),var(--57716cce),var(--96bc2d4c));background-image:-moz-linear-gradient(350deg,var(--96bc2d4c),var(--57716cce),var(--96bc2d4c));background-image:linear-gradient(100deg,var(--96bc2d4c),var(--57716cce),var(--96bc2d4c));background-size:200% 200%}@-webkit-keyframes fwSkeletonLoading{0%{background-position-x:200%}50%{background-position-x:100%}to{background-position-x:0}}@-moz-keyframes fwSkeletonLoading{0%{background-position-x:200%}50%{background-position-x:100%}to{background-position-x:0}}@keyframes fwSkeletonLoading{0%{background-position-x:200%}50%{background-position-x:100%}to{background-position-x:0}}";
|
|
41
|
-
styleInject(css_248z);
|
|
42
|
-
|
|
43
|
-
__default__.render = render;
|
|
44
|
-
|
|
45
|
-
export { __default__ as _ };
|