@maxio-com/react-ui-components 9.24.0 → 9.24.1

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.
@@ -70,4 +70,5 @@ Use this skill to build React components using `@maxio-com/react-ui-components`.
70
70
  - [Patterns / Auth Layout](references/patterns-auth-layout.md)
71
71
  - [Patterns / Side Nav](references/patterns-side-nav.md)
72
72
  - [Patterns / Top Bar](references/patterns-top-bar.md)
73
+ - [Migration Guides / v9](references/migration-guides-v9.md)
73
74
  - [Deprecated / TextInput](references/deprecated-textinput.md)
@@ -60,6 +60,7 @@ messaging with the field so users understand the expected value.
60
60
 
61
61
  - **[TextArea](components-forms-textarea.md)**: use for longer, multi-line free-form content.
62
62
  - **[TextInput](deprecated-textinput.md)**: deprecated predecessor. Use TextField for new React usage.
63
+ - **[Migrating from TextInput to TextField](migration-guides-v9.md)**: prop mapping and checklist for replacing legacy TextInput usage.
63
64
  - **[Select](components-forms-select.md)**: use when users choose from a shorter closed list.
64
65
  - **[ComboBox](components-forms-combobox.md)**: use when users choose from a list and typing should filter options.
65
66
  - **[IconButton](components-buttons-iconbutton.md)**: use for compact actions inside trailing or leading content.
@@ -6,6 +6,9 @@
6
6
 
7
7
  ### Overview
8
8
 
9
+ TextInput is deprecated. For migration details, see
10
+ [Migrating from TextInput to TextField](migration-guides-v9.md).
11
+
9
12
  TextInput lets users enter or edit a short, single-line text value in a
10
13
  form.
11
14
 
@@ -61,13 +64,16 @@ form.
61
64
  ### Related
62
65
 
63
66
  - **[TextField](components-forms-textfield.md)**: preferred replacement for TextInput in new React usage.
67
+ - **[Migrating from TextInput to TextField](migration-guides-v9.md)**: prop mapping and checklist for replacing legacy TextInput usage.
64
68
  - **[Select](components-forms-select.md)**: use when users choose from a shorter closed list.
65
69
  - **[ComboBox](components-forms-combobox.md)**: use when users choose from a list and typing should filter options.
66
70
  - **[IconButton](components-buttons-iconbutton.md)**: use for compact actions inside trailing or leading content.
67
71
 
68
72
  ## React
69
73
 
70
- TextInput is deprecated. Use TextField for new React usage.
74
+ TextInput is deprecated. Use TextField for new React usage. For migration
75
+ details, see
76
+ [Migrating from TextInput to TextField](migration-guides-v9.md).
71
77
 
