@srimandir/pitru-paksh-common 2.11.1 → 2.12.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.
@@ -25,12 +25,6 @@ export interface CheckoutBarProps extends React.HTMLAttributes<HTMLDivElement> {
25
25
  /** Extra props forwarded to the underlying `Button` (variant, size, disabled, loading, ...). */
26
26
  proceedButtonProps?: Omit<ButtonProps, 'children' | 'onClick'>;
27
27
  buttonWrapperClassName?: string;
28
- /**
29
- * Shrinks the amount/subtitle block to its content width and grows the
30
- * Proceed button to fill the rest of the row instead of the default
31
- * (amount block flexes, button sized to its label). Defaults to `false`.
32
- */
33
- growProceedButton?: boolean;
34
28
  }
35
29
  /**
36
30
  * Sticky-friendly checkout bar shown at the bottom of a package-selection or
@@ -7,7 +7,8 @@ export interface PickedDate {
7
7
  export interface DatePickerSheetProps {
8
8
  isOpen: boolean;
9
9
  onClose: () => void;
10
- avatarUrl: string;
10
+ /** Shows a small circular avatar next to `heading`, e.g. to identify which ancestor's date this is. Omit for a plain heading. */
11
+ avatarUrl?: string;
11
12
  heading: string;
12
13
  /** 12 translated month names, January first. */
13
14
  monthLabels: string[];
@@ -0,0 +1,20 @@
1
+ export interface PickedTime {
2
+ /** 24-hour, 0-23 */
3
+ hour: number;
4
+ minute: number;
5
+ }
6
+ export interface TimeOfBirthPickerSheetProps {
7
+ isOpen: boolean;
8
+ onClose: () => void;
9
+ /** Shows a small circular avatar next to `heading`. Omit for a plain heading. */
10
+ avatarUrl?: string;
11
+ heading: string;
12
+ confirmLabel: string;
13
+ onConfirm: (time: PickedTime) => void;
14
+ /** Shown next to the CTA, e.g. "Timezone: IST". Omit to hide. */
15
+ timezoneLabel?: string;
16
+ initialTime?: PickedTime;
17
+ amLabel?: string;
18
+ pmLabel?: string;
19
+ }
20
+ export declare function TimeOfBirthPickerSheet({ isOpen, onClose, avatarUrl, heading, confirmLabel, onConfirm, timezoneLabel, initialTime, amLabel, pmLabel, }: TimeOfBirthPickerSheetProps): import("react").JSX.Element;
@@ -1,2 +1,4 @@
1
1
  export { DatePickerSheet } from './DatePickerSheet';
2
2
  export type { DatePickerSheetProps, PickedDate } from './DatePickerSheet';
3
+ export { TimeOfBirthPickerSheet } from './TimeOfBirthPickerSheet';
4
+ export type { TimeOfBirthPickerSheetProps, PickedTime } from './TimeOfBirthPickerSheet';
@@ -1,9 +1,9 @@
1
1
  import { default as React } from 'react';
2
- import { SelectorCardProps, SelectorCardPriceBadgeProps } from '../SelectorCard';
2
+ import { SelectorCardProps, SelectorCardNoteProps, SelectorCardPriceBadgeProps } from '../SelectorCard';
3
3
  import { TrustBadgesBarProps } from '../TrustBadgesBar';
4
4
  import { CheckoutBarProps } from '../CheckoutBar';
5
5
  import { PackageSelectLocale } from './PackageSelect.translations';
6
- export interface PackageSelectOption extends Omit<SelectorCardProps, 'id' | 'selected' | 'onSelect' | 'badge' | 'children' | 'note'> {
6
+ export interface PackageSelectOption extends Omit<SelectorCardProps, 'id' | 'selected' | 'onSelect' | 'badge' | 'children'> {
7
7
  /** Unique id for this option, passed back via `onChange`. */
8
8
  id: string | number;
9
9
  /** Price label, e.g. "+₹400" or "₹0". Ignored when `badge` is set directly. */
@@ -18,15 +18,11 @@ export interface PackageSelectOption extends Omit<SelectorCardProps, 'id' | 'sel
18
18
  badge?: React.ReactNode;
19
19
  /** Extra props forwarded to the price badge (`SelectorCardPriceBadge`, or the plain muted `<span>` when `free`). */
20
20
  priceBadgeProps?: Omit<SelectorCardPriceBadgeProps, 'value'>;
21
- /**
22
- * Explainer note shown only while this option is selected, e.g. "Rituals
23
- * will be performed on behalf of 2 family members" — rendered via
24
- * `SelectorCard`'s own `note` prop, as its own surface behind the card
25
- * (same treatment `DeathTithi`'s "don't know the tithi" option uses),
26
- * not nested inside it. Ignored when `children` is set directly.
27
- */
21
+ /** 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. */
28
22
  note?: React.ReactNode;
29
- /** Full override for the card's children slot — takes precedence over `note`. */
23
+ /** Extra props forwarded to the `SelectorCardNote` wrapping `note`. */
24
+ noteProps?: Omit<SelectorCardNoteProps, 'children'>;
25
+ /** Full override for the card's children slot — takes precedence over `note`/`noteProps`. */
30
26
  children?: React.ReactNode;
31
27
  }
32
28
  export interface PackageSelectProps {
@@ -42,10 +42,10 @@ export interface SelectorCardProps extends Omit<React.ButtonHTMLAttributes<HTMLB
42
42
  */
43
43
  children?: React.ReactNode;
44
44
  /**
45
- * An explainer note rendered flush below the card, both wrapped in a shared
46
- * lavender wash surface (instead of nested inside the card's own border like
47
- * `children`). Typically shown only while `selected` is true; that's left to
48
- * the caller.
45
+ * An explainer note rendered as its own surface *behind* the card, instead of
46
+ * nested inside it like `children` — pulled up behind the card via negative
47
+ * margin so the card's higher stacking order covers the seam between them.
48
+ * Typically shown only while `selected` is true; that's left to the caller.
49
49
  */
50
50
  note?: React.ReactNode;
51
51
  /** Extra classes for the `note` surface, e.g. to change its text color. */
package/dist/index.d.ts CHANGED
@@ -79,6 +79,8 @@ export { PhoneNumberSheet } from './components/PhoneNumberSheet';
79
79
  export type { PhoneNumberSheetProps } from './components/PhoneNumberSheet';
80
80
  export { EmailSheet } from './components/EmailSheet';
81
81
  export type { EmailSheetProps } from './components/EmailSheet';
82
+ export { TimeOfBirthPickerSheet } from './components/DatePickerSheet';
83
+ export type { TimeOfBirthPickerSheetProps, PickedTime } from './components/DatePickerSheet';
82
84
  export { L2Card } from './components/L2Card';
83
85
  export type { L2CardProps, L2CardImageProps } from './components/L2Card';
84
86
  export { OutcomeButton, PlusIcon, CheckIcon } from './components/OutcomeButton';