@frollo/frollo-web-ui 0.0.12 → 0.0.13

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: {
@@ -1761,7 +1761,7 @@ var script$2 = defineComponent({
1761
1761
  link: {
1762
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
 
@@ -1988,12 +1988,12 @@ var _hoisted_11$1 = {
1988
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",
@@ -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: {
@@ -5323,27 +5323,27 @@ if (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {
5323
5323
  });
5324
5324
  }
5325
5325
 
5326
- var _hoisted_1 = {
5326
+ var _hoisted_1$1 = {
5327
5327
  "class": "fw-input w-full"
5328
5328
  };
5329
- var _hoisted_2 = {
5329
+ var _hoisted_2$1 = {
5330
5330
  "class": "flex flex-col"
5331
5331
  };
5332
- var _hoisted_3 = {
5332
+ var _hoisted_3$1 = {
5333
5333
  "class": "flex flex-row justify-between"
5334
5334
  };
5335
- var _hoisted_4 = ["for"];
5336
- var _hoisted_5 = {
5335
+ var _hoisted_4$1 = ["for"];
5336
+ var _hoisted_5$1 = {
5337
5337
  key: 1
5338
5338
  };
5339
- var _hoisted_6 = {
5339
+ var _hoisted_6$1 = {
5340
5340
  "class": "relative"
5341
5341
  };
5342
- var _hoisted_7 = {
5342
+ var _hoisted_7$1 = {
5343
5343
  key: 0,
5344
5344
  "class": "flex text-black absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
5345
5345
  };
5346
- var _hoisted_8 = ["placeholder", "type", "readonly", "disabled"];
5346
+ var _hoisted_8$1 = ["placeholder", "type", "readonly", "disabled"];
5347
5347
 
5348
5348
  var _hoisted_9 = /*#__PURE__*/createElementVNode("svg", {
5349
5349
  fill: "currentColor",
@@ -5371,10 +5371,10 @@ var _hoisted_13 = {
5371
5371
  var _hoisted_14 = {
5372
5372
  key: 1
5373
5373
  };
5374
- function render(_ctx, _cache, $props, $setup, $data, $options) {
5374
+ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
5375
5375
  var _component_InputField = resolveComponent("InputField");
5376
5376
 
5377
- return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_InputField, {
5377
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [createVNode(_component_InputField, {
5378
5378
  modelValue: _ctx.inputValue,
5379
5379
  "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
5380
5380
  return _ctx.inputValue = $event;
@@ -5387,11 +5387,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5387
5387
  errors = _ref.errors,
5388
5388
  errorMessage = _ref.errorMessage,
5389
5389
  meta = _ref.meta;
5390
- return [createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [_ctx.label ? (openBlock(), createElementBlock("label", {
5390
+ return [createElementVNode("div", _hoisted_2$1, [createElementVNode("div", _hoisted_3$1, [_ctx.label ? (openBlock(), createElementBlock("label", {
5391
5391
  key: 0,
5392
5392
  "for": _ctx.name,
5393
5393
  "class": "block mb-2"
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, {
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, {
5395
5395
  placeholder: _ctx.placeholder,
5396
5396
  type: _ctx.type,
5397
5397
  readonly: _ctx.readonly,
@@ -5400,7 +5400,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5400
5400
  'pl-10': !!_ctx.$slots.prefix,
5401
5401
  'pr-20': !!_ctx.$slots.suffix
5402
5402
  }]
5403
- }), null, 16, _hoisted_8), createVNode(Transition, {
5403
+ }), null, 16, _hoisted_8$1), createVNode(Transition, {
5404
5404
  name: "fwFadeIn"
5405
5405
  }, {
5406
5406
  "default": withCtx(function () {
@@ -5424,19 +5424,122 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5424
5424
  }, 8, ["modelValue", "name", "rules"])]);
5425
5425
  }
5426
5426
 
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}}";
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}";
5429
5531
  styleInject(css_248z);
5430
5532
 
5431
5533
  script.render = render;
5432
5534
 
5433
5535
  var components = /*#__PURE__*/Object.freeze({
5434
5536
  __proto__: null,
5435
- FwCard: script$3,
5436
- FwButton: script$2,
5437
- FwNavigationMenu: script$1,
5537
+ FwCard: script$4,
5538
+ FwButton: script$3,
5539
+ FwNavigationMenu: script$2,
5438
5540
  FwForm: Form,
5439
- FwInput: script
5541
+ FwInput: script$1,
5542
+ FwCheckbox: script
5440
5543
  });
5441
5544
 
5442
5545
  var install = function install(app) {
@@ -5449,4 +5552,4 @@ var install = function install(app) {
5449
5552
  });
5450
5553
  };
5451
5554
 
5452
- 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 };
package/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as vue from 'vue';
2
2
  import { PropType, Plugin } from 'vue';
3
3
  export { Form as FwForm } from 'vee-validate';
4
4
 
5
- declare const _default$3: vue.DefineComponent<{
5
+ declare const _default$4: vue.DefineComponent<{
6
6
  /**
7
7
  * The header title of the card
8
8
  */
@@ -73,7 +73,7 @@ interface FwButtonProps {
73
73
  variant?: ButtonVariantName;
74
74
  buttonType?: ButtonTypeAttribute;
75
75
  }
76
- declare const _default$2: vue.DefineComponent<{
76
+ declare const _default$3: vue.DefineComponent<{
77
77
  /**
78
78
  * A `router-link` path or object
79
79
  */
@@ -173,7 +173,7 @@ interface NavMenuItem {
173
173
  href?: string;
174
174
  label: string;
175
175
  }
176
- declare const _default$1: vue.DefineComponent<{
176
+ declare const _default$2: vue.DefineComponent<{
177
177
  /**
178
178
  * An array of menu items
179
179
  * `{ to?: string | object; href?: string; label: string; }`
@@ -222,7 +222,7 @@ interface FwInputProps {
222
222
  readonly?: boolean;
223
223
  hint?: string;
224
224
  }
225
- declare const _default: vue.DefineComponent<{
225
+ declare const _default$1: vue.DefineComponent<{
226
226
  /**
227
227
  * The input v-model
228
228
  */
@@ -343,8 +343,68 @@ declare const _default: vue.DefineComponent<{
343
343
  readonly: boolean;
344
344
  }>;
345
345
 
346
+ interface FwCheckboxProps {
347
+ name: string;
348
+ label?: string;
349
+ rules?: string | object | Function;
350
+ hint?: string;
351
+ }
352
+ declare const _default: vue.DefineComponent<{
353
+ /**
354
+ * The name of the input field. Must be unique per form.
355
+ */
356
+ name: {
357
+ type: StringConstructor;
358
+ required: true;
359
+ };
360
+ /**
361
+ * Label for the input. Also renders to an aria-label attribute
362
+ */
363
+ label: {
364
+ type: StringConstructor;
365
+ };
366
+ /**
367
+ * Validation rules. Accepts a string, object, function or schema.
368
+ */
369
+ rules: {
370
+ type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
371
+ };
372
+ /**
373
+ * The hint text shown below the input
374
+ */
375
+ hint: {
376
+ type: StringConstructor;
377
+ };
378
+ }, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
379
+ /**
380
+ * The name of the input field. Must be unique per form.
381
+ */
382
+ name: {
383
+ type: StringConstructor;
384
+ required: true;
385
+ };
386
+ /**
387
+ * Label for the input. Also renders to an aria-label attribute
388
+ */
389
+ label: {
390
+ type: StringConstructor;
391
+ };
392
+ /**
393
+ * Validation rules. Accepts a string, object, function or schema.
394
+ */
395
+ rules: {
396
+ type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
397
+ };
398
+ /**
399
+ * The hint text shown below the input
400
+ */
401
+ hint: {
402
+ type: StringConstructor;
403
+ };
404
+ }>>, {}>;
405
+
346
406
  declare const install: Exclude<Plugin['install'], undefined>;
347
407
 
348
408
  declare module '@frollo/frollo-web-ui/icons' { }
349
409
 
350
- export { ButtonDefinition, ButtonDefinitionList, ButtonSize, ButtonSizes, ButtonTypeAttribute, ButtonVariantName, _default$2 as FwButton, FwButtonProps, _default$3 as FwCard, _default as FwInput, FwInputProps, _default$1 as FwNavigationMenu, InputType, NavMenuItem, install as default };
410
+ export { ButtonDefinition, ButtonDefinitionList, ButtonSize, ButtonSizes, ButtonTypeAttribute, ButtonVariantName, _default$3 as FwButton, FwButtonProps, _default$4 as FwCard, _default as FwCheckbox, FwCheckboxProps, _default$1 as FwInput, FwInputProps, _default$2 as FwNavigationMenu, InputType, NavMenuItem, install as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frollo/frollo-web-ui",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Frollo's UI library for components, utilities and configs",
5
5
  "exports": {
6
6
  "./icons": "./icons/index.ts",
@@ -0,0 +1,60 @@
1
+ export interface FwCheckboxProps {
2
+ name: string;
3
+ label?: string;
4
+ rules?: string | object | Function;
5
+ hint?: string;
6
+ }
7
+ declare const _default: import("vue").DefineComponent<{
8
+ /**
9
+ * The name of the input field. Must be unique per form.
10
+ */
11
+ name: {
12
+ type: StringConstructor;
13
+ required: true;
14
+ };
15
+ /**
16
+ * Label for the input. Also renders to an aria-label attribute
17
+ */
18
+ label: {
19
+ type: StringConstructor;
20
+ };
21
+ /**
22
+ * Validation rules. Accepts a string, object, function or schema.
23
+ */
24
+ rules: {
25
+ type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
26
+ };
27
+ /**
28
+ * The hint text shown below the input
29
+ */
30
+ hint: {
31
+ type: StringConstructor;
32
+ };
33
+ }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
34
+ /**
35
+ * The name of the input field. Must be unique per form.
36
+ */
37
+ name: {
38
+ type: StringConstructor;
39
+ required: true;
40
+ };
41
+ /**
42
+ * Label for the input. Also renders to an aria-label attribute
43
+ */
44
+ label: {
45
+ type: StringConstructor;
46
+ };
47
+ /**
48
+ * Validation rules. Accepts a string, object, function or schema.
49
+ */
50
+ rules: {
51
+ type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
52
+ };
53
+ /**
54
+ * The hint text shown below the input
55
+ */
56
+ hint: {
57
+ type: StringConstructor;
58
+ };
59
+ }>>, {}>;
60
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import FwCheckbox from './fw-checkbox.vue';
2
+ export { FwCheckbox };
@@ -3,3 +3,4 @@ export * from './fw-button';
3
3
  export * from './fw-navigation-menu';
4
4
  export * from './fw-form';
5
5
  export * from './fw-input';
6
+ export * from './fw-checkbox';
@@ -6,3 +6,4 @@ export * from './components/fw-card/fw-card.vue';
6
6
  export * from './components/fw-button/fw-button.vue';
7
7
  export * from './components/fw-navigation-menu/fw-navigation-menu.vue';
8
8
  export * from './components/fw-input/fw-input.vue';
9
+ export * from './components/fw-checkbox/fw-checkbox.vue';