@srimandir/pitru-paksh-common 3.1.2 → 3.1.5

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.
@@ -1,4 +1,4 @@
1
- import { createI18n as Ga, cn as m, BottomSheet as ke, DEFAULT_COUNTRIES as Ua, getMaxLengthForCountry as sa, validatePhoneByCountryCode as ra, getFlagEmoji as Ka } from "@srimandir/common";
1
+ import { createI18n as Ga, cn as m, BottomSheet as Ie, DEFAULT_COUNTRIES as Ua, getMaxLengthForCountry as sa, validatePhoneByCountryCode as ra, getFlagEmoji as Ka } from "@srimandir/common";
2
2
  import { cn as Wl } from "@srimandir/common";
3
3
  import * as Za from "react";
4
4
  import k, { useState as V, useRef as Ze, useMemo as $e, useEffect as We, forwardRef as Ya, Fragment as qa } from "react";
@@ -258,7 +258,7 @@ const Un = ["en", "hi", "kn", "te"], Ja = {
258
258
  kn: ts,
259
259
  te: as
260
260
  }, na = Ga(rt), Kn = na.I18nProvider;
261
- function _e() {
261
+ function ke() {
262
262
  return na.useI18n();
263
263
  }
264
264
  const Nt = (t, a) => (rt[t] ?? rt.en)[a];
@@ -1370,7 +1370,7 @@ function Ss(t) {
1370
1370
  function xa(t) {
1371
1371
  return E({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "rect", attr: { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }, child: [] }, { tag: "line", attr: { x1: "16", y1: "2", x2: "16", y2: "6" }, child: [] }, { tag: "line", attr: { x1: "8", y1: "2", x2: "8", y2: "6" }, child: [] }, { tag: "line", attr: { x1: "3", y1: "10", x2: "21", y2: "10" }, child: [] }] })(t);
1372
1372
  }
1373
- function Pe(t) {
1373
+ function _e(t) {
1374
1374
  return E({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "line", attr: { x1: "5", y1: "12", x2: "19", y2: "12" }, child: [] }, { tag: "polyline", attr: { points: "12 5 19 12 12 19" }, child: [] }] })(t);
1375
1375
  }
