@veevarts/design-system 1.12.6 → 1.12.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.
@@ -60,6 +60,30 @@ export interface CashTenderFormProps {
60
60
  * Disable interactions (e.g. while submitting).
61
61
  */
62
62
  isDisabled?: boolean;
63
+ /**
64
+ * Hard upper bound for the received amount, in MAJOR units (same unit
65
+ * as `dueAmount.value`). A keystroke that would push the parsed value
66
+ * above this is REJECTED (the field keeps its prior value) — so a
67
+ * cashier can't enter a pathological amount that overflows the PSP
68
+ * integer range downstream. A character `maxLength` can't enforce this
69
+ * (e.g. `99999999` is only 8 chars yet far over a $999,999.99 cap), so
70
+ * the guard is value-based. Omit for no cap.
71
+ */
72
+ maxAmount?: number;
73
+ /**
74
+ * Auto-focus the Cash Received field when this component mounts.
75
+ * Pair with `key={...}` from the host to re-trigger focus on every
76
+ * sub-payment (the form re-mounts and `autoFocus` fires again).
77
+ * The built-in `onFocus` already selects the value, so a cashier
78
+ * landing here can overwrite the existing amount with a single
79
+ * keystroke.
80
+ *
81
+ * Default `false` — the field is unfocused at mount. Hosts opt in
82
+ * when their flow guarantees the cashier just navigated TO this
83
+ * tender (e.g. selecting Cash from the method picker, advancing to
84
+ * the next split sub-payment).
85
+ */
86
+ autoFocus?: boolean;
63
87
  /**
64
88
  * Inline test id forwarded to the root element.
65
89
  */
@@ -37,6 +37,26 @@ export interface CheckTenderFormProps {
37
37
  /** Hide the bank name field when the host doesn't care. */
38
38
  hideBankName?: boolean;
39
39
  isDisabled?: boolean;
40
+ /**
41
+ * Character cap for the Check Number field. Guards against pathological
42
+ * paste / extreme input. Default `34` (the length of the longest IBAN,
43
+ * a generous ceiling for any cheque / international reference).
44
+ */
45
+ checkNumberMaxLength?: number;
46
+ /**
47
+ * Character cap for the Bank Name field. Default `100`.
48
+ */
49
+ bankNameMaxLength?: number;
50
+ /**
51
+ * Auto-focus the Check Number field when this component mounts.
52
+ * Pair with `key={...}` from the host to re-trigger focus on every
53
+ * sub-payment (the form re-mounts and `autoFocus` fires again).
54
+ * Default `false` — the field is unfocused at mount. Hosts opt in
55
+ * when their flow guarantees the cashier just navigated TO this
56
+ * tender (e.g. selecting Check from the method picker, advancing
57
+ * to the next split sub-payment).
58
+ */
59
+ autoFocus?: boolean;
40
60
  'data-testid'?: string;
41
61
  className?: string;
42
62
  }
@@ -25,6 +25,30 @@ export interface PaymentSubAmountInputProps {
25
25
  * + locale).
26
26
  */
27
27
  errorMessage?: string;
28
+ /**
29
+ * Auto-focus the amount field when this component mounts. Pair
30
+ * with `key={...}` from the host to re-trigger focus on every
31
+ * sub-payment (the input re-mounts each time and `autoFocus`
32
+ * fires again). The built-in `onFocus` already selects the
33
+ * value, so a cashier landing here can overwrite the placeholder
34
+ * with a single keystroke.
35
+ *
36
+ * Default `false` — the input is unfocused at mount. Hosts opt in
37
+ * when their flow guarantees the cashier just navigated TO this
38
+ * step (e.g. opening Split, advancing to Payment #N).
39
+ */
40
+ autoFocus?: boolean;
41
+ /**
42
+ * Hard upper bound for the typed amount, in the same MAJOR-unit scale
43
+ * the host parses the emitted string with. A keystroke that would push
44
+ * the parsed value above this is REJECTED (the controlled `value` is
45
+ * left unchanged, so the input reverts the offending character). Keeps
46
+ * the cashier from entering an amount that overflows the PSP integer
47
+ * range downstream. A character `maxLength` can't enforce this (e.g.
48
+ * `99999999` is only 8 chars yet far over a $999,999.99 cap), so the
49
+ * guard is value-based. Omit for no cap.
50
+ */
51
+ maxAmount?: number;
28
52
  'data-testid'?: string;
29
53
  className?: string;
30
54
  }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * PaymentSubAmountInput unit tests
3
+ */
4
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "1.12.6",
4
+ "version": "1.12.8",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",