@frollo/frollo-web-ui 1.2.0 → 1.2.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 (41) hide show
  1. package/cjs/index.js +696 -437
  2. package/esm/{add-to-unscopables-89bfb214.js → add-to-unscopables-44076600.js} +3 -3
  3. package/esm/{index-671cf43d.js → array-iteration-10670eca.js} +4 -146
  4. package/esm/{to-string-cf010dcc.js → classof-b2d09c70.js} +4 -13
  5. package/esm/{es.array.includes-46369dd6.js → es.array.includes-b402df81.js} +4 -4
  6. package/esm/{es.function.name-3a0ddf71.js → es.function.name-383fcdbc.js} +1 -1
  7. package/esm/{es.number.constructor-6891f9eb.js → es.number.constructor-6def8fd9.js} +3 -3
  8. package/esm/{function-name-fe849d51.js → function-name-0d296891.js} +1 -1
  9. package/esm/fw-animations.js +5 -4
  10. package/esm/{fw-button-969296c5.js → fw-button-fb8e3fe2.js} +1 -1
  11. package/esm/fw-button.js +6 -6
  12. package/esm/fw-card.js +1 -0
  13. package/esm/fw-checkbox.js +3 -3
  14. package/esm/fw-dropdown.js +284 -0
  15. package/esm/fw-form.js +1 -1
  16. package/esm/fw-input.js +7 -7
  17. package/esm/fw-modal.js +7 -7
  18. package/esm/fw-navigation-menu.js +6 -6
  19. package/esm/fw-progress-bar.js +5 -4
  20. package/esm/fw-table.js +7 -5
  21. package/esm/fw-tabs.js +149 -8
  22. package/esm/fw-tag.js +5 -5
  23. package/esm/index-16e7ac1e.js +454 -0
  24. package/esm/{index-daa646e2.js → index-26d82b11.js} +2 -2
  25. package/esm/{index-4362991c.js → index-ca8d7e19.js} +145 -573
  26. package/esm/index.js +40 -56
  27. package/esm/{is-forced-8a459969.js → is-forced-2369382d.js} +2 -2
  28. package/esm/{object-keys-4b8adc6c.js → object-keys-f9d76c12.js} +2 -2
  29. package/esm/to-string-2588bbbe.js +13 -0
  30. package/esm/{vee-validate.esm-b64acab1.js → vee-validate.esm-a17a23c3.js} +1 -1
  31. package/frollo-web-ui.esm.js +921 -649
  32. package/icons/icons.stories.ts +3 -3
  33. package/index.d.ts +131 -4
  34. package/package.json +1 -1
  35. package/types/components/fw-dropdown/fw-dropdown.vue.d.ts +113 -0
  36. package/types/components/fw-dropdown/index.d.ts +2 -0
  37. package/types/components/fw-dropdown/index.types.d.ts +12 -0
  38. package/types/components/fw-table/fw-table.vue.d.ts +1 -0
  39. package/types/components/fw-table/index.types.d.ts +2 -1
  40. package/types/components/index.d.ts +1 -0
  41. package/types/components/index.types.d.ts +1 -0
@@ -1,6 +1,6 @@
1
- import { a as descriptors, E as v8PrototypeDefineBug, o as objectDefineProperty, p as anObject$2, j as getBuiltIn$1, d as documentCreateElement$1, w as wellKnownSymbol$1 } from './function-name-fe849d51.js';
2
- import { t as toIndexedObject$1, m as enumBugKeys$1, p as hiddenKeys$1, s as sharedKey$1 } from './is-forced-8a459969.js';
3
- import { o as objectKeys$1 } from './object-keys-4b8adc6c.js';
1
+ import { a as descriptors, E as v8PrototypeDefineBug, o as objectDefineProperty, n as anObject$2, m as getBuiltIn$1, d as documentCreateElement$1, w as wellKnownSymbol$1 } from './function-name-0d296891.js';
2
+ import { t as toIndexedObject$1, h as enumBugKeys$1, p as hiddenKeys$1, s as sharedKey$1 } from './is-forced-2369382d.js';
3
+ import { o as objectKeys$1 } from './object-keys-f9d76c12.js';
4
4
 
