@frollo/frollo-web-ui 0.0.11 → 0.0.14

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.
@@ -1459,7 +1459,7 @@ $$1({ target: 'Object', stat: true }, {
1459
1459
  }
1460
1460
  });
1461
1461
 
1462
- var script$3 = defineComponent({
1462
+ var script$4 = defineComponent({
1463
1463
  name: 'FwCard',
1464
1464
  props: {
1465
1465
  /**
@@ -1500,22 +1500,22 @@ var script$3 = defineComponent({
1500
1500
  }
1501
1501
  });
1502
1502
 
1503
- var _hoisted_1$2 = {
1503
+ var _hoisted_1$3 = {
1504
1504
  key: 0,
1505
1505
  "class": "fw-card--header text-lg px-8 py-4 font-bold bg-grey-lightest rounded-t-lg border-opacity-0"
1506
1506
  };
1507
- var _hoisted_2$2 = {
1507
+ var _hoisted_2$3 = {
1508
1508
  key: 0,
1509
1509
  "class": "fw-card--prefix-title text-primary"
1510
1510
  };
1511
- var _hoisted_3$2 = {
1511
+ var _hoisted_3$3 = {
1512
1512
  key: 1
1513
1513
  };
1514
- var _hoisted_4$2 = {
1514
+ var _hoisted_4$3 = {
1515
1515
  key: 1,
1516
1516
  "class": "p-8"
1517
1517
  };
1518
- function render$3(_ctx, _cache, $props, $setup, $data, $options) {
1518
+ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
1519
1519
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.componentName), {
1520
1520
  to: _ctx.to ? _ctx.to : null,
1521
1521
  href: _ctx.href ? _ctx.href : null,
@@ -1523,13 +1523,13 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
1523
1523
  "class": normalizeClass(["fw-card shadow-card rounded-lg", _ctx.to || _ctx.href ? 'block cursor-pointer focus:outline-none ring-offset-3 focus:ring focus:ring-primary transform-none transition-transform hover:-translate-y-1' : ''])
1524
1524
  }, {
1525
1525
  "default": withCtx(function () {
1526
- return [_ctx.title || _ctx.prefixTitle ? (openBlock(), createElementBlock("h4", _hoisted_1$2, [_ctx.prefixTitle ? (openBlock(), createElementBlock("span", _hoisted_2$2, toDisplayString(_ctx.prefixTitle), 1)) : createCommentVNode("", true), _ctx.title ? (openBlock(), createElementBlock("span", _hoisted_3$2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)])) : createCommentVNode("", true), _ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_4$2, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)];
1526
+ return [_ctx.title || _ctx.prefixTitle ? (openBlock(), createElementBlock("h4", _hoisted_1$3, [_ctx.prefixTitle ? (openBlock(), createElementBlock("span", _hoisted_2$3, toDisplayString(_ctx.prefixTitle), 1)) : createCommentVNode("", true), _ctx.title ? (openBlock(), createElementBlock("span", _hoisted_3$3, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)])) : createCommentVNode("", true), _ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_4$3, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)];
1527
1527
  }),
1528
1528
  _: 3
1529
1529
  }, 8, ["to", "href", "tabindex", "class"]);
1530
1530
  }
1531
1531
 
1532
- script$3.render = render$3;
1532
+ script$4.render = render$4;
1533
1533
 
1534
1534
  var es_array_includes = {};
1535
1535
 
@@ -1681,7 +1681,7 @@ $({ target: 'Array', proto: true }, {
1681
1681
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1682
1682
  addToUnscopables('includes');
1683
1683
 
1684
- var script$2 = defineComponent({
1684
+ var script$3 = defineComponent({
1685
1685
  name: 'FwButton',
1686
1686
  emits: ['click', 'mouseover', 'mouseout', 'focusin', 'focusout'],
1687
1687
  props: {
@@ -1759,9 +1759,9 @@ 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
- border: 'border-none rounded-none focus-visible:ring-primary'
1764
+ border: 'border-none focus-visible:ring-primary'
1765
1765
  },
1766
1766
  text: {
1767
1767
  text: 'text-body font-medium hover:text-white active:text-white',
@@ -1848,9 +1848,9 @@ var script$2 = defineComponent({
1848
1848
  }
1849
1849
  });
1850
1850
 
1851
- function render$2(_ctx, _cache, $props, $setup, $data, $options) {
1851
+ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
1852
1852
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), {
1853
- "class": normalizeClass(["fw-button font-bold cursor-pointer whitespace-nowrap rounded-full border-2 focus:outline-0 focus-visible:outline-0 focus:ring-none ring-offset-2 focus-visible:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass, _ctx.variant === 'link' ? 'pl-0 pr-0 pt-0 pb-0' : '']]),
1853
+ "class": normalizeClass(["fw-button cursor-pointer whitespace-nowrap border-2 focus:outline-0 focus-visible:outline-0 focus:ring-none ring-offset-2 focus-visible:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass, _ctx.variant === 'link' ? 'pl-0 pr-0 pt-0 pb-0 rounded-none font-normal' : 'font-bold rounded-full']]),
1854
1854
  type: _ctx.tagName === 'button' ? _ctx.buttonType : null,
1855
1855
  to: _ctx.to ? _ctx.to : null,
1856
1856
  href: _ctx.href ? _ctx.href : null,
@@ -1895,17 +1895,17 @@ function styleInject(css, ref) {
1895
1895
  }
1896
1896
  }
1897
1897
 
1898
- var css_248z$2 = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
1899
- var stylesheet$2 = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
1900
- styleInject(css_248z$2);
1898
+ var css_248z$3 = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
1899
+ var stylesheet$3 = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
1900
+ styleInject(css_248z$3);
1901
1901
 
1902
- script$2.render = render$2;
1902
+ script$3.render = render$3;
1903
1903
 
1904
- var script$1 = defineComponent({
1904
+ var script$2 = defineComponent({
1905
1905
  name: 'FwNavigationMenu',
1906
1906
  emits: ['action'],
1907
1907
  components: {
1908
- FwButton: script$2
1908
+ FwButton: script$3
1909
1909
  },
1910
1910
  props: {
1911
1911
  /**
@@ -1943,32 +1943,32 @@ var script$1 = defineComponent({
1943
1943
  }
1944
1944
  });
1945
1945
 
1946
- var _hoisted_1$1 = {
1946
+ var _hoisted_1$2 = {
1947
1947
  "class": "fw-nav-menu relative z-50 h-20 shadow-md"
1948
1948
  };
1949
- var _hoisted_2$1 = {
1949
+ var _hoisted_2$2 = {
1950
1950
  "class": "px-6 flex-1 h-full flex bg-white items-stretch justify-between"
1951
1951
  };
1952
- var _hoisted_3$1 = {
1952
+ var _hoisted_3$2 = {
1953
1953
  key: 0,
1954
1954
  "class": "flex-shrink-0 flex items-center"
1955
1955
  };
1956
- var _hoisted_4$1 = {
1956
+ var _hoisted_4$2 = {
1957
1957
  key: 1,
1958
1958
  "class": "container hidden sm:flex items-center justify-start sm:ml-6"
1959
1959
  };
1960
- var _hoisted_5$1 = {
1960
+ var _hoisted_5$2 = {
1961
1961
  "class": "flex space-x-2"
1962
1962
  };
1963
- var _hoisted_6$1 = {
1963
+ var _hoisted_6$2 = {
1964
1964
  key: 2,
1965
1965
  "class": "hidden sm:flex items-center justify-start sm:ml-6"
1966
1966
  };
1967
- var _hoisted_7$1 = {
1967
+ var _hoisted_7$2 = {
1968
1968
  "class": "flex items-center sm:hidden"
1969
1969
  };
1970
1970
 
1971
- var _hoisted_8$1 = /*#__PURE__*/createElementVNode("span", {
1971
+ var _hoisted_8$2 = /*#__PURE__*/createElementVNode("span", {
1972
1972
  "class": "sr-only"
1973
1973
  }, "Open main menu", -1);
1974
1974
 
@@ -1985,15 +1985,15 @@ 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
- function render$1(_ctx, _cache, $props, $setup, $data, $options) {
1991
+ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
1992
1992
  var _ctx$menuItems;
1993
1993
 
1994
1994
  var _component_FwButton = resolveComponent("FwButton");
1995
1995
 
1996
- return openBlock(), createElementBlock("nav", _hoisted_1$1, [createElementVNode("div", _hoisted_2$1, [_ctx.$slots.logo ? (openBlock(), createElementBlock("div", _hoisted_3$1, [renderSlot(_ctx.$slots, "logo")])) : createCommentVNode("", true), ((_ctx$menuItems = _ctx.menuItems) === null || _ctx$menuItems === void 0 ? void 0 : _ctx$menuItems.length) > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$1, [createElementVNode("div", _hoisted_5$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, function (item, i) {
1996
+ return openBlock(), createElementBlock("nav", _hoisted_1$2, [createElementVNode("div", _hoisted_2$2, [_ctx.$slots.logo ? (openBlock(), createElementBlock("div", _hoisted_3$2, [renderSlot(_ctx.$slots, "logo")])) : createCommentVNode("", true), ((_ctx$menuItems = _ctx.menuItems) === null || _ctx$menuItems === void 0 ? void 0 : _ctx$menuItems.length) > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$2, [createElementVNode("div", _hoisted_5$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, function (item, i) {
1997
1997
  return openBlock(), createBlock(_component_FwButton, {
1998
1998
  key: i,
1999
1999
  variant: "text",
@@ -2007,7 +2007,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
2007
2007
  }),
2008
2008
  _: 2
2009
2009
  }, 1032, ["href", "to"]);
2010
- }), 128))])])) : createCommentVNode("", true), _ctx.actionLabel ? (openBlock(), createElementBlock("div", _hoisted_6$1, [createVNode(_component_FwButton, {
2010
+ }), 128))])])) : createCommentVNode("", true), _ctx.actionLabel ? (openBlock(), createElementBlock("div", _hoisted_6$2, [createVNode(_component_FwButton, {
2011
2011
  onClick: _ctx.actionClicked,
2012
2012
  size: "md",
2013
2013
  "aria-label": _ctx.actionLabel
@@ -2016,13 +2016,13 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
2016
2016
  return [createTextVNode(toDisplayString(_ctx.actionLabel), 1)];
2017
2017
  }),
2018
2018
  _: 1
2019
- }, 8, ["onClick", "aria-label"])])) : createCommentVNode("", true), createElementVNode("div", _hoisted_7$1, [createVNode(_component_FwButton, {
2019
+ }, 8, ["onClick", "aria-label"])])) : createCommentVNode("", true), createElementVNode("div", _hoisted_7$2, [createVNode(_component_FwButton, {
2020
2020
  variant: "text",
2021
2021
  size: "sm",
2022
2022
  onClick: _ctx.toggleMobileMenu
2023
2023
  }, {
2024
2024
  "default": withCtx(function () {
2025
- return [_hoisted_8$1, (openBlock(), createElementBlock("svg", _hoisted_9$1, [createElementVNode("path", {
2025
+ return [_hoisted_8$2, (openBlock(), createElementBlock("svg", _hoisted_9$1, [createElementVNode("path", {
2026
2026
  "stroke-linecap": "round",
2027
2027
  "stroke-linejoin": "round",
2028
2028
  "stroke-width": "2",
@@ -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",
@@ -2067,11 +2067,11 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
2067
2067
  })]);
2068
2068
  }
2069
2069
 
2070
- var css_248z$1 = ".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}}";
2071
- var stylesheet$1 = ".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}}";
2072
- styleInject(css_248z$1);
2070
+ var css_248z$2 = ".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}}";
2071
+ var stylesheet$2 = ".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}}";
2072
+ styleInject(css_248z$2);
2073
2073
 
2074
- script$1.render = render$1;
2074
+ script$2.render = render$2;
2075
2075
 
2076
2076
  function getDevtoolsGlobalHook() {
2077
2077
  return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
@@ -5209,7 +5209,7 @@ function useSubmitForm(cb) {
5209
5209
  };
5210
5210
  }
5211
5211
 
5212
- var script = defineComponent({
5212
+ var script$1 = defineComponent({
5213
5213
  name: 'FwInput',
5214
5214
  emits: ['update:modelValue'],
5215
5215
  components: {
@@ -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) {
@@ -5316,27 +5323,29 @@ if (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {
5316
5323
  });
5317
5324
  }
5318
5325
 
5319
- var _hoisted_1 = {
5326
+ var _hoisted_1$1 = {
5320
5327
  "class": "fw-input w-full"
5321
5328
  };
5322
- var _hoisted_2 = {
5329
+ var _hoisted_2$1 = {
5323
5330
  "class": "flex flex-col"
5324
5331
  };
5325
- var _hoisted_3 = ["for"];
5326
- var _hoisted_4 = {
5327
- "class": "relative"
5332
+ var _hoisted_3$1 = {
5333
+ "class": "flex flex-row justify-between"
5328
5334
  };
5329
- 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"
5335
+ var _hoisted_4$1 = ["for"];
5336
+ var _hoisted_5$1 = {
5337
+ key: 1
5332
5338
  };
5333
- var _hoisted_6 = ["placeholder", "type", "readonly", "disabled"];
5334
- var _hoisted_7 = {
5339
+ var _hoisted_6$1 = {
5340
+ "class": "relative"
5341
+ };
5342
+ var _hoisted_7$1 = {
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$1 = ["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,17 +5356,25 @@ 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"
5356
5363
  };
5357
- function render(_ctx, _cache, $props, $setup, $data, $options) {
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
5373
+ };
5374
+ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
5358
5375
  var _component_InputField = resolveComponent("InputField");
5359
5376
 
5360
- return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_InputField, {
5377
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [createVNode(_component_InputField, {
5361
5378
  modelValue: _ctx.inputValue,
5362
5379
  "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
5363
5380
  return _ctx.inputValue = $event;
@@ -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$1, [createElementVNode("div", _hoisted_3$1, [_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$1)) : createCommentVNode("", true), _ctx.$slots.action ? (openBlock(), createElementBlock("div", _hoisted_5$1, [renderSlot(_ctx.$slots, "action")])) : createCommentVNode("", true)]), createElementVNode("div", _hoisted_6$1, [_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_7$1, [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$1), 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,19 +5424,122 @@ 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$1 = ".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$1 = ".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}}";
5429
+ styleInject(css_248z$1);
5430
+
5431
+ script$1.render = render$1;
5432
+
5433
+ var script = defineComponent({
5434
+ name: 'FwCheckbox',
5435
+ components: {
5436
+ InputField: Field
5437
+ },
5438
+ props: {
5439
+ /**
5440
+ * The name of the input field. Must be unique per form.
5441
+ */
5442
+ name: {
5443
+ type: String,
5444
+ required: true
5445
+ },
5446
+
5447
+ /**
5448
+ * Label for the input. Also renders to an aria-label attribute
5449
+ */
5450
+ label: {
5451
+ type: String
5452
+ },
5453
+
5454
+ /**
5455
+ * Validation rules. Accepts a string, object, function or schema.
5456
+ */
5457
+ rules: {
5458
+ type: [String, Object, Function]
5459
+ },
5460
+
5461
+ /**
5462
+ * The hint text shown below the input
5463
+ */
5464
+ hint: {
5465
+ type: String
5466
+ }
5467
+ }
5468
+ });
5469
+
5470
+ var _hoisted_1 = {
5471
+ "class": "fw-checkbox w-full"
5472
+ };
5473
+ var _hoisted_2 = {
5474
+ "class": "flex flex-col"
5475
+ };
5476
+ var _hoisted_3 = ["for"];
5477
+ var _hoisted_4 = ["value", "name"];
5478
+ var _hoisted_5 = ["innerHTML"];
5479
+ var _hoisted_6 = {
5480
+ "class": "italic text-sm font-medium min-h-[21px]"
5481
+ };
5482
+ var _hoisted_7 = {
5483
+ key: 0,
5484
+ "class": "text-error"
5485
+ };
5486
+ var _hoisted_8 = {
5487
+ key: 1
5488
+ };
5489
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
5490
+ var _component_InputField = resolveComponent("InputField");
5491
+
5492
+ return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_InputField, {
5493
+ name: _ctx.name,
5494
+ value: _ctx.name,
5495
+ type: "checkbox",
5496
+ rules: _ctx.rules
5497
+ }, {
5498
+ "default": withCtx(function (_ref) {
5499
+ var field = _ref.field,
5500
+ errors = _ref.errors,
5501
+ errorMessage = _ref.errorMessage,
5502
+ meta = _ref.meta;
5503
+ return [createElementVNode("div", _hoisted_2, [_ctx.label ? (openBlock(), createElementBlock("label", {
5504
+ key: 0,
5505
+ "for": _ctx.name,
5506
+ "class": "inline-flex items-center mb-3"
5507
+ }, [createElementVNode("input", mergeProps(field, {
5508
+ value: _ctx.name,
5509
+ name: _ctx.name,
5510
+ type: "checkbox",
5511
+ "class": "text-primary w-6 h-6 cursor-pointer bg-white border-grey-light border rounded"
5512
+ }), null, 16, _hoisted_4), createElementVNode("span", {
5513
+ "class": "ml-2",
5514
+ innerHTML: _ctx.label
5515
+ }, null, 8, _hoisted_5)], 8, _hoisted_3)) : createCommentVNode("", true), createElementVNode("div", _hoisted_6, [createVNode(Transition, {
5516
+ name: "fwFadeIn",
5517
+ mode: "out-in"
5518
+ }, {
5519
+ "default": withCtx(function () {
5520
+ return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(errorMessage || errors[0]), 1)) : _ctx.hint ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(_ctx.hint), 1)) : createCommentVNode("", true)];
5521
+ }),
5522
+ _: 2
5523
+ }, 1024)])])];
5524
+ }),
5525
+ _: 1
5526
+ }, 8, ["name", "value", "rules"])]);
5527
+ }
5528
+
5529
+ 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}}.fw-checkbox input{-webkit-print-color-adjust:exact;-ms-flex-negative:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-origin:border-box;color-adjust:exact;display:inline-block;flex-shrink:0;-webkit-transition:background .2s ease-in;-o-transition:background .2s ease-in;transition:background .2s ease-in;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}.fw-checkbox input:checked{background-color:currentColor;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='3 3 10 10' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.707 7.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L7 8.586 5.707 7.293z'/%3E%3C/svg%3E\");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}";
5530
+ 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}}.fw-checkbox input{-webkit-print-color-adjust:exact;-ms-flex-negative:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-origin:border-box;color-adjust:exact;display:inline-block;flex-shrink:0;-webkit-transition:background .2s ease-in;-o-transition:background .2s ease-in;transition:background .2s ease-in;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}.fw-checkbox input:checked{background-color:currentColor;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='3 3 10 10' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.707 7.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L7 8.586 5.707 7.293z'/%3E%3C/svg%3E\");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}";
5407
5531
  styleInject(css_248z);
5408
5532
 
5409
5533
  script.render = render;
5410
5534
 
5411
5535
  var components = /*#__PURE__*/Object.freeze({
5412
5536
  __proto__: null,
5413
- FwCard: script$3,
5414
- FwButton: script$2,
5415
- FwNavigationMenu: script$1,
5537
+ FwCard: script$4,
5538
+ FwButton: script$3,
5539
+ FwNavigationMenu: script$2,
5416
5540
  FwForm: Form,
5417
- FwInput: script
5541
+ FwInput: script$1,
5542
+ FwCheckbox: script
5418
5543
  });
5419
5544
 
5420
5545
  var install = function install(app) {
@@ -5427,4 +5552,4 @@ var install = function install(app) {
5427
5552
  });
5428
5553
  };
5429
5554
 
5430
- export { script$2 as FwButton, script$3 as FwCard, Form as FwForm, script as FwInput, script$1 as FwNavigationMenu, install as default };
5555
+ export { script$3 as FwButton, script$4 as FwCard, script as FwCheckbox, Form as FwForm, script$1 as FwInput, script$2 as FwNavigationMenu, install as default };
@@ -0,0 +1,4 @@
1
+ <svg viewBox="0 0 18 18" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M16 13H11.8281L10.4141 14.4141C10.0375 14.7906 9.53438 15 9 15C8.46562 15 7.96375 14.792 7.58594 14.4141L6.17188 13H2C1.44781 13 1 13.4478 1 14V17C1 17.5522 1.44781 18 2 18H16C16.5522 18 17 17.5522 17 17V14C17 13.4469 16.5531 13 16 13ZM14.5 16.25C14.0875 16.25 13.75 15.9125 13.75 15.5C13.75 15.0875 14.0875 14.75 14.5 14.75C14.9125 14.75 15.25 15.0875 15.25 15.5C15.25 15.9125 14.9125 16.25 14.5 16.25Z" />
3
+ <path d="M4.29273 8.70625C3.90242 8.31563 3.90242 7.68281 4.29273 7.29219C4.68336 6.90156 5.31648 6.90156 5.7068 7.29219L7.99898 9.5875V2C7.99898 1.44781 8.4468 1 8.99898 1C9.55117 1 9.99898 1.44781 9.99898 2V9.5875L12.2921 7.29437C12.6824 6.90375 13.3155 6.90375 13.7062 7.29437C14.0965 7.685 14.0965 8.31781 13.7062 8.70844L9.70617 12.7084C9.51148 12.9031 9.25523 13 8.99898 13C8.74273 13 8.48711 12.9023 8.29211 12.707L4.29273 8.70625Z" />
4
+ </svg>
@@ -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>
@@ -0,0 +1,3 @@
1
+ <svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
2
+ <path d="M528 32h-480C21.49 32 0 53.49 0 80V96h576V80C576 53.49 554.5 32 528 32zM0 432C0 458.5 21.49 480 48 480h480c26.51 0 48-21.49 48-48V128H0V432zM368 192h128C504.8 192 512 199.2 512 208S504.8 224 496 224h-128C359.2 224 352 216.8 352 208S359.2 192 368 192zM368 256h128C504.8 256 512 263.2 512 272S504.8 288 496 288h-128C359.2 288 352 280.8 352 272S359.2 256 368 256zM368 320h128c8.836 0 16 7.164 16 16S504.8 352 496 352h-128c-8.836 0-16-7.164-16-16S359.2 320 368 320zM176 192c35.35 0 64 28.66 64 64s-28.65 64-64 64s-64-28.66-64-64S140.7 192 176 192zM112 352h128c26.51 0 48 21.49 48 48c0 8.836-7.164 16-16 16h-192C71.16 416 64 408.8 64 400C64 373.5 85.49 352 112 352z"></path>
3
+ </svg>
package/icons/index.ts CHANGED
@@ -5,6 +5,11 @@ 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';
10
+ import DownloadSvg from './download.svg';
11
+ import IdCardSvg from './id-card.svg';
12
+ import InfoCircleSvg from './info-circle.svg';
8
13
 
9
14
  export {
10
15
  ViewSvg,
@@ -13,5 +18,10 @@ export {
13
18
  NotFoundSvg,
14
19
  EmailFilledSvg,
15
20
  AlertSvg,
16
- LockSvg
21
+ LockSvg,
22
+ EyeSvg,
23
+ EyeCrossedSvg,
24
+ DownloadSvg,
25
+ IdCardSvg,
26
+ InfoCircleSvg
17
27
  };
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8 0C3.58125 0 0 3.58125 0 8C0 12.4187 3.58125 16 8 16C12.4187 16 16 12.4187 16 8C16 3.58125 12.4187 0 8 0ZM8 4C8.55219 4 9 4.44781 9 5C9 5.55219 8.55219 6 8 6C7.44781 6 7 5.55312 7 5C7 4.44688 7.44688 4 8 4ZM9.25 12H6.75C6.3375 12 6 11.6656 6 11.25C6 10.8344 6.33594 10.5 6.75 10.5H7.25V8.5H7C6.58594 8.5 6.25 8.16406 6.25 7.75C6.25 7.33594 6.5875 7 7 7H8C8.41406 7 8.75 7.33594 8.75 7.75V10.5H9.25C9.66406 10.5 10 10.8359 10 11.25C10 11.6641 9.66562 12 9.25 12Z" />
3
+ </svg>