mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-23 06:19:22 -05:00
Merge branch 'thaw'
This commit is contained in:
commit
b8030abb9c
121 changed files with 487 additions and 487 deletions
14
.github/workflows/get-melt-changed.yml
vendored
14
.github/workflows/get-melt-changed.yml
vendored
|
@ -1,18 +1,18 @@
|
||||||
name: Get Melt Changed Call
|
name: Get Thaw Changed Call
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
outputs:
|
outputs:
|
||||||
melt_changed:
|
thaw_changed:
|
||||||
description: "Melt Changed"
|
description: "Thaw Changed"
|
||||||
value: ${{ jobs.create.outputs.melt_changed }}
|
value: ${{ jobs.create.outputs.thaw_changed }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create:
|
create:
|
||||||
name: Detect Source Change
|
name: Detect Source Change
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
melt_changed: ${{ steps.set-source-changed.outputs.melt_changed }}
|
thaw_changed: ${{ steps.set-source-changed.outputs.thaw_changed }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -29,7 +29,7 @@ jobs:
|
||||||
- name: List source files that changed
|
- name: List source files that changed
|
||||||
run: echo '${{ steps.changed-source.outputs.all_changed_files }}'
|
run: echo '${{ steps.changed-source.outputs.all_changed_files }}'
|
||||||
|
|
||||||
- name: Set melt_changed
|
- name: Set thaw_changed
|
||||||
id: set-source-changed
|
id: set-source-changed
|
||||||
run: |
|
run: |
|
||||||
echo "melt_changed=${{ steps.changed-source.outputs.any_changed }}" >> "$GITHUB_OUTPUT"
|
echo "thaw_changed=${{ steps.changed-source.outputs.any_changed }}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
8
.github/workflows/gh-pages.yml
vendored
8
.github/workflows/gh-pages.yml
vendored
|
@ -5,12 +5,12 @@ on:
|
||||||
- cron: "0 23 * * *"
|
- cron: "0 23 * * *"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
get-melt-changed:
|
get-thaw-changed:
|
||||||
uses: ./.github/workflows/get-melt-changed.yml
|
uses: ./.github/workflows/get-thaw-changed.yml
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [get-melt-changed]
|
needs: [get-thaw-changed]
|
||||||
if: needs.get-melt-changed.outputs.melt_changed == 'true'
|
if: needs.get-thaw-changed.outputs.thaw_changed == 'true'
|
||||||
permissions:
|
permissions:
|
||||||
contents: write # To push a branch
|
contents: write # To push a branch
|
||||||
pull-requests: write # To create a PR from that branch
|
pull-requests: write # To create a PR from that branch
|
||||||
|
|
10
Cargo.toml
10
Cargo.toml
|
@ -1,13 +1,13 @@
|
||||||
[package]
|
[package]
|
||||||
name = "melt-ui"
|
name = "thaw"
|
||||||
version = "0.0.6"
|
version = "0.0.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
keywords = ["web", "leptos", "ui", "melt-ui"]
|
keywords = ["web", "leptos", "ui", "thaw"]
|
||||||
|
|
||||||
authors = ["luoxiaozero <luoxiaozero@163.com>"]
|
authors = ["luoxiaozero"]
|
||||||
description = "An easy to use leptos component library"
|
description = "An easy to use leptos component library"
|
||||||
homepage = "https://github.com/luoxiaozero/melt-ui"
|
homepage = "https://github.com/thaw-ui/thaw"
|
||||||
repository = "https://github.com/luoxiaozero/melt-ui"
|
repository = "https://github.com/thaw-ui/thaw"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<p align="center" >
|
<p align="center" >
|
||||||
<img src="https://raw.githubusercontent.com/luoxiaozero/melt-ui/main/logo.svg" alt="Melt Logo" width="160px"/>
|
<img src="https://raw.githubusercontent.com/thaw-ui/thaw/main/logo.svg" alt="Thaw Logo" width="160px"/>
|
||||||
</p>
|
</p>
|
||||||
<h1 align="center">Melt UI</h1>
|
<h1 align="center">Thaw UI</h1>
|
||||||
<p align="center">An easy to use leptos component library</p>
|
<p align="center">An easy to use leptos component library</p>
|
||||||
|
|
||||||
**melt was renamed [thaw](https://github.com/thaw-ui/thaw)**
|
**melt was renamed [thaw](https://github.com/thaw-ui/thaw)**
|
||||||
|
|
|
@ -8,7 +8,7 @@ edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
leptos = { version = "0.5.1", features = ["csr"] }
|
leptos = { version = "0.5.1", features = ["csr"] }
|
||||||
melt-ui = { path = "../" }
|
thaw = { path = "../" }
|
||||||
icondata = { version = "0.1.0", features = [
|
icondata = { version = "0.1.0", features = [
|
||||||
"AiCloseOutlined",
|
"AiCloseOutlined",
|
||||||
"AiCheckOutlined",
|
"AiCheckOutlined",
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
## Used
|
## Used
|
||||||
|
|
||||||
Run the `trunk serve` command and then open the `http://127.0.0.1:6421/melt-ui` URL
|
Run the `trunk serve` command and then open the `http://127.0.0.1:6421/thaw` URL
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[build]
|
[build]
|
||||||
target = "index.html"
|
target = "index.html"
|
||||||
public_url = "/melt-ui/"
|
public_url = "/thaw/"
|
||||||
# release = true
|
# release = true
|
||||||
|
|
||||||
[watch]
|
[watch]
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Melt UI</title>
|
<title>Thaw UI</title>
|
||||||
<link
|
<link
|
||||||
rel="shortcut icon"
|
rel="shortcut icon"
|
||||||
href="/melt-ui/favicon.ico"
|
href="/thaw/favicon.ico"
|
||||||
type="image/x-icon"
|
type="image/x-icon"
|
||||||
/>
|
/>
|
||||||
<link data-trunk rel="css" href="./src/assets/css/index.css" />
|
<link data-trunk rel="css" href="./src/assets/css/index.css" />
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::pages::*;
|
use crate::pages::*;
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use leptos_router::*;
|
use leptos_router::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn App() -> impl IntoView {
|
pub fn App() -> impl IntoView {
|
||||||
|
@ -24,8 +24,8 @@ pub fn App() -> impl IntoView {
|
||||||
provide_context(theme);
|
provide_context(theme);
|
||||||
view! {
|
view! {
|
||||||
<Provider theme>
|
<Provider theme>
|
||||||
<Router base="/melt-ui">
|
<Router base="/thaw">
|
||||||
<Routes base="/melt-ui".to_string()>
|
<Routes base="/thaw".to_string()>
|
||||||
<Route path="/" view=Home/>
|
<Route path="/" view=Home/>
|
||||||
<Route path="/components" view=ComponentsPage>
|
<Route path="/components" view=ComponentsPage>
|
||||||
<Route path="/menu" view=MenuPage/>
|
<Route path="/menu" view=MenuPage/>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
|
|
||||||
#[slot]
|
#[slot]
|
||||||
pub struct DemoCode {
|
pub struct DemoCode {
|
||||||
|
@ -13,7 +13,7 @@ pub fn Demo(demo_code: DemoCode, children: Children) -> impl IntoView {
|
||||||
mount_style("demo", prisms::prism_css!());
|
mount_style("demo", prisms::prism_css!());
|
||||||
let theme = use_theme(Theme::light);
|
let theme = use_theme(Theme::light);
|
||||||
let style = create_memo(move |_| {
|
let style = create_memo(move |_| {
|
||||||
let mut style = String::from("background-image: url(/melt-ui/grid_dot.svg); background-repeat: repeat; background-size: 1.5rem; margin-top: 1rem; padding: 1rem; border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem;");
|
let mut style = String::from("background-image: url(/thaw/grid_dot.svg); background-repeat: repeat; background-size: 1.5rem; margin-top: 1rem; padding: 1rem; border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem;");
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
if theme.common.color_scheme == "dark" {
|
if theme.common.color_scheme == "dark" {
|
||||||
style.push_str("border: 1px solid #383f52;");
|
style.push_str("border: 1px solid #383f52;");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use leptos_router::use_navigate;
|
use leptos_router::use_navigate;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn SiteHeader() -> impl IntoView {
|
pub fn SiteHeader() -> impl IntoView {
|
||||||
|
@ -29,7 +29,7 @@ pub fn SiteHeader() -> impl IntoView {
|
||||||
view! {
|
view! {
|
||||||
<LayoutHeader style>
|
<LayoutHeader style>
|
||||||
<Space>
|
<Space>
|
||||||
<img src="/melt-ui/logo.svg" style="width: 36px"/>
|
<img src="/thaw/logo.svg" style="width: 36px"/>
|
||||||
<div
|
<div
|
||||||
style="cursor: pointer; display: flex; align-items: center; height: 100%; font-weight: 600; font-size: 20px"
|
style="cursor: pointer; display: flex; align-items: center; height: 100%; font-weight: 600; font-size: 20px"
|
||||||
on:click=move |_| {
|
on:click=move |_| {
|
||||||
|
@ -38,7 +38,7 @@ pub fn SiteHeader() -> impl IntoView {
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
||||||
"Melt UI"
|
"Thaw UI"
|
||||||
</div>
|
</div>
|
||||||
</Space>
|
</Space>
|
||||||
<Space>
|
<Space>
|
||||||
|
@ -51,7 +51,7 @@ pub fn SiteHeader() -> impl IntoView {
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Text
|
variant=ButtonVariant::Text
|
||||||
on:click=move |_| {
|
on:click=move |_| {
|
||||||
_ = window().open_with_url("http://github.com/luoxiaozero/melt-ui");
|
_ = window().open_with_url("http://github.com/thaw-ui/thaw");
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -2,7 +2,7 @@ use std::collections::HashSet;
|
||||||
|
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::components::SiteHeader;
|
use crate::components::SiteHeader;
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use leptos_router::{use_location, use_navigate, Outlet};
|
use leptos_router::{use_location, use_navigate, Outlet};
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn ComponentsPage() -> impl IntoView {
|
pub fn ComponentsPage() -> impl IntoView {
|
||||||
|
@ -10,7 +10,7 @@ pub fn ComponentsPage() -> impl IntoView {
|
||||||
let loaction = use_location();
|
let loaction = use_location();
|
||||||
let mut pathname = loaction.pathname.get_untracked();
|
let mut pathname = loaction.pathname.get_untracked();
|
||||||
|
|
||||||
if pathname.starts_with("/melt-ui/components/") {
|
if pathname.starts_with("/thaw/components/") {
|
||||||
pathname.drain(20..).collect()
|
pathname.drain(20..).collect()
|
||||||
} else {
|
} else {
|
||||||
String::new()
|
String::new()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn GridPage() -> impl IntoView {
|
pub fn GridPage() -> impl IntoView {
|
||||||
mount_style(
|
mount_style(
|
||||||
"grid-demo",
|
"grid-demo",
|
||||||
r#".melt-grid-item {
|
r#".thaw-grid-item {
|
||||||
height: 60px;
|
height: 60px;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
}
|
}
|
||||||
.melt-grid-item:nth-child(odd) {
|
.thaw-grid-item:nth-child(odd) {
|
||||||
background-color: #3d8ae5dd;
|
background-color: #3d8ae5dd;
|
||||||
}
|
}
|
||||||
.melt-grid-item:nth-child(even) {
|
.thaw-grid-item:nth-child(even) {
|
||||||
background-color: #3d8ae5aa;
|
background-color: #3d8ae5aa;
|
||||||
}"#,
|
}"#,
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use leptos_router::{use_navigate, use_query_map};
|
use leptos_router::{use_navigate, use_query_map};
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn Home() -> impl IntoView {
|
pub fn Home() -> impl IntoView {
|
||||||
|
@ -15,7 +15,7 @@ pub fn Home() -> impl IntoView {
|
||||||
position=LayoutPosition::Absolute
|
position=LayoutPosition::Absolute
|
||||||
style="display: flex; align-items: center; justify-content: center; flex-direction: column;"
|
style="display: flex; align-items: center; justify-content: center; flex-direction: column;"
|
||||||
>
|
>
|
||||||
<h1 style="font-size: 80px; line-height: 1;margin: 0 0 18px;">"Melt UI"</h1>
|
<h1 style="font-size: 80px; line-height: 1;margin: 0 0 18px;">"Thaw UI"</h1>
|
||||||
<p>"An easy to use leptos component library"</p>
|
<p>"An easy to use leptos component library"</p>
|
||||||
<Space>
|
<Space>
|
||||||
<Button on_click=move |_| {
|
<Button on_click=move |_| {
|
||||||
|
@ -25,7 +25,7 @@ pub fn Home() -> impl IntoView {
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Text
|
variant=ButtonVariant::Text
|
||||||
on:click=move |_| {
|
on:click=move |_| {
|
||||||
_ = window().open_with_url("http://github.com/luoxiaozero/melt-ui");
|
_ = window().open_with_url("http://github.com/thaw-ui/thaw");
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::{use_theme, Theme};
|
use thaw::{use_theme, Theme};
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn MobilePage(path: &'static str) -> impl IntoView {
|
pub fn MobilePage(path: &'static str) -> impl IntoView {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -3,7 +3,7 @@ use crate::{
|
||||||
pages::MobilePage,
|
pages::MobilePage,
|
||||||
};
|
};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::mobile::NavBar;
|
use thaw::mobile::NavBar;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
@ -45,7 +45,7 @@ pub fn NavBarPage() -> impl IntoView {
|
||||||
</Demo>
|
</Demo>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<MobilePage path="/melt-ui?path=/mobile/nav-bar"/>
|
<MobilePage path="/thaw?path=/mobile/nav-bar"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -3,7 +3,7 @@ use crate::{
|
||||||
pages::MobilePage,
|
pages::MobilePage,
|
||||||
};
|
};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::mobile::*;
|
use thaw::mobile::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
@ -41,7 +41,7 @@ pub fn TabbarPage() -> impl IntoView {
|
||||||
</Demo>
|
</Demo>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<MobilePage path="/melt-ui?path=/mobile/tabbar"/>
|
<MobilePage path="/thaw?path=/mobile/tabbar"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -3,8 +3,8 @@ use crate::{
|
||||||
pages::MobilePage,
|
pages::MobilePage,
|
||||||
};
|
};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::mobile::*;
|
use thaw::mobile::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ pub fn ToastPage() -> impl IntoView {
|
||||||
</Demo>
|
</Demo>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<MobilePage path="/melt-ui?path=/mobile/toast"/>
|
<MobilePage path="/thaw?path=/mobile/toast"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::components::{Demo, DemoCode};
|
use crate::components::{Demo, DemoCode};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use melt_ui::*;
|
use thaw::*;
|
||||||
use prisms::highlight_str;
|
use prisms::highlight_str;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
.melt-alert {
|
.thaw-alert {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 14px 20px 14px 42px;
|
padding: 14px 20px 14px 42px;
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
border: 1px solid var(--melt-border-color);
|
border: 1px solid var(--thaw-border-color);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-alert__icon {
|
.thaw-alert__icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 12px;
|
top: 12px;
|
||||||
left: 10px;
|
left: 10px;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
color: var(--melt-icon-color);
|
color: var(--thaw-icon-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-alert__header {
|
.thaw-alert__header {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 19px;
|
line-height: 19px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-alert__header + .melt-alert__content {
|
.thaw-alert__header + .thaw-alert__content {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,15 +54,15 @@ pub fn Alert(
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
let variant = variant.get();
|
let variant = variant.get();
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-icon-color: {};",
|
"--thaw-icon-color: {};",
|
||||||
variant.theme_icon_color(theme)
|
variant.theme_icon_color(theme)
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color: {};",
|
"--thaw-background-color: {};",
|
||||||
variant.theme_background_color(theme)
|
variant.theme_background_color(theme)
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-border-color: {};",
|
"--thaw-border-color: {};",
|
||||||
variant.theme_border_color(theme)
|
variant.theme_border_color(theme)
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
@ -79,8 +79,8 @@ pub fn Alert(
|
||||||
.into()
|
.into()
|
||||||
});
|
});
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-alert" style=move || css_vars.get()>
|
<div class="thaw-alert" style=move || css_vars.get()>
|
||||||
<Icon icon class="melt-alert__icon"/>
|
<Icon icon class="thaw-alert__icon"/>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
{move || {
|
{move || {
|
||||||
|
@ -88,10 +88,10 @@ pub fn Alert(
|
||||||
if title.is_empty() {
|
if title.is_empty() {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
view! { <div class="melt-alert__header">{title}</div> }.into()
|
view! { <div class="thaw-alert__header">{title}</div> }.into()
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
<div class="melt-alert__content">{children()}</div>
|
<div class="thaw-alert__content">{children()}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
.melt-auto-complete__menu {
|
.thaw-auto-complete__menu {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
max-height: 200px;
|
max-height: 200px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
||||||
0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
||||||
z-index: 2000;
|
z-index: 2000;
|
||||||
}
|
}
|
||||||
.melt-auto-complete__menu-item {
|
.thaw-auto-complete__menu-item {
|
||||||
padding: 6px 5px;
|
padding: 6px 5px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.melt-auto-complete__menu-item:hover {
|
.thaw-auto-complete__menu-item:hover {
|
||||||
background-color: var(--melt-background-color-hover);
|
background-color: var(--thaw-background-color-hover);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,11 +24,11 @@ pub fn AutoComplete(
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color: {};",
|
"--thaw-background-color: {};",
|
||||||
theme.select.menu_background_color
|
theme.select.menu_background_color
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color-hover: {};",
|
"--thaw-background-color-hover: {};",
|
||||||
theme.select.menu_background_color_hover
|
theme.select.menu_background_color_hover
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
@ -66,7 +66,7 @@ pub fn AutoComplete(
|
||||||
};
|
};
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-auto-complete" ref=auto_complete_ref>
|
<div class="thaw-auto-complete" ref=auto_complete_ref>
|
||||||
<Input
|
<Input
|
||||||
value
|
value
|
||||||
placeholder
|
placeholder
|
||||||
|
@ -77,7 +77,7 @@ pub fn AutoComplete(
|
||||||
</div>
|
</div>
|
||||||
<Teleport>
|
<Teleport>
|
||||||
<div
|
<div
|
||||||
class="melt-auto-complete__menu"
|
class="thaw-auto-complete__menu"
|
||||||
style=move || {
|
style=move || {
|
||||||
if is_show_menu.get() {
|
if is_show_menu.get() {
|
||||||
menu_css_vars.get()
|
menu_css_vars.get()
|
||||||
|
@ -104,7 +104,7 @@ pub fn AutoComplete(
|
||||||
};
|
};
|
||||||
view! {
|
view! {
|
||||||
<div
|
<div
|
||||||
class="melt-auto-complete__menu-item"
|
class="thaw-auto-complete__menu-item"
|
||||||
on:click=on_click
|
on:click=on_click
|
||||||
on:mousedown=on_mousedown
|
on:mousedown=on_mousedown
|
||||||
>
|
>
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
.melt-avatar {
|
.thaw-avatar {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: var(--melt-size);
|
width: var(--thaw-size);
|
||||||
height: var(--melt-size);
|
height: var(--thaw-size);
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
border-radius: var(--melt-border-radius);
|
border-radius: var(--thaw-border-radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-avatar img {
|
.thaw-avatar img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: var(--melt-border-radius);
|
border-radius: var(--thaw-border-radius);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,14 +13,14 @@ pub fn Avatar(
|
||||||
let theme = use_theme(Theme::light);
|
let theme = use_theme(Theme::light);
|
||||||
let css_vars = create_memo(move |_| {
|
let css_vars = create_memo(move |_| {
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
css_vars.push_str(&format!("--melt-size: {}px;", size.get()));
|
css_vars.push_str(&format!("--thaw-size: {}px;", size.get()));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-border-radius: {};",
|
"--thaw-border-radius: {};",
|
||||||
if circle.get() { "50%" } else { "3px" }
|
if circle.get() { "50%" } else { "3px" }
|
||||||
));
|
));
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color: {}",
|
"--thaw-background-color: {}",
|
||||||
theme.avatar.background_color
|
theme.avatar.background_color
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
@ -28,7 +28,7 @@ pub fn Avatar(
|
||||||
});
|
});
|
||||||
mount_style("avatar", include_str!("./avatar.css"));
|
mount_style("avatar", include_str!("./avatar.css"));
|
||||||
view! {
|
view! {
|
||||||
<span class="melt-avatar" style=move || css_vars.get()>
|
<span class="thaw-avatar" style=move || css_vars.get()>
|
||||||
{move || {
|
{move || {
|
||||||
let src = src.get();
|
let src = src.get();
|
||||||
(!src.is_empty()).then(|| view! { <img src=src/> })
|
(!src.is_empty()).then(|| view! { <img src=src/> })
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
.melt-badge {
|
.thaw-badge {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.melt-badge__sup {
|
.thaw-badge__sup {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
color: var(--melt-font-color);
|
color: var(--thaw-font-color);
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
}
|
}
|
||||||
.melt-badge__sup--value {
|
.thaw-badge__sup--value {
|
||||||
top: -9px;
|
top: -9px;
|
||||||
right: -9px;
|
right: -9px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-badge__sup--dot {
|
.thaw-badge__sup--dot {
|
||||||
top: -5px;
|
top: -5px;
|
||||||
right: -5px;
|
right: -5px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
|
|
|
@ -31,10 +31,10 @@ pub fn Badge(
|
||||||
mount_style("badge", include_str!("./badge.css"));
|
mount_style("badge", include_str!("./badge.css"));
|
||||||
let css_vars = create_memo(move |_| {
|
let css_vars = create_memo(move |_| {
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
css_vars.push_str("--melt-font-color: #fff;");
|
css_vars.push_str("--thaw-font-color: #fff;");
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color: {};",
|
"--thaw-background-color: {};",
|
||||||
color.get().theme_color(theme)
|
color.get().theme_color(theme)
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
@ -52,11 +52,11 @@ pub fn Badge(
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-badge" style=move || css_vars.get()>
|
<div class="thaw-badge" style=move || css_vars.get()>
|
||||||
<div
|
<div
|
||||||
class="melt-badge__sup"
|
class="thaw-badge__sup"
|
||||||
class=("melt-badge__sup--value", move || !dot.get() && !value.get().is_empty())
|
class=("thaw-badge__sup--value", move || !dot.get() && !value.get().is_empty())
|
||||||
class=("melt-badge__sup--dot", move || dot.get())
|
class=("thaw-badge__sup--dot", move || dot.get())
|
||||||
>
|
>
|
||||||
{move || value.get()}
|
{move || value.get()}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
.melt-button {
|
.thaw-button {
|
||||||
height: 34px;
|
height: 34px;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
color: var(--melt-font-color);
|
color: var(--thaw-font-color);
|
||||||
border: 1px solid var(--melt-border-color);
|
border: 1px solid var(--thaw-border-color);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
@ -12,50 +12,50 @@
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-button:hover {
|
.thaw-button:hover {
|
||||||
border-color: var(--melt-border-color-hover);
|
border-color: var(--thaw-border-color-hover);
|
||||||
background-color: var(--melt-background-color-hover);
|
background-color: var(--thaw-background-color-hover);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-button:active:not(.melt-button--disabled) {
|
.thaw-button:active:not(.thaw-button--disabled) {
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
border-color: var(--melt-border-color-hover);
|
border-color: var(--thaw-border-color-hover);
|
||||||
background-color: var(--melt-background-color-active);
|
background-color: var(--thaw-background-color-active);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-button--text,
|
.thaw-button--text,
|
||||||
.melt-button--link {
|
.thaw-button--link {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-button--text:hover {
|
.thaw-button--text:hover {
|
||||||
color: var(--melt-font-color-hover);
|
color: var(--thaw-font-color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-button--link {
|
.thaw-button--link {
|
||||||
height: auto;
|
height: auto;
|
||||||
padding: inherit;
|
padding: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-button--link:hover {
|
.thaw-button--link:hover {
|
||||||
color: var(--melt-font-color-hover);
|
color: var(--thaw-font-color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-button--round {
|
.thaw-button--round {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes meltLoadingCircle {
|
@keyframes thawLoadingCircle {
|
||||||
100% {
|
100% {
|
||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-button .melt-wave {
|
.thaw-button .thaw-wave {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
animation-iteration-count: 1;
|
animation-iteration-count: 1;
|
||||||
animation-duration: 0.6s;
|
animation-duration: 0.6s;
|
||||||
|
@ -63,21 +63,21 @@
|
||||||
cubic-bezier(0, 0, 0.2, 1);
|
cubic-bezier(0, 0, 0.2, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-button .melt-wave.melt-wave--active {
|
.thaw-button .thaw-wave.thaw-wave--active {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
animation-name: meltButtonWaveSpread, meltButtonWaveOpacity;
|
animation-name: thawButtonWaveSpread, thawButtonWaveOpacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes meltButtonWaveSpread {
|
@keyframes thawButtonWaveSpread {
|
||||||
from {
|
from {
|
||||||
box-shadow: 0 0 0.5px 0 var(--melt-ripple-color);
|
box-shadow: 0 0 0.5px 0 var(--thaw-ripple-color);
|
||||||
}
|
}
|
||||||
to {
|
to {
|
||||||
box-shadow: 0 0 0.5px 6px var(--melt-ripple-color);
|
box-shadow: 0 0 0.5px 6px var(--thaw-ripple-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes meltButtonWaveOpacity {
|
@keyframes thawButtonWaveOpacity {
|
||||||
from {
|
from {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,31 +76,31 @@ pub fn Button(
|
||||||
if variant.get() == ButtonVariant::Primary {
|
if variant.get() == ButtonVariant::Primary {
|
||||||
let bg_color_hover = color.get().theme_color_hover(theme);
|
let bg_color_hover = color.get().theme_color_hover(theme);
|
||||||
let bg_color_active = color.get().theme_color_active(theme);
|
let bg_color_active = color.get().theme_color_active(theme);
|
||||||
css_vars.push_str(&format!("--melt-background-color: {bg_color};"));
|
css_vars.push_str(&format!("--thaw-background-color: {bg_color};"));
|
||||||
css_vars.push_str(&format!("--melt-background-color-hover: {bg_color_hover};"));
|
css_vars.push_str(&format!("--thaw-background-color-hover: {bg_color_hover};"));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color-active: {bg_color_active};"
|
"--thaw-background-color-active: {bg_color_active};"
|
||||||
));
|
));
|
||||||
css_vars.push_str("--melt-font-color: #fff;");
|
css_vars.push_str("--thaw-font-color: #fff;");
|
||||||
css_vars.push_str(&format!("--melt-border-color: {bg_color};"));
|
css_vars.push_str(&format!("--thaw-border-color: {bg_color};"));
|
||||||
css_vars.push_str(&format!("--melt-border-color-hover: {bg_color};"));
|
css_vars.push_str(&format!("--thaw-border-color-hover: {bg_color};"));
|
||||||
css_vars.push_str(&format!("--melt-melt-ripple-color: {bg_color};"));
|
css_vars.push_str(&format!("--thaw-ripple-color: {bg_color};"));
|
||||||
} else if variant.get() == ButtonVariant::Text {
|
} else if variant.get() == ButtonVariant::Text {
|
||||||
css_vars.push_str(&format!("--melt-font-color-hover: {bg_color};"));
|
css_vars.push_str(&format!("--thaw-font-color-hover: {bg_color};"));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color-hover: {};",
|
"--thaw-background-color-hover: {};",
|
||||||
theme.button.color_text_hover
|
theme.button.color_text_hover
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color-active: {};",
|
"--thaw-background-color-active: {};",
|
||||||
theme.button.color_text_active
|
theme.button.color_text_active
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!("--melt-ripple-color: #0000;"));
|
css_vars.push_str(&format!("--thaw-ripple-color: #0000;"));
|
||||||
} else {
|
} else {
|
||||||
css_vars.push_str(&format!("--melt-font-color-hover: {bg_color};"));
|
css_vars.push_str(&format!("--thaw-font-color-hover: {bg_color};"));
|
||||||
css_vars.push_str("--melt-border-color: #555a;");
|
css_vars.push_str("--thaw-border-color: #555a;");
|
||||||
css_vars.push_str("--melt-border-color-hover: #555;");
|
css_vars.push_str("--thaw-border-color-hover: #555;");
|
||||||
css_vars.push_str(&format!("--melt-ripple-color: #0000;"));
|
css_vars.push_str(&format!("--thaw-ripple-color: #0000;"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -139,11 +139,11 @@ pub fn Button(
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<button
|
<button
|
||||||
class:melt-button=true
|
class:thaw-button=true
|
||||||
class=("melt-button--text", move || variant.get() == ButtonVariant::Text)
|
class=("thaw-button--text", move || variant.get() == ButtonVariant::Text)
|
||||||
class=("melt-button--link", move || variant.get() == ButtonVariant::Link)
|
class=("thaw-button--link", move || variant.get() == ButtonVariant::Link)
|
||||||
class=("melt-button--round", move || round.get())
|
class=("thaw-button--round", move || round.get())
|
||||||
class=("melt-button--disabled", move || disabled.get())
|
class=("thaw-button--disabled", move || disabled.get())
|
||||||
style=move || format!("{}{}", css_vars.get(), style.get())
|
style=move || format!("{}{}", css_vars.get(), style.get())
|
||||||
on:click=on_click
|
on:click=on_click
|
||||||
>
|
>
|
||||||
|
@ -154,7 +154,7 @@ pub fn Button(
|
||||||
<Icon
|
<Icon
|
||||||
icon=Icon::from(AiIcon::AiLoadingOutlined)
|
icon=Icon::from(AiIcon::AiLoadingOutlined)
|
||||||
style=format!(
|
style=format!(
|
||||||
"animation: meltLoadingCircle 1s infinite linear;{icon_style}",
|
"animation: thawLoadingCircle 1s infinite linear;{icon_style}",
|
||||||
)
|
)
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
.melt-card {
|
.thaw-card {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border: 1px solid var(--melt-border-color);
|
border: 1px solid var(--thaw-border-color);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.melt-card__header {
|
.thaw-card__header {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.melt-card__header-extra {
|
.thaw-card__header-extra {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.melt-card__header-content {
|
.thaw-card__header-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
.melt-card__header,
|
.thaw-card__header,
|
||||||
.melt-card__content,
|
.thaw-card__content,
|
||||||
.melt-card__footer {
|
.thaw-card__footer {
|
||||||
padding: 12px 28px;
|
padding: 12px 28px;
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
}
|
}
|
||||||
.melt-card__header {
|
.thaw-card__header {
|
||||||
padding: 20px 28px;
|
padding: 20px 28px;
|
||||||
}
|
}
|
||||||
.melt-card__header + .melt-card__content,
|
.thaw-card__header + .thaw-card__content,
|
||||||
.melt-card__footer {
|
.thaw-card__footer {
|
||||||
padding: 0 28px 20px;
|
padding: 0 28px 20px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,11 +34,11 @@ pub fn Card(
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color: {};",
|
"--thaw-background-color: {};",
|
||||||
theme.common.background_color
|
theme.common.background_color
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-border-color: {};",
|
"--thaw-border-color: {};",
|
||||||
theme.common.border_color
|
theme.common.border_color
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
@ -52,27 +52,27 @@ pub fn Card(
|
||||||
let header_extra = store_value(card_header_extra);
|
let header_extra = store_value(card_header_extra);
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-card" style=move || css_vars.get()>
|
<div class="thaw-card" style=move || css_vars.get()>
|
||||||
<If cond=is_header>
|
<If cond=is_header>
|
||||||
<Then slot>
|
<Then slot>
|
||||||
<div class="melt-card__header">
|
<div class="thaw-card__header">
|
||||||
<div class="melt-card__header-content">
|
<div class="thaw-card__header-content">
|
||||||
<OptionComp value=header.get_value() let:header>
|
<OptionComp value=header.get_value() let:header>
|
||||||
<Fallback slot>{move || title.get_value().get()}</Fallback>
|
<Fallback slot>{move || title.get_value().get()}</Fallback>
|
||||||
{(header.children)()}
|
{(header.children)()}
|
||||||
</OptionComp>
|
</OptionComp>
|
||||||
</div>
|
</div>
|
||||||
<OptionComp value=header_extra.get_value() let:header_extra>
|
<OptionComp value=header_extra.get_value() let:header_extra>
|
||||||
<div class="melt-card__header-extra">{(header_extra.children)()}</div>
|
<div class="thaw-card__header-extra">{(header_extra.children)()}</div>
|
||||||
</OptionComp>
|
</OptionComp>
|
||||||
</div>
|
</div>
|
||||||
</Then>
|
</Then>
|
||||||
</If>
|
</If>
|
||||||
<div class="melt-card__content">{children()}</div>
|
<div class="thaw-card__content">{children()}</div>
|
||||||
<OptionComp value=card_footer let:footer>
|
<OptionComp value=card_footer let:footer>
|
||||||
<If cond=footer.if_>
|
<If cond=footer.if_>
|
||||||
<Then slot>
|
<Then slot>
|
||||||
<div class="melt-card__footer">{(footer.children)()}</div>
|
<div class="thaw-card__footer">{(footer.children)()}</div>
|
||||||
</Then>
|
</Then>
|
||||||
</If>
|
</If>
|
||||||
</OptionComp>
|
</OptionComp>
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
.melt-checkbox {
|
.thaw-checkbox {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-checkbox__input {
|
.thaw-checkbox__input {
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
.melt-checkbox__dot {
|
.thaw-checkbox__dot {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -18,15 +18,15 @@
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
.melt-checkbox:hover .melt-checkbox__dot,
|
.thaw-checkbox:hover .thaw-checkbox__dot,
|
||||||
.melt-checkbox--checked .melt-checkbox__dot {
|
.thaw-checkbox--checked .thaw-checkbox__dot {
|
||||||
border-color: var(--melt-background-color-checked);
|
border-color: var(--thaw-background-color-checked);
|
||||||
}
|
}
|
||||||
.melt-checkbox--checked .melt-checkbox__dot {
|
.thaw-checkbox--checked .thaw-checkbox__dot {
|
||||||
background-color: var(--melt-background-color-checked);
|
background-color: var(--thaw-background-color-checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-checkbox__label {
|
.thaw-checkbox__label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0 6px;
|
padding: 0 6px;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
|
@ -25,7 +25,7 @@ pub fn Checkbox(
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color-checked: {};",
|
"--thaw-background-color-checked: {};",
|
||||||
theme.common.color_primary
|
theme.common.color_primary
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
@ -34,20 +34,20 @@ pub fn Checkbox(
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div
|
<div
|
||||||
class:melt-checkbox=true
|
class:thaw-checkbox=true
|
||||||
class=("melt-checkbox--checked", move || value.get())
|
class=("thaw-checkbox--checked", move || value.get())
|
||||||
style=move || css_vars.get()
|
style=move || css_vars.get()
|
||||||
on:click=move |_| value.set(!value.get_untracked())
|
on:click=move |_| value.set(!value.get_untracked())
|
||||||
>
|
>
|
||||||
<input class="melt-checkbox__input" type="checkbox"/>
|
<input class="thaw-checkbox__input" type="checkbox"/>
|
||||||
<div class="melt-checkbox__dot">
|
<div class="thaw-checkbox__dot">
|
||||||
<If cond=value.clone_into()>
|
<If cond=value.clone_into()>
|
||||||
<Then slot>
|
<Then slot>
|
||||||
<Icon icon=Icon::from(AiIcon::AiCheckOutlined) style="color: white"/>
|
<Icon icon=Icon::from(AiIcon::AiCheckOutlined) style="color: white"/>
|
||||||
</Then>
|
</Then>
|
||||||
</If>
|
</If>
|
||||||
</div>
|
</div>
|
||||||
<div class="melt-checkbox__label">{children()}</div>
|
<div class="thaw-checkbox__label">{children()}</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
.melt-code {
|
.thaw-code {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
|
@ -4,5 +4,5 @@ use leptos::*;
|
||||||
#[component]
|
#[component]
|
||||||
pub fn Code(children: Children) -> impl IntoView {
|
pub fn Code(children: Children) -> impl IntoView {
|
||||||
mount_style("code", include_str!("./code.css"));
|
mount_style("code", include_str!("./code.css"));
|
||||||
view! { <code class="melt-code">{children()}</code> }
|
view! { <code class="thaw-code">{children()}</code> }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.melt-color-picker-trigger {
|
.thaw-color-picker-trigger {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-color-picker-trigger__content {
|
.thaw-color-picker-trigger__content {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -17,14 +17,14 @@
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-color-picker-popover {
|
.thaw-color-picker-popover {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 240px;
|
width: 240px;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
||||||
|
@ -32,14 +32,14 @@
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-color-picker-popover__panel {
|
.thaw-color-picker-popover__panel {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 180px;
|
height: 180px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
cursor: crosshair;
|
cursor: crosshair;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-color-picker-popover__layer {
|
.thaw-color-picker-popover__layer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-color-picker-popover__layer--shadowed {
|
.thaw-color-picker-popover__layer--shadowed {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
background-image: linear-gradient(rgba(0, 0, 0, 0), rgb(0, 0, 0));
|
background-image: linear-gradient(rgba(0, 0, 0, 0), rgb(0, 0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-color-picker-popover__handle {
|
.thaw-color-picker-popover__handle {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -6px;
|
left: -6px;
|
||||||
bottom: -6px;
|
bottom: -6px;
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.45);
|
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.45);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-color-picker-slider {
|
.thaw-color-picker-slider {
|
||||||
height: 12px;
|
height: 12px;
|
||||||
padding: 0 6px;
|
padding: 0 6px;
|
||||||
background-image: linear-gradient(
|
background-image: linear-gradient(
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-color-picker-slider__handle {
|
.thaw-color-picker-slider__handle {
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 12px;
|
width: 12px;
|
||||||
|
|
|
@ -16,7 +16,7 @@ pub fn ColorPicker(#[prop(optional, into)] value: MaybeRwSignal<RGBA>) -> impl I
|
||||||
let popover_css_vars = create_memo(move |_| {
|
let popover_css_vars = create_memo(move |_| {
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
format!(
|
format!(
|
||||||
"--melt-background-color: {};",
|
"--thaw-background-color: {};",
|
||||||
theme.color_picker.popover_background_color
|
theme.color_picker.popover_background_color
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
@ -98,14 +98,14 @@ pub fn ColorPicker(#[prop(optional, into)] value: MaybeRwSignal<RGBA>) -> impl I
|
||||||
on_cleanup(move || timer.remove());
|
on_cleanup(move || timer.remove());
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-color-picker-trigger" on:click=show_popover ref=trigger_ref>
|
<div class="thaw-color-picker-trigger" on:click=show_popover ref=trigger_ref>
|
||||||
<div class="melt-color-picker-trigger__content" style=move || style.get()>
|
<div class="thaw-color-picker-trigger__content" style=move || style.get()>
|
||||||
{move || label.get()}
|
{move || label.get()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Teleport>
|
<Teleport>
|
||||||
<div
|
<div
|
||||||
class="melt-color-picker-popover"
|
class="thaw-color-picker-popover"
|
||||||
ref=popover_ref
|
ref=popover_ref
|
||||||
style=move || {
|
style=move || {
|
||||||
if is_show_popover.get() {
|
if is_show_popover.get() {
|
||||||
|
@ -172,17 +172,17 @@ fn ColorPanel(hue: ReadSignal<u16>, sv: RwSignal<(f64, f64)>) -> impl IntoView {
|
||||||
};
|
};
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-color-picker-popover__panel" ref=panel_ref on:mousedown=on_mouse_down>
|
<div class="thaw-color-picker-popover__panel" ref=panel_ref on:mousedown=on_mouse_down>
|
||||||
<div
|
<div
|
||||||
class="melt-color-picker-popover__layer"
|
class="thaw-color-picker-popover__layer"
|
||||||
style:background-image=move || {
|
style:background-image=move || {
|
||||||
format!("linear-gradient(90deg, white, hsl({}, 100%, 50%))", hue.get())
|
format!("linear-gradient(90deg, white, hsl({}, 100%, 50%))", hue.get())
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="melt-color-picker-popover__layer--shadowed"></div>
|
<div class="thaw-color-picker-popover__layer--shadowed"></div>
|
||||||
<div
|
<div
|
||||||
class="melt-color-picker-popover__handle"
|
class="thaw-color-picker-popover__handle"
|
||||||
style=move || {
|
style=move || {
|
||||||
format!(
|
format!(
|
||||||
"left: calc({}% - 6px); bottom: calc({}% - 6px)",
|
"left: calc({}% - 6px); bottom: calc({}% - 6px)",
|
||||||
|
@ -233,9 +233,9 @@ fn HueSlider(hue: RwSignal<u16>) -> impl IntoView {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-color-picker-slider" ref=rail_ref on:mousedown=on_mouse_down>
|
<div class="thaw-color-picker-slider" ref=rail_ref on:mousedown=on_mouse_down>
|
||||||
<div
|
<div
|
||||||
class="melt-color-picker-slider__handle"
|
class="thaw-color-picker-slider__handle"
|
||||||
style=move || format!("left: calc({}% - 6px)", f32::from(hue.get()) / 359.0 * 100.0)
|
style=move || format!("left: calc({}% - 6px)", f32::from(hue.get()) / 359.0 * 100.0)
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
|
|
||||||
.melt-divider {
|
.thaw-divider {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 1.5rem 0;
|
margin: 1.5rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-divider__line {
|
.thaw-divider__line {
|
||||||
background-color: #efeff5;
|
background-color: #efeff5;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -6,8 +6,8 @@ use crate::mount_style;
|
||||||
pub fn Divider() -> impl IntoView {
|
pub fn Divider() -> impl IntoView {
|
||||||
mount_style("divider", include_str!("./divider.css"));
|
mount_style("divider", include_str!("./divider.css"));
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-divider">
|
<div class="thaw-divider">
|
||||||
<div class="melt-divider__line"></div>
|
<div class="thaw-divider__line"></div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ pub fn GridItem(
|
||||||
style
|
style
|
||||||
});
|
});
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-grid-item" style=move || style.get()>
|
<div class="thaw-grid-item" style=move || style.get()>
|
||||||
{children()}
|
{children()}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ pub fn Grid(
|
||||||
});
|
});
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-grid" style=move || style.get()>
|
<div class="thaw-grid" style=move || style.get()>
|
||||||
{children()}
|
{children()}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,42 +1,42 @@
|
||||||
.melt-input {
|
.thaw-input {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: var(--melt-font-color);
|
color: var(--thaw-font-color);
|
||||||
border: 1px solid var(--melt-border-color);
|
border: 1px solid var(--thaw-border-color);
|
||||||
border-radius: var(--melt-border-radius);
|
border-radius: var(--thaw-border-radius);
|
||||||
cursor: text;
|
cursor: text;
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-input--focus,
|
.thaw-input--focus,
|
||||||
.melt-input:hover {
|
.thaw-input:hover {
|
||||||
border-color: var(--melt-border-color-hover);
|
border-color: var(--thaw-border-color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-input--focus {
|
.thaw-input--focus {
|
||||||
box-shadow: 0 0 0 2px var(--melt-box-shadow-color);
|
box-shadow: 0 0 0 2px var(--thaw-box-shadow-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-input__input-el {
|
.thaw-input__input-el {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: var(--melt-font-color);
|
color: var(--thaw-font-color);
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-input__input-el::placeholder {
|
.thaw-input__input-el::placeholder {
|
||||||
color: var(--melt-placeholder-color);
|
color: var(--thaw-placeholder-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-input__suffix {
|
.thaw-input__suffix {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
|
@ -70,28 +70,28 @@ pub fn Input(
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
let border_color_hover = theme.common.color_primary.clone();
|
let border_color_hover = theme.common.color_primary.clone();
|
||||||
css_vars.push_str(&format!("--melt-border-color-hover: {border_color_hover};"));
|
css_vars.push_str(&format!("--thaw-border-color-hover: {border_color_hover};"));
|
||||||
css_vars.push_str(&format!("--melt-box-shadow-color: {border_color_hover}33;"));
|
css_vars.push_str(&format!("--thaw-box-shadow-color: {border_color_hover}33;"));
|
||||||
let border_radius = theme.common.border_radius.clone();
|
let border_radius = theme.common.border_radius.clone();
|
||||||
css_vars.push_str(&format!("--melt-border-radius: {border_radius};"));
|
css_vars.push_str(&format!("--thaw-border-radius: {border_radius};"));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color: {};",
|
"--thaw-background-color: {};",
|
||||||
theme.input.background_color
|
theme.input.background_color
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!("--melt-font-color: {};", theme.input.font_color));
|
css_vars.push_str(&format!("--thaw-font-color: {};", theme.input.font_color));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-border-color: {};",
|
"--thaw-border-color: {};",
|
||||||
theme.input.border_color
|
theme.input.border_color
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-placeholder-color: {};",
|
"--thaw-placeholder-color: {};",
|
||||||
theme.input.placeholder_color
|
theme.input.placeholder_color
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
css_vars
|
css_vars
|
||||||
});
|
});
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-input" class=("melt-input--focus", move || is_focus.get()) style=move || css_vars.get()>
|
<div class="thaw-input" class=("thaw-input--focus", move || is_focus.get()) style=move || css_vars.get()>
|
||||||
<input
|
<input
|
||||||
type=move || variant.get().as_str()
|
type=move || variant.get().as_str()
|
||||||
prop:value=move || {
|
prop:value=move || {
|
||||||
|
@ -102,12 +102,12 @@ pub fn Input(
|
||||||
on:input=on_input
|
on:input=on_input
|
||||||
on:focus=on_internal_focus
|
on:focus=on_internal_focus
|
||||||
on:blur=on_internal_blur
|
on:blur=on_internal_blur
|
||||||
class="melt-input__input-el"
|
class="thaw-input__input-el"
|
||||||
placeholder=move || placeholder.get()
|
placeholder=move || placeholder.get()
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{if let Some(suffix) = input_suffix {
|
{if let Some(suffix) = input_suffix {
|
||||||
view! { <div class="melt-input__suffix">{(suffix.children)()}</div> }.into()
|
view! { <div class="thaw-input__suffix">{(suffix.children)()}</div> }.into()
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.melt-layout-sider {
|
.thaw-layout-sider {
|
||||||
position: relative;
|
position: relative;
|
||||||
min-width: 240px;
|
min-width: 240px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
.melt-layout {
|
.thaw-layout {
|
||||||
flex: auto;
|
flex: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-layout--absolute-positioned {
|
.thaw-layout--absolute-positioned {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
|
@ -6,7 +6,7 @@ pub fn LayoutHeader(
|
||||||
children: Children,
|
children: Children,
|
||||||
) -> impl IntoView {
|
) -> impl IntoView {
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-layout-header" style=move || style.get()>
|
<div class="thaw-layout-header" style=move || style.get()>
|
||||||
{children()}
|
{children()}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ pub fn LayoutSider(
|
||||||
) -> impl IntoView {
|
) -> impl IntoView {
|
||||||
mount_style("layout-sider", include_str!("./layout-sider.css"));
|
mount_style("layout-sider", include_str!("./layout-sider.css"));
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-layout-sider" style=move || style.get()>
|
<div class="thaw-layout-sider" style=move || style.get()>
|
||||||
{children()}
|
{children()}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,8 +40,8 @@ pub fn Layout(
|
||||||
});
|
});
|
||||||
view! {
|
view! {
|
||||||
<div
|
<div
|
||||||
class="melt-layout"
|
class="thaw-layout"
|
||||||
class=("melt-layout--absolute-positioned", position == LayoutPosition::Absolute)
|
class=("thaw-layout--absolute-positioned", position == LayoutPosition::Absolute)
|
||||||
style=move || style.get()
|
style=move || style.get()
|
||||||
>
|
>
|
||||||
{children()}
|
{children()}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.melt-menu-group {
|
.thaw-menu-group {
|
||||||
padding: 0.85rem 1.15em 0.1rem;
|
padding: 0.85rem 1.15em 0.1rem;
|
||||||
font-size: 0.86rem;
|
font-size: 0.86rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: var(--melt-font-color);
|
color: var(--thaw-font-color);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
.melt-menu-item__content {
|
.thaw-menu-item__content {
|
||||||
margin: 0.3rem 0.4rem;
|
margin: 0.3rem 0.4rem;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
color: var(--melt-font-color);
|
color: var(--thaw-font-color);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 0.25rem;
|
border-radius: 0.25rem;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
|
@ -11,11 +11,11 @@
|
||||||
transition-duration: 0.15s;
|
transition-duration: 0.15s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-menu-item__content:hover:not(.melt-menu-item__content--selected) {
|
.thaw-menu-item__content:hover:not(.thaw-menu-item__content--selected) {
|
||||||
background-color: var(--melt-background-color-hover);
|
background-color: var(--thaw-background-color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-menu-item__content--selected {
|
.thaw-menu-item__content--selected {
|
||||||
color: var(--melt-font-color-active);
|
color: var(--thaw-font-color-active);
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,12 +8,12 @@ pub fn MenuGroup(#[prop(into)] label: String, children: Children) -> impl IntoVi
|
||||||
let css_vars = create_memo(move |_| {
|
let css_vars = create_memo(move |_| {
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
css_vars.push_str(&format!("--melt-font-color: {};", theme.menu.group_color));
|
css_vars.push_str(&format!("--thaw-font-color: {};", theme.menu.group_color));
|
||||||
});
|
});
|
||||||
css_vars
|
css_vars
|
||||||
});
|
});
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-menu-group" style=move || css_vars.get()>
|
<div class="thaw-menu-group" style=move || css_vars.get()>
|
||||||
{label}
|
{label}
|
||||||
</div>
|
</div>
|
||||||
{children()}
|
{children()}
|
||||||
|
|
|
@ -19,21 +19,21 @@ pub fn MenuItem(
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
let font_color = theme.common.color_primary.clone();
|
let font_color = theme.common.color_primary.clone();
|
||||||
css_vars.push_str(&format!("--melt-font-color-active: {font_color};"));
|
css_vars.push_str(&format!("--thaw-font-color-active: {font_color};"));
|
||||||
css_vars.push_str(&format!("--melt-font-color: {};", theme.menu.color));
|
css_vars.push_str(&format!("--thaw-font-color: {};", theme.menu.color));
|
||||||
css_vars.push_str(&format!("--melt-background-color: {font_color}1a;"));
|
css_vars.push_str(&format!("--thaw-background-color: {font_color}1a;"));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color-hover: {};",
|
"--thaw-background-color-hover: {};",
|
||||||
theme.menu.item_color_hover
|
theme.menu.item_color_hover
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
css_vars
|
css_vars
|
||||||
});
|
});
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-menu-item">
|
<div class="thaw-menu-item">
|
||||||
<div
|
<div
|
||||||
class="melt-menu-item__content"
|
class="thaw-menu-item__content"
|
||||||
class=("melt-menu-item__content--selected", move || menu.get().value == key.get())
|
class=("thaw-menu-item__content--selected", move || menu.get().value == key.get())
|
||||||
on:click=on_click
|
on:click=on_click
|
||||||
style=move || css_vars.get()
|
style=move || css_vars.get()
|
||||||
>
|
>
|
||||||
|
|
|
@ -30,7 +30,7 @@ pub fn Menu(
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
provide_context(menu_injection_key);
|
provide_context(menu_injection_key);
|
||||||
view! { <div class="melt-menu">{children()}</div> }
|
view! { <div class="thaw-menu">{children()}</div> }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.melt-message-container {
|
.thaw-message-container {
|
||||||
z-index: 6000;
|
z-index: 6000;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 12px;
|
top: 12px;
|
||||||
|
@ -11,11 +11,11 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-message-wrapper {
|
.thaw-message-wrapper {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-message {
|
.thaw-message {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
max-width: 75vh;
|
max-width: 75vh;
|
||||||
background: var(--melt-background-color);
|
background: var(--thaw-background-color);
|
||||||
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
@ -32,13 +32,13 @@
|
||||||
0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-message__icon {
|
.thaw-message__icon {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-message__content {
|
.thaw-message__content {
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ pub(crate) fn Message(variant: MessageVariant, content: String) -> impl IntoView
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color: {}",
|
"--thaw-background-color: {}",
|
||||||
theme.message.background_color
|
theme.message.background_color
|
||||||
))
|
))
|
||||||
});
|
});
|
||||||
|
@ -42,12 +42,12 @@ pub(crate) fn Message(variant: MessageVariant, content: String) -> impl IntoView
|
||||||
});
|
});
|
||||||
let style = theme.with_untracked(|theme| format!("color: {};", variant.theme_color(theme)));
|
let style = theme.with_untracked(|theme| format!("color: {};", variant.theme_color(theme)));
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-message-wrapper">
|
<div class="thaw-message-wrapper">
|
||||||
<div class="melt-message" style=move || css_vars.get()>
|
<div class="thaw-message" style=move || css_vars.get()>
|
||||||
<div class="melt-message__icon">
|
<div class="thaw-message__icon">
|
||||||
<Icon icon=variant.icon() style/>
|
<Icon icon=variant.icon() style/>
|
||||||
</div>
|
</div>
|
||||||
<div class="melt-message__content">{content}</div>
|
<div class="thaw-message__content">{content}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ pub fn MessageProvider(children: Children) -> impl IntoView {
|
||||||
view! {
|
view! {
|
||||||
{children()}
|
{children()}
|
||||||
<Teleport>
|
<Teleport>
|
||||||
<div class="melt-message-container">
|
<div class="thaw-message-container">
|
||||||
<For
|
<For
|
||||||
each=move || message_list.get()
|
each=move || message_list.get()
|
||||||
key=|message| message.0
|
key=|message| message.0
|
||||||
|
|
|
@ -24,7 +24,7 @@ pub fn NavBar(
|
||||||
let css_vars = create_memo(move |_| {
|
let css_vars = create_memo(move |_| {
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
format!(
|
format!(
|
||||||
"--melt-background-color: {};",
|
"--thaw-background-color: {};",
|
||||||
theme.nav_bar.background_color
|
theme.nav_bar.background_color
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
@ -46,10 +46,10 @@ pub fn NavBar(
|
||||||
};
|
};
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-nav-bar" style=move || css_vars.get()>
|
<div class="thaw-nav-bar" style=move || css_vars.get()>
|
||||||
<If cond=MaybeSignal::derive(move || left_arrow.get() || !left_text.get().is_empty())>
|
<If cond=MaybeSignal::derive(move || left_arrow.get() || !left_text.get().is_empty())>
|
||||||
<Then slot>
|
<Then slot>
|
||||||
<div class="melt-nav-bar__left" on:click=on_click_left>
|
<div class="thaw-nav-bar__left" on:click=on_click_left>
|
||||||
<If cond=left_arrow>
|
<If cond=left_arrow>
|
||||||
<Then slot>
|
<Then slot>
|
||||||
<Icon icon=Icon::from(AiIcon::AiLeftOutlined)/>
|
<Icon icon=Icon::from(AiIcon::AiLeftOutlined)/>
|
||||||
|
@ -59,10 +59,10 @@ pub fn NavBar(
|
||||||
</div>
|
</div>
|
||||||
</Then>
|
</Then>
|
||||||
</If>
|
</If>
|
||||||
<div class="melt-nav-bar__center">{move || title.get()}</div>
|
<div class="thaw-nav-bar__center">{move || title.get()}</div>
|
||||||
<If cond=MaybeSignal::derive(move || !right_text.get().is_empty())>
|
<If cond=MaybeSignal::derive(move || !right_text.get().is_empty())>
|
||||||
<Then slot>
|
<Then slot>
|
||||||
<div class="melt-nav-bar__right" on:click=on_click_right>
|
<div class="thaw-nav-bar__right" on:click=on_click_right>
|
||||||
{move || right_text.get()}
|
{move || right_text.get()}
|
||||||
</div>
|
</div>
|
||||||
</Then>
|
</Then>
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
.melt-nav-bar {
|
.thaw-nav-bar {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
height: 46px;
|
height: 46px;
|
||||||
line-height: 46px;
|
line-height: 46px;
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-nav-bar__center {
|
.thaw-nav-bar__center {
|
||||||
max-width: 60%;
|
max-width: 60%;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-nav-bar__left {
|
.thaw-nav-bar__left {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-nav-bar__right {
|
.thaw-nav-bar__right {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|
|
@ -20,7 +20,7 @@ pub fn Tabbar(
|
||||||
let css_vars = create_memo(move |_| {
|
let css_vars = create_memo(move |_| {
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
format!(
|
format!(
|
||||||
"--melt-background-color: {};",
|
"--thaw-background-color: {};",
|
||||||
theme.tabbar.background_color
|
theme.tabbar.background_color
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
@ -44,7 +44,7 @@ pub fn Tabbar(
|
||||||
});
|
});
|
||||||
provide_context(tabbar_injection_key);
|
provide_context(tabbar_injection_key);
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-tabbar" style=move || css_vars.get()>
|
<div class="thaw-tabbar" style=move || css_vars.get()>
|
||||||
{children()}
|
{children()}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.melt-tabbar-item {
|
.thaw-tabbar-item {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -7,11 +7,11 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-tabbar-item--selected {
|
.thaw-tabbar-item--selected {
|
||||||
color: var(--melt-font-color-selected)
|
color: var(--thaw-font-color-selected)
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-tabbar-item__content {
|
.thaw-tabbar-item__content {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
.melt-tabbar {
|
.thaw-tabbar {
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
|
@ -22,22 +22,22 @@ pub fn TabbarItem(
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
let font_color = theme.common.color_primary.clone();
|
let font_color = theme.common.color_primary.clone();
|
||||||
css_vars.push_str(&format!("--melt-font-color-selected: {font_color};"));
|
css_vars.push_str(&format!("--thaw-font-color-selected: {font_color};"));
|
||||||
});
|
});
|
||||||
css_vars
|
css_vars
|
||||||
});
|
});
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div
|
<div
|
||||||
class="melt-tabbar-item"
|
class="thaw-tabbar-item"
|
||||||
class=("melt-tabbar-item--selected", move || tabbar.get().value == key.get())
|
class=("thaw-tabbar-item--selected", move || tabbar.get().value == key.get())
|
||||||
on:click=on_click
|
on:click=on_click
|
||||||
style=move || css_vars.get()
|
style=move || css_vars.get()
|
||||||
>
|
>
|
||||||
<OptionComp value=icon let:icon>
|
<OptionComp value=icon let:icon>
|
||||||
<Icon icon=icon width="22px" height="22px" class="melt-tabbar-item__icon"/>
|
<Icon icon=icon width="22px" height="22px" class="thaw-tabbar-item__icon"/>
|
||||||
</OptionComp>
|
</OptionComp>
|
||||||
<div class="melt-tabbar-item__content">{children()}</div>
|
<div class="thaw-tabbar-item__content">{children()}</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ pub fn show_toast(options: ToastOptions) {
|
||||||
mount_style("toast", include_str!("./toast.css"));
|
mount_style("toast", include_str!("./toast.css"));
|
||||||
|
|
||||||
let parent = Element::from(document().body().expect("body element not to exist"));
|
let parent = Element::from(document().body().expect("body element not to exist"));
|
||||||
let children = view! { <div class="melt-toast">{options.message}</div> };
|
let children = view! { <div class="thaw-toast">{options.message}</div> };
|
||||||
let node = children.into_view();
|
let node = children.into_view();
|
||||||
|
|
||||||
#[cfg(target_arch = "wasm32")]
|
#[cfg(target_arch = "wasm32")]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.melt-toast {
|
.thaw-toast {
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
|
|
|
@ -24,14 +24,14 @@ pub fn Modal(
|
||||||
view! {
|
view! {
|
||||||
<Teleport>
|
<Teleport>
|
||||||
<div
|
<div
|
||||||
class="melt-modal-container"
|
class="thaw-modal-container"
|
||||||
style=move || if show.get() { "" } else { "display: none" }
|
style=move || if show.get() { "" } else { "display: none" }
|
||||||
>
|
>
|
||||||
<div class="melt-modal-mask"></div>
|
<div class="thaw-modal-mask"></div>
|
||||||
<div class="melt-modal-body">
|
<div class="thaw-modal-body">
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader slot>
|
<CardHeader slot>
|
||||||
<span class="melt-model-title">{move || title.get()}</span>
|
<span class="thaw-model-title">{move || title.get()}</span>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardHeaderExtra slot>
|
<CardHeaderExtra slot>
|
||||||
<span style="cursor: pointer;" on:click=move |_| show.set(false)>
|
<span style="cursor: pointer;" on:click=move |_| show.set(false)>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
.melt-modal-container {
|
.thaw-modal-container {
|
||||||
z-index: 2001;
|
z-index: 2001;
|
||||||
}
|
}
|
||||||
.melt-modal-mask {
|
.thaw-modal-mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
background-color: #0007;
|
background-color: #0007;
|
||||||
z-index: 2000;
|
z-index: 2000;
|
||||||
}
|
}
|
||||||
.melt-modal-body {
|
.thaw-modal-body {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -21,11 +21,11 @@
|
||||||
z-index: 2002;
|
z-index: 2002;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-modal-body .melt-card {
|
.thaw-modal-body .thaw-card {
|
||||||
width: 600px;
|
width: 600px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-model-title {
|
.thaw-model-title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,16 +13,16 @@ pub fn Progress(
|
||||||
let right_tip: StoredMaybeSignal<_> = right_tip.into();
|
let right_tip: StoredMaybeSignal<_> = right_tip.into();
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-progress">
|
<div class="thaw-progress">
|
||||||
<span class="melt-progress__tip-left">
|
<span class="thaw-progress__tip-left">
|
||||||
<Show when=move || left_tip.with(|v| !v.is_empty())>{move || left_tip.get()}</Show>
|
<Show when=move || left_tip.with(|v| !v.is_empty())>{move || left_tip.get()}</Show>
|
||||||
</span>
|
</span>
|
||||||
<span class="melt-progress__progress">
|
<span class="thaw-progress__progress">
|
||||||
<span class="melt-progress__progress-inner" style=style>
|
<span class="thaw-progress__progress-inner" style=style>
|
||||||
<span class="melt-progress__progress-circle"></span>
|
<span class="thaw-progress__progress-circle"></span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="melt-progress__tip-right">
|
<span class="thaw-progress__tip-right">
|
||||||
<Show when=move || {
|
<Show when=move || {
|
||||||
right_tip.with(|v| !v.is_empty())
|
right_tip.with(|v| !v.is_empty())
|
||||||
}>{move || right_tip.get()}</Show>
|
}>{move || right_tip.get()}</Show>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.melt-progress {
|
.thaw-progress {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -7,8 +7,8 @@
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-progress__tip-right,
|
.thaw-progress__tip-right,
|
||||||
.melt-progress__tip-left {
|
.thaw-progress__tip-left {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
width: 48px;
|
width: 48px;
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
color: #777;
|
color: #777;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-progress__progress {
|
.thaw-progress__progress {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 3px;
|
height: 3px;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
/* cursor: pointer; */
|
/* cursor: pointer; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-progress__progress-inner {
|
.thaw-progress__progress-inner {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -14px;
|
top: -14px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
transition: width 0.1s;
|
transition: width 0.1s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-progress__progress-circle {
|
.thaw-progress__progress-circle {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -3px;
|
right: -3px;
|
||||||
|
|
|
@ -17,7 +17,7 @@ pub fn Radio(
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
let bg_color = theme.common.color_primary.clone();
|
let bg_color = theme.common.color_primary.clone();
|
||||||
css_vars.push_str(&format!("--melt-background-color-checked: {bg_color};"));
|
css_vars.push_str(&format!("--thaw-background-color-checked: {bg_color};"));
|
||||||
});
|
});
|
||||||
|
|
||||||
css_vars
|
css_vars
|
||||||
|
@ -25,14 +25,14 @@ pub fn Radio(
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div
|
<div
|
||||||
class="melt-radio"
|
class="thaw-radio"
|
||||||
class=("melt-radio--checked", move || value.get())
|
class=("thaw-radio--checked", move || value.get())
|
||||||
style=move || css_vars.get()
|
style=move || css_vars.get()
|
||||||
on:click=move |_| value.set(!value.get_untracked())
|
on:click=move |_| value.set(!value.get_untracked())
|
||||||
>
|
>
|
||||||
<input class="melt-radio__input" type="radio" prop:value=move || value.get()/>
|
<input class="thaw-radio__input" type="radio" prop:value=move || value.get()/>
|
||||||
<div class="melt-radio__dot"></div>
|
<div class="thaw-radio__dot"></div>
|
||||||
<div class="melt-radio__label">{children()}</div>
|
<div class="thaw-radio__label">{children()}</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
.melt-radio {
|
.thaw-radio {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-radio__input {
|
.thaw-radio__input {
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-radio__dot {
|
.thaw-radio__dot {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 14px;
|
width: 14px;
|
||||||
|
@ -19,23 +19,23 @@
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-radio:hover .melt-radio__dot,
|
.thaw-radio:hover .thaw-radio__dot,
|
||||||
.melt-radio--checked .melt-radio__dot {
|
.thaw-radio--checked .thaw-radio__dot {
|
||||||
border-color: var(--melt-background-color-checked);
|
border-color: var(--thaw-background-color-checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-radio--checked .melt-radio__dot::before {
|
.thaw-radio--checked .thaw-radio__dot::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 3px;
|
top: 3px;
|
||||||
bottom: 3px;
|
bottom: 3px;
|
||||||
left: 3px;
|
left: 3px;
|
||||||
right: 3px;
|
right: 3px;
|
||||||
background-color: var(--melt-background-color-checked);
|
background-color: var(--thaw-background-color-checked);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-radio__label {
|
.thaw-radio__label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0 6px;
|
padding: 0 6px;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
|
@ -32,14 +32,14 @@ where
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
let border_color_hover = theme.common.color_primary.clone();
|
let border_color_hover = theme.common.color_primary.clone();
|
||||||
css_vars.push_str(&format!("--melt-border-color-hover: {border_color_hover};"));
|
css_vars.push_str(&format!("--thaw-border-color-hover: {border_color_hover};"));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color: {};",
|
"--thaw-background-color: {};",
|
||||||
theme.select.background_color
|
theme.select.background_color
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!("--melt-font-color: {};", theme.select.font_color));
|
css_vars.push_str(&format!("--thaw-font-color: {};", theme.select.font_color));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-border-color: {};",
|
"--thaw-border-color: {};",
|
||||||
theme.select.border_color
|
theme.select.border_color
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
@ -51,16 +51,16 @@ where
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color: {};",
|
"--thaw-background-color: {};",
|
||||||
theme.select.menu_background_color
|
theme.select.menu_background_color
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color-hover: {};",
|
"--thaw-background-color-hover: {};",
|
||||||
theme.select.menu_background_color_hover
|
theme.select.menu_background_color_hover
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!("--melt-font-color: {};", theme.select.font_color));
|
css_vars.push_str(&format!("--thaw-font-color: {};", theme.select.font_color));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-font-color-selected: {};",
|
"--thaw-font-color-selected: {};",
|
||||||
theme.common.color_primary
|
theme.common.color_primary
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
@ -116,14 +116,14 @@ where
|
||||||
None => String::new(),
|
None => String::new(),
|
||||||
});
|
});
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-select" ref=trigger_ref on:click=show_menu style=move || css_vars.get()>
|
<div class="thaw-select" ref=trigger_ref on:click=show_menu style=move || css_vars.get()>
|
||||||
|
|
||||||
{move || select_option_label.get()}
|
{move || select_option_label.get()}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<Teleport>
|
<Teleport>
|
||||||
<div
|
<div
|
||||||
class="melt-select-menu"
|
class="thaw-select-menu"
|
||||||
style=move || {
|
style=move || {
|
||||||
if is_show_menu.get() { menu_css_vars.get() } else { "display: none;".into() }
|
if is_show_menu.get() { menu_css_vars.get() } else { "display: none;".into() }
|
||||||
}
|
}
|
||||||
|
@ -142,9 +142,9 @@ where
|
||||||
};
|
};
|
||||||
view! {
|
view! {
|
||||||
<div
|
<div
|
||||||
class="melt-select-menu__item"
|
class="thaw-select-menu__item"
|
||||||
class=(
|
class=(
|
||||||
"melt-select-menu__item-selected",
|
"thaw-select-menu__item-selected",
|
||||||
move || value.get() == Some(item.get_value().value),
|
move || value.get() == Some(item.get_value().value),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
.melt-select {
|
.thaw-select {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
color: var(--melt-font-color);
|
color: var(--thaw-font-color);
|
||||||
border: 1px solid var(--melt-border-color);
|
border: 1px solid var(--thaw-border-color);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-select:hover {
|
.thaw-select:hover {
|
||||||
border-color: var(--melt-border-color-hover);
|
border-color: var(--thaw-border-color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-select-menu {
|
.thaw-select-menu {
|
||||||
color: var(--melt-font-color);
|
color: var(--thaw-font-color);
|
||||||
background-color: var(--melt-background-color);
|
background-color: var(--thaw-background-color);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -32,16 +32,16 @@
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-select-menu__item {
|
.thaw-select-menu__item {
|
||||||
padding: 6px 5px;
|
padding: 6px 5px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-select-menu__item:hover {
|
.thaw-select-menu__item:hover {
|
||||||
background-color: var(--melt-background-color-hover);
|
background-color: var(--thaw-background-color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.melt-select-menu__item-selected {
|
.thaw-select-menu__item-selected {
|
||||||
color: var(--melt-font-color-selected);
|
color: var(--thaw-font-color-selected);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,11 +28,11 @@ pub fn Skeleton(
|
||||||
|
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color-start: {};",
|
"--thaw-background-color-start: {};",
|
||||||
theme.skeletion.background_color_start
|
theme.skeletion.background_color_start
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color-end: {};",
|
"--thaw-background-color-end: {};",
|
||||||
theme.skeletion.background_color_end
|
theme.skeletion.background_color_end
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
@ -41,7 +41,7 @@ pub fn Skeleton(
|
||||||
});
|
});
|
||||||
(0..repeat.get())
|
(0..repeat.get())
|
||||||
.map(|_| {
|
.map(|_| {
|
||||||
view! { <div class="melt-skeleton" style=move || css_vars.get()></div> }
|
view! { <div class="thaw-skeleton" style=move || css_vars.get()></div> }
|
||||||
})
|
})
|
||||||
.collect_view()
|
.collect_view()
|
||||||
}
|
}
|
||||||
|
|
14
src/skeleton/skeleton.css
vendored
14
src/skeleton/skeleton.css
vendored
|
@ -1,19 +1,19 @@
|
||||||
.melt-skeleton {
|
.thaw-skeleton {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
background-color: var(--melt-background-color-start);
|
background-color: var(--thaw-background-color-start);
|
||||||
|
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
90deg,
|
90deg,
|
||||||
var(--melt-background-color-start) 25%,
|
var(--thaw-background-color-start) 25%,
|
||||||
var(--melt-background-color-end) 37%,
|
var(--thaw-background-color-end) 37%,
|
||||||
var(--melt-background-color-start) 63%
|
var(--thaw-background-color-start) 63%
|
||||||
);
|
);
|
||||||
animation: meltSkeletonLoading 1.4s ease infinite;
|
animation: thawSkeletonLoading 1.4s ease infinite;
|
||||||
background-size: 400% 100%;
|
background-size: 400% 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes meltSkeletonLoading {
|
@keyframes thawSkeletonLoading {
|
||||||
from {
|
from {
|
||||||
background-position: 100% 50%;
|
background-position: 100% 50%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,11 +19,11 @@ pub fn Slider(
|
||||||
let mut css_vars = String::new();
|
let mut css_vars = String::new();
|
||||||
theme.with(|theme| {
|
theme.with(|theme| {
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color: {};",
|
"--thaw-background-color: {};",
|
||||||
&theme.slider.background_color
|
&theme.slider.background_color
|
||||||
));
|
));
|
||||||
css_vars.push_str(&format!(
|
css_vars.push_str(&format!(
|
||||||
"--melt-background-color-fill: {};",
|
"--thaw-background-color-fill: {};",
|
||||||
&theme.common.color_primary
|
&theme.common.color_primary
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
@ -78,16 +78,16 @@ pub fn Slider(
|
||||||
on_cleanup(move || on_mouse_move.remove());
|
on_cleanup(move || on_mouse_move.remove());
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="melt-slider" style=move || css_vars.get()>
|
<div class="thaw-slider" style=move || css_vars.get()>
|
||||||
<div class="melt-slider-rail" ref=rail_ref>
|
<div class="thaw-slider-rail" ref=rail_ref>
|
||||||
<div
|
<div
|
||||||
class="melt-slider-rail__fill"
|
class="thaw-slider-rail__fill"
|
||||||
style=move || format!("width: {}%", percentage.get())
|
style=move || format!("width: {}%", percentage.get())
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
on:mousedown=on_mouse_down
|
on:mousedown=on_mouse_down
|
||||||
class="melt-slider-handle"
|
class="thaw-slider-handle"
|
||||||
style=move || {
|
style=move || {
|
||||||
format!(
|
format!(
|
||||||
"left: {}%; transform: translateX(-{}%)",
|
"left: {}%; transform: translateX(-{}%)",
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue