diff --git a/Cargo.toml b/Cargo.toml index f6862f6..ede66e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,8 @@ [workspace] resolver = "2" -members = ["thaw", "demo", "demo_markdown"] +members = ["thaw", "thaw_utils", "demo", "demo_markdown"] exclude = ["examples"] + +[workspace.dependencies] +thaw = { version = "0.2.3", path = "./thaw" } +thaw_utils = { version = "0.0.1", path = "./thaw_utils" } diff --git a/thaw/Cargo.toml b/thaw/Cargo.toml index 846f115..0f8812a 100644 --- a/thaw/Cargo.toml +++ b/thaw/Cargo.toml @@ -14,7 +14,7 @@ license = "MIT" [dependencies] leptos = { version = "0.6.9" } -leptos_meta = { version = "0.6.9", optional = true } +thaw_utils = { workspace = true } web-sys = { version = "0.3.69", features = [ "DomRect", "File", @@ -30,6 +30,6 @@ chrono = "0.4.35" palette = "0.7.5" [features] -csr = ["leptos/csr"] -ssr = ["leptos/ssr", "leptos_meta/ssr"] -hydrate = ["leptos/hydrate"] +csr = ["leptos/csr", "thaw_utils/csr"] +ssr = ["leptos/ssr", "thaw_utils/ssr"] +hydrate = ["leptos/hydrate", "thaw_utils/hydrate"] diff --git a/thaw/src/alert/mod.rs b/thaw/src/alert/mod.rs index d33920e..75cbb98 100644 --- a/thaw/src/alert/mod.rs +++ b/thaw/src/alert/mod.rs @@ -1,14 +1,11 @@ mod theme; -use crate::{ - components::OptionComp, - theme::use_theme, - utils::{class_list::class_list, mount_style, OptionalProp}, - Icon, Theme, -}; -use leptos::*; pub use theme::AlertTheme; +use crate::{components::OptionComp, theme::use_theme, Icon, Theme}; +use leptos::*; +use thaw_utils::{class_list, mount_style, OptionalProp}; + #[derive(Clone)] pub enum AlertVariant { Success, diff --git a/thaw/src/auto_complete/mod.rs b/thaw/src/auto_complete/mod.rs index 15d0fba..c613aa6 100644 --- a/thaw/src/auto_complete/mod.rs +++ b/thaw/src/auto_complete/mod.rs @@ -1,13 +1,13 @@ mod theme; +pub use theme::AutoCompleteTheme; + use crate::{ components::{Binder, CSSTransition, Follower, FollowerPlacement, FollowerWidth}, - use_theme, - utils::{class_list::class_list, mount_style, Model, OptionalProp, StoredMaybeSignal}, - ComponentRef, Input, InputPrefix, InputRef, InputSuffix, Theme, + use_theme, ComponentRef, Input, InputPrefix, InputRef, InputSuffix, Theme, }; use leptos::*; -pub use theme::AutoCompleteTheme; +use thaw_utils::{class_list, mount_style, Model, OptionalProp, StoredMaybeSignal}; #[derive(Clone, PartialEq)] pub struct AutoCompleteOption { @@ -211,7 +211,13 @@ pub fn AutoComplete( >