Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 665d33c

Browse files
author
Will Ceolin
committed
Deps: Update Tailwind formatter
1 parent b9abd22 commit 665d33c

File tree

17 files changed

+47
-77
lines changed

17 files changed

+47
-77
lines changed

.formatter.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
import_deps: [:ecto, :ecto_sql, :phoenix],
33
subdirectories: ["priv/*/migrations", "priv/*/seed"],
4-
plugins: [Styler, Phoenix.LiveView.HTMLFormatter, TailwindFormatter],
4+
plugins: [Styler, TailwindFormatter, Phoenix.LiveView.HTMLFormatter],
55
inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}", "priv/*/seeds.exs"],
66
line_length: 175
77
]

lib/components/badge.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ defmodule UneebeeWeb.Components.Badge do
3434
~H"""
3535
<span
3636
class={[
37-
"inline-flex items-center px-2.5 py-0.5 w-max max-w-full gap-1 rounded-full text-xs font-medium leading-4",
37+
"inline-flex w-max max-w-full items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium leading-4",
3838
@color == :black && "bg-gray-dark text-white",
3939
@color == :alert && "bg-alert text-white",
4040
@color == :success && "bg-success text-white",

lib/components/button.ex

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,22 @@ defmodule UneebeeWeb.Components.Button do
3131
~H"""
3232
<button
3333
class={[
34-
"flex justify-center items-center gap-2",
35-
"phx-submit-loading:opacity-75 rounded-lg py-2 px-3 focus:outline-offset-2",
34+
"flex items-center justify-center gap-2",
35+
"rounded-lg px-3 py-2 focus:outline-offset-2 phx-submit-loading:opacity-75",
3636
"text-sm font-semibold leading-6",
37-
"disabled:bg-gray-light2x disabled:cursor-not-allowed disabled:text-gray-light",
38-
@color == :black && "bg-gray-dark shadow-b-gray active:shadow-b-gray-pressed text-white hover:bg-gray-dark2x focus:outline-gray-dark",
39-
@color == :alert &&
40-
"bg-alert text-white shadow-b-alert-dark active:shadow-b-alert-dark-pressed hover:bg-alert-dark focus:outline-alert",
41-
@color == :success && "bg-success text-white shadow-b-success-dark active:shadow-b-success-dark-pressed hover:bg-success-dark focus:outline-success",
42-
@color == :info && "bg-info text-white shadow-b-info-dark active:shadow-b-info-dark-pressed hover:bg-info-dark focus:outline-info",
43-
@color == :warning && "bg-warning text-white shadow-b-warning-dark active:shadow-b-warning-dark-pressed hover:bg-warning-dark focus:outline-warning",
44-
@color == :black_light && "bg-gray-light3x text-gray-dark2x shadow-b-gray-light active:shadow-b-gray-light-pressed hover:bg-gray-light2x focus:outline-gray-light3x",
45-
@color == :alert_light && "bg-alert-light3x text-alert-dark2x shadow-b-alert-light active:shadow-b-alert-light-pressed hover:bg-alert-light2x focus:outline-alert-light3x",
46-
@color == :info_light && "bg-info-light3x text-info-dark2x shadow-b-info-light active:shadow-b-info-light-pressed hover:bg-info-light2x focus:outline-info-light3x",
37+
"disabled:bg-gray-light2x disabled:text-gray-light disabled:cursor-not-allowed",
38+
@color == :black && "bg-gray-dark shadow-b-gray text-white hover:bg-gray-dark2x focus:outline-gray-dark active:shadow-b-gray-pressed",
39+
@color == :alert && "bg-alert shadow-b-alert-dark text-white hover:bg-alert-dark focus:outline-alert active:shadow-b-alert-dark-pressed",
40+
@color == :success && "bg-success shadow-b-success-dark text-white hover:bg-success-dark focus:outline-success active:shadow-b-success-dark-pressed",
41+
@color == :info && "bg-info shadow-b-info-dark text-white hover:bg-info-dark focus:outline-info active:shadow-b-info-dark-pressed",
42+
@color == :warning && "bg-warning shadow-b-warning-dark text-white hover:bg-warning-dark focus:outline-warning active:shadow-b-warning-dark-pressed",
43+
@color == :black_light && "bg-gray-light3x text-gray-dark2x shadow-b-gray-light hover:bg-gray-light2x focus:outline-gray-light3x active:shadow-b-gray-light-pressed",
44+
@color == :alert_light && "bg-alert-light3x text-alert-dark2x shadow-b-alert-light hover:bg-alert-light2x focus:outline-alert-light3x active:shadow-b-alert-light-pressed",
45+
@color == :info_light && "bg-info-light3x text-info-dark2x shadow-b-info-light hover:bg-info-light2x focus:outline-info-light3x active:shadow-b-info-light-pressed",
4746
@color == :success_light &&
48-
"bg-success-light3x text-success-dark2x shadow-b-success-light active:shadow-b-success-light-pressed hover:bg-success-light2x focus:outline-success-light3x",
47+
"bg-success-light3x text-success-dark2x shadow-b-success-light hover:bg-success-light2x focus:outline-success-light3x active:shadow-b-success-light-pressed",
4948
@color == :warning_light &&
50-
"bg-warning-light3x text-warning-dark2x shadow-b-warning-light active:shadow-b-warning-light-pressed hover:bg-warning-light2x focus:outline-warning-light3x",
49+
"bg-warning-light3x text-warning-dark2x shadow-b-warning-light hover:bg-warning-light2x focus:outline-warning-light3x active:shadow-b-warning-light-pressed",
5150
@class
5251
]}
5352
{@rest}
@@ -81,22 +80,21 @@ defmodule UneebeeWeb.Components.Button do
8180
<button
8281
class={[
8382
"flex items-center justify-center",
84-
"phx-submit-loading:opacity-75 rounded-lg py-2 px-3 focus:outline-offset-2",
83+
"rounded-lg px-3 py-2 focus:outline-offset-2 phx-submit-loading:opacity-75",
8584
"text-sm font-semibold leading-6",
86-
"disabled:bg-gray-light2x disabled:cursor-not-allowed disabled:text-gray-light",
87-
@color == :black && "bg-gray-dark shadow-b-gray active:shadow-b-gray-pressed text-white hover:bg-gray-dark2x focus:outline-gray-dark",
88-
@color == :alert &&
89-
"bg-alert text-white shadow-b-alert-dark active:shadow-b-alert-dark-pressed hover:bg-alert-dark focus:outline-alert",
90-
@color == :success && "bg-success text-white shadow-b-success-dark active:shadow-b-success-dark-pressed hover:bg-success-dark focus:outline-success",
91-
@color == :info && "bg-info text-white shadow-b-info-dark active:shadow-b-info-dark-pressed hover:bg-info-dark focus:outline-info",
92-
@color == :warning && "bg-warning text-white shadow-b-warning-dark active:shadow-b-warning-dark-pressed hover:bg-warning-dark focus:outline-warning",
93-
@color == :black_light && "bg-gray-light3x text-gray-dark2x shadow-b-gray-light active:shadow-b-gray-light-pressed hover:bg-gray-light2x focus:outline-gray-light3x",
94-
@color == :alert_light && "bg-alert-light3x text-alert-dark2x shadow-b-alert-light active:shadow-b-alert-light-pressed hover:bg-alert-light2x focus:outline-alert-light3x",
95-
@color == :info_light && "bg-info-light3x text-info-dark2x shadow-b-info-light active:shadow-b-info-light-pressed hover:bg-info-light2x focus:outline-info-light3x",
85+
"disabled:bg-gray-light2x disabled:text-gray-light disabled:cursor-not-allowed",
86+
@color == :black && "bg-gray-dark shadow-b-gray text-white hover:bg-gray-dark2x focus:outline-gray-dark active:shadow-b-gray-pressed",
87+
@color == :alert && "bg-alert shadow-b-alert-dark text-white hover:bg-alert-dark focus:outline-alert active:shadow-b-alert-dark-pressed",
88+
@color == :success && "bg-success shadow-b-success-dark text-white hover:bg-success-dark focus:outline-success active:shadow-b-success-dark-pressed",
89+
@color == :info && "bg-info shadow-b-info-dark text-white hover:bg-info-dark focus:outline-info active:shadow-b-info-dark-pressed",
90+
@color == :warning && "bg-warning shadow-b-warning-dark text-white hover:bg-warning-dark focus:outline-warning active:shadow-b-warning-dark-pressed",
91+
@color == :black_light && "bg-gray-light3x text-gray-dark2x shadow-b-gray-light hover:bg-gray-light2x focus:outline-gray-light3x active:shadow-b-gray-light-pressed",
92+
@color == :alert_light && "bg-alert-light3x text-alert-dark2x shadow-b-alert-light hover:bg-alert-light2x focus:outline-alert-light3x active:shadow-b-alert-light-pressed",
93+
@color == :info_light && "bg-info-light3x text-info-dark2x shadow-b-info-light hover:bg-info-light2x focus:outline-info-light3x active:shadow-b-info-light-pressed",
9694
@color == :success_light &&
97-
"bg-success-light3x text-success-dark2x shadow-b-success-light active:shadow-b-success-light-pressed hover:bg-success-light2x focus:outline-success-light3x",
95+
"bg-success-light3x text-success-dark2x shadow-b-success-light hover:bg-success-light2x focus:outline-success-light3x active:shadow-b-success-light-pressed",
9896
@color == :warning_light &&
99-
"bg-warning-light3x text-warning-dark2x shadow-b-warning-light active:shadow-b-warning-light-pressed hover:bg-warning-light2x focus:outline-warning-light3x",
97+
"bg-warning-light3x text-warning-dark2x shadow-b-warning-light hover:bg-warning-light2x focus:outline-warning-light3x active:shadow-b-warning-light-pressed",
10098
@size == :sm && "h-6 w-6",
10199
@size == :md && "h-8 w-8",
102100
@size == :lg && "h-10 w-10"

lib/components/details.ex

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,7 @@ defmodule UneebeeWeb.Components.Details do
2626

2727
def details(assigns) do
2828
~H"""
29-
<details class={[
30-
"group w-full p-4 text-sm min-w-0",
31-
@rounded && "rounded-lg",
32-
@shadow && "shadow",
33-
@class
34-
]}>
29+
<details class={["group w-full min-w-0 p-4 text-sm", @rounded && "rounded-lg", @shadow && "shadow", @class]}>
3530
<summary class="flex cursor-pointer items-center justify-between gap-1 font-bold">
3631
<.icon name="tabler-chevrons-down" class="group-open:hidden" gradient />
3732
<.icon name="tabler-chevrons-up" class="hidden group-open:inline" gradient />

lib/components/flash.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ defmodule UneebeeWeb.Components.Flash do
3838
data-kind={@kind}
3939
role="alert"
4040
class={[
41-
"fixed top-2 right-2 mr-2 w-80 sm:w-96 z-50 rounded-lg p-3 ring-1 transition-opacity duration-500 ease-in-out",
41+
"fixed top-2 right-2 z-50 mr-2 w-80 rounded-lg p-3 ring-1 transition-opacity duration-500 ease-in-out sm:w-96",
4242
@kind == :info && "bg-success-light3x text-success-dark ring-success fill-info-dark",
43-
@kind == :error && "bg-alert-light3x text-alert-dark shadow-md ring-alert fill-alert-dark"
43+
@kind == :error && "bg-alert-light3x text-alert-dark ring-alert fill-alert-dark shadow-md"
4444
]}
4545
{@rest}
4646
>

lib/components/icon.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ defmodule UneebeeWeb.Components.Icon do
3232
"shrink-0",
3333
@name,
3434
@gradient and
35-
"relative before:content-['*'] before:absolute before:top-0 before:left-0 before:w-full before:h-full before:bg-gradient-to-br before:from-info before:via-primary before:to-alert",
35+
"relative before:content-['*'] before:from-info before:via-primary before:to-alert before:absolute before:top-0 before:left-0 before:h-full before:w-full before:bg-gradient-to-br",
3636
@class
3737
]}
3838
>

lib/components/input.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ defmodule UneebeeWeb.Components.Input do
9898
id={@id}
9999
name={@name}
100100
class={[
101-
"mt-2 block min-h-[6rem] w-full rounded-lg py-[7px] px-[11px]",
102-
"text-gray-dark focus:border-primary focus:outline-none focus:ring-4 focus:ring-gray-dark/5 sm:text-sm sm:leading-6",
101+
"min-h-[6rem] py-[7px] px-[11px] mt-2 block w-full rounded-lg",
102+
"text-gray-dark focus:border-primary focus:ring-gray-dark/5 focus:outline-none focus:ring-4 sm:text-sm sm:leading-6",
103103
@errors == [] && "border-gray-light2x focus:border-primary focus:ring-gray-dark/5",
104104
@errors != [] && "border-alert focus:border-alert focus:ring-alert/10"
105105
]}
@@ -122,7 +122,7 @@ defmodule UneebeeWeb.Components.Input do
122122
id={@id}
123123
value={Form.normalize_value(@type, @value)}
124124
class={[
125-
"mt-2 block w-full rounded-lg py-2 px-3",
125+
"mt-2 block w-full rounded-lg px-3 py-2",
126126
"text-gray-dark2x focus:outline-none focus:ring-4 sm:text-sm sm:leading-6",
127127
@errors == [] && "border-gray-light2x focus:border-primary focus:ring-gray-dark/5",
128128
@errors != [] && "border-alert focus:border-alert focus:ring-alert/10"

lib/components/menu.ex

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,7 @@ defmodule UneebeeWeb.Components.Menu do
4444

4545
def menu_item(assigns) do
4646
~H"""
47-
<li
48-
class={[
49-
"text-gray-dark py-2 last:max-lg:pb-0 lg:first:rounded-t-2xl lg:last:rounded-b-2xl",
50-
not @active and "hover:bg-gray-light3x"
51-
]}
52-
aria-current={@active and "page"}
53-
>
47+
<li class={["text-gray-dark py-2 last:max-lg:pb-0 lg:first:rounded-t-2xl lg:last:rounded-b-2xl", not @active and "hover:bg-gray-light3x"]} aria-current={@active and "page"}>
5448
<.link class="flex items-center gap-2 focus:outline-primary lg:items-center lg:p-2" title={@title} {@rest}>
5549
<.icon name={@icon} gradient={@active} class="h-3 w-3 lg:h-5 lg:w-5" />
5650
<span class={[@active and "text-gradient"]}><%= @title %></span>

lib/components/progress.ex

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,7 @@ defmodule UneebeeWeb.Components.Progress do
1414
<% total = calculate_total(@total) %>
1515
<% current = calculate_current(@current, @total) %>
1616
<% steps = Enum.map(1..total, fn order -> order end) %>
17-
<div
18-
:for={step <- steps}
19-
class={[
20-
"rounded-2xl w-full h-4 flex-1",
21-
step <= current && "bg-success-light",
22-
step > current && "bg-gray-light3x"
23-
]}
24-
/>
17+
<div :for={step <- steps} class={["h-4 w-full flex-1 rounded-2xl", step <= current && "bg-success-light", step > current && "bg-gray-light3x"]} />
2518
</div>
2619
"""
2720
end

lib/components/upload.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ defmodule UneebeeWeb.Components.Upload do
1414
@impl Phoenix.LiveComponent
1515
def render(assigns) do
1616
~H"""
17-
<section class={["h-max space-y-4", not @unstyled && "bg-white p-4 card"]}>
17+
<section class={["h-max space-y-4", not @unstyled && "card bg-white p-4"]}>
1818
<% entry = List.first(@uploads.file.entries) %>
1919
2020
<.header :if={@label}>

0 commit comments

Comments
 (0)