Current section

41 Versions

Jump to

Compare versions

26 files changed
+160 additions
-99 deletions
  @@ -186,7 +186,7 @@
186 186 same "printed page" as the copyright notice for easier
187 187 identification within third-party archives.
188 188
189 - Copyright [yyyy] [name of copyright owner]
189 + Copyright 2024 Paulo Curado
190 190
191 191 Licensed under the Apache License, Version 2.0 (the "License");
192 192 you may not use this file except in compliance with the License.
  @@ -21,7 +21,7 @@ Reference this repository on your `mix.exs` file to start using.
21 21 ```elixir
22 22 def deps do
23 23 [
24 - {:daisy_ui_components, "~> 0.1"}
24 + {:daisy_ui_components, "~> 0.2"}
25 25 ]
26 26 end
27 27 ```
  @@ -78,6 +78,12 @@ end
78 78
79 79 Check the [Core Components](./lib/daisy_ui_components/core_components.ex) implementation for replacing the default phoenix core components. The components have the same logic from Phoenix default generator, but now using DaisyUI styles.
80 80
81 + There are some small differences on this project's Core components comparing to the default generated by Phoenix. For the `form` component, the input was named as `<.form_input />` to not conflict with the default `<.input />` html component made for daisyUI. This difference is fully shown in the form component section in our [storybook site](https://daisy-ui-components-site.fly.dev/storybook/core_components/form)
82 +
83 + ## Liveview 1.0
84 +
85 + This project is fully compatible with the Liveview 1.0 🔥. If you are using a previous Liveview version, check the [migration guide](https://github.com/phoenixframework/phoenix_live_view/blob/main/CHANGELOG.md#backwards-incompatible-changes-for-10).
86 +
81 87 ## Components
82 88
83 89 List of available components.
  @@ -131,9 +137,8 @@ List of available components.
131 137 - [Table](https://daisyui.com/components/table) âś…
132 138 - [Textarea](https://daisyui.com/components/textarea) âś…
133 139 - [Toast](https://daisyui.com/components/toast) ❌
134 - - [Toggle](https://daisyui.com/components/toggle) ❌
140 + - [Toggle](https://daisyui.com/components/toggle) âś…
135 141 - [Tooltip](https://daisyui.com/components/tooltip) âś…
136 142
137 143 âś…: Implemented
138 -
139 144 ❌: To be implemented
  @@ -1,7 +1,11 @@
1 - {<<"app">>,<<"daisy_ui_components">>}.
2 - {<<"build_tools">>,[<<"mix">>]}.
1 + {<<"links">>,
2 + [{<<"GitHub">>,<<"https://github.com/phcurado/daisy_ui_components">>}]}.
3 + {<<"name">>,<<"daisy_ui_components">>}.
4 + {<<"version">>,<<"0.2.0">>}.
3 5 {<<"description">>,<<"DaisyUI component library for LiveView">>}.
4 6 {<<"elixir">>,<<"~> 1.14">>}.
7 + {<<"app">>,<<"daisy_ui_components">>}.
8 + {<<"licenses">>,[<<"Apache-2.0">>]}.
5 9 {<<"files">>,
6 10 [<<"lib">>,<<"lib/daisy_ui_components">>,
7 11 <<"lib/daisy_ui_components/utils.ex">>,
  @@ -23,6 +27,7 @@
23 27 <<"lib/daisy_ui_components/select.ex">>,
24 28 <<"lib/daisy_ui_components/alert.ex">>,
25 29 <<"lib/daisy_ui_components/form.ex">>,
30 + <<"lib/daisy_ui_components/toggle.ex">>,
26 31 <<"lib/daisy_ui_components/breadcrumbs.ex">>,
27 32 <<"lib/daisy_ui_components/icon.ex">>,
28 33 <<"lib/daisy_ui_components/text_input.ex">>,
  @@ -33,14 +38,10 @@
33 38 <<"lib/daisy_ui_components/button_group.ex">>,
34 39 <<"lib/daisy_ui_components.ex">>,<<".formatter.exs">>,<<"mix.exs">>,
35 40 <<"README.md">>,<<"LICENSE">>]}.
36 - {<<"licenses">>,[<<"Apache-2.0">>]}.
37 - {<<"links">>,
38 - [{<<"GitHub">>,<<"https://github.com/phcurado/daisy_ui_components">>}]}.
39 - {<<"name">>,<<"daisy_ui_components">>}.
40 41 {<<"requirements">>,
41 - [[{<<"app">>,<<"phoenix_live_view">>},
42 - {<<"name">>,<<"phoenix_live_view">>},
42 + [[{<<"name">>,<<"phoenix_live_view">>},
43 + {<<"app">>,<<"phoenix_live_view">>},
43 44 {<<"optional">>,false},
44 - {<<"repository">>,<<"hexpm">>},
45 - {<<"requirement">>,<<"~> 0.20.14">>}]]}.
46 - {<<"version">>,<<"0.1.7">>}.
45 + {<<"requirement">>,<<"~> 1.0">>},
46 + {<<"repository">>,<<"hexpm">>}]]}.
47 + {<<"build_tools">>,[<<"mix">>]}.
  @@ -30,6 +30,7 @@ defmodule DaisyUIComponents do
30 30 import DaisyUIComponents.Table
31 31 import DaisyUIComponents.TextInput
32 32 import DaisyUIComponents.Textarea
33 + import DaisyUIComponents.Toggle
33 34 import DaisyUIComponents.Tooltip
34 35 import DaisyUIComponents.Loading
35 36 end
  @@ -112,12 +112,12 @@ defmodule DaisyUIComponents.Alert do
112 112 <div :if={@title} class="flex items-center">
113 113 <.icon class="mr-2" name={get_icon(@color)} />
114 114 <div class="flex flex-col">
115 - <h3 class="font-bold"><%= @title %></h3>
116 - <span class="text-xs"><%= msg %></span>
115 + <h3 class="font-bold">{@title}</h3>
116 + <span class="text-xs">{msg}</span>
117 117 </div>
118 118 </div>
119 119 <.icon :if={!@title} class="mr-2" name={get_icon(@color)} />
120 - <span :if={!@title}><%= msg %></span>
120 + <span :if={!@title}>{msg}</span>
121 121 <button type="button" class="group absolute top-1 right-1 p-2" aria-label="close">
122 122 <.icon name="hero-x-mark-solid" class="h-5 w-5 opacity-40 group-hover:opacity-70" />
123 123 </button>
  @@ -147,7 +147,7 @@ defmodule DaisyUIComponents.Alert do
147 147
148 148 ~H"""
149 149 <div id={@id} class={@class} {@rest}>
150 - <%= render_slot(@inner_block) %>
150 + {render_slot(@inner_block)}
151 151 </div>
152 152 """
153 153 end
Loading more files…