@nypl/design-system-react-components 0.28.0 → 1.0.2

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 (99) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +10 -10
  3. package/dist/components/Checkbox/Checkbox.d.ts +0 -1
  4. package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +8 -0
  5. package/dist/components/Heading/Heading.d.ts +2 -0
  6. package/dist/components/Logo/Logo.d.ts +1 -1
  7. package/dist/components/Logo/LogoSvgs.d.ts +4 -0
  8. package/dist/design-system-react-components.cjs.development.js +1021 -683
  9. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  10. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  11. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  12. package/dist/design-system-react-components.esm.js +1022 -684
  13. package/dist/design-system-react-components.esm.js.map +1 -1
  14. package/dist/theme/components/button.d.ts +1 -0
  15. package/dist/theme/components/card.d.ts +98 -13
  16. package/dist/theme/components/checkboxGroup.d.ts +1 -1
  17. package/dist/theme/components/global.d.ts +1 -1
  18. package/dist/theme/components/heading.d.ts +4 -16
  19. package/dist/theme/components/image.d.ts +6 -0
  20. package/dist/theme/components/radioGroup.d.ts +1 -1
  21. package/dist/theme/components/skipNavigation.d.ts +3 -0
  22. package/dist/theme/components/structuredContent.d.ts +0 -5
  23. package/dist/utils/utils.d.ts +15 -0
  24. package/package.json +6 -6
  25. package/src/components/Accordion/Accordion.stories.mdx +18 -46
  26. package/src/components/Accordion/Accordion.tsx +3 -2
  27. package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +12 -12
  28. package/src/components/Button/Button.stories.mdx +1 -1
  29. package/src/components/ButtonGroup/ButtonGroup.stories.mdx +33 -2
  30. package/src/components/ButtonGroup/ButtonGroup.tsx +2 -1
  31. package/src/components/Card/Card.stories.mdx +2 -4
  32. package/src/components/Card/Card.tsx +2 -1
  33. package/src/components/Chakra/Box.stories.mdx +1 -1
  34. package/src/components/Chakra/Center.stories.mdx +1 -1
  35. package/src/components/Chakra/Flex.stories.mdx +1 -1
  36. package/src/components/Chakra/Grid.stories.mdx +1 -1
  37. package/src/components/Chakra/Stack.stories.mdx +1 -1
  38. package/src/components/Checkbox/Checkbox.stories.mdx +1 -1
  39. package/src/components/Checkbox/Checkbox.test.tsx +42 -11
  40. package/src/components/Checkbox/Checkbox.tsx +25 -39
  41. package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +589 -544
  42. package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +1 -1
  43. package/src/components/CheckboxGroup/CheckboxGroup.tsx +1 -1
  44. package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +1540 -1420
  45. package/src/components/ComponentWrapper/ComponentWrapper.tsx +12 -3
  46. package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +5 -0
  47. package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +36 -17
  48. package/src/components/Grid/SimpleGrid.stories.mdx +1 -3
  49. package/src/components/Heading/Heading.stories.mdx +4 -1
  50. package/src/components/Heading/Heading.tsx +4 -1
  51. package/src/components/Image/Image.stories.mdx +1 -1
  52. package/src/components/Logo/Logo.stories.mdx +10 -5
  53. package/src/components/Logo/Logo.tsx +4 -0
  54. package/src/components/Logo/LogoSvgs.tsx +8 -0
  55. package/src/components/Modal/Modal.stories.mdx +83 -90
  56. package/src/components/Pagination/Pagination.stories.mdx +1 -1
  57. package/src/components/Radio/Radio.stories.mdx +1 -1
  58. package/src/components/Radio/Radio.tsx +22 -31
  59. package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +405 -365
  60. package/src/components/RadioGroup/RadioGroup.stories.mdx +2 -1
  61. package/src/components/RadioGroup/RadioGroup.tsx +2 -1
  62. package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1236 -1116
  63. package/src/components/SearchBar/SearchBar.stories.mdx +3 -3
  64. package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +32 -10
  65. package/src/components/Select/Select.stories.mdx +1 -1
  66. package/src/components/Select/Select.tsx +24 -22
  67. package/src/components/Select/__snapshots__/Select.test.tsx.snap +21 -11
  68. package/src/components/SkipNavigation/SkipNavigation.stories.mdx +2 -2
  69. package/src/components/Slider/Slider.stories.mdx +1 -1
  70. package/src/components/Slider/Slider.tsx +14 -14
  71. package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +66 -33
  72. package/src/components/StyleGuide/Buttons.stories.mdx +1 -1
  73. package/src/components/StyleGuide/Colors.stories.mdx +2 -2
  74. package/src/components/StyleGuide/Forms.stories.mdx +2 -1
  75. package/src/components/StyleGuide/Iconography.stories.mdx +2 -2
  76. package/src/components/StyleGuide/Spacing.stories.mdx +1 -1
  77. package/src/components/StyleGuide/Typography.stories.mdx +1 -1
  78. package/src/components/Table/Table.stories.mdx +1 -5
  79. package/src/components/Table/Table.test.tsx +33 -0
  80. package/src/components/Table/Table.tsx +21 -0
  81. package/src/components/Template/Template.stories.mdx +9 -5
  82. package/src/components/TextInput/TextInput.stories.mdx +1 -1
  83. package/src/components/TextInput/TextInput.tsx +21 -21
  84. package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +19 -9
  85. package/src/components/Toggle/Toggle.stories.mdx +1 -1
  86. package/src/components/Toggle/Toggle.tsx +22 -20
  87. package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +400 -372
  88. package/src/components/VideoPlayer/VideoPlayer.stories.mdx +1 -0
  89. package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +5 -0
  90. package/src/docs/Chakra.stories.mdx +2 -2
  91. package/src/theme/components/button.ts +1 -0
  92. package/src/theme/components/card.ts +9 -3
  93. package/src/theme/components/componentWrapper.ts +1 -1
  94. package/src/theme/components/global.ts +1 -1
  95. package/src/theme/components/heading.ts +3 -3
  96. package/src/theme/components/image.ts +1 -0
  97. package/src/theme/components/skipNavigation.ts +3 -0
  98. package/src/theme/foundations/colors.ts +6 -9
  99. package/src/utils/utils.ts +40 -0
