@srimandir/pitru-paksh-common 1.0.12 → 2.0.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 (37) hide show
  1. package/dist/components/AudioQuestionCard/AudioQuestionCard.d.ts +4 -1
  2. package/dist/components/BillDetails/BillDetails.d.ts +48 -0
  3. package/dist/components/BillDetails/index.d.ts +2 -0
  4. package/dist/components/BookingSummaryBanner/BookingSummaryBanner.d.ts +32 -0
  5. package/dist/components/BookingSummaryBanner/index.d.ts +2 -0
  6. package/dist/components/CartReviewItem/CartReviewItem.d.ts +43 -0
  7. package/dist/components/CartReviewItem/index.d.ts +2 -0
  8. package/dist/components/CartView/CartView.d.ts +65 -0
  9. package/dist/components/CartView/index.d.ts +2 -0
  10. package/dist/components/CheckoutBar/CheckoutBar.d.ts +33 -0
  11. package/dist/components/CheckoutBar/index.d.ts +2 -0
  12. package/dist/components/DatePickerSheet/DatePickerSheet.d.ts +22 -0
  13. package/dist/components/DatePickerSheet/WheelColumn.d.ts +7 -0
  14. package/dist/components/DatePickerSheet/index.d.ts +2 -0
  15. package/dist/components/IconBadge/IconBadge.d.ts +15 -0
  16. package/dist/components/IconBadge/index.d.ts +2 -0
  17. package/dist/components/PackageSelect/PackageSelect.d.ts +73 -0
  18. package/dist/components/PackageSelect/index.d.ts +2 -0
  19. package/dist/components/PhoneNumberSheet/PhoneNumberSheet.d.ts +16 -0
  20. package/dist/components/PhoneNumberSheet/index.d.ts +2 -0
  21. package/dist/components/QuantityStepper/QuantityStepper.d.ts +23 -0
  22. package/dist/components/QuantityStepper/index.d.ts +2 -0
  23. package/dist/components/SelectorCard/SelectorCard.d.ts +85 -0
  24. package/dist/components/SelectorCard/index.d.ts +2 -0
  25. package/dist/components/ServiceOfferCard/ServiceOfferCard.d.ts +33 -0
  26. package/dist/components/ServiceOfferCard/index.d.ts +2 -0
  27. package/dist/components/TextField/TextField.d.ts +17 -0
  28. package/dist/components/TextField/index.d.ts +2 -0
  29. package/dist/components/TithiPickerSheet/TithiPickerSheet.d.ts +12 -0
  30. package/dist/components/TithiPickerSheet/index.d.ts +2 -0
  31. package/dist/components/TrustBadgesBar/TrustBadgesBar.d.ts +27 -0
  32. package/dist/components/TrustBadgesBar/index.d.ts +2 -0
  33. package/dist/index.d.ts +30 -0
  34. package/dist/pitru-paksh-common.js +1827 -884
  35. package/dist/pitru-paksh-common.umd.cjs +8 -8
  36. package/dist/style.css +1 -1
  37. package/package.json +4 -4
@@ -1,7 +1,10 @@
1
1
  import { default as React } from 'react';
2
2
  export interface AudioQuestionCardProps extends React.HTMLAttributes<HTMLDivElement> {
3
3
  avatarUrl: string;
4
- question: string;
4
+ /** Fully-styled question content — typography (size/weight/highlights) is the caller's responsibility. */
5
+ question: React.ReactNode;
6
+ /** Optional fully-styled caption shown below the question, e.g. context for why it's being asked. */
7
+ description?: React.ReactNode;
5
8
  /** When provided, plays once automatically on mount. */
6
9
  audioSrc?: string;
7
10
  }
