@veevarts/design-system 1.17.0-beta.6 → 1.17.0-beta.8

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 (76) hide show
  1. package/dist/index.cjs +10 -4
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.js +5361 -4193
  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 +44 -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 +20 -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/FeedbackState/FeedbackState.d.ts +1 -1
  20. package/dist/patterns/FeedbackState/type.d.ts +15 -0
  21. package/dist/patterns/InstallmentFundAssignment/InstallmentFundAssignment.d.ts +1 -1
  22. package/dist/patterns/InstallmentFundAssignment/types.d.ts +1 -0
  23. package/dist/patterns/InstallmentSchedule/InstallmentTable.d.ts +1 -1
  24. package/dist/patterns/InstallmentSchedule/types.d.ts +12 -0
  25. package/dist/patterns/{DimensionChip/DimensionChip.d.ts → KeyValueChip/KeyValueChip.d.ts} +4 -4
  26. package/dist/patterns/KeyValueChip/index.d.ts +2 -0
  27. package/dist/patterns/MoneyBackMethods/MoneyBackMethods.d.ts +4 -0
  28. package/dist/patterns/MoneyBackMethods/index.d.ts +2 -0
  29. package/dist/patterns/MoneyBackMethods/types.d.ts +44 -0
  30. package/dist/patterns/NotesField/NotesField.d.ts +3 -0
  31. package/dist/patterns/NotesField/index.d.ts +2 -0
  32. package/dist/patterns/NotesField/types.d.ts +12 -0
  33. package/dist/patterns/PaginationSummary/PaginationSummary.d.ts +26 -0
  34. package/dist/patterns/PaginationSummary/index.d.ts +3 -0
  35. package/dist/patterns/PaginationSummary/page-range.d.ts +19 -0
  36. package/dist/patterns/PaymentSubAmountInput/PaymentSubAmountInput.d.ts +9 -0
  37. package/dist/patterns/PickerRow/PickerRow.d.ts +27 -0
  38. package/dist/patterns/PickerRow/index.d.ts +2 -0
  39. package/dist/patterns/ReasonSelect/ReasonSelect.d.ts +3 -0
  40. package/dist/patterns/ReasonSelect/index.d.ts +2 -0
  41. package/dist/patterns/ReasonSelect/types.d.ts +17 -0
  42. package/dist/patterns/RefundCompleteView/RefundCompleteView.d.ts +3 -0
  43. package/dist/patterns/RefundCompleteView/index.d.ts +2 -0
  44. package/dist/patterns/RefundCompleteView/types.d.ts +22 -0
  45. package/dist/patterns/RefundItemList/RefundItemList.d.ts +3 -0
  46. package/dist/patterns/RefundItemList/index.d.ts +2 -0
  47. package/dist/patterns/RefundItemList/types.d.ts +40 -0
  48. package/dist/patterns/RefundTotalBar/RefundTotalBar.d.ts +3 -0
  49. package/dist/patterns/RefundTotalBar/index.d.ts +2 -0
  50. package/dist/patterns/RefundTotalBar/types.d.ts +13 -0
  51. package/dist/patterns/RowActions/RowActions.d.ts +17 -0
  52. package/dist/patterns/RowActions/index.d.ts +2 -0
  53. package/dist/patterns/SplitRefundPanel/SplitRefundPanel.d.ts +4 -0
  54. package/dist/patterns/SplitRefundPanel/index.d.ts +2 -0
  55. package/dist/patterns/SplitRefundPanel/types.d.ts +51 -0
  56. package/dist/patterns/SupervisorPinField/SupervisorPinField.d.ts +3 -0
  57. package/dist/patterns/SupervisorPinField/index.d.ts +2 -0
  58. package/dist/patterns/SupervisorPinField/types.d.ts +12 -0
  59. package/dist/patterns/TableSkeleton/TableSkeleton.d.ts +32 -0
  60. package/dist/patterns/TableSkeleton/index.d.ts +2 -0
  61. package/dist/patterns/UnderlineTabs/UnderlineTabs.d.ts +18 -0
  62. package/dist/patterns/UnderlineTabs/index.d.ts +2 -0
  63. package/dist/patterns/WizardShell/WizardShell.d.ts +4 -0
  64. package/dist/patterns/WizardShell/index.d.ts +2 -0
  65. package/dist/patterns/WizardShell/types.d.ts +29 -0
  66. package/dist/patterns/grid-columns.d.ts +1 -1
  67. package/dist/patterns/index.d.ts +43 -4
  68. package/dist/patterns/refund-shared/index.d.ts +1 -0
  69. package/dist/patterns/refund-shared/types.d.ts +12 -0
  70. package/dist/tailwind/index.d.ts +4 -0
  71. package/dist/tailwind/index.js +68 -1
  72. package/dist/tokens/admin-surface.d.ts +58 -0
  73. package/dist/tokens/index.d.ts +2 -0
  74. package/package.json +1 -1
  75. package/dist/patterns/CheckboxCardGroup/CheckboxCardGroup.d.ts +0 -53
  76. 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,44 @@
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
+ /**
20
+ * Uppercase column header. `bg-transparent` overrides HeroUI's own header fill.
21
+ *
22
+ * The tone is `--sub`, not `--muted`. The two admin screens this class was
23
+ * distilled from had each picked one — the ledger `--sub`, the governance tables
24
+ * `--muted` — so unifying them was going to change one of the two either way.
25
+ * `--muted` (gray-400) measures 2.54:1 on the card, and these labels are 11px,
26
+ * which WCAG AA counts as small text needing 4.5:1; `--sub` (gray-500) measures
27
+ * 4.83:1. Same reasoning as `--warn` in the token module: pick the readable end
28
+ * of our own scale rather than keep a value that cannot be read.
29
+ */
30
+ export declare const adminThClass = "text-left text-[11px] font-semibold uppercase tracking-[.04em] text-acct-sub px-4 pt-4 pb-3 whitespace-nowrap bg-transparent";
31
+ /** Body cell. */
32
+ export declare const adminTdClass = "px-4 text-[13.5px] text-acct-ink2 align-middle";
33
+ /**
34
+ * Row hairline and hover.
35
+ *
36
+ * Carries both hover spellings on purpose: `data-[hover=true]:` is what HeroUI
37
+ * sets on its own rows, and `hover:` is what a plain `<tr>` responds to. One
38
+ * string serves both so the two renderings cannot look different.
39
+ */
40
+ export declare const adminRowClass = "border-t border-acct-hair transition-colors duration-150 hover:bg-acct-page data-[hover=true]:bg-acct-page";
41
+ /** The table element itself. */
42
+ export declare const adminTableClass = "w-full";
43
+ /** The strip under the table where a pager sits. */
44
+ 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,20 @@
1
+ import { default as React } from 'react';
2
+ export interface AdminToolbarProps {
3
+ searchValue: string;
4
+ onSearchChange: (value: string) => void;
5
+ /** The field's accessible name — say what it searches, not how. */
6
+ searchLabel: string;
7
+ /** Visible hint. Falls back to the label when the two would say the same thing. */
8
+ searchPlaceholder?: string;
9
+ /** Leading glyph inside the search box. */
10
+ searchIcon?: React.ReactNode;
11
+ /** Filters, sort pickers, a toggle — laid out after the search box. */
12
+ children?: React.ReactNode;
13
+ /** Pushed to the far right, for a primary action. */
14
+ trailing?: React.ReactNode;
15
+ /** Search box width. `'md'` (280px) by default, `'lg'` (360px) for wide tables. */
16
+ searchWidth?: 'md' | 'lg';
17
+ className?: string;
18
+ 'data-testid'?: string;
19
+ }
20
+ 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,6 +1,6 @@
1
1
  import { JSX } from 'react';
