@frollo/frollo-web-ui 8.1.1 → 8.2.0

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.
@@ -0,0 +1,76 @@
1
+ import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, Fragment, renderList, createBlock, withCtx, createTextVNode, toDisplayString } from 'vue';
2
+ import './fw-button.js';
3
+ import { s as script$1 } from './fw-button-DdxvSBFa.js';
4
+ import './fw-loading-spinner-BEzZf1xe.js';
5
+ import './index-svDiDkSU.js';
6
+ import './check--YD4Ts6g.js';
7
+ import './style-inject.es-tgCJW-Cu.js';
8
+
9
+ var script = defineComponent({
10
+ name: 'FwPeriodSelector',
11
+ emits: [/** Fired on Click */
12
+ 'periodSelected'],
13
+ components: {
14
+ FwButton: script$1
15
+ },
16
+ props: {
17
+ /**
18
+ * The available periods to be chosen in months.
19
+ */
20
+ periodOptions: {
21
+ type: Array
22
+ },
23
+ /**
24
+ * A size that will be propogated down to the button. Accepts: 'sm', 'md', 'lg', 'xl', '2xl'
25
+ */
26
+ size: {
27
+ type: String,
28
+ "default": 'lg',
29
+ validator: function validator(value) {
30
+ return ['sm', 'md', 'lg', 'xl', '2xl'].includes(value);
31
+ }
32
+ }
33
+ },
34
+ setup: function setup(_props, ctx) {
35
+ var selectedPeriod = ref();
36
+ var generateButtonLabel = function generateButtonLabel(month) {
37
+ return month === 1 ? month.toString() + ' month' : month.toString() + ' months';
38
+ };
39
+ var onClick = function onClick(period) {
40
+ selectedPeriod.value = period;
41
+ ctx.emit('periodSelected', period);
42
+ };
43
+ return {
44
+ generateButtonLabel: generateButtonLabel,
45
+ onClick: onClick,
46
+ selectedPeriod: selectedPeriod
47
+ };
48
+ }
49
+ });
50
+
51
+ var _hoisted_1 = {
52
+ "class": "flex flex-row w-fit bg-grey-light bg-opacity-10 border-grey-light border-2 border-opacity-40 rounded-full"
53
+ };
54
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
55
+ var _component_FwButton = resolveComponent("FwButton");
56
+ return openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.periodOptions, function (period) {
57
+ return openBlock(), createBlock(_component_FwButton, {
58
+ key: period,
59
+ variant: _ctx.selectedPeriod === period ? 'tertiary' : 'transparent',
60
+ "class": "scale-105 hover:!border-button-primary-bg mx-[3px]",
61
+ size: _ctx.size,
62
+ onClick: function onClick($event) {
63
+ return _ctx.onClick(period);
64
+ }
65
+ }, {
66
+ "default": withCtx(function () {
67
+ return [createTextVNode(toDisplayString(_ctx.generateButtonLabel(period)), 1)];
68
+ }),
69
+ _: 2
70
+ }, 1032, ["variant", "size", "onClick"]);
71
+ }), 128))]);
72
+ }
73
+
74
+ script.render = render;
75
+
76
+ export { script as FwPeriodSelector };
@@ -1,6 +1,6 @@
1
1
  import { e as _defineProperty } from './_rollupPluginBabelHelpers-DpC_oIQV.js';
2
2
  import { defineComponent, ref, computed, createElementVNode, resolveComponent, openBlock, createElementBlock, toDisplayString, createVNode, withCtx, createBlock, createCommentVNode, createTextVNode } from 'vue';
3
- import { _ as __default__, s as script$4, a as script$5 } from './fw-table-row-Cianlk0N.js';
3
+ import { _ as __default__, s as script$4, a as script$5 } from './fw-table-row-CBQBV4yq.js';
4
4
  import { s as script$1 } from './fw-input-BPFFMpc2.js';
5
5
  import { _ as __default__$1 } from './fw-tag-508OLlZR.js';
6
6
  import { s as script$3 } from './fw-button-DdxvSBFa.js';
@@ -1,5 +1,5 @@
1
1
  import { g as render$3, h as render$4, i as render$5, f as render$6 } from './index-svDiDkSU.js';
