@frollo/frollo-web-ui 0.0.3 → 0.0.6

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
@@ -1259,7 +1259,7 @@ $$1({ target: 'Object', stat: true }, {
1259
1259
  entries: function entries(O) {
1260
1260
  return $entries(O);
1261
1261
  }
1262
- });var script$1 = vue.defineComponent({
1262
+ });var script$2 = vue.defineComponent({
1263
1263
  name: 'FwCard',
1264
1264
  props: {
1265
1265
  /**
@@ -1279,24 +1279,24 @@ $$1({ target: 'Object', stat: true }, {
1279
1279
  });var _hoisted_1$1 = {
1280
1280
  "class": "fw-card shadow rounded-lg"
1281
1281
  };
1282
- var _hoisted_2 = {
1282
+ var _hoisted_2$1 = {
1283
1283
  key: 0,
1284
1284
  "class": "fw-card--header text-lg px-8 py-4 font-bold bg-grey-lightest rounded-t-lg border-opacity-0"
1285
1285
  };
1286
- var _hoisted_3 = {
1286
+ var _hoisted_3$1 = {
1287
1287
  key: 0,
1288
1288
  "class": "fw-card--prefix-title text-primary"
1289
1289
  };
1290
- var _hoisted_4 = {
1290
+ var _hoisted_4$1 = {
1291
1291
  key: 1
1292
1292
  };
1293
- var _hoisted_5 = {
1293
+ var _hoisted_5$1 = {
1294
1294
  key: 1,
1295
1295
  "class": "p-8"
1296
1296
  };
1297
- function render$1(_ctx, _cache, $props, $setup, $data, $options) {
1298
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [_ctx.title || _ctx.prefixTitle ? (vue.openBlock(), vue.createElementBlock("h4", _hoisted_2, [_ctx.prefixTitle ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3, vue.toDisplayString(_ctx.prefixTitle), 1)) : vue.createCommentVNode("", true), _ctx.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true), _ctx.$slots["default"] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [vue.renderSlot(_ctx.$slots, "default")])) : vue.createCommentVNode("", true)]);
1299
- }script$1.render = render$1;var es_array_includes = {};var objectDefineProperties = {};var DESCRIPTORS = descriptors;
1297
+ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
1298
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [_ctx.title || _ctx.prefixTitle ? (vue.openBlock(), vue.createElementBlock("h4", _hoisted_2$1, [_ctx.prefixTitle ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$1, vue.toDisplayString(_ctx.prefixTitle), 1)) : vue.createCommentVNode("", true), _ctx.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$1, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true), _ctx.$slots["default"] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, [vue.renderSlot(_ctx.$slots, "default")])) : vue.createCommentVNode("", true)]);
1299
+ }script$2.render = render$2;var es_array_includes = {};var objectDefineProperties = {};var DESCRIPTORS = descriptors;
1300
1300
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1301
1301
  var definePropertyModule$1 = objectDefineProperty;
1302
1302
  var anObject$1 = anObject$4;
@@ -1432,7 +1432,7 @@ $({ target: 'Array', proto: true }, {
1432
1432
  });
1433
1433
 
1434
1434
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1435
- addToUnscopables('includes');var script = vue.defineComponent({
1435
+ addToUnscopables('includes');var script$1 = vue.defineComponent({
1436
1436
  name: 'FwButton',
1437
1437
  emits: ['click', 'mouseover', 'mouseout', 'focusin', 'focusout'],
1438
1438
  props: {
@@ -1467,7 +1467,7 @@ addToUnscopables('includes');var script = vue.defineComponent({
1467
1467
  type: String,
1468
1468
  "default": 'primary',
1469
1469
  validator: function validator(value) {
1470
- return ['primary', 'secondary', 'tertiary', 'error', 'success'].includes(value);
1470
+ return ['primary', 'secondary', 'tertiary', 'error', 'success', 'text'].includes(value);
1471
1471
  }
1472
1472
  }
1473
1473
  },
@@ -1479,9 +1479,9 @@ addToUnscopables('includes');var script = vue.defineComponent({
1479
1479
  border: 'border-primary focus:ring-primary'
1480
1480
  },
1481
1481
  secondary: {
1482
- text: 'text-secondary hover:text-tertiary active:text-tertiary',
1483
- background: 'bg-tertiary hover:bg-secondary active:bg-secondary',
1484
- border: 'border-secondary focus:ring-secondary'
1482
+ text: 'text-primary hover:text-tertiary active:text-tertiary',
1483
+ background: 'bg-tertiary hover:bg-primary active:bg-primary',
1484
+ border: 'border-primary focus:ring-primary'
1485
1485
  },
1486
1486
  tertiary: {
1487
1487
  text: 'text-tertiary hover:text-secondary active:text-secondary',
@@ -1497,14 +1497,19 @@ addToUnscopables('includes');var script = vue.defineComponent({
1497
1497
  text: 'text-white hover:text-error active:text-error',
1498
1498
  background: 'bg-error hover:bg-white active:bg-white',
1499
1499
  border: 'border-error focus:ring-error'
1500
+ },
1501
+ text: {
1502
+ text: 'text-body font-medium hover:text-white active:text-white',
1503
+ background: 'bg-white hover:bg-body active:bg-body',
1504
+ border: 'border-transparent focus:ring-body'
1500
1505
  }
1501
1506
  });
1502
1507
  var sizes = vue.ref({
1503
- sm: 'px-16 py-0.5 text-sm leading-tight',
1504
- md: 'px-24 py-1 text-md leading-tight',
1505
- lg: 'px-32 py-1.5 text-lg leading-tight',
1506
- xl: 'px-40 py-2 text-xl leading-none',
1507
- '2xl': 'px-48 py-3 text-2xl leading-normal'
1508
+ sm: 'px-2 py-0.5 text-sm',
1509
+ md: 'px-6 py-1 text-md',
1510
+ lg: 'px-10 py-2 text-lg',
1511
+ xl: 'px-12 py-3 text-xl',
1512
+ '2xl': 'px-16 py-4 text-2xl'
1508
1513
  });
1509
1514
  var textColorClass = vue.computed(function () {
1510
1515
  return buttonClasses.value[props.variant].text;
@@ -1558,6 +1563,11 @@ addToUnscopables('includes');var script = vue.defineComponent({
1558
1563
  return ctx.emit('focusout', e);
1559
1564
  };
1560
1565
 
1566
+ var tagName = vue.computed(function () {
1567
+ if (props.to) return 'router-link';
1568
+ if (props.href) return 'a';
1569
+ return 'button';
1570
+ });
1561
1571
  return {
1562
1572
  textColorClass: textColorClass,
1563
1573
  bgColorClass: bgColorClass,
@@ -1567,32 +1577,219 @@ addToUnscopables('includes');var script = vue.defineComponent({
1567
1577
  onMouseover: onMouseover,
1568
1578
  onMouseout: onMouseout,
1569
1579
  onFocusin: onFocusin,
1570
- onFocusout: onFocusout
1580
+ onFocusout: onFocusout,
1581
+ tagName: tagName
1571
1582
  };
1572
1583
  }
1573
- });var _hoisted_1 = ["to", "href"];
1574
- function render(_ctx, _cache, $props, $setup, $data, $options) {
1575
- return vue.openBlock(), vue.createElementBlock("button", {
1576
- "class": vue.normalizeClass(["fw-button rounded-full border-2 focus:outline-none ring-offset-2 focus:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass]]),
1584
+ });function render$1(_ctx, _cache, $props, $setup, $data, $options) {
1585
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tagName), {
1586
+ "class": vue.normalizeClass(["fw-button font-bold cursor-pointer whitespace-nowrap rounded-full border-2 focus:outline-none ring-offset-2 focus:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass]]),
1587
+ type: _ctx.tagName === 'button' ? _ctx.tagName : null,
1577
1588
  to: _ctx.to,
1578
1589
  href: _ctx.href,
1579
- onClick: _cache[0] || (_cache[0] = function () {
1580
- return _ctx.onClick && _ctx.onClick.apply(_ctx, arguments);
1590
+ onClick: _ctx.onClick,
1591
+ onFocusin: _ctx.onFocusin,
1592
+ onFocusout: _ctx.onFocusout,
1593
+ onMouseover: _ctx.onMouseover,
1594
+ onMouseout: _ctx.onMouseout
1595
+ }, {
1596
+ "default": vue.withCtx(function () {
1597
+ return [vue.renderSlot(_ctx.$slots, "default")];
1581
1598
  }),
1582
- onFocusin: _cache[1] || (_cache[1] = function () {
1583
- return _ctx.onFocusin && _ctx.onFocusin.apply(_ctx, arguments);
1599
+ _: 3
1600
+ }, 8, ["class", "type", "to", "href", "onClick", "onFocusin", "onFocusout", "onMouseover", "onMouseout"]);
1601
+ }function styleInject(css, ref) {
1602
+ if ( ref === void 0 ) ref = {};
1603
+ var insertAt = ref.insertAt;
1604
+
1605
+ if (!css || typeof document === 'undefined') { return; }
1606
+
1607
+ var head = document.head || document.getElementsByTagName('head')[0];
1608
+ var style = document.createElement('style');
1609
+ style.type = 'text/css';
1610
+
1611
+ if (insertAt === 'top') {
1612
+ if (head.firstChild) {
1613
+ head.insertBefore(style, head.firstChild);
1614
+ } else {
1615
+ head.appendChild(style);
1616
+ }
1617
+ } else {
1618
+ head.appendChild(style);
1619
+ }
1620
+
1621
+ if (style.styleSheet) {
1622
+ style.styleSheet.cssText = css;
1623
+ } else {
1624
+ style.appendChild(document.createTextNode(css));
1625
+ }
1626
+ }var css_248z$1 = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
1627
+ var stylesheet$1 = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
1628
+ styleInject(css_248z$1);script$1.render = render$1;var script = vue.defineComponent({
1629
+ name: 'FwNavigationMenu',
1630
+ emits: ['action'],
1631
+ components: {
1632
+ FwButton: script$1
1633
+ },
1634
+ props: {
1635
+ /**
1636
+ * An array of menu items
1637
+ * `{ to?: string | object; href?: string; label: string; }`
1638
+ */
1639
+ menuItems: {
1640
+ type: Array
1641
+ },
1642
+
1643
+ /**
1644
+ * The label for the action button.
1645
+ * Also emits the `action` event.
1646
+ */
1647
+ actionLabel: {
1648
+ type: String
1649
+ }
1650
+ },
1651
+ setup: function setup(_props, ctx) {
1652
+ var isMobileMenuOpen = vue.ref(false);
1653
+
1654
+ var toggleMobileMenu = function toggleMobileMenu() {
1655
+ return isMobileMenuOpen.value = !isMobileMenuOpen.value;
1656
+ };
1657
+
1658
+ var actionClicked = function actionClicked() {
1659
+ return ctx.emit('action');
1660
+ };
1661
+
1662
+ return {
1663
+ isMobileMenuOpen: isMobileMenuOpen,
1664
+ toggleMobileMenu: toggleMobileMenu,
1665
+ actionClicked: actionClicked
1666
+ };
1667
+ }
1668
+ });var _hoisted_1 = {
1669
+ "class": "fw-nav-menu relative z-50 h-20 shadow-md"
1670
+ };
1671
+ var _hoisted_2 = {
1672
+ "class": "px-6 flex-1 h-full flex bg-white items-stretch justify-between"
1673
+ };
1674
+ var _hoisted_3 = {
1675
+ key: 0,
1676
+ "class": "flex-shrink-0 flex items-center"
1677
+ };
1678
+ var _hoisted_4 = {
1679
+ key: 1,
1680
+ "class": "container hidden sm:flex items-center justify-start sm:ml-6"
1681
+ };
1682
+ var _hoisted_5 = {
1683
+ "class": "flex space-x-2"
1684
+ };
1685
+ var _hoisted_6 = {
1686
+ key: 2,
1687
+ "class": "hidden sm:flex items-center justify-start sm:ml-6"
1688
+ };
1689
+ var _hoisted_7 = {
1690
+ "class": "flex items-center sm:hidden"
1691
+ };
1692
+
1693
+ var _hoisted_8 = /*#__PURE__*/vue.createElementVNode("span", {
1694
+ "class": "sr-only"
1695
+ }, "Open main menu", -1);
1696
+
1697
+ var _hoisted_9 = {
1698
+ "class": "block h-6 w-6",
1699
+ xmlns: "http://www.w3.org/2000/svg",
1700
+ fill: "none",
1701
+ viewBox: "0 0 24 24",
1702
+ stroke: "currentColor",
1703
+ "aria-hidden": "true"
1704
+ };
1705
+ var _hoisted_10 = ["d"];
1706
+ var _hoisted_11 = {
1707
+ key: 0,
1708
+ "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"
1709
+ };
1710
+ var _hoisted_12 = {
1711
+ "class": "w-full flex flex-col"
1712
+ };
1713
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
1714
+ var _ctx$menuItems;
1715
+
1716
+ var _component_FwButton = vue.resolveComponent("FwButton");
1717
+
1718
+ return vue.openBlock(), vue.createElementBlock("nav", _hoisted_1, [vue.createElementVNode("div", _hoisted_2, [_ctx.$slots.logo ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [vue.renderSlot(_ctx.$slots, "logo")])) : vue.createCommentVNode("", true), ((_ctx$menuItems = _ctx.menuItems) === null || _ctx$menuItems === void 0 ? void 0 : _ctx$menuItems.length) > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [vue.createElementVNode("div", _hoisted_5, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menuItems, function (item, i) {
1719
+ return vue.openBlock(), vue.createBlock(_component_FwButton, {
1720
+ key: i,
1721
+ variant: "text",
1722
+ href: item.href,
1723
+ to: item.to,
1724
+ size: "md",
1725
+ "aria-current": "page"
1726
+ }, {
1727
+ "default": vue.withCtx(function () {
1728
+ return [vue.createTextVNode(vue.toDisplayString(item.label), 1)];
1729
+ }),
1730
+ _: 2
1731
+ }, 1032, ["href", "to"]);
1732
+ }), 128))])])) : vue.createCommentVNode("", true), _ctx.actionLabel ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [vue.createVNode(_component_FwButton, {
1733
+ onClick: _ctx.actionClicked,
1734
+ size: "md",
1735
+ "aria-label": _ctx.actionLabel
1736
+ }, {
1737
+ "default": vue.withCtx(function () {
1738
+ return [vue.createTextVNode(vue.toDisplayString(_ctx.actionLabel), 1)];
1584
1739
  }),
1585
- onFocusout: _cache[2] || (_cache[2] = function () {
1586
- return _ctx.onFocusout && _ctx.onFocusout.apply(_ctx, arguments);
1740
+ _: 1
1741
+ }, 8, ["onClick", "aria-label"])])) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_7, [vue.createVNode(_component_FwButton, {
1742
+ variant: "text",
1743
+ size: "sm",
1744
+ onClick: _ctx.toggleMobileMenu
1745
+ }, {
1746
+ "default": vue.withCtx(function () {
1747
+ return [_hoisted_8, (vue.openBlock(), vue.createElementBlock("svg", _hoisted_9, [vue.createElementVNode("path", {
1748
+ "stroke-linecap": "round",
1749
+ "stroke-linejoin": "round",
1750
+ "stroke-width": "2",
1751
+ d: _ctx.isMobileMenuOpen ? 'M6 18L18 6M6 6l12 12' : 'M4 6h16M4 12h16M4 18h16'
1752
+ }, null, 8, _hoisted_10)]))];
1587
1753
  }),
1588
- onMouseover: _cache[3] || (_cache[3] = function () {
1589
- return _ctx.onMouseover && _ctx.onMouseover.apply(_ctx, arguments);
1754
+ _: 1
1755
+ }, 8, ["onClick"])])]), vue.createVNode(vue.Transition, {
1756
+ name: "slideInLeft"
1757
+ }, {
1758
+ "default": vue.withCtx(function () {
1759
+ var _ctx$menuItems2;
1760
+
1761
+ 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, [vue.createElementVNode("div", _hoisted_12, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menuItems, function (item, i) {
1762
+ return vue.openBlock(), vue.createBlock(_component_FwButton, {
1763
+ key: i,
1764
+ "class": "w-full rounded-md px-2",
1765
+ variant: "text",
1766
+ href: item.href,
1767
+ to: item.to,
1768
+ size: "md",
1769
+ "aria-current": "page"
1770
+ }, {
1771
+ "default": vue.withCtx(function () {
1772
+ return [vue.createTextVNode(vue.toDisplayString(item.label), 1)];
1773
+ }),
1774
+ _: 2
1775
+ }, 1032, ["href", "to"]);
1776
+ }), 128))]), _ctx.actionLabel ? (vue.openBlock(), vue.createBlock(_component_FwButton, {
1777
+ key: 0,
1778
+ "class": "w-full rounded-md px-2",
1779
+ onClick: _ctx.actionClicked,
1780
+ size: "md"
1781
+ }, {
1782
+ "default": vue.withCtx(function () {
1783
+ return [vue.createTextVNode(vue.toDisplayString(_ctx.actionLabel), 1)];
1784
+ }),
1785
+ _: 1
1786
+ }, 8, ["onClick"])) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true)];
1590
1787
  }),
