@deck-ui/routines 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deck-ui/routines",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -10,7 +10,7 @@ export interface RoutineCardProps {
10
10
 
11
11
  const STATUS_DOT: Record<string, string> = {
12
12
  active: "bg-green-500",
13
- paused: "bg-[#9b9b9b]",
13
+ paused: "bg-muted-foreground",
14
14
  needs_setup: "bg-yellow-500",
15
15
  error: "bg-red-500",
16
16
  }
@@ -38,25 +38,25 @@ export function RoutineCard({ routine, onClick }: RoutineCardProps) {
38
38
  <button
39
39
  onClick={onClick}
40
40
  className={cn(
41
- "w-full text-left rounded-2xl border border-black/[0.08] p-5",
42
- "bg-white hover:border-black/[0.15] transition-all duration-150",
41
+ "w-full text-left rounded-2xl border border-border p-5",
42
+ "bg-white hover:border-border/80 transition-all duration-150",
43
43
  "hover:shadow-[0_2px_8px_rgba(0,0,0,0.04)]",
44
44
  "flex flex-col gap-3",
45
45
  )}
46
46
  >
47
47
  {/* Top: name + status */}
48
48
  <div className="flex items-start gap-2.5">
49
- <h3 className="text-[15px] font-medium text-[#0d0d0d] leading-snug flex-1 min-w-0">
49
+ <h3 className="text-[15px] font-medium text-foreground leading-snug flex-1 min-w-0">
50
50
  {displayName}
51
51
  </h3>
52
52
  <div className="flex items-center gap-1.5 shrink-0 mt-0.5">
53
53
  <div
54
54
  className={cn(
55
55
  "size-1.5 rounded-full",
56
- STATUS_DOT[routine.status] ?? "bg-[#9b9b9b]",
56
+ STATUS_DOT[routine.status] ?? "bg-muted-foreground",
57
57
  )}
58
58
  />
59
- <span className="text-xs text-[#9b9b9b]">
59
+ <span className="text-xs text-muted-foreground">
60
60
  {STATUS_LABEL[routine.status] ?? routine.status}
61
61
  </span>
62
62
  </div>
@@ -64,13 +64,13 @@ export function RoutineCard({ routine, onClick }: RoutineCardProps) {
64
64
 
65
65
  {/* Description */}
66
66
  {routine.description && (
67
- <p className="text-sm text-[#5d5d5d] leading-relaxed line-clamp-2">
67
+ <p className="text-sm text-muted-foreground leading-relaxed line-clamp-2">
68
68
  {routine.description}
69
69
  </p>
70
70
  )}
71
71
 
72
72
  {/* Footer: trigger + last run + run count */}
73
- <div className="flex items-center gap-3 text-xs text-[#9b9b9b] pt-1">
73
+ <div className="flex items-center gap-3 text-xs text-muted-foreground pt-1">
74
74
  <span className="flex items-center gap-1">
75
75
  <Clock className="size-3" />
76
76
  {triggerLabel}
@@ -35,17 +35,17 @@ export function RoutineDetailActions({
35
35
 
36
36
  const pillBtn = cn(
37
37
  "h-9 px-4 text-sm font-medium rounded-full transition-colors",
38
- "border border-black/[0.1]",
38
+ "border border-border",
39
39
  )
40
40
 
41
41
  return (
42
- <div className="flex items-center gap-2 pt-4 border-t border-black/[0.06]">
42
+ <div className="flex items-center gap-2 pt-4 border-t border-border">
43
43
  <button
44
44
  onClick={onSave}
45
45
  disabled={saving}
46
46
  className={cn(
47
47
  "h-9 px-4 text-sm font-medium rounded-full",
48
- "bg-[#0d0d0d] text-white hover:bg-[#0d0d0d]/90 transition-colors",
48
+ "bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
49
49
  "disabled:opacity-50",
50
50
  )}
51
51
  >
@@ -55,13 +55,13 @@ export function RoutineDetailActions({
55
55
  </span>
56
56
  </button>
57
57
 
58
- <button onClick={onRunNow} className={cn(pillBtn, "text-[#0d0d0d] hover:bg-[#f5f5f5]")}>
58
+ <button onClick={onRunNow} className={cn(pillBtn, "text-foreground hover:bg-secondary")}>
59
59
  <span className="flex items-center gap-1.5">
60
60
  <RefreshCw className="size-3.5" /> Run Now
61
61
  </span>
62
62
  </button>
63
63
 
64
- <button onClick={onToggle} className={cn(pillBtn, "text-[#0d0d0d] hover:bg-[#f5f5f5]")}>
64
+ <button onClick={onToggle} className={cn(pillBtn, "text-foreground hover:bg-secondary")}>
65
65
  <span className="flex items-center gap-1.5">
66
66
  {isActive ? (
67
67
  <><Pause className="size-3.5" /> Pause</>
@@ -84,7 +84,7 @@ export function RoutineDetailActions({
84
84
  </button>
85
85
  <button
86
86
  onClick={() => setConfirmDelete(false)}
87
- className={cn(pillBtn, "text-[#0d0d0d] hover:bg-[#f5f5f5]")}
87
+ className={cn(pillBtn, "text-foreground hover:bg-secondary")}
88
88
  >
89
89
  Cancel
90
90
  </button>
@@ -92,7 +92,7 @@ export function RoutineDetailActions({
92
92
  ) : (
93
93
  <button
94
94
  onClick={handleDelete}
95
- className={cn(pillBtn, "text-[#9b9b9b] hover:text-red-600 hover:border-red-200")}
95
+ className={cn(pillBtn, "text-muted-foreground hover:text-red-600 hover:border-red-200")}
96
96
  >
97
97
  <span className="flex items-center gap-1.5">
98
98
  <Trash2 className="size-3.5" /> Delete
@@ -68,7 +68,7 @@ export function RoutineDetailPage({
68
68
  if (!routine || !form) {
69
69
  return (
70
70
  <div className="flex-1 flex items-center justify-center">
71
- <p className="text-sm text-[#9b9b9b]">Routine not found</p>
71
+ <p className="text-sm text-muted-foreground">Routine not found</p>
72
72
  </div>
73
73
  )
74
74
  }
@@ -76,15 +76,15 @@ export function RoutineDetailPage({
76
76
  return (
77
77
  <div className="flex-1 flex flex-col min-h-0 overflow-hidden">
78
78
  {/* Header */}
79
- <div className="shrink-0 px-6 py-3 border-b border-black/[0.06]">
79
+ <div className="shrink-0 px-6 py-3 border-b border-border">
80
80
  <div className="max-w-2xl mx-auto flex items-center gap-3">
81
81
  <button
82
82
  onClick={onBack}
83
- className="size-8 flex items-center justify-center rounded-lg text-[#9b9b9b] hover:text-[#0d0d0d] hover:bg-black/[0.05] transition-colors"
83
+ className="size-8 flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-accent transition-colors"
84
84
  >
85
85
  <ArrowLeft className="size-4" />
86
86
  </button>
87
- <h1 className="text-sm font-medium text-[#0d0d0d] truncate flex-1">
87
+ <h1 className="text-sm font-medium text-foreground truncate flex-1">
88
88
  {form.name || "Untitled"}
89
89
  </h1>
90
90
  </div>
@@ -22,12 +22,12 @@ const TRIGGER_OPTIONS: { value: TriggerType; label: string }[] = [
22
22
  ]
23
23
 
24
24
  const inputClass = cn(
25
- "w-full px-3 py-2 rounded-xl border border-black/[0.08] bg-white",
26
- "text-sm text-[#0d0d0d] placeholder:text-[#b4b4b4]",
27
- "focus:outline-none focus:border-black/20 transition-colors",
25
+ "w-full px-3 py-2 rounded-xl border border-border bg-white",
26
+ "text-sm text-foreground placeholder:text-muted-foreground/60",
27
+ "focus:outline-none focus:border-border/80 transition-colors",
28
28
  )
29
29
 
30
- const labelClass = "text-xs font-medium text-[#8e8e8e] mb-1.5 block"
30
+ const labelClass = "text-xs font-medium text-muted-foreground mb-1.5 block"
31
31
 
32
32
  export function RoutineEditForm({
33
33
  form,
@@ -121,8 +121,8 @@ export function RoutineEditForm({
121
121
  className={cn(
122
122
  "h-9 px-4 rounded-full text-sm font-medium transition-colors",
123
123
  form.approvalMode === mode
124
- ? "bg-[#0d0d0d] text-white"
125
- : "border border-black/[0.1] text-[#5d5d5d] hover:bg-[#f5f5f5]",
124
+ ? "bg-primary text-primary-foreground"
125
+ : "border border-border text-muted-foreground hover:bg-secondary",
126
126
  )}
127
127
  >
128
128
  {mode === "manual" ? "Manual Review" : "Auto-approve"}
@@ -15,10 +15,10 @@ export function RunHistory({ runs, onSelectRun }: RunHistoryProps) {
15
15
  if (runs.length === 0) {
16
16
  return (
17
17
  <div>
18
- <p className="text-xs font-medium text-[#9b9b9b] uppercase tracking-wide mb-2">
18
+ <p className="text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2">
19
19
  Runs
20
20
  </p>
21
- <p className="text-sm text-[#9b9b9b]">No runs yet.</p>
21
+ <p className="text-sm text-muted-foreground">No runs yet.</p>
22
22
  </div>
23
23
  )
24
24
  }
@@ -30,7 +30,7 @@ export function RunHistory({ runs, onSelectRun }: RunHistoryProps) {
30
30
 
31
31
  return (
32
32
  <div>
33
- <p className="text-xs font-medium text-[#9b9b9b] uppercase tracking-wide mb-2">
33
+ <p className="text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2">
34
34
  Run History
35
35
  </p>
36
36
  <div className="space-y-1">
@@ -66,20 +66,20 @@ function RunRow({ run, onClick }: { run: RoutineRun; onClick: () => void }) {
66
66
  case "failed":
67
67
  return <AlertCircle className="size-3.5 text-red-500" />
68
68
  default:
69
- return <Clock className="size-3.5 text-[#9b9b9b]" />
69
+ return <Clock className="size-3.5 text-muted-foreground" />
70
70
  }
71
71
  })()
72
72
 
73
73
  return (
74
74
  <button
75
75
  onClick={onClick}
76
- className="w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-left hover:bg-black/[0.03] transition-colors"
76
+ className="w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-left hover:bg-accent/30 transition-colors"
77
77
  >
78
78
  {icon}
79
- <span className="text-sm text-[#0d0d0d] truncate flex-1">
79
+ <span className="text-sm text-foreground truncate flex-1">
80
80
  {run.output_title || `${dateStr} ${timeStr}`}
81
81
  </span>
82
- <span className="text-xs text-[#9b9b9b] shrink-0">
82
+ <span className="text-xs text-muted-foreground shrink-0">
83
83
  {dateStr} {timeStr}
84
84
  </span>
85
85
  </button>
@@ -52,19 +52,19 @@ export function RoutineRunPage({
52
52
  return (
53
53
  <div className="flex-1 flex flex-col min-h-0 overflow-hidden">
54
54
  {/* Header */}
55
- <div className="shrink-0 px-6 py-3 border-b border-black/[0.06]">
55
+ <div className="shrink-0 px-6 py-3 border-b border-border">
56
56
  <div className="max-w-3xl mx-auto flex items-center gap-3">
57
57
  <button
58
58
  onClick={onBack}
59
- className="size-7 flex items-center justify-center rounded-md text-[#8e8e8e] hover:text-[#0d0d0d] hover:bg-black/[0.04] transition-colors"
59
+ className="size-7 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors"
60
60
  >
61
61
  <ArrowLeft className="size-4" strokeWidth={1.75} />
62
62
  </button>
63
63
  <div className="min-w-0 flex-1">
64
- <p className="text-sm font-medium text-[#0d0d0d] truncate">
64
+ <p className="text-sm font-medium text-foreground truncate">
65
65
  {displayName}
66
66
  </p>
67
- <p className="text-[11px] text-[#8e8e8e]">
67
+ <p className="text-[11px] text-muted-foreground">
68
68
  {runDate}
69
69
  <span className="mx-1">&middot;</span>
70
70
  <span className={cn(isRunning && "text-blue-500")}>
@@ -87,7 +87,7 @@ export function RoutineRunPage({
87
87
  })
88
88
  ) : (
89
89
  <div className="flex-1 flex items-center justify-center">
90
- <p className="text-sm text-[#9b9b9b]">Run not found</p>
90
+ <p className="text-sm text-muted-foreground">Run not found</p>
91
91
  </div>
92
92
  )}
93
93
  </div>
@@ -38,7 +38,7 @@ export function RoutinesGrid({
38
38
  if (loading && routines.length === 0) {
39
39
  return (
40
40
  <div className="flex-1 flex items-center justify-center">
41
- <p className="text-sm text-[#9b9b9b] animate-pulse">
41
+ <p className="text-sm text-muted-foreground animate-pulse">
42
42
  Loading routines...
43
43
  </p>
44
44
  </div>
@@ -52,7 +52,7 @@ export function RoutinesGrid({
52
52
  <h1 className="text-2xl font-semibold text-foreground tracking-tight">
53
53
  Automate recurring work
54
54
  </h1>
55
- <p className="text-sm text-[#5d5d5d]">
55
+ <p className="text-sm text-muted-foreground">
56
56
  Routines run on a schedule so Houston can work for you
57
57
  automatically — daily reports, weekly research, and more.
58
58
  </p>