@khanacademy/wonder-blocks-clickable 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,375 +1,394 @@
1
1
  # @khanacademy/wonder-blocks-clickable
2
2
 
3
+ ## 6.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f03298f: Tooling:
8
+
9
+ - Switching to `pnpm`.
10
+ - Upgrading `rollup` to v4 and `@babel/runtime` to match the current webapp version.
11
+
12
+ ### Patch Changes
13
+
14
+ - 969864b: Update internal addStyle variable name to address aphrodite-add-style-variable-name linting rule
15
+ - bb2a026: pnpm: Switch to workspace protocol to handle dependency versions with changesets on monorepo setup"
16
+ - Updated dependencies [969864b]
17
+ - Updated dependencies [bb2a026]
18
+ - Updated dependencies [f03298f]
19
+ - @khanacademy/wonder-blocks-core@12.1.0
20
+ - @khanacademy/wonder-blocks-tokens@4.2.0
21
+
3
22
  ## 6.0.0
4
23
 
5
24
  ### Major Changes
6
25
 
7
- - 0199324d: Fixes keyboard tests in Dropdown and Clickable with specific key events. We now check `event.key` instead of `event.which` or `event.keyCode` to remove deprecated event properties and match the keys returned from Testing Library/userEvent.
26
+ - 0199324d: Fixes keyboard tests in Dropdown and Clickable with specific key events. We now check `event.key` instead of `event.which` or `event.keyCode` to remove deprecated event properties and match the keys returned from Testing Library/userEvent.
8
27
 
9
28
  ### Patch Changes
10
29
 
11
- - Updated dependencies [0199324d]
12
- - @khanacademy/wonder-blocks-core@12.0.0
30
+ - Updated dependencies [0199324d]
31
+ - @khanacademy/wonder-blocks-core@12.0.0
13
32
 
14
33
  ## 5.0.7
15
34
 
16
35
  ### Patch Changes
17
36
 
18
- - Updated dependencies [8cfaeab0]
19
- - Updated dependencies [c162abb4]
20
- - @khanacademy/wonder-blocks-tokens@4.1.0
37
+ - Updated dependencies [8cfaeab0]
38
+ - Updated dependencies [c162abb4]
39
+ - @khanacademy/wonder-blocks-tokens@4.1.0
21
40
 
22
41
  ## 5.0.6
23
42
 
24
43
  ### Patch Changes
25
44
 
26
- - Updated dependencies [0de25cd8]
27
- - @khanacademy/wonder-blocks-tokens@4.0.0
45
+ - Updated dependencies [0de25cd8]
46
+ - @khanacademy/wonder-blocks-tokens@4.0.0
28
47
 
29
48
  ## 5.0.5
30
49
 
31
50
  ### Patch Changes
32
51
 
33
- - Updated dependencies [7516b239]
34
- - @khanacademy/wonder-blocks-core@11.1.0
52
+ - Updated dependencies [7516b239]
53
+ - @khanacademy/wonder-blocks-core@11.1.0
35
54
 
36
55
  ## 5.0.4
37
56
 
38
57
  ### Patch Changes
39
58
 
40
- - 11a0f5c6: No functional changes. Adding prepublishOnly script.
41
- - Updated dependencies [11a0f5c6]
42
- - @khanacademy/wonder-blocks-tokens@3.0.1
43
- - @khanacademy/wonder-blocks-core@11.0.1
59
+ - 11a0f5c6: No functional changes. Adding prepublishOnly script.
60
+ - Updated dependencies [11a0f5c6]
61
+ - @khanacademy/wonder-blocks-tokens@3.0.1
62
+ - @khanacademy/wonder-blocks-core@11.0.1
44
63
 
45
64
  ## 5.0.3
46
65
 
47
66
  ### Patch Changes
48
67
 
49
- - Updated dependencies [d23c9c5f]
50
- - @khanacademy/wonder-blocks-core@11.0.0
68
+ - Updated dependencies [d23c9c5f]
69
+ - @khanacademy/wonder-blocks-core@11.0.0
51
70
 
52
71
  ## 5.0.2
53
72
 
54
73
  ### Patch Changes
55
74
 
56
- - Updated dependencies [b6009b77]
57
- - Updated dependencies [897686bc]
58
- - Updated dependencies [56d961f1]
59
- - @khanacademy/wonder-blocks-core@10.0.0
75
+ - Updated dependencies [b6009b77]
76
+ - Updated dependencies [897686bc]
77
+ - Updated dependencies [56d961f1]
78
+ - @khanacademy/wonder-blocks-core@10.0.0
60
79
 
61
80
  ## 5.0.1
62
81
 
63
82
  ### Patch Changes
64
83
 
65
- - Updated dependencies [f4abd572]
66
- - @khanacademy/wonder-blocks-core@9.0.0
84
+ - Updated dependencies [f4abd572]
85
+ - @khanacademy/wonder-blocks-core@9.0.0
67
86
 
68
87
  ## 5.0.0
69
88
 
70
89
  ### Major Changes
71
90
 
72
- - e6abdd17: Upgrade to React 18
91
+ - e6abdd17: Upgrade to React 18
73
92
 
74
93
  ### Patch Changes
75
94
 
76
- - Updated dependencies [e6abdd17]
77
- - @khanacademy/wonder-blocks-core@8.0.0
78
- - @khanacademy/wonder-blocks-tokens@3.0.0
95
+ - Updated dependencies [e6abdd17]
96
+ - @khanacademy/wonder-blocks-core@8.0.0
97
+ - @khanacademy/wonder-blocks-tokens@3.0.0
79
98
 
80
99
  ## 4.2.9
81
100
 
82
101
  ### Patch Changes
83
102
 
84
- - Updated dependencies [6999fd39]
85
- - @khanacademy/wonder-blocks-tokens@2.1.0
103
+ - Updated dependencies [6999fd39]
104
+ - @khanacademy/wonder-blocks-tokens@2.1.0
86
105
 
