diff --git a/configurator/src/App.svelte b/configurator/src/App.svelte index 22d3f0316..41265ac6e 100644 --- a/configurator/src/App.svelte +++ b/configurator/src/App.svelte @@ -20,7 +20,7 @@ home: "Home", colors: "Colors", typography: "Typography", spacing: "Spacing", layout: "Layout", borders: "Borders", shadows: "Shadows", motion: "Motion", effects: "Effects", macros: "Macros", misc: "Misc", components: "Components", - themes: "Themes", wcag: "WCAG", setup: "Install", cheatsheet: "Classes", + changes: "Changes", themes: "Themes", wcag: "WCAG", setup: "Install", cheatsheet: "Classes", }; function overridesByDomain(ov: Record): Record { diff --git a/configurator/src/components/DomainPanel.svelte b/configurator/src/components/DomainPanel.svelte index a638d1f90..7368f83b4 100644 --- a/configurator/src/components/DomainPanel.svelte +++ b/configurator/src/components/DomainPanel.svelte @@ -17,6 +17,7 @@ import ThemesPanel from './panels/ThemesPanel.svelte'; import ExportPanel from './panels/ExportPanel.svelte'; import CheatsheetPanel from './panels/CheatsheetPanel.svelte'; + import ChangesPanel from './panels/ChangesPanel.svelte'; import GenericTokenPanel from './panels/GenericTokenPanel.svelte'; import AllTokensTab from './panels/AllTokensTab.svelte'; import WcagPanel from './panels/WcagPanel.svelte'; @@ -35,7 +36,7 @@ // Domains that skip the two-tab treatment - const NO_CONTROLS_TAB = new Set(["home", "themes", "wcag", "setup", "cheatsheet"]); + const NO_CONTROLS_TAB = new Set(["home", "changes", "themes", "wcag", "setup", "cheatsheet"]); let view = $state<"controls" | "tokens">("controls"); @@ -55,6 +56,8 @@ {#if NO_CONTROLS_TAB.has(domain)} {#if domain === "home"} + {:else if domain === "changes"} + {:else if domain === "themes"} {:else if domain === "wcag"} diff --git a/configurator/src/components/panels/ChangesPanel.svelte b/configurator/src/components/panels/ChangesPanel.svelte new file mode 100644 index 000000000..f9bfe89fc --- /dev/null +++ b/configurator/src/components/panels/ChangesPanel.svelte @@ -0,0 +1,197 @@ + + +
+ +
+
+
+

Changes

+

+ Every active override, grouped by what it does to the system. +

+
+ {#if summary.total > 0} + + {/if} +
+ + {#if summary.total > 0} + +
+ {#each GROUPS as g (g.key)} + {@const n = summary[g.key].length} + {#if n > 0} + + {n} {g.label} + + {/if} + {/each} +
+ {/if} +
+ +
+ + +
+ {#if summary.total === 0} +
+
+ +
+

No changes yet

+

+ You're on the framework defaults. Edit any panel and your overrides will collect here. +

+
+ {:else} + + {#each shadows as sh (sh.family.id)} +
+
+ +
+
+ {sh.shadowedSteps.length} {sh.family.label} step{sh.shadowedSteps.length !== 1 ? "s" : ""} pinned +
+
+ These fixed values override the generated ladder, so its source + knob{sh.overriddenSources.length === 1 ? "" : "s"} can't move them. +
+ +
+
+
+ {/each} + + + {#each GROUPS as g (g.key)} + {@const entries = summary[g.key]} + {#if entries.length > 0} +
+
+ + {g.label} + {entries.length} +
+ +
+

{g.blurb}

+ +
+ {#each entries as entry (entry.name)} + {#if entry.token} + {@const dom = domainOf(entry.name)} +
+ + onSet(entry.name, v)} + onReset={() => onReset(entry.name)} + /> +
+ {:else} + +
+
+
+ {entry.name.replace("--sf-", "")} +
+
+ {entry.value} +
+
+ +
+ {/if} + {/each} +
+
+ {/if} + {/each} + {/if} +
+
diff --git a/configurator/src/components/shell/SidebarNav.svelte b/configurator/src/components/shell/SidebarNav.svelte index 576983121..1e300b5c1 100644 --- a/configurator/src/components/shell/SidebarNav.svelte +++ b/configurator/src/components/shell/SidebarNav.svelte @@ -1,7 +1,7 @@