2
2
  import { EmptyStateProps, ErrorStateProps, FeedbackStateProps, LoadingStateProps, SuccessStateProps } from './type';
3
- export declare function FeedbackState({ variant, title, titleAs: TitleElement, description, icon, actions, role, ariaLive, iconSize, className, classNames, 'data-testid': dataTestId, }: FeedbackStateProps): JSX.Element;
3
+ export declare function FeedbackState({ variant, surface, title, titleAs: TitleElement, description, icon, actions, role, ariaLive, iconSize, className, classNames, 'data-testid': dataTestId, }: FeedbackStateProps): JSX.Element;
4
4
  export declare namespace FeedbackState {
5
5
  var displayName: string;
6
6
  }
@@ -1,5 +1,18 @@
1
1
  import { AriaRole, ReactNode } from 'react';
2
2
  export type FeedbackStateVariant = 'empty' | 'error' | 'success' | 'loading';
3
+ /**
4
+ * Where the state is rendered, which is a different question from what it says.
5
+ *
6
+ * `card` is the inline block: a dashed outline that marks off a region of a
7
+ * denser page. `panel` is the whole content area of an admin card that has
8
+ * nothing to show — no outline (the card already draws one), a larger icon tile
9
+ * and heavier title, sized so the state does not read as a small notice
10
+ * stranded in a big empty box.
11
+ *
12
+ * The `panel` measurements are the back-office mockups', which is why they are
13
+ * pinned rather than rounded to the nearest scale step.
14
+ */
15
+ export type FeedbackStateSurface = 'card' | 'panel';
3
16
  export interface FeedbackStateClassNames {
4
17
  base?: string;
5
18
  iconWrapper?: string;
@@ -12,6 +25,8 @@ export interface FeedbackStateClassNames {
12
25
  export interface FeedbackStateProps {
13
26
  /** Visual tone and default accessibility role. */
14
27
  variant?: FeedbackStateVariant;
28
+ /** Inline block (default) or the full content area of an admin card. */
29
+ surface?: FeedbackStateSurface;
15
30
  /** Main state message. */
16
31
  title: ReactNode;
17
32
  /** Semantic element used for the title. Defaults to a paragraph for inline states. */
@@ -1,3 +1,3 @@
1
1
  import { JSX } from 'react';
2
2
  import { InstallmentFundAssignmentProps } from './types';
3
- export declare function InstallmentFundAssignment({ assignments, funds, labels: customLabels, classNames, isSaving, hasSavedAssignments, isFundPickerOpen, activeAssignmentId, footer, onAssignmentsChange, onOpenFundPicker, onCloseFundPicker, onCollapseChange, onSave, }: InstallmentFundAssignmentProps): JSX.Element;
3
+ export declare function InstallmentFundAssignment({ assignments, funds, labels: customLabels, classNames, isSaving, hasSavedAssignments, isFundPickerOpen, activeAssignmentId, modalPortalContainer, footer, onAssignmentsChange, onOpenFundPicker, onCloseFundPicker, onCollapseChange, onSave, }: InstallmentFundAssignmentProps): JSX.Element;
@@ -57,6 +57,7 @@ export type InstallmentFundAssignmentProps = {
57
57
  hasSavedAssignments?: boolean;
58
58
  isFundPickerOpen?: boolean;
59
59
  activeAssignmentId?: string | null;
60
+ modalPortalContainer?: Element;
60
61
  footer?: ReactNode;
61
62
  onModeChange?: (mode: InstallmentFundAssignmentMode) => void;
62
63
  onAssignmentsChange: (assignments: InstallmentFundAssignmentEntry[]) => void;
@@ -1,3 +1,3 @@
1
1
  import { JSX } from 'react';
2
2
  import { InstallmentTableProps } from './types';
3
- export declare function InstallmentTable({ installments, currency, locale, showTitle, showCard, showEditPayment, labels: customLabels, isSaving, onEditInstallments, onPayInstallment, onDeleteInstallment, }: InstallmentTableProps): JSX.Element;
3
+ export declare function InstallmentTable({ installments, currency, locale, showTitle, showCard, showEditPayment, showDelete, payNowHiddenStatuses, labels: customLabels, isSaving, onEditInstallments, onPayInstallment, onDeleteInstallment, }: InstallmentTableProps): JSX.Element;
@@ -109,6 +109,18 @@ export type InstallmentTableProps = {
109
109
  showTitle?: boolean;
110
110
  showCard?: boolean;
111
111
  showEditPayment?: boolean;
112
+ /**
113
+ * FR-1619 — when `false`, the delete action inside the row-actions
114
+ * dropdown is not rendered. Defaults to `true` (backward-compatible).
115
+ */
116
+ showDelete?: boolean;
117
+ /**
118
+ * FR-1619 — statuses for which the Pay Now button is NOT rendered on a row.
119
+ * Typed with the `InstallmentStatus` union so consumers get compile-time
120
+ * safety on status keys. The pre-existing `paid` disabled guard still
121
+ * applies to any Pay Now button that IS rendered. Defaults to `[]`.
122
+ */
123
+ payNowHiddenStatuses?: InstallmentStatus[];
112
124
  labels?: InstallmentTableLabels;
113
125
  isSaving?: boolean;
114
126
  onEditInstallments: () => void;
@@ -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';