@srimandir/pitru-paksh-common 2.0.23 → 2.0.25

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 (40) hide show
  1. package/dist/components/BillDetails/BillDetails.d.ts +6 -2
  2. package/dist/components/BillDetails/BillDetails.translations.d.ts +9 -0
  3. package/dist/components/BookingSummaryBanner/BookingSummaryBanner.d.ts +25 -4
  4. package/dist/components/BookingSummaryBanner/BookingSummaryBanner.translations.d.ts +18 -0
  5. package/dist/components/BookingSummaryBanner/index.d.ts +3 -1
  6. package/dist/components/CartReviewItem/CartReviewItem.d.ts +27 -4
  7. package/dist/components/CartReviewItem/index.d.ts +2 -2
  8. package/dist/components/CartView/CartView.d.ts +50 -21
  9. package/dist/components/CartView/CartView.translations.d.ts +24 -0
  10. package/dist/components/CartView/index.d.ts +1 -1
  11. package/dist/components/CheckoutBar/CheckoutBar.d.ts +11 -1
  12. package/dist/components/CheckoutBar/CheckoutBar.translations.d.ts +14 -0
  13. package/dist/components/CheckoutBar/index.d.ts +2 -0
  14. package/dist/components/ConfirmPujaDetailsModal/ConfirmPujaDetailsModal.d.ts +11 -0
  15. package/dist/components/ConfirmPujaDetailsModal/ConfirmPujaDetailsModal.translations.d.ts +22 -0
  16. package/dist/components/ConfirmPujaDetailsModal/ConfirmPujaDetailsModal.types.d.ts +25 -0
  17. package/dist/components/ConfirmPujaDetailsModal/index.d.ts +4 -0
  18. package/dist/components/GotraInfoModal/GotraInfoModal.d.ts +9 -0
  19. package/dist/components/GotraInfoModal/GotraInfoModal.translations.d.ts +15 -0
  20. package/dist/components/GotraInfoModal/GotraInfoModal.types.d.ts +12 -0
  21. package/dist/components/GotraInfoModal/index.d.ts +4 -0
  22. package/dist/components/PackageSelect/PackageSelect.d.ts +17 -5
  23. package/dist/components/PackageSelect/PackageSelect.translations.d.ts +23 -0
  24. package/dist/components/PackageSelect/index.d.ts +2 -0
  25. package/dist/components/PujaDetailsForm/PujaDetailsForm.constants.d.ts +6 -0
  26. package/dist/components/PujaDetailsForm/PujaDetailsForm.d.ts +25 -0
  27. package/dist/components/PujaDetailsForm/PujaDetailsForm.translations.d.ts +49 -0
  28. package/dist/components/PujaDetailsForm/PujaDetailsForm.types.d.ts +77 -0
  29. package/dist/components/PujaDetailsForm/index.d.ts +4 -0
  30. package/dist/components/SarvaPitruCard/SarvaPitruCard.d.ts +33 -0
  31. package/dist/components/SarvaPitruCard/SarvaPitruCard.translations.d.ts +19 -0
  32. package/dist/components/SarvaPitruCard/index.d.ts +4 -0
  33. package/dist/components/ServiceOfferCard/ServiceOfferCard.d.ts +1 -1
  34. package/dist/dev/main.d.ts +1 -0
  35. package/dist/index.d.ts +26 -4
  36. package/dist/pitru-paksh-common.d.ts +79 -0
  37. package/dist/pitru-paksh-common.js +2058 -1285
  38. package/dist/pitru-paksh-common.umd.cjs +8 -8
  39. package/dist/style.css +1 -1
  40. package/package.json +6 -5
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { BillDetailsLocale } from './BillDetails.translations';
2
3
  export interface BillDetailsRow {
3
4
  /** Stable key for the row, e.g. "kartas-fee". */
4
5
  id: string | number;
@@ -17,13 +18,16 @@ export interface BillDetailsRow {
17
18
  valueClassName?: string;
18
19
  }
19
20
  export interface BillDetailsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
20
- title?: React.ReactNode;
21
+ /**
22
+ * Locale used to resolve the fixed `title`/`totalLabel` copy below.
23
+ * Defaults to `'en'`.
24
+ */
25
+ locale?: BillDetailsLocale;
21
26
  titleClassName?: string;
22
27
  rows: BillDetailsRow[];
23
28
  rowClassName?: string;
24
29
  /** Set to `false` to hide the accent bar before the title. */
25
30
  showTitleAccent?: boolean;
26
- totalLabel?: React.ReactNode;
27
31
  /** Omit to hide the total row entirely. */
28
32
  totalValue?: React.ReactNode;
29
33
  totalClassName?: string;
@@ -0,0 +1,9 @@
1
+ /** Fixed copy for `BillDetails`, keyed by locale. */
2
+ export type BillDetailsLocale = 'en' | 'hi';
3
+ export interface BillDetailsDefaultCopy {
4
+ title: string;
5
+ totalLabel: string;
6
+ }
7
+ export declare const BILL_DETAILS_DEFAULT_COPY: Record<BillDetailsLocale, BillDetailsDefaultCopy>;
8
+ /** Resolves fixed copy for `locale`, falling back to `'en'` when unsupported. */
9
+ export declare const getBillDetailsDefaultCopy: (locale?: string) => BillDetailsDefaultCopy;
@@ -1,19 +1,33 @@
1
1
  import { default as React } from 'react';
2
+ import { BookingSummaryBannerLocale } from './BookingSummaryBanner.translations';
3
+ /** Raw ancestor/ritual/performer counts — an alternative to `subtitle`/`subtitleItems` that builds the localized "N Ancestors • N Rituals • N Performers" line for you. */
4
+ export interface BookingSummaryBannerStats {
5
+ ancestors: number;
6
+ rituals: number;
7
+ performers: number;
8
+ }
2
9
  export interface BookingSummaryBannerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
10
+ /**
11
+ * Locale used to resolve the default `title` and the labels in `stats`
12
+ * below when they aren't passed explicitly. Defaults to `'en'`.
13
+ */
14
+ locale?: BookingSummaryBannerLocale;
3
15
  /** Leading icon, e.g. a star. Defaults to `<FaStar />`. Pass `null` to hide it. */
4
16
  icon?: React.ReactNode;
5
17
  iconClassName?: string;
6
- /** Headline, e.g. "Pitru Paksha Special Rituals". */
7
- title: React.ReactNode;
18
+ /** Headline, e.g. "Pitru Paksha Special Rituals". Defaults to locale-specific copy. */
19
+ title?: React.ReactNode;
8
20
  titleClassName?: string;
9
21
  /**
10
22
  * Stat line under the title, e.g. "4 Ancestors • 2 Rituals • 2 Performers".
11
- * Pass a ready-made string/node here, or use `subtitleItems` to have the
12
- * "•" separators inserted for you.
23
+ * Pass a ready-made string/node here, or use `subtitleItems`/`stats` to have
24
+ * the "•" separators/labels inserted for you.
13
25
  */
14
26
  subtitle?: React.ReactNode;
15
27
  /** Alternative to `subtitle` — an array of stats auto-joined with " • ". */
16
28
  subtitleItems?: React.ReactNode[];
29
+ /** Alternative to `subtitle`/`subtitleItems` — raw counts, rendered as "N Ancestors • N Rituals • N Performers" with locale-specific labels. */
30
+ stats?: BookingSummaryBannerStats;
17
31
  subtitleClassName?: string;
18
32
  /** className for the inner white card. */
19
33
  cardClassName?: string;
@@ -23,7 +37,14 @@ export interface BookingSummaryBannerProps extends Omit<React.HTMLAttributes<HTM
23
37
  * screen: a star + headline, and a stat line like "4 Ancestors • 2 Rituals •
24
38
  * 2 Performers" inside a white card.
25
39
  *
40
+ * `title` and the `stats` labels default to the translated "Pitru Paksha
41
+ * Special Rituals" / "Ancestors" / "Rituals" / "Performers" copy (via
42
+ * `locale`, `'en'`/`'hi'`) since every current usage shows the same banner —
43
+ * pass `title`/`subtitle`/`subtitleItems` explicitly to override for a
44
+ * different usage.
45
+ *
26
46
  * @example