5
5
  var objectDefineProperties = {};
6
6
 
@@ -1,10 +1,6 @@
1
- import './es.number.constructor-6891f9eb.js';
2
- import { defineComponent, computed, ref, provide, openBlock, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, renderSlot, getCurrentInstance, inject, watchEffect } from 'vue';
3
- import { f as functionUncurryThis, c as aCallable$1, b as functionBindNative, h 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-fe849d51.js';
4
- import { _ as _export } from './object-keys-4b8adc6c.js';
5
- import { a as classofRaw, i as inspectSource$1, b as indexedObject, l as lengthOfArrayLike$1 } from './is-forced-8a459969.js';
6
- import { c as classof$2 } from './to-string-cf010dcc.js';
7
- import { a as addToUnscopables$1 } from './add-to-unscopables-89bfb214.js';
1
+ import { f as functionUncurryThis, k as aCallable$1, b as functionBindNative, c as fails$1, i as isCallable$1, m as getBuiltIn$1, z as isObject$1, w as wellKnownSymbol$1, t as toObject$1 } from './function-name-0d296891.js';
2
+ import { j as classofRaw, m as inspectSource$1, n as indexedObject, l as lengthOfArrayLike$1 } from './is-forced-2369382d.js';
3
+ import { c as classof$2 } from './classof-b2d09c70.js';
8
4
 
9
5
  var uncurryThis$2 = functionUncurryThis;
10
6
  var aCallable = aCallable$1;
@@ -187,142 +183,4 @@ var arrayIteration = {
187
183
  filterReject: createMethod(7)
188
184
  };
189
185
 
190
- var script$1 = defineComponent({
191
- name: 'FwTabs',
192
- emits: ['update:modelValue'],
193
- props: {
194
- /**
195
- * The active tab v-model
196
- */
197
- modelValue: {
198
- type: Number,
199
- required: true
200
- }
201
- },
202
- setup: function setup(props, ctx) {
203
- var active = computed(function () {
204
- return props.modelValue;
205
- });
206
- var tabs = ref();
207
- tabs.value = [];
208
-
209
- var selectTab = function selectTab(tab) {
210
- ctx.emit('update:modelValue', tab);
211
- };
212
-
213
- provide('tabsState', {
214
- active: active,
215
- tabs: tabs
216
- });
217
- return {
218
- active: active,
219
- tabs: tabs,
220
- selectTab: selectTab
221
- };
222
- }
223
- });
224
-
225
- var _hoisted_1$1 = {
226
- "class": "fw-tabs"
227
- };
228
- var _hoisted_2 = {
229
- key: 0,
230
- "class": "flex flex-wrap -mb-px border-b border-grey-light dark:text-grey-base dark:border-grey-base"
231
- };
232
- var _hoisted_3 = ["onClick"];
233
- function render$1(_ctx, _cache, $props, $setup, $data, $options) {
234
- 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) {
235
- return openBlock(), createElementBlock("li", {
236
- "class": "mr-2",
237
- key: i
238
- }, [createElementVNode("button", {
239
- type: "button",
240
- onClick: function onClick($event) {
241
- return _ctx.selectTab(i);
242
- },
243
- "class": normalizeClass(["inline-block p-4 outline-primary border-b-2 border-transparent transition ease-in", _ctx.active === i ? 'font-semibold border-body' : 'hover:bg-grey-lightest'])
244
- }, toDisplayString(tab.props.label), 11, _hoisted_3)]);
245
- }), 128))])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")]);
246
- }
247
-
248
- script$1.render = render$1;
249
-
250
- var es_array_findIndex = {};
251
-
252
- 'use strict';
253
- var $ = _export;
254
- var $findIndex = arrayIteration.findIndex;
255
- var addToUnscopables = addToUnscopables$1;
256
-
257
- var FIND_INDEX = 'findIndex';
258
- var SKIPS_HOLES = true;
259
-
260
- // Shouldn't skip holes
261
- if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });
262
-
263
- // `Array.prototype.findIndex` method
264
- // https://tc39.es/ecma262/#sec-array.prototype.findindex
265
- $({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
266
- findIndex: function findIndex(callbackfn /* , that = undefined */) {
267
- return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
268
- }
269
- });
270
-
271
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
272
- addToUnscopables(FIND_INDEX);
273
-
274
- var script = defineComponent({
275
- name: 'FwTab',
276
- props: {
277
- /**
278
- * The label of the tab component used as the button panel label
279
- */
280
- label: {
281
- type: String,
282
- required: true
283
- }
284
- },
285
- setup: function setup(props) {
286
- var instance = getCurrentInstance();
287
-
288
- var _ref = inject('tabsState') || {
289
- tabs: [],
290
- active: 0
291
- },
292
- tabs = _ref.tabs,
293
- active = _ref.active;
294
-
295
- var index = computed(function () {
296
- var _tabs$value;
297
-
298
- return (_tabs$value = tabs.value) === null || _tabs$value === void 0 ? void 0 : _tabs$value.findIndex(function (target) {
299
- return target.uid === (instance === null || instance === void 0 ? void 0 : instance.uid);
300
- });
301
- });
302
- var isActive = computed(function () {
303
- return index.value === active.value;
304
- });
305
- watchEffect(function () {
306
- if (index.value === -1) {
307
- tabs.value.push(instance);
308
- }
309
- });
310
- return {
311
- isActive: isActive,
312
- index: index,
313
- props: props
314
- };
315
- }
316
- });
317
-
318
- var _hoisted_1 = {
319
- key: 0,
320
- "class": "fw-tab w-full"
321
- };
322
- function render(_ctx, _cache, $props, $setup, $data, $options) {
323
- return _ctx.isActive ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true);
324
- }
325
-
326
- script.render = render;
327
-
328
- export { arrayIteration as a, script as b, script$1 as s };
186
+ export { arrayIteration as a };
@@ -1,5 +1,5 @@
1
- import { w as wellKnownSymbol$2, i as isCallable$1 } from './function-name-fe849d51.js';
2
- import { a as classofRaw$1 } from './is-forced-8a459969.js';
1
+ import { w as wellKnownSymbol$2, i as isCallable$1 } from './function-name-0d296891.js';
2
+ import { j as classofRaw$1 } from './is-forced-2369382d.js';
3
3
 
