This commit is contained in:
zack 2024-10-21 19:20:35 -04:00
parent 561ea7543d
commit 43e6b6d318
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35
25 changed files with 8063 additions and 374 deletions

View file

@ -66,7 +66,7 @@ defmodule ZoeyscomputerWeb.CoreComponents do
phx-window-keydown={JS.exec("data-cancel", to: "##{@id}")}
phx-key="escape"
phx-click-away={JS.exec("data-cancel", to: "##{@id}")}
class="shadow-zinc-700/10 ring-zinc-700/10 relative hidden rounded-2xl bg-white p-14 shadow-lg ring-1 transition"
class="shadow-zinc-700/10 ring-zinc-700/10 relative hidden rounded-2xl bg-ctp-base p-14 shadow-lg ring-1 transition"
>
<div class="absolute top-6 right-5">
<button
@ -202,7 +202,7 @@ defmodule ZoeyscomputerWeb.CoreComponents do
def simple_form(assigns) do
~H"""
<.form :let={f} for={@for} as={@as} {@rest}>
<div class="mt-10 space-y-8 bg-white">
<div class="mt-10 space-y-8 bg-ctp-base">
<%= render_slot(@inner_block, f) %>
<div :for={action <- @actions} class="mt-2 flex items-center justify-between gap-6">
<%= render_slot(action, f) %>
@ -310,7 +310,7 @@ defmodule ZoeyscomputerWeb.CoreComponents do
~H"""
<div>
<label class="flex items-center gap-4 text-sm leading-6 text-zinc-600">
<label class="flex items-center gap-4 text-sm leading-6 text-ctp-overlay2">
<input type="hidden" name={@name} value="false" disabled={@rest[:disabled]} />
<input
type="checkbox"
@ -318,7 +318,7 @@ defmodule ZoeyscomputerWeb.CoreComponents do
name={@name}
value="true"
checked={@checked}
class="rounded border-zinc-300 text-zinc-900 focus:ring-0"
class="rounded border-ctp-surface2 text-ctp-overlay2 focus:ring-0"
{@rest}
/>
<%= @label %>
@ -335,7 +335,7 @@ defmodule ZoeyscomputerWeb.CoreComponents do
<select
id={@id}
name={@name}
class="mt-2 block w-full rounded-md border border-gray-300 bg-white shadow-sm focus:border-zinc-400 focus:ring-0 sm:text-sm"
class="mt-2 block w-full rounded-md border border-gray-300 bg-ctp-base shadow-sm focus:border-zinc-400 focus:ring-0 sm:text-sm"
multiple={@multiple}
{@rest}
>
@ -355,8 +355,8 @@ defmodule ZoeyscomputerWeb.CoreComponents do
id={@id}
name={@name}
class={[
"mt-2 block w-full rounded-lg text-zinc-900 focus:ring-0 sm:text-sm sm:leading-6 min-h-[6rem]",
@errors == [] && "border-zinc-300 focus:border-zinc-400",
"mt-2 block w-full rounded-lg text-ctp-overlay2 focus:ring-0 sm:text-sm sm:leading-6 min-h-[6rem]",
@errors == [] && "border-ctp-surface2 focus:border-zinc-400",
@errors != [] && "border-rose-400 focus:border-rose-400"
]}
{@rest}
@ -377,8 +377,8 @@ defmodule ZoeyscomputerWeb.CoreComponents do
id={@id}
value={Phoenix.HTML.Form.normalize_value(@type, @value)}
class={[
"mt-2 block w-full rounded-lg text-zinc-900 focus:ring-0 sm:text-sm sm:leading-6",
@errors == [] && "border-zinc-300 focus:border-zinc-400",
"mt-2 block bg-ctp-base border border-ctp-crust w-full rounded-lg text-ctp-text focus:ring-0 sm:text-sm sm:leading-6",
@errors == [] && "border-ctp-surface2 focus:border-ctp-mauve",
@errors != [] && "border-rose-400 focus:border-rose-400"
]}
{@rest}
@ -396,7 +396,7 @@ defmodule ZoeyscomputerWeb.CoreComponents do
def label(assigns) do
~H"""
<label for={@for} class="block text-sm font-semibold leading-6 text-zinc-800">
<label for={@for} class="block text-sm font-semibold leading-6 text-ctp-text">
<%= render_slot(@inner_block) %>
</label>
"""
@ -429,10 +429,10 @@ defmodule ZoeyscomputerWeb.CoreComponents do
~H"""
<header class={[@actions != [] && "flex items-center justify-between gap-6", @class]}>
<div>
<h1 class="text-lg font-semibold leading-8 text-zinc-800">
<h1 class="text-lg font-semibold leading-8">
<%= render_slot(@inner_block) %>
</h1>
<p :if={@subtitle != []} class="mt-2 text-sm leading-6 text-zinc-600">
<p :if={@subtitle != []} class="mt-2 text-sm leading-6 text-ctp-overlay2">
<%= render_slot(@subtitle) %>
</p>
</div>
@ -486,7 +486,7 @@ defmodule ZoeyscomputerWeb.CoreComponents do
<tbody
id={@id}
phx-update={match?(%Phoenix.LiveView.LiveStream{}, @rows) && "stream"}
class="relative divide-y divide-zinc-100 border-t border-zinc-200 text-sm leading-6 text-zinc-700"
class="relative divide-y divide-zinc-100 border-t border-zinc-200 text-sm leading-6 text-ctp-overlay1"
>
<tr :for={row <- @rows} id={@row_id && @row_id.(row)} class="group hover:bg-zinc-50">
<td
@ -496,7 +496,7 @@ defmodule ZoeyscomputerWeb.CoreComponents do
>
<div class="block py-4 pr-6">
<span class="absolute -inset-y-px right-0 -left-4 group-hover:bg-zinc-50 sm:rounded-l-xl" />
<span class={["relative", i == 0 && "font-semibold text-zinc-900"]}>
<span class={["relative", i == 0 && "font-semibold text-ctp-overlay2"]}>
<%= render_slot(col, @row_item.(row)) %>
</span>
</div>
@ -506,7 +506,7 @@ defmodule ZoeyscomputerWeb.CoreComponents do
<span class="absolute -inset-y-px -right-4 left-0 group-hover:bg-zinc-50 sm:rounded-r-xl" />
<span
:for={action <- @action}
class="relative ml-4 font-semibold leading-6 text-zinc-900 hover:text-zinc-700"
class="relative ml-4 font-semibold leading-6 text-ctp-overlay2 hover:text-ctp-overlay1"
>
<%= render_slot(action, @row_item.(row)) %>
</span>
@ -539,7 +539,7 @@ defmodule ZoeyscomputerWeb.CoreComponents do
<dl class="-my-4 divide-y divide-zinc-100">
<div :for={item <- @item} class="flex gap-4 py-4 text-sm leading-6 sm:gap-8">
<dt class="w-1/4 flex-none text-zinc-500"><%= item.title %></dt>
<dd class="text-zinc-700"><%= render_slot(item) %></dd>
<dd class="text-ctp-overlay1"><%= render_slot(item) %></dd>
</div>
</dl>
</div>
@ -561,7 +561,7 @@ defmodule ZoeyscomputerWeb.CoreComponents do
<div class="mt-16">
<.link
navigate={@navigate}
class="text-sm font-semibold leading-6 text-zinc-900 hover:text-zinc-700"
class="text-sm font-semibold leading-6 text-ctp-overlay2 hover:text-ctp-overlay1"
>
<.icon name="hero-arrow-left-solid" class="h-3 w-3" />
<%= render_slot(@inner_block) %>