@scrabble-solver/scrabble-solver 2.10.4 → 2.10.5

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 (58) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +9 -9
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/eslint/.cache_8dgz12 +1 -1
  5. package/.next/cache/next-server.js.nft.json +1 -1
  6. package/.next/cache/webpack/client-production/0.pack +0 -0
  7. package/.next/cache/webpack/client-production/index.pack +0 -0
  8. package/.next/cache/webpack/edge-server-production/0.pack +0 -0
  9. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  10. package/.next/cache/webpack/server-production/0.pack +0 -0
  11. package/.next/cache/webpack/server-production/index.pack +0 -0
  12. package/.next/next-server.js.nft.json +1 -1
  13. package/.next/prerender-manifest.json +1 -1
  14. package/.next/routes-manifest.json +1 -1
  15. package/.next/server/chunks/176.js +101 -30
  16. package/.next/server/middleware-build-manifest.js +1 -1
  17. package/.next/server/pages/404.html +2 -2
  18. package/.next/server/pages/404.js.nft.json +1 -1
  19. package/.next/server/pages/500.html +2 -2
  20. package/.next/server/pages/_app.js.nft.json +1 -1
  21. package/.next/server/pages/index.html +2 -2
  22. package/.next/server/pages/index.js +16 -46
  23. package/.next/server/pages/index.js.nft.json +1 -1
  24. package/.next/server/pages/index.json +1 -1
  25. package/.next/server/pages-manifest.json +1 -1
  26. package/.next/static/WILX-RgqlLTd4ZoPs8C_E/_buildManifest.js +1 -0
  27. package/.next/static/{P7XhuDLmwJJqC8kgPjX42 → WILX-RgqlLTd4ZoPs8C_E}/_ssgManifest.js +0 -0
  28. package/.next/static/chunks/144-6768fe9a92865ec8.js +1 -0
  29. package/.next/static/chunks/pages/{404-6c99a0c91257c60b.js → 404-7619583a9e7188b1.js} +1 -1
  30. package/.next/static/chunks/pages/index-1a6bbb880f28606a.js +1 -0
  31. package/.next/static/css/d80ffccf2315791a.css +1 -0
  32. package/.next/static/css/e737d5d7fbed2434.css +1 -0
  33. package/.next/trace +55 -55
  34. package/package.json +9 -9
  35. package/src/components/Board/components/Cell/Cell.module.scss +11 -11
  36. package/src/components/Button/Button.module.scss +28 -6
  37. package/src/components/Button/Button.tsx +24 -5
  38. package/src/components/Button/Link.tsx +44 -0
  39. package/src/components/Radio/Radio.module.scss +2 -2
  40. package/src/components/Results/SolveButton.tsx +1 -0
  41. package/src/components/Solver/Solver.tsx +18 -18
  42. package/src/components/Solver/components/ApplyButton/ApplyButton.tsx +1 -0
  43. package/src/components/Solver/components/SolveButton/SolveButton.tsx +1 -0
  44. package/src/components/SquareButton/SquareButton.tsx +2 -2
  45. package/src/components/Tile/Tile.module.scss +35 -18
  46. package/src/components/Tile/Tile.tsx +2 -2
  47. package/src/components/Tile/TilePure.tsx +9 -5
  48. package/src/components/Tooltip/Tooltip.module.scss +5 -5
  49. package/src/modals/MenuModal/MenuModal.module.scss +1 -36
  50. package/src/modals/MenuModal/MenuModal.tsx +22 -20
  51. package/src/modals/RemainingTilesModal/components/Character/Character.module.scss +1 -1
  52. package/src/modals/ResultsModal/ResultsModal.tsx +3 -3
  53. package/src/styles/mixins.scss +2 -2
  54. package/.next/static/P7XhuDLmwJJqC8kgPjX42/_buildManifest.js +0 -1
  55. package/.next/static/chunks/528-9942ddad0031ff79.js +0 -1
  56. package/.next/static/chunks/pages/index-d761f0af070273d2.js +0 -1
  57. package/.next/static/css/97eb6ee0c4300c83.css +0 -1
  58. package/.next/static/css/dcca0c1a39cf5ef5.css +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/scrabble-solver",