1591
- onMouseout: _cache[4] || (_cache[4] = function () {
1592
- return _ctx.onMouseout && _ctx.onMouseout.apply(_ctx, arguments);
1593
- })
1594
- }, [vue.renderSlot(_ctx.$slots, "default")], 42, _hoisted_1);
1595
- }script.render = render;var components$1=/*#__PURE__*/Object.freeze({__proto__:null,FwCard:script$1,FwButton:script});var install = function install(app) {
1788
+ _: 1
1789
+ })]);
1790
+ }var css_248z = ".fw-nav-menu--mobile{z-index:-1}.fw-nav-menu--mobile,.slideInLeft-enter-active{-webkit-transition:left .35s ease-in;-o-transition:left .35s ease-in;transition:left .35s ease-in}.slideInLeft-enter-active{-webkit-animation:slideInLeft .35s;animation:slideInLeft .35s}.slideInLeft-leave-active{animation:slideInLeft .35s reverse;-webkit-transition:left .35s ease-in-out;-o-transition:left .35s ease-in-out;transition:left .35s ease-in-out}@-webkit-keyframes slideInLeft{0%{left:100%}to{left:0}}@keyframes slideInLeft{0%{left:100%}to{left:0}}";
1791
+ var stylesheet = ".fw-nav-menu--mobile{z-index:-1}.fw-nav-menu--mobile,.slideInLeft-enter-active{-webkit-transition:left .35s ease-in;-o-transition:left .35s ease-in;transition:left .35s ease-in}.slideInLeft-enter-active{-webkit-animation:slideInLeft .35s;animation:slideInLeft .35s}.slideInLeft-leave-active{animation:slideInLeft .35s reverse;-webkit-transition:left .35s ease-in-out;-o-transition:left .35s ease-in-out;transition:left .35s ease-in-out}@-webkit-keyframes slideInLeft{0%{left:100%}to{left:0}}@keyframes slideInLeft{0%{left:100%}to{left:0}}";
1792
+ styleInject(css_248z);script.render = render;var components$1=/*#__PURE__*/Object.freeze({__proto__:null,FwCard:script$2,FwButton:script$1,FwNavigationMenu:script});var install = function install(app) {
1596
1793
  Object.entries(components$1).forEach(function (_ref) {
1597
1794
  var _ref2 = _slicedToArray(_ref, 2),
1598
1795
  componentName = _ref2[0],
@@ -1600,7 +1797,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1600
1797
 
1601
1798
  app.component(componentName, component);
1602
1799
  });
1603
- };var components=/*#__PURE__*/Object.freeze({__proto__:null,'default':install,FwCard:script$1,FwButton:script});Object.entries(components).forEach(function (_ref) {
1800
+ };var components=/*#__PURE__*/Object.freeze({__proto__:null,'default':install,FwCard:script$2,FwButton:script$1,FwNavigationMenu:script});Object.entries(components).forEach(function (_ref) {
1604
1801
  var _ref2 = _slicedToArray(_ref, 2),
1605
1802
  componentName = _ref2[0],
1606
1803
  component = _ref2[1];
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, renderSlot } from 'vue';
1
+ import { defineComponent, ref, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot } from 'vue';
2
2
 
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
 
@@ -1183,7 +1183,7 @@ var script = defineComponent({
1183
1183
  type: String,
1184
1184
  "default": 'primary',
1185
1185
  validator: function validator(value) {
1186
- return ['primary', 'secondary', 'tertiary', 'error', 'success'].includes(value);
1186
+ return ['primary', 'secondary', 'tertiary', 'error', 'success', 'text'].includes(value);
1187
1187
  }
1188
1188
  }
1189
1189
  },
@@ -1195,9 +1195,9 @@ var script = defineComponent({
1195
1195
  border: 'border-primary focus:ring-primary'
1196
1196
  },
1197
1197
  secondary: {
1198
- text: 'text-secondary hover:text-tertiary active:text-tertiary',
1199
- background: 'bg-tertiary hover:bg-secondary active:bg-secondary',
1200
- border: 'border-secondary focus:ring-secondary'
1198
+ text: 'text-primary hover:text-tertiary active:text-tertiary',
1199
+ background: 'bg-tertiary hover:bg-primary active:bg-primary',
1200
+ border: 'border-primary focus:ring-primary'
1201
1201
  },
1202
1202
  tertiary: {
1203
1203
  text: 'text-tertiary hover:text-secondary active:text-secondary',
@@ -1213,14 +1213,19 @@ var script = defineComponent({
1213
1213
  text: 'text-white hover:text-error active:text-error',
1214
1214
  background: 'bg-error hover:bg-white active:bg-white',
1215
1215
  border: 'border-error focus:ring-error'
1216
+ },
1217
+ text: {
1218
+ text: 'text-body font-medium hover:text-white active:text-white',
1219
+ background: 'bg-white hover:bg-body active:bg-body',
1220
+ border: 'border-transparent focus:ring-body'
1216
1221
  }
1217
1222
  });
1218
1223
  var sizes = ref({
1219
- sm: 'px-16 py-0.5 text-sm leading-tight',
1220
- md: 'px-24 py-1 text-md leading-tight',
1221
- lg: 'px-32 py-1.5 text-lg leading-tight',
1222
- xl: 'px-40 py-2 text-xl leading-none',
1223
- '2xl': 'px-48 py-3 text-2xl leading-normal'
1224
+ sm: 'px-2 py-0.5 text-sm',
1225
+ md: 'px-6 py-1 text-md',
1226
+ lg: 'px-10 py-2 text-lg',
1227
+ xl: 'px-12 py-3 text-xl',
1228
+ '2xl': 'px-16 py-4 text-2xl'
1224
1229
  });
1225
1230
  var textColorClass = computed(function () {
1226
1231
  return buttonClasses.value[props.variant].text;
@@ -1274,6 +1279,11 @@ var script = defineComponent({
1274
1279
  return ctx.emit('focusout', e);
1275
1280
  };
1276
1281
 
1282
+ var tagName = computed(function () {
1283
+ if (props.to) return 'router-link';
1284
+ if (props.href) return 'a';
1285
+ return 'button';
1286
+ });
1277
1287
  return {
1278
1288
  textColorClass: textColorClass,
1279
1289
  bgColorClass: bgColorClass,
@@ -1283,35 +1293,62 @@ var script = defineComponent({
1283
1293
  onMouseover: onMouseover,
1284
1294
  onMouseout: onMouseout,
1285
1295
  onFocusin: onFocusin,
1286
- onFocusout: onFocusout
1296
+ onFocusout: onFocusout,
1297
+ tagName: tagName
1287
1298
  };
1288
1299
  }
1289
1300
  });
1290
1301
 
1291
- var _hoisted_1 = ["to", "href"];
1292
1302
  function render(_ctx, _cache, $props, $setup, $data, $options) {
1293
- return openBlock(), createElementBlock("button", {
1294
- "class": normalizeClass(["fw-button rounded-full border-2 focus:outline-none ring-offset-2 focus:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass]]),
1303
+ return openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), {
1304
+ "class": normalizeClass(["fw-button font-bold cursor-pointer whitespace-nowrap rounded-full border-2 focus:outline-none ring-offset-2 focus:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass]]),
1305
+ type: _ctx.tagName === 'button' ? _ctx.tagName : null,
1295
1306
  to: _ctx.to,
1296
1307
  href: _ctx.href,
1297
- onClick: _cache[0] || (_cache[0] = function () {
1298
- return _ctx.onClick && _ctx.onClick.apply(_ctx, arguments);
1299
- }),
1300
- onFocusin: _cache[1] || (_cache[1] = function () {
1301
- return _ctx.onFocusin && _ctx.onFocusin.apply(_ctx, arguments);
1302
- }),
1303
- onFocusout: _cache[2] || (_cache[2] = function () {
1304
- return _ctx.onFocusout && _ctx.onFocusout.apply(_ctx, arguments);
1308
+ onClick: _ctx.onClick,
1309
+ onFocusin: _ctx.onFocusin,
1310
+ onFocusout: _ctx.onFocusout,
1311
+ onMouseover: _ctx.onMouseover,
1312
+ onMouseout: _ctx.onMouseout
1313
+ }, {
1314
+ "default": withCtx(function () {
1315
+ return [renderSlot(_ctx.$slots, "default")];
1305
1316
  }),
1306
- onMouseover: _cache[3] || (_cache[3] = function () {
1307
- return _ctx.onMouseover && _ctx.onMouseover.apply(_ctx, arguments);
1308
- }),
1309
- onMouseout: _cache[4] || (_cache[4] = function () {
1310
- return _ctx.onMouseout && _ctx.onMouseout.apply(_ctx, arguments);
1311
- })
1312
- }, [renderSlot(_ctx.$slots, "default")], 42, _hoisted_1);
1317
+ _: 3
1318
+ }, 8, ["class", "type", "to", "href", "onClick", "onFocusin", "onFocusout", "onMouseover", "onMouseout"]);
1313
1319
  }
1314
1320
 
1321
+ function styleInject(css, ref) {
1322
+ if ( ref === void 0 ) ref = {};
1323
+ var insertAt = ref.insertAt;
1324
+
1325
+ if (!css || typeof document === 'undefined') { return; }
1326
+
1327
+ var head = document.head || document.getElementsByTagName('head')[0];
1328
+ var style = document.createElement('style');
1329
+ style.type = 'text/css';
1330
+
1331
+ if (insertAt === 'top') {
1332
+ if (head.firstChild) {
1333
+ head.insertBefore(style, head.firstChild);
1334
+ } else {
1335
+ head.appendChild(style);
1336
+ }
1337
+ } else {
1338
+ head.appendChild(style);
1339
+ }
1340
+
1341
+ if (style.styleSheet) {
1342
+ style.styleSheet.cssText = css;
1343
+ } else {
1344
+ style.appendChild(document.createTextNode(css));
1345
+ }
1346
+ }
1347
+
1348
+ var css_248z = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
1349
+ var stylesheet = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
1350
+ styleInject(css_248z);
1351
+
1315
1352
  script.render = render;
1316
1353
 
1317
- export { _export as _, aCallable$1 as a, functionBindNative as b, classofRaw as c, fails$7 as d, getBuiltIn$4 as e, functionUncurryThis as f, global$l as g, inspectSource$2 as h, isCallable$9 as i, isObject$5 as j, indexedObject as k, lengthOfArrayLike$1 as l, documentCreateElement$1 as m, createNonEnumerableProperty$3 as n, descriptors as o, objectKeys$1 as p, toIndexedObject$4 as q, redefine$2 as r, objectPropertyIsEnumerable as s, toObject$1 as t, script as u, wellKnownSymbol$2 as w };
1354
+ export { _export as _, aCallable$1 as a, functionBindNative as b, classofRaw as c, fails$7 as d, getBuiltIn$4 as e, functionUncurryThis as f, global$l as g, inspectSource$2 as h, isCallable$9 as i, isObject$5 as j, indexedObject as k, lengthOfArrayLike$1 as l, documentCreateElement$1 as m, createNonEnumerableProperty$3 as n, descriptors as o, objectKeys$1 as p, toIndexedObject$4 as q, redefine$2 as r, objectPropertyIsEnumerable as s, toObject$1 as t, script as u, styleInject as v, wellKnownSymbol$2 as w };
package/esm/fw-button.js CHANGED
@@ -1,2 +1,2 @@
1
- export { u as FwButton } from './index-280a9116.js';
1
+ export { u as FwButton } from './fw-button-deb8cb87.js';
2
2
  import 'vue';
@@ -0,0 +1,176 @@
1
+ import { defineComponent, ref, createElementVNode, resolveComponent, openBlock, createElementBlock, renderSlot, createCommentVNode, Fragment, renderList, createBlock, withCtx, createTextVNode, toDisplayString, createVNode, Transition } from 'vue';
2
+ import { u as script$1, v as styleInject } from './fw-button-deb8cb87.js';
3
+
4
+ var script = defineComponent({
5
+ name: 'FwNavigationMenu',
6
+ emits: ['action'],
7
+ components: {
8
+ FwButton: script$1
9
+ },
10
+ props: {
11
+ /**
12
+ * An array of menu items
13
+ * `{ to?: string | object; href?: string; label: string; }`
14
+ */
15
+ menuItems: {
16
+ type: Array
17
+ },
18
+
19
+ /**
20
+ * The label for the action button.
21
+ * Also emits the `action` event.
22
+ */
23
+ actionLabel: {
24
+ type: String
25
+ }
26
+ },
27
+ setup: function setup(_props, ctx) {
28
+ var isMobileMenuOpen = ref(false);
29
+
30
+ var toggleMobileMenu = function toggleMobileMenu() {
31
+ return isMobileMenuOpen.value = !isMobileMenuOpen.value;
32
+ };
33
+
34
+ var actionClicked = function actionClicked() {
35
+ return ctx.emit('action');
36
+ };
37
+
38
+ return {
39
+ isMobileMenuOpen: isMobileMenuOpen,
40
+ toggleMobileMenu: toggleMobileMenu,
41
+ actionClicked: actionClicked
42
+ };
43
+ }
44
+ });
45
+
46
+ var _hoisted_1 = {
47
+ "class": "fw-nav-menu relative z-50 h-20 shadow-md"
48
+ };
49
+ var _hoisted_2 = {
50
+ "class": "px-6 flex-1 h-full flex bg-white items-stretch justify-between"
51
+ };
52
+ var _hoisted_3 = {
53
+ key: 0,
54
+ "class": "flex-shrink-0 flex items-center"
55
+ };
56
+ var _hoisted_4 = {
57
+ key: 1,
58
+ "class": "container hidden sm:flex items-center justify-start sm:ml-6"
59
+ };
60
+ var _hoisted_5 = {
61
+ "class": "flex space-x-2"
62
+ };
63
+ var _hoisted_6 = {
64
+ key: 2,
65
+ "class": "hidden sm:flex items-center justify-start sm:ml-6"
66
+ };
67
+ var _hoisted_7 = {
68
+ "class": "flex items-center sm:hidden"
69
+ };
70
+
71
+ var _hoisted_8 = /*#__PURE__*/createElementVNode("span", {
72
+ "class": "sr-only"
73
+ }, "Open main menu", -1);
74
+
75
+ var _hoisted_9 = {
76
+ "class": "block h-6 w-6",
77
+ xmlns: "http://www.w3.org/2000/svg",
78
+ fill: "none",
79
+ viewBox: "0 0 24 24",
80
+ stroke: "currentColor",
81
+ "aria-hidden": "true"
82
+ };
83
+ var _hoisted_10 = ["d"];
84
+ var _hoisted_11 = {
85
+ key: 0,
86
+ "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"
87
+ };
88
+ var _hoisted_12 = {
89
+ "class": "w-full flex flex-col"
90
+ };
91
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
92
+ var _ctx$menuItems;
93
+
94
+ var _component_FwButton = resolveComponent("FwButton");
95
+
96
+ return openBlock(), createElementBlock("nav", _hoisted_1, [createElementVNode("div", _hoisted_2, [_ctx.$slots.logo ? (openBlock(), createElementBlock("div", _hoisted_3, [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, [createElementVNode("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, function (item, i) {
97
+ return openBlock(), createBlock(_component_FwButton, {
98
+ key: i,
99
+ variant: "text",
100
+ href: item.href,
101
+ to: item.to,
102
+ size: "md",
103
+ "aria-current": "page"
104
+ }, {
105
+ "default": withCtx(function () {
106
+ return [createTextVNode(toDisplayString(item.label), 1)];
107
+ }),
108
+ _: 2
109
+ }, 1032, ["href", "to"]);
110
+ }), 128))])])) : createCommentVNode("", true), _ctx.actionLabel ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(_component_FwButton, {
111
+ onClick: _ctx.actionClicked,
112
+ size: "md",
113
+ "aria-label": _ctx.actionLabel
114
+ }, {
115
+ "default": withCtx(function () {
116
+ return [createTextVNode(toDisplayString(_ctx.actionLabel), 1)];
117
+ }),
118
+ _: 1
119
+ }, 8, ["onClick", "aria-label"])])) : createCommentVNode("", true), createElementVNode("div", _hoisted_7, [createVNode(_component_FwButton, {
120
+ variant: "text",
121
+ size: "sm",
122
+ onClick: _ctx.toggleMobileMenu
123
+ }, {
124
+ "default": withCtx(function () {
125
+ return [_hoisted_8, (openBlock(), createElementBlock("svg", _hoisted_9, [createElementVNode("path", {
126
+ "stroke-linecap": "round",
127
+ "stroke-linejoin": "round",
128
+ "stroke-width": "2",
129
+ d: _ctx.isMobileMenuOpen ? 'M6 18L18 6M6 6l12 12' : 'M4 6h16M4 12h16M4 18h16'
130
+ }, null, 8, _hoisted_10)]))];
131
+ }),
132
+ _: 1
133
+ }, 8, ["onClick"])])]), createVNode(Transition, {
134
+ name: "slideInLeft"
135
+ }, {
136
+ "default": withCtx(function () {
137
+ var _ctx$menuItems2;
138
+
139
+ return [((_ctx$menuItems2 = _ctx.menuItems) === null || _ctx$menuItems2 === void 0 ? void 0 : _ctx$menuItems2.length) > 0 && _ctx.isMobileMenuOpen ? (openBlock(), createElementBlock("div", _hoisted_11, [createElementVNode("div", _hoisted_12, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, function (item, i) {
140
+ return openBlock(), createBlock(_component_FwButton, {
141
+ key: i,
142
+ "class": "w-full rounded-md px-2",
143
+ variant: "text",
144
+ href: item.href,
145
+ to: item.to,
146
+ size: "md",
147
+ "aria-current": "page"
148
+ }, {
149
+ "default": withCtx(function () {
150
+ return [createTextVNode(toDisplayString(item.label), 1)];
151
+ }),
152
+ _: 2
153
+ }, 1032, ["href", "to"]);
154
+ }), 128))]), _ctx.actionLabel ? (openBlock(), createBlock(_component_FwButton, {
155
+ key: 0,
156
+ "class": "w-full rounded-md px-2",
157
+ onClick: _ctx.actionClicked,
158
+ size: "md"
159
+ }, {
160
+ "default": withCtx(function () {
161
+ return [createTextVNode(toDisplayString(_ctx.actionLabel), 1)];
162
+ }),
163
+ _: 1
164
+ }, 8, ["onClick"])) : createCommentVNode("", true)])) : createCommentVNode("", true)];
165
+ }),
166
+ _: 1
167
+ })]);
168
+ }
169
+
170
+ var css_248z = ".fw-nav-menu--mobile{z-index:-1}.fw-nav-menu--mobile,.slideInLeft-enter-active{-webkit-transition:left .35s ease-in;-o-transition:left .35s ease-in;transition:left .35s ease-in}.slideInLeft-enter-active{-webkit-animation:slideInLeft .35s;animation:slideInLeft .35s}.slideInLeft-leave-active{animation:slideInLeft .35s reverse;-webkit-transition:left .35s ease-in-out;-o-transition:left .35s ease-in-out;transition:left .35s ease-in-out}@-webkit-keyframes slideInLeft{0%{left:100%}to{left:0}}@keyframes slideInLeft{0%{left:100%}to{left:0}}";
171
+ var stylesheet = ".fw-nav-menu--mobile{z-index:-1}.fw-nav-menu--mobile,.slideInLeft-enter-active{-webkit-transition:left .35s ease-in;-o-transition:left .35s ease-in;transition:left .35s ease-in}.slideInLeft-enter-active{-webkit-animation:slideInLeft .35s;animation:slideInLeft .35s}.slideInLeft-leave-active{animation:slideInLeft .35s reverse;-webkit-transition:left .35s ease-in-out;-o-transition:left .35s ease-in-out;transition:left .35s ease-in-out}@-webkit-keyframes slideInLeft{0%{left:100%}to{left:0}}@keyframes slideInLeft{0%{left:100%}to{left:0}}";
172
+ styleInject(css_248z);
173
+
174
+ script.render = render;
175
+
176
+ export { script as FwNavigationMenu };
package/esm/index.js CHANGED
@@ -1,7 +1,10 @@
1
- import { f as functionUncurryThis, a as aCallable$1, b as functionBindNative, c as classofRaw$1, w as wellKnownSymbol$3, g as global$3, i as isCallable$2, d as fails$2, e as getBuiltIn$1, h as inspectSource$1, j as isObject$1, k as indexedObject, t as toObject$1, l as lengthOfArrayLike$1, _ as _export, r as redefine$1, m as documentCreateElement$1, n as createNonEnumerableProperty$1, o as descriptors, p as objectKeys$1, q as toIndexedObject$1, s as objectPropertyIsEnumerable, u as script$1 } from './index-280a9116.js';
2
- export { u as FwButton } from './index-280a9116.js';
1
+ import { f as functionUncurryThis, a as aCallable$1, b as functionBindNative, c as classofRaw$1, w as wellKnownSymbol$3, g as global$3, i as isCallable$2, d as fails$2, e as getBuiltIn$1, h as inspectSource$1, j as isObject$1, k as indexedObject, t as toObject$1, l as lengthOfArrayLike$1, _ as _export, r as redefine$1, m as documentCreateElement$1, n as createNonEnumerableProperty$1, o as descriptors, p as objectKeys$1, q as toIndexedObject$1, s as objectPropertyIsEnumerable, u as script$1 } from './fw-button-deb8cb87.js';
2
+ export { u as FwButton } from './fw-button-deb8cb87.js';
3
3
  import { FwCard as script } from './fw-card.js';