@@ -1,616 +1,661 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`Checkbox Renders the UI snapshot correctly 1`] = `
4
- <label
5
- className="chakra-checkbox css-scawxr"
6
- onClick={[Function]}
4
+ <div
5
+ className="css-1xdhyk6"
6
+ id="inputID-wrapper"
7
7
  >
8
- <input
9
- aria-disabled={false}
10
- aria-invalid={false}
11
- checked={false}
12
- className="chakra-checkbox__input"
13
- disabled={false}
14
- id="inputID"
15
- name="default"
16
- onBlur={[Function]}
17
- onChange={[Function]}
18
- onFocus={[Function]}
19
- onKeyDown={[Function]}
20
- onKeyUp={[Function]}
21
- required={false}
22
- style={
23
- Object {
24
- "border": "0px",
25
- "clip": "rect(0px, 0px, 0px, 0px)",
26
- "height": "1px",
27
- "margin": "-1px",
28
- "overflow": "hidden",
29
- "padding": "0px",
30
- "position": "absolute",
31
- "whiteSpace": "nowrap",
32
- "width": "1px",
33
- }
34
- }
35
- type="checkbox"
36
- />
37
- <span
38
- aria-hidden={true}
39
- className="chakra-checkbox__control css-dnty2r"
40
- onMouseDown={[Function]}
41
- onMouseEnter={[Function]}
42
- onMouseLeave={[Function]}
43
- onMouseUp={[Function]}
8
+ <label
9
+ className="chakra-checkbox css-scawxr"
10
+ onClick={[Function]}
44
11
  >
45
- <svg
46
- className="chakra-icon css-1vfv7ic"
47
- focusable={false}
48
- viewBox="0 0 24 24"
12
+ <input
13
+ aria-disabled={false}
14
+ aria-invalid={false}
15
+ checked={false}
16
+ className="chakra-checkbox__input"
17
+ disabled={false}
18
+ id="inputID"
19
+ name="default"
20
+ onBlur={[Function]}
21
+ onChange={[Function]}
22
+ onFocus={[Function]}
23
+ onKeyDown={[Function]}
24
+ onKeyUp={[Function]}
25
+ required={false}
26
+ style={
27
+ Object {
28
+ "border": "0px",
29
+ "clip": "rect(0px, 0px, 0px, 0px)",
30
+ "height": "1px",
31
+ "margin": "-1px",
32
+ "overflow": "hidden",
33
+ "padding": "0px",
34
+ "position": "absolute",
35
+ "whiteSpace": "nowrap",
36
+ "width": "1px",
37
+ }
38
+ }
39
+ type="checkbox"
40
+ />
41
+ <span
42
+ aria-hidden={true}
43
+ className="chakra-checkbox__control css-dnty2r"
44
+ onMouseDown={[Function]}
45
+ onMouseEnter={[Function]}
46
+ onMouseLeave={[Function]}
47
+ onMouseUp={[Function]}
49
48
  >
50
- <path
51
- d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
52
- fill="currentColor"
53
- />
54
- </svg>
55
- </span>
56
- <span
57
- className="chakra-checkbox__label css-1oeb2oe"
58
- onMouseDown={[Function]}
59
- onTouchStart={[Function]}
60
- >
61
- Test Label
62
- </span>
63
- </label>
49
+ <svg
50
+ className="chakra-icon css-1vfv7ic"
51
+ focusable={false}
52
+ viewBox="0 0 24 24"
53
+ >
54
+ <path
55
+ d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
56
+ fill="currentColor"
57
+ />
58
+ </svg>
59
+ </span>
60
+ <span
61
+ className="chakra-checkbox__label css-1oeb2oe"
62
+ onMouseDown={[Function]}
63
+ onTouchStart={[Function]}
64
+ >
65
+ Test Label
66
+ </span>
67
+ </label>
68
+ </div>
64
69
  `;
65
70
 