3
- "version": "2.10.4",
3
+ "version": "2.10.5",
4
4
  "description": "Scrabble Solver 2 - App",
5
5
  "engines": {
6
6
  "node": ">=16"
@@ -31,13 +31,13 @@
31
31
  "@kamilmielnik/trie": "^2.0.1",
32
32
  "@popperjs/core": "^2.11.6",
33
33
  "@reduxjs/toolkit": "^1.9.2",
34
- "@scrabble-solver/configs": "^2.10.4",
35
- "@scrabble-solver/constants": "^2.10.4",
36
- "@scrabble-solver/dictionaries": "^2.10.4",
37
- "@scrabble-solver/logger": "^2.10.4",
38
- "@scrabble-solver/solver": "^2.10.4",
39
- "@scrabble-solver/types": "^2.10.4",
40
- "@scrabble-solver/word-definitions": "^2.10.4",
34
+ "@scrabble-solver/configs": "^2.10.5",
35
+ "@scrabble-solver/constants": "^2.10.5",
36
+ "@scrabble-solver/dictionaries": "^2.10.5",
37
+ "@scrabble-solver/logger": "^2.10.5",
38
+ "@scrabble-solver/solver": "^2.10.5",
39
+ "@scrabble-solver/types": "^2.10.5",
40
+ "@scrabble-solver/word-definitions": "^2.10.5",
41
41
  "classnames": "^2.3.2",
42
42
  "include-media": "^2.0.0",
43
43
  "include-media-query-builder": "^1.1.0",
@@ -76,5 +76,5 @@
76
76
  "sass": "^1.57.1",
77
77
  "workbox-webpack-plugin": "^6.5.4"
78
78
  },
79
- "gitHead": "7cce9fa637f3c346b1772d0a2b401d3e271b8e67"
79
+ "gitHead": "c998db150c41bf76febd1c9a2650950cd0b449c4"
80
80
  }
@@ -35,69 +35,69 @@ $icon-size: 16px;
35
35
  }
36
36
 