4
4
  export { FwCard } from './fw-card.js';
5
+ import './fw-button.js';
6
+ import { FwNavigationMenu as script$2 } from './fw-navigation-menu.js';
7
+ export { FwNavigationMenu } from './fw-navigation-menu.js';
5
8
  import 'vue';
6
9
 
7
10
  function _arrayWithHoles(arr) {
@@ -468,7 +471,8 @@ $({ target: 'Object', stat: true }, {
468
471
  var components = /*#__PURE__*/Object.freeze({
469
472
  __proto__: null,
470
473
  FwCard: script,
471
- FwButton: script$1
474
+ FwButton: script$1,
475
+ FwNavigationMenu: script$2
472
476
  });
473
477
 
474
478
  var install = function install(app) {
@@ -1,4 +1,4 @@
1
- import { defineComponent, openBlock, createElementBlock, toDisplayString, createCommentVNode, renderSlot, ref, computed, normalizeClass } from 'vue';
1
+ import { defineComponent, openBlock, createElementBlock, toDisplayString, createCommentVNode, renderSlot, ref, computed, createBlock, resolveDynamicComponent, normalizeClass, withCtx, createElementVNode, resolveComponent, Fragment, renderList, createTextVNode, createVNode, Transition } from 'vue';
2
2
 
3
3
  function _arrayWithHoles(arr) {
4
4
  if (Array.isArray(arr)) return arr;
@@ -1459,7 +1459,7 @@ $$1({ target: 'Object', stat: true }, {
1459
1459
  }
1460
1460
  });
1461
1461
 
1462
- var script$1 = defineComponent({
1462
+ var script$2 = defineComponent({
1463
1463
  name: 'FwCard',
1464
1464
  props: {
1465
1465
  /**
@@ -1481,26 +1481,26 @@ var script$1 = defineComponent({
1481
1481
  var _hoisted_1$1 = {
1482
1482
  "class": "fw-card shadow rounded-lg"
1483
1483
  };
1484
- var _hoisted_2 = {
1484
+ var _hoisted_2$1 = {
1485
1485
  key: 0,
1486
1486
  "class": "fw-card--header text-lg px-8 py-4 font-bold bg-grey-lightest rounded-t-lg border-opacity-0"
1487
1487
  };
1488
- var _hoisted_3 = {
1488
+ var _hoisted_3$1 = {
1489
1489
  key: 0,
1490
1490
  "class": "fw-card--prefix-title text-primary"
1491
1491
  };
1492
- var _hoisted_4 = {
1492
+ var _hoisted_4$1 = {
1493
1493
  key: 1
1494
1494
  };
1495
- var _hoisted_5 = {
1495
+ var _hoisted_5$1 = {
1496
1496
  key: 1,
1497
1497
  "class": "p-8"
1498
1498
  };
1499
- function render$1(_ctx, _cache, $props, $setup, $data, $options) {
1500
- return openBlock(), createElementBlock("div", _hoisted_1$1, [_ctx.title || _ctx.prefixTitle ? (openBlock(), createElementBlock("h4", _hoisted_2, [_ctx.prefixTitle ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(_ctx.prefixTitle), 1)) : createCommentVNode("", true), _ctx.title ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)])) : createCommentVNode("", true), _ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_5, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)]);
1499
+ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
1500
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [_ctx.title || _ctx.prefixTitle ? (openBlock(), createElementBlock("h4", _hoisted_2$1, [_ctx.prefixTitle ? (openBlock(), createElementBlock("span", _hoisted_3$1, toDisplayString(_ctx.prefixTitle), 1)) : createCommentVNode("", true), _ctx.title ? (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)])) : createCommentVNode("", true), _ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_5$1, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)]);
1501
1501
  }
1502
1502
 
1503
- script$1.render = render$1;
1503
+ script$2.render = render$2;
1504
1504
 
1505
1505
  var es_array_includes = {};
1506
1506
 
@@ -1652,7 +1652,7 @@ $({ target: 'Array', proto: true }, {
1652
1652
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1653
1653
  addToUnscopables('includes');
1654
1654
 
1655
- var script = defineComponent({
1655
+ var script$1 = defineComponent({
1656
1656
  name: 'FwButton',
1657
1657
  emits: ['click', 'mouseover', 'mouseout', 'focusin', 'focusout'],
1658
1658
  props: {
@@ -1687,7 +1687,7 @@ var script = defineComponent({
1687
1687
  type: String,
1688
1688
  "default": 'primary',
1689
1689
  validator: function validator(value) {
1690
- return ['primary', 'secondary', 'tertiary', 'error', 'success'].includes(value);
1690
+ return ['primary', 'secondary', 'tertiary', 'error', 'success', 'text'].includes(value);
1691
1691
  }
1692
1692
  }
1693
1693
  },
@@ -1699,9 +1699,9 @@ var script = defineComponent({
1699
1699
  border: 'border-primary focus:ring-primary'
1700
1700
  },
1701
1701
  secondary: {
1702
- text: 'text-secondary hover:text-tertiary active:text-tertiary',
1703
- background: 'bg-tertiary hover:bg-secondary active:bg-secondary',
1704
- border: 'border-secondary focus:ring-secondary'
1702
+ text: 'text-primary hover:text-tertiary active:text-tertiary',
1703
+ background: 'bg-tertiary hover:bg-primary active:bg-primary',
1704
+ border: 'border-primary focus:ring-primary'
1705
1705
  },
1706
1706
  tertiary: {
1707
1707
  text: 'text-tertiary hover:text-secondary active:text-secondary',
@@ -1717,14 +1717,19 @@ var script = defineComponent({
1717
1717
  text: 'text-white hover:text-error active:text-error',
1718
1718
  background: 'bg-error hover:bg-white active:bg-white',
1719
1719
  border: 'border-error focus:ring-error'
1720
+ },
1721
+ text: {
1722
+ text: 'text-body font-medium hover:text-white active:text-white',
1723
+ background: 'bg-white hover:bg-body active:bg-body',
1724
+ border: 'border-transparent focus:ring-body'
1720
1725
  }
1721
1726
  });
1722
1727
  var sizes = ref({
1723
- sm: 'px-16 py-0.5 text-sm leading-tight',
1724
- md: 'px-24 py-1 text-md leading-tight',
1725
- lg: 'px-32 py-1.5 text-lg leading-tight',
1726
- xl: 'px-40 py-2 text-xl leading-none',
1727
- '2xl': 'px-48 py-3 text-2xl leading-normal'
1728
+ sm: 'px-2 py-0.5 text-sm',
1729
+ md: 'px-6 py-1 text-md',
1730
+ lg: 'px-10 py-2 text-lg',
1731
+ xl: 'px-12 py-3 text-xl',
1732
+ '2xl': 'px-16 py-4 text-2xl'
1728
1733
  });
1729
1734
  var textColorClass = computed(function () {
1730
1735
  return buttonClasses.value[props.variant].text;
@@ -1778,6 +1783,11 @@ var script = defineComponent({
1778
1783
  return ctx.emit('focusout', e);
1779
1784
  };
1780
1785
 
1786
+ var tagName = computed(function () {
1787
+ if (props.to) return 'router-link';
1788
+ if (props.href) return 'a';
1789
+ return 'button';
1790
+ });
1781
1791
  return {
1782
1792
  textColorClass: textColorClass,
1783
1793
  bgColorClass: bgColorClass,
@@ -1787,41 +1797,241 @@ var script = defineComponent({
1787
1797
  onMouseover: onMouseover,
1788
1798
  onMouseout: onMouseout,
1789
1799
  onFocusin: onFocusin,
1790
- onFocusout: onFocusout
1800
+ onFocusout: onFocusout,
1801
+ tagName: tagName
1791
1802
  };
1792
1803
  }
1793
1804
  });
1794
1805
 
1795
- var _hoisted_1 = ["to", "href"];
1796
- function render(_ctx, _cache, $props, $setup, $data, $options) {
1797
- return openBlock(), createElementBlock("button", {
1798
- "class": normalizeClass(["fw-button rounded-full border-2 focus:outline-none ring-offset-2 focus:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass]]),
1806
+ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
1807
+ return openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), {
1808
+ "class": normalizeClass(["fw-button font-bold cursor-pointer whitespace-nowrap rounded-full border-2 focus:outline-none ring-offset-2 focus:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass]]),
1809
+ type: _ctx.tagName === 'button' ? _ctx.tagName : null,
1799
1810
  to: _ctx.to,
1800
1811
  href: _ctx.href,
1801
- onClick: _cache[0] || (_cache[0] = function () {
1802
- return _ctx.onClick && _ctx.onClick.apply(_ctx, arguments);
1812
+ onClick: _ctx.onClick,
1813
+ onFocusin: _ctx.onFocusin,
1814
+ onFocusout: _ctx.onFocusout,
1815
+ onMouseover: _ctx.onMouseover,
1816
+ onMouseout: _ctx.onMouseout
1817
+ }, {
1818
+ "default": withCtx(function () {
1819
+ return [renderSlot(_ctx.$slots, "default")];
1803
1820
  }),
1804
- onFocusin: _cache[1] || (_cache[1] = function () {
1805
- return _ctx.onFocusin && _ctx.onFocusin.apply(_ctx, arguments);
1821
+ _: 3
1822
+ }, 8, ["class", "type", "to", "href", "onClick", "onFocusin", "onFocusout", "onMouseover", "onMouseout"]);
1823
+ }
1824
+
1825
+ function styleInject(css, ref) {
1826
+ if ( ref === void 0 ) ref = {};
1827
+ var insertAt = ref.insertAt;
1828
+
1829
+ if (!css || typeof document === 'undefined') { return; }
1830
+
1831
+ var head = document.head || document.getElementsByTagName('head')[0];
1832
+ var style = document.createElement('style');
1833
+ style.type = 'text/css';
1834
+
1835
+ if (insertAt === 'top') {
1836
+ if (head.firstChild) {
1837
+ head.insertBefore(style, head.firstChild);
1838
+ } else {
1839
+ head.appendChild(style);
1840
+ }
1841
+ } else {
1842
+ head.appendChild(style);
1843
+ }
1844
+
1845
+ if (style.styleSheet) {
1846
+ style.styleSheet.cssText = css;
1847
+ } else {
1848
+ style.appendChild(document.createTextNode(css));
1849
+ }
1850
+ }
1851
+
1852
+ var css_248z$1 = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
1853
+ var stylesheet$1 = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
1854
+ styleInject(css_248z$1);
1855
+
1856
+ script$1.render = render$1;
1857
+
1858
+ var script = defineComponent({
1859
+ name: 'FwNavigationMenu',
1860
+ emits: ['action'],
1861
+ components: {
1862
+ FwButton: script$1
1863
+ },
1864
+ props: {
1865
+ /**
1866
+ * An array of menu items
1867
+ * `{ to?: string | object; href?: string; label: string; }`
1868
+ */
1869
+ menuItems: {
1870
+ type: Array
1871
+ },
1872
+
1873
+ /**
1874
+ * The label for the action button.
1875
+ * Also emits the `action` event.
1876
+ */
1877
+ actionLabel: {
1878
+ type: String
1879
+ }
1880
+ },
1881
+ setup: function setup(_props, ctx) {
1882
+ var isMobileMenuOpen = ref(false);
1883
+
1884
+ var toggleMobileMenu = function toggleMobileMenu() {
1885
+ return isMobileMenuOpen.value = !isMobileMenuOpen.value;
1886
+ };
1887
+
1888
+ var actionClicked = function actionClicked() {
1889
+ return ctx.emit('action');
1890
+ };
1891
+
1892
+ return {
1893
+ isMobileMenuOpen: isMobileMenuOpen,
1894
+ toggleMobileMenu: toggleMobileMenu,
1895
+ actionClicked: actionClicked
1896
+ };
1897
+ }
1898
+ });
1899
+
1900
+ var _hoisted_1 = {
1901
+ "class": "fw-nav-menu relative z-50 h-20 shadow-md"
1902
+ };
1903
+ var _hoisted_2 = {
1904
+ "class": "px-6 flex-1 h-full flex bg-white items-stretch justify-between"
1905
+ };
1906
+ var _hoisted_3 = {
1907
+ key: 0,
1908
+ "class": "flex-shrink-0 flex items-center"
1909
+ };
1910
+ var _hoisted_4 = {
1911
+ key: 1,
1912
+ "class": "container hidden sm:flex items-center justify-start sm:ml-6"
1913
+ };
1914
+ var _hoisted_5 = {
1915
+ "class": "flex space-x-2"
1916
+ };
1917
+ var _hoisted_6 = {
1918
+ key: 2,
1919
+ "class": "hidden sm:flex items-center justify-start sm:ml-6"
1920
+ };
1921
+ var _hoisted_7 = {
1922
+ "class": "flex items-center sm:hidden"
1923
+ };
1924
+
1925
+ var _hoisted_8 = /*#__PURE__*/createElementVNode("span", {
1926
+ "class": "sr-only"
1927
+ }, "Open main menu", -1);
1928
+
1929
+ var _hoisted_9 = {
1930
+ "class": "block h-6 w-6",
1931
+ xmlns: "http://www.w3.org/2000/svg",
1932
+ fill: "none",
1933
+ viewBox: "0 0 24 24",
1934
+ stroke: "currentColor",
1935
+ "aria-hidden": "true"
1936
+ };
1937
+ var _hoisted_10 = ["d"];
1938
+ var _hoisted_11 = {
1939
+ key: 0,
1940
+ "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"
1941
+ };
1942
+ var _hoisted_12 = {
1943
+ "class": "w-full flex flex-col"
1944
+ };
1945
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
1946
+ var _ctx$menuItems;
1947
+
1948
+ var _component_FwButton = resolveComponent("FwButton");
1949
+
1950
+ return openBlock(), createElementBlock("nav", _hoisted_1, [createElementVNode("div", _hoisted_2, [_ctx.$slots.logo ? (openBlock(), createElementBlock("div", _hoisted_3, [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, [createElementVNode("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, function (item, i) {
1951
+ return openBlock(), createBlock(_component_FwButton, {
1952
+ key: i,
1953
+ variant: "text",
1954
+ href: item.href,
1955
+ to: item.to,
1956
+ size: "md",
1957
+ "aria-current": "page"
1958
+ }, {
1959
+ "default": withCtx(function () {
1960
+ return [createTextVNode(toDisplayString(item.label), 1)];
1961
+ }),
1962
+ _: 2
1963
+ }, 1032, ["href", "to"]);
1964
+ }), 128))])])) : createCommentVNode("", true), _ctx.actionLabel ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(_component_FwButton, {
1965
+ onClick: _ctx.actionClicked,
1966
+ size: "md",
1967
+ "aria-label": _ctx.actionLabel
1968
+ }, {
1969
+ "default": withCtx(function () {
1970
+ return [createTextVNode(toDisplayString(_ctx.actionLabel), 1)];
1806
1971
  }),
1807
- onFocusout: _cache[2] || (_cache[2] = function () {
1808
- return _ctx.onFocusout && _ctx.onFocusout.apply(_ctx, arguments);
1972
+ _: 1
1973
+ }, 8, ["onClick", "aria-label"])])) : createCommentVNode("", true), createElementVNode("div", _hoisted_7, [createVNode(_component_FwButton, {
1974
+ variant: "text",
1975
+ size: "sm",
1976
+ onClick: _ctx.toggleMobileMenu
1977
+ }, {
1978
+ "default": withCtx(function () {
1979
+ return [_hoisted_8, (openBlock(), createElementBlock("svg", _hoisted_9, [createElementVNode("path", {
1980
+ "stroke-linecap": "round",
1981
+ "stroke-linejoin": "round",
1982
+ "stroke-width": "2",
1983
+ d: _ctx.isMobileMenuOpen ? 'M6 18L18 6M6 6l12 12' : 'M4 6h16M4 12h16M4 18h16'
1984
+ }, null, 8, _hoisted_10)]))];
1809
1985
  }),
1810
- onMouseover: _cache[3] || (_cache[3] = function () {
1811
- return _ctx.onMouseover && _ctx.onMouseover.apply(_ctx, arguments);
1986
+ _: 1
1987
+ }, 8, ["onClick"])])]), createVNode(Transition, {
1988
+ name: "slideInLeft"
1989
+ }, {
1990
+ "default": withCtx(function () {
1991
+ var _ctx$menuItems2;
1992
+
1993
+ return [((_ctx$menuItems2 = _ctx.menuItems) === null || _ctx$menuItems2 === void 0 ? void 0 : _ctx$menuItems2.length) > 0 && _ctx.isMobileMenuOpen ? (openBlock(), createElementBlock("div", _hoisted_11, [createElementVNode("div", _hoisted_12, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, function (item, i) {
1994
+ return openBlock(), createBlock(_component_FwButton, {
1995
+ key: i,
1996
+ "class": "w-full rounded-md px-2",
1997
+ variant: "text",
1998
+ href: item.href,
1999
+ to: item.to,
2000
+ size: "md",
2001
+ "aria-current": "page"
2002
+ }, {
2003
+ "default": withCtx(function () {
2004
+ return [createTextVNode(toDisplayString(item.label), 1)];
2005
+ }),
2006
+ _: 2
2007
+ }, 1032, ["href", "to"]);
2008
+ }), 128))]), _ctx.actionLabel ? (openBlock(), createBlock(_component_FwButton, {
2009
+ key: 0,
2010
+ "class": "w-full rounded-md px-2",
2011
+ onClick: _ctx.actionClicked,
2012
+ size: "md"
2013
+ }, {
2014
+ "default": withCtx(function () {
2015
+ return [createTextVNode(toDisplayString(_ctx.actionLabel), 1)];
2016
+ }),
2017
+ _: 1
2018
+ }, 8, ["onClick"])) : createCommentVNode("", true)])) : createCommentVNode("", true)];
1812
2019
  }),
1813
- onMouseout: _cache[4] || (_cache[4] = function () {
1814
- return _ctx.onMouseout && _ctx.onMouseout.apply(_ctx, arguments);
1815
- })
1816
- }, [renderSlot(_ctx.$slots, "default")], 42, _hoisted_1);
2020
+ _: 1
2021
+ })]);
1817
2022
  }
