@srimandir/astro-consultation 2.37.8 → 2.37.9

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 (51) hide show
  1. package/dist/astro-consultation.js +4726 -1889
  2. package/dist/astro-consultation.js.map +1 -1
  3. package/dist/astro-consultation.umd.cjs +6 -2
  4. package/dist/astro-consultation.umd.cjs.map +1 -1
  5. package/dist/components/AstroConsultationSuccessModal/AstroConsultationSuccessModal.d.ts +4 -3
  6. package/dist/components/ConsultationAstrologerListPage/ListHeroV2.d.ts +8 -0
  7. package/dist/components/ConsultationAstrologerListPage/index.d.ts +1 -1
  8. package/dist/components/ConsultationAstrologerListPage/types.d.ts +21 -0
  9. package/dist/components/ConsultationBookingDetails/BirthDetailsCard.d.ts +18 -0
  10. package/dist/components/ConsultationBookingDetails/BirthDetailsForm.d.ts +31 -0
  11. package/dist/components/ConsultationBookingDetails/BirthDetailsSheet.d.ts +21 -0
  12. package/dist/components/ConsultationBookingDetails/BookingAccordion.d.ts +28 -0
  13. package/dist/components/ConsultationBookingDetails/BookingHeader.d.ts +9 -0
  14. package/dist/components/ConsultationBookingDetails/ConsultationBookingCard.d.ts +17 -0
  15. package/dist/components/ConsultationBookingDetails/ConsultationBookingDetails.d.ts +54 -0
  16. package/dist/components/ConsultationBookingDetails/ConsultationReportCard.d.ts +12 -0
  17. package/dist/components/ConsultationBookingDetails/HelpSupportCard.d.ts +11 -0
  18. package/dist/components/ConsultationBookingDetails/ManageBookingCard.d.ts +12 -0
  19. package/dist/components/ConsultationBookingDetails/RecordingPlayer.d.ts +11 -0
  20. package/dist/components/ConsultationBookingDetails/RemediesTimeline.d.ts +13 -0
  21. package/dist/components/ConsultationBookingDetails/TrustMarkers.d.ts +9 -0
  22. package/dist/components/ConsultationBookingDetails/birthDetailsValidation.d.ts +8 -0
  23. package/dist/components/ConsultationBookingDetails/icons.d.ts +17 -0
  24. package/dist/components/ConsultationBookingDetails/index.d.ts +29 -0
  25. package/dist/components/ConsultationBookingDetails/types.d.ts +106 -0
  26. package/dist/components/ConsultationDetailsCard/ConsultationDetailsCard.d.ts +1 -8
  27. package/dist/components/ConsultationLandingV2/ConsultationLandingPageV2.d.ts +33 -0
  28. package/dist/components/ConsultationLandingV2/LandingSectionsV2.d.ts +2 -0
  29. package/dist/components/ConsultationLandingV2/TrustStatsV2.d.ts +9 -0
  30. package/dist/components/ConsultationLandingV2/index.d.ts +2 -0
  31. package/dist/components/ConsultationPaymentPage/types.d.ts +5 -0
  32. package/dist/components/ConsultationRatingSheet/ConsultationRatingSheet.d.ts +36 -0
  33. package/dist/components/ConsultationRatingSheet/index.d.ts +2 -0
  34. package/dist/components/ConsultationSlotSheet/ConsultationSlotSheet.d.ts +12 -42
  35. package/dist/components/ConsultationSlotSheet/icons.d.ts +4 -0
  36. package/dist/components/MyConsultations/ConsultationListCard.d.ts +10 -0
  37. package/dist/components/MyConsultations/ConsultationsEmptyLanding.d.ts +13 -0
  38. package/dist/components/MyConsultations/ConsultationsEmptyState.d.ts +9 -0
  39. package/dist/components/MyConsultations/MyConsultationsHeader.d.ts +8 -0
  40. package/dist/components/MyConsultations/MyConsultationsList.d.ts +19 -0
  41. package/dist/components/MyConsultations/UnscheduledConsultationCard.d.ts +9 -0
  42. package/dist/components/MyConsultations/icons.d.ts +18 -0
  43. package/dist/components/MyConsultations/index.d.ts +13 -0
  44. package/dist/components/MyConsultations/types.d.ts +24 -0
  45. package/dist/i18n/hi.d.ts +0 -1
  46. package/dist/i18n/index.d.ts +1 -9
  47. package/dist/i18n/types.d.ts +3 -9
  48. package/dist/i18n/v2.d.ts +14 -0
  49. package/dist/index.d.ts +5 -2
  50. package/dist/style.css +1 -1
  51. package/package.json +3 -3