4
4
  var wellKnownSymbol$1 = wellKnownSymbol$2;
5
5
 
@@ -29,7 +29,7 @@ var tryGet = function (it, key) {
29
29
  };
30
30
 
31
31
  // getting tag from ES6+ `Object.prototype.toString`
32
- var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
32
+ var classof = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
33
33
  var O, tag, result;
34
34
  return it === undefined ? 'Undefined' : it === null ? 'Null'
35
35
  // @@toStringTag case
@@ -40,13 +40,4 @@ var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
40
40
  : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
41
41
  };
42
42
 
43
- var classof = classof$1;
44
-
45
- var $String = String;
46
-
47
- var toString = function (argument) {
48
- if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
49
- return $String(argument);
50
- };
51
-
52
- export { toString as a, classof$1 as c, toStringTagSupport as t };
43
+ export { classof as c, toStringTagSupport as t };
@@ -1,7 +1,7 @@
1
- import { h as fails$1 } from './function-name-fe849d51.js';
2
- import { _ as _export } from './object-keys-4b8adc6c.js';
3
- import { n as arrayIncludes } from './is-forced-8a459969.js';
4
- import { a as addToUnscopables$1 } from './add-to-unscopables-89bfb214.js';
1
+ import { c as fails$1 } from './function-name-0d296891.js';
2
+ import { _ as _export } from './object-keys-f9d76c12.js';
3
+ import { k as arrayIncludes } from './is-forced-2369382d.js';
4
+ import { a as addToUnscopables$1 } from './add-to-unscopables-44076600.js';
5
5
 
6
6
  var es_array_includes = {};
7
7
 
@@ -1,4 +1,4 @@
1
- import { a as descriptors, A as functionName, f as functionUncurryThis, o as objectDefineProperty } from './function-name-fe849d51.js';
1
+ import { a as descriptors, A as functionName, f as functionUncurryThis, o as objectDefineProperty } from './function-name-0d296891.js';
2
2
 
