@frollo/frollo-web-ui 8.1.2 → 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 };
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-CBQBV4yq.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 };