@frollo/frollo-web-ui 8.4.2 → 8.4.4

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.
@@ -8659,6 +8659,20 @@ var script$h = defineComponent({
8659
8659
  */
8660
8660
  external: {
8661
8661
  type: Boolean
8662
+ },
8663
+ /**
8664
+ * Whether the button is disabled or not
8665
+ */
8666
+ disabled: {
8667
+ type: Boolean,
8668
+ "default": false
8669
+ },
8670
+ /**
8671
+ * Whether the button is preselected or not
8672
+ */
8673
+ active: {
8674
+ type: Boolean,
8675
+ "default": false
8662
8676
  }
8663
8677
  },
8664
8678
  setup: function setup(props, ctx) {
@@ -8703,6 +8717,11 @@ var script$h = defineComponent({
8703
8717
  text: 'text-grey-base hover:text-primary active:text-primary',
8704
8718
  background: 'bg-none hover:bg-white focus:bg-white active:bg-white',
8705
8719
  border: 'border-transparent focus-visible:ring-1 focus-visible:ring-primary'
8720
+ },
8721
+ disabled: {
8722
+ text: 'text-white',
8723
+ background: 'bg-grey-base bg-opacity-60',
8724
+ border: ''
8706
8725
  }
8707
8726
  });
8708
8727
  var sizes = ref({
@@ -8793,13 +8812,14 @@ var _hoisted_1$v = {
8793
8812
  function render$o(_ctx, _cache, $props, $setup, $data, $options) {
8794
8813
  var _component_FwLoadingSpinner = resolveComponent("FwLoadingSpinner");
8795
8814
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), {
8796
- "class": normalizeClass(["fw-button", [_ctx.baseClass, _ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass, _ctx.rounded && _ctx.variant !== 'link' ? 'rounded-full' : 'rounded', _ctx.variant === 'link' ? 'pl-0 pr-0 pt-0 pb-0 font-normal rounded-1' : 'font-semibold', _ctx.animation === 'fade' ? 'animation--fade' : 'animation--alternate', _ctx.loading === true ? 'fw-button--loading cursor-progress' : 'cursor-pointer']]),
8815
+ "class": normalizeClass(["fw-button", [_ctx.baseClass, _ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass, _ctx.rounded && _ctx.variant !== 'link' ? 'rounded-full' : 'rounded', _ctx.variant === 'link' ? 'pl-0 pr-0 pt-0 pb-0 font-normal rounded-1' : 'font-semibold', _ctx.animation === 'fade' ? 'animation--fade' : 'animation--alternate', _ctx.loading === true ? 'fw-button--loading cursor-progress' : 'cursor-pointer', _ctx.disabled && !_ctx.loading ? 'pointer-events-none text-grey-light' : '', _ctx.disabled && _ctx.active ? 'fw-button--disabled-active' : '']]),
8797
8816
  type: _ctx.tagName === 'button' ? _ctx.buttonType : null,
8798
8817
  to: _ctx.to ? _ctx.to : null,
8799
8818
  href: _ctx.href ? _ctx.href : null,
8800
8819
  tabindex: _ctx.to ? 0 : null,
8801
- disabled: _ctx.loading,
8820
+ disabled: _ctx.loading || _ctx.disabled,
8802
8821
  target: !!_ctx.external ? '_blank' : null,
8822
+ active: _ctx.active,
8803
8823
  onClick: _ctx.onClick,
8804
8824
  onFocusin: _ctx.onFocusin,
8805
8825
  onFocusout: _ctx.onFocusout,
@@ -8821,11 +8841,11 @@ function render$o(_ctx, _cache, $props, $setup, $data, $options) {
8821
8841
  })], 2)) : createCommentVNode("", true)])) : createCommentVNode("", true)];
8822
8842
  }),
8823
8843
  _: 3
8824
- }, 40, ["class", "type", "to", "href", "tabindex", "disabled", "target", "onClick", "onFocusin", "onFocusout", "onMouseover", "onMouseout"]);
8844
+ }, 40, ["class", "type", "to", "href", "tabindex", "disabled", "target", "active", "onClick", "onFocusin", "onFocusout", "onMouseover", "onMouseout"]);
8825
8845
  }
8826
8846
 