@@ -0,0 +1,48 @@
1
+ import { default as React } from 'react';
2
+ export interface BillDetailsRow {
3
+ /** Stable key for the row, e.g. "kartas-fee". */
4
+ id: string | number;
5
+ /** Row label, e.g. "Narayan Bali Ritual Fee". */
6
+ label: React.ReactNode;
7
+ labelClassName?: string;
8
+ /** Muted helper text under the label, e.g. "₹100/day at Gokarna". */
9
+ subLabel?: React.ReactNode;
10
+ subLabelClassName?: string;
11
+ /** Muted parenthetical shown before the value, e.g. "(2x₹100)". */
12
+ note?: React.ReactNode;
13
+ /** Struck-through value shown before the final value, e.g. "₹851". */
14
+ originalValue?: React.ReactNode;
15
+ /** Final value, e.g. "₹200.0/-" or "FREE". Style it (e.g. green for FREE) via `valueClassName`. */
16
+ value: React.ReactNode;
17
+ valueClassName?: string;
18
+ }
19
+ export interface BillDetailsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
20
+ title?: React.ReactNode;
21
+ titleClassName?: string;
22
+ rows: BillDetailsRow[];
23
+ rowClassName?: string;
24
+ /** Set to `false` to hide the accent bar before the title. */
25
+ showTitleAccent?: boolean;
26
+ totalLabel?: React.ReactNode;
27
+ /** Omit to hide the total row entirely. */
28
+ totalValue?: React.ReactNode;
29
+ totalClassName?: string;
30
+ }
31
+ /**
32
+ * Itemized price breakdown used at the bottom of a cart/review screen:
33
+ * a titled list of fee rows (each with an optional muted sub-label,
34
+ * parenthetical note, and struck-through original value) followed by a
35
+ * dashed-border total row.
36
+ *
37
+ * @example
38
+ * <BillDetails
39
+ * rows={[
40
+ * { id: 'kartas', label: '2-Kartas Fee', value: '₹400.0/-' },
41
+ * { id: 'mandap', label: 'Mandap Arrangement Fee', originalValue: '₹851', value: '₹651.0/-' },
42
+ * { id: 'narayan-bali', label: 'Narayan Bali Ritual Fee', subLabel: '₹100/day at Gokarna', note: '(2x₹100)', value: '₹200.0/-' },
43
+ * { id: 'pandit', label: 'Pandit Fee', labelClassName: 'text-gray-400', originalValue: '₹51.0', value: 'FREE', valueClassName: 'text-emerald-600 font-semibold' },
44
+ * ]}
45
+ * totalValue="₹1648.0/-"
46
+ * />
47
+ */
48
+ export declare const BillDetails: React.FC<BillDetailsProps>;
@@ -0,0 +1,2 @@
1
+ export { BillDetails } from './BillDetails';
2
+ export type { BillDetailsProps, BillDetailsRow } from './BillDetails';
@@ -0,0 +1,32 @@
1
+ import { default as React } from 'react';
2
+ export interface BookingSummaryBannerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
3
+ /** Leading icon, e.g. a star. Defaults to `<FaStar />`. Pass `null` to hide it. */
4
+ icon?: React.ReactNode;
5
+ iconClassName?: string;
6
+ /** Headline, e.g. "Pitru Paksha Special Rituals". */
7
+ title: React.ReactNode;
8
+ titleClassName?: string;
9
+ /**
10
+ * 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.
13
+ */
14
+ subtitle?: React.ReactNode;
15
+ /** Alternative to `subtitle` — an array of stats auto-joined with " • ". */
16
+ subtitleItems?: React.ReactNode[];
17
+ subtitleClassName?: string;
18
+ /** className for the inner white card. */
19
+ cardClassName?: string;
20
+ }
21
+ /**
22
+ * Pink-tinted "booking summary" banner shown at the top of a cart/review
23
+ * screen: a star + headline, and a stat line like "4 Ancestors • 2 Rituals •
24
+ * 2 Performers" inside a white card.
25
+ *
26
+ * @example
27
+ * <BookingSummaryBanner
28
+ * title="Pitru Paksha Special Rituals"
29
+ * subtitleItems={['4 Ancestors', '2 Rituals', '2 Performers']}
30
+ * />
31
+ */
32
+ export declare const BookingSummaryBanner: React.FC<BookingSummaryBannerProps>;
@@ -0,0 +1,2 @@
1
+ export { BookingSummaryBanner } from './BookingSummaryBanner';
2
+ export type { BookingSummaryBannerProps } from './BookingSummaryBanner';
@@ -0,0 +1,43 @@
1
+ import { default as React } from 'react';
2
+ export interface CartReviewItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
3
+ /** Line item name, e.g. "Performers-Karta (2)" or "Narayan Bali Ritual". */
4
+ title: React.ReactNode;
5
+ /** Helper text under the title, e.g. who the ritual is performed for. Wraps onto multiple lines. */
6
+ description?: React.ReactNode;
7
+ /** Final price for this line item, e.g. "₹400". */
8
+ price: React.ReactNode;
9
+ /** Original price shown struck-through before `price`, e.g. "₹1899" for a discounted line. */
10
+ originalPrice?: React.ReactNode;
11
+ /**
12
+ * Trailing control under the price — typically `CartReviewChangeButton`,
13
+ * `CartReviewAddedBadge`, or nothing for a read-only line like taxes/fees.
14
+ */
15
+ action?: React.ReactNode;
16
+ }
17
+ /**
18
+ * Read-only line item row used on cart/booking-review screens: a title +
19
+ * optional description on the left, price (with optional struck-through
20
+ * original) and an optional action (Change/Added/etc.) on the right.
21
+ *
22
+ * @example
23
+ * <CartReviewItem
24
+ * title="Performers-Karta (2)"
25
+ * description="On behalf of two family members"
26
+ * price="₹400"
27
+ * action={<CartReviewChangeButton onClick={...} />}
28
+ * />
29
+ */
30
+ export declare const CartReviewItem: React.FC<CartReviewItemProps>;
31
+ export interface CartReviewChangeButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
32
+ }
33
+ /** Pencil "Change" pill used as a `CartReviewItem` `action`, e.g. to edit performer count. */
34
+ export declare const CartReviewChangeButton: React.FC<CartReviewChangeButtonProps>;
35
+ export interface CartReviewAddedBadgeProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
36
+ }
37
+ /**
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.
42
+ */
43
+ export declare const CartReviewAddedBadge: React.FC<CartReviewAddedBadgeProps>;
@@ -0,0 +1,2 @@
1
+ export { CartReviewItem, CartReviewChangeButton, CartReviewAddedBadge } from './CartReviewItem';
2
+ export type { CartReviewItemProps, CartReviewChangeButtonProps, CartReviewAddedBadgeProps, } from './CartReviewItem';
@@ -0,0 +1,65 @@
1
+ import { default as React } from 'react';
2
+ import { CartReviewItemProps } from '../CartReviewItem';
3
+ import { ServiceOfferCardProps } from '../ServiceOfferCard';
4
+ import { BookingSummaryBannerProps } from '../BookingSummaryBanner';
5
+ import { BillDetailsProps } from '../BillDetails';
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'> {
9
+ id: string | number;
10
+ }
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'> {
13
+ id: string | number;
14
+ }
15
+ 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;
18
+ onBack?: () => void;
19
+ backButtonAriaLabel?: string;
20
+ headerClassName?: string;
21
+ backButtonClassName?: string;
22
+ headerTitleClassName?: string;
23
+ /** Pink "Pitru Paksha Special Rituals" style banner. Omit to hide it. All `BookingSummaryBanner` props are available. */
24
+ summary?: BookingSummaryBannerProps;
25
+ /** Read-only booking line items (Performers-Karta, rituals, fees, ...). Omit/empty to hide the section. */
26
+ items?: CartViewItem[];
27
+ itemsClassName?: string;
28
+ /** className applied to every item; per-item `className` (via the item object) wins/merges on top. */
29
+ 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;
42
+ /** Price breakdown. Omit to hide it. All `BillDetails` props are available. */
43
+ billDetails?: BillDetailsProps;
44
+ /** FAQ accordion. Omit to hide it. All `FAQSection` props are available. */
45
+ faq?: FAQSectionProps;
46
+ }
47
+ /**
48
+ * Complete "review your booking" cart page, composed entirely from existing
49
+ * building blocks (`BookingSummaryBanner`, `CartReviewItem`, `ServiceOfferCard`,
50
+ * `BillDetails`, `FAQSection`). Every underlying component's props are
51
+ * forwarded through dedicated slots (`summary`, `items`, `upsells`,
52
+ * `billDetails`, `faq`) so nothing needs to be re-declared here — pass
53
+ * whatever those components accept and it flows straight through.
54
+ *
55
+ * @example
56
+ * <CartView
57
+ * onBack={() => history.back()}
58
+ * 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} /> }]}
61
+ * billDetails={{ rows: [{ id: 'kartas', label: '2-Kartas Fee', value: '₹400.0/-' }], totalValue: '₹1648.0/-' }}
62
+ * faq={{ items: faqItems }}
63
+ * />
64
+ */
65
+ export declare const CartView: React.FC<CartViewProps>;
@@ -0,0 +1,2 @@
1
+ export { CartView } from './CartView';
2
+ export type { CartViewProps, CartViewItem, CartViewUpsell } from './CartView';
@@ -0,0 +1,33 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonProps } from '../Button';
3
+ export interface CheckoutBarProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ /** Final amount, e.g. "₹1451.0/-". */
5
+ amount: React.ReactNode;
6
+ amountClassName?: string;
7
+ /** Muted line under the amount, e.g. "2 Rituals". */
8
+ subtitle?: React.ReactNode;
9
+ subtitleClassName?: string;
10
+ /** Info icon shown next to the amount — click to reveal a bill breakdown, etc. Pass `null` to hide it, or `onInfoClick` to make it interactive. */
11
+ showInfoIcon?: boolean;
12
+ onInfoClick?: () => void;
13
+ infoIconClassName?: string;
14
+ /** CTA label, e.g. "Proceed". */
15
+ proceedLabel?: React.ReactNode;
16
+ /** Trailing icon on the CTA. Defaults to an arrow. Pass `null` to hide it. */
17
+ proceedIcon?: React.ReactNode;
18
+ onProceed?: () => void;
19
+ /** Extra props forwarded to the underlying `Button` (variant, size, disabled, loading, ...). */
20
+ proceedButtonProps?: Omit<ButtonProps, 'children' | 'onClick'>;
21
+ buttonWrapperClassName?: string;
22
+ }
23
+ /**
24
+ * Sticky-friendly checkout bar shown at the bottom of a package-selection or
25
+ * cart screen: the final amount (with an optional info icon) + a short
26
+ * subtitle like "2 Rituals" on the left, and a "Proceed →" CTA on the right.
27
+ * Wrap this in your own `sticky bottom-0` container to pin it — this
28
+ * component itself stays layout-agnostic so it can be reused inline too.
29
+ *
30
+ * @example
31
+ * <CheckoutBar amount="₹1451.0/-" subtitle="2 Rituals" onProceed={() => nav.push('/checkout')} />
32
+ */
33
+ export declare const CheckoutBar: React.FC<CheckoutBarProps>;
@@ -0,0 +1,2 @@
1
+ export { CheckoutBar } from './CheckoutBar';
2
+ export type { CheckoutBarProps } from './CheckoutBar';
@@ -0,0 +1,22 @@
1
+ export interface PickedDate {
2
+ day: number;
3
+ /** 1-12 */
4
+ month: number;
5
+ year: number;
6
+ }
7
+ export interface DatePickerSheetProps {
8
+ isOpen: boolean;
9
+ onClose: () => void;
10
+ avatarUrl: string;
11
+ heading: string;
12
+ /** 12 translated month names, January first. */
13
+ monthLabels: string[];
14
+ confirmLabel: string;
15
+ onConfirm: (date: PickedDate) => void;
16
+ /** Shown next to the CTA, e.g. "Timezone: IST". Omit to hide. */
17
+ timezoneLabel?: string;
18
+ initialDate?: PickedDate;
19
+ minYear?: number;
20
+ maxYear?: number;
21
+ }
22
+ export declare function DatePickerSheet({ isOpen, onClose, avatarUrl, heading, monthLabels, confirmLabel, onConfirm, timezoneLabel, initialDate, minYear, maxYear, }: DatePickerSheetProps): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export interface WheelColumnProps {
3
+ options: string[];
4
+ selectedIndex: number;
5
+ onChange: (index: number) => void;
6
+ }
7
+ export declare function WheelColumn({ options, selectedIndex, onChange }: WheelColumnProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { DatePickerSheet } from './DatePickerSheet';
2
+ export type { DatePickerSheetProps, PickedDate } from './DatePickerSheet';
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ export interface IconBadgeProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /** Icon (or any node) rendered centered inside the badge. Ignored when avatarUrl is set. */
4
+ icon?: React.ReactNode;
5
+ /** Photo/illustration to render instead of an icon, e.g. a family member avatar. */
6
+ avatarUrl?: string;
7
+ alt?: string;
8
+ /** Badge diameter. Defaults to 'md'. */
9
+ size?: 'sm' | 'md' | 'lg';
10
+ }
11
+ /**
12
+ * Round badge used as the leading visual on selector rows/cards: either a
13
+ * tinted circle holding an icon, or a photo/illustration avatar.
14
+ */
15
+ export declare const IconBadge: React.ForwardRefExoticComponent<IconBadgeProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { IconBadge } from './IconBadge';
2
+ export type { IconBadgeProps } from './IconBadge';
@@ -0,0 +1,73 @@
1
+ import { default as React } from 'react';
2
+ import { SelectorCardProps, SelectorCardNoteProps, SelectorCardPriceBadgeProps } from '../SelectorCard';
3
+ import { TrustBadgesBarProps } from '../TrustBadgesBar';
4
+ import { CheckoutBarProps } from '../CheckoutBar';
5
+ export interface PackageSelectOption extends Omit<SelectorCardProps, 'id' | 'selected' | 'onSelect' | 'badge' | 'children'> {
6
+ /** Unique id for this option, passed back via `onChange`. */
7
+ id: string | number;
8
+ /** Price label, e.g. "+₹400" or "₹0". Ignored when `badge` is set directly. */
9
+ price?: React.ReactNode;
10
+ /**
11
+ * Renders `price` as muted plain text (e.g. "₹0") instead of the green
12
+ * pill badge — use this for the included/base option that costs nothing
13
+ * extra.
14
+ */
15
+ free?: boolean;
16
+ /** Full override for the trailing badge slot — takes precedence over `price`/`free`/`priceBadgeProps`. */
17
+ badge?: React.ReactNode;
18
+ /** Extra props forwarded to the price badge (`SelectorCardPriceBadge`, or the plain muted `<span>` when `free`). */
19
+ priceBadgeProps?: Omit<SelectorCardPriceBadgeProps, 'value'>;
20
+ /** Highlighted strip rendered under this option only while it's selected, e.g. "Rituals will be performed on behalf of 2 family members". Ignored when `children` is set directly. */
21
+ note?: React.ReactNode;
22
+ /** Extra props forwarded to the `SelectorCardNote` wrapping `note`. */
23
+ noteProps?: Omit<SelectorCardNoteProps, 'children'>;
24
+ /** Full override for the card's children slot — takes precedence over `note`/`noteProps`. */
25
+ children?: React.ReactNode;
26
+ }
27
+ 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. */
31
+ description?: React.ReactNode;
32
+ /** Checklist of what's included with this package, each rendered with a green checkmark. */
33
+ benefits?: React.ReactNode[];
34
+ /** The selectable package options, rendered as a `SelectorCard` radio group. */
35
+ options: PackageSelectOption[];
36
+ /** Currently selected option's `id`. */
37
+ value: PackageSelectOption['id'];
38
+ /** Called with the newly selected option's `id`. */
39
+ onChange: (id: PackageSelectOption['id']) => void;
40
+ /** Style of the selected indicator on each option. Defaults to `'dot'`; override per-option via the option's own `radioVariant`. */
41
+ radioVariant?: 'dot' | 'check';
42
+ /** Accessible label for the options radiogroup. Defaults to `title` when it's a plain string. */
43
+ radiogroupLabel?: string;
44
+ className?: string;
45
+ headerClassName?: string;
46
+ benefitsClassName?: string;
47
+ 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. */
49
+ trustBadges?: TrustBadgesBarProps;
50
+ /** Bottom amount + Proceed CTA bar. All `CheckoutBarProps` are available (amount, subtitle, onProceed, proceedButtonProps, ...). Omit to hide the whole footer. */
51
+ checkout?: CheckoutBarProps;
52
+ /** Wraps `trustBadges` + `checkout` together. Set to `false` to render them inline instead of `sticky bottom-0`. Defaults to `true`. */
53
+ stickyFooter?: boolean;
54
+ footerClassName?: string;
55
+ }
56
+ /**
57
+ * Complete "choose a package" screen used across Pitru Paksha flows: a
58
+ * heading + description, an optional benefits checklist, a group of
59
+ * selectable `SelectorCard` options (with price badges and a reveal-on-select
60
+ * note), and an optional bottom footer (`TrustBadgesBar` + `CheckoutBar`)
61
+ * with the final amount and a "Proceed" CTA.
62
+ *
63
+ * Built entirely from `SelectorCard` + friends, so it's a drop-in composed
64
+ * screen you can import into any app that already depends on
65
+ * `pitru-paksh-common`, without having to hand-assemble the header/benefits/
66
+ * options/footer yourself each time. Every `SelectorCard` prop (icon, avatar,
67
+ * tag, disabled, showRadio, className, native button attributes, ...) is
68
+ * available directly on each `PackageSelectOption` and forwarded as-is, and
69
+ * `trustBadges`/`checkout` forward every `TrustBadgesBarProps`/
70
+ * `CheckoutBarProps` respectively, so nothing the underlying pieces support
71
+ * is locked away by this wrapper.
72
+ */
73
+ export declare const PackageSelect: React.FC<PackageSelectProps>;
@@ -0,0 +1,2 @@
1
+ export { PackageSelect } from './PackageSelect';
2
+ export type { PackageSelectProps, PackageSelectOption } from './PackageSelect';
@@ -0,0 +1,16 @@
1
+ import { Country } from '../../../../common/dist/common.js';
2
+ export interface PhoneNumberSheetProps {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ heading: string;
6
+ subtext?: string;
7
+ confirmLabel: string;
8
+ onConfirm: (phoneNumber: string, country: Country) => void;
9
+ /** Pre-fills the field, e.g. with a value already saved elsewhere. */
10
+ initialValue?: string;
11
+ /** Defaults to `DEFAULT_COUNTRIES`. */
12
+ countries?: Country[];
13
+ /** ISO alpha-2 of the pre-selected country. Defaults to India. */
14
+ initialCountryIso?: string;
15
+ }
16
+ export declare function PhoneNumberSheet({ isOpen, onClose, heading, subtext, confirmLabel, onConfirm, initialValue, countries, initialCountryIso, }: PhoneNumberSheetProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { PhoneNumberSheet } from './PhoneNumberSheet';
2
+ export type { PhoneNumberSheetProps } from './PhoneNumberSheet';
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ export interface QuantityStepperProps {
3
+ /** Current quantity. */
4
+ value: number;
5
+ /** Called when + is pressed (also fires from the zero-state "Add" button). */
6
+ onIncrement: () => void;
7
+ /** Called when - is pressed. Not called while at `min`. */
8
+ onDecrement: () => void;
9
+ /** Floor for the count; at/below this the control collapses to an "Add" button. Defaults to 0. */
10
+ min?: number;
11
+ /** Optional ceiling; disables + once reached. */
12
+ max?: number;
13
+ /** Label shown on the zero-state button. Defaults to "Add". */
14
+ addLabel?: React.ReactNode;
15
+ className?: string;
16
+ }
17
+ /**
18
+ * Add-to-cart quantity control: renders a filled "+ Add" button while
19
+ * `value <= min` (typically 0), and swaps to a "- value +" pill once a
20
+ * quantity has been picked. Used as the `action` for `ServiceOfferCard`,
21
+ * but generic enough for any add-with-quantity flow.
22
+ */
23
+ export declare const QuantityStepper: React.FC<QuantityStepperProps>;
@@ -0,0 +1,2 @@
1
+ export { QuantityStepper } from './QuantityStepper';
2
+ export type { QuantityStepperProps } from './QuantityStepper';
@@ -0,0 +1,85 @@
1
+ import { default as React } from 'react';
2
+ export interface SelectorCardProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onSelect' | 'title'> {
3
+ /** Whether this card is the chosen option within its selector group. */
4
+ selected?: boolean;
5
+ /** Called when the user picks this card (click, Enter or Space). */
6
+ onSelect?: () => void;
7
+ /** Leading icon, rendered inside a tinted circular badge. Ignored when avatarUrl is set. */
8
+ icon?: React.ReactNode;
9
+ /** Leading photo/illustration (e.g. a family member avatar) instead of an icon badge. */
10
+ avatarUrl?: string;
11
+ /** Size of the leading icon/avatar badge. Defaults to 'md'. */
12
+ iconSize?: 'sm' | 'md' | 'lg';
13
+ /** Extra classes for the icon/avatar badge, e.g. `iconClassName="size-10"` for a one-off 40x40 badge. Overrides `iconSize`. */
14
+ iconClassName?: string;
15
+ /** Main label. */
16
+ title: React.ReactNode;
17
+ /** Secondary helper text shown under the title (hidden once `children` is provided, unless you render both yourself via `description`). Wraps onto multiple lines. */
18
+ description?: React.ReactNode;
19
+ /** Trailing pill/value, e.g. a price delta like "+₹400". */
20
+ badge?: React.ReactNode;
21
+ /** Hide the radio indicator, e.g. for single, non-grouped confirmations. Defaults to visible. */
22
+ showRadio?: boolean;
23
+ /** Style of the selected indicator: a filled dot (default) or a filled circle with a checkmark. */
24
+ radioVariant?: 'dot' | 'check';
25
+ /** Extra classes for the filled selected indicator (dot or check circle), e.g. to change its color. */
26
+ radioClassName?: string;
27
+ /**
28
+ * Corner ribbon rendered above the top-left edge of the card, e.g.
29
+ * "Recommended" or "As per Scriptures". Accepts any React node — a plain
30
+ * string renders inside the default pill container, or pass your own
31
+ * element (e.g. an icon + label) for a fully custom ribbon. Use
32
+ * `tagClassName` to restyle the pill container (color, shape, etc.).
33
+ */
34
+ tag?: React.ReactNode;
35
+ /** Extra classes for the corner ribbon, e.g. to change its color/theme. */
36
+ tagClassName?: string;
37
+ /**
38
+ * Extra content rendered below the header row: an editable value, an info
39
+ * row, a highlighted note, or any custom node. Typically shown only while
40
+ * `selected` is true, but that's left to the caller so both "always
41
+ * visible" and "reveal on select" patterns are supported.
42
+ */
43
+ children?: React.ReactNode;
44
+ }
45
+ /**
46
+ * A selectable option row/card used across Pitru Paksha flows: an icon or
47
+ * avatar, a title + optional description, an optional trailing badge, and a
48
+ * radio indicator. Supports an optional content area below the header for
49
+ * editable values, info rows or highlighted notes (see `SelectorCardEditableField`,
50
+ * `SelectorCardInfoRow` and `SelectorCardNote`), as well as an optional corner
51
+ * ribbon (`tag`) for "Recommended"/"As per Scriptures"-style callouts.
52
+ */
53
+ export declare const SelectorCard: React.ForwardRefExoticComponent<SelectorCardProps & React.RefAttributes<HTMLButtonElement>>;
54
+ export interface SelectorCardEditableFieldProps extends React.HTMLAttributes<HTMLDivElement> {
55
+ value: React.ReactNode;
56
+ onClick?: () => void;
57
+ }
58
+ /**
59
+ * Pencil-prefixed value row used below a `SelectorCard` to show/edit the
60
+ * chosen value, e.g. a picked date or tithi.
61
+ */
62
+ export declare const SelectorCardEditableField: React.FC<SelectorCardEditableFieldProps>;
63
+ export interface SelectorCardInfoRowProps extends React.HTMLAttributes<HTMLDivElement> {
64
+ value: React.ReactNode;
65
+ onInfoClick?: () => void;
66
+ infoLabel?: string;
67
+ }
68
+ /**
69
+ * Value row with a trailing info icon, e.g. showing which tithi rituals will
70
+ * default to, with an (i) affordance to explain why.
71
+ */
72
+ export declare const SelectorCardInfoRow: React.FC<SelectorCardInfoRowProps>;
73
+ export interface SelectorCardPriceBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
74
+ /** Pre-formatted price delta, e.g. "+₹400" or "₹0". */
75
+ value: React.ReactNode;
76
+ }
77
+ /** Rounded price/value pill used as a `SelectorCard` `badge`, e.g. "+₹400". */
78
+ export declare const SelectorCardPriceBadge: React.FC<SelectorCardPriceBadgeProps>;
79
+ export interface SelectorCardNoteProps extends React.HTMLAttributes<HTMLDivElement> {
80
+ }
81
+ /**
82
+ * Full-bleed highlighted banner rendered at the bottom of a selected
83
+ * `SelectorCard`, e.g. "Rituals will be performed on behalf of two family members".
84
+ */
85
+ export declare const SelectorCardNote: React.FC<SelectorCardNoteProps>;
@@ -0,0 +1,2 @@
1
+ export { SelectorCard, SelectorCardEditableField, SelectorCardInfoRow, SelectorCardNote, SelectorCardPriceBadge } from './SelectorCard';
2
+ export type { SelectorCardProps, SelectorCardEditableFieldProps, SelectorCardInfoRowProps, SelectorCardNoteProps, SelectorCardPriceBadgeProps, } from './SelectorCard';
@@ -0,0 +1,33 @@
1
+ import { default as React } from 'react';
2
+ export interface ServiceOfferCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
3
+ /** Illustration/photo shown top-right, e.g. the ritual/service photo. */
4
+ image: string;
5
+ imageAlt?: string;
6
+ /** Service name, e.g. "Offer tarpan donation for the peace of your ancestors". */
7
+ title: React.ReactNode;
8
+ /** Helper copy under the title, typically ending in a "...and see"/"Read more" affordance you compose yourself. */
9
+ description?: React.ReactNode;
10
+ /** Current price, e.g. "₹199". */
11
+ price: React.ReactNode;
12
+ /** Original price shown struck-through before `price`, e.g. "₹250". */
13
+ originalPrice?: React.ReactNode;
14
+ /**
15
+ * Flush corner banner rendered above the content, e.g. "Contribute to cow
16
+ * service". Accepts any React node — pass an icon + label for a custom
17
+ * banner. Use `tagClassName` to change its color/theme.
18
+ */
19
+ tag?: React.ReactNode;
20
+ tagClassName?: string;
21
+ /**
22
+ * Control anchored over the bottom edge of the image — typically a
23
+ * `QuantityStepper`, but accepts any node so a plain CTA button works too.
24
+ */
25
+ action?: React.ReactNode;
26
+ }
27
+ /**
28
+ * Upsell/add-on card used on "review your booking" screens: an image with a
29
+ * floating quantity control, title + description, and a price (with
30
+ * optional struck-through original), plus an optional flush corner banner
31
+ * (`tag`) like "Contribute to cow service".
32
+ */
33
+ export declare const ServiceOfferCard: React.FC<ServiceOfferCardProps>;
@@ -0,0 +1,2 @@
1
+ export { ServiceOfferCard } from './ServiceOfferCard';
2
+ export type { ServiceOfferCardProps } from './ServiceOfferCard';
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ export interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'prefix'> {
3
+ label?: string;
4
+ value: string;
5
+ onChange: (value: string) => void;
6
+ /** Fixed, non-editable text shown before the value, e.g. "Late". */
7
+ prefix?: string;
8
+ /** Shows a live `value.length` counter below the field; appends `/maxLength` when that's set too. */
9
+ showCharCount?: boolean;
10
+ /** Overrides the char-count helper text, e.g. for an error message. */
11
+ supportingText?: string;
12
+ error?: boolean;
13
+ containerClassName?: string;
14
+ /** Overrides the bordered input box itself, e.g. to match a fixed height elsewhere in a design. */
15
+ wrapperClassName?: string;
16
+ }
17
+ export declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,2 @@
1
+ export { TextField } from './TextField';
2
+ export type { TextFieldProps } from './TextField';
@@ -0,0 +1,12 @@
1
+ export interface TithiPickerSheetProps {
2
+ isOpen: boolean;
3
+ onClose: () => void;
4
+ avatarUrl: string;
5
+ heading: string;
6
+ tithis: string[];
7
+ confirmLabel: string;
8
+ onConfirm: (tithi: string) => void;
9
+ /** Pre-selects a tithi when the sheet opens, e.g. to edit a previous choice. */
10
+ initialTithi?: string;
11
+ }
12
+ export declare function TithiPickerSheet({ isOpen, onClose, avatarUrl, heading, tithis, confirmLabel, onConfirm, initialTithi, }: TithiPickerSheetProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { TithiPickerSheet } from './TithiPickerSheet';
2
+ export type { TithiPickerSheetProps } from './TithiPickerSheet';