@srimandir/pitru-paksh-common 2.62.0 → 2.66.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.
Files changed (25) hide show
  1. package/dist/components/AddAncestorSheet/AddAncestorSheet.d.ts +1 -3
  2. package/dist/components/AudioQuestionCard/AudioQuestionCard.d.ts +0 -2
  3. package/dist/components/BillDetails/BillDetails.d.ts +0 -5
  4. package/dist/components/BillDetails/index.d.ts +0 -2
  5. package/dist/components/BookingSummaryBanner/BookingSummaryBanner.translations.d.ts +0 -4
  6. package/dist/components/CartView/CartView.d.ts +0 -10
  7. package/dist/components/DatePickerSheet/DatePickerSheet.d.ts +1 -2
  8. package/dist/components/GotraInfoModal/GotraInfoModal.d.ts +1 -1
  9. package/dist/components/GotraInfoModal/GotraInfoModal.types.d.ts +0 -2
  10. package/dist/components/L2Card/L2Card.d.ts +2 -3
  11. package/dist/components/PujaDetails/PujaDetailsCarouselHeader.d.ts +2 -2
  12. package/dist/components/PujaDetailsForm/PujaDetailsForm.constants.d.ts +0 -14
  13. package/dist/components/PujaDetailsForm/PujaDetailsForm.d.ts +1 -1
  14. package/dist/components/PujaDetailsForm/PujaDetailsForm.translations.d.ts +0 -4
  15. package/dist/components/PujaDetailsForm/PujaDetailsForm.types.d.ts +0 -17
  16. package/dist/components/ServiceOfferCard/ServiceOfferCard.d.ts +0 -9
  17. package/dist/components/TithiPickerSheet/TithiPickerSheet.d.ts +1 -2
  18. package/dist/components/VideoPlayer/VideoPlayer.d.ts +0 -13
  19. package/dist/index.d.ts +2 -2
  20. package/dist/pitru-paksh-common.d.ts +2 -2
  21. package/dist/pitru-paksh-common.js +2084 -2406
  22. package/dist/pitru-paksh-common.umd.cjs +8 -8
  23. package/dist/style.css +1 -1
  24. package/package.json +2 -3
  25. package/dist/components/BillDetails/BillDetailsSheet.d.ts +0 -16
@@ -1,8 +1,6 @@
1
- import { BottomSheetCloseReason } from '../../../../common/dist/common.js';
2
1
  export interface AddAncestorSheetProps {
3
2
  isOpen: boolean;
4
- /** Not called on Save — only on an actual dismiss (close button, backdrop, Escape). Saving is `onSave`'s job to close, so callers can tell the two apart. */
5
- onClose: (reason?: BottomSheetCloseReason) => void;
3
+ onClose: () => void;
6
4
  onSave: (names: string[]) => void;
7
5
  title: string;
8
6
  fieldLabel: string;
@@ -7,7 +7,5 @@ export interface AudioQuestionCardProps extends React.HTMLAttributes<HTMLDivElem
7
7
  description?: React.ReactNode;
8
8
  /** When provided, plays once automatically on mount. */
9
9
  audioSrc?: string;
10
- /** Analytics-only: fires whenever the mute/unmute button is tapped. */
11
- onMuteToggle?: (muted: boolean) => void;
12
10
  }
13
11
  export declare const AudioQuestionCard: React.FC<AudioQuestionCardProps>;
@@ -13,7 +13,6 @@ export interface BillDetailsRow {
13
13
  note?: React.ReactNode;
14
14
  /** Struck-through value shown before the final value, e.g. "₹851". */
15
15
  originalValue?: React.ReactNode;
16
- originalValueClassName?: string;
17
16
  /** Final value, e.g. "₹200.0/-" or "FREE". Style it (e.g. green for FREE) via `valueClassName`. */
18
17
  value: React.ReactNode;
19
18
  valueClassName?: string;
@@ -25,8 +24,6 @@ export interface BillDetailsProps extends Omit<React.HTMLAttributes<HTMLDivEleme
25
24
  */
26
25
  locale?: BillDetailsLocale;
27
26
  titleClassName?: string;
28
- /** Set to `false` when a containing sheet provides its own header. */
29
- showTitle?: boolean;
30
27
  rows: BillDetailsRow[];
31
28
  rowClassName?: string;
32
29
  /** Set to `false` to hide the accent bar before the title. */
@@ -40,8 +37,6 @@ export interface BillDetailsProps extends Omit<React.HTMLAttributes<HTMLDivEleme
40
37
  * from INR to USD. Defaults to `false` (India pricing).
41
38
  */
42
39
  isGlobalUser?: boolean;
43
- /** Set to `false` when the caller already supplies waived-fee rows. */
44
- showDefaultWaivedFees?: boolean;
45
40
  }