2
- import { defineComponent, computed, ref, onMounted, useCssVars, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, renderSlot, createCommentVNode, Fragment, renderList, withKeys, toDisplayString, createBlock, createVNode, withCtx } from 'vue';
2
+ import { defineComponent, computed, ref, onMounted, useCssVars, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, createElementVNode, mergeProps, renderSlot, createCommentVNode, Fragment, renderList, normalizeClass, withKeys, toDisplayString, createBlock, createVNode, withCtx } from 'vue';
3
3
  import { u as useColours } from './get-root-colours-DYEoJPEb.js';
4
4
  import { s as script$2 } from './fw-loading-bar-DThRjdw1.js';
5
5
  import { s as script$3 } from './fw-button-DdxvSBFa.js';
@@ -165,7 +165,7 @@ var __default__ = defineComponent({
165
165
  var __injectCSSVars__ = function __injectCSSVars__() {
166
166
  useCssVars(function (_ctx) {
167
167
  return {
168
- "11c7ec1c": _ctx.bgHoverColor
168
+ "73ca01a2": _ctx.bgHoverColor
169
169
  };
170
170
  });
171
171
  };
@@ -176,7 +176,7 @@ __default__.setup = __setup__ ? function (props, ctx) {
176
176
  } : __injectCSSVars__;
177
177
 
178
178
  var _withScopeId = function _withScopeId(n) {
179
- return pushScopeId("data-v-b7ffd9d4"), n = n(), popScopeId(), n;
179
+ return pushScopeId("data-v-b2774452"), n = n(), popScopeId(), n;
180
180
  };
181
181
  var _hoisted_1$2 = {
182
182
  "class": "flex flex-col"
@@ -217,11 +217,11 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
217
217
  var _component_ChevronLeftSvg = resolveComponent("ChevronLeftSvg");
218
218
  var _component_FwButton = resolveComponent("FwButton");
219
219
  var _component_ChevronRightSvg = resolveComponent("ChevronRightSvg");
220
- return openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("table", {
221
- "class": normalizeClass(["fw-table table-auto table-responsive rounded-md shadow-card flex-1", _ctx.loading ? 'cursor-wait' : '']),
220
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("table", mergeProps(_ctx.$attrs, {
221
+ "class": ["fw-table table-auto table-responsive rounded-md shadow-card flex-1", _ctx.loading ? 'cursor-wait' : ''],
222
222
  "aria-live": "polite",
223
223
  "aria-busy": _ctx.loading
224
- }, [createElementVNode("thead", _hoisted_3$1, [createElementVNode("tr", null, [_ctx.$slots.preHead ? renderSlot(_ctx.$slots, "preHead", {
224
+ }), [createElementVNode("thead", _hoisted_3$1, [createElementVNode("tr", null, [_ctx.$slots.preHead ? renderSlot(_ctx.$slots, "preHead", {
225
225
  key: 0
226
226
  }) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, thKey) {
227
227
  return openBlock(), createElementBlock(Fragment, {
@@ -292,7 +292,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
292
292
  key: 1,
293
293
  row: row
294
294
  }) : createCommentVNode("", true)], 42, _hoisted_10);
295
- }), 128))])], 10, _hoisted_2$1), _ctx.enablePagination ? (openBlock(), createElementBlock("div", _hoisted_12, [createVNode(_component_FwButton, {
295
+ }), 128))])], 16, _hoisted_2$1), _ctx.enablePagination ? (openBlock(), createElementBlock("div", _hoisted_12, [createVNode(_component_FwButton, {
296
296
  variant: 'tertiary',
297
297
  disabled: _ctx.currentPage === 1,
298
298
  size: "sm",
@@ -326,12 +326,12 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
326
326
  }, 8, ["disabled"])])) : createCommentVNode("", true)]);
327
327
  }
328
328
 
329
- var css_248z = ".fw-table-head--sortable[data-v-b7ffd9d4]:hover{background-color:var(--11c7ec1c)}.fw-table-row[data-v-b7ffd9d4]:hover{background-color:var(--11c7ec1c)}";
330
- var stylesheet = ".fw-table-head--sortable[data-v-b7ffd9d4]:hover{background-color:var(--11c7ec1c)}.fw-table-row[data-v-b7ffd9d4]:hover{background-color:var(--11c7ec1c)}";
329
+ var css_248z = ".fw-table-head--sortable[data-v-b2774452]:hover{background-color:var(--73ca01a2)}.fw-table-row[data-v-b2774452]:hover{background-color:var(--73ca01a2)}";
330
+ var stylesheet = ".fw-table-head--sortable[data-v-b2774452]:hover{background-color:var(--73ca01a2)}.fw-table-row[data-v-b2774452]:hover{background-color:var(--73ca01a2)}";
331
331
  styleInject(css_248z);
332
332
 
333
333
  __default__.render = render$2;
334
- __default__.__scopeId = "data-v-b7ffd9d4";
334
+ __default__.__scopeId = "data-v-b2774452";
335
335
 
336
336
  var script$1 = defineComponent({
337
337
  name: 'FwTableHead'
package/esm/fw-table.js CHANGED
@@ -1,4 +1,4 @@
1
- export { _ as FwTable, s as FwTableHead, a as FwTableRow } from './fw-table-row-Cianlk0N.js';
1
+ export { _ as FwTable, s as FwTableHead, a as FwTableRow } from './fw-table-row-CBQBV4yq.js';
2
2
  import './index-svDiDkSU.js';
3
3
  import 'vue';
4
4
  import './check--YD4Ts6g.js';
package/esm/index.js CHANGED
@@ -6,22 +6,23 @@ import './fw-dropdown.js';
6
6
  import './fw-card.js';
7
7
  import './fw-button.js';
8
8
  import { FwNavigationMenu as script$d } from './fw-navigation-menu.js';
9
- import { FwTab as script$h, FwTabs as script$k } from './fw-tabs.js';
9
+ import { FwTab as script$i, FwTabs as script$l } from './fw-tabs.js';
10
10
  import { FwModal as script$c } from './fw-modal.js';
11
- import { FwProgressBar as script$e } from './fw-progress-bar.js';
11
+ import { FwProgressBar as script$f } from './fw-progress-bar.js';
12
12
  import './fw-tag.js';
13
13
  import './fw-table.js';
14
14
  import { FwAccordion as __default__ } from './fw-accordion.js';
15
15
  import './fw-image.js';
16
16
  import { FwLoadingCard as script$9, FwLoadingTable as script$b } from './fw-loading.js';
17
- import { FwToast as script$l } from './fw-toast.js';
18
- import { FwTransactionsCard as script$m } from './fw-transactions-card.js';
17
+ import { FwToast as script$m } from './fw-toast.js';
18
+ import { FwTransactionsCard as script$n } from './fw-transactions-card.js';
19
19
  import { FwBarChart as script } from './fw-bar-chart.js';
20
- import { FwSidebarMenu as script$g } from './fw-sidebar-menu.js';
20
+ import { FwSidebarMenu as script$h } from './fw-sidebar-menu.js';
21
21
  import { FwDrawer as script$4 } from './fw-drawer.js';
22
- import { FwProviderList as script$f } from './fw-provider-list.js';
22
+ import { FwProviderList as script$g } from './fw-provider-list.js';
23
23
  import { FwDatePicker as __default__$1 } from './fw-date-picker.js';
24
24
  import { FwPopover as __default__$3 } from './fw-popover.js';
25
+ import { FwPeriodSelector as script$e } from './fw-period-selector.js';
25
26
  import { FwEmailPulse as __default__$2, FwSuccessPulse as __default__$4 } from './fw-animations.js';
26
27
  import { F as Form } from './vee-validate.esm-3ptvCDR1.js';
27
28
  import { s as script$7 } from './fw-input-BPFFMpc2.js';
@@ -29,7 +30,7 @@ import { s as script$5 } from './fw-dropdown-BcnKbaW1.js';
29
30
  import { s as script$2 } from './fw-card-bsYbpPmW.js';
30
31
  import { s as script$1 } from './fw-button-DdxvSBFa.js';
31
32
  import { _ as __default__$6 } from './fw-tag-508OLlZR.js';
32
- import { _ as __default__$5, s as script$i, a as script$j } from './fw-table-row-Cianlk0N.js';
33
+ import { _ as __default__$5, s as script$j, a as script$k } from './fw-table-row-CBQBV4yq.js';
33
34
  import { s as script$6 } from './fw-image-DedhILQL.js';
34
35
  import { s as script$8 } from './fw-loading-bar-DThRjdw1.js';
35
36
  import { s as script$a } from './fw-loading-spinner-BEzZf1xe.js';
@@ -63,19 +64,20 @@ var components = /*#__PURE__*/Object.freeze({
63
64
  FwLoadingTable: script$b,
64
65
  FwModal: script$c,
65
66
  FwNavigationMenu: script$d,
67
+ FwPeriodSelector: script$e,
66
68
  FwPopover: __default__$3,
67
- FwProgressBar: script$e,
68
- FwProviderList: script$f,
69
- FwSidebarMenu: script$g,
69
+ FwProgressBar: script$f,
70
+ FwProviderList: script$g,
71
+ FwSidebarMenu: script$h,
70
72
  FwSuccessPulse: __default__$4,
71
- FwTab: script$h,
73
+ FwTab: script$i,
72
74
  FwTable: __default__$5,
73
- FwTableHead: script$i,
74
- FwTableRow: script$j,
75
- FwTabs: script$k,
75
+ FwTableHead: script$j,
76
+ FwTableRow: script$k,
77
+ FwTabs: script$l,
76
78
  FwTag: __default__$6,
77
- FwToast: script$l,
78
- FwTransactionsCard: script$m
79
+ FwToast: script$m,
80
+ FwTransactionsCard: script$n
79
81
  });
80
82
 
81
83
  var modalService = function modalService(options) {
@@ -109,7 +111,7 @@ var toastService = function toastService() {
109
111
  }));
110
112
  createApp({
111
113
  render: function render() {
112
- return h(script$l, props);
114
+ return h(script$m, props);
113
115
  }
114
116
  }).mount(elementToMount);
115
117
  };
@@ -138,4 +140,4 @@ var install = function install(app) {
138
140
  });
