@ceed/ads 1.35.1 → 1.37.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.
Files changed (122) hide show
  1. package/README.md +85 -95
  2. package/dist/components/Accordions/Accordions.d.ts +1 -0
  3. package/dist/components/Alert/Alert.d.ts +5 -5
  4. package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
  5. package/dist/components/Avatar/Avatar.d.ts +7 -17
  6. package/dist/components/Box/Box.d.ts +1 -0
  7. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -5
  8. package/dist/components/Button/Button.d.ts +3 -2
  9. package/dist/components/Calendar/Calendar.d.ts +1 -0
  10. package/dist/components/Card/Card.d.ts +1 -0
  11. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  12. package/dist/components/Chip/Chip.d.ts +1 -0
  13. package/dist/components/Container/Container.d.ts +6 -1
  14. package/dist/components/DialogActions/DialogActions.d.ts +1 -0
  15. package/dist/components/DialogContent/DialogContent.d.ts +1 -0
  16. package/dist/components/DialogFrame/DialogFrame.d.ts +1 -1
  17. package/dist/components/DialogTitle/DialogTitle.d.ts +1 -0
  18. package/dist/components/Divider/Divider.d.ts +1 -0
  19. package/dist/components/Dropdown/Dropdown.d.ts +28 -1
  20. package/dist/components/FilterMenu/components/MonthRange.d.ts +11 -0
  21. package/dist/components/FilterMenu/types.d.ts +5 -1
  22. package/dist/components/FormControl/FormControl.d.ts +1 -0
  23. package/dist/components/FormHelperText/FormHelperText.d.ts +1 -0
  24. package/dist/components/FormLabel/FormLabel.d.ts +1 -0
  25. package/dist/components/Grid/Grid.d.ts +1 -0
  26. package/dist/components/IconButton/IconButton.d.ts +3 -2
  27. package/dist/components/IconMenuButton/IconMenuButton.d.ts +7 -6
  28. package/dist/components/InfoSign/InfoSign.d.ts +3 -2
  29. package/dist/components/Input/Input.d.ts +8 -22
  30. package/dist/components/InsetDrawer/InsetDrawer.d.ts +1 -0
  31. package/dist/components/Markdown/Markdown.d.ts +9 -24
  32. package/dist/components/Menu/Menu.d.ts +2 -1
  33. package/dist/components/MenuButton/MenuButton.d.ts +10 -8
  34. package/dist/components/Modal/Modal.d.ts +4 -2
  35. package/dist/components/NavigationGroup/NavigationGroup.d.ts +3 -2
  36. package/dist/components/NavigationItem/NavigationItem.d.ts +3 -2
  37. package/dist/components/Navigator/Navigator.d.ts +5 -4
  38. package/dist/components/Pagination/Pagination.d.ts +1 -1
  39. package/dist/components/ProfileMenu/ProfileMenu.d.ts +2 -2
  40. package/dist/components/Radio/Radio.d.ts +1 -0
  41. package/dist/components/RadioList/RadioList.d.ts +3 -2
  42. package/dist/components/Select/Select.d.ts +20 -10
  43. package/dist/components/Sheet/Sheet.d.ts +1 -0
  44. package/dist/components/Stack/Stack.d.ts +1 -0
  45. package/dist/components/Stepper/Stepper.d.ts +2 -1
  46. package/dist/components/Switch/Switch.d.ts +1 -0
  47. package/dist/components/Table/Table.d.ts +7 -5
  48. package/dist/components/Tabs/Tabs.d.ts +1 -0
  49. package/dist/components/Textarea/Textarea.d.ts +8 -20
  50. package/dist/components/ThemeProvider/ThemeProvider.d.ts +4 -2
  51. package/dist/components/Tooltip/Tooltip.d.ts +1 -0
  52. package/dist/components/Typography/Typography.d.ts +1 -0
  53. package/dist/components/Uploader/Uploader.d.ts +18 -17
  54. package/dist/components/data-display/Avatar.md +60 -72
  55. package/dist/components/data-display/Badge.md +197 -181
  56. package/dist/components/data-display/Chip.md +164 -142
  57. package/dist/components/data-display/DataTable.md +843 -338
  58. package/dist/components/data-display/InfoSign.md +1 -3
  59. package/dist/components/data-display/Markdown.md +93 -125
  60. package/dist/components/data-display/Table.md +1453 -1007
  61. package/dist/components/data-display/Typography.md +101 -104
  62. package/dist/components/feedback/Alert.md +80 -86
  63. package/dist/components/feedback/CircularProgress.md +32 -36
  64. package/dist/components/feedback/Dialog.md +25 -17
  65. package/dist/components/feedback/Modal.md +296 -265
  66. package/dist/components/feedback/Skeleton.md +125 -89
  67. package/dist/components/index.d.ts +60 -1
  68. package/dist/components/inputs/Autocomplete.md +191 -95
  69. package/dist/components/inputs/Button.md +83 -83
  70. package/dist/components/inputs/ButtonGroup.md +195 -185
  71. package/dist/components/inputs/Calendar.md +25 -28
  72. package/dist/components/inputs/Checkbox.md +11 -29
  73. package/dist/components/inputs/CurrencyInput.md +4 -4
  74. package/dist/components/inputs/DatePicker.md +229 -110
  75. package/dist/components/inputs/DateRangePicker.md +248 -137
  76. package/dist/components/inputs/FilterMenu.md +138 -8
  77. package/dist/components/inputs/FilterableCheckboxGroup.md +115 -55
  78. package/dist/components/inputs/FormControl.md +75 -69
  79. package/dist/components/inputs/IconButton.md +229 -205
  80. package/dist/components/inputs/Input.md +131 -98
  81. package/dist/components/inputs/MonthPicker.md +186 -84
  82. package/dist/components/inputs/MonthRangePicker.md +73 -49
  83. package/dist/components/inputs/PercentageInput.md +15 -31
  84. package/dist/components/inputs/RadioButton.md +320 -256
  85. package/dist/components/inputs/RadioList.md +66 -50
  86. package/dist/components/inputs/RadioTileGroup.md +287 -170
  87. package/dist/components/inputs/SearchBar.md +82 -60
  88. package/dist/components/inputs/Select.md +181 -115
  89. package/dist/components/inputs/Slider.md +153 -102
  90. package/dist/components/inputs/Switch.md +193 -138
  91. package/dist/components/inputs/Textarea.md +15 -20
  92. package/dist/components/inputs/Uploader/Uploader.md +68 -39
  93. package/dist/components/layout/Box.md +841 -662
  94. package/dist/components/layout/Container.md +3 -11
  95. package/dist/components/layout/Grid.md +480 -394
  96. package/dist/components/layout/Stack.md +739 -566
  97. package/dist/components/navigation/Breadcrumbs.md +182 -116
  98. package/dist/components/navigation/Dropdown.md +732 -391
  99. package/dist/components/navigation/IconMenuButton.md +14 -6
  100. package/dist/components/navigation/InsetDrawer.md +550 -378
  101. package/dist/components/navigation/Link.md +104 -94
  102. package/dist/components/navigation/Menu.md +623 -502
  103. package/dist/components/navigation/MenuButton.md +18 -10
  104. package/dist/components/navigation/NavigationGroup.md +19 -50
  105. package/dist/components/navigation/NavigationItem.md +6 -6
  106. package/dist/components/navigation/Navigator.md +26 -28
  107. package/dist/components/navigation/Pagination.md +86 -75
  108. package/dist/components/navigation/ProfileMenu.md +65 -43
  109. package/dist/components/navigation/Stepper.md +2 -12
  110. package/dist/components/navigation/Tabs.md +209 -183
  111. package/dist/components/surfaces/Accordions.md +89 -172
  112. package/dist/components/surfaces/Card.md +1094 -709
  113. package/dist/components/surfaces/Divider.md +562 -412
  114. package/dist/components/surfaces/Sheet.md +700 -518
  115. package/dist/guides/ThemeProvider.md +65 -40
  116. package/dist/index.browser.js +4 -4
  117. package/dist/index.browser.js.map +4 -4
  118. package/dist/index.cjs +1655 -1548
  119. package/dist/index.d.ts +1 -1
  120. package/dist/index.js +1314 -1199
  121. package/framer/index.js +1 -1
  122. package/package.json +32 -35
