@veevarts/design-system 1.17.0-alpha.1 → 1.17.0-alpha.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.
Files changed (70) hide show
  1. package/dist/index.cjs +10 -4
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.js +4509 -3396
  4. package/dist/patterns/ActingAsToggle/ActingAsToggle.d.ts +3 -0
  5. package/dist/patterns/ActingAsToggle/index.d.ts +2 -0
  6. package/dist/patterns/ActingAsToggle/types.d.ts +13 -0
  7. package/dist/patterns/AdminTable/AdminTable.d.ts +42 -0
  8. package/dist/patterns/AdminTable/index.d.ts +3 -0
  9. package/dist/patterns/AdminTable/styles.d.ts +34 -0
  10. package/dist/patterns/AdminTextField/AdminTextField.d.ts +39 -0
  11. package/dist/patterns/AdminTextField/index.d.ts +3 -0
  12. package/dist/patterns/AdminTextField/styles.d.ts +35 -0
  13. package/dist/patterns/AdminToolbar/AdminToolbar.d.ts +18 -0
  14. package/dist/patterns/AdminToolbar/index.d.ts +2 -0
  15. package/dist/patterns/CustomAmountField/CustomAmountField.d.ts +3 -0
  16. package/dist/patterns/CustomAmountField/index.d.ts +2 -0
  17. package/dist/patterns/CustomAmountField/types.d.ts +21 -0
  18. package/dist/patterns/DimensionChip/index.d.ts +13 -2
  19. package/dist/patterns/{DimensionChip/DimensionChip.d.ts → KeyValueChip/KeyValueChip.d.ts} +4 -4
  20. package/dist/patterns/KeyValueChip/index.d.ts +2 -0
  21. package/dist/patterns/MoneyBackMethods/MoneyBackMethods.d.ts +4 -0
  22. package/dist/patterns/MoneyBackMethods/index.d.ts +2 -0
  23. package/dist/patterns/MoneyBackMethods/types.d.ts +44 -0
  24. package/dist/patterns/NotesField/NotesField.d.ts +3 -0
  25. package/dist/patterns/NotesField/index.d.ts +2 -0
  26. package/dist/patterns/NotesField/types.d.ts +12 -0
  27. package/dist/patterns/PaginationSummary/PaginationSummary.d.ts +26 -0
  28. package/dist/patterns/PaginationSummary/index.d.ts +3 -0
  29. package/dist/patterns/PaginationSummary/page-range.d.ts +19 -0
  30. package/dist/patterns/PaymentSubAmountInput/PaymentSubAmountInput.d.ts +9 -0
  31. package/dist/patterns/PickerRow/PickerRow.d.ts +27 -0
  32. package/dist/patterns/PickerRow/index.d.ts +2 -0
  33. package/dist/patterns/ReasonSelect/ReasonSelect.d.ts +3 -0
  34. package/dist/patterns/ReasonSelect/index.d.ts +2 -0
  35. package/dist/patterns/ReasonSelect/types.d.ts +17 -0
  36. package/dist/patterns/RefundCompleteView/RefundCompleteView.d.ts +3 -0
  37. package/dist/patterns/RefundCompleteView/index.d.ts +2 -0
  38. package/dist/patterns/RefundCompleteView/types.d.ts +22 -0
  39. package/dist/patterns/RefundItemList/RefundItemList.d.ts +3 -0
  40. package/dist/patterns/RefundItemList/index.d.ts +2 -0
  41. package/dist/patterns/RefundItemList/types.d.ts +40 -0
  42. package/dist/patterns/RefundTotalBar/RefundTotalBar.d.ts +3 -0
  43. package/dist/patterns/RefundTotalBar/index.d.ts +2 -0
  44. package/dist/patterns/RefundTotalBar/types.d.ts +13 -0
  45. package/dist/patterns/RowActions/RowActions.d.ts +17 -0
  46. package/dist/patterns/RowActions/index.d.ts +2 -0
  47. package/dist/patterns/SplitRefundPanel/SplitRefundPanel.d.ts +4 -0
  48. package/dist/patterns/SplitRefundPanel/index.d.ts +2 -0
  49. package/dist/patterns/SplitRefundPanel/types.d.ts +51 -0
  50. package/dist/patterns/SupervisorPinField/SupervisorPinField.d.ts +3 -0
  51. package/dist/patterns/SupervisorPinField/index.d.ts +2 -0
  52. package/dist/patterns/SupervisorPinField/types.d.ts +12 -0
  53. package/dist/patterns/TableSkeleton/TableSkeleton.d.ts +32 -0
  54. package/dist/patterns/TableSkeleton/index.d.ts +2 -0
  55. package/dist/patterns/UnderlineTabs/UnderlineTabs.d.ts +18 -0
  56. package/dist/patterns/UnderlineTabs/index.d.ts +2 -0
  57. package/dist/patterns/WizardShell/WizardShell.d.ts +4 -0
  58. package/dist/patterns/WizardShell/index.d.ts +2 -0
  59. package/dist/patterns/WizardShell/types.d.ts +29 -0
  60. package/dist/patterns/grid-columns.d.ts +1 -1
  61. package/dist/patterns/index.d.ts +43 -4
  62. package/dist/patterns/refund-shared/index.d.ts +1 -0
  63. package/dist/patterns/refund-shared/types.d.ts +12 -0
  64. package/dist/tailwind/index.d.ts +4 -0
  65. package/dist/tailwind/index.js +68 -1
  66. package/dist/tokens/admin-surface.d.ts +58 -0
  67. package/dist/tokens/index.d.ts +2 -0
  68. package/package.json +1 -1
  69. package/dist/patterns/CheckboxCardGroup/CheckboxCardGroup.d.ts +0 -53
  70. package/dist/patterns/CheckboxCardGroup/index.d.ts +0 -2
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { ActingAsToggleProps } from './types';
3
+ export declare const ActingAsToggle: React.FC<ActingAsToggleProps>;
@@ -0,0 +1,2 @@
1
+ export { ActingAsToggle } from './ActingAsToggle';
2
+ export type { ActingAsToggleProps, ActingRole, ActingAsToggleLabels } from './types';
@@ -0,0 +1,13 @@
1
+ export type ActingRole = 'manager' | 'cashier';
2
+ export interface ActingAsToggleLabels {
3
+ legend?: string;
4
+ manager?: string;
5
+ cashier?: string;
6
+ }
7
+ export interface ActingAsToggleProps {
8
+ role: ActingRole;
9
+ onChange: (role: ActingRole) => void;
10
+ labels?: ActingAsToggleLabels;
11
+ className?: string;
12
+ 'data-testid'?: string;
13
+ }
@@ -0,0 +1,42 @@
1
+ import { default as React } from 'react';
2
+ import { TableBody } from '../../components';
3
+ export interface AdminTableColumn {
4
+ /** Stable identity for the column, and the key its cells are matched on. */
5
+ key: string;
6
+ /** Header text. Pass an empty string for a control column. */
7
+ label: React.ReactNode;
8
+ /** Cell alignment. Numeric columns should be `'right'`. */
9
+ align?: 'left' | 'right';
10
+ /** Fixed pixel width. Omit to let the column size to content. */
11
+ width?: number;
12
+ }
13
+ export interface AdminTableClassNames {
14
+ base?: string;
15
+ table?: string;
16
+ th?: string;
17
+ tr?: string;
18
+ td?: string;
19
+ footer?: string;
20
+ }
21
+ export interface AdminTableProps {
22
+ columns: AdminTableColumn[];
23
+ /**
24
+ * HeroUI `TableRow` children.
25
+ *
26
+ * Typed as HeroUI's own body-children type rather than `ReactNode`, so the
27
+ * collection contract is enforced where you write it: passing a bare `<tr>`
28
+ * is a type error here instead of `Unknown element <tr> in collection` at
29
+ * render time.
30
+ */
31
+ children: React.ComponentProps<typeof TableBody>['children'];
32
+ /** Shown when there are no rows. */
33
+ emptyContent?: React.ReactNode;
34
+ /** Rendered under the table — where a pager goes. */
35
+ footer?: React.ReactNode;
36
+ /** Accessible name. Required: a table with no name is unnavigable by screen reader. */
37
+ ariaLabel: string;
38
+ className?: string;
39
+ classNames?: AdminTableClassNames;
40
+ 'data-testid'?: string;
41
+ }
42
+ export declare const AdminTable: React.FC<AdminTableProps>;
@@ -0,0 +1,3 @@
1
+ export { AdminTable } from './AdminTable';
2
+ export type { AdminTableProps, AdminTableColumn, AdminTableClassNames } from './AdminTable';
3
+ export { adminRowClass, adminTableClass, adminTableFooterClass, adminTdClass, adminThClass, } from './styles';
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The back-office table's appearance, in one place.
3
+ *
4
+ * `AdminTable` feeds these to HeroUI's slots; nothing here is spelled a second
5
+ * time inside the component. They started out split — exported strings here,
6
+ * "internal" ones inline — and the two immediately drifted: `adminTdClass` and
7
+ * the `td` slot were the same declaration with one dropping `align-middle`, and
8
+ * the row hover existed as both `hover:` and `data-[hover=true]:`. That is the
9
+ * exact failure these components were built to stop, so the split is gone.
10
+ *
11
+ * They are exported for the one screen that cannot use `AdminTable`: react-aria's
12
+ * collection API rejects an interleaved `<tr>`, so a table that expands a row
13
+ * into a full-width panel renders its own `<table>` and dresses it with these.
14
+ *
15
+ * The arbitrary values (`text-[11px]`, `tracking-[.04em]`) are the mockups'
16
+ * measurements, pinned rather than rounded to the nearest scale step: these
17
+ * surfaces are pixel-ports of signed-off designs.
18
+ */
19
+ /** Uppercase column header. `bg-transparent` overrides HeroUI's own header fill. */
20
+ export declare const adminThClass = "text-left text-[11px] font-semibold uppercase tracking-[.04em] text-acct-muted px-4 pt-4 pb-3 whitespace-nowrap bg-transparent";
21
+ /** Body cell. */
22
+ export declare const adminTdClass = "px-4 text-[13.5px] text-acct-ink2 align-middle";
23
+ /**
24
+ * Row hairline and hover.
25
+ *
26
+ * Carries both hover spellings on purpose: `data-[hover=true]:` is what HeroUI
27
+ * sets on its own rows, and `hover:` is what a plain `<tr>` responds to. One
28
+ * string serves both so the two renderings cannot look different.
29
+ */
30
+ export declare const adminRowClass = "border-t border-acct-hair transition-colors duration-150 hover:bg-acct-page data-[hover=true]:bg-acct-page";
31
+ /** The table element itself. */
32
+ export declare const adminTableClass = "w-full";
33
+ /** The strip under the table where a pager sits. */
34
+ export declare const adminTableFooterClass = "border-t border-acct-border px-5 py-3.5";
@@ -0,0 +1,39 @@
1
+ import { default as React } from 'react';
2
+ interface AdminTextFieldBase {
3
+ /** Uppercase label above the control. Omit only when an adjacent element already names it. */
4
+ label?: React.ReactNode;
5
+ value: string;
6
+ placeholder?: string;
7
+ disabled?: boolean;
8
+ /** Monospace face without the read-only treatment, for codes the user types. */
9
+ mono?: boolean;
10
+ /** Claim initial focus. Only for the first field of a dialog, never on a page. */
11
+ autoFocus?: boolean;
12
+ /** Small helper or error text under the control. */
13
+ hint?: React.ReactNode;
14
+ /** Renders the hint as an error and marks the control invalid. */
15
+ invalid?: boolean;
16
+ className?: string;
17
+ 'data-testid'?: string;
18
+ }
19
+ /**
20
+ * `onChange` is REQUIRED unless the field is read-only.
21
+ *
22
+ * This is a controlled input: given a `value` and no handler, React pins it and
23
+ * typing does nothing — a field that looks editable, accepts focus, and silently
24
+ * discards every keystroke. That is indistinguishable from a bug at a glance,
25
+ * and it is what happens by accident when someone renders one to show a value.
26
+ *
27
+ * Showing a value without accepting edits is a real case, so it stays possible;
28
+ * it just has to be said, with `readOnly`, which also renders it as system-owned
29
+ * and announces it correctly.
30
+ */
31
+ export type AdminTextFieldProps = AdminTextFieldBase & ({
32
+ readOnly: true;
33
+ onChange?: never;
34
+ } | {
35
+ readOnly?: false;
36
+ onChange: (value: string) => void;
37
+ });
38
+ export declare const AdminTextField: React.FC<AdminTextFieldProps>;
39
+ export {};
@@ -0,0 +1,3 @@
1
+ export { AdminTextField } from './AdminTextField';
2
+ export type { AdminTextFieldProps } from './AdminTextField';
3
+ export { adminFieldErrorClass, adminFieldHintClass, adminFieldLabelClass, adminInputClass, adminInputReadOnlyClass, adminInputWrapperClass, } from './styles';
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The back-office field's appearance, in one place.
3
+ *
4
+ * `AdminTextField` feeds these to HeroUI's `Input` slots; nothing here is
5
+ * spelled a second time inside the component. Splitting them — exported strings
6
+ * here, "internal" ones inline — is what let this file and its component drift
7
+ * apart, so every slot's styling lives here whether or not a consumer needs it.
8
+ *
9
+ * They are exported so a form with a control this component does not cover (a
10
+ * textarea, a date picker) can dress its HeroUI counterpart identically rather
11
+ * than approximating it.
12
+ *
13
+ * The arbitrary values are the mockups' measurements, pinned rather than rounded
14
+ * to the nearest scale step: these surfaces are pixel-ports of signed-off
15
+ * designs.
16
+ */
17
+ /** Uppercase label above a control — HeroUI's `label` slot. */
18
+ export declare const adminFieldLabelClass = "text-[11px] font-semibold uppercase tracking-[.04em] text-acct-muted mb-1.5";
19
+ /**
20
+ * The 38px box — HeroUI's `inputWrapper` slot, which carries the border and
21
+ * background (the `input` slot is the bare field).
22
+ *
23
+ * `!h-[38px]` because HeroUI sets its own height per size, and the
24
+ * `data-[hover=]` / `group-data-[focus=]` hooks because overriding the plain
25
+ * classes alone leaves its own hover and focus borders showing through.
26
+ */
27
+ export declare const adminInputWrapperClass: string;
28
+ /** The bare field — HeroUI's `input` slot. */
29
+ export declare const adminInputClass = "text-[13.5px] text-acct-ink";
30
+ /** A value the system minted rather than the user: muted fill, not editable. */
31
+ export declare const adminInputReadOnlyClass = "bg-acct-page text-acct-muted cursor-default";
32
+ /** Helper text under the control — HeroUI's `description` slot. */
33
+ export declare const adminFieldHintClass = "mt-[5px] text-xs text-acct-sub";
34
+ /** Error text under the control — HeroUI's `errorMessage` slot. */
35
+ export declare const adminFieldErrorClass = "mt-[5px] text-xs text-acct-danger";
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ export interface AdminToolbarProps {
3
+ searchValue: string;
4
+ onSearchChange: (value: string) => void;
5
+ /** Placeholder AND the hidden label, so the field is named even once filled. */
6
+ searchLabel: string;
7
+ /** Leading glyph inside the search box. */
8
+ searchIcon?: React.ReactNode;
9
+ /** Filters, sort pickers, a toggle — laid out after the search box. */
10
+ children?: React.ReactNode;
11
+ /** Pushed to the far right, for a primary action. */
12
+ trailing?: React.ReactNode;
13
+ /** Search box width. `'md'` (280px) by default, `'lg'` (360px) for wide tables. */
14
+ searchWidth?: 'md' | 'lg';
15
+ className?: string;
16
+ 'data-testid'?: string;
17
+ }
18
+ export declare const AdminToolbar: React.FC<AdminToolbarProps>;
@@ -0,0 +1,2 @@
1
+ export { AdminToolbar } from './AdminToolbar';
2
+ export type { AdminToolbarProps } from './AdminToolbar';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { CustomAmountFieldProps } from './types';
3
+ export declare const CustomAmountField: React.FC<CustomAmountFieldProps>;
@@ -0,0 +1,2 @@
1
+ export { CustomAmountField } from './CustomAmountField';
2
+ export type { CustomAmountFieldProps, CustomAmountFieldLabels, CustomAmountFieldValue } from './types';
@@ -0,0 +1,21 @@
1
+ import { Money } from '../../utils/money';
2
+ export type { Money } from '../../utils/money';
3
+ export interface CustomAmountFieldLabels {
4
+ amountLabel?: string;
5
+ descriptionLabel?: string;
6
+ maxHint?: string;
7
+ }
8
+ export interface CustomAmountFieldValue {
9
+ amount: number | null;
10
+ description: string;
11
+ }
12
+ export interface CustomAmountFieldProps {
13
+ amount: number | null;
14
+ description: string;
15
+ max: Money;
16
+ error?: string;
17
+ onChange: (value: CustomAmountFieldValue) => void;
18
+ labels?: CustomAmountFieldLabels;
19
+ className?: string;
20
+ 'data-testid'?: string;
21
+ }
@@ -1,2 +1,13 @@
1
- export { DimensionChip } from './DimensionChip';
2
- export type { DimensionChipProps } from './DimensionChip';
1
+ /**
2
+ * @deprecated Use `KeyValueChip`. Same component, domain-neutral name.
3
+ *
4
+ * It shipped named after the accounting ledger's cost-center tags, which is
5
+ * what it was first built for and not what it is: it only ever knew
6
+ * "label: value", never what a dimension was. The name is what kept every
7
+ * other team from reaching for it.
8
+ *
9
+ * Kept as an alias so consumers on 1.21+ do not break. Remove on the next
10
+ * major, once the remaining imports have moved.
11
+ */
12
+ export { KeyValueChip as DimensionChip } from '../KeyValueChip';
13
+ export type { KeyValueChipProps as DimensionChipProps } from '../KeyValueChip';
@@ -1,12 +1,12 @@
1
1
  import { default as React } from 'react';