1818
2023
 
2024
+ var css_248z = ".fw-nav-menu--mobile{z-index:-1}.fw-nav-menu--mobile,.slideInLeft-enter-active{-webkit-transition:left .35s ease-in;-o-transition:left .35s ease-in;transition:left .35s ease-in}.slideInLeft-enter-active{-webkit-animation:slideInLeft .35s;animation:slideInLeft .35s}.slideInLeft-leave-active{animation:slideInLeft .35s reverse;-webkit-transition:left .35s ease-in-out;-o-transition:left .35s ease-in-out;transition:left .35s ease-in-out}@-webkit-keyframes slideInLeft{0%{left:100%}to{left:0}}@keyframes slideInLeft{0%{left:100%}to{left:0}}";
2025
+ var stylesheet = ".fw-nav-menu--mobile{z-index:-1}.fw-nav-menu--mobile,.slideInLeft-enter-active{-webkit-transition:left .35s ease-in;-o-transition:left .35s ease-in;transition:left .35s ease-in}.slideInLeft-enter-active{-webkit-animation:slideInLeft .35s;animation:slideInLeft .35s}.slideInLeft-leave-active{animation:slideInLeft .35s reverse;-webkit-transition:left .35s ease-in-out;-o-transition:left .35s ease-in-out;transition:left .35s ease-in-out}@-webkit-keyframes slideInLeft{0%{left:100%}to{left:0}}@keyframes slideInLeft{0%{left:100%}to{left:0}}";
2026
+ styleInject(css_248z);
2027
+
1819
2028
  script.render = render;