@@ -78,10 +78,10 @@ CurrencyInput supports three sizes: `sm`, `md` (default), and `lg`.
78
78
 
79
79
  ```tsx
80
80
  <Stack gap={2}>
81
- <CurrencyInput size="sm" label="Small" defaultValue={1000} />
82
- <CurrencyInput size="md" label="Medium" defaultValue={1000} />
83
- <CurrencyInput size="lg" label="Large" defaultValue={1000} />
84
- </Stack>
81
+ <CurrencyInput size="sm" label="Small" defaultValue={1000} />
82
+ <CurrencyInput size="md" label="Medium" defaultValue={1000} />
83
+ <CurrencyInput size="lg" label="Large" defaultValue={1000} />
84
+ </Stack>
85
85
  ```
86
86
 
87
87
  ## Form Features
@@ -36,13 +36,7 @@ import { DatePicker } from '@ceed/ads';
36
36
  function DateForm() {
37
37
  const [date, setDate] = useState('');
38
38
 
39
- return (
40
- <DatePicker
41
- label="Select Date"
42
- value={date}
43
- onChange={(e) => setDate(e.target.value)}
44
- />
45
- );
39
+ return <DatePicker label="Select Date" value={date} onChange={(e) => setDate(e.target.value)} />;
46
40
  }
47
41
  ```
48
42
 
@@ -57,10 +51,10 @@ DatePicker supports three sizes (`sm`, `md`, `lg`) to fit different layout densi
57
51
 
58
52
  ```tsx
59
53
  <Stack gap={2}>
60
- <DatePicker {...args} size="sm" />
61
- <DatePicker {...args} size="md" />
62
- <DatePicker {...args} size="lg" />
63
- </Stack>
54
+ <DatePicker {...args} size="sm" />
55
+ <DatePicker {...args} size="md" />
56
+ <DatePicker {...args} size="lg" />
57
+ </Stack>
64
58
  ```
65
59
 
66
60
  ## Label and Helper Text
@@ -177,18 +171,20 @@ DatePicker works in both controlled mode (you manage `value` via state) and unco
177
171
 
178
172
  ```tsx
179
173
  <Stack gap={2}>
180
- <DatePicker {...args} value={value} onChange={e => setValue(e.target.value)} />
181
- <Button onClick={() => {
182
- const currentValue = new Date(value);
183
- currentValue.setDate(currentValue.getDate() + 1);
184
- const year = currentValue.getFullYear();
185
- const month = String(currentValue.getMonth() + 1).padStart(2, '0');
186
- const day = String(currentValue.getDate()).padStart(2, '0');
187
- setValue(`${year}/${month}/${day}`);
188
- }}>
189
- Next Day
190
- </Button>
191
- </Stack>
174
+ <DatePicker {...args} value={value} onChange={(e) => setValue(e.target.value)} />
175
+ <Button
176
+ onClick={() => {
177
+ const currentValue = new Date(value);
178
+ currentValue.setDate(currentValue.getDate() + 1);
179
+ const year = currentValue.getFullYear();
180
+ const month = String(currentValue.getMonth() + 1).padStart(2, "0");
181
+ const day = String(currentValue.getDate()).padStart(2, "0");
182
+ setValue(`${year}/${month}/${day}`);
183
+ }}
184
+ >
185
+ Next Day
186
+ </Button>
187
+ </Stack>
192
188
  ```
193
189
 
194
190
  ```tsx
@@ -206,42 +202,126 @@ The `format` prop determines the shape of the value emitted through `onChange`,
206
202
 
