@coinbase/cds-mcp-server 8.56.1 → 8.57.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/CHANGELOG.md +4 -0
- package/mcp-docs/mobile/components/DateInput.txt +43 -1
- package/mcp-docs/mobile/components/DatePicker.txt +2 -1
- package/mcp-docs/mobile/components/SearchInput.txt +22 -0
- package/mcp-docs/mobile/components/TextInput.txt +15 -7
- package/mcp-docs/web/components/DateInput.txt +43 -1
- package/mcp-docs/web/components/DatePicker.txt +2 -1
- package/mcp-docs/web/components/SearchInput.txt +15 -2
- package/mcp-docs/web/components/TextInput.txt +15 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 8.57.0 ((3/24/2026, 12:46 PM PST))
|
|
12
|
+
|
|
13
|
+
This is an artificial version bump with no new change.
|
|
14
|
+
|
|
11
15
|
## 8.56.1 ((3/24/2026, 08:39 AM PST))
|
|
12
16
|
|
|
13
17
|
This is an artificial version bump with no new change.
|
|
@@ -260,6 +260,47 @@ function Example() {
|
|
|
260
260
|
}
|
|
261
261
|
```
|
|
262
262
|
|
|
263
|
+
#### Borderless
|
|
264
|
+
|
|
265
|
+
For borderless DateInput usage, prefer adding a focus border with `focusedBorderWidth`.
|
|
266
|
+
If you need a fully borderless input (including focus), use that pattern with a TypeAhead
|
|
267
|
+
composition.
|
|
268
|
+
|
|
269
|
+
```jsx
|
|
270
|
+
function Example() {
|
|
271
|
+
const [defaultBorderlessDate, setDefaultBorderlessDate] = useState(null);
|
|
272
|
+
const [defaultBorderlessError, setDefaultBorderlessError] = useState(null);
|
|
273
|
+
const [focusBorderDate, setFocusBorderDate] = useState(null);
|
|
274
|
+
const [focusBorderError, setFocusBorderError] = useState(null);
|
|
275
|
+
|
|
276
|
+
return (
|
|
277
|
+
<VStack gap={3}>
|
|
278
|
+
<DateInput
|
|
279
|
+
bordered={false}
|
|
280
|
+
date={defaultBorderlessDate}
|
|
281
|
+
error={defaultBorderlessError}
|
|
282
|
+
helperText="Default borderless behavior with no focus border."
|
|
283
|
+
invalidDateError="Please enter a valid date"
|
|
284
|
+
label="Borderless date input"
|
|
285
|
+
onChangeDate={setDefaultBorderlessDate}
|
|
286
|
+
onErrorDate={setDefaultBorderlessError}
|
|
287
|
+
/>
|
|
288
|
+
<DateInput
|
|
289
|
+
bordered={false}
|
|
290
|
+
date={focusBorderDate}
|
|
291
|
+
error={focusBorderError}
|
|
292
|
+
focusedBorderWidth={200}
|
|
293
|
+
helperText="Set focusedBorderWidth to opt into a focus border."
|
|
294
|
+
invalidDateError="Please enter a valid date"
|
|
295
|
+
label="Borderless date input with focus border"
|
|
296
|
+
onChangeDate={setFocusBorderDate}
|
|
297
|
+
onErrorDate={setFocusBorderError}
|
|
298
|
+
/>
|
|
299
|
+
</VStack>
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
263
304
|
#### Helper text
|
|
264
305
|
|
|
265
306
|
```jsx
|
|
@@ -456,7 +497,7 @@ The DateInput fires events in a specific order:
|
|
|
456
497
|
| `autoFocus` | `boolean` | No | `-` | If true, focuses the input on componentDidMount. The default value is false. |
|
|
457
498
|
| `blurOnSubmit` | `boolean` | No | `-` | If true, the text field will blur when submitted. The default value is true. |
|
|
458
499
|
| `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `200` | Leverage one of the borderRadius styles we offer to round the corners of the input. |
|
|
459
|
-
| `bordered` | `boolean` | No | `true` | Determines if the input should have a border |
|
|
500
|
+
| `bordered` | `boolean` | No | `true` | Determines if the input should have a border. When set to false, focus border styling is disabled by default. |
|
|
460
501
|
| `caretHidden` | `boolean` | No | `-` | If true, caret is hidden. The default value is false. |
|
|
461
502
|
| `clearButtonMode` | `never \| while-editing \| unless-editing \| always` | No | `-` | enum(never, while-editing, unless-editing, always) When the clear button should appear on the right side of the text view |
|
|
462
503
|
| `clearTextOnFocus` | `boolean` | No | `-` | If true, clears the text field automatically when editing begins |
|
|
@@ -473,6 +514,7 @@ The DateInput fires events in a specific order:
|
|
|
473
514
|
| `enablesReturnKeyAutomatically` | `boolean` | No | `-` | If true, the keyboard disables the return key when there is no text and automatically enables it when there is text. The default value is false. |
|
|
474
515
|
| `end` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Adds content to the end of the inner input. Refer to diagram for location of endNode in InputStack component |
|
|
475
516
|
| `enterKeyHint` | `search \| done \| go \| next \| send \| previous \| enter` | No | `-` | Determines what text should be shown to the return key on virtual keyboards. Has precedence over the returnKeyType prop. |
|
|
517
|
+
| `focusedBorderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `borderWidth` | Additional border width when focused. |
|
|
476
518
|
| `height` | `string \| number` | No | `-` | Height of input |
|
|
477
519
|
| `helperText` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | For cases where label is not enough information to describe what the text input is for. Can also be used for showing positive/negative messages |
|
|
478
520
|
| `helperTextErrorIconAccessibilityLabel` | `string` | No | `'error'` | Accessibility label for helper text error icon when variant=negative |
|
|
@@ -709,7 +709,7 @@ function Example() {
|
|
|
709
709
|
| `autoFocus` | `boolean` | No | `-` | If true, focuses the input on componentDidMount. The default value is false. |
|
|
710
710
|
| `blurOnSubmit` | `boolean` | No | `-` | If true, the text field will blur when submitted. The default value is true. |
|
|
711
711
|
| `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `200` | Leverage one of the borderRadius styles we offer to round the corners of the input. |
|
|
712
|
-
| `bordered` | `boolean` | No | `true` | Determines if the input should have a border |
|
|
712
|
+
| `bordered` | `boolean` | No | `true` | Determines if the input should have a border. When set to false, focus border styling is disabled by default. |
|
|
713
713
|
| `calendarIconButtonAccessibilityLabel` | `string` | No | `-` | Accessibility label describing the calendar IconButton, which opens the calendar when pressed. |
|
|
714
714
|
| `caretHidden` | `boolean` | No | `-` | If true, caret is hidden. The default value is false. |
|
|
715
715
|
| `clearButtonMode` | `never \| while-editing \| unless-editing \| always` | No | `-` | enum(never, while-editing, unless-editing, always) When the clear button should appear on the right side of the text view |
|
|
@@ -731,6 +731,7 @@ function Example() {
|
|
|
731
731
|
| `enablesReturnKeyAutomatically` | `boolean` | No | `-` | If true, the keyboard disables the return key when there is no text and automatically enables it when there is text. The default value is false. |
|
|
732
732
|
| `end` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Adds content to the end of the inner input. Refer to diagram for location of endNode in InputStack component |
|
|
733
733
|
| `enterKeyHint` | `search \| done \| go \| next \| send \| previous \| enter` | No | `-` | Determines what text should be shown to the return key on virtual keyboards. Has precedence over the returnKeyType prop. |
|
|
734
|
+
| `focusedBorderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `borderWidth` | Additional border width when focused. |
|
|
734
735
|
| `height` | `string \| number` | No | `-` | Height of input |
|
|
735
736
|
| `helperText` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | For cases where label is not enough information to describe what the text input is for. Can also be used for showing positive/negative messages |
|
|
736
737
|
| `helperTextErrorIconAccessibilityLabel` | `string` | No | `'error'` | Accessibility label for helper text error icon when variant=negative |
|
|
@@ -57,10 +57,15 @@ function SearchInputWithBack() {
|
|
|
57
57
|
|
|
58
58
|
### Variants
|
|
59
59
|
|
|
60
|
+
When `bordered={false}`, SearchInput keeps focused border styling disabled by default. Set
|
|
61
|
+
`focusedBorderWidth` to opt into a focus border style.
|
|
62
|
+
|
|
60
63
|
```tsx
|
|
61
64
|
function SearchInputVariants() {
|
|
62
65
|
const [value1, setValue1] = useState('');
|
|
63
66
|
const [value2, setValue2] = useState('');
|
|
67
|
+
const [value3, setValue3] = useState('');
|
|
68
|
+
const [value4, setValue4] = useState('');
|
|
64
69
|
|
|
65
70
|
return (
|
|
66
71
|
<VStack gap={2}>
|
|
@@ -75,6 +80,21 @@ function SearchInputVariants() {
|
|
|
75
80
|
value={value2}
|
|
76
81
|
onChangeText={setValue2}
|
|
77
82
|
onClear={() => setValue2('')}
|
|
83
|
+
placeholder="Borderless search (default focus behavior)..."
|
|
84
|
+
bordered={false}
|
|
85
|
+
/>
|
|
86
|
+
<SearchInput
|
|
87
|
+
value={value3}
|
|
88
|
+
onChangeText={setValue3}
|
|
89
|
+
onClear={() => setValue3('')}
|
|
90
|
+
placeholder="Borderless search (with focus border)..."
|
|
91
|
+
bordered={false}
|
|
92
|
+
focusedBorderWidth={200}
|
|
93
|
+
/>
|
|
94
|
+
<SearchInput
|
|
95
|
+
value={value4}
|
|
96
|
+
onChangeText={setValue4}
|
|
97
|
+
onClear={() => setValue4('')}
|
|
78
98
|
placeholder="No icons..."
|
|
79
99
|
hideStartIcon
|
|
80
100
|
hideEndIcon
|
|
@@ -94,6 +114,7 @@ function SearchInputVariants() {
|
|
|
94
114
|
| `autoCorrect` | `boolean` | No | `-` | If false, disables auto-correct. The default value is true. |
|
|
95
115
|
| `autoFocus` | `boolean` | No | `-` | If true, focuses the input on componentDidMount. The default value is false. |
|
|
96
116
|
| `blurOnSubmit` | `boolean` | No | `-` | If true, the text field will blur when submitted. The default value is true. |
|
|
117
|
+
| `bordered` | `boolean` | No | `true` | Determines if the input should have a border. When set to false, focus border styling is disabled by default. |
|
|
97
118
|
| `caretHidden` | `boolean` | No | `-` | If true, caret is hidden. The default value is false. |
|
|
98
119
|
| `clearButtonMode` | `never \| while-editing \| unless-editing \| always` | No | `-` | enum(never, while-editing, unless-editing, always) When the clear button should appear on the right side of the text view |
|
|
99
120
|
| `clearIconAccessibilityLabel` | `string` | No | `-` | Set the a11y label for the clear icon |
|
|
@@ -111,6 +132,7 @@ function SearchInputVariants() {
|
|
|
111
132
|
| `enablesReturnKeyAutomatically` | `boolean` | No | `-` | If true, the keyboard disables the return key when there is no text and automatically enables it when there is text. The default value is false. |
|
|
112
133
|
| `end` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `undefined` | Set the end node |
|
|
113
134
|
| `enterKeyHint` | `search \| done \| go \| next \| send \| previous \| enter` | No | `-` | Determines what text should be shown to the return key on virtual keyboards. Has precedence over the returnKeyType prop. |
|
|
135
|
+
| `focusedBorderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `borderWidth` | Additional border width when focused. |
|
|
114
136
|
| `helperTextErrorIconAccessibilityLabel` | `string` | No | `'error'` | Accessibility label for helper text error icon when variant=negative |
|
|
115
137
|
| `hideEndIcon` | `boolean` | No | `undefined` | hide the end icon |
|
|
116
138
|
| `hideStartIcon` | `boolean` | No | `false` | hide the start icon |
|
|
@@ -105,19 +105,26 @@ It's also advised you always format `helperText` with `Error: ${errorMessage}`.
|
|
|
105
105
|
|
|
106
106
|
#### Borderless
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
For borderless TextInput usage, prefer adding a focus border with `focusedBorderWidth`.
|
|
109
|
+
If you need a fully borderless input (including focus), use that pattern with a TypeAhead
|
|
110
|
+
composition.
|
|
111
111
|
|
|
112
112
|
```jsx
|
|
113
|
-
<
|
|
113
|
+
<VStack gap={2} padding={2}>
|
|
114
114
|
<TextInput
|
|
115
115
|
label="Borderless TextInput"
|
|
116
116
|
placeholder="placeholder"
|
|
117
|
-
helperText="
|
|
117
|
+
helperText="When bordered is false, focus border styling is disabled by default."
|
|
118
118
|
bordered={false}
|
|
119
119
|
/>
|
|
120
|
-
|
|
120
|
+
<TextInput
|
|
121
|
+
label="Borderless TextInput (with focus border)"
|
|
122
|
+
placeholder="placeholder"
|
|
123
|
+
helperText="Set focusedBorderWidth to opt into a focus border style."
|
|
124
|
+
bordered={false}
|
|
125
|
+
focusedBorderWidth={200}
|
|
126
|
+
/>
|
|
127
|
+
</VStack>
|
|
121
128
|
```
|
|
122
129
|
|
|
123
130
|
#### Helper Text
|
|
@@ -674,7 +681,7 @@ function TextInputKeyboardExample() {
|
|
|
674
681
|
| `autoFocus` | `boolean` | No | `-` | If true, focuses the input on componentDidMount. The default value is false. |
|
|
675
682
|
| `blurOnSubmit` | `boolean` | No | `-` | If true, the text field will blur when submitted. The default value is true. |
|
|
676
683
|
| `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `200` | Leverage one of the borderRadius styles we offer to round the corners of the input. |
|
|
677
|
-
| `bordered` | `boolean` | No | `true` | Determines if the input should have a border |
|
|
684
|
+
| `bordered` | `boolean` | No | `true` | Determines if the input should have a border. When set to false, focus border styling is disabled by default. |
|
|
678
685
|
| `caretHidden` | `boolean` | No | `-` | If true, caret is hidden. The default value is false. |
|
|
679
686
|
| `clearButtonMode` | `never \| while-editing \| unless-editing \| always` | No | `-` | enum(never, while-editing, unless-editing, always) When the clear button should appear on the right side of the text view |
|
|
680
687
|
| `clearTextOnFocus` | `boolean` | No | `-` | If true, clears the text field automatically when editing begins |
|
|
@@ -690,6 +697,7 @@ function TextInputKeyboardExample() {
|
|
|
690
697
|
| `enablesReturnKeyAutomatically` | `boolean` | No | `-` | If true, the keyboard disables the return key when there is no text and automatically enables it when there is text. The default value is false. |
|
|
691
698
|
| `end` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Adds content to the end of the inner input. Refer to diagram for location of endNode in InputStack component |
|
|
692
699
|
| `enterKeyHint` | `search \| done \| go \| next \| send \| previous \| enter` | No | `-` | Determines what text should be shown to the return key on virtual keyboards. Has precedence over the returnKeyType prop. |
|
|
700
|
+
| `focusedBorderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `borderWidth` | Additional border width when focused. |
|
|
693
701
|
| `height` | `string \| number` | No | `-` | Height of input |
|
|
694
702
|
| `helperText` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | For cases where label is not enough information to describe what the text input is for. Can also be used for showing positive/negative messages |
|
|
695
703
|
| `helperTextErrorIconAccessibilityLabel` | `string` | No | `'error'` | Accessibility label for helper text error icon when variant=negative |
|
|
@@ -262,6 +262,47 @@ function Example() {
|
|
|
262
262
|
}
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
+
#### Borderless
|
|
266
|
+
|
|
267
|
+
For borderless DateInput usage, prefer adding a focus border with `focusedBorderWidth`.
|
|
268
|
+
If you need a fully borderless input (including focus), use that pattern with a TypeAhead
|
|
269
|
+
composition.
|
|
270
|
+
|
|
271
|
+
```jsx live
|
|
272
|
+
function Example() {
|
|
273
|
+
const [defaultBorderlessDate, setDefaultBorderlessDate] = useState(null);
|
|
274
|
+
const [defaultBorderlessError, setDefaultBorderlessError] = useState(null);
|
|
275
|
+
const [focusBorderDate, setFocusBorderDate] = useState(null);
|
|
276
|
+
const [focusBorderError, setFocusBorderError] = useState(null);
|
|
277
|
+
|
|
278
|
+
return (
|
|
279
|
+
<VStack gap={3}>
|
|
280
|
+
<DateInput
|
|
281
|
+
bordered={false}
|
|
282
|
+
date={defaultBorderlessDate}
|
|
283
|
+
error={defaultBorderlessError}
|
|
284
|
+
helperText="Default borderless behavior with no focus border."
|
|
285
|
+
invalidDateError="Please enter a valid date"
|
|
286
|
+
label="Borderless date input"
|
|
287
|
+
onChangeDate={setDefaultBorderlessDate}
|
|
288
|
+
onErrorDate={setDefaultBorderlessError}
|
|
289
|
+
/>
|
|
290
|
+
<DateInput
|
|
291
|
+
bordered={false}
|
|
292
|
+
date={focusBorderDate}
|
|
293
|
+
error={focusBorderError}
|
|
294
|
+
focusedBorderWidth={200}
|
|
295
|
+
helperText="Set focusedBorderWidth to opt into a focus border."
|
|
296
|
+
invalidDateError="Please enter a valid date"
|
|
297
|
+
label="Borderless date input with focus border"
|
|
298
|
+
onChangeDate={setFocusBorderDate}
|
|
299
|
+
onErrorDate={setFocusBorderError}
|
|
300
|
+
/>
|
|
301
|
+
</VStack>
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
```
|
|
305
|
+
|
|
265
306
|
#### Helper text
|
|
266
307
|
|
|
267
308
|
```jsx live
|
|
@@ -430,7 +471,7 @@ The DateInput fires events in a specific order:
|
|
|
430
471
|
| `onErrorDate` | `(error: DateInputValidationError \| null) => void` | Yes | `-` | Callback function fired when validation finds an error, e.g. required input fields and impossible or disabled dates. Will always be called after onChangeDate. |
|
|
431
472
|
| `align` | `center \| start \| end \| justify` | No | `start` | Aligns text inside input and helperText |
|
|
432
473
|
| `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `200` | Leverage one of the borderRadius styles we offer to round the corners of the input. |
|
|
433
|
-
| `bordered` | `boolean` | No | `true` | Adds border to input |
|
|
474
|
+
| `bordered` | `boolean` | No | `true` | Adds border to input. When set to false, focus border styling is disabled by default. |
|
|
434
475
|
| `className` | `string` | No | `-` | - |
|
|
435
476
|
| `compact` | `boolean` | No | `false` | Enables compact variation |
|
|
436
477
|
| `disabled` | `boolean` | No | `false` | Toggles input interactability and opacity |
|
|
@@ -438,6 +479,7 @@ The DateInput fires events in a specific order:
|
|
|
438
479
|
| `disabledDates` | `(Date \| [Date, Date])[]` | No | `-` | Array of disabled dates, and date tuples for date ranges. Make sure to set disabledDateError as well. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges. |
|
|
439
480
|
| `enableColorSurge` | `boolean` | No | `-` | Enable Color Surge motion |
|
|
440
481
|
| `end` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Adds content to the end of the inner input. Refer to diagram for location of endNode in InputStack component |
|
|
482
|
+
| `focusedBorderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | Additional border width when focused. Set this when bordered={false} to opt into a focus border style. |
|
|
441
483
|
| `height` | `((Height<string \| number> \| { base?: Height<string \| number>; phone?: Height<string \| number> \| undefined; tablet?: Height<string \| number> \| undefined; desktop?: Height<string \| number> \| undefined; }) & (string \| number)) \| undefined` | No | `-` | Height of input |
|
|
442
484
|
| `helperText` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | For cases where label is not enough information to describe what the text input is for. Can also be used for showing positive/negative messages |
|
|
443
485
|
| `helperTextErrorIconAccessibilityLabel` | `string` | No | `'error'` | Accessibility label for helper text error icon when variant=negative |
|
|
@@ -661,7 +661,7 @@ function Example() {
|
|
|
661
661
|
| `onErrorDate` | `((error: DateInputValidationError \| null) => void) & ((error: DateInputValidationError \| null) => void)` | Yes | `-` | Callback function fired when validation finds an error, e.g. required input fields and impossible or disabled dates. Will always be called after onChangeDate. |
|
|
662
662
|
| `align` | `center \| start \| end \| justify` | No | `start` | Aligns text inside input and helperText |
|
|
663
663
|
| `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `200` | Leverage one of the borderRadius styles we offer to round the corners of the input. |
|
|
664
|
-
| `bordered` | `boolean` | No | `true` | Adds border to input |
|
|
664
|
+
| `bordered` | `boolean` | No | `true` | Adds border to input. When set to false, focus border styling is disabled by default. |
|
|
665
665
|
| `calendarClassName` | `string` | No | `-` | Custom class name to apply to the Calendar container. |
|
|
666
666
|
| `calendarIconButtonAccessibilityLabel` | `string` | No | `-` | Accessibility label describing the calendar IconButton, which opens the calendar when pressed. |
|
|
667
667
|
| `calendarStyle` | `CSSProperties` | No | `-` | Custom style to apply to the Calendar container. |
|
|
@@ -676,6 +676,7 @@ function Example() {
|
|
|
676
676
|
| `disabledDates` | `(Date \| [Date, Date])[]` | No | `-` | Array of disabled dates, and date tuples for date ranges. Make sure to set disabledDateError as well. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges. |
|
|
677
677
|
| `enableColorSurge` | `boolean` | No | `-` | Enable Color Surge motion |
|
|
678
678
|
| `end` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Adds content to the end of the inner input. Refer to diagram for location of endNode in InputStack component |
|
|
679
|
+
| `focusedBorderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | Additional border width when focused. Set this when bordered={false} to opt into a focus border style. |
|
|
679
680
|
| `height` | `((Height<string \| number> \| { base?: Height<string \| number>; phone?: Height<string \| number> \| undefined; tablet?: Height<string \| number> \| undefined; desktop?: Height<string \| number> \| undefined; }) & (string \| number)) \| undefined` | No | `-` | Height of input |
|
|
680
681
|
| `helperText` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | For cases where label is not enough information to describe what the text input is for. Can also be used for showing positive/negative messages |
|
|
681
682
|
| `helperTextErrorIconAccessibilityLabel` | `string` | No | `'error'` | Accessibility label for helper text error icon when variant=negative |
|
|
@@ -34,11 +34,15 @@ function BasicSearchInput() {
|
|
|
34
34
|
|
|
35
35
|
### Variants
|
|
36
36
|
|
|
37
|
+
When `bordered={false}`, SearchInput keeps focused border styling disabled by default. Set
|
|
38
|
+
`focusedBorderWidth` to opt into a focus border style.
|
|
39
|
+
|
|
37
40
|
```tsx live
|
|
38
41
|
function SearchInputVariants() {
|
|
39
42
|
const [value1, setValue1] = useState('');
|
|
40
43
|
const [value2, setValue2] = useState('');
|
|
41
44
|
const [value3, setValue3] = useState('');
|
|
45
|
+
const [value4, setValue4] = useState('');
|
|
42
46
|
|
|
43
47
|
return (
|
|
44
48
|
<VStack gap={2}>
|
|
@@ -53,13 +57,21 @@ function SearchInputVariants() {
|
|
|
53
57
|
value={value2}
|
|
54
58
|
onChangeText={setValue2}
|
|
55
59
|
onClear={() => setValue2('')}
|
|
56
|
-
placeholder="Borderless search..."
|
|
60
|
+
placeholder="Borderless search (default focus behavior)..."
|
|
57
61
|
bordered={false}
|
|
58
62
|
/>
|
|
59
63
|
<SearchInput
|
|
60
64
|
value={value3}
|
|
61
65
|
onChangeText={setValue3}
|
|
62
66
|
onClear={() => setValue3('')}
|
|
67
|
+
placeholder="Borderless search (with focus border)..."
|
|
68
|
+
bordered={false}
|
|
69
|
+
focusedBorderWidth={200}
|
|
70
|
+
/>
|
|
71
|
+
<SearchInput
|
|
72
|
+
value={value4}
|
|
73
|
+
onChangeText={setValue4}
|
|
74
|
+
onClear={() => setValue4('')}
|
|
63
75
|
placeholder="No icons..."
|
|
64
76
|
hideStartIcon
|
|
65
77
|
hideEndIcon
|
|
@@ -91,12 +103,13 @@ function CustomEndSearchInput() {
|
|
|
91
103
|
| Prop | Type | Required | Default | Description |
|
|
92
104
|
| --- | --- | --- | --- | --- |
|
|
93
105
|
| `onChangeText` | `(text: string) => void` | Yes | `-` | - |
|
|
94
|
-
| `bordered` | `boolean` | No | `true` | Adds border to input |
|
|
106
|
+
| `bordered` | `boolean` | No | `true` | Adds border to input. When set to false, focus border styling is disabled by default. |
|
|
95
107
|
| `clearIconAccessibilityLabel` | `string` | No | `-` | Set the a11y label for the clear icon |
|
|
96
108
|
| `compact` | `boolean` | No | `false` | Enables compact variation |
|
|
97
109
|
| `disabled` | `boolean` | No | `false` | Toggles input interactability and opacity |
|
|
98
110
|
| `enableColorSurge` | `boolean` | No | `-` | Enable Color Surge motion |
|
|
99
111
|
| `end` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `undefined` | Set the end node |
|
|
112
|
+
| `focusedBorderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | Additional border width when focused. Set this when bordered={false} to opt into a focus border style. |
|
|
100
113
|
| `helperTextErrorIconAccessibilityLabel` | `string` | No | `'error'` | Accessibility label for helper text error icon when variant=negative |
|
|
101
114
|
| `hideEndIcon` | `boolean` | No | `undefined` | hide the end icon |
|
|
102
115
|
| `hideStartIcon` | `boolean` | No | `false` | hide the start icon |
|
|
@@ -105,19 +105,26 @@ It's also advised you always format `helperText` with `Error: ${errorMessage}`.
|
|
|
105
105
|
|
|
106
106
|
#### Borderless
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
For borderless TextInput usage, prefer adding a focus border with `focusedBorderWidth`.
|
|
109
|
+
If you need a fully borderless input (including focus), use that pattern with a TypeAhead
|
|
110
|
+
composition.
|
|
111
111
|
|
|
112
112
|
```jsx live
|
|
113
|
-
<
|
|
113
|
+
<VStack gap={2} padding={2}>
|
|
114
114
|
<TextInput
|
|
115
115
|
label="Borderless TextInput"
|
|
116
116
|
placeholder="placeholder"
|
|
117
|
-
helperText="
|
|
117
|
+
helperText="When bordered is false, focus border styling is disabled by default."
|
|
118
118
|
bordered={false}
|
|
119
119
|
/>
|
|
120
|
-
|
|
120
|
+
<TextInput
|
|
121
|
+
label="Borderless TextInput (with focus border)"
|
|
122
|
+
placeholder="placeholder"
|
|
123
|
+
helperText="Set focusedBorderWidth to opt into a focus border style."
|
|
124
|
+
bordered={false}
|
|
125
|
+
focusedBorderWidth={200}
|
|
126
|
+
/>
|
|
127
|
+
</VStack>
|
|
121
128
|
```
|
|
122
129
|
|
|
123
130
|
#### Helper Text
|
|
@@ -641,11 +648,12 @@ function testExample() {
|
|
|
641
648
|
| --- | --- | --- | --- | --- |
|
|
642
649
|
| `align` | `center \| start \| end \| justify` | No | `start` | Aligns text inside input and helperText |
|
|
643
650
|
| `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `200` | Leverage one of the borderRadius styles we offer to round the corners of the input. |
|
|
644
|
-
| `bordered` | `boolean` | No | `true` | Adds border to input |
|
|
651
|
+
| `bordered` | `boolean` | No | `true` | Adds border to input. When set to false, focus border styling is disabled by default. |
|
|
645
652
|
| `compact` | `boolean` | No | `false` | Enables compact variation |
|
|
646
653
|
| `disabled` | `boolean` | No | `false` | Toggles input interactability and opacity |
|
|
647
654
|
| `enableColorSurge` | `boolean` | No | `-` | Enable Color Surge motion |
|
|
648
655
|
| `end` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Adds content to the end of the inner input. Refer to diagram for location of endNode in InputStack component |
|
|
656
|
+
| `focusedBorderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | Additional border width when focused. Set this when bordered={false} to opt into a focus border style. |
|
|
649
657
|
| `height` | `((Height<string \| number> \| { base?: Height<string \| number>; phone?: Height<string \| number> \| undefined; tablet?: Height<string \| number> \| undefined; desktop?: Height<string \| number> \| undefined; }) & (string \| number)) \| undefined` | No | `-` | Height of input |
|
|
650
658
|
| `helperText` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | For cases where label is not enough information to describe what the text input is for. Can also be used for showing positive/negative messages |
|
|
651
659
|
| `helperTextErrorIconAccessibilityLabel` | `string` | No | `'error'` | Accessibility label for helper text error icon when variant=negative |
|