@czi-sds/mcp 0.16.0 → 0.17.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 (164) hide show
  1. package/README.md +2 -1
  2. package/data/component-docs/Accordion.md +291 -0
  3. package/data/component-docs/Autocomplete.md +525 -0
  4. package/data/component-docs/Banner.md +231 -0
  5. package/data/component-docs/Button.md +224 -0
  6. package/data/component-docs/ButtonDropdown.md +256 -0
  7. package/data/component-docs/ButtonGroup.md +320 -0
  8. package/data/component-docs/ButtonToggle.md +397 -0
  9. package/data/component-docs/Callout.md +268 -0
  10. package/data/component-docs/CellBasic.md +122 -0
  11. package/data/component-docs/CellComponent.md +63 -0
  12. package/data/component-docs/CellHeader.md +128 -0
  13. package/data/component-docs/ComplexFilter.md +294 -0
  14. package/data/component-docs/ContentCard.md +406 -0
  15. package/data/component-docs/Dialog.md +651 -0
  16. package/data/component-docs/Dropdown.md +155 -0
  17. package/data/component-docs/DropdownMenu.md +949 -0
  18. package/data/component-docs/HeatmapChart.md +782 -0
  19. package/data/component-docs/Hero.md +363 -0
  20. package/data/component-docs/Icon.md +283 -0
  21. package/data/component-docs/InputCheckbox.md +205 -0
  22. package/data/component-docs/InputDropdown.md +482 -0
  23. package/data/component-docs/InputRadio.md +173 -0
  24. package/data/component-docs/InputSearch.md +81 -0
  25. package/data/component-docs/InputSlider.md +189 -0
  26. package/data/component-docs/InputText.md +110 -0
  27. package/data/component-docs/InputToggle.md +141 -0
  28. package/data/component-docs/IntentMessage.md +293 -0
  29. package/data/component-docs/Legend.md +442 -0
  30. package/data/component-docs/Link.md +23 -0
  31. package/data/component-docs/List.md +300 -0
  32. package/data/component-docs/LoadingIndicator.md +198 -0
  33. package/data/component-docs/Menu.md +298 -0
  34. package/data/component-docs/MenuItem.md +100 -0
  35. package/data/component-docs/NavigationFooter.md +165 -0
  36. package/data/component-docs/NavigationHeader.md +500 -0
  37. package/data/component-docs/NavigationJumpTo.md +414 -0
  38. package/data/component-docs/Notification.md +288 -0
  39. package/data/component-docs/Pagination.md +67 -0
  40. package/data/component-docs/Panel.md +636 -0
  41. package/data/component-docs/Popover.md +448 -0
  42. package/data/component-docs/PreComposedTable.md +2947 -0
  43. package/data/component-docs/SegmentedControl.md +396 -0
  44. package/data/component-docs/StackedBarChart.md +475 -0
  45. package/data/component-docs/Table.md +2000 -0
  46. package/data/component-docs/TableHeader.md +53 -0
  47. package/data/component-docs/TableRow.md +74 -0
  48. package/data/component-docs/Tabs.md +455 -0
  49. package/data/component-docs/Tag.md +647 -0
  50. package/data/component-docs/TagFilter.md +131 -0
  51. package/data/component-docs/Tooltip.md +561 -0
  52. package/data/component-docs/TooltipCondensed.md +203 -0
  53. package/data/component-docs/TooltipTable.md +145 -0
  54. package/data/component-docs/index.json +262 -0
  55. package/data/component-list.json +2 -5
  56. package/data/component-props/Accordion.json +31 -11
  57. package/data/component-props/Alert.json +3 -3
  58. package/data/component-props/Autocomplete.json +150 -15
  59. package/data/component-props/Banner.json +31 -17
  60. package/data/component-props/Button.json +45 -20
  61. package/data/component-props/ButtonDropdown.json +36 -17
  62. package/data/component-props/ButtonDropdownLegacy.json +11 -11
  63. package/data/component-props/ButtonGroup.json +32 -11
  64. package/data/component-props/ButtonIcon.json +10 -10
  65. package/data/component-props/ButtonLegacy.json +19 -19
  66. package/data/component-props/ButtonToggle.json +32 -19
  67. package/data/component-props/ButtonToggleLegacy.json +11 -11
  68. package/data/component-props/Callout.json +58 -17
  69. package/data/component-props/CellBasic.json +94 -41
  70. package/data/component-props/CellComponent.json +23 -7
  71. package/data/component-props/CellHeader.json +62 -19
  72. package/data/component-props/ComplexFilter.json +52 -21
  73. package/data/component-props/ContentCard.json +70 -47
  74. package/data/component-props/Dialog.json +47 -14
  75. package/data/component-props/Dropdown.json +68 -31
  76. package/data/component-props/DropdownMenu.json +128 -23
  77. package/data/component-props/HeatmapChart.json +88 -12
  78. package/data/component-props/Hero.json +80 -39
  79. package/data/component-props/Icon.json +20 -9
  80. package/data/component-props/InputCheckbox.json +36 -14
  81. package/data/component-props/InputDropdown.json +75 -27
  82. package/data/component-props/InputRadio.json +31 -13
  83. package/data/component-props/InputSearch.json +41 -18
  84. package/data/component-props/InputSlider.json +46 -19
  85. package/data/component-props/InputText.json +26 -19
  86. package/data/component-props/InputToggle.json +26 -9
  87. package/data/component-props/IntentMessage.json +38 -9
  88. package/data/component-props/Link.json +13 -7
  89. package/data/component-props/LoadingIndicator.json +11 -3
  90. package/data/component-props/MenuItem.json +38 -19
  91. package/data/component-props/MenuSelect.json +8 -8
  92. package/data/component-props/NavigationFooter.json +49 -19
  93. package/data/component-props/NavigationHeader.json +150 -37
  94. package/data/component-props/NavigationJumpTo.json +33 -7
  95. package/data/component-props/Notification.json +39 -21
  96. package/data/component-props/Pagination.json +39 -11
  97. package/data/component-props/Panel.json +62 -9
  98. package/data/component-props/Popover.json +80 -7
  99. package/data/component-props/PreComposedTable.json +99 -27
  100. package/data/component-props/SegmentedControl.json +42 -3
  101. package/data/component-props/StackedBarChart.json +116 -42
  102. package/data/component-props/TableRow.json +38 -19
  103. package/data/component-props/Tabs.json +66 -9
  104. package/data/component-props/Tag.json +34 -17
  105. package/data/component-props/TagFilter.json +10 -3
  106. package/data/component-props/Tooltip.json +49 -18
  107. package/data/component-props/TooltipCondensed.json +18 -9
  108. package/data/component-props/TooltipTable.json +17 -7
  109. package/data/resources/{zeroheight-rules.md → documentation-rules.md} +43 -30
  110. package/data/resources/figma-rules.md +2 -2
  111. package/dist/stdio.js +112 -208
  112. package/package.json +9 -5
  113. package/data/component-props/ButtonDropdownV2.json +0 -34
  114. package/data/component-props/ButtonNew.json +0 -47
  115. package/data/component-props/ButtonToggleV2.json +0 -44
  116. package/data/component-props/ButtonV2.json +0 -43
  117. package/data/zeroheight-cache.json +0 -10259
  118. package/data/zeroheight-exports/Accordion.md +0 -774
  119. package/data/zeroheight-exports/Banner.md +0 -691
  120. package/data/zeroheight-exports/Borders.md +0 -117
  121. package/data/zeroheight-exports/Buttons.md +0 -1854
  122. package/data/zeroheight-exports/Callout.md +0 -931
  123. package/data/zeroheight-exports/Colors.md +0 -1755
  124. package/data/zeroheight-exports/Content-Card.md +0 -309
  125. package/data/zeroheight-exports/Contributing-to-SDS.md +0 -98
  126. package/data/zeroheight-exports/Control-Inputs.md +0 -2818
  127. package/data/zeroheight-exports/Corners.md +0 -104
  128. package/data/zeroheight-exports/Cover-page.md +0 -3
  129. package/data/zeroheight-exports/Dialog.md +0 -1367
  130. package/data/zeroheight-exports/Downloads.md +0 -236
  131. package/data/zeroheight-exports/Drop-Shadows.md +0 -79
  132. package/data/zeroheight-exports/Dropdown-Input.md +0 -1776
  133. package/data/zeroheight-exports/Dropdown-Menus.md +0 -913
  134. package/data/zeroheight-exports/Element-Status-Tracker.md +0 -267
  135. package/data/zeroheight-exports/Field-Inputs.md +0 -1405
  136. package/data/zeroheight-exports/Filters.md +0 -1111
  137. package/data/zeroheight-exports/Getting-Started.md +0 -1157
  138. package/data/zeroheight-exports/Hero.md +0 -414
  139. package/data/zeroheight-exports/Icons.md +0 -2067
  140. package/data/zeroheight-exports/Intent.md +0 -86
  141. package/data/zeroheight-exports/Introduction-to-Bases.md +0 -35
  142. package/data/zeroheight-exports/Introduction-to-Cells.md +0 -35
  143. package/data/zeroheight-exports/Introduction-to-DNA.md +0 -35
  144. package/data/zeroheight-exports/Introduction-to-Genes.md +0 -35
  145. package/data/zeroheight-exports/Introduction.md +0 -115
  146. package/data/zeroheight-exports/Link.md +0 -432
  147. package/data/zeroheight-exports/Lists.md +0 -986
  148. package/data/zeroheight-exports/Loading-Indicator.md +0 -41
  149. package/data/zeroheight-exports/Navigation.md +0 -1190
  150. package/data/zeroheight-exports/Notification.md +0 -1038
  151. package/data/zeroheight-exports/Panel.md +0 -1030
  152. package/data/zeroheight-exports/README.md +0 -122
  153. package/data/zeroheight-exports/Responsive-Design.md +0 -330
  154. package/data/zeroheight-exports/Search-Input.md +0 -91
  155. package/data/zeroheight-exports/Search.md +0 -822
  156. package/data/zeroheight-exports/Segmented-Control.md +0 -609
  157. package/data/zeroheight-exports/Spacing.md +0 -297
  158. package/data/zeroheight-exports/Table.md +0 -5345
  159. package/data/zeroheight-exports/Tabs.md +0 -1324
  160. package/data/zeroheight-exports/Tags.md +0 -1545
  161. package/data/zeroheight-exports/Text-Link.md +0 -268
  162. package/data/zeroheight-exports/Theming.md +0 -362
  163. package/data/zeroheight-exports/Tooltips.md +0 -2015
  164. package/data/zeroheight-exports/Typography.md +0 -800
