Replace the last glyph icons with Phosphor
The editor's insert, duplicate and remove buttons, the image library's close button and audio tile, the schedule's fold-out caret, the admin menu's caret, the history timeline's caret and gap marker, and the QR page's copied tick. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5292eda4a6
commit
706abf6a03
7 changed files with 23 additions and 18 deletions
|
|
@ -20,6 +20,7 @@
|
|||
Tabs follow the ARIA tab pattern: arrow keys move between them.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
import { CaretDown } from '@phosphor-icons/react'
|
||||
import { useId, useState, type KeyboardEvent } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
|
|
@ -133,9 +134,11 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
className="h-8 w-8 shrink-0 rounded-full border text-sm transition-colors hover:bg-tint"
|
||||
style={{ borderColor: `${withAlpha(accent, 33)}`, color: accentText(accent) }}
|
||||
>
|
||||
<span aria-hidden="true" className={`inline-block transition-transform ${open ? 'rotate-180' : ''}`}>
|
||||
▾
|
||||
</span>
|
||||
<CaretDown
|
||||
aria-hidden="true"
|
||||
weight="bold"
|
||||
className={`mx-auto h-4 w-4 transition-transform ${open ? 'rotate-180' : ''}`}
|
||||
/>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
cached list would lie.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
import { FileAudio, X } from "@phosphor-icons/react";
|
||||
import { useCallback, useEffect, useId, useRef, useState, type ReactNode } from "react";
|
||||
|
||||
import { ApiError, get, post, upload } from "../../lib/api.ts";
|
||||
|
|
@ -214,8 +215,8 @@ export function MediaGrid({
|
|||
// A still of the first frame; metadata only, not the file.
|
||||
<video src={item.url} preload="metadata" muted className="h-full w-full bg-black object-contain" />
|
||||
) : item.content_type.startsWith("audio/") ? (
|
||||
<div className="flex h-full w-full items-center justify-center bg-tint text-3xl" aria-hidden="true">
|
||||
♪
|
||||
<div className="flex h-full w-full items-center justify-center bg-tint" aria-hidden="true">
|
||||
<FileAudio weight="bold" className="h-10 w-10 text-link" />
|
||||
</div>
|
||||
) : (
|
||||
<img
|
||||
|
|
@ -305,9 +306,9 @@ export function MediaPicker({
|
|||
type="button"
|
||||
onClick={() => dialogRef.current?.close()}
|
||||
aria-label="Close"
|
||||
className="h-8 w-8 rounded-full text-muted hover:bg-tint"
|
||||
className="flex h-8 w-8 items-center justify-center rounded-full text-muted hover:bg-tint"
|
||||
>
|
||||
✕
|
||||
<X aria-hidden="true" weight="bold" className="h-4 w-4" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
able to read and copy.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
import { ArrowUp, ArrowDown, CaretRight } from "@phosphor-icons/react";
|
||||
import { ArrowUp, ArrowDown, CaretRight, Copy, Plus, X } from "@phosphor-icons/react";
|
||||
import { useRef, useState } from "react";
|
||||
|
||||
import { ApiError, post } from "../../lib/api.ts";
|
||||
|
|
@ -652,20 +652,20 @@ export function Repeater({
|
|||
label="Insert a new one below"
|
||||
onClick={() => insertAt(index + 1, { ...spec.blank })}
|
||||
>
|
||||
+
|
||||
<Plus size={14} weight="bold" aria-hidden="true" />
|
||||
</IconButton>
|
||||
<IconButton
|
||||
label="Duplicate"
|
||||
onClick={() => insertAt(index + 1, withoutIds(row))}
|
||||
>
|
||||
⧉
|
||||
<Copy size={14} weight="bold" aria-hidden="true" />
|
||||
</IconButton>
|
||||
<IconButton
|
||||
label="Remove"
|
||||
danger
|
||||
onClick={() => removeAt(index)}
|
||||
>
|
||||
✕
|
||||
<X size={14} weight="bold" aria-hidden="true" />
|
||||
</IconButton>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -733,7 +733,7 @@ function IconButton({ label, onClick, danger = false, disabled = false, children
|
|||
aria-label={label}
|
||||
title={label}
|
||||
className={
|
||||
"h-7 w-7 rounded-full border text-sm leading-none transition-colors " +
|
||||
"flex h-7 w-7 items-center justify-center rounded-full border text-sm leading-none transition-colors " +
|
||||
(disabled
|
||||
? "cursor-default border-muted/20 text-muted/40"
|
||||
: danger
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue