@frollo/frollo-web-ui 2.0.0 → 3.0.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 (84) hide show
  1. package/cjs/index.js +17802 -1708
  2. package/esm/add-to-unscopables-2400f45b.js +25 -0
  3. package/esm/array-iteration-107f927f.js +92 -0
  4. package/esm/array-method-has-species-support-3d413468.js +23 -0
  5. package/esm/array-method-is-strict-055b1830.js +14 -0
  6. package/esm/array-species-create-a5f5503b.js +97 -0
  7. package/esm/{classof-088c9833.js → classof-39c30bd5.js} +1 -2
  8. package/esm/create-property-534611fd.js +14 -0
  9. package/esm/delete-property-or-throw-8032646c.js +31 -0
  10. package/esm/does-not-exceed-safe-integer-31d08811.js +11 -0
  11. package/esm/es.array.concat-987938be.js +69 -0
  12. package/esm/{es.array.find-54b8f84b.js → es.array.find-dfa1f42f.js} +5 -6
  13. package/esm/{es.array.includes-9a6e4066.js → es.array.includes-91be7771.js} +3 -4
  14. package/esm/{es.function.name-2fa3a718.js → es.function.name-557cb1f9.js} +1 -1
  15. package/esm/{es.number.constructor-b7faae1f.js → es.number.constructor-1249bd78.js} +2 -3
  16. package/esm/es.string.iterator-284b31d4.js +470 -0
  17. package/esm/{object-keys-3c73c404.js → export-a37ba078.js} +2 -13
  18. package/esm/function-apply-ce251590.js +14 -0
  19. package/esm/fw-accordion.js +2 -8
  20. package/esm/fw-animations.js +6 -20
  21. package/esm/fw-bar-chart.js +19 -0
  22. package/esm/{fw-button-765b9d52.js → fw-button-1486e2d9.js} +6 -24
  23. package/esm/fw-button.js +9 -8
  24. package/esm/fw-card-1b6a67fe.js +90 -0
  25. package/esm/fw-card.js +2 -95
  26. package/esm/fw-checkbox.js +27 -17
  27. package/esm/fw-dropdown.js +17 -33
  28. package/esm/fw-image-4727ac61.js +289 -0
  29. package/esm/fw-image.js +22 -847
  30. package/esm/fw-input.js +24 -25
  31. package/esm/fw-loading-bar-f5ca605c.js +22 -0
  32. package/esm/{fw-loading-spinner-01b9a040.js → fw-loading-spinner-df1627c0.js} +1 -2
  33. package/esm/fw-loading.js +6 -9
  34. package/esm/fw-modal.js +218 -11
  35. package/esm/fw-navigation-menu.js +11 -19
  36. package/esm/fw-progress-bar.js +4 -11
  37. package/esm/fw-table.js +12 -56
  38. package/esm/fw-tabs.js +60 -20
  39. package/esm/fw-tag.js +8 -8
  40. package/esm/fw-toast.js +276 -0
  41. package/esm/fw-transactions-card.js +115 -0
  42. package/esm/index-1a41e7bf.js +15838 -0
  43. package/esm/{index-7833cf39.js → index-4605e00e.js} +114 -86
  44. package/esm/index.js +87 -73
  45. package/esm/is-forced-752b5893.js +927 -0
  46. package/esm/{add-to-unscopables-a5032b1d.js → object-create-f6f3a673.js} +3 -25
  47. package/esm/object-keys-4f5bf4e7.js +13 -0
  48. package/esm/{to-string-c2bd1f4d.js → to-string-12728fd2.js} +2 -2
  49. package/esm/uniqueId-fe08534a.js +279 -0
  50. package/esm/web.timers-0f117224.js +72 -0
  51. package/frollo-web-ui.esm.js +18020 -1824
  52. package/icons/index.ts +5 -1
  53. package/icons/solid-check.svg +3 -0
  54. package/icons/solid-xmark.svg +3 -0
  55. package/index.d.ts +344 -22
  56. package/package.json +5 -1
  57. package/styles/web-components.scss +8 -0
  58. package/types/components/fw-bar-chart/fw-bar-chart.vue.d.ts +83 -0
  59. package/types/components/fw-bar-chart/index.d.ts +2 -0
  60. package/types/components/fw-bar-chart/index.types.d.ts +11 -0
  61. package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +3 -1
  62. package/types/components/fw-input/fw-input.vue.d.ts +1 -0
  63. package/types/components/fw-modal/fw-modal.vue.d.ts +16 -0
  64. package/types/components/fw-modal/index.types.d.ts +1 -0
  65. package/types/components/fw-toast/fw-toast.vue.d.ts +121 -0
  66. package/types/components/fw-toast/index.d.ts +2 -0
  67. package/types/components/fw-toast/index.types.d.ts +13 -0
  68. package/types/components/fw-transactions-card/fw-transactions-card.vue.d.ts +58 -0
  69. package/types/components/fw-transactions-card/index.d.ts +2 -0
  70. package/types/components/fw-transactions-card/index.types.d.ts +6 -0
  71. package/types/components/index.d.ts +3 -0
  72. package/types/components/index.types.d.ts +3 -0
  73. package/types/icons/index.d.ts +3 -1
  74. package/types/index.browser-umd.d.ts +1 -0
  75. package/types/services/index.d.ts +1 -0
  76. package/types/services/modal.d.ts +1 -1
  77. package/types/services/toast.d.ts +9 -0
  78. package/web-components/index.js +36612 -0
  79. package/esm/array-iteration-4f83e223.js +0 -186
  80. package/esm/create-property-da6d232b.js +0 -26
  81. package/esm/function-name-c49146fc.js +0 -492
  82. package/esm/fw-loading-bar-da7d53fb.js +0 -22
  83. package/esm/index-06f4e5f1.js +0 -482
  84. package/esm/is-forced-fd46b5f2.js +0 -438