72
78
  ```tsx
73
79
  import { TextInput } from '@maxio-com/react-ui-components';
@@ -0,0 +1,299 @@
1
+ # What Changed in v9
2
+
3
+ `@maxio-com/react-ui-components` is currently on the `9.x` line. This page
4
+ tracks every component deprecated during v9 as its own section, so anyone
5
+ catching up from an older release can see everything worth migrating in one
6
+ place before the next major version removes deprecated APIs entirely.
7
+
8
+ This page grows as more components are deprecated during v9 — each one gets
9
+ its own section below, with a prop mapping, behavior notes, and a checklist.
10
+
11
+ ## TextInput to TextField
12
+
13
+ _Deprecated in v9.10.0._
14
+
15
+ `TextInput` is deprecated. Use `TextField` for new React forms and migrate
16
+ existing usage when you are already touching the surrounding form.
17
+
18
+ `TextField` keeps the same visual treatment and single-line input behavior,
19
+ but it exposes the React Aria Components field API directly. Most migrations
20
+ are a small prop rename from the legacy `TextInput` API to the supported
21
+ `TextField` API.
22
+
23
+ ### Before and After
24
+
25
+ <div className="migration-before-after">
26
+
27
+ <div>
28
+
29
+ #### Before
30
+
31
+ ```tsx
32
+ import { TextInput } from '@maxio-com/react-ui-components';
33
+
34
+ <TextInput
35
+ label="Customer name"
36
+ placeholder="Acme Co."
37
+ helperText="Use the legal business name."
38
+ value={customerName}
39
+ invalid={!customerName}
40
+ errorMessage="Enter a customer name."
41
+ disabled={isSaving}
42
+ onChange={setCustomerName}
43
+ />;
44
+ ```
45
+
46
+ </div>
47
+
48
+ <div>
49
+
50
+ #### After
51
+
52
+ ```tsx
53
+ import { TextField } from '@maxio-com/react-ui-components';
54
+
55
+ <TextField
56
+ label="Customer name"
57
+ placeholder="Acme Co."
58
+ description="Use the legal business name."
59
+ value={customerName}
60
+ isInvalid={!customerName}
61
+ errorMessage="Enter a customer name."
62
+ isDisabled={isSaving}
63
+ onChange={setCustomerName}
64
+ />;
65
+ ```
66
+
67
+ </div>
68
+
69
+ </div>
70
+
71
+ ### Prop Mapping
72
+
73
+ <div className="migration-prop-legend">
74
+ <div className="migration-prop-legend__item">
75
+ <span className="migration-prop-legend__swatch migration-prop-legend__swatch--changed" />
76
+ Renamed or changed behavior
77
+ </div>
78
+ <div className="migration-prop-legend__item">
79
+ <span className="migration-prop-legend__swatch migration-prop-legend__swatch--removed" />
80
+ No direct replacement
81
+ </div>
82
+ <div className="migration-prop-legend__item">
83
+ <span className="migration-prop-legend__swatch migration-prop-legend__swatch--unchanged" />
84
+ Carries over unchanged
85
+ </div>
86
+ </div>
87
+
88
+ <table className="migration-prop-table">
89
+ <thead>
90
+ <tr>
91
+ <th>TextInput prop</th>
92
+ <th>TextField prop</th>
93
+ <th>Notes</th>
94
+ </tr>
95
+ </thead>
96
+ <tbody>
97
+ <tr>
98
+ <td><code>label</code></td>
99
+ <td><code>label</code></td>
100
+ <td>Same visible label prop. Prefer a visible label whenever possible.</td>
101
+ </tr>
102
+ <tr className="migration-prop-row--changed">
103
+ <td><code>helperText</code></td>
104
+ <td><code>description</code></td>
105
+ <td>Rename helper copy to <code>description</code>; it is hidden when an error shows.</td>
106
+ </tr>
107
+ <tr>
108
+ <td><code>errorMessage</code></td>
109
+ <td><code>errorMessage</code></td>
110
+ <td>Same error copy prop. Pair it with invalid state.</td>
111
+ </tr>
112
+ <tr className="migration-prop-row--changed">
113
+ <td><code>invalid</code></td>
114
+ <td><code>isInvalid</code></td>
115
+ <td>Rename to the React Aria Components state prop.</td>
116
+ </tr>
117
+ <tr className="migration-prop-row--changed">
118
+ <td><code>disabled</code></td>
119
+ <td><code>isDisabled</code></td>
120
+ <td>Rename to the React Aria Components state prop.</td>
121
+ </tr>
122
+ <tr className="migration-prop-row--changed">
123
+ <td><code>readOnly</code></td>
124
+ <td><code>isReadOnly</code></td>
125
+ <td>Rename to the React Aria Components state prop.</td>
126
+ </tr>
127
+ <tr className="migration-prop-row--changed">
128
+ <td><code>required</code></td>
129
+ <td><code>isRequired</code></td>
130
+ <td>Not equivalent: <code>TextInput</code>'s native <code>required</code> attribute was silently ignored (see Behavior Notes). <code>isRequired</code> is the first working required state.</td>
131
+ </tr>
132
+ <tr>
133
+ <td><code>placeholder</code></td>
134
+ <td><code>placeholder</code></td>
135
+ <td>Same example-value prop. Do not use it as the only label.</td>
136
+ </tr>
137
+ <tr>
138
+ <td><code>value</code></td>
139
+ <td><code>value</code></td>
140
+ <td>Same controlled value pattern.</td>
141
+ </tr>
142
+ <tr>
143
+ <td><code>defaultValue</code></td>
144
+ <td><code>defaultValue</code></td>
145
+ <td>Same uncontrolled value pattern.</td>
146
+ </tr>
147
+ <tr>
148
+ <td><code>onChange</code></td>
149
+ <td><code>onChange</code></td>
150
+ <td>Both components call <code>onChange</code> with the next string value.</td>
151
+ </tr>
152
+ <tr>
153
+ <td><code>size</code></td>
154
+ <td><code>size</code></td>
155
+ <td>Same supported sizes: <code>sm</code>, <code>md</code>, <code>lg</code>, and <code>xl</code>.</td>
156
+ </tr>
157
+ <tr>
158
+ <td><code>fullWidth</code></td>
159
+ <td><code>fullWidth</code></td>
160
+ <td>Same layout prop.</td>
161
+ </tr>
162
+ <tr>
163
+ <td><code>leadingElement</code></td>
164
+ <td><code>leadingElement</code></td>
165
+ <td>Same slot for compact visual context or a small action.</td>
166
+ </tr>
167
+ <tr>
168
+ <td><code>trailingElement</code></td>
169
+ <td><code>trailingElement</code></td>
170
+ <td>Same slot for compact visual context or a small action.</td>
171
+ </tr>
172
+ <tr className="migration-prop-row--removed">
173
+ <td><code>showErrorMessage</code></td>
174
+ <td>No direct prop</td>
175
+ <td>Remove unless the surrounding UX intentionally suppresses error text.</td>
176
+ </tr>
177
+ <tr className="migration-prop-row--changed">
178
+ <td><code>type</code></td>
179
+ <td><code>type</code></td>
180
+ <td><code>TextField</code> supports text-like types: <code>text</code>, <code>search</code>, <code>url</code>, <code>tel</code>, <code>email</code>, and <code>password</code>.</td>
181
+ </tr>
182
+ </tbody>
183
+ </table>
184
+
185
+ ### Behavior Notes
186
+
187
+ - `TextField` uses React Aria Components field state props such as `isInvalid`,
188
+ `isDisabled`, `isReadOnly`, and `isRequired`.
189
+ - `TextInput` never wired a required state into its underlying `useTextField`
190
+ call, so passing a native `required` attribute had no effect: no
191
+ `aria-required`, and no native HTML5 required behavior. If any existing
192
+ usage relied on `required`, treat adding `isRequired` on `TextField` as
193
+ turning on required validation for the first time, not as a like-for-like
194
+ rename — double-check the surrounding form still behaves as expected.
195
+ - `TextInput` logs a deprecation warning when it mounts.
196
+ - `TextField` should use `description` for helper text and `errorMessage` for
197
+ validation feedback.
198
+ - Keep leading and trailing interactive elements independently accessible with
199
+ their own accessible names.
200
+
201
+ ### Migration Checklist
202
+
203
+ Check items off as you go. Progress is saved in your browser, so you can leave
204
+ and come back to this guide while migrating a larger form.
205
+
206
+ <Checklist
207
+ storageKey="migration-checklist-textinput-to-textfield"
208
+ items={[
209
+ {
210
+ id: 'replace-imports',
211
+ title: (
212
+ <>
213
+ Replace <code>TextInput</code> imports with <code>TextField</code>
214
+ </>
215
+ ),
216
+ description: 'TextField is the supported replacement going forward.',
217
+ },
218
+ {
219
+ id: 'rename-helper-text',
220
+ title: (
221
+ <>
222
+ Rename <code>helperText</code> to <code>description</code>
223
+ </>
224
+ ),
225
+ description:
226
+ 'The prop is still hidden automatically whenever an error message shows, same as before.',
227
+ },
228
+ {
229
+ id: 'rename-state-props',
230
+ title: 'Rename legacy state props to their React Aria equivalents',
231
+ description: (
232
+ <>
233
+ <code>invalid</code> to <code>isInvalid</code>, <code>disabled</code>{' '}
234
+ to <code>isDisabled</code>, and <code>readOnly</code> to{' '}
235
+ <code>isReadOnly</code>.
236
+ </>
237
+ ),
238
+ },
239
+ {
240
+ id: 'add-is-required',
241
+ title: (
242
+ <>
243
+ Add <code>isRequired</code> if the field should be required
244
+ </>
245
+ ),
246
+ description: (
247
+ <>
248
+ It wasn't previously enforced: a native <code>required</code> on{' '}
249
+ <code>TextInput</code> had no effect.
250
+ </>
251
+ ),
252
+ },
253
+ {
254
+ id: 'controlled-state',
255
+ title: 'Keep the same controlled/uncontrolled state pattern',
256
+ description: (
257
+ <>
258
+ <code>value</code> plus <code>onChange</code> for controlled fields,{' '}
259
+ <code>defaultValue</code> for simple uncontrolled ones.
260
+ </>
261
+ ),
262
+ },
263
+ {
264
+ id: 'review-validation',
265
+ title: 'Review when validation errors appear',
266
+ description:
267
+ 'Confirm errors still show after submit, blur, or whatever validation moment the surrounding form expects.',
268
+ },
269
+ {
270
+ id: 'remove-show-error-message',
271
+ title: (
272
+ <>
273
+ Remove <code>showErrorMessage</code> usage
274
+ </>
275
+ ),
276
+ description:
277
+ 'TextField has no equivalent prop — handle any intentional suppression in the surrounding form instead.',
278
+ },
279
+ {
280
+ id: 'confirm-label',
281
+ title: 'Confirm the field still has an accessible name',
282
+ description:
283
+ 'Keep a visible label wherever possible, per the component’s accessibility guidance.',
284
+ },
285
+ ]}
286
+ />
287
+
288
+ ## Looking Ahead
289
+
290
+ When the next major version removes these deprecated components, its own
291
+ upgrade guide will supersede this page — this content will move there, along
292
+ with any other breaking changes that release introduces.
293
+
294
+ ## Related
295
+
296
+ - **[TextField](components-forms-textfield.md)**: supported
297
+ React replacement for single-line text fields.
298
+ - **[TextInput](deprecated-textinput.md)**: deprecated
299
+ component documentation for legacy maintenance.
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ export interface ChecklistItem {
3
+ id: string;
4
+ title: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ }
7
+ export interface ChecklistProps {
8
+ storageKey: string;
9
+ items: ChecklistItem[];
10
+ }
11
+ declare const Checklist: ({ storageKey, items }: ChecklistProps) => React.JSX.Element;
12
+ export default Checklist;
13
+ //# sourceMappingURL=Checklist.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checklist.d.ts","sourceRoot":"","sources":["../../../../../src/guides/migrations/Checklist.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IAEX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAI7B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB;AAYD,QAAA,MAAM,SAAS,GAAI,uBAAuB,cAAc,sBAgEvD,CAAC;AAEF,eAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxio-com/react-ui-components",
3
- "version": "9.24.0",
3
+ "version": "9.24.1",
4
4
  "description": "React UI components",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "e70f1aeeb6e52345ca86e70f1e8dc74918f3f0ae"
68
+ "gitHead": "57a63363b591a6d87a5e1c289159da6b1a4a55e7"
69
69
  }