refactor(workspace): consume revised color tokens
This commit is contained in:
@@ -183,7 +183,7 @@ function Field({
|
|||||||
Component: FieldInputComponent
|
Component: FieldInputComponent
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<fieldset className="relative flex h-12 items-center rounded-lg border-2 border-border p-0 focus-within:border-primary focus-within:[&_label]:opacity-100">
|
<fieldset className="relative flex h-12 items-center rounded-lg border-2 border-border p-0 focus-within:border-accent focus-within:[&_label]:opacity-100">
|
||||||
<legend className="ml-2 flex h-0 px-0">
|
<legend className="ml-2 flex h-0 px-0">
|
||||||
<label
|
<label
|
||||||
className="h-fit -translate-y-1/2 px-1 text-sm opacity-50"
|
className="h-fit -translate-y-1/2 px-1 text-sm opacity-50"
|
||||||
|
|||||||
+11
-8
@@ -33,8 +33,8 @@
|
|||||||
--card-foreground: var(--docs-foreground-light, var(--color-slate-950));
|
--card-foreground: var(--docs-foreground-light, var(--color-slate-950));
|
||||||
--popover: var(--docs-background-light, var(--color-white));
|
--popover: var(--docs-background-light, var(--color-white));
|
||||||
--popover-foreground: var(--docs-foreground-light, var(--color-slate-950));
|
--popover-foreground: var(--docs-foreground-light, var(--color-slate-950));
|
||||||
--primary: var(--color-indigo-600);
|
--accent: var(--color-indigo-600);
|
||||||
--primary-foreground: var(--color-white);
|
--accent-foreground: var(--color-white);
|
||||||
--secondary: var(--docs-surface-light, var(--color-slate-100));
|
--secondary: var(--docs-surface-light, var(--color-slate-100));
|
||||||
--secondary-foreground: var(
|
--secondary-foreground: var(
|
||||||
--docs-foreground-light,
|
--docs-foreground-light,
|
||||||
@@ -42,8 +42,11 @@
|
|||||||
);
|
);
|
||||||
--muted: var(--docs-surface-light, var(--color-slate-100));
|
--muted: var(--docs-surface-light, var(--color-slate-100));
|
||||||
--muted-foreground: var(--docs-muted-light, var(--color-slate-600));
|
--muted-foreground: var(--docs-muted-light, var(--color-slate-600));
|
||||||
--accent: var(--docs-surface-light, var(--color-slate-100));
|
--highlight: var(--docs-surface-light, var(--color-slate-100));
|
||||||
--accent-foreground: var(--docs-foreground-light, var(--color-slate-950));
|
--highlight-foreground: var(
|
||||||
|
--docs-foreground-light,
|
||||||
|
var(--color-slate-950)
|
||||||
|
);
|
||||||
--border: var(--color-slate-200);
|
--border: var(--color-slate-200);
|
||||||
--input: var(--color-slate-200);
|
--input: var(--color-slate-200);
|
||||||
--ring: var(--color-indigo-500);
|
--ring: var(--color-indigo-500);
|
||||||
@@ -59,14 +62,14 @@
|
|||||||
--card-foreground: var(--docs-foreground-dark, var(--color-slate-100));
|
--card-foreground: var(--docs-foreground-dark, var(--color-slate-100));
|
||||||
--popover: var(--docs-surface-dark, var(--color-slate-900));
|
--popover: var(--docs-surface-dark, var(--color-slate-900));
|
||||||
--popover-foreground: var(--docs-foreground-dark, var(--color-slate-100));
|
--popover-foreground: var(--docs-foreground-dark, var(--color-slate-100));
|
||||||
--primary: var(--color-indigo-400);
|
--accent: var(--color-indigo-400);
|
||||||
--primary-foreground: var(--color-slate-950);
|
--accent-foreground: var(--color-slate-950);
|
||||||
--secondary: var(--color-slate-800);
|
--secondary: var(--color-slate-800);
|
||||||
--secondary-foreground: var(--docs-foreground-dark, var(--color-slate-100));
|
--secondary-foreground: var(--docs-foreground-dark, var(--color-slate-100));
|
||||||
--muted: var(--color-slate-800);
|
--muted: var(--color-slate-800);
|
||||||
--muted-foreground: var(--docs-muted-dark, var(--color-slate-400));
|
--muted-foreground: var(--docs-muted-dark, var(--color-slate-400));
|
||||||
--accent: var(--color-slate-800);
|
--highlight: var(--color-slate-800);
|
||||||
--accent-foreground: var(--docs-foreground-dark, var(--color-slate-100));
|
--highlight-foreground: var(--docs-foreground-dark, var(--color-slate-100));
|
||||||
--border: var(--color-slate-800);
|
--border: var(--color-slate-800);
|
||||||
--input: var(--color-slate-700);
|
--input: var(--color-slate-700);
|
||||||
--ring: var(--color-indigo-400);
|
--ring: var(--color-indigo-400);
|
||||||
|
|||||||
@@ -33,12 +33,12 @@ function createSwatches<T extends ThemeColor>(
|
|||||||
return {
|
return {
|
||||||
name,
|
name,
|
||||||
light: {
|
light: {
|
||||||
background: theme.cssVars.light.primary,
|
background: theme.cssVars.light.accent,
|
||||||
foreground: theme.cssVars.light["primary-foreground"],
|
foreground: theme.cssVars.light["accent-foreground"],
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
background: theme.cssVars.dark.primary,
|
background: theme.cssVars.dark.accent,
|
||||||
foreground: theme.cssVars.dark["primary-foreground"],
|
foreground: theme.cssVars.dark["accent-foreground"],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export function ThemePreview({
|
|||||||
...Object.fromEntries(
|
...Object.fromEntries(
|
||||||
Object.entries(themeVariables).map(([key, value]) => [`--${key}`, value])
|
Object.entries(themeVariables).map(([key, value]) => [`--${key}`, value])
|
||||||
),
|
),
|
||||||
"--preview-base": baseTheme.cssVars[scheme].primary,
|
"--preview-base": baseTheme.cssVars[scheme].accent,
|
||||||
} as CSSProperties
|
} as CSSProperties
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -39,7 +39,7 @@ export function ThemePreview({
|
|||||||
<div className="flex gap-3">
|
<div className="flex gap-3">
|
||||||
<div className="flex w-16 flex-col gap-1 py-5 [&>div]:bg-foreground/10">
|
<div className="flex w-16 flex-col gap-1 py-5 [&>div]:bg-foreground/10">
|
||||||
<div className="h-2.5 w-full rounded-r-full" />
|
<div className="h-2.5 w-full rounded-r-full" />
|
||||||
<div className="h-2.5 w-full rounded-r-full bg-primary!" />
|
<div className="h-2.5 w-full rounded-r-full bg-accent!" />
|
||||||
<div className="h-2.5 w-full rounded-r-full" />
|
<div className="h-2.5 w-full rounded-r-full" />
|
||||||
<div className="h-2.5 w-full rounded-r-full" />
|
<div className="h-2.5 w-full rounded-r-full" />
|
||||||
<div className="mt-auto h-2.5 w-full rounded-r-full" />
|
<div className="mt-auto h-2.5 w-full rounded-r-full" />
|
||||||
@@ -50,7 +50,7 @@ export function ThemePreview({
|
|||||||
<div className="h-2.5 w-3 rounded-sm" />
|
<div className="h-2.5 w-3 rounded-sm" />
|
||||||
<div className="ml-auto size-2.5 rounded-sm" />
|
<div className="ml-auto size-2.5 rounded-sm" />
|
||||||
<div className="h-2.5 w-3.75 rounded-sm" />
|
<div className="h-2.5 w-3.75 rounded-sm" />
|
||||||
<div className="h-2.5 w-5 rounded-sm bg-primary!" />
|
<div className="h-2.5 w-5 rounded-sm bg-accent!" />
|
||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-3 gap-2 [&>div]:rounded-sm [&>div]:bg-foreground/10">
|
<div className="grid grid-cols-3 gap-2 [&>div]:rounded-sm [&>div]:bg-foreground/10">
|
||||||
<div className="flex h-18 items-end gap-2 p-2 compacted:gap-1">
|
<div className="flex h-18 items-end gap-2 p-2 compacted:gap-1">
|
||||||
@@ -85,8 +85,8 @@ export function ThemePreview({
|
|||||||
<div className="h-1 w-6 rounded-xs bg-(--preview-base)/55 compacted:hidden" />
|
<div className="h-1 w-6 rounded-xs bg-(--preview-base)/55 compacted:hidden" />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<div className="h-2 w-6 rounded-sm bg-primary" />
|
<div className="h-2 w-6 rounded-sm bg-accent" />
|
||||||
<div className="h-2 w-6 rounded-sm bg-primary/75" />
|
<div className="h-2 w-6 rounded-sm bg-accent/75" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="h-18" />
|
<div className="h-18" />
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ describe("appearance themes", () => {
|
|||||||
expect(variables.background).toBe(
|
expect(variables.background).toBe(
|
||||||
getTheme("stone")?.cssVars.light.background
|
getTheme("stone")?.cssVars.light.background
|
||||||
)
|
)
|
||||||
expect(variables.primary).toBe(getTheme("rose")?.cssVars.light.primary)
|
expect(variables.highlight).toBe(getTheme("stone")?.cssVars.light.highlight)
|
||||||
|
expect(variables.accent).toBe(getTheme("rose")?.cssVars.light.accent)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("builds explicit and system color-scheme rules", () => {
|
it("builds explicit and system color-scheme rules", () => {
|
||||||
@@ -40,6 +41,7 @@ describe("appearance themes", () => {
|
|||||||
expect(styleSheet).toContain(".ui\\:dark{")
|
expect(styleSheet).toContain(".ui\\:dark{")
|
||||||
expect(styleSheet).toContain("@media (prefers-color-scheme:dark)")
|
expect(styleSheet).toContain("@media (prefers-color-scheme:dark)")
|
||||||
expect(styleSheet).toContain("--background:")
|
expect(styleSheet).toContain("--background:")
|
||||||
expect(styleSheet).toContain("--primary:")
|
expect(styleSheet).toContain("--accent:")
|
||||||
|
expect(styleSheet).toContain("--highlight:")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -70,7 +70,7 @@ export function ChatConversationList({
|
|||||||
className={cn(
|
className={cn(
|
||||||
"group grid w-full grid-cols-[auto_minmax(0,1fr)] items-center gap-x-3.5 rounded-xl px-3 py-3 text-start transition-colors outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50",
|
"group grid w-full grid-cols-[auto_minmax(0,1fr)] items-center gap-x-3.5 rounded-xl px-3 py-3 text-start transition-colors outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50",
|
||||||
active &&
|
active &&
|
||||||
"bg-primary text-primary-foreground hover:bg-primary/90"
|
"bg-accent text-accent-foreground hover:bg-accent/90"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<ConversationAvatar conversation={conversation} />
|
<ConversationAvatar conversation={conversation} />
|
||||||
@@ -82,7 +82,7 @@ export function ChatConversationList({
|
|||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
"shrink-0 text-xs text-muted-foreground",
|
"shrink-0 text-xs text-muted-foreground",
|
||||||
active && "text-primary-foreground/70"
|
active && "text-accent-foreground/70"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{conversation.lastActivityLabel}
|
{conversation.lastActivityLabel}
|
||||||
@@ -91,7 +91,7 @@ export function ChatConversationList({
|
|||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
"min-w-0 truncate text-sm text-muted-foreground",
|
"min-w-0 truncate text-sm text-muted-foreground",
|
||||||
active && "text-primary-foreground/75"
|
active && "text-accent-foreground/75"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{conversation.lastMessage ?? conversation.description}
|
{conversation.lastMessage ?? conversation.description}
|
||||||
@@ -99,8 +99,8 @@ export function ChatConversationList({
|
|||||||
{conversation.unreadCount && conversation.unreadCount > 0 ? (
|
{conversation.unreadCount && conversation.unreadCount > 0 ? (
|
||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
"grid size-5 shrink-0 place-items-center self-end justify-self-end rounded-full bg-primary text-xs font-medium text-primary-foreground",
|
"grid size-5 shrink-0 place-items-center self-end justify-self-end rounded-full bg-accent text-xs font-medium text-accent-foreground",
|
||||||
active && "bg-primary-foreground text-primary"
|
active && "bg-accent-foreground text-accent"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{conversation.unreadCount > 99
|
{conversation.unreadCount > 99
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ function BreadcrumbNavigationMenuItem({
|
|||||||
<DropdownMenuSub>
|
<DropdownMenuSub>
|
||||||
<DropdownMenuSubTrigger
|
<DropdownMenuSubTrigger
|
||||||
aria-current={isCurrent ? "page" : undefined}
|
aria-current={isCurrent ? "page" : undefined}
|
||||||
className="aria-[current=page]:bg-primary/10 aria-[current=page]:text-primary"
|
className="aria-[current=page]:bg-accent/10 aria-[current=page]:text-accent"
|
||||||
>
|
>
|
||||||
<BreadcrumbEntryContent entry={entry} />
|
<BreadcrumbEntryContent entry={entry} />
|
||||||
</DropdownMenuSubTrigger>
|
</DropdownMenuSubTrigger>
|
||||||
@@ -241,7 +241,7 @@ function BreadcrumbNavigationMenuItem({
|
|||||||
return (
|
return (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
aria-current={isCurrent ? "page" : undefined}
|
aria-current={isCurrent ? "page" : undefined}
|
||||||
className="aria-[current=page]:bg-primary/10 aria-[current=page]:text-primary"
|
className="aria-[current=page]:bg-accent/10 aria-[current=page]:text-accent"
|
||||||
render={
|
render={
|
||||||
entry.to === "/" ? (
|
entry.to === "/" ? (
|
||||||
<Link to="/" />
|
<Link to="/" />
|
||||||
@@ -406,7 +406,7 @@ export function AppBreadcrumb() {
|
|||||||
{item.kind === "menu" ? (
|
{item.kind === "menu" ? (
|
||||||
<BreadcrumbMenu entries={item.entries} />
|
<BreadcrumbMenu entries={item.entries} />
|
||||||
) : isCurrent ? (
|
) : isCurrent ? (
|
||||||
<BreadcrumbPage className="inline-flex min-w-0 items-center gap-1.5 text-primary">
|
<BreadcrumbPage className="inline-flex min-w-0 items-center gap-1.5 text-accent">
|
||||||
{item.entry.icon && (
|
{item.entry.icon && (
|
||||||
<Icon
|
<Icon
|
||||||
name={item.entry.icon}
|
name={item.entry.icon}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export function AppQueryIndicator({ className }: { className?: string }) {
|
|||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<span className="size-4.5 animate-spin rounded-full border-2 border-foreground/10 border-t-primary" />
|
<span className="size-4.5 animate-spin rounded-full border-2 border-foreground/10 border-t-accent" />
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export function HeaderActionButton({
|
|||||||
{showIndicator && (
|
{showIndicator && (
|
||||||
<span
|
<span
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
className="absolute top-1 right-1 inline-flex size-2 animate-pulse rounded-md bg-primary"
|
className="absolute top-1 right-1 inline-flex size-2 animate-pulse rounded-md bg-accent"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export function SidebarFlyoutMenuItems({
|
|||||||
<DropdownMenuSubTrigger
|
<DropdownMenuSubTrigger
|
||||||
aria-current={routeState.isCurrent ? "page" : undefined}
|
aria-current={routeState.isCurrent ? "page" : undefined}
|
||||||
data-route-active={routeState.isActive ? "" : undefined}
|
data-route-active={routeState.isActive ? "" : undefined}
|
||||||
className="h-9 gap-3 px-3 py-1 data-route-active:bg-primary/10 data-route-active:text-primary! data-route-active:**:text-primary!"
|
className="h-9 gap-3 px-3 py-1 data-route-active:bg-accent/10 data-route-active:text-accent! data-route-active:**:text-accent!"
|
||||||
>
|
>
|
||||||
{iconElement}
|
{iconElement}
|
||||||
<span className="min-w-0 flex-1 truncate">
|
<span className="min-w-0 flex-1 truncate">
|
||||||
@@ -56,7 +56,7 @@ export function SidebarFlyoutMenuItems({
|
|||||||
key={item.id}
|
key={item.id}
|
||||||
aria-current={routeState.isCurrent ? "page" : undefined}
|
aria-current={routeState.isCurrent ? "page" : undefined}
|
||||||
data-route-active={routeState.isActive ? "" : undefined}
|
data-route-active={routeState.isActive ? "" : undefined}
|
||||||
className="h-9 gap-3 px-3 py-1 data-route-active:bg-primary/10 data-route-active:text-primary! data-route-active:**:text-primary!"
|
className="h-9 gap-3 px-3 py-1 data-route-active:bg-accent/10 data-route-active:text-accent! data-route-active:**:text-accent!"
|
||||||
render={item.to ? <NavigationLink to={item.to} /> : undefined}
|
render={item.to ? <NavigationLink to={item.to} /> : undefined}
|
||||||
>
|
>
|
||||||
{iconElement}
|
{iconElement}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export function NavigationButton({
|
|||||||
const baseButtonProps: useRender.ElementProps<"button"> = {
|
const baseButtonProps: useRender.ElementProps<"button"> = {
|
||||||
className: cn(
|
className: cn(
|
||||||
"group/button relative items-center rounded-md [&>span]:inline-flex [&>span]:items-center",
|
"group/button relative items-center rounded-md [&>span]:inline-flex [&>span]:items-center",
|
||||||
"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground data-route-active:bg-primary/10 data-route-active:text-primary dark:hover:bg-muted/50 dark:aria-expanded:bg-muted/50 dark:data-route-active:bg-muted/50",
|
"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground data-route-active:bg-accent/10 data-route-active:text-accent dark:hover:bg-muted/50 dark:aria-expanded:bg-muted/50 dark:data-route-active:bg-muted/50",
|
||||||
layout === "stacked"
|
layout === "stacked"
|
||||||
? [
|
? [
|
||||||
"grid grid-cols-[minmax(0,1fr)_auto_auto_minmax(0,1fr)]",
|
"grid grid-cols-[minmax(0,1fr)_auto_auto_minmax(0,1fr)]",
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ export function NotificationItem({
|
|||||||
role="listitem"
|
role="listitem"
|
||||||
data-read={notification.isRead}
|
data-read={notification.isRead}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative rounded-none px-4 py-3.5 hover:bg-muted data-[read=false]:bg-primary/[0.035]",
|
"relative rounded-none px-4 py-3.5 hover:bg-muted data-[read=false]:bg-accent/[0.035]",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
@@ -167,7 +167,7 @@ export function NotificationItem({
|
|||||||
</ItemMedia>
|
</ItemMedia>
|
||||||
)}
|
)}
|
||||||
<ItemContent>
|
<ItemContent>
|
||||||
<ItemTitle className="line-clamp-2 [&_a:hover]:text-primary">
|
<ItemTitle className="line-clamp-2 [&_a:hover]:text-accent">
|
||||||
{notification.to ? (
|
{notification.to ? (
|
||||||
<NotificationRouteLink to={notification.to}>
|
<NotificationRouteLink to={notification.to}>
|
||||||
{notification.title}
|
{notification.title}
|
||||||
@@ -204,7 +204,7 @@ export function NotificationItem({
|
|||||||
{!notification.isRead && (
|
{!notification.isRead && (
|
||||||
<span
|
<span
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
className="mt-2 size-2 shrink-0 self-start rounded-full bg-primary"
|
className="mt-2 size-2 shrink-0 self-start rounded-full bg-accent"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{notification.actions && notification.actions.length > 0 && (
|
{notification.actions && notification.actions.length > 0 && (
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ function ColorPickerControl({
|
|||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex h-9 items-center gap-2 rounded-lg border px-2 focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/50 hover:bg-muted">
|
<div className="flex h-9 items-center gap-2 rounded-lg border px-2 focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/50 hover:bg-muted">
|
||||||
<label className="relative grid size-6 shrink-0 cursor-pointer place-items-center rounded-md hover:bg-accent">
|
<label className="relative grid size-6 shrink-0 cursor-pointer place-items-center rounded-md hover:bg-highlight">
|
||||||
<Pipette className="size-4 text-muted-foreground" />
|
<Pipette className="size-4 text-muted-foreground" />
|
||||||
<input
|
<input
|
||||||
type="color"
|
type="color"
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ function DateControl({
|
|||||||
return (
|
return (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
className={cn(active && "bg-accent text-accent-foreground")}
|
className={cn(active && "bg-highlight text-highlight-foreground")}
|
||||||
onMouseDown={(event) => event.preventDefault()}
|
onMouseDown={(event) => event.preventDefault()}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
runWithEditorFocus(context.editor, () => {
|
runWithEditorFocus(context.editor, () => {
|
||||||
|
|||||||
@@ -224,14 +224,14 @@ export function ImageResizer({
|
|||||||
<>
|
<>
|
||||||
<span
|
<span
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
className="pointer-events-none absolute inset-0 rounded-[inherit] border-2 border-primary"
|
className="pointer-events-none absolute inset-0 rounded-[inherit] border-2 border-accent"
|
||||||
/>
|
/>
|
||||||
{RESIZE_HANDLES.map((handle) => (
|
{RESIZE_HANDLES.map((handle) => (
|
||||||
<button
|
<button
|
||||||
key={handle.direction}
|
key={handle.direction}
|
||||||
type="button"
|
type="button"
|
||||||
aria-label={resizeLabels[handle.direction]}
|
aria-label={resizeLabels[handle.direction]}
|
||||||
className={`absolute z-10 size-2.5 rounded-[2px] border border-primary bg-background shadow-xs ${handle.className}`}
|
className={`absolute z-10 size-2.5 rounded-[2px] border border-accent bg-background shadow-xs ${handle.className}`}
|
||||||
data-lexical-image-resize-handle={handle.direction}
|
data-lexical-image-resize-handle={handle.direction}
|
||||||
style={{ cursor: handle.cursor }}
|
style={{ cursor: handle.cursor }}
|
||||||
onPointerDown={(event) => startResize(event, handle.direction)}
|
onPointerDown={(event) => startResize(event, handle.direction)}
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ function LexicalEmbed({
|
|||||||
data-lexical-embed-type={embedType}
|
data-lexical-embed-type={embedType}
|
||||||
className={cn(
|
className={cn(
|
||||||
"my-3 rounded-xl",
|
"my-3 rounded-xl",
|
||||||
isSelected && "ring-2 ring-primary ring-offset-2 ring-offset-background"
|
isSelected && "ring-2 ring-accent ring-offset-2 ring-offset-background"
|
||||||
)}
|
)}
|
||||||
onClick={(event) => {
|
onClick={(event) => {
|
||||||
if (!event.shiftKey) clearSelection()
|
if (!event.shiftKey) clearSelection()
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ function LexicalMedia({
|
|||||||
payload.alignment === "end" && "items-end",
|
payload.alignment === "end" && "items-end",
|
||||||
payload.kind === "video" &&
|
payload.kind === "video" &&
|
||||||
isSelected &&
|
isSelected &&
|
||||||
"ring-2 ring-primary ring-offset-2 ring-offset-background"
|
"ring-2 ring-accent ring-offset-2 ring-offset-background"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{payload.kind === "image" ? (
|
{payload.kind === "image" ? (
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ export function LexicalDraggableBlockPlugin() {
|
|||||||
ref={targetLineRef}
|
ref={targetLineRef}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
data-slot="lexical-drop-indicator"
|
data-slot="lexical-drop-indicator"
|
||||||
className="pointer-events-none absolute top-0 left-0 z-20 h-1 rounded-full bg-primary opacity-0"
|
className="pointer-events-none absolute top-0 left-0 z-20 h-1 rounded-full bg-accent opacity-0"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ export function LexicalLinkPopoverPlugin() {
|
|||||||
href={activeLink.url}
|
href={activeLink.url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
className="block max-h-24 overflow-y-auto px-1 break-all text-primary underline underline-offset-3"
|
className="block max-h-24 overflow-y-auto px-1 break-all text-accent underline underline-offset-3"
|
||||||
>
|
>
|
||||||
{activeLink.url}
|
{activeLink.url}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.lexical-checklist-item-checked::before {
|
.lexical-checklist-item-checked::before {
|
||||||
border-color: var(--color-primary);
|
border-color: var(--color-accent);
|
||||||
background: var(--color-primary);
|
background: var(--color-accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.lexical-checklist-item-checked::after {
|
.lexical-checklist-item-checked::after {
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
width: 0.3rem;
|
width: 0.3rem;
|
||||||
height: 0.55rem;
|
height: 0.55rem;
|
||||||
content: "";
|
content: "";
|
||||||
border: solid var(--color-primary-foreground);
|
border: solid var(--color-accent-foreground);
|
||||||
border-width: 0 0.125rem 0.125rem 0;
|
border-width: 0 0.125rem 0.125rem 0;
|
||||||
transform: rotate(45deg);
|
transform: rotate(45deg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export const lexicalTheme = {
|
|||||||
h3: "mt-3 mb-2 text-lg font-semibold",
|
h3: "mt-3 mb-2 text-lg font-semibold",
|
||||||
},
|
},
|
||||||
hr: "my-4 border-t",
|
hr: "my-4 border-t",
|
||||||
link: "text-primary underline underline-offset-2",
|
link: "text-accent underline underline-offset-2",
|
||||||
list: {
|
list: {
|
||||||
checklist: "lexical-checklist",
|
checklist: "lexical-checklist",
|
||||||
listitem: "my-1",
|
listitem: "my-1",
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export function MediaGrid({
|
|||||||
onDoubleClick={() => onDetails(asset)}
|
onDoubleClick={() => onDetails(asset)}
|
||||||
className={cn(
|
className={cn(
|
||||||
"group relative mb-3 block w-full break-inside-avoid overflow-hidden rounded-lg bg-muted text-left ring-offset-2 ring-offset-background transition-shadow outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
"group relative mb-3 block w-full break-inside-avoid overflow-hidden rounded-lg bg-muted text-left ring-offset-2 ring-offset-background transition-shadow outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
||||||
(active || selected) && "ring-2 ring-primary"
|
(active || selected) && "ring-2 ring-accent"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{asset.kind === "image" ? (
|
{asset.kind === "image" ? (
|
||||||
@@ -90,7 +90,7 @@ export function MediaGrid({
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
{selected && (
|
{selected && (
|
||||||
<span className="absolute top-2 right-2 grid size-6 place-items-center rounded-full bg-primary text-primary-foreground shadow">
|
<span className="absolute top-2 right-2 grid size-6 place-items-center rounded-full bg-accent text-accent-foreground shadow">
|
||||||
<CheckIcon className="size-4" strokeWidth={3} />
|
<CheckIcon className="size-4" strokeWidth={3} />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ export function MediaFilterTabs({
|
|||||||
className={cn(
|
className={cn(
|
||||||
"flex h-8 shrink-0 items-center gap-1.5 rounded-lg px-3 text-xs",
|
"flex h-8 shrink-0 items-center gap-1.5 rounded-lg px-3 text-xs",
|
||||||
folder === undefined && filter === value
|
folder === undefined && filter === value
|
||||||
? "bg-primary text-primary-foreground"
|
? "bg-accent text-accent-foreground"
|
||||||
: "bg-muted"
|
: "bg-muted"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
@@ -259,7 +259,7 @@ function SidebarButton({
|
|||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex h-9 w-full items-center gap-2 rounded-lg px-3 text-start text-sm transition-colors outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/30",
|
"flex h-9 w-full items-center gap-2 rounded-lg px-3 text-start text-sm transition-colors outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/30",
|
||||||
active && "bg-primary text-primary-foreground hover:bg-primary"
|
active && "bg-accent text-accent-foreground hover:bg-accent"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Icon className="size-4" />
|
<Icon className="size-4" />
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ export function PageTabsTrigger({ className, ...props }: PageTabsTriggerProps) {
|
|||||||
variant === "card" &&
|
variant === "card" &&
|
||||||
getCardPageTabsClassName(
|
getCardPageTabsClassName(
|
||||||
side,
|
side,
|
||||||
"bg-muted/20 not-data-active:hover:bg-muted data-active:border-transparent data-active:bg-transparent data-active:text-primary"
|
"bg-muted/20 not-data-active:hover:bg-muted data-active:border-transparent data-active:bg-transparent data-active:text-accent"
|
||||||
),
|
),
|
||||||
variant === "default" && "rounded-lg px-3 data-active:text-foreground",
|
variant === "default" && "rounded-lg px-3 data-active:text-foreground",
|
||||||
className
|
className
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export function SearchDialog({
|
|||||||
<label className="flex h-full min-w-0 flex-1 items-center gap-2">
|
<label className="flex h-full min-w-0 flex-1 items-center gap-2">
|
||||||
<span className="inline-flex size-8 shrink-0 items-center justify-center">
|
<span className="inline-flex size-8 shrink-0 items-center justify-center">
|
||||||
{search.isLoading || search.isLoadingMore ? (
|
{search.isLoading || search.isLoadingMore ? (
|
||||||
<LoaderCircleIcon className="animate-spin text-primary" />
|
<LoaderCircleIcon className="animate-spin text-accent" />
|
||||||
) : (
|
) : (
|
||||||
<SearchIcon className="opacity-50" />
|
<SearchIcon className="opacity-50" />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ function SearchResultRow({
|
|||||||
</span>
|
</span>
|
||||||
))}
|
))}
|
||||||
</span>
|
</span>
|
||||||
<CornerDownLeftIcon className="shrink-0 text-primary opacity-0 transition-opacity group-hover/search-result:opacity-100 group-data-selected/search-result:opacity-100" />
|
<CornerDownLeftIcon className="shrink-0 text-accent opacity-0 transition-opacity group-hover/search-result:opacity-100 group-data-selected/search-result:opacity-100" />
|
||||||
</Command.Item>
|
</Command.Item>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -165,7 +165,7 @@ function HighlightedText({ text, query }: { text: string; query: string }) {
|
|||||||
offset += segment.text.length
|
offset += segment.text.length
|
||||||
|
|
||||||
return segment.highlighted ? (
|
return segment.highlighted ? (
|
||||||
<mark key={key} className="rounded-sm bg-primary/15 px-0.5 text-primary">
|
<mark key={key} className="rounded-sm bg-accent/15 px-0.5 text-accent">
|
||||||
{segment.text}
|
{segment.text}
|
||||||
</mark>
|
</mark>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user