feat(portal-shell): clean widget design tokens and fix lint:tokens (P1-6)

516 mechanical replacements across 25 widget files:
- spacing xs/sm/md/lg/xl to numeric 1/2/3/4/6
- text-heading-3 to text-lg font-semibold
- bg-danger to bg-destructive
- border border dedup

Fix .eslintrc.tokens.js to use typescript-eslint parser (was importing
uninstalled @typescript-eslint/parser). lint:tokens now passes.
This commit is contained in:
SpecialX
2026-07-22 15:07:38 +08:00
parent 9358372657
commit a28a6bd6ea
27 changed files with 388 additions and 384 deletions

View File

@@ -1,4 +1,4 @@
"use client";
"use client";
/**
* child-selectorsidebar / side
@@ -39,7 +39,7 @@ export default function ChildSelector(_props: PluginProps): React.ReactElement {
<select
value={currentChildId}
onChange={(e) => handleSelect(e.target.value)}
className="mt-xs w-full rounded-md border border bg-card px-sm py-xs text-sm text-foreground"
className="mt-1 w-full rounded-md border bg-card px-2 py-1 text-sm text-foreground"
aria-label="选择孩子"
>
<option value=""></option>
@@ -50,7 +50,7 @@ export default function ChildSelector(_props: PluginProps): React.ReactElement {
))}
</select>
{current ? (
<p className="mt-xs text-xs text-muted-foreground">
<p className="mt-1 text-xs text-muted-foreground">
{current.grade} · {current.className}
</p>
) : null}

View File

@@ -1,4 +1,4 @@
"use client";
"use client";
/**
* class-selectorsidebar / side
@@ -38,7 +38,7 @@ export default function ClassSelector(_props: PluginProps): React.ReactElement {
<select
value={currentClassId}
onChange={(e) => handleSelect(e.target.value)}
className="mt-xs w-full rounded-md border border bg-card px-sm py-xs text-sm text-foreground"
className="mt-1 w-full rounded-md border bg-card px-2 py-1 text-sm text-foreground"
aria-label="选择班级"
>
<option value=""></option>

View File

@@ -1,4 +1,4 @@
"use client";
"use client";
/**
* quick-actionssidebar / side
@@ -45,13 +45,13 @@ export default function QuickActions(props: PluginProps): React.ReactElement {
return (
<div>
<p className="text-sm text-muted-foreground"></p>
<ul className="mt-xs space-y-sm">
<ul className="mt-1 space-y-2">
{actions.map((item) => (
<li key={item.path}>
<button
type="button"
onClick={() => handleClick(item.path)}
className="w-full rounded-md border border bg-card px-sm py-xs text-left text-sm text-foreground"
className="w-full rounded-md border bg-card px-2 py-1 text-left text-sm text-foreground"
>
{item.label}
</button>

View File

@@ -1,4 +1,4 @@
"use client";
"use client";
/**
* term-switchersidebar / side
@@ -42,7 +42,7 @@ export default function TermSwitcher(_props: PluginProps): React.ReactElement {
<select
value={selectedTermId}
onChange={(e) => handleSelect(e.target.value)}
className="mt-xs w-full rounded-md border border bg-card px-sm py-xs text-sm text-foreground"
className="mt-1 w-full rounded-md border bg-card px-2 py-1 text-sm text-foreground"
aria-label="选择学期"
>
<option value=""></option>