@kaizen/components 0.0.0-canary-debug-tab-20251015223744 → 0.0.0-canary-01-rte-strictmode-20251022050526

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 (55) hide show
  1. package/dist/cjs/src/RichTextEditor/utils/core/hooks/useRichTextEditor.cjs +17 -20
  2. package/dist/cjs/src/SingleSelect/subcomponents/ListBox/ListBox.cjs +2 -6
  3. package/dist/cjs/src/Tabs/subcomponents/TabList/TabList.cjs +21 -29
  4. package/dist/esm/src/RichTextEditor/utils/core/hooks/useRichTextEditor.mjs +18 -21
  5. package/dist/esm/src/SingleSelect/subcomponents/ListBox/ListBox.mjs +2 -6
  6. package/dist/esm/src/Tabs/subcomponents/TabList/TabList.mjs +21 -29
  7. package/locales/ar.json +1 -9
  8. package/locales/bg.json +1 -9
  9. package/locales/cs.json +1 -9
  10. package/locales/cy.json +1 -9
  11. package/locales/da.json +1 -9
  12. package/locales/de.json +1 -9
  13. package/locales/el.json +1 -9
  14. package/locales/en-GB.json +1 -9
  15. package/locales/es-419.json +1 -9
  16. package/locales/es.json +1 -9
  17. package/locales/et.json +1 -9
  18. package/locales/fi.json +1 -9
  19. package/locales/fr-CA.json +1 -9
  20. package/locales/fr.json +1 -9
  21. package/locales/he.json +1 -9
  22. package/locales/hi.json +1 -9
  23. package/locales/ht.json +1 -9
  24. package/locales/hu.json +1 -9
  25. package/locales/id.json +1 -9
  26. package/locales/it.json +1 -9
  27. package/locales/ja.json +1 -9
  28. package/locales/km-KH.json +1 -9
  29. package/locales/ko.json +1 -9
  30. package/locales/lt.json +1 -9
  31. package/locales/lv.json +1 -9
  32. package/locales/mi.json +2 -10
  33. package/locales/ms.json +1 -9
  34. package/locales/nb.json +1 -9
  35. package/locales/nl.json +1 -9
  36. package/locales/pl.json +1 -9
  37. package/locales/pt-BR.json +1 -9
  38. package/locales/pt.json +1 -9
  39. package/locales/ro.json +1 -9
  40. package/locales/ru.json +1 -9
  41. package/locales/si-LK.json +1 -9
  42. package/locales/sk.json +1 -9
  43. package/locales/sr.json +1 -9
  44. package/locales/sv.json +1 -9
  45. package/locales/th.json +1 -9
  46. package/locales/tl.json +1 -9
  47. package/locales/tr.json +1 -9
  48. package/locales/uk.json +1 -9
  49. package/locales/vi.json +1 -9
  50. package/locales/zh-TW.json +1 -9
  51. package/locales/zh.json +1 -9
  52. package/package.json +1 -1
  53. package/src/RichTextEditor/utils/core/hooks/useRichTextEditor.ts +16 -20
  54. package/src/SingleSelect/subcomponents/ListBox/ListBox.tsx +2 -2
  55. package/src/Tabs/subcomponents/TabList/TabList.tsx +30 -40
package/locales/ja.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "情報を非表示にする:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "{field}の提案を表示"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "{field}の選択をクリア"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "追加のアクション"
198
190
  }
199
- }
191
+ }
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "លាក់ព័ត៌មាន៖"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "បង្ហាញការផ្ដល់យោបល់នានាសម្រាប់ {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "លុបការជ្រើសរើស {field}"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "សកម្មភាពបន្ថែម"
198
190
  }
199
- }
191
+ }
package/locales/ko.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "정보 숨기기:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "{field}에 대한 제안 표시"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "{field} 선택 취소"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "추가 작업"
198
190
  }
199
- }
191
+ }
package/locales/lt.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Paslėpti informaciją:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Rodyti pasiūlymus {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Išvalyti {field} pasirinkimą"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Papildomi veiksmai"
198
190
  }
199
- }
191
+ }
package/locales/lv.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Paslēpt informāciju:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Rādīt {field} ieteikumus"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Notīrīt {field} atlasi"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Papildu darbības"
198
190
  }
199
- }
191
+ }
package/locales/mi.json CHANGED
@@ -174,7 +174,7 @@
174
174
  },
175
175
  "kzErrorPage.goToHome" : {
176
176
  "description" : "Home button label",
177
- "message" : "Haere ki te whārangi Kāinga"
177
+ "message" : "Go to Home"
178
178
  },
179
179
  "kzGenericTile.infoButtonLabel" : {
180
180
  "description" : "Prompts user to interact with button to reveal more information",
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Huna mōhiohio:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Whakaatu whakaaro mo {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Ūkuia {field} tīpakonga"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Ngā mahi tāpiri"
198
190
  }
199
- }
191
+ }
package/locales/ms.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Sembunyikan maklumat:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Tunjukkan cadangan untuk {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Kosongkan pilihan {field}"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Tindakan tambahan"
198
190
  }
