@srimandir/pitru-paksh-common 2.39.0 → 2.41.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.
@@ -55,6 +55,14 @@ 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;
58
66
  /** Add-on `ServiceOfferCard`s (tarpan, cow service, public service, ...). Omit/empty to hide the section. */
59
67
  addons?: CartViewAddon[];
60
68
  addonsSectionClassName?: string;
@@ -66,6 +74,8 @@ export interface CartViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>
66
74
  addonClassName?: string;
67
75
  /** Optional card implementation for add-ons. Defaults to `ServiceOfferCard`. */
68
76
  addonComponent?: React.ComponentType<ServiceOfferCardProps>;
77
+ /** Same as `onItemRef`, for add-on cards. */
78
+ onAddonRef?: (id: CartViewAddon['id'], el: HTMLDivElement | null) => void;
69
79
  /** Price breakdown. Omit to hide it. All `BillDetails` props are available. */
70
80
  billDetails?: BillDetailsProps;
71
81
  /** FAQ accordion. Omit to hide it. All `FAQSection` props are available. */
@@ -19,11 +19,9 @@ export interface DatePickerSheetProps {
19
19
  initialDate?: PickedDate;
20
20
  minYear?: number;
21
21
  maxYear?: number;
22
- /**
23
- * Caps the wheels at an exact day, not just a year — the month/day columns
24
- * shrink once the year wheel reaches `maxDate.year`, so nothing past this
25
- * date is ever selectable. Takes precedence over `maxYear` when set.
26
- */
22
+ /** Day-precise lower bound. Takes precedence over `minYear` and also restricts month/day within its own year. */
23
+ minDate?: PickedDate;
24
+ /** Day-precise upper bound. Takes precedence over `maxYear` and also restricts month/day within its own year. */
27
25
  maxDate?: PickedDate;
28
26
  }