47
+ * <BookingSummaryBanner stats={{ ancestors: 4, rituals: 2, performers: 2 }} />
27
48
  * <BookingSummaryBanner
28
49
  * title="Pitru Paksha Special Rituals"
29
50
  * subtitleItems={['4 Ancestors', '2 Rituals', '2 Performers']}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Default copy for `BookingSummaryBanner`, keyed by locale. Every current
3
+ * usage shows the same "Pitru Paksha Special Rituals" banner with an
4
+ * "N Ancestors • N Rituals • N Performers" stat line, so the copy (and its
5
+ * translation) lives here once instead of every consuming page
6
+ * re-computing/re-translating it. Pass `title`/`subtitle`/`subtitleItems`
7
+ * explicitly to override any of it for a one-off usage.
8
+ */
9
+ export type BookingSummaryBannerLocale = 'en' | 'hi';
10
+ export interface BookingSummaryBannerDefaultCopy {
11
+ title: string;
12
+ ancestorsLabel: string;
13
+ ritualsLabel: string;
14
+ performersLabel: string;
15
+ }
16
+ export declare const BOOKING_SUMMARY_BANNER_DEFAULT_COPY: Record<BookingSummaryBannerLocale, BookingSummaryBannerDefaultCopy>;
17
+ /** Resolves the default copy for `locale`, falling back to `'en'` when unsupported. */
18
+ export declare const getBookingSummaryBannerDefaultCopy: (locale?: string) => BookingSummaryBannerDefaultCopy;
@@ -1,2 +1,4 @@
1
1
  export { BookingSummaryBanner } from './BookingSummaryBanner';
2
- export type { BookingSummaryBannerProps } from './BookingSummaryBanner';
2
+ export type { BookingSummaryBannerProps, BookingSummaryBannerStats } from './BookingSummaryBanner';
3
+ export { BOOKING_SUMMARY_BANNER_DEFAULT_COPY, getBookingSummaryBannerDefaultCopy, } from './BookingSummaryBanner.translations';
4
+ export type { BookingSummaryBannerLocale, BookingSummaryBannerDefaultCopy, } from './BookingSummaryBanner.translations';
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { CartViewLocale } from '../CartView/CartView.translations';
2
3
  export interface CartReviewItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
3
4
  /** Line item name, e.g. "Performers-Karta (2)" or "Narayan Bali Ritual". */
