@npm-zenwork/tax-remittance-ui 0.1.15 → 0.2.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.
@@ -0,0 +1,14 @@
1
+ export interface ZipRange {
2
+ from: number;
3
+ to: number;
4
+ }
5
+ export interface StateOption {
6
+ code: string;
7
+ name: string;
8
+ /** 3-digit ZIP prefix ranges (US only — empty for Canada). */
9
+ zipRanges: ZipRange[];
10
+ }
11
+ /** States/provinces for a country — `country` accepts "United States" or "Canada".
12
+ * US entries carry their ZIP prefix ranges so the caller can validate ZIP-vs-state
13
+ * locally without another request. */
14
+ export declare function getStates(country: string): Promise<StateOption[]>;
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ interface FormCardProps {
3
+ title: string;
4
+ subtitle?: string;
5
+ step?: number;
6
+ children: ReactNode;
7
+ className?: string;
8
+ }
9
+ /**
10
+ * Bordered card with a title/subtitle header — separates a form into named
11
+ * sections (e.g. Basic Information vs. Address Information) instead of one
12
+ * long field list. Matches the settings module's SettingsCard visual
13
+ * language (border, radius, heading hierarchy) so the two don't diverge.
14
+ * An optional numbered `step` badge helps orient multi-section forms.
15
+ */
16
+ export declare function FormCard({ title, subtitle, step, children, className }: FormCardProps): import("react").JSX.Element;
17
+ export {};
@@ -0,0 +1,16 @@
1
+ import { InputHTMLAttributes, SelectHTMLAttributes } from 'react';
2
+ interface PhoneInputGroupProps {
3
+ label?: string;
4
+ required?: boolean;
5
+ error?: string;
6
+ countryCodeSelectProps: SelectHTMLAttributes<HTMLSelectElement>;
7
+ phoneInputProps: InputHTMLAttributes<HTMLInputElement>;
8
+ }
9
+ /**
10
+ * Country-code select + phone number input rendered as one connected control
11
+ * with a shared focus ring, instead of two visually disconnected inputs.
12
+ * countryCode and phoneNumber stay separate registered fields — this is a
13
+ * purely visual grouping.
14
+ */
15
+ export declare function PhoneInputGroup({ label, required, error, countryCodeSelectProps, phoneInputProps, }: PhoneInputGroupProps): import("react").JSX.Element;
16
+ export {};
@@ -0,0 +1,22 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SegmentedControlOption<T extends string> {
3
+ label: string;
4
+ value: T;
5
+ icon?: ReactNode;
6
+ }
7
+ interface SegmentedControlProps<T extends string> {
8
+ label: string;
9
+ required?: boolean;
10
+ options: SegmentedControlOption<T>[];
11
+ value: T;
12
+ onChange: (value: T) => void;
13
+ }
14
+ /**
15
+ * Accessible segmented control (WAI-ARIA radiogroup pattern) for a small,
16
+ * mutually-exclusive set of options — e.g. Account Type. Renders as equal-width
17
+ * bordered cards (not a compact pill toggle) so it reads clearly at any
18
+ * viewport width, from a full row on desktop down to two narrow cards on
19
+ * mobile. Generic — not tied to any specific option set.
20
+ */
21
+ export declare function SegmentedControl<T extends string>({ label, required, options, value, onChange, }: SegmentedControlProps<T>): import("react").JSX.Element;
22
+ export {};
@@ -0,0 +1,17 @@
1
+ interface StickyActionFooterProps {
2
+ onCancel: () => void;
3
+ isSubmitting: boolean;
4
+ submitLabel: string;
5
+ submittingLabel: string;
6
+ cancelLabel?: string;
7
+ className?: string;
8
+ }
9
+ /**
10
+ * Cancel / submit action row, pinned to the bottom of its scroll container.
11
+ * `position: sticky` keeps it in normal document flow (so it never covers
12
+ * content permanently) while staying visible once the page/modal is scrolled
13
+ * past it. Works for both a full page scroll (Create Entity) and a modal
14
+ * whose footer already sits outside its own scrollable content area (Edit).
15
+ */
16
+ export declare function StickyActionFooter({ onCancel, isSubmitting, submitLabel, submittingLabel, cancelLabel, className, }: StickyActionFooterProps): import("react").JSX.Element;
17
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ interface SettingsCardProps {
3
+ title: string;
4
+ subtitle?: string;
5
+ children: ReactNode;
6
+ className?: string;
7
+ }
8
+ /**
9
+ * Bordered card used to separate a settings form into named sections (e.g.
10
+ * Common Information vs. a state's own tax registration fields) instead of
11
+ * one long field list. Generic — no client-specific styling.
12
+ */
13
+ export declare function SettingsCard({ title, subtitle, children, className }: SettingsCardProps): import("react").JSX.Element;
14
+ export {};
@@ -1,44 +1,18 @@
1
1
  export declare const virginiaCities: readonly ["Alexandria", "Arlington", "Chesapeake", "Hampton", "Lynchburg", "Newport News", "Norfolk", "Richmond", "Roanoke", "Virginia Beach"];