199
- }
191
+ }
package/locales/nb.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Skjul informasjon:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Vis forslag for {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Fjern {field}-valg"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Ytterligere handlinger"
198
190
  }
199
- }
191
+ }
package/locales/nl.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Informatie verbergen:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Suggesties voor {field} weergeven"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Selectie van {field} wissen"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Meer acties"
198
190
  }
199
- }
191
+ }
package/locales/pl.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Ukryj informacje:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Pokaż sugestie dla {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Wyczyść zaznaczenie {field}"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Dodatkowe działania"
198
190
  }
199
- }
191
+ }
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Ocultar informações:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Mostrar sugestões para {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Limpar seleção de {field}"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Mais ações"
198
190
  }
199
- }
191
+ }
package/locales/pt.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Ocultar informações:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Mostrar sugestões para {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Limpar seleção de {field}"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Mais ações"
198
190
  }
199
- }
191
+ }
package/locales/ro.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Ascundeți informațiile:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Afișați sugestii pentru {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Ștergeți selecția {field}"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Acțiuni suplimentare"
198
190
  }
199
- }
191
+ }
package/locales/ru.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Скрыть информацию:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Показать предложения для {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Очистить выбор {field}"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Дополнительные действия"
198
190
  }
199
- }
191
+ }
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "තොරතුරු සඟවන්න:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "{field} සඳහා යෝජනා පෙන්වන්න"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "{field} තෝරාගැනීම මකා දමන්න"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "අතිරේක ක්‍රියාමාර්ග"
198
190
  }
199
- }
191
+ }
package/locales/sk.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Skryť informácie:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Zobraziť návrhy pre {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Zrušiť výber: {field}"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Ďalšie činnosti"
198
190
  }
199
- }
191
+ }
package/locales/sr.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Sakrij informacije:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Prikaži predloge za {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Obriši {field} izbor"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Dodatne radnje"
198
190
  }
199
- }
191
+ }
package/locales/sv.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Dölj information:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Visa förslag för {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Rensa {field} val"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Ytterligare åtgärder"
198
190
  }
199
- }
191
+ }
package/locales/th.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "ซ่อนข้อมูล:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "แสดงคำแนะนำสำหรับ {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "ล้างการเลือก {field}"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "การดำเนินการเพิ่มเติม"
198
190
  }
199
- }
191
+ }
package/locales/tl.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Itago ang impormasyon:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Ipakita ang mga mungkahi para sa {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "I-clear ang {field} selection"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Karagdagang mga aksiyon"
198
190
  }
199
- }
191
+ }
package/locales/tr.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Bilgileri gizleyin:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "{field} için önerileri göster"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "{field} seçimini temizle"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Ek eylemler"
198
190
  }
199
- }
191
+ }
package/locales/uk.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Приховати інформацію:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Показати пропозиції для {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Очистити виділення {field}"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Додаткові дії"
198
190
  }
199
- }
191
+ }
package/locales/vi.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "Ẩn thông tin:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "Hiển thị gợi ý cho {field}"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "Xóa lựa chọn {field}"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "Các hành động bổ sung"
198
190
  }
199
- }
191
+ }
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "隱藏資訊:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "顯示對 {field} 的建議"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "清除 {field} 選擇"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "其他行動"
198
190
  }
199
- }
191
+ }
package/locales/zh.json CHANGED
@@ -184,16 +184,8 @@
184
184
  "description" : "Prompts user to interact with button to hide information",
185
185
  "message" : "隐藏信息:"
186
186
  },
187
- "singleSelect.chevronButton" : {
188
- "description" : "Aria label text for the SingleSelect button to open and close suggestions list",
189
- "message" : "显示{field}的建议"
190
- },
191
- "singleSelect.clearButtonAlt" : {
192
- "description" : "Alt text for the clear selection button",
193
- "message" : "清除{field}选择"
194
- },
195
187
  "splitButton.dropdownButton.label" : {
196
188
  "description" : "Label for a dropdown menu holding additional actions",
197
189
  "message" : "附加操作"
198
190
  }
199
- }
191
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/components",
3
- "version": "0.0.0-canary-debug-tab-20251015223744",
3
+ "version": "0.0.0-canary-01-rte-strictmode-20251022050526",
4
4
  "description": "Kaizen component library",
5
5
  "author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
6
6
  "homepage": "https://cultureamp.design",