8827
- var css_248z$f = ".fw-button{line-height:normal}.fw-button--label-wrapper{-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:margin,padding;-moz-transition-property:margin,padding;transition-property:margin,padding;-webkit-transition-timing-function:ease-in-out;-moz-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.fw-button--primary{background:var(--colorButtonPrimary);color:var(--colorButtonPrimaryText)}.fw-button--primary.fw-button--loading,.fw-button--primary:hover{background:var(--colorButtonPrimaryFade);border-color:var(--colorButtonPrimaryFade)}.fw-button--secondary{background:var(--colorButtonSecondary);color:var(--colorButtonSecondaryText)}.fw-button--secondary.animation--alternate.fw-button--loading,.fw-button--secondary.animation--alternate:hover{background:var(--colorButtonSecondaryText);color:var(--colorButtonSecondary)}.fw-button--secondary.animation--fade.fw-button--loading,.fw-button--secondary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--tertiary{background:var(--colorButtonTertiary);color:var(--colorButtonTertiaryText)}.fw-button--tertiary.animation--alternate.fw-button--loading,.fw-button--tertiary.animation--alternate:hover{background:var(--colorButtonTertiaryText);color:var(--colorButtonTertiary)}.fw-button--tertiary.animation--fade.fw-button--loading,.fw-button--tertiary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}";
8828
- var stylesheet$f = ".fw-button{line-height:normal}.fw-button--label-wrapper{-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:margin,padding;-moz-transition-property:margin,padding;transition-property:margin,padding;-webkit-transition-timing-function:ease-in-out;-moz-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.fw-button--primary{background:var(--colorButtonPrimary);color:var(--colorButtonPrimaryText)}.fw-button--primary.fw-button--loading,.fw-button--primary:hover{background:var(--colorButtonPrimaryFade);border-color:var(--colorButtonPrimaryFade)}.fw-button--secondary{background:var(--colorButtonSecondary);color:var(--colorButtonSecondaryText)}.fw-button--secondary.animation--alternate.fw-button--loading,.fw-button--secondary.animation--alternate:hover{background:var(--colorButtonSecondaryText);color:var(--colorButtonSecondary)}.fw-button--secondary.animation--fade.fw-button--loading,.fw-button--secondary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--tertiary{background:var(--colorButtonTertiary);color:var(--colorButtonTertiaryText)}.fw-button--tertiary.animation--alternate.fw-button--loading,.fw-button--tertiary.animation--alternate:hover{background:var(--colorButtonTertiaryText);color:var(--colorButtonTertiary)}.fw-button--tertiary.animation--fade.fw-button--loading,.fw-button--tertiary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}";
8847
+ var css_248z$f = ".fw-button{line-height:normal}.fw-button--label-wrapper{-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:margin,padding;-moz-transition-property:margin,padding;transition-property:margin,padding;-webkit-transition-timing-function:ease-in-out;-moz-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.fw-button--primary{background:var(--colorButtonPrimary);color:var(--colorButtonPrimaryText)}.fw-button--primary.fw-button--loading,.fw-button--primary:hover{background:var(--colorButtonPrimaryFade);border-color:var(--colorButtonPrimaryFade)}.fw-button--secondary{background:var(--colorButtonSecondary);color:var(--colorButtonSecondaryText)}.fw-button--secondary.animation--alternate.fw-button--loading,.fw-button--secondary.animation--alternate:hover{background:var(--colorButtonSecondaryText);color:var(--colorButtonSecondary)}.fw-button--secondary.animation--fade.fw-button--loading,.fw-button--secondary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--tertiary{background:var(--colorButtonTertiary);color:var(--colorButtonTertiaryText)}.fw-button--tertiary.animation--alternate.fw-button--loading,.fw-button--tertiary.animation--alternate:hover{background:var(--colorButtonTertiaryText);color:var(--colorButtonTertiary)}.fw-button--tertiary.animation--fade.fw-button--loading,.fw-button--tertiary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--disabled-active{background:var(--colorButtonDisabled)!important;color:rgb(from var(--colorButtonDisabledText) r g b/.6)!important}";
8848
+ var stylesheet$f = ".fw-button{line-height:normal}.fw-button--label-wrapper{-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:margin,padding;-moz-transition-property:margin,padding;transition-property:margin,padding;-webkit-transition-timing-function:ease-in-out;-moz-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.fw-button--primary{background:var(--colorButtonPrimary);color:var(--colorButtonPrimaryText)}.fw-button--primary.fw-button--loading,.fw-button--primary:hover{background:var(--colorButtonPrimaryFade);border-color:var(--colorButtonPrimaryFade)}.fw-button--secondary{background:var(--colorButtonSecondary);color:var(--colorButtonSecondaryText)}.fw-button--secondary.animation--alternate.fw-button--loading,.fw-button--secondary.animation--alternate:hover{background:var(--colorButtonSecondaryText);color:var(--colorButtonSecondary)}.fw-button--secondary.animation--fade.fw-button--loading,.fw-button--secondary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--tertiary{background:var(--colorButtonTertiary);color:var(--colorButtonTertiaryText)}.fw-button--tertiary.animation--alternate.fw-button--loading,.fw-button--tertiary.animation--alternate:hover{background:var(--colorButtonTertiaryText);color:var(--colorButtonTertiary)}.fw-button--tertiary.animation--fade.fw-button--loading,.fw-button--tertiary.animation--fade:hover{-webkit-filter:brightness(135%);filter:brightness(135%)}.fw-button--disabled-active{background:var(--colorButtonDisabled)!important;color:rgb(from var(--colorButtonDisabledText) r g b/.6)!important}";
8829
8849
  styleInject(css_248z$f);
8830
8850
 
8831
8851
  script$h.render = render$o;
