diff --git a/src/apps/Office/OfficeFrame.tsx b/src/apps/Office/OfficeFrame.tsx index a63fd9c..306418d 100644 --- a/src/apps/Office/OfficeFrame.tsx +++ b/src/apps/Office/OfficeFrame.tsx @@ -26,7 +26,10 @@ export function OfficeFrame({ const [templatesOpen, setTemplatesOpen] = useState(false); const importRef = useRef(null); return ( -
+
{doc.title} {doc.dirty ? "Unsaved changes" : "Saved"} diff --git a/src/apps/Office/Sheets.tsx b/src/apps/Office/Sheets.tsx index 2c51cb2..81cf23c 100644 --- a/src/apps/Office/Sheets.tsx +++ b/src/apps/Office/Sheets.tsx @@ -1,3 +1,4 @@ +import "./SheetsDesign.css"; import { ChartsPanel } from "./charts/ChartsPanel"; import { TablePanel } from "./sheets/TablePanel"; import { visibleRows } from "./sheets/tableData"; @@ -260,22 +261,26 @@ export function Sheets(props: AppProps) { } > - - +
+ + +
{Boolean(sheet.table?.filters.length) && (
Filters active diff --git a/src/apps/Office/SheetsDesign.css b/src/apps/Office/SheetsDesign.css new file mode 100644 index 0000000..e1e0c78 --- /dev/null +++ b/src/apps/Office/SheetsDesign.css @@ -0,0 +1,71 @@ +.office--sheets { + --editor-color: #2cab82; +} + +.office--sheets .office__toolbar { + background: var(--color-surface); + padding: 10px 12px; + gap: 8px; +} + +.office--sheets > header.office__toolbar { + border-top: 3px solid var(--editor-color); + background: linear-gradient( + 110deg, + color-mix(in srgb, var(--editor-color) 15%, var(--color-surface)), + var(--color-surface) + ); +} + +.office--sheets + :is(.office__toolbar, .sheets__tabs) + :is(button, select, input) { + padding: 7px 10px; + border: 1px solid var(--color-border); + border-radius: 7px; + background: var(--color-bg); + color: var(--color-text); +} + +.office--sheets button:focus-visible { + outline: 2px solid var(--color-accent); + outline-offset: 2px; +} + +.office--sheets .sheets__tabs { + padding: 10px; + gap: 8px; + background: var(--color-surface); +} + +.office--sheets .sheets__tabs [aria-current="true"] { + outline: none; + box-shadow: inset 0 -3px var(--color-accent); + background: color-mix(in srgb, var(--color-accent) 16%, var(--color-surface)); +} + +.office--sheets .sheets__formula-label input { + background: var(--color-surface); + border-color: color-mix( + in srgb, + var(--color-accent) 45%, + var(--color-border) + ); +} + +.office--sheets .sheets__column-headers :is(button, span), +.office--sheets .sheets__row-header { + background: #eaf4ef; + color: #214333; + border-color: #c5d9ce; + font-weight: 600; +} + +.office--sheets .office__toolbar button[aria-pressed="true"] { + border-color: var(--color-accent); + background: color-mix(in srgb, var(--color-accent) 16%, var(--color-surface)); +} + +.office--sheets .sheets__dimensions input { + width: 84px; +} diff --git a/src/apps/Office/sheets/SheetGrid.tsx b/src/apps/Office/sheets/SheetGrid.tsx index 4e1186d..7180df2 100644 --- a/src/apps/Office/sheets/SheetGrid.tsx +++ b/src/apps/Office/sheets/SheetGrid.tsx @@ -208,7 +208,9 @@ export function SheetGrid({ textAlign: cell?.style?.align ?? "left", whiteSpace: cell?.style?.wrap ? "pre-wrap" : "nowrap", border: cell?.style?.border ? "1px solid #444" : undefined, - outline: selected ? "2px solid #2563eb" : undefined, + outline: selected + ? "2px solid var(--color-accent)" + : undefined, outlineOffset: -2, }; if (editing === key)