@npm-zenwork/tax-remittance-ui 0.1.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.
Files changed (124) hide show
  1. package/README.md +32 -0
  2. package/dist/api/auth.d.ts +3 -0
  3. package/dist/api/bankAccounts.d.ts +4 -0
  4. package/dist/api/client.d.ts +7 -0
  5. package/dist/api/dashboard.d.ts +5 -0
  6. package/dist/api/entities.d.ts +10 -0
  7. package/dist/api/federalPayments.d.ts +8 -0
  8. package/dist/api/form8655Authorization.d.ts +5 -0
  9. package/dist/api/form9783Enrollment.d.ts +5 -0
  10. package/dist/api/statePayments.d.ts +5 -0
  11. package/dist/components/dashboard/DashboardActionBar.d.ts +5 -0
  12. package/dist/components/dashboard/DashboardSectionLoader.d.ts +5 -0
  13. package/dist/components/dashboard/EmptyPaymentCard.d.ts +9 -0
  14. package/dist/components/dashboard/MonthlyOverviewSection.d.ts +8 -0
  15. package/dist/components/dashboard/MyPaymentsTable.d.ts +8 -0
  16. package/dist/components/dashboard/PaymentSummaryCard.d.ts +21 -0
  17. package/dist/components/dashboard/dashboardMappers.d.ts +12 -0
  18. package/dist/components/dashboard/dashboardUtils.d.ts +31 -0
  19. package/dist/components/entities/entityListUtils.d.ts +7 -0
  20. package/dist/components/forms/FormField.d.ts +28 -0
  21. package/dist/components/icons/payment-tabs/DraftTabIcon.d.ts +2 -0
  22. package/dist/components/icons/payment-tabs/PaidTabIcon.d.ts +2 -0
  23. package/dist/components/icons/payment-tabs/RejectedTabIcon.d.ts +2 -0
  24. package/dist/components/icons/payment-tabs/ScheduledTabIcon.d.ts +2 -0
  25. package/dist/components/icons/payment-tabs/SubmittedTabIcon.d.ts +2 -0
  26. package/dist/components/icons/payment-tabs/index.d.ts +5 -0
  27. package/dist/components/onboarding/CreateEntityCard.d.ts +5 -0
  28. package/dist/components/onboarding/EntityForm.d.ts +1 -0
  29. package/dist/components/payments/AddFederalPaymentForm.d.ts +10 -0
  30. package/dist/components/payments/AddStatePaymentForm.d.ts +6 -0
  31. package/dist/components/payments/BankAccountSelect.d.ts +14 -0
  32. package/dist/components/payments/EftpsIndividualEnrollmentForm.d.ts +11 -0
  33. package/dist/components/payments/EntityDetailsCard.d.ts +8 -0
  34. package/dist/components/payments/PaymentField.d.ts +23 -0
  35. package/dist/components/payments/PaymentFormSection.d.ts +8 -0
  36. package/dist/components/payments/PaymentRowActions.d.ts +11 -0
  37. package/dist/components/payments/ReportingAgentAuthorizationForm.d.ts +11 -0
  38. package/dist/components/payments/SettlementDatePicker.d.ts +8 -0
  39. package/dist/components/payments/SignatureFieldGroup.d.ts +17 -0
  40. package/dist/components/payments/StatePaymentAuthorizationForm.d.ts +8 -0
  41. package/dist/components/payments/TaxPeriodMonthPicker.d.ts +9 -0
  42. package/dist/components/payments/eftpsIndividualEnrollmentConfig.d.ts +3 -0
  43. package/dist/components/payments/federalPaymentUtils.d.ts +7 -0
  44. package/dist/components/payments/federalSubcategoryRules.d.ts +32 -0
  45. package/dist/components/payments/federalTaxPeriodRules.d.ts +11 -0
  46. package/dist/components/payments/paymentsTableConfig.d.ts +15 -0
  47. package/dist/components/payments/remittancePaymentMappers.d.ts +19 -0
  48. package/dist/components/payments/reportingAgentAuthorizationConfig.d.ts +3 -0
  49. package/dist/components/payments/settlementDateRules.d.ts +12 -0
  50. package/dist/components/payments/statePaymentAuthorizationConfig.d.ts +2 -0
  51. package/dist/components/payments/statePaymentConfig.d.ts +20 -0
  52. package/dist/components/settings/AddBankAccountManualForm.d.ts +7 -0
  53. package/dist/components/settings/AddBankAccountModal.d.ts +8 -0
  54. package/dist/components/settings/BankAccountsSection.d.ts +5 -0
  55. package/dist/components/settings/PaymentHistorySection.d.ts +9 -0
  56. package/dist/components/settings/SettingsNav.d.ts +8 -0
  57. package/dist/components/settings/SettingsPlaceholderSection.d.ts +6 -0
  58. package/dist/components/settings/SettingsSectionHeader.d.ts +9 -0
  59. package/dist/components/settings/TaxAccountsSection.d.ts +9 -0
  60. package/dist/components/settings/settingsNavConfig.d.ts +9 -0
  61. package/dist/components/tax-forms/TaxFormsTable.d.ts +8 -0
  62. package/dist/components/ui/Alert.d.ts +7 -0
  63. package/dist/components/ui/Button.d.ts +8 -0
  64. package/dist/components/ui/Input.d.ts +7 -0
  65. package/dist/config.d.ts +22 -0
  66. package/dist/embedded/EmbeddedAuthContext.d.ts +27 -0
  67. package/dist/embedded/EmbeddedContext.d.ts +16 -0
  68. package/dist/embedded/EmbeddedLayout.d.ts +18 -0
  69. package/dist/embedded/EmbeddedRoutes.d.ts +10 -0
  70. package/dist/embedded/EmbeddedWidgetBase.d.ts +28 -0
  71. package/dist/embedded/EntityGate.d.ts +10 -0
  72. package/dist/embedded/TaxRemittanceEmbedded.d.ts +60 -0
  73. package/dist/embedded/ThemeProvider.d.ts +47 -0
  74. package/dist/embedded/pages/EmbeddedCreateEntityPage.d.ts +7 -0
  75. package/dist/embedded/pages/EmbeddedDashboardPage.d.ts +6 -0
  76. package/dist/embedded/pages/EmbeddedEntityFormPage.d.ts +9 -0
  77. package/dist/embedded/widgets/FederalPaymentWidget.d.ts +22 -0
  78. package/dist/embedded/widgets/StatePaymentWidget.d.ts +22 -0
  79. package/dist/index.cjs +76 -0
  80. package/dist/index.cjs.map +1 -0
  81. package/dist/index.d.ts +10 -0
  82. package/dist/index.mjs +14189 -0
  83. package/dist/index.mjs.map +1 -0
  84. package/dist/lib/admin-storage.d.ts +4 -0
  85. package/dist/lib/auth-events.d.ts +2 -0
  86. package/dist/lib/auth-storage.d.ts +6 -0
  87. package/dist/lib/entityAccountType.d.ts +3 -0
  88. package/dist/lib/errors.d.ts +1 -0
  89. package/dist/lib/initials.d.ts +7 -0
  90. package/dist/lib/navigation.d.ts +4 -0
  91. package/dist/lib/paymentStatus.d.ts +13 -0
  92. package/dist/lib/paymentsNavigation.d.ts +2 -0
  93. package/dist/lib/query-client.d.ts +2 -0
  94. package/dist/pages/AddFederalPaymentPage.d.ts +1 -0
  95. package/dist/pages/AddStatePaymentPage.d.ts +1 -0
  96. package/dist/pages/EditFederalPaymentPage.d.ts +2 -0
  97. package/dist/pages/EftpsIndividualEnrollmentPage.d.ts +1 -0
  98. package/dist/pages/FederalPaymentEditorPage.d.ts +5 -0
  99. package/dist/pages/PaymentsPage.d.ts +4 -0
  100. package/dist/pages/ReportingAgentAuthorizationPage.d.ts +1 -0
  101. package/dist/pages/SettingsPage.d.ts +1 -0
  102. package/dist/pages/StatePaymentAuthorizationPage.d.ts +1 -0
  103. package/dist/pages/TaxFormsPage.d.ts +1 -0
  104. package/dist/styles.css +1 -0
  105. package/dist/styles.css.d.ts +4 -0
  106. package/dist/types/api.d.ts +18 -0
  107. package/dist/types/apiClient.d.ts +29 -0
  108. package/dist/types/auth.d.ts +28 -0
  109. package/dist/types/bankAccount.d.ts +11 -0
  110. package/dist/types/createBankAccount.d.ts +7 -0
  111. package/dist/types/dashboard.d.ts +50 -0
  112. package/dist/types/entity.d.ts +54 -0
  113. package/dist/types/federalPayment.d.ts +62 -0
  114. package/dist/types/federalPaymentFlow.d.ts +41 -0
  115. package/dist/types/form8655Authorization.d.ts +48 -0
  116. package/dist/types/form8655AuthorizationFlow.d.ts +25 -0
  117. package/dist/types/form9783Enrollment.d.ts +70 -0
  118. package/dist/types/form9783EnrollmentFlow.d.ts +32 -0
  119. package/dist/types/paymentHistory.d.ts +11 -0
  120. package/dist/types/statePayment.d.ts +32 -0
  121. package/dist/types/statePaymentFlow.d.ts +28 -0
  122. package/dist/types/taxAccount.d.ts +9 -0
  123. package/dist/types/taxForm.d.ts +11 -0
  124. package/package.json +61 -0
