From 9733c08284e45a571672b44593f3e7f3dbcf24a3 Mon Sep 17 00:00:00 2001 From: Dzung Nguyen Date: Wed, 26 Jun 2024 14:13:16 +0700 Subject: [PATCH] Fix dialog hide animation --- lib/salad_ui/dialog.ex | 4 ++-- mix.exs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/salad_ui/dialog.ex b/lib/salad_ui/dialog.ex index 67226fd..5c21ef6 100644 --- a/lib/salad_ui/dialog.ex +++ b/lib/salad_ui/dialog.ex @@ -156,7 +156,7 @@ defmodule SaladUI.Dialog do def show_modal(js \\ %JS{}, id) when is_binary(id) do js |> JS.set_attribute({"data-state", "open"}, to: "##{id}") - |> JS.show(to: "##{id}", transition: {"", "", ""}, time: 150) + |> JS.show(to: "##{id}", transition: {"_", "_", "_"}, time: 150) |> JS.add_class("overflow-hidden", to: "body") |> JS.focus_first(to: "##{id}-content") end @@ -164,7 +164,7 @@ defmodule SaladUI.Dialog do def hide_modal(js \\ %JS{}, id) do js |> JS.set_attribute({"data-state", "closed"}, to: "##{id}") - |> JS.hide(to: "##{id}", transition: {"", "", ""}, time: 150) + |> JS.hide(to: "##{id}", transition: {"_", "_", "_"}, time: 150) |> JS.remove_class("overflow-hidden", to: "body") |> JS.pop_focus() end diff --git a/mix.exs b/mix.exs index 6fa1dcb..b2dc227 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule SaladUI.MixProject do def project do [ app: :salad_ui, - version: "0.5.0", + version: "0.5.2", elixir: "~> 1.14", elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod, @@ -41,7 +41,7 @@ defmodule SaladUI.MixProject do maintainers: ["Dung Nguyen"], licenses: ["MIT"], links: %{"GitHub" => "https://github.com/bluzky/salad_ui"}, - files: ~w(lib assets .formatter.exs mix.exs README*) + files: ~w(lib assets/*.css .formatter.exs mix.exs README*) ] end