4
5
  title: React.ReactNode;
@@ -28,16 +29,38 @@ export interface CartReviewItemProps extends Omit<React.HTMLAttributes<HTMLDivEl
28
29
  * />
29
30
  */
30
31
  export declare const CartReviewItem: React.FC<CartReviewItemProps>;
32
+ export interface CartReviewMandapItemProps extends Omit<CartReviewItemProps, 'title' | 'description'> {
33
+ /** Locale used to resolve the fixed title/description copy below. Defaults to `'en'`. */
34
+ locale?: CartViewLocale;
35
+ }
36
+ /**
37
+ * `CartReviewItem` variant for the "Temple and Mandap Charges" line —
38
+ * title and description are fixed, translated copy (via `locale`,
39
+ * `'en'`/`'hi'`); only pass the price-related props (`price`,
40
+ * `originalPrice`, `action`, ...).
41
+ *
42
+ * @example
43
+ * <CartReviewMandapItem locale="hi" price="₹651" originalPrice="₹1899" />
44
+ */
45
+ export declare const CartReviewMandapItem: React.FC<CartReviewMandapItemProps>;
31
46
  export interface CartReviewChangeButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
32
47
  }
33
48
  /** Pencil "Change" pill used as a `CartReviewItem` `action`, e.g. to edit performer count. */
34
49
  export declare const CartReviewChangeButton: React.FC<CartReviewChangeButtonProps>;
35
50
  export interface CartReviewAddedBadgeProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
51
+ /** Locale used to resolve the default "Added"/"Add" label when `children` isn't passed explicitly. Defaults to `'en'`. */
52
+ locale?: CartViewLocale;
53
+ /** Whether the service is currently added. Shows the checkmark + "Added" copy when `true` (default), or plain "Add" copy (no icon) when `false`. */
54
+ isAdded?: boolean;
36
55
  }
37
56
  /**
38
- * Green checkmark "Added" pill used as a `CartReviewItem` `action` once an
39
- * optional ritual/service has been included. Renders as a `<button>` so it
40
- * can double as a "remove" toggle if you pass `onClick`; drop `onClick` for
41
- * a purely informational badge.
57
+ * Toggleable "Add"/"Added" pill used as a `CartReviewItem` `action` for an
58
+ * optional ritual/service. Shows a green checkmark + translated "Added"
59
+ * copy when `isAdded` is `true` (default), or just the translated "Add"
60
+ * copy (no icon) when `false`. Renders as a `<button>` so it can drive
61
+ * adding/removing via `onClick`.
62
+ *
63
+ * The label defaults to the translated "Added"/"Add" copy (via `locale`,
64
+ * `'en'`/`'hi'`) — pass `children` explicitly to override it.
42
65
  */
43
66
  export declare const CartReviewAddedBadge: React.FC<CartReviewAddedBadgeProps>;
@@ -1,2 +1,2 @@
1
- export { CartReviewItem, CartReviewChangeButton, CartReviewAddedBadge } from './CartReviewItem';
2
- export type { CartReviewItemProps, CartReviewChangeButtonProps, CartReviewAddedBadgeProps, } from './CartReviewItem';
1
+ export { CartReviewItem, CartReviewMandapItem, CartReviewChangeButton, CartReviewAddedBadge } from './CartReviewItem';
2
+ export type { CartReviewItemProps, CartReviewMandapItemProps, CartReviewChangeButtonProps, CartReviewAddedBadgeProps, } from './CartReviewItem';
@@ -4,17 +4,43 @@ import { ServiceOfferCardProps } from '../ServiceOfferCard';
4
4
  import { BookingSummaryBannerProps } from '../BookingSummaryBanner';
5
5
  import { BillDetailsProps } from '../BillDetails';
6
6
  import { FAQSectionProps } from '../FAQSection';
