@frollo/frollo-web-ui 3.0.0 → 3.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.
Files changed (73) hide show
  1. package/cjs/index.js +18838 -3083
  2. package/esm/add-to-unscopables-2400f45b.js +25 -0
  3. package/esm/{array-iteration-98e2cf9a.js → array-iteration-107f927f.js} +2 -3
  4. package/esm/array-method-has-species-support-3d413468.js +23 -0
  5. package/esm/{array-method-is-strict-544b103f.js → array-method-is-strict-055b1830.js} +1 -1
  6. package/esm/{array-species-create-5fc23c89.js → array-species-create-a5f5503b.js} +3 -4
  7. package/esm/{classof-a45668b6.js → classof-39c30bd5.js} +1 -2
  8. package/esm/{create-property-558a3c24.js → create-property-534611fd.js} +1 -2
  9. package/esm/delete-property-or-throw-8032646c.js +31 -0
  10. package/esm/does-not-exceed-safe-integer-31d08811.js +11 -0
  11. package/esm/es.array.concat-987938be.js +69 -0
  12. package/esm/{es.array.find-36d8f2f0.js → es.array.find-dfa1f42f.js} +5 -6
  13. package/esm/{es.array.includes-df8e6e35.js → es.array.includes-91be7771.js} +3 -4
  14. package/esm/{es.function.name-b642b74f.js → es.function.name-557cb1f9.js} +1 -1
  15. package/esm/{es.number.constructor-f279ce82.js → es.number.constructor-1249bd78.js} +2 -3
  16. package/esm/{fw-image-ec7b02c5.js → es.string.iterator-284b31d4.js} +11 -311
  17. package/esm/{object-keys-6a890c6f.js → export-a37ba078.js} +2 -13
  18. package/esm/function-apply-ce251590.js +14 -0
  19. package/esm/fw-accordion.js +2 -8
  20. package/esm/fw-animations.js +6 -20
  21. package/esm/fw-bar-chart.js +19 -0
  22. package/esm/{fw-button-df5c923f.js → fw-button-0401f207.js} +12 -27
  23. package/esm/fw-button.js +9 -8
  24. package/esm/{fw-card-8d3f4ab5.js → fw-card-1b6a67fe.js} +0 -5
  25. package/esm/fw-card.js +1 -1
  26. package/esm/fw-checkbox.js +27 -17
  27. package/esm/fw-dropdown.js +17 -34
  28. package/esm/fw-image-03f85465.js +289 -0
  29. package/esm/fw-image.js +20 -17
  30. package/esm/fw-input.js +24 -25
  31. package/esm/fw-loading-bar-f5ca605c.js +22 -0
  32. package/esm/{fw-loading-spinner-9b7c6855.js → fw-loading-spinner-164d8df0.js} +1 -2
  33. package/esm/fw-loading.js +6 -9
  34. package/esm/fw-modal.js +11 -21
  35. package/esm/fw-navigation-menu.js +11 -19
  36. package/esm/fw-progress-bar.js +4 -11
  37. package/esm/fw-sidebar-menu.js +131 -0
  38. package/esm/fw-table.js +12 -57
  39. package/esm/fw-tabs.js +60 -21
  40. package/esm/fw-tag.js +8 -8
  41. package/esm/fw-toast.js +29 -125
  42. package/esm/fw-transactions-card.js +21 -24
  43. package/esm/index-1a41e7bf.js +15838 -0
  44. package/esm/{index-4605e00e.js → index-692e4d19.js} +83 -55
  45. package/esm/index.js +43 -57
  46. package/esm/is-forced-752b5893.js +927 -0
  47. package/esm/{add-to-unscopables-3f461c07.js → object-create-f6f3a673.js} +3 -25
  48. package/esm/object-keys-4f5bf4e7.js +13 -0
  49. package/esm/{to-string-685748aa.js → to-string-12728fd2.js} +2 -2
  50. package/esm/{web.timers-4a6aaab8.js → web.timers-0f117224.js} +5 -15
  51. package/frollo-web-ui.esm.js +19112 -3282
  52. package/icons/chevron-left.svg +3 -0
  53. package/icons/chevron-right.svg +3 -0
  54. package/icons/index.ts +4 -0
  55. package/index.d.ts +200 -26
  56. package/package.json +4 -1
  57. package/types/components/fw-bar-chart/fw-bar-chart.vue.d.ts +83 -0
  58. package/types/components/fw-bar-chart/index.d.ts +2 -0
  59. package/types/components/fw-bar-chart/index.types.d.ts +11 -0
  60. package/types/components/fw-button/fw-button.vue.d.ts +2 -2
  61. package/types/components/fw-button/index.types.d.ts +1 -1
  62. package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +3 -1
  63. package/types/components/fw-input/fw-input.vue.d.ts +1 -0
  64. package/types/components/fw-sidebar-menu/fw-sidebar-menu.vue.d.ts +71 -0
  65. package/types/components/fw-sidebar-menu/index.d.ts +2 -0
  66. package/types/components/fw-sidebar-menu/index.types.d.ts +6 -0
  67. package/types/components/index.d.ts +2 -0
  68. package/types/components/index.types.d.ts +2 -0
  69. package/types/icons/index.d.ts +3 -1
  70. package/web-components/index.js +24066 -8740
  71. package/esm/function-name-e2f6ea36.js +0 -492
  72. package/esm/fw-loading-bar-da7d53fb.js +0 -22
  73. package/esm/is-forced-ddf227e6.js +0 -438