87
106
  ## 4.2.8
88
107
 
89
108
  ### Patch Changes
90
109
 
91
- - 02a1b298: Make sure we don't package tsconfig and tsbuildinfo files
92
- - Updated dependencies [02a1b298]
93
- - @khanacademy/wonder-blocks-core@7.0.1
94
- - @khanacademy/wonder-blocks-tokens@2.0.1
110
+ - 02a1b298: Make sure we don't package tsconfig and tsbuildinfo files
111
+ - Updated dependencies [02a1b298]
112
+ - @khanacademy/wonder-blocks-core@7.0.1
113
+ - @khanacademy/wonder-blocks-tokens@2.0.1
95
114
 
96
115
  ## 4.2.7
97
116
 
98
117
  ### Patch Changes
99
118
 
100
- - Updated dependencies [07f7f407]
101
- - @khanacademy/wonder-blocks-core@7.0.0
119
+ - Updated dependencies [07f7f407]
120
+ - @khanacademy/wonder-blocks-core@7.0.0
102
121
 
103
122
  ## 4.2.6
104
123
 
105
124
  ### Patch Changes
106
125
 
107
- - Updated dependencies [f17dc1ee]
108
- - Updated dependencies [991eb43f]
109
- - @khanacademy/wonder-blocks-tokens@2.0.0
126
+ - Updated dependencies [f17dc1ee]
127
+ - Updated dependencies [991eb43f]
128
+ - @khanacademy/wonder-blocks-tokens@2.0.0
110
129
 
111
130
  ## 4.2.5
112
131
 
113
132
  ### Patch Changes
114
133
 
115
- - 559e82d5: Update to build tooling, generating smaller output
116
- - Updated dependencies [559e82d5]
117
- - @khanacademy/wonder-blocks-core@6.4.3
118
- - @khanacademy/wonder-blocks-tokens@1.3.1
134
+ - 559e82d5: Update to build tooling, generating smaller output
135
+ - Updated dependencies [559e82d5]
136
+ - @khanacademy/wonder-blocks-core@6.4.3
137
+ - @khanacademy/wonder-blocks-tokens@1.3.1
119
138
 
120
139
  ## 4.2.4
121
140
 
122
141
  ### Patch Changes
123
142
 
124
- - Updated dependencies [eab37b8b]
125
- - @khanacademy/wonder-blocks-core@6.4.2
143
+ - Updated dependencies [eab37b8b]
144
+ - @khanacademy/wonder-blocks-core@6.4.2
126
145
 
127
146
  ## 4.2.3
128
147
 
129
148
  ### Patch Changes
130
149
 
131
- - f099cf87: Improves accessibility of the checked status on `OptionItem` components used
132
- within the `ActionMenu` component. The checked status is communicated to
133
- screenreaders by using a `menuitemcheckbox` role with the `aria-checked`
134
- attribute (instead of `aria-selected`). - `CellCore` (used by `CompactCell` and `DetailCell`) has a new optional
135
- prop for `aria-checked` - `ClickableRole` type now supports the `menuitemcheckbox` role - `OptionItem`'s `role` prop now also supports the `menuitemcheckbox` role
150
+ - f099cf87: Improves accessibility of the checked status on `OptionItem` components used
151
+ within the `ActionMenu` component. The checked status is communicated to
152
+ screenreaders by using a `menuitemcheckbox` role with the `aria-checked`
153
+ attribute (instead of `aria-selected`). - `CellCore` (used by `CompactCell` and `DetailCell`) has a new optional
154
+ prop for `aria-checked` - `ClickableRole` type now supports the `menuitemcheckbox` role - `OptionItem`'s `role` prop now also supports the `menuitemcheckbox` role
136
155
 
137
156
  ## 4.2.2
138
157
 
139
158
  ### Patch Changes
140
159
 
141
- - Updated dependencies [5dfac06e]
142
- - @khanacademy/wonder-blocks-core@6.4.1
160
+ - Updated dependencies [5dfac06e]
161
+ - @khanacademy/wonder-blocks-core@6.4.1
143
162
 
144
163
  ## 4.2.1
145
164
 
146
165
  ### Patch Changes
147
166
 
148
- - Updated dependencies [9bfeead9]
149
- - @khanacademy/wonder-blocks-tokens@1.3.0
167
+ - Updated dependencies [9bfeead9]
168
+ - @khanacademy/wonder-blocks-tokens@1.3.0
150
169
 
151
170
  ## 4.2.0
152
171
 
153
172
  ### Minor Changes
154
173
 
155
- - 58075352: Change testId to render the default Testing Library HTML attribute: data-testid (was data-test-id)
174
+ - 58075352: Change testId to render the default Testing Library HTML attribute: data-testid (was data-test-id)
156
175
 
157
176
  ### Patch Changes
158
177
 
159
- - Updated dependencies [58075352]
160
- - @khanacademy/wonder-blocks-core@6.4.0
178
+ - Updated dependencies [58075352]
179
+ - @khanacademy/wonder-blocks-core@6.4.0
161
180
 
162
181
  ## 4.1.3
163
182
 
164
183
  ### Patch Changes
165
184
 
166
- - Updated dependencies [874081aa]
167
- - Updated dependencies [874081aa]
168
- - Updated dependencies [a9bf603a]
169
- - @khanacademy/wonder-blocks-tokens@1.2.0
185
+ - Updated dependencies [874081aa]
186
+ - Updated dependencies [874081aa]
187
+ - Updated dependencies [a9bf603a]
188
+ - @khanacademy/wonder-blocks-tokens@1.2.0
170
189
 
171
190
  ## 4.1.2
172
191
 
173
192
  ### Patch Changes
174
193
 
175
- - e6433bee: Fix event bubbling on ClickableBehavior when submit is used.
194
+ - e6433bee: Fix event bubbling on ClickableBehavior when submit is used.
176
195
 
177
196
  ## 4.1.1
178
197
 
179
198
  ### Patch Changes
