feat: remove wasm-bindgen

This commit is contained in:
luoxiao 2023-11-02 16:52:34 +08:00
parent ec551cd2e6
commit 8d9182e45c
6 changed files with 24 additions and 13 deletions

View file

@ -15,7 +15,6 @@ license = "MIT"
[dependencies]
leptos = { version = "0.5.1", features = ["csr"] }
web-sys = { version = "0.3.62", features = ["DomRect", "File", "FileList"] }
wasm-bindgen = "0.2.85"
icondata = { version = "0.1.0", features = [
"AiCloseOutlined",
"AiCheckOutlined",

View file

@ -1,6 +1,8 @@
# Melt UI
An easy to use leptos component library
<p style="text-align: center" >
<img src="https://raw.githubusercontent.com/luoxiaozero/melt-ui/main/logo.svg" alt="Melt Logo" style="width: 160px"/>
</p>
<h1 style="text-align: center">Melt UI</h1>
<p style="text-align: center">An easy to use leptos component library</p>
**The 0.0.x release does not consider API compatibility at this time**

11
logo.svg Normal file
View file

@ -0,0 +1,11 @@
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 24 24"
>
<circle cx="12" cy="12" r="12" fill="#0078ff" />
<path
d="M21 11h-3.17l2.54-2.54a.996.996 0 0 0 0-1.41c-.39-.39-1.03-.39-1.42 0L15 11h-2V9l3.95-3.95c.39-.39.39-1.03 0-1.42a.996.996 0 0 0-1.41 0L13 6.17V3c0-.55-.45-1-1-1s-1 .45-1 1v3.17L8.46 3.63a.996.996 0 0 0-1.41 0c-.39.39-.39 1.03 0 1.42L11 9v2H9L5.05 7.05c-.39-.39-1.03-.39-1.42 0a.996.996 0 0 0 0 1.41L6.17 11H3c-.55 0-1 .45-1 1s.45 1 1 1h3.17l-2.54 2.54a.996.996 0 0 0 0 1.41c.39.39 1.03.39 1.42 0L9 13h2v2l-3.95 3.95c-.39.39-.39 1.03 0 1.42c.39.39 1.02.39 1.41 0L11 17.83V21c0 .55.45 1 1 1s1-.45 1-1v-3.17l2.54 2.54c.39.39 1.02.39 1.41 0c.39-.39.39-1.03 0-1.42L13 15v-2h2l3.95 3.95c.39.39 1.03.39 1.42 0a.996.996 0 0 0 0-1.41L17.83 13H21c.55 0 1-.45 1-1s-.45-1-1-1z"
fill="#fff">
</path>
</svg>

After

Width:  |  Height:  |  Size: 897 B

View file

@ -5,10 +5,9 @@ use crate::{
mount_style, teleport::Teleport, use_theme, utils::maybe_rw_signal::MaybeRwSignal, Theme,
};
pub use color::*;
use leptos::leptos_dom::helpers::WindowListenerHandle;
use leptos::*;
use leptos::{leptos_dom::helpers::WindowListenerHandle, wasm_bindgen::__rt::IntoJsResult};
pub use theme::ColorPickerTheme;
use wasm_bindgen::__rt::IntoJsResult;
#[component]
pub fn ColorPicker(#[prop(optional, into)] value: MaybeRwSignal<RGBA>) -> impl IntoView {

View file

@ -6,10 +6,10 @@ use crate::{
utils::{maybe_rw_signal::MaybeRwSignal, mount_style::mount_style},
Theme,
};
use leptos::wasm_bindgen::__rt::IntoJsResult;
use leptos::*;
use std::hash::Hash;
pub use theme::SelectTheme;
use wasm_bindgen::__rt::IntoJsResult;
#[derive(Clone, PartialEq, Eq, Hash)]
pub struct SelectOption<T> {

View file

@ -83,9 +83,9 @@ impl ThemeMethod for CommonTheme {
font_color: "#11181c".into(),
background_color: "#fff".into(),
color_scheme: "light".into(),
color_primary: "#f5222d".into(),
color_primary_hover: "#ff4d4f".into(),
color_primary_active: "#cf1322".into(),
color_primary: "#0078ff".into(),
color_primary_hover: "#2994ff".into(),
color_primary_active: "#005ed9".into(),
color_success: "#18a058".into(),
color_success_hover: "#36ad6a".into(),
color_success_active: "#0c7a43".into(),
@ -104,9 +104,9 @@ impl ThemeMethod for CommonTheme {
font_color: "#ecedee".into(),
background_color: "#1a1d1e".into(),
color_scheme: "dark".into(),
color_primary: "#d32029".into(),
color_primary_hover: "#e04648".into(),
color_primary_active: "#ad111e".into(),
color_primary: "#0078ff".into(),
color_primary_hover: "#2994ff".into(),
color_primary_active: "#005ed9".into(),
// color_success: "#63e2b7".into(),
// color_success_hover: "#7fe7c4".into(),
color_success: "#18a058".into(),