37
37
  &.bonusStart {
38
- &:before {
38
+ &::before {
39
39
  background-color: var(--color--violet--light);
40
40
  }
41
41
  }
42
42
 
43
43
  &.bonusCharacter1 {
44
- &:before {
44
+ &::before {
45
45
  background-color: var(--color--yellow--light);
46
46
  }
47
47
  }
48
48
 
49
49
  &.bonusCharacter2 {
50
- &:before {
50
+ &::before {
51
51
  background-color: var(--color--green--light);
52
52
  }
53
53
  }
54
54
 
55
55
  &.bonusCharacter3 {
56
- &:before {
56
+ &::before {
57
57
  background-color: var(--color--blue--light);
58
58
  }
59
59
  }
60
60
 
61
61
  &.bonusCharacter5 {
62
- &:before {
62
+ &::before {
63
63
  background-color: var(--color--red--light);
64
64
  }
65
65
  }
66
66
 
67
67
  &.bonusCharacterMultiplier2 {
68
- &:before {
68
+ &::before {
69
69
  background-color: var(--color--light-blue--light);
70
70
  }
71
71
  }
72
72
 
73
73
  &.bonusCharacterMultiplier3 {
74
- &:before {
74
+ &::before {
75
75
  background-color: var(--color--dark-blue--light);
76
76
  }
77
77
  }
78
78
 
79
79
  &.bonusWord2 {
80
- &:before {
80
+ &::before {
81
81
  content: 'x2';
82
82
  background-color: var(--color--orange);
83
83
  }
84
84
  }
85
85
 
86
86
  &.bonusWord3 {
87
- &:before {
87
+ &::before {
88
88
  content: 'x3';
89
89
  background-color: var(--color--pink);
90
90
  }
91
91
  }
92
92
 
93
93
  &.candidate {
94
- &:before {
94
+ &::before {
95
95
  content: ' ';
96
96
  background-color: var(--color--primary);
97
97
  }
98
98
  }
99
99
 
100
- &:before {
100
+ &::before {
101
101
  $size: 80%;
102
102
 
103
103
  display: flex;
@@ -8,8 +8,8 @@
8
8
  padding: var(--spacing--m) var(--spacing--l);
9
9
  border: var(--border);
10
10
  border-radius: var(--border--radius);
11
- box-shadow: none;
12
11
  color: var(--color--inactive);
12
+ text-transform: uppercase;
13
13
  transition: var(--transition);
14
14
  cursor: pointer;
15
15
 
@@ -17,10 +17,31 @@
17
17
  &:active,
18
18
  &:focus,
19
19
  &:hover {
20
- text-decoration: none;
21
- background-color: var(--color--primary);
22
20
  box-shadow: var(--box-shadow);
23
- color: white;
21
+ text-decoration: none;
22
+
23
+ &.primary {
24
+ background-color: var(--color--primary);
25
+ color: white;
26
+ }
27
+
28
+ &.default {
29
+ background-color: var(--color--background--overlay);
30
+ color: var(--color--foreground);
31
+
32
+ .icon {
33
+ color: var(--color--inactive);
34
+ }
35
+ }
36
+ }
37
+
38
+ &:focus,
39
+ &:hover {
40
+ &.default {
41
+ .icon {
42
+ color: var(--color--foreground--secondary);
43
+ }
44
+ }
24
45
  }
25
46
 
26
47
  &:active {
@@ -42,15 +63,16 @@
42
63
  .content {
43
64
  display: flex;
44
65
  align-items: center;
45
- gap: var(--spacing--m);
66
+ gap: 20px;
46
67
  }
47
68
 
48
69
  .icon {
49
70
  width: var(--button--icon--size);
50
71
  height: var(--button--icon--size);
72
+ transition: var(--transition);
51
73
  }
52
74
 
53
75
  .label {
54
76
  font-size: var(--font--size--h3);
55
- text-transform: uppercase;
77
+ transition: var(--transition);
56
78
  }
@@ -1,22 +1,39 @@
1
1
  import classNames from 'classnames';
2
- import { ButtonHTMLAttributes, FunctionComponent, MouseEventHandler, ReactNode, SVGAttributes } from 'react';
2
+ import { ButtonHTMLAttributes, FunctionComponent, ReactNode, SVGAttributes } from 'react';
3
3
 
4
4
  import { useTooltip } from '../Tooltip';
5
5
 
6
6
  import styles from './Button.module.scss';
7
+ import Link from './Link';
7
8
 
8
9
  interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
9
10
  Icon?: FunctionComponent<SVGAttributes<SVGElement>>;
10
11
  iconClassName?: string;
11
12
  tooltip?: ReactNode;
12
- onClick: MouseEventHandler<HTMLButtonElement>;
13
+ variant?: 'default' | 'primary';
13
14
  }
14
15
 
15
- const Button: FunctionComponent<Props> = ({ children, className, Icon, iconClassName, tooltip, ...props }) => {
16
+ const Button: FunctionComponent<Props> = ({
17
+ children,
18
+ className,
19
+ Icon,
20
+ iconClassName,
21
+ tooltip,
22
+ variant = 'default',
23
+ ...props
24
+ }) => {
16
25
  const triggerProps = useTooltip(tooltip, props);
17
26
 
18
27
  return (
19
- <button className={classNames(styles.button, className)} type="button" {...props} {...triggerProps}>
28
+ <button
29
+ className={classNames(styles.button, className, {
30
+ [styles.default]: variant === 'default',
31
+ [styles.primary]: variant === 'primary',
32
+ })}
33
+ type="button"
34
+ {...props}
35
+ {...triggerProps}
36
+ >
20
37
  <span className={styles.content}>
21
38
  {Icon && <Icon className={classNames(styles.icon, iconClassName)} />}
22
39
  {children && <span className={styles.label}>{children}</span>}
@@ -25,4 +42,6 @@ const Button: FunctionComponent<Props> = ({ children, className, Icon, iconClass
25
42
  );
26
43
  };
27
44
 
28
- export default Button;
45
+ export default Object.assign(Button, {
46
+ Link,
47
+ });
@@ -0,0 +1,44 @@
1
+ import classNames from 'classnames';
2
+ import { AnchorHTMLAttributes, FunctionComponent, ReactNode, SVGAttributes } from 'react';
3
+
4
+ import { useTooltip } from '../Tooltip';
5
+
6
+ import styles from './Button.module.scss';
7
+
8
+ interface Props extends AnchorHTMLAttributes<HTMLAnchorElement> {
9
+ href: string;
10
+ Icon: FunctionComponent<SVGAttributes<SVGElement>>;
11
+ iconClassName?: string;
12
+ tooltip?: ReactNode;
13
+ variant?: 'default' | 'primary';
14
+ }
15
+
16
+ const Link: FunctionComponent<Props> = ({
17
+ children,
18
+ className,
19
+ Icon,
20
+ iconClassName,
21
+ tooltip,
22
+ variant = 'default',
23
+ ...props
24
+ }) => {
25
+ const triggerProps = useTooltip(tooltip, props);
26
+
27
+ return (
28
+ <a
29
+ className={classNames(styles.button, className, {
30
+ [styles.default]: variant === 'default',
31
+ [styles.primary]: variant === 'primary',
32
+ })}
33
+ {...props}
34
+ {...triggerProps}
35
+ >
36
+ <span className={styles.content}>
37
+ {Icon && <Icon className={classNames(styles.icon, iconClassName)} />}
38
+ {children && <span className={styles.label}>{children}</span>}
39
+ </span>
40
+ </a>
41
+ );
42
+ };
43
+
44
+ export default Link;
@@ -24,7 +24,7 @@ $radio-box-size: $radio-size + 2 * $radio-inner-border;
24
24
 
25
25
  &.checked {
26
26
  .icon {
27
- &:after {
27
+ &::after {
28
28
  background-color: var(--color--primary);
29
29
  }
30
30
  }
@@ -51,7 +51,7 @@ $radio-box-size: $radio-size + 2 * $radio-inner-border;
51
51
  box-shadow: var(--box-shadow--null);
52
52
  pointer-events: none;
53
53
 
54
- &:after {
54
+ &::after {
55
55
  content: ' ';
56
56
  position: absolute;
57
57
  top: $radio-inner-border;
@@ -35,6 +35,7 @@ const SolveButton: FunctionComponent<Props> = ({ className }) => {
35
35
  disabled={isLoading || !isOutdated || !hasTiles}
36
36
  Icon={Search}
37
37
  type="submit"
38
+ variant="primary"
38
39
  onClick={handleClick}
39
40
  >
40
41
  {translate('results.solve')}
@@ -1,6 +1,6 @@
1
1
  import { Result } from '@scrabble-solver/types';
2
2
  import classNames from 'classnames';
3
- import { FormEvent, FunctionComponent, useEffect, useMemo } from 'react';
3
+ import { FunctionComponent, SyntheticEvent, useEffect, useMemo } from 'react';
4
4
  import { useDispatch } from 'react-redux';
5
5
  import { useMeasure } from 'react-use';
6
6
 
@@ -109,9 +109,13 @@ const Solver: FunctionComponent<Props> = ({ className, height, width, onShowResu
109
109
  );
110
110
  const callbacks = isTouchDevice ? touchCallbacks : mouseCallbacks;
111
111
 
112
- const handleSubmit = (event: FormEvent<HTMLFormElement>) => {
112
+ const handleSubmit = (event: SyntheticEvent) => {
113
113
  event.preventDefault();
114
- onShowResults();
114
+
115
+ if (isLessThanL) {
116
+ onShowResults();
117
+ }
118
+
115
119
  dispatch(solveSlice.actions.submit());
116
120
  };
117
121
 
@@ -170,29 +174,25 @@ const Solver: FunctionComponent<Props> = ({ className, height, width, onShowResu
170
174
 
171
175
  {typeof error === 'undefined' && typeof results !== 'undefined' && typeof allResults !== 'undefined' && (
172
176
  <>
173
- {isOutdated && (
177
+ {(isOutdated || !resultCandidate) && (
174
178
  <EmptyState variant="info" onClick={onShowResults}>
175
179
  {translate('results.empty-state.outdated')}
176
180
  </EmptyState>
177
181
  )}
178
182
 
179
- {!isOutdated && (
180
- <>
181
- {allResults.length === 0 && (
182
- <EmptyState variant="warning" onClick={onShowResults}>
183
- {translate('results.empty-state.no-results')}
184
- </EmptyState>
185
- )}
186
-
187
- {allResults.length > 0 && resultCandidate && (
188
- <ResultCandidatePicker className={styles.resultCandidatePicker} onClick={onShowResults} />
189
- )}
190
- </>
183
+ {!isOutdated && allResults.length === 0 && (
184
+ <EmptyState variant="warning" onClick={onShowResults}>
185
+ {translate('results.empty-state.no-results')}
186
+ </EmptyState>
187
+ )}
188
+
189
+ {!isOutdated && allResults.length > 0 && resultCandidate && (
190
+ <ResultCandidatePicker className={styles.resultCandidatePicker} onClick={onShowResults} />
191
191
  )}
192
192
  </>
193
193
  )}
194
194
 
195
- {allResults && allResults.length > 0 && !isOutdated && (
195
+ {allResults && allResults.length > 0 && !isOutdated && resultCandidate && (
196
196
  <ApplyButton className={classNames(styles.submit, styles.apply)} />
197
197
  )}
198
198
  </div>
@@ -200,7 +200,7 @@ const Solver: FunctionComponent<Props> = ({ className, height, width, onShowResu
200
200
  </div>
201
201
  </div>
202
202
 
203
- {isTouchDevice && <SolveButton className={styles.solve} onClick={onShowResults} />}
203
+ {isTouchDevice && <SolveButton className={styles.solve} onClick={handleSubmit} />}
204
204
  </div>
205
205
  );
206
206
  };
@@ -29,6 +29,7 @@ const ApplyButton: FunctionComponent<Props> = ({ className }) => {
29
29
  Icon={Check}
30
30
  iconClassName={styles.icon}
31
31
  type="submit"
32
+ variant="primary"
32
33
  onClick={handleClick}
33
34
  />
34
35
  );
@@ -34,6 +34,7 @@ const SolveButton: FunctionComponent<Props> = ({ className, onClick = noop }) =>
34
34
  Icon={Search}
35
35
  iconClassName={styles.icon}
36
36
  type="submit"
37
+ variant="primary"
37
38
  onClick={handleClick}
38
39
  />
39
40
  );
@@ -1,5 +1,5 @@
1
1
  import classNames from 'classnames';
2
- import { ButtonHTMLAttributes, FunctionComponent, MouseEventHandler, SVGAttributes } from 'react';
2
+ import { ButtonHTMLAttributes, FunctionComponent, MouseEventHandler, ReactNode, SVGAttributes } from 'react';
3
3
 
4
4
  import { useTooltip } from '../Tooltip';
5
5
 
@@ -9,7 +9,7 @@ import styles from './SquareButton.module.scss';
9
9
  interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
10
10
  children?: never;
11
11
  Icon: FunctionComponent<SVGAttributes<SVGElement>>;
12
- tooltip: string;
12
+ tooltip: ReactNode;
13
13
  onClick: MouseEventHandler<HTMLButtonElement>;
14
14
  }
15
15
 
@@ -4,13 +4,8 @@
4
4
  --background-color: transparent;
5
5
 
6
6
  position: relative;
7
- background-color: var(--background-color);
8
7
  transition: var(--transition);
9
8
 
10
- &.raised {
11
- box-shadow: inset -2px -2px 2px -1px rgba(34, 34, 34, 0.8);
12
- }
13
-
14
9
  &.points1 {
15
10
  --background-color: var(--color--yellow);
16
11
  }
@@ -55,31 +50,53 @@
55
50
 
56
51
  color: var(--color--error);
57
52
  }
53
+
54
+ &:not(.disabled) {
55
+ .input::selection {
56
+ --background--color: transparent;
57
+ }
58
+ }
58
59
  }
59
60
 
61
+ .input,
60
62
  .character {
61
- width: 100%;
62
- height: 100%;
63
63
  padding: 0;
64
- box-sizing: border-box;
65
- background-color: transparent;
66
- color: inherit;
67
- border: none;
68
64
  font-weight: bold;
69
65
  text-transform: uppercase;
70
66
  text-align: center;
71
67
  caret-color: transparent;
68
+ box-sizing: border-box;
69
+ }
72
70
 
73
- &::placeholder {
74
- color: var(--color--inactive);
75
- }
71
+ .input {
72
+ width: 100%;
73
+ height: 100%;
74
+ background-color: transparent;
75
+ color: transparent;
76
+ border: none;
77
+ font-size: 16px; // prevent iOS from automatically zooming in on focus
78
+ }
76
79
 
77
- &:not(:disabled)::selection {
78
- --background--color: transparent;
80
+ .character {
81
+ position: absolute;
82
+ top: 0;
83
+ right: 0;
84
+ bottom: 0;
85
+ left: 0;
86
+ display: flex;
87
+ align-items: center;
88
+ justify-content: center;
89
+ background-color: var(--background-color);
90
+ transition: var(--transition);
91
+ pointer-events: none;
92
+ user-select: none;
93
+
94
+ .empty & {
95
+ color: var(--color--inactive);
79
96
  }
80
97
 
81
- &[disabled] {
82
- color: inherit;
98
+ .raised & {
99
+ box-shadow: inset -2px -2px 2px -1px rgba(34, 34, 34, 0.8);
83
100
  }
84
101
  }
85
102
 
@@ -55,7 +55,7 @@ const Tile: FunctionComponent<Props> = ({
55
55
  const locale = useTypedSelector(selectLocale);
56
56
  const { pointsFontSize, tileFontSize, tileSize } = getTileSizes(size);
57
57
  const style = useMemo(() => ({ height: tileSize, width: tileSize }), [tileSize]);
58
- const inputStyle = useMemo(() => ({ fontSize: tileFontSize }), [tileFontSize]);
58
+ const characterStyle = useMemo(() => ({ fontSize: tileFontSize }), [tileFontSize]);
59
59
  const pointsStyle = useMemo(() => ({ fontSize: pointsFontSize }), [pointsFontSize]);
60
60
  const inputRef = useMemo<RefObject<HTMLInputElement>>(() => ref || createRef(), [ref]);
61
61
  const isEmpty = !character || character === EMPTY_CELL;
@@ -78,11 +78,11 @@ const Tile: FunctionComponent<Props> = ({
78
78
  autoFocus={autoFocus}
79
79
  canShowPoints={canShowPoints}
80
80
  character={character}
81
+ characterStyle={characterStyle}
81
82
  className={className}
82
83
  disabled={disabled}
83
84
  highlighted={highlighted}
84
85
  inputRef={inputRef}
85
- inputStyle={inputStyle}
86
86
  isBlank={isBlank}
87
87
  isValid={isValid}
88
88
  placeholder={placeholder}
@@ -17,11 +17,11 @@ interface Props {
17
17
  autoFocus?: boolean;
18
18
  canShowPoints?: boolean;
19
19
  character?: string;
20
+ characterStyle?: CSSProperties;
20
21
  className?: string;
21
22
  disabled?: boolean;
22
23
  highlighted?: boolean;
23
24
  inputRef: RefObject<HTMLInputElement>;
24
- inputStyle?: CSSProperties;
25
25
  isBlank?: boolean;
26
26
  isValid?: boolean;
27
27
  placeholder?: string;
@@ -40,11 +40,11 @@ const TilePure: FunctionComponent<Props> = ({
40
40
  autoFocus,
41
41
  canShowPoints,
42
42
  character,
43
+ characterStyle,
43
44
  className,
44
45
  disabled,
45
46
  highlighted,
46
47
  inputRef,
47
- inputStyle,
48
48
  isBlank,
49
49
  isValid,
50
50
  placeholder,
@@ -61,6 +61,8 @@ const TilePure: FunctionComponent<Props> = ({
61
61
  <div
62
62
  className={classNames(styles.tile, className, {
63
63
  [styles.blank]: isBlank,
64
+ [styles.disabled]: disabled,
65
+ [styles.empty]: !character,
64
66
  [styles.highlighted]: highlighted,
65
67
  [styles.invalid]: !isValid,
66
68
  [styles.raised]: raised,
@@ -77,12 +79,10 @@ const TilePure: FunctionComponent<Props> = ({
77
79
  autoComplete="off"
78
80
  autoCorrect="off"
79
81
  autoFocus={autoFocus}
80
- className={styles.character}
82
+ className={styles.input}
81
83
  disabled={disabled}
82
- placeholder={placeholder}
83
84
  ref={inputRef}
84
85
  spellCheck={false}
85
- style={inputStyle}
86
86
  tabIndex={tabIndex}
87
87
  value={character || ''}
88
88
  onChange={onChange}
@@ -90,6 +90,10 @@ const TilePure: FunctionComponent<Props> = ({
90
90
  onKeyDown={onKeyDown}
91
91
  />
92
92
 
93
+ <div className={styles.character} style={characterStyle} tabIndex={-1}>
94
+ {character || placeholder}
95
+ </div>
96
+
93
97
  {canShowPoints && (
94
98
  <span className={styles.points} style={pointsStyle}>
95
99
  {pointsFormatted}
@@ -18,7 +18,7 @@ $arrow-size: 4px;
18
18
  .arrow {
19
19
  bottom: -$arrow-size;
20
20
 
21
- &:after {
21
+ &::after {
22
22
  left: 0;
23
23
  bottom: 0;
24
24
  border-top-color: var(--tooltip--background);
@@ -31,7 +31,7 @@ $arrow-size: 4px;
31
31
  .arrow {
32
32
  left: -$arrow-size;
33
33
 
34
- &:after {
34
+ &::after {
35
35
  left: 0;
36
36
  top: 0;
37
37
  border-right-color: var(--tooltip--background);
@@ -44,7 +44,7 @@ $arrow-size: 4px;
44
44
  .arrow {
45
45
  top: -$arrow-size;
46
46
 
47
- &:after {
47
+ &::after {
48
48
  top: 0;
49
49
  left: 0;
50
50
  border-bottom-color: var(--tooltip--background);
@@ -57,7 +57,7 @@ $arrow-size: 4px;
57
57
  .arrow {
58
58
  right: -$arrow-size;
59
59
 
60
- &:after {
60
+ &::after {
61
61
  right: 0;
62
62
  top: 0;
63
63
  border-left-color: var(--tooltip--background);
@@ -72,7 +72,7 @@ $arrow-size: 4px;
72
72
  width: 2 * $arrow-size;
73
73
  height: 2 * $arrow-size;
74
74
 
75
- &:after {
75
+ &::after {
76
76
  content: ' ';
77
77
  position: absolute;
78
78
  height: 0;
@@ -1,46 +1,11 @@
1
1
  @import 'styles/mixins';
2
2
 
3
3
  .button {
4
- @include button-reset;
5
- @include focus-effect;
6
-
7
4
  width: 100%;
8
- display: flex;
9
- align-items: flex-start;
10
- gap: var(--spacing--l);
11
5
  margin-bottom: var(--spacing--m);
12
- padding: var(--spacing--m);
13
- border: var(--border);
14
- border-radius: var(--border--radius);
15
- background-color: var(--color--background--overlay);
16
- transition: var(--transition);
17
- cursor: pointer;
6
+ text-transform: none;
18
7
 
19
8
  &:last-child {
20
9
  margin-bottom: 0;
21
10
  }
22
-
23
- &:focus,
24
- &:hover {
25
- text-decoration: none;
26
-
27
- .icon {
28
- color: var(--color--foreground--secondary);
29
- }
30
- }
31
- }
32
-
33
- .icon {
34
- $size: 24px;
35
-
36
- width: $size;
37
- height: $size;
38
- flex: 0 0 auto;
39
- color: var(--color--inactive);
40
- transition: var(--transition);
41
- }
42
-
43
- .content {
44
- flex: 1;
45
- text-align: left;
46
11
  }