1820
2029
 
1821
2030
  var components = /*#__PURE__*/Object.freeze({
1822
2031
  __proto__: null,
1823
- FwCard: script$1,
1824
- FwButton: script
2032
+ FwCard: script$2,
2033
+ FwButton: script$1,
2034
+ FwNavigationMenu: script
1825
2035
  });
1826
2036
 
1827
2037
  var install = function install(app) {
@@ -1834,4 +2044,4 @@ var install = function install(app) {
1834
2044
  });
1835
2045
  };
1836
2046
 
1837
- export { script as FwButton, script$1 as FwCard, install as default };
2047
+ export { script$1 as FwButton, script$2 as FwCard, script as FwNavigationMenu, install as default };
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 42 55" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M39.668 11.0859L30.9141 2.33203C29.9648 1.38281 28.5938 0.75 27.3281 0.75H5.70703C2.96484 0.855469 0.75 3.07031 0.75 5.91797V49.793C0.75 52.5352 2.96484 54.75 5.70703 54.75H36.1875C38.9297 54.75 41.25 52.5352 41.25 49.793V14.6719C41.25 13.4062 40.6172 12.0352 39.668 11.0859ZM27.75 4.23047C27.9609 4.33594 28.2773 4.44141 28.4883 4.65234L37.3477 13.5117C37.5586 13.7227 37.6641 14.0391 37.7695 14.3555H27.75V4.23047ZM37.875 49.793C37.875 50.6367 37.0312 51.4805 36.1875 51.4805H5.70703C4.86328 51.4805 4.01953 50.6367 4.01953 49.793V5.91797C4.01953 4.96875 4.86328 4.125 5.70703 4.125H24.375V15.1992C24.375 16.5703 25.4297 17.625 26.9062 17.625H37.875V49.793ZM21 21V34.5H34.3945C34.5 34.5 34.3945 34.5 34.3945 34.5C34.3945 27.1172 28.3828 21.1055 21 21ZM24.375 25.0078C27.2227 26.0625 29.4375 28.2773 30.4922 31.125H24.375V25.0078ZM19.3125 44.625C14.5664 44.625 10.875 40.9336 10.875 36.1875C10.875 32.1797 13.7227 28.8047 17.625 27.9609V24.5859C11.8242 25.4297 7.5 30.2812 7.5 36.1875C7.5 42.7266 12.7734 48 19.3125 48C25.2188 48 30.0703 43.6758 30.9141 37.875H27.5391C26.6953 41.7773 23.3203 44.625 19.3125 44.625Z" />
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 54 42" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M11.25 27C11.25 25.7812 10.2188 24.75 9 24.75C7.6875 24.75 6.75 25.7812 6.75 27C6.75 28.3125 7.6875 29.25 9 29.25C10.2188 29.25 11.25 28.3125 11.25 27ZM27 11.25C28.2188 11.25 29.25 10.3125 29.25 9C29.25 7.78125 28.2188 6.75 27 6.75C25.6875 6.75 24.75 7.78125 24.75 9C24.75 10.3125 25.6875 11.25 27 11.25ZM14.25 12C12.9375 12 12 13.0312 12 14.25C12 15.5625 12.9375 16.5 14.25 16.5C15.4688 16.5 16.5 15.5625 16.5 14.25C16.5 13.0312 15.4688 12 14.25 12ZM40.6875 13.125C40.0312 12.6562 39.0938 12.75 38.5312 13.3125L29.4375 24.5625C28.6875 24.2812 27.8438 24 27 24C23.625 24 21 26.7188 21 30C21 33.375 23.625 36 27 36C30.2812 36 33 33.375 33 30C33 28.6875 32.5312 27.4688 31.7812 26.5312L40.875 15.2812C41.4375 14.625 41.25 13.6875 40.6875 13.125ZM30 30C30 31.6875 28.5938 33 27 33C25.3125 33 24 31.6875 24 30C24 28.4062 25.3125 27 27 27C28.5938 27 30 28.4062 30 30ZM45 24.75C43.6875 24.75 42.75 25.7812 42.75 27C42.75 28.3125 43.6875 29.25 45 29.25C46.2188 29.25 47.25 28.3125 47.25 27C47.25 25.7812 46.2188 24.75 45 24.75ZM54 27C54 12.0938 41.9062 0 27 0C12 0 0 12.0938 0 27C0 31.9688 1.3125 36.6562 3.65625 40.5938C4.125 41.5312 5.15625 42 6.1875 42H47.7188C48.75 42 49.7812 41.5312 50.25 40.5938C52.5938 36.6562 54 31.9688 54 27ZM51 27C51 31.3125 49.875 35.4375 47.7188 39L6.1875 39.0938C4.125 35.4375 3 31.3125 3 27C3 13.7812 13.6875 3 27 3C40.2188 3 51 13.7812 51 27Z" />
3
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg viewBox="0 0 404 146" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M130 113.6H107.2V143H75.6002V113.6H0.200195V91.8001L66.2002 3.00009H100.2L39.0002 87.2001H76.6002V61.0001H107.2V87.2001H130V113.6Z"/>
3
+ <path d="M199.691 145.4C188.091 145.4 177.757 142.533 168.691 136.8C159.624 131.067 152.491 122.8 147.291 112C142.224 101.067 139.691 88.0668 139.691 73.0001C139.691 57.9334 142.224 45.0001 147.291 34.2001C152.491 23.2668 159.624 14.9334 168.691 9.20009C177.757 3.46676 188.091 0.600098 199.691 0.600098C211.291 0.600098 221.624 3.46676 230.691 9.20009C239.757 14.9334 246.824 23.2668 251.891 34.2001C257.091 45.0001 259.691 57.9334 259.691 73.0001C259.691 88.0668 257.091 101.067 251.891 112C246.824 122.8 239.757 131.067 230.691 136.8C221.624 142.533 211.291 145.4 199.691 145.4ZM199.691 118C208.224 118 214.891 114.333 219.691 107C224.624 99.6668 227.091 88.3334 227.091 73.0001C227.091 57.6668 224.624 46.3334 219.691 39.0001C214.891 31.6668 208.224 28.0001 199.691 28.0001C191.291 28.0001 184.624 31.6668 179.691 39.0001C174.891 46.3334 172.491 57.6668 172.491 73.0001C172.491 88.3334 174.891 99.6668 179.691 107C184.624 114.333 191.291 118 199.691 118Z"/>
4
+ <path d="M403.633 113.6H380.833V143H349.233V113.6H273.833V91.8001L339.833 3.00009H373.833L312.633 87.2001H350.233V61.0001H380.833V87.2001H403.633V113.6Z"/>
5
+ </svg>
package/icons/view.svg ADDED
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 52 34" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M25.973 19.9375C29.0491 19.9375 31.598 17.4766 31.598 14.3125C31.598 11.2363 29.0491 8.6875 25.973 8.6875C25.8851 8.6875 25.7972 8.77539 25.7093 8.77539C25.7972 9.21484 25.8851 9.6543 25.8851 10.1816C25.8851 12.4668 24.0394 14.3125 21.7542 14.3125C21.2269 14.3125 20.7874 14.2246 20.348 14.1367C20.348 14.2246 20.348 14.3125 20.348 14.3125C20.348 17.4766 22.8089 19.9375 25.973 19.9375ZM50.9339 15.8945C46.1878 6.57812 36.6956 0.25 25.973 0.25C15.1624 0.25 5.67024 6.57812 0.924145 15.8945C0.748363 16.2461 0.660473 16.6855 0.660473 17.125C0.660473 17.6523 0.748363 18.0918 0.924145 18.4434C5.67024 27.7598 15.1624 34 25.973 34C36.6956 34 46.1878 27.7598 50.9339 18.4434C51.1097 18.0918 51.1976 17.6523 51.1976 17.2129C51.1976 16.6855 51.1097 16.2461 50.9339 15.8945ZM25.973 3.0625C32.1253 3.0625 37.223 8.16016 37.223 14.3125C37.223 20.5527 32.1253 25.5625 25.973 25.5625C19.7327 25.5625 14.723 20.5527 14.723 14.3125C14.723 8.16016 19.7327 3.15039 25.973 3.0625ZM25.973 31.1875C16.4808 31.1875 7.8675 25.8262 3.47297 17.125C5.93391 12.291 9.88899 8.24805 14.8109 5.78711C12.9652 8.16016 11.9105 11.1484 11.9105 14.3125C11.9105 22.1348 18.1507 28.375 25.973 28.375C33.7073 28.375 40.0355 22.1348 40.0355 14.3125C40.0355 11.1484 38.8929 8.16016 37.0472 5.78711C41.9691 8.24805 45.9241 12.291 48.473 17.125C43.9906 25.8262 35.3773 31.1875 25.973 31.1875Z" />
3
+ </svg>
package/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as vue from 'vue';
2
2
  import { PropType, Plugin } from 'vue';