180
199
 
181
- - Updated dependencies [4cfb4977]
182
- - @khanacademy/wonder-blocks-tokens@1.1.0
200
+ - Updated dependencies [4cfb4977]
201
+ - @khanacademy/wonder-blocks-tokens@1.1.0
183
202
 
184
203
  ## 4.1.0
185
204
 
186
205
  ### Minor Changes
187
206
 
188
- - 60fdac1c: Added onMouseDown and onMouseUp props to Clickable
207
+ - 60fdac1c: Added onMouseDown and onMouseUp props to Clickable
189
208
 
190
209
  ## 4.0.14
191
210
 
192
211
  ### Patch Changes
193
212
 
194
- - Updated dependencies [e83f8991]
195
- - @khanacademy/wonder-blocks-tokens@1.0.0
213
+ - Updated dependencies [e83f8991]
214
+ - @khanacademy/wonder-blocks-tokens@1.0.0
196
215
 
197
216
  ## 4.0.13
198
217
 
199
218
  ### Patch Changes
200
219
 
201
- - 7c51f377: Migrate wb-color imports to use tokens.color
202
- - Updated dependencies [7cd7f6cc]
203
- - Updated dependencies [7c51f377]
204
- - @khanacademy/wonder-blocks-tokens@0.2.0
220
+ - 7c51f377: Migrate wb-color imports to use tokens.color
221
+ - Updated dependencies [7cd7f6cc]
222
+ - Updated dependencies [7c51f377]
223
+ - @khanacademy/wonder-blocks-tokens@0.2.0
205
224
 
206
225
  ## 4.0.12
207
226
 
208
227
  ### Patch Changes
209
228
 
210
- - Updated dependencies [6df21f71]
211
- - @khanacademy/wonder-blocks-core@6.3.1
229
+ - Updated dependencies [6df21f71]
230
+ - @khanacademy/wonder-blocks-core@6.3.1
212
231
 
213
232
  ## 4.0.11
214
233
 
215
234
  ### Patch Changes
216
235
 
217
- - 6b8bf8d5: Fix onFocus handler on Clickable
236
+ - 6b8bf8d5: Fix onFocus handler on Clickable
218
237
 
219
238
  ## 4.0.10
220
239
 
221
240
  ### Patch Changes
222
241
 
223
- - 7b24db93: Get onFocus to work for buttons
242
+ - 7b24db93: Get onFocus to work for buttons
224
243
 
225
244
  ## 4.0.9
226
245
 
227
246
  ### Patch Changes
228
247
 
229
- - Updated dependencies [7055ca94]
230
- - @khanacademy/wonder-blocks-core@6.3.0
248
+ - Updated dependencies [7055ca94]
249
+ - @khanacademy/wonder-blocks-core@6.3.0
231
250
 
232
251
  ## 4.0.8
233
252
 
234
253
  ### Patch Changes
235
254
 
236
- - Updated dependencies [48d3c7e9]
237
- - @khanacademy/wonder-blocks-color@3.0.0
255
+ - Updated dependencies [48d3c7e9]
256
+ - @khanacademy/wonder-blocks-color@3.0.0
238
257
 
239
258
  ## 4.0.7
240
259
 
241
260
  ### Patch Changes
242
261
 
243
- - 80cab317: Include `aria-disabled=false` for `Links` (instead of `undefined`).
262
+ - 80cab317: Include `aria-disabled=false` for `Links` (instead of `undefined`).
244
263
 
245
264
  ## 4.0.6
246
265
 
247
266
  ### Patch Changes
248
267
 
249
- - Updated dependencies [4b97b9a2]
250
- - @khanacademy/wonder-blocks-core@6.2.0
268
+ - Updated dependencies [4b97b9a2]
269
+ - @khanacademy/wonder-blocks-core@6.2.0
251
270
 
252
271
  ## 4.0.5
253
272
 
254
273
  ### Patch Changes
255
274
 
256
- - Updated dependencies [2871f0a9]
257
- - @khanacademy/wonder-blocks-core@6.1.1
275
+ - Updated dependencies [2871f0a9]
276
+ - @khanacademy/wonder-blocks-core@6.1.1
258
277
 
259
278
  ## 4.0.4
260
279
 
261
280
  ### Patch Changes
262
281
 
263
- - 834855e5: Allow 'title' as a prop on Clickable
264
- - Updated dependencies [efb59c29]
265
- - Updated dependencies [8bc40ed2]
266
- - @khanacademy/wonder-blocks-core@6.1.0
282
+ - 834855e5: Allow 'title' as a prop on Clickable
283
+ - Updated dependencies [efb59c29]
284
+ - Updated dependencies [8bc40ed2]
285
+ - @khanacademy/wonder-blocks-core@6.1.0
267
286
 
268
287
  ## 4.0.3
269
288
 
270
289
  ### Patch Changes
271
290
 
272
- - Updated dependencies [f19da46e]
273
- - @khanacademy/wonder-blocks-core@6.0.2
291
+ - Updated dependencies [f19da46e]
292
+ - @khanacademy/wonder-blocks-core@6.0.2
274
293
 
275
294
  ## 4.0.2
276
295
 
277
296
  ### Patch Changes
278
297
 
279
- - 8dc4a5a3: Allow 'beforeNav' and 'safeWithNav' to be used without an 'href'
280
- - Updated dependencies [1920feb8]
281
- - @khanacademy/wonder-blocks-core@6.0.1
298
+ - 8dc4a5a3: Allow 'beforeNav' and 'safeWithNav' to be used without an 'href'
299
+ - Updated dependencies [1920feb8]
300
+ - @khanacademy/wonder-blocks-core@6.0.1
282
301
 
283
302
  ## 4.0.1
284
303
 
285
304
  ### Patch Changes
286
305
 
287
- - f230b267: Allow 'safeWithNav()' to be used on its own without 'beforeNav()' in prop types
306
+ - f230b267: Allow 'safeWithNav()' to be used on its own without 'beforeNav()' in prop types
288
307
 