2
- export declare const taxAccountStates: {
3
- code: string;
4
- name: string;
5
- }[];
6
- export declare const virginiaSpecificFields: readonly [{
7
- readonly name: "virginiaTaxAccountId";
8
- readonly label: "Virginia Tax Account ID";
9
- readonly required: true;
10
- }, {
11
- readonly name: "virginiaWithholdingAccountingId";
12
- readonly label: "Virginia Withholding Accounting ID";
13
- readonly required: true;
14
- }, {
15
- readonly name: "unemploymentTaxAccountId";
16
- readonly label: "Unemployment Tax Account ID";
17
- readonly required: true;
18
- }, {
19
- readonly name: "virginiaDepartmentOfTaxationClientNumber";
20
- readonly label: "Virginia Department of Taxation Client Number";
21
- readonly required: true;
22
- }, {
23
- readonly name: "businessLocationCode";
24
- readonly label: "Business Location Code";
25
- readonly required: true;
26
- }, {
27
- readonly name: "franchiseTaxAccount";
28
- readonly label: "Franchise Tax Account";
29
- readonly required: true;
30
- }, {
31
- readonly name: "transientOccupancyTaxAccountId";
32
- readonly label: "Transient Occupancy Tax Account ID";
33
- readonly required: false;
34
- }, {
35
- readonly name: "certificateOfAuthorityNumber";
36
- readonly label: "Certificate of Authority Number (Foreign Entities)";
37
- readonly required: false;
38
- }];
39
- export declare const virginiaFullWidthFields: readonly [{
40
- readonly name: "licensedProfessionalEmployerEntityNumber";
41
- readonly label: "Licensed Professional Employer (POE) Entity Number";
42
- readonly required: false;
43
- }];
44
- export type VirginiaSpecificFieldName = (typeof virginiaSpecificFields)[number]['name'] | (typeof virginiaFullWidthFields)[number]['name'];
2
+ export type TaxAccountFieldName = 'virginiaTaxAccountId' | 'virginiaWithholdingAccountingId' | 'unemploymentTaxAccountId' | 'virginiaDepartmentOfTaxationClientNumber' | 'businessLocationCode' | 'franchiseTaxAccount' | 'transientOccupancyTaxAccountId' | 'certificateOfAuthorityNumber' | 'licensedProfessionalEmployerEntityNumber';
3
+ export interface TaxAccountFieldDef {
4
+ name: TaxAccountFieldName;
5
+ label: string;
6
+ required: boolean;
7
+ placeholder?: string;
8
+ }
9
+ export interface TaxAccountFieldGroup {
10
+ title: string;
11
+ fields: TaxAccountFieldDef[];
12
+ }
13
+ /**
14
+ * State-specific field sections, keyed by state code. A state with no entry
15
+ * here has no state-specific card rendered — supporting a new state is adding
16
+ * a key here, never a change to the form's rendering components.
17
+ */
18
+ export declare const STATE_TAX_FIELD_GROUPS: Partial<Record<string, TaxAccountFieldGroup[]>>;