kundli-generator 1.0.1 → 1.0.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/FooterShell/FooterCTAButton.d.ts +15 -0
- package/dist/components/FooterShell/FooterShell.d.ts +9 -0
- package/dist/components/FooterShell/index.d.ts +5 -0
- package/dist/components/KundliForm/KundliForm.d.ts +6 -3
- package/dist/components/KundliPage/KundliPage.d.ts +6 -18
- package/dist/components/KundliPage/index.d.ts +0 -2
- package/dist/index.d.ts +2 -3
- package/dist/kundli-generator.js +1275 -1387
- package/dist/kundli-generator.js.map +1 -1
- package/dist/kundli-generator.umd.cjs +9 -25
- package/dist/kundli-generator.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/KundliPage/KundliContext.d.ts +0 -58
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface FooterCTAButtonProps {
|
|
3
|
+
/** Button content */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** When set, renders an anchor instead of a button (e.g. target="_blank" rel="noopener noreferrer") */
|
|
6
|
+
href?: string;
|
|
7
|
+
/** Disabled state; for anchor uses aria-disabled and preventDefault on click */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Click handler (used when href is not set) */
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Optional aria-label for accessibility */
|
|
13
|
+
"aria-label"?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const FooterCTAButton: React.FC<FooterCTAButtonProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface FooterShellProps {
|
|
3
|
+
/** Optional circular marquee content (e.g. badges). When provided, marquee is shown. */
|
|
4
|
+
marquee?: React.ReactNode;
|
|
5
|
+
/** Main footer content (e.g. CTA button or form proceed block) */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const FooterShell: React.FC<FooterShellProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { FooterShell } from './FooterShell';
|
|
2
|
+
export type { FooterShellProps } from './FooterShell';
|
|
3
|
+
export { FooterCTAButton } from './FooterCTAButton';
|
|
4
|
+
export type { FooterCTAButtonProps } from './FooterCTAButton';
|
|
5
|
+
export { default as footerShellStyles } from './FooterShell.module.scss';
|
|
@@ -11,15 +11,17 @@ export interface KundliFormValues {
|
|
|
11
11
|
}
|
|
12
12
|
export interface KundliFormProps {
|
|
13
13
|
className?: string;
|
|
14
|
-
/** Language (en, hi, ta, te). Overrides I18nProvider if set.
|
|
14
|
+
/** Language (en, hi, ta, te). Overrides I18nProvider if set. */
|
|
15
15
|
locale?: SupportedLocale;
|
|
16
16
|
/** Show language dropdown. Default true. */
|
|
17
17
|
showLanguageSelector?: boolean;
|
|
18
|
-
/**
|
|
18
|
+
/** Header logo URL */
|
|
19
|
+
logoUrl?: string;
|
|
20
|
+
/** Back button handler (e.g. go back to KundliPage) */
|
|
19
21
|
onBack?: () => void;
|
|
20
22
|
/** Initial field values */
|
|
21
23
|
initialValues?: Partial<KundliFormValues>;
|
|
22
|
-
/** Called when user clicks Proceed
|
|
24
|
+
/** Called when user clicks Proceed; receives form data. Use for payment/navigation in consumer. */
|
|
23
25
|
onProceed?: (values: KundliFormValues) => void;
|
|
24
26
|
/** If provided, proceed CTA becomes a link */
|
|
25
27
|
proceedHref?: string;
|
|
@@ -28,4 +30,5 @@ export interface KundliFormProps {
|
|
|
28
30
|
discountedPriceLabel?: string;
|
|
29
31
|
discountPillLabel?: string;
|
|
30
32
|
}
|
|
33
|
+
/** Standalone Kundli form. Use with onProceed callback to get form data; no context required. */
|
|
31
34
|
export declare const KundliForm: React.FC<KundliFormProps>;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { SupportedLocale } from '../../i18n/translations';
|
|
3
|
-
import { KundliFormValues } from '../KundliForm';
|
|
4
3
|
export interface KundliPageProps {
|
|
5
|
-
/** Person's name */
|
|
6
|
-
name?: string;
|
|
7
|
-
/** Birth date for the Kundli */
|
|
8
|
-
birthDate?: string;
|
|
9
4
|
/** Optional CSS class name */
|
|
10
5
|
className?: string;
|
|
11
6
|
/** Language (en, hi, ta, te). Overrides I18nProvider if set. Initial value when using dropdown. */
|
|
12
7
|
locale?: SupportedLocale;
|
|
13
8
|
/** Show language dropdown. Default true. */
|
|
14
9
|
showLanguageSelector?: boolean;
|
|
15
|
-
/** User ID from auth
|
|
10
|
+
/** User ID from auth, for API calls etc. */
|
|
16
11
|
userId?: number;
|
|
17
12
|
/** Header logo URL */
|
|
18
13
|
logoUrl?: string;
|
|
14
|
+
/** A4B API instance (for consumer use; e.g. pass to form submit in Hanuman) */
|
|
15
|
+
a4bApi?: A4BApi;
|
|
19
16
|
/** Premium report cover image URL */
|
|
20
17
|
reportImageUrl?: string;
|
|
21
18
|
/** University logo URLs [BHU, VSU] */
|
|
@@ -24,21 +21,12 @@ export interface KundliPageProps {
|
|
|
24
21
|
sampleReportHref?: string;
|
|
25
22
|
/** Called when "View Sample Report" is clicked (if sampleReportHref not set) */
|
|
26
23
|
onViewSampleReport?: () => void;
|
|
27
|
-
/** CTA button link (e.g. checkout URL). If set, CTA is a link; otherwise CTA
|
|
24
|
+
/** CTA button link (e.g. checkout URL). If set, CTA is a link; otherwise CTA triggers onCtaClick. */
|
|
28
25
|
ctaHref?: string;
|
|
29
|
-
/** Called when CTA button is clicked (
|
|
26
|
+
/** Called when CTA button is clicked (when ctaHref is not set). Consumer can show KundliForm. */
|
|
30
27
|
onCtaClick?: () => void;
|
|
31
28
|
/** Read more reviews link */
|
|
32
29
|
readMoreReviewsHref?: string;
|
|
33
|
-
/** Initial values for the Kundli form (when CTA leads to form) */
|
|
34
|
-
initialFormValues?: Partial<KundliFormValues>;
|
|
35
|
-
/** Called when user proceeds from the form (e.g. to payment) */
|
|
36
|
-
onProceed?: (values: KundliFormValues) => void;
|
|
37
|
-
/** Form: proceed CTA as link */
|
|
38
|
-
proceedHref?: string;
|
|
39
|
-
/** Form: pricing labels */
|
|
40
|
-
originalPriceLabel?: string;
|
|
41
|
-
discountedPriceLabel?: string;
|
|
42
|
-
discountPillLabel?: string;
|
|
43
30
|
}
|
|
31
|
+
/** Landing page content (hero, steps, CTA). Decoupled from form; use onCtaClick to show KundliForm in consumer. */
|
|
44
32
|
export declare const KundliPage: React.FC<KundliPageProps>;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
export { KundliPage } from './KundliPage';
|
|
2
2
|
export type { KundliPageProps } from './KundliPage';
|
|
3
|
-
export { KundliProvider, useKundliContext, useKundliContextOrThrow, KundliContext, } from './KundliContext';
|
|
4
|
-
export type { KundliView, KundliContextConfig, KundliContextValue, KundliProviderProps, } from './KundliContext';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { KundliPage } from './components/KundliPage';
|
|
2
|
-
export {
|
|
3
|
-
export type { KundliView, KundliContextConfig, KundliContextValue, KundliProviderProps, } from './components/KundliPage';
|
|
2
|
+
export type { KundliPageProps } from './components/KundliPage';
|
|
4
3
|
export { KundliForm } from './components/KundliForm';
|
|
5
|
-
export type { KundliFormValues } from './components/KundliForm';
|
|
4
|
+
export type { KundliFormValues, KundliFormProps } from './components/KundliForm';
|
|
6
5
|
export { I18nProvider, useI18n, SUPPORTED_LOCALES, type SupportedLocale, } from './i18n';
|