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:
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* child-selector(sidebar / 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}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* class-selector(sidebar / 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>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* quick-actions(sidebar / 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>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* term-switcher(sidebar / 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>
|
||||
|
||||
Reference in New Issue
Block a user