Skip to content

Commit

Permalink
Fix list reset classes in heading and sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
angelikatyborska committed Jul 2, 2024
1 parent c1a6fdb commit 71f0ecd
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions lib/bitstyles_phoenix/alpine3/dropdown.ex
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ defmodule BitstylesPhoenix.Alpine3.Dropdown do
</use>
</svg>
</button>
<ul class="a-dropdown u-overflow-y-auto a-list-reset u-margin-s-top" @click.away="dropdownOpen = false" x-cloak="x-cloak" x-show="dropdownOpen" x-transition:enter="is-transitioning" x-transition:enter-end="is-on-screen" x-transition:enter-start="is-off-screen" x-transition:leave="is-transitioning" x-transition:leave-end="is-off-screen" x-transition:leave-start="is-on-screen">
<ul class="a-dropdown u-overflow-y-auto u-list-none u-margin-s-top" @click.away="dropdownOpen = false" x-cloak="x-cloak" x-show="dropdownOpen" x-transition:enter="is-transitioning" x-transition:enter-end="is-on-screen" x-transition:enter-start="is-off-screen" x-transition:leave="is-transitioning" x-transition:leave-end="is-off-screen" x-transition:leave-start="is-on-screen">
<li>
<a href="#" class="a-button a-button--transparent a-button--menu u-h6">
Option 1
Expand Down Expand Up @@ -112,7 +112,7 @@ defmodule BitstylesPhoenix.Alpine3.Dropdown do
</use>
</svg>
</button>
<ul class="a-dropdown u-overflow-y-auto a-list-reset u-margin-s-top" @click.away="myOwnDropDown = false" x-cloak="x-cloak" x-show="myOwnDropDown" x-transition:enter="is-transitioning" x-transition:enter-end="is-on-screen" x-transition:enter-start="is-off-screen" x-transition:leave="is-transitioning" x-transition:leave-end="is-off-screen" x-transition:leave-start="is-on-screen">
<ul class="a-dropdown u-overflow-y-auto u-list-none u-margin-s-top" @click.away="myOwnDropDown = false" x-cloak="x-cloak" x-show="myOwnDropDown" x-transition:enter="is-transitioning" x-transition:enter-end="is-on-screen" x-transition:enter-start="is-off-screen" x-transition:leave="is-transitioning" x-transition:leave-end="is-off-screen" x-transition:leave-start="is-on-screen">
<li>
<a href="#" class="a-button a-button--transparent a-button--menu u-h6">
Option 1
Expand Down
4 changes: 2 additions & 2 deletions lib/bitstyles_phoenix/alpine3/sidebar.ex
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ defmodule BitstylesPhoenix.Alpine3.Sidebar do
bitcrowd
</span>
</a>
<ul class="u-flex-grow-1 u-flex-shrink-1 u-overflow-y-auto a-list-reset u-flex u-flex-col u-items-stretch u-padding-xs-right u-padding-xs-left">
<ul class="u-flex-grow-1 u-flex-shrink-1 u-overflow-y-auto u-list-none u-flex u-flex-col u-items-stretch u-padding-xs-right u-padding-xs-left">
<li class="u-margin-xs-bottom u-flex">
<a href="#" class="a-button a-button--transparent u-flex-grow-1">
Menu item #1
Expand Down Expand Up @@ -94,7 +94,7 @@ defmodule BitstylesPhoenix.Alpine3.Sidebar do
</button>
</div>
</div>
<ul class="u-flex-grow-1 u-flex-shrink-1 u-overflow-y-auto a-list-reset u-flex u-flex-col u-items-stretch u-padding-xs-right u-padding-xs-left">
<ul class="u-flex-grow-1 u-flex-shrink-1 u-overflow-y-auto u-list-none u-flex u-flex-col u-items-stretch u-padding-xs-right u-padding-xs-left">
<li class="u-margin-xs-bottom u-flex">
<a href="#" class="a-button a-button--transparent u-flex-grow-1">
Menu item #1
Expand Down
14 changes: 7 additions & 7 deletions lib/bitstyles_phoenix/component/dropdown.ex
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ defmodule BitstylesPhoenix.Component.Dropdown do
</use>
</svg>
</button>
<ul class="a-dropdown u-overflow-y-auto a-list-reset u-margin-s-top">
<ul class="a-dropdown u-overflow-y-auto u-list-none u-margin-s-top">
<li>
<a href="#" class="a-button a-button--transparent a-button--menu u-h6">
Option 1
Expand Down Expand Up @@ -194,7 +194,7 @@ defmodule BitstylesPhoenix.Component.Dropdown do
</use>
</svg>
</button>
<ul class="a-dropdown u-overflow-y-auto a-list-reset a-dropdown--top u-margin-s-bottom">
<ul class="a-dropdown u-overflow-y-auto u-list-none a-dropdown--top u-margin-s-bottom">
<li>
<a href="#" class="a-button a-button--transparent a-button--menu u-h6">
Option 1
Expand Down Expand Up @@ -249,7 +249,7 @@ defmodule BitstylesPhoenix.Component.Dropdown do
</use>
</svg>
</button>
<ul class="a-dropdown u-overflow-y-auto a-list-reset a-dropdown--right u-margin-s-top">
<ul class="a-dropdown u-overflow-y-auto u-list-none a-dropdown--right u-margin-s-top">
<li>
<a href="#" class="a-button a-button--transparent a-button--menu">
Option 1
Expand Down Expand Up @@ -310,7 +310,7 @@ defmodule BitstylesPhoenix.Component.Dropdown do
</use>
</svg>
</button>
<ul class="a-dropdown u-overflow-y-auto a-list-reset a-dropdown--top a-dropdown--right u-margin-s-bottom">
<ul class="a-dropdown u-overflow-y-auto u-list-none a-dropdown--top a-dropdown--right u-margin-s-bottom">
<li>
<a href="#" class="a-button a-button--transparent a-button--menu u-h6">
Option 1
Expand Down Expand Up @@ -360,7 +360,7 @@ defmodule BitstylesPhoenix.Component.Dropdown do
<button type="button" class="a-button a-button--secondary foo">
Custom button content
</button>
<ul class="a-dropdown u-overflow-y-auto a-list-reset u-margin-s-top">
<ul class="a-dropdown u-overflow-y-auto u-list-none u-margin-s-top">
<li>
<a href="#" class="a-button a-button--transparent a-button--menu u-h6">
Option 1
Expand Down Expand Up @@ -414,7 +414,7 @@ defmodule BitstylesPhoenix.Component.Dropdown do
</use>
</svg>
</button>
<ul class="a-dropdown u-overflow-y-auto a-list-reset a-dropdown--full-width u-margin-s-top" id="dropdown-1" style="display: none">
<ul class="a-dropdown u-overflow-y-auto u-list-none a-dropdown--full-width u-margin-s-top" id="dropdown-1" style="display: none">
<li>
<a href="#" class="a-button a-button--transparent a-button--menu foo">
Option 1
Expand Down Expand Up @@ -544,7 +544,7 @@ defmodule BitstylesPhoenix.Component.Dropdown do

