feat(core): rewrite page-mode-switch with RadioGroup, bind hotkey with cmdk (#7758)

close AF-1170

- bump `@toeverything/theme`
- refactor page-mode-switch
  - use global `<RadioGroup />`
  - reuse for doc history
  - remove `styled` usage
  - bind hotkey via cmdk
- Update `<RadioGroup />` color scheme with latest design system
- Update right sidebar header tab style
- Update tooltip with shortcut for app nav button
This commit is contained in:
CatsJuice
2024-08-12 03:56:56 +00:00
parent 4ac9bd7790
commit 75e02bb088
18 changed files with 210 additions and 302 deletions

View File

@@ -289,6 +289,12 @@ const CMDKKeyBinding = ({ keyBinding }: { keyBinding: string }) => {
if (fragment === '$mod') {
return isMacOS ? '⌘' : 'Ctrl';
}
if (fragment === 'Alt') {
return isMacOS ? '⌥' : 'Alt';
}
if (fragment.startsWith('Key')) {
return fragment.slice(3);
}
if (fragment === 'ArrowUp') {
return '↑';
}