@frollo/frollo-web-ui 0.0.11 → 0.0.12

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 CHANGED
@@ -1539,7 +1539,7 @@ addToUnscopables('includes');var script$2 = vue.defineComponent({
1539
1539
  border: 'border-error focus-visible:ring-error'
1540
1540
  },
1541
1541
  link: {
1542
- text: 'text-primary underline hover:no-underline active:no-underline focus-visible:no-underline',
1542
+ text: 'text-primary font-normal underline hover:no-underline active:no-underline focus-visible:no-underline',
1543
1543
  background: '',
1544
1544
  border: 'border-none rounded-none focus-visible:ring-primary'
1545
1545
  },
@@ -1753,7 +1753,7 @@ var _hoisted_11$1 = {
1753
1753
  key: 0,
1754
1754
  "class": "fw-nav-menu--mobile 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"
1755
1755
  };
1756
- var _hoisted_12 = {
1756
+ var _hoisted_12$1 = {
1757
1757
  "class": "w-full flex flex-col"
1758
1758
  };
1759
1759
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
@@ -1804,7 +1804,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
1804
1804
  "default": vue.withCtx(function () {
1805
1805
  var _ctx$menuItems2;
1806
1806
 
1807
- return [((_ctx$menuItems2 = _ctx.menuItems) === null || _ctx$menuItems2 === void 0 ? void 0 : _ctx$menuItems2.length) > 0 && _ctx.isMobileMenuOpen ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$1, [vue.createElementVNode("div", _hoisted_12, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menuItems, function (item, i) {
1807
+ return [((_ctx$menuItems2 = _ctx.menuItems) === null || _ctx$menuItems2 === void 0 ? void 0 : _ctx$menuItems2.length) > 0 && _ctx.isMobileMenuOpen ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$1, [vue.createElementVNode("div", _hoisted_12$1, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menuItems, function (item, i) {
1808
1808
  return vue.openBlock(), vue.createBlock(_component_FwButton, {
1809
1809
  key: i,
1810
1810
  "class": "w-full rounded-md px-2",
@@ -5023,6 +5023,13 @@ function useSubmitForm(cb) {
5023
5023
  readonly: {
5024
5024
  type: Boolean,
5025
5025
  "default": false
5026
+ },
5027
+
5028
+ /**
5029
+ * The hint text shown below the input
5030
+ */
5031
+ hint: {
5032
+ type: String
5026
5033
  }
5027
5034
  },
5028
5035
  setup: function setup(props, ctx) {
@@ -5068,21 +5075,23 @@ if (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {
5068
5075
  var _hoisted_2 = {
5069
5076
  "class": "flex flex-col"
5070
5077
  };
5071
- var _hoisted_3 = ["for"];
5072
- var _hoisted_4 = {
5073
- "class": "relative"
5078
+ var _hoisted_3 = {
5079
+ "class": "flex flex-row justify-between"
5074
5080
  };
5081
+ var _hoisted_4 = ["for"];
5075
5082
  var _hoisted_5 = {
5076
- key: 0,
5077
- "class": "flex text-grey-base absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
5083
+ key: 1
5084
+ };
5085
+ var _hoisted_6 = {
5086
+ "class": "relative"
5078
5087
  };
5079
- var _hoisted_6 = ["placeholder", "type", "readonly", "disabled"];
5080
5088
  var _hoisted_7 = {
5081
5089
  key: 0,
5082
- "class": "flex text-error absolute w-9 h-full inset-y-0 right-0 items-center pr-3 pointer-events-none"
5090
+ "class": "flex text-black absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
5083
5091
  };
5092
+ var _hoisted_8 = ["placeholder", "type", "readonly", "disabled"];
5084
5093
 
5085
- var _hoisted_8 = /*#__PURE__*/vue.createElementVNode("svg", {
5094
+ var _hoisted_9 = /*#__PURE__*/vue.createElementVNode("svg", {
5086
5095
  fill: "currentColor",
5087
5096
  "aria-hidden": "true",
5088
5097
  focusable: "false",
@@ -5093,12 +5102,20 @@ var _hoisted_8 = /*#__PURE__*/vue.createElementVNode("svg", {
5093
5102
  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"
5094
5103
  })], -1);
5095
5104
 
5096
- var _hoisted_9 = [_hoisted_8];
5097
- var _hoisted_10 = {
5098
- "class": "text-error italic text-right text-sm font-medium mt-2 min-h-[21px]"
5099
- };
5105
+ var _hoisted_10 = [_hoisted_9];
5100
5106
  var _hoisted_11 = {
5101
- key: 0
5107
+ key: 1,
5108
+ "class": "flex text-black absolute w-10 h-full inset-y-0 right-0 items-center pr-3"
5109
+ };
5110
+ var _hoisted_12 = {
5111
+ "class": "italic text-right text-sm font-medium mt-2 min-h-[21px]"
5112
+ };
5113
+ var _hoisted_13 = {
5114
+ key: 0,
5115
+ "class": "text-error"
5116
+ };
5117
+ var _hoisted_14 = {
5118
+ key: 1
5102
5119
  };
5103
5120
  function render(_ctx, _cache, $props, $setup, $data, $options) {
5104
5121
  var _component_InputField = vue.resolveComponent("InputField");
@@ -5116,38 +5133,43 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5116
5133
  errors = _ref.errors,
5117
5134
  errorMessage = _ref.errorMessage,
5118
5135
  meta = _ref.meta;
5119
- return [vue.createElementVNode("div", _hoisted_2, [_ctx.label ? (vue.openBlock(), vue.createElementBlock("label", {
5136
+ return [vue.createElementVNode("div", _hoisted_2, [vue.createElementVNode("div", _hoisted_3, [_ctx.label ? (vue.openBlock(), vue.createElementBlock("label", {
5120
5137
  key: 0,
5121
5138
  "for": _ctx.name,
5122
5139
  "class": "block mb-2"
5123
- }, vue.toDisplayString(_ctx.label), 9, _hoisted_3)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_4, [_ctx.$slots.prefixIcon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [vue.renderSlot(_ctx.$slots, "prefixIcon")])) : vue.createCommentVNode("", true), vue.createElementVNode("input", vue.mergeProps(field, {
5140
+ }, vue.toDisplayString(_ctx.label), 9, _hoisted_4)) : vue.createCommentVNode("", true), _ctx.$slots.action ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [vue.renderSlot(_ctx.$slots, "action")])) : vue.createCommentVNode("", true)]), vue.createElementVNode("div", _hoisted_6, [_ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [vue.renderSlot(_ctx.$slots, "prefix")])) : vue.createCommentVNode("", true), vue.createElementVNode("input", vue.mergeProps(field, {
5124
5141
  placeholder: _ctx.placeholder,
5125
5142
  type: _ctx.type,
5126
5143
  readonly: _ctx.readonly,
5127
5144
  disabled: _ctx.readonly,
5128
5145
  "class": ["border-2 border-grey-lightest rounded-lg focus:outline-none focus:ring-2 focus:ring-primary block w-full p-2.5", {
5129
- 'pl-10': !!_ctx.$slots.prefixIcon
5146
+ 'pl-10': !!_ctx.$slots.prefix,
5147
+ 'pr-20': !!_ctx.$slots.suffix
5130
5148
  }]
5131
- }), null, 16, _hoisted_6), vue.createVNode(vue.Transition, {
5132
- name: "errorFadeIn"
5149
+ }), null, 16, _hoisted_8), vue.createVNode(vue.Transition, {
5150
+ name: "fwFadeIn"
5133
5151
  }, {
5134
5152
  "default": vue.withCtx(function () {
5135
- return [(errorMessage || errors[0]) && meta.touched ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, _hoisted_9)) : vue.createCommentVNode("", true)];
5153
+ return [(errorMessage || errors[0]) && meta.touched ? (vue.openBlock(), vue.createElementBlock("div", {
5154
+ key: 0,
5155
+ "class": vue.normalizeClass(["flex text-error absolute w-9 h-full inset-y-0 right-0 items-center pr-3 pointer-events-none", _ctx.$slots.suffix ? 'mr-8' : ''])
5156
+ }, _hoisted_10, 2)) : vue.createCommentVNode("", true)];
5136
5157
  }),
5137
5158
  _: 2
5138
- }, 1024)]), vue.createElementVNode("div", _hoisted_10, [vue.createVNode(vue.Transition, {
5139
- name: "errorFadeIn"
5159
+ }, 1024), _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [vue.renderSlot(_ctx.$slots, "suffix")])) : vue.createCommentVNode("", true)]), vue.createElementVNode("div", _hoisted_12, [vue.createVNode(vue.Transition, {
5160
+ name: "fwFadeIn",
5161
+ mode: "out-in"
5140
5162
  }, {
5141
5163
  "default": vue.withCtx(function () {
5142
- return [(errorMessage || errors[0]) && meta.touched ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_11, vue.toDisplayString(errorMessage || errors[0]), 1)) : vue.createCommentVNode("", true)];
5164
+ return [(errorMessage || errors[0]) && meta.touched ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_13, vue.toDisplayString(errorMessage || errors[0]), 1)) : _ctx.hint ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_14, vue.toDisplayString(_ctx.hint), 1)) : vue.createCommentVNode("", true)];
5143
5165
  }),
5144
5166
  _: 2
5145
5167
  }, 1024)])])];
5146
5168
  }),
5147
5169
  _: 3
5148
5170
  }, 8, ["modelValue", "name", "rules"])]);
5149
- }var css_248z = ".errorFadeIn-enter-active{-webkit-animation:errorFadeIn .35s;animation:errorFadeIn .35s;-webkit-transition:opacity .35s ease-in;-o-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.errorFadeIn-leave-active{animation:errorFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;-o-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}@keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}";
5150
- var stylesheet = ".errorFadeIn-enter-active{-webkit-animation:errorFadeIn .35s;animation:errorFadeIn .35s;-webkit-transition:opacity .35s ease-in;-o-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.errorFadeIn-leave-active{animation:errorFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;-o-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}@keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}";
5171
+ }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}}";
5172
+ 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}}";
5151
5173
  styleInject(css_248z);script.render = render;var components$1=/*#__PURE__*/Object.freeze({__proto__:null,FwCard:script$3,FwButton:script$2,FwNavigationMenu:script$1,FwForm:Form,FwInput:script});var install = function install(app) {
5152
5174
  Object.entries(components$1).forEach(function (_ref) {
5153
5175
  var _ref2 = _slicedToArray(_ref, 2),
@@ -79,7 +79,7 @@ var script = defineComponent({
79
79
  border: 'border-error focus-visible:ring-error'
80
80
  },
81
81
  link: {
82
- text: 'text-primary underline hover:no-underline active:no-underline focus-visible:no-underline',
82
+ text: 'text-primary font-normal underline hover:no-underline active:no-underline focus-visible:no-underline',
83
83
  background: '',
84
84
  border: 'border-none rounded-none focus-visible:ring-primary'
85
85
  },
package/esm/fw-button.js CHANGED
@@ -1,3 +1,3 @@
1
- export { s as FwButton } from './fw-button-430c8529.js';
1
+ export { s as FwButton } from './fw-button-54999a6e.js';
2
2
  import './style-inject.es-da8f7768.js';
3
3
  import 'vue';
package/esm/fw-input.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { o as descriptors, v as functionName, f as functionUncurryThis, x as objectDefineProperty, u as styleInject } from './style-inject.es-da8f7768.js';
2
- import { defineComponent, computed, createElementVNode, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, toDisplayString, createCommentVNode, renderSlot, mergeProps, Transition } from 'vue';
2
+ import { defineComponent, 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-028c6424.js';
4
4
 
5
5
  var script = defineComponent({
@@ -64,6 +64,13 @@ var script = defineComponent({
64
64
  readonly: {
65
65
  type: Boolean,
66
66
  "default": false
67
+ },
68
+
69
+ /**
70
+ * The hint text shown below the input
71
+ */
72
+ hint: {
73
+ type: String
67
74
  }
68
75
  },
69
76
  setup: function setup(props, ctx) {
@@ -115,21 +122,23 @@ var _hoisted_1 = {
115
122
  var _hoisted_2 = {
116
123
  "class": "flex flex-col"
117
124
  };
118
- var _hoisted_3 = ["for"];
119
- var _hoisted_4 = {
120
- "class": "relative"
125
+ var _hoisted_3 = {
126
+ "class": "flex flex-row justify-between"
121
127
  };
128
+ var _hoisted_4 = ["for"];
122
129
  var _hoisted_5 = {
123
- key: 0,
124
- "class": "flex text-grey-base absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
130
+ key: 1
131
+ };
132
+ var _hoisted_6 = {
133
+ "class": "relative"
125
134
  };
126
- var _hoisted_6 = ["placeholder", "type", "readonly", "disabled"];
127
135
  var _hoisted_7 = {
128
136
  key: 0,
129
- "class": "flex text-error absolute w-9 h-full inset-y-0 right-0 items-center pr-3 pointer-events-none"
137
+ "class": "flex text-black absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
130
138
  };
139
+ var _hoisted_8 = ["placeholder", "type", "readonly", "disabled"];
131
140
 
132
- var _hoisted_8 = /*#__PURE__*/createElementVNode("svg", {
141
+ var _hoisted_9 = /*#__PURE__*/createElementVNode("svg", {
133
142
  fill: "currentColor",
134
143
  "aria-hidden": "true",
135
144
  focusable: "false",
@@ -140,12 +149,20 @@ var _hoisted_8 = /*#__PURE__*/createElementVNode("svg", {
140
149
  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"
141
150
  })], -1);
142
151
 
143
- var _hoisted_9 = [_hoisted_8];
144
- var _hoisted_10 = {
145
- "class": "text-error italic text-right text-sm font-medium mt-2 min-h-[21px]"
146
- };
152
+ var _hoisted_10 = [_hoisted_9];
147
153
  var _hoisted_11 = {
148
- key: 0
154
+ key: 1,
155
+ "class": "flex text-black absolute w-10 h-full inset-y-0 right-0 items-center pr-3"
156
+ };
157
+ var _hoisted_12 = {
158
+ "class": "italic text-right text-sm font-medium mt-2 min-h-[21px]"
159
+ };
160
+ var _hoisted_13 = {
161
+ key: 0,
162
+ "class": "text-error"
163
+ };
164
+ var _hoisted_14 = {
165
+ key: 1
149
166
  };
150
167
  function render(_ctx, _cache, $props, $setup, $data, $options) {
151
168
  var _component_InputField = resolveComponent("InputField");
@@ -163,30 +180,35 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
163
180
  errors = _ref.errors,
164
181
  errorMessage = _ref.errorMessage,
165
182
  meta = _ref.meta;
166
- return [createElementVNode("div", _hoisted_2, [_ctx.label ? (openBlock(), createElementBlock("label", {
183
+ return [createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [_ctx.label ? (openBlock(), createElementBlock("label", {
167
184
  key: 0,
168
185
  "for": _ctx.name,
169
186
  "class": "block mb-2"
170
- }, toDisplayString(_ctx.label), 9, _hoisted_3)) : createCommentVNode("", true), createElementVNode("div", _hoisted_4, [_ctx.$slots.prefixIcon ? (openBlock(), createElementBlock("div", _hoisted_5, [renderSlot(_ctx.$slots, "prefixIcon")])) : createCommentVNode("", true), createElementVNode("input", mergeProps(field, {
187
+ }, 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, {
171
188
  placeholder: _ctx.placeholder,
172
189
  type: _ctx.type,
173
190
  readonly: _ctx.readonly,
174
191
  disabled: _ctx.readonly,
175
192
  "class": ["border-2 border-grey-lightest rounded-lg focus:outline-none focus:ring-2 focus:ring-primary block w-full p-2.5", {
176
- 'pl-10': !!_ctx.$slots.prefixIcon
193
+ 'pl-10': !!_ctx.$slots.prefix,
194
+ 'pr-20': !!_ctx.$slots.suffix
177
195
  }]
178
- }), null, 16, _hoisted_6), createVNode(Transition, {
179
- name: "errorFadeIn"
196
+ }), null, 16, _hoisted_8), createVNode(Transition, {
197
+ name: "fwFadeIn"
180
198
  }, {
181
199
  "default": withCtx(function () {
182
- return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("div", _hoisted_7, _hoisted_9)) : createCommentVNode("", true)];
200
+ return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("div", {
201
+ key: 0,
202
+ "class": normalizeClass(["flex text-error absolute w-9 h-full inset-y-0 right-0 items-center pr-3 pointer-events-none", _ctx.$slots.suffix ? 'mr-8' : ''])
203
+ }, _hoisted_10, 2)) : createCommentVNode("", true)];
183
204
  }),
184
205
  _: 2
185
- }, 1024)]), createElementVNode("div", _hoisted_10, [createVNode(Transition, {
186
- name: "errorFadeIn"
206
+ }, 1024), _ctx.$slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_11, [renderSlot(_ctx.$slots, "suffix")])) : createCommentVNode("", true)]), createElementVNode("div", _hoisted_12, [createVNode(Transition, {
207
+ name: "fwFadeIn",
208
+ mode: "out-in"
187
209
  }, {
188
210
  "default": withCtx(function () {
189
- return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(errorMessage || errors[0]), 1)) : createCommentVNode("", true)];
211
+ return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("span", _hoisted_13, toDisplayString(errorMessage || errors[0]), 1)) : _ctx.hint ? (openBlock(), createElementBlock("span", _hoisted_14, toDisplayString(_ctx.hint), 1)) : createCommentVNode("", true)];
190
212
  }),
191
213
  _: 2
192
214
  }, 1024)])])];
@@ -195,8 +217,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
195
217
  }, 8, ["modelValue", "name", "rules"])]);
196
218
  }
197
219
 
198
- var css_248z = ".errorFadeIn-enter-active{-webkit-animation:errorFadeIn .35s;animation:errorFadeIn .35s;-webkit-transition:opacity .35s ease-in;-o-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.errorFadeIn-leave-active{animation:errorFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;-o-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}@keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}";
199
- var stylesheet = ".errorFadeIn-enter-active{-webkit-animation:errorFadeIn .35s;animation:errorFadeIn .35s;-webkit-transition:opacity .35s ease-in;-o-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.errorFadeIn-leave-active{animation:errorFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;-o-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}@keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}";
220
+ 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}}";
221
+ 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}}";
200
222
  styleInject(css_248z);
