@instructure/ui-react-utils 11.6.0 → 11.6.1-snapshot-129

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
@@ -3,585 +3,327 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [11.6.0](https://github.com/instructure/instructure-ui/compare/v11.5.0...v11.6.0) (2026-02-18)
6
+ ## [11.6.1-snapshot-129](https://github.com/instructure/instructure-ui/compare/v11.6.0...v11.6.1-snapshot-129) (2026-03-16)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-react-utils
9
8
 
9
+ ### Features
10
10
 
11
+ * **ui-radio-input:** use the new theme for RadioInput ([34bfd59](https://github.com/instructure/instructure-ui/commit/34bfd5956c47beceacb50637e7fd605b9e3f4210))
12
+ * **ui-react-utils,ui-icons-lucide,ui-avatar:** add lucide icons to Avatar, refactor ui-icons-lucid package ([ab5c1ca](https://github.com/instructure/instructure-ui/commit/ab5c1ca8ec9961d754dafee0bcbe5040bb2641b1))
13
+ * **ui-react-utils:** add useDeterministicID which can be used instead of withDeterministicId for functional components ([91f025e](https://github.com/instructure/instructure-ui/commit/91f025e0a5b157f7a3bc801d8fd45d96b454124c))
11
14
 
12
15
 
13
16
 
14
- # [11.5.0](https://github.com/instructure/instructure-ui/compare/v11.4.0...v11.5.0) (2026-02-03)
15
17
 
16
- **Note:** Version bump only for package @instructure/ui-react-utils
17
18
 
19
+ # [11.6.0](https://github.com/instructure/instructure-ui/compare/v11.5.0...v11.6.0) (2026-02-18)
18
20
 
21
+ **Note:** Version bump only for package @instructure/ui-react-utils
19
22
 
23
+ # [11.5.0](https://github.com/instructure/instructure-ui/compare/v11.4.0...v11.5.0) (2026-02-03)
20
24
 
25
+ **Note:** Version bump only for package @instructure/ui-react-utils
21
26
 
22
27
  # [11.4.0](https://github.com/instructure/instructure-ui/compare/v11.3.0...v11.4.0) (2026-01-20)
23
28
 
24
29
  **Note:** Version bump only for package @instructure/ui-react-utils
25
30
 
26
-
27
-
28
-
29
-
30
31
  # [11.3.0](https://github.com/instructure/instructure-ui/compare/v11.2.0...v11.3.0) (2026-01-12)
31
32
 
32
33
  **Note:** Version bump only for package @instructure/ui-react-utils
33
34
 
34
-
35
-
36
-
37
-
38
35
  # [11.2.0](https://github.com/instructure/instructure-ui/compare/v11.0.1...v11.2.0) (2025-11-06)
39
36
 
40
-
41
37
  ### Features
42
38
 
43
- * **many:** migrate from npm to pnpm ([f7bb16e](https://github.com/instructure/instructure-ui/commit/f7bb16e114df83984c67d5a6e07fb4d9c65efc53))
44
-
45
-
46
-
47
-
39
+ - **many:** migrate from npm to pnpm ([f7bb16e](https://github.com/instructure/instructure-ui/commit/f7bb16e114df83984c67d5a6e07fb4d9c65efc53))
48
40
 
49
41
  # [11.1.0](https://github.com/instructure/instructure-ui/compare/v11.0.1...v11.1.0) (2025-11-05)
50
42
 
51
-
52
43
  ### Features
53
44
 
54
- * **many:** migrate from npm to pnpm ([f7bb16e](https://github.com/instructure/instructure-ui/commit/f7bb16e114df83984c67d5a6e07fb4d9c65efc53))
55
-
56
-
57
-
58
-
45
+ - **many:** migrate from npm to pnpm ([f7bb16e](https://github.com/instructure/instructure-ui/commit/f7bb16e114df83984c67d5a6e07fb4d9c65efc53))
59
46
 
60
47
  ## [11.0.1](https://github.com/instructure/instructure-ui/compare/v11.0.0...v11.0.1) (2025-10-13)
61
48
 
62
49
  **Note:** Version bump only for package @instructure/ui-react-utils
63
50
 
64
-
65
-
66
-
67
-
68
51
  # [11.0.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
69
52
 
70
-
71
53
  ### Features
72
54
 
73
- * **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
74
-
55
+ - **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
75
56
 
76
57
  ### BREAKING CHANGES
77
58
 
78
- * **many:** InstUI v11 contains the following breaking changes:
79
- - React 16 and 17 are no longer supported
80
- - remove `PropTypes` from all packages
81
- - remove `CodeEditor` component
82
- - remove `@instui/theme-registry` package
83
- - remove `@testable`, `@experimental`, `@hack` decorators
84
- - InstUISettingsProvider's `as` prop is removed
85
- - `canvas.use()`, `canvasHighContrast.use()` functions are removed
86
- - `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
87
- - `variables` field on theme objects are removed
88
- - remove deprecated props from Table: Row's `isStacked`, Body's
59
+ - **many:** InstUI v11 contains the following breaking changes:
60
+
61
+ * React 16 and 17 are no longer supported
62
+ * remove `PropTypes` from all packages
63
+ * remove `CodeEditor` component
64
+ * remove `@instui/theme-registry` package
65
+ * remove `@testable`, `@experimental`, `@hack` decorators
66
+ * InstUISettingsProvider's `as` prop is removed
67
+ * `canvas.use()`, `canvasHighContrast.use()` functions are removed
68
+ * `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
69
+ * `variables` field on theme objects are removed
70
+ * remove deprecated props from Table: Row's `isStacked`, Body's
89
71
  `isStacked`, `hover`, and `headers`
90
- - `Table`'s `caption` prop is now required
91
- - `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
92
-
93
-
94
-
95
-
72
+ * `Table`'s `caption` prop is now required
73
+ * `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
96
74
 
97
75
  # [10.26.0](https://github.com/instructure/instructure-ui/compare/v10.25.0...v10.26.0) (2025-10-01)
98
76
 
99
77
  **Note:** Version bump only for package @instructure/ui-react-utils
100
78
 
101
-
102
-
103
-
104
-
105
79
  # [10.25.0](https://github.com/instructure/instructure-ui/compare/v10.24.2...v10.25.0) (2025-09-09)
106
80
 
107
81
  **Note:** Version bump only for package @instructure/ui-react-utils
108
82
 
109
-
110
-
111
-
112
-
113
83
  ## [10.24.2](https://github.com/instructure/instructure-ui/compare/v10.24.1...v10.24.2) (2025-08-11)
114
84
 
115
-
116
85
  ### Bug Fixes
117
86
 
118
- * **ui-react-utils:** fix "ref is not a prop" warning spam ([5c02971](https://github.com/instructure/instructure-ui/commit/5c029716199b98353c5de589025962bcba4b01b5))
119
-
120
-
121
-
122
-
87
+ - **ui-react-utils:** fix "ref is not a prop" warning spam ([5c02971](https://github.com/instructure/instructure-ui/commit/5c029716199b98353c5de589025962bcba4b01b5))
123
88
 
124
89
  ## [10.24.1](https://github.com/instructure/instructure-ui/compare/v10.24.0...v10.24.1) (2025-07-30)
125
90
 
126
91
  **Note:** Version bump only for package @instructure/ui-react-utils
127
92
 
128
-
129
-
130
-
131
-
132
93
  # [10.24.0](https://github.com/instructure/instructure-ui/compare/v10.23.0...v10.24.0) (2025-07-18)
133
94
 
134
-
135
95
  ### Bug Fixes
136
96
 
137
- * **many:** fix focus ring not respecting theme overrides in Button and FileDrop ([8fffc5d](https://github.com/instructure/instructure-ui/commit/8fffc5db8f41249277283b0ad05be0d158d6d7d7))
138
-
97
+ - **many:** fix focus ring not respecting theme overrides in Button and FileDrop ([8fffc5d](https://github.com/instructure/instructure-ui/commit/8fffc5db8f41249277283b0ad05be0d158d6d7d7))
139
98
 
140
99
  ### Features
141
100
 
142
- * **ui-react-utils:** safeClonElement to support react 19 ([2c9931f](https://github.com/instructure/instructure-ui/commit/2c9931f4c6d815435e6db14e11f6260bb9df91a7))
143
-
144
-
145
-
146
-
101
+ - **ui-react-utils:** safeClonElement to support react 19 ([2c9931f](https://github.com/instructure/instructure-ui/commit/2c9931f4c6d815435e6db14e11f6260bb9df91a7))
147
102
 
148
103
  # [10.23.0](https://github.com/instructure/instructure-ui/compare/v10.22.0...v10.23.0) (2025-07-09)
149
104
 
150
105
  **Note:** Version bump only for package @instructure/ui-react-utils
151
106
 
152
-
153
-
154
-
155
-
156
107
  # [10.22.0](https://github.com/instructure/instructure-ui/compare/v10.21.0...v10.22.0) (2025-07-04)
157
108
 
158
-
159
109
  ### Bug Fixes
160
110
 
161
- * **ui-react-utils:** fix an edge-case where safeCloneElement breaks with non-functional refs ([fa78679](https://github.com/instructure/instructure-ui/commit/fa78679d7f9634b0729a66197bb0466444514d4b))
162
-
163
-
164
-
165
-
111
+ - **ui-react-utils:** fix an edge-case where safeCloneElement breaks with non-functional refs ([fa78679](https://github.com/instructure/instructure-ui/commit/fa78679d7f9634b0729a66197bb0466444514d4b))
166
112
 
167
113
  # [10.21.0](https://github.com/instructure/instructure-ui/compare/v10.20.1...v10.21.0) (2025-06-27)
168
114
 
169
115
  **Note:** Version bump only for package @instructure/ui-react-utils
170
116
 
171
-
172
-
173
-
174
-
175
117
  ## [10.20.1](https://github.com/instructure/instructure-ui/compare/v10.20.0...v10.20.1) (2025-06-17)
176
118
 
177
119
  **Note:** Version bump only for package @instructure/ui-react-utils
178
120
 
179
-
180
-
181
-
182
-
183
121
  # [10.20.0](https://github.com/instructure/instructure-ui/compare/v10.19.1...v10.20.0) (2025-06-13)
184
122
 
185
-
186
123
  ### Bug Fixes
187
124
 
188
- * **many:** update dependencies, browsersdb and moment timezone database ([3813636](https://github.com/instructure/instructure-ui/commit/3813636458c901ad4bc74a4d5ae015cb55defcb2))
189
-
190
-
191
-
192
-
125
+ - **many:** update dependencies, browsersdb and moment timezone database ([3813636](https://github.com/instructure/instructure-ui/commit/3813636458c901ad4bc74a4d5ae015cb55defcb2))
193
126
 
194
127
  ## [10.19.1](https://github.com/instructure/instructure-ui/compare/v10.19.0...v10.19.1) (2025-06-05)
195
128
 
196
129
  **Note:** Version bump only for package @instructure/ui-react-utils
197
130
 
198
-
199
-
200
-
201
-
202
131
  # [10.19.0](https://github.com/instructure/instructure-ui/compare/v10.18.1...v10.19.0) (2025-06-03)
203
132
 
204
133
  **Note:** Version bump only for package @instructure/ui-react-utils
205
134
 
206
-
207
-
208
-
209
-
210
135
  ## [10.18.1](https://github.com/instructure/instructure-ui/compare/v10.18.0...v10.18.1) (2025-05-29)
211
136
 
212
137
  **Note:** Version bump only for package @instructure/ui-react-utils
213
138
 
214
-
215
-
216
-
217
-
218
139
  # [10.18.0](https://github.com/instructure/instructure-ui/compare/v10.17.0...v10.18.0) (2025-05-26)
219
140
 
220
141
  **Note:** Version bump only for package @instructure/ui-react-utils
221
142
 
222
-
223
-
224
-
225
-
226
143
  # [10.17.0](https://github.com/instructure/instructure-ui/compare/v10.16.4...v10.17.0) (2025-05-20)
227
144
 
228
145
  **Note:** Version bump only for package @instructure/ui-react-utils
229
146
 
230
-
231
-
232
-
233
-
234
147
  ## [10.16.4](https://github.com/instructure/instructure-ui/compare/v10.16.3...v10.16.4) (2025-05-09)
235
148
 
236
149
  **Note:** Version bump only for package @instructure/ui-react-utils
237
150
 
238
-
239
-
240
-
241
-
242
151
  ## [10.16.3](https://github.com/instructure/instructure-ui/compare/v10.16.1...v10.16.3) (2025-04-30)
243
152
 
244
153
  **Note:** Version bump only for package @instructure/ui-react-utils
245
154
 
246
-
247
-
248
-
249
-
250
155
  ## [10.16.2](https://github.com/instructure/instructure-ui/compare/v10.16.1...v10.16.2) (2025-04-22)
251
156
 
252
157
  **Note:** Version bump only for package @instructure/ui-react-utils
253
158
 
254
-
255
-
256
-
257
-
258
159
  ## [10.16.1](https://github.com/instructure/instructure-ui/compare/v10.16.0...v10.16.1) (2025-04-22)
259
160
 
260
161
  **Note:** Version bump only for package @instructure/ui-react-utils
261
162
 
262
-
263
-
264
-
265
-
266
163
  # [10.16.0](https://github.com/instructure/instructure-ui/compare/v10.15.2...v10.16.0) (2025-04-11)
267
164
 
268
165
  **Note:** Version bump only for package @instructure/ui-react-utils
269
166
 
270
-
271
-
272
-
273
-
274
167
  ## [10.15.2](https://github.com/instructure/instructure-ui/compare/v10.15.1...v10.15.2) (2025-04-07)
275
168
 
276
169
  **Note:** Version bump only for package @instructure/ui-react-utils
277
170
 
278
-
279
-
280
-
281
-
282
171
  ## [10.15.1](https://github.com/instructure/instructure-ui/compare/v10.15.0...v10.15.1) (2025-04-03)
283
172
 
284
173
  **Note:** Version bump only for package @instructure/ui-react-utils
285
174
 
286
-
287
-
288
-
289
-
290
175
  # [10.15.0](https://github.com/instructure/instructure-ui/compare/v10.14.0...v10.15.0) (2025-03-31)
291
176
 
292
-
293
177
  ### Bug Fixes
294
178
 
295
- * **many:** fix having the same DOM ids if there are multiple instances of InstUI, e.g. module federation ([a0bb4d0](https://github.com/instructure/instructure-ui/commit/a0bb4d0a8d0f8bcca8f565883f56b599eec66fc9))
296
-
297
-
298
-
299
-
179
+ - **many:** fix having the same DOM ids if there are multiple instances of InstUI, e.g. module federation ([a0bb4d0](https://github.com/instructure/instructure-ui/commit/a0bb4d0a8d0f8bcca8f565883f56b599eec66fc9))
300
180
 
301
181
  # [10.14.0](https://github.com/instructure/instructure-ui/compare/v10.13.0...v10.14.0) (2025-03-17)
302
182
 
303
183
  **Note:** Version bump only for package @instructure/ui-react-utils
304
184
 
305
-
306
-
307
-
308
-
309
185
  # [10.13.0](https://github.com/instructure/instructure-ui/compare/v10.12.0...v10.13.0) (2025-03-06)
310
186
 
311
187
  **Note:** Version bump only for package @instructure/ui-react-utils
312
188
 
313
-
314
-
315
-
316
-
317
189
  # [10.12.0](https://github.com/instructure/instructure-ui/compare/v10.11.0...v10.12.0) (2025-02-24)
318
190
 
319
191
  **Note:** Version bump only for package @instructure/ui-react-utils
320
192
 
321
-
322
-
323
-
324
-
325
193
  # [10.11.0](https://github.com/instructure/instructure-ui/compare/v10.10.0...v10.11.0) (2025-02-03)
326
194
 
327
195
  **Note:** Version bump only for package @instructure/ui-react-utils
328
196
 
329
-
330
-
331
-
332
-
333
197
  # [10.10.0](https://github.com/instructure/instructure-ui/compare/v10.9.0...v10.10.0) (2024-12-18)
334
198
 
335
199
  **Note:** Version bump only for package @instructure/ui-react-utils
336
200
 
337
-
338
-
339
-
340
-
341
201
  # [10.9.0](https://github.com/instructure/instructure-ui/compare/v10.8.0...v10.9.0) (2024-12-12)
342
202
 
343
203
  **Note:** Version bump only for package @instructure/ui-react-utils
344
204
 
345
-
346
-
347
-
348
-
349
205
  # [10.8.0](https://github.com/instructure/instructure-ui/compare/v10.7.0...v10.8.0) (2024-12-09)
350
206
 
351
-
352
207
  ### Bug Fixes
353
208
 
354
- * **ui-select,ui-text-input:** fix long before elements overflowing in TextInput, Select, SimpleSelect ([ee9cafd](https://github.com/instructure/instructure-ui/commit/ee9cafdd027b9a1caaa0791d1b6dc4f8401c87e7))
355
-
356
-
357
-
358
-
209
+ - **ui-select,ui-text-input:** fix long before elements overflowing in TextInput, Select, SimpleSelect ([ee9cafd](https://github.com/instructure/instructure-ui/commit/ee9cafdd027b9a1caaa0791d1b6dc4f8401c87e7))
359
210
 
360
211
  # [10.7.0](https://github.com/instructure/instructure-ui/compare/v10.6.1...v10.7.0) (2024-12-03)
361
212
 
362
213
  **Note:** Version bump only for package @instructure/ui-react-utils
363
214
 
364
-
365
-
366
-
367
-
368
215
  ## [10.6.1](https://github.com/instructure/instructure-ui/compare/v10.6.0...v10.6.1) (2024-11-26)
369
216
 
370
-
371
217
  ### Bug Fixes
372
218
 
373
- * **ui-date-input:** fix DateInput2 not working with NVDA ([34fb8e0](https://github.com/instructure/instructure-ui/commit/34fb8e0d0882d7b45580533ed4218b5b306f6075))
374
-
375
-
376
-
377
-
219
+ - **ui-date-input:** fix DateInput2 not working with NVDA ([34fb8e0](https://github.com/instructure/instructure-ui/commit/34fb8e0d0882d7b45580533ed4218b5b306f6075))
378
220
 
379
221
  # [10.6.0](https://github.com/instructure/instructure-ui/compare/v10.5.0...v10.6.0) (2024-11-18)
380
222
 
381
223
  **Note:** Version bump only for package @instructure/ui-react-utils
382
224
 
383
-
384
-
385
-
386
-
387
225
  # [10.5.0](https://github.com/instructure/instructure-ui/compare/v10.4.1...v10.5.0) (2024-11-07)
388
226
 
389
227
  **Note:** Version bump only for package @instructure/ui-react-utils
390
228
 
391
-
392
-
393
-
394
-
395
229
  ## [10.4.1](https://github.com/instructure/instructure-ui/compare/v10.4.0...v10.4.1) (2024-10-28)
396
230
 
397
-
398
231
  ### Bug Fixes
399
232
 
400
- * update license ([1c039d9](https://github.com/instructure/instructure-ui/commit/1c039d9cbf5a3ea99b59803ddde5c6c0b2d76ba5))
401
-
402
-
403
-
404
-
233
+ - update license ([1c039d9](https://github.com/instructure/instructure-ui/commit/1c039d9cbf5a3ea99b59803ddde5c6c0b2d76ba5))
405
234
 
406
235
  # [10.4.0](https://github.com/instructure/instructure-ui/compare/v10.3.0...v10.4.0) (2024-10-16)
407
236
 
408
237
  **Note:** Version bump only for package @instructure/ui-react-utils
409
238
 
410
-
411
-
412
-
413
-
414
239
  # [10.3.0](https://github.com/instructure/instructure-ui/compare/v10.2.2...v10.3.0) (2024-10-03)
415
240
 
416
241
  **Note:** Version bump only for package @instructure/ui-react-utils
417
242
 
418
-
419
-
420
-
421
-
422
243
  ## [10.2.2](https://github.com/instructure/instructure-ui/compare/v10.2.1...v10.2.2) (2024-09-13)
423
244
 
424
245
  **Note:** Version bump only for package @instructure/ui-react-utils
425
246
 
426
-
427
-
428
-
429
-
430
247
  ## [10.2.1](https://github.com/instructure/instructure-ui/compare/v10.2.0...v10.2.1) (2024-08-30)
431
248
 
432
249
  **Note:** Version bump only for package @instructure/ui-react-utils
433
250
 
434
-
435
-
436
-
437
-
438
251
  # [10.2.0](https://github.com/instructure/instructure-ui/compare/v10.0.0...v10.2.0) (2024-08-23)
439
252
 
440
253
  **Note:** Version bump only for package @instructure/ui-react-utils
441
254
 
442
-
443
-
444
-
445
-
446
255
  # [10.1.0](https://github.com/instructure/instructure-ui/compare/v10.0.0...v10.1.0) (2024-08-23)
447
256
 
448
257
  **Note:** Version bump only for package @instructure/ui-react-utils
449
258
 
450
-
451
-
452
-
453
-
454
259
  # [10.0.0](https://github.com/instructure/instructure-ui/compare/v9.5.1...v10.0.0) (2024-07-31)
455
260
 
456
261
  **Note:** Version bump only for package @instructure/ui-react-utils
457
262
 
458
-
459
-
460
-
461
-
462
263
  ## [9.5.1](https://github.com/instructure/instructure-ui/compare/v9.5.0...v9.5.1) (2024-07-30)
463
264
 
464
265
  **Note:** Version bump only for package @instructure/ui-react-utils
465
266
 
466
-
467
-
468
-
469
-
470
267
  # [9.5.0](https://github.com/instructure/instructure-ui/compare/v9.3.0...v9.5.0) (2024-07-26)
471
268
 
472
269
  **Note:** Version bump only for package @instructure/ui-react-utils
473
270
 
474
-
475
-
476
-
477
-
478
271
  # [9.4.0](https://github.com/instructure/instructure-ui/compare/v9.3.0...v9.4.0) (2024-07-26)
479
272
 
480
273
  **Note:** Version bump only for package @instructure/ui-react-utils
481
274
 
482
-
483
-
484
-
485
-
486
275
  # [9.3.0](https://github.com/instructure/instructure-ui/compare/v9.2.0...v9.3.0) (2024-07-17)
487
276
 
488
277
  **Note:** Version bump only for package @instructure/ui-react-utils
489
278
 
490
-
491
-
492
-
493
-
494
279
  # [9.2.0](https://github.com/instructure/instructure-ui/compare/v9.1.0...v9.2.0) (2024-07-09)
495
280
 
496
281
  **Note:** Version bump only for package @instructure/ui-react-utils
497
282
 
498
-
499
-
500
-
501
-
502
283
  # [9.1.0](https://github.com/instructure/instructure-ui/compare/v9.0.1...v9.1.0) (2024-06-14)
503
284
 
504
-
505
285
  ### Bug Fixes
506
286
 
507
- * **ui-react-utils:** remove defaultProps from DeterministicContextProvider ([5c89612](https://github.com/instructure/instructure-ui/commit/5c89612ceb4227f26462929068045bc06f3c080b))
508
-
509
-
510
-
511
-
287
+ - **ui-react-utils:** remove defaultProps from DeterministicContextProvider ([5c89612](https://github.com/instructure/instructure-ui/commit/5c89612ceb4227f26462929068045bc06f3c080b))
512
288
 
513
289
  ## [9.0.1](https://github.com/instructure/instructure-ui/compare/v9.0.0...v9.0.1) (2024-05-09)
514
290
 
515
291
  **Note:** Version bump only for package @instructure/ui-react-utils
516
292
 
517
-
518
-
519
-
520
-
521
293
  # [9.0.0](https://github.com/instructure/instructure-ui/compare/v8.56.0...v9.0.0) (2024-05-09)
522
294
 
523
-
524
295
  ### Features
525
296
 
526
- * **ui-dom-utils,ui-react-utils,ui-utils:** remove deprecated utils ([0a8c8e3](https://github.com/instructure/instructure-ui/commit/0a8c8e3230db7a7ec107bb726d1f98375c9446c4))
527
-
297
+ - **ui-dom-utils,ui-react-utils,ui-utils:** remove deprecated utils ([0a8c8e3](https://github.com/instructure/instructure-ui/commit/0a8c8e3230db7a7ec107bb726d1f98375c9446c4))
528
298
 
529
299
  ### BREAKING CHANGES
530
300
 
531
- * **ui-dom-utils,ui-react-utils,ui-utils:** deprecated utils has been removed
532
-
533
-
534
-
535
-
301
+ - **ui-dom-utils,ui-react-utils,ui-utils:** deprecated utils has been removed
536
302
 
537
303
  # [8.56.0](https://github.com/instructure/instructure-ui/compare/v8.55.1...v8.56.0) (2024-05-06)
538
304
 
539
305
  **Note:** Version bump only for package @instructure/ui-react-utils
540
306
 
541
-
542
-
543
-
544
-
545
307
  ## [8.55.1](https://github.com/instructure/instructure-ui/compare/v8.55.0...v8.55.1) (2024-04-30)
546
308
 
547
309
  **Note:** Version bump only for package @instructure/ui-react-utils
548
310
 
549
-
550
-
551
-
552
-
553
311
  # [8.55.0](https://github.com/instructure/instructure-ui/compare/v8.54.0...v8.55.0) (2024-04-09)
554
312
 
555
313
  **Note:** Version bump only for package @instructure/ui-react-utils
556
314
 
557
-
558
-
559
-
560
-
561
315
  # [8.54.0](https://github.com/instructure/instructure-ui/compare/v8.53.2...v8.54.0) (2024-03-21)
562
316
 
563
317
  **Note:** Version bump only for package @instructure/ui-react-utils
564
318
 
565
-
566
-
567
-
568
-
569
319
  ## [8.53.2](https://github.com/instructure/instructure-ui/compare/v8.53.1...v8.53.2) (2024-02-15)
570
320
 
571
321
  **Note:** Version bump only for package @instructure/ui-react-utils
572
322
 
573
-
574
-
575
-
576
-
577
323
  ## [8.53.1](https://github.com/instructure/instructure-ui/compare/v8.53.0...v8.53.1) (2024-02-09)
578
324
 
579
325
  **Note:** Version bump only for package @instructure/ui-react-utils
580
326
 
581
-
582
-
583
-
584
-
585
327
  # [8.53.0](https://github.com/instructure/instructure-ui/compare/v8.52.0...v8.53.0) (2024-02-08)
586
328
 
587
329
  **Note:** Version bump only for package @instructure/ui-react-utils
@@ -23,4 +23,5 @@
23
23
  */
24
24
  export { DeterministicIdContextProvider } from "./DeterministicIdContextProvider.js";
25
25
  export { DeterministicIdContext } from "./DeterministicIdContext.js";
26
- export { withDeterministicId } from "./withDeterministicId.js";
26
+ export { withDeterministicId } from "./withDeterministicId.js";
27
+ export { useDeterministicId } from "./useDeterministicId.js";
@@ -0,0 +1,60 @@
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2015 - present Instructure, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ import { useContext } from 'react';
26
+ import { generateId } from '@instructure/ui-utils';
27
+ import { DeterministicIdContext } from "./DeterministicIdContext.js";
28
+ /**
29
+ * A React hook that provides deterministic ID generation for functional components.
30
+ *
31
+ * This hook is the functional component equivalent of the `withDeterministicId` decorator.
32
+ * It uses the `DeterministicIdContext` which is needed for deterministic id generation.
33
+ *
34
+ * The context is there for the users to pass an `instanceCounterMap` Map which is then used
35
+ * in the child components to deterministically create ids for them based on the `instanceCounterMap`.
36
+ * Read more about it here: [SSR guide](https://instructure.design/#server-side-rendering)
37
+ *
38
+ * @param componentName - Optional component name to use as the ID prefix.
39
+ * @returns A function that generates deterministic IDs. The function accepts an optional instanceName parameter.
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * const MyComponent = () => {
44
+ * const [deterministicId, setDeterministicId] = useState()
45
+ * const getId = useDeterministicId('MyComponent')
46
+ * useEffect(() => {
47
+ * setDeterministicId(getId())
48
+ * }, [])
49
+ * return <div id={deterministicId}>Content</div>
50
+ * }
51
+ * ```
52
+ */
53
+ function useDeterministicId(componentName) {
54
+ const instanceCounterMap = useContext(DeterministicIdContext);
55
+ return (instanceName = componentName) => {
56
+ return generateId(instanceName, instanceCounterMap);
57
+ };
58
+ }
59
+ export default useDeterministicId;
60
+ export { useDeterministicId };