289
308
  ## 4.0.0
290
309
 
291
310
  ### Major Changes
292
311
 
293
- - 674a1e5c: Props are using discriminated union types to prevent invalid combinations of props
312
+ - 674a1e5c: Props are using discriminated union types to prevent invalid combinations of props
294
313
 
295
314
  ### Minor Changes
296
315
 
297
- - 8c77f29d: Create new Switch component and add 'switch' role to ClickableRole
316
+ - 8c77f29d: Create new Switch component and add 'switch' role to ClickableRole
298
317
 
299
318
  ### Patch Changes
300
319
 
301
- - 674a1e5c: We're no longer building flow types
302
- - Updated dependencies [674a1e5c]
303
- - Updated dependencies [674a1e5c]
304
- - @khanacademy/wonder-blocks-core@6.0.0
320
+ - 674a1e5c: We're no longer building flow types
321
+ - Updated dependencies [674a1e5c]
322
+ - Updated dependencies [674a1e5c]
323
+ - @khanacademy/wonder-blocks-core@6.0.0
305
324
 
306
325
  ## 3.1.3
307
326
 
308
327
  ### Patch Changes
309
328
 
310
- - Updated dependencies [1344436f]
311
- - @khanacademy/wonder-blocks-core@5.4.0
329
+ - Updated dependencies [1344436f]
330
+ - @khanacademy/wonder-blocks-core@5.4.0
312
331
 
313
332
  ## 3.1.2
314
333
 
315
334
  ### Patch Changes
316
335
 
317
- - Updated dependencies [9f3752d4]
318
- - @khanacademy/wonder-blocks-core@5.3.1
336
+ - Updated dependencies [9f3752d4]
337
+ - @khanacademy/wonder-blocks-core@5.3.1
319
338
 
320
339
  ## 3.1.1
321
340
 
322
341
  ### Patch Changes
323
342
 
324
- - Updated dependencies [c37b99aa]
325
- - Updated dependencies [c4cef3e6]
326
- - @khanacademy/wonder-blocks-core@5.3.0
343
+ - Updated dependencies [c37b99aa]
344
+ - Updated dependencies [c4cef3e6]
345
+ - @khanacademy/wonder-blocks-core@5.3.0
327
346
 
328
347
  ## 3.1.0
329
348
 
330
349
  ### Minor Changes
331
350
 
332
- - ad8beb23: Added new tab index and ref props
351
+ - ad8beb23: Added new tab index and ref props
333
352
 
334
353
  ## 3.0.13
335
354
 
336
355
  ### Patch Changes
337
356
 
338
- - Updated dependencies [d4c412b5]
339
- - @khanacademy/wonder-blocks-core@5.2.3
357
+ - Updated dependencies [d4c412b5]
358
+ - @khanacademy/wonder-blocks-core@5.2.3
340
359
 
341
360
  ## 3.0.12
342
361
 
343
362
  ### Patch Changes
344
363
 
345
- - Updated dependencies [64a188e3]
346
- - @khanacademy/wonder-blocks-core@5.2.2
364
+ - Updated dependencies [64a188e3]
365
+ - @khanacademy/wonder-blocks-core@5.2.2
347
366
 
348
367
  ## 3.0.11
349
368
 
350
369
  ### Patch Changes
351
370
 
352
- - df9a10aa: Update state and props to be readonly in components using getDerivedStateFromProps()
353
- - Updated dependencies [5a1ea891]
354
- - Updated dependencies [df9a10aa]
355
- - @khanacademy/wonder-blocks-core@5.2.1
371
+ - df9a10aa: Update state and props to be readonly in components using getDerivedStateFromProps()
372
+ - Updated dependencies [5a1ea891]
373
+ - Updated dependencies [df9a10aa]
374
+ - @khanacademy/wonder-blocks-core@5.2.1
356
375
 
357
376
  ## 3.0.10
358
377
 
359
378
  ### Patch Changes
360
379
 
361
- - Updated dependencies [fa70c895]
362
- - Updated dependencies [19ab0408]
363
- - Updated dependencies [fa70c895]
364
- - @khanacademy/wonder-blocks-core@5.2.0
380
+ - Updated dependencies [fa70c895]
381
+ - Updated dependencies [19ab0408]
382
+ - Updated dependencies [fa70c895]
383
+ - @khanacademy/wonder-blocks-core@5.2.0
365
384
 
366
385
  ## 3.0.9
367
386
 
368
387
  ### Patch Changes
369
388
 
370
- - Updated dependencies [3c400719]
371
- - Updated dependencies [a6164ed0]
372
- - @khanacademy/wonder-blocks-core@5.1.0
389
+ - Updated dependencies [3c400719]
390
+ - Updated dependencies [a6164ed0]
391
+ - @khanacademy/wonder-blocks-core@5.1.0
373
392
 
374
393
  ## 3.0.8
375
394
 
@@ -379,9 +398,9 @@
379
398
 
380
399
  ### Patch Changes
381
400
 
382
- - c20f48f3: Don't transpile classes when building bundles
383
- - Updated dependencies [c20f48f3]
384
- - @khanacademy/wonder-blocks-core@5.0.4
401
+ - c20f48f3: Don't transpile classes when building bundles
402
+ - Updated dependencies [c20f48f3]
403
+ - @khanacademy/wonder-blocks-core@5.0.4
385
404
 
386
405
  ## 3.0.5
387
406
 
@@ -391,186 +410,186 @@
391
410
 
392
411
  ### Patch Changes
393
412
 
394
- - Updated dependencies [b281e2eb]
395
- - @khanacademy/wonder-blocks-core@5.0.3
413
+ - Updated dependencies [b281e2eb]
414
+ - @khanacademy/wonder-blocks-core@5.0.3
396
415
 
397
416
  ## 3.0.2
398
417
 
399
418
  ### Patch Changes
400
419
 
