@srimandir/pitru-paksh-common 2.30.0 → 2.32.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.
@@ -53,6 +53,14 @@ export interface CartViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>
53
53
  itemsClassName?: string;
54
54
  /** className applied to every item; per-item `className` (via the item object) wins/merges on top. */
55
55
  itemClassName?: string;
56
+ /**
57
+ * Reports each rendered item row's DOM node as it mounts/unmounts, keyed
58
+ * by the item's own `id`. No visibility tracking happens here — this
59
+ * component stays dumb; observing these nodes (e.g. via
60
+ * `IntersectionObserver`) is the caller's job, same division as
61
+ * `Outcome`'s own `onCardRef`.
62
+ */
63
+ onItemRef?: (id: CartViewItem['id'], el: HTMLDivElement | null) => void;
56
64
  /** Add-on `ServiceOfferCard`s (tarpan, cow service, public service, ...). Omit/empty to hide the section. */
57
65
  addons?: CartViewAddon[];
58
66
  addonsSectionClassName?: string;
@@ -64,6 +72,8 @@ export interface CartViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>
64
72
  addonClassName?: string;
65
73
  /** Optional card implementation for add-ons. Defaults to `ServiceOfferCard`. */
66
74
  addonComponent?: React.ComponentType<ServiceOfferCardProps>;
75
+ /** Same as `onItemRef`, for add-on cards. */
76
+ onAddonRef?: (id: CartViewAddon['id'], el: HTMLDivElement | null) => void;
67
77
  /** Price breakdown. Omit to hide it. All `BillDetails` props are available. */
68
78
  billDetails?: BillDetailsProps;
69
79
  /** FAQ accordion. Omit to hide it. All `FAQSection` props are available. */
@@ -0,0 +1,4 @@
1
+ export interface DatesCardProps {
2
+ date: string;
3
+ }
4
+ export declare function DatesCard({ date }: DatesCardProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { DatesCard } from './DatesCard';
2
+ export type { DatesCardProps } from './DatesCard';
@@ -0,0 +1,13 @@
1
+ export interface HeroLogoBadgeProps {
2
+ /** e.g. "Pitru Paksh Special" — rendered between the two ✦ marks */
3
+ badgeLabel: string;
4
+ /** e.g. "27 September - 12 October, 2026" — rendered inside the dates pill */
5
+ dateLabel?: string;
6
+ className?: string;
7
+ }
8
+ /**
9
+ * Sri Mandir logo (with a sharp-to-blurred halo behind it), an event badge,
10
+ * and a dates pill — the identity cluster shown at the top of Pitru Paksha
11
+ * hero sections.
12
+ */
13
+ export declare function HeroLogoBadge({ badgeLabel, dateLabel, className }: HeroLogoBadgeProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { HeroLogoBadge } from './HeroLogoBadge';
2
+ export type { HeroLogoBadgeProps } from './HeroLogoBadge';
@@ -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
  }
@@ -7,7 +7,7 @@
7
7
  * instead of being duplicated by every consuming page. Pass any of
8
8
  * `title`/`subtitle`/`value`/`helperText` explicitly to override the default.
9
9
  */
10
- export type SarvaPitruCardLocale = 'en' | 'hi';
10
+ export type SarvaPitruCardLocale = 'en' | 'hi' | 'te' | 'kn';
11
11
  export interface SarvaPitruCardDefaultCopy {
12
12
  title: string;
13
13
  subtitle: string;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- export interface SelectorCardProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onSelect' | 'title'> {
2
+ export interface SelectorCardProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect" | "title"> {
3
3
  /** Whether this card is the chosen option within its selector group. */
4
4
  selected?: boolean;
5
5
  /** Called when the user picks this card (click, Enter or Space). */
@@ -9,7 +9,7 @@ export interface SelectorCardProps extends Omit<React.ButtonHTMLAttributes<HTMLB
9
9
  /** Leading photo/illustration (e.g. a family member avatar) instead of an icon badge. */
10
10
  avatarUrl?: string;
11
11
  /** Size of the leading icon/avatar badge. Defaults to 'md'. */
12
- iconSize?: 'sm' | 'md' | 'lg';
12
+ iconSize?: "sm" | "md" | "lg";
13
13
  /** Extra classes for the icon/avatar badge, e.g. `iconClassName="size-10"` for a one-off 40x40 badge. Overrides `iconSize`. */
14
14
  iconClassName?: string;
15
15
  /** Main label. */
@@ -21,7 +21,7 @@ export interface SelectorCardProps extends Omit<React.ButtonHTMLAttributes<HTMLB
21
21
  /** Hide the radio indicator, e.g. for single, non-grouped confirmations. Defaults to visible. */
22
22
  showRadio?: boolean;
23
23
  /** Style of the selected indicator: a filled dot (default) or a filled circle with a checkmark. */
24
- radioVariant?: 'dot' | 'check';
24
+ radioVariant?: "dot" | "check";
25
25
  /** Extra classes for the filled selected indicator (dot or check circle), e.g. to change its color. */
26
26
  radioClassName?: string;
27
27
  /**
package/dist/index.d.ts CHANGED
@@ -124,5 +124,9 @@ export type { PujaL2DetailsSheetData, } from './utils/mapPujaL2Response';
124
124
  export type { PujaL2Benefit, PujaL2BenefitsCard, PujaL2Card, PujaL2InfoMedia, PujaL2LocationDetailsCard, PujaL2Response, PujaL2ReviewUser, PujaL2StoreCard, PujaL2TempleDetails, PujaL2UserReviewsCard, } from './types/pujaL2.types';
125
125
  export { EventHeader } from './components/EventHeader';
126
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';
127
131
  export { RitualProceedBar } from './components/RitualProceedBar';
128
132
  export type { RitualProceedBarProps } from './components/RitualProceedBar';