@frollo/frollo-web-ui 0.2.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +283 -90
- package/esm/add-to-unscopables-82352072.js +239 -0
- package/esm/{es.array.includes-debcb50f.js → es.array.includes-33e186c4.js} +3 -2
- package/esm/{es.function.name-e746680f.js → es.function.name-3a9c8706.js} +1 -1
- package/esm/es.number.constructor-f646730f.js +243 -0
- package/esm/{function-name-f0c1223e.js → function-name-3bda6320.js} +1 -1
- package/esm/fw-animations.js +136 -0
- package/esm/{fw-button-ab906734.js → fw-button-22301a2f.js} +1 -1
- package/esm/fw-button.js +5 -4
- package/esm/fw-card.js +1 -1
- package/esm/fw-checkbox.js +2 -2
- package/esm/fw-input.js +5 -4
- package/esm/fw-modal.js +6 -5
- package/esm/fw-navigation-menu.js +5 -4
- package/esm/fw-progress-bar.js +90 -0
- package/esm/fw-tabs.js +5 -3
- package/esm/{index-963039a3.js → index-59d76908.js} +2 -2
- package/esm/index-dd50b12a.js +326 -0
- package/esm/index.js +20 -11
- package/esm/is-forced-3323c994.js +438 -0
- package/frollo-web-ui.esm.js +325 -107
- package/index.d.ts +126 -10
- package/package.json +1 -1
- package/types/components/fw-animations/fw-email-pulse.vue.d.ts +24 -0
- package/types/components/fw-animations/fw-success-pulse.vue.d.ts +24 -0
- package/types/components/fw-animations/index.d.ts +3 -0
- package/types/components/fw-progress-bar/fw-progress-bar.vue.d.ts +52 -0
- package/types/components/fw-progress-bar/index.d.ts +2 -0
- package/types/components/fw-progress-bar/index.types.d.ts +5 -0
- package/types/components/fw-tabs/fw-tab.vue.d.ts +11 -0
- package/types/components/fw-tabs/fw-tabs.vue.d.ts +1 -1
- package/types/components/index.d.ts +2 -0
- package/types/components/index.types.d.ts +1 -0
- package/esm/add-to-unscopables-81c17489.js +0 -673
- package/esm/index-0e14da44.js +0 -561
package/esm/fw-card.js
CHANGED
|
@@ -64,7 +64,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
64
64
|
to: _ctx.to ? _ctx.to : null,
|
|
65
65
|
href: _ctx.href ? _ctx.href : null,
|
|
66
66
|
tabindex: _ctx.to ? 0 : null,
|
|
67
|
-
"class": normalizeClass(["fw-card shadow-card rounded-lg", _ctx.to || _ctx.href ? _ctx.linkClass : ''])
|
|
67
|
+
"class": normalizeClass(["fw-card shadow-card rounded-lg", _ctx.to || _ctx.href || !!_ctx.$attrs.onClick ? _ctx.linkClass : ''])
|
|
68
68
|
}, {
|
|
69
69
|
"default": withCtx(function () {
|
|
70
70
|
return [_ctx.title || _ctx.prefixTitle ? (openBlock(), createElementBlock("h4", _hoisted_1, [_ctx.prefixTitle ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(_ctx.prefixTitle), 1)) : createCommentVNode("", true), _ctx.title ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)])) : createCommentVNode("", true), _ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_4, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)];
|
package/esm/fw-checkbox.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, mergeProps, createCommentVNode, Transition, toDisplayString } from 'vue';
|
|
2
2
|
import { a as Field } from './vee-validate.esm-b64acab1.js';
|
|
3
|
-
import './es.function.name-
|
|
3
|
+
import './es.function.name-3a9c8706.js';
|
|
4
4
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
5
|
-
import './function-name-
|
|
5
|
+
import './function-name-3bda6320.js';
|
|
6
6
|
|
|
7
7
|
var script = defineComponent({
|
|
8
8
|
name: 'FwCheckbox',
|
package/esm/fw-input.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import './es.array.includes-
|
|
1
|
+
import './es.array.includes-33e186c4.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-b64acab1.js';
|
|
4
|
-
import './es.function.name-
|
|
4
|
+
import './es.function.name-3a9c8706.js';
|
|
5
5
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
6
|
-
import './function-name-
|
|
7
|
-
import './add-to-unscopables-
|
|
6
|
+
import './function-name-3bda6320.js';
|
|
7
|
+
import './add-to-unscopables-82352072.js';
|
|
8
|
+
import './is-forced-3323c994.js';
|
|
8
9
|
|
|
9
10
|
var script = defineComponent({
|
|
10
11
|
name: 'FwInput',
|
package/esm/fw-modal.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { s as FwModal } from './index-
|
|
2
|
-
import './es.array.includes-
|
|
3
|
-
import './function-name-
|
|
4
|
-
import './add-to-unscopables-
|
|
1
|
+
export { s as FwModal } from './index-59d76908.js';
|
|
2
|
+
import './es.array.includes-33e186c4.js';
|
|
3
|
+
import './function-name-3bda6320.js';
|
|
4
|
+
import './add-to-unscopables-82352072.js';
|
|
5
|
+
import './is-forced-3323c994.js';
|
|
5
6
|
import 'vue';
|
|
6
|
-
import './fw-button-
|
|
7
|
+
import './fw-button-22301a2f.js';
|
|
7
8
|
import './style-inject.es-1f59c1d0.js';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { defineComponent, ref, createElementVNode, resolveComponent, openBlock, createElementBlock, renderSlot, createCommentVNode, Fragment, renderList, createBlock, withCtx, createTextVNode, toDisplayString, createVNode, Transition, normalizeClass } from 'vue';
|
|
2
|
-
import { s as script$1 } from './fw-button-
|
|
2
|
+
import { s as script$1 } from './fw-button-22301a2f.js';
|
|
3
3
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
4
|
-
import './es.array.includes-
|
|
5
|
-
import './function-name-
|
|
6
|
-
import './add-to-unscopables-
|
|
4
|
+
import './es.array.includes-33e186c4.js';
|
|
5
|
+
import './function-name-3bda6320.js';
|
|
6
|
+
import './add-to-unscopables-82352072.js';
|
|
7
|
+
import './is-forced-3323c994.js';
|
|
7
8
|
|
|
8
9
|
var script = defineComponent({
|
|
9
10
|
name: 'FwNavigationMenu',
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import './es.number.constructor-f646730f.js';
|
|
2
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString, normalizeStyle, createCommentVNode } from 'vue';
|
|
3
|
+
import './function-name-3bda6320.js';
|
|
4
|
+
import './is-forced-3323c994.js';
|
|
5
|
+
|
|
6
|
+
var script = defineComponent({
|
|
7
|
+
name: 'FwProgressBar',
|
|
8
|
+
props: {
|
|
9
|
+
/**
|
|
10
|
+
* An array of menu progress steps.
|
|
11
|
+
* `{ label: string; position: number; subSteps: number; }`
|
|
12
|
+
*/
|
|
13
|
+
steps: {
|
|
14
|
+
type: Array,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* An current active step.
|
|
20
|
+
*/
|
|
21
|
+
activeStep: {
|
|
22
|
+
type: Number,
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* An current active sub-step.
|
|
28
|
+
*/
|
|
29
|
+
activeSubStep: {
|
|
30
|
+
type: Number,
|
|
31
|
+
required: true
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
setup: function setup(props) {
|
|
35
|
+
var calculatedProgressBar = function calculatedProgressBar(step) {
|
|
36
|
+
var numOfSubSteps = step.subSteps;
|
|
37
|
+
var equalPercentageWidths = 100 / numOfSubSteps;
|
|
38
|
+
|
|
39
|
+
if (props.activeStep === step.position && props.activeSubStep) {
|
|
40
|
+
var width = equalPercentageWidths * props.activeSubStep;
|
|
41
|
+
return "width: ".concat(width, "%");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return 'width: 0%;';
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
calculatedProgressBar: calculatedProgressBar
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
var _hoisted_1 = {
|
|
54
|
+
"class": "fw-progress-bar w-full mx-auto my-4"
|
|
55
|
+
};
|
|
56
|
+
var _hoisted_2 = {
|
|
57
|
+
"class": "flex pb-3"
|
|
58
|
+
};
|
|
59
|
+
var _hoisted_3 = {
|
|
60
|
+
"class": "text-white text-center w-full"
|
|
61
|
+
};
|
|
62
|
+
var _hoisted_4 = {
|
|
63
|
+
"class": "text-sm md:text-base"
|
|
64
|
+
};
|
|
65
|
+
var _hoisted_5 = {
|
|
66
|
+
key: 0,
|
|
67
|
+
"class": "w-full flex items-start mt-[13px] mx-[-15px]"
|
|
68
|
+
};
|
|
69
|
+
var _hoisted_6 = {
|
|
70
|
+
"class": "w-full bg-grey-light rounded flex-1"
|
|
71
|
+
};
|
|
72
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
73
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.steps, function (step) {
|
|
74
|
+
return openBlock(), createElementBlock("div", {
|
|
75
|
+
"class": normalizeClass(["flex", step.position !== _ctx.steps.length ? 'flex-1' : 'w-[70px] md:w-[96px]']),
|
|
76
|
+
key: step.position
|
|
77
|
+
}, [createElementVNode("div", {
|
|
78
|
+
"class": normalizeClass(["text-center", step.position !== _ctx.steps.length ? 'min-w-[70px] w-[70px] md:min-w-[96px] md:w-[96px]' : 'w-full'])
|
|
79
|
+
}, [createElementVNode("div", {
|
|
80
|
+
"class": normalizeClass(["w-[30px] h-[30px] mx-auto mb-2 flex items-center justify-center text-center rounded-full", step.position <= _ctx.activeStep ? 'bg-primary' : 'bg-grey-light'])
|
|
81
|
+
}, [createElementVNode("span", _hoisted_3, toDisplayString(step.position), 1)], 2), createElementVNode("span", _hoisted_4, toDisplayString(step.label), 1)], 2), step.position !== _ctx.steps.length ? (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode("div", _hoisted_6, [createElementVNode("div", {
|
|
82
|
+
"class": "bg-primary text-xs leading-none py-0.5 text-center text-grey-darkest rounded transition-all",
|
|
83
|
+
style: normalizeStyle(step.position < _ctx.activeStep ? 'width:100%;' : _ctx.calculatedProgressBar(step))
|
|
84
|
+
}, null, 4)])])) : createCommentVNode("", true)], 2);
|
|
85
|
+
}), 128))])]);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
script.render = render;
|
|
89
|
+
|
|
90
|
+
export { script as FwProgressBar };
|
package/esm/fw-tabs.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export { b as FwTab, s as FwTabs } from './index-
|
|
2
|
-
import './
|
|
3
|
-
import './
|
|
1
|
+
export { b as FwTab, s as FwTabs } from './index-dd50b12a.js';
|
|
2
|
+
import './es.number.constructor-f646730f.js';
|
|
3
|
+
import './function-name-3bda6320.js';
|
|
4
|
+
import './is-forced-3323c994.js';
|
|
4
5
|
import 'vue';
|
|
6
|
+
import './add-to-unscopables-82352072.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import './es.array.includes-
|
|
1
|
+
import './es.array.includes-33e186c4.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-
|
|
3
|
+
import { s as script$1 } from './fw-button-22301a2f.js';
|
|
4
4
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
5
5
|
|
|
6
6
|
/** Detect free variable `global` from Node.js. */
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { c as classof$2 } from './es.number.constructor-f646730f.js';
|
|
2
|
+
import { defineComponent, computed, ref, provide, openBlock, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, renderSlot, getCurrentInstance, inject, watchEffect } from 'vue';
|
|
3
|
+
import { b as functionUncurryThis, h as aCallable$1, c as functionBindNative, f as fails$1, i as isCallable$1, j as getBuiltIn$1, k as isObject$1, w as wellKnownSymbol$1, t as toObject$1 } from './function-name-3bda6320.js';
|
|
4
|
+
import { _ as _export, a as addToUnscopables$1 } from './add-to-unscopables-82352072.js';
|
|
5
|
+
import { a as classofRaw, i as inspectSource$1, b as indexedObject, l as lengthOfArrayLike$1 } from './is-forced-3323c994.js';
|
|
6
|
+
|
|
7
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
8
|
+
var aCallable = aCallable$1;
|
|
9
|
+
var NATIVE_BIND = functionBindNative;
|
|
10
|
+
|
|
11
|
+
var bind$1 = uncurryThis$2(uncurryThis$2.bind);
|
|
12
|
+
|
|
13
|
+
// optional / simple context binding
|
|
14
|
+
var functionBindContext = function (fn, that) {
|
|
15
|
+
aCallable(fn);
|
|
16
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
|
|
17
|
+
return fn.apply(that, arguments);
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var classof$1 = classofRaw;
|
|
22
|
+
|
|
23
|
+
// `IsArray` abstract operation
|
|
24
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
25
|
+
// eslint-disable-next-line es-x/no-array-isarray -- safe
|
|
26
|
+
var isArray$1 = Array.isArray || function isArray(argument) {
|
|
27
|
+
return classof$1(argument) == 'Array';
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
31
|
+
var fails = fails$1;
|
|
32
|
+
var isCallable = isCallable$1;
|
|
33
|
+
var classof = classof$2;
|
|
34
|
+
var getBuiltIn = getBuiltIn$1;
|
|
35
|
+
var inspectSource = inspectSource$1;
|
|
36
|
+
|
|
37
|
+
var noop = function () { /* empty */ };
|
|
38
|
+
var empty = [];
|
|
39
|
+
var construct = getBuiltIn('Reflect', 'construct');
|
|
40
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
41
|
+
var exec = uncurryThis$1(constructorRegExp.exec);
|
|
42
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
43
|
+
|
|
44
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
45
|
+
if (!isCallable(argument)) return false;
|
|
46
|
+
try {
|
|
47
|
+
construct(noop, empty, argument);
|
|
48
|
+
return true;
|
|
49
|
+
} catch (error) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
55
|
+
if (!isCallable(argument)) return false;
|
|
56
|
+
switch (classof(argument)) {
|
|
57
|
+
case 'AsyncFunction':
|
|
58
|
+
case 'GeneratorFunction':
|
|
59
|
+
case 'AsyncGeneratorFunction': return false;
|
|
60
|
+
}
|
|
61
|
+
try {
|
|
62
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
63
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
64
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
65
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
|
66
|
+
} catch (error) {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
isConstructorLegacy.sham = true;
|
|
72
|
+
|
|
73
|
+
// `IsConstructor` abstract operation
|
|
74
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
75
|
+
var isConstructor$1 = !construct || fails(function () {
|
|
76
|
+
var called;
|
|
77
|
+
return isConstructorModern(isConstructorModern.call)
|
|
78
|
+
|| !isConstructorModern(Object)
|
|
79
|
+
|| !isConstructorModern(function () { called = true; })
|
|
80
|
+
|| called;
|
|
81
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
82
|
+
|
|
83
|
+
var isArray = isArray$1;
|
|
84
|
+
var isConstructor = isConstructor$1;
|
|
85
|
+
var isObject = isObject$1;
|
|
86
|
+
var wellKnownSymbol = wellKnownSymbol$1;
|
|
87
|
+
|
|
88
|
+
var SPECIES = wellKnownSymbol('species');
|
|
89
|
+
var $Array = Array;
|
|
90
|
+
|
|
91
|
+
// a part of `ArraySpeciesCreate` abstract operation
|
|
92
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
93
|
+
var arraySpeciesConstructor$1 = function (originalArray) {
|
|
94
|
+
var C;
|
|
95
|
+
if (isArray(originalArray)) {
|
|
96
|
+
C = originalArray.constructor;
|
|
97
|
+
// cross-realm fallback
|
|
98
|
+
if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
|
|
99
|
+
else if (isObject(C)) {
|
|
100
|
+
C = C[SPECIES];
|
|
101
|
+
if (C === null) C = undefined;
|
|
102
|
+
}
|
|
103
|
+
} return C === undefined ? $Array : C;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var arraySpeciesConstructor = arraySpeciesConstructor$1;
|
|
107
|
+
|
|
108
|
+
// `ArraySpeciesCreate` abstract operation
|
|
109
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
110
|
+
var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
111
|
+
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var bind = functionBindContext;
|
|
115
|
+
var uncurryThis = functionUncurryThis;
|
|
116
|
+
var IndexedObject = indexedObject;
|
|
117
|
+
var toObject = toObject$1;
|
|
118
|
+
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
119
|
+
var arraySpeciesCreate = arraySpeciesCreate$1;
|
|
120
|
+
|
|
121
|
+
var push = uncurryThis([].push);
|
|
122
|
+
|
|
123
|
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
|
124
|
+
var createMethod = function (TYPE) {
|
|
125
|
+
var IS_MAP = TYPE == 1;
|
|
126
|
+
var IS_FILTER = TYPE == 2;
|
|
127
|
+
var IS_SOME = TYPE == 3;
|
|
128
|
+
var IS_EVERY = TYPE == 4;
|
|
129
|
+
var IS_FIND_INDEX = TYPE == 6;
|
|
130
|
+
var IS_FILTER_REJECT = TYPE == 7;
|
|
131
|
+
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
|
132
|
+
return function ($this, callbackfn, that, specificCreate) {
|
|
133
|
+
var O = toObject($this);
|
|
134
|
+
var self = IndexedObject(O);
|
|
135
|
+
var boundFunction = bind(callbackfn, that);
|
|
136
|
+
var length = lengthOfArrayLike(self);
|
|
137
|
+
var index = 0;
|
|
138
|
+
var create = specificCreate || arraySpeciesCreate;
|
|
139
|
+
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
|
|
140
|
+
var value, result;
|
|
141
|
+
for (;length > index; index++) if (NO_HOLES || index in self) {
|
|
142
|
+
value = self[index];
|
|
143
|
+
result = boundFunction(value, index, O);
|
|
144
|
+
if (TYPE) {
|
|
145
|
+
if (IS_MAP) target[index] = result; // map
|
|
146
|
+
else if (result) switch (TYPE) {
|
|
147
|
+
case 3: return true; // some
|
|
148
|
+
case 5: return value; // find
|
|
149
|
+
case 6: return index; // findIndex
|
|
150
|
+
case 2: push(target, value); // filter
|
|
151
|
+
} else switch (TYPE) {
|
|
152
|
+
case 4: return false; // every
|
|
153
|
+
case 7: push(target, value); // filterReject
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
var arrayIteration = {
|
|
162
|
+
// `Array.prototype.forEach` method
|
|
163
|
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
164
|
+
forEach: createMethod(0),
|
|
165
|
+
// `Array.prototype.map` method
|
|
166
|
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
167
|
+
map: createMethod(1),
|
|
168
|
+
// `Array.prototype.filter` method
|
|
169
|
+
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
|
170
|
+
filter: createMethod(2),
|
|
171
|
+
// `Array.prototype.some` method
|
|
172
|
+
// https://tc39.es/ecma262/#sec-array.prototype.some
|
|
173
|
+
some: createMethod(3),
|
|
174
|
+
// `Array.prototype.every` method
|
|
175
|
+
// https://tc39.es/ecma262/#sec-array.prototype.every
|
|
176
|
+
every: createMethod(4),
|
|
177
|
+
// `Array.prototype.find` method
|
|
178
|
+
// https://tc39.es/ecma262/#sec-array.prototype.find
|
|
179
|
+
find: createMethod(5),
|
|
180
|
+
// `Array.prototype.findIndex` method
|
|
181
|
+
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
|
182
|
+
findIndex: createMethod(6),
|
|
183
|
+
// `Array.prototype.filterReject` method
|
|
184
|
+
// https://github.com/tc39/proposal-array-filtering
|
|
185
|
+
filterReject: createMethod(7)
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
var script$1 = defineComponent({
|
|
189
|
+
name: 'FwTabs',
|
|
190
|
+
emits: ['update:modelValue'],
|
|
191
|
+
props: {
|
|
192
|
+
/**
|
|
193
|
+
* The active tab v-model
|
|
194
|
+
*/
|
|
195
|
+
modelValue: {
|
|
196
|
+
type: Number,
|
|
197
|
+
required: true
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
setup: function setup(props, ctx) {
|
|
201
|
+
var active = computed(function () {
|
|
202
|
+
return props.modelValue;
|
|
203
|
+
});
|
|
204
|
+
var tabs = ref();
|
|
205
|
+
tabs.value = [];
|
|
206
|
+
|
|
207
|
+
var selectTab = function selectTab(tab) {
|
|
208
|
+
ctx.emit('update:modelValue', tab);
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
provide('tabsState', {
|
|
212
|
+
active: active,
|
|
213
|
+
tabs: tabs
|
|
214
|
+
});
|
|
215
|
+
return {
|
|
216
|
+
active: active,
|
|
217
|
+
tabs: tabs,
|
|
218
|
+
selectTab: selectTab
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
var _hoisted_1$1 = {
|
|
224
|
+
"class": "fw-tabs"
|
|
225
|
+
};
|
|
226
|
+
var _hoisted_2 = {
|
|
227
|
+
key: 0,
|
|
228
|
+
"class": "flex flex-wrap -mb-px border-b border-grey-light dark:text-grey-base dark:border-grey-base"
|
|
229
|
+
};
|
|
230
|
+
var _hoisted_3 = ["onClick"];
|
|
231
|
+
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
232
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [_ctx.tabs ? (openBlock(), createElementBlock("ul", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.tabs, function (tab, i) {
|
|
233
|
+
return openBlock(), createElementBlock("li", {
|
|
234
|
+
"class": "mr-2",
|
|
235
|
+
key: i
|
|
236
|
+
}, [createElementVNode("button", {
|
|
237
|
+
type: "button",
|
|
238
|
+
onClick: function onClick($event) {
|
|
239
|
+
return _ctx.selectTab(i);
|
|
240
|
+
},
|
|
241
|
+
"class": normalizeClass(["inline-block p-4 outline-primary border-b-2 border-transparent transition ease-in", _ctx.active === i ? 'font-medium border-black' : 'hover:bg-grey-lightest'])
|
|
242
|
+
}, toDisplayString(tab.props.label), 11, _hoisted_3)]);
|
|
243
|
+
}), 128))])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")]);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
script$1.render = render$1;
|
|
247
|
+
|
|
248
|
+
var es_array_findIndex = {};
|
|
249
|
+
|
|
250
|
+
'use strict';
|
|
251
|
+
var $ = _export;
|
|
252
|
+
var $findIndex = arrayIteration.findIndex;
|
|
253
|
+
var addToUnscopables = addToUnscopables$1;
|
|
254
|
+
|
|
255
|
+
var FIND_INDEX = 'findIndex';
|
|
256
|
+
var SKIPS_HOLES = true;
|
|
257
|
+
|
|
258
|
+
// Shouldn't skip holes
|
|
259
|
+
if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });
|
|
260
|
+
|
|
261
|
+
// `Array.prototype.findIndex` method
|
|
262
|
+
// https://tc39.es/ecma262/#sec-array.prototype.findindex
|
|
263
|
+
$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
|
264
|
+
findIndex: function findIndex(callbackfn /* , that = undefined */) {
|
|
265
|
+
return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
270
|
+
addToUnscopables(FIND_INDEX);
|
|
271
|
+
|
|
272
|
+
var script = defineComponent({
|
|
273
|
+
name: 'FwTab',
|
|
274
|
+
props: {
|
|
275
|
+
/**
|
|
276
|
+
* The label of the tab component used as the button panel label
|
|
277
|
+
*/
|
|
278
|
+
label: {
|
|
279
|
+
type: String,
|
|
280
|
+
required: true
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
setup: function setup(props) {
|
|
284
|
+
var instance = getCurrentInstance();
|
|
285
|
+
|
|
286
|
+
var _ref = inject('tabsState') || {
|
|
287
|
+
tabs: [],
|
|
288
|
+
active: 0
|
|
289
|
+
},
|
|
290
|
+
tabs = _ref.tabs,
|
|
291
|
+
active = _ref.active;
|
|
292
|
+
|
|
293
|
+
var index = computed(function () {
|
|
294
|
+
var _tabs$value;
|
|
295
|
+
|
|
296
|
+
return (_tabs$value = tabs.value) === null || _tabs$value === void 0 ? void 0 : _tabs$value.findIndex(function (target) {
|
|
297
|
+
return target.uid === (instance === null || instance === void 0 ? void 0 : instance.uid);
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
var isActive = computed(function () {
|
|
301
|
+
return index.value === active.value;
|
|
302
|
+
});
|
|
303
|
+
watchEffect(function () {
|
|
304
|
+
if (index.value === -1) {
|
|
305
|
+
tabs.value.push(instance);
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
return {
|
|
309
|
+
isActive: isActive,
|
|
310
|
+
index: index,
|
|
311
|
+
props: props
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
var _hoisted_1 = {
|
|
317
|
+
key: 0,
|
|
318
|
+
"class": "fw-tab w-full"
|
|
319
|
+
};
|
|
320
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
321
|
+
return _ctx.isActive ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
script.render = render;
|
|
325
|
+
|
|
326
|
+
export { arrayIteration as a, script as b, script$1 as s };
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { f as fails$1, d as documentCreateElement$1, g as global$4, a as descriptors, b as functionUncurryThis, c as functionBindNative, i as isCallable$1, e as engineUserAgent } from './function-name-
|
|
2
|
-
import { _ as _export,
|
|
3
|
-
import { a as arrayIteration,
|
|
4
|
-
export { b as FwTab, s as FwTabs } from './index-
|
|
1
|
+
import { f as fails$1, d as documentCreateElement$1, g as global$4, a as descriptors, b as functionUncurryThis, c as functionBindNative, i as isCallable$1, e as engineUserAgent } from './function-name-3bda6320.js';
|
|
2
|
+
import { _ as _export, o as objectKeys$1 } from './add-to-unscopables-82352072.js';
|
|
3
|
+
import { a as arrayIteration, s as script$5, b as script$6 } from './index-dd50b12a.js';
|
|
4
|
+
export { b as FwTab, s as FwTabs } from './index-dd50b12a.js';
|
|
5
|
+
import { t as toStringTagSupport, c as classof$1 } from './es.number.constructor-f646730f.js';
|
|
6
|
+
import { d as defineBuiltIn$1, c as createNonEnumerableProperty$1, t as toIndexedObject$1, o as objectPropertyIsEnumerable } from './is-forced-3323c994.js';
|
|
5
7
|
import './fw-form.js';
|
|
6
8
|
import { FwInput as script } from './fw-input.js';
|
|
7
9
|
export { FwInput } from './fw-input.js';
|
|
@@ -12,15 +14,19 @@ export { FwCard } from './fw-card.js';
|
|
|
12
14
|
import './fw-button.js';
|
|
13
15
|
import { FwNavigationMenu as script$4 } from './fw-navigation-menu.js';
|
|
14
16
|
export { FwNavigationMenu } from './fw-navigation-menu.js';
|
|
15
|
-
import { s as script$7, u as uniqueId } from './index-
|
|
16
|
-
export { s as FwModal } from './index-
|
|
17
|
+
import { s as script$7, u as uniqueId } from './index-59d76908.js';
|
|
18
|
+
export { s as FwModal } from './index-59d76908.js';
|
|
19
|
+
import { FwProgressBar as script$8 } from './fw-progress-bar.js';
|
|
20
|
+
export { FwProgressBar } from './fw-progress-bar.js';
|
|
21
|
+
import { FwEmailPulse as __default__, FwSuccessPulse as __default__$1 } from './fw-animations.js';
|
|
22
|
+
export { FwEmailPulse, FwSuccessPulse } from './fw-animations.js';
|
|
17
23
|
import { F as Form } from './vee-validate.esm-b64acab1.js';
|
|
18
24
|
export { F as FwForm } from './vee-validate.esm-b64acab1.js';
|
|
19
|
-
import { s as script$3 } from './fw-button-
|
|
20
|
-
export { s as FwButton } from './fw-button-
|
|
25
|
+
import { s as script$3 } from './fw-button-22301a2f.js';
|
|
26
|
+
export { s as FwButton } from './fw-button-22301a2f.js';
|
|
21
27
|
import { createApp } from 'vue';
|
|
22
|
-
import './es.array.includes-
|
|
23
|
-
import './es.function.name-
|
|
28
|
+
import './es.array.includes-33e186c4.js';
|
|
29
|
+
import './es.function.name-3a9c8706.js';
|
|
24
30
|
import './style-inject.es-1f59c1d0.js';
|
|
25
31
|
|
|
26
32
|
function _arrayWithHoles(arr) {
|
|
@@ -274,7 +280,10 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
274
280
|
FwNavigationMenu: script$4,
|
|
275
281
|
FwTabs: script$5,
|
|
276
282
|
FwTab: script$6,
|
|
277
|
-
FwModal: script$7
|
|
283
|
+
FwModal: script$7,
|
|
284
|
+
FwProgressBar: script$8,
|
|
285
|
+
FwEmailPulse: __default__,
|
|
286
|
+
FwSuccessPulse: __default__$1
|
|
278
287
|
});
|
|
279
288
|
|
|
280
289
|
function _defineProperty(obj, key, value) {
|