@@ -1,16 +1,17 @@
1
- import './es.array.find-36d8f2f0.js';
1
+ import './es.array.find-dfa1f42f.js';
2
2
  import { defineComponent, toRef, ref, computed, onMounted, onBeforeUnmount, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, normalizeClass, createVNode, Transition, withCtx, Fragment, renderList } from 'vue';
3
3
  import { u as useField } from './vee-validate.esm-a17a23c3.js';
4
- import { a as render$1 } from './index-4605e00e.js';
5
- import './es.function.name-b642b74f.js';
4
+ import { a as render$1 } from './index-692e4d19.js';
5
+ import './es.function.name-557cb1f9.js';
6
6
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
- import './function-name-e2f6ea36.js';
8
- import './classof-a45668b6.js';
9
- import './is-forced-ddf227e6.js';
10
- import './object-keys-6a890c6f.js';
11
- import './array-iteration-98e2cf9a.js';
12
- import './array-species-create-5fc23c89.js';
13
- import './add-to-unscopables-3f461c07.js';
7
+ import './is-forced-752b5893.js';
8
+ import './classof-39c30bd5.js';
9
+ import './export-a37ba078.js';
10
+ import './array-iteration-107f927f.js';
11
+ import './array-species-create-a5f5503b.js';
12
+ import './add-to-unscopables-2400f45b.js';
13
+ import './object-create-f6f3a673.js';
14
+ import './object-keys-4f5bf4e7.js';
14
15
  import './check-94a5917a.js';
15
16
 