2
- export interface DimensionChipProps {
3
- /** Muted leading text — the category/type (e.g. a dimension-type name). */
2
+ export interface KeyValueChipProps {
3
+ /** Muted leading text — what the value describes (a field, category or type name). */
4
4
  label: React.ReactNode;
5
- /** Emphasised trailing text — the selected value. */
5
+ /** Emphasised trailing text — the value itself. */
6
6
  value: React.ReactNode;
7
7
  /** Chip size. `'sm'` (default) for dense tables, `'md'` for detail panels. */
8
8
  size?: 'sm' | 'md';
9
9
  className?: string;
10
10
  'data-testid'?: string;
11
11
  }
12
- export declare const DimensionChip: React.FC<DimensionChipProps>;
12
+ export declare const KeyValueChip: React.FC<KeyValueChipProps>;
@@ -0,0 +1,2 @@
1
+ export { KeyValueChip } from './KeyValueChip';
2
+ export type { KeyValueChipProps } from './KeyValueChip';
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { MoneyBackMethodsProps } from './types';
3
+ export declare const MoneyBackMethods: React.FC<MoneyBackMethodsProps>;
4
+ export default MoneyBackMethods;
@@ -0,0 +1,2 @@
1
+ export { MoneyBackMethods } from './MoneyBackMethods';
2
+ export type { MoneyBackMethodsProps, MoneyBackMethodsLabels, TenderView, TenderKind } from './types';
@@ -0,0 +1,44 @@
1
+ import { Money } from '../../utils/money';
2
+ import { MoneyBackError } from '..';
3
+ export type { Money } from '../../utils/money';
4
+ export type TenderKind = 'card' | 'cash' | 'check' | 'other';
5
+ export interface TenderView {
6
+ /** Stable identifier returned via `onSelect`. */
7
+ tenderId: string;
8
+ /**
9
+ * One-line description shown on the tile. Examples:
10
+ * - `'Visa •••4242'`
11
+ * - `'Cash'`
12
+ */
13
+ label: string;
14
+ /** Canonical category used to pick the tile icon. */
15
+ kind: TenderKind;
16
+ /** Amount still refundable to this tender. */
17
+ maxRefundable: Money;
18
+ }
19
+ export interface MoneyBackMethodsLabels {
20
+ /** Optional heading rendered above the tile grid. */
21
+ title?: string;
22
+ split?: string;
23
+ declinedTitle?: string;
24
+ declinedBody?: string;
25
+ networkTitle?: string;
26
+ networkBody?: string;
27
+ retry?: string;
28
+ chooseDifferent?: string;
29
+ }
30
+ export interface MoneyBackMethodsProps {
31
+ /** Refundable tenders, one tile each. */
32
+ tenders: TenderView[];
33
+ /** Currently selected tender `tenderId`. `null` = no selection. */
34
+ selectedTenderId: string | null;
35
+ /** Fires when a tender tile is selected. */
36
+ onSelect: (tenderId: string) => void;
37
+ /** Fires when the "split across multiple methods" tile is selected. */
38
+ onSplit: () => void;
39
+ /** Processor-declined / network-error banner, shown above the tiles. */
40
+ error?: MoneyBackError;
41
+ labels?: MoneyBackMethodsLabels;
42
+ className?: string;
43
+ 'data-testid'?: string;
44
+ }
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { NotesFieldProps } from './types';
3
+ export declare const NotesField: React.FC<NotesFieldProps>;
@@ -0,0 +1,2 @@
1
+ export { NotesField } from './NotesField';
2
+ export type { NotesFieldProps, NotesFieldLabels } from './types';
@@ -0,0 +1,12 @@
1
+ export interface NotesFieldLabels {
2
+ toggle?: string;
3
+ optionalTag?: string;
4
+ }
5
+ export interface NotesFieldProps {
6
+ value: string;
7
+ onChange: (value: string) => void;
8
+ maxLength?: number;
9
+ labels?: NotesFieldLabels;
10
+ className?: string;
11
+ 'data-testid'?: string;
12
+ }
@@ -0,0 +1,26 @@
1
+ import { default as React } from 'react';
2
+ export interface PaginationSummaryClassNames {
3
+ base?: string;
4
+ emphasis?: string;
5
+ }
6
+ export interface PaginationSummaryProps {
7
+ /** Current page, 1-based. */
8
+ page: number;
9
+ /** Rows per page. */
10
+ pageSize: number;
11
+ /** Total rows across all pages, not the length of the current page. */
12
+ total: number;
13
+ /** What is being counted, already pluralised (e.g. `"entries"`). */
14
+ unit?: React.ReactNode;
15
+ /**
16
+ * Announce range changes to assistive tech. On by default: paging is a
17
+ * user-initiated change whose only text confirmation is this line. Turn it
18
+ * off when the surrounding table already announces its own updates, to
19
+ * avoid reading the change twice.
20
+ */
21
+ announce?: boolean;
22
+ className?: string;
23
+ classNames?: PaginationSummaryClassNames;
24
+ 'data-testid'?: string;
25
+ }
26
+ export declare const PaginationSummary: React.FC<PaginationSummaryProps>;
@@ -0,0 +1,3 @@
1
+ export { PaginationSummary } from './PaginationSummary';
2
+ export type { PaginationSummaryProps, PaginationSummaryClassNames } from './PaginationSummary';
3
+ export { pageRange } from './page-range';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The inclusive 1-based range covered by the current page.
3
+ *
4
+ * Its own module rather than a second export from `PaginationSummary.tsx`, so
5
+ * that file exports only its component (`react-refresh/only-export-components`).
6
+ * It is exported at all because the arithmetic, not the markup, is what callers
7
+ * reuse: one rendering its own sentence (another language, another emphasis)
8
+ * should not have to restate the edge cases.
9
+ *
10
+ * - No rows at all → `0–0`, so the caller can render "0 of 0" rather than the
11
+ * `1–0` that the naive formula produces.
12
+ * - Last page → `to` is clamped to `total`, never `page * pageSize`.
13
+ * - `page` past the end (a filter that shrank the result set before the page
14
+ * state caught up) → an empty range rather than a negative one.
15
+ */
16
+ export declare function pageRange(page: number, pageSize: number, total: number): {
17
+ from: number;
18
+ to: number;
19
+ };
@@ -49,6 +49,15 @@ export interface PaymentSubAmountInputProps {
49
49
  * guard is value-based. Omit for no cap.
50
50
  */
51
51
  maxAmount?: number;
52
+ /**
53
+ * Visually hides the section heading and the input's own label
54
+ * (via `sr-only`) for compact compositions that already supply
55
+ * their own surrounding label context (e.g. `CustomAmountField`,
56
+ * `RefundItemList`'s partial-amount box). Both stay in the DOM so
57
+ * the accessible name is preserved for assistive tech. Default
58
+ * `false` — zero behavior change for existing consumers.
59
+ */
60
+ hideHeading?: boolean;
52
61
  'data-testid'?: string;
53
62
  className?: string;
54
63
  }
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ export interface PickerRowProps {
3
+ /** Rendered inside the trigger when a value is set. Omit for the empty state. */
4
+ children?: React.ReactNode;
5
+ /** Shown when there is no value. */
6
+ placeholder?: string;
7
+ /** Opens the picker. */
8
+ onOpen: () => void;
9
+ /** Clears the value. Omitted or undefined hides the clear button entirely. */
10
+ onClear?: () => void;
11
+ /**
12
+ * Accessible name for the trigger. Say what is being picked, not what is
13
+ * picked: "Revenue account" reads better than repeating the value, which the
14
+ * content already announces.
15
+ */
16
+ ariaLabel: string;
17
+ /** Leading glyph. Pass an inline SVG. */
18
+ icon?: React.ReactNode;
19
+ /** Trailing affordance, normally a chevron. Pass an inline SVG. */
20
+ trailingIcon?: React.ReactNode;
21
+ /** Glyph for the clear button. Pass an inline SVG. */
22
+ clearIcon?: React.ReactNode;
23
+ disabled?: boolean;
24
+ className?: string;
25
+ 'data-testid'?: string;
26
+ }
27
+ export declare const PickerRow: React.FC<PickerRowProps>;
@@ -0,0 +1,2 @@
1
+ export { PickerRow } from './PickerRow';
2
+ export type { PickerRowProps } from './PickerRow';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { ReasonSelectProps } from './types';
3
+ export declare const ReasonSelect: React.FC<ReasonSelectProps>;
@@ -0,0 +1,2 @@
1
+ export { ReasonSelect } from './ReasonSelect';
2
+ export type { ReasonSelectProps, ReasonOption, ReasonSelectLabels } from './types';
@@ -0,0 +1,17 @@
1
+ export interface ReasonOption {
2
+ id: string;
3
+ label: string;
4
+ }
5
+ export interface ReasonSelectLabels {
6
+ label?: string;
7
+ placeholder?: string;
8
+ }
9
+ export interface ReasonSelectProps {
10
+ options: ReasonOption[];
11
+ value: string | null;
12
+ onChange: (id: string) => void;
13
+ error?: string;
14
+ labels?: ReasonSelectLabels;
15
+ className?: string;
16
+ 'data-testid'?: string;
17
+ }
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { RefundCompleteViewProps } from './types';
3
+ export declare const RefundCompleteView: React.FC<RefundCompleteViewProps>;
@@ -0,0 +1,2 @@
1
+ export { RefundCompleteView } from './RefundCompleteView';
2
+ export type { RefundCompleteViewProps, RefundCompleteViewLabels } from './types';
@@ -0,0 +1,22 @@
1
+ import { RefundDestinationLine } from '..';
2
+ export type { RefundDestinationLine, RefundDestinationStatus } from '..';
3
+ export interface RefundCompleteViewLabels {
4
+ processing?: string;
5
+ title?: string;
6
+ destinationsTitle?: string;
7
+ sendReceipt?: string;
8
+ email?: string;
9
+ print?: string;
10
+ done?: string;
11
+ pending?: string;
12
+ succeeded?: string;
13
+ }
14
+ export interface RefundCompleteViewProps {
15
+ state: 'processing' | 'complete';
16
+ destinations: RefundDestinationLine[];
17
+ onSendReceipt?: (channel: 'email' | 'print') => void;
18
+ onDone: () => void;
19
+ labels?: RefundCompleteViewLabels;
20
+ className?: string;
21
+ 'data-testid'?: string;
22
+ }
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { RefundItemListProps } from './types';
3
+ export declare const RefundItemList: React.FC<RefundItemListProps>;
@@ -0,0 +1,2 @@
1
+ export { RefundItemList } from './RefundItemList';
2
+ export type { RefundItemListProps, RefundItemView, RefundItemState, RefundItemRestockView, ItemSelection, RefundItemListLabels, } from './types';
@@ -0,0 +1,40 @@
1
+ import { Money } from '../../utils/money';
2
+ export type { Money } from '../../utils/money';
3
+ export type RefundItemState = 'selectable' | 'already_refunded' | 'non_refundable';
4
+ export interface RefundItemRestockView {
5
+ available: boolean;
6
+ unavailableHint?: string;
7
+ on: boolean;
8
+ }
9
+ export interface RefundItemView {
10
+ id: string;
11
+ name: string;
12
+ quantity: number;
13
+ paidAmount: Money;
14
+ state: RefundItemState;
15
+ warning?: string;
16
+ restock: RefundItemRestockView;
17
+ }
18
+ export interface ItemSelection {
19
+ selected: boolean;
20
+ mode: 'full' | 'partial';
21
+ partialAmount?: number;
22
+ }
23
+ export interface RefundItemListLabels {
24
+ refunded?: string;
25
+ ineligible?: string;
26
+ partialLink?: string;
27
+ partialOf?: string;
28
+ partialCancel?: string;
29
+ restockTitle?: string;
30
+ restockHint?: string;
31
+ }
32
+ export interface RefundItemListProps {
33
+ items: RefundItemView[];
34
+ selections: Record<string, ItemSelection>;
35
+ onSelectionChange: (itemId: string, selection: ItemSelection) => void;
36
+ onRestockToggle: (itemId: string, on: boolean) => void;
37
+ labels?: RefundItemListLabels;
38
+ className?: string;
39
+ 'data-testid'?: string;
40
+ }
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { RefundTotalBarProps } from './types';
3
+ export declare const RefundTotalBar: React.FC<RefundTotalBarProps>;
@@ -0,0 +1,2 @@
1
+ export { RefundTotalBar } from './RefundTotalBar';
2
+ export type { RefundTotalBarProps, RefundTotalBarLabels } from './types';
@@ -0,0 +1,13 @@
1
+ import { Money } from '../../utils/money';
2
+ export type { Money } from '../../utils/money';
3
+ export interface RefundTotalBarLabels {
4
+ title?: string;
5
+ partialBadge?: string;
6
+ }
7
+ export interface RefundTotalBarProps {
8
+ total: Money;
9
+ isPartial: boolean;
10
+ labels?: RefundTotalBarLabels;
11
+ className?: string;
12
+ 'data-testid'?: string;
13
+ }
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ export interface RowAction {
3
+ key: string;
4
+ /** Accessible name AND tooltip. Include the subject: "Edit Annual Fund", not "Edit". */
5
+ label: string;
6
+ icon: React.ReactNode;
7
+ onPress: () => void;
8
+ disabled?: boolean;
9
+ }
10
+ export interface RowActionsProps {
11
+ actions: RowAction[];
12
+ /** Button edge length. `'md'` (30px) by default, `'sm'` (24px) for dense rows. */
13
+ size?: 'sm' | 'md';
14
+ className?: string;
15
+ 'data-testid'?: string;
16
+ }
17
+ export declare const RowActions: React.FC<RowActionsProps>;
@@ -0,0 +1,2 @@
1
+ export { RowActions } from './RowActions';
2
+ export type { RowActionsProps, RowAction } from './RowActions';
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { SplitRefundPanelProps } from './types';
3
+ export declare const SplitRefundPanel: React.FC<SplitRefundPanelProps>;
4
+ export default SplitRefundPanel;
@@ -0,0 +1,2 @@
1
+ export { SplitRefundPanel } from './SplitRefundPanel';
2
+ export type { SplitRefundPanelProps, SplitRefundPanelLabels, SplitPartView } from './types';