@@ -1,1405 +0,0 @@
1
- # Field Inputs
2
-
3
- Field Inputs are elements that allow users to type within them, providing an area for users to enter content and information or perform a search.
4
-
5
- ## Overview
6
-
7
- ## Field Input Variants
8
-
9
- | There are two Field Input variants available for designers to use—Search Inputs allow users to enter text to perform a search and Text Inputs provide a free-form space for users to type in information as needed. Follow the usage criteria accompanying each variant as a guide for selecting the correct Text Input for any given use case. | | **Jump to variant:** Rounded Search Square Search Text |
10
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------ |
11
-
12
- ---
13
-
14
- ## Rounded Search Input
15
-
16
- | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
17
- | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
18
-
19
- Used in CZ GEN EPI for top-level searches and when searching within Tables.
20
-
21
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
22
-
23
- | **Default** | **Hover** | **Focus** | **Disabled** |
24
- | ----------- | --------- | --------- | ------------ |
25
-
26
- **InputSearch**
27
-
28
- ---
29
-
30
- **InputSearch**
31
-
32
- ---
33
-
34
- **InputSearch**
35
-
36
- ---
37
-
38
- **InputSearch**
39
-
40
- ---
41
-
42
- ### Rounded Search Input Intent States
43
-
44
- The `intent` prop is used to communicate the response state of the user's search inquiry.
45
-
46
- Use `intent: default` to communicate when a user has entered an accepted or complete search.
47
-
48
- Use `intent: error` to communicate when a user has entered an incorrect or incomplete search.
49
-
50
- Use `intent: warning` to communicate when a user needs to be alerted that their search needs attention.
51
-
52
- | **Default** | **Error** | **Warning** |
53
- | ----------- | --------- | ----------- |
54
-
55
- **InputSearch**
56
-
57
- ---
58
-
59
- **InputSearch**
60
-
61
- ---
62
-
63
- **InputSearch**
64
-
65
- ---
66
-
67
- ---
68
-
69
- ### Rounded Search Input Spacing
70
-
71
- These rules establish how much margin should exist between and around elements.
72
-
73
- **Rounded Search Input spacing**
74
-
75
- ---
76
-
77
- ---
78
-
79
- ## Square Search Input
80
-
81
- | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
82
- | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
83
-
84
- Used in CZ GEN EPI for searches constrained to the element the Input is placed within such as Dropdown Menus or Forms.
85
-
86
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
87
-
88
- | **Default** | **Hover** | **Focus** | **Disabled** |
89
- | ----------- | --------- | --------- | ------------ |
90
-
91
- **InputSearch**
92
-
93
- ---
94
-
95
- **InputSearch**
96
-
97
- ---
98
-
99
- **InputSearch**
100
-
101
- ---
102
-
103
- **InputSearch**
104
-
105
- ---
106
-
107
- ### Square Search Input Intent States
108
-
109
- The `intent` prop is used to communicate the response state of the user's search inquiry.
110
-
111
- Use `intent: default` to communicate when a user has entered an accepted or complete search.
112
-
113
- Use `intent: error` to communicate when a user has entered an incorrect or incomplete search.
114
-
115
- Use `intent: warning` to communicate when a user needs to be alerted that their search needs attention.
116
-
117
- | **Default** | **Error** | **Warning** |
118
- | ----------- | --------- | ----------- |
119
-
120
- **InputSearch**
121
-
122
- ---
123
-
124
- **InputSearch**
125
-
126
- ---
127
-
128
- **InputSearch**
129
-
130
- ---
131
-
132
- ---
133
-
134
- ### Square Search Input Spacing
135
-
136
- These rules establish how much margin should exist between and around elements.
137
-
138
- **Square Search Input spacing**
139
-
140
- ---
141
-
142
- ---
143
-
144
- ## Text Input
145
-
146
- | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
147
- | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
148
-
149
- ### Text Field Input
150
-
151
- The Text Field Input is meant to fit one line of text and should be only used when there is a limited amount or a single line's worth of content intended for the user to input.
152
-
153
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
154
-
155
- | **Default** | **Hover** | **Focus** | **Disabled** |
156
- | ----------- | --------- | --------- | ------------ |
157
-
158
- **InputText**
159
-
160
- ---
161
-
162
- **InputText**
163
-
164
- ---
165
-
166
- **InputText**
167
-
168
- ---
169
-
170
- **InputText**
171
-
172
- ---
173
-
174
- ### Text Area Input
175
-
176
- The Text Area Input is meant to fit multiple lines of text and should be used when there is the potential that the user will want or need to input more than a single line's worth of content.
177
-
178
- It includes a handle in the bottom right corner that the user can grab and drag to expand its size.
179
-
180
- It can be set to accept a specific number of characters in case there is a need to limit how much content the user can enter.
181
-
182
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
183
-
184
- | **Default** | **Hover** | **Focus** | **Disabled** |
185
- | ----------- | --------- | --------- | ------------ |
186
-
187
- **InputText**
188
-
189
- ---
190
-
191
- **InputText**
192
-
193
- ---
194
-
195
- **InputText**
196
-
197
- ---
198
-
199
- **InputText**
200
-
201
- ---
202
-
203
- ### Text Input Intent States
204
-
205
- The `intent` prop is used to communicate the response state of the text the user has input.
206
-
207
- Use `intent: default` to communicate when a user has entered an accepted or complete input.
208
-
209
- Use `intent: error` to communicate when a user has entered an incorrect or incomplete input.
210
-
211
- Use `intent: warning` to communicate when a user needs to be alerted that the content they've input needs attention.
212
-
213
- | **Default** | **Error** | **Warning** |
214
- | ----------- | --------- | ----------- |
215
-
216
- **InputText**
217
-
218
- ---
219
-
220
- **InputText**
221
-
222
- ---
223
-
224
- **InputText**
225
-
226
- ---
227
-
228
- ---
229
-
230
- **InputText**
231
-
232
- ---
233
-
234
- **InputText**
235
-
236
- ---
237
-
238
- **InputText**
239
-
240
- ---
241
-
242
- ---
243
-
244
- ### Text Input Spacing
245
-
246
- These rules establish how much margin should exist between and around elements.
247
-
248
- **Text Input spacing**
249
-
250
- ---
251
-
252
- ## Code
253
-
254
- ## Field Input Components
255
-
256
- | Below you will find an interactive Storybook iframe for Field Inputs. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** InputSearch InputText |
257
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------------- |
258
-
259
- ---
260
-
261
- > These components appear as they are in the default SDS codebase. Once imported into the CZ GEN EPI codebase, use a theme file to enable the CZ GEN EPI visual appearance customization.
262
-
263
- ### InputSearch
264
-
265
- Storybook
266
-
267
- ---
268
-
269
- ### InputText
270
-
271
- Storybook
272
-
273
- ---
274
-
275
- Field Inputs are elements that allow users to type within them, providing an area for users to enter content and information or perform a search.
276
-
277
- ## Overview
278
-
279
- ## Field Input Variants
280
-
281
- | There are two Field Input variants available for designers to use—Search Inputs allow users to enter text to perform a search and Text Inputs provide a free-form space for users to type in information as needed. Follow the usage criteria accompanying each variant as a guide for selecting the correct Text Input for any given use case. | | **Jump to variant:** Rounded Search Square Search Text |
282
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------ |
283
-
284
- ---
285
-
286
- ## Rounded Search Input
287
-
288
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
289
- | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
290
-
291
- Used in CZ ID for top-level searches and when searching within Tables.
292
-
293
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
294
-
295
- | **Default** | **Hover** | **Focus** | **Disabled** |
296
- | ----------- | --------- | --------- | ------------ |
297
-
298
- **InputSearch**
299
-
300
- ---
301
-
302
- **InputSearch**
303
-
304
- ---
305
-
306
- **InputSearch**
307
-
308
- ---
309
-
310
- **InputSearch**
311
-
312
- ---
313
-
314
- ### Rounded Search Input Intent States
315
-
316
- The `intent` prop is used to communicate the response state of the user's search inquiry.
317
-
318
- Use `intent: default` to communicate when a user has entered an accepted or complete search.
319
-
320
- Use `intent: error` to communicate when a user has entered an incorrect or incomplete search.
321
-
322
- Use `intent: warning` to communicate when a user needs to be alerted that their search needs attention.
323
-
324
- | **Default** | **Error** | **Warning** |
325
- | ----------- | --------- | ----------- |
326
-
327
- **InputSearch**
328
-
329
- ---
330
-
331
- **InputSearch**
332
-
333
- ---
334
-
335
- **InputSearch**
336
-
337
- ---
338
-
339
- ---
340
-
341
- ### Rounded Search Input Spacing
342
-
343
- These rules establish how much margin should exist between and around elements.
344
-
345
- **Search spacing**
346
-
347
- ---
348
-
349
- ---
350
-
351
- ## Square Search Input
352
-
353
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
354
- | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
355
-
356
- Used in CZ ID for searches constrained to the element the Input is placed within such as Dropdown Menus or Forms.
357
-
358
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
359
-
360
- | **Default** | **Hover** | **Focus** | **Disabled** |
361
- | ----------- | --------- | --------- | ------------ |
362
-
363
- **InputSearch**
364
-
365
- ---
366
-
367
- **InputSearch**
368
-
369
- ---
370
-
371
- **InputSearch**
372
-
373
- ---
374
-
375
- **InputSearch**
376
-
377
- ---
378
-
379
- ### Square Search Input Intent States
380
-
381
- The `intent` prop is used to communicate the response state of the user's search inquiry.
382
-
383
- Use `intent: default` to communicate when a user has entered an accepted or complete search.
384
-
385
- Use `intent: error` to communicate when a user has entered an incorrect or incomplete search.
386
-
387
- Use `intent: warning` to communicate when a user needs to be alerted that their search needs attention.
388
-
389
- | **Default** | **Error** | **Warning** |
390
- | ----------- | --------- | ----------- |
391
-
392
- **InputSearch**
393
-
394
- ---
395
-
396
- **InputSearch**
397
-
398
- ---
399
-
400
- **InputSearch**
401
-
402
- ---
403
-
404
- ---
405
-
406
- ### Square Search Input Spacing
407
-
408
- These rules establish how much margin should exist between and around elements.
409
-
410
- **Square Search Input spacing**
411
-
412
- ---
413
-
414
- ---
415
-
416
- ## Text Input
417
-
418
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
419
- | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
420
-
421
- ### Text Field Input
422
-
423
- The Text Field Input is meant to fit one line of text and should be only used when there is a limited amount or a single line's worth of content intended for the user to input.
424
-
425
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
426
-
427
- | **Default** | **Hover** | **Focus** | **Disabled** |
428
- | ----------- | --------- | --------- | ------------ |
429
-
430
- **InputText**
431
-
432
- ---
433
-
434
- **InputText**
435
-
436
- ---
437
-
438
- **InputText**
439
-
440
- ---
441
-
442
- **InputText**
443
-
444
- ---
445
-
446
- ### Text Area Input
447
-
448
- The Text Area Input is meant to fit multiple lines of text and should be used when there is the potential that the user will want or need to input more than a single line's worth of content.
449
-
450
- It includes a handle in the bottom right corner that the user can grab and drag to expand its size.
451
-
452
- It can be set to accept a specific number of characters in case there is a need to limit how much content the user can enter.
453
-
454
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
455
-
456
- | **Default** | **Hover** | **Focus** | **Disabled** |
457
- | ----------- | --------- | --------- | ------------ |
458
-
459
- **InputText**
460
-
461
- ---
462
-
463
- **InputText**
464
-
465
- ---
466
-
467
- **InputText**
468
-
469
- ---
470
-
471
- **InputText**
472
-
473
- ---
474
-
475
- ### Text Input Intent States
476
-
477
- The `intent` prop is used to communicate the response state of the text the user has input.
478
-
479
- Use `intent: default` to communicate when a user has entered an accepted or complete input.
480
-
481
- Use `intent: error` to communicate when a user has entered an incorrect or incomplete input.
482
-
483
- Use `intent: warning` to communicate when a user needs to be alerted that the content they've input needs attention.
484
-
485
- | **Default** | **Error** | **Warning** |
486
- | ----------- | --------- | ----------- |
487
-
488
- **InputText**
489
-
490
- ---
491
-
492
- **InputText**
493
-
494
- ---
495
-
496
- **InputText**
497
-
498
- ---
499
-
500
- ---
501
-
502
- **InputText**
503
-
504
- ---
505
-
506
- **InputText**
507
-
508
- ---
509
-
510
- **InputText**
511
-
512
- ---
513
-
514
- ---
515
-
516
- ### Text Input Spacing
517
-
518
- These rules establish how much margin should exist between and around elements.
519
-
520
- **Text Input spacing**
521
-
522
- ---
523
-
524
- ## Code
525
-
526
- ## Field Input Components
527
-
528
- | Below you will find an interactive Storybook iframe for Field Inputs. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** InputSearch InputText |
529
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------------- |
530
-
531
- ---
532
-
533
- ### InputSearch
534
-
535
- Storybook
536
-
537
- ---
538
-
539
- ### InputText
540
-
541
- Storybook
542
-
543
- ---
544
-
545
- Field Inputs are elements that allow users to type within them, providing an area for users to enter content and information or perform a search.
546
-
547
- ## Guidelines
548
-
549
- ## Field Input Components
550
-
551
- | There are two Field Input components available to use—Search Inputs allow users to enter text to perform a search and Text Inputs provide a free-form space for users to type in information as needed. | | **Jump to variant:** Search Input Text Input |
552
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------------- |
553
-
554
- ### Visual Preview
555
-
556
- **Preview_Guidelines_InputSearch**
557
-
558
- ---
559
-
560
- **Preview_Guidelines_InputText**
561
-
562
- ---
563
-
564
- ---
565
-
566
- ## Search Input
567
-
568
- | | In Figma | | | Meets Accessibility | | | In Code |
569
- | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
570
-
571
- ### Search Input Styles
572
-
573
- **InputSearch_Styles_Rounded**
574
-
575
- ---
576
-
577
- **InputSearch_Styles_Square**
578
-
579
- ---
580
-
581
- ---
582
-
583
- ### Live Instance
584
-
585
- Interact with the live instance below and adjust the available props to better conceptualize how it will appear in product:
586
-
587
- Default
588
-
589
- ---
590
-
591
- ### Search Input – Rounded
592
-
593
- Use Search Input – Rounded as part of top-level or primary application searches such as instances where the user will be searching across the entire product or platform.
594
-
595
- After users enter text into the Search field, an `XmarkCircle` icon appears; if clicked the field is reset to default.
596
-
597
- | Default | Hover | Focus | Default (user input) | Disabled |
598
- | ------- | ----- | ----- | -------------------- | -------- |
599
-
600
- **InputSearch_Rounded_Default**
601
-
602
- ---
603
-
604
- **InputSearch_Rounded_Hover**
605
-
606
- ---
607
-
608
- **InputSearch_Rounded_Focus**
609
-
610
- ---
611
-
612
- **InputSearch_Rounded_User Input**
613
-
614
- ---
615
-
616
- **InputSearch_Rounded_Disabled**
617
-
618
- ---
619
-
620
- ---
621
-
622
- ### Search Input – Square
623
-
624
- Use Search Input – Square for searches constrained to the element the Input is placed within such as when used in Dropdown Menus or Panels, or within the body or main content area of applications.
625
-
626
- After users enter text into the Search field, an `XmarkCircle` icon appears; if clicked the field is reset to default.
627
-
628
- | Default | Hover | Focus | Default (user input) | Disabled |
629
- | ------- | ----- | ----- | -------------------- | -------- |
630
-
631
- **InputSearch_Square_Default**
632
-
633
- ---
634
-
635
- **InputSearch_Square_Hover**
636
-
637
- ---
638
-
639
- **InputSearch_Square_Focus**
640
-
641
- ---
642
-
643
- **InputSearch_Square_User Input**
644
-
645
- ---
646
-
647
- **InputSearch_Square_Disabled**
648
-
649
- ---
650
-
651
- ---
652
-
653
- ### Search Input Spacing
654
-
655
- These rules establish how much margin should exist between and around elements.
656
-
657
- **Search spacing**
658
-
659
- ---
660
-
661
- ---
662
-
663
- ### Intent Variations
664
-
665
- Use Default to communicate that the user has yet to enter a response or the response is valid, Negative to communicate when a user has entered an incorrect or incomplete response, and Notice when a user's response needs attention.
666
-
667
- Optionally, Intent Messages can be displayed to further communicate why a Negative or Notice intent was triggered. For more information see Intents.
668
-
669
- Each intent is demonstrated below using the Rounded variant for reference. Regardless of variant, the colors used are the same:
670
-
671
- | Default | Negative | Negative + Intent Message | Notice | Notice + Intent Message |
672
- | ------- | -------- | ------------------------- | ------ | ----------------------- |
673
-
674
- **InputSearch_Intent_Default**
675
-
676
- ---
677
-
678
- **InputSearch_Intent_Negative**
679
-
680
- ---
681
-
682
- **InputSearch_Intent_Negative + Message**
683
-
684
- ---
685
-
686
- **InputSearch_Intent_Notice**
687
-
688
- ---
689
-
690
- **InputSearch_Intent_Notice + Message**
691
-
692
- ---
693
-
694
- ---
695
-
696
- ## Text Input
697
-
698
- | | In Figma | | | Meets Accessibility | | | In Code |
699
- | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
700
-
701
- ### Text Input Types
702
-
703
- **Text Input_Field**
704
-
705
- ---
706
-
707
- **Text Input_Area**
708
-
709
- ---
710
-
711
- ---
712
-
713
- ### Live Instance
714
-
715
- Interact with the live instance below and adjust the available props to better conceptualize how it will appear in product:
716
-
717
- Default
718
-
719
- ---
720
-
721
- ### Text Input – Field
722
-
723
- Text Input – Field is designed to fit one line of text and should be only used when there is a limited amount or a single line's worth of content intended for the user to input.
724
-
725
- | Default | Hover | Focus | Default (user input) | Disabled |
726
- | ------- | ----- | ----- | -------------------- | -------- |
727
-
728
- **TextInput_Field_Default**
729
-
730
- ---
731
-
732
- **TextInput_Field_Hover**
733
-
734
- ---
735
-
736
- **TextInput_Field_Focus**
737
-
738
- ---
739
-
740
- **TextInput_Field_User Input**
741
-
742
- ---
743
-
744
- **TextInput_Field_Disabled**
745
-
746
- ---
747
-
748
- ---
749
-
750
- ### Text Input – Area
751
-
752
- Text Input – Area is meant to fit multiple lines of text and should be used when there is the potential that the user will want or need to input more than a single line's worth of content.
753
-
754
- It includes a handle in the bottom right corner that the user can grab and drag to expand its size.
755
-
756
- It can be set to accept a specific number of characters in case there is a need to limit how much content the user can enter.
757
-
758
- | Default | Hover | Focus | Default (user input) | Disabled |
759
- | ------- | ----- | ----- | -------------------- | -------- |
760
-
761
- **TextInput_Area_Default**
762
-
763
- ---
764
-
765
- **TextInput_Area_Hover**
766
-
767
- ---
768
-
769
- **TextInput_Area_Focus**
770
-
771
- ---
772
-
773
- **TextInput_Area_User Input**
774
-
775
- ---
776
-
777
- **TextInput_Area_Disabled**
778
-
779
- ---
780
-
781
- ---
782
-
783
- ### Text Input Spacing
784
-
785
- These rules establish how much margin should exist between and around elements.
786
-
787
- **Text Input spacing**
788
-
789
- ---
790
-
791
- ---
792
-
793
- ### Text Input Intent Variations
794
-
795
- Use Default to communicate that the user has yet to enter a response or the response is valid, Negative to communicate when a user has entered an incorrect or incomplete response, Notice when a user's response needs attention, and Positive when a user's response is accepted or correct.
796
-
797
- Optionally, Intent Messages can be displayed to further communicate why a Negative, Notice, or Positive intent was triggered. For more information see Intents.
798
-
799
- | Default | Negative | Negative + Intent Message | Notice | Notice + Intent Message | Positive | Positive + Intent Message |
800
- | :-----: | :------: | ------------------------- | :----: | ----------------------- | :------: | ------------------------- |
801
-
802
- **InputText_Field_Default**
803
-
804
- ---
805
-
806
- **InputText_Field_Negative + Message**
807
-
808
- ---
809
-
810
- **InputText_Field_Negative**
811
-
812
- ---
813
-
814
- **InputText_Field_Notice**
815
-
816
- ---
817
-
818
- **InputText_Field_Notice + Message**
819
-
820
- ---
821
-
822
- **InputText_Field_Positive**
823
-
824
- ---
825
-
826
- **InputText_Field_Positive + Message**
827
-
828
- ---
829
-
830
- **InputText_Area_Default**
831
-
832
- ---
833
-
834
- **InputText_Area_Negative**
835
-
836
- ---
837
-
838
- **InputText_Area_Negative + Message**
839
-
840
- ---
841
-
842
- **InputText_Area_Notice**
843
-
844
- ---
845
-
846
- **InputText_Area_Notice + Message**
847
-
848
- ---
849
-
850
- **InputText_Area_Positive**
851
-
852
- ---
853
-
854
- **InputText_Area_Positive + Message**
855
-
856
- ---
857
-
858
- ## Code
859
-
860
- ## Control Input Components
861
-
862
- | There are two Field Input components available to use—`InputSearch` allows users to enter text to perform a search and `InputText` provide a free-form space for users to type in information as needed. | | **Jump to component:** InputSearch InputText |
863
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------------- |
864
-
865
- ### Visual Preview
866
-
867
- **Preview_Code_InputSearch**
868
-
869
- ---
870
-
871
- **Preview_Code_InputText**
872
-
873
- ---
874
-
875
- > **Note:** The code examples below must install dependencies before displaying and may take extra time to load
876
-
877
- ---
878
-
879
- ## InputSearch
880
-
881
- ### SDS Source Code
882
-
883
- The component's source code in the SDS codebase can be found here.
884
-
885
- ### SDS vs MUI
886
-
887
- SDS's `InputSearch` is built on MUI's `TextField` component, with `type="search"`. It also has the SDS "search" icon automatically included, aligned to the right end of the field.
888
-
889
- The following props are available to MUI's `TextField` component, but do not work the same way (or at all) for SDS's `InputSearch` component:
890
-
891
- - **`variants`\*\***:\*\* SDS's `InputSearch` component is not set up to support values for this prop (aside from `outlined`, `InputSearch` default), and using other values available to MUI (`filled`, `standard`) may result in unreliable outputs
892
- - **`size`\*\***:\*\* SDS's `InputSearch` component is not set up to support values for this prop (aside from `small`, `InputText`'s default), and using other values available to MUI (`medium`, `large`) may not have reliable outputs
893
- - **`required`\*\***:\*_ SDS's `InputSearch` does not render the expected asterisk (_) following the label when this prop is `true`
894
- - **`select`\*\***:\*\* SDS's `InputSearch` is not set up to support this boolean prop
895
- - **`hiddenLabel`\*\***:\*\* The `label` ("Search", by default) for SDS's component is included within the search field, not outside of it, and the MUI `hiddenLabel` prop will not hide the label
896
-
897
- The following functionality is available to both MUI's `TextField` component and SDS's `InputText` component, but SDS uses different prop names, shown below:
898
-
899
- - **`intent`\*\***:\*\* This prop is the way you can set colors for SDS's `InputText`, based on its error state. It takes `default` (default, gray), `error`, or `warning` as values. The related MUI-color-setting prop, `color`, has no effect for `InputText` in SDS.
900
-
901
- SDS's `InputSearch` has an additional `sdsStyle` prop to help with setting SDS-specific styles, which takes `square` (default) or `rounded` as values.
902
-
903
- ### MUI Documentation
904
-
905
- Documentation for the underlying MUI `TextField` component can be found here.
906
-
907
- ### Props
908
-
909
- Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
910
-
911
- | Name | Type | Default | Description |
912
- | -------------- | ------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------- |
913
- | `disabled` | `boolean` | `false` | When set to `true`, the component becomes disabled and cannot be interacted with. |
914
- | `handleSubmit` | `func` | `function(value: string) => void` | This function is called when the Search icon is clicked, allowing user to handle the search operation. |
915
- | `id` | `string` | `-` | Specifies the unique `id` for the input element, needed for accessibility. |
916
- | `intent` | `"default"` ` | "negative"` ` | "notice"` ` | "positive"` | `"default"` | Alters the border color and visual intent of the search input. |
917
- | `label` | `string` | `-` | Although hidden, this `label` is provided for accessibility purposes. |
918
- | `onChange` | `func` | `function(event: React.ChangeEvent) => void` | Defines the action to be taken when the input value changes. |
919
- | `placeholder` | `string` | `"Search"` | Sets the `placeholder` text displayed within the input element. |
920
- | `sdsStyle` | `"rounded"` ` | "square"` | `"square"` | Determines the visual style of the component, with options for `rounded` or `square` design. |
921
- | `value` | `string` | `-` | The value of the `input` element, required for a controlled component. |
922
-
923
- ### Code examples
924
-
925
- #### **Default InputSearch**
926
-
927
- This example has the minimum props needed for the `InputSearch` component.
928
-
929
- **/styles.css**
930
-
931
- ```css
932
- body {
933
- font-size: 13px;
934
- font-weight: 400;
935
- letter-spacing: 0.08px;
936
- line-height: 20px;
937
- text-transform: none;
938
- font-family: "Inter", sans-serif;
939
- }
940
-
941
- h1 {
942
- font-size: 1.5rem;
943
- }
944
-
945
- .app {
946
- padding: 20px;
947
- }
948
- ```
949
-
950
- **tsconfig.json**
951
-
952
- ```json
953
- {
954
- "include": ["./**/*"],
955
- "compilerOptions": {
956
- "strict": true,
957
- "esModuleInterop": true,
958
- "lib": ["dom", "es2015"],
959
- "jsx": "react-jsx"
960
- }
961
- }
962
- ```
963
-
964
- **/App.tsx**
965
-
966
- ```tsx
967
- import { InputSearch } from "@czi-sds/components";
968
- import { Box } from "@mui/material";
969
- import "./styles.css";
970
-
971
- function App() {
972
- return (
973
- <div className="app">
974
- <Box sx={{ width: 300 }}>
975
- <InputSearch id="search-input" label="search" placeholder="Search" />
976
- </Box>
977
- </div>
978
- );
979
- }
980
-
981
- export default App;
982
- ```
983
-
984
- **/index.tsx**
985
-
986
- ```tsx
987
- import React from "react";
988
- import { createRoot } from "react-dom/client";
989
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
990
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
991
- import { Theme } from "@czi-sds/components";
992
- import CssBaseline from "@mui/material/CssBaseline";
993
- import useMediaQuery from "@mui/material/useMediaQuery";
994
-
995
- import App from "./App";
996
-
997
- const container = document.getElementById("root");
998
- const root = createRoot(container!);
999
-
1000
- const RootApp = () => {
1001
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
1002
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
1003
-
1004
- return (
1005
- <StyledEngineProvider injectFirst>
1006
- <ThemeProvider theme={theme}>
1007
- <EmotionThemeProvider theme={theme}>
1008
- <CssBaseline />
1009
- <App />
1010
- </EmotionThemeProvider>
1011
- </ThemeProvider>
1012
- </StyledEngineProvider>
1013
- );
1014
- };
1015
-
1016
- root.render(
1017
- <React.StrictMode>
1018
- <RootApp />
1019
- </React.StrictMode>
1020
- );
1021
- ```
1022
-
1023
- **/public/index.html**
1024
-
1025
- ```html
1026
- <!doctype html>
1027
- <html lang="en">
1028
- <head>
1029
- <meta charset="UTF-8" />
1030
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
1031
- <link rel="preconnect" href="https://fonts.googleapis.com" />
1032
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1033
- <link
1034
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
1035
- rel="stylesheet"
1036
- />
1037
- <link
1038
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap"
1039
- rel="stylesheet"
1040
- />
1041
- </head>
1042
- <body>
1043
- <div id="root"></div>
1044
- </body>
1045
- </html>
1046
- ```
1047
-
1048
- **/package.json**
1049
-
1050
- ```json
1051
- {
1052
- "dependencies": {
1053
- "react": "^18.0.0",
1054
- "react-dom": "^18.0.0",
1055
- "react-scripts": "^4.0.0"
1056
- },
1057
- "devDependencies": {
1058
- "@types/react": "^18.0.0",
1059
- "@types/react-dom": "^18.0.0",
1060
- "typescript": "^4.0.0"
1061
- },
1062
- "main": "/index.tsx"
1063
- }
1064
- ```
1065
-
1066
- ---
1067
-
1068
- ---
1069
-
1070
- ## InputText
1071
-
1072
- ### SDS Source Code
1073
-
1074
- The component's source code in the SDS codebase can be found here.
1075
-
1076
- ### SDS vs MUI
1077
-
1078
- Like SDS's `InputSearch` (which is also built upon the same MUI component), the following props and options do not work the same way (or at all) for SDS's `InputText` component even though they are available to MUI's `TextField` component.
1079
-
1080
- - **`variants`\*\***:\*\* SDS's `InputText` component is not set up to support values for this prop (aside from `outlined`, `InputText`'s default), and using other values available to MUI (`filled`, `standard`) may result in unreliable outputs
1081
- - **`size`\*\***:\*\* SDS's `InputText` component is not set up to support values for this prop (aside from `small`, `InputText`'s default), and using other values available to MUI (`medium`, `large`) may not have reliable outputs
1082
- - **`required`\*\***:\*_ SDS's `InputText` does not render the expected asterisk (_) following the label when this prop is `true`
1083
- - **`select`\*\***:\*\* SDS's `InputText` is not set up to support this boolean prop
1084
-
1085
- The following functionality is available to both MUI's `TextField` component and SDS's `InputText` component, but SDS uses different prop names, shown below:
1086
-
1087
- - **`sdsType`\*\***:\*\* This is the SDS-equivalent of MUI's boolean `multiline` prop, and takes `textField` (default) or `textArea` as values
1088
- - **`hideLabel`\*\***:\*\* This is the SDS-equivalent of the `hiddenLabel` prop used in MUI; both are boolean with the default not including them (value of `false`)
1089
- - **`intent`\*\***:\*\* This prop is the way you can set colors for SDS's `InputText`, based on its error state. It takes `default` (default, gray), `error`, or `warning` as values. The related MUI-color-setting prop, `color`, has no effect for `InputText` in SDS.
1090
-
1091
- ### MUI Documentation
1092
-
1093
- Documentation for the underlying MUI `TextField`component can be found here.
1094
-
1095
- ### Props
1096
-
1097
- Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
1098
-
1099
- | Name | Type | Default | Description |
1100
- | ------------- | --------------- | ------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ----------- | -------------------------------------------------------------- |
1101
- | `disabled` | `boolean` | `false` | When set to `true`, the component becomes disabled and cannot be interacted with. |
1102
- | `hideLabel` | `boolean` | `false` | If `true`, the label is hidden.  |
1103
- | `id` | `string` | `-` | Specifies the unique `id` for the input element, needed for accessibility. |
1104
- | `intent` | `"default"` ` | "negative"` ` | "notice"` ` | "positive"` | `"default"` | Alters the border color and visual intent of the search input. |
1105
- | `label` | `string` | `-` | The `label` for the input element. |
1106
- | `placeholder` | `string` | `-` | Sets the `placeholder` text displayed within the input element. |
1107
- | `sdsType` | `"textField"` ` | "textArea"` | `"textField"` | Defines the type of component to render, with options for a text input or text area. |
1108
-
1109
- ### Code examples
1110
-
1111
- #### **InputText – Text Field**
1112
-
1113
- This component represents the text field variant of the `InputText` component.
1114
-
1115
- **/styles.css**
1116
-
1117
- ```css
1118
- body {
1119
- font-size: 13px;
1120
- font-weight: 400;
1121
- letter-spacing: 0.08px;
1122
- line-height: 20px;
1123
- text-transform: none;
1124
- font-family: "Inter", sans-serif;
1125
- }
1126
-
1127
- h1 {
1128
- font-size: 1.5rem;
1129
- }
1130
-
1131
- .app {
1132
- padding: 20px;
1133
- }
1134
- ```
1135
-
1136
- **tsconfig.json**
1137
-
1138
- ```json
1139
- {
1140
- "include": ["./**/*"],
1141
- "compilerOptions": {
1142
- "strict": true,
1143
- "esModuleInterop": true,
1144
- "lib": ["dom", "es2015"],
1145
- "jsx": "react-jsx"
1146
- }
1147
- }
1148
- ```
1149
-
1150
- **/App.tsx**
1151
-
1152
- ```tsx
1153
- import { InputText } from "@czi-sds/components";
1154
- import { Box } from "@mui/material";
1155
- import "./styles.css";
1156
-
1157
- function App() {
1158
- return (
1159
- <div className="app">
1160
- <Box sx={{ width: 300 }}>
1161
- <InputText
1162
- id="search-input"
1163
- label="Label"
1164
- placeholder="Enter your text"
1165
- hideLabel
1166
- />
1167
- </Box>
1168
- </div>
1169
- );
1170
- }
1171
-
1172
- export default App;
1173
- ```
1174
-
1175
- **/index.tsx**
1176
-
1177
- ```tsx
1178
- import React from "react";
1179
- import { createRoot } from "react-dom/client";
1180
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
1181
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
1182
- import { Theme } from "@czi-sds/components";
1183
- import CssBaseline from "@mui/material/CssBaseline";
1184
- import useMediaQuery from "@mui/material/useMediaQuery";
1185
-
1186
- import App from "./App";
1187
-
1188
- const container = document.getElementById("root");
1189
- const root = createRoot(container!);
1190
-
1191
- const RootApp = () => {
1192
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
1193
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
1194
-
1195
- return (
1196
- <StyledEngineProvider injectFirst>
1197
- <ThemeProvider theme={theme}>
1198
- <EmotionThemeProvider theme={theme}>
1199
- <CssBaseline />
1200
- <App />
1201
- </EmotionThemeProvider>
1202
- </ThemeProvider>
1203
- </StyledEngineProvider>
1204
- );
1205
- };
1206
-
1207
- root.render(
1208
- <React.StrictMode>
1209
- <RootApp />
1210
- </React.StrictMode>
1211
- );
1212
- ```
1213
-
1214
- **/public/index.html**
1215
-
1216
- ```html
1217
- <!doctype html>
1218
- <html lang="en">
1219
- <head>
1220
- <meta charset="UTF-8" />
1221
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
1222
- <link rel="preconnect" href="https://fonts.googleapis.com" />
1223
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1224
- <link
1225
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
1226
- rel="stylesheet"
1227
- />
1228
- <link
1229
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap"
1230
- rel="stylesheet"
1231
- />
1232
- </head>
1233
- <body>
1234
- <div id="root"></div>
1235
- </body>
1236
- </html>
1237
- ```
1238
-
1239
- **/package.json**
1240
-
1241
- ```json
1242
- {
1243
- "dependencies": {
1244
- "react": "^18.0.0",
1245
- "react-dom": "^18.0.0",
1246
- "react-scripts": "^4.0.0"
1247
- },
1248
- "devDependencies": {
1249
- "@types/react": "^18.0.0",
1250
- "@types/react-dom": "^18.0.0",
1251
- "typescript": "^4.0.0"
1252
- },
1253
- "main": "/index.tsx"
1254
- }
1255
- ```
1256
-
1257
- ---
1258
-
1259
- #### InputText – Text Area
1260
-
1261
- This component represents the text area variant of the `InputText` component.
1262
-
1263
- **/styles.css**
1264
-
1265
- ```css
1266
- body {
1267
- font-size: 13px;
1268
- font-weight: 400;
1269
- letter-spacing: 0.08px;
1270
- line-height: 20px;
1271
- text-transform: none;
1272
- font-family: "Inter", sans-serif;
1273
- }
1274
-
1275
- h1 {
1276
- font-size: 1.5rem;
1277
- }
1278
-
1279
- .app {
1280
- padding: 20px;
1281
- }
1282
- ```
1283
-
1284
- **tsconfig.json**
1285
-
1286
- ```json
1287
- {
1288
- "include": ["./**/*"],
1289
- "compilerOptions": {
1290
- "strict": true,
1291
- "esModuleInterop": true,
1292
- "lib": ["dom", "es2015"],
1293
- "jsx": "react-jsx"
1294
- }
1295
- }
1296
- ```
1297
-
1298
- **/App.tsx**
1299
-
1300
- ```tsx
1301
- import { InputText } from "@czi-sds/components";
1302
- import { Box } from "@mui/material";
1303
- import "./styles.css";
1304
-
1305
- function App() {
1306
- return (
1307
- <div className="app">
1308
- <Box sx={{ width: 300 }}>
1309
- <InputText
1310
- id="search-input"
1311
- label="Description"
1312
- placeholder="Enter your text"
1313
- sdsType="textArea"
1314
- />
1315
- </Box>
1316
- </div>
1317
- );
1318
- }
1319
-
1320
- export default App;
1321
- ```
1322
-
1323
- **/index.tsx**
1324
-
1325
- ```tsx
1326
- import React from "react";
1327
- import { createRoot } from "react-dom/client";
1328
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
1329
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
1330
- import { Theme } from "@czi-sds/components";
1331
- import CssBaseline from "@mui/material/CssBaseline";
1332
- import useMediaQuery from "@mui/material/useMediaQuery";
1333
-
1334
- import App from "./App";
1335
-
1336
- const container = document.getElementById("root");
1337
- const root = createRoot(container!);
1338
-
1339
- const RootApp = () => {
1340
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
1341
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
1342
-
1343
- return (
1344
- <StyledEngineProvider injectFirst>
1345
- <ThemeProvider theme={theme}>
1346
- <EmotionThemeProvider theme={theme}>
1347
- <CssBaseline />
1348
- <App />
1349
- </EmotionThemeProvider>
1350
- </ThemeProvider>
1351
- </StyledEngineProvider>
1352
- );
1353
- };
1354
-
1355
- root.render(
1356
- <React.StrictMode>
1357
- <RootApp />
1358
- </React.StrictMode>
1359
- );
1360
- ```
1361
-
1362
- **/public/index.html**
1363
-
1364
- ```html
1365
- <!doctype html>
1366
- <html lang="en">
1367
- <head>
1368
- <meta charset="UTF-8" />
1369
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
1370
- <link rel="preconnect" href="https://fonts.googleapis.com" />
1371
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1372
- <link
1373
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
1374
- rel="stylesheet"
1375
- />
1376
- <link
1377
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap"
1378
- rel="stylesheet"
1379
- />
1380
- </head>
1381
- <body>
1382
- <div id="root"></div>
1383
- </body>
1384
- </html>
1385
- ```
1386
-
1387
- **/package.json**
1388
-
1389
- ```json
1390
- {
1391
- "dependencies": {
1392
- "react": "^18.0.0",
1393
- "react-dom": "^18.0.0",
1394
- "react-scripts": "^4.0.0"
1395
- },
1396
- "devDependencies": {
1397
- "@types/react": "^18.0.0",
1398
- "@types/react-dom": "^18.0.0",
1399
- "typescript": "^4.0.0"
1400
- },
1401
- "main": "/index.tsx"
1402
- }
1403
- ```
1404
-
1405
- ---