@srimandir/pitru-paksh-common 1.0.6 → 1.0.7
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.
- package/dist/components/L2Card/L2Card.d.ts +54 -0
- package/dist/components/L2Card/index.d.ts +2 -0
- package/dist/components/OutcomeButton/OutcomeButton.d.ts +10 -0
- package/dist/components/OutcomeButton/icons.d.ts +5 -0
- package/dist/components/OutcomeButton/index.d.ts +4 -0
- package/dist/components/OutcomeSummary/OutcomeSummary.d.ts +19 -0
- package/dist/components/OutcomeSummary/OutcomeTrustIcon.d.ts +5 -0
- package/dist/components/OutcomeSummary/index.d.ts +3 -0
- package/dist/index.d.ts +6 -0
- package/dist/pitru-paksh-common.js +991 -691
- package/dist/pitru-paksh-common.umd.cjs +8 -8
- package/dist/style.css +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** Minimal image component props for optional optimized image (e.g. next/image). */
|
|
3
|
+
export interface L2CardImageProps {
|
|
4
|
+
src: string;
|
|
5
|
+
alt: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface L2CardProps {
|
|
9
|
+
/** Numbered index shown in the chip, e.g. "01" */
|
|
10
|
+
chipNumber: string;
|
|
11
|
+
/** Rich chip label, e.g. "for Grandmother (Maternal) • Grandfather (Maternal) • Father" */
|
|
12
|
+
chipLabel: ReactNode;
|
|
13
|
+
/** Whether this ritual has been added — always expanded when true, and hides the collapse chevron */
|
|
14
|
+
isAdded: boolean;
|
|
15
|
+
/** Pencil icon in the header, always shown — opens ancestor editing */
|
|
16
|
+
onEditClick?: () => void;
|
|
17
|
+
editButtonAriaLabel?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Chevron icon in the header, shown only while `isAdded` is false. Clicking it toggles the card's
|
|
20
|
+
* own expanded/collapsed display so a not-yet-added ritual can still be previewed. This callback
|
|
21
|
+
* fires alongside that toggle — use it for tracking, not for controlling visibility.
|
|
22
|
+
*/
|
|
23
|
+
onExpandClick?: () => void;
|
|
24
|
+
expandButtonAriaLabel?: string;
|
|
25
|
+
/** Only rendered while expanded (added, or manually expanded via the chevron) */
|
|
26
|
+
imageUrl?: string;
|
|
27
|
+
imageAlt?: string;
|
|
28
|
+
/** Optional image component for optimization (e.g. next/image adapter) */
|
|
29
|
+
imageComponent?: React.ComponentType<L2CardImageProps>;
|
|
30
|
+
/** e.g. "4.9 ★ Puja Seva Rating" — only rendered while expanded */
|
|
31
|
+
ratingLabel?: string;
|
|
32
|
+
/** e.g. "2k people booked" — only rendered while expanded */
|
|
33
|
+
bookedLabel?: string;
|
|
34
|
+
title: string;
|
|
35
|
+
/** Only rendered while expanded */
|
|
36
|
+
description?: string;
|
|
37
|
+
/** Only rendered while expanded */
|
|
38
|
+
learnMoreLabel?: string;
|
|
39
|
+
onLearnMoreClick?: () => void;
|
|
40
|
+
learnMoreHref?: string;
|
|
41
|
+
/** e.g. "06/10/26 (Ekadashi), 08/10/26 (Trayodashi)" — only rendered while expanded */
|
|
42
|
+
dateLabel?: string;
|
|
43
|
+
/** e.g. "Koti Tirtha (Gokarna)" — only rendered while expanded */
|
|
44
|
+
locationLabel?: string;
|
|
45
|
+
/** e.g. "Puja Amount" */
|
|
46
|
+
priceInfoLabel?: string;
|
|
47
|
+
onPriceInfoClick?: () => void;
|
|
48
|
+
/** e.g. "₹200" */
|
|
49
|
+
price: string;
|
|
50
|
+
/** Right-aligned action slot in the price row — pass the host app's own Button */
|
|
51
|
+
cta: ReactNode;
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
export declare function L2Card({ chipNumber, chipLabel, isAdded, onEditClick, editButtonAriaLabel, onExpandClick, expandButtonAriaLabel, imageUrl, imageAlt, imageComponent: ImageComponent, ratingLabel, bookedLabel, title, description, learnMoreLabel, onLearnMoreClick, learnMoreHref, dateLabel, locationLabel, priceInfoLabel, onPriceInfoClick, price, cta, className, }: L2CardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type OutcomeButtonVariant = 'primary' | 'secondary' | 'accent';
|
|
3
|
+
export type OutcomeButtonSize = 'md' | 'lg';
|
|
4
|
+
export interface OutcomeButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
5
|
+
variant?: OutcomeButtonVariant;
|
|
6
|
+
size?: OutcomeButtonSize;
|
|
7
|
+
leftIcon?: ReactNode;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function OutcomeButton({ variant, size, leftIcon, children, className, style, type, ...rest }: OutcomeButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OutcomeTrustIconVariant } from './OutcomeTrustIcon';
|
|
2
|
+
export interface OutcomeTrustItem {
|
|
3
|
+
variant: OutcomeTrustIconVariant;
|
|
4
|
+
/** Resolved, already-translated label, e.g. "Puja will be done by Verified Pandits" */
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
export interface OutcomeSummaryProps {
|
|
8
|
+
/** e.g. "Pitru Paksha Special" — already translated; rendered between ✦ marks */
|
|
9
|
+
badgeLabel: string;
|
|
10
|
+
/** e.g. "According to Vedic rules, " */
|
|
11
|
+
headingPrefix: string;
|
|
12
|
+
ritualCount: number;
|
|
13
|
+
/** e.g. "ritual is" / "rituals are" — already resolved for the given ritualCount */
|
|
14
|
+
ritualCountLabel: string;
|
|
15
|
+
/** e.g. "recommended for your ancestors" */
|
|
16
|
+
headingSuffix: string;
|
|
17
|
+
trustItems: OutcomeTrustItem[];
|
|
18
|
+
}
|
|
19
|
+
export declare function OutcomeSummary({ badgeLabel, headingPrefix, ritualCount, ritualCountLabel, headingSuffix, trustItems, }: OutcomeSummaryProps): import("react").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,4 +16,10 @@ export { StepProgressHeader } from './components/StepProgressHeader';
|
|
|
16
16
|
export type { StepProgressHeaderProps } from './components/StepProgressHeader';
|
|
17
17
|
export { AudioQuestionCard } from './components/AudioQuestionCard';
|
|
18
18
|
export type { AudioQuestionCardProps } from './components/AudioQuestionCard';
|
|
19
|
+
export { L2Card } from './components/L2Card';
|
|
20
|
+
export type { L2CardProps, L2CardImageProps } from './components/L2Card';
|
|
21
|
+
export { OutcomeButton, PlusIcon, CheckIcon } from './components/OutcomeButton';
|
|
22
|
+
export type { OutcomeButtonProps, OutcomeButtonVariant, IconProps } from './components/OutcomeButton';
|
|
23
|
+
export { OutcomeSummary } from './components/OutcomeSummary';
|
|
24
|
+
export type { OutcomeSummaryProps, OutcomeTrustItem, OutcomeTrustIconVariant } from './components/OutcomeSummary';
|
|
19
25
|
export { cn } from '../../common/dist/common.js';
|