401
- - Updated dependencies [21ce20c7]
402
- - @khanacademy/wonder-blocks-core@5.0.2
420
+ - Updated dependencies [21ce20c7]
421
+ - @khanacademy/wonder-blocks-core@5.0.2
403
422
 
404
423
  ## 3.0.1
405
424
 
406
425
  ### Patch Changes
407
426
 
408
- - ccb6fe00: Miscellaneous TS type fixes
409
- - d4c2b18c: Fix a variety of issues with Flow types generated by flowgen
410
- - Updated dependencies [ccb6fe00]
411
- - Updated dependencies [d4c2b18c]
412
- - @khanacademy/wonder-blocks-core@5.0.1
413
- - @khanacademy/wonder-blocks-color@2.0.1
427
+ - ccb6fe00: Miscellaneous TS type fixes
428
+ - d4c2b18c: Fix a variety of issues with Flow types generated by flowgen
429
+ - Updated dependencies [ccb6fe00]
430
+ - Updated dependencies [d4c2b18c]
431
+ - @khanacademy/wonder-blocks-core@5.0.1
432
+ - @khanacademy/wonder-blocks-color@2.0.1
414
433
 
415
434
  ## 3.0.0
416
435
 
417
436
  ### Major Changes
418
437
 
419
- - 1ca4d7e3: Fix minor issue with generate Flow types (this is a major bump b/c I forgot to do one after doing the TS conversion)
438
+ - 1ca4d7e3: Fix minor issue with generate Flow types (this is a major bump b/c I forgot to do one after doing the TS conversion)
420
439
 
421
440
  ### Patch Changes
422
441
 
423
- - Updated dependencies [1ca4d7e3]
424
- - @khanacademy/wonder-blocks-color@2.0.0
425
- - @khanacademy/wonder-blocks-core@5.0.0
442
+ - Updated dependencies [1ca4d7e3]
443
+ - @khanacademy/wonder-blocks-color@2.0.0
444
+ - @khanacademy/wonder-blocks-core@5.0.0
426
445
 
427
446
  ## 2.4.8
428
447
 
429
448
  ### Patch Changes
430
449
 
431
- - b5ba5568: Ensure that flow lib defs use React.ElementConfig<> isntead of JSX.LibraryManagedAttributes<>
432
- - Updated dependencies [b5ba5568]
433
- - @khanacademy/wonder-blocks-color@1.2.3
434
- - @khanacademy/wonder-blocks-core@4.9.1
450
+ - b5ba5568: Ensure that flow lib defs use React.ElementConfig<> isntead of JSX.LibraryManagedAttributes<>
451
+ - Updated dependencies [b5ba5568]
452
+ - @khanacademy/wonder-blocks-color@1.2.3
453
+ - @khanacademy/wonder-blocks-core@4.9.1
435
454
 
436
455
  ## 2.4.7
437
456
 
438
457
  ### Patch Changes
439
458
 
440
- - Updated dependencies [779b031d]
441
- - @khanacademy/wonder-blocks-core@4.9.0
459
+ - Updated dependencies [779b031d]
460
+ - @khanacademy/wonder-blocks-core@4.9.0
442
461
 
443
462
  ## 2.4.6
444
463
 
445
464
  ### Patch Changes
446
465
 
447
- - d816af08: Update build and test configs use TypeScript
448
- - 3891f544: Update babel config to include plugins that Storybook needed
449
- - 0d28bb1c: Configured TypeScript
450
- - 3d05f764: Fix HOCs and other type errors
451
- - c2ec4902: Update eslint configuration, fix lint
452
- - 2983c05b: Include 'types' field in package.json
453
- - 77ff6a66: Generate Flow types from TypeScript types
454
- - ec8d4b7f: Fix miscellaneous TypeScript errors
455
- - Updated dependencies [d816af08]
456
- - Updated dependencies [3891f544]
457
- - Updated dependencies [0d28bb1c]
458
- - Updated dependencies [873f4a14]
459
- - Updated dependencies [3d05f764]
460
- - Updated dependencies [c2ec4902]
461
- - Updated dependencies [2983c05b]
462
- - Updated dependencies [77ff6a66]
463
- - Updated dependencies [ec8d4b7f]
464
- - @khanacademy/wonder-blocks-color@1.2.2
465
- - @khanacademy/wonder-blocks-core@4.8.0
466
+ - d816af08: Update build and test configs use TypeScript
467
+ - 3891f544: Update babel config to include plugins that Storybook needed
468
+ - 0d28bb1c: Configured TypeScript
469
+ - 3d05f764: Fix HOCs and other type errors
470
+ - c2ec4902: Update eslint configuration, fix lint
471
+ - 2983c05b: Include 'types' field in package.json
472
+ - 77ff6a66: Generate Flow types from TypeScript types
473
+ - ec8d4b7f: Fix miscellaneous TypeScript errors
474
+ - Updated dependencies [d816af08]
475
+ - Updated dependencies [3891f544]
476
+ - Updated dependencies [0d28bb1c]
477
+ - Updated dependencies [873f4a14]
478
+ - Updated dependencies [3d05f764]
479
+ - Updated dependencies [c2ec4902]
480
+ - Updated dependencies [2983c05b]
481
+ - Updated dependencies [77ff6a66]
482
+ - Updated dependencies [ec8d4b7f]
483
+ - @khanacademy/wonder-blocks-color@1.2.2
484
+ - @khanacademy/wonder-blocks-core@4.8.0
466
485
 
467
486
  ## 2.4.5
468
487
 
469
488
  ### Patch Changes
470
489
 
471
- - 91cb727c: Remove file extensions from imports
472
- - 91cb727c: Merge disjoint prop types since the codemod doesn't handle these properly.
473
- - Updated dependencies [91cb727c]
474
- - Updated dependencies [91cb727c]
475
- - @khanacademy/wonder-blocks-color@1.2.1
476
- - @khanacademy/wonder-blocks-core@4.7.0
490
+ - 91cb727c: Remove file extensions from imports
491
+ - 91cb727c: Merge disjoint prop types since the codemod doesn't handle these properly.
492
+ - Updated dependencies [91cb727c]
493
+ - Updated dependencies [91cb727c]
494
+ - @khanacademy/wonder-blocks-color@1.2.1
495
+ - @khanacademy/wonder-blocks-core@4.7.0
477
496
 
