@npm-zenwork/tax-remittance-ui 0.5.2 → 0.6.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.
- package/dist/components/dashboard/dashboardUtils.d.ts +1 -5
- package/dist/components/entities/EntityQuickActions.d.ts +13 -0
- package/dist/components/onboarding/EntityPrimaryTaxpayerFields.d.ts +3 -2
- package/dist/components/onboarding/entityHelpContent.d.ts +24 -0
- package/dist/components/payments/useJurisdictionLabel.d.ts +17 -0
- package/dist/embedded/ThemeProvider.d.ts +18 -0
- package/dist/index.cjs +32 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +7217 -7056
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -19,11 +19,7 @@ export interface PaymentCategorySummary {
|
|
|
19
19
|
failed: number;
|
|
20
20
|
percentDone: number;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Currency with cents always shown. The redesigned dashboard tables and charts
|
|
25
|
-
* print `$12,450.00` rather than dropping `.00`, unlike formatDashboardCurrency.
|
|
26
|
-
*/
|
|
22
|
+
/** Currency with cents always shown - `$12,450.00`, never `$12,450`. */
|
|
27
23
|
export declare function formatDashboardAmount(amount: number): string;
|
|
28
24
|
export interface TaxYearOption {
|
|
29
25
|
/** The year sent to the charts endpoint. */
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface EntityQuickActionsProps {
|
|
2
|
+
entityCount: number;
|
|
3
|
+
/** Where Add Entity returns to on Cancel — the page holding these buttons. */
|
|
4
|
+
from: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The `Entities (n)` / `Add Entity` pair. It leads the dashboard once the
|
|
8
|
+
* account has entities, and stands in for the payment CTAs on the payments page
|
|
9
|
+
* while it has none — there is nothing to file a payment against until an
|
|
10
|
+
* entity exists, so that is the action to offer.
|
|
11
|
+
*/
|
|
12
|
+
export declare function EntityQuickActions({ entityCount, from }: EntityQuickActionsProps): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FieldErrors, UseFormRegister, UseFormRegisterReturn } from 'react-hook-form';
|
|
2
2
|
import { EntityFormValues } from '../../types/entity';
|
|
3
|
+
import { HelpKey } from './entityHelpContent';
|
|
3
4
|
interface EntityPrimaryTaxpayerFieldsProps {
|
|
4
5
|
register: UseFormRegister<EntityFormValues>;
|
|
5
6
|
errors: FieldErrors<EntityFormValues>;
|
|
@@ -9,8 +10,8 @@ interface EntityPrimaryTaxpayerFieldsProps {
|
|
|
9
10
|
idLabel: string;
|
|
10
11
|
idPlaceholder: string;
|
|
11
12
|
idMaxLength: number;
|
|
12
|
-
|
|
13
|
+
focusHelp: (key: HelpKey) => () => void;
|
|
13
14
|
}
|
|
14
15
|
/** Individual account fields: the primary taxpayer's name, SSN and contact details. */
|
|
15
|
-
export declare function EntityPrimaryTaxpayerFields({ register, errors, einRegister, phoneRegister, accountType, idLabel, idPlaceholder, idMaxLength,
|
|
16
|
+
export declare function EntityPrimaryTaxpayerFields({ register, errors, einRegister, phoneRegister, accountType, idLabel, idPlaceholder, idMaxLength, focusHelp, }: EntityPrimaryTaxpayerFieldsProps): import("react").JSX.Element;
|
|
16
17
|
export {};
|
|
@@ -22,6 +22,22 @@ export declare const HELP_CONTENT: {
|
|
|
22
22
|
correct: string;
|
|
23
23
|
mistake: string;
|
|
24
24
|
};
|
|
25
|
+
firstName: {
|
|
26
|
+
title: string;
|
|
27
|
+
required: true;
|
|
28
|
+
description: string;
|
|
29
|
+
tips: string[];
|
|
30
|
+
correct: string;
|
|
31
|
+
mistake: string;
|
|
32
|
+
};
|
|
33
|
+
lastName: {
|
|
34
|
+
title: string;
|
|
35
|
+
required: true;
|
|
36
|
+
description: string;
|
|
37
|
+
tips: string[];
|
|
38
|
+
correct: string;
|
|
39
|
+
mistake: string;
|
|
40
|
+
};
|
|
25
41
|
legalBusinessName: {
|
|
26
42
|
title: string;
|
|
27
43
|
required: true;
|
|
@@ -70,6 +86,14 @@ export declare const HELP_CONTENT: {
|
|
|
70
86
|
correct: string;
|
|
71
87
|
mistake: string;
|
|
72
88
|
};
|
|
89
|
+
ssn: {
|
|
90
|
+
title: string;
|
|
91
|
+
required: true;
|
|
92
|
+
description: import("react").JSX.Element;
|
|
93
|
+
tips: string[];
|
|
94
|
+
correct: string;
|
|
95
|
+
mistake: string;
|
|
96
|
+
};
|
|
73
97
|
address1: {
|
|
74
98
|
title: string;
|
|
75
99
|
required: true;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StatePaymentStateOption } from '../../types/statePayment';
|
|
2
|
+
/**
|
|
3
|
+
* The jurisdiction column reads as the plain state name — `California`, per the
|
|
4
|
+
* Figma — while the API labels state rows with a bracketed qualifier and, in
|
|
5
|
+
* some payloads, the code alone (`CA (State)`). This drops that bracket and
|
|
6
|
+
* resolves a code to its full name.
|
|
7
|
+
*
|
|
8
|
+
* Only those two shapes are touched: a label that is already a name, or an
|
|
9
|
+
* agency name of its own (`IRS - Federal`, `New York DTF`), is left exactly as
|
|
10
|
+
* the API sent it.
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatJurisdictionLabel(raw: string, states: StatePaymentStateOption[]): string;
|
|
13
|
+
/**
|
|
14
|
+
* Formatter for jurisdiction labels, backed by the state list the payment form
|
|
15
|
+
* already caches — no extra request on the dashboard or payments table.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useJurisdictionLabel(): (raw: string) => string;
|
|
@@ -30,6 +30,22 @@ interface ThemeProviderProps {
|
|
|
30
30
|
theme?: TaxRemittanceTheme;
|
|
31
31
|
children: ReactNode;
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* The element modals, drawers, dropdowns and toasts must portal into.
|
|
35
|
+
*
|
|
36
|
+
* Do not portal to `document.body` directly. Every rule this package ships is scoped
|
|
37
|
+
* under `.tax-remittance-embedded` so it cannot leak into the host application, which
|
|
38
|
+
* means anything mounted outside that subtree receives none of it — a modal portaled
|
|
39
|
+
* to `document.body` renders as an unstyled static block at the end of the page, with
|
|
40
|
+
* no positioning, backdrop or z-index, and is effectively invisible.
|
|
41
|
+
*
|
|
42
|
+
* This root is a body-level sibling carrying the widget class and the theme variables,
|
|
43
|
+
* so portalled content is styled correctly while still escaping the host's overflow
|
|
44
|
+
* and stacking contexts the way `document.body` did.
|
|
45
|
+
*
|
|
46
|
+
* Always returns an element, so callers can hand it straight to `createPortal`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function usePortalRoot(): HTMLElement;
|
|
33
49
|
/**
|
|
34
50
|
* Injects the client's brand colors as CSS custom properties on the
|
|
35
51
|
* `.tax-remittance-embedded` wrapper div.
|
|
@@ -42,6 +58,8 @@ interface ThemeProviderProps {
|
|
|
42
58
|
* `index.css` maps Tailwind's `--color-brand-*` tokens to these vars
|
|
43
59
|
* inside the `.tax-remittance-embedded` scope, so shared components
|
|
44
60
|
* like `<Button>` and `<Input>` automatically respect client themes.
|
|
61
|
+
*
|
|
62
|
+
* It also owns the portal root — see `usePortalRoot`.
|
|
45
63
|
*/
|
|
46
64
|
export declare function ThemeProvider({ theme, children }: ThemeProviderProps): import("react").JSX.Element;
|
|
47
65
|
export {};
|