66
71
  exports[`Checkbox Renders the UI snapshot correctly 2`] = `
67
- <label
68
- className="chakra-checkbox css-scawxr"
69
- data-checked=""
70
- onClick={[Function]}
72
+ <div
73
+ className="css-1xdhyk6"
74
+ id="checkbox-checked-wrapper"
71
75
  >
72
- <input
73
- aria-disabled={false}
74
- aria-invalid={false}
75
- checked={true}
76
- className="chakra-checkbox__input"
77
- disabled={false}
78
- id="checkbox-checked"
79
- name="default"
80
- onBlur={[Function]}
81
- onChange={[Function]}
82
- onFocus={[Function]}
83
- onKeyDown={[Function]}
84
- onKeyUp={[Function]}
85
- required={false}
86
- style={
87
- Object {
88
- "border": "0px",
89
- "clip": "rect(0px, 0px, 0px, 0px)",
90
- "height": "1px",
91
- "margin": "-1px",
92
- "overflow": "hidden",
93
- "padding": "0px",
94
- "position": "absolute",
95
- "whiteSpace": "nowrap",
96
- "width": "1px",
97
- }
98
- }
99
- type="checkbox"
100
- />
101
- <span
102
- aria-hidden={true}
103
- className="chakra-checkbox__control css-dnty2r"
76
+ <label
77
+ className="chakra-checkbox css-scawxr"
104
78
  data-checked=""
105
- onMouseDown={[Function]}
106
- onMouseEnter={[Function]}
107
- onMouseLeave={[Function]}
108
- onMouseUp={[Function]}
79
+ onClick={[Function]}
109
80
  >
110
- <svg
111
- className="chakra-icon css-oi1lnb"
112
- focusable={false}
113
- viewBox="0 0 24 24"
81
+ <input
82
+ aria-disabled={false}
83
+ aria-invalid={false}
84
+ checked={true}
85
+ className="chakra-checkbox__input"
86
+ disabled={false}
87
+ id="checkbox-checked"
88
+ name="default"
89
+ onBlur={[Function]}
90
+ onChange={[Function]}
91
+ onFocus={[Function]}
92
+ onKeyDown={[Function]}
93
+ onKeyUp={[Function]}
94
+ required={false}
95
+ style={
96
+ Object {
97
+ "border": "0px",
98
+ "clip": "rect(0px, 0px, 0px, 0px)",
99
+ "height": "1px",
100
+ "margin": "-1px",
101
+ "overflow": "hidden",
102
+ "padding": "0px",
103
+ "position": "absolute",
104
+ "whiteSpace": "nowrap",
105
+ "width": "1px",
106
+ }
107
+ }
108
+ type="checkbox"
109
+ />
110
+ <span
111
+ aria-hidden={true}
112
+ className="chakra-checkbox__control css-dnty2r"
113
+ data-checked=""
114
+ onMouseDown={[Function]}
115
+ onMouseEnter={[Function]}
116
+ onMouseLeave={[Function]}
117
+ onMouseUp={[Function]}
114
118
  >
115
- <path
116
- d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
117
- fill="currentColor"
118
- />
119
- </svg>
120
- </span>
121
- <span
122
- className="chakra-checkbox__label css-1oeb2oe"
123
- data-checked=""
124
- onMouseDown={[Function]}
125
- onTouchStart={[Function]}
126
- >
127
- Test Label
128
- </span>
129
- </label>
119
+ <svg
120
+ className="chakra-icon css-oi1lnb"
121
+ focusable={false}
122
+ viewBox="0 0 24 24"
123
+ >
124
+ <path
125
+ d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
126
+ fill="currentColor"
127
+ />
128
+ </svg>
129
+ </span>
130
+ <span
131
+ className="chakra-checkbox__label css-1oeb2oe"
132
+ data-checked=""
133
+ onMouseDown={[Function]}
134
+ onTouchStart={[Function]}
135
+ >
136
+ Test Label
137
+ </span>
138
+ </label>
139
+ </div>
130
140
  `;
131
141
 