207
203
  ```tsx
208
204
  <Stack gap={2}>
209
- <DatePicker {...args} value={value['YYYY.MM.DD']} label="YYYY.MM.DD" name="YYYY.MM.DD" format="YYYY.MM.DD" onChange={handleChange} />
210
- <DatePicker {...args} value={value['YYYY/MM/DD']} label="YYYY/MM/DD" name="YYYY/MM/DD" format="YYYY/MM/DD" onChange={handleChange} />
211
- <DatePicker {...args} value={value['MM/DD/YYYY']} label="MM/DD/YYYY" name="MM/DD/YYYY" format="MM/DD/YYYY" onChange={handleChange} />
212
- <DatePicker {...args} value={value['YYYY-MM-DD']} label="YYYY-MM-DD" name="YYYY-MM-DD" format="YYYY-MM-DD" onChange={handleChange} />
213
- <DatePicker {...args} value={value['DD/MM/YYYY']} label="DD/MM/YYYY" name="DD/MM/YYYY" format="DD/MM/YYYY" onChange={handleChange} />
214
- <DatePicker {...args} value={value['DD.MM.YYYY']} label="DD.MM.YYYY" name="DD.MM.YYYY" format="DD.MM.YYYY" onChange={handleChange} />
215
- </Stack>
205
+ <DatePicker
206
+ {...args}
207
+ value={value["YYYY.MM.DD"]}
208
+ label="YYYY.MM.DD"
209
+ name="YYYY.MM.DD"
210
+ format="YYYY.MM.DD"
211
+ onChange={handleChange}
212
+ />
213
+ <DatePicker
214
+ {...args}
215
+ value={value["YYYY/MM/DD"]}
216
+ label="YYYY/MM/DD"
217
+ name="YYYY/MM/DD"
218
+ format="YYYY/MM/DD"
219
+ onChange={handleChange}
220
+ />
221
+ <DatePicker
222
+ {...args}
223
+ value={value["MM/DD/YYYY"]}
224
+ label="MM/DD/YYYY"
225
+ name="MM/DD/YYYY"
226
+ format="MM/DD/YYYY"
227
+ onChange={handleChange}
228
+ />
229
+ <DatePicker
230
+ {...args}
231
+ value={value["YYYY-MM-DD"]}
232
+ label="YYYY-MM-DD"
233
+ name="YYYY-MM-DD"
234
+ format="YYYY-MM-DD"
235
+ onChange={handleChange}
236
+ />
237
+ <DatePicker
238
+ {...args}
239
+ value={value["DD/MM/YYYY"]}
240
+ label="DD/MM/YYYY"
241
+ name="DD/MM/YYYY"
242
+ format="DD/MM/YYYY"
243
+ onChange={handleChange}
244
+ />
245
+ <DatePicker
246
+ {...args}
247
+ value={value["DD.MM.YYYY"]}
248
+ label="DD.MM.YYYY"
249
+ name="DD.MM.YYYY"
250
+ format="DD.MM.YYYY"
251
+ onChange={handleChange}
252
+ />
253
+ </Stack>
216
254
  ```
217
255
 
218
256
  ```tsx
219
257
  <Stack gap={2}>
220
- <DatePicker {...args} value={value1} label="YYYY.MM.DD" name="YYYY.MM.DD" displayFormat="YYYY.MM.DD" onChange={e => {
221
- setValue1(e.target.value);
222
- args.onChange?.(e);
223
- }} />
224
- <DatePicker {...args} value={value2} label="YYYY/MM/DD" name="YYYY/MM/DD" displayFormat="YYYY/MM/DD" onChange={e => {
225
- setValue2(e.target.value);
226
- args.onChange?.(e);
227
- }} />
228
- <DatePicker {...args} value={value3} label="MM/DD/YYYY" name="MM/DD/YYYY" displayFormat="MM/DD/YYYY" onChange={e => {
229
- setValue3(e.target.value);
230
- args.onChange?.(e);
231
- }} />
232
- <DatePicker {...args} value={value4} label="YYYY-MM-DD" name="YYYY-MM-DD" displayFormat="YYYY-MM-DD" onChange={e => {
233
- setValue4(e.target.value);
234
- args.onChange?.(e);
235
- }} />
236
- <DatePicker {...args} value={value5} label="DD/MM/YYYY" name="DD/MM/YYYY" displayFormat="DD/MM/YYYY" onChange={e => {
237
- setValue5(e.target.value);
238
- args.onChange?.(e);
239
- }} />
240
- <DatePicker {...args} value={value6} label="DD.MM.YYYY" name="DD.MM.YYYY" displayFormat="DD.MM.YYYY" onChange={e => {
241
- setValue6(e.target.value);
242
- args.onChange?.(e);
243
- }} />
244
- </Stack>
258
+ <DatePicker
259
+ {...args}
260
+ value={value1}
261
+ label="YYYY.MM.DD"
262
+ name="YYYY.MM.DD"
263
+ displayFormat="YYYY.MM.DD"
264
+ onChange={(e) => {
265
+ setValue1(e.target.value);
266
+ args.onChange?.(e);
267
+ }}
268
+ />
269
+ <DatePicker
270
+ {...args}
271
+ value={value2}
272
+ label="YYYY/MM/DD"
273
+ name="YYYY/MM/DD"
274
+ displayFormat="YYYY/MM/DD"
275
+ onChange={(e) => {
276
+ setValue2(e.target.value);
277
+ args.onChange?.(e);
278
+ }}
279
+ />
280
+ <DatePicker
281
+ {...args}
282
+ value={value3}
283
+ label="MM/DD/YYYY"
284
+ name="MM/DD/YYYY"
285
+ displayFormat="MM/DD/YYYY"
286
+ onChange={(e) => {
287
+ setValue3(e.target.value);
288
+ args.onChange?.(e);
289
+ }}
290
+ />
291
+ <DatePicker
292
+ {...args}
293
+ value={value4}
294
+ label="YYYY-MM-DD"
295
+ name="YYYY-MM-DD"
296
+ displayFormat="YYYY-MM-DD"
297
+ onChange={(e) => {
298
+ setValue4(e.target.value);
299
+ args.onChange?.(e);
300
+ }}
301
+ />
302
+ <DatePicker
303
+ {...args}
304
+ value={value5}
305
+ label="DD/MM/YYYY"
306
+ name="DD/MM/YYYY"
307
+ displayFormat="DD/MM/YYYY"
308
+ onChange={(e) => {
309
+ setValue5(e.target.value);
310
+ args.onChange?.(e);
311
+ }}
312
+ />
313
+ <DatePicker
314
+ {...args}
315
+ value={value6}
316
+ label="DD.MM.YYYY"
317
+ name="DD.MM.YYYY"
318
+ displayFormat="DD.MM.YYYY"
319
+ onChange={(e) => {
320
+ setValue6(e.target.value);
321
+ args.onChange?.(e);
322
+ }}
323
+ />
324
+ </Stack>
245
325
  ```
