diff --git a/Cargo.toml b/Cargo.toml index c7ad785..6b26d6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,10 +13,10 @@ license = "MIT" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -leptos = { version = "0.4.8", features = ["csr"] } +leptos = { version = "0.5.0-beta2", features = ["csr"] } stylers = { git = "https://github.com/abishekatp/stylers", rev = "4bfd2df" } web-sys = { version = "0.3.62", features = ["DomRect"] } -leptos_dom = { version = "0.4.0" } +leptos_dom = { version = "0.5.0-beta2" } wasm-bindgen = "0.2.85" icondata = { version = "0.0.7", features = [ "AiCloseOutlined", @@ -25,4 +25,4 @@ icondata = { version = "0.0.7", features = [ ] } [workspace] -members = ["examples/basic", "gh-pages"] +members = ["gh-pages"] diff --git a/examples/basic/Cargo.toml b/examples/basic/Cargo.toml deleted file mode 100644 index 003b630..0000000 --- a/examples/basic/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "basic" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -leptos = { version = "0.4.0", features = ["csr"] } -melt-ui = { path = "../../" } -icondata = { version = "0.0.7", features = [ - "AiCloseOutlined", - "AiCheckOutlined", -] } -leptos_router = { version = "0.4.0", features = ["csr"] } -regex = "1.8.2" diff --git a/examples/basic/Trunk.toml b/examples/basic/Trunk.toml deleted file mode 100644 index 7cf59cc..0000000 --- a/examples/basic/Trunk.toml +++ /dev/null @@ -1,13 +0,0 @@ -[build] -target = "index.html" - -[watch] -watch = [ - "../../src", - "./src" -] - -[serve] -address = "127.0.0.1" -port = 6421 -open = false diff --git a/examples/basic/index.html b/examples/basic/index.html deleted file mode 100644 index 7dd8246..0000000 --- a/examples/basic/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Document - - - - - - \ No newline at end of file diff --git a/examples/basic/src/app.rs b/examples/basic/src/app.rs deleted file mode 100644 index ce29b04..0000000 --- a/examples/basic/src/app.rs +++ /dev/null @@ -1,61 +0,0 @@ -use crate::pages::*; -use leptos::*; -use leptos_router::*; - -#[component] -pub fn App(cx: Scope) -> impl IntoView { - view! { cx, - - - - } /> - - } /> - - } /> - - } > - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - - - - } /> - - } /> - - - } -} diff --git a/examples/basic/src/assets/css/index.css b/examples/basic/src/assets/css/index.css deleted file mode 100644 index edc5940..0000000 --- a/examples/basic/src/assets/css/index.css +++ /dev/null @@ -1,16 +0,0 @@ -body { - margin: 0; -} - - -.components-page-box { - display: flex; -} - -.components-page-box aside { - width: 260px; -} - -.components-page-box main { - flex: 1; -} \ No newline at end of file diff --git a/examples/basic/src/main.rs b/examples/basic/src/main.rs deleted file mode 100644 index 38ab1fd..0000000 --- a/examples/basic/src/main.rs +++ /dev/null @@ -1,9 +0,0 @@ -mod app; -mod pages; - -use app::*; -use leptos::*; - -fn main() { - mount_to_body(|cx| view! { cx, }) -} diff --git a/examples/basic/src/pages/button/mod.rs b/examples/basic/src/pages/button/mod.rs deleted file mode 100644 index a181112..0000000 --- a/examples/basic/src/pages/button/mod.rs +++ /dev/null @@ -1,43 +0,0 @@ -use leptos::*; -use melt_ui::*; - -#[component] -pub fn ButtonPage(cx: Scope) -> impl IntoView { - view! {cx, - - - - - - - - - - - - -
- - -
- } -} \ No newline at end of file diff --git a/examples/basic/src/pages/checkbox/mod.rs b/examples/basic/src/pages/checkbox/mod.rs deleted file mode 100644 index 7d63d87..0000000 --- a/examples/basic/src/pages/checkbox/mod.rs +++ /dev/null @@ -1,14 +0,0 @@ -use leptos::*; -use melt_ui::*; - -#[component] -pub fn CheckboxPage(cx: Scope) -> impl IntoView { - let checked = create_rw_signal(cx, false); - view! {cx, -
- - "Click" - -
- } -} diff --git a/examples/basic/src/pages/components.rs b/examples/basic/src/pages/components.rs deleted file mode 100644 index 4e7db06..0000000 --- a/examples/basic/src/pages/components.rs +++ /dev/null @@ -1,52 +0,0 @@ -use leptos::*; -use leptos_router::{use_location, use_navigate, Outlet}; -use melt_ui::*; -use regex::Regex; - -#[component] -pub fn ComponentsPage(cx: Scope) -> impl IntoView { - let loaction = use_location(cx); - let navigate = use_navigate(cx); - let selected = create_rw_signal(cx, String::from("")); - create_effect(cx, move |_| { - let pathname = loaction.pathname.get(); - - let re = Regex::new(r"^/components/(.+)$").unwrap(); - let Some(caps) = re.captures(&pathname) else { - return; - }; - let Some(path) = caps.get(1) else { - return; - }; - let path = path.as_str().to_string(); - selected.set(path); - }); - - create_effect(cx, move |value| { - let selected = selected.get(); - if value.is_some() { - _ = navigate(&format!("/components/{selected}"), Default::default()); - } - selected - }); - view! {cx, -
- -
- -
-
- } -} diff --git a/examples/basic/src/pages/home.rs b/examples/basic/src/pages/home.rs deleted file mode 100644 index 8d41b0c..0000000 --- a/examples/basic/src/pages/home.rs +++ /dev/null @@ -1,40 +0,0 @@ -use leptos::*; -use leptos_router::use_navigate; -use melt_ui::*; - -#[component] -pub fn Home(cx: Scope) -> impl IntoView { - let (theme, set_theme) = create_signal(cx, Theme::light()); - provide_context(cx, theme); - let (count, set_count) = create_signal(cx, 0.0); - let (button_type, set_button_type) = create_signal(cx, ButtonType::TEXT); - view! { cx, - -
- - - - - {move || count.get()} - - - - } -} diff --git a/examples/basic/src/pages/image/mod.rs b/examples/basic/src/pages/image/mod.rs deleted file mode 100644 index f98e30a..0000000 --- a/examples/basic/src/pages/image/mod.rs +++ /dev/null @@ -1,12 +0,0 @@ -use leptos::*; -use melt_ui::*; - -#[component] -pub fn ImagePage(cx: Scope) -> impl IntoView { - view! { cx, - <> - - - - } -} \ No newline at end of file diff --git a/examples/basic/src/pages/input/mod.rs b/examples/basic/src/pages/input/mod.rs deleted file mode 100644 index 1a50d84..0000000 --- a/examples/basic/src/pages/input/mod.rs +++ /dev/null @@ -1,14 +0,0 @@ -use leptos::*; -use melt_ui::*; - -#[component] -pub fn InputPage(cx: Scope) -> impl IntoView { - let value = create_rw_signal(cx, String::from("o")); - view! { cx, - <> - {move || value.get()} - - - - } -} \ No newline at end of file diff --git a/examples/basic/src/pages/menu/mod.rs b/examples/basic/src/pages/menu/mod.rs deleted file mode 100644 index 2e13f97..0000000 --- a/examples/basic/src/pages/menu/mod.rs +++ /dev/null @@ -1,16 +0,0 @@ -use leptos::*; -use melt_ui::*; - -#[component] -pub fn MenuPage(cx: Scope) -> impl IntoView { - let selected = create_rw_signal(cx, String::from("o")); - view! { cx, - <> - { move || selected.get() } - - - - - - } -} diff --git a/examples/basic/src/pages/mobile.rs b/examples/basic/src/pages/mobile.rs deleted file mode 100644 index ba52df9..0000000 --- a/examples/basic/src/pages/mobile.rs +++ /dev/null @@ -1,10 +0,0 @@ -use leptos::*; - -#[component] -pub fn MobilePage(cx: Scope, path: &'static str) -> impl IntoView { - view! { cx, -
-