132
142
  exports[`Checkbox Renders the UI snapshot correctly 3`] = `
133
- <label
134
- className="chakra-checkbox css-scawxr"
135
- data-checked=""
136
- onClick={[Function]}
143
+ <div
144
+ className="css-1xdhyk6"
145
+ id="checkbox-checked-wrapper"
137
146
  >
138
- <input
139
- aria-disabled={false}
140
- aria-invalid={false}
141
- checked={true}
142
- className="chakra-checkbox__input"
143
- disabled={false}
144
- id="checkbox-checked"
145
- name="default"
146
- onBlur={[Function]}
147
- onChange={[Function]}
148
- onFocus={[Function]}
149
- onKeyDown={[Function]}
150
- onKeyUp={[Function]}
151
- required={false}
152
- style={
153
- Object {
154
- "border": "0px",
155
- "clip": "rect(0px, 0px, 0px, 0px)",
156
- "height": "1px",
157
- "margin": "-1px",
158
- "overflow": "hidden",
159
- "padding": "0px",
160
- "position": "absolute",
161
- "whiteSpace": "nowrap",
162
- "width": "1px",
163
- }
164
- }
165
- type="checkbox"
166
- />
167
- <span
168
- aria-hidden={true}
169
- className="chakra-checkbox__control css-dnty2r"
147
+ <label
148
+ className="chakra-checkbox css-scawxr"
170
149
  data-checked=""
171
- data-indeterminate=""
172
- onMouseDown={[Function]}
173
- onMouseEnter={[Function]}
174
- onMouseLeave={[Function]}
175
- onMouseUp={[Function]}
150
+ onClick={[Function]}
176
151
  >
177
- <div
152
+ <input
153
+ aria-disabled={false}
154
+ aria-invalid={false}
155
+ checked={true}
156
+ className="chakra-checkbox__input"
157
+ disabled={false}
158
+ id="checkbox-checked"
159
+ name="default"
160
+ onBlur={[Function]}
161
+ onChange={[Function]}
162
+ onFocus={[Function]}
163
+ onKeyDown={[Function]}
164
+ onKeyUp={[Function]}
165
+ required={false}
178
166
  style={
179
167
  Object {
180
- "alignItems": "center",
181
- "display": "flex",
182
- "height": "100%",
183
- "justifyContent": "center",
184
- "transform": "none",
168
+ "border": "0px",
169
+ "clip": "rect(0px, 0px, 0px, 0px)",
170
+ "height": "1px",
171
+ "margin": "-1px",
172
+ "overflow": "hidden",
173
+ "padding": "0px",
174
+ "position": "absolute",
175
+ "whiteSpace": "nowrap",
176
+ "width": "1px",
185
177
  }
186
178
  }
179
+ type="checkbox"
180
+ />
181
+ <span
182
+ aria-hidden={true}
183
+ className="chakra-checkbox__control css-dnty2r"
184
+ data-checked=""
185
+ data-indeterminate=""
186
+ onMouseDown={[Function]}
187
+ onMouseEnter={[Function]}
188
+ onMouseLeave={[Function]}
189
+ onMouseUp={[Function]}
187
190
  >
188
- <svg
189
- className="css-o8vbdw"
191
+ <div
190
192
  style={
191
193
  Object {
192
- "opacity": 1,
193
- "stroke": "currentColor",
194
- "strokeWidth": 4,
194
+ "alignItems": "center",
195
+ "display": "flex",
196
+ "height": "100%",
197
+ "justifyContent": "center",
195
198
  "transform": "none",
196
199
  }
197
200
  }
198
- viewBox="0 0 24 24"
199
201
  >
200
- <line
201
- x1="21"
202
- x2="3"
203
- y1="12"
204
- y2="12"
205
- />
206
- </svg>
207
- </div>
208
- </span>
209
- <span
210
- className="chakra-checkbox__label css-1oeb2oe"
211
- data-checked=""
212
- onMouseDown={[Function]}
213
- onTouchStart={[Function]}
214
- >
215
- Test Label
216
- </span>
217
- </label>
202
+ <svg
203
+ className="css-o8vbdw"
204
+ style={
205
+ Object {
206
+ "opacity": 1,
207
+ "stroke": "currentColor",
208
+ "strokeWidth": 4,
209
+ "transform": "none",
210
+ }
211
+ }
212
+ viewBox="0 0 24 24"
213
+ >
214
+ <line
215
+ x1="21"
216
+ x2="3"
217
+ y1="12"
218
+ y2="12"
219
+ />
220
+ </svg>
221
+ </div>
222
+ </span>
223
+ <span
224
+ className="chakra-checkbox__label css-1oeb2oe"
225
+ data-checked=""
226
+ onMouseDown={[Function]}
227
+ onTouchStart={[Function]}
228
+ >
229
+ Test Label
230
+ </span>
231
+ </label>
232
+ </div>
218
233
  `;
219
234
 
220
235
  exports[`Checkbox Renders the UI snapshot correctly 4`] = `
221
- <label
222
- className="chakra-checkbox css-scawxr"
223
- onClick={[Function]}
236
+ <div
237
+ className="css-1xdhyk6"
238
+ id="checkbox-required-wrapper"
224
239
  >
225
- <input
226
- aria-disabled={false}
227
- aria-invalid={false}
228
- checked={false}
229
- className="chakra-checkbox__input"
230
- disabled={false}
231
- id="checkbox-required"
232
- name="default"
233
- onBlur={[Function]}
234
- onChange={[Function]}
235
- onFocus={[Function]}
236
- onKeyDown={[Function]}
237
- onKeyUp={[Function]}
238
- required={true}
239
- style={
240
- Object {
241
- "border": "0px",
242
- "clip": "rect(0px, 0px, 0px, 0px)",
243
- "height": "1px",
244
- "margin": "-1px",
245
- "overflow": "hidden",
246
- "padding": "0px",
247
- "position": "absolute",
248
- "whiteSpace": "nowrap",
249
- "width": "1px",
250
- }
251
- }
252
- type="checkbox"
253
- />
254
- <span
255
- aria-hidden={true}
256
- className="chakra-checkbox__control css-dnty2r"
257
- onMouseDown={[Function]}
258
- onMouseEnter={[Function]}
259
- onMouseLeave={[Function]}
260
- onMouseUp={[Function]}
240
+ <label
241
+ className="chakra-checkbox css-scawxr"
242
+ onClick={[Function]}
261
243
  >
262
- <svg
263
- className="chakra-icon css-1vfv7ic"
264
- focusable={false}
265
- viewBox="0 0 24 24"
244
+ <input
245
+ aria-disabled={false}
246
+ aria-invalid={false}
247
+ checked={false}
248
+ className="chakra-checkbox__input"
249
+ disabled={false}
250
+ id="checkbox-required"
251
+ name="default"
252
+ onBlur={[Function]}
253
+ onChange={[Function]}
254
+ onFocus={[Function]}
255
+ onKeyDown={[Function]}
256
+ onKeyUp={[Function]}
257
+ required={true}
258
+ style={
259
+ Object {
260
+ "border": "0px",
261
+ "clip": "rect(0px, 0px, 0px, 0px)",
262
+ "height": "1px",
263
+ "margin": "-1px",
264
+ "overflow": "hidden",
265
+ "padding": "0px",
266
+ "position": "absolute",
267
+ "whiteSpace": "nowrap",
268
+ "width": "1px",
269
+ }
270
+ }
271
+ type="checkbox"
272
+ />
273
+ <span
274
+ aria-hidden={true}
275
+ className="chakra-checkbox__control css-dnty2r"
276
+ onMouseDown={[Function]}
277
+ onMouseEnter={[Function]}
278
+ onMouseLeave={[Function]}
279
+ onMouseUp={[Function]}
266
280
  >
267
- <path
268
- d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
269
- fill="currentColor"
270
- />
271
- </svg>
272
- </span>
273
- <span
274
- className="chakra-checkbox__label css-1oeb2oe"
275
- onMouseDown={[Function]}
276
- onTouchStart={[Function]}
277
- >
278
- Test Label
279
- </span>
280
- </label>
281
+ <svg
282
+ className="chakra-icon css-1vfv7ic"
283
+ focusable={false}
284
+ viewBox="0 0 24 24"
285
+ >
286
+ <path
287
+ d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
288
+ fill="currentColor"
289
+ />
290
+ </svg>
291
+ </span>
292
+ <span
293
+ className="chakra-checkbox__label css-1oeb2oe"
294
+ onMouseDown={[Function]}
295
+ onTouchStart={[Function]}
296
+ >
297
+ Test Label
298
+ </span>
299
+ </label>
300
+ </div>
281
301
  `;