3
3
 
4
- declare const _default$1: vue.DefineComponent<{
4
+ declare const _default$2: vue.DefineComponent<{
5
5
  /**
6
6
  * The header title of the card
7
7
  */
@@ -29,7 +29,7 @@ declare const _default$1: vue.DefineComponent<{
29
29
  };
30
30
  }>>, {}>;
31
31
 
32
- declare type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success';
32
+ declare type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'text';
33
33
  interface ButtonDefinition {
34
34
  text: string;
35
35
  background: string;
@@ -48,7 +48,7 @@ interface FwButtonProps {
48
48
  size?: ButtonSize;
49
49
  variant?: ButtonVariantName;
50
50
  }
51
- declare const _default: vue.DefineComponent<{
51
+ declare const _default$1: vue.DefineComponent<{
52
52
  /**
53
53
  * A `router-link` path or object
54
54
  */
@@ -86,6 +86,7 @@ declare const _default: vue.DefineComponent<{
86
86
  onMouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any;
87
87
  onFocusin: (this: GlobalEventHandlers, ev: FocusEvent) => any;
88
88
  onFocusout: (this: GlobalEventHandlers, ev: FocusEvent) => any;
89
+ tagName: vue.ComputedRef<"router-link" | "a" | "button">;
89
90
  }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("click" | "mouseover" | "mouseout" | "focusin" | "focusout")[], "click" | "mouseover" | "mouseout" | "focusin" | "focusout", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
90
91
  /**
91
92
  * A `router-link` path or object
@@ -125,6 +126,49 @@ declare const _default: vue.DefineComponent<{
125
126
  variant: ButtonVariantName;
126
127
  }>;
127
128
 
129
+ interface NavMenuItem {
130
+ to?: string | object;
131
+ href?: string;
132
+ label: string;
133
+ }
134
+ declare const _default: vue.DefineComponent<{
135
+ /**
136
+ * An array of menu items
137
+ * `{ to?: string | object; href?: string; label: string; }`
138
+ */
139
+ menuItems: {
140
+ type: PropType<NavMenuItem[]>;
141
+ };
142
+ /**
143
+ * The label for the action button.
144
+ * Also emits the `action` event.
145
+ */
146
+ actionLabel: {
147
+ type: StringConstructor;
148
+ };
149
+ }, {
150
+ isMobileMenuOpen: vue.Ref<boolean>;
151
+ toggleMobileMenu: () => boolean;
152
+ actionClicked: () => void;
153
+ }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "action"[], "action", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
154
+ /**
155
+ * An array of menu items
156
+ * `{ to?: string | object; href?: string; label: string; }`
157
+ */
158
+ menuItems: {
159
+ type: PropType<NavMenuItem[]>;
160
+ };
161
+ /**
162
+ * The label for the action button.
163
+ * Also emits the `action` event.
164
+ */
165
+ actionLabel: {
166
+ type: StringConstructor;
167
+ };
168
+ }>> & {
169
+ onAction?: ((...args: any[]) => any) | undefined;
170
+ }, {}>;
171
+
128
172
  declare const install: Exclude<Plugin['install'], undefined>;
129
173
 
130
- export { ButtonDefinition, ButtonDefinitionList, ButtonSize, ButtonSizes, ButtonVariantName, _default as FwButton, FwButtonProps, _default$1 as FwCard, install as default };
174
+ export { ButtonDefinition, ButtonDefinitionList, ButtonSize, ButtonSizes, ButtonVariantName, _default$1 as FwButton, FwButtonProps, _default$2 as FwCard, _default as FwNavigationMenu, 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.3",
3
+ "version": "0.0.6",
4
4
  "description": "Frollo's UI library for components, utilities and configs",
5
5
  "exports": {
6
6
  "./tailwind.config.js": "./tailwind.config.js",
@@ -8,7 +8,7 @@ module.exports = {
8
8
  white: '#ffffff',
9
9
  black: '#000000',
10
10
  transparent: 'transparent',
11
- body: '#2C3E50',
11
+ body: '#000000',
12
12
  error: '#eb5757',
13
13
  success: '#00c48c',
14
14
  grey: {
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- export declare type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success';
2
+ export declare type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'text';
3
3
  export interface ButtonDefinition {
4
4
  text: string;
5
5
  background: string;
@@ -56,6 +56,7 @@ declare const _default: import("vue").DefineComponent<{
56
56
  onMouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any;
57
57
  onFocusin: (this: GlobalEventHandlers, ev: FocusEvent) => any;
58
58
  onFocusout: (this: GlobalEventHandlers, ev: FocusEvent) => any;
59
+ tagName: import("vue").ComputedRef<"router-link" | "a" | "button">;
59
60
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "mouseover" | "mouseout" | "focusin" | "focusout")[], "click" | "mouseover" | "mouseout" | "focusin" | "focusout", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
60
61
  /**
61
62
  * A `router-link` path or object
@@ -0,0 +1,44 @@
1
+ import { PropType } from 'vue';
2
+ export interface NavMenuItem {
3
+ to?: string | object;
4
+ href?: string;
5
+ label: string;
6
+ }
7
+ declare const _default: import("vue").DefineComponent<{
8
+ /**
9
+ * An array of menu items
10
+ * `{ to?: string | object; href?: string; label: string; }`
11
+ */
12
+ menuItems: {
13
+ type: PropType<NavMenuItem[]>;
14
+ };
15
+ /**
16
+ * The label for the action button.
17
+ * Also emits the `action` event.
18
+ */
19
+ actionLabel: {
20
+ type: StringConstructor;
21
+ };
22
+ }, {
23
+ isMobileMenuOpen: import("vue").Ref<boolean>;
24
+ toggleMobileMenu: () => boolean;
25
+ actionClicked: () => void;
26
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "action"[], "action", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
27
+ /**
28
+ * An array of menu items
29
+ * `{ to?: string | object; href?: string; label: string; }`
30
+ */
31
+ menuItems: {
32
+ type: PropType<NavMenuItem[]>;
33
+ };
34
+ /**
35
+ * The label for the action button.
36
+ * Also emits the `action` event.
37
+ */
38
+ actionLabel: {
39
+ type: StringConstructor;
40
+ };
41
+ }>> & {
42
+ onAction?: ((...args: any[]) => any) | undefined;
43
+ }, {}>;
44
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import FwNavigationMenu from './fw-navigation-menu.vue';
2
+ export { FwNavigationMenu };
@@ -1,2 +1,3 @@
1
1
  export * from './fw-card';
2
2
  export * from './fw-button';
3
+ export * from './fw-navigation-menu';
@@ -3,3 +3,4 @@ export default install;
3
3
  export * from './components';
4
4
  export * from './components/fw-card/fw-card.vue';
5
5
  export * from './components/fw-button/fw-button.vue';
6
+ export * from './components/fw-navigation-menu/fw-navigation-menu.vue';