@srimandir/pitru-paksh-common 2.44.0 → 2.45.10

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.
@@ -13,6 +13,7 @@ export interface BillDetailsRow {
13
13
  note?: React.ReactNode;
14
14
  /** Struck-through value shown before the final value, e.g. "₹851". */
15
15
  originalValue?: React.ReactNode;
16
+ originalValueClassName?: string;
16
17
  /** Final value, e.g. "₹200.0/-" or "FREE". Style it (e.g. green for FREE) via `valueClassName`. */
17
18
  value: React.ReactNode;
18
19
  valueClassName?: string;
@@ -24,6 +25,8 @@ export interface BillDetailsProps extends Omit<React.HTMLAttributes<HTMLDivEleme
24
25
  */
25
26
  locale?: BillDetailsLocale;
26
27
  titleClassName?: string;
28
+ /** Set to `false` when a containing sheet provides its own header. */
29
+ showTitle?: boolean;
27
30
  rows: BillDetailsRow[];
28
31
  rowClassName?: string;
29
32
  /** Set to `false` to hide the accent bar before the title. */
@@ -37,6 +40,8 @@ export interface BillDetailsProps extends Omit<React.HTMLAttributes<HTMLDivEleme
37
40
  * from INR to USD. Defaults to `false` (India pricing).
38
41
  */
39
42
  isGlobalUser?: boolean;
43
+ /** Set to `false` when the caller already supplies waived-fee rows. */
44
+ showDefaultWaivedFees?: boolean;
40
45
  }
41
46
  /**
42
47
  * Itemized price breakdown used at the bottom of a cart/review screen:
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { BillDetailsRow } from './BillDetails';
3
+ import { BillDetailsLocale } from './BillDetails.translations';
4
+ export interface BillDetailsSheetProps {
5
+ isOpen: boolean;
6
+ onClose: () => void;
7
+ locale?: BillDetailsLocale;
8
+ title?: React.ReactNode;
9
+ itemCountLabel?: React.ReactNode;
10
+ closeButtonAriaLabel?: string;
11
+ rows: BillDetailsRow[];
12
+ totalValue: React.ReactNode;
13
+ isGlobalUser?: boolean;
14
+ showDefaultWaivedFees?: boolean;
15
+ }
16
+ export declare function BillDetailsSheet({ isOpen, onClose, locale, title, itemCountLabel, closeButtonAriaLabel, rows, totalValue, isGlobalUser, showDefaultWaivedFees, }: BillDetailsSheetProps): React.JSX.Element;
@@ -1,2 +1,4 @@
1
1
  export { BillDetails } from './BillDetails';
2
2
  export type { BillDetailsProps, BillDetailsRow } from './BillDetails';
3
+ export { BillDetailsSheet } from './BillDetailsSheet';
4
+ export type { BillDetailsSheetProps } from './BillDetailsSheet';
@@ -3,7 +3,7 @@ export interface PujaDetailsCarouselHeaderProps {
3
3
  useCase?: string;
4
4
  title: string;
5
5
  specificity?: string;
6
- dateLabel: string;
7
- locationLabel: string;
6
+ dateLabel?: string;
7
+ locationLabel?: string;
8
8
  }
9
9
  export declare function PujaDetailsCarouselHeader({ images, useCase, title, specificity, dateLabel, locationLabel, }: PujaDetailsCarouselHeaderProps): import("react").JSX.Element;
@@ -1,6 +1,20 @@
1
1
  /** Max length enforced on every free-text name field (Karta, ancestor, Gotra). */
2
2
  export declare const MAX_NAME_LENGTH = 40;
3
+ /** Min length (after trimming) required of a non-empty Karta/ancestor name. */
4
+ export declare const MIN_NAME_LENGTH = 3;
3
5
  /** This form only ever collects an Indian mobile number — there's no country selector. */
4
6
  export declare const INDIA_COUNTRY_CODE = "+91";
5
7
  /** Basic email shape check used for the `isGlobal` email field's error state. */
6
8
  export declare const EMAIL_PATTERN: RegExp;
9
+ /**
10
+ * Letters (any script — this form's names aren't Latin-only, see the `te`/`kn`
11
+ * locales) and spaces only — no digits or punctuation. Used to live-strip a
12
+ * Karta/ancestor name field as it's typed, the same way the WhatsApp field
13
+ * already strips non-digits on every keystroke, rather than accepting bad
14
+ * input and only flagging it after the fact.
15
+ */
16
+ export declare const NAME_DISALLOWED_CHARACTERS_PATTERN: RegExp;
17
+ /** Strips anything `NAME_DISALLOWED_CHARACTERS_PATTERN` matches, e.g. for a Karta/ancestor name's `onChange`. */
18
+ export declare const sanitizeNameInput: (value: string) => string;
19
+ /** A non-empty Karta/ancestor name field is only valid once it clears `MIN_NAME_LENGTH` after trimming. */
20
+ export declare const isNameLongEnough: (value: string) => boolean;
@@ -7,7 +7,7 @@
7
7
  * `PujaDetailsFormProps` explicitly to override a piece of it for a one-off
8
8
  * usage.
9
9
  */