282
302
 
283
303
  exports[`Checkbox Renders the UI snapshot correctly 5`] = `
284
- <label
285
- className="chakra-checkbox css-scawxr"
286
- data-invalid=""
287
- onClick={[Function]}
304
+ <div
305
+ className="css-1xdhyk6"
306
+ id="checkbox-invalid-wrapper"
288
307
  >
289
- <input
290
- aria-disabled={false}
291
- aria-invalid={true}
292
- checked={false}
293
- className="chakra-checkbox__input"
294
- disabled={false}
295
- id="checkbox-invalid"
296
- name="default"
297
- onBlur={[Function]}
298
- onChange={[Function]}
299
- onFocus={[Function]}
300
- onKeyDown={[Function]}
301
- onKeyUp={[Function]}
302
- required={false}
303
- style={
304
- Object {
305
- "border": "0px",
306
- "clip": "rect(0px, 0px, 0px, 0px)",
307
- "height": "1px",
308
- "margin": "-1px",
309
- "overflow": "hidden",
310
- "padding": "0px",
311
- "position": "absolute",
312
- "whiteSpace": "nowrap",
313
- "width": "1px",
314
- }
315
- }
316
- type="checkbox"
317
- />
318
- <span
319
- aria-hidden={true}
320
- className="chakra-checkbox__control css-dnty2r"
308
+ <label
309
+ className="chakra-checkbox css-scawxr"
321
310
  data-invalid=""
322
- onMouseDown={[Function]}
323
- onMouseEnter={[Function]}
324
- onMouseLeave={[Function]}
325
- onMouseUp={[Function]}
311
+ onClick={[Function]}
326
312
  >
327
- <svg
328
- className="chakra-icon css-1vfv7ic"
329
- focusable={false}
330
- viewBox="0 0 24 24"
313
+ <input
314
+ aria-disabled={false}
315
+ aria-invalid={true}
316
+ checked={false}
317
+ className="chakra-checkbox__input"
318
+ disabled={false}
319
+ id="checkbox-invalid"
320
+ name="default"
321
+ onBlur={[Function]}
322
+ onChange={[Function]}
323
+ onFocus={[Function]}
324
+ onKeyDown={[Function]}
325
+ onKeyUp={[Function]}
326
+ required={false}
327
+ style={
328
+ Object {
329
+ "border": "0px",
330
+ "clip": "rect(0px, 0px, 0px, 0px)",
331
+ "height": "1px",
332
+ "margin": "-1px",
333
+ "overflow": "hidden",
334
+ "padding": "0px",
335
+ "position": "absolute",
336
+ "whiteSpace": "nowrap",
337
+ "width": "1px",
338
+ }
339
+ }
340
+ type="checkbox"
341
+ />
342
+ <span
343
+ aria-hidden={true}
344
+ className="chakra-checkbox__control css-dnty2r"
345
+ data-invalid=""
346
+ onMouseDown={[Function]}
347
+ onMouseEnter={[Function]}
348
+ onMouseLeave={[Function]}
349
+ onMouseUp={[Function]}
331
350
  >
332
- <path
333
- d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
334
- fill="currentColor"
335
- />
336
- </svg>
337
- </span>
338
- <span
339
- className="chakra-checkbox__label css-1oeb2oe"
340
- data-invalid=""
341
- onMouseDown={[Function]}
342
- onTouchStart={[Function]}
343
- >
344
- Test Label
345
- </span>
346
- </label>
351
+ <svg
352
+ className="chakra-icon css-1vfv7ic"
353
+ focusable={false}
354
+ viewBox="0 0 24 24"
355
+ >
356
+ <path
357
+ d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
358
+ fill="currentColor"
359
+ />
360
+ </svg>
361
+ </span>
362
+ <span
363
+ className="chakra-checkbox__label css-1oeb2oe"
364
+ data-invalid=""
365
+ onMouseDown={[Function]}
366
+ onTouchStart={[Function]}
367
+ >
368
+ Test Label
369
+ </span>
370
+ </label>
371
+ </div>
347
372
  `;
348
373
 