29
- export declare function DatePickerSheet({ isOpen, onClose, avatarUrl, heading, monthLabels, confirmLabel, onConfirm, timezoneLabel, initialDate, minYear, maxYear, maxDate, }: DatePickerSheetProps): import("react").JSX.Element;
27
+ export declare function DatePickerSheet({ isOpen, onClose, avatarUrl, heading, monthLabels, confirmLabel, onConfirm, timezoneLabel, initialDate, minYear, maxYear, minDate, maxDate, }: DatePickerSheetProps): import("react").JSX.Element;
@@ -32,7 +32,7 @@ export interface L2CardProps {
32
32
  /** e.g. "2k people booked" — only rendered while expanded */
33
33
  bookedLabel?: string;
34
34
  title: string;
35
- /** Only rendered while expanded */
35
+ /** Usecase/summary line shown directly below the title — only rendered while expanded */
36
36
  description?: string;
37
37
  /** Only rendered while expanded */
38
38
  learnMoreLabel?: string;
@@ -51,4 +51,4 @@ export interface L2CardProps {
51
51
  cta: ReactNode;
52
52
  className?: string;
53
53
  }
54
- export declare function L2Card({ chipNumber, chipLabel, isAdded, onEditClick, editButtonAriaLabel, onExpandClick, expandButtonAriaLabel, imageUrl, imageAlt, imageComponent: ImageComponent, ratingLabel, bookedLabel, title, learnMoreLabel, onLearnMoreClick, learnMoreHref, dateLabel, locationLabel, priceInfoLabel, onPriceInfoClick, price, cta, className, }: L2CardProps): import("react").JSX.Element;
54
+ export declare function L2Card({ chipNumber, chipLabel, isAdded, onEditClick, editButtonAriaLabel, onExpandClick, expandButtonAriaLabel, imageUrl, imageAlt, imageComponent: ImageComponent, ratingLabel, bookedLabel, title, description, learnMoreLabel, onLearnMoreClick, learnMoreHref, dateLabel, locationLabel, priceInfoLabel, onPriceInfoClick, price, cta, className, }: L2CardProps): import("react").JSX.Element;
@@ -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, 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, 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,5 +86,11 @@ export interface PujaDetailsFormProps {
86
86
  * payment flow here.
87
87
  */
88
88
  onProceedPayment: () => void;
89
+ /** The `ConfirmPujaDetailsModal` opened — the checkout bar's CTA was tapped. */
90
+ onConfirmModalOpen?: () => void;
91
+ /** The `ConfirmPujaDetailsModal`'s "Edit Details" was clicked (returns to this form). */
92
+ onConfirmEditDetailsClick?: () => void;
93
+ /** The `ConfirmPujaDetailsModal` closed via backdrop/X/Escape — not its own Edit Details or Pay. */
94
+ onConfirmModalDismiss?: () => void;
89
95
  className?: string;
90
96
  }
@@ -8,5 +8,14 @@ export interface VideoPlayerProps {
8
8
  /** Enforced on both the outer container and the video/poster itself. */
9
9
  width?: string | number;
10
10
  height?: string | number;
11
+ /**
12
+ * Crops the video/poster to cover its container instead of sizing off its
13
+ * own intrinsic aspect ratio, centered on both axes — for callers that size
14
+ * this component purely via `className` (e.g. an `absolute inset-0 size-full`
15
+ * wrapper) rather than the `width`/`height` props. Implied whenever `width`
16
+ * or `height` is set.
17
+ */
18
+ fill?: boolean;
19
+ autoPlay?: boolean;
11
20
  }
12
21
  export declare const VideoPlayer: React.ForwardRefExoticComponent<VideoPlayerProps & React.RefAttributes<HTMLDivElement>>;
@@ -53,5 +53,6 @@ export declare const ANCESTOR_OPTIONS: [{
53
53
  }];
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
- /** Custom (free-text) ancestor names carry no gender, so they default to the male avatar. */
56
+ export declare const CUSTOM_ANCESTOR_AVATAR_URL = "https://srm-cdn.a4b.io/yoda/1789386222504.svg";
57
+ /** Custom (free-text) ancestor names carry no gender/option entry, so they get a dedicated icon. */
57
58
  export declare function getAncestorAvatarUrl(ancestorKey: string): string;
@@ -1,3 +1,3 @@
1
- export { ALL_ANCESTORS_ID, ANCESTOR_OPTIONS, MALE_ANCESTOR_AVATAR_URL, FEMALE_ANCESTOR_AVATAR_URL, getAncestorAvatarUrl, } from './ancestor.constants';
1
+ export { ALL_ANCESTORS_ID, ANCESTOR_OPTIONS, MALE_ANCESTOR_AVATAR_URL, FEMALE_ANCESTOR_AVATAR_URL, CUSTOM_ANCESTOR_AVATAR_URL, getAncestorAvatarUrl, } from './ancestor.constants';
2
2
  export { DEATH_TITHI_OPTIONS } from './deathTithi.constants';
3
3
  export { TITHI_NAME_KEYS } from './tithi.constants';
package/dist/index.d.ts CHANGED
@@ -115,7 +115,7 @@ export type { SarvaPitruCardProps } from './components/SarvaPitruCard';
115
115
  export { SARVA_PITRU_CARD_DEFAULT_COPY, getSarvaPitruCardDefaultCopy, } from './components/SarvaPitruCard';
116
116
  export type { SarvaPitruCardLocale, SarvaPitruCardDefaultCopy, } from './components/SarvaPitruCard';
117
117
  export { cn } from '../../common/dist/common.js';
118
- export { ALL_ANCESTORS_ID, ANCESTOR_OPTIONS, MALE_ANCESTOR_AVATAR_URL, FEMALE_ANCESTOR_AVATAR_URL, getAncestorAvatarUrl, } from './constants';
118
+ export { ALL_ANCESTORS_ID, ANCESTOR_OPTIONS, MALE_ANCESTOR_AVATAR_URL, FEMALE_ANCESTOR_AVATAR_URL, CUSTOM_ANCESTOR_AVATAR_URL, getAncestorAvatarUrl, } from './constants';
119
119
  export { DEATH_TITHI_OPTIONS, TITHI_NAME_KEYS } from './constants';
120
120
  export type { AncestorOptionData, DeathTithiMethod } from './types';
121
121
  export type { OutcomeAncestorItem, OutcomeMandapArrangementData, OutcomePackageSelectOption, OutcomePackageSelectProps, OutcomeRitualData, } from './types/outcome.types';
@@ -0,0 +1,132 @@
1
+ export { getOutcomeTranslation, OutcomeI18nProvider, OUTCOME_SUPPORTED_LOCALES, outcomeTranslations, useOutcomeI18n, } from './outcome-i18n';
2
+ export type { OutcomeLocale, OutcomeTranslationKey, OutcomeTranslations, } from './outcome-i18n';
3
+ export { OutcomeBillDetails, } from './components/OutcomeBillDetails/OutcomeBillDetails';
4
+ export type { OutcomeBillDetailsItem, OutcomeBillDetailsProps, } from './components/OutcomeBillDetails/OutcomeBillDetails';
5
+ export { OutcomeAncestorEditModal, } from './components/OutcomeAncestorEditModal/OutcomeAncestorEditModal';
6
+ export type { OutcomeAncestorEditModalProps, OutcomeAncestorPujaItem, } from './components/OutcomeAncestorEditModal/OutcomeAncestorEditModal';
7
+ export { OutcomeStickyCta, } from './components/OutcomeStickyCta/OutcomeStickyCta';
8
+ export type { OutcomeStickyCtaProps, } from './components/OutcomeStickyCta/OutcomeStickyCta';
9
+ export { OutcomeEmptyRituals, } from './components/OutcomeEmptyRituals/OutcomeEmptyRituals';
10
+ export { OnlinePujaTestimonial, } from './components/OnlinePujaTestimonial/OnlinePujaTestimonial';
11
+ export { WhySriMandir } from './components/WhySriMandir/WhySriMandir';
12
+ export { ProcessInvolved } from './components/ProcessInvolved/ProcessInvolved';
13
+ export { PujaDetailsCarouselHeader, } from './components/PujaDetails/PujaDetailsCarouselHeader';
14
+ export type { PujaDetailsCarouselHeaderProps, } from './components/PujaDetails/PujaDetailsCarouselHeader';
15
+ export { PujaBenefitsSection, } from './components/PujaDetails/PujaBenefitsSection';
16
+ export type { PujaBenefitData, PujaBenefitsSectionProps, } from './components/PujaDetails/PujaBenefitsSection';
17
+ export { TempleSignificanceSection, } from './components/PujaDetails/TempleSignificanceSection';
18
+ export type { TempleSignificanceSectionProps, } from './components/PujaDetails/TempleSignificanceSection';
19
+ export { DevoteesReviews } from './components/PujaDetails/DevoteesReviews';
20
+ export type { DevoteeReviewData, DevoteeReviewMedia, DevoteesReviewsProps, } from './components/PujaDetails/DevoteesReviews';
21
+ export { OUTCOME_TRUST_ITEMS } from './constants/outcome.constants';
22
+ export type { OutcomeTrustItemData, } from './constants/outcome.constants';
23
+ export { Button, buttonVariants } from './components/Button';
24
+ export type { ButtonProps } from './components/Button';
25
+ export { ConfinedBottomSheet } from './components/ConfinedBottomSheet';
26
+ export { TestimonialCard } from './components/TestimonialCard';
27
+ export type { TestimonialCardProps } from './components/TestimonialCard';
28
+ export { FAQSection } from './components/FAQSection';
29
+ export type { FAQSectionProps, FAQItem } from './components/FAQSection';
30
+ export { FAQAccordion } from './components/FAQAccordion';
31
+ export type { FAQAccordionProps, FAQAccordionItem } from './components/FAQAccordion';
32
+ export { VideoPlayer } from './components/VideoPlayer';
33
+ export type { VideoPlayerProps } from './components/VideoPlayer';
34
+ export { LanguageSwitcher } from './components/LanguageSwitcher';
35
+ export type { LanguageSwitcherProps, LanguageOption, } from './components/LanguageSwitcher';
36
+ export { TopBar } from './components/TopBar';
37
+ export type { TopBarProps } from './components/TopBar';
38
+ export { Chip } from './components/Chip';
39
+ export type { ChipProps } from './components/Chip';
40
+ export { StepProgressHeader } from './components/StepProgressHeader';
41
+ export type { StepProgressHeaderProps } from './components/StepProgressHeader';
42
+ export { AudioQuestionCard } from './components/AudioQuestionCard';
43
+ export type { AudioQuestionCardProps } from './components/AudioQuestionCard';
44
+ export { IconBadge } from './components/IconBadge';
45
+ export type { IconBadgeProps } from './components/IconBadge';
46
+ export { SelectorCard, SelectorCardEditableField, SelectorCardInfoRow, SelectorCardNote, SelectorCardPriceBadge, } from './components/SelectorCard';
47
+ export type { SelectorCardProps, SelectorCardEditableFieldProps, SelectorCardInfoRowProps, SelectorCardNoteProps, SelectorCardPriceBadgeProps, } from './components/SelectorCard';
48
+ export { QuantityStepper } from './components/QuantityStepper';
49
+ export type { QuantityStepperProps } from './components/QuantityStepper';
50
+ export { CartReviewItem, CartReviewMandapItem, CartReviewChangeButton, CartReviewAddedBadge, } from './components/CartReviewItem';
51
+ export type { CartReviewItemProps, CartReviewMandapItemProps, CartReviewChangeButtonProps, CartReviewAddedBadgeProps, } from './components/CartReviewItem';
52
+ export { ServiceOfferCard } from './components/ServiceOfferCard';
53
+ export type { ServiceOfferCardProps } from './components/ServiceOfferCard';
54
+ export { ServiceOfferSheet } from './components/ServiceOfferSheet';
55
+ export type { ServiceOfferSheetProps } from './components/ServiceOfferSheet';
56
+ export { PackageSelect } from './components/PackageSelect';
57
+ export type { PackageSelectProps, PackageSelectOption, } from './components/PackageSelect';
58
+ export { PACKAGE_SELECT_DEFAULT_COPY, getPackageSelectDefaultCopy, } from './components/PackageSelect';
59
+ export type { PackageSelectLocale, PackageSelectDefaultCopy, } from './components/PackageSelect';
60
+ export { TrustBadgesBar } from './components/TrustBadgesBar';
61
+ export type { TrustBadgesBarProps, TrustBadge, } from './components/TrustBadgesBar';
62
+ export { CheckoutBar } from './components/CheckoutBar';
63
+ export type { CheckoutBarProps } from './components/CheckoutBar';
64
+ export { CHECKOUT_BAR_DEFAULT_COPY, getCheckoutBarDefaultCopy, } from './components/CheckoutBar';
65
+ export type { CheckoutBarLocale, CheckoutBarDefaultCopy, } from './components/CheckoutBar';
66
+ export { BookingSummaryBanner } from './components/BookingSummaryBanner';
67
+ export type { BookingSummaryBannerProps, BookingSummaryBannerStats, } from './components/BookingSummaryBanner';
68
+ export { BOOKING_SUMMARY_BANNER_DEFAULT_COPY, getBookingSummaryBannerDefaultCopy, } from './components/BookingSummaryBanner';
69
+ export type { BookingSummaryBannerLocale, BookingSummaryBannerDefaultCopy, } from './components/BookingSummaryBanner';
70
+ export { BillDetails } from './components/BillDetails';
71
+ export type { BillDetailsProps, BillDetailsRow, } from './components/BillDetails';
72
+ export { CartView } from './components/CartView';
73
+ export type { CartViewProps, CartViewAddon, CartViewItem, CartViewLocale, } from './components/CartView';
74
+ export { TextField } from './components/TextField';
75
+ export type { TextFieldProps } from './components/TextField';
76
+ export { TithiPickerSheet } from './components/TithiPickerSheet';
77
+ export type { TithiPickerSheetProps } from './components/TithiPickerSheet';
78
+ export { DatePickerSheet } from './components/DatePickerSheet';
79
+ export type { DatePickerSheetProps, PickedDate, } from './components/DatePickerSheet';
80
+ export { PhoneNumberSheet } from './components/PhoneNumberSheet';
81
+ export type { PhoneNumberSheetProps } from './components/PhoneNumberSheet';
82
+ export { EmailSheet } from './components/EmailSheet';
83
+ export type { EmailSheetProps } from './components/EmailSheet';
84
+ export { TimeOfBirthPickerSheet } from './components/DatePickerSheet';
85
+ export type { TimeOfBirthPickerSheetProps, PickedTime } from './components/DatePickerSheet';
86
+ export { L2Card } from './components/L2Card';
87
+ export type { L2CardProps, L2CardImageProps } from './components/L2Card';
88
+ export { OutcomeButton, PlusIcon, CheckIcon } from './components/OutcomeButton';
89
+ export type { OutcomeButtonProps, OutcomeButtonVariant, IconProps, } from './components/OutcomeButton';
90
+ export { PujaDetailsForm, createEmptyPujaDetailsFormValues, } from './components/PujaDetailsForm';
91
+ export type { PujaDetailsFormProps, PujaDetailsFormValues, AncestorNameEntry, } from './components/PujaDetailsForm';
92
+ export { PUJA_DETAILS_FORM_DEFAULT_COPY, getPujaDetailsFormDefaultCopy, getKartaOrdinalLabel, } from './components/PujaDetailsForm';
93
+ export type { PujaDetailsFormLocale, PujaDetailsFormDefaultCopy, } from './components/PujaDetailsForm';
94
+ export { ConfirmPujaDetailsModal } from './components/ConfirmPujaDetailsModal';
95
+ export type { ConfirmPujaDetailsModalProps } from './components/ConfirmPujaDetailsModal';
96
+ export { CONFIRM_PUJA_DETAILS_MODAL_DEFAULT_COPY, getConfirmPujaDetailsModalDefaultCopy, } from './components/ConfirmPujaDetailsModal';
97
+ export type { ConfirmPujaDetailsModalLocale, ConfirmPujaDetailsModalDefaultCopy, } from './components/ConfirmPujaDetailsModal';
98
+ export { GotraInfoModal } from './components/GotraInfoModal';
99
+ export type { GotraInfoModalProps } from './components/GotraInfoModal';
100
+ export { GOTRA_INFO_MODAL_DEFAULT_COPY, getGotraInfoModalDefaultCopy, } from './components/GotraInfoModal';
101
+ export type { GotraInfoModalLocale, GotraInfoModalDefaultCopy, } from './components/GotraInfoModal';
102
+ export { OutcomeSummary } from './components/OutcomeSummary';
103
+ export type { OutcomeSummaryProps, OutcomeTrustItem, OutcomeTrustIconVariant, } from './components/OutcomeSummary';
104
+ export { AddAncestorSheet } from './components/AddAncestorSheet';
105
+ export type { AddAncestorSheetProps } from './components/AddAncestorSheet';
106
+ export { AncestorTab } from './components/AncestorTab';
107
+ export type { AncestorTabProps, AncestorTabState, } from './components/AncestorTab';
108
+ export { AncestorTabRow } from './components/AncestorTabRow';
109
+ export type { AncestorTabRowProps, AncestorTabRowEntry, } from './components/AncestorTabRow';
110
+ export { AvatarCardDialog } from './components/AvatarCardDialog';
111
+ export type { AvatarCardDialogProps } from './components/AvatarCardDialog';
112
+ export { parseIsoDate, formatIsoDate, getMonthLabels, formatDisplayDate, } from './utils/date.utils';
113
+ export { SarvaPitruCard } from './components/SarvaPitruCard';
114
+ export type { SarvaPitruCardProps } from './components/SarvaPitruCard';
115
+ export { SARVA_PITRU_CARD_DEFAULT_COPY, getSarvaPitruCardDefaultCopy, } from './components/SarvaPitruCard';
116
+ export type { SarvaPitruCardLocale, SarvaPitruCardDefaultCopy, } from './components/SarvaPitruCard';
117
+ export { cn } from '../../common/dist/common.js';
118
+ export { ALL_ANCESTORS_ID, ANCESTOR_OPTIONS, MALE_ANCESTOR_AVATAR_URL, FEMALE_ANCESTOR_AVATAR_URL, CUSTOM_ANCESTOR_AVATAR_URL, getAncestorAvatarUrl, } from './constants';
119
+ export { DEATH_TITHI_OPTIONS, TITHI_NAME_KEYS } from './constants';
120
+ export type { AncestorOptionData, DeathTithiMethod } from './types';
121
+ export type { OutcomeAncestorItem, OutcomeMandapArrangementData, OutcomePackageSelectOption, OutcomePackageSelectProps, OutcomeRitualData, } from './types/outcome.types';
122
+ export { mapPujaL2Response } from './utils/mapPujaL2Response';
123
+ export type { PujaL2DetailsSheetData, } from './utils/mapPujaL2Response';
124
+ export type { PujaL2Benefit, PujaL2BenefitsCard, PujaL2Card, PujaL2InfoMedia, PujaL2LocationDetailsCard, PujaL2Response, PujaL2ReviewUser, PujaL2StoreCard, PujaL2TempleDetails, PujaL2UserReviewsCard, } from './types/pujaL2.types';
125
+ export { EventHeader } from './components/EventHeader';
126
+ export type { EventHeaderProps } from './components/EventHeader';
127
+ export { HeroLogoBadge } from './components/HeroLogoBadge';
128
+ export type { HeroLogoBadgeProps } from './components/HeroLogoBadge';
129
+ export { DatesCard } from './components/DatesCard';
130
+ export type { DatesCardProps } from './components/DatesCard';
131
+ export { RitualProceedBar } from './components/RitualProceedBar';
132
+ export type { RitualProceedBarProps } from './components/RitualProceedBar';