@frollo/frollo-web-ui 7.0.1 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +34615 -34451
- package/esm/_rollupPluginBabelHelpers-DpC_oIQV.js +2566 -0
- package/esm/{check-94a5917a.js → check--YD4Ts6g.js} +4 -4
- package/esm/fw-accordion.js +27 -26
- package/esm/fw-animations.js +23 -26
- package/esm/fw-bar-chart.js +15289 -19
- package/esm/{fw-button-c8502414.js → fw-button-4QLZlu0U.js} +44 -44
- package/esm/fw-button.js +5 -10
- package/esm/{fw-card-1b6a67fe.js → fw-card-bsYbpPmW.js} +12 -12
- package/esm/fw-card.js +1 -1
- package/esm/fw-checkbox.js +23 -32
- package/esm/fw-date-picker.js +137 -80
- package/esm/fw-drawer.js +31 -34
- package/esm/fw-dropdown-nLtzu2fS.js +277 -0
- package/esm/fw-dropdown.js +7 -15
- package/esm/fw-form.js +1 -1
- package/esm/fw-image-DOgM8i8X.js +200 -0
- package/esm/fw-image.js +5 -21
- package/esm/{fw-input-8969b226.js → fw-input-Qiy53nRk.js} +61 -53
- package/esm/fw-input.js +6 -19
- package/esm/fw-loading-bar-DThRjdw1.js +22 -0
- package/esm/{fw-loading-spinner-72d70258.js → fw-loading-spinner-Dn52RI5h.js} +1 -1
- package/esm/fw-loading.js +3 -7
- package/esm/fw-modal.js +79 -53
- package/esm/fw-navigation-menu.js +15 -20
- package/esm/fw-popover.js +39 -375
- package/esm/fw-progress-bar.js +8 -11
- package/esm/fw-provider-list.js +41 -84
- package/esm/fw-sidebar-menu.js +33 -24
- package/esm/{fw-table-row-23f78218.js → fw-table-row-DkZaaMmE.js} +15 -301
- package/esm/fw-table.js +6 -16
- package/esm/fw-tabs.js +21 -103
- package/esm/{fw-tag-ac28200a.js → fw-tag-CPp1P480.js} +29 -20
- package/esm/fw-tag.js +7 -12
- package/esm/fw-toast.js +22 -37
- package/esm/fw-transactions-card.js +14 -30
- package/esm/index-CUPvK0Aa.js +586 -0
- package/esm/index.js +66 -228
- package/esm/vee-validate.esm-3ptvCDR1.js +4071 -0
- package/frollo-web-ui.esm.js +34134 -34388
- package/icons/chart-line-up.svg +3 -0
- package/icons/icons.stories.ts +24 -29
- package/icons/index.ts +5 -1
- package/icons/sack-dollar.svg +3 -0
- package/icons/xmark.svg +2 -2
- package/index.d.ts +2789 -2573
- package/package.json +75 -73
- package/styles/tailwind.scss +6 -0
- package/types/components/fw-accordion/fw-accordion.vue.d.ts +128 -128
- package/types/components/fw-accordion/index.d.ts +2 -2
- package/types/components/fw-accordion/index.types.d.ts +10 -10
- package/types/components/fw-animations/fw-email-pulse.vue.d.ts +24 -24
- package/types/components/fw-animations/fw-loading-spinner.vue.d.ts +2 -2
- package/types/components/fw-animations/fw-success-pulse.vue.d.ts +24 -24
- package/types/components/fw-animations/index.d.ts +4 -4
- package/types/components/fw-bar-chart/fw-bar-chart.vue.d.ts +83 -83
- package/types/components/fw-bar-chart/index.d.ts +2 -2
- package/types/components/fw-bar-chart/index.types.d.ts +11 -11
- package/types/components/fw-button/fw-button.vue.d.ts +190 -176
- package/types/components/fw-button/index.d.ts +2 -2
- package/types/components/fw-button/index.types.d.ts +27 -26
- package/types/components/fw-card/fw-card.vue.d.ts +82 -82
- package/types/components/fw-card/index.d.ts +2 -2
- package/types/components/fw-card/index.types.d.ts +8 -8
- package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +108 -108
- package/types/components/fw-checkbox/index.d.ts +2 -2
- package/types/components/fw-checkbox/index.types.d.ts +9 -9
- package/types/components/fw-date-picker/fw-date-picker.vue.d.ts +249 -177
- package/types/components/fw-date-picker/index.d.ts +2 -2
- package/types/components/fw-date-picker/index.types.d.ts +21 -16
- package/types/components/fw-drawer/fw-drawer.vue.d.ts +165 -165
- package/types/components/fw-drawer/index.d.ts +2 -2
- package/types/components/fw-drawer/index.types.d.ts +13 -13
- package/types/components/fw-dropdown/fw-dropdown.vue.d.ts +154 -130
- package/types/components/fw-dropdown/index.d.ts +2 -2
- package/types/components/fw-dropdown/index.types.d.ts +16 -13
- package/types/components/fw-form/index.d.ts +2 -2
- package/types/components/fw-image/fw-image.vue.d.ts +103 -84
- package/types/components/fw-image/index.d.ts +2 -2
- package/types/components/fw-image/index.types.d.ts +9 -8
- package/types/components/fw-input/fw-input.vue.d.ts +214 -197
- package/types/components/fw-input/index.d.ts +2 -2
- package/types/components/fw-input/index.types.d.ts +18 -16
- package/types/components/fw-loading/fw-loading-bar.vue.d.ts +2 -2
- package/types/components/fw-loading/fw-loading-card.vue.d.ts +2 -2
- package/types/components/fw-loading/fw-loading-table.vue.d.ts +25 -25
- package/types/components/fw-loading/index.d.ts +4 -4
- package/types/components/fw-modal/fw-modal.vue.d.ts +205 -175
- package/types/components/fw-modal/index.d.ts +2 -2
- package/types/components/fw-modal/index.types.d.ts +16 -14
- package/types/components/fw-navigation-menu/fw-navigation-menu.vue.d.ts +57 -57
- package/types/components/fw-navigation-menu/index.d.ts +2 -2
- package/types/components/fw-navigation-menu/index.types.d.ts +7 -7
- package/types/components/fw-popover/fw-popover.vue.d.ts +157 -157
- package/types/components/fw-popover/index.d.ts +2 -2
- package/types/components/fw-popover/index.types.d.ts +11 -11
- package/types/components/fw-progress-bar/fw-progress-bar.vue.d.ts +52 -52
- package/types/components/fw-progress-bar/index.d.ts +2 -2
- package/types/components/fw-progress-bar/index.types.d.ts +5 -5
- package/types/components/fw-provider-list/fw-provider-list.vue.d.ts +100 -100
- package/types/components/fw-provider-list/index.d.ts +2 -2
- package/types/components/fw-provider-list/index.types.d.ts +11 -11
- package/types/components/fw-sidebar-menu/fw-sidebar-menu.vue.d.ts +88 -72
- package/types/components/fw-sidebar-menu/index.d.ts +2 -2
- package/types/components/fw-sidebar-menu/index.types.d.ts +9 -8
- package/types/components/fw-table/fw-table-head.vue.d.ts +2 -2
- package/types/components/fw-table/fw-table-row.vue.d.ts +2 -2
- package/types/components/fw-table/fw-table.vue.d.ts +71 -71
- package/types/components/fw-table/index.d.ts +4 -4
- package/types/components/fw-table/index.types.d.ts +16 -16
- package/types/components/fw-tabs/fw-tab.vue.d.ts +24 -32
- package/types/components/fw-tabs/fw-tabs.vue.d.ts +24 -24
- package/types/components/fw-tabs/index.d.ts +3 -3
- package/types/components/fw-tabs/index.types.d.ts +8 -0
- package/types/components/fw-tag/fw-tag.vue.d.ts +80 -70
- package/types/components/fw-tag/index.d.ts +2 -2
- package/types/components/fw-tag/index.types.d.ts +18 -18
- package/types/components/fw-toast/fw-toast.vue.d.ts +121 -121
- package/types/components/fw-toast/index.d.ts +2 -2
- package/types/components/fw-toast/index.types.d.ts +13 -13
- package/types/components/fw-transactions-card/fw-transactions-card.vue.d.ts +58 -58
- package/types/components/fw-transactions-card/index.d.ts +2 -2
- package/types/components/fw-transactions-card/index.types.d.ts +6 -6
- package/types/components/index.d.ts +24 -24
- package/types/components/index.types.d.ts +21 -20
- package/types/directives/index.d.ts +2 -2
- package/types/directives/lazy-loader.d.ts +3 -3
- package/types/helpers/get-root-colours.d.ts +17 -17
- package/types/icons/index.d.ts +43 -41
- package/types/index-types.esm.d.ts +6 -6
- package/types/index.browser-umd.d.ts +2 -1
- package/types/index.d.ts +3 -3
- package/types/index.esm.d.ts +5 -5
- package/types/services/index.d.ts +2 -2
- package/types/services/modal.d.ts +9 -9
- package/types/services/toast.d.ts +9 -9
- package/web-components/index.js +19662 -19720
- package/esm/add-to-unscopables-ee05b58f.js +0 -25
- package/esm/array-iteration-8267bf22.js +0 -92
- package/esm/array-method-has-species-support-6c675094.js +0 -23
- package/esm/array-method-is-strict-d313436f.js +0 -14
- package/esm/array-species-create-1c67e297.js +0 -97
- package/esm/classof-d44bf093.js +0 -42
- package/esm/create-property-eb329361.js +0 -14
- package/esm/defineProperty-b85f2e0f.js +0 -42
- package/esm/does-not-exceed-safe-integer-de37ce28.js +0 -11
- package/esm/es.array.concat-99b85557.js +0 -69
- package/esm/es.array.find-1ded15d5.js +0 -28
- package/esm/es.array.includes-08e25019.js +0 -27
- package/esm/es.array.map-c56ebffd.js +0 -22
- package/esm/es.date.to-string-15eb9936.js +0 -23
- package/esm/es.function.name-6cafd747.js +0 -29
- package/esm/es.number.constructor-fb16fe05.js +0 -204
- package/esm/es.object.to-string-4b07c4d1.js +0 -24
- package/esm/es.string.includes-061e8272.js +0 -66
- package/esm/es.string.iterator-25db8cd2.js +0 -469
- package/esm/export-10c4adbc.js +0 -95
- package/esm/function-apply-e17cf65b.js +0 -14
- package/esm/fw-dropdown-6856e66e.js +0 -224
- package/esm/fw-image-aca2c61d.js +0 -296
- package/esm/fw-loading-bar-f5ca605c.js +0 -22
- package/esm/index-6758f755.js +0 -15797
- package/esm/index-bced3b35.js +0 -560
- package/esm/is-forced-7cb3ee8f.js +0 -927
- package/esm/object-create-51bf02dc.js +0 -125
- package/esm/regexp-flags-c09864e5.js +0 -50
- package/esm/vee-validate.esm-a17a23c3.js +0 -3192
- package/esm/web.timers-e406c8e6.js +0 -72
- /package/esm/{get-root-colours-865a52ba.js → get-root-colours-DYEoJPEb.js} +0 -0
- /package/esm/{index-0c5cae4f.js → index-BVcOAKar.js} +0 -0
- /package/esm/{style-inject.es-1f59c1d0.js → style-inject.es-tgCJW-Cu.js} +0 -0
- /package/esm/{uniqueId-fe08534a.js → uniqueId-DK6xzFd8.js} +0 -0
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
import './es.array.find-1ded15d5.js';
|
|
2
|
-
import './es.object.to-string-4b07c4d1.js';
|
|
3
|
-
import { defineComponent, toRef, ref, computed, onMounted, onBeforeUnmount, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, normalizeClass, createVNode, Transition, withCtx, Fragment, renderList } from 'vue';
|
|
4
|
-
import { u as useField } from './vee-validate.esm-a17a23c3.js';
|
|
5
|
-
import { b as render$1 } from './index-bced3b35.js';
|
|
6
|
-
import './es.function.name-6cafd747.js';
|
|
7
|
-
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
8
|
-
|
|
9
|
-
var script = defineComponent({
|
|
10
|
-
name: 'FwDropdown',
|
|
11
|
-
components: {
|
|
12
|
-
ChevronDownSvg: render$1
|
|
13
|
-
},
|
|
14
|
-
props: {
|
|
15
|
-
/**
|
|
16
|
-
* The select v-model
|
|
17
|
-
*/
|
|
18
|
-
modelValue: {
|
|
19
|
-
type: String
|
|
20
|
-
},
|
|
21
|
-
/**
|
|
22
|
-
* The name of the input field. Must be unique per form.
|
|
23
|
-
*/
|
|
24
|
-
name: {
|
|
25
|
-
type: String,
|
|
26
|
-
required: true
|
|
27
|
-
},
|
|
28
|
-
/**
|
|
29
|
-
* Label for the input. Also renders to an aria-label attribute
|
|
30
|
-
*/
|
|
31
|
-
label: {
|
|
32
|
-
type: String
|
|
33
|
-
},
|
|
34
|
-
/**
|
|
35
|
-
* Validation rules. Accepts an object, string schema or validation function.
|
|
36
|
-
*/
|
|
37
|
-
rules: {
|
|
38
|
-
type: [Object, String, Function]
|
|
39
|
-
},
|
|
40
|
-
/**
|
|
41
|
-
* An array of options for the dropdown menu.
|
|
42
|
-
*/
|
|
43
|
-
options: {
|
|
44
|
-
type: Array,
|
|
45
|
-
required: true
|
|
46
|
-
},
|
|
47
|
-
/**
|
|
48
|
-
* The hint text shown below the input
|
|
49
|
-
*/
|
|
50
|
-
hint: {
|
|
51
|
-
type: String
|
|
52
|
-
},
|
|
53
|
-
/**
|
|
54
|
-
* Custom placeholder text
|
|
55
|
-
*/
|
|
56
|
-
placeholder: {
|
|
57
|
-
type: String,
|
|
58
|
-
required: false,
|
|
59
|
-
"default": 'Select'
|
|
60
|
-
},
|
|
61
|
-
/**
|
|
62
|
-
* Enable the error section UI.
|
|
63
|
-
* Defaults to true
|
|
64
|
-
*/
|
|
65
|
-
enableErrors: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
"default": true
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
setup: function setup(props, ctx) {
|
|
71
|
-
var menuButtonClass = "inline-flex w-full justify-between items-center rounded-md border-2 bg-white px-4 py-3\n shadow-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2";
|
|
72
|
-
var menuClass = "absolute left-0 mt-1 w-full text-left z-10 origin-top-left rounded-md bg-grey-20 drop-shadow-lg\n ring-1 ring-black ring-opacity-5 focus:outline-none";
|
|
73
|
-
var menuItemClass = "block px-4 py-3 my-1 cursor-pointer hover:bg-white first:rounded-t-md last:rounded-b-md\n first:mt-0 last:mb-0";
|
|
74
|
-
var nameRef = toRef(props, 'name');
|
|
75
|
-
var _useField = useField(nameRef, props.rules),
|
|
76
|
-
errors = _useField.errors,
|
|
77
|
-
errorMessage = _useField.errorMessage,
|
|
78
|
-
meta = _useField.meta,
|
|
79
|
-
fieldVal = _useField.value;
|
|
80
|
-
var selectedOption = ref();
|
|
81
|
-
var selectValue = computed({
|
|
82
|
-
get: function get() {
|
|
83
|
-
return props.modelValue;
|
|
84
|
-
},
|
|
85
|
-
set: function set(state) {
|
|
86
|
-
fieldVal.value = state;
|
|
87
|
-
ctx.emit('update:modelValue', state);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
var isOpen = ref(false);
|
|
91
|
-
var selectOption = function selectOption(option) {
|
|
92
|
-
selectValue.value = option.value;
|
|
93
|
-
selectedOption.value = option;
|
|
94
|
-
isOpen.value = false;
|
|
95
|
-
};
|
|
96
|
-
var onEscape = function onEscape(e) {
|
|
97
|
-
if (e.key === 'Esc' || e.key === 'Escape') {
|
|
98
|
-
isOpen.value = false;
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
var menuItemActiveClass = function menuItemActiveClass(option) {
|
|
102
|
-
var _selectedOption$value;
|
|
103
|
-
if (((_selectedOption$value = selectedOption.value) === null || _selectedOption$value === void 0 ? void 0 : _selectedOption$value.value) === option.value) {
|
|
104
|
-
return 'bg-white';
|
|
105
|
-
}
|
|
106
|
-
return 'bg-none';
|
|
107
|
-
};
|
|
108
|
-
onMounted(function () {
|
|
109
|
-
if (selectValue.value) {
|
|
110
|
-
selectedOption.value = props.options.find(function (option) {
|
|
111
|
-
return option.value === selectValue.value;
|
|
112
|
-
});
|
|
113
|
-
if (selectedOption.value) selectOption(selectedOption.value);
|
|
114
|
-
}
|
|
115
|
-
document.addEventListener('keydown', onEscape);
|
|
116
|
-
});
|
|
117
|
-
onBeforeUnmount(function () {
|
|
118
|
-
document.removeEventListener('keydown', onEscape);
|
|
119
|
-
});
|
|
120
|
-
return {
|
|
121
|
-
menuButtonClass: menuButtonClass,
|
|
122
|
-
menuClass: menuClass,
|
|
123
|
-
menuItemClass: menuItemClass,
|
|
124
|
-
menuItemActiveClass: menuItemActiveClass,
|
|
125
|
-
errors: errors,
|
|
126
|
-
errorMessage: errorMessage,
|
|
127
|
-
meta: meta,
|
|
128
|
-
fieldVal: fieldVal,
|
|
129
|
-
isOpen: isOpen,
|
|
130
|
-
selectValue: selectValue,
|
|
131
|
-
selectOption: selectOption,
|
|
132
|
-
selectedOption: selectedOption
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
var _withScopeId = function _withScopeId(n) {
|
|
138
|
-
return pushScopeId("data-v-461135b2"), n = n(), popScopeId(), n;
|
|
139
|
-
};
|
|
140
|
-
var _hoisted_1 = {
|
|
141
|
-
"class": "fw-dropdown relative"
|
|
142
|
-
};
|
|
143
|
-
var _hoisted_2 = {
|
|
144
|
-
key: 0,
|
|
145
|
-
"class": "block mb-2 font-medium text-left"
|
|
146
|
-
};
|
|
147
|
-
var _hoisted_3 = ["id", "aria-expanded"];
|
|
148
|
-
var _hoisted_4 = {
|
|
149
|
-
key: 0
|
|
150
|
-
};
|
|
151
|
-
var _hoisted_5 = {
|
|
152
|
-
key: 1,
|
|
153
|
-
"class": "text-grey-base"
|
|
154
|
-
};
|
|
155
|
-
var _hoisted_6 = ["aria-labelledby"];
|
|
156
|
-
var _hoisted_7 = ["onClick"];
|
|
157
|
-
var _hoisted_8 = {
|
|
158
|
-
key: 1,
|
|
159
|
-
"class": "italic text-right text-sm font-medium min-h-[21px]"
|
|
160
|
-
};
|
|
161
|
-
var _hoisted_9 = {
|
|
162
|
-
key: 0,
|
|
163
|
-
"class": "text-error"
|
|
164
|
-
};
|
|
165
|
-
var _hoisted_10 = {
|
|
166
|
-
key: 1
|
|
167
|
-
};
|
|
168
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
169
|
-
var _ctx$selectedOption, _ctx$selectedOption2;
|
|
170
|
-
var _component_ChevronDownSvg = resolveComponent("ChevronDownSvg");
|
|
171
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [_ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true), createElementVNode("button", {
|
|
172
|
-
type: "button",
|
|
173
|
-
"class": normalizeClass([_ctx.menuButtonClass, _ctx.isOpen ? 'border-primary' : 'border-grey-40 hover:border-grey-60']),
|
|
174
|
-
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
175
|
-
return _ctx.isOpen = !_ctx.isOpen;
|
|
176
|
-
}),
|
|
177
|
-
id: "".concat(_ctx.name, "-fw-dropdown--button"),
|
|
178
|
-
"aria-expanded": _ctx.isOpen,
|
|
179
|
-
"aria-haspopup": "true"
|
|
180
|
-
}, [(_ctx$selectedOption = _ctx.selectedOption) !== null && _ctx$selectedOption !== void 0 && _ctx$selectedOption.label ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString((_ctx$selectedOption2 = _ctx.selectedOption) === null || _ctx$selectedOption2 === void 0 ? void 0 : _ctx$selectedOption2.label), 1)) : (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(_ctx.placeholder), 1)), createVNode(_component_ChevronDownSvg, {
|
|
181
|
-
"class": normalizeClass(["w-6 text-primary transition-transform duration-300", _ctx.isOpen ? 'rotate-180' : ''])
|
|
182
|
-
}, null, 8, ["class"])], 10, _hoisted_3), createVNode(Transition, {
|
|
183
|
-
name: "slideUpDown"
|
|
184
|
-
}, {
|
|
185
|
-
"default": withCtx(function () {
|
|
186
|
-
return [_ctx.isOpen ? (openBlock(), createElementBlock("ul", {
|
|
187
|
-
key: 0,
|
|
188
|
-
"class": normalizeClass(_ctx.menuClass),
|
|
189
|
-
role: "menu",
|
|
190
|
-
"aria-orientation": "vertical",
|
|
191
|
-
"aria-labelledby": "".concat(_ctx.name, "-fw-dropdown--button"),
|
|
192
|
-
tabindex: "-1"
|
|
193
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, function (option) {
|
|
194
|
-
return openBlock(), createElementBlock("li", {
|
|
195
|
-
key: option.value,
|
|
196
|
-
"class": normalizeClass([_ctx.menuItemClass, _ctx.menuItemActiveClass(option)]),
|
|
197
|
-
role: "menuitem",
|
|
198
|
-
tabindex: "0",
|
|
199
|
-
onClick: function onClick($event) {
|
|
200
|
-
return _ctx.selectOption(option);
|
|
201
|
-
}
|
|
202
|
-
}, toDisplayString(option.label), 11, _hoisted_7);
|
|
203
|
-
}), 128))], 10, _hoisted_6)) : createCommentVNode("", true)];
|
|
204
|
-
}),
|
|
205
|
-
_: 1
|
|
206
|
-
}), _ctx.enableErrors ? (openBlock(), createElementBlock("div", _hoisted_8, [createVNode(Transition, {
|
|
207
|
-
name: "fwFadeIn",
|
|
208
|
-
mode: "out-in"
|
|
209
|
-
}, {
|
|
210
|
-
"default": withCtx(function () {
|
|
211
|
-
return [(_ctx.errorMessage || _ctx.errors[0]) && _ctx.meta.touched ? (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString(_ctx.errorMessage || _ctx.errors[0]), 1)) : _ctx.hint ? (openBlock(), createElementBlock("span", _hoisted_10, toDisplayString(_ctx.hint), 1)) : createCommentVNode("", true)];
|
|
212
|
-
}),
|
|
213
|
-
_: 1
|
|
214
|
-
})])) : createCommentVNode("", true)]);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
var css_248z = ".slideUpDown-enter-active[data-v-461135b2]{-webkit-animation:slideUpDown-461135b2 .3s;animation:slideUpDown-461135b2 .3s;-webkit-transition:all .3s ease-in;transition:all .3s ease-in}.slideUpDown-leave-active[data-v-461135b2]{animation:slideUpDown-461135b2 .3s reverse;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}@-webkit-keyframes slideUpDown-461135b2{0%{opacity:0;-webkit-transform:translate3d(0,-3%,0);transform:translate3d(0,-3%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideUpDown-461135b2{0%{opacity:0;-webkit-transform:translate3d(0,-3%,0);transform:translate3d(0,-3%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}";
|
|
218
|
-
var stylesheet = ".slideUpDown-enter-active[data-v-461135b2]{-webkit-animation:slideUpDown-461135b2 .3s;animation:slideUpDown-461135b2 .3s;-webkit-transition:all .3s ease-in;transition:all .3s ease-in}.slideUpDown-leave-active[data-v-461135b2]{animation:slideUpDown-461135b2 .3s reverse;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}@-webkit-keyframes slideUpDown-461135b2{0%{opacity:0;-webkit-transform:translate3d(0,-3%,0);transform:translate3d(0,-3%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideUpDown-461135b2{0%{opacity:0;-webkit-transform:translate3d(0,-3%,0);transform:translate3d(0,-3%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}";
|
|
219
|
-
styleInject(css_248z);
|
|
220
|
-
|
|
221
|
-
script.render = render;
|
|
222
|
-
script.__scopeId = "data-v-461135b2";
|
|
223
|
-
|
|
224
|
-
export { script as s };
|
package/esm/fw-image-aca2c61d.js
DELETED
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import './es.array.includes-08e25019.js';
|
|
2
|
-
import './es.number.constructor-fb16fe05.js';
|
|
3
|
-
import { defineComponent, computed, ref, resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, withKeys, createElementVNode, createVNode, renderSlot } from 'vue';
|
|
4
|
-
import { a as documentCreateElement$1, g as global$1, c as createNonEnumerableProperty$1 } from './is-forced-7cb3ee8f.js';
|
|
5
|
-
import { _ as _export } from './export-10c4adbc.js';
|
|
6
|
-
import { a as arrayIteration } from './array-iteration-8267bf22.js';
|
|
7
|
-
import { a as arrayMethodIsStrict$1 } from './array-method-is-strict-d313436f.js';
|
|
8
|
-
import './es.object.to-string-4b07c4d1.js';
|
|
9
|
-
import './es.array.find-1ded15d5.js';
|
|
10
|
-
import './es.string.iterator-25db8cd2.js';
|
|
11
|
-
import './web.timers-e406c8e6.js';
|
|
12
|
-
import { s as script$1 } from './fw-loading-bar-f5ca605c.js';
|
|
13
|
-
import { r as render$1 } from './index-bced3b35.js';
|
|
14
|
-
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
15
|
-
|
|
16
|
-
var es_array_forEach = {};
|
|
17
|
-
|
|
18
|
-
'use strict';
|
|
19
|
-
var $forEach = arrayIteration.forEach;
|
|
20
|
-
var arrayMethodIsStrict = arrayMethodIsStrict$1;
|
|
21
|
-
|
|
22
|
-
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
|
23
|
-
|
|
24
|
-
// `Array.prototype.forEach` method implementation
|
|
25
|
-
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
26
|
-
var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
|
27
|
-
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
28
|
-
// eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
|
|
29
|
-
} : [].forEach;
|
|
30
|
-
|
|
31
|
-
'use strict';
|
|
32
|
-
var $ = _export;
|
|
33
|
-
var forEach$1 = arrayForEach;
|
|
34
|
-
|
|
35
|
-
// `Array.prototype.forEach` method
|
|
36
|
-
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
37
|
-
// eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
|
|
38
|
-
$({ target: 'Array', proto: true, forced: [].forEach != forEach$1 }, {
|
|
39
|
-
forEach: forEach$1
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
var web_domCollections_forEach = {};
|
|
43
|
-
|
|
44
|
-
// iterable DOM collections
|
|
45
|
-
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
46
|
-
var domIterables = {
|
|
47
|
-
CSSRuleList: 0,
|
|
48
|
-
CSSStyleDeclaration: 0,
|
|
49
|
-
CSSValueList: 0,
|
|
50
|
-
ClientRectList: 0,
|
|
51
|
-
DOMRectList: 0,
|
|
52
|
-
DOMStringList: 0,
|
|
53
|
-
DOMTokenList: 1,
|
|
54
|
-
DataTransferItemList: 0,
|
|
55
|
-
FileList: 0,
|
|
56
|
-
HTMLAllCollection: 0,
|
|
57
|
-
HTMLCollection: 0,
|
|
58
|
-
HTMLFormElement: 0,
|
|
59
|
-
HTMLSelectElement: 0,
|
|
60
|
-
MediaList: 0,
|
|
61
|
-
MimeTypeArray: 0,
|
|
62
|
-
NamedNodeMap: 0,
|
|
63
|
-
NodeList: 1,
|
|
64
|
-
PaintRequestList: 0,
|
|
65
|
-
Plugin: 0,
|
|
66
|
-
PluginArray: 0,
|
|
67
|
-
SVGLengthList: 0,
|
|
68
|
-
SVGNumberList: 0,
|
|
69
|
-
SVGPathSegList: 0,
|
|
70
|
-
SVGPointList: 0,
|
|
71
|
-
SVGStringList: 0,
|
|
72
|
-
SVGTransformList: 0,
|
|
73
|
-
SourceBufferList: 0,
|
|
74
|
-
StyleSheetList: 0,
|
|
75
|
-
TextTrackCueList: 0,
|
|
76
|
-
TextTrackList: 0,
|
|
77
|
-
TouchList: 0
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
|
81
|
-
var documentCreateElement = documentCreateElement$1;
|
|
82
|
-
|
|
83
|
-
var classList = documentCreateElement('span').classList;
|
|
84
|
-
var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
|
|
85
|
-
|
|
86
|
-
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
87
|
-
|
|
88
|
-
var global = global$1;
|
|
89
|
-
var DOMIterables = domIterables;
|
|
90
|
-
var DOMTokenListPrototype = domTokenListPrototype;
|
|
91
|
-
var forEach = arrayForEach;
|
|
92
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$1;
|
|
93
|
-
|
|
94
|
-
var handlePrototype = function (CollectionPrototype) {
|
|
95
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
96
|
-
if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
|
|
97
|
-
createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
|
|
98
|
-
} catch (error) {
|
|
99
|
-
CollectionPrototype.forEach = forEach;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
for (var COLLECTION_NAME in DOMIterables) {
|
|
104
|
-
if (DOMIterables[COLLECTION_NAME]) {
|
|
105
|
-
handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
handlePrototype(DOMTokenListPrototype);
|
|
110
|
-
|
|
111
|
-
var handleIntersect = function handleIntersect(entries, observer) {
|
|
112
|
-
entries.forEach(function (entry) {
|
|
113
|
-
if (entry.isIntersecting) {
|
|
114
|
-
loadImage(entry.target);
|
|
115
|
-
observer.unobserve(entry.target);
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
var createObserver = function createObserver(el) {
|
|
120
|
-
var options = {
|
|
121
|
-
root: null,
|
|
122
|
-
threshold: Number(el.getAttribute('threshold')) || 0
|
|
123
|
-
};
|
|
124
|
-
var observer = new IntersectionObserver(handleIntersect, options);
|
|
125
|
-
observer.observe(el);
|
|
126
|
-
};
|
|
127
|
-
var loadImage = function loadImage(el) {
|
|
128
|
-
var imageElement = Array.from(el.children).find(function (element) {
|
|
129
|
-
return element.nodeName === 'IMG';
|
|
130
|
-
});
|
|
131
|
-
if (imageElement) {
|
|
132
|
-
var type = el.getAttribute('type');
|
|
133
|
-
var url = imageElement.dataset.url;
|
|
134
|
-
var setImgError = function setImgError() {
|
|
135
|
-
setTimeout(function () {
|
|
136
|
-
return el.classList.add('fw-image--loaded-error');
|
|
137
|
-
}, 100);
|
|
138
|
-
setTimeout(function () {
|
|
139
|
-
var _el$querySelector;
|
|
140
|
-
return (_el$querySelector = el.querySelector('.fw-image--loading')) === null || _el$querySelector === void 0 ? void 0 : _el$querySelector.remove();
|
|
141
|
-
}, 600);
|
|
142
|
-
};
|
|
143
|
-
if (url) {
|
|
144
|
-
imageElement.src = url;
|
|
145
|
-
} else {
|
|
146
|
-
setImgError();
|
|
147
|
-
}
|
|
148
|
-
imageElement.addEventListener('load', function () {
|
|
149
|
-
setTimeout(function () {
|
|
150
|
-
return el.classList.add('fw-image--loaded');
|
|
151
|
-
}, 100);
|
|
152
|
-
setTimeout(function () {
|
|
153
|
-
var _el$querySelector2;
|
|
154
|
-
return (_el$querySelector2 = el.querySelector('.fw-image--loading')) === null || _el$querySelector2 === void 0 ? void 0 : _el$querySelector2.remove();
|
|
155
|
-
}, 600);
|
|
156
|
-
});
|
|
157
|
-
imageElement.addEventListener('error', function () {
|
|
158
|
-
setImgError();
|
|
159
|
-
});
|
|
160
|
-
if (type === 'background') {
|
|
161
|
-
el.style.backgroundImage = "url('".concat(url, "')");
|
|
162
|
-
imageElement.remove();
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
var lazyLoadDirective = {
|
|
167
|
-
mounted: function mounted(el) {
|
|
168
|
-
if (window.IntersectionObserver) {
|
|
169
|
-
createObserver(el);
|
|
170
|
-
} else {
|
|
171
|
-
loadImage(el);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
var script = defineComponent({
|
|
177
|
-
name: 'FwImage',
|
|
178
|
-
directives: {
|
|
179
|
-
lazyload: lazyLoadDirective
|
|
180
|
-
},
|
|
181
|
-
components: {
|
|
182
|
-
FwLoadingBar: script$1,
|
|
183
|
-
FileExclamationSvg: render$1
|
|
184
|
-
},
|
|
185
|
-
props: {
|
|
186
|
-
/**
|
|
187
|
-
* The src attribute of the image
|
|
188
|
-
*/
|
|
189
|
-
src: String,
|
|
190
|
-
/**
|
|
191
|
-
* The alt attribute of the image
|
|
192
|
-
*/
|
|
193
|
-
alt: String,
|
|
194
|
-
/**
|
|
195
|
-
* The type of component. Accepts 'background' and defaults to the native html5 element.
|
|
196
|
-
*/
|
|
197
|
-
type: {
|
|
198
|
-
type: String,
|
|
199
|
-
"default": 'native',
|
|
200
|
-
validator: function validator(value) {
|
|
201
|
-
return ['native', 'background'].includes(value);
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
/**
|
|
205
|
-
* Whether the loading bar and error state are rounded.
|
|
206
|
-
*/
|
|
207
|
-
rounded: {
|
|
208
|
-
type: Boolean,
|
|
209
|
-
"default": false
|
|
210
|
-
},
|
|
211
|
-
/**
|
|
212
|
-
* The class for the native image element
|
|
213
|
-
*/
|
|
214
|
-
imageClass: {
|
|
215
|
-
type: String
|
|
216
|
-
},
|
|
217
|
-
/**
|
|
218
|
-
* Controls the threshold before the component triggers the src url.
|
|
219
|
-
*/
|
|
220
|
-
threshold: {
|
|
221
|
-
type: Number,
|
|
222
|
-
"default": 0
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
setup: function setup(props) {
|
|
226
|
-
var isBackground = computed(function () {
|
|
227
|
-
return props.type === 'background';
|
|
228
|
-
});
|
|
229
|
-
var fwImageRef = ref(null);
|
|
230
|
-
return {
|
|
231
|
-
fwImageRef: fwImageRef,
|
|
232
|
-
isBackground: isBackground
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
var _hoisted_1 = ["type", "threshold"];
|
|
238
|
-
var _hoisted_2 = ["data-url", "alt"];
|
|
239
|
-
var _hoisted_3 = {
|
|
240
|
-
"class": "fw-image--error-wrapper flex flex-col items-center justify-center"
|
|
241
|
-
};
|
|
242
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
243
|
-
var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
|
|
244
|
-
var _component_FileExclamationSvg = resolveComponent("FileExclamationSvg");
|
|
245
|
-
var _directive_lazyload = resolveDirective("lazyload");
|
|
246
|
-
return withDirectives((openBlock(), createElementBlock("div", {
|
|
247
|
-
ref: "fwImageRef",
|
|
248
|
-
type: _ctx.type,
|
|
249
|
-
threshold: _ctx.threshold,
|
|
250
|
-
"class": normalizeClass(["fw-image", {
|
|
251
|
-
'fw-image--background': _ctx.isBackground,
|
|
252
|
-
'rounded-full': _ctx.rounded
|
|
253
|
-
}]),
|
|
254
|
-
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
255
|
-
return _ctx.$emit('click', $event);
|
|
256
|
-
}),
|
|
257
|
-
onKeyup: _cache[1] || (_cache[1] = withKeys(function ($event) {
|
|
258
|
-
return _ctx.$emit('click', $event);
|
|
259
|
-
}, ["enter"])),
|
|
260
|
-
onMouseover: _cache[2] || (_cache[2] = function ($event) {
|
|
261
|
-
return _ctx.$emit('mouseover');
|
|
262
|
-
}),
|
|
263
|
-
onMouseout: _cache[3] || (_cache[3] = function ($event) {
|
|
264
|
-
return _ctx.$emit('mouseout');
|
|
265
|
-
}),
|
|
266
|
-
onFocusin: _cache[4] || (_cache[4] = function ($event) {
|
|
267
|
-
return _ctx.$emit('mouseover');
|
|
268
|
-
}),
|
|
269
|
-
onFocusout: _cache[5] || (_cache[5] = function ($event) {
|
|
270
|
-
return _ctx.$emit('mouseout');
|
|
271
|
-
})
|
|
272
|
-
}, [createElementVNode("img", {
|
|
273
|
-
"data-url": _ctx.src,
|
|
274
|
-
alt: _ctx.alt,
|
|
275
|
-
loading: "lazy",
|
|
276
|
-
"class": normalizeClass([_ctx.rounded ? 'rounded-full' : '', _ctx.imageClass])
|
|
277
|
-
}, null, 10, _hoisted_2), createVNode(_component_FwLoadingBar, {
|
|
278
|
-
"class": normalizeClass(["fw-image--loading w-full h-full", {
|
|
279
|
-
'rounded-full': _ctx.rounded
|
|
280
|
-
}])
|
|
281
|
-
}, null, 8, ["class"]), createElementVNode("div", {
|
|
282
|
-
"class": normalizeClass(["fw-image--error rounded bg-grey-20", {
|
|
283
|
-
'rounded-full': _ctx.rounded
|
|
284
|
-
}])
|
|
285
|
-
}, [createElementVNode("div", _hoisted_3, [createVNode(_component_FileExclamationSvg, {
|
|
286
|
-
"class": "w-full h-full scale-[0.25] opacity-40 text-alert max-w-[150px]"
|
|
287
|
-
})])], 2), renderSlot(_ctx.$slots, "default")], 42, _hoisted_1)), [[_directive_lazyload]]);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
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}";
|
|
291
|
-
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}";
|
|
292
|
-
styleInject(css_248z);
|
|
293
|
-
|
|
294
|
-
script.render = render;
|
|
295
|
-
|
|
296
|
-
export { script as s };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock } from 'vue';
|
|
2
|
-
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
3
|
-
|
|
4
|
-
var script = defineComponent({
|
|
5
|
-
name: 'FwLoadingBar'
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
var _hoisted_1 = {
|
|
9
|
-
"class": "fw-loading-bar rounded",
|
|
10
|
-
"aria-hidden": "true"
|
|
11
|
-
};
|
|
12
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13
|
-
return openBlock(), createElementBlock("div", _hoisted_1);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
var css_248z = ".fw-loading-bar{-webkit-animation:fwSkeletonLoading 1.5s linear infinite;animation:fwSkeletonLoading 1.5s linear infinite;background:#e4e4e4;background-image:linear-gradient(100deg,hsla(0,0%,100%,0) 40%,hsla(0,0%,100%,.5) 50%,hsla(0,0%,100%,0) 60%);background-size:200% 200%}@-webkit-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}}";
|
|
17
|
-
var stylesheet = ".fw-loading-bar{-webkit-animation:fwSkeletonLoading 1.5s linear infinite;animation:fwSkeletonLoading 1.5s linear infinite;background:#e4e4e4;background-image:linear-gradient(100deg,hsla(0,0%,100%,0) 40%,hsla(0,0%,100%,.5) 50%,hsla(0,0%,100%,0) 60%);background-size:200% 200%}@-webkit-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}}";
|
|
18
|
-
styleInject(css_248z);
|
|
19
|
-
|
|
20
|
-
script.render = render;
|
|
21
|
-
|
|
22
|
-
export { script as s };
|