201
223
 
202
224
  script.render = render;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, createElementVNode, resolveComponent, openBlock, createElementBlock, renderSlot, createCommentVNode, Fragment, renderList, createBlock, withCtx, createTextVNode, toDisplayString, createVNode, Transition } from 'vue';
2
- import { s as script$1 } from './fw-button-430c8529.js';
2
+ import { s as script$1 } from './fw-button-54999a6e.js';
3
3
  import { u as styleInject } from './style-inject.es-da8f7768.js';
4
4
 
5
5
  var script = defineComponent({
package/esm/index.js CHANGED
@@ -7,8 +7,8 @@ export { FwNavigationMenu } from './fw-navigation-menu.js';
7
7
  import './fw-form.js';
8
8
  import { FwInput as script$3 } from './fw-input.js';
9
9
  export { FwInput } from './fw-input.js';
10
- import { s as script$1 } from './fw-button-430c8529.js';
11
- export { s as FwButton } from './fw-button-430c8529.js';
10
+ import { s as script$1 } from './fw-button-54999a6e.js';
11
+ export { s as FwButton } from './fw-button-54999a6e.js';
12
12
  import { F as Form } from './vee-validate.esm-028c6424.js';
13
13
  export { F as FwForm } from './vee-validate.esm-028c6424.js';
14
14
  import 'vue';
@@ -1759,7 +1759,7 @@ var script$2 = defineComponent({
1759
1759
  border: 'border-error focus-visible:ring-error'
1760
1760
  },
1761
1761
  link: {
1762
- text: 'text-primary underline hover:no-underline active:no-underline focus-visible:no-underline',
1762
+ text: 'text-primary font-normal underline hover:no-underline active:no-underline focus-visible:no-underline',
1763
1763
  background: '',
1764
1764
  border: 'border-none rounded-none focus-visible:ring-primary'
1765
1765
  },
@@ -1985,7 +1985,7 @@ var _hoisted_11$1 = {
1985
1985
  key: 0,
1986
1986
  "class": "fw-nav-menu--mobile 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"
1987
1987
  };
1988
- var _hoisted_12 = {
1988
+ var _hoisted_12$1 = {
1989
1989
  "class": "w-full flex flex-col"
1990
1990
  };
1991
1991
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
@@ -2036,7 +2036,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
2036
2036
  "default": withCtx(function () {
2037
2037
  var _ctx$menuItems2;
2038
2038
 
2039
- return [((_ctx$menuItems2 = _ctx.menuItems) === null || _ctx$menuItems2 === void 0 ? void 0 : _ctx$menuItems2.length) > 0 && _ctx.isMobileMenuOpen ? (openBlock(), createElementBlock("div", _hoisted_11$1, [createElementVNode("div", _hoisted_12, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, function (item, i) {
2039
+ return [((_ctx$menuItems2 = _ctx.menuItems) === null || _ctx$menuItems2 === void 0 ? void 0 : _ctx$menuItems2.length) > 0 && _ctx.isMobileMenuOpen ? (openBlock(), createElementBlock("div", _hoisted_11$1, [createElementVNode("div", _hoisted_12$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, function (item, i) {
2040
2040
  return openBlock(), createBlock(_component_FwButton, {
2041
2041
  key: i,
2042
2042
  "class": "w-full rounded-md px-2",
@@ -5271,6 +5271,13 @@ var script = defineComponent({
5271
5271
  readonly: {
5272
5272
  type: Boolean,
5273
5273
  "default": false
5274
+ },
5275
+
5276
+ /**
5277
+ * The hint text shown below the input
5278
+ */
5279
+ hint: {
5280
+ type: String
5274
5281
  }
5275
5282
  },
5276
5283
  setup: function setup(props, ctx) {
@@ -5322,21 +5329,23 @@ var _hoisted_1 = {
5322
5329
  var _hoisted_2 = {
5323
5330
  "class": "flex flex-col"
5324
5331
  };
5325
- var _hoisted_3 = ["for"];
5326
- var _hoisted_4 = {
5327
- "class": "relative"
5332
+ var _hoisted_3 = {
5333
+ "class": "flex flex-row justify-between"
5328
5334
  };
5335
+ var _hoisted_4 = ["for"];
5329
5336
  var _hoisted_5 = {
5330
- key: 0,
5331
- "class": "flex text-grey-base absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
5337
+ key: 1
5338
+ };
5339
+ var _hoisted_6 = {
5340
+ "class": "relative"
5332
5341
  };
5333
- var _hoisted_6 = ["placeholder", "type", "readonly", "disabled"];
5334
5342
  var _hoisted_7 = {
5335
5343
  key: 0,
5336
- "class": "flex text-error absolute w-9 h-full inset-y-0 right-0 items-center pr-3 pointer-events-none"
5344
+ "class": "flex text-black absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
5337
5345
  };
5346
+ var _hoisted_8 = ["placeholder", "type", "readonly", "disabled"];
5338
5347
 
5339
- var _hoisted_8 = /*#__PURE__*/createElementVNode("svg", {
5348
+ var _hoisted_9 = /*#__PURE__*/createElementVNode("svg", {
5340
5349
  fill: "currentColor",
5341
5350
  "aria-hidden": "true",
5342
5351
  focusable: "false",
@@ -5347,12 +5356,20 @@ var _hoisted_8 = /*#__PURE__*/createElementVNode("svg", {
5347
5356
  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"
5348
5357
  })], -1);
5349
5358
 
5350
- var _hoisted_9 = [_hoisted_8];
5351
- var _hoisted_10 = {
5352
- "class": "text-error italic text-right text-sm font-medium mt-2 min-h-[21px]"
5353
- };
5359
+ var _hoisted_10 = [_hoisted_9];
5354
5360
  var _hoisted_11 = {
5355
- key: 0
5361
+ key: 1,
5362
+ "class": "flex text-black absolute w-10 h-full inset-y-0 right-0 items-center pr-3"
5363
+ };
5364
+ var _hoisted_12 = {
5365
+ "class": "italic text-right text-sm font-medium mt-2 min-h-[21px]"
5366
+ };
5367
+ var _hoisted_13 = {
5368
+ key: 0,
5369
+ "class": "text-error"
5370
+ };
5371
+ var _hoisted_14 = {
5372
+ key: 1
5356
5373
  };
5357
5374
  function render(_ctx, _cache, $props, $setup, $data, $options) {
5358
5375
  var _component_InputField = resolveComponent("InputField");
@@ -5370,30 +5387,35 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5370
5387
  errors = _ref.errors,
5371
5388
  errorMessage = _ref.errorMessage,
5372
5389
  meta = _ref.meta;
5373
- return [createElementVNode("div", _hoisted_2, [_ctx.label ? (openBlock(), createElementBlock("label", {
5390
+ return [createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [_ctx.label ? (openBlock(), createElementBlock("label", {
5374
5391
  key: 0,
5375
5392
  "for": _ctx.name,
5376
5393
  "class": "block mb-2"
5377
- }, toDisplayString(_ctx.label), 9, _hoisted_3)) : createCommentVNode("", true), createElementVNode("div", _hoisted_4, [_ctx.$slots.prefixIcon ? (openBlock(), createElementBlock("div", _hoisted_5, [renderSlot(_ctx.$slots, "prefixIcon")])) : createCommentVNode("", true), createElementVNode("input", mergeProps(field, {
5394
+ }, 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, {
5378
5395
  placeholder: _ctx.placeholder,
5379
5396
  type: _ctx.type,
5380
5397
  readonly: _ctx.readonly,
5381
5398
  disabled: _ctx.readonly,
5382
5399
  "class": ["border-2 border-grey-lightest rounded-lg focus:outline-none focus:ring-2 focus:ring-primary block w-full p-2.5", {
5383
- 'pl-10': !!_ctx.$slots.prefixIcon
5400
+ 'pl-10': !!_ctx.$slots.prefix,
5401
+ 'pr-20': !!_ctx.$slots.suffix
5384
5402
  }]
5385
- }), null, 16, _hoisted_6), createVNode(Transition, {
5386
- name: "errorFadeIn"
5403
+ }), null, 16, _hoisted_8), createVNode(Transition, {
5404
+ name: "fwFadeIn"
5387
5405
  }, {
5388
5406
  "default": withCtx(function () {
5389
- return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("div", _hoisted_7, _hoisted_9)) : createCommentVNode("", true)];
5407
+ return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("div", {
5408
+ key: 0,
5409
+ "class": normalizeClass(["flex text-error absolute w-9 h-full inset-y-0 right-0 items-center pr-3 pointer-events-none", _ctx.$slots.suffix ? 'mr-8' : ''])
5410
+ }, _hoisted_10, 2)) : createCommentVNode("", true)];
5390
5411
  }),
5391
5412
  _: 2
5392
- }, 1024)]), createElementVNode("div", _hoisted_10, [createVNode(Transition, {
5393
- name: "errorFadeIn"
5413
+ }, 1024), _ctx.$slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_11, [renderSlot(_ctx.$slots, "suffix")])) : createCommentVNode("", true)]), createElementVNode("div", _hoisted_12, [createVNode(Transition, {
5414
+ name: "fwFadeIn",
5415
+ mode: "out-in"
5394
5416
  }, {
5395
5417
  "default": withCtx(function () {
5396
- return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(errorMessage || errors[0]), 1)) : createCommentVNode("", true)];
5418
+ return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("span", _hoisted_13, toDisplayString(errorMessage || errors[0]), 1)) : _ctx.hint ? (openBlock(), createElementBlock("span", _hoisted_14, toDisplayString(_ctx.hint), 1)) : createCommentVNode("", true)];
5397
5419
  }),
5398
5420
  _: 2
5399
5421
  }, 1024)])])];
@@ -5402,8 +5424,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5402
5424
  }, 8, ["modelValue", "name", "rules"])]);
5403
5425
  }
5404
5426
 
5405
- var css_248z = ".errorFadeIn-enter-active{-webkit-animation:errorFadeIn .35s;animation:errorFadeIn .35s;-webkit-transition:opacity .35s ease-in;-o-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.errorFadeIn-leave-active{animation:errorFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;-o-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}@keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}";
5406
- var stylesheet = ".errorFadeIn-enter-active{-webkit-animation:errorFadeIn .35s;animation:errorFadeIn .35s;-webkit-transition:opacity .35s ease-in;-o-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.errorFadeIn-leave-active{animation:errorFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;-o-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}@keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}";
5427
+ 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}}";
5428
+ 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}}";
5407
5429
  styleInject(css_248z);
5408
5430
 
5409
5431
  script.render = render;
@@ -0,0 +1,3 @@
1
+ <svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 -64 640 640">
2
+ <path d="M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"/>
3
+ </svg>
package/icons/eye.svg ADDED
@@ -0,0 +1,8 @@
1
+ <svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 612 612">
2
+ <g>
3
+ <g>
4
+ <path d="M609.608,315.426c3.19-5.874,3.19-12.979,0-18.853c-58.464-107.643-172.5-180.72-303.607-180.72 S60.857,188.931,2.393,296.573c-3.19,5.874-3.19,12.979,0,18.853C60.858,423.069,174.892,496.147,306,496.147 S551.143,423.069,609.608,315.426z M306,451.855c-80.554,0-145.855-65.302-145.855-145.855S225.446,160.144,306,160.144 S451.856,225.446,451.856,306S386.554,451.855,306,451.855z"/>
5
+ <path d="M306,231.67c-6.136,0-12.095,0.749-17.798,2.15c5.841,6.76,9.383,15.563,9.383,25.198c0,21.3-17.267,38.568-38.568,38.568 c-9.635,0-18.438-3.541-25.198-9.383c-1.401,5.703-2.15,11.662-2.15,17.798c0,41.052,33.279,74.33,74.33,74.33 s74.33-33.279,74.33-74.33S347.052,231.67,306,231.67z"/>
6
+ </g>
7
+ </g>
8
+ </svg>
package/icons/index.ts CHANGED
@@ -5,6 +5,8 @@ import NotFoundSvg from './not-found.svg';
5
5
  import EmailFilledSvg from './email-filled.svg';
6
6
  import AlertSvg from './alert.svg';
7
7
  import LockSvg from './lock.svg';
8
+ import EyeSvg from './eye.svg';
9
+ import EyeCrossedSvg from './eye-crossed.svg';
8
10
 
9
11
  export {
10
12
  ViewSvg,
@@ -13,5 +15,7 @@ export {
13
15
  NotFoundSvg,
14
16
  EmailFilledSvg,
15
17
  AlertSvg,
16
- LockSvg
18
+ LockSvg,
19
+ EyeSvg,
20
+ EyeCrossedSvg
17
21
  };
package/index.d.ts CHANGED
@@ -220,6 +220,7 @@ interface FwInputProps {
220
220
  placeholder?: string;
221
221
  rules?: string | object | Function;
222
222
  readonly?: boolean;
223
+ hint?: string;
223
224
  }
224
225
  declare const _default: vue.DefineComponent<{
225
226
  /**
@@ -270,6 +271,12 @@ declare const _default: vue.DefineComponent<{
270
271
  type: BooleanConstructor;
271
272
  default: boolean;
272
273
  };
274
+ /**
275
+ * The hint text shown below the input
276
+ */
277
+ hint: {
278
+ type: StringConstructor;
279
+ };
273
280
  }, {
274
281
  inputValue: vue.WritableComputedRef<string>;
275
282
  }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
@@ -321,6 +328,12 @@ declare const _default: vue.DefineComponent<{
321
328
  type: BooleanConstructor;
322
329
  default: boolean;
323
330
  };
331
+ /**
332
+ * The hint text shown below the input
333
+ */
334
+ hint: {
335
+ type: StringConstructor;
336
+ };
324
337
  }>> & {
325
338
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
326
339
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frollo/frollo-web-ui",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "Frollo's UI library for components, utilities and configs",
5
5
  "exports": {
6
6
  "./icons": "./icons/index.ts",
@@ -8,6 +8,7 @@ export interface FwInputProps {
8
8
  placeholder?: string;
9
9
  rules?: string | object | Function;
10
10
  readonly?: boolean;
11
+ hint?: string;
11
12
  }
12
13
  declare const _default: import("vue").DefineComponent<{
13
14
  /**
@@ -58,6 +59,12 @@ declare const _default: import("vue").DefineComponent<{
58
59
  type: BooleanConstructor;
59
60
  default: boolean;
60
61
  };
62
+ /**
63
+ * The hint text shown below the input
64
+ */
65
+ hint: {
66
+ type: StringConstructor;
67
+ };
61
68
  }, {
62
69
  inputValue: import("vue").WritableComputedRef<string>;
63
70
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -109,6 +116,12 @@ declare const _default: import("vue").DefineComponent<{
109
116
  type: BooleanConstructor;
110
117
  default: boolean;
111
118
  };
119
+ /**
120
+ * The hint text shown below the input
121
+ */
122
+ hint: {
123
+ type: StringConstructor;
124
+ };
112
125
  }>> & {
113
126
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
114
127
  }, {
@@ -5,4 +5,6 @@ import NotFoundSvg from './not-found.svg';
5
5
  import EmailFilledSvg from './email-filled.svg';
6
6
  import AlertSvg from './alert.svg';
7
7
  import LockSvg from './lock.svg';
8
- export { ViewSvg, GenerateSvg, ManageSvg, NotFoundSvg, EmailFilledSvg, AlertSvg, LockSvg };
8
+ import EyeSvg from './eye.svg';
9
+ import EyeCrossedSvg from './eye-crossed.svg';
10
+ export { ViewSvg, GenerateSvg, ManageSvg, NotFoundSvg, EmailFilledSvg, AlertSvg, LockSvg, EyeSvg, EyeCrossedSvg };