scrabble-solver 2.10.2 → 2.10.4

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 (235) hide show
  1. package/README.md +29 -18
  2. package/lerna.json +1 -1
  3. package/package.json +2 -2
  4. package/packages/configs/package-lock.json +4 -4
  5. package/packages/configs/package.json +3 -3
  6. package/packages/constants/package-lock.json +2 -2
  7. package/packages/constants/package.json +1 -1
  8. package/packages/dictionaries/package-lock.json +2 -2
  9. package/packages/dictionaries/package.json +4 -4
  10. package/packages/logger/package-lock.json +2 -2
  11. package/packages/logger/package.json +1 -1
  12. package/packages/scrabble-solver/.next/BUILD_ID +1 -1
  13. package/packages/scrabble-solver/.next/build-manifest.json +31 -19
  14. package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
  15. package/packages/scrabble-solver/.next/cache/eslint/.cache_8dgz12 +1 -1
  16. package/packages/scrabble-solver/.next/cache/next-server.js.nft.json +1 -1
  17. package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
  18. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
  19. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/0.pack +0 -0
  20. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
  21. package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
  22. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
  23. package/packages/scrabble-solver/.next/next-server.js.nft.json +1 -1
  24. package/packages/scrabble-solver/.next/prerender-manifest.json +1 -1
  25. package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
  26. package/packages/scrabble-solver/.next/server/chunks/176.js +1269 -1559
  27. package/packages/scrabble-solver/.next/server/chunks/579.js +50 -26
  28. package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
  29. package/packages/scrabble-solver/.next/server/middleware-react-loadable-manifest.js +1 -1
  30. package/packages/scrabble-solver/.next/server/pages/404.html +2 -2
  31. package/packages/scrabble-solver/.next/server/pages/404.js.nft.json +1 -1
  32. package/packages/scrabble-solver/.next/server/pages/500.html +2 -2
  33. package/packages/scrabble-solver/.next/server/pages/_app.js.nft.json +1 -1
  34. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js +2 -1
  35. package/packages/scrabble-solver/.next/server/pages/api/solve.js +22 -6
  36. package/packages/scrabble-solver/.next/server/pages/index.html +2 -2
  37. package/packages/scrabble-solver/.next/server/pages/index.js +1539 -52
  38. package/packages/scrabble-solver/.next/server/pages/index.js.nft.json +1 -1
  39. package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
  40. package/packages/scrabble-solver/.next/server/pages-manifest.json +1 -1
  41. package/packages/scrabble-solver/.next/static/P7XhuDLmwJJqC8kgPjX42/_buildManifest.js +1 -0
  42. package/packages/scrabble-solver/.next/static/{FjrbXpI5fkt4lmko-vL_7 → P7XhuDLmwJJqC8kgPjX42}/_ssgManifest.js +0 -0
  43. package/packages/scrabble-solver/.next/static/chunks/490-d29992f1c264d70e.js +5 -0
  44. package/packages/scrabble-solver/.next/static/chunks/528-9942ddad0031ff79.js +1 -0
  45. package/packages/scrabble-solver/.next/static/chunks/pages/{404-24f9617eeb8d6dc1.js → 404-6c99a0c91257c60b.js} +1 -1
  46. package/packages/scrabble-solver/.next/static/chunks/pages/_app-fa0661b072fc6af9.js +24 -0
  47. package/packages/scrabble-solver/.next/static/chunks/pages/index-d761f0af070273d2.js +1 -0
  48. package/packages/scrabble-solver/.next/static/css/78e42ad01f580f64.css +1 -0
  49. package/packages/scrabble-solver/.next/static/css/97eb6ee0c4300c83.css +1 -0
  50. package/packages/scrabble-solver/.next/static/css/dcca0c1a39cf5ef5.css +1 -0
  51. package/packages/scrabble-solver/.next/trace +55 -52
  52. package/packages/scrabble-solver/package-lock.json +27 -2
  53. package/packages/scrabble-solver/package.json +10 -8
  54. package/packages/scrabble-solver/src/components/Badge/Badge.module.scss +4 -5
  55. package/packages/scrabble-solver/src/components/Board/BoardPure.tsx +5 -5
  56. package/packages/scrabble-solver/src/components/Board/components/Cell/Cell.module.scss +15 -2
  57. package/packages/scrabble-solver/src/components/Button/Button.module.scss +10 -38
  58. package/packages/scrabble-solver/src/components/Button/Button.tsx +6 -5
  59. package/packages/scrabble-solver/src/components/Dictionary/Dictionary.module.scss +1 -2
  60. package/packages/scrabble-solver/src/components/Dictionary/Dictionary.tsx +2 -6
  61. package/packages/scrabble-solver/src/components/DictionaryInput/DictionaryInput.module.scss +1 -3
  62. package/packages/scrabble-solver/src/components/EmptyState/EmptyState.module.scss +6 -7
  63. package/packages/scrabble-solver/src/components/EmptyState/EmptyState.tsx +6 -6
  64. package/packages/scrabble-solver/src/components/Key/Key.module.scss +0 -1
  65. package/packages/scrabble-solver/src/components/{Splash/Splash.module.scss → LogoSplashScreen/LogoSplashScreen.module.scss} +1 -1
  66. package/packages/scrabble-solver/src/components/{Splash/Splash.tsx → LogoSplashScreen/LogoSplashScreen.tsx} +7 -7
  67. package/packages/scrabble-solver/src/components/LogoSplashScreen/index.ts +1 -0
  68. package/packages/scrabble-solver/src/components/{Sidebar/Sidebar.module.scss → Modal/Modal.module.scss} +25 -20
  69. package/packages/scrabble-solver/src/components/{Sidebar/Sidebar.tsx → Modal/Modal.tsx} +9 -9
  70. package/packages/scrabble-solver/src/components/{Sidebar → Modal}/components/Section/Section.module.scss +0 -0
  71. package/packages/scrabble-solver/src/components/{Sidebar → Modal}/components/Section/Section.tsx +0 -0
  72. package/packages/scrabble-solver/src/components/{Sidebar → Modal}/components/Section/index.ts +0 -0
  73. package/packages/scrabble-solver/src/components/{Sidebar → Modal}/components/index.ts +0 -0
  74. package/packages/scrabble-solver/src/components/Modal/index.ts +1 -0
  75. package/packages/scrabble-solver/src/components/NavButtons/NavButtons.tsx +22 -3
  76. package/packages/scrabble-solver/src/components/Progress/Progress.module.scss +9 -0
  77. package/packages/scrabble-solver/src/components/Progress/Progress.tsx +38 -0
  78. package/packages/scrabble-solver/src/components/Progress/index.ts +1 -0
  79. package/packages/scrabble-solver/src/components/Rack/Rack.module.scss +2 -0
  80. package/packages/scrabble-solver/src/components/Rack/Rack.tsx +3 -1
  81. package/packages/scrabble-solver/src/components/Rack/RackTile.tsx +3 -2
  82. package/packages/scrabble-solver/src/components/ResultCandidatePicker/ResultCandidatePicker.module.scss +76 -0
  83. package/packages/scrabble-solver/src/components/ResultCandidatePicker/ResultCandidatePicker.tsx +38 -0
  84. package/packages/scrabble-solver/src/components/ResultCandidatePicker/index.ts +1 -0
  85. package/packages/scrabble-solver/src/components/Results/Result.tsx +64 -43
  86. package/packages/scrabble-solver/src/components/Results/Results.module.scss +9 -16
  87. package/packages/scrabble-solver/src/components/Results/Results.tsx +45 -28
  88. package/packages/scrabble-solver/src/components/Results/SolveButton.tsx +9 -7
  89. package/packages/scrabble-solver/src/components/Results/{getColumns.ts → getLocaleColumns.ts} +2 -2
  90. package/packages/scrabble-solver/src/components/Results/types.ts +16 -0
  91. package/packages/scrabble-solver/src/components/Results/useColumns.ts +44 -0
  92. package/packages/scrabble-solver/src/components/ResultsInput/ResultsInput.module.scss +1 -3
  93. package/packages/scrabble-solver/src/components/Sizer/Sizer.module.scss +10 -0
  94. package/packages/scrabble-solver/src/components/Sizer/Sizer.tsx +10 -0
  95. package/packages/scrabble-solver/src/components/Sizer/index.ts +1 -0
  96. package/packages/scrabble-solver/src/components/Solver/Solver.module.scss +83 -27
  97. package/packages/scrabble-solver/src/components/Solver/Solver.tsx +157 -24
  98. package/packages/scrabble-solver/src/components/Solver/components/ApplyButton/ApplyButton.module.scss +5 -0
  99. package/packages/scrabble-solver/src/components/Solver/components/ApplyButton/ApplyButton.tsx +37 -0
  100. package/packages/scrabble-solver/src/components/Solver/components/ApplyButton/index.ts +1 -0
  101. package/packages/scrabble-solver/src/components/Solver/components/EmptyState/EmptyState.module.scss +59 -0
  102. package/packages/scrabble-solver/src/components/Solver/components/EmptyState/EmptyState.tsx +41 -0
  103. package/packages/scrabble-solver/src/components/Solver/components/EmptyState/index.ts +1 -0
  104. package/packages/scrabble-solver/src/components/Solver/components/SolveButton/SolveButton.module.scss +4 -0
  105. package/packages/scrabble-solver/src/components/Solver/components/SolveButton/SolveButton.tsx +42 -0
  106. package/packages/scrabble-solver/src/components/Solver/components/SolveButton/index.ts +1 -0
  107. package/packages/scrabble-solver/src/components/Solver/components/index.ts +3 -0
  108. package/packages/scrabble-solver/src/components/{Screen/Screen.module.scss → SplashScreen/SplashScreen.module.scss} +2 -12
  109. package/packages/scrabble-solver/src/components/{Screen/Screen.tsx → SplashScreen/SplashScreen.tsx} +4 -4
  110. package/packages/scrabble-solver/src/components/SplashScreen/index.ts +1 -0
  111. package/packages/scrabble-solver/src/components/SquareButton/SquareButton.module.scss +3 -3
  112. package/packages/scrabble-solver/src/components/Tile/Tile.module.scss +7 -15
  113. package/packages/scrabble-solver/src/components/Tooltip/Tooltip.module.scss +0 -1
  114. package/packages/scrabble-solver/src/components/index.ts +6 -7
  115. package/packages/scrabble-solver/src/hooks/index.ts +1 -1
  116. package/packages/scrabble-solver/src/hooks/useMediaQuery.ts +11 -0
  117. package/packages/scrabble-solver/src/hooks/usePortal.tsx +1 -1
  118. package/packages/scrabble-solver/src/i18n/de.json +2 -0
  119. package/packages/scrabble-solver/src/i18n/en.json +2 -0
  120. package/packages/scrabble-solver/src/i18n/es.json +2 -0
  121. package/packages/scrabble-solver/src/i18n/fa.json +2 -0
  122. package/packages/scrabble-solver/src/i18n/fr.json +2 -0
  123. package/packages/scrabble-solver/src/i18n/pl.json +2 -0
  124. package/packages/scrabble-solver/src/icons/CardChecklist.svg +5 -0
  125. package/packages/scrabble-solver/src/icons/Check.svg +2 -2
  126. package/packages/scrabble-solver/src/icons/ChevronDown.svg +4 -0
  127. package/packages/scrabble-solver/src/icons/CrossCircleFill.svg +4 -0
  128. package/packages/scrabble-solver/src/icons/{CrossFill.svg → CrossSquareFill.svg} +0 -0
  129. package/packages/scrabble-solver/src/icons/ExclamationTriangleFill.svg +4 -0
  130. package/packages/scrabble-solver/src/icons/InfoCircleFill.svg +4 -0
  131. package/packages/scrabble-solver/src/icons/List.svg +4 -0
  132. package/packages/scrabble-solver/src/icons/Search.svg +4 -0
  133. package/packages/scrabble-solver/src/icons/index.ts +8 -2
  134. package/packages/scrabble-solver/src/{components/KeyMap/KeyMap.tsx → modals/KeyMapModal/KeyMapModal.tsx} +11 -13
  135. package/packages/scrabble-solver/src/{components/KeyMap → modals/KeyMapModal}/components/Mapping/Mapping.module.scss +0 -0
  136. package/packages/scrabble-solver/src/{components/KeyMap → modals/KeyMapModal}/components/Mapping/Mapping.tsx +0 -0
  137. package/packages/scrabble-solver/src/{components/KeyMap → modals/KeyMapModal}/components/Mapping/index.ts +0 -0
  138. package/packages/scrabble-solver/src/{components/KeyMap → modals/KeyMapModal}/components/index.ts +0 -0
  139. package/packages/scrabble-solver/src/modals/KeyMapModal/index.ts +1 -0
  140. package/packages/scrabble-solver/src/{components/KeyMap → modals/KeyMapModal}/keys.tsx +1 -2
  141. package/packages/scrabble-solver/src/modals/MenuModal/MenuModal.module.scss +46 -0
  142. package/packages/scrabble-solver/src/modals/MenuModal/MenuModal.tsx +54 -0
  143. package/packages/scrabble-solver/src/modals/MenuModal/index.ts +1 -0
  144. package/packages/scrabble-solver/src/modals/RemainingTilesModal/RemainingTilesModal.module.scss +28 -0
  145. package/packages/scrabble-solver/src/{components/RemainingTiles/RemainingTiles.tsx → modals/RemainingTilesModal/RemainingTilesModal.tsx} +14 -12
  146. package/packages/scrabble-solver/src/{components/RemainingTiles → modals/RemainingTilesModal/components/Character}/Character.module.scss +6 -2
  147. package/packages/scrabble-solver/src/{components/RemainingTiles → modals/RemainingTilesModal/components/Character}/Character.tsx +11 -3
  148. package/packages/scrabble-solver/src/modals/RemainingTilesModal/components/Character/index.ts +1 -0
  149. package/packages/scrabble-solver/src/modals/RemainingTilesModal/components/index.ts +1 -0
  150. package/packages/scrabble-solver/src/modals/RemainingTilesModal/index.ts +1 -0
  151. package/packages/scrabble-solver/src/modals/ResultsModal/ResultsModal.module.scss +7 -0
  152. package/packages/scrabble-solver/src/modals/ResultsModal/ResultsModal.tsx +58 -0
  153. package/packages/scrabble-solver/src/modals/ResultsModal/index.ts +1 -0
  154. package/packages/scrabble-solver/src/modals/SettingsModal/SettingsModal.tsx +34 -0
  155. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/AutoGroupTilesSetting/AutoGroupTilesSetting.module.scss +0 -0
  156. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/AutoGroupTilesSetting/AutoGroupTilesSetting.tsx +1 -2
  157. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/AutoGroupTilesSetting/constants.ts +0 -0
  158. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/AutoGroupTilesSetting/index.ts +0 -0
  159. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/AutoGroupTilesSetting/lib.ts +0 -0
  160. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/ConfigSetting/ConfigSetting.module.scss +0 -0
  161. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/ConfigSetting/ConfigSetting.tsx +1 -2
  162. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/ConfigSetting/index.ts +0 -0
  163. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/ConfigSetting/options.ts +0 -0
  164. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/ConfigSetting/types.ts +0 -0
  165. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/LocaleSetting/LocaleSetting.module.scss +0 -0
  166. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/LocaleSetting/LocaleSetting.tsx +1 -2
  167. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/LocaleSetting/index.ts +0 -0
  168. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/LocaleSetting/options.ts +0 -0
  169. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/LocaleSetting/types.ts +0 -0
  170. package/packages/scrabble-solver/src/{components/Settings → modals/SettingsModal}/components/index.ts +0 -0
  171. package/packages/scrabble-solver/src/modals/SettingsModal/index.ts +1 -0
  172. package/packages/scrabble-solver/src/{components/Words/Words.module.scss → modals/WordsModal/WordsModal.module.scss} +7 -1
  173. package/packages/scrabble-solver/src/{components/Words/Words.tsx → modals/WordsModal/WordsModal.tsx} +10 -12
  174. package/packages/scrabble-solver/src/modals/WordsModal/index.ts +1 -0
  175. package/packages/scrabble-solver/src/modals/index.ts +6 -0
  176. package/packages/scrabble-solver/src/pages/api/dictionary/[locale]/[word].ts +2 -1
  177. package/packages/scrabble-solver/src/pages/index.module.scss +6 -4
  178. package/packages/scrabble-solver/src/pages/index.tsx +63 -26
  179. package/packages/scrabble-solver/src/parameters/index.ts +28 -6
  180. package/packages/scrabble-solver/src/state/createAppStore.ts +7 -4
  181. package/packages/scrabble-solver/src/styles/mixins.scss +15 -13
  182. package/packages/scrabble-solver/src/styles/variables.scss +15 -17
  183. package/packages/scrabble-solver/src/types/index.ts +2 -0
  184. package/packages/scrabble-solver/tsconfig.json +1 -0
  185. package/packages/solver/package-lock.json +2 -2
  186. package/packages/solver/package.json +5 -5
  187. package/packages/types/package-lock.json +3 -3
  188. package/packages/types/package.json +2 -2
  189. package/packages/word-definitions/package-lock.json +8 -8
  190. package/packages/word-definitions/package.json +2 -2
  191. package/packages/word-lists/package-lock.json +2 -2
  192. package/packages/word-lists/package.json +2 -2
  193. package/packages/scrabble-solver/.next/cache/webpack/client-development/0.pack +0 -0
  194. package/packages/scrabble-solver/.next/cache/webpack/client-development/1.pack +0 -0
  195. package/packages/scrabble-solver/.next/cache/webpack/client-development/2.pack +0 -0
  196. package/packages/scrabble-solver/.next/cache/webpack/client-development/3.pack +0 -0
  197. package/packages/scrabble-solver/.next/cache/webpack/client-development/4.pack +0 -0
  198. package/packages/scrabble-solver/.next/cache/webpack/client-development/index.pack +0 -0
  199. package/packages/scrabble-solver/.next/cache/webpack/client-development/index.pack.old +0 -0
  200. package/packages/scrabble-solver/.next/cache/webpack/server-development/0.pack +0 -0
  201. package/packages/scrabble-solver/.next/cache/webpack/server-development/10.pack_ +0 -0
  202. package/packages/scrabble-solver/.next/cache/webpack/server-development/5.pack_ +0 -0
  203. package/packages/scrabble-solver/.next/cache/webpack/server-development/8.pack_ +0 -0
  204. package/packages/scrabble-solver/.next/cache/webpack/server-development/index.pack +0 -0
  205. package/packages/scrabble-solver/.next/static/FjrbXpI5fkt4lmko-vL_7/_buildManifest.js +0 -1
  206. package/packages/scrabble-solver/.next/static/chunks/361-d16f336a9752a55a.js +0 -1
  207. package/packages/scrabble-solver/.next/static/chunks/724-eb48df4d1ba3df8b.js +0 -5
  208. package/packages/scrabble-solver/.next/static/chunks/amp.js +0 -720
  209. package/packages/scrabble-solver/.next/static/chunks/main.js +0 -1076
  210. package/packages/scrabble-solver/.next/static/chunks/pages/_app-959e495f0f221247.js +0 -24
  211. package/packages/scrabble-solver/.next/static/chunks/pages/_app.js +0 -2121
  212. package/packages/scrabble-solver/.next/static/chunks/pages/_error.js +0 -28
  213. package/packages/scrabble-solver/.next/static/chunks/pages/index-1e30dafa41bddb80.js +0 -1
  214. package/packages/scrabble-solver/.next/static/chunks/pages/index.js +0 -5314
  215. package/packages/scrabble-solver/.next/static/chunks/react-refresh.js +0 -62
  216. package/packages/scrabble-solver/.next/static/chunks/webpack.js +0 -1237
  217. package/packages/scrabble-solver/.next/static/css/aafd07997120f1e4.css +0 -1
  218. package/packages/scrabble-solver/.next/static/css/c8d26240c04079b9.css +0 -1
  219. package/packages/scrabble-solver/.next/static/css/eb9d57f7103525ab.css +0 -1
  220. package/packages/scrabble-solver/.next/static/development/_buildManifest.js +0 -1
  221. package/packages/scrabble-solver/.next/static/development/_ssgManifest.js +0 -1
  222. package/packages/scrabble-solver/.next/static/webpack/fb4b50d5e70ee127.webpack.hot-update.json +0 -1
  223. package/packages/scrabble-solver/.next/static/webpack/pages/index.fb4b50d5e70ee127.hot-update.js +0 -171
  224. package/packages/scrabble-solver/.next/static/webpack/webpack.fb4b50d5e70ee127.hot-update.js +0 -18
  225. package/packages/scrabble-solver/src/components/KeyMap/index.ts +0 -1
  226. package/packages/scrabble-solver/src/components/RemainingTiles/RemainingTiles.module.scss +0 -16
  227. package/packages/scrabble-solver/src/components/RemainingTiles/index.ts +0 -1
  228. package/packages/scrabble-solver/src/components/Screen/index.ts +0 -1
  229. package/packages/scrabble-solver/src/components/Settings/Settings.tsx +0 -35
  230. package/packages/scrabble-solver/src/components/Settings/index.ts +0 -1
  231. package/packages/scrabble-solver/src/components/Sidebar/index.ts +0 -1
  232. package/packages/scrabble-solver/src/components/Splash/index.ts +0 -1
  233. package/packages/scrabble-solver/src/components/Words/index.ts +0 -1
  234. package/packages/scrabble-solver/src/hooks/useIsTablet.ts +0 -10
  235. package/packages/scrabble-solver/src/icons/Play.svg +0 -4