349
374
  exports[`Checkbox Renders the UI snapshot correctly 6`] = `
350
- <label
351
- className="chakra-checkbox css-scawxr"
352
- data-disabled=""
353
- onClick={[Function]}
375
+ <div
376
+ className="css-1xdhyk6"
377
+ id="checkbox-disabled-wrapper"
354
378
  >
355
- <input
356
- aria-disabled={true}
357
- aria-invalid={false}
358
- checked={false}
359
- className="chakra-checkbox__input"
360
- disabled={true}
361
- id="checkbox-disabled"
362
- name="default"
363
- onBlur={[Function]}
364
- onChange={[Function]}
365
- onFocus={[Function]}
366
- onKeyDown={[Function]}
367
- onKeyUp={[Function]}
368
- required={false}
369
- style={
370
- Object {
371
- "border": "0px",
372
- "clip": "rect(0px, 0px, 0px, 0px)",
373
- "height": "1px",
374
- "margin": "-1px",
375
- "overflow": "hidden",
376
- "padding": "0px",
377
- "position": "absolute",
378
- "whiteSpace": "nowrap",
379
- "width": "1px",
380
- }
381
- }
382
- type="checkbox"
383
- />
384
- <span
385
- aria-hidden={true}
386
- className="chakra-checkbox__control css-dnty2r"
379
+ <label
380
+ className="chakra-checkbox css-scawxr"
387
381
  data-disabled=""
388
- onMouseDown={[Function]}
389
- onMouseEnter={[Function]}
390
- onMouseLeave={[Function]}
391
- onMouseUp={[Function]}
382
+ onClick={[Function]}
392
383
  >
393
- <svg
394
- className="chakra-icon css-1vfv7ic"
395
- focusable={false}
396
- viewBox="0 0 24 24"
384
+ <input
385
+ aria-disabled={true}
386
+ aria-invalid={false}
387
+ checked={false}
388
+ className="chakra-checkbox__input"
389
+ disabled={true}
390
+ id="checkbox-disabled"
391
+ name="default"
392
+ onBlur={[Function]}
393
+ onChange={[Function]}
394
+ onFocus={[Function]}
395
+ onKeyDown={[Function]}
396
+ onKeyUp={[Function]}
397
+ required={false}
398
+ style={
399
+ Object {
400
+ "border": "0px",
401
+ "clip": "rect(0px, 0px, 0px, 0px)",
402
+ "height": "1px",
403
+ "margin": "-1px",
404
+ "overflow": "hidden",
405
+ "padding": "0px",
406
+ "position": "absolute",
407
+ "whiteSpace": "nowrap",
408
+ "width": "1px",
409
+ }
410
+ }
411
+ type="checkbox"
412
+ />
413
+ <span
414
+ aria-hidden={true}
415
+ className="chakra-checkbox__control css-dnty2r"
416
+ data-disabled=""
417
+ onMouseDown={[Function]}
418
+ onMouseEnter={[Function]}
419
+ onMouseLeave={[Function]}
420
+ onMouseUp={[Function]}
397
421
  >
398
- <path
399
- d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
400
- fill="currentColor"
401
- />
402
- </svg>
403
- </span>
404
- <span
405
- className="chakra-checkbox__label css-1oeb2oe"
406
- data-disabled=""
407
- onMouseDown={[Function]}
408
- onTouchStart={[Function]}
409
- >
410
- Test Label
411
- </span>
412
- </label>
422
+ <svg
423
+ className="chakra-icon css-1vfv7ic"
424
+ focusable={false}
425
+ viewBox="0 0 24 24"
426
+ >
427
+ <path
428
+ d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
429
+ fill="currentColor"
430
+ />
431
+ </svg>
432
+ </span>
433
+ <span
434
+ className="chakra-checkbox__label css-1oeb2oe"
435
+ data-disabled=""
436
+ onMouseDown={[Function]}
437
+ onTouchStart={[Function]}
438
+ >
439
+ Test Label
440
+ </span>
441
+ </label>
442
+ </div>
413
443
  `;
414
444
 