3
3
  var es_function_name = {};
4
4
 
@@ -1,6 +1,6 @@
1
- import { i as isCallable$2, f as functionUncurryThis, p as anObject$1, k as isObject$1, s as requireObjectCoercible$1, a as descriptors, g as global$1, q as hasOwnProperty_1, B as objectIsPrototypeOf, C as isSymbol$1, D as toPrimitive$1, h as fails$1, o as objectDefineProperty } from './function-name-fe849d51.js';
2
- import { j as isForced_1, d as defineBuiltIn$1, g as objectGetOwnPropertyNames, h as objectGetOwnPropertyDescriptor } from './is-forced-8a459969.js';
3
- import { a as toString$1 } from './to-string-cf010dcc.js';
1
+ import { i as isCallable$2, f as functionUncurryThis, n as anObject$1, z as isObject$1, r as requireObjectCoercible$1, a as descriptors, g as global$1, p as hasOwnProperty_1, B as objectIsPrototypeOf, C as isSymbol$1, D as toPrimitive$1, c as fails$1, o as objectDefineProperty } from './function-name-0d296891.js';
2
+ import { i as isForced_1, d as defineBuiltIn$1, e as objectGetOwnPropertyNames, f as objectGetOwnPropertyDescriptor } from './is-forced-2369382d.js';
3
+ import { t as toString$1 } from './to-string-2588bbbe.js';
4
4
 
5
5
  var es_number_constructor = {};
6
6
 
@@ -489,4 +489,4 @@ var functionName = {
489
489
  CONFIGURABLE: CONFIGURABLE
490
490
  };
491
491
 
492
- export { functionName as A, objectIsPrototypeOf as B, isSymbol$2 as C, toPrimitive$1 as D, v8PrototypeDefineBug as E, descriptors as a, functionBindNative as b, aCallable$1 as c, documentCreateElement as d, engineUserAgent as e, functionUncurryThis as f, global$7 as g, fails$5 as h, isCallable$5 as i, getBuiltIn$2 as j, isObject$4 as k, tryToString$1 as l, toPropertyKey$1 as m, engineV8Version as n, objectDefineProperty as o, anObject$1 as p, hasOwnProperty_1 as q, defineGlobalProperty$1 as r, requireObjectCoercible$1 as s, toObject$1 as t, functionCall as u, ie8DomDefine as v, wellKnownSymbol$1 as w, sharedStore as x, shared$2 as y, uid$1 as z };
492
+ export { functionName as A, objectIsPrototypeOf as B, isSymbol$2 as C, toPrimitive$1 as D, v8PrototypeDefineBug as E, descriptors as a, functionBindNative as b, fails$5 as c, documentCreateElement as d, engineUserAgent as e, functionUncurryThis as f, global$7 as g, tryToString$1 as h, isCallable$5 as i, toPropertyKey$1 as j, aCallable$1 as k, engineV8Version as l, getBuiltIn$2 as m, anObject$1 as n, objectDefineProperty as o, hasOwnProperty_1 as p, defineGlobalProperty$1 as q, requireObjectCoercible$1 as r, functionCall as s, toObject$1 as t, ie8DomDefine as u, sharedStore as v, wellKnownSymbol$1 as w, shared$2 as x, uid$1 as y, isObject$4 as z };
@@ -1,9 +1,10 @@
1
- import './es.number.constructor-6891f9eb.js';
1
+ import './es.number.constructor-6def8fd9.js';
2
2
  import { defineComponent, useCssVars, pushScopeId, popScopeId, createElementVNode, openBlock, createElementBlock, createStaticVNode } from 'vue';
3
3
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
4
- import './function-name-fe849d51.js';
5
- import './is-forced-8a459969.js';
6
- import './to-string-cf010dcc.js';
4
+ import './function-name-0d296891.js';
5
+ import './is-forced-2369382d.js';
6
+ import './to-string-2588bbbe.js';
7
+ import './classof-b2d09c70.js';
7
8
 