package/esm/fw-input.js CHANGED
@@ -1,12 +1,20 @@
1
- import './es.array.includes-9a6e4066.js';
1
+ import './es.array.includes-91be7771.js';
2
2
  import { defineComponent, ref, computed, createElementVNode, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, toDisplayString, createCommentVNode, renderSlot, mergeProps, Transition, normalizeClass } from 'vue';
3
3
  import { a as Field } from './vee-validate.esm-a17a23c3.js';
4
- import './es.function.name-2fa3a718.js';
4
+ import { u as uniqueId } from './uniqueId-fe08534a.js';
5
+ import './es.function.name-557cb1f9.js';
6
+ import './es.array.concat-987938be.js';
5
7
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
6
- import './function-name-c49146fc.js';
7
- import './object-keys-3c73c404.js';
8
- import './is-forced-fd46b5f2.js';
9
- import './add-to-unscopables-a5032b1d.js';
8
+ import './is-forced-752b5893.js';
9
+ import './export-a37ba078.js';
10
+ import './add-to-unscopables-2400f45b.js';
11
+ import './object-create-f6f3a673.js';
12
+ import './object-keys-4f5bf4e7.js';
13
+ import './array-species-create-a5f5503b.js';
14
+ import './classof-39c30bd5.js';
15
+ import './does-not-exceed-safe-integer-31d08811.js';
16
+ import './create-property-534611fd.js';
17
+ import './array-method-has-species-support-3d413468.js';
10
18
 