415
445
  exports[`Checkbox Renders the UI snapshot correctly 7`] = `
416
- <label
417
- className="chakra-checkbox css-scawxr"
418
- onClick={[Function]}
446
+ <div
447
+ className="css-1xdhyk6"
448
+ id="jsxLabel-wrapper"
419
449
  >
420
- <input
421
- aria-disabled={false}
422
- aria-invalid={false}
423
- checked={false}
424
- className="chakra-checkbox__input"
425
- disabled={false}
426
- id="jsxLabel"
427
- name="default"
428
- onBlur={[Function]}
429
- onChange={[Function]}
430
- onFocus={[Function]}
431
- onKeyDown={[Function]}
432
- onKeyUp={[Function]}
433
- required={false}
434
- style={
435
- Object {
436
- "border": "0px",
437
- "clip": "rect(0px, 0px, 0px, 0px)",
438
- "height": "1px",
439
- "margin": "-1px",
440
- "overflow": "hidden",
441
- "padding": "0px",
442
- "position": "absolute",
443
- "whiteSpace": "nowrap",
444
- "width": "1px",
445
- }
446
- }
447
- type="checkbox"
448
- value="arts"
449
- />
450
- <span
451
- aria-hidden={true}
452
- className="chakra-checkbox__control css-dnty2r"
453
- onMouseDown={[Function]}
454
- onMouseEnter={[Function]}
455
- onMouseLeave={[Function]}
456
- onMouseUp={[Function]}
450
+ <label
451
+ className="chakra-checkbox css-scawxr"
452
+ onClick={[Function]}
457
453
  >
458
- <svg
459
- className="chakra-icon css-1vfv7ic"
460
- focusable={false}
461
- viewBox="0 0 24 24"
454
+ <input
455
+ aria-disabled={false}
456
+ aria-invalid={false}
457
+ checked={false}
458
+ className="chakra-checkbox__input"
459
+ disabled={false}
460
+ id="jsxLabel"
461
+ name="default"
462
+ onBlur={[Function]}
463
+ onChange={[Function]}
464
+ onFocus={[Function]}
465
+ onKeyDown={[Function]}
466
+ onKeyUp={[Function]}
467
+ required={false}
468
+ style={
469
+ Object {
470
+ "border": "0px",
471
+ "clip": "rect(0px, 0px, 0px, 0px)",
472
+ "height": "1px",
473
+ "margin": "-1px",
474
+ "overflow": "hidden",
475
+ "padding": "0px",
476
+ "position": "absolute",
477
+ "whiteSpace": "nowrap",
478
+ "width": "1px",
479
+ }
480
+ }
481
+ type="checkbox"
482
+ value="arts"
483
+ />
484
+ <span
485
+ aria-hidden={true}
486
+ className="chakra-checkbox__control css-dnty2r"
487
+ onMouseDown={[Function]}
488
+ onMouseEnter={[Function]}
489
+ onMouseLeave={[Function]}
490
+ onMouseUp={[Function]}
462
491
  >
463
- <path
464
- d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
465
- fill="currentColor"
466
- />
467
- </svg>
468
- </span>
469
- <span
470
- className="chakra-checkbox__label css-1oeb2oe"
471
- onMouseDown={[Function]}
472
- onTouchStart={[Function]}
473
- >
474
- <div
475
- className="css-k008qs"
492
+ <svg
493
+ className="chakra-icon css-1vfv7ic"
494
+ focusable={false}
495
+ viewBox="0 0 24 24"
496
+ >
497
+ <path
498
+ d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
499
+ fill="currentColor"
500
+ />
501
+ </svg>
502
+ </span>
503
+ <span
504
+ className="chakra-checkbox__label css-1oeb2oe"
505
+ onMouseDown={[Function]}
506
+ onTouchStart={[Function]}
476
507
  >
477
- <span>
478
- Arts
479
- </span>
480
508
  <div
481
- className="css-17xejub"
482
- />
483
- <span>
484
- 4
485
- </span>
486
- </div>
487
- </span>
488
- </label>
509
+ className="css-k008qs"
510
+ >
511
+ <span>
512
+ Arts
513
+ </span>
514
+ <div
515
+ className="css-17xejub"
516
+ />
517
+ <span>
518
+ 4
519
+ </span>
520
+ </div>
521
+ </span>
522
+ </label>
523
+ </div>
489
524
  `;
490
525
 
491
526
  exports[`Checkbox Renders the UI snapshot correctly 8`] = `
492
- <label
493
- className="chakra-checkbox css-wkfjn4"
494
- onClick={[Function]}
527
+ <div
528
+ className="css-1xdhyk6"
529
+ id="checkbox-chakra-wrapper"
495
530
  >
496
- <input
497
- aria-disabled={false}
498
- aria-invalid={false}
499
- checked={false}
500
- className="chakra-checkbox__input"
501
- disabled={false}
502
- id="checkbox-chakra"
503
- name="default"
504
- onBlur={[Function]}
505
- onChange={[Function]}
506
- onFocus={[Function]}
507
- onKeyDown={[Function]}
508
- onKeyUp={[Function]}
509
- required={false}
510
- style={
511
- Object {
512
- "border": "0px",
513
- "clip": "rect(0px, 0px, 0px, 0px)",
514
- "height": "1px",
515
- "margin": "-1px",
516
- "overflow": "hidden",
517
- "padding": "0px",
518
- "position": "absolute",
519
- "whiteSpace": "nowrap",
520
- "width": "1px",
521
- }
522
- }
523
- type="checkbox"
524
- />
525
- <span
526
- aria-hidden={true}
527
- className="chakra-checkbox__control css-dnty2r"
528
- onMouseDown={[Function]}
529
- onMouseEnter={[Function]}
530
- onMouseLeave={[Function]}
531
- onMouseUp={[Function]}
531
+ <label
532
+ className="chakra-checkbox css-wkfjn4"
533
+ onClick={[Function]}
532
534
  >
533
- <svg
534
- className="chakra-icon css-1vfv7ic"
535
- focusable={false}
536
- viewBox="0 0 24 24"
535
+ <input
536
+ aria-disabled={false}
537
+ aria-invalid={false}
538
+ checked={false}
539
+ className="chakra-checkbox__input"
540
+ disabled={false}
541
+ id="checkbox-chakra"
542
+ name="default"
543
+ onBlur={[Function]}
544
+ onChange={[Function]}
545
+ onFocus={[Function]}
546
+ onKeyDown={[Function]}
547
+ onKeyUp={[Function]}
548
+ required={false}
549
+ style={
550
+ Object {
551
+ "border": "0px",
552
+ "clip": "rect(0px, 0px, 0px, 0px)",
553
+ "height": "1px",
554
+ "margin": "-1px",
555
+ "overflow": "hidden",
556
+ "padding": "0px",
557
+ "position": "absolute",
558
+ "whiteSpace": "nowrap",
559
+ "width": "1px",
560
+ }
561
+ }
562
+ type="checkbox"
563
+ />
564
+ <span
565
+ aria-hidden={true}
566
+ className="chakra-checkbox__control css-dnty2r"
567
+ onMouseDown={[Function]}
568
+ onMouseEnter={[Function]}
569
+ onMouseLeave={[Function]}
570
+ onMouseUp={[Function]}
537
571
  >
538
- <path
539
- d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
540
- fill="currentColor"
541
- />
542
- </svg>
543
- </span>
544
- <span
545
- className="chakra-checkbox__label css-1oeb2oe"
546
- onMouseDown={[Function]}
547
- onTouchStart={[Function]}
548
- >
549
- Test Label
550
- </span>
551
- </label>
572
+ <svg
573
+ className="chakra-icon css-1vfv7ic"
574
+ focusable={false}
575
+ viewBox="0 0 24 24"
576
+ >
577
+ <path
578
+ d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
579
+ fill="currentColor"
580
+ />
581
+ </svg>
582
+ </span>
583
+ <span
584
+ className="chakra-checkbox__label css-1oeb2oe"
585
+ onMouseDown={[Function]}
586
+ onTouchStart={[Function]}
587
+ >
588
+ Test Label
589
+ </span>
590
+ </label>
591
+ </div>
552
592
  `;