139
141
  };
140
142
 
141
- export { __default__ as FwAccordion, script as FwBarChart, script$1 as FwButton, script$2 as FwCard, script$3 as FwCheckbox, __default__$1 as FwDatePicker, script$4 as FwDrawer, script$5 as FwDropdown, __default__$2 as FwEmailPulse, Form as FwForm, script$6 as FwImage, script$7 as FwInput, script$8 as FwLoadingBar, script$9 as FwLoadingCard, script$a as FwLoadingSpinner, script$b as FwLoadingTable, script$c as FwModal, script$d as FwNavigationMenu, __default__$3 as FwPopover, script$e as FwProgressBar, script$f as FwProviderList, script$g as FwSidebarMenu, __default__$4 as FwSuccessPulse, script$h as FwTab, __default__$5 as FwTable, script$i as FwTableHead, script$j as FwTableRow, script$k as FwTabs, __default__$6 as FwTag, script$l as FwToast, script$m as FwTransactionsCard, install as default, modalService, toastService };
143
+ export { __default__ as FwAccordion, script as FwBarChart, script$1 as FwButton, script$2 as FwCard, script$3 as FwCheckbox, __default__$1 as FwDatePicker, script$4 as FwDrawer, script$5 as FwDropdown, __default__$2 as FwEmailPulse, Form as FwForm, script$6 as FwImage, script$7 as FwInput, script$8 as FwLoadingBar, script$9 as FwLoadingCard, script$a as FwLoadingSpinner, script$b as FwLoadingTable, script$c as FwModal, script$d as FwNavigationMenu, script$e as FwPeriodSelector, __default__$3 as FwPopover, script$f as FwProgressBar, script$g as FwProviderList, script$h as FwSidebarMenu, __default__$4 as FwSuccessPulse, script$i as FwTab, __default__$5 as FwTable, script$j as FwTableHead, script$k as FwTableRow, script$l as FwTabs, __default__$6 as FwTag, script$m as FwToast, script$n as FwTransactionsCard, install as default, modalService, toastService };