Skip to content

Commit

Permalink
bump version 0.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bluzky committed Nov 26, 2024
1 parent f40072b commit 7891a46
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 15 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 0.14.0

**Changes**
- Implement Sidebar component
- Introduce `as_child` tag to merge multiple `SaladUI` tag
- Introduce `dynamic` tag which allow dynamic rendering a tag.

**Breaking changes**
- Replace `tails` by `tw_merge` which extracted from `turboprop`. You have to add `TwMerge.Cache` to children list in your `application.ex`
- `Collapsible` component doesn't use builder anymore.

# 0.9.0

- ashkan117: fix: Explicitly include the <a> attributes to avoid lsp warning
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
```elixir
def deps do
[
{:salad_ui, "~> 0.13.0"},
{:salad_ui, "~> 0.14.0"},
]
end

Expand Down
1 change: 0 additions & 1 deletion lib/salad_ui/collapsible.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ defmodule SaladUI.Collapsible do
attr :rest, :global
slot(:inner_block, required: true)


def collapsible_trigger(assigns) do
~H"""
<.dynamic
Expand Down
5 changes: 4 additions & 1 deletion lib/salad_ui/popover.ex
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ defmodule SaladUI.Popover do
@doc """
Render popover content
"""
attr :id, :string, required: true, doc: "The id of target element to show popover, this must be the same as the target in popover_trigger"
attr :id, :string,
required: true,
doc: "The id of target element to show popover, this must be the same as the target in popover_trigger"

attr :class, :string, default: nil
attr :side, :string, values: ~w(bottom left right top), default: "top"
attr :align, :string, values: ["start", "center", "end"], default: "center"
Expand Down
2 changes: 1 addition & 1 deletion lib/salad_ui/sidebar.ex
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ defmodule SaladUI.Sidebar do
data-sidebar="content"
class={
classes([
"salad-scroll-area",
"salad-scroll-area",
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
@class
])
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule SaladUI.MixProject do
def project do
[
app: :salad_ui,
version: "0.13.1",
version: "0.14.0",
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
Expand Down
4 changes: 1 addition & 3 deletions test/salad_ui/collapsible_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ defmodule SaladUI.CollapsibleTest do

html =
rendered_to_string(~H"""
<.collapsible_trigger
class="custom-trigger-class"
>
<.collapsible_trigger class="custom-trigger-class">
Click me
</.collapsible_trigger>
""")
Expand Down
8 changes: 1 addition & 7 deletions test/salad_ui/sidebar_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,7 @@ defmodule SaladUI.SidebarTest do

html =
~H"""
<.sidebar
id="test-sidebar"
side="left"
variant="sidebar"
collapsible="offcanvas"
state="expanded"
>
<.sidebar id="test-sidebar" side="left" variant="sidebar" collapsible="offcanvas" state="expanded">
Content
</.sidebar>
"""
Expand Down

0 comments on commit 7891a46

Please sign in to comment.