defp maybe_put_icon(button_extra, _, _), do: button_extra

@menu_classes ~w(a-dropdown u-overflow-y-auto a-list-reset)
@menu_classes ~w(a-dropdown u-overflow-y-auto u-list-none)
defp menu_class(variant, class) do
classnames(@menu_classes ++ variant_classes(variant) ++ [margin(variant), class])
end
Expand Down
6 changes: 3 additions & 3 deletions lib/bitstyles_phoenix/component/heading.ex
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ defmodule BitstylesPhoenix.Component.Heading do
</span>
</div>
</div>
<ul class="a-list-reset u-flex u-flex-wrap">
<ul class="u-list-none u-flex u-flex-wrap">
<li class="u-margin-s-right u-margin-m-bottom">
<button type="button" class="a-button">
Edit
Expand Down Expand Up @@ -237,7 +237,7 @@ defmodule BitstylesPhoenix.Component.Heading do
Published
</span>
</div>
<ul class="a-list-reset u-flex u-flex-wrap">
<ul class="u-list-none u-flex u-flex-wrap">
<li class="u-margin-s-right u-margin-m-bottom">
<button type="button" class="a-button">
Edit
Expand Down Expand Up @@ -296,7 +296,7 @@ defmodule BitstylesPhoenix.Component.Heading do

