diff --git a/packages/website/src/components/Button/index.module.css b/packages/website/src/components/Button/index.module.css index 2e5c30a5f..e805fca6d 100644 --- a/packages/website/src/components/Button/index.module.css +++ b/packages/website/src/components/Button/index.module.css @@ -16,11 +16,6 @@ cursor: pointer; - &[data-disabled="true"] { - cursor: default; - opacity: 0.5; - } - &[data-size="minor"] { font-size: 0.7em; padding: var(--space-2) var(--space-3); @@ -67,6 +62,8 @@ width: 1.25em; height: 1.25em; + margin: -0.25em 0; + object-fit: contain; } @@ -78,6 +75,7 @@ background-color: var(--accent-8); &[data-high-contrast="true"] { + color: var(--accent-1); background-color: var(--accent-12); } } @@ -111,4 +109,10 @@ outline: var(--space-1) solid var(--accent-11); } } + + &[disabled] { + cursor: default; + opacity: 0.5; + outline: none; + } } diff --git a/packages/website/src/components/Button/index.tsx b/packages/website/src/components/Button/index.tsx index 05b41d5cc..44e98f2d0 100644 --- a/packages/website/src/components/Button/index.tsx +++ b/packages/website/src/components/Button/index.tsx @@ -39,7 +39,6 @@ export function Button({ listChild, parentListChild, - disabled, highContrast, ...props }: ButtonProps) { @@ -54,8 +53,6 @@ export function Button({ data-list-child={listChild} data-parent-list-child={parentListChild} data-high-contrast={highContrast} - data-disabled={disabled} - disabled={disabled} {...props} /> ); diff --git a/packages/website/src/components/DropdownMenu/index.module.css b/packages/website/src/components/DropdownMenu/index.module.css index f6df20b2e..ef059cd40 100644 --- a/packages/website/src/components/DropdownMenu/index.module.css +++ b/packages/website/src/components/DropdownMenu/index.module.css @@ -52,6 +52,9 @@ img, svg { + width: 1em; + height: 1em; + &:last-child { margin-left: auto; } @@ -65,12 +68,6 @@ display: flex; transform: translate(calc(-50% + var(--gutter) / 2), -50%); - - img, - svg { - width: 1em; - height: 1em; - } } } } diff --git a/packages/website/src/components/IconButton/index.module.css b/packages/website/src/components/IconButton/index.module.css index ff249356b..c8ebc2710 100644 --- a/packages/website/src/components/IconButton/index.module.css +++ b/packages/website/src/components/IconButton/index.module.css @@ -2,10 +2,4 @@ padding: var(--space-3); aspect-ratio: 1 / 1; - - img, - svg { - width: 0.75em; - height: 0.75em; - } } diff --git a/packages/website/src/components/TankSearch/index.module.css b/packages/website/src/components/TankSearch/index.module.css index 641f4f747..aeef2c738 100644 --- a/packages/website/src/components/TankSearch/index.module.css +++ b/packages/website/src/components/TankSearch/index.module.css @@ -1,4 +1,8 @@ .container { + display: flex; + flex-direction: column; + gap: var(--space-4); + flex: 1; .label { diff --git a/packages/website/src/components/TankSearch/index.tsx b/packages/website/src/components/TankSearch/index.tsx index 2ad60b08b..b5919fb91 100644 --- a/packages/website/src/components/TankSearch/index.tsx +++ b/packages/website/src/components/TankSearch/index.tsx @@ -206,7 +206,7 @@ export const TankSearch = memo( }); return ( - +
( {!skeleton && sorted.length === 0 && ( )} - +
); }, ); diff --git a/packages/website/src/components/TankSearchFilters/index.module.css b/packages/website/src/components/TankSearchFilters/index.module.css index 8f5cf4b20..4f60fc8e4 100644 --- a/packages/website/src/components/TankSearchFilters/index.module.css +++ b/packages/website/src/components/TankSearchFilters/index.module.css @@ -1,25 +1,39 @@ -.nation { - .flag { - position: absolute; - top: 0; - right: 0; +.filters { + display: flex; - width: var(--space-7); - height: 100%; + gap: var(--space-3); - background-size: 200%; - background-position: 0% 50%; + .nation { + .flag { + position: absolute; + top: 0; + right: 0; + + width: var(--space-7); + height: 100%; + + background-size: 200%; + background-position: 0% 50%; + } + } + + .plus { + color: var(--gray-11); } -} -.plus { - color: var(--gray-11); -} + .icon { + filter: drop-shadow(var(--shadow-icon)); + + & + &:not([data-no-overlap]) { + margin-left: calc(-0.5em - var(--space-3)); + } -.icon { - filter: drop-shadow(var(--shadow-icon)); + &[data-no-overlap] { + margin: 0 calc(-1 * var(--space-1)); + } + } - & + & { - margin-left: -0.5em; + .grouped { + display: flex; } } diff --git a/packages/website/src/components/TankSearchFilters/index.tsx b/packages/website/src/components/TankSearchFilters/index.tsx index 06e3e505d..9ff1d8734 100644 --- a/packages/website/src/components/TankSearchFilters/index.tsx +++ b/packages/website/src/components/TankSearchFilters/index.tsx @@ -153,7 +153,7 @@ const TIERS = await awaitableTiers; export function TankSearchFilters() { return ( - +
@@ -163,14 +163,14 @@ export function TankSearchFilters() { - + {/* - - + */} +
); } @@ -196,7 +196,7 @@ function TiersFilter() { return ( - @@ -355,18 +353,16 @@ function ClassFilter() { return ( - @@ -435,24 +431,17 @@ function GunTypeFilter() { return ( - @@ -476,12 +465,13 @@ function GunTypeFilter() { checked={selected} key={gunType} > - + + + {strings.common.gun_types[gunType]} + + ); })} @@ -498,8 +488,9 @@ function GunTypeFilter() { }); }} > - {strings.website.common.tank_search.clear} + + @@ -514,22 +505,21 @@ function TypeFilter() { return ( - @@ -730,10 +720,11 @@ function OwnershipFilterInternal() { borderTopRightRadius: 0, borderBottomRightRadius: 0, }} - listChild + listChild="horizontal" disabled={!wargaming} - variant={showOwned ? "solid" : "surface"} + variant={showOwned ? "solid" : "soft"} color={showOwned ? undefined : "gray"} + highContrast={showOwned} onClick={() => { TankFilters.mutate((draft) => { draft.showOwned = !draft.showOwned; @@ -750,10 +741,11 @@ function OwnershipFilterInternal() { borderBottomLeftRadius: 0, marginLeft: "-1px", }} - listChild + listChild="horizontal" disabled={!wargaming} - variant={showUnowned ? "solid" : "surface"} + variant={showUnowned ? "solid" : "soft"} color={showUnowned ? undefined : "gray"} + highContrast={showUnowned} onClick={() => { TankFilters.mutate((draft) => { draft.showUnowned = !draft.showUnowned; @@ -772,15 +764,16 @@ function TestFilter() { const showNonTesting = TankFilters.use((state) => state.showNonTesting); return ( - +
{ TankFilters.mutate((draft) => { draft.showNonTesting = !draft.showNonTesting; @@ -799,9 +792,10 @@ function TestFilter() { borderBottomLeftRadius: 0, marginLeft: "-1px", }} - variant={showTesting ? "solid" : "surface"} + variant={showTesting ? "solid" : "soft"} color={showTesting ? undefined : "gray"} - listChild + highContrast={showTesting} + listChild="horizontal" onClick={() => { TankFilters.mutate((draft) => { draft.showTesting = !draft.showTesting; @@ -813,7 +807,7 @@ function TestFilter() { style={{ width: "1em", height: "1em", color: "currentColor" }} /> - +
); } @@ -828,23 +822,21 @@ function ConsumablesFilter() { @@ -917,23 +909,21 @@ function ProvisionsFilter() { @@ -1021,19 +1011,17 @@ function GameModeAbilitiesFilter() {