11
19
  var script = defineComponent({
12
20
  name: 'FwInput',
@@ -22,7 +30,6 @@ var script = defineComponent({
22
30
  type: String,
23
31
  "default": ''
24
32
  },
25
-
26
33
  /**
27
34
  * The name of the input field. Must be unique per form.
28
35
  */
@@ -30,7 +37,6 @@ var script = defineComponent({
30
37
  type: String,
31
38
  required: true
32
39
  },
33
-
34
40
  /**
35
41
  * The input type. Accepts `text` | `password`
36
42
  */
@@ -41,14 +47,12 @@ var script = defineComponent({
41
47
  return ['text', 'password', 'email', 'tel', 'time', 'url', 'week', 'month'].includes(value);
42
48
  }
43
49
  },
44
-
45
50
  /**
46
51
  * Label for the input. Also renders to an aria-label attribute
47
52
  */
48
53
  label: {
49
54
  type: String
50
55
  },
51
-
52
56
  /**
53
57
  * The placeholder text of the input
54
58
  */
@@ -56,14 +60,12 @@ var script = defineComponent({
56
60
  type: String,
57
61
  "default": ''
58
62
  },
59
-
60
63
  /**
61
64
  * Validation rules. Accepts an object, string schema or validation function.
62
65
  */
63
66
  rules: {
64
67
  type: [Object, String, Function]
65
68
  },
66
-
67
69
  /**
68
70
  * Converts the input into a readonly disabled field
69
71
  */
@@ -71,21 +73,18 @@ var script = defineComponent({
71
73
  type: Boolean,
72
74
  "default": false
73
75
  },
74
-
75
76
  /**
76
77
  * The hint text shown below the input
77
78
  */
78
79
  hint: {
79
80
  type: String
80
81
  },
81
-
82
82
  /**
83
83
  * The autocomplete input attribute
84
84
  */
85
85
  autocomplete: {
86
86
  type: String
87
87
  },
88
-
89
88
  /**
90
89
  * The logical tab order of the input.
91
90
  * Defaults to 1
@@ -96,6 +95,7 @@ var script = defineComponent({
96
95
  }
97
96
  },
98
97
  setup: function setup(props, ctx) {
98
+ var uuid = uniqueId();
99
99
  var inputBaseClass = ref("border-2 border-grey-40 rounded focus:outline-none focus:ring-2 focus:ring-primary block w-full p-2.5");
100
100
  var inputValue = computed({
101
101
  get: function get() {
@@ -106,6 +106,7 @@ var script = defineComponent({
106
106
  }
107
107
  });
108
108
  return {
109
+ uuid: uuid,
109
110
  inputBaseClass: inputBaseClass,
110
111
  inputValue: inputValue
111
112
  };
@@ -132,8 +133,7 @@ var _hoisted_7 = {
132
133
  key: 0,
133
134
  "class": "flex text-black absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
134
135
  };
135
- var _hoisted_8 = ["placeholder", "type", "readonly", "tabindex", "disabled", "autocomplete"];
136
-
136
+ var _hoisted_8 = ["id", "placeholder", "type", "readonly", "tabindex", "disabled", "autocomplete"];
137
137
  var _hoisted_9 = /*#__PURE__*/createElementVNode("svg", {
138
138
  fill: "currentColor",
139
139
  "aria-hidden": "true",
@@ -144,7 +144,6 @@ var _hoisted_9 = /*#__PURE__*/createElementVNode("svg", {
144
144
  }, [/*#__PURE__*/createElementVNode("path", {
145
145
  d: "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM232 152C232 138.8\n 242.8 128 256 128s24 10.75 24 24v128c0 13.25-10.75 24-24 24S232 293.3 232 280V152zM256 400c-17.36\n 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 385.9 273.4\n 400 256 400z"
146
146
  })], -1);
147
-
148
147
  var _hoisted_10 = [_hoisted_9];
149
148
  var _hoisted_11 = {
150
149
  key: 1,
@@ -162,7 +161,6 @@ var _hoisted_14 = {
162
161
  };
163
162
  function render(_ctx, _cache, $props, $setup, $data, $options) {
164
163
  var _component_InputField = resolveComponent("InputField");
165
-
166
164
  return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_InputField, {
167
165
  modelValue: _ctx.inputValue,
168
166
  "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
@@ -173,14 +171,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
173
171
  }, {
174
172
  "default": withCtx(function (_ref) {
175
173
  var field = _ref.field,
176
- errors = _ref.errors,
177
- errorMessage = _ref.errorMessage,
178
- meta = _ref.meta;
174
+ errors = _ref.errors,
175
+ errorMessage = _ref.errorMessage,
176
+ meta = _ref.meta;
179
177
  return [createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [_ctx.label ? (openBlock(), createElementBlock("label", {
180
178
  key: 0,
181
- "for": _ctx.name,
179
+ "for": "fw-input-".concat(_ctx.name, "-").concat(_ctx.uuid),
182
180
  "class": "block mb-2 font-medium"
183
181
  }, toDisplayString(_ctx.label), 9, _hoisted_4)) : createCommentVNode("", true), _ctx.$slots.action ? (openBlock(), createElementBlock("div", _hoisted_5, [renderSlot(_ctx.$slots, "action")])) : createCommentVNode("", true)]), createElementVNode("div", _hoisted_6, [_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_7, [renderSlot(_ctx.$slots, "prefix")])) : createCommentVNode("", true), createElementVNode("input", mergeProps(field, {
182
+ id: "fw-input-".concat(_ctx.name, "-").concat(_ctx.uuid),
184
183
  placeholder: _ctx.placeholder,
185
184
  type: _ctx.type,
186
185
  readonly: _ctx.readonly,
@@ -215,8 +214,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
215
214
  }, 8, ["modelValue", "name", "rules"])]);
216
215
  }
217
216
 
218
- var css_248z = ".fwFadeIn-enter-active{-webkit-animation:fwFadeIn .35s;animation:fwFadeIn .35s;-webkit-transition:opacity .35s ease-in;-o-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.fwFadeIn-leave-active{animation:fwFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;-o-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}@keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}";
219
- var stylesheet = ".fwFadeIn-enter-active{-webkit-animation:fwFadeIn .35s;animation:fwFadeIn .35s;-webkit-transition:opacity .35s ease-in;-o-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.fwFadeIn-leave-active{animation:fwFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;-o-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}@keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}";
217
+ var css_248z = ".fwFadeIn-enter-active{-webkit-animation:fwFadeIn .35s;animation:fwFadeIn .35s;-webkit-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.fwFadeIn-leave-active{animation:fwFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}@keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}";
218
+ var stylesheet = ".fwFadeIn-enter-active{-webkit-animation:fwFadeIn .35s;animation:fwFadeIn .35s;-webkit-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.fwFadeIn-leave-active{animation:fwFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}@keyframes fwFadeIn{0%{opacity:0}to{opacity:1}}";
220
219
  styleInject(css_248z);
221
220
 
222
221
  script.render = render;
@@ -0,0 +1,22 @@
1
+ import { defineComponent, openBlock, createElementBlock } from 'vue';
2
+ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
3
+
4
+ var script = defineComponent({
5
+ name: 'FwLoadingBar'
6
+ });
7
+
8
+ var _hoisted_1 = {
9
+ "class": "fw-loading-bar rounded",
10
+ "aria-hidden": "true"
11
+ };
12
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
13
+ return openBlock(), createElementBlock("div", _hoisted_1);
14
+ }
15
+
16
+ var css_248z = ".fw-loading-bar{-webkit-animation:fwSkeletonLoading 1.5s linear infinite;animation:fwSkeletonLoading 1.5s linear infinite;background:#e4e4e4;background-image:linear-gradient(100deg,hsla(0,0%,100%,0) 40%,hsla(0,0%,100%,.5) 50%,hsla(0,0%,100%,0) 60%);background-size:200% 200%}@-webkit-keyframes fwSkeletonLoading{0%{background-position-x:200%}50%{background-position-x:100%}to{background-position-x:0}}@keyframes fwSkeletonLoading{0%{background-position-x:200%}50%{background-position-x:100%}to{background-position-x:0}}";
17
+ var stylesheet = ".fw-loading-bar{-webkit-animation:fwSkeletonLoading 1.5s linear infinite;animation:fwSkeletonLoading 1.5s linear infinite;background:#e4e4e4;background-image:linear-gradient(100deg,hsla(0,0%,100%,0) 40%,hsla(0,0%,100%,.5) 50%,hsla(0,0%,100%,0) 60%);background-size:200% 200%}@-webkit-keyframes fwSkeletonLoading{0%{background-position-x:200%}50%{background-position-x:100%}to{background-position-x:0}}@keyframes fwSkeletonLoading{0%{background-position-x:200%}50%{background-position-x:100%}to{background-position-x:0}}";
18
+ styleInject(css_248z);
19
+
20
+ script.render = render;
21
+
22
+ export { script as s };
@@ -1,4 +1,4 @@
1
- import { c as render$1 } from './index-7833cf39.js';
1
+ import { f as render$1 } from './index-4605e00e.js';
2
2
  import { defineComponent, resolveComponent, openBlock, createBlock } from 'vue';
3
3
 
4
4
  var script = defineComponent({
@@ -10,7 +10,6 @@ var script = defineComponent({
10
10
 
11
11
  function render(_ctx, _cache, $props, $setup, $data, $options) {
12
12
  var _component_LoadingSvg = resolveComponent("LoadingSvg");
13
-
14
13
  return openBlock(), createBlock(_component_LoadingSvg, {
15
14
  "class": "fw-loading-spinner animate-spin"
16
15
  });
package/esm/fw-loading.js CHANGED
@@ -1,12 +1,11 @@
1
- import { s as script$2 } from './fw-loading-bar-da7d53fb.js';
2
- export { s as FwLoadingBar } from './fw-loading-bar-da7d53fb.js';
1
+ import { s as script$2 } from './fw-loading-bar-f5ca605c.js';
2
+ export { s as FwLoadingBar } from './fw-loading-bar-f5ca605c.js';
3
3
  import { defineComponent, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, normalizeClass, Fragment, renderList } from 'vue';
4
- import './es.number.constructor-b7faae1f.js';
4
+ import './es.number.constructor-1249bd78.js';
5
5
  import './style-inject.es-1f59c1d0.js';
6
- import './function-name-c49146fc.js';
7
- import './is-forced-fd46b5f2.js';
8
- import './to-string-c2bd1f4d.js';
9
- import './classof-088c9833.js';
6
+ import './is-forced-752b5893.js';
7
+ import './to-string-12728fd2.js';
8
+ import './classof-39c30bd5.js';
10
9
 
11
10
  var script$1 = defineComponent({
12
11
  name: 'FwLoadingCard',
@@ -23,7 +22,6 @@ var _hoisted_2$1 = {
23
22
  };
24
23
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
25
24
  var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
26
-
27
25
  return openBlock(), createElementBlock("div", _hoisted_1$1, [createElementVNode("div", _hoisted_2$1, [createVNode(_component_FwLoadingBar, {
28
26
  "class": "w-2/4 h-5"
29
27
  })]), createVNode(_component_FwLoadingBar, {
@@ -67,7 +65,6 @@ var _hoisted_3 = {
67
65
  };
68
66
  function render(_ctx, _cache, $props, $setup, $data, $options) {
69
67
  var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
70
-
71
68
  return openBlock(), createElementBlock("table", {
72
69
  "class": normalizeClass(_ctx.tableClass)
73
70
  }, [createElementVNode("thead", _hoisted_1, [createElementVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, thKey) {
package/esm/fw-modal.js CHANGED
@@ -1,12 +1,219 @@
1
- export { s as FwModal } from './index-06f4e5f1.js';
2
- import './es.array.includes-9a6e4066.js';
3
- import './function-name-c49146fc.js';
4
- import './object-keys-3c73c404.js';
5
- import './is-forced-fd46b5f2.js';
6
- import './add-to-unscopables-a5032b1d.js';
7
- import 'vue';
8
- import './fw-button-765b9d52.js';
9
- import './fw-loading-spinner-01b9a040.js';
10
- import './index-7833cf39.js';
1
+ import './es.array.includes-91be7771.js';
2
+ import { defineComponent, ref, computed, onMounted, resolveComponent, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, createElementBlock, createElementVNode, renderSlot, createCommentVNode, createTextVNode, toDisplayString } from 'vue';
3
+ import { s as script$1 } from './fw-button-1486e2d9.js';
4
+ import { u as uniqueId } from './uniqueId-fe08534a.js';
5
+ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
6
+ import './is-forced-752b5893.js';
7
+ import './export-a37ba078.js';
8
+ import './add-to-unscopables-2400f45b.js';
9
+ import './object-create-f6f3a673.js';
10
+ import './object-keys-4f5bf4e7.js';
11
+ import './fw-loading-spinner-df1627c0.js';
12
+ import './index-4605e00e.js';
11
13
  import './check-94a5917a.js';
12
- import './style-inject.es-1f59c1d0.js';
14
+
15
+ var script = defineComponent({
16
+ name: 'FwModal',
17
+ components: {
18
+ FwButton: script$1
19
+ },
20
+ emits: ['cancel', 'confirm'],
21
+ props: {
22
+ /**
23
+ * The modal's v-model. Controls the visibility of the modal.
24
+ */
25
+ modelValue: {
26
+ type: Boolean
27
+ },
28
+ /**
29
+ * The header title of the modal
30
+ */
31
+ header: {
32
+ type: String
33
+ },
34
+ /**
35
+ * The element to attach the modal too. Defaults to `#app` element.
36
+ */
37
+ element: {
38
+ type: String,
39
+ "default": '#app'
40
+ },
41
+ /**
42
+ * The body description of the modal
43
+ */
44
+ body: {
45
+ type: String
46
+ },
47
+ /**
48
+ * The aria role of the modal container. Defaults to `dialog`
49
+ */
50
+ role: {
51
+ type: String,
52
+ "default": 'dialog'
53
+ },
54
+ /**
55
+ * Whether to show the cancel button
56
+ */
57
+ showCancel: {
58
+ type: Boolean,
59
+ "default": false
60
+ },
61
+ /**
62
+ * Whether to show the confirm button
63
+ */
64
+ showConfirm: {
65
+ type: Boolean,
66
+ "default": true
67
+ },
68
+ /**
69
+ * Custom text for the cancel button
70
+ */
71
+ cancelButtonText: {
72
+ type: String,
73
+ "default": 'Cancel'
74
+ },
75
+ /**
76
+ * Button variant for the cancel button
77
+ */
78
+ cancelButtonType: {
79
+ type: String,
80
+ "default": 'secondary',
81
+ validator: function validator(value) {
82
+ return ['primary', 'secondary', 'tertiary', 'error', 'success', 'link', 'text'].includes(value);
83
+ }
84
+ },
85
+ /**
86
+ * Custom text for the confirm button
87
+ */
88
+ confirmButtonText: {
89
+ type: String,
90
+ "default": 'Confirm'
91
+ },
92
+ /**
93
+ * Button variant for the confirm button
94
+ */
95
+ confirmButtonType: {
96
+ type: String,
97
+ "default": 'primary',
98
+ validator: function validator(value) {
99
+ return ['primary', 'secondary', 'tertiary', 'error', 'success', 'link', 'text'].includes(value);
100
+ }
101
+ }
102
+ },
103
+ setup: function setup(props) {
104
+ var isMounted = ref(false);
105
+ var uuid = uniqueId();
106
+ var isOpen = computed(function () {
107
+ return props.modelValue;
108
+ });
109
+ onMounted(function () {
110
+ isMounted.value = true;
111
+ });
112
+ return {
113
+ isOpen: isOpen,
114
+ uuid: uuid,
115
+ isMounted: isMounted
116
+ };
117
+ }
118
+ });
119
+
120
+ var _hoisted_1 = ["id"];
121
+ var _hoisted_2 = {
122
+ "class": "fw-modal--mask fixed z-[9999] top-0 left-0 w-full h-full bg-black bg-opacity-50"
123
+ };
124
+ var _hoisted_3 = {
125
+ "class": "fw-modal--wrapper text-center overflow-auto flex justify-center items-center h-full"
126
+ };
127
+ var _hoisted_4 = ["role", "aria-labelledby", "aria-describedby"];
128
+ var _hoisted_5 = {
129
+ key: 0,
130
+ "class": "fw-modal--header text-center"
131
+ };
132
+ var _hoisted_6 = {
133
+ key: 0,
134
+ id: "modal-logo",
135
+ "class": "flex justify-center"
136
+ };
137
+ var _hoisted_7 = ["id"];
138
+ var _hoisted_8 = ["id", "innerHTML"];
139
+ var _hoisted_9 = ["id"];
140
+ var _hoisted_10 = ["innerHTML", "id"];
141
+ var _hoisted_11 = {
142
+ key: 3,
143
+ "class": "modal-footer flex space-x-4 pt-4 justify-center"
144
+ };
145
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
146
+ var _component_FwButton = resolveComponent("FwButton");
147
+ return _ctx.isMounted ? (openBlock(), createBlock(Teleport, {
148
+ key: 0,
149
+ to: _ctx.element
150
+ }, [createVNode(Transition, {
151
+ name: "modalFadeIn",
152
+ appear: ""
153
+ }, {
154
+ "default": withCtx(function () {
155
+ return [_ctx.isOpen ? (openBlock(), createElementBlock("div", {
156
+ key: 0,
157
+ "class": "fw-modal z-[9999]",
158
+ id: "fw-modal-".concat(_ctx.uuid)
159
+ }, [createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [createElementVNode("div", {
160
+ role: _ctx.role,
161
+ "aria-modal": "true",
162
+ "class": "fw-modal--container p-12 m-8 inline-block w-full max-w-[540px] bg-white rounded-2xl shadow",
163
+ "aria-labelledby": _ctx.$slots.header || _ctx.header ? "modal_".concat(_ctx.uuid, "_header") : undefined,
164
+ "aria-describedby": _ctx.$slots.body ? "modal_".concat(_ctx.uuid, "_body") : undefined
165
+ }, [_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", {
166
+ key: 1,
167
+ id: "modal_".concat(_ctx.uuid, "_header")
168
+ }, [renderSlot(_ctx.$slots, "header")], 8, _hoisted_7)) : _ctx.header ? (openBlock(), createElementBlock("h2", {
169
+ key: 2,
170
+ id: "modal_".concat(_ctx.uuid, "_header"),
171
+ innerHTML: _ctx.header
172
+ }, null, 8, _hoisted_8)) : createCommentVNode("", true)])) : createCommentVNode("", true), _ctx.$slots.body ? (openBlock(), createElementBlock("div", {
173
+ key: 1,
174
+ "class": "modal-body mt-4",
175
+ id: "modal_".concat(_ctx.uuid, "_body")
176
+ }, [renderSlot(_ctx.$slots, "body")], 8, _hoisted_9)) : _ctx.body ? (openBlock(), createElementBlock("div", {
177
+ key: 2,
178
+ innerHTML: _ctx.body,
179
+ "class": "modal-body mt-4",
180
+ id: "modal_".concat(_ctx.uuid, "_body")
181
+ }, null, 8, _hoisted_10)) : createCommentVNode("", true), _ctx.showConfirm || _ctx.showCancel ? (openBlock(), createElementBlock("div", _hoisted_11, [_ctx.showCancel ? (openBlock(), createBlock(_component_FwButton, {
182
+ key: 0,
183
+ "class": "basis-1/2",
184
+ variant: _ctx.cancelButtonType,
185
+ "aria-label": _ctx.cancelButtonText,
186
+ onClick: _cache[0] || (_cache[0] = function ($event) {
187
+ return _ctx.$emit('cancel');
188
+ })
189
+ }, {
190
+ "default": withCtx(function () {
191
+ return [createTextVNode(toDisplayString(_ctx.cancelButtonText), 1)];
192
+ }),
193
+ _: 1
194
+ }, 8, ["variant", "aria-label"])) : createCommentVNode("", true), _ctx.showConfirm ? (openBlock(), createBlock(_component_FwButton, {
195
+ key: 1,
196
+ "class": "basis-1/2",
197
+ variant: _ctx.confirmButtonType,
198
+ "aria-label": _ctx.confirmButtonText,
199
+ onClick: _cache[1] || (_cache[1] = function ($event) {
200
+ return _ctx.$emit('confirm');
201
+ })
202
+ }, {
203
+ "default": withCtx(function () {
204
+ return [createTextVNode(toDisplayString(_ctx.confirmButtonText), 1)];
205
+ }),
206
+ _: 1
207
+ }, 8, ["variant", "aria-label"])) : createCommentVNode("", true)])) : createCommentVNode("", true)], 8, _hoisted_4)])])], 8, _hoisted_1)) : createCommentVNode("", true)];
208
+ }),
209
+ _: 3
210
+ })], 8, ["to"])) : createCommentVNode("", true);
211
+ }
212
+
213
+ var css_248z = ".modalFadeIn-enter-active{-webkit-animation:modalFadeIn .4s;animation:modalFadeIn .4s;-webkit-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.modalFadeIn-leave-active{animation:modalFadeIn .4s reverse;-webkit-transition:opacity .4s ease-in-out;transition:opacity .4s ease-in-out}@-webkit-keyframes modalFadeIn{0%{opacity:0}to{opacity:1}}@keyframes modalFadeIn{0%{opacity:0}to{opacity:1}}";
214
+ var stylesheet = ".modalFadeIn-enter-active{-webkit-animation:modalFadeIn .4s;animation:modalFadeIn .4s;-webkit-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.modalFadeIn-leave-active{animation:modalFadeIn .4s reverse;-webkit-transition:opacity .4s ease-in-out;transition:opacity .4s ease-in-out}@-webkit-keyframes modalFadeIn{0%{opacity:0}to{opacity:1}}@keyframes modalFadeIn{0%{opacity:0}to{opacity:1}}";
215
+ styleInject(css_248z);
216
+
217
+ script.render = render;
218
+
219
+ export { script as FwModal };
@@ -1,13 +1,14 @@
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-765b9d52.js';
2
+ import { s as script$1 } from './fw-button-1486e2d9.js';
3
3
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
4
- import './es.array.includes-9a6e4066.js';
5
- import './function-name-c49146fc.js';
6
- import './object-keys-3c73c404.js';
7
- import './is-forced-fd46b5f2.js';
8
- import './add-to-unscopables-a5032b1d.js';
9
- import './fw-loading-spinner-01b9a040.js';
10
- import './index-7833cf39.js';
4
+ import './es.array.includes-91be7771.js';
5
+ import './is-forced-752b5893.js';
6
+ import './export-a37ba078.js';
7
+ import './add-to-unscopables-2400f45b.js';
8
+ import './object-create-f6f3a673.js';
9
+ import './object-keys-4f5bf4e7.js';
10
+ import './fw-loading-spinner-df1627c0.js';
11
+ import './index-4605e00e.js';
11
12
  import './check-94a5917a.js';
12
13
 
13
14
  var script = defineComponent({
@@ -24,7 +25,6 @@ var script = defineComponent({
24
25
  menuItems: {
25
26
  type: Array
26
27
  },
27
-
28
28
  /**
29
29
  * The label for the action button.
30
30
  * Also emits the `action` event.
@@ -32,7 +32,6 @@ var script = defineComponent({
32
32
  actionLabel: {
33
33
  type: String
34
34
  },
35
-
36
35
  /**
37
36
  * The class for the container wrapper.
38
37
  */
@@ -45,15 +44,12 @@ var script = defineComponent({
45
44
  var mobileMenuClass = ref( // eslint-disable-next-line max-len
46
45
  "min-h-screen top-0 left-0 pt-20 absolute w-full flex flex-col justify-between px-2 bg-white shadow-md pb-3 space-y-1");
47
46
  var isMobileMenuOpen = ref(false);
48
-
49
47
  var toggleMobileMenu = function toggleMobileMenu() {
50
48
  return isMobileMenuOpen.value = !isMobileMenuOpen.value;
51
49
  };
52
-
53
50
  var actionClicked = function actionClicked() {
54
51
  return ctx.emit('action');
55
52
  };
56
-
57
53
  return {
58
54
  mobileMenuClass: mobileMenuClass,
59
55
  isMobileMenuOpen: isMobileMenuOpen,
@@ -84,11 +80,9 @@ var _hoisted_5 = {
84
80
  var _hoisted_6 = {
85
81
  "class": "flex items-center sm:hidden"
86
82
  };
87
-
88
83
  var _hoisted_7 = /*#__PURE__*/createElementVNode("span", {
89
84
  "class": "sr-only"
90
85
  }, "Open main menu", -1);
91
-
92
86
  var _hoisted_8 = {
93
87
  "class": "block h-6 w-6",
94
88
  xmlns: "http://www.w3.org/2000/svg",
@@ -103,9 +97,7 @@ var _hoisted_10 = {
103
97
  };
104
98
  function render(_ctx, _cache, $props, $setup, $data, $options) {
105
99
  var _ctx$menuItems;
106
-
107
100
  var _component_FwButton = resolveComponent("FwButton");
108
-
109
101
  return openBlock(), createElementBlock("nav", _hoisted_1, [createElementVNode("div", {
110
102
  "class": normalizeClass(["px-6 flex-1 h-full flex bg-white items-stretch justify-between mx-auto", _ctx.containerClass])
111
103
  }, [_ctx.$slots.logo ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "logo")])) : createCommentVNode("", true), _ctx.menuItems && ((_ctx$menuItems = _ctx.menuItems) === null || _ctx$menuItems === void 0 ? void 0 : _ctx$menuItems.length) > 0 ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, function (item, i) {
@@ -184,8 +176,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
184
176
  })]);
185
177
  }
186
178
 
187
- var css_248z = ".fw-nav-menu--mobile{z-index:-1}.fw-nav-menu--mobile,.slideInLeft-enter-active{-webkit-transition:left .35s ease-in;-o-transition:left .35s ease-in;transition:left .35s ease-in}.slideInLeft-enter-active{-webkit-animation:slideInLeft .35s;animation:slideInLeft .35s}.slideInLeft-leave-active{animation:slideInLeft .35s reverse;-webkit-transition:left .35s ease-in-out;-o-transition:left .35s ease-in-out;transition:left .35s ease-in-out}@-webkit-keyframes slideInLeft{0%{left:100%}to{left:0}}@keyframes slideInLeft{0%{left:100%}to{left:0}}";
188
- var stylesheet = ".fw-nav-menu--mobile{z-index:-1}.fw-nav-menu--mobile,.slideInLeft-enter-active{-webkit-transition:left .35s ease-in;-o-transition:left .35s ease-in;transition:left .35s ease-in}.slideInLeft-enter-active{-webkit-animation:slideInLeft .35s;animation:slideInLeft .35s}.slideInLeft-leave-active{animation:slideInLeft .35s reverse;-webkit-transition:left .35s ease-in-out;-o-transition:left .35s ease-in-out;transition:left .35s ease-in-out}@-webkit-keyframes slideInLeft{0%{left:100%}to{left:0}}@keyframes slideInLeft{0%{left:100%}to{left:0}}";
179
+ var css_248z = ".fw-nav-menu--mobile{z-index:-1}.fw-nav-menu--mobile,.slideInLeft-enter-active{-webkit-transition:left .35s ease-in;transition:left .35s ease-in}.slideInLeft-enter-active{-webkit-animation:slideInLeft .35s;animation:slideInLeft .35s}.slideInLeft-leave-active{animation:slideInLeft .35s reverse;-webkit-transition:left .35s ease-in-out;transition:left .35s ease-in-out}@-webkit-keyframes slideInLeft{0%{left:100%}to{left:0}}@keyframes slideInLeft{0%{left:100%}to{left:0}}";
180
+ var stylesheet = ".fw-nav-menu--mobile{z-index:-1}.fw-nav-menu--mobile,.slideInLeft-enter-active{-webkit-transition:left .35s ease-in;transition:left .35s ease-in}.slideInLeft-enter-active{-webkit-animation:slideInLeft .35s;animation:slideInLeft .35s}.slideInLeft-leave-active{animation:slideInLeft .35s reverse;-webkit-transition:left .35s ease-in-out;transition:left .35s ease-in-out}@-webkit-keyframes slideInLeft{0%{left:100%}to{left:0}}@keyframes slideInLeft{0%{left:100%}to{left:0}}";
189
181
  styleInject(css_248z);
190
182
 
191
183
  script.render = render;
@@ -1,10 +1,9 @@
1
- import './es.number.constructor-b7faae1f.js';
1
+ import './es.number.constructor-1249bd78.js';
2
2
  import { defineComponent, resolveComponent, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, createBlock, toDisplayString, normalizeStyle, createCommentVNode } from 'vue';
3
3
  import { r as render$1 } from './check-94a5917a.js';
4
- import './function-name-c49146fc.js';
5
- import './is-forced-fd46b5f2.js';
6
- import './to-string-c2bd1f4d.js';
7
- import './classof-088c9833.js';
4
+ import './is-forced-752b5893.js';
5
+ import './to-string-12728fd2.js';
6
+ import './classof-39c30bd5.js';
8
7
 
9
8
  var script = defineComponent({
10
9
  name: 'FwProgressBar',
@@ -20,7 +19,6 @@ var script = defineComponent({
20
19
  type: Array,
21
20
  required: true
22
21
  },
23
-
24
22
  /**
25
23
  * An current active step.
26
24
  */
@@ -28,7 +26,6 @@ var script = defineComponent({
28
26
  type: Number,
29
27
  required: true
30
28
  },
31
-
32
29
  /**
33
30
  * An current active sub-step.
34
31
  */
@@ -41,15 +38,12 @@ var script = defineComponent({
41
38
  var calculatedProgressBar = function calculatedProgressBar(step) {
42
39
  var numOfSubSteps = step.subSteps;
43
40
  var equalPercentageWidths = 100 / numOfSubSteps;
44
-
45
41
  if (props.activeStep === step.position && props.activeSubStep) {
46
42
  var width = equalPercentageWidths * props.activeSubStep;
47
43
  return "width: ".concat(width, "%");
48
44
  }
49
-
50
45
  return 'width: 0%;';
51
46
  };
52
-
53
47
  return {
54
48
  calculatedProgressBar: calculatedProgressBar
55
49
  };
@@ -75,7 +69,6 @@ var _hoisted_5 = {
75
69
  };
76
70
  function render(_ctx, _cache, $props, $setup, $data, $options) {
77
71
  var _component_CheckSvg = resolveComponent("CheckSvg");
78
-
79
72
  return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.steps, function (step) {
80
73
  return openBlock(), createElementBlock("div", {
81
74
  "class": normalizeClass(["flex", step.position !== _ctx.steps.length ? 'flex-1' : 'w-[70px] md:w-[96px]']),