@frollo/frollo-web-ui 0.0.21 → 0.1.1

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 (45) hide show
  1. package/cjs/index.js +1141 -476
  2. package/esm/{add-to-unscopables-874257d1.js → add-to-unscopables-81c17489.js} +139 -99
  3. package/esm/{es.array.includes-ef2f18f4.js → es.array.includes-debcb50f.js} +9 -3
  4. package/esm/{es.function.name-43e1ffbd.js → es.function.name-e746680f.js} +1 -1
  5. package/esm/{function-name-a620492a.js → function-name-f0c1223e.js} +52 -61
  6. package/esm/{fw-button-fee2541f.js → fw-button-bba6ac88.js} +14 -6
  7. package/esm/fw-button.js +4 -4
  8. package/esm/fw-card.js +7 -4
  9. package/esm/fw-checkbox.js +11 -6
  10. package/esm/fw-form.js +1 -1
  11. package/esm/fw-input.js +10 -8
  12. package/esm/fw-modal.js +7 -0
  13. package/esm/fw-navigation-menu.js +16 -15
  14. package/esm/fw-tabs.js +3 -3
  15. package/esm/{index-5430e7a3.js → index-0e14da44.js} +18 -22
  16. package/esm/index-1813012f.js +474 -0
  17. package/esm/index.js +185 -26
  18. package/esm/{vee-validate.esm-028c6424.js → vee-validate.esm-b64acab1.js} +62 -9
  19. package/frollo-web-ui.esm.js +1218 -488
  20. package/index.d.ts +217 -27
  21. package/package.json +22 -17
  22. package/styles/tailwind.scss +58 -0
  23. package/styles/transitions.scss +20 -0
  24. package/styles/typography.scss +38 -0
  25. package/tailwind.config.js +10 -10
  26. package/types/components/fw-button/fw-button.vue.d.ts +2 -21
  27. package/types/components/fw-button/index.types.d.ts +29 -0
  28. package/types/components/fw-card/fw-card.vue.d.ts +1 -0
  29. package/types/components/fw-card/index.types.d.ts +6 -0
  30. package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +0 -6
  31. package/types/components/fw-checkbox/index.types.d.ts +6 -0
  32. package/types/components/fw-input/fw-input.vue.d.ts +5 -14
  33. package/types/components/fw-input/index.types.d.ts +14 -0
  34. package/types/components/fw-modal/fw-modal.vue.d.ts +145 -0
  35. package/types/components/fw-modal/index.d.ts +2 -0
  36. package/types/components/fw-modal/index.types.d.ts +12 -0
  37. package/types/components/fw-navigation-menu/fw-navigation-menu.vue.d.ts +2 -5
  38. package/types/components/fw-navigation-menu/index.types.d.ts +5 -0
  39. package/types/components/index.d.ts +1 -0
  40. package/types/components/index.types.d.ts +6 -0
  41. package/types/index-types.esm.d.ts +2 -7
  42. package/types/index.d.ts +1 -0
  43. package/types/index.esm.d.ts +1 -0
  44. package/types/services/index.d.ts +1 -0
  45. package/types/services/modal.d.ts +9 -0