8
9
  var __default__$1 = defineComponent({
9
10
  name: 'FwEmailPulse',
@@ -1,4 +1,4 @@
1
- import './es.array.includes-46369dd6.js';
1
+ import './es.array.includes-b402df81.js';
2
2
  import { defineComponent, ref, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, createElementBlock, renderSlot, createCommentVNode } from 'vue';
3
3
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
4
4
 
package/esm/fw-button.js CHANGED
@@ -1,8 +1,8 @@
1
- export { s as FwButton } from './fw-button-969296c5.js';
2
- import './es.array.includes-46369dd6.js';
3
- import './function-name-fe849d51.js';
4
- import './object-keys-4b8adc6c.js';
5
- import './is-forced-8a459969.js';
6
- import './add-to-unscopables-89bfb214.js';
1
+ export { s as FwButton } from './fw-button-fb8e3fe2.js';
2
+ import './es.array.includes-b402df81.js';
3
+ import './function-name-0d296891.js';
4
+ import './object-keys-f9d76c12.js';
5
+ import './is-forced-2369382d.js';
6
+ import './add-to-unscopables-44076600.js';
7
7
  import 'vue';
8
8
  import './style-inject.es-1f59c1d0.js';
package/esm/fw-card.js CHANGED
@@ -79,6 +79,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
79
79
  "default": withCtx(function () {
80
80
  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("div", {
81
81
  key: 1,
82
+ "class": "inline",
82
83
  innerHTML: _ctx.title
83
84
  }, null, 8, _hoisted_3)) : createCommentVNode("", true)])) : createCommentVNode("", true), _ctx.$slots["default"] ? (openBlock(), createElementBlock("div", {
84
85
  key: 1,
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, mergeProps, createCommentVNode, Transition, toDisplayString } from 'vue';
2
- import { a as Field } from './vee-validate.esm-b64acab1.js';
3
- import './es.function.name-3a0ddf71.js';
2
+ import { a as Field } from './vee-validate.esm-a17a23c3.js';
3
+ import './es.function.name-383fcdbc.js';
4
4
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
5
- import './function-name-fe849d51.js';
5
+ import './function-name-0d296891.js';
6
6
 
7
7
  var script = defineComponent({
8
8
  name: 'FwCheckbox',
@@ -0,0 +1,284 @@
1
+ import './function-name-0d296891.js';
2
+ import { _ as _export } from './object-keys-f9d76c12.js';
3
+ import { a as arrayIteration } from './array-iteration-10670eca.js';
4
+ import { a as addToUnscopables$1 } from './add-to-unscopables-44076600.js';
5
+ import { t as toStringTagSupport, c as classof$1 } from './classof-b2d09c70.js';
6
+ import { d as defineBuiltIn$1 } from './is-forced-2369382d.js';
7
+ import { defineComponent, toRef, ref, computed, onMounted, onBeforeUnmount, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, normalizeClass, createVNode, Transition, withCtx, Fragment, renderList } from 'vue';
8
+ import { u as useField } from './vee-validate.esm-a17a23c3.js';
9
+ import { r as render$1 } from './index-ca8d7e19.js';
10
+ import './es.function.name-383fcdbc.js';
11
+ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
12
+ import './check-94a5917a.js';
13
+
14
+ var es_object_toString = {};
15
+
16
+ 'use strict';
17
+ var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
18
+ var classof = classof$1;
19
+
20
+ // `Object.prototype.toString` method implementation
21
+ // https://tc39.es/ecma262/#sec-object.prototype.tostring
22
+ var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
23
+ return '[object ' + classof(this) + ']';
24
+ };
25
+
26
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
27
+ var defineBuiltIn = defineBuiltIn$1;
28
+ var toString = objectToString;
29
+
30
+ // `Object.prototype.toString` method
31
+ // https://tc39.es/ecma262/#sec-object.prototype.tostring
32
+ if (!TO_STRING_TAG_SUPPORT) {
33
+ defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });
34
+ }
35
+
36
+ var es_array_find = {};
37
+
38
+ 'use strict';
39
+ var $ = _export;
40
+ var $find = arrayIteration.find;
41
+ var addToUnscopables = addToUnscopables$1;
42
+
43
+ var FIND = 'find';
44
+ var SKIPS_HOLES = true;
45
+
46
+ // Shouldn't skip holes
47
+ if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
48
+
49
+ // `Array.prototype.find` method
50
+ // https://tc39.es/ecma262/#sec-array.prototype.find
51
+ $({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
52
+ find: function find(callbackfn /* , that = undefined */) {
53
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
54
+ }
55
+ });
56
+
57
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
58
+ addToUnscopables(FIND);
59
+
60
+ var script = defineComponent({
61
+ name: 'FwDropdown',
62
+ components: {
63
+ ChevronDownSvg: render$1
64
+ },
65
+ props: {
66
+ /**
67
+ * The select v-model
68
+ */
69
+ modelValue: {
70
+ type: String
71
+ },
72
+
73
+ /**
74
+ * The name of the input field. Must be unique per form.
75
+ */
76
+ name: {
77
+ type: String,
78
+ required: true
79
+ },
80
+
81
+ /**
82
+ * Label for the input. Also renders to an aria-label attribute
83
+ */
84
+ label: {
85
+ type: String
86
+ },
87
+
88
+ /**
89
+ * Validation rules. Accepts an object, string schema or validation function.
90
+ */
91
+ rules: {
92
+ type: [Object, String, Function]
93
+ },
94
+
95
+ /**
96
+ * An array of options for the dropdown menu.
97
+ */
98
+ options: {
99
+ type: Array,
100
+ required: true
101
+ },
102
+
103
+ /**
104
+ * The hint text shown below the input
105
+ */
106
+ hint: {
107
+ type: String
108
+ },
109
+
110
+ /**
111
+ * Custom placeholder text
112
+ */
113
+ placeholder: {
114
+ type: String,
115
+ required: false,
116
+ "default": 'Select'
117
+ }
118
+ },
119
+ setup: function setup(props, ctx) {
120
+ var menuButtonClass = "inline-flex w-full justify-between items-center rounded-md border-2 bg-white px-4 py-3\n shadow-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2";
121
+ 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";
122
+ 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";
123
+ var nameRef = toRef(props, 'name');
124
+
125
+ var _useField = useField(nameRef, props.rules),
126
+ errors = _useField.errors,
127
+ errorMessage = _useField.errorMessage,
128
+ meta = _useField.meta,
129
+ fieldVal = _useField.value;
130
+
131
+ var selectedOption = ref();
132
+ var selectValue = computed({
133
+ get: function get() {
134
+ return props.modelValue;
135
+ },
136
+ set: function set(state) {
137
+ fieldVal.value = state;
138
+ ctx.emit('update:modelValue', state);
139
+ }
140
+ });
141
+ var isOpen = ref(false);
142
+
143
+ var selectOption = function selectOption(option) {
144
+ selectValue.value = option.value;
145
+ selectedOption.value = option;
146
+ isOpen.value = false;
147
+ };
148
+
149
+ var onEscape = function onEscape(e) {
150
+ if (e.key === 'Esc' || e.key === 'Escape') {
151
+ isOpen.value = false;
152
+ }
153
+ };
154
+
155
+ var menuItemActiveClass = function menuItemActiveClass(option) {
156
+ var _selectedOption$value;
157
+
158
+ if (((_selectedOption$value = selectedOption.value) === null || _selectedOption$value === void 0 ? void 0 : _selectedOption$value.value) === option.value) {
159
+ return 'bg-white';
160
+ }
161
+
162
+ return 'bg-none';
163
+ };
164
+
165
+ onMounted(function () {
166
+ if (selectValue.value) {
167
+ selectedOption.value = props.options.find(function (option) {
168
+ return option.value === selectValue.value;
169
+ });
170
+ if (selectedOption.value) selectOption(selectedOption.value);
171
+ }
172
+
173
+ document.addEventListener('keydown', onEscape);
174
+ });
175
+ onBeforeUnmount(function () {
176
+ document.removeEventListener('keydown', onEscape);
177
+ });
178
+ return {
179
+ menuButtonClass: menuButtonClass,
180
+ menuClass: menuClass,
181
+ menuItemClass: menuItemClass,
182
+ menuItemActiveClass: menuItemActiveClass,
183
+ errors: errors,
184
+ errorMessage: errorMessage,
185
+ meta: meta,
186
+ fieldVal: fieldVal,
187
+ isOpen: isOpen,
188
+ selectValue: selectValue,
189
+ selectOption: selectOption,
190
+ selectedOption: selectedOption
191
+ };
192
+ }
193
+ });
194
+
195
+ var _withScopeId = function _withScopeId(n) {
196
+ return pushScopeId("data-v-1467a810"), n = n(), popScopeId(), n;
197
+ };
198
+
199
+ var _hoisted_1 = {
200
+ "class": "fw-dropdown relative"
201
+ };
202
+ var _hoisted_2 = {
203
+ key: 0,
204
+ "class": "block mb-2 font-medium text-left"
205
+ };
206
+ var _hoisted_3 = ["id", "aria-expanded"];
207
+ var _hoisted_4 = {
208
+ key: 0
209
+ };
210
+ var _hoisted_5 = {
211
+ key: 1,
212
+ "class": "text-grey-base"
213
+ };
214
+ var _hoisted_6 = ["aria-labelledby"];
215
+ var _hoisted_7 = ["onClick"];
216
+ var _hoisted_8 = {
217
+ "class": "italic text-right text-sm font-medium min-h-[21px]"
218
+ };
219
+ var _hoisted_9 = {
220
+ key: 0,
221
+ "class": "text-error"
222
+ };
223
+ var _hoisted_10 = {
224
+ key: 1
225
+ };
226
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
227
+ var _ctx$selectedOption, _ctx$selectedOption2;
228
+
229
+ var _component_ChevronDownSvg = resolveComponent("ChevronDownSvg");
230
+
231
+ return openBlock(), createElementBlock("div", _hoisted_1, [_ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true), createElementVNode("button", {
232
+ type: "button",
233
+ "class": normalizeClass([_ctx.menuButtonClass, _ctx.isOpen ? 'border-primary' : 'border-grey-40 hover:border-grey-60']),
234
+ onClick: _cache[0] || (_cache[0] = function ($event) {
235
+ return _ctx.isOpen = !_ctx.isOpen;
236
+ }),
237
+ id: "".concat(_ctx.name, "-fw-dropdown--button"),
238
+ "aria-expanded": _ctx.isOpen,
239
+ "aria-haspopup": "true"
240
+ }, [(_ctx$selectedOption = _ctx.selectedOption) !== null && _ctx$selectedOption !== void 0 && _ctx$selectedOption.label ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString((_ctx$selectedOption2 = _ctx.selectedOption) === null || _ctx$selectedOption2 === void 0 ? void 0 : _ctx$selectedOption2.label), 1)) : (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(_ctx.placeholder), 1)), createVNode(_component_ChevronDownSvg, {
241
+ "class": normalizeClass(["w-6 text-primary transition-transform duration-300", _ctx.isOpen ? 'rotate-180' : ''])
242
+ }, null, 8, ["class"])], 10, _hoisted_3), createVNode(Transition, {
243
+ name: "slideUpDown"
244
+ }, {
245
+ "default": withCtx(function () {
246
+ return [_ctx.isOpen ? (openBlock(), createElementBlock("ul", {
247
+ key: 0,
248
+ "class": normalizeClass(_ctx.menuClass),
249
+ role: "menu",
250
+ "aria-orientation": "vertical",
251
+ "aria-labelledby": "".concat(_ctx.name, "-fw-dropdown--button"),
252
+ tabindex: "-1"
253
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, function (option) {
254
+ return openBlock(), createElementBlock("li", {
255
+ key: option.value,
256
+ "class": normalizeClass([_ctx.menuItemClass, _ctx.menuItemActiveClass(option)]),
257
+ role: "menuitem",
258
+ tabindex: "0",
259
+ onClick: function onClick($event) {
260
+ return _ctx.selectOption(option);
261
+ }
262
+ }, toDisplayString(option.label), 11, _hoisted_7);
263
+ }), 128))], 10, _hoisted_6)) : createCommentVNode("", true)];
264
+ }),
265
+ _: 1
266
+ }), createElementVNode("div", _hoisted_8, [createVNode(Transition, {
267
+ name: "fwFadeIn",
268
+ mode: "out-in"
269
+ }, {
270
+ "default": withCtx(function () {
271
+ return [(_ctx.errorMessage || _ctx.errors[0]) && _ctx.meta.touched ? (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString(_ctx.errorMessage || _ctx.errors[0]), 1)) : _ctx.hint ? (openBlock(), createElementBlock("span", _hoisted_10, toDisplayString(_ctx.hint), 1)) : createCommentVNode("", true)];
272
+ }),
273
+ _: 1
274
+ })])]);
275
+ }
276
+
277
+ 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)}}";
278
+ 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)}}";
279
+ styleInject(css_248z);
280
+
281
+ script.render = render;
282
+ script.__scopeId = "data-v-1467a810";
283
+
284
+ export { script as FwDropdown };
package/esm/fw-form.js CHANGED
@@ -1,2 +1,2 @@
1
- export { F as FwForm } from './vee-validate.esm-b64acab1.js';
1
+ export { F as FwForm } from './vee-validate.esm-a17a23c3.js';
2
2
  import 'vue';
