diff --git a/web/src/index.css b/web/src/index.css index f8a6e93..2c2c395 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -1783,12 +1783,24 @@ body { min-width: 0; } +.screener-search-icon { + position: absolute; + top: 50%; + left: 10px; + color: var(--muted-foreground); + transform: translateY(-50%); +} + +.screener-search-input { + padding-left: 32px !important; +} + .screener-filter-row input, .screener-filter-row select { min-height: 40px; } -.screener-filter-row > select { +.screener-cap-select { width: 100% !important; } @@ -1800,6 +1812,85 @@ body { gap: 7px; } +.screener-sector-chip { + min-height: 32px !important; + border-radius: 999px !important; + padding: 0 12px !important; + font-size: 11px !important; + font-weight: 700 !important; +} + +.screener-sector-chip[data-active="true"] { + border-color: var(--accent) !important; + background: var(--accent-soft) !important; + color: var(--accent) !important; +} + +.screener-more-select { + width: 150px; + border-radius: 999px !important; + font-weight: 650; +} + +.screener-more-select[data-active="true"] { + border-color: var(--accent) !important; + background: var(--accent-soft) !important; + color: var(--accent) !important; +} + +.screener-results-grid { + display: grid; + grid-template-columns: 100px minmax(220px, 1fr) 90px 90px 110px 80px 110px; + align-items: center; + gap: 0; + padding: 10px 16px; +} + +.screener-sort-button { + justify-content: flex-start !important; + min-height: 28px !important; + padding: 0 !important; + border: 0 !important; + background: transparent !important; + color: var(--muted-foreground) !important; + box-shadow: none !important; +} + +.screener-sort-icon { + margin-left: 4px; + color: var(--muted-foreground); + font-size: 10px; +} + +.screener-sort-icon[data-active="true"] { + color: var(--accent); +} + +.screener-symbol-cell, +.screener-price-cell { + color: var(--foreground); + font-weight: 750; +} + +.screener-change-cell { + font-size: 12px; + font-weight: 750; +} + +.screener-change-cell.is-positive { + color: var(--bl-success); +} + +.screener-change-cell.is-negative { + color: var(--bl-danger); +} + +.screener-results-summary { + margin-top: 8px; + color: var(--muted-foreground); + font-size: 11px; +} + .positions-tab, .history-tab { width: 100%; diff --git a/web/src/views/ScreenerView.dom.test.tsx b/web/src/views/ScreenerView.dom.test.tsx index 0f3f03f..ea2e828 100644 --- a/web/src/views/ScreenerView.dom.test.tsx +++ b/web/src/views/ScreenerView.dom.test.tsx @@ -65,11 +65,8 @@ describe('ScreenerView sector filters', () => { await user.selectOptions(moreSectors, 'Energy'); expect(moreSectors).toHaveValue('Energy'); - expect(moreSectors).toHaveStyle({ - background: 'var(--accent-soft)', - color: 'var(--primary)', - fontWeight: '700', - }); + expect(moreSectors).toHaveClass('screener-more-select'); + expect(moreSectors).toHaveAttribute('data-active', 'true'); await waitFor(() => expect(globalThis.fetch).toHaveBeenCalledTimes(2)); expect(String((globalThis.fetch as any).mock.calls[1][0])).toContain('sector=Energy'); }); diff --git a/web/src/views/ScreenerView.tsx b/web/src/views/ScreenerView.tsx index 63b32ef..d7cb172 100644 --- a/web/src/views/ScreenerView.tsx +++ b/web/src/views/ScreenerView.tsx @@ -126,7 +126,7 @@ export function ScreenerView() { }; const SortIcon = ({ k }: { k: keyof ScreenerRow }) => ( - + {sortKey === k ? (sortAsc ? '▲' : '▼') : '⇅'} ); @@ -180,23 +180,20 @@ export function ScreenerView() {
- + ) => setQuery(e.target.value)} - style={{ paddingLeft: 32 }} + className="screener-search-input" />