46
41
  /**
47
42
  * Itemized price breakdown used at the bottom of a cart/review screen:
@@ -1,4 +1,2 @@
1
1
  export { BillDetails } from './BillDetails';
2
2
  export type { BillDetailsProps, BillDetailsRow } from './BillDetails';
3
- export { BillDetailsSheet } from './BillDetailsSheet';
4
- export type { BillDetailsSheetProps } from './BillDetailsSheet';
@@ -12,10 +12,6 @@ export interface BookingSummaryBannerDefaultCopy {
12
12
  ancestorsLabel: string;
13
13
  ritualsLabel: string;
14
14
  performersLabel: string;
15
- /** Singular forms, used when that stat's count is exactly 1 (e.g. "1 Performer" instead of "1 Performers"). */
16
- ancestorLabel: string;
17
- ritualLabel: string;
18
- performerLabel: string;
19
15
  }
20
16
  export declare const BOOKING_SUMMARY_BANNER_DEFAULT_COPY: Record<BookingSummaryBannerLocale, BookingSummaryBannerDefaultCopy>;
21
17
  /** Resolves the default copy for `locale`, falling back to `'en'` when unsupported. */
@@ -55,14 +55,6 @@ export interface CartViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>
55
55
  itemsClassName?: string;
56
56
  /** className applied to every item; per-item `className` (via the item object) wins/merges on top. */
57
57
  itemClassName?: string;
58
- /**
59
- * Reports each rendered item row's DOM node as it mounts/unmounts, keyed
60
- * by the item's own `id`. No visibility tracking happens here — this
61
- * component stays dumb; observing these nodes (e.g. via
62
- * `IntersectionObserver`) is the caller's job, same division as
63
- * `Outcome`'s own `onCardRef`.
64
- */
65
- onItemRef?: (id: CartViewItem['id'], el: HTMLDivElement | null) => void;
66
58
  /** Add-on `ServiceOfferCard`s (tarpan, cow service, public service, ...). Omit/empty to hide the section. */
67
59
  addons?: CartViewAddon[];
68
60
  addonsSectionClassName?: string;
@@ -74,8 +66,6 @@ export interface CartViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>
74
66
  addonClassName?: string;
75
67
  /** Optional card implementation for add-ons. Defaults to `ServiceOfferCard`. */
76
68
  addonComponent?: React.ComponentType<ServiceOfferCardProps>;
77
- /** Same as `onItemRef`, for add-on cards. */
78
- onAddonRef?: (id: CartViewAddon['id'], el: HTMLDivElement | null) => void;
79
69
  /** Price breakdown. Omit to hide it. All `BillDetails` props are available. */
80
70
  billDetails?: BillDetailsProps;
81
71
  /** FAQ accordion. Omit to hide it. All `FAQSection` props are available. */