10
- export type PujaDetailsFormLocale = 'en' | 'hi' | 'te' | 'kn';
10
+ export type PujaDetailsFormLocale = 'en' | 'hi' | 'te' | 'kn' | 'ta';
11
11
  export interface PujaDetailsFormDefaultCopy {
12
12
  topBarTitle: string;
13
13
  backButtonAriaLabel: string;
@@ -23,6 +23,10 @@ export interface PujaDetailsFormDefaultCopy {
23
23
  /** e.g. "(optional)" — appended after `kartaNameLabel` for every Karta name field after the first (which is always required). */
24
24
  kartaNameOptionalSuffix: string;
25
25
  kartaNamePlaceholder: string;
26
+ /** Shown under a Karta/ancestor name field once it's been typed into but is still under `MIN_NAME_LENGTH`, e.g. "Name must be at least 3 characters". */
27
+ nameMinLengthError: string;
28
+ /** Shown under an ancestor name field once it's been left empty (blurred without typing anything), e.g. "Please enter your ancestor's name to proceed". */
29
+ ancestorNameRequiredError: string;
26
30
  gotraFieldLabel: string;
27
31
  gotraFieldPlaceholder: string;
28
32
  gotraUnknownCheckboxLabel: string;
@@ -4,6 +4,8 @@ export interface ServiceOfferCardProps extends Omit<React.HTMLAttributes<HTMLDiv
4
4
  /** Illustration/photo shown top-right, e.g. the ritual/service photo. */
5
5
  image: string;
6
6
  imageAlt?: string;
7
+ /** Optional landscape artwork used only in the expanded details sheet. */
8
+ sheetImage?: string;
7
9
  /** Service name, e.g. "Offer tarpan donation for the peace of your ancestors". */
8
10
  title: React.ReactNode;
9
11
  /**
@@ -5,9 +5,20 @@ export interface VideoPlayerProps {
5
5
  poster: string;
6
6
  className?: string;
7
7
  rounded?: boolean;
8
+ /** Keeps direct videos inline and suppresses fullscreen, PiP, and casting. */
9
+ inlineOnly?: boolean;
8
10
  /** Enforced on both the outer container and the video/poster itself. */
9
11
  width?: string | number;
10
12
  height?: string | number;
13
+ /**
14
+ * Locks the container to this CSS `aspect-ratio` (e.g. `"16/9"`) instead of
15
+ * a fixed pixel `height` — height then scales with whatever width the
16
+ * container ends up at (its own `className`/parent, not a `width` prop),
17
+ * so the full frame stays visible with no cropping on any device, and the
18
+ * box's space is reserved immediately rather than jumping once the video's
19
+ * metadata loads. Ignored when `width`/`height` are set.
20
+ */
21
+ aspectRatio?: string;
11
22
  /**
12
23
  * Crops the video/poster to cover its container instead of sizing off its
13
24
  * own intrinsic aspect ratio, centered on both axes — for callers that size
package/dist/index.d.ts CHANGED
@@ -67,8 +67,8 @@ export { BookingSummaryBanner } from './components/BookingSummaryBanner';
67
67
  export type { BookingSummaryBannerProps, BookingSummaryBannerStats, } from './components/BookingSummaryBanner';
68
68
  export { BOOKING_SUMMARY_BANNER_DEFAULT_COPY, getBookingSummaryBannerDefaultCopy, } from './components/BookingSummaryBanner';
69
69
  export type { BookingSummaryBannerLocale, BookingSummaryBannerDefaultCopy, } from './components/BookingSummaryBanner';
70
- export { BillDetails } from './components/BillDetails';
71
- export type { BillDetailsProps, BillDetailsRow, } from './components/BillDetails';
70
+ export { BillDetails, BillDetailsSheet } from './components/BillDetails';
71
+ export type { BillDetailsProps, BillDetailsRow, BillDetailsSheetProps, } from './components/BillDetails';
72
72
  export { CartView } from './components/CartView';
73
73
  export type { CartViewProps, CartViewAddon, CartViewItem, CartViewLocale, } from './components/CartView';
74
74
  export { TextField } from './components/TextField';
@@ -67,8 +67,8 @@ export { BookingSummaryBanner } from './components/BookingSummaryBanner';
67
67
  export type { BookingSummaryBannerProps, BookingSummaryBannerStats, } from './components/BookingSummaryBanner';
68
68
  export { BOOKING_SUMMARY_BANNER_DEFAULT_COPY, getBookingSummaryBannerDefaultCopy, } from './components/BookingSummaryBanner';
69
69
  export type { BookingSummaryBannerLocale, BookingSummaryBannerDefaultCopy, } from './components/BookingSummaryBanner';
70
- export { BillDetails } from './components/BillDetails';
71
- export type { BillDetailsProps, BillDetailsRow, } from './components/BillDetails';
70
+ export { BillDetails, BillDetailsSheet } from './components/BillDetails';
71
+ export type { BillDetailsProps, BillDetailsRow, BillDetailsSheetProps, } from './components/BillDetails';
72
72
  export { CartView } from './components/CartView';
73
73
  export type { CartViewProps, CartViewAddon, CartViewItem, CartViewLocale, } from './components/CartView';
74
74
  export { TextField } from './components/TextField';