246
326
 
247
327
  **Supported format tokens:**
@@ -263,22 +343,32 @@ Use the `presets` prop to display a list of quick-select options alongside the c
263
343
  Each preset's `value` must match the component's `format` prop. When the current value matches a preset, that preset is automatically highlighted -- regardless of whether the value was set via the preset button or by selecting the same date on the calendar.
264
344
 
265
345
  ```tsx
266
- <DatePicker {...args} value={value} onChange={e => {
267
- setValue(e.target.value);
268
- args.onChange?.(e);
269
- }} presets={[{
270
- label: 'Today',
271
- value: fmt(today)
272
- }, {
273
- label: 'Yesterday',
274
- value: daysAgo(1)
275
- }, {
276
- label: '3 days ago',
277
- value: daysAgo(3)
278
- }, {
279
- label: '1 week ago',
280
- value: daysAgo(7)
281
- }]} />
346
+ <DatePicker
347
+ {...args}
348
+ value={value}
349
+ onChange={(e) => {
350
+ setValue(e.target.value);
351
+ args.onChange?.(e);
352
+ }}
353
+ presets={[
354
+ {
355
+ label: "Today",
356
+ value: fmt(today)
357
+ },
358
+ {
359
+ label: "Yesterday",
360
+ value: daysAgo(1)
361
+ },
362
+ {
363
+ label: "3 days ago",
364
+ value: daysAgo(3)
365
+ },
366
+ {
367
+ label: "1 week ago",
368
+ value: daysAgo(7)
369
+ }
370
+ ]}
371
+ />
282
372
  ```
283
373
 
284
374
  ```tsx
@@ -309,16 +399,22 @@ function QuickDateSelect() {
309
399
  Pair DatePicker with an external reset button to programmatically clear the value.
310
400
 
311
401
  ```tsx
312
- <div style={{
313
- display: 'flex',
314
- gap: '10px'
315
- }}>
316
- <DatePicker {...props} value={value} onChange={event => {
317
- onChange?.(event);
318
- setValue(event.target.value);
319
- }} />
320
- <Button onClick={() => setValue('')}>Reset</Button>
321
- </div>
402
+ <div
403
+ style={{
404
+ display: "flex",
405
+ gap: "10px"
406
+ }}
407
+ >
408
+ <DatePicker
409
+ {...props}
410
+ value={value}
411
+ onChange={(event) => {
412
+ onChange?.(event);
413
+ setValue(event.target.value);
414
+ }}
415
+ />
416
+ <Button onClick={() => setValue("")}>Reset</Button>
417
+ </div>
322
418
  ```
323
419
 
324
420
  ### Hide Clear Button
@@ -339,12 +435,17 @@ Multiple DatePicker instances can share the same value for dependent field scena
339
435
 
340
436
  ```tsx
341
437
  <Stack gap={2}>