@@ -1,8 +1,8 @@
1
1
  import classNames from 'classnames';
2
2
  import { FunctionComponent } from 'react';
3
3
 
4
- import { useIsTouchDevice } from 'hooks';
5
- import { BookHalf, Cog, Eraser, Github, Keyboard, Sack } from 'icons';
4
+ import { useIsTouchDevice, useMediaQuery } from 'hooks';
5
+ import { CardChecklist, Cog, Eraser, Github, Keyboard, List, Sack } from 'icons';
6
6
  import { GITHUB_PROJECT_URL } from 'parameters';
7
7
  import { selectHasInvalidWords, selectHasOverusedTiles, useTranslate, useTypedSelector } from 'state';
8
8
 
@@ -13,6 +13,7 @@ import styles from './NavButtons.module.scss';
13
13
  interface Props {
14
14
  onClear: () => void;
15
15
  onShowKeyMap: () => void;
16
+ onShowMenu: () => void;
16
17
  onShowRemainingTiles: () => void;
17
18
  onShowSettings: () => void;
18
19
  onShowWords: () => void;
@@ -21,6 +22,7 @@ interface Props {
21
22
  const NavButtons: FunctionComponent<Props> = ({
22
23
  onClear,
23
24
  onShowKeyMap,
25
+ onShowMenu,
24
26
  onShowRemainingTiles,
25
27
  onShowSettings,
26
28
  onShowWords,
@@ -29,6 +31,23 @@ const NavButtons: FunctionComponent<Props> = ({
29
31
  const hasOverusedTiles = useTypedSelector(selectHasOverusedTiles);
30
32
  const hasInvalidWords = useTypedSelector(selectHasInvalidWords);
31
33
  const isTouchDevice = useIsTouchDevice();
34
+ const isLessThanS = useMediaQuery('<s');
35
+
36
+ if (isLessThanS) {
37
+ return (
38
+ <div className={styles.navButtons}>
39
+ <div className={styles.group}>
40
+ <SquareButton className={styles.button} Icon={Eraser} tooltip={translate('common.clear')} onClick={onClear} />
41
+ </div>
42
+
43
+ <div className={styles.separator} />
44
+
45
+ <div className={styles.group}>
46
+ <SquareButton className={styles.button} Icon={List} tooltip={translate('menu')} onClick={onShowMenu} />
47
+ </div>
48
+ </div>
49
+ );
50
+ }
32
51
 
33
52
  return (
34
53
  <div className={styles.navButtons}>
@@ -52,7 +71,7 @@ const NavButtons: FunctionComponent<Props> = ({
52
71
  className={classNames(styles.button, {
53
72
  [styles.error]: hasInvalidWords,
54
73
  })}
55
- Icon={BookHalf}
74
+ Icon={CardChecklist}
56
75
  tooltip={translate('words')}
57
76
  onClick={onShowWords}
58
77
  />
@@ -0,0 +1,9 @@
1
+ .progress {
2
+ width: 100%;
3
+ min-height: 1px;
4
+ border-radius: var(--border--radius);
5
+
6
+ [dir='rtl'] & {
7
+ transform: scaleX(-1);
8
+ }
9
+ }
@@ -0,0 +1,38 @@
1
+ import classNames from 'classnames';
2
+ import { FunctionComponent, HTMLProps } from 'react';
3
+
4
+ import { PROGRESS_COLOR_BACKGROUND, PROGRESS_COLOR_VALUE } from 'parameters';
5
+ import { selectLocale, useTypedSelector } from 'state';
6
+
7
+ import styles from './Progress.module.scss';
8
+
9
+ interface Props extends HTMLProps<HTMLDivElement> {
10
+ max: number;
11
+ min?: number;
12
+ value: number;
13
+ }
14
+
15
+ const getGradient = (progress: number, color: string, background: string) => {
16
+ const percent = 100 * progress;
17
+ return `linear-gradient(90deg, ${color} 0%, ${color} ${percent}%, ${background} ${percent}%, ${background} 100%)`;
18
+ };
19
+
20
+ const Progress: FunctionComponent<Props> = ({ className, max, min = 0, style, value, ...props }) => {
21
+ const locale = useTypedSelector(selectLocale);
22
+ const progress = value / (max - min);
23
+ const percent = Math.round(100 * progress);
24
+
25
+ return (
26
+ <div
27
+ {...props}
28
+ className={classNames(styles.progress, className)}
29
+ style={{
30
+ ...style,
31
+ backgroundImage: getGradient(progress, PROGRESS_COLOR_VALUE, PROGRESS_COLOR_BACKGROUND),
32
+ }}
33
+ title={`${percent.toLocaleString(locale)}%`}
34
+ />
35
+ );
36
+ };
37
+
38
+ export default Progress;
@@ -0,0 +1 @@
1
+ export { default } from './Progress';
@@ -7,4 +7,6 @@
7
7
 
8
8
  .tile {
9
9
  @include focus-effect;
10
+
11
+ --background-color: var(--color--background);
10
12
  }
@@ -18,9 +18,10 @@ import RackTile from './RackTile';
18
18
 
19
19
  interface Props {
20
20
  className?: string;
21
+ tileSize: number;
21
22
  }
22
23
 
23
- const Rack: FunctionComponent<Props> = ({ className }) => {
24
+ const Rack: FunctionComponent<Props> = ({ className, tileSize }) => {
24
25
  const dispatch = useDispatch();
25
26
  const config = useTypedSelector(selectConfig);
26
27
  const locale = useTypedSelector(selectLocale);
@@ -120,6 +121,7 @@ const Rack: FunctionComponent<Props> = ({ className }) => {
120
121
  index={index}
121
122
  inputRef={tilesRefs[index]}
122
123
  key={index}
124
+ size={tileSize}
123
125
  tile={tile}
124
126
  onChange={handleChange}
125
127
  onKeyDown={handleKeyDown}
@@ -13,7 +13,6 @@ import {
13
13
  import { useDispatch } from 'react-redux';
14
14
 
15
15
  import { createKeyboardNavigation, extractCharacters, extractInputValue, isCtrl } from 'lib';
16
- import { TILE_SIZE } from 'parameters';
17
16
  import {
18
17
  rackSlice,
19
18
  selectCharacterIsValid,
@@ -32,6 +31,7 @@ interface Props {
32
31
  character: string | null;
33
32
  index: number;
34
33
  inputRef: RefObject<HTMLInputElement>;
34
+ size: number;
35
35
  tile: TileModel | null;
36
36
  onChange: ChangeEventHandler<HTMLInputElement>;
37
37
  onKeyDown: KeyboardEventHandler<HTMLInputElement>;
@@ -42,6 +42,7 @@ const RackTile: FunctionComponent<Props> = ({
42
42
  character,
43
43
  index,
44
44
  inputRef,
45
+ size,
45
46
  tile,
46
47
  onChange,
47
48
  onKeyDown,
@@ -101,7 +102,7 @@ const RackTile: FunctionComponent<Props> = ({
101
102
  placeholder={translate('rack.placeholder')[index]}
102
103
  points={points}
103
104
  raised
104
- size={TILE_SIZE}
105
+ size={size}
105
106
  tabIndex={index === 0 ? undefined : -1}
106
107
  onChange={handleChange}
107
108
  onFocus={handleFocus}
@@ -0,0 +1,76 @@
1
+ @import 'styles/mixins';
2
+
3
+ .resultCandidatePicker {
4
+ @include button-reset;
5
+ @include focus-effect;
6
+
7
+ display: flex;
8
+ align-items: center;
9
+ min-width: 0;
10
+ width: 100%;
11
+ border: var(--border);
12
+ border-radius: var(--border--radius);
13
+ background-color: white;
14
+ box-shadow: var(--box-shadow);
15
+ cursor: pointer;
16
+
17
+ &[disabled] {
18
+ opacity: var(--opacity--disabled);
19
+ box-shadow: none;
20
+ cursor: not-allowed;
21
+ }
22
+ }
23
+
24
+ .content {
25
+ display: flex;
26
+ align-items: center;
27
+ width: 100%;
28
+ overflow: hidden;
29
+ }
30
+
31
+ .points,
32
+ .word {
33
+ padding: var(--spacing--m) var(--spacing--l);
34
+ }
35
+
36
+ .points {
37
+ flex: 0 0 auto;
38
+ font-weight: bold;
39
+
40
+ [dir='ltr'] & {
41
+ border-right: var(--border);
42
+ }
43
+
44
+ [dir='rtl'] & {
45
+ border-left: var(--border);
46
+ }
47
+ }
48
+
49
+ .word {
50
+ @include ellipsis;
51
+
52
+ flex: 1;
53
+ text-transform: uppercase;
54
+ text-align: center;
55
+ }
56
+
57
+ .iconContainer {
58
+ flex: 0 0 auto;
59
+ display: flex;
60
+
61
+ [dir='ltr'] & {
62
+ padding-right: var(--spacing--l);
63
+ }
64
+
65
+ [dir='rtl'] & {
66
+ padding-left: var(--spacing--l);
67
+ }
68
+ }
69
+
70
+ .icon {
71
+ $size: 20px;
72
+
73
+ width: $size;
74
+ height: $size;
75
+ color: var(--color--inactive);
76
+ }
@@ -0,0 +1,38 @@
1
+ import classNames from 'classnames';
2
+ import { FunctionComponent, HTMLProps } from 'react';
3
+
4
+ import { ChevronDown } from 'icons';
5
+ import { selectAreResultsOutdated, selectLocale, selectResultCandidate, useTypedSelector } from 'state';
6
+
7
+ import styles from './ResultCandidatePicker.module.scss';
8
+
9
+ interface Props extends HTMLProps<HTMLButtonElement> {
10
+ type?: 'button' | 'submit' | 'reset' | undefined;
11
+ }
12
+
13
+ const ResultCandidatePicker: FunctionComponent<Props> = ({ className, ...props }) => {
14
+ const locale = useTypedSelector(selectLocale);
15
+ const isOutdated = useTypedSelector(selectAreResultsOutdated);
16
+ const resultCandidate = useTypedSelector(selectResultCandidate);
17
+
18
+ if (!resultCandidate) {
19
+ return null;
20
+ }
21
+
22
+ return (
23
+ <button
24
+ className={classNames(styles.resultCandidatePicker, className)}
25
+ disabled={isOutdated}
26
+ type="button"
27
+ {...props}
28
+ >
29
+ <div className={styles.points}>{resultCandidate.points.toLocaleString(locale)}</div>
30
+ <div className={styles.word}>{resultCandidate.word}</div>
31
+ <div className={styles.iconContainer}>
32
+ <ChevronDown className={styles.icon} />
33
+ </div>
34
+ </button>
35
+ );
36
+ };
37
+
38
+ export default ResultCandidatePicker;
@@ -0,0 +1 @@
1
+ export { default } from './ResultCandidatePicker';
@@ -1,49 +1,52 @@
1
- import { CSSProperties, ReactElement } from 'react';
2
- import { useDispatch } from 'react-redux';
1
+ import classNames from 'classnames';
2
+ import { CSSProperties, FocusEventHandler, MouseEventHandler, ReactElement, useRef } from 'react';
3
3
 
4
4
  import { LOCALE_FEATURES } from 'i18n';
5
- import { resultsSlice, selectLocale, selectSortedFilteredResults, useTypedSelector } from 'state';
5
+ import { noop } from 'lib';
6
+ import { selectLocale, useTypedSelector } from 'state';
7
+ import { ResultColumn } from 'types';
6
8
 
7
9
  import Cell from './Cell';
8
10
  import styles from './Results.module.scss';
11
+ import { ResultData } from './types';
12
+ import useColumns from './useColumns';
9
13
 
10
14
  interface Props {
15
+ data: ResultData;
11
16
  index: number;
12
17
  style?: CSSProperties;
13
18
  }
14
19
 
15
- const Result = ({ index, style }: Props): ReactElement => {
16
- const dispatch = useDispatch();
20
+ const Result = ({ data, index, style }: Props): ReactElement => {
21
+ const {
22
+ highlightedIndex,
23
+ results,
24
+ onBlur = noop,
25
+ onClick = noop,
26
+ onFocus = noop,
27
+ onMouseEnter = noop,
28
+ onMouseLeave = noop,
29
+ } = data;
30
+ const ref = useRef<HTMLButtonElement>(null);
17
31
  const locale = useTypedSelector(selectLocale);
18
32
  const { consonants, vowels } = LOCALE_FEATURES[locale];
19
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
20
- const results = useTypedSelector(selectSortedFilteredResults)!;
21
33
  const result = results[index];
22
34
  const otherWords = result.words.slice(1).join(' / ').toLocaleUpperCase();
35
+ const columns = useColumns();
36
+ const enabledColumns = Object.fromEntries(columns.map((column) => [column.id, true]));
23
37
 
24
- const handleClick = () => {
25
- dispatch(resultsSlice.actions.applyResult(result));
26
- };
27
-
28
- const handleMouseEnter = () => {
29
- dispatch(resultsSlice.actions.changeResultCandidate(result));
30
- };
31
-
32
- const handleMouseLeave = () => {
33
- dispatch(resultsSlice.actions.changeResultCandidate(null));
34
- };
35
-
36
- const handleFocus = () => {
37
- dispatch(resultsSlice.actions.changeResultCandidate(result));
38
- };
39
-
40
- const handleBlur = () => {
41
- dispatch(resultsSlice.actions.changeResultCandidate(null));
42
- };
38
+ const handleClick: MouseEventHandler = (event) => onClick(result, event);
39
+ const handleMouseEnter: MouseEventHandler = (event) => onMouseEnter(result, event);
40
+ const handleMouseLeave: MouseEventHandler = (event) => onMouseLeave(result, event);
41
+ const handleBlur: FocusEventHandler = (event) => onBlur(result, event);
42
+ const handleFocus: FocusEventHandler = (event) => onFocus(result, event);
43
43
 
44
44
  return (
45
45
  <button
46
- className={styles.result}
46
+ className={classNames(styles.result, {
47
+ [styles.highlighted]: index === highlightedIndex,
48
+ })}
49
+ ref={ref}
47
50
  style={style}
48
51
  type="button"
49
52
  onBlur={handleBlur}
@@ -53,24 +56,42 @@ const Result = ({ index, style }: Props): ReactElement => {
53
56
  onMouseLeave={handleMouseLeave}
54
57
  >
55
58
  <span className={styles.resultContent}>
56
- <Cell
57
- className={styles.word}
58
- translationKey="common.word"
59
- value={`${result.word.toLocaleUpperCase()}${otherWords.length > 0 ? ` (${otherWords})` : ''}`}
60
- />
61
- <Cell className={styles.stat} translationKey="common.tiles" value={result.tilesCount} />
62
- {consonants && (
59
+ {enabledColumns[ResultColumn.Word] && (
60
+ <Cell
61
+ className={styles.word}
62
+ translationKey="common.word"
63
+ value={`${result.word.toLocaleUpperCase()}${otherWords.length > 0 ? ` (${otherWords})` : ''}`}
64
+ />
65
+ )}
66
+
67
+ {enabledColumns[ResultColumn.TilesCount] && (
68
+ <Cell className={styles.stat} translationKey="common.tiles" value={result.tilesCount} />
69
+ )}
70
+
71
+ {enabledColumns[ResultColumn.ConsonantsCount] && consonants && (
63
72
  <Cell className={styles.stat} translationKey="common.consonants" value={result.consonantsCount} />
64
73
  )}
65
- {vowels && <Cell className={styles.stat} translationKey="common.vowels" value={result.vowelsCount} />}
66
- <Cell className={styles.stat} translationKey="common.blanks" value={result.blanksCount} />
67
- <Cell
68
- className={styles.stat}
69
- translationKey="common.words"
70
- tooltip={`${result.wordsCount} (${result.words.join(' / ').toLocaleUpperCase()})`}
71
- value={result.wordsCount}
72
- />
73
- <Cell className={styles.points} translationKey="common.points" value={result.points} />
74
+
75
+ {enabledColumns[ResultColumn.VowelsCount] && vowels && (
76
+ <Cell className={styles.stat} translationKey="common.vowels" value={result.vowelsCount} />
77
+ )}
78
+
79
+ {enabledColumns[ResultColumn.BlanksCount] && (
80
+ <Cell className={styles.stat} translationKey="common.blanks" value={result.blanksCount} />
81
+ )}
82
+
83
+ {enabledColumns[ResultColumn.WordsCount] && (
84
+ <Cell
85
+ className={styles.stat}
86
+ translationKey="common.words"
87
+ tooltip={`${result.wordsCount} (${result.words.join(' / ').toLocaleUpperCase()})`}
88
+ value={result.wordsCount}
89
+ />
90
+ )}
91
+
92
+ {enabledColumns[ResultColumn.Points] && (
93
+ <Cell className={styles.points} translationKey="common.points" value={result.points} />
94
+ )}
74
95
  </span>
75
96
  </button>
76
97
  );
@@ -8,7 +8,6 @@ $row-padding-horizontal: calc(var(--spacing--m) + var(--spacing--s));
8
8
  flex-direction: column;
9
9
  height: 100%;
10
10
  font-family: var(--font--family--title);
11
- font-size: var(--font--size--s);
12
11
  }
13
12
 
14
13
  .emptyState {
@@ -16,6 +15,7 @@ $row-padding-horizontal: calc(var(--spacing--m) + var(--spacing--s));
16
15
  }
17
16
 
18
17
  .list {
18
+ flex: 1 1 auto;
19
19
  transition: var(--transition);
20
20
 
21
21
  &.outdated {
@@ -30,8 +30,8 @@ $row-padding-horizontal: calc(var(--spacing--m) + var(--spacing--s));
30
30
  align-items: center;
31
31
  justify-content: space-between;
32
32
  border-bottom: var(--border);
33
- font-size: var(--font--size--s);
34
33
  font-weight: 700;
34
+ overflow: auto;
35
35
  }
36
36
 
37
37
  .headerButton {
@@ -41,6 +41,7 @@ $row-padding-horizontal: calc(var(--spacing--m) + var(--spacing--s));
41
41
  cursor: pointer;
42
42
  text-transform: uppercase;
43
43
  transition: var(--transition);
44
+ padding: var(--spacing--s) 0;
44
45
 
45
46
  &:focus,
46
47
  &:hover {
@@ -69,7 +70,8 @@ $row-padding-horizontal: calc(var(--spacing--m) + var(--spacing--s));
69
70
  font-weight: 400;
70
71
 
71
72
  &:focus,
72
- &:hover {
73
+ &:hover,
74
+ &.highlighted {
73
75
  &:not(:disabled) {
74
76
  background-color: var(--color--primary);
75
77
  color: white;
@@ -82,10 +84,6 @@ $row-padding-horizontal: calc(var(--spacing--m) + var(--spacing--s));
82
84
  align-items: center;
83
85
  justify-content: space-between;
84
86
 
85
- [dir='rtl'] & {
86
- flex-direction: row-reverse;
87
- }
88
-
89
87
  .word {
90
88
  @include ellipsis;
91
89
  }
@@ -95,7 +93,7 @@ $row-padding-horizontal: calc(var(--spacing--m) + var(--spacing--s));
95
93
  display: flex;
96
94
  align-items: center;
97
95
  justify-content: center;
98
- padding: var(--spacing--s);
96
+ padding: 0 var(--spacing--s);
99
97
  gap: var(--spacing--s);
100
98
 
101
99
  .result &:first-child,
@@ -150,18 +148,13 @@ $row-padding-horizontal: calc(var(--spacing--m) + var(--spacing--s));
150
148
  font-weight: bold;
151
149
  }
152
150
 
153
- .outdatedButton {
151
+ .solveButton {
154
152
  display: block;
155
- margin: 0 auto;
156
- margin-top: var(--spacing--xxl);
157
-
158
- @include tablet {
159
- margin-top: var(--spacing--l);
160
- }
153
+ margin: var(--spacing--xl) auto 0;
161
154
  }
162
155
 
163
156
  .sortIcon {
164
- $size: 15px;
157
+ $size: 19px;
165
158
 
166
159
  flex: 0 0 auto;
167
160
  width: $size;
@@ -1,9 +1,9 @@
1
1
  import classNames from 'classnames';
2
- import { FunctionComponent, useLayoutEffect, useRef } from 'react';
2
+ import { FunctionComponent, useEffect, useMemo, useState } from 'react';
3
3
  import { FixedSizeList } from 'react-window';
4
4
 
5
5
  import { LOCALE_FEATURES } from 'i18n';
6
- import { RESULTS_HEADER_HEIGHT, RESULTS_INPUT_HEIGHT, RESULTS_ITEM_HEIGHT } from 'parameters';
6
+ import { BORDER_WIDTH, RESULTS_HEADER_HEIGHT, RESULTS_INPUT_HEIGHT, RESULTS_ITEM_HEIGHT } from 'parameters';
7
7
  import {
8
8
  selectAreResultsOutdated,
9
9
  selectIsLoading,
@@ -19,33 +19,48 @@ import EmptyState from '../EmptyState';
19
19
  import Loading from '../Loading';
20
20
  import ResultsInput from '../ResultsInput';
21
21
 
22
- import getColumns from './getColumns';
23
22
  import HeaderButton from './HeaderButton';
24
23
  import Result from './Result';
25
24
  import styles from './Results.module.scss';
26
25
  import SolveButton from './SolveButton';
26
+ import { ResultCallbacks, ResultData } from './types';
27
+ import useColumns from './useColumns';
27
28
 
28
29
  interface Props {
30
+ callbacks: ResultCallbacks;
29
31
  height: number;
32
+ highlightedIndex?: number;
30
33
  width: number;
31
34
  }
32
35
 
33
- const Results: FunctionComponent<Props> = ({ height, width }) => {
34
- const locale = useTypedSelector(selectLocale);
36
+ const Results: FunctionComponent<Props> = ({ callbacks, height, highlightedIndex, width }) => {
35
37
  const translate = useTranslate();
38
+ const locale = useTypedSelector(selectLocale);
39
+ const { direction } = LOCALE_FEATURES[locale];
36
40
  const allResults = useTypedSelector(selectSortedResults);
37
- const results = useTypedSelector(selectSortedFilteredResults);
41
+ const filteredResults = useTypedSelector(selectSortedFilteredResults);
42
+ const results = filteredResults || [];
38
43
  const isLoading = useTypedSelector(selectIsLoading);
39
44
  const isOutdated = useTypedSelector(selectAreResultsOutdated);
40
45
  const error = useTypedSelector(selectSolveError);
41
- const listRef = useRef<HTMLElement>();
42
- const columns = getColumns(LOCALE_FEATURES[locale]);
43
-
44
- useLayoutEffect(() => {
45
- if (listRef.current) {
46
- listRef.current.scrollTo(0, 0);
47
- }
48
- }, [listRef, results]);
46
+ const itemData = useMemo(() => ({ ...callbacks, highlightedIndex, results }), [callbacks, highlightedIndex, results]);
47
+ const [listRef, setListRef] = useState<FixedSizeList<ResultData> | null>(null);
48
+ const columns = useColumns();
49
+ const scrollToIndex = typeof highlightedIndex === 'number' ? highlightedIndex : 0;
50
+
51
+ useEffect(() => {
52
+ // without setTimeout, the initial scrolling offset is calculated
53
+ // incorrectly, as the list is not fully rendered by the browser yet
54
+ const timeout = globalThis.setTimeout(() => {
55
+ if (listRef) {
56
+ listRef.scrollToItem(scrollToIndex, 'center');
57
+ }
58
+ }, 0);
59
+
60
+ return () => {
61
+ globalThis.clearTimeout(timeout);
62
+ };
63
+ }, [listRef, scrollToIndex]);
49
64
 
50
65
  return (
51
66
  <div className={styles.results}>
@@ -56,52 +71,54 @@ const Results: FunctionComponent<Props> = ({ height, width }) => {
56
71
  </div>
57
72
 
58
73
  {typeof error !== 'undefined' && (
59
- <EmptyState className={styles.emptyState} type="error">
74
+ <EmptyState className={styles.emptyState} variant="error">
60
75
  {error.message}
61
76
  </EmptyState>
62
77
  )}
63
78
 
64
- {typeof error === 'undefined' && typeof results === 'undefined' && (
65
- <EmptyState className={styles.emptyState} type="info">
79
+ {typeof error === 'undefined' && typeof filteredResults === 'undefined' && (
80
+ <EmptyState className={styles.emptyState} variant="info">
66
81
  {translate('results.empty-state.uninitialized')}
67
82
 
68
- <SolveButton />
83
+ <SolveButton className={styles.solveButton} />
69
84
  </EmptyState>
70
85
  )}
71
86
 
72
- {typeof error === 'undefined' && typeof results !== 'undefined' && typeof allResults !== 'undefined' && (
87
+ {typeof error === 'undefined' && typeof filteredResults !== 'undefined' && typeof allResults !== 'undefined' && (
73
88
  <>
74
89
  {isOutdated && (
75
- <EmptyState className={styles.emptyState} type="info">
90
+ <EmptyState className={styles.emptyState} variant="info">
76
91
  {translate('results.empty-state.outdated')}
77
92
 
78
- <SolveButton />
93
+ <SolveButton className={styles.solveButton} />
79
94
  </EmptyState>
80
95
  )}
81
96
 
82
97
  {!isOutdated && (
83
98
  <>
84
99
  {allResults.length === 0 && (
85
- <EmptyState className={styles.emptyState} type="warning">
100
+ <EmptyState className={styles.emptyState} variant="warning">
86
101
  {translate('results.empty-state.no-results')}
87
102
  </EmptyState>
88
103
  )}
89
104
 
90
- {allResults.length > 0 && results.length === 0 && (
91
- <EmptyState className={styles.emptyState} type="info">
105
+ {allResults.length > 0 && filteredResults.length === 0 && (
106
+ <EmptyState className={styles.emptyState} variant="info">
92
107
  {translate('results.empty-state.no-filtered-results')}
93
108
  </EmptyState>
94
109
  )}
95
110
 
96
- {allResults.length > 0 && results.length > 0 && (
111
+ {allResults.length > 0 && filteredResults.length > 0 && (
97
112
  <FixedSizeList
98
113
  className={classNames(styles.list, {
99
114
  [styles.outdated]: isOutdated,
100
115
  })}
101
- height={height - RESULTS_HEADER_HEIGHT - RESULTS_INPUT_HEIGHT}
102
- innerRef={listRef}
103
- itemCount={results.length}
116
+ direction={direction}
117
+ height={height - RESULTS_HEADER_HEIGHT - RESULTS_INPUT_HEIGHT - 2 * BORDER_WIDTH}
118
+ itemCount={filteredResults.length}
119
+ itemData={itemData}
104
120
  itemSize={RESULTS_ITEM_HEIGHT}
121
+ ref={setListRef}
105
122
  width={width}
106
123
  >
107
124
  {Result}