478
497
  ## 2.4.4
479
498
 
480
499
  ### Patch Changes
481
500
 
482
- - 496119f2: Cleanup WB interdependencies
483
- - Updated dependencies [496119f2]
484
- - @khanacademy/wonder-blocks-core@4.6.2
501
+ - 496119f2: Cleanup WB interdependencies
502
+ - Updated dependencies [496119f2]
503
+ - @khanacademy/wonder-blocks-core@4.6.2
485
504
 
486
505
  ## 2.4.3
487
506
 
488
507
  ### Patch Changes
489
508
 
490
- - @khanacademy/wonder-blocks-core@4.6.1
509
+ - @khanacademy/wonder-blocks-core@4.6.1
491
510
 
492
511
  ## 2.4.2
493
512
 
494
513
  ### Patch Changes
495
514
 
496
- - Updated dependencies [b561425a]
497
- - Updated dependencies [a566e232]
498
- - Updated dependencies [d2b21a6e]
499
- - @khanacademy/wonder-blocks-core@4.6.0
515
+ - Updated dependencies [b561425a]
516
+ - Updated dependencies [a566e232]
517
+ - Updated dependencies [d2b21a6e]
518
+ - @khanacademy/wonder-blocks-core@4.6.0
500
519
 
501
520
  ## 2.4.1
502
521
 
503
522
  ### Patch Changes
504
523
 
505
- - 4c682709: handleClick no longer redundantly triggers on mouseup
524
+ - 4c682709: handleClick no longer redundantly triggers on mouseup
506
525
 
507
526
  ## 2.4.0
508
527
 
509
528
  ### Minor Changes
510
529
 
511
- - ceb111df: ClickableBehavior no longer has tabIndex 0 by default. It must be passed in.
530
+ - ceb111df: ClickableBehavior no longer has tabIndex 0 by default. It must be passed in.
512
531
 
513
532
  ## 2.3.3
514
533
 
515
534
  ### Patch Changes
516
535
 
517
- - Updated dependencies [175a2dd2]
518
- - @khanacademy/wonder-blocks-core@4.5.0
536
+ - Updated dependencies [175a2dd2]
537
+ - @khanacademy/wonder-blocks-core@4.5.0
519
538
 
520
539
  ## 2.3.2
521
540
 
522
541
  ### Patch Changes
523
542
 
524
- - 5b8ba5da: Remove the default value of aria-label ""
543
+ - 5b8ba5da: Remove the default value of aria-label ""
525
544
 
526
545
  ## 2.3.1
527
546
 
528
547
  ### Patch Changes
529
548
 
530
- - Updated dependencies [6ee20af9]
531
- - @khanacademy/wonder-blocks-core@4.4.0
549
+ - Updated dependencies [6ee20af9]
550
+ - @khanacademy/wonder-blocks-core@4.4.0
532
551
 
533
552
  ## 2.3.0
534
553
 
535
554
  ### Minor Changes
536
555
 
537
- - ee6fc773: Added keyboard support to search items when the dropdown is focused, included "Enter" as a key to trigger actions with the "option" role
556
+ - ee6fc773: Added keyboard support to search items when the dropdown is focused, included "Enter" as a key to trigger actions with the "option" role
538
557
 
539
558
  ## 2.2.7
540
559
 
541
560
  ### Patch Changes
542
561
 
543
- - Updated dependencies [5f4a4297]
544
- - Updated dependencies [2b96fd59]
545
- - @khanacademy/wonder-blocks-core@4.3.2
562
+ - Updated dependencies [5f4a4297]
563
+ - Updated dependencies [2b96fd59]
564
+ - @khanacademy/wonder-blocks-core@4.3.2
546
565
 
547
566
  ## 2.2.6
548
567
 
549
568
  ### Patch Changes
550
569
 
551
- - @khanacademy/wonder-blocks-core@4.3.1
570
+ - @khanacademy/wonder-blocks-core@4.3.1
552
571
 
553
572
  ## 2.2.5
554
573
 
555
574
  ### Patch Changes
556
575
 
557
- - Updated dependencies [246a921d]
558
- - @khanacademy/wonder-blocks-core@4.3.0
576
+ - Updated dependencies [246a921d]
577
+ - @khanacademy/wonder-blocks-core@4.3.0
559
578
 
560
579
  ## 2.2.4
561
580
 
562
581
  ### Patch Changes
563
582
 
564
- - 166ecc97: Use `aria-disabled` instead of disabled, fix focused + disabled styles.
583
+ - 166ecc97: Use `aria-disabled` instead of disabled, fix focused + disabled styles.
565
584
 
566
585
  ## 2.2.3
567
586
 
568
587
  ### Patch Changes
569
588
 
570
- - @khanacademy/wonder-blocks-core@4.2.1
589
+ - @khanacademy/wonder-blocks-core@4.2.1
571
590
 
572
591
  ## 2.2.2
573
592
 
574
593
  ### Patch Changes
575
594
 
576
- - 901bfe82: Change disabled tabindex from -1 to 0
595
+ - 901bfe82: Change disabled tabindex from -1 to 0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Khan Academy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/es/index.js CHANGED
@@ -33,16 +33,16 @@ const getAppropriateTriggersForRole = role => {
33
33
  }
34
34
  };