342
- <DatePicker label="Select Date" value={value} inputReadOnly onChange={e => {
343
- setValue(e.target.value);
344
- setValue2(e.target.value);
345
- }} />
346
- <DatePicker label="Synchronized" value={value2} disabled />
347
- </Stack>
438
+ <DatePicker
439
+ label="Select Date"
440
+ value={value}
441
+ inputReadOnly
442
+ onChange={(e) => {
443
+ setValue(e.target.value);
444
+ setValue2(e.target.value);
445
+ }}
446
+ />
447
+ <DatePicker label="Synchronized" value={value2} disabled />
448
+ </Stack>
348
449
  ```
349
450
 
350
451
  ## Form with Validation
@@ -410,9 +511,7 @@ function AppointmentPicker() {
410
511
  function RegionalDateField({ locale }: { locale: string }) {
411
512
  const [date, setDate] = useState('');
412
513
 
413
- const displayFormat = locale === 'en-US' ? 'MM/DD/YYYY'
414
- : locale === 'en-GB' ? 'DD/MM/YYYY'
415
- : 'YYYY-MM-DD';
514
+ const displayFormat = locale === 'en-US' ? 'MM/DD/YYYY' : locale === 'en-GB' ? 'DD/MM/YYYY' : 'YYYY-MM-DD';
416
515
 
417
516
  return (
418
517
  <DatePicker
@@ -431,51 +530,71 @@ function RegionalDateField({ locale }: { locale: string }) {
431
530
  1. **Always provide a label**
432
531
 
433
532
  ```tsx
434
- {/* Do */}
435
- <DatePicker label="Birth Date" />
533
+ {
534
+ /* Do */
535
+ }
536
+ <DatePicker label="Birth Date" />;
436
537
 
437
- {/* Don't */}
438
- <DatePicker placeholder="Birth Date" />
538
+ {
539
+ /* Don't */
540
+ }
541
+ <DatePicker placeholder="Birth Date" />;
439
542
  ```
440
543
 
441
544
  2. **Keep value format consistent with the `format` prop**
442
545
 
443
546
  ```tsx
444
- {/* Do */}
445
- <DatePicker format="YYYY/MM/DD" value="2024/04/15" />
547
+ {
548
+ /* Do */
549
+ }
550
+ <DatePicker format="YYYY/MM/DD" value="2024/04/15" />;
446
551
 
447
- {/* Don't -- mismatched format causes unexpected behavior */}
448
- <DatePicker format="YYYY/MM/DD" value="04/15/2024" />
552
+ {
553
+ /* Don't -- mismatched format causes unexpected behavior */
554
+ }
555
+ <DatePicker format="YYYY/MM/DD" value="04/15/2024" />;
449
556
  ```
450
557
 
451
558
  3. **Use `displayFormat` to separate API format from UI format**
452
559
 
453
560
  ```tsx
454
- {/* Do -- consistent API format, locale-appropriate display */}
455
- <DatePicker format="YYYY-MM-DD" displayFormat="MM/DD/YYYY" />
561
+ {
562
+ /* Do -- consistent API format, locale-appropriate display */
563
+ }
564
+ <DatePicker format="YYYY-MM-DD" displayFormat="MM/DD/YYYY" />;
456
565
 
457
- {/* Don't -- changing format just for display affects onChange values */}
458
- <DatePicker format="MM/DD/YYYY" />
566
+ {
567
+ /* Don't -- changing format just for display affects onChange values */
568
+ }
569
+ <DatePicker format="MM/DD/YYYY" />;
459
570
  ```
460
571
 
461
572
  4. **Set appropriate date boundaries for your use case**
462
573
 
463
574
  ```tsx
464
- {/* Do */}
465
- <DatePicker label="Birth Date" disableFuture minDate="1900/01/01" />
575
+ {
576
+ /* Do */
577
+ }
578
+ <DatePicker label="Birth Date" disableFuture minDate="1900/01/01" />;
466
579
 
467
- {/* Don't -- unrestricted date range for a birth date field */}
468
- <DatePicker label="Birth Date" />
580
+ {
581
+ /* Don't -- unrestricted date range for a birth date field */
582
+ }
583
+ <DatePicker label="Birth Date" />;
469
584
  ```
470
585
 
471
586
  5. **Show validation feedback with error and helperText**
472
587
 
473
588
  ```tsx
474
- {/* Do */}
475
- <DatePicker error={!isValid} helperText={errorMessage} />
589
+ {
590
+ /* Do */
591
+ }
592
+ <DatePicker error={!isValid} helperText={errorMessage} />;
476
593
 
477
- {/* Don't -- silently ignore invalid state */}
478
- <DatePicker value={invalidDate} />
594
+ {
595
+ /* Don't -- silently ignore invalid state */
596
+ }
597
+ <DatePicker value={invalidDate} />;
479
598
  ```
480
599
 
481
600
  ## Props and Customization