@srimandir/pitru-paksh-common 2.41.0 → 2.43.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.
@@ -1,6 +1,8 @@
1
+ import { BottomSheetCloseReason } from '../../../../common/dist/common.js';
1
2
  export interface AddAncestorSheetProps {
2
3
  isOpen: boolean;
3
- onClose: () => void;
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;
4
6
  onSave: (names: string[]) => void;
5
7
  title: string;
6
8
  fieldLabel: string;
@@ -1,3 +1,4 @@
1
+ import { BottomSheetCloseReason } from '../../../../common/dist/common.js';
1
2
  export interface PickedDate {
2
3
  day: number;
3
4
  /** 1-12 */
@@ -6,7 +7,7 @@ export interface PickedDate {
6
7
  }
7
8
  export interface DatePickerSheetProps {
8
9
  isOpen: boolean;
9
- onClose: () => void;
10
+ onClose: (reason?: BottomSheetCloseReason) => void;
10
11
  /** Shows a small circular avatar next to `heading`, e.g. to identify which ancestor's date this is. Omit for a plain heading. */
11
12
  avatarUrl?: string;
12
13
  heading: string;
@@ -18,9 +18,10 @@ 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.
21
+ * fires alongside that toggle — use it for tracking, not for controlling visibility. `isExpanded`
22
+ * is the state it just switched to.
22
23
  */
23
- onExpandClick?: () => void;
24
+ onExpandClick?: (isExpanded: boolean) => void;
24
25
  expandButtonAriaLabel?: string;
25
26
  /** Only rendered while expanded (added, or manually expanded via the chevron) */
26
27
  imageUrl?: string;
@@ -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, onConfirmModalOpen, onConfirmEditDetailsClick, onConfirmModalDismiss, 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, onProceedCtaClick, onConfirmModalOpen, onConfirmEditDetailsClick, onConfirmModalDismiss, 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 —
@@ -86,6 +86,13 @@ 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;
89
96
  /** The `ConfirmPujaDetailsModal` opened — the checkout bar's CTA was tapped. */
90
97
  onConfirmModalOpen?: () => void;
91
98
  /** The `ConfirmPujaDetailsModal`'s "Edit Details" was clicked (returns to this form). */
@@ -75,6 +75,13 @@ export interface ServiceOfferCardProps extends Omit<React.HTMLAttributes<HTMLDiv
75
75
  sheetSavedLabel?: React.ReactNode;
76
76
  /** Accessible name for the sheet dialog. */
77
77
  sheetAriaLabel?: string;
78
+ /**
79
+ * Fired when the inline "Read more"/"Read less" toggle is tapped —
80
+ * `isExpanded` is the state it just switched to. Also fires (as `true`) when
81
+ * the toggle instead opens the `ServiceOfferSheet` (`sheetPrice` set), since
82
+ * that's this card's only "read more" affordance in that case.
83
+ */
84
+ onReadMoreClick?: (isExpanded: boolean) => void;
78
85
  }
79
86
  /**
80
87
  * Add-on card used on "review your booking" screens: an image with a
@@ -1,6 +1,7 @@
1
+ import { BottomSheetCloseReason } from '../../../../common/dist/common.js';
1
2
  export interface TithiPickerSheetProps {
2
3
  isOpen: boolean;
3
- onClose: () => void;
4
+ onClose: (reason?: BottomSheetCloseReason) => void;
4
5
  avatarUrl: string;
5
6
  heading: string;
6
7
  tithis: string[];
@@ -54,5 +54,6 @@ export declare const ANCESTOR_OPTIONS: [{
54
54
  export declare const MALE_ANCESTOR_AVATAR_URL = "https://srm-cdn.a4b.io/yoda/1788334548628.webp";
55
55
  export declare const FEMALE_ANCESTOR_AVATAR_URL = "https://srm-cdn.a4b.io/yoda/1788334564281.webp";
56
56
  export declare const CUSTOM_ANCESTOR_AVATAR_URL = "https://srm-cdn.a4b.io/yoda/1789386222504.svg";
57
+ export declare const SARV_PITRU_ANCESTOR_AVATAR_URL = "https://srm-cdn.a4b.io/yoda/1789653082304.webp";
57
58
  /** Custom (free-text) ancestor names carry no gender/option entry, so they get a dedicated icon. */
58
59
  export declare function getAncestorAvatarUrl(ancestorKey: string): string;