package/esm/fw-input.js CHANGED
@@ -1,12 +1,12 @@
1
- import './es.array.includes-46369dd6.js';
1
+ import './es.array.includes-b402df81.js';
2
2
  import { defineComponent, ref, computed, createElementVNode, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, toDisplayString, createCommentVNode, renderSlot, mergeProps, Transition, normalizeClass } from 'vue';
3
- import { a as Field } from './vee-validate.esm-b64acab1.js';
4
- import './es.function.name-3a0ddf71.js';
3
+ import { a as Field } from './vee-validate.esm-a17a23c3.js';
4
+ import './es.function.name-383fcdbc.js';
5
5
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
6
- import './function-name-fe849d51.js';
7
- import './object-keys-4b8adc6c.js';
8
- import './is-forced-8a459969.js';
9
- import './add-to-unscopables-89bfb214.js';
6
+ import './function-name-0d296891.js';
7
+ import './object-keys-f9d76c12.js';
8
+ import './is-forced-2369382d.js';
9
+ import './add-to-unscopables-44076600.js';
10
10
 
11
11
  var script = defineComponent({
12
12
  name: 'FwInput',
package/esm/fw-modal.js CHANGED
@@ -1,9 +1,9 @@
1
- export { s as FwModal } from './index-daa646e2.js';
2
- import './es.array.includes-46369dd6.js';
3
- import './function-name-fe849d51.js';
4
- import './object-keys-4b8adc6c.js';
5
- import './is-forced-8a459969.js';
6
- import './add-to-unscopables-89bfb214.js';
1
+ export { s as FwModal } from './index-26d82b11.js';
2
+ import './es.array.includes-b402df81.js';
3
+ import './function-name-0d296891.js';
4
+ import './object-keys-f9d76c12.js';
5
+ import './is-forced-2369382d.js';
6
+ import './add-to-unscopables-44076600.js';
7
7
  import 'vue';
8
- import './fw-button-969296c5.js';
8
+ import './fw-button-fb8e3fe2.js';
9
9
  import './style-inject.es-1f59c1d0.js';
@@ -1,11 +1,11 @@
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-969296c5.js';
2
+ import { s as script$1 } from './fw-button-fb8e3fe2.js';
3
3
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
4
- import './es.array.includes-46369dd6.js';
5
- import './function-name-fe849d51.js';
6
- import './object-keys-4b8adc6c.js';
7
- import './is-forced-8a459969.js';
8
- import './add-to-unscopables-89bfb214.js';
4
+ import './es.array.includes-b402df81.js';
5
+ import './function-name-0d296891.js';
6
+ import './object-keys-f9d76c12.js';
7
+ import './is-forced-2369382d.js';
8
+ import './add-to-unscopables-44076600.js';
9
9
 
10
10
  var script = defineComponent({
11
11
  name: 'FwNavigationMenu',