@@ -3,24 +3,19 @@ import { ConsultationSlot, ConsultationSlotDay, ConsultationSlotPeriod } from '.
3
3
  import { ConsultationDetailsCardAstrologer } from '../ConsultationDetailsCard';
4
4
  import { UnscheduledAstrologerListAstrologer } from '../UnscheduledAstrologerList/types';
5
5
  export interface ConsultationSlotSheetProps {
6
- /** Modal mode only — ignored when `inline` is true. Defaults to `true`. */
6
+ /**
7
+ * `v2` (Figma 4361:166198): the astrologer's photo over a lavender header,
8
+ * "Schedule your Astro consultation with <name>", a duration strip, the
9
+ * close button outside the sheet and a taller CTA. Needs `astrologer`.
10
+ */
11
+ design?: 'default' | 'v2';
12
+ /** V2 duration strip, e.g. 20 → "20-minute consultation". Omit to hide it. */
13
+ durationMinutes?: number;
7
14
  isOpen?: boolean;
8
- /** Modal mode only — ignored when `inline` is true. */
9
15
  onClose?: () => void;
10
- /** Modal mode only. Round close button in the sheet's top-right corner. */
11
16
  showCloseButton?: boolean;
12
- /**
13
- * Renders the header/body/footer directly in the page flow instead of
14
- * inside `@srimandir/common`'s `BottomSheet` — no overlay, backdrop, or
15
- * slide-up chrome. For hosts building a single-page inline booking flow
16
- * (astrologer list -> phone -> slot grid -> CTA) rather than a
17
- * "pick astrologer, then open a sheet" two-step flow.
18
- */
19
17
  inline?: boolean;
20
- /** Hides the title/badge header. Mainly useful with `inline`, where the
21
- * host's own page heading already introduces this section. */
22
18
  hideHeader?: boolean;
23
- /** Availability to render. Passed straight through to the selector. */
24
19
  days: ConsultationSlotDay[];
25
20
  loading?: boolean;
26
21
  error?: boolean;
@@ -31,51 +26,26 @@ export interface ConsultationSlotSheetProps {
31
26
  onPeriodSelect?: (period: ConsultationSlotPeriod) => void;
32
27
  selectedSlotStart?: string | null;
33
28
  onSlotSelect?: (slot: ConsultationSlot) => void;
34
- /**
35
- * The astrologer this sheet is booking a call with. Shown as a summary row
36
- * (photo, name, rating, experience, languages) above the phone/slot picker.
37
- * Omit it and the sheet opens with no astrologer identity shown. Ignored
38
- * when `astrologers` is passed — that renders a picker instead.
39
- */
40
29
  astrologer?: ConsultationDetailsCardAstrologer;
41
- /**
42
- * Full selectable astrologer list, rendered inside the sheet above the
43
- * phone/slot picker — for hosts where astrologer selection happens inside
44
- * this sheet rather than on the host page before it opens. Wins over
45
- * `astrologer`, which only ever shows a single already-chosen summary row.
46
- * Reuses `UnscheduledAstrologerList`'s own card row (photo, verified badge,
47
- * rating, experience, "Recommended" ribbon) so the picker looks identical
48
- * whether it's rendered on the host page or inside this sheet.
49
- */
50
30
  astrologers?: UnscheduledAstrologerListAstrologer[];
51
31
  selectedAstrologerId?: string;
52
32
  onAstrologerSelect?: (astrologer: UnscheduledAstrologerListAstrologer) => void;
53
- /**
54
- * The host's phone-number input, rendered above the slot picker. Omit it and
55
- * the sheet shows the slot picker alone (e.g. when the number is already known).
56
- */
57
33
  phoneNumberSection?: React.ReactNode;
58
- /** Sheet title. Wins over `t("consultationSheetTitle")`. */
59
34
  title?: string;
60
- /** Heading above the date strip. Wins over `t("consultationSelectTimeSlot")`. */
35
+ subtitle?: string;
36
+ astrologerBadge?: boolean;
37
+ ctaIcon?: React.ReactNode;
61
38
  heading?: string;
62
- /** Image URL for the 64px badge straddling the sheet's top edge. */
63
39
  iconUrl?: string;
64
- /** Arbitrary node for that badge; wins over `iconUrl`. */
65
40
  icon?: React.ReactNode;
66
- /** Footer CTA label. Wins over `t("consultationScheduleCall")`. */
67
41
  ctaLabel?: string;
68
42
  onCtaClick?: () => void;
69
- /** Greys out the CTA — e.g. nothing selected yet, or a booking in flight. */
70
43
  ctaDisabled?: boolean;
71
- /** Swaps the CTA label for a busy label while a booking is in flight. */
72
44
  isProcessing?: boolean;
73
- /** Shown under the CTA in red, e.g. a failed booking attempt. */
74
45
  errorMessage?: string | null;
75
- /** International build — labels the evening tab "Evening/Night". */
76
46
  isGlobal?: boolean;
77
- /** Translation lookup; every string falls back to the English default. */
78
47
  t?: (key: string, options?: any) => string | undefined;
48
+ desktopModal?: boolean;
79
49
  className?: string;
80
50
  }
81
51
  export declare const ConsultationSlotSheet: React.FC<ConsultationSlotSheetProps>;
@@ -3,3 +3,7 @@ import { default as React } from 'react';
3
3
  export declare const StarIcon: React.FC;
4
4
  /** Blue verified-check badge overlapping the chosen astrologer's photo (matches ConsultationDetailsCard). */
5
5
  export declare const VerifiedBadgeIcon: React.FC;
6
+ /** V2 header: blue circle-check on the astrologer photo (Figma 4361:167442). */
7
+ export declare const VerifiedCircleIcon: React.FC;
8
+ /** V2 header: hourglass before the consultation length (entypo:hour-glass). */
9
+ export declare const HourglassIcon: React.FC;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { ConsultationListItem, ConsultationQuickLink, MyConsultationsTranslate } from './types';
3
+ export interface ConsultationListCardProps {
4
+ item: ConsultationListItem;
5
+ onPrimaryAction?: (item: ConsultationListItem) => void;
6
+ onQuickLink?: (item: ConsultationListItem, link: ConsultationQuickLink) => void;
7
+ onRate?: (item: ConsultationListItem, stars: number) => void;
8
+ t?: MyConsultationsTranslate;
9
+ }
10
+ export declare const ConsultationListCard: React.FC<ConsultationListCardProps>;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { ConsultationLandingAssetsV2 } from '../ConsultationLandingV2';
3
+ import { ConsultationTestimonial } from '../LandingShared/types';
4
+ import { ConsultationTranslate } from '../../i18n';
5
+ export interface ConsultationsEmptyLandingProps {
6
+ assets: ConsultationLandingAssetsV2;
7
+ guidanceAvatarUrls: string[];
8
+ testimonials: ConsultationTestimonial[];
9
+ onBookConsultation: () => void;
10
+ onChatSupport?: () => void;
11
+ t?: ConsultationTranslate;
12
+ }
13
+ export declare const ConsultationsEmptyLanding: React.FC<ConsultationsEmptyLandingProps>;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { MyConsultationsTranslate } from './types';
3
+ export interface ConsultationsEmptyStateProps {
4
+ astrologerPhotoUrls?: string[];
5
+ onBookConsultation?: () => void;
6
+ footnote?: string;
7
+ t?: MyConsultationsTranslate;
8
+ }
9
+ export declare const ConsultationsEmptyState: React.FC<ConsultationsEmptyStateProps>;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { MyConsultationsTranslate } from './types';
3
+ export interface MyConsultationsHeaderProps {
4
+ onBack?: () => void;
5
+ onHelp?: () => void;
6
+ t?: MyConsultationsTranslate;
7
+ }
8
+ export declare const MyConsultationsHeader: React.FC<MyConsultationsHeaderProps>;
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { ConsultationListCardProps } from './ConsultationListCard';
3
+ import { UnscheduledConsultationCardProps } from './UnscheduledConsultationCard';
4
+ import { ConsultationsEmptyStateProps } from './ConsultationsEmptyState';
5
+ import { ConsultationsEmptyLandingProps } from './ConsultationsEmptyLanding';
6
+ import { ConsultationListItem, MyConsultationsTranslate, UnscheduledConsultationItem } from './types';
7
+ export interface MyConsultationsListProps extends Pick<ConsultationListCardProps, 'onPrimaryAction' | 'onQuickLink' | 'onRate'>, Pick<UnscheduledConsultationCardProps, 'onSchedule'> {
8
+ unscheduled?: UnscheduledConsultationItem[];
9
+ consultations?: ConsultationListItem[];
10
+ onBack?: () => void;
11
+ onHelp?: () => void;
12
+ showHeader?: boolean;
13
+ flush?: boolean;
14
+ emptyState?: Omit<ConsultationsEmptyStateProps, 't'>;
15
+ emptyLanding?: Omit<ConsultationsEmptyLandingProps, 't'>;
16
+ t?: MyConsultationsTranslate;
17
+ className?: string;
18
+ }
19
+ export declare const MyConsultationsList: React.FC<MyConsultationsListProps>;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { UnscheduledAstrologerListAstrologer } from '../UnscheduledAstrologerList';
3
+ import { MyConsultationsTranslate, UnscheduledConsultationItem } from './types';
4
+ export interface UnscheduledConsultationCardProps {
5
+ item: UnscheduledConsultationItem;
6
+ onSchedule?: (item: UnscheduledConsultationItem, astrologer: UnscheduledAstrologerListAstrologer) => void;
7
+ t?: MyConsultationsTranslate;
8
+ }
9
+ export declare const UnscheduledConsultationCard: React.FC<UnscheduledConsultationCardProps>;
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ export declare const BackArrowIcon: React.FC;
3
+ export declare const HelpIcon: React.FC;
4
+ export declare const CalendarIcon: React.FC;
5
+ export declare const InfoIcon: React.FC;
6
+ export declare const RatingStarIcon: React.FC<{
7
+ size?: number;
8
+ }>;
9
+ export declare const RatingStarOutlineIcon: React.FC<{
10
+ size?: number;
11
+ }>;
12
+ export declare const CheckIcon: React.FC;
13
+ export declare const VerifiedBadgeIcon: React.FC;
14
+ export declare const DocumentIcon: React.FC;
15
+ export declare const LeafIcon: React.FC;
16
+ export declare const PlayCircleIcon: React.FC;
17
+ export declare const PhoneCallIcon: React.FC;
18
+ export declare const ArrowRightCircleIcon: React.FC;
@@ -0,0 +1,13 @@
1
+ export { MyConsultationsList } from './MyConsultationsList';
2
+ export type { MyConsultationsListProps } from './MyConsultationsList';
3
+ export { MyConsultationsHeader } from './MyConsultationsHeader';
4
+ export type { MyConsultationsHeaderProps } from './MyConsultationsHeader';
5
+ export { ConsultationsEmptyState } from './ConsultationsEmptyState';
6
+ export { ConsultationsEmptyLanding } from './ConsultationsEmptyLanding';
7
+ export type { ConsultationsEmptyLandingProps } from './ConsultationsEmptyLanding';
8
+ export type { ConsultationsEmptyStateProps } from './ConsultationsEmptyState';
9
+ export { UnscheduledConsultationCard } from './UnscheduledConsultationCard';
10
+ export type { UnscheduledConsultationCardProps } from './UnscheduledConsultationCard';
11
+ export { ConsultationListCard } from './ConsultationListCard';
12
+ export type { ConsultationListCardProps } from './ConsultationListCard';
13
+ export type { ConsultationListItem, ConsultationListStatus, ConsultationQuickLink, MyConsultationsAstrologer, UnscheduledConsultationItem, } from './types';
@@ -0,0 +1,24 @@
1
+ import { UnscheduledAstrologerListAstrologer } from '../UnscheduledAstrologerList';
2
+ export type ConsultationListStatus = 'upcoming' | 'live' | 'missed' | 'completed';
3
+ export type ConsultationQuickLink = 'report' | 'remedies' | 'recording';
4
+ export interface MyConsultationsAstrologer {
5
+ name: string;
6
+ photoUrl?: string;
7
+ title?: string;
8
+ rating?: number;
9
+ experienceYears?: number;
10
+ languages?: string[];
11
+ }
12
+ export interface ConsultationListItem {
13
+ id: string;
14
+ status: ConsultationListStatus;
15
+ dateLabel: string;
16
+ astrologer: MyConsultationsAstrologer;
17
+ userRating?: number;
18
+ }
19
+ export interface UnscheduledConsultationItem {
20
+ id: string;
21
+ title: string;
22
+ astrologers: UnscheduledAstrologerListAstrologer[];
23
+ }
24
+ export type MyConsultationsTranslate = (key: string, options?: any) => string | undefined;
package/dist/i18n/hi.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  import { ConsultationDictionary } from './types';
2
- /** Hindi (hi). */
3
2
  declare const hi: ConsultationDictionary;
4
3
  export default hi;
@@ -5,14 +5,6 @@ import { default as te } from './te';
5
5
  import { ConsultationDictionary, ConsultationLocale, ConsultationTranslate } from './types';
6
6
  export type { ConsultationDictionary, ConsultationLocale, ConsultationTranslate, ConsultationTranslateOptions, } from './types';
7
7
  export { en, hi, te, kn };
8
+ export { consultationV2Dictionaries } from './v2';
8
9
  export declare const consultationDictionaries: Record<ConsultationLocale, ConsultationDictionary>;
9
- /**
10
- * Builds the `t` the components take.
11
- *
12
- * @param locale Anything unrecognised (including a full tag like "en-US")
13
- * falls back to English rather than rendering blanks.
14
- * @param overrides Host-supplied strings, by the same keys, winning over the
15
- * bundled copy — for a surface that needs different wording
16
- * without a package release.
17
- */
18
10
  export declare const createConsultationTranslate: (locale?: string, overrides?: ConsultationDictionary) => ConsultationTranslate;
@@ -1,15 +1,9 @@
1
- /**
2
- * Shared types for this package's translations.
3
- *
4
- * One file per language (`en.ts`, `hi.ts`, `te.ts`, `kn.ts`), each default
5
- * exporting a `ConsultationDictionary`; `index.ts` assembles them and builds
6
- * the `t` the components take.
7
- */
8
1
  export type ConsultationLocale = 'en' | 'hi' | 'te' | 'kn';
9
- /** Keys are the ones the components look up; see `en.ts` for the full set. */
10
2
  export type ConsultationDictionary = Record<string, string>;
11
- /** Interpolation the card needs: `{count}` years. */
12
3
  export interface ConsultationTranslateOptions {
13
4
  count?: number;
5
+ percent?: number;
6
+ name?: string;
7
+ time?: string;
14
8
  }
15
9
  export type ConsultationTranslate = (key: string, options?: ConsultationTranslateOptions) => string | undefined;
@@ -0,0 +1,14 @@
1
+ import { ConsultationDictionary, ConsultationLocale } from './types';
2
+ /**
3
+ * The V2 flow's copy (Figma "Astro Consultation - Revamped for App":
4
+ * landing 4361:154137, listing 4361:155025, slot sheet 4361:166198, payment
5
+ * 4361:156511, and their Telugu / Kannada / Hindi frames).
6
+ *
7
+ * Overrides, not a dictionary of its own: hosts pass `consultationV2Dictionaries[locale]`
8
+ * as `createConsultationTranslate`'s second argument on the V2 pages only.
9
+ * Several keys here are shared with the default design and other surfaces,
10
+ * whose wording differs — keeping V2's apart means those keep theirs.
11
+ * Telugu and the Hindi slot / payment copy are verbatim from Figma; the Hindi
12
+ * landing and listing copy is translated (no Hindi frames for them).
13
+ */
14
+ export declare const consultationV2Dictionaries: Record<ConsultationLocale, ConsultationDictionary>;
package/dist/index.d.ts CHANGED
@@ -22,14 +22,14 @@ export { EmailField, useEmailAddress, isValidEmail } from './components/EmailFie
22
22
  export type { EmailFieldProps, UseEmailAddressOptions } from './components/EmailField';
23
23
  export type { WhatsAppNumberFieldProps, WhatsAppCountryOption, UseWhatsAppNumberOptions, } from './components/WhatsAppNumberField';
24
24
  export { ConsultationAstrologerListPage, filterAstrologersByLanguages, } from './components/ConsultationAstrologerListPage';
25
- export type { ConsultationAstrologerListPageProps, ConsultationLanguageChip, ConsultationAstrologerSelectContext, AstrologerCardClickAt, } from './components/ConsultationAstrologerListPage';
25
+ export type { ConsultationAstrologerListPageProps, ConsultationLanguageChip, ConsultationAstrologerListV2Assets, ConsultationAstrologerSelectContext, AstrologerCardClickAt, } from './components/ConsultationAstrologerListPage';
26
26
  export * from './components/ConsultationLanding';
27
27
  export * from './components/ConsultationLandingV2';
28
28
  export { ConsultationSlotSheet } from './components/ConsultationSlotSheet';
29
29
  export type { ConsultationSlotSheetProps } from './components/ConsultationSlotSheet';
30
30
  export { ConsultationSlotPage } from './components/ConsultationSlotPage';
31
31
  export type { ConsultationSlotPageProps, ConsultationSlotPageAstrologer, ConsultationSlotPageSocialProof, ConsultationSlotBookingSelection, } from './components/ConsultationSlotPage';
32
- export { consultationDictionaries, createConsultationTranslate, en as consultationEn, hi as consultationHi, te as consultationTe, kn as consultationKn, } from './i18n';
32
+ export { consultationDictionaries, consultationV2Dictionaries, createConsultationTranslate, en as consultationEn, hi as consultationHi, te as consultationTe, kn as consultationKn, } from './i18n';
33
33
  export type { ConsultationDictionary, ConsultationLocale, ConsultationTranslate, ConsultationTranslateOptions, } from './i18n';
34
34
  export { PaymentResult } from './components/PaymentResult';
35
35
  export type { PaymentResultProps, PaymentResultStatus, PaymentResultAstrologer, } from './components/PaymentResult';
@@ -45,3 +45,6 @@ export { UnscheduledAstrologerListSkeleton } from './components/UnscheduledAstro
45
45
  export type { UnscheduledAstrologerListSkeletonProps } from './components/UnscheduledAstrologerList';
46
46
  export { SlotUnavailableNotice } from './components/SlotUnavailableNotice';
47
47
  export type { SlotUnavailableNoticeProps } from './components/SlotUnavailableNotice';
48
+ export * from './components/MyConsultations';
49
+ export * from './components/ConsultationBookingDetails';
50
+ export * from './components/ConsultationRatingSheet';