@@ -0,0 +1,8 @@
1
+ interface AddBankAccountModalProps {
2
+ open: boolean;
3
+ entityId: number | null;
4
+ onClose: () => void;
5
+ onAccountAdded?: (bankAccountDetailId: number) => void;
6
+ }
7
+ export declare function AddBankAccountModal({ open, entityId, onClose, onAccountAdded, }: AddBankAccountModalProps): import("react").JSX.Element | null;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ interface BankAccountsSectionProps {
2
+ entityId: number | null;
3
+ }
4
+ export declare function BankAccountsSection({ entityId }: BankAccountsSectionProps): import("react").JSX.Element;
5
+ export {};
@@ -0,0 +1,9 @@
1
+ import { PaymentHistoryResponse } from '../../types/paymentHistory';
2
+ interface PaymentHistorySectionProps {
3
+ entityId: number | null;
4
+ transactions?: PaymentHistoryResponse[];
5
+ isLoading?: boolean;
6
+ isError?: boolean;
7
+ }
8
+ export declare function PaymentHistorySection({ entityId, transactions, isLoading, isError, }: PaymentHistorySectionProps): import("react").JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import { SettingsNavItem, SettingsSectionId } from './settingsNavConfig';
2
+ interface SettingsNavProps {
3
+ activeSection: SettingsSectionId;
4
+ onSectionChange: (section: SettingsSectionId) => void;
5
+ items: SettingsNavItem[];
6
+ }
7
+ export declare function SettingsNav({ activeSection, onSectionChange, items }: SettingsNavProps): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import { SettingsSectionId } from './settingsNavConfig';
2
+ interface SettingsPlaceholderSectionProps {
3
+ sectionId: Exclude<SettingsSectionId, 'bank-accounts'>;
4
+ }
5
+ export declare function SettingsPlaceholderSection({ sectionId }: SettingsPlaceholderSectionProps): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ComponentType, SVGProps } from 'react';
2
+ interface SettingsSectionHeaderProps {
3
+ title: string;
4
+ subtitle: string;
5
+ icon: ComponentType<SVGProps<SVGSVGElement>>;
6
+ action?: React.ReactNode;
7
+ }
8
+ export declare function SettingsSectionHeader({ title, subtitle, icon: Icon, action }: SettingsSectionHeaderProps): import("react").JSX.Element;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import { TaxAccountResponse } from '../../types/taxAccount';
2
+ interface TaxAccountsSectionProps {
3
+ entityId: number | null;
4
+ accounts?: TaxAccountResponse[];
5
+ isLoading?: boolean;
6
+ isError?: boolean;
7
+ }
8
+ export declare function TaxAccountsSection({ entityId, accounts, isLoading, isError, }: TaxAccountsSectionProps): import("react").JSX.Element;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ComponentType, SVGProps } from 'react';
2
+ export type SettingsSectionId = 'bank-accounts' | 'tax-accounts' | 'payment-history' | 'entity-details';
3
+ export interface SettingsNavItem {
4
+ id: SettingsSectionId;
5
+ title: string;
6
+ subtitle: string;
7
+ icon: ComponentType<SVGProps<SVGSVGElement>>;
8
+ }
9
+ export declare const settingsNavItems: SettingsNavItem[];
@@ -0,0 +1,8 @@
1
+ import { TaxFormResponse } from '../../types/taxForm';
2
+ interface TaxFormsTableProps {
3
+ forms?: TaxFormResponse[];
4
+ isLoading?: boolean;
5
+ isError?: boolean;
6
+ }
7
+ export declare function TaxFormsTable({ forms, isLoading, isError }: TaxFormsTableProps): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ interface AlertProps {
2
+ variant?: 'error' | 'info';
3
+ title?: string;
4
+ message: string;
5
+ }
6
+ export declare function Alert({ variant, title, message }: AlertProps): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ButtonHTMLAttributes } from 'react';
2
+ type ButtonVariant = 'primary' | 'secondary' | 'ghost';
3
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
+ variant?: ButtonVariant;
5
+ isLoading?: boolean;
6
+ }
7
+ export declare function Button({ variant, isLoading, className, children, disabled, ...props }: ButtonProps): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
3
+ label: string;
4
+ error?: string;
5
+ }
6
+ export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
7
+ export {};
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Validates that VITE_API_BASE_URL is set for the SPA production build.
3
+ *
4
+ * DO NOT call this at module scope — when the library build compiles this file,
5
+ * import.meta.env.PROD is `true` but VITE_API_BASE_URL is `undefined`, so a
6
+ * top-level call would throw on every consumer import before React even mounts.
7
+ *
8
+ * The SPA calls this explicitly from main.tsx.
9
+ * Library consumers provide the URL via the apiBaseUrl prop on TaxRemittancePortal.
10
+ */
11
+ export declare function validateClientConfig(): void;
12
+ export declare function setRuntimeApiBaseUrl(url: string): void;
13
+ export declare function setRuntimeAccessToken(token: string | null): void;
14
+ export declare function getRuntimeAccessToken(): string | null;
15
+ export declare function setRuntimeClientId(clientId: string): void;
16
+ export declare function getRuntimeClientId(): string | null;
17
+ export declare const config: {
18
+ /** Resolved API origin. Reads runtime override first, then env var. */
19
+ readonly apiBaseUrl: string;
20
+ apiVersion: string;
21
+ };
22
+ export declare function apiUrl(path: string): string;
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from 'react';
2
+ interface EmbeddedAuthContextValue {
3
+ /** The access token provided by the host application. */
4
+ accessToken: string;
5
+ }
6
+ interface EmbeddedAuthProviderProps {
7
+ accessToken: string;
8
+ onSessionExpired?: () => void;
9
+ children: ReactNode;
10
+ }
11
+ /**
12
+ * Holds the host-provided access token and makes it available to the embedded
13
+ * widget's API calls. No login/register flow — auth is entirely the host's concern.
14
+ *
15
+ * The token is written to the module-level variable synchronously on every render.
16
+ * This means:
17
+ * - Host-side token refresh (new accessToken prop) is picked up immediately.
18
+ * - React Strict Mode's double-mount never creates a window where the token is null,
19
+ * because the synchronous render-time write runs before any async fetch can fire.
20
+ *
21
+ * No cleanup on unmount: when this component unmounts there are no more renders
22
+ * and therefore no more API calls from this widget instance. A stale value in the
23
+ * module-level variable is harmless — the next mounted instance will overwrite it.
24
+ */
25
+ export declare function EmbeddedAuthProvider({ accessToken, onSessionExpired, children, }: EmbeddedAuthProviderProps): import("react").JSX.Element;
26
+ export declare function useEmbeddedAuth(): EmbeddedAuthContextValue;
27
+ export {};
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ import { EntityDetailsResponse } from '../types/entity';
3
+ interface EmbeddedContextValue {
4
+ entities: EntityDetailsResponse[];
5
+ isLoading: boolean;
6
+ selectedEntity: EntityDetailsResponse | null;
7
+ setSelectedEntityId: (id: number) => void;
8
+ refetchEntities: () => Promise<void>;
9
+ }
10
+ interface EmbeddedContextProviderProps {
11
+ onOrganizationCreated?: (org: EntityDetailsResponse) => void;
12
+ children: ReactNode;
13
+ }
14
+ export declare function EmbeddedContextProvider({ onOrganizationCreated, children, }: EmbeddedContextProviderProps): import("react").JSX.Element;
15
+ export declare function useEmbeddedContext(): EmbeddedContextValue;
16
+ export {};
@@ -0,0 +1,18 @@
1
+ import { EntityDetailsResponse } from '../types/entity';
2
+ /**
3
+ * Outlet context shape shared by every payment/settings/tax-forms page —
4
+ * originally defined alongside the (now removed) standalone SPA's AppLayout.
5
+ * EmbeddedLayout provides the same shape below so these pages need no changes.
6
+ */
7
+ export interface PortalOutletContext {
8
+ entities: EntityDetailsResponse[];
9
+ selectedEntity: EntityDetailsResponse | null;
10
+ setSelectedEntityId: (entityId: number) => void;
11
+ }
12
+ /**
13
+ * Minimal shell for the embedded widget — no sidebar, no header branding.
14
+ * Renders a compact top bar with:
15
+ * - Entity selector (dropdown) when multiple entities exist
16
+ * - Back button when on a sub-page
17
+ */
18
+ export declare function EmbeddedLayout(): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { PaymentsMode } from '../pages/PaymentsPage';
2
+ interface EmbeddedRoutesProps {
3
+ paymentsMode?: PaymentsMode;
4
+ }
5
+ /**
6
+ * Full route tree for TaxRemittanceEmbedded (all sections).
7
+ * Providers and NavigationSync live in EmbeddedWidgetBase — this is just <Routes>.
8
+ */
9
+ export declare function EmbeddedRoutes({ paymentsMode }: EmbeddedRoutesProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,28 @@
1
+ import { MutableRefObject, ReactNode } from 'react';
2
+ import { TaxRemittanceTheme } from './ThemeProvider';
3
+ import { EmbeddedRouteKey } from './TaxRemittanceEmbedded';
4
+ import { EntityDetailsResponse } from '../types/entity';
5
+ export type { TaxRemittanceTheme };
6
+ export interface EmbeddedWidgetBaseProps {
7
+ appKey: string;
8
+ accessToken: string;
9
+ apiBaseUrl: string;
10
+ theme?: TaxRemittanceTheme;
11
+ onSessionExpired?: () => void;
12
+ onOrganizationCreated?: (org: EntityDetailsResponse) => void;
13
+ onNavigate?: (routeKey: EmbeddedRouteKey, pathname: string) => void;
14
+ navigateFnRef: MutableRefObject<((path: string) => void) | null>;
15
+ /** The <Routes> subtree specific to this widget. */
16
+ children: ReactNode;
17
+ }
18
+ /**
19
+ * Shared provider stack reused by every widget (TaxRemittanceEmbedded,
20
+ * FederalPaymentWidget, StatePaymentWidget, etc.).
21
+ *
22
+ * Wraps children with:
23
+ * ThemeProvider → QueryClientProvider → EmbeddedAuthProvider →
24
+ * MemoryRouter → EmbeddedContextProvider + NavigationSync
25
+ *
26
+ * Children should be a <Routes> element with the widget-specific route tree.
27
+ */
28
+ export declare function EmbeddedWidgetBase({ appKey, accessToken, apiBaseUrl, theme, onSessionExpired, onOrganizationCreated, onNavigate, navigateFnRef, children, }: EmbeddedWidgetBaseProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Gate route at "/".
3
+ * Reads entity state from EmbeddedContextProvider (which wraps the whole route tree)
4
+ * and redirects the user to the right starting screen:
5
+ *
6
+ * Loading → spinner
7
+ * No entities → /create-entity
8
+ * Has entities → /dashboard
9
+ */
10
+ export declare function EntityGate(): import("react").JSX.Element | null;
@@ -0,0 +1,60 @@
1
+ import { TaxRemittanceTheme } from './EmbeddedWidgetBase';
2
+ import { EntityDetailsResponse } from '../types/entity';
3
+ export type { TaxRemittanceTheme };
4
+ /**
5
+ * The top-level section the widget is currently showing.
6
+ * Returned by `onNavigate` so the host can highlight the correct sidebar item.
7
+ */
8
+ export type EmbeddedRouteKey = 'dashboard' | 'payments' | 'tax-forms' | 'settings' | 'create-entity' | 'other';
9
+ /**
10
+ * Imperative handle exposed via `ref` on `TaxRemittanceEmbedded`.
11
+ * Lets the host app navigate the widget to a specific internal path
12
+ * without going through props.
13
+ *
14
+ * @example
15
+ * const widgetRef = useRef<TaxRemittanceEmbeddedHandle>(null)
16
+ * widgetRef.current?.navigate('/payments')
17
+ */
18
+ export interface TaxRemittanceEmbeddedHandle {
19
+ navigate: (path: string) => void;
20
+ }
21
+ export interface TaxRemittanceEmbeddedProps {
22
+ /**
23
+ * The public client ID obtained from the Dev Portal (pk_...).
24
+ * Sent as X-Client-ID on every request to scope data to this client's tenant.
25
+ */
26
+ appKey: string;
27
+ /**
28
+ * Short-lived JWT issued by POST /api/v1/auth/embedded-login.
29
+ * Never pass a secret API key here — only the access token.
30
+ */
31
+ accessToken: string;
32
+ /**
33
+ * Base URL of the Tax Remittance API, e.g. "https://api.zenwork.com".
34
+ */
35
+ apiBaseUrl: string;
36
+ /** Optional visual theme overrides. */
37
+ theme?: TaxRemittanceTheme;
38
+ /**
39
+ * Called when the user's session expires (401/403 from the API).
40
+ * Use this to redirect to your own login page.
41
+ */
42
+ onSessionExpired?: () => void;
43
+ /**
44
+ * Called immediately after a new organization/entity is created inside the widget.
45
+ */
46
+ onOrganizationCreated?: (org: EntityDetailsResponse) => void;
47
+ /**
48
+ * Called every time the widget's internal route changes.
49
+ * Use this to keep the host app's sidebar selection in sync with the widget.
50
+ */
51
+ onNavigate?: (routeKey: EmbeddedRouteKey, pathname: string) => void;
52
+ }
53
+ /**
54
+ * Full embedded widget — all sections (dashboard, payments, tax forms, settings).
55
+ *
56
+ * For clients that need only a subset, use the scoped widgets instead:
57
+ * - FederalPaymentWidget — federal payments + dashboard + settings
58
+ * - StatePaymentWidget — state payments + dashboard + settings
59
+ */
60
+ export declare const TaxRemittanceEmbedded: import('react').ForwardRefExoticComponent<TaxRemittanceEmbeddedProps & import('react').RefAttributes<TaxRemittanceEmbeddedHandle>>;
@@ -0,0 +1,47 @@
1
+ import { ReactNode } from 'react';
2
+ export interface TaxRemittanceTheme {
3
+ /**
4
+ * Primary color — main CTA buttons, active nav items, focus rings.
5
+ * Default: #2563eb (blue-600)
6
+ */
7
+ primaryColor?: string;
8
+ /**
9
+ * Secondary color — badges, tab highlights, secondary action accents.
10
+ * Default: #0891b2 (cyan-600)
11
+ */
12
+ secondaryColor?: string;
13
+ /**
14
+ * Tertiary color — info panels, soft background tints, tertiary accents.
15
+ * Default: #7c3aed (violet-600)
16
+ */
17
+ tertiaryColor?: string;
18
+ /**
19
+ * Border radius applied to cards, inputs, and buttons.
20
+ * Default: 0.5rem
21
+ */
22
+ borderRadius?: string;
23
+ /**
24
+ * Font family for the embedded widget.
25
+ * Default: inherits from the host page.
26
+ */
27
+ fontFamily?: string;
28
+ }
29
+ interface ThemeProviderProps {
30
+ theme?: TaxRemittanceTheme;
31
+ children: ReactNode;
32
+ }
33
+ /**
34
+ * Injects the client's brand colors as CSS custom properties on the
35
+ * `.tax-remittance-embedded` wrapper div.
36
+ *
37
+ * Three color slots — primary, secondary, tertiary — each also get
38
+ * a computed `-dark` variant (10 % darker) and a `-light` variant
39
+ * (15 % of the color over white) so components can use consistent
40
+ * hover/tint states without the client needing to specify every shade.
41
+ *
42
+ * `index.css` maps Tailwind's `--color-brand-*` tokens to these vars
43
+ * inside the `.tax-remittance-embedded` scope, so shared components
44
+ * like `<Button>` and `<Input>` automatically respect client themes.
45
+ */
46
+ export declare function ThemeProvider({ theme, children }: ThemeProviderProps): import("react").JSX.Element;
47
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Embedded version of the Create Entity landing page.
3
+ * No SignOutButton, no full-screen shell — just the card in a centered container.
4
+ * After clicking "Create Entity", navigates to the entity form with /dashboard as
5
+ * the return destination so the form redirects there on success.
6
+ */
7
+ export declare function EmbeddedCreateEntityPage(): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Embedded version of the Dashboard page.
3
+ * Uses useEmbeddedContext() instead of useOutletContext() so it works inside
4
+ * the embedded widget without depending on AppLayout's outlet context.
5
+ */
6
+ export declare function EmbeddedDashboardPage(): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Embedded version of the Entity Form page.
3
+ * No SignOutButton, no full-screen shell.
4
+ *
5
+ * After the form submits successfully, EntityForm navigates to the return path
6
+ * set by EmbeddedCreateEntityPage (state.from = '/dashboard'), and
7
+ * EmbeddedContextProvider detects the new entity and fires onOrganizationCreated.
8
+ */
9
+ export declare function EmbeddedEntityFormPage(): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { TaxRemittanceEmbeddedProps, TaxRemittanceEmbeddedHandle } from '../TaxRemittanceEmbedded';
2
+ /**
3
+ * Federal-only embedded widget.
4
+ * Includes: dashboard, federal payments (full flow), settings, entity creation.
5
+ * State payments and tax forms are excluded — those routes do not exist.
6
+ *
7
+ * @example
8
+ * const widgetRef = useRef<FederalPaymentWidgetHandle>(null)
9
+ *
10
+ * <FederalPaymentWidget
11
+ * ref={widgetRef}
12
+ * appKey="pk_..."
13
+ * accessToken={token}
14
+ * apiBaseUrl="https://api.zenwork.com"
15
+ * theme={{ primaryColor: '#1d4ed8' }}
16
+ * onSessionExpired={() => logout()}
17
+ * onNavigate={(routeKey, pathname) => syncSidebar(routeKey)}
18
+ * />
19
+ */
20
+ export type FederalPaymentWidgetProps = TaxRemittanceEmbeddedProps;
21
+ export type FederalPaymentWidgetHandle = TaxRemittanceEmbeddedHandle;
22
+ export declare const FederalPaymentWidget: import('react').ForwardRefExoticComponent<TaxRemittanceEmbeddedProps & import('react').RefAttributes<TaxRemittanceEmbeddedHandle>>;
@@ -0,0 +1,22 @@
1
+ import { TaxRemittanceEmbeddedProps, TaxRemittanceEmbeddedHandle } from '../TaxRemittanceEmbedded';
2
+ /**
3
+ * State-only embedded widget.
4
+ * Includes: dashboard, state payments (full flow), settings, entity creation.
5
+ * Federal payments and tax forms are excluded — those routes do not exist.
6
+ *
7
+ * @example
8
+ * const widgetRef = useRef<StatePaymentWidgetHandle>(null)
9
+ *
10
+ * <StatePaymentWidget
11
+ * ref={widgetRef}
12
+ * appKey="pk_..."
13
+ * accessToken={token}
14
+ * apiBaseUrl="https://api.zenwork.com"
15
+ * theme={{ primaryColor: '#7c3aed' }}
16
+ * onSessionExpired={() => logout()}
17
+ * onNavigate={(routeKey, pathname) => syncSidebar(routeKey)}
18
+ * />
19
+ */
20
+ export type StatePaymentWidgetProps = TaxRemittanceEmbeddedProps;
21
+ export type StatePaymentWidgetHandle = TaxRemittanceEmbeddedHandle;
22
+ export declare const StatePaymentWidget: import('react').ForwardRefExoticComponent<TaxRemittanceEmbeddedProps & import('react').RefAttributes<TaxRemittanceEmbeddedHandle>>;