@srimandir/make-your-own-ritual 0.1.1 → 0.1.3
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/LandingPage/LandingPage.d.ts +78 -0
- package/dist/components/LandingPage/index.d.ts +2 -0
- package/dist/components/RitualCard/RitualCard.d.ts +37 -0
- package/dist/components/RitualCard/index.d.ts +2 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/rituals.d.ts +11 -0
- package/dist/dev/main.d.ts +0 -1
- package/dist/i18n/I18nContext.d.ts +11 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/i18n/translations.d.ts +4 -0
- package/dist/i18n/translations.en.d.ts +26 -0
- package/dist/i18n/translations.hi.d.ts +26 -0
- package/dist/index.d.ts +8 -2
- package/dist/make-your-own-ritual.js +756 -384
- package/dist/make-your-own-ritual.umd.cjs +14 -0
- package/dist/style.css +1 -1
- package/package.json +19 -11
- package/dist/components/MakeYourOwnRitualPage/MakeYourOwnRitualPage.d.ts +0 -8
- package/dist/components/MakeYourOwnRitualPage/index.d.ts +0 -2
- package/dist/make-your-own-ritual.js.map +0 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export interface RitualInput {
|
|
2
|
+
id: string;
|
|
3
|
+
imageUrl: string;
|
|
4
|
+
imageAlt?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
/** e.g. "Koti Tirtha (Gokarna)" */
|
|
8
|
+
locationLabel?: string;
|
|
9
|
+
/** e.g. "4.9 ★ Pooja Rating" */
|
|
10
|
+
ratingLabel?: string;
|
|
11
|
+
/** e.g. "Booked by 2k devotees" */
|
|
12
|
+
bookedLabel?: string;
|
|
13
|
+
/** Already-formatted display price, e.g. "₹200" — summed for the running total shown in the proceed bar. */
|
|
14
|
+
price: string;
|
|
15
|
+
}
|
|
16
|
+
export interface LandingPageProps {
|
|
17
|
+
/** Ritual catalog to render — pass the host app's real data. Defaults to this package's own sample content. */
|
|
18
|
+
rituals?: RitualInput[];
|
|
19
|
+
/** Ritual ids selected on first render, e.g. when resuming a previous session. Defaults to none selected. */
|
|
20
|
+
initialSelectedRitualIds?: string[];
|
|
21
|
+
/** Campaign badge, e.g. "Pitru Paksh Special". */
|
|
22
|
+
badgeLabel?: string;
|
|
23
|
+
/** e.g. "27 September - 12 October, 2026". */
|
|
24
|
+
dateRangeLabel?: string;
|
|
25
|
+
headline?: string;
|
|
26
|
+
/** Width of the decorative header mandala, in px or any CSS size. Defaults to 225. */
|
|
27
|
+
mandalaWidth?: number | string;
|
|
28
|
+
/** Offset of the decorative header mandala from the header's top edge. Defaults to -149. */
|
|
29
|
+
mandalaTop?: number | string;
|
|
30
|
+
/** Set to false to hide the decorative header mandala entirely. */
|
|
31
|
+
showMandala?: boolean;
|
|
32
|
+
/** Set to false to hide the note shown below the header, above the ritual list. */
|
|
33
|
+
showRitualNote?: boolean;
|
|
34
|
+
/** e.g. "You can choose more than one ritual." */
|
|
35
|
+
chooseMultipleNote?: string;
|
|
36
|
+
/** e.g. "You will choose the ancestors and the tithi in the next step." — shown next to an info icon. */
|
|
37
|
+
nextStepInfoNote?: string;
|
|
38
|
+
/** Text classes for every card's title. Defaults to `text-base font-bold text-[#374151]`. */
|
|
39
|
+
ritualTitleClassName?: string;
|
|
40
|
+
/** Text classes for every card's description. Defaults to `text-xs font-medium text-[#6b7280] opacity-90`. */
|
|
41
|
+
ritualDescriptionClassName?: string;
|
|
42
|
+
/** Background classes for every card's rating/booked strip. Defaults to `bg-[#f3f5e9]`. */
|
|
43
|
+
ritualTagClassName?: string;
|
|
44
|
+
/** Text classes for every card's rating/booked strip. Defaults to `text-[#4b5513]`. */
|
|
45
|
+
ritualTagTextClassName?: string;
|
|
46
|
+
/** Shared label on every card's price row, e.g. "Starts from". */
|
|
47
|
+
priceLabel?: string;
|
|
48
|
+
/** Shared link label on every card, e.g. "About Puja". */
|
|
49
|
+
aboutLinkLabel?: string;
|
|
50
|
+
/** aria-label for every card's select toggle. */
|
|
51
|
+
selectAriaLabel?: string;
|
|
52
|
+
/** e.g. "Ritual" — used when exactly one ritual is selected. */
|
|
53
|
+
ritualCountSingular?: string;
|
|
54
|
+
/** e.g. "Rituals" — used when more than one ritual is selected. */
|
|
55
|
+
ritualCountPlural?: string;
|
|
56
|
+
/** Proceed CTA label, e.g. "Continue". */
|
|
57
|
+
proceedLabel?: string;
|
|
58
|
+
/** Prefix for the "you will perform" summary shown above the proceed bar once ≥1 ritual is selected, e.g. "You will perform:". */
|
|
59
|
+
youWillPerformLabel?: string;
|
|
60
|
+
/** Set to false to hide the info icon next to the total in the proceed bar. */
|
|
61
|
+
showPriceInfoIcon?: boolean;
|
|
62
|
+
/** Called when the info icon next to the total is clicked, e.g. to open a bill breakdown. */
|
|
63
|
+
onPriceInfoClick?: () => void;
|
|
64
|
+
onProceed?: (selectedRitualIds: string[]) => void;
|
|
65
|
+
onAboutRitualClick?: (ritualId: string) => void;
|
|
66
|
+
className?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Master landing page for the "Make Your Own Ritual" mweb flow: the Pitru
|
|
70
|
+
* Paksha event header, a list of selectable ritual cards, and a sticky
|
|
71
|
+
* proceed bar at the bottom.
|
|
72
|
+
*
|
|
73
|
+
* Fully controllable for host-app use (e.g. hanuman): pass `rituals` with
|
|
74
|
+
* real catalog data and override any copy prop with real content. Every prop
|
|
75
|
+
* is optional and falls back to this package's own sample content, so it
|
|
76
|
+
* also works standalone out of the box.
|
|
77
|
+
*/
|
|
78
|
+
export declare function LandingPage({ rituals, initialSelectedRitualIds, badgeLabel, dateRangeLabel, headline, mandalaWidth, mandalaTop, showMandala, showRitualNote, chooseMultipleNote, nextStepInfoNote, ritualTitleClassName, ritualDescriptionClassName, ritualTagClassName, ritualTagTextClassName, priceLabel, aboutLinkLabel, selectAriaLabel, ritualCountSingular, ritualCountPlural, proceedLabel, youWillPerformLabel, showPriceInfoIcon, onPriceInfoClick, onProceed, onAboutRitualClick, className, }: LandingPageProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface RitualCardProps {
|
|
2
|
+
imageUrl: string;
|
|
3
|
+
imageAlt?: string;
|
|
4
|
+
title: string;
|
|
5
|
+
/** Text classes for the title. Defaults to `text-base font-bold text-[#374151]`. */
|
|
6
|
+
titleClassName?: string;
|
|
7
|
+
description: string;
|
|
8
|
+
/** Text classes for the description. Defaults to `text-xs font-medium text-[#6b7280] opacity-90`. */
|
|
9
|
+
descriptionClassName?: string;
|
|
10
|
+
/** e.g. "Koti Tirtha (Gokarna)" */
|
|
11
|
+
locationLabel?: string;
|
|
12
|
+
/** e.g. "4.9 ★ Pooja Rating" */
|
|
13
|
+
ratingLabel?: string;
|
|
14
|
+
/** e.g. "Booked by 2k devotees" */
|
|
15
|
+
bookedLabel?: string;
|
|
16
|
+
/** Background classes for the rating/booked strip. Defaults to `bg-[#f3f5e9]`. */
|
|
17
|
+
tagClassName?: string;
|
|
18
|
+
/** Text classes for the rating/booked strip (label text + separator dot). Defaults to `text-[#4b5513]`. */
|
|
19
|
+
tagTextClassName?: string;
|
|
20
|
+
/** e.g. "Starts from" */
|
|
21
|
+
priceLabel: string;
|
|
22
|
+
/** e.g. "₹200" */
|
|
23
|
+
price: string;
|
|
24
|
+
/** e.g. "About Puja" */
|
|
25
|
+
linkLabel: string;
|
|
26
|
+
onLinkClick?: () => void;
|
|
27
|
+
selected: boolean;
|
|
28
|
+
onToggle: () => void;
|
|
29
|
+
selectAriaLabel?: string;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Selectable ritual card for the "Make Your Own Ritual" picker: a thumbnail,
|
|
34
|
+
* title/description, a checkbox toggle, an optional location + rating/booked
|
|
35
|
+
* stats row, and a price row with an "About" link.
|
|
36
|
+
*/
|
|
37
|
+
export declare function RitualCard({ imageUrl, imageAlt, title, titleClassName, description, descriptionClassName, locationLabel, ratingLabel, bookedLabel, tagClassName, tagTextClassName, priceLabel, price, linkLabel, onLinkClick, selected, onToggle, selectAriaLabel, className, }: RitualCardProps): import("react").JSX.Element;
|
package/dist/dev/main.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SupportedLocale } from './translations';
|
|
3
|
+
export interface I18nContextValue {
|
|
4
|
+
locale: SupportedLocale;
|
|
5
|
+
t: (key: string) => string;
|
|
6
|
+
}
|
|
7
|
+
export declare const I18nProvider: React.FC<{
|
|
8
|
+
locale: SupportedLocale;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function useI18n(): I18nContextValue | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const SUPPORTED_LOCALES: readonly ["en", "hi"];
|
|
2
|
+
export type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];
|
|
3
|
+
export declare const LOCALE_LABELS: Record<SupportedLocale, string>;
|
|
4
|
+
export declare const translations: Record<SupportedLocale, Record<string, string>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* English translations for Make Your Own Ritual
|
|
3
|
+
*/
|
|
4
|
+
export declare const en: {
|
|
5
|
+
headerBadge: string;
|
|
6
|
+
headerDateRange: string;
|
|
7
|
+
headerHeadline: string;
|
|
8
|
+
chooseMultipleNote: string;
|
|
9
|
+
nextStepInfoNote: string;
|
|
10
|
+
ritualPindDaanTitle: string;
|
|
11
|
+
ritualPindDaanDesc: string;
|
|
12
|
+
ritualTarpanTitle: string;
|
|
13
|
+
ritualTarpanDesc: string;
|
|
14
|
+
ritualShraddhaTitle: string;
|
|
15
|
+
ritualShraddhaDesc: string;
|
|
16
|
+
ritualLocationKotiTirtha: string;
|
|
17
|
+
ritualRating: string;
|
|
18
|
+
ritualBooked: string;
|
|
19
|
+
ritualPriceLabel: string;
|
|
20
|
+
ritualAboutLink: string;
|
|
21
|
+
ritualSelectAriaLabel: string;
|
|
22
|
+
ritualCountSingular: string;
|
|
23
|
+
ritualCountPlural: string;
|
|
24
|
+
youWillPerformLabel: string;
|
|
25
|
+
ctaProceed: string;
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hindi translations for Make Your Own Ritual
|
|
3
|
+
*/
|
|
4
|
+
export declare const hi: {
|
|
5
|
+
headerBadge: string;
|
|
6
|
+
headerDateRange: string;
|
|
7
|
+
headerHeadline: string;
|
|
8
|
+
chooseMultipleNote: string;
|
|
9
|
+
nextStepInfoNote: string;
|
|
10
|
+
ritualPindDaanTitle: string;
|
|
11
|
+
ritualPindDaanDesc: string;
|
|
12
|
+
ritualTarpanTitle: string;
|
|
13
|
+
ritualTarpanDesc: string;
|
|
14
|
+
ritualShraddhaTitle: string;
|
|
15
|
+
ritualShraddhaDesc: string;
|
|
16
|
+
ritualLocationKotiTirtha: string;
|
|
17
|
+
ritualRating: string;
|
|
18
|
+
ritualBooked: string;
|
|
19
|
+
ritualPriceLabel: string;
|
|
20
|
+
ritualAboutLink: string;
|
|
21
|
+
ritualSelectAriaLabel: string;
|
|
22
|
+
ritualCountSingular: string;
|
|
23
|
+
ritualCountPlural: string;
|
|
24
|
+
youWillPerformLabel: string;
|
|
25
|
+
ctaProceed: string;
|
|
26
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
1
|
+
export { I18nProvider, useI18n } from './i18n';
|
|
2
|
+
export type { SupportedLocale } from './i18n';
|
|
3
|
+
export { LandingPage } from './components/LandingPage';
|
|
4
|
+
export type { LandingPageProps, RitualInput } from './components/LandingPage';
|
|
5
|
+
export { RitualCard } from './components/RitualCard';
|
|
6
|
+
export type { RitualCardProps } from './components/RitualCard';
|
|
7
|
+
export { RITUAL_OPTIONS } from './constants';
|
|
8
|
+
export type { RitualData } from './constants';
|