16
17
  var script = defineComponent({
@@ -25,7 +26,6 @@ var script = defineComponent({
25
26
  modelValue: {
26
27
  type: String
27
28
  },
28
-
29
29
  /**
30
30
  * The name of the input field. Must be unique per form.
31
31
  */
@@ -33,21 +33,18 @@ var script = defineComponent({
33
33
  type: String,
34
34
  required: true
35
35
  },
36
-
37
36
  /**
38
37
  * Label for the input. Also renders to an aria-label attribute
39
38
  */
40
39
  label: {
41
40
  type: String
42
41
  },
43
-
44
42
  /**
45
43
  * Validation rules. Accepts an object, string schema or validation function.
46
44
  */
47
45
  rules: {
48
46
  type: [Object, String, Function]
49
47
  },
50
-
51
48
  /**
52
49
  * An array of options for the dropdown menu.
53
50
  */
@@ -55,14 +52,12 @@ var script = defineComponent({
55
52
  type: Array,
56
53
  required: true
57
54
  },
58
-
59
55
  /**
60
56
  * The hint text shown below the input
61
57
  */
62
58
  hint: {
63
59
  type: String
64
60
  },
65
-
66
61
  /**
67
62
  * Custom placeholder text
68
63
  */
@@ -77,13 +72,11 @@ var script = defineComponent({
77
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";
78
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";
79
74
  var nameRef = toRef(props, 'name');
80
-
81
75
  var _useField = useField(nameRef, props.rules),
82
- errors = _useField.errors,
83
- errorMessage = _useField.errorMessage,
84
- meta = _useField.meta,
85
- fieldVal = _useField.value;
86
-
76
+ errors = _useField.errors,
77
+ errorMessage = _useField.errorMessage,
78
+ meta = _useField.meta,
79
+ fieldVal = _useField.value;
87
80
  var selectedOption = ref();
88
81
  var selectValue = computed({
89
82
  get: function get() {
@@ -95,29 +88,23 @@ var script = defineComponent({
95
88
  }
96
89
  });
97
90
  var isOpen = ref(false);
98
-
99
91
  var selectOption = function selectOption(option) {
100
92
  selectValue.value = option.value;
101
93
  selectedOption.value = option;
102
94
  isOpen.value = false;
103
95
  };
104
-
105
96
  var onEscape = function onEscape(e) {
106
97
  if (e.key === 'Esc' || e.key === 'Escape') {
107
98
  isOpen.value = false;
108
99
  }
109
100
  };
110
-
111
101
  var menuItemActiveClass = function menuItemActiveClass(option) {
112
102
  var _selectedOption$value;
113
-
114
103
  if (((_selectedOption$value = selectedOption.value) === null || _selectedOption$value === void 0 ? void 0 : _selectedOption$value.value) === option.value) {
115
104
  return 'bg-white';
116
105
  }
117
-
118
106
  return 'bg-none';
119
107
  };
120
-
121
108
  onMounted(function () {
122
109
  if (selectValue.value) {
123
110
  selectedOption.value = props.options.find(function (option) {
@@ -125,7 +112,6 @@ var script = defineComponent({
125
112
  });
126
113
  if (selectedOption.value) selectOption(selectedOption.value);
127
114
  }
128
-
129
115
  document.addEventListener('keydown', onEscape);
130
116
  });
131
117
  onBeforeUnmount(function () {
@@ -151,7 +137,6 @@ var script = defineComponent({
151
137
  var _withScopeId = function _withScopeId(n) {
152
138
  return pushScopeId("data-v-1467a810"), n = n(), popScopeId(), n;
153
139
  };
154
-
155
140
  var _hoisted_1 = {
156
141
  "class": "fw-dropdown relative"
157
142
  };
@@ -181,9 +166,7 @@ var _hoisted_10 = {
181
166
  };
182
167
  function render(_ctx, _cache, $props, $setup, $data, $options) {
183
168
  var _ctx$selectedOption, _ctx$selectedOption2;
184
-
185
169
  var _component_ChevronDownSvg = resolveComponent("ChevronDownSvg");
186
-
187
170
  return openBlock(), createElementBlock("div", _hoisted_1, [_ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true), createElementVNode("button", {
188
171
  type: "button",
189
172
  "class": normalizeClass([_ctx.menuButtonClass, _ctx.isOpen ? 'border-primary' : 'border-grey-40 hover:border-grey-60']),
@@ -230,8 +213,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
230
213
  })])]);
231
214
  }
232
215
 
233
- var css_248z = ".slideUpDown-enter-active[data-v-1467a810]{-webkit-animation:slideUpDown-1467a810 .3s;animation:slideUpDown-1467a810 .3s;-webkit-transition:all .3s ease-in;-o-transition:all .3s ease-in;transition:all .3s ease-in}.slideUpDown-leave-active[data-v-1467a810]{animation:slideUpDown-1467a810 .3s reverse;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}@-webkit-keyframes slideUpDown-1467a810{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-1467a810{0%{opacity:0;-webkit-transform:translate3d(0,-3%,0);transform:translate3d(0,-3%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}";
234
- var stylesheet = ".slideUpDown-enter-active[data-v-1467a810]{-webkit-animation:slideUpDown-1467a810 .3s;animation:slideUpDown-1467a810 .3s;-webkit-transition:all .3s ease-in;-o-transition:all .3s ease-in;transition:all .3s ease-in}.slideUpDown-leave-active[data-v-1467a810]{animation:slideUpDown-1467a810 .3s reverse;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}@-webkit-keyframes slideUpDown-1467a810{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-1467a810{0%{opacity:0;-webkit-transform:translate3d(0,-3%,0);transform:translate3d(0,-3%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}";
216
+ var css_248z = ".slideUpDown-enter-active[data-v-1467a810]{-webkit-animation:slideUpDown-1467a810 .3s;animation:slideUpDown-1467a810 .3s;-webkit-transition:all .3s ease-in;transition:all .3s ease-in}.slideUpDown-leave-active[data-v-1467a810]{animation:slideUpDown-1467a810 .3s reverse;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}@-webkit-keyframes slideUpDown-1467a810{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-1467a810{0%{opacity:0;-webkit-transform:translate3d(0,-3%,0);transform:translate3d(0,-3%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}";
217
+ var stylesheet = ".slideUpDown-enter-active[data-v-1467a810]{-webkit-animation:slideUpDown-1467a810 .3s;animation:slideUpDown-1467a810 .3s;-webkit-transition:all .3s ease-in;transition:all .3s ease-in}.slideUpDown-leave-active[data-v-1467a810]{animation:slideUpDown-1467a810 .3s reverse;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}@-webkit-keyframes slideUpDown-1467a810{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-1467a810{0%{opacity:0;-webkit-transform:translate3d(0,-3%,0);transform:translate3d(0,-3%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}";
235
218
  styleInject(css_248z);
236
219
 
237
220
  script.render = render;
@@ -0,0 +1,289 @@
1
+ import './es.array.includes-91be7771.js';
2
+ import './es.number.constructor-1249bd78.js';
3
+ import { defineComponent, computed, ref, resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, withKeys, createElementVNode, createVNode, renderSlot } from 'vue';
4
+ import './es.array.find-dfa1f42f.js';
5
+ import './es.string.iterator-284b31d4.js';
6
+ import './web.timers-0f117224.js';
7
+ import { a as documentCreateElement$1, g as global$1, c as createNonEnumerableProperty$1 } from './is-forced-752b5893.js';
8
+ import { _ as _export } from './export-a37ba078.js';
9
+ import { a as arrayIteration } from './array-iteration-107f927f.js';
10
+ import { a as arrayMethodIsStrict$1 } from './array-method-is-strict-055b1830.js';
11
+ import { s as script$1 } from './fw-loading-bar-f5ca605c.js';
12
+ import { r as render$1 } from './index-692e4d19.js';
13
+ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
14
+
15
+ var es_array_forEach = {};
16
+
17
+ 'use strict';
18
+ var $forEach = arrayIteration.forEach;
19
+ var arrayMethodIsStrict = arrayMethodIsStrict$1;
20
+
21
+ var STRICT_METHOD = arrayMethodIsStrict('forEach');
22
+
23
+ // `Array.prototype.forEach` method implementation
24
+ // https://tc39.es/ecma262/#sec-array.prototype.foreach
25
+ var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
26
+ return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
27
+ // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
28
+ } : [].forEach;
29
+
30
+ 'use strict';
31
+ var $ = _export;
32
+ var forEach$1 = arrayForEach;
33
+
34
+ // `Array.prototype.forEach` method
35
+ // https://tc39.es/ecma262/#sec-array.prototype.foreach
36
+ // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
37
+ $({ target: 'Array', proto: true, forced: [].forEach != forEach$1 }, {
38
+ forEach: forEach$1
39
+ });
40
+
41
+ var web_domCollections_forEach = {};
42
+
43
+ // iterable DOM collections
44
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
45
+ var domIterables = {
46
+ CSSRuleList: 0,
47
+ CSSStyleDeclaration: 0,
48
+ CSSValueList: 0,
49
+ ClientRectList: 0,
50
+ DOMRectList: 0,
51
+ DOMStringList: 0,
52
+ DOMTokenList: 1,
53
+ DataTransferItemList: 0,
54
+ FileList: 0,
55
+ HTMLAllCollection: 0,
56
+ HTMLCollection: 0,
57
+ HTMLFormElement: 0,
58
+ HTMLSelectElement: 0,
59
+ MediaList: 0,
60
+ MimeTypeArray: 0,
61
+ NamedNodeMap: 0,
62
+ NodeList: 1,
63
+ PaintRequestList: 0,
64
+ Plugin: 0,
65
+ PluginArray: 0,
66
+ SVGLengthList: 0,
67
+ SVGNumberList: 0,
68
+ SVGPathSegList: 0,
69
+ SVGPointList: 0,
70
+ SVGStringList: 0,
71
+ SVGTransformList: 0,
72
+ SourceBufferList: 0,
73
+ StyleSheetList: 0,
74
+ TextTrackCueList: 0,
75
+ TextTrackList: 0,
76
+ TouchList: 0
77
+ };
78
+
79
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
80
+ var documentCreateElement = documentCreateElement$1;
81
+
82
+ var classList = documentCreateElement('span').classList;
83
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
84
+
85
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
86
+
87
+ var global = global$1;
88
+ var DOMIterables = domIterables;
89
+ var DOMTokenListPrototype = domTokenListPrototype;
90
+ var forEach = arrayForEach;
91
+ var createNonEnumerableProperty = createNonEnumerableProperty$1;
92
+
93
+ var handlePrototype = function (CollectionPrototype) {
94
+ // some Chrome versions have non-configurable methods on DOMTokenList
95
+ if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
96
+ createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
97
+ } catch (error) {
98
+ CollectionPrototype.forEach = forEach;
99
+ }
100
+ };
101
+
102
+ for (var COLLECTION_NAME in DOMIterables) {
103
+ if (DOMIterables[COLLECTION_NAME]) {
104
+ handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
105
+ }
106
+ }
107
+
108
+ handlePrototype(DOMTokenListPrototype);
109
+
110
+ var lazyLoadDirective = {
111
+ mounted: function mounted(el) {
112
+ var loadImage = function loadImage() {
113
+ var imageElement = Array.from(el.children).find(function (element) {
114
+ return element.nodeName === 'IMG';
115
+ });
116
+ if (imageElement) {
117
+ var type = el.getAttribute('type');
118
+ var url = imageElement.dataset.url;
119
+ imageElement.addEventListener('load', function () {
120
+ setTimeout(function () {
121
+ return el.classList.add('fw-image--loaded');
122
+ }, 100);
123
+ setTimeout(function () {
124
+ var _el$querySelector;
125
+ return (_el$querySelector = el.querySelector('.fw-image--loading')) === null || _el$querySelector === void 0 ? void 0 : _el$querySelector.remove();
126
+ }, 600);
127
+ });
128
+ if (url) {
129
+ imageElement.src = url;
130
+ }
131
+ if (type === 'background') {
132
+ el.style.backgroundImage = "url('".concat(url, "')");
133
+ imageElement.remove();
134
+ }
135
+ imageElement.addEventListener('error', function () {
136
+ setTimeout(function () {
137
+ return el.classList.add('fw-image--loaded-error');
138
+ }, 100);
139
+ setTimeout(function () {
140
+ var _el$querySelector2;
141
+ return (_el$querySelector2 = el.querySelector('.fw-image--loading')) === null || _el$querySelector2 === void 0 ? void 0 : _el$querySelector2.remove();
142
+ }, 600);
143
+ });
144
+ }
145
+ };
146
+ var handleIntersect = function handleIntersect(entries, observer) {
147
+ entries.forEach(function (entry) {
148
+ if (entry.isIntersecting) {
149
+ loadImage();
150
+ observer.unobserve(el);
151
+ }
152
+ });
153
+ };
154
+ var createObserver = function createObserver() {
155
+ var options = {
156
+ root: null,
157
+ threshold: Number(el.getAttribute('threshold')) || 0
158
+ };
159
+ var observer = new IntersectionObserver(handleIntersect, options);
160
+ observer.observe(el);
161
+ };
162
+ if (window.IntersectionObserver) {
163
+ createObserver();
164
+ } else {
165
+ loadImage();
166
+ }
167
+ }
168
+ };
169
+
170
+ var script = defineComponent({
171
+ name: 'FwImage',
172
+ directives: {
173
+ lazyload: lazyLoadDirective
174
+ },
175
+ components: {
176
+ FwLoadingBar: script$1,
177
+ FileExclamationSvg: render$1
178
+ },
179
+ props: {
180
+ /**
181
+ * The src attribute of the image
182
+ */
183
+ src: String,
184
+ /**
185
+ * The alt attribute of the image
186
+ */
187
+ alt: String,
188
+ /**
189
+ * The type of component. Accepts 'background' and defaults to the native html5 element.
190
+ */
191
+ type: {
192
+ type: String,
193
+ "default": 'native',
194
+ validator: function validator(value) {
195
+ return ['native', 'background'].includes(value);
196
+ }
197
+ },
198
+ /**
199
+ * Whether the loading bar and error state are rounded.
200
+ */
201
+ rounded: {
202
+ type: Boolean,
203
+ "default": false
204
+ },
205
+ /**
206
+ * The class for the native image element
207
+ */
208
+ imageClass: {
209
+ type: String
210
+ },
211
+ /**
212
+ * Controls the threshold before the component triggers the src url.
213
+ */
214
+ threshold: {
215
+ type: Number,
216
+ "default": 0
217
+ }
218
+ },
219
+ setup: function setup(props) {
220
+ var isBackground = computed(function () {
221
+ return props.type === 'background';
222
+ });
223
+ var fwImageRef = ref(null);
224
+ return {
225
+ fwImageRef: fwImageRef,
226
+ isBackground: isBackground
227
+ };
228
+ }
229
+ });
230
+
231
+ var _hoisted_1 = ["type", "threshold"];
232
+ var _hoisted_2 = ["data-url", "alt"];
233
+ var _hoisted_3 = {
234
+ "class": "fw-image--error-wrapper flex flex-col items-center justify-center"
235
+ };
236
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
237
+ var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
238
+ var _component_FileExclamationSvg = resolveComponent("FileExclamationSvg");
239
+ var _directive_lazyload = resolveDirective("lazyload");
240
+ return withDirectives((openBlock(), createElementBlock("div", {
241
+ ref: "fwImageRef",
242
+ type: _ctx.type,
243
+ threshold: _ctx.threshold,
244
+ "class": normalizeClass(["fw-image", {
245
+ 'fw-image--background': _ctx.isBackground,
246
+ 'rounded-full': _ctx.rounded
247
+ }]),
248
+ onClick: _cache[0] || (_cache[0] = function ($event) {
249
+ return _ctx.$emit('click', $event);
250
+ }),
251
+ onKeyup: _cache[1] || (_cache[1] = withKeys(function ($event) {
252
+ return _ctx.$emit('click', $event);
253
+ }, ["enter"])),
254
+ onMouseover: _cache[2] || (_cache[2] = function ($event) {
255
+ return _ctx.$emit('mouseover');
256
+ }),
257
+ onMouseout: _cache[3] || (_cache[3] = function ($event) {
258
+ return _ctx.$emit('mouseout');
259
+ }),
260
+ onFocusin: _cache[4] || (_cache[4] = function ($event) {
261
+ return _ctx.$emit('mouseover');
262
+ }),
263
+ onFocusout: _cache[5] || (_cache[5] = function ($event) {
264
+ return _ctx.$emit('mouseout');
265
+ })
266
+ }, [createElementVNode("img", {
267
+ "data-url": _ctx.src,
268
+ alt: _ctx.alt,
269
+ "class": normalizeClass(_ctx.imageClass)
270
+ }, null, 10, _hoisted_2), createVNode(_component_FwLoadingBar, {
271
+ "class": normalizeClass(["fw-image--loading w-full h-full", {
272
+ 'rounded-full': _ctx.rounded
273
+ }])
274
+ }, null, 8, ["class"]), createElementVNode("div", {
275
+ "class": normalizeClass(["fw-image--error bg-grey-20", {
276
+ 'rounded-full': _ctx.rounded
277
+ }])
278
+ }, [createElementVNode("div", _hoisted_3, [createVNode(_component_FileExclamationSvg, {
279
+ "class": "w-full h-full scale-[0.3] opacity-80 text-alert max-w-[150px]"
280
+ })])], 2), renderSlot(_ctx.$slots, "default")], 42, _hoisted_1)), [[_directive_lazyload]]);
281
+ }
282
+
283
+ var css_248z = ".fw-image{position:relative}.fw-image img{-webkit-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.fw-image img,.fw-image--error{opacity:0;visibility:hidden;width:100%}.fw-image--error{height:100%;left:0;position:relative;position:absolute;top:0;-webkit-transition:all .5s ease-in;transition:all .5s ease-in}.fw-image--error-wrapper{font-size:inherit;left:50%;position:absolute;text-align:center;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:100%}.fw-image--loading{height:100%;left:0;position:absolute!important;top:0;-webkit-transition:all .5s ease-in-out;transition:all .5s ease-in-out;width:100%}.fw-image--loaded img,.fw-image--loading{opacity:1;visibility:visible}.fw-image--loaded .fw-image--loading{opacity:0;visibility:hidden;width:100%}.fw-image--loaded-error img{display:none}.fw-image--loaded-error .fw-image--error{opacity:1;visibility:visible}.fw-image--background{background-position:50%;background-repeat:no-repeat;background-size:cover}";
284
+ var stylesheet = ".fw-image{position:relative}.fw-image img{-webkit-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.fw-image img,.fw-image--error{opacity:0;visibility:hidden;width:100%}.fw-image--error{height:100%;left:0;position:relative;position:absolute;top:0;-webkit-transition:all .5s ease-in;transition:all .5s ease-in}.fw-image--error-wrapper{font-size:inherit;left:50%;position:absolute;text-align:center;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:100%}.fw-image--loading{height:100%;left:0;position:absolute!important;top:0;-webkit-transition:all .5s ease-in-out;transition:all .5s ease-in-out;width:100%}.fw-image--loaded img,.fw-image--loading{opacity:1;visibility:visible}.fw-image--loaded .fw-image--loading{opacity:0;visibility:hidden;width:100%}.fw-image--loaded-error img{display:none}.fw-image--loaded-error .fw-image--error{opacity:1;visibility:visible}.fw-image--background{background-position:50%;background-repeat:no-repeat;background-size:cover}";
285
+ styleInject(css_248z);
286
+
287
+ script.render = render;
288
+
289
+ export { script as s };
package/esm/fw-image.js CHANGED
@@ -1,20 +1,23 @@
1
- export { s as FwImage } from './fw-image-ec7b02c5.js';
2
- import './es.array.includes-df8e6e35.js';
3
- import './function-name-e2f6ea36.js';
4
- import './object-keys-6a890c6f.js';
5
- import './is-forced-ddf227e6.js';
6
- import './add-to-unscopables-3f461c07.js';
7
- import './es.number.constructor-f279ce82.js';
8
- import './to-string-685748aa.js';
9
- import './classof-a45668b6.js';
1
+ export { s as FwImage } from './fw-image-03f85465.js';
2
+ import './es.array.includes-91be7771.js';
3
+ import './is-forced-752b5893.js';
4
+ import './export-a37ba078.js';
5
+ import './add-to-unscopables-2400f45b.js';
6
+ import './object-create-f6f3a673.js';
7
+ import './object-keys-4f5bf4e7.js';
8
+ import './es.number.constructor-1249bd78.js';
9
+ import './to-string-12728fd2.js';
10
+ import './classof-39c30bd5.js';
10
11
  import 'vue';
11
- import './es.array.find-36d8f2f0.js';
12
- import './array-iteration-98e2cf9a.js';
13
- import './array-species-create-5fc23c89.js';
14
- import './create-property-558a3c24.js';
15
- import './web.timers-4a6aaab8.js';
16
- import './array-method-is-strict-544b103f.js';
17
- import './fw-loading-bar-da7d53fb.js';
12
+ import './es.array.find-dfa1f42f.js';
13
+ import './array-iteration-107f927f.js';
14
+ import './array-species-create-a5f5503b.js';
15
+ import './es.string.iterator-284b31d4.js';
16
+ import './create-property-534611fd.js';
17
+ import './web.timers-0f117224.js';
18
+ import './function-apply-ce251590.js';
19
+ import './array-method-is-strict-055b1830.js';
20
+ import './fw-loading-bar-f5ca605c.js';
18
21
  import './style-inject.es-1f59c1d0.js';
19
- import './index-4605e00e.js';
22
+ import './index-692e4d19.js';
20
23
  import './check-94a5917a.js';
package/esm/fw-input.js CHANGED
@@ -1,12 +1,20 @@
1
- import './es.array.includes-df8e6e35.js';
1
+ import './es.array.includes-91be7771.js';
2
2
  import { defineComponent, ref, computed, createElementVNode, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, toDisplayString, createCommentVNode, renderSlot, mergeProps, Transition, normalizeClass } from 'vue';
3
3
  import { a as Field } from './vee-validate.esm-a17a23c3.js';
4
- import './es.function.name-b642b74f.js';
4
+ import { u as uniqueId } from './uniqueId-fe08534a.js';
5
+ import './es.function.name-557cb1f9.js';
6
+ import './es.array.concat-987938be.js';
5
7
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
6
- import './function-name-e2f6ea36.js';
7
- import './object-keys-6a890c6f.js';
8
- import './is-forced-ddf227e6.js';
9
- import './add-to-unscopables-3f461c07.js';
8
+ import './is-forced-752b5893.js';
9
+ import './export-a37ba078.js';
10
+ import './add-to-unscopables-2400f45b.js';
11
+ import './object-create-f6f3a673.js';
12
+ import './object-keys-4f5bf4e7.js';
13
+ import './array-species-create-a5f5503b.js';
14
+ import './classof-39c30bd5.js';
15
+ import './does-not-exceed-safe-integer-31d08811.js';
16
+ import './create-property-534611fd.js';
17
+ import './array-method-has-species-support-3d413468.js';
10
18
 
11
19
  var script = defineComponent({
12
20
  name: 'FwInput',
@@ -22,7 +30,6 @@ var script = defineComponent({
22
30
  type: String,
23
31
  "default": ''
24
32
  },
25
-
26
33
  /**
27
34
  * The name of the input field. Must be unique per form.
28
35
  */
@@ -30,7 +37,6 @@ var script = defineComponent({
30
37
  type: String,
31
38
  required: true
32
39
  },
33
-
34
40
  /**
35
41
  * The input type. Accepts `text` | `password`
36
42
  */
@@ -41,14 +47,12 @@ var script = defineComponent({
41
47
  return ['text', 'password', 'email', 'tel', 'time', 'url', 'week', 'month'].includes(value);
42
48
  }
43
49
  },
44
-
45
50
  /**
46
51
  * Label for the input. Also renders to an aria-label attribute
47
52
  */
48
53
  label: {
49
54
  type: String
50
55
  },
51
-
52
56
  /**
53
57
  * The placeholder text of the input
54
58
  */
@@ -56,14 +60,12 @@ var script = defineComponent({
56
60
  type: String,
57
61
  "default": ''
58
62
  },
59
-
60
63
  /**
61
64
  * Validation rules. Accepts an object, string schema or validation function.
62
65
  */
63
66
  rules: {
64
67
  type: [Object, String, Function]
65
68
  },
66
-
67
69
  /**
68
70
  * Converts the input into a readonly disabled field
69
71
  */
@@ -71,21 +73,18 @@ var script = defineComponent({
71
73
  type: Boolean,
72
74
  "default": false
73
75
  },
74
-
75
76
  /**
76
77
  * The hint text shown below the input
77
78
  */
78
79
  hint: {
79
80
  type: String
80
81
  },
81
-
82
82
  /**
83
83
  * The autocomplete input attribute
84
84
  */
85
85
  autocomplete: {
86
86
  type: String
87
87
  },
88
-
89
88
  /**
90
89
  * The logical tab order of the input.
91
90
  * Defaults to 1
@@ -96,6 +95,7 @@ var script = defineComponent({
96
95
  }
97
96
  },
98
97
  setup: function setup(props, ctx) {
98
+ var uuid = uniqueId();
99
99
  var inputBaseClass = ref("border-2 border-grey-40 rounded focus:outline-none focus:ring-2 focus:ring-primary block w-full p-2.5");
100
100
  var inputValue = computed({
101
101
  get: function get() {
@@ -106,6 +106,7 @@ var script = defineComponent({
106
106
  }
107
107
  });
108
108
  return {
109
+ uuid: uuid,
109
110
  inputBaseClass: inputBaseClass,
110
111
  inputValue: inputValue
111
112
  };
@@ -132,8 +133,7 @@ var _hoisted_7 = {
132
133
  key: 0,
133
134
  "class": "flex text-black absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
134
135
  };
135
- var _hoisted_8 = ["placeholder", "type", "readonly", "tabindex", "disabled", "autocomplete"];
136
-
136
+ var _hoisted_8 = ["id", "placeholder", "type", "readonly", "tabindex", "disabled", "autocomplete"];
137
137
  var _hoisted_9 = /*#__PURE__*/createElementVNode("svg", {
138
138
  fill: "currentColor",
139
139
  "aria-hidden": "true",
@@ -144,7 +144,6 @@ var _hoisted_9 = /*#__PURE__*/createElementVNode("svg", {
144
144
  }, [/*#__PURE__*/createElementVNode("path", {
145
145
  d: "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM232 152C232 138.8\n 242.8 128 256 128s24 10.75 24 24v128c0 13.25-10.75 24-24 24S232 293.3 232 280V152zM256 400c-17.36\n 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 385.9 273.4\n 400 256 400z"
146
146
  })], -1);
147
-
148
147
  var _hoisted_10 = [_hoisted_9];
149
148
  var _hoisted_11 = {
150
149
  key: 1,
@@ -162,7 +161,6 @@ var _hoisted_14 = {
162
161
  };
163
162
  function render(_ctx, _cache, $props, $setup, $data, $options) {
164
163
  var _component_InputField = resolveComponent("InputField");
165
-
166
164
  return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_InputField, {
167
165
  modelValue: _ctx.inputValue,
168
166
  "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
@@ -173,14 +171,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
173
171
  }, {
174
172
  "default": withCtx(function (_ref) {
175
173
  var field = _ref.field,
176
- errors = _ref.errors,
177
- errorMessage = _ref.errorMessage,
178
- meta = _ref.meta;
174
+ errors = _ref.errors,
175
+ errorMessage = _ref.errorMessage,
176
+ meta = _ref.meta;
179
177
  return [createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [_ctx.label ? (openBlock(), createElementBlock("label", {
180
178
  key: 0,
181
- "for": _ctx.name,
179
+ "for": "fw-input-".concat(_ctx.name, "-").concat(_ctx.uuid),
182
180
  "class": "block mb-2 font-medium"
183
181
  }, toDisplayString(_ctx.label), 9, _hoisted_4)) : createCommentVNode("", true), _ctx.$slots.action ? (openBlock(), createElementBlock("div", _hoisted_5, [renderSlot(_ctx.$slots, "action")])) : createCommentVNode("", true)]), createElementVNode("div", _hoisted_6, [_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_7, [renderSlot(_ctx.$slots, "prefix")])) : createCommentVNode("", true), createElementVNode("input", mergeProps(field, {
182
+ id: "fw-input-".concat(_ctx.name, "-").concat(_ctx.uuid),
184
183
  placeholder: _ctx.placeholder,
185
184
  type: _ctx.type,
186
185
  readonly: _ctx.readonly,
@@ -215,8 +214,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
215
214
  }, 8, ["modelValue", "name", "rules"])]);
216
215
  }
217
216
 
218
- var css_248z = ".fwFadeIn-enter-active{-webkit-animation:fwFadeIn .35s;animation:fwFadeIn .35s;-webkit-transition:opacity .35s ease-in;-o-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.fwFadeIn-leave-active{animation:fwFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;-o-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}@keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}";
219
- var stylesheet = ".fwFadeIn-enter-active{-webkit-animation:fwFadeIn .35s;animation:fwFadeIn .35s;-webkit-transition:opacity .35s ease-in;-o-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.fwFadeIn-leave-active{animation:fwFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;-o-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}@keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}";
217
+ var css_248z = ".fwFadeIn-enter-active{-webkit-animation:fwFadeIn .35s;animation:fwFadeIn .35s;-webkit-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.fwFadeIn-leave-active{animation:fwFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}@keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}";
218
+ var stylesheet = ".fwFadeIn-enter-active{-webkit-animation:fwFadeIn .35s;animation:fwFadeIn .35s;-webkit-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.fwFadeIn-leave-active{animation:fwFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}@keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}";
220
219
  styleInject(css_248z);
221
220
 
222
221
  script.render = render;