@@ -0,0 +1,474 @@
1
+ import './es.array.includes-debcb50f.js';
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-bba6ac88.js';
4
+ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
5
+
6
+ /** Detect free variable `global` from Node.js. */
7
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
8
+
9
+ /** Detect free variable `self`. */
10
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
11
+
12
+ /** Used as a reference to the global object. */
13
+ var root = freeGlobal || freeSelf || Function('return this')();
14
+
15
+ /** Built-in value references. */
16
+ var Symbol = root.Symbol;
17
+
18
+ /**
19
+ * A specialized version of `_.map` for arrays without support for iteratee
20
+ * shorthands.
21
+ *
22
+ * @private
23
+ * @param {Array} [array] The array to iterate over.
24
+ * @param {Function} iteratee The function invoked per iteration.
25
+ * @returns {Array} Returns the new mapped array.
26
+ */
27
+ function arrayMap(array, iteratee) {
28
+ var index = -1,
29
+ length = array == null ? 0 : array.length,
30
+ result = Array(length);
31
+
32
+ while (++index < length) {
33
+ result[index] = iteratee(array[index], index, array);
34
+ }
35
+ return result;
36
+ }
37
+
38
+ /**
39
+ * Checks if `value` is classified as an `Array` object.
40
+ *
41
+ * @static
42
+ * @memberOf _
43
+ * @since 0.1.0
44
+ * @category Lang
45
+ * @param {*} value The value to check.
46
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
47
+ * @example
48
+ *
49
+ * _.isArray([1, 2, 3]);
50
+ * // => true
51
+ *
52
+ * _.isArray(document.body.children);
53
+ * // => false
54
+ *
55
+ * _.isArray('abc');
56
+ * // => false
57
+ *
58
+ * _.isArray(_.noop);
59
+ * // => false
60
+ */
61
+ var isArray = Array.isArray;
62
+
63
+ /** Used for built-in method references. */
64
+ var objectProto$1 = Object.prototype;
65
+
66
+ /** Used to check objects for own properties. */
67
+ var hasOwnProperty = objectProto$1.hasOwnProperty;
68
+
69
+ /**
70
+ * Used to resolve the
71
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
72
+ * of values.
73
+ */
74
+ var nativeObjectToString$1 = objectProto$1.toString;
75
+
76
+ /** Built-in value references. */
77
+ var symToStringTag$1 = Symbol ? Symbol.toStringTag : undefined;
78
+
79
+ /**
80
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
81
+ *
82
+ * @private
83
+ * @param {*} value The value to query.
84
+ * @returns {string} Returns the raw `toStringTag`.
85
+ */
86
+ function getRawTag(value) {
87
+ var isOwn = hasOwnProperty.call(value, symToStringTag$1),
88
+ tag = value[symToStringTag$1];
89
+
90
+ try {
91
+ value[symToStringTag$1] = undefined;
92
+ var unmasked = true;
93
+ } catch (e) {}
94
+
95
+ var result = nativeObjectToString$1.call(value);
96
+ if (unmasked) {
97
+ if (isOwn) {
98
+ value[symToStringTag$1] = tag;
99
+ } else {
100
+ delete value[symToStringTag$1];
101
+ }
102
+ }
103
+ return result;
104
+ }
105
+
106
+ /** Used for built-in method references. */
107
+ var objectProto = Object.prototype;
108
+
109
+ /**
110
+ * Used to resolve the
111
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
112
+ * of values.
113
+ */
114
+ var nativeObjectToString = objectProto.toString;
115
+
116
+ /**
117
+ * Converts `value` to a string using `Object.prototype.toString`.
118
+ *
119
+ * @private
120
+ * @param {*} value The value to convert.
121
+ * @returns {string} Returns the converted string.
122
+ */
123
+ function objectToString(value) {
124
+ return nativeObjectToString.call(value);
125
+ }
126
+
127
+ /** `Object#toString` result references. */
128
+ var nullTag = '[object Null]',
129
+ undefinedTag = '[object Undefined]';
130
+
131
+ /** Built-in value references. */
132
+ var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
133
+
134
+ /**
135
+ * The base implementation of `getTag` without fallbacks for buggy environments.
136
+ *
137
+ * @private
138
+ * @param {*} value The value to query.
139
+ * @returns {string} Returns the `toStringTag`.
140
+ */
141
+ function baseGetTag(value) {
142
+ if (value == null) {
143
+ return value === undefined ? undefinedTag : nullTag;
144
+ }
145
+ return (symToStringTag && symToStringTag in Object(value))
146
+ ? getRawTag(value)
147
+ : objectToString(value);
148
+ }
149
+
150
+ /**
151
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
152
+ * and has a `typeof` result of "object".
153
+ *
154
+ * @static
155
+ * @memberOf _
156
+ * @since 4.0.0
157
+ * @category Lang
158
+ * @param {*} value The value to check.
159
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
160
+ * @example
161
+ *
162
+ * _.isObjectLike({});
163
+ * // => true
164
+ *
165
+ * _.isObjectLike([1, 2, 3]);
166
+ * // => true
167
+ *
168
+ * _.isObjectLike(_.noop);
169
+ * // => false
170
+ *
171
+ * _.isObjectLike(null);
172
+ * // => false
173
+ */
174
+ function isObjectLike(value) {
175
+ return value != null && typeof value == 'object';
176
+ }
177
+
178
+ /** `Object#toString` result references. */
179
+ var symbolTag = '[object Symbol]';
180
+
181
+ /**
182
+ * Checks if `value` is classified as a `Symbol` primitive or object.
183
+ *
184
+ * @static
185
+ * @memberOf _
186
+ * @since 4.0.0
187
+ * @category Lang
188
+ * @param {*} value The value to check.
189
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
190
+ * @example
191
+ *
192
+ * _.isSymbol(Symbol.iterator);
193
+ * // => true
194
+ *
195
+ * _.isSymbol('abc');
196
+ * // => false
197
+ */
198
+ function isSymbol(value) {
199
+ return typeof value == 'symbol' ||
200
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
201
+ }
202
+
203
+ /** Used as references for various `Number` constants. */
204
+ var INFINITY = 1 / 0;
205
+
206
+ /** Used to convert symbols to primitives and strings. */
207
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
208
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
209
+
210
+ /**
211
+ * The base implementation of `_.toString` which doesn't convert nullish
212
+ * values to empty strings.
213
+ *
214
+ * @private
215
+ * @param {*} value The value to process.
216
+ * @returns {string} Returns the string.
217
+ */
218
+ function baseToString(value) {
219
+ // Exit early for strings to avoid a performance hit in some environments.
220
+ if (typeof value == 'string') {
221
+ return value;
222
+ }
223
+ if (isArray(value)) {
224
+ // Recursively convert values (susceptible to call stack limits).
225
+ return arrayMap(value, baseToString) + '';
226
+ }
227
+ if (isSymbol(value)) {
228
+ return symbolToString ? symbolToString.call(value) : '';
229
+ }
230
+ var result = (value + '');
231
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
232
+ }
233
+
234
+ /**
235
+ * Converts `value` to a string. An empty string is returned for `null`
236
+ * and `undefined` values. The sign of `-0` is preserved.
237
+ *
238
+ * @static
239
+ * @memberOf _
240
+ * @since 4.0.0
241
+ * @category Lang
242
+ * @param {*} value The value to convert.
243
+ * @returns {string} Returns the converted string.
244
+ * @example
245
+ *
246
+ * _.toString(null);
247
+ * // => ''
248
+ *
249
+ * _.toString(-0);
250
+ * // => '-0'
251
+ *
252
+ * _.toString([1, 2, 3]);
253
+ * // => '1,2,3'
254
+ */
255
+ function toString(value) {
256
+ return value == null ? '' : baseToString(value);
257
+ }
258
+
259
+ /** Used to generate unique IDs. */
260
+ var idCounter = 0;
261
+
262
+ /**
263
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
264
+ *
265
+ * @static
266
+ * @since 0.1.0
267
+ * @memberOf _
268
+ * @category Util
269
+ * @param {string} [prefix=''] The value to prefix the ID with.
270
+ * @returns {string} Returns the unique ID.
271
+ * @example
272
+ *
273
+ * _.uniqueId('contact_');
274
+ * // => 'contact_104'
275
+ *
276
+ * _.uniqueId();
277
+ * // => '105'
278
+ */
279
+ function uniqueId(prefix) {
280
+ var id = ++idCounter;
281
+ return toString(prefix) + id;
282
+ }
283
+
284
+ var script = defineComponent({
285
+ name: 'FwModal',
286
+ components: {
287
+ FwButton: script$1
288
+ },
289
+ emits: ['cancel', 'confirm'],
290
+ props: {
291
+ /**
292
+ * The header title of the modal
293
+ */
294
+ header: {
295
+ type: String
296
+ },
297
+
298
+ /**
299
+ * The body description of the modal
300
+ */
301
+ body: {
302
+ type: String
303
+ },
304
+
305
+ /**
306
+ * The aria role of the modal container. Defaults to `dialog`
307
+ */
308
+ role: {
309
+ type: String,
310
+ "default": 'dialog'
311
+ },
312
+
313
+ /**
314
+ * Whether to show the cancel button
315
+ */
316
+ showCancel: {
317
+ type: Boolean,
318
+ "default": false
319
+ },
320
+
321
+ /**
322
+ * Whether to show the confirm button
323
+ */
324
+ showConfirm: {
325
+ type: Boolean,
326
+ "default": true
327
+ },
328
+
329
+ /**
330
+ * Custom text for the cancel button
331
+ */
332
+ cancelButtonText: {
333
+ type: String,
334
+ "default": 'Cancel'
335
+ },
336
+
337
+ /**
338
+ * Button variant for the cancel button
339
+ */
340
+ cancelButtonType: {
341
+ type: String,
342
+ "default": 'secondary',
343
+ validator: function validator(value) {
344
+ return ['primary', 'secondary', 'tertiary', 'error', 'success', 'link', 'text'].includes(value);
345
+ }
346
+ },
347
+
348
+ /**
349
+ * Custom text for the confirm button
350
+ */
351
+ confirmButtonText: {
352
+ type: String,
353
+ "default": 'Confirm'
354
+ },
355
+
356
+ /**
357
+ * Button variant for the confirm button
358
+ */
359
+ confirmButtonType: {
360
+ type: String,
361
+ "default": 'primary',
362
+ validator: function validator(value) {
363
+ return ['primary', 'secondary', 'tertiary', 'error', 'success', 'link', 'text'].includes(value);
364
+ }
365
+ }
366
+ },
367
+ setup: function setup() {
368
+ var uuid = uniqueId();
369
+ return {
370
+ uuid: uuid
371
+ };
372
+ }
373
+ });
374
+
375
+ var _withScopeId = function _withScopeId(n) {
376
+ return pushScopeId("data-v-8c26adc4"), n = n(), popScopeId(), n;
377
+ };
378
+
379
+ var _hoisted_1 = {
380
+ "class": "fw-modal"
381
+ };
382
+ var _hoisted_2 = {
383
+ "class": "fw-modal--mask fixed z-[9999] top-0 left-0 w-full h-full bg-black bg-opacity-50"
384
+ };
385
+ var _hoisted_3 = {
386
+ "class": "fw-modal--wrapper text-center overflow-auto flex justify-center items-center h-full"
387
+ };
388
+ var _hoisted_4 = ["role", "aria-labelledby", "aria-describedby"];
389
+ var _hoisted_5 = {
390
+ key: 0,
391
+ "class": "fw-modal--header text-center"
392
+ };
393
+ var _hoisted_6 = {
394
+ key: 0,
395
+ id: "modal-logo",
396
+ "class": "flex justify-center"
397
+ };
398
+ var _hoisted_7 = ["id"];
399
+ var _hoisted_8 = ["id", "innerHTML"];
400
+ var _hoisted_9 = ["id"];
401
+ var _hoisted_10 = ["innerHTML", "id"];
402
+ var _hoisted_11 = {
403
+ key: 3,
404
+ "class": "modal-footer flex space-x-4 pt-4 justify-center"
405
+ };
406
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
407
+ var _component_FwButton = resolveComponent("FwButton");
408
+
409
+ return openBlock(), createBlock(Transition, {
410
+ name: "modalFadeIn",
411
+ appear: ""
412
+ }, {
413
+ "default": withCtx(function () {
414
+ return [createElementVNode("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [createElementVNode("div", {
415
+ role: _ctx.role,
416
+ "class": "fw-modal--container p-12 m-8 inline-block w-full max-w-[540px] bg-white rounded-2xl shadow",
417
+ "aria-labelledby": _ctx.$slots.header || _ctx.header ? "modal_".concat(_ctx.uuid, "_header") : null,
418
+ "aria-describedby": _ctx.$slots.body ? "modal_".concat(_ctx.uuid, "_body") : null
419
+ }, [_ctx.$slots.icon || _ctx.$slots.header || _ctx.header ? (openBlock(), createElementBlock("div", _hoisted_5, [_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_6, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("", true), _ctx.$slots.header ? (openBlock(), createElementBlock("h2", {
420
+ key: 1,
421
+ id: "modal_".concat(_ctx.uuid, "_header")
422
+ }, [renderSlot(_ctx.$slots, "header")], 8, _hoisted_7)) : _ctx.header ? (openBlock(), createElementBlock("h2", {
423
+ key: 2,
424
+ id: "modal_".concat(_ctx.uuid, "_header"),
425
+ innerHTML: _ctx.header
426
+ }, null, 8, _hoisted_8)) : createCommentVNode("", true)])) : createCommentVNode("", true), _ctx.$slots.body ? (openBlock(), createElementBlock("div", {
427
+ key: 1,
428
+ "class": "modal-body mt-4",
429
+ id: "modal_".concat(_ctx.uuid, "_body")
430
+ }, [renderSlot(_ctx.$slots, "body")], 8, _hoisted_9)) : _ctx.body ? (openBlock(), createElementBlock("div", {
431
+ key: 2,
432
+ innerHTML: _ctx.body,
433
+ "class": "modal-body mt-4",
434
+ id: "modal_".concat(_ctx.uuid, "_body")
435
+ }, null, 8, _hoisted_10)) : createCommentVNode("", true), _ctx.showConfirm || _ctx.showCancel ? (openBlock(), createElementBlock("div", _hoisted_11, [_ctx.showCancel ? (openBlock(), createBlock(_component_FwButton, {
436
+ key: 0,
437
+ "class": "basis-1/2",
438
+ variant: _ctx.cancelButtonType,
439
+ "aria-label": _ctx.cancelButtonText,
440
+ onClick: _cache[0] || (_cache[0] = function ($event) {
441
+ return _ctx.$emit('cancel');
442
+ })
443
+ }, {
444
+ "default": withCtx(function () {
445
+ return [createTextVNode(toDisplayString(_ctx.cancelButtonText), 1)];
446
+ }),
447
+ _: 1
448
+ }, 8, ["variant", "aria-label"])) : createCommentVNode("", true), _ctx.showConfirm ? (openBlock(), createBlock(_component_FwButton, {
449
+ key: 1,
450
+ "class": "basis-1/2",
451
+ variant: _ctx.confirmButtonType,
452
+ "aria-label": _ctx.confirmButtonText,
453
+ onClick: _cache[1] || (_cache[1] = function ($event) {
454
+ return _ctx.$emit('confirm');
455
+ })
456
+ }, {
457
+ "default": withCtx(function () {
458
+ return [createTextVNode(toDisplayString(_ctx.confirmButtonText), 1)];
459
+ }),
460
+ _: 1
461
+ }, 8, ["variant", "aria-label"])) : createCommentVNode("", true)])) : createCommentVNode("", true)], 8, _hoisted_4)])])])];
462
+ }),
463
+ _: 3
464
+ });
465
+ }
466
+
467
+ var css_248z = ".modalFadeIn-enter-active[data-v-8c26adc4]{-webkit-animation:modalFadeIn-8c26adc4 .4s;animation:modalFadeIn-8c26adc4 .4s;-webkit-transition:opacity .4s ease-in;-o-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.modalFadeIn-leave-active[data-v-8c26adc4]{animation:modalFadeIn-8c26adc4 .4s reverse;-webkit-transition:opacity .4s ease-out;-o-transition:opacity .4s ease-out;transition:opacity .4s ease-out}@-webkit-keyframes modalFadeIn-8c26adc4{0%{opacity:0}to{opacity:1}}@keyframes modalFadeIn-8c26adc4{0%{opacity:0}to{opacity:1}}";
468
+ var stylesheet = ".modalFadeIn-enter-active[data-v-8c26adc4]{-webkit-animation:modalFadeIn-8c26adc4 .4s;animation:modalFadeIn-8c26adc4 .4s;-webkit-transition:opacity .4s ease-in;-o-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.modalFadeIn-leave-active[data-v-8c26adc4]{animation:modalFadeIn-8c26adc4 .4s reverse;-webkit-transition:opacity .4s ease-out;-o-transition:opacity .4s ease-out;transition:opacity .4s ease-out}@-webkit-keyframes modalFadeIn-8c26adc4{0%{opacity:0}to{opacity:1}}@keyframes modalFadeIn-8c26adc4{0%{opacity:0}to{opacity:1}}";
469
+ styleInject(css_248z);
470
+
471
+ script.render = render;
472
+ script.__scopeId = "data-v-8c26adc4";
473
+
474
+ export { script as s, uniqueId as u };