@frollo/frollo-web-ui 1.2.6 → 1.2.7

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.
@@ -1,10 +1,31 @@
1
1
  import './es.array.includes-9a6e4066.js';
2
- import { defineComponent, ref, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, createElementBlock, renderSlot, createCommentVNode } from 'vue';
2
+ import { defineComponent, resolveComponent, openBlock, createBlock, ref, computed, resolveDynamicComponent, normalizeClass, withCtx, createElementBlock, createElementVNode, renderSlot, createVNode, createCommentVNode } from 'vue';
3
+ import { b as render$2 } from './index-ec267913.js';
3
4
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
4
5
 
6
+ var script$1 = defineComponent({
7
+ name: 'FwLoadingSpinner',
8
+ components: {
9
+ LoadingSvg: render$2
10
+ }
11
+ });
12
+
13
+ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
14
+ var _component_LoadingSvg = resolveComponent("LoadingSvg");
15
+
16
+ return openBlock(), createBlock(_component_LoadingSvg, {
17
+ "class": "fw-loading-spinner animate-spin"
18
+ });
19
+ }
20
+
21
+ script$1.render = render$1;
22
+
5
23
  var script = defineComponent({
6
24
  name: 'FwButton',
7
25
  emits: ['click', 'mouseover', 'mouseout', 'focusin', 'focusout'],
26
+ components: {
27
+ FwLoadingSpinner: script$1
28
+ },
8
29
  props: {
9
30
  /**
10
31
  * A `router-link` path or object
@@ -70,11 +91,19 @@ var script = defineComponent({
70
91
  rounded: {
71
92
  type: Boolean,
72
93
  "default": true
94
+ },
95
+
96
+ /**
97
+ * Whether the loading animation is shown or not
98
+ */
99
+ loading: {
100
+ type: Boolean,
101
+ "default": false
73
102
  }
74
103
  },
75
104
  setup: function setup(props, ctx) {
76
105
  var baseClass = ref( // eslint-disable-next-line max-len
77
- 'inline-block text-center cursor-pointer whitespace-nowrap focus:outline-0 border-2 focus-visible:outline-0 focus:ring-none ring-offset-2 focus-visible:ring');
106
+ 'inline-block text-center whitespace-nowrap transition-colors ease-in-out duration-300 focus:outline-0 border-2 focus-visible:outline-0 focus:ring-none ring-offset-2 focus-visible:ring');
78
107
  var buttonClasses = ref({
79
108
  primary: {
80
109
  text: '',
@@ -119,6 +148,28 @@ var script = defineComponent({
119
148
  xl: 'px-12 py-3 text-xl',
120
149
  '2xl': 'px-16 py-4 text-2xl'
121
150
  });
151
+ var loadingSizes = ref({
152
+ sm: {
153
+ spacing: 'pr-[3px] -ml-[3px]',
154
+ size: 'w-2.5 h-2.5'
155
+ },
156
+ md: {
157
+ spacing: 'pr-[4px] -ml-[4px]',
158
+ size: 'w-4 h-4'
159
+ },
160
+ lg: {
161
+ spacing: 'pr-[8px] -ml-[8px]',
162
+ size: 'w-6 h-6'
163
+ },
164
+ xl: {
165
+ spacing: 'pr-[10px] -ml-[10px]',
166
+ size: 'w-7 h-7'
167
+ },
168
+ '2xl': {
169
+ spacing: 'pr-[14px] -ml-[14px]',
170
+ size: 'w-8 h-8'
171
+ }
172
+ });
122
173
  var textColorClass = computed(function () {
123
174
  return buttonClasses.value[props.variant].text;
124
175
  });
@@ -131,10 +182,12 @@ var script = defineComponent({
131
182
  var borderClass = computed(function () {
132
183
  return buttonClasses.value[props.variant].border;
133
184
  });
185
+ var loadingSize = computed(function () {
186
+ return loadingSizes.value[props.size];
187
+ });
134
188
  /**
135
189
  * @event Click - Native click
136
190
  */
137
- // eslint-disable-next-line no-undef
138
191
 
139
192
  var onClick = function onClick(e) {
140
193
  return ctx.emit('click', e);
@@ -142,7 +195,6 @@ var script = defineComponent({
142
195
  /**
143
196
  * @event mouseover - Native hover
144
197
  */
145
- // eslint-disable-next-line no-undef
146
198
 
147
199
 
148
200
  var onMouseover = function onMouseover(e) {
@@ -151,7 +203,6 @@ var script = defineComponent({
151
203
  /**
152
204
  * @event mouseout - Native hover out
153
205
  */
154
- // eslint-disable-next-line no-undef
155
206
 
156
207
 
157
208
  var onMouseout = function onMouseout(e) {
@@ -160,7 +211,6 @@ var script = defineComponent({
160
211
  /**
161
212
  * @event focusin - Native focusin
162
213
  */
163
- // eslint-disable-next-line no-undef
164
214
 
165
215
 
166
216
  var onFocusin = function onFocusin(e) {
@@ -169,7 +219,6 @@ var script = defineComponent({
169
219
  /**
170
220
  * @event focusout - Native focusout
171
221
  */
172
- // eslint-disable-next-line no-undef
173
222
 
174
223
 
175
224
  var onFocusout = function onFocusout(e) {
@@ -192,22 +241,26 @@ var script = defineComponent({
192
241
  onMouseout: onMouseout,
193
242
  onFocusin: onFocusin,
194
243
  onFocusout: onFocusout,
195
- tagName: tagName
244
+ tagName: tagName,
245
+ loadingSize: loadingSize
196
246
  };
197
247
  }
198
248
  });
199
249
 
200
250
  var _hoisted_1 = {
201
251
  key: 0,
202
- "class": "fw-button--label"
252
+ "class": "fw-button--label relative"
203
253
  };
204
254
  function render(_ctx, _cache, $props, $setup, $data, $options) {
255
+ var _component_FwLoadingSpinner = resolveComponent("FwLoadingSpinner");
256
+
205
257
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), {
206
- "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' : 'font-semibold', _ctx.animation === 'fade' ? 'animation--fade' : 'animation--alternate']]),
258
+ "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' : 'font-semibold', _ctx.animation === 'fade' ? 'animation--fade' : 'animation--alternate', _ctx.loading === true ? 'fw-button--loading cursor-progress' : 'cursor-pointer']]),
207
259
  type: _ctx.tagName === 'button' ? _ctx.buttonType : null,
208
260
  to: _ctx.to ? _ctx.to : null,
209
261
  href: _ctx.href ? _ctx.href : null,
210
262
  tabindex: _ctx.to ? 0 : null,
263
+ disabled: _ctx.loading,
211
264
  onClick: _ctx.onClick,
212
265
  onFocusin: _ctx.onFocusin,
213
266
  onFocusout: _ctx.onFocusout,
@@ -215,14 +268,21 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
215
268
  onMouseout: _ctx.onMouseout
216
269
  }, {
217
270
  "default": withCtx(function () {
218
- return [_ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)];
271
+ return [_ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", {
272
+ "class": normalizeClass(["fw-button--label-wrapper", _ctx.loading ? _ctx.loadingSize.spacing : 'pr-0 ml-0'])
273
+ }, [renderSlot(_ctx.$slots, "default")], 2), _ctx.loading ? (openBlock(), createElementBlock("div", {
274
+ key: 0,
275
+ "class": normalizeClass([_ctx.loadingSize.size, "inline-flex absolute top-2/4 -translate-y-2/4 left-full"])
276
+ }, [createVNode(_component_FwLoadingSpinner, {
277
+ "class": "w-full h-full"
278
+ })], 2)) : createCommentVNode("", true)])) : createCommentVNode("", true)];
219
279
  }),
220
280
  _: 3
221
- }, 40, ["class", "type", "to", "href", "tabindex", "onClick", "onFocusin", "onFocusout", "onMouseover", "onMouseout"]);
281
+ }, 40, ["class", "type", "to", "href", "tabindex", "disabled", "onClick", "onFocusin", "onFocusout", "onMouseover", "onMouseout"]);
222
282
  }
223
283
 
224
- var css_248z = ".fw-button{line-height:normal;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out}.fw-button--primary{background:var(--colorButtonPrimary);color:var(--colorButtonPrimaryText)}.fw-button--primary:hover{background:var(--colorButtonPrimaryFade)}.fw-button--secondary{background:var(--colorButtonSecondary);color:var(--colorButtonSecondaryText)}.fw-button--secondary.animation--alternate:hover{background:var(--colorButtonSecondaryText);color:var(--colorButtonSecondary)}.fw-button--secondary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--tertiary{background:var(--colorButtonTertiary);color:var(--colorButtonTertiaryText)}.fw-button--tertiary.animation--alternate:hover{background:var(--colorButtonTertiaryText);color:var(--colorButtonTertiary)}.fw-button--tertiary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}";
225
- var stylesheet = ".fw-button{line-height:normal;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out}.fw-button--primary{background:var(--colorButtonPrimary);color:var(--colorButtonPrimaryText)}.fw-button--primary:hover{background:var(--colorButtonPrimaryFade)}.fw-button--secondary{background:var(--colorButtonSecondary);color:var(--colorButtonSecondaryText)}.fw-button--secondary.animation--alternate:hover{background:var(--colorButtonSecondaryText);color:var(--colorButtonSecondary)}.fw-button--secondary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--tertiary{background:var(--colorButtonTertiary);color:var(--colorButtonTertiaryText)}.fw-button--tertiary.animation--alternate:hover{background:var(--colorButtonTertiaryText);color:var(--colorButtonTertiary)}.fw-button--tertiary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}";
284
+ var css_248z = ".fw-button{line-height:normal}.fw-button--label-wrapper{-webkit-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:margin,padding;-o-transition-property:margin,padding;transition-property:margin,padding;-webkit-transition-timing-function:ease-in-out;-o-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.fw-button--primary{background:var(--colorButtonPrimary);color:var(--colorButtonPrimaryText)}.fw-button--primary.fw-button--loading,.fw-button--primary:hover{background:var(--colorButtonPrimaryFade);border-color:var(--colorButtonPrimaryFade)}.fw-button--secondary{background:var(--colorButtonSecondary);color:var(--colorButtonSecondaryText)}.fw-button--secondary.animation--alternate.fw-button--loading,.fw-button--secondary.animation--alternate:hover{background:var(--colorButtonSecondaryText);color:var(--colorButtonSecondary)}.fw-button--secondary.animation--fade.fw-button--loading,.fw-button--secondary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--tertiary{background:var(--colorButtonTertiary);color:var(--colorButtonTertiaryText)}.fw-button--tertiary.animation--alternate.fw-button--loading,.fw-button--tertiary.animation--alternate:hover{background:var(--colorButtonTertiaryText);color:var(--colorButtonTertiary)}.fw-button--tertiary.animation--fade.fw-button--loading,.fw-button--tertiary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}";
285
+ var stylesheet = ".fw-button{line-height:normal}.fw-button--label-wrapper{-webkit-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:margin,padding;-o-transition-property:margin,padding;transition-property:margin,padding;-webkit-transition-timing-function:ease-in-out;-o-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.fw-button--primary{background:var(--colorButtonPrimary);color:var(--colorButtonPrimaryText)}.fw-button--primary.fw-button--loading,.fw-button--primary:hover{background:var(--colorButtonPrimaryFade);border-color:var(--colorButtonPrimaryFade)}.fw-button--secondary{background:var(--colorButtonSecondary);color:var(--colorButtonSecondaryText)}.fw-button--secondary.animation--alternate.fw-button--loading,.fw-button--secondary.animation--alternate:hover{background:var(--colorButtonSecondaryText);color:var(--colorButtonSecondary)}.fw-button--secondary.animation--fade.fw-button--loading,.fw-button--secondary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--tertiary{background:var(--colorButtonTertiary);color:var(--colorButtonTertiaryText)}.fw-button--tertiary.animation--alternate.fw-button--loading,.fw-button--tertiary.animation--alternate:hover{background:var(--colorButtonTertiaryText);color:var(--colorButtonTertiary)}.fw-button--tertiary.animation--fade.fw-button--loading,.fw-button--tertiary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}";
226
286
  styleInject(css_248z);
227
287
 
228
288
  script.render = render;
package/esm/fw-button.js CHANGED
@@ -1,8 +1,10 @@
1
- export { s as FwButton } from './fw-button-d5d2cf19.js';
1
+ export { s as FwButton } from './fw-button-ac0fbc7a.js';
2
2
  import './es.array.includes-9a6e4066.js';
3
3
  import './function-name-c49146fc.js';
4
4
  import './object-keys-3c73c404.js';
5
5
  import './is-forced-fd46b5f2.js';
6
6
  import './add-to-unscopables-a5032b1d.js';
7
7
  import 'vue';
8
+ import './index-ec267913.js';
9
+ import './check-94a5917a.js';
8
10
  import './style-inject.es-1f59c1d0.js';
@@ -1,7 +1,7 @@
1
1
  import './es.array.find-54b8f84b.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-b3aa1664.js';
4
+ import { a as render$1 } from './index-ec267913.js';
5
5
  import './es.function.name-2fa3a718.js';
6
6
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
7
  import './function-name-c49146fc.js';
package/esm/fw-image.js CHANGED
@@ -11,7 +11,7 @@ import { c as classof$1 } from './classof-088c9833.js';
11
11
  import { t as toString$2 } from './to-string-c2bd1f4d.js';
12
12
  import { o as objectCreate } from './add-to-unscopables-a5032b1d.js';
13
13
  import { s as script$1 } from './fw-loading-bar-da7d53fb.js';
14
- import { r as render$1 } from './index-b3aa1664.js';
14
+ import { r as render$1 } from './index-ec267913.js';
15
15
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
16
16
  import './check-94a5917a.js';
17
17
 
package/esm/fw-modal.js CHANGED
@@ -1,9 +1,11 @@
1
- export { s as FwModal } from './index-7d8c95be.js';
1
+ export { s as FwModal } from './index-d589fca1.js';
2
2
  import './es.array.includes-9a6e4066.js';
3
3
  import './function-name-c49146fc.js';
4
4
  import './object-keys-3c73c404.js';
5
5
  import './is-forced-fd46b5f2.js';
6
6
  import './add-to-unscopables-a5032b1d.js';
7
7
  import 'vue';
8
- import './fw-button-d5d2cf19.js';
8
+ import './fw-button-ac0fbc7a.js';
9
+ import './index-ec267913.js';
10
+ import './check-94a5917a.js';
9
11
  import './style-inject.es-1f59c1d0.js';
@@ -1,11 +1,13 @@
1
1
  import { defineComponent, ref, createElementVNode, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, Fragment, renderList, createBlock, withCtx, createTextVNode, toDisplayString, createVNode, Transition } from 'vue';
2
- import { s as script$1 } from './fw-button-d5d2cf19.js';
2
+ import { s as script$1 } from './fw-button-ac0fbc7a.js';
3
3
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
4
4
  import './es.array.includes-9a6e4066.js';
5
5
  import './function-name-c49146fc.js';
6
6
  import './object-keys-3c73c404.js';
7
7
  import './is-forced-fd46b5f2.js';
8
8
  import './add-to-unscopables-a5032b1d.js';
9
+ import './index-ec267913.js';
10
+ import './check-94a5917a.js';
9
11
 
10
12
  var script = defineComponent({
11
13
  name: 'FwNavigationMenu',
package/esm/fw-table.js CHANGED
@@ -3,7 +3,7 @@ import { _ as _export, o as objectKeys } from './object-keys-3c73c404.js';
3
3
  import { e as toAbsoluteIndex$1, l as lengthOfArrayLike$2 } from './is-forced-fd46b5f2.js';
4
4
  import { t as toString$1 } from './to-string-c2bd1f4d.js';
5
5
  import { c as createProperty$1, a as arrayMethodIsStrict$1 } from './create-property-da6d232b.js';
6
- import { b as render$3 } from './index-b3aa1664.js';
6
+ import { c as render$3 } from './index-ec267913.js';
7
7
  import { defineComponent, computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, withKeys, toDisplayString, createVNode, createCommentVNode, renderSlot } from 'vue';
8
8
  import { s as script$3 } from './fw-loading-bar-da7d53fb.js';
9
9
  import './classof-088c9833.js';
@@ -1,6 +1,6 @@
1
1
  import './es.array.includes-9a6e4066.js';
2
2
  import { defineComponent, pushScopeId, popScopeId, resolveComponent, openBlock, createBlock, Transition, withCtx, createElementVNode, createElementBlock, renderSlot, createCommentVNode, createTextVNode, toDisplayString } from 'vue';
3
- import { s as script$1 } from './fw-button-d5d2cf19.js';
3
+ import { s as script$1 } from './fw-button-ac0fbc7a.js';
4
4
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
5
5
 
6
6
  /** Detect free variable `global` from Node.js. */