@@ -9682,7 +9702,9 @@ var __default__$6 = defineComponent({
9682
9702
  type: Number
9683
9703
  }
9684
9704
  },
9685
- setup: function setup(props, ctx) {
9705
+ setup: function setup(props, _ref) {
9706
+ var emit = _ref.emit,
9707
+ expose = _ref.expose;
9686
9708
  var columns = computed(function () {
9687
9709
  return Object.keys(props.items[0]);
9688
9710
  });
@@ -9690,14 +9712,16 @@ var __default__$6 = defineComponent({
9690
9712
  var sortDirection = ref('asc');
9691
9713
  var currentSortedColumn = ref('');
9692
9714
  var currentPage = ref(1);
9693
- var maxPageAmount = ref();
9715
+ var maxPageAmount = computed(function () {
9716
+ if (props.totalAmount && props.pageSize) {
9717
+ return Math.ceil(props.totalAmount / props.pageSize);
9718
+ }
9719
+ return undefined;
9720
+ });
9694
9721
  onMounted(function () {
9695
9722
  if (Number(props.autoSortColumn) >= 0) {
9696
9723
  sortColumn(columns.value[Number(props.autoSortColumn)], false);
9697
9724
  }
9698
- if (props.totalAmount && props.pageSize) {
9699
- maxPageAmount.value = Math.ceil(props.totalAmount / props.pageSize);
9700
- }
9701
9725
  });
9702
9726
  var _useColours = useColours(),
9703
9727
  bgHoverColor = _useColours.primaryFade5;
@@ -9711,7 +9735,7 @@ var __default__$6 = defineComponent({
9711
9735
  sortBy.value = column;
9712
9736
  sortDirection.value = columnInitSort(column);
9713
9737
  }
9714
- if (isAction) ctx.emit('columnSorted', column, sortDirection.value);
9738
+ if (isAction) emit('columnSorted', column, sortDirection.value);
9715
9739
  };
9716
9740
  var sortedData = computed(function () {
9717
9741
  if (!sortBy.value) {
@@ -9765,12 +9789,19 @@ var __default__$6 = defineComponent({
9765
9789
  return false;
9766
9790
  };
9767
9791
  var rowClicked = function rowClicked(row) {
9768
- if (props.clickableRows) ctx.emit('rowClicked', row);
9792
+ if (props.clickableRows) emit('rowClicked', row);
9769
9793
  };
9770
9794
  var pageArrowClick = function pageArrowClick(next) {
9771
9795
  currentPage.value = currentPage.value + (next ? 1 : -1);
9772
- ctx.emit('pageChanged', next);
9796
+ emit('pageChanged', next);
9797
+ };
9798
+ var resetPage = function resetPage() {
9799
+ currentPage.value = 1;
9800
+ };
9801
+ var exposeApi = {
9802
+ resetPage: resetPage
9773
9803
  };
9804
+ expose(exposeApi);
9774
9805
  return {
9775
9806
  columns: columns,
9776
9807
  sortBy: sortBy,
@@ -9793,7 +9824,7 @@ var __default__$6 = defineComponent({
9793
9824
  var __injectCSSVars__$5 = function __injectCSSVars__() {
9794
9825
  useCssVars(function (_ctx) {
9795
9826
  return {
9796
- "73ca01a2": _ctx.bgHoverColor
9827
+ "59fbcffe": _ctx.bgHoverColor
9797
9828
  };
9798
9829
  });
9799
9830
  };
@@ -9804,7 +9835,7 @@ __default__$6.setup = __setup__$5 ? function (props, ctx) {
9804
9835
  } : __injectCSSVars__$5;
9805
9836
 
9806
9837
  var _withScopeId$4 = function _withScopeId(n) {
9807
- return pushScopeId("data-v-b2774452"), n = n(), popScopeId(), n;
9838
+ return pushScopeId("data-v-a1dc6c66"), n = n(), popScopeId(), n;
9808
9839
  };
9809
9840
  var _hoisted_1$p = {
9810
9841
  "class": "flex flex-col"
@@ -9954,12 +9985,12 @@ function render$h(_ctx, _cache, $props, $setup, $data, $options) {
9954
9985
  }, 8, ["disabled"])])) : createCommentVNode("", true)]);
9955
9986
  }
9956
9987
 
9957
- var css_248z$b = ".fw-table-head--sortable[data-v-b2774452]:hover{background-color:var(--73ca01a2)}.fw-table-row[data-v-b2774452]:hover{background-color:var(--73ca01a2)}";
9958
- var stylesheet$b = ".fw-table-head--sortable[data-v-b2774452]:hover{background-color:var(--73ca01a2)}.fw-table-row[data-v-b2774452]:hover{background-color:var(--73ca01a2)}";
9988
+ var css_248z$b = ".fw-table-head--sortable[data-v-a1dc6c66]:hover{background-color:var(--59fbcffe)}.fw-table-row[data-v-a1dc6c66]:hover{background-color:var(--59fbcffe)}";
9989
+ var stylesheet$b = ".fw-table-head--sortable[data-v-a1dc6c66]:hover{background-color:var(--59fbcffe)}.fw-table-row[data-v-a1dc6c66]:hover{background-color:var(--59fbcffe)}";
9959
9990
  styleInject(css_248z$b);
9960
9991
 
9961
9992
  __default__$6.render = render$h;
9962
- __default__$6.__scopeId = "data-v-b2774452";
9993
+ __default__$6.__scopeId = "data-v-a1dc6c66";
9963
9994
 
9964
9995
  var script$b = defineComponent({
9965
9996
  name: 'FwTableHead'
@@ -34683,7 +34714,7 @@ function usePage() {
34683
34714
  "Page context missing. Please verify this component is nested within a valid context provider."
34684
34715
  );
34685
34716
  }
34686
- const _hoisted_1$5$1 = { class: "vc-nav-header" };
34717
+ const _hoisted_1$5 = { class: "vc-nav-header" };
34687
34718
  const _hoisted_2$4$1 = ["disabled"];
34688
34719
  const _hoisted_3$3 = ["disabled"];
34689
34720
  const _hoisted_4$2$1 = { class: "vc-nav-items" };
@@ -34833,7 +34864,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
34833
34864
  ref_key: "navContainer",
34834
34865
  ref: navContainer
34835
34866
  }, [
34836
- createElementVNode("div", _hoisted_1$5$1, [
34867
+ createElementVNode("div", _hoisted_1$5, [
34837
34868
  createElementVNode("button", {
34838
34869
  type: "button",
34839
34870
  class: "vc-nav-arrow is-left vc-focus",
@@ -36675,7 +36706,7 @@ __default__$3.setup = __setup__$3 ? function (props, ctx) {
36675
36706
  return __setup__$3(props, ctx);
36676
36707
  } : __injectCSSVars__$3;
36677
36708
 
36678
- var _hoisted_1$5 = {
36709
+ var _hoisted_1$4 = {
36679
36710
  "class": "fw-date-picker w-full"
36680
36711
  };
36681
36712
  var _hoisted_2$4 = {
@@ -36724,7 +36755,7 @@ var _hoisted_18 = {
36724
36755
  function render$5(_ctx, _cache, $props, $setup, $data, $options) {
36725
36756
  var _component_CalendarDaySvg = resolveComponent("CalendarDaySvg");
36726
36757
  var _component_DatePicker = resolveComponent("DatePicker");
36727
- return openBlock(), createElementBlock("div", _hoisted_1$5, [createVNode(_component_DatePicker, {
36758
+ return openBlock(), createElementBlock("div", _hoisted_1$4, [createVNode(_component_DatePicker, {
36728
36759
  modelValue: _ctx.dateModel,
36729
36760
  "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
36730
36761
  return _ctx.dateModel = $event;
@@ -37059,7 +37090,7 @@ __default__$2.setup = __setup__$2 ? function (props, ctx) {
37059
37090
  var _withScopeId$2 = function _withScopeId(n) {
37060
37091
  return pushScopeId("data-v-6df01fae"), n = n(), popScopeId(), n;
37061
37092
  };
37062
- var _hoisted_1$4 = ["id", "aria-hidden"];
37093
+ var _hoisted_1$3 = ["id", "aria-hidden"];
37063
37094
  var _hoisted_2$3 = {
37064
37095
  key: 0,
37065
37096
  "data-popper-arrow": "",
@@ -37099,7 +37130,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
37099
37130
  })
37100
37131
  }, [renderSlot(_ctx.$slots, "content", {}, function () {
37101
37132
  return [createTextVNode(toDisplayString(_ctx.title), 1)];
37102
- }), _ctx.showArrow ? (openBlock(), createElementBlock("span", _hoisted_2$3)) : createCommentVNode("", true)], 10, _hoisted_1$4)], 2);
37133
+ }), _ctx.showArrow ? (openBlock(), createElementBlock("span", _hoisted_2$3)) : createCommentVNode("", true)], 10, _hoisted_1$3)], 2);
37103
37134
  }
37104
37135
 
37105
37136
  var css_248z$3 = ".fw-popover__content[data-v-6df01fae]{opacity:0;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;transition:all .3s ease;white-space:normal;z-index:9999}.fw-popover__content--center[data-v-6df01fae]{text-align:center}.fw-popover__content--left[data-v-6df01fae]{text-align:left}.fw-popover__content--right[data-v-6df01fae]{text-align:right}.fw-popover--visible .fw-popover__content[data-v-6df01fae]{opacity:1;pointer-events:all}.fw-popover__arrow[data-v-6df01fae]:after{height:var(--bf2f5546);left:0;top:0;-webkit-transform:translate(-50%,-50%) rotate(45deg);-moz-transform:translate(-50%,-50%) rotate(45deg);-ms-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg);width:var(--bf2f5546)}.fw-popover__content[data-popper-placement^=top][data-v-6df01fae]{margin-bottom:var(--bf2f5546)!important}.fw-popover__content[data-popper-placement^=right][data-v-6df01fae]{margin-left:var(--bf2f5546)!important}.fw-popover__content[data-popper-placement^=bottom][data-v-6df01fae]{margin-top:var(--bf2f5546)!important}.fw-popover__content[data-popper-placement^=left][data-v-6df01fae]{margin-right:var(--bf2f5546)!important}.fw-popover__content[data-popper-placement^=top] .fw-popover__arrow[data-v-6df01fae]{bottom:0}.fw-popover__content[data-popper-placement^=right] .fw-popover__arrow[data-v-6df01fae]{left:0}.fw-popover__content[data-popper-placement^=bottom] .fw-popover__arrow[data-v-6df01fae]{top:0}.fw-popover__content[data-popper-placement^=left] .fw-popover__arrow[data-v-6df01fae]{right:0}.fw-popover__content[data-popper-placement^=top] .fw-popover__arrow[data-v-6df01fae]{bottom:-1px}.fw-popover__content[data-popper-placement^=top] .fw-popover__arrow[data-v-6df01fae]:after{border-left:none;border-top:none}.fw-popover__content[data-popper-placement^=right] .fw-popover__arrow[data-v-6df01fae]{left:-1px}.fw-popover__content[data-popper-placement^=right] .fw-popover__arrow[data-v-6df01fae]:after{border-right:none;border-top:none}.fw-popover__content[data-popper-placement^=bottom] .fw-popover__arrow[data-v-6df01fae]{top:-1px}.fw-popover__content[data-popper-placement^=bottom] .fw-popover__arrow[data-v-6df01fae]:after{border-bottom:none;border-right:none}.fw-popover__content[data-popper-placement^=left] .fw-popover__arrow[data-v-6df01fae]{right:-1px}.fw-popover__content[data-popper-placement^=left] .fw-popover__arrow[data-v-6df01fae]:after{border-bottom:none;border-left:none}";
@@ -37135,6 +37166,10 @@ var script$1 = defineComponent({
37135
37166
  validator: function validator(value) {
37136
37167
  return ['sm', 'md', 'lg', 'xl', '2xl'].includes(value);
37137
37168
  }
37169
+ },
37170
+ disabled: {
37171
+ type: Boolean,
37172
+ "default": false
37138
37173
  }
37139
37174
  },
37140
37175
  setup: function setup(props, ctx) {
@@ -37156,27 +37191,28 @@ var script$1 = defineComponent({
37156
37191
  }
37157
37192
  });
37158
37193
 
37159
- var _hoisted_1$3 = {
37160
- "class": "fw-period-selector w-fit bg-grey-light bg-opacity-10 border-grey-light border-2 border-opacity-40 gap-x-1"
37161
- };
37162
37194
  function render$3(_ctx, _cache, $props, $setup, $data, $options) {
37163
37195
  var _component_FwButton = resolveComponent("FwButton");
37164
- return openBlock(), createElementBlock("div", _hoisted_1$3, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.periodOptions, function (period) {
37196
+ return openBlock(), createElementBlock("div", {
37197
+ "class": normalizeClass(["fw-period-selector w-fit bg-grey-light bg-opacity-10 border-grey-light border-2 border-opacity-40 gap-x-1", _ctx.disabled === true ? 'hover:none cursor:none pointer-events-none' : ''])
37198
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.periodOptions, function (period) {
37165
37199
  return openBlock(), createBlock(_component_FwButton, {
37166
37200
  key: period,
37167
- variant: _ctx.selectedPeriod === period ? 'tertiary' : 'transparent',
37201
+ variant: _ctx.selectedPeriod === period ? _ctx.disabled ? 'disabled' : 'tertiary' : 'transparent',
37168
37202
  "class": "hover:!border-button-primary-bg -m-[2px] flex-1",
37169
37203
  size: _ctx.size,
37170
37204
  onClick: function onClick($event) {
37171
37205
  return _ctx.selectedPeriod = period;
37172
- }
37206
+ },
37207
+ disabled: _ctx.disabled,
37208
+ active: _ctx.disabled && _ctx.selectedPeriod === period
37173
37209
  }, {
37174
37210
  "default": withCtx(function () {
37175
37211
  return [createTextVNode(toDisplayString(_ctx.generateButtonLabel(period)), 1)];
37176
37212
  }),
37177
37213
  _: 2
37178
- }, 1032, ["variant", "size", "onClick"]);
37179
- }), 128))]);
37214
+ }, 1032, ["variant", "size", "onClick", "disabled", "active"]);
37215
+ }), 128))], 2);
37180
37216
  }
37181
37217
 
37182
37218
  var css_248z$2 = ".fw-period-selector{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-moz-box-orient:horizontal;-moz-box-direction:normal;border-radius:9999px;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}";
package/index.d.ts CHANGED
@@ -608,7 +608,7 @@ declare const _default$l: vue.DefineComponent<{
608
608
  isBordered: boolean;
609
609
  }, {}>;
610
610
 
611
- type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'link' | 'text' | 'transparent';
611
+ type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'link' | 'text' | 'transparent' | 'disabled';
612
612
  declare interface ButtonDefinition {
613
613
  text: string;
614
614
  background: string;
@@ -634,6 +634,8 @@ declare interface FwButtonProps {
634
634
  rounded?: boolean;
635
635
  loading?: boolean;
636
636
  external?: boolean;
637
+ disabled?: boolean;
638
+ active?: boolean;
637
639
  }
638
640
 
639
641
  declare const _default$k: vue.DefineComponent<{
@@ -708,6 +710,20 @@ declare const _default$k: vue.DefineComponent<{
708
710
  external: {
709
711
  type: BooleanConstructor;
710
712
  };
713
+ /**
714
+ * Whether the button is disabled or not
715
+ */
716
+ disabled: {
717
+ type: BooleanConstructor;
718
+ default: boolean;
719
+ };
720
+ /**
721
+ * Whether the button is preselected or not
722
+ */
723
+ active: {
724
+ type: BooleanConstructor;
725
+ default: boolean;
726
+ };
711
727
  }, {
712
728
  baseClass: vue.Ref<string>;
713
729
  textColorClass: vue.ComputedRef<string>;
@@ -808,6 +824,20 @@ declare const _default$k: vue.DefineComponent<{
808
824
  external: {
809
825
  type: BooleanConstructor;
810
826
  };
827
+ /**
828
+ * Whether the button is disabled or not
829
+ */
830
+ disabled: {
831
+ type: BooleanConstructor;
832
+ default: boolean;
833
+ };
834
+ /**
835
+ * Whether the button is preselected or not
836
+ */
837
+ active: {
838
+ type: BooleanConstructor;
839
+ default: boolean;
840
+ };
811
841
  }>> & {
812
842
  onClick?: ((...args: any[]) => any) | undefined;
813
843
  onMouseover?: ((...args: any[]) => any) | undefined;
@@ -816,12 +846,14 @@ declare const _default$k: vue.DefineComponent<{
816
846
  onFocusout?: ((...args: any[]) => any) | undefined;
817
847
  }, {
818
848
  size: ButtonSize;
849
+ disabled: boolean;
819
850
  variant: ButtonVariantName;
820
851
  buttonType: ButtonTypeAttribute;
821
852
  animation: ButtonAnimation;
822
853
  rounded: boolean;
823
854
  loading: boolean;
824
855
  external: boolean;
856
+ active: boolean;
825
857
  }, {}>;
826
858
 
827
859
  declare interface NavMenuItem {
@@ -1299,6 +1331,9 @@ declare interface FwTableProps {
1299
1331
  totalAmount?: number;
1300
1332
  pageSize?: number;
1301
1333
  }
1334
+ declare type FwTableApi = {
1335
+ resetPage: () => void;
1336
+ };
1302
1337
 
1303
1338
  declare interface FwAccordionProps {
1304
1339
  title?: string;
@@ -1558,7 +1593,7 @@ declare const __default__$5: vue.DefineComponent<{
1558
1593
  rowClicked: (row: FwTableItem) => void;
1559
1594
  bgHoverColor: string;
1560
1595
  currentPage: vue.Ref<number>;
1561
- maxPageAmount: vue.Ref<number | undefined>;
1596
+ maxPageAmount: vue.ComputedRef<number | undefined>;
1562
1597
  pageArrowClick: (next: boolean) => void;
1563
1598
  }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("rowClicked" | "columnSorted" | "pageChanged")[], "rowClicked" | "columnSorted" | "pageChanged", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
1564
1599
  items: {
@@ -2893,6 +2928,10 @@ declare const _default$2: vue.DefineComponent<{
2893
2928
  default: string;
2894
2929
  validator: (value: string) => boolean;
2895
2930
  };
2931
+ disabled: {
2932
+ type: BooleanConstructor;
2933
+ default: boolean;
2934
+ };
2896
2935
  }, {
2897
2936
  generateButtonLabel: (month: number) => string;
2898
2937
  selectedPeriod: vue.WritableComputedRef<number | undefined>;
@@ -2914,10 +2953,15 @@ declare const _default$2: vue.DefineComponent<{
2914
2953
  default: string;
2915
2954
  validator: (value: string) => boolean;
2916
2955
  };
2956
+ disabled: {
2957
+ type: BooleanConstructor;
2958
+ default: boolean;
2959
+ };
2917
2960
  }>> & {
2918
2961
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
2919
2962
  }, {
2920
2963
  size: ButtonSize;
2964
+ disabled: boolean;
2921
2965
  }, {}>;
2922
2966
 
2923
2967
  declare const _default$1: vue.DefineComponent<{
@@ -3104,4 +3148,4 @@ declare const install: Exclude<Plugin['install'], undefined>;
3104
3148
 
3105
3149
  declare module '@frollo/frollo-web-ui/icons' { }
3106
3150
 
3107
- export { type ButtonAnimation, type ButtonDefinition, type ButtonDefinitionList, type ButtonSize, type ButtonSizes, type ButtonTypeAttribute, type ButtonVariantName, __default__$4 as FwAccordion, type FwAccordionProps, _default$6 as FwBarChart, type FwBarChartProps, type FwBarGraphData, _default$k as FwButton, type FwButtonProps, _default$l as FwCard, type FwCardProps, _default$n as FwCheckbox, type FwCheckboxProps, __default__$3 as FwDatePicker, type FwDatePickerProps, _default$4 as FwDrawer, type FwDrawerProps, _default$m as FwDropdown, type FwDropdownOption, type FwDropdownProps, __default__$1 as FwEmailPulse, _default$c as FwImage, type FwImageProps, _default$o as FwInput, type FwInputProps, type FwInputType, _default$b as FwLoadingBar, _default$a as FwLoadingCard, _default as FwLoadingSpinner, _default$9 as FwLoadingTable, _default$1 as FwMediaPicker, type FwMediaPickerProps, _default$g as FwModal, type FwModalProps, _default$j as FwNavigationMenu, _default$2 as FwPeriodSelector, __default__$2 as FwPopover, type FwPopoverProps, _default$f as FwProgressBar, _default$3 as FwProviderList, type FwProviderListItem, type FwProviderListProps, _default$5 as FwSidebarMenu, type FwSidebarMenuItem, __default__ as FwSuccessPulse, _default$h as FwTab, __default__$5 as FwTable, type FwTableFormatFunction, _default$e as FwTableHead, type FwTableItem, type FwTableItemOptions, type FwTableProps, _default$d as FwTableRow, type FwTableSort, _default$i as FwTabs, type FwTabsProps, __default__$6 as FwTag, type FwTagProps, _default$8 as FwToast, type FwToastProps, _default$7 as FwTransactionsCard, type FwTransactionsCardProps, type ModalServiceProps, type NavMenuItem, type ProgressBarStep, type TabsState, type TagDefinition, type TagDefinitionList, type TagSize, type TagSizes, type TagVariantName, type ToastPosition, type ToastServiceProps, type ToastType, type ToastTypes, install as default, modalService, toastService };
3151
+ export { type ButtonAnimation, type ButtonDefinition, type ButtonDefinitionList, type ButtonSize, type ButtonSizes, type ButtonTypeAttribute, type ButtonVariantName, __default__$4 as FwAccordion, type FwAccordionProps, _default$6 as FwBarChart, type FwBarChartProps, type FwBarGraphData, _default$k as FwButton, type FwButtonProps, _default$l as FwCard, type FwCardProps, _default$n as FwCheckbox, type FwCheckboxProps, __default__$3 as FwDatePicker, type FwDatePickerProps, _default$4 as FwDrawer, type FwDrawerProps, _default$m as FwDropdown, type FwDropdownOption, type FwDropdownProps, __default__$1 as FwEmailPulse, _default$c as FwImage, type FwImageProps, _default$o as FwInput, type FwInputProps, type FwInputType, _default$b as FwLoadingBar, _default$a as FwLoadingCard, _default as FwLoadingSpinner, _default$9 as FwLoadingTable, _default$1 as FwMediaPicker, type FwMediaPickerProps, _default$g as FwModal, type FwModalProps, _default$j as FwNavigationMenu, _default$2 as FwPeriodSelector, __default__$2 as FwPopover, type FwPopoverProps, _default$f as FwProgressBar, _default$3 as FwProviderList, type FwProviderListItem, type FwProviderListProps, _default$5 as FwSidebarMenu, type FwSidebarMenuItem, __default__ as FwSuccessPulse, _default$h as FwTab, __default__$5 as FwTable, type FwTableApi, type FwTableFormatFunction, _default$e as FwTableHead, type FwTableItem, type FwTableItemOptions, type FwTableProps, _default$d as FwTableRow, type FwTableSort, _default$i as FwTabs, type FwTabsProps, __default__$6 as FwTag, type FwTagProps, _default$8 as FwToast, type FwToastProps, _default$7 as FwTransactionsCard, type FwTransactionsCardProps, type ModalServiceProps, type NavMenuItem, type ProgressBarStep, type TabsState, type TagDefinition, type TagDefinitionList, type TagSize, type TagSizes, type TagVariantName, type ToastPosition, type ToastServiceProps, type ToastType, type ToastTypes, install as default, modalService, toastService };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frollo/frollo-web-ui",
3
- "version": "8.4.2",
3
+ "version": "8.4.4",
4
4
  "description": "Frollo's UI library for components, utilities and configs",
5
5
  "exports": {
6
6
  "./icons": "./icons/index.ts",
@@ -24,12 +24,11 @@
24
24
  --colorButtonTertiary: #ffffff;
25
25
  --colorButtonTertiaryText: #6923ff;
26
26
 
27
+ --colorButtonDisabled: #ffffff;
28
+ --colorButtonDisabledText: #4B4B4B;
29
+
27
30
  --fontFamily: 'Montserrat';
28
31
  }
29
- /*
30
- * Default font family
31
- */
32
- @import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;1,500&display=swap');
33
32
 
34
33
  /** Typography */
35
34
 
@@ -22,6 +22,10 @@ module.exports = {
22
22
  tertiary: {
23
23
  bg: 'var(--colorButtonTertiary)',
24
24
  text: 'var(--colorButtonTertiaryText)'
25
+ },
26
+ disabled: {
27
+ bg: 'var(--colorButtonDisabled)',
28
+ text: 'var(--colorButtonDisabledText)'
25
29
  }
26
30
  },
27
31
  grey: {
@@ -72,6 +72,20 @@ declare const _default: import("vue").DefineComponent<{
72
72
  external: {
73
73
  type: BooleanConstructor;
74
74
  };
75
+ /**
76
+ * Whether the button is disabled or not
77
+ */
78
+ disabled: {
79
+ type: BooleanConstructor;
80
+ default: boolean;
81
+ };
82
+ /**
83
+ * Whether the button is preselected or not
84
+ */
85
+ active: {
86
+ type: BooleanConstructor;
87
+ default: boolean;
88
+ };
75
89
  }, {
76
90
  baseClass: import("vue").Ref<string>;
77
91
  textColorClass: import("vue").ComputedRef<string>;
@@ -172,6 +186,20 @@ declare const _default: import("vue").DefineComponent<{
172
186
  external: {
173
187
  type: BooleanConstructor;
174
188
  };
189
+ /**
190
+ * Whether the button is disabled or not
191
+ */
192
+ disabled: {
193
+ type: BooleanConstructor;
194
+ default: boolean;
195
+ };
196
+ /**
197
+ * Whether the button is preselected or not
198
+ */
199
+ active: {
200
+ type: BooleanConstructor;
201
+ default: boolean;
202
+ };
175
203
  }>> & {
176
204
  onClick?: ((...args: any[]) => any) | undefined;
177
205
  onMouseover?: ((...args: any[]) => any) | undefined;
@@ -180,11 +208,13 @@ declare const _default: import("vue").DefineComponent<{
180
208
  onFocusout?: ((...args: any[]) => any) | undefined;
181
209
  }, {
182
210
  size: ButtonSize;
211
+ disabled: boolean;
183
212
  variant: ButtonVariantName;
184
213
  buttonType: ButtonTypeAttribute;
185
214
  animation: ButtonAnimation;
186
215
  rounded: boolean;
187
216
  loading: boolean;
188
217
  external: boolean;
218
+ active: boolean;
189
219
  }, {}>;
190
220
  export default _default;
@@ -1,4 +1,4 @@
1
- export type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'link' | 'text' | 'transparent';
1
+ export type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'link' | 'text' | 'transparent' | 'disabled';
2
2
  export declare interface ButtonDefinition {
3
3
  text: string;
4
4
  background: string;
@@ -24,4 +24,6 @@ export declare interface FwButtonProps {
24
24
  rounded?: boolean;
25
25
  loading?: boolean;
26
26
  external?: boolean;
27
+ disabled?: boolean;
28
+ active?: boolean;
27
29
  }
@@ -18,6 +18,10 @@ declare const _default: import("vue").DefineComponent<{
18
18
  default: string;
19
19
  validator: (value: string) => boolean;
20
20
  };
21
+ disabled: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
21
25
  }, {
22
26
  generateButtonLabel: (month: number) => string;
23
27
  selectedPeriod: import("vue").WritableComputedRef<number | undefined>;
@@ -39,9 +43,14 @@ declare const _default: import("vue").DefineComponent<{
39
43
  default: string;
40
44
  validator: (value: string) => boolean;
41
45
  };
46
+ disabled: {
47
+ type: BooleanConstructor;
48
+ default: boolean;
49
+ };
42
50
  }>> & {
43
51
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
44
52
  }, {
45
53
  size: ButtonSize;
54
+ disabled: boolean;
46
55
  }, {}>;
47
56
  export default _default;
@@ -48,7 +48,7 @@ declare const __default__: import("vue").DefineComponent<{
48
48
  rowClicked: (row: FwTableItem) => void;
49
49
  bgHoverColor: string;
50
50
  currentPage: import("vue").Ref<number>;
51
- maxPageAmount: import("vue").Ref<number | undefined>;
51
+ maxPageAmount: import("vue").ComputedRef<number | undefined>;
52
52
  pageArrowClick: (next: boolean) => void;
53
53
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("rowClicked" | "columnSorted" | "pageChanged")[], "rowClicked" | "columnSorted" | "pageChanged", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
54
54
  items: {
@@ -17,3 +17,6 @@ export declare interface FwTableProps {
17
17
  totalAmount?: number;
18
18
  pageSize?: number;
19
19
  }
20
+ export declare type FwTableApi = {
21
+ resetPage: () => void;
22
+ };