@@ -71,17 +71,23 @@ export const useRichTextEditor = (
71
71
 
72
72
  const editorRef = useCallback(
73
73
  (node: HTMLElement) => {
74
- if (node !== null) {
75
- const instance = createRichTextEditor({
76
- node,
77
- initialEditorState: editorState,
78
- onChange: setEditorState,
79
- isEditable: () => editableStatusRef.current,
80
- attributes,
81
- })
82
- destroyEditorRef.current = instance.destroy
83
- dispatchTransactionRef.current = instance.dispatchTransaction
74
+ if (node === null) {
75
+ if (destroyEditorRef.current) {
76
+ destroyEditorRef.current()
77
+ destroyEditorRef.current = undefined
78
+ }
79
+ return
84
80
  }
81
+
82
+ const instance = createRichTextEditor({
83
+ node,
84
+ initialEditorState: editorState,
85
+ onChange: setEditorState,
86
+ isEditable: () => editableStatusRef.current,
87
+ attributes,
88
+ })
89
+ destroyEditorRef.current = instance.destroy
90
+ dispatchTransactionRef.current = instance.dispatchTransaction
85
91
  },
86
92
 
87
93
  // Including editorState in the dependencies here will cause an endless
@@ -91,15 +97,5 @@ export const useRichTextEditor = (
91
97
  [setEditorState, editableStatusRef],
92
98
  )
93
99
 
94
- // Tear down ProseMirror when the consuming component is unmounted
95
- useEffect(
96
- () => () => {
97
- if (destroyEditorRef.current) {
98
- destroyEditorRef.current()
99
- }
100
- },
101
- [destroyEditorRef],
102
- )
103
-
104
100
  return [editorRef, editorState, dispatchTransaction, setEditableStatus]
105
101
  }
@@ -70,10 +70,10 @@ export const ListBox = <Option extends SingleSelectOption>({
70
70
  const focusToElement = safeQuerySelector(`[data-key='${optionKey}']`)
71
71
 
72
72
  if (focusToElement) {
73
- focusToElement.focus({ preventScroll: true })
73
+ focusToElement.focus()
74
74
  } else {
75
75
  // If an element is not found, focus on the listbox. This ensures the list can still be navigated to via keyboard if the keys do not align to the data attributes of the list items.
76
- ref.current?.focus({ preventScroll: true })
76
+ ref.current?.focus()
77
77
  }
78
78
  }
79
79
  // Only run this effect for checking the first successful render
@@ -66,49 +66,39 @@ export const TabList = (props: TabListProps): JSX.Element => {
66
66
  return
67
67
  }
68
68
 
69
- let firstTabObserver: IntersectionObserver | null = null
70
- let lastTabObserver: IntersectionObserver | null = null
69
+ const firstTabObserver = new IntersectionObserver(
70
+ (entries) => {
71
+ if (!entries[0].isIntersecting) {
72
+ setLeftArrowEnabled(true)
73
+ return
74
+ }
75
+ setLeftArrowEnabled(false)
76
+ },
77
+ {
78
+ threshold: 0.8,
79
+ root: containerElement,
80
+ },
81
+ )
82
+ firstTabObserver.observe(isRTL ? tabs[tabs.length - 1] : tabs[0])
71
83
 
72
- requestAnimationFrame(() => {
73
- const tabList = tabListRef.current
74
- if (!tabList) {
75
- return
76
- }
77
-
78
- firstTabObserver = new IntersectionObserver(
79
- (entries) => {
80
- if (!entries[0].isIntersecting) {
81
- setLeftArrowEnabled(true)
82
- return
83
- }
84
- setLeftArrowEnabled(false)
85
- },
86
- {
87
- threshold: 0.8,
88
- root: containerElement,
89
- },
90
- )
91
- firstTabObserver.observe(isRTL ? tabs[tabs.length - 1] : tabs[0])
92
-
93
- lastTabObserver = new IntersectionObserver(
94
- (entries) => {
95
- if (!entries[0].isIntersecting) {
96
- setRightArrowEnabled(true)
97
- return
98
- }
99
- setRightArrowEnabled(false)
100
- },
101
- {
102
- threshold: 0.8,
103
- root: containerElement,
104
- },
105
- )
106
- lastTabObserver.observe(isRTL ? tabs[0] : tabs[tabs.length - 1])
107
- })
84
+ const lastTabObserver = new IntersectionObserver(
85
+ (entries) => {
86
+ if (!entries[0].isIntersecting) {
87
+ setRightArrowEnabled(true)
88
+ return
89
+ }
90
+ setRightArrowEnabled(false)
91
+ },
92
+ {
93
+ threshold: 0.8,
94
+ root: containerElement,
95
+ },
96
+ )
97
+ lastTabObserver.observe(isRTL ? tabs[0] : tabs[tabs.length - 1])
108
98
 
109
99
  return () => {
110
- firstTabObserver?.disconnect()
111
- lastTabObserver?.disconnect()
100
+ firstTabObserver.disconnect()
101
+ lastTabObserver.disconnect()
112
102
  }
113
103
  }, [isDocumentReady, containerElement, isRTL, tabListContext?.collection.size])
114
104