@wmoney/ui-kit 1.0.27 → 1.0.28

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/dist/index.js CHANGED
@@ -9622,9 +9622,9 @@ function oh({ className: e, ...t }) {
9622
9622
  }
9623
9623
  //#endregion
9624
9624
  //#region src/components/DatePicker.tsx
9625
- function sh({ label: e, required: t, value: n, onChange: r }) {
9626
- let [i, a] = p(n), o = n === void 0 ? i : n, s = (e) => {
9627
- r ? r(e) : a(e);
9625
+ function sh({ label: e, required: t, value: n, buttonClassName: r, onChange: i }) {
9626
+ let [a, o] = p(n), s = n === void 0 ? a : n, c = (e) => {
9627
+ i ? i(e) : o(e);
9628
9628
  };
9629
9629
  return /* @__PURE__ */ g("div", {
9630
9630
  className: "mx-auto w-full sm:w-44 flex flex-col gap-1",
@@ -9643,8 +9643,8 @@ function sh({ label: e, required: t, value: n, onChange: r }) {
9643
9643
  children: /* @__PURE__ */ h(sn, {
9644
9644
  variant: "outline",
9645
9645
  id: "date-picker-simple",
9646
- className: "w-full justify-start px-2.5 font-normal",
9647
- children: o ? Gr(o, "dd/MM/yyyy", { locale: Fn }) : /* @__PURE__ */ h("span", {
9646
+ className: q("w-full justify-start px-2.5 font-normal", r),
9647
+ children: s ? Gr(s, "dd/MM/yyyy", { locale: Fn }) : /* @__PURE__ */ h("span", {
9648
9648
  className: "text-muted",
9649
9649
  children: "Selecione a data"
9650
9650
  })
@@ -9654,21 +9654,21 @@ function sh({ label: e, required: t, value: n, onChange: r }) {
9654
9654
  align: "start",
9655
9655
  children: /* @__PURE__ */ h(So, {
9656
9656
  mode: "single",
9657
- selected: o,
9658
- defaultMonth: o,
9657
+ selected: s,
9658
+ defaultMonth: s,
9659
9659
  captionLayout: "dropdown",
9660
9660
  onSelect: (e) => {
9661
- s(e);
9661
+ c(e);
9662
9662
  }
9663
9663
  })
9664
9664
  })] })]
9665
9665
  });
9666
9666
  }
9667
- function ch({ label: e, value: t, onChange: n }) {
9668
- let [r, i] = p({
9667
+ function ch({ label: e, value: t, onChange: n, buttonClassName: r }) {
9668
+ let [i, a] = p({
9669
9669
  from: new Date((/* @__PURE__ */ new Date()).getFullYear(), 0, 20),
9670
9670
  to: Jn(new Date((/* @__PURE__ */ new Date()).getFullYear(), 0, 20), 20)
9671
- }), a = t === void 0 ? r : t;
9671
+ }), o = t === void 0 ? i : t;
9672
9672
  return /* @__PURE__ */ g("div", {
9673
9673
  className: "w-full",
9674
9674
  children: [/* @__PURE__ */ h(Md, {
@@ -9679,12 +9679,12 @@ function ch({ label: e, value: t, onChange: n }) {
9679
9679
  children: /* @__PURE__ */ g(sn, {
9680
9680
  variant: "outline",
9681
9681
  id: "date-picker-range",
9682
- className: "w-full justify-start px-2.5 font-normal",
9683
- children: [/* @__PURE__ */ h(jt, {}), a?.from ? a.to ? /* @__PURE__ */ g(m, { children: [
9684
- Gr(a.from, "dd/MM/yyyy", { locale: Fn }),
9682
+ className: q("w-full justify-start px-2.5 font-normal", r),
9683
+ children: [/* @__PURE__ */ h(jt, {}), o?.from ? o.to ? /* @__PURE__ */ g(m, { children: [
9684
+ Gr(o.from, "dd/MM/yyyy", { locale: Fn }),
9685
9685
  " - ",
9686
- Gr(a.to, "dd/MM/yyyy", { locale: Fn })
9687
- ] }) : Gr(a.from, "dd/MM/yyyy", { locale: Fn }) : /* @__PURE__ */ h("span", {
9686
+ Gr(o.to, "dd/MM/yyyy", { locale: Fn })
9687
+ ] }) : Gr(o.from, "dd/MM/yyyy", { locale: Fn }) : /* @__PURE__ */ h("span", {
9688
9688
  className: "text-muted",
9689
9689
  children: "Selecione o período"
9690
9690
  })]
@@ -9694,10 +9694,10 @@ function ch({ label: e, value: t, onChange: n }) {
9694
9694
  align: "start",
9695
9695
  children: /* @__PURE__ */ h(So, {
9696
9696
  mode: "range",
9697
- defaultMonth: a?.from,
9698
- selected: a,
9697
+ defaultMonth: o?.from,
9698
+ selected: o,
9699
9699
  onSelect: (e) => {
9700
- n ? n(e) : i(e);
9700
+ n ? n(e) : a(e);
9701
9701
  },
9702
9702
  numberOfMonths: 2
9703
9703
  })