1376
1376
  function lt(t) {
@@ -1384,7 +1384,7 @@ function Qn({
1384
1384
  onProceedClick: l,
1385
1385
  disabled: i
1386
1386
  }) {
1387
- const { t: u } = _e();
1387
+ const { t: u } = ke();
1388
1388
  return /* @__PURE__ */ e.jsxs(
1389
1389
  "div",
1390
1390
  {
@@ -1421,7 +1421,7 @@ function Qn({
1421
1421
  },
1422
1422
  children: [
1423
1423
  r ?? u("outcomeStickyCtaProceedLabel"),
1424
- /* @__PURE__ */ e.jsx(Pe, { "aria-hidden": !0, className: "size-[18px] text-white" })
1424
+ /* @__PURE__ */ e.jsx(_e, { "aria-hidden": !0, className: "size-[18px] text-white" })
1425
1425
  ]
1426
1426
  }
1427
1427
  )
@@ -1431,7 +1431,7 @@ function Qn({
1431
1431
  }
1432
1432
  const Ts = "https://srm-sbox-cdn.a4b.io/yoda/1788262425704.svg";
1433
1433
  function Jn() {
1434
- const { t } = _e();
1434
+ const { t } = ke();
1435
1435
  return /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-col items-center gap-3 rounded-[20px] border border-[#e5e3fd] bg-white p-3 shadow-[0px_0px_20px_0px_rgba(215,99,28,0.05)]", children: [
1436
1436
  /* @__PURE__ */ e.jsx("img", { src: Ts, alt: "", "aria-hidden": !0, className: "size-6" }),
1437
1437
  /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-col items-center gap-1", children: [
@@ -1442,7 +1442,7 @@ function Jn() {
1442
1442
  }
1443
1443
  const Rs = "https://srm-sbox-cdn.a4b.io/yoda/1788261755933.webp", Es = "https://srm-sbox-cdn.a4b.io/yoda/1788261771996.webp", St = "https://srm-sbox-cdn.a4b.io/yoda/1788261812755.svg", As = "linear-gradient(28.44deg, #fbe9f0 0.54%, #ffffff 18.28%, #ffffff 53.34%, #fcccdf 100%), linear-gradient(90deg, #fff9e9 0%, #fff9e9 100%)";
1444
1444
  function el() {
1445
- const { t } = _e();
1445
+ const { t } = ke();
1446
1446
  return /* @__PURE__ */ e.jsxs(
1447
1447
  "section",
1448
1448
  {
@@ -1535,7 +1535,7 @@ const Tt = "https://srm-cdn.a4b.io/yoda/1788322995409.svg", Rt = "https://srm-cd
1535
1535
  }
1536
1536
  ];
1537
1537
  function tl() {
1538
- const { t } = _e();
1538
+ const { t } = ke();
1539
1539
  return /* @__PURE__ */ e.jsxs("section", { className: "flex w-full flex-col items-center justify-center gap-5 px-4 py-8", children: [
1540
1540
  /* @__PURE__ */ e.jsxs("div", { className: "flex w-full items-center gap-2", children: [
1541
1541
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-center gap-1", children: [
@@ -1622,7 +1622,7 @@ const Et = "https://srm-sbox-cdn.a4b.io/yoda/1788262151570.svg", At = "https://s
1622
1622
  }
1623
1623
  ];
1624
1624
  function al() {
1625
- const { t } = _e();
1625
+ const { t } = ke();
1626
1626
  return /* @__PURE__ */ e.jsxs("section", { className: "flex w-full flex-col items-center gap-4 py-4", children: [
1627
1627
  /* @__PURE__ */ e.jsxs("div", { className: "flex w-full items-center gap-2 px-4", children: [
1628
1628
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-center gap-1", children: [
@@ -1789,7 +1789,7 @@ function nl({
1789
1789
  imageAlt: r = "",
1790
1790
  paragraphs: n
1791
1791
  }) {
1792
- const { t: l } = _e(), [i, u] = V(!1);
1792
+ const { t: l } = ke(), [i, u] = V(!1);
1793
1793
  return /* @__PURE__ */ e.jsxs("section", { className: "flex w-full flex-col items-start bg-white px-4 py-4", children: [
1794
1794
  /* @__PURE__ */ e.jsx("p", { className: "w-full text-lg font-bold leading-6 text-[#242424]", children: t }),
1795
1795
  /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-col items-start pt-4", children: [
@@ -2067,7 +2067,7 @@ const rr = Xa(
2067
2067
  )
2068
2068
  );
2069
2069
  X.displayName = "Button";
2070
- function Ie(t) {
2070
+ function Pe(t) {
2071
2071
  return t.isOpen ? /* @__PURE__ */ e.jsx(
2072
2072
  "div",
2073
2073
  {
@@ -2077,7 +2077,7 @@ function Ie(t) {
2077
2077
  maxWidth: "var(--pitru-paksh-sheet-overlay-max-width, 28rem)",
2078
2078
  zIndex: 1100
2079
2079
  },
2080
- children: /* @__PURE__ */ e.jsx(ke, { ...t })
2080
+ children: /* @__PURE__ */ e.jsx(Ie, { ...t })
2081
2081
  }
2082
2082
  ) : null;
2083
2083
  }
@@ -3287,7 +3287,7 @@ const fl = ({ value: t, onClick: a, className: r, ...n }) => /* @__PURE__ */ e.j
3287
3287
  }) => {
3288
3288
  const y = typeof d == "number" && d > x, j = y ? Math.round((d - x) / d * 100) : 0, v = (b ?? y) && j > 0;
3289
3289
  return /* @__PURE__ */ e.jsx(
3290
- Ie,
3290
+ Pe,
3291
3291
  {
3292
3292
  isOpen: t,
3293
3293
  onClose: a,
@@ -3616,7 +3616,7 @@ const Zr = [
3616
3616
  onInfoClick: u,
3617
3617
  infoIconClassName: o,
3618
3618
  proceedLabel: c,
3619
- proceedIcon: g = /* @__PURE__ */ e.jsx(Pe, { "aria-hidden": !0 }),
3619
+ proceedIcon: g = /* @__PURE__ */ e.jsx(_e, { "aria-hidden": !0 }),
3620
3620
  onProceed: x,
3621
3621
  proceedButtonProps: d,
3622
3622
  buttonWrapperClassName: f,
@@ -4082,7 +4082,7 @@ function vl({
4082
4082
  }) {
4083
4083
  const x = ya(r);
4084
4084
  return /* @__PURE__ */ e.jsx(
4085
- Ie,
4085
+ Pe,
4086
4086
  {
4087
4087
  isOpen: t,
4088
4088
  onClose: a,
@@ -4301,7 +4301,7 @@ function Nl({
4301
4301
  c && u(c);
4302
4302
  };
4303
4303
  return /* @__PURE__ */ e.jsx(
4304
- ke,
4304
+ Ie,
4305
4305
  {
4306
4306
  isOpen: t,
4307
4307
  onClose: a,
@@ -4423,7 +4423,7 @@ function wl({
4423
4423
  u({ day: P, month: D, year: B });
4424
4424
  };
4425
4425
  return /* @__PURE__ */ e.jsx(
4426
- ke,
4426
+ Ie,
4427
4427
  {
4428
4428
  isOpen: t,
4429
4429
  onClose: a,
@@ -4480,7 +4480,7 @@ function Cl({
4480
4480
  i({ hour: _, minute: Ut[p] });
4481
4481
  };
4482
4482
  return /* @__PURE__ */ e.jsx(
4483
- ke,
4483
+ Ie,
4484
4484
  {
4485
4485
  isOpen: t,
4486
4486
  onClose: a,
@@ -4558,12 +4558,13 @@ function Ll({
4558
4558
  p && u(d, x);
4559
4559
  };
4560
4560
  return /* @__PURE__ */ e.jsx(
4561
- Ie,
4561
+ Pe,
4562
4562
  {
4563
4563
  isOpen: t,
4564
4564
  onClose: a,
4565
4565
  showDragHandle: !0,
4566
- showCloseButton: !1,
4566
+ showCloseButton: !0,
4567
+ closeButtonOutside: !0,
4567
4568
  ariaLabel: r,
4568
4569
  className: "min-h-[25vh]",
4569
4570
  overlayClassName: "pitru-paksh-common-root",
@@ -4573,7 +4574,7 @@ function Ll({
4573
4574
  variant: "primary",
4574
4575
  size: "xl",
4575
4576
  className: "w-full rounded-xl bg-linear-to-b from-[#5eb98e] to-[#159169] focus-visible:ring-[#159169]",
4576
- rightIcon: /* @__PURE__ */ e.jsx(Pe, { "aria-hidden": !0 }),
4577
+ rightIcon: /* @__PURE__ */ e.jsx(_e, { "aria-hidden": !0 }),
4577
4578
  disabled: !p,
4578
4579
  onClick: N,
4579
4580
  children: i
@@ -4619,11 +4620,13 @@ function kl({
4619
4620
  b && i(f);
4620
4621
  };
4621
4622
  return /* @__PURE__ */ e.jsx(
4622
- ke,
4623
+ Pe,
4623
4624
  {
4624
4625
  isOpen: t,
4625
4626
  onClose: a,
4626
4627
  showDragHandle: !0,
4628
+ showCloseButton: !0,
4629
+ closeButtonOutside: !0,
4627
4630
  ariaLabel: r,
4628
4631
  footer: /* @__PURE__ */ e.jsx("div", { className: "px-4 pt-3 pb-5", children: /* @__PURE__ */ e.jsx(
4629
4632
  X,
@@ -4631,7 +4634,7 @@ function kl({
4631
4634
  variant: "primary",
4632
4635
  size: "xl",
4633
4636
  className: "w-full rounded-xl",
4634
- rightIcon: /* @__PURE__ */ e.jsx(Pe, { "aria-hidden": !0 }),
4637
+ rightIcon: /* @__PURE__ */ e.jsx(_e, { "aria-hidden": !0 }),
4635
4638
  disabled: !b,
4636
4639
  onClick: N,
4637
4640
  children: l
@@ -4879,7 +4882,7 @@ function cn({
4879
4882
  }) {
4880
4883
  const f = on(r), b = f.payButtonTemplate.replace("{amount}", o);
4881
4884
  return /* @__PURE__ */ e.jsx(
4882
- Ie,
4885
+ Pe,
4883
4886
  {
4884
4887
  isOpen: t,
4885
4888
  onClose: a,
@@ -4978,7 +4981,7 @@ const Yt = {
4978
4981
  function dn({ isOpen: t, onClose: a, onOkayClick: r, locale: n = "en", className: l }) {
4979
4982
  const i = wa(n);
4980
4983
  return /* @__PURE__ */ e.jsx(
4981
- Ie,
4984
+ Pe,
4982
4985
  {
4983
4986
  isOpen: t,
4984
4987
  onClose: a,
@@ -5655,7 +5658,7 @@ function Rl({
5655
5658
  y.length !== 0 && (r(y), f());
5656
5659
  }, N = x.some((y) => y.trim().length > 0);
5657
5660
  return /* @__PURE__ */ e.jsx(
5658
- ke,
5661
+ Ie,
5659
5662
  {
5660
5663
  isOpen: t,
5661
5664
  onClose: b,
@@ -5669,7 +5672,7 @@ function Rl({
5669
5672
  variant: "primary",
5670
5673
  size: "xl",
5671
5674
  className: "w-full rounded-xl",
5672
- rightIcon: /* @__PURE__ */ e.jsx(Pe, { "aria-hidden": !0 }),
5675
+ rightIcon: /* @__PURE__ */ e.jsx(_e, { "aria-hidden": !0 }),
5673
5676
  disabled: !N,
5674
5677
  onClick: p,
5675
5678
  children: c
@@ -6099,7 +6102,7 @@ function Hl({
6099
6102
  showInfoIcon: l = !0,
6100
6103
  onInfoClick: i,
6101
6104
  proceedLabel: u = "Continue",
6102
- proceedIcon: o = /* @__PURE__ */ e.jsx(Pe, { "aria-hidden": !0 }),
6105
+ proceedIcon: o = /* @__PURE__ */ e.jsx(_e, { "aria-hidden": !0 }),
6103
6106
  onProceed: c,
6104
6107
  disabled: g,
6105
6108
  proceedButtonProps: x,
@@ -6180,7 +6183,7 @@ export {
6180
6183
  qn as CheckIcon,
6181
6184
  ct as CheckoutBar,
6182
6185
  or as Chip,
6183
- Ie as ConfinedBottomSheet,
6186
+ Pe as ConfinedBottomSheet,
6184
6187
  cn as ConfirmPujaDetailsModal,
6185
6188
  El as DEATH_TITHI_OPTIONS,
6186
6189
  wl as DatePickerSheet,
@@ -6258,5 +6261,5 @@ export {
6258
6261
  Dl as mapPujaL2Response,
6259
6262
  rt as outcomeTranslations,
6260
6263
  In as parseIsoDate,
6261
- _e as useOutcomeI18n
6264
+ ke as useOutcomeI18n
6262
6265
  };