35
35
  const disabledHandlers = {
36
- onClick: () => void 0,
37
- onMouseEnter: () => void 0,
38
- onMouseLeave: () => void 0,
39
- onMouseDown: () => void 0,
40
- onMouseUp: () => void 0,
41
- onTouchStart: () => void 0,
42
- onTouchEnd: () => void 0,
43
- onTouchCancel: () => void 0,
44
- onKeyDown: () => void 0,
45
- onKeyUp: () => void 0
36
+ onClick: () => undefined,
37
+ onMouseEnter: () => undefined,
38
+ onMouseLeave: () => undefined,
39
+ onMouseDown: () => undefined,
40
+ onMouseUp: () => undefined,
41
+ onTouchStart: () => undefined,
42
+ onTouchEnd: () => undefined,
43
+ onTouchCancel: () => undefined,
44
+ onKeyDown: () => undefined,
45
+ onKeyUp: () => undefined
46
46
  };
47
47
  const startState = {
48
48
  hovered: false,
@@ -62,8 +62,8 @@ class ClickableBehavior extends React.Component {
62
62
  }
63
63
  constructor(props) {
64
64
  super(props);
65
- this.waitingForClick = void 0;
66
- this.enterClick = void 0;
65
+ this.waitingForClick = undefined;
66
+ this.enterClick = undefined;
67
67
  this.handleClick = e => {
68
68
  const {
69
69
  onClick = undefined,
@@ -349,7 +349,7 @@ function getClickableBehavior(href, skipClientNav, router) {
349
349
  }
350
350
 
351
351
  const _excluded = ["href", "onClick", "skipClientNav", "beforeNav", "safeWithNav", "style", "target", "testId", "onFocus", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp", "hideDefaultFocusRing", "light", "disabled", "tabIndex"];
352
- const StyledAnchor = addStyle("a");
352
+ const StyledA = addStyle("a");
353
353
  const StyledButton = addStyle("button");
354
354
  const StyledLink = addStyle(Link);
355
355
  const Clickable = React.forwardRef(function Clickable(props, ref) {
@@ -365,7 +365,7 @@ const Clickable = React.forwardRef(function Clickable(props, ref) {
365
365
  ref: ref
366
366
  }), props.children(clickableState));
367
367
  } else if (activeHref && !useClient) {
368
- return React.createElement(StyledAnchor, _extends({}, commonProps, {
368
+ return React.createElement(StyledA, _extends({}, commonProps, {
369
369
  href: props.href,
370
370
  role: props.role,
371
371
  target: props.target || undefined,
package/dist/index.js CHANGED
@@ -11,10 +11,7 @@ var reactRouter = require('react-router');
11
11
  var wonderBlocksCore = require('@khanacademy/wonder-blocks-core');
12
12
  var wonderBlocksTokens = require('@khanacademy/wonder-blocks-tokens');
13
13
 
14
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
-
16
- function _interopNamespace(e) {
17
- if (e && e.__esModule) return e;
14
+ function _interopNamespaceDefault(e) {
18
15
  var n = Object.create(null);
19
16
  if (e) {
20
17
  Object.keys(e).forEach(function (k) {
@@ -27,13 +24,11 @@ function _interopNamespace(e) {
27
24
  }
28
25
  });
29
26
  }
30
- n["default"] = e;
27
+ n.default = e;
31
28
  return Object.freeze(n);
32
29
  }
33
30
 
34
- var _objectWithoutPropertiesLoose__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutPropertiesLoose);
35
- var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
36
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
31
+ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
37
32
 
38
33
  const getAppropriateTriggersForRole = role => {
39
34
  switch (role) {
@@ -61,16 +56,16 @@ const getAppropriateTriggersForRole = role => {
61
56
  }
62
57
  };
63
58
  const disabledHandlers = {
64
- onClick: () => void 0,
65
- onMouseEnter: () => void 0,
66
- onMouseLeave: () => void 0,
67
- onMouseDown: () => void 0,
68
- onMouseUp: () => void 0,
69
- onTouchStart: () => void 0,
70
- onTouchEnd: () => void 0,
71
- onTouchCancel: () => void 0,
72
- onKeyDown: () => void 0,
73
- onKeyUp: () => void 0
59
+ onClick: () => undefined,
60
+ onMouseEnter: () => undefined,
61
+ onMouseLeave: () => undefined,
62
+ onMouseDown: () => undefined,
63
+ onMouseUp: () => undefined,
64
+ onTouchStart: () => undefined,
65
+ onTouchEnd: () => undefined,
66
+ onTouchCancel: () => undefined,
67
+ onKeyDown: () => undefined,
68
+ onKeyUp: () => undefined
74
69
  };
75
70
  const startState = {
76
71
  hovered: false,
@@ -81,7 +76,7 @@ const startState = {
81
76
  class ClickableBehavior extends React__namespace.Component {
82
77
  static getDerivedStateFromProps(props, state) {
83
78
  if (props.disabled) {
84
- return _extends__default["default"]({}, startState, {
79
+ return _extends({}, startState, {
85
80
  focused: state.focused
86
81
  });
87
82
  } else {
@@ -90,8 +85,8 @@ class ClickableBehavior extends React__namespace.Component {
90
85
  }
91
86
  constructor(props) {
92
87
  super(props);
93
- this.waitingForClick = void 0;
94
- this.enterClick = void 0;
88
+ this.waitingForClick = undefined;
89
+ this.enterClick = undefined;
95
90
  this.handleClick = e => {
96
91
  const {
97
92
  onClick = undefined,
@@ -330,7 +325,7 @@ class ClickableBehavior extends React__namespace.Component {
330
325
  }
331
326
  render() {
332
327
  const rel = this.props.rel || (this.props.target === "_blank" ? "noopener noreferrer" : undefined);
333
- const childrenProps = this.props.disabled ? _extends__default["default"]({}, disabledHandlers, {
328
+ const childrenProps = this.props.disabled ? _extends({}, disabledHandlers, {
334
329
  onFocus: this.handleFocus,
335
330
  onBlur: this.handleBlur,
336
331
  tabIndex: this.props.tabIndex,
@@ -377,7 +372,7 @@ function getClickableBehavior(href, skipClientNav, router) {
377
372
  }
378
373
 
379
374
  const _excluded = ["href", "onClick", "skipClientNav", "beforeNav", "safeWithNav", "style", "target", "testId", "onFocus", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp", "hideDefaultFocusRing", "light", "disabled", "tabIndex"];
380
- const StyledAnchor = wonderBlocksCore.addStyle("a");
375
+ const StyledA = wonderBlocksCore.addStyle("a");
381
376
  const StyledButton = wonderBlocksCore.addStyle("button");
382
377
  const StyledLink = wonderBlocksCore.addStyle(reactRouterDom.Link);
383
378
  const Clickable = React__namespace.forwardRef(function Clickable(props, ref) {
@@ -385,7 +380,7 @@ const Clickable = React__namespace.forwardRef(function Clickable(props, ref) {
385
380
  const activeHref = props.href && !props.disabled;
386
381
  const useClient = router && !props.skipClientNav && isClientSideUrl(props.href || "");
387
382
  if (activeHref && useClient && props.href) {
388
- return React__namespace.createElement(StyledLink, _extends__default["default"]({}, commonProps, {
383
+ return React__namespace.createElement(StyledLink, _extends({}, commonProps, {
389
384
  to: props.href,
390
385
  role: props.role,
391
386
  target: props.target || undefined,
@@ -393,7 +388,7 @@ const Clickable = React__namespace.forwardRef(function Clickable(props, ref) {
393
388
  ref: ref
394
389
  }), props.children(clickableState));
395
390
  } else if (activeHref && !useClient) {
396
- return React__namespace.createElement(StyledAnchor, _extends__default["default"]({}, commonProps, {
391
+ return React__namespace.createElement(StyledA, _extends({}, commonProps, {
397
392
  href: props.href,
398
393
  role: props.role,
399
394
  target: props.target || undefined,
@@ -401,7 +396,7 @@ const Clickable = React__namespace.forwardRef(function Clickable(props, ref) {
401
396
  ref: ref
402
397
  }), props.children(clickableState));
403
398
  } else {
404
- return React__namespace.createElement(StyledButton, _extends__default["default"]({}, commonProps, {
399
+ return React__namespace.createElement(StyledButton, _extends({}, commonProps, {
405
400
  type: "button",
406
401
  "aria-disabled": props.disabled,
407
402
  ref: ref
@@ -428,7 +423,7 @@ const Clickable = React__namespace.forwardRef(function Clickable(props, ref) {
428
423
  disabled,
429
424
  tabIndex
430
425
  } = props,
431
- restProps = _objectWithoutPropertiesLoose__default["default"](props, _excluded);
426
+ restProps = _objectWithoutPropertiesLoose(props, _excluded);
432
427
  const ClickableBehavior = getClickableBehavior(href, skipClientNav, router);
433
428
  const getStyle = state => [styles.reset, styles.link, !hideDefaultFocusRing && state.focused && (light ? styles.focusedLight : styles.focused), disabled && styles.disabled, style];
434
429
  if (beforeNav) {
@@ -444,7 +439,7 @@ const Clickable = React__namespace.forwardRef(function Clickable(props, ref) {
444
439
  onMouseUp: onMouseUp,
445
440
  disabled: disabled,
446
441
  tabIndex: tabIndex
447
- }, (state, childrenProps) => getCorrectTag(state, router, _extends__default["default"]({}, restProps, {
442
+ }, (state, childrenProps) => getCorrectTag(state, router, _extends({}, restProps, {
448
443
  "data-testid": testId,
449
444
  style: getStyle(state)
450
445
  }, childrenProps)));
@@ -461,7 +456,7 @@ const Clickable = React__namespace.forwardRef(function Clickable(props, ref) {
461
456
  target: target,
462
457
  disabled: disabled,
463
458
  tabIndex: tabIndex
464
- }, (state, childrenProps) => getCorrectTag(state, router, _extends__default["default"]({}, restProps, {
459
+ }, (state, childrenProps) => getCorrectTag(state, router, _extends({}, restProps, {
465
460
  "data-testid": testId,
466
461
  style: getStyle(state)
467
462
  }, childrenProps)));
@@ -516,6 +511,6 @@ const styles = aphrodite.StyleSheet.create({
516
511
  });
517
512
 
518
513
  exports.ClickableBehavior = ClickableBehavior;
519
- exports["default"] = Clickable;
514
+ exports.default = Clickable;
520
515
  exports.getClickableBehavior = getClickableBehavior;
521
516
  exports.isClientSideUrl = isClientSideUrl;
package/package.json CHANGED
@@ -1,24 +1,20 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-clickable",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "design": "v1",
5
5
  "description": "Clickable component for Wonder-Blocks.",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/es/index.js",
8
8
  "types": "dist/index.d.ts",
9
- "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1",
11
- "prepublishOnly": "../../utils/publish/package-pre-publish-check.sh"
12
- },
13
9
  "author": "",
14
10
  "license": "MIT",
15
11
  "publishConfig": {
16
12
  "access": "public"
17
13
  },
18
14
  "dependencies": {
19
- "@babel/runtime": "^7.18.6",
20
- "@khanacademy/wonder-blocks-core": "^12.0.0",
21
- "@khanacademy/wonder-blocks-tokens": "^4.1.0"
15
+ "@babel/runtime": "^7.24.5",
16
+ "@khanacademy/wonder-blocks-core": "12.1.0",
17
+ "@khanacademy/wonder-blocks-tokens": "4.2.0"
22
18
  },
23
19
  "peerDependencies": {
24
20
  "aphrodite": "^1.2.5",
@@ -28,6 +24,9 @@
28
24
  "react-router-dom": "5.3.4"
29
25
  },
30
26
  "devDependencies": {
31
- "@khanacademy/wb-dev-build-settings": "^2.0.0"
27
+ "@khanacademy/wb-dev-build-settings": "2.1.0"
28
+ },
29
+ "scripts": {
30
+ "test": "echo \"Error: no test specified\" && exit 1"
32
31
  }
33
32
  }