7
- /** One row in the booking summary list — every `CartReviewItem` prop is available, plus a stable `id` for the React key. */
8
- export interface CartViewItem extends Omit<CartReviewItemProps, 'id'> {
7
+ import { CheckoutBarProps } from '../CheckoutBar';
8
+ import { CartViewLocale } from './CartView.translations';
9
+ /**
10
+ * One row in the booking summary list — every `CartReviewItem` prop is
11
+ * available, plus a stable `id` for the React key. Set `isMandapCharge` to
12
+ * render the fixed, translated "Temple and Mandap Charges" row
13
+ * (`CartReviewMandapItem`) instead — `title`/`description` are ignored/not
14
+ * needed in that case, only the price-related props matter.
15
+ */
16
+ export interface CartViewItem extends Omit<CartReviewItemProps, 'id' | 'title' | 'description'> {
9
17
  id: string | number;
18
+ title?: React.ReactNode;
19
+ description?: React.ReactNode;
20
+ /** Renders this row as the fixed, translated "Temple and Mandap Charges" line (via the `CartView` `locale`). */
21
+ isMandapCharge?: boolean;
10
22
  }
11
- /** One upsell card in the "add services" list — every `ServiceOfferCard` prop is available, plus a stable `id` for the React key. */
12
- export interface CartViewUpsell extends Omit<ServiceOfferCardProps, 'id'> {
23
+ /** One add-on card in the "add services" list — every `ServiceOfferCard` prop is available, plus a stable `id` for the React key. */
24
+ export interface CartViewAddon extends Omit<ServiceOfferCardProps, 'id'> {
13
25
  id: string | number;
14
26
  }
27
+ /**
28
+ * Sticky bottom price + CTA bar (`CheckoutBar`) shown at the bottom of the
29
+ * cart. Only `price`/`ritualCount` carry content — the "N Rituals" subtitle
30
+ * and the "Proceed to fill details" CTA label are fixed, translated copy
31
+ * (via the `CartView` `locale`), not overridable here. Every other
32
+ * `CheckoutBarProps` behavior prop (`onProceed`, `onInfoClick`, `showInfoIcon`,
33
+ * `proceedButtonProps`, className overrides, ...) is still available.
34
+ */
35
+ export interface CartViewCheckout extends Omit<CheckoutBarProps, 'locale' | 'amount' | 'subtitle' | 'proceedLabel'> {
36
+ /** Final amount, e.g. "₹1648.0/-". */
37
+ price: React.ReactNode;
38
+ /** Number of rituals in the cart — used to build the translated "N Rituals" subtitle. */
39
+ ritualCount: number;
40
+ }
15
41
  export interface CartViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
16
- /** Header title, e.g. "Review your booking". Set to `null`/omit `onBack` and this to hide the header entirely. */
17
- headerTitle?: React.ReactNode;
42
+ /** Locale used to resolve the fixed header title. Defaults to `'en'`. */
43
+ locale?: CartViewLocale;
18
44
  onBack?: () => void;
19
45
  backButtonAriaLabel?: string;
20
46
  headerClassName?: string;
@@ -27,28 +53,27 @@ export interface CartViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>
27
53
  itemsClassName?: string;
28
54
  /** className applied to every item; per-item `className` (via the item object) wins/merges on top. */
29
55
  itemClassName?: string;
30
- /** "Add services for all ancestors" section heading. Omit to hide the heading (upsells can still render). */
31
- upsellsTitle?: React.ReactNode;
32
- upsellsDescription?: React.ReactNode;
33
- /** Upsell `ServiceOfferCard`s (tarpan, cow service, public service, ...). Omit/empty to hide the section. */
34
- upsells?: CartViewUpsell[];
35
- upsellsSectionClassName?: string;
36
- upsellsHeaderClassName?: string;
37
- upsellsTitleClassName?: string;
38
- upsellsDescriptionClassName?: string;
39
- upsellsClassName?: string;
40
- /** className applied to every upsell card; per-card `className` (via the upsell object) wins/merges on top. */
41
- upsellClassName?: string;
56
+ /** Add-on `ServiceOfferCard`s (tarpan, cow service, public service, ...). Omit/empty to hide the section. */
57
+ addons?: CartViewAddon[];
58
+ addonsSectionClassName?: string;
59
+ addonsHeaderClassName?: string;
60
+ addonsTitleClassName?: string;
61
+ addonsDescriptionClassName?: string;
62
+ addonsClassName?: string;
63
+ /** className applied to every add-on card; per-card `className` (via the add-on object) wins/merges on top. */
64
+ addonClassName?: string;
42
65
  /** Price breakdown. Omit to hide it. All `BillDetails` props are available. */
43
66
  billDetails?: BillDetailsProps;
44
67
  /** FAQ accordion. Omit to hide it. All `FAQSection` props are available. */
45
68
  faq?: FAQSectionProps;
69
+ /** Sticky bottom price + "Proceed to fill details" CTA. Omit to hide it. */
70
+ checkout?: CartViewCheckout;
46
71
  }
47
72
  /**
48
73
  * Complete "review your booking" cart page, composed entirely from existing
49
74
  * building blocks (`BookingSummaryBanner`, `CartReviewItem`, `ServiceOfferCard`,
50
75
  * `BillDetails`, `FAQSection`). Every underlying component's props are
51
- * forwarded through dedicated slots (`summary`, `items`, `upsells`,
76
+ * forwarded through dedicated slots (`summary`, `items`, `addons`,
52
77
  * `billDetails`, `faq`) so nothing needs to be re-declared here — pass
53
78
  * whatever those components accept and it flows straight through.
54
79
  *
@@ -56,10 +81,14 @@ export interface CartViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>
56
81
  * <CartView
57
82
  * onBack={() => history.back()}
58
83
  * summary={{ title: 'Pitru Paksha Special Rituals', subtitleItems: ['4 Ancestors', '2 Rituals', '2 Performers'] }}
59
- * items={[{ id: 'karta', title: 'Performers-Karta (2)', description: 'On behalf of two family members', price: '₹400', action: <CartReviewChangeButton /> }]}
60
- * upsells={[{ id: 'tarpan', image: photo, title: 'Offer tarpan donation...', price: '₹199', originalPrice: '₹250', action: <QuantityStepper value={2} onIncrement={inc} onDecrement={dec} /> }]}
84
+ * items={[
85
+ * { id: 'karta', title: 'Performers-Karta (2)', description: 'On behalf of two family members', price: '₹400', action: <CartReviewChangeButton /> },
86
+ * { id: 'mandap', isMandapCharge: true, price: '₹651', originalPrice: '₹1899' },
87
+ * ]}
88
+ * addons={[{ id: 'tarpan', image: photo, title: 'Offer tarpan donation...', price: '₹199', originalPrice: '₹250', action: <QuantityStepper value={2} onIncrement={inc} onDecrement={dec} /> }]}
61
89
  * billDetails={{ rows: [{ id: 'kartas', label: '2-Kartas Fee', value: '₹400.0/-' }], totalValue: '₹1648.0/-' }}
62
90
  * faq={{ items: faqItems }}
91
+ * checkout={{ price: '₹1648.0/-', ritualCount: 2, onProceed: () => nav.push('/checkout') }}
63
92
  * />
64
93
  */
65
94
  export declare const CartView: React.FC<CartViewProps>;
@@ -0,0 +1,24 @@
1
+ /** Fixed copy for `CartView`, keyed by locale. */
2
+ export type CartViewLocale = 'en' | 'hi';
3
+ export interface CartViewDefaultCopy {
4
+ headerTitle: string;
5
+ addonsTitle: string;
6
+ addonsDescription: string;
7
+ /** "Added" badge label used by `CartReviewAddedBadge` when `isAdded` is `true`. */
8
+ addedLabel: string;
9
+ /** "Add" badge label used by `CartReviewAddedBadge` when `isAdded` is `false`. */
10
+ addLabel: string;
11
+ /** Fixed title used by `CartReviewMandapItem`, e.g. "Temple and Mandap Charges". */
12
+ mandapTitle: string;
13
+ /** Fixed description used by `CartReviewMandapItem`. */
14
+ mandapDescription: string;
15
+ /** Sticky bottom bar's CTA label, e.g. "Proceed to fill details". */
16
+ checkoutProceedLabel: string;
17
+ /** Sticky bottom bar's subtitle unit for a single ritual, e.g. "Ritual" (shown as "1 Ritual"). */
18
+ checkoutRitualSingular: string;
19
+ /** Sticky bottom bar's subtitle unit for multiple rituals, e.g. "Rituals" (shown as "N Rituals"). */
20
+ checkoutRitualPlural: string;
21
+ }
22
+ export declare const CART_VIEW_DEFAULT_COPY: Record<CartViewLocale, CartViewDefaultCopy>;
23
+ /** Resolves fixed copy for `locale`, falling back to `'en'` when unsupported. */
24
+ export declare const getCartViewDefaultCopy: (locale?: string) => CartViewDefaultCopy;
@@ -1,2 +1,2 @@
1
1
  export { CartView } from './CartView';
2
- export type { CartViewProps, CartViewItem, CartViewUpsell } from './CartView';
2
+ export type { CartViewProps, CartViewAddon, CartViewItem } from './CartView';
@@ -1,6 +1,12 @@
1
1
  import { default as React } from 'react';
2
2
  import { ButtonProps } from '../Button';
3
+ import { CheckoutBarLocale } from './CheckoutBar.translations';
3
4
  export interface CheckoutBarProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ /**
6
+ * Locale used to resolve the default `proceedLabel` below when it isn't
7
+ * passed explicitly. Defaults to `'en'`.
8
+ */
9
+ locale?: CheckoutBarLocale;
4
10
  /** Final amount, e.g. "₹1451.0/-". */
5
11
  amount: React.ReactNode;
6
12
  amountClassName?: string;
@@ -11,7 +17,7 @@ export interface CheckoutBarProps extends React.HTMLAttributes<HTMLDivElement> {
11
17
  showInfoIcon?: boolean;
12
18
  onInfoClick?: () => void;
13
19
  infoIconClassName?: string;
14
- /** CTA label, e.g. "Proceed". */
20
+ /** CTA label, e.g. "Proceed". Defaults to locale-specific copy. */
15
21
  proceedLabel?: React.ReactNode;
16
22
  /** Trailing icon on the CTA. Defaults to an arrow. Pass `null` to hide it. */
17
23
  proceedIcon?: React.ReactNode;
@@ -27,6 +33,10 @@ export interface CheckoutBarProps extends React.HTMLAttributes<HTMLDivElement> {
27
33
  * Wrap this in your own `sticky bottom-0` container to pin it — this
28
34
  * component itself stays layout-agnostic so it can be reused inline too.
29
35
  *
36
+ * `proceedLabel` defaults to the translated "Proceed" copy (via `locale`,
37
+ * `'en'`/`'hi'`) since every current usage shows the same CTA — pass it
38
+ * explicitly to override for a different usage.
39
+ *
30
40
  * @example
31
41
  * <CheckoutBar amount="₹1451.0/-" subtitle="2 Rituals" onProceed={() => nav.push('/checkout')} />
32
42
  */
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Default copy for `CheckoutBar`, keyed by locale. `CheckoutBar` shows the
3
+ * same "Proceed" CTA everywhere it's used across Pitru Paksha flows, so the
4
+ * copy (and its translation) lives here once instead of every consuming page
5
+ * re-computing/re-translating it. Pass `proceedLabel` explicitly to override
6
+ * it for a one-off usage.
7
+ */
8
+ export type CheckoutBarLocale = 'en' | 'hi' | 'te';
9
+ export interface CheckoutBarDefaultCopy {
10
+ proceedLabel: string;
11
+ }
12
+ export declare const CHECKOUT_BAR_DEFAULT_COPY: Record<CheckoutBarLocale, CheckoutBarDefaultCopy>;
13
+ /** Resolves the default copy for `locale`, falling back to `'en'` when unsupported. */
14
+ export declare const getCheckoutBarDefaultCopy: (locale?: string) => CheckoutBarDefaultCopy;
@@ -1,2 +1,4 @@
1
1
  export { CheckoutBar } from './CheckoutBar';
2
2
  export type { CheckoutBarProps } from './CheckoutBar';
3
+ export { CHECKOUT_BAR_DEFAULT_COPY, getCheckoutBarDefaultCopy } from './CheckoutBar.translations';
4
+ export type { CheckoutBarLocale, CheckoutBarDefaultCopy } from './CheckoutBar.translations';
@@ -0,0 +1,11 @@
1
+ import { ConfirmPujaDetailsModalProps } from './ConfirmPujaDetailsModal.types';
2
+ /**
3
+ * "Check the details to book your puja procedure" confirmation sheet shown
4
+ * after `PujaDetailsForm` is filled in and the devotee taps the checkout
5
+ * bar's CTA: a read-only summary of the ancestors, Karta (performer) names,
6
+ * Gotra and WhatsApp number/email, plus "Edit Details" (back to the form)
7
+ * and a "Pay" CTA that hands off to the payment flow via `onProceedPayment`.
8
+ *
9
+ * All labels default to locale-specific copy (`locale`, `'en'`/`'hi'`/`'te'`).
10
+ */
11
+ export declare function ConfirmPujaDetailsModal({ isOpen, onClose, locale, ancestors, kartaNames, gotra, whatsappNumber, amount, onEditDetailsClick, onProceedPayment, className, }: ConfirmPujaDetailsModalProps): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Default copy for `ConfirmPujaDetailsModal`, keyed by locale. This "check
3
+ * the details to book your puja" confirmation sheet shows the same labels
4
+ * everywhere it's used across Pitru Paksha flows, so the copy (and its
5
+ * translation) lives here once instead of every consuming page
6
+ * re-computing/re-translating it.
7
+ */
8
+ export type ConfirmPujaDetailsModalLocale = 'en' | 'hi' | 'te';
9
+ export interface ConfirmPujaDetailsModalDefaultCopy {
10
+ heading: string;
11
+ subtext: string;
12
+ ancestorsLabel: string;
13
+ performerLabel: string;
14
+ gotraLabel: string;
15
+ whatsappLabel: string;
16
+ editDetailsLabel: string;
17
+ /** e.g. "Pay {amount}" — `{amount}` is replaced with the `amount` prop (already formatted, e.g. "₹1648/-"). Word order varies by locale. */
18
+ payButtonTemplate: string;
19
+ }
20
+ export declare const CONFIRM_PUJA_DETAILS_MODAL_DEFAULT_COPY: Record<ConfirmPujaDetailsModalLocale, ConfirmPujaDetailsModalDefaultCopy>;
21
+ /** Resolves the default copy for `locale`, falling back to `'en'` when unsupported. */
22
+ export declare const getConfirmPujaDetailsModalDefaultCopy: (locale?: string) => ConfirmPujaDetailsModalDefaultCopy;
@@ -0,0 +1,25 @@
1
+ import { AncestorNameEntry } from '../PujaDetailsForm';
2
+ import { ConfirmPujaDetailsModalLocale } from './ConfirmPujaDetailsModal.translations';
3
+ export interface ConfirmPujaDetailsModalProps {
4
+ isOpen: boolean;
5
+ /** Called by the close (X) button, backdrop tap and Escape. */
6
+ onClose: () => void;
7
+ /**
8
+ * Locale used to resolve all the labels below. Defaults to `'en'`.
9
+ */
10
+ locale?: ConfirmPujaDetailsModalLocale;
11
+ /** Ancestors this puja is for — reuses `PujaDetailsForm`'s shape (`label` = relation, e.g. "Grandfather"; `value` = name), so the same data filled in there can be passed straight through. Each renders as a "{value} ({label})" pill. */
12
+ ancestors: AncestorNameEntry[];
13
+ /** Karta (performer) names, in order — each renders as a "{n}. {name}" pill. */
14
+ kartaNames: string[];
15
+ gotra: string;
16
+ /** 10-digit Indian mobile number, or the email when the devotee filled that in instead (see `PujaDetailsForm`'s `isGlobal`). */
17
+ whatsappNumber: string;
18
+ /** Final amount shown on the Pay button, e.g. "₹1648/-". */
19
+ amount: string;
20
+ /** Fired when "Edit Details" is clicked — typically closes the modal and returns to `PujaDetailsForm`. */
21
+ onEditDetailsClick?: () => void;
22
+ /** Fired when the Pay button is clicked, to hand off to the payment flow. */
23
+ onProceedPayment: () => void;
24
+ className?: string;
25
+ }
@@ -0,0 +1,4 @@
1
+ export { ConfirmPujaDetailsModal } from './ConfirmPujaDetailsModal';
2
+ export type { ConfirmPujaDetailsModalProps } from './ConfirmPujaDetailsModal.types';
3
+ export { CONFIRM_PUJA_DETAILS_MODAL_DEFAULT_COPY, getConfirmPujaDetailsModalDefaultCopy, } from './ConfirmPujaDetailsModal.translations';
4
+ export type { ConfirmPujaDetailsModalLocale, ConfirmPujaDetailsModalDefaultCopy, } from './ConfirmPujaDetailsModal.translations';
@@ -0,0 +1,9 @@
1
+ import { GotraInfoModalProps } from './GotraInfoModal.types';
2
+ /**
3
+ * "I do not know my Lineage (Gotra), what should I do?" info sheet opened
4
+ * from the info icon next to `PujaDetailsForm`'s Gotra field: explains the
5
+ * Kashyap-Gotra fallback per scripture, with a single "Okay" CTA to dismiss.
6
+ *
7
+ * All copy defaults to locale-specific text (`locale`, `'en'`/`'hi'`/`'te'`).
8
+ */
9
+ export declare function GotraInfoModal({ isOpen, onClose, locale, className }: GotraInfoModalProps): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Default copy for `GotraInfoModal`, keyed by locale. Explains what to do
3
+ * when a devotee doesn't know their Gotra (lineage) — opened from the
4
+ * Gotra field's info icon in `PujaDetailsForm`.
5
+ */
6
+ export type GotraInfoModalLocale = 'en' | 'hi' | 'te';
7
+ export interface GotraInfoModalDefaultCopy {
8
+ heading: string;
9
+ body: string;
10
+ okayLabel: string;
11
+ closeButtonAriaLabel: string;
12
+ }
13
+ export declare const GOTRA_INFO_MODAL_DEFAULT_COPY: Record<GotraInfoModalLocale, GotraInfoModalDefaultCopy>;
14
+ /** Resolves the default copy for `locale`, falling back to `'en'` when unsupported. */
15
+ export declare const getGotraInfoModalDefaultCopy: (locale?: string) => GotraInfoModalDefaultCopy;
@@ -0,0 +1,12 @@
1
+ import { GotraInfoModalLocale } from './GotraInfoModal.translations';
2
+ export interface GotraInfoModalProps {
3
+ isOpen: boolean;
4
+ /** Called by the close (X) button, backdrop tap, Escape and the "Okay" button. */
5
+ onClose: () => void;
6
+ /**
7
+ * Locale used to resolve the heading/body/button copy below. Defaults to
8
+ * `'en'`.
9
+ */
10
+ locale?: GotraInfoModalLocale;
11
+ className?: string;
12
+ }
@@ -0,0 +1,4 @@
1
+ export { GotraInfoModal } from './GotraInfoModal';
2
+ export type { GotraInfoModalProps } from './GotraInfoModal.types';
3
+ export { GOTRA_INFO_MODAL_DEFAULT_COPY, getGotraInfoModalDefaultCopy, } from './GotraInfoModal.translations';
4
+ export type { GotraInfoModalLocale, GotraInfoModalDefaultCopy } from './GotraInfoModal.translations';
@@ -2,6 +2,7 @@ import { default as React } from 'react';
2
2
  import { SelectorCardProps, SelectorCardNoteProps, SelectorCardPriceBadgeProps } from '../SelectorCard';
3
3
  import { TrustBadgesBarProps } from '../TrustBadgesBar';
4
4
  import { CheckoutBarProps } from '../CheckoutBar';
5
+ import { PackageSelectLocale } from './PackageSelect.translations';
5
6
  export interface PackageSelectOption extends Omit<SelectorCardProps, 'id' | 'selected' | 'onSelect' | 'badge' | 'children'> {
6
7
  /** Unique id for this option, passed back via `onChange`. */
7
8
  id: string | number;
@@ -25,11 +26,17 @@ export interface PackageSelectOption extends Omit<SelectorCardProps, 'id' | 'sel
25
26
  children?: React.ReactNode;
26
27
  }
27
28
  export interface PackageSelectProps {
28
- /** Screen/section heading, e.g. "Select the number of people performing the Puja (Karta)". */
29
- title: React.ReactNode;
30
- /** Helper copy shown under the heading. */
29
+ /**
30
+ * Locale used to resolve the default `title`/`description`/`benefits`/
31
+ * `trustBadges` copy below when they aren't passed explicitly. Defaults to
32
+ * `'en'`.
33
+ */
34
+ locale?: PackageSelectLocale;
35
+ /** Screen/section heading, e.g. "Select the number of people performing the Puja (Karta)". Defaults to locale-specific copy. */
36
+ title?: React.ReactNode;
37
+ /** Helper copy shown under the heading. Defaults to locale-specific copy. */
31
38
  description?: React.ReactNode;
32
- /** Checklist of what's included with this package, each rendered with a green checkmark. */
39
+ /** Checklist of what's included with this package, each rendered with a green checkmark. Defaults to locale-specific copy. */
33
40
  benefits?: React.ReactNode[];
34
41
  /** The selectable package options, rendered as a `SelectorCard` radio group. */
35
42
  options: PackageSelectOption[];
@@ -45,7 +52,7 @@ export interface PackageSelectProps {
45
52
  headerClassName?: string;
46
53
  benefitsClassName?: string;
47
54
  optionsClassName?: string;
48
- /** Trust badges strip (money-back guarantee, no hidden cost, ...) shown above the checkout bar. All `TrustBadgesBarProps` are available. Omit to hide it. */
55
+ /** Trust badges strip (money-back guarantee, no hidden cost, ...) shown above the checkout bar. All `TrustBadgesBarProps` are available. Defaults to locale-specific copy; pass `{ badges: [] }` to hide it. */
49
56
  trustBadges?: TrustBadgesBarProps;
50
57
  /** Bottom amount + Proceed CTA bar. All `CheckoutBarProps` are available (amount, subtitle, onProceed, proceedButtonProps, ...). Omit to hide the whole footer. */
51
58
  checkout?: CheckoutBarProps;
@@ -60,6 +67,11 @@ export interface PackageSelectProps {
60
67
  * note), and an optional bottom footer (`TrustBadgesBar` + `CheckoutBar`)
61
68
  * with the final amount and a "Proceed" CTA.
62
69
  *
70
+ * `title`/`description`/`benefits`/`trustBadges` all default to the "who is
71
+ * performing the puja (Karta)" copy (translated via `locale`, `'en'`/`'hi'`)
72
+ * since every current usage shows that same screen — pass any of them
73
+ * explicitly to override for a different usage.
74
+ *
63
75
  * Built entirely from `SelectorCard` + friends, so it's a drop-in composed
64
76
  * screen you can import into any app that already depends on
65
77
  * `pitru-paksh-common`, without having to hand-assemble the header/benefits/
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Default copy for the "who is performing the puja (Karta)" `PackageSelect`
3
+ * screen, keyed by locale. `PackageSelect` is reused across several pages of
4
+ * the Pitru Paksha flows with this exact same heading/description/benefits/
5
+ * trust badges, so the copy (and its translation) lives here once instead of
6
+ * being duplicated — and re-translated — by every consuming page. Pass
7
+ * `title`/`description`/`benefits`/`trustBadges` explicitly to override any
8
+ * of it for a one-off usage.
9
+ */
10
+ export type PackageSelectLocale = 'en' | 'hi' | 'te';
11
+ export interface PackageSelectDefaultCopy {
12
+ title: string;
13
+ description: string;
14
+ benefits: string[];
15
+ trustBadgeLabels: {
16
+ moneyBack: string;
17
+ noHiddenCost: string;
18
+ support: string;
19
+ };
20
+ }
21
+ export declare const PACKAGE_SELECT_DEFAULT_COPY: Record<PackageSelectLocale, PackageSelectDefaultCopy>;
22
+ /** Resolves the default copy for `locale`, falling back to `'en'` when unsupported. */
23
+ export declare const getPackageSelectDefaultCopy: (locale?: string) => PackageSelectDefaultCopy;
@@ -1,2 +1,4 @@
1
1
  export { PackageSelect } from './PackageSelect';
2
2
  export type { PackageSelectProps, PackageSelectOption } from './PackageSelect';
3
+ export { PACKAGE_SELECT_DEFAULT_COPY, getPackageSelectDefaultCopy, } from './PackageSelect.translations';
4
+ export type { PackageSelectLocale, PackageSelectDefaultCopy } from './PackageSelect.translations';
@@ -0,0 +1,6 @@
1
+ /** Max length enforced on every free-text name field (Karta, ancestor, Gotra). */
2
+ export declare const MAX_NAME_LENGTH = 40;
3
+ /** This form only ever collects an Indian mobile number — there's no country selector. */
4
+ export declare const INDIA_COUNTRY_CODE = "+91";
5
+ /** Basic email shape check used for the `isGlobal` email field's error state. */
6
+ export declare const EMAIL_PATTERN: RegExp;
@@ -0,0 +1,25 @@
1
+ import { AncestorNameEntry, PujaDetailsFormProps, PujaDetailsFormValues } from './PujaDetailsForm.types';
2
+ /**
3
+ * Complete "fill in Karta, Gotra, WhatsApp number and ancestor details"
4
+ * screen used across Pitru Paksha flows: a WhatsApp number field (or email,
5
+ * see `isGlobal`), up to N Karta (performer) names, the Karta's Gotra (with
6
+ * an "unknown Gotra" fallback), and the ancestors' + their parents' names —
7
+ * each rendered with the "Late" prefix. Ends with a sticky `CheckoutBar`
8
+ * footer.
9
+ *
10
+ * Most section headings/field labels default to locale-specific copy
11
+ * (`locale`, `'en'`/`'hi'`/`'te'`) and can be overridden per-prop for a
12
+ * one-off usage. The WhatsApp/email field copy and the "Late" prefix are
13
+ * always the fixed, translated copy (not overridable) since this form only
14
+ * ever collects an Indian mobile number or an email.
15
+ */
16
+ export declare function PujaDetailsForm({ locale, values, onValuesChange, isGlobal, gotraOptions, isSarvaPitru, onBackClick, amount, ritualsCountLabel, onPriceInfoClick, canProceed, proceedCtaLabel, proceedButtonProps, onProceedPayment, className, }: PujaDetailsFormProps): import("react").JSX.Element;
17
+ /**
18
+ * Convenience factory for a blank `PujaDetailsFormValues`, e.g. to seed local
19
+ * component state. `kartaCount` sets how many Karta name fields render —
20
+ * pass whatever number of performers the devotee selected upstream (e.g. via
21
+ * `PackageSelect`). Defaults to `3`. `ancestors` seeds the ancestor name
22
+ * fields — pass the relation `label`s (and any pre-filled `value`s) carried
23
+ * over from the earlier ancestor-selection step; defaults to an empty list.
24
+ */
25
+ export declare function createEmptyPujaDetailsFormValues(kartaCount?: number, ancestors?: AncestorNameEntry[]): PujaDetailsFormValues;