@@ -1,4 +1,3 @@
1
- import { BottomSheetCloseReason } from '../../../../common/dist/common.js';
2
1
  export interface PickedDate {
3
2
  day: number;
4
3
  /** 1-12 */
@@ -7,7 +6,7 @@ export interface PickedDate {
7
6
  }
8
7
  export interface DatePickerSheetProps {
9
8
  isOpen: boolean;
10
- onClose: (reason?: BottomSheetCloseReason) => void;
9
+ onClose: () => void;
11
10
  /** Shows a small circular avatar next to `heading`, e.g. to identify which ancestor's date this is. Omit for a plain heading. */
12
11
  avatarUrl?: string;
13
12
  heading: string;
@@ -6,4 +6,4 @@ import { GotraInfoModalProps } from './GotraInfoModal.types';
6
6
  *
7
7
  * All copy defaults to locale-specific text (`locale`, `'en'`/`'hi'`/`'te'`).
8
8
  */
9
- export declare function GotraInfoModal({ isOpen, onClose, onOkayClick, locale, className }: GotraInfoModalProps): import("react").JSX.Element;
9
+ export declare function GotraInfoModal({ isOpen, onClose, locale, className }: GotraInfoModalProps): import("react").JSX.Element;
@@ -3,8 +3,6 @@ export interface GotraInfoModalProps {
3
3
  isOpen: boolean;
4
4
  /** Called by the close (X) button, backdrop tap, Escape and the "Okay" button. */
5
5
  onClose: () => void;
6
- /** Analytics-only: fires when the "Okay" button specifically is tapped, ahead of `onClose`. */
7
- onOkayClick?: () => void;
8
6
  /**
9
7
  * Locale used to resolve the heading/body/button copy below. Defaults to
10
8
  * `'en'`.
@@ -18,10 +18,9 @@ export interface L2CardProps {
18
18
  /**
19
19
  * Chevron icon in the header, shown only while `isAdded` is false. Clicking it toggles the card's
20
20
  * own expanded/collapsed display so a not-yet-added ritual can still be previewed. This callback
21
- * fires alongside that toggle — use it for tracking, not for controlling visibility. `isExpanded`
22
- * is the state it just switched to.
21
+ * fires alongside that toggle — use it for tracking, not for controlling visibility.
23
22
  */
24
- onExpandClick?: (isExpanded: boolean) => void;
23
+ onExpandClick?: () => void;
25
24
  expandButtonAriaLabel?: string;
26
25
  /** Only rendered while expanded (added, or manually expanded via the chevron) */
27
26
  imageUrl?: string;
@@ -3,7 +3,7 @@ export interface PujaDetailsCarouselHeaderProps {
3
3
  useCase?: string;
4
4
  title: string;
5
5
  specificity?: string;
6
- dateLabel?: string;
7
- locationLabel?: string;
6
+ dateLabel: string;
7
+ locationLabel: string;
8
8
  }
9
9
  export declare function PujaDetailsCarouselHeader({ images, useCase, title, specificity, dateLabel, locationLabel, }: PujaDetailsCarouselHeaderProps): import("react").JSX.Element;
@@ -1,20 +1,6 @@
1
1
  /** Max length enforced on every free-text name field (Karta, ancestor, Gotra). */
2
2
  export declare const MAX_NAME_LENGTH = 40;
3
- /** Min length (after trimming) required of a non-empty Karta/ancestor name. */
4
- export declare const MIN_NAME_LENGTH = 3;
5
3
  /** This form only ever collects an Indian mobile number — there's no country selector. */
6
4
  export declare const INDIA_COUNTRY_CODE = "+91";
7
5
  /** Basic email shape check used for the `isGlobal` email field's error state. */
8
6
  export declare const EMAIL_PATTERN: RegExp;
9
- /**
10
- * Letters (any script — this form's names aren't Latin-only, see the `te`/`kn`
11
- * locales) and spaces only — no digits or punctuation. Used to live-strip a
12
- * Karta/ancestor name field as it's typed, the same way the WhatsApp field
13
- * already strips non-digits on every keystroke, rather than accepting bad
14
- * input and only flagging it after the fact.
15
- */
16
- export declare const NAME_DISALLOWED_CHARACTERS_PATTERN: RegExp;
17
- /** Strips anything `NAME_DISALLOWED_CHARACTERS_PATTERN` matches, e.g. for a Karta/ancestor name's `onChange`. */
18
- export declare const sanitizeNameInput: (value: string) => string;
19
- /** A non-empty Karta/ancestor name field is only valid once it clears `MIN_NAME_LENGTH` after trimming. */
20
- export declare const isNameLongEnough: (value: string) => boolean;
@@ -13,7 +13,7 @@ import { AncestorNameEntry, PujaDetailsFormProps, PujaDetailsFormValues } from '
13
13
  * always the fixed, translated copy (not overridable) since this form only
14
14
  * ever collects an Indian mobile number or an email.
15
15
  */
16
- export declare function PujaDetailsForm({ locale, values, onValuesChange, isGlobal, gotraOptions, isSarvaPitru, onBackClick, amount, ritualsCountLabel, onPriceInfoClick, showPriceInfoIcon, canProceed, copy: copyOverride, proceedCtaLabel, proceedButtonProps, onProceedPayment, onProceedCtaClick, onConfirmModalOpen, onConfirmEditDetailsClick, onConfirmModalDismiss, onGotraInfoOpen, onGotraInfoOkayClick, className, }: PujaDetailsFormProps): import("react").JSX.Element;
16
+ export declare function PujaDetailsForm({ locale, values, onValuesChange, isGlobal, gotraOptions, isSarvaPitru, onBackClick, amount, ritualsCountLabel, onPriceInfoClick, showPriceInfoIcon, canProceed, copy: copyOverride, proceedCtaLabel, proceedButtonProps, onProceedPayment, className, }: PujaDetailsFormProps): import("react").JSX.Element;
17
17
  /**
18
18
  * Convenience factory for a blank `PujaDetailsFormValues`, e.g. to seed local
19
19
  * component state. `kartaCount` sets how many Karta name fields render —
@@ -23,10 +23,6 @@ export interface PujaDetailsFormDefaultCopy {
23
23
  /** e.g. "(optional)" — appended after `kartaNameLabel` for every Karta name field after the first (which is always required). */
24
24
  kartaNameOptionalSuffix: string;
25
25
  kartaNamePlaceholder: string;
26
- /** Shown under a Karta/ancestor name field once it's been typed into but is still under `MIN_NAME_LENGTH`, e.g. "Name must be at least 3 characters". */
27
- nameMinLengthError: string;
28
- /** Shown under an ancestor name field once it's been left empty (blurred without typing anything), e.g. "Please enter your ancestor's name to proceed". */
29
- ancestorNameRequiredError: string;
30
26
  gotraFieldLabel: string;
31
27
  gotraFieldPlaceholder: string;
32
28
  gotraUnknownCheckboxLabel: string;
@@ -86,22 +86,5 @@ export interface PujaDetailsFormProps {
86
86
  * payment flow here.
87
87
  */
88
88
  onProceedPayment: () => void;
89
- /**
90
- * Fired when the sticky `CheckoutBar`'s own CTA is tapped — the same tap
91
- * that opens `ConfirmPujaDetailsModal`, but a distinct moment from
92
- * `onProceedPayment` (that one only fires later, off the modal's own Pay
93
- * button).
94
- */
95
- onProceedCtaClick?: () => void;
96
- /** The `ConfirmPujaDetailsModal` opened — the checkout bar's CTA was tapped. */
97
- onConfirmModalOpen?: () => void;
98
- /** The `ConfirmPujaDetailsModal`'s "Edit Details" was clicked (returns to this form). */
99
- onConfirmEditDetailsClick?: () => void;
100
- /** The `ConfirmPujaDetailsModal` closed via backdrop/X/Escape — not its own Edit Details or Pay. */
101
- onConfirmModalDismiss?: () => void;
102
- /** The Gotra field's info sheet opened — its info icon was tapped. */
103
- onGotraInfoOpen?: () => void;
104
- /** The Gotra info sheet's own "Okay" CTA was tapped (not its X/backdrop). */
105
- onGotraInfoOkayClick?: () => void;
106
89
  className?: string;
107
90
  }
@@ -4,8 +4,6 @@ export interface ServiceOfferCardProps extends Omit<React.HTMLAttributes<HTMLDiv
4
4
  /** Illustration/photo shown top-right, e.g. the ritual/service photo. */
5
5
  image: string;
6
6
  imageAlt?: string;
7
- /** Optional landscape artwork used only in the expanded details sheet. */
8
- sheetImage?: string;
9
7
  /** Service name, e.g. "Offer tarpan donation for the peace of your ancestors". */
10
8
  title: React.ReactNode;
11
9
  /**
@@ -77,13 +75,6 @@ export interface ServiceOfferCardProps extends Omit<React.HTMLAttributes<HTMLDiv
77
75
  sheetSavedLabel?: React.ReactNode;
78
76
  /** Accessible name for the sheet dialog. */
79
77
  sheetAriaLabel?: string;
80
- /**
81
- * Fired when the inline "Read more"/"Read less" toggle is tapped —
82
- * `isExpanded` is the state it just switched to. Also fires (as `true`) when
83
- * the toggle instead opens the `ServiceOfferSheet` (`sheetPrice` set), since
84
- * that's this card's only "read more" affordance in that case.
85
- */
86
- onReadMoreClick?: (isExpanded: boolean) => void;
87
78
  }
88
79
  /**
89
80
  * Add-on card used on "review your booking" screens: an image with a
@@ -1,7 +1,6 @@
1
- import { BottomSheetCloseReason } from '../../../../common/dist/common.js';
2
1
  export interface TithiPickerSheetProps {
3
2
  isOpen: boolean;
4
- onClose: (reason?: BottomSheetCloseReason) => void;
3
+ onClose: () => void;
5
4
  avatarUrl: string;
6
5
  heading: string;
7
6
  tithis: string[];
@@ -5,20 +5,9 @@ export interface VideoPlayerProps {
5
5
  poster: string;
6
6
  className?: string;
7
7
  rounded?: boolean;
8
- /** Keeps direct videos inline and suppresses fullscreen, PiP, and casting. */
9
- inlineOnly?: boolean;
10
8
  /** Enforced on both the outer container and the video/poster itself. */
11
9
  width?: string | number;
12
10
  height?: string | number;
13
- /**
14
- * Locks the container to this CSS `aspect-ratio` (e.g. `"16/9"`) instead of
15
- * a fixed pixel `height` — height then scales with whatever width the
16
- * container ends up at (its own `className`/parent, not a `width` prop),
17
- * so the full frame stays visible with no cropping on any device, and the
18
- * box's space is reserved immediately rather than jumping once the video's
19
- * metadata loads. Ignored when `width`/`height` are set.
20
- */
21
- aspectRatio?: string;
22
11
  /**
23
12
  * Crops the video/poster to cover its container instead of sizing off its
24
13
  * own intrinsic aspect ratio, centered on both axes — for callers that size
@@ -28,7 +17,5 @@ export interface VideoPlayerProps {
28
17
  */
29
18
  fill?: boolean;
30
19
  autoPlay?: boolean;
31
- /** Analytics-only: fires whenever the play/pause button is tapped. */
32
- onPlayToggle?: (playing: boolean) => void;
33
20
  }
34
21
  export declare const VideoPlayer: React.ForwardRefExoticComponent<VideoPlayerProps & React.RefAttributes<HTMLDivElement>>;
package/dist/index.d.ts CHANGED
@@ -67,8 +67,8 @@ export { BookingSummaryBanner } from './components/BookingSummaryBanner';
67
67
  export type { BookingSummaryBannerProps, BookingSummaryBannerStats, } from './components/BookingSummaryBanner';
68
68
  export { BOOKING_SUMMARY_BANNER_DEFAULT_COPY, getBookingSummaryBannerDefaultCopy, } from './components/BookingSummaryBanner';
69
69
  export type { BookingSummaryBannerLocale, BookingSummaryBannerDefaultCopy, } from './components/BookingSummaryBanner';
70
- export { BillDetails, BillDetailsSheet } from './components/BillDetails';
71
- export type { BillDetailsProps, BillDetailsRow, BillDetailsSheetProps, } from './components/BillDetails';
70
+ export { BillDetails } from './components/BillDetails';
71
+ export type { BillDetailsProps, BillDetailsRow, } from './components/BillDetails';
72
72
  export { CartView } from './components/CartView';
73
73
  export type { CartViewProps, CartViewAddon, CartViewItem, CartViewLocale, } from './components/CartView';
74
74
  export { TextField } from './components/TextField';
@@ -67,8 +67,8 @@ export { BookingSummaryBanner } from './components/BookingSummaryBanner';
67
67
  export type { BookingSummaryBannerProps, BookingSummaryBannerStats, } from './components/BookingSummaryBanner';
68
68
  export { BOOKING_SUMMARY_BANNER_DEFAULT_COPY, getBookingSummaryBannerDefaultCopy, } from './components/BookingSummaryBanner';
69
69
  export type { BookingSummaryBannerLocale, BookingSummaryBannerDefaultCopy, } from './components/BookingSummaryBanner';
70
- export { BillDetails, BillDetailsSheet } from './components/BillDetails';
71
- export type { BillDetailsProps, BillDetailsRow, BillDetailsSheetProps, } from './components/BillDetails';
70
+ export { BillDetails } from './components/BillDetails';
71
+ export type { BillDetailsProps, BillDetailsRow, } from './components/BillDetails';
72
72
  export { CartView } from './components/CartView';
73
73
  export type { CartViewProps, CartViewAddon, CartViewItem, CartViewLocale, } from './components/CartView';
74
74
  export { TextField } from './components/TextField';