553
593
 
554
594
  exports[`Checkbox Renders the UI snapshot correctly 9`] = `
555
- <label
556
- className="chakra-checkbox css-scawxr"
595
+ <div
596
+ className="css-1xdhyk6"
557
597
  data-testid="testid"
558
- onClick={[Function]}
598
+ id="checkbox-props-wrapper"
559
599
  >
560
- <input
561
- aria-disabled={false}
562
- aria-invalid={false}
563
- checked={false}
564
- className="chakra-checkbox__input"
565
- disabled={false}
566
- id="checkbox-props"
567
- name="default"
568
- onBlur={[Function]}
569
- onChange={[Function]}
570
- onFocus={[Function]}
571
- onKeyDown={[Function]}
572
- onKeyUp={[Function]}
573
- required={false}
574
- style={
575
- Object {
576
- "border": "0px",
577
- "clip": "rect(0px, 0px, 0px, 0px)",
578
- "height": "1px",
579
- "margin": "-1px",
580
- "overflow": "hidden",
581
- "padding": "0px",
582
- "position": "absolute",
583
- "whiteSpace": "nowrap",
584
- "width": "1px",
585
- }
586
- }
587
- type="checkbox"
588
- />
589
- <span
590
- aria-hidden={true}
591
- className="chakra-checkbox__control css-dnty2r"
592
- onMouseDown={[Function]}
593
- onMouseEnter={[Function]}
594
- onMouseLeave={[Function]}
595
- onMouseUp={[Function]}
600
+ <label
601
+ className="chakra-checkbox css-scawxr"
602
+ onClick={[Function]}
596
603
  >
597
- <svg
598
- className="chakra-icon css-1vfv7ic"
599
- focusable={false}
600
- viewBox="0 0 24 24"
604
+ <input
605
+ aria-disabled={false}
606
+ aria-invalid={false}
607
+ checked={false}
608
+ className="chakra-checkbox__input"
609
+ disabled={false}
610
+ id="checkbox-props"
611
+ name="default"
612
+ onBlur={[Function]}
613
+ onChange={[Function]}
614
+ onFocus={[Function]}
615
+ onKeyDown={[Function]}
616
+ onKeyUp={[Function]}
617
+ required={false}
618
+ style={
619
+ Object {
620
+ "border": "0px",
621
+ "clip": "rect(0px, 0px, 0px, 0px)",
622
+ "height": "1px",
623
+ "margin": "-1px",
624
+ "overflow": "hidden",
625
+ "padding": "0px",
626
+ "position": "absolute",
627
+ "whiteSpace": "nowrap",
628
+ "width": "1px",
629
+ }
630
+ }
631
+ type="checkbox"
632
+ />
633
+ <span
634
+ aria-hidden={true}
635
+ className="chakra-checkbox__control css-dnty2r"
636
+ onMouseDown={[Function]}
637
+ onMouseEnter={[Function]}
638
+ onMouseLeave={[Function]}
639
+ onMouseUp={[Function]}
601
640
  >
602
- <path
603
- d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
604
- fill="currentColor"
605
- />
606
- </svg>
607
- </span>
608
- <span
609
- className="chakra-checkbox__label css-1oeb2oe"
610
- onMouseDown={[Function]}
611
- onTouchStart={[Function]}
612
- >
613
- Test Label
614
- </span>
615
- </label>
641
+ <svg
642
+ className="chakra-icon css-1vfv7ic"
643
+ focusable={false}
644
+ viewBox="0 0 24 24"
645
+ >
646
+ <path
647
+ d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
648
+ fill="currentColor"
649
+ />
650
+ </svg>
651
+ </span>
652
+ <span
653
+ className="chakra-checkbox__label css-1oeb2oe"
654
+ onMouseDown={[Function]}
655
+ onTouchStart={[Function]}
656
+ >
657
+ Test Label
658
+ </span>
659
+ </label>
660
+ </div>
616
661
  `;