defp ui_action_buttons(assigns) do
~H"""
<ul class={classnames("a-list-reset u-flex u-flex-wrap")}>
<ul class={classnames("u-list-none u-flex u-flex-wrap")}>
<%= for action <- @action do %>
<%= if Map.get(action, :show, true) do %>
<li class={classnames(["u-margin-s-right u-margin-m-bottom", action[:class]])} {assigns_to_attributes(action, [:class, :show])}>
Expand Down
10 changes: 5 additions & 5 deletions lib/bitstyles_phoenix/component/sidebar.ex
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ defmodule BitstylesPhoenix.Component.Sidebar do
<div class="u-flex-shrink-0 u-padding-xs-y u-margin-xs-left u-margin-xs-right u-flex u-flex-col u-border-gray-70-bottom u-margin-xs-bottom">
Menu
</div>
<ul class="u-flex-grow-1 u-flex-shrink-1 u-overflow-y-auto a-list-reset u-flex u-flex-col u-items-stretch u-padding-xs-right u-padding-xs-left">
<ul class="u-flex-grow-1 u-flex-shrink-1 u-overflow-y-auto u-list-none u-flex u-flex-col u-items-stretch u-padding-xs-right u-padding-xs-left">
<li class="u-margin-xs-bottom u-flex">
<a href="#" class="a-button a-button--transparent u-flex-grow-1">
Menu item #1
Expand All @@ -70,7 +70,7 @@ defmodule BitstylesPhoenix.Component.Sidebar do
Jane Dobermann
</span>
</button>
<ul class="a-dropdown u-overflow-y-auto a-list-reset a-dropdown--top a-dropdown--full-width u-margin-s-bottom">
<ul class="a-dropdown u-overflow-y-auto u-list-none a-dropdown--top a-dropdown--full-width u-margin-s-bottom">
<li>
<a href="#" class="a-button a-button--transparent a-button--menu">
Logout
Expand All @@ -85,7 +85,7 @@ defmodule BitstylesPhoenix.Component.Sidebar do
<div class="u-flex-shrink-0 u-padding-xs-y u-margin-xs-left u-margin-xs-right u-flex u-flex-col u-border-gray-70-bottom u-margin-xs-bottom">
Menu
</div>
<ul class="u-flex-grow-1 u-flex-shrink-1 u-overflow-y-auto a-list-reset u-flex u-flex-col u-items-stretch u-padding-xs-right u-padding-xs-left">
<ul class="u-flex-grow-1 u-flex-shrink-1 u-overflow-y-auto u-list-none u-flex u-flex-col u-items-stretch u-padding-xs-right u-padding-xs-left">
<li class="u-margin-xs-bottom u-flex">
<a href="#" class="a-button a-button--transparent u-flex-grow-1">
Menu item #1
Expand All @@ -107,7 +107,7 @@ defmodule BitstylesPhoenix.Component.Sidebar do
Jane Dobermann
</span>
</button>
<ul class="a-dropdown u-overflow-y-auto a-list-reset a-dropdown--top a-dropdown--full-width u-margin-s-bottom">
<ul class="a-dropdown u-overflow-y-auto u-list-none a-dropdown--top a-dropdown--full-width u-margin-s-bottom">
<li>
<a href="#" class="a-button a-button--transparent a-button--menu">
Logout
Expand Down Expand Up @@ -360,7 +360,7 @@ defmodule BitstylesPhoenix.Component.Sidebar do
You can add items `ui_sidebar_nav_item/1` to add items to the navigation.
"""
@sidebar_nav_classes "u-flex-grow-1 u-flex-shrink-1 u-overflow-y-auto a-list-reset u-flex " <>
@sidebar_nav_classes "u-flex-grow-1 u-flex-shrink-1 u-overflow-y-auto u-list-none u-flex " <>
"u-flex-col u-items-stretch u-padding-xs-right u-padding-xs-left"
def ui_sidebar_nav(assigns) do
extra = assigns_to_attributes(assigns, [:class])
Expand Down
8 changes: 4 additions & 4 deletions lib/bitstyles_phoenix/component/tabs.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ defmodule BitstylesPhoenix.Component.Tabs do
''',
'''
"""
<ul class="a-list-reset u-flex u-flex-wrap u-items-end a-button--tab-container u-margin-m-bottom" role="tablist">
<ul class="u-list-none u-flex u-flex-wrap u-items-end a-button--tab-container u-margin-m-bottom" role="tablist">
<li class="u-margin-s-right">
<button type="button" class="a-button a-button--tab">
Foo
Expand Down Expand Up @@ -76,7 +76,7 @@ defmodule BitstylesPhoenix.Component.Tabs do
''',
'''
"""
<ul class="a-list-reset u-flex u-flex-wrap u-items-end a-button--tab-container u-margin-m-bottom" role="tablist">
<ul class="u-list-none u-flex u-flex-wrap u-items-end a-button--tab-container u-margin-m-bottom" role="tablist">
<li class="u-margin-s-right">
<button type="button" aria-selected="true" class="a-button a-button--tab">
Foo
Expand Down Expand Up @@ -112,7 +112,7 @@ defmodule BitstylesPhoenix.Component.Tabs do
''',
'''
"""
<ul class="a-list-reset u-flex u-flex-wrap u-items-end a-button--tab-container u-margin-m-bottom" role="tablist">
<ul class="u-list-none u-flex u-flex-wrap u-items-end a-button--tab-container u-margin-m-bottom" role="tablist">
<li class="u-margin-s-right">
<button type="button" aria-selected="true" class="a-button a-button--tab">
Foo
Expand All @@ -137,7 +137,7 @@ defmodule BitstylesPhoenix.Component.Tabs do
def ui_tabs(assigns) do
class =
classnames([
"a-list-reset u-flex u-flex-wrap u-items-end a-button--tab-container u-margin-m-bottom",
"u-list-none u-flex u-flex-wrap u-items-end a-button--tab-container u-margin-m-bottom",
assigns[:class]
])

Expand Down

0 comments on commit 71f0ecd

Please sign in to comment.