- {kicker &&
{kicker}}
- {title &&
{title}
}
- {children &&
{children}
}
- {meta &&
{meta}
}
+
+ {kicker &&
{kicker}}
+ {title &&
{title}
}
+ {children &&
{children}
}
+ {meta &&
{meta}
}
)
}
diff --git a/components/ui/checkbox.tsx b/components/ui/checkbox.tsx
new file mode 100644
index 0000000..2eed62d
--- /dev/null
+++ b/components/ui/checkbox.tsx
@@ -0,0 +1,34 @@
+import { Check, Minus } from 'lucide-react'
+import { cx } from './cx'
+
+export function Checkbox({
+ checked,
+ indeterminate = false,
+ onChange,
+ label,
+}: {
+ checked: boolean
+ indeterminate?: boolean
+ onChange: (next: boolean) => void
+ label: string
+}) {
+ const on = checked || indeterminate
+ return (
+
+ )
+}
diff --git a/components/ui/drawer.tsx b/components/ui/drawer.tsx
new file mode 100644
index 0000000..3f516e2
--- /dev/null
+++ b/components/ui/drawer.tsx
@@ -0,0 +1,51 @@
+'use client'
+
+import { useEffect } from 'react'
+import { X } from 'lucide-react'
+import { Button } from './button'
+
+export function Drawer({
+ open,
+ onClose,
+ title,
+ actions,
+ children,
+}: {
+ open: boolean
+ onClose: () => void
+ title: string
+ actions?: React.ReactNode
+ children: React.ReactNode
+}) {
+ useEffect(() => {
+ if (!open) return
+ const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') onClose() }
+ document.addEventListener('keydown', onKey)
+ return () => document.removeEventListener('keydown', onKey)
+ }, [open, onClose])
+
+ if (!open) return null
+
+ return (
+
+
+
+
+ )
+}
diff --git a/components/ui/field.tsx b/components/ui/field.tsx
index 7c85ffa..2815fd1 100644
--- a/components/ui/field.tsx
+++ b/components/ui/field.tsx
@@ -2,14 +2,13 @@ import type { InputHTMLAttributes, ReactNode, SelectHTMLAttributes, TextareaHTML
import { cx } from './cx'
export const INPUT_CLASS =
- 'w-full min-h-9 px-2.5 py-1.5 text-sm text-ink caret-accent bg-surface border border-divider ' +
- 'hover:border-ink/45 focus-visible:border-accent focus-visible:outline-offset-0 ' +
- 'disabled:opacity-45 disabled:cursor-not-allowed'
+ 'w-full h-9 px-3 rounded-md bg-surface text-[13px] text-ink caret-accent shadow-input ' +
+ 'placeholder:text-faint disabled:opacity-45 disabled:cursor-not-allowed'
export function Field({ label, htmlFor, children }: { label: string; htmlFor: string; children: ReactNode }) {
return (
-