mirror of
https://github.com/adoyle0/thaw.git
synced 2025-02-08 19:03:09 -05:00
Update icondata (#82)
* Update icondata * merge upstream * feat: update icondata --------- Co-authored-by: luoxiaozero <48741584+luoxiaozero@users.noreply.github.com> Co-authored-by: luoxiao <luoxiaozero@163.com>
This commit is contained in:
parent
791e7ca9da
commit
3ea0afa7af
26 changed files with 56 additions and 86 deletions
|
@ -12,14 +12,7 @@ leptos_meta = { version = "0.5.7" }
|
||||||
leptos_router = { version = "0.5.7" }
|
leptos_router = { version = "0.5.7" }
|
||||||
leptos_devtools = { version = "0.0.1", optional = true}
|
leptos_devtools = { version = "0.0.1", optional = true}
|
||||||
thaw = { path = "../thaw", default-features = false }
|
thaw = { path = "../thaw", default-features = false }
|
||||||
icondata = { version = "0.1.0", features = [
|
icondata = "0.3.0"
|
||||||
"AiCloseOutlined",
|
|
||||||
"AiCheckOutlined",
|
|
||||||
"AiGithubOutlined",
|
|
||||||
"AiUserOutlined",
|
|
||||||
"AiSearchOutlined",
|
|
||||||
"AiUnorderedListOutlined"
|
|
||||||
] }
|
|
||||||
demo_markdown = { path = "../demo_markdown" }
|
demo_markdown = { path = "../demo_markdown" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
|
@ -141,14 +141,14 @@ pub fn SiteHeader() -> impl IntoView {
|
||||||
comp_ref=auto_complete_ref
|
comp_ref=auto_complete_ref
|
||||||
>
|
>
|
||||||
<AutoCompletePrefix slot>
|
<AutoCompletePrefix slot>
|
||||||
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiSearchOutlined) style="font-size: 18px; color: var(--thaw-placeholder-color);"/>
|
<Icon icon=icondata::AiSearchOutlined style="font-size: 18px; color: var(--thaw-placeholder-color);"/>
|
||||||
</AutoCompletePrefix>
|
</AutoCompletePrefix>
|
||||||
</AutoComplete>
|
</AutoComplete>
|
||||||
<Popover placement=PopoverPlacement::BottomEnd class="demo-header__menu-popover-mobile">
|
<Popover placement=PopoverPlacement::BottomEnd class="demo-header__menu-popover-mobile">
|
||||||
<PopoverTrigger slot class="demo-header__menu-mobile">
|
<PopoverTrigger slot class="demo-header__menu-mobile">
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Text
|
variant=ButtonVariant::Text
|
||||||
icon=icondata::AiIcon::AiUnorderedListOutlined
|
icon=icondata::AiUnorderedListOutlined
|
||||||
style="font-size: 22px; padding: 0px 6px;"
|
style="font-size: 22px; padding: 0px 6px;"
|
||||||
/>
|
/>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
|
@ -192,7 +192,7 @@ pub fn SiteHeader() -> impl IntoView {
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Text
|
variant=ButtonVariant::Text
|
||||||
icon=icondata::AiIcon::AiGithubOutlined
|
icon=icondata::AiGithubOutlined
|
||||||
round=true
|
round=true
|
||||||
style="font-size: 22px; padding: 0px 6px;"
|
style="font-size: 22px; padding: 0px 6px;"
|
||||||
on_click=move |_| {
|
on_click=move |_| {
|
||||||
|
|
|
@ -32,7 +32,7 @@ pub fn NavBarDemoPage() -> impl IntoView {
|
||||||
on_click_right=on_click_right
|
on_click_right=on_click_right
|
||||||
>
|
>
|
||||||
<NavBarRight slot>
|
<NavBarRight slot>
|
||||||
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiCloseOutlined)/>
|
<Icon icon=icondata::AiCloseOutlined/>
|
||||||
</NavBarRight>
|
</NavBarRight>
|
||||||
</NavBar>
|
</NavBar>
|
||||||
<div style="padding-top: 50px">{move || click_text.get()}</div>
|
<div style="padding-top: 50px">{move || click_text.get()}</div>
|
||||||
|
|
|
@ -23,7 +23,7 @@ pub fn TabbarDemoPage() -> impl IntoView {
|
||||||
{move || value.get()} <Tabbar value>
|
{move || value.get()} <Tabbar value>
|
||||||
<TabbarItem key="a">"and"</TabbarItem>
|
<TabbarItem key="a">"and"</TabbarItem>
|
||||||
<TabbarItem key="i">"if"</TabbarItem>
|
<TabbarItem key="i">"if"</TabbarItem>
|
||||||
<TabbarItem key="o" icon=icondata::AiIcon::AiCloseOutlined>
|
<TabbarItem key="o" icon=icondata::AiCloseOutlined>
|
||||||
"or"
|
"or"
|
||||||
</TabbarItem>
|
</TabbarItem>
|
||||||
</Tabbar>
|
</Tabbar>
|
||||||
|
|
|
@ -17,7 +17,7 @@ view! {
|
||||||
on_click_right=on_click_right
|
on_click_right=on_click_right
|
||||||
>
|
>
|
||||||
<NavBarRight slot>
|
<NavBarRight slot>
|
||||||
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiCloseOutlined)/>
|
<Icon icon=icondata::AiCloseOutlined/>
|
||||||
</NavBarRight>
|
</NavBarRight>
|
||||||
</NavBar>
|
</NavBar>
|
||||||
<div style="padding-top: 50px">{move || click_text.get()}</div>
|
<div style="padding-top: 50px">{move || click_text.get()}</div>
|
||||||
|
|
|
@ -11,7 +11,7 @@ view! {
|
||||||
<Tabbar value>
|
<Tabbar value>
|
||||||
<TabbarItem key="a">"and"</TabbarItem>
|
<TabbarItem key="a">"and"</TabbarItem>
|
||||||
<TabbarItem key="i">"if"</TabbarItem>
|
<TabbarItem key="i">"if"</TabbarItem>
|
||||||
<TabbarItem key="o" icon=icondata::AiIcon::AiCloseOutlined>
|
<TabbarItem key="o" icon=icondata::AiCloseOutlined>
|
||||||
"or"
|
"or"
|
||||||
</TabbarItem>
|
</TabbarItem>
|
||||||
</Tabbar>
|
</Tabbar>
|
||||||
|
|
|
@ -44,12 +44,12 @@ view! {
|
||||||
<Space vertical=true>
|
<Space vertical=true>
|
||||||
<AutoComplete>
|
<AutoComplete>
|
||||||
<AutoCompletePrefix slot>
|
<AutoCompletePrefix slot>
|
||||||
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiUserOutlined)/>
|
<Icon icon=icondata::AiUserOutlined/>
|
||||||
</AutoCompletePrefix>
|
</AutoCompletePrefix>
|
||||||
</AutoComplete>
|
</AutoComplete>
|
||||||
<AutoComplete>
|
<AutoComplete>
|
||||||
<AutoCompleteSuffix slot>
|
<AutoCompleteSuffix slot>
|
||||||
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiGithubOutlined)/>
|
<Icon icon=icondata::AiGithubOutlined/>
|
||||||
</AutoCompleteSuffix>
|
</AutoCompleteSuffix>
|
||||||
</AutoComplete>
|
</AutoComplete>
|
||||||
</Space>
|
</Space>
|
||||||
|
|
|
@ -29,17 +29,17 @@ view! {
|
||||||
```rust demo
|
```rust demo
|
||||||
view! {
|
view! {
|
||||||
<Space>
|
<Space>
|
||||||
<Button color=ButtonColor::Error icon=icondata::AiIcon::AiCloseOutlined>
|
<Button color=ButtonColor::Error icon=icondata::AiCloseOutlined>
|
||||||
"Error Color Icon"
|
"Error Color Icon"
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
color=ButtonColor::Error
|
color=ButtonColor::Error
|
||||||
icon=icondata::AiIcon::AiCloseOutlined
|
icon=icondata::AiCloseOutlined
|
||||||
round=true
|
round=true
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
color=ButtonColor::Error
|
color=ButtonColor::Error
|
||||||
icon=icondata::AiIcon::AiCloseOutlined
|
icon=icondata::AiCloseOutlined
|
||||||
circle=true
|
circle=true
|
||||||
/>
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
|
@ -62,7 +62,7 @@ let on_click = move |_| {
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<Space>
|
<Space>
|
||||||
<Button loading on_click icon=icondata::AiIcon::AiCloseOutlined>
|
<Button loading on_click icon=icondata::AiCloseOutlined>
|
||||||
"Click Me"
|
"Click Me"
|
||||||
</Button>
|
</Button>
|
||||||
<Button loading on_click>
|
<Button loading on_click>
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
```rust demo
|
```rust demo
|
||||||
view! {
|
view! {
|
||||||
<Space>
|
<Space>
|
||||||
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiCloseOutlined)/>
|
<Icon icon=icondata::AiCloseOutlined/>
|
||||||
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiCheckOutlined)/>
|
<Icon icon=icondata::AiCheckOutlined/>
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
@ -79,7 +79,7 @@ view! {
|
||||||
<Space vertical=true>
|
<Space vertical=true>
|
||||||
<Input value>
|
<Input value>
|
||||||
<InputPrefix slot>
|
<InputPrefix slot>
|
||||||
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiUserOutlined)/>
|
<Icon icon=icondata::AiUserOutlined/>
|
||||||
</InputPrefix>
|
</InputPrefix>
|
||||||
</Input>
|
</Input>
|
||||||
<Input value>
|
<Input value>
|
||||||
|
@ -87,7 +87,7 @@ view! {
|
||||||
</Input>
|
</Input>
|
||||||
<Input value>
|
<Input value>
|
||||||
<InputSuffix slot>
|
<InputSuffix slot>
|
||||||
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiGithubOutlined)/>
|
<Icon icon=icondata::AiGithubOutlined/>
|
||||||
</InputSuffix>
|
</InputSuffix>
|
||||||
</Input>
|
</Input>
|
||||||
</Space>
|
</Space>
|
||||||
|
|
|
@ -22,24 +22,8 @@ web-sys = { version = "0.3.63", features = [
|
||||||
"DataTransfer",
|
"DataTransfer",
|
||||||
] }
|
] }
|
||||||
wasm-bindgen = "0.2.89"
|
wasm-bindgen = "0.2.89"
|
||||||
icondata = { version = "0.1.0", features = [
|
icondata = "0.3.0"
|
||||||
"AiCloseOutlined",
|
icondata_core = "0.1.0"
|
||||||
"AiCheckOutlined",
|
|
||||||
"AiLeftOutlined",
|
|
||||||
"AiLoadingOutlined",
|
|
||||||
"AiCheckCircleFilled",
|
|
||||||
"AiExclamationCircleFilled",
|
|
||||||
"AiCloseCircleFilled",
|
|
||||||
"AiPlusOutlined",
|
|
||||||
"AiPlusOutlined",
|
|
||||||
"AiMinusOutlined",
|
|
||||||
"AiRightOutlined",
|
|
||||||
"AiClockCircleOutlined",
|
|
||||||
"AiCalendarOutlined",
|
|
||||||
"AiArrowLeftOutlined",
|
|
||||||
"AiArrowRightOutlined",
|
|
||||||
] }
|
|
||||||
icondata_core = "0.0.2"
|
|
||||||
uuid = { version = "1.5.0", features = ["v4"] }
|
uuid = { version = "1.5.0", features = ["v4"] }
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
chrono = "0.4.31"
|
chrono = "0.4.31"
|
||||||
|
|
|
@ -5,7 +5,6 @@ use crate::{
|
||||||
utils::{class_list::class_list, mount_style},
|
utils::{class_list::class_list, mount_style},
|
||||||
Icon, Theme,
|
Icon, Theme,
|
||||||
};
|
};
|
||||||
use icondata::AiIcon;
|
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
pub use theme::AlertTheme;
|
pub use theme::AlertTheme;
|
||||||
|
|
||||||
|
@ -77,9 +76,9 @@ pub fn Alert(
|
||||||
});
|
});
|
||||||
let icon = create_memo(move |_| {
|
let icon = create_memo(move |_| {
|
||||||
match variant.get() {
|
match variant.get() {
|
||||||
AlertVariant::Success => AiIcon::AiCheckCircleFilled,
|
AlertVariant::Success => icondata::AiCheckCircleFilled,
|
||||||
AlertVariant::Warning => AiIcon::AiExclamationCircleFilled,
|
AlertVariant::Warning => icondata::AiExclamationCircleFilled,
|
||||||
AlertVariant::Error => AiIcon::AiCloseCircleFilled,
|
AlertVariant::Error => icondata::AiCloseCircleFilled,
|
||||||
}
|
}
|
||||||
.into()
|
.into()
|
||||||
});
|
});
|
||||||
|
|
|
@ -240,7 +240,7 @@ pub fn Button(
|
||||||
if loading.get() {
|
if loading.get() {
|
||||||
view! {
|
view! {
|
||||||
<Icon
|
<Icon
|
||||||
icon=Icon::from(AiIcon::AiLoadingOutlined)
|
icon=icondata::AiLoadingOutlined
|
||||||
style=format!(
|
style=format!(
|
||||||
"animation: thawLoadingCircle 1s infinite linear;{icon_style}",
|
"animation: thawLoadingCircle 1s infinite linear;{icon_style}",
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,6 @@ use crate::{
|
||||||
Button, ButtonGroup, ButtonVariant, Theme,
|
Button, ButtonGroup, ButtonVariant, Theme,
|
||||||
};
|
};
|
||||||
use chrono::{Month, Months};
|
use chrono::{Month, Months};
|
||||||
use icondata::AiIcon;
|
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
pub use theme::CalendarTheme;
|
pub use theme::CalendarTheme;
|
||||||
|
@ -137,7 +136,7 @@ pub fn Calendar(
|
||||||
<ButtonGroup>
|
<ButtonGroup>
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Solid
|
variant=ButtonVariant::Solid
|
||||||
icon=AiIcon::AiLeftOutlined
|
icon=icondata::AiLeftOutlined
|
||||||
on_click=previous_month
|
on_click=previous_month
|
||||||
/>
|
/>
|
||||||
<Button variant=ButtonVariant::Solid on_click=today>
|
<Button variant=ButtonVariant::Solid on_click=today>
|
||||||
|
@ -145,7 +144,7 @@ pub fn Calendar(
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Solid
|
variant=ButtonVariant::Solid
|
||||||
icon=AiIcon::AiRightOutlined
|
icon=icondata::AiRightOutlined
|
||||||
on_click=next_month
|
on_click=next_month
|
||||||
/>
|
/>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
|
@ -10,7 +10,6 @@ use crate::{
|
||||||
};
|
};
|
||||||
pub use checkbox_group::CheckboxGroup;
|
pub use checkbox_group::CheckboxGroup;
|
||||||
pub use checkbox_item::CheckboxItem;
|
pub use checkbox_item::CheckboxItem;
|
||||||
use icondata::AiIcon;
|
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
@ -47,7 +46,7 @@ pub fn Checkbox(
|
||||||
<div class="thaw-checkbox__dot">
|
<div class="thaw-checkbox__dot">
|
||||||
<If cond=value>
|
<If cond=value>
|
||||||
<Then slot>
|
<Then slot>
|
||||||
<Icon icon=Icon::from(AiIcon::AiCheckOutlined) style="color: white"/>
|
<Icon icon=icondata::AiCheckOutlined style="color: white"/>
|
||||||
</Then>
|
</Then>
|
||||||
</If>
|
</If>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,7 +4,6 @@ use crate::{
|
||||||
utils::{class_list::class_list, StoredMaybeSignal},
|
utils::{class_list::class_list, StoredMaybeSignal},
|
||||||
Icon,
|
Icon,
|
||||||
};
|
};
|
||||||
use icondata::AiIcon;
|
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
@ -48,7 +47,7 @@ pub fn CollapseItem(
|
||||||
move || class.get()
|
move || class.get()
|
||||||
]>
|
]>
|
||||||
<div class="thaw-collapse-item__header" on:click=on_click>
|
<div class="thaw-collapse-item__header" on:click=on_click>
|
||||||
<Icon icon=Icon::from(AiIcon::AiRightOutlined) class="thaw-collapse-item-arrow"/>
|
<Icon icon=icondata::AiRightOutlined class="thaw-collapse-item-arrow"/>
|
||||||
{move || title.get()}
|
{move || title.get()}
|
||||||
</div>
|
</div>
|
||||||
<CSSTransition node_ref=content_ref show=is_show_content name="thaw-collapse-item" let:display>
|
<CSSTransition node_ref=content_ref show=is_show_content name="thaw-collapse-item" let:display>
|
||||||
|
|
|
@ -5,7 +5,7 @@ use crate::{
|
||||||
chrono::NaiveDate,
|
chrono::NaiveDate,
|
||||||
components::{Binder, Follower, FollowerPlacement},
|
components::{Binder, Follower, FollowerPlacement},
|
||||||
utils::{mount_style, now_date, ComponentRef},
|
utils::{mount_style, now_date, ComponentRef},
|
||||||
AiIcon, Icon, Input, InputSuffix, SignalWatch,
|
Icon, Input, InputSuffix, SignalWatch,
|
||||||
};
|
};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use panel::{Panel, PanelRef};
|
use panel::{Panel, PanelRef};
|
||||||
|
@ -76,7 +76,7 @@ pub fn DatePicker(
|
||||||
<div ref=date_picker_ref>
|
<div ref=date_picker_ref>
|
||||||
<Input attrs class value=show_date_text on_focus=open_panel on_blur=on_input_blur>
|
<Input attrs class value=show_date_text on_focus=open_panel on_blur=on_input_blur>
|
||||||
<InputSuffix slot>
|
<InputSuffix slot>
|
||||||
<Icon icon=Icon::from(AiIcon::AiCalendarOutlined) style="font-size: 18px"/>
|
<Icon icon=icondata::AiCalendarOutlined style="font-size: 18px"/>
|
||||||
</InputSuffix>
|
</InputSuffix>
|
||||||
</Input>
|
</Input>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@ use super::PanelVariant;
|
||||||
use crate::{
|
use crate::{
|
||||||
chrono::{Datelike, Days, Month, Months, NaiveDate},
|
chrono::{Datelike, Days, Month, Months, NaiveDate},
|
||||||
utils::now_date,
|
utils::now_date,
|
||||||
AiIcon, Button, ButtonSize, ButtonVariant, CalendarItemDate,
|
Button, ButtonSize, ButtonVariant, CalendarItemDate,
|
||||||
};
|
};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
|
@ -92,13 +92,13 @@ pub fn DatePanel(
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Link
|
variant=ButtonVariant::Link
|
||||||
size=ButtonSize::Small
|
size=ButtonSize::Small
|
||||||
icon=AiIcon::AiArrowLeftOutlined
|
icon=icondata::AiArrowLeftOutlined
|
||||||
on_click=previous_year
|
on_click=previous_year
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Link
|
variant=ButtonVariant::Link
|
||||||
size=ButtonSize::Small
|
size=ButtonSize::Small
|
||||||
icon=AiIcon::AiLeftOutlined
|
icon=icondata::AiLeftOutlined
|
||||||
on_click=previous_month
|
on_click=previous_month
|
||||||
/>
|
/>
|
||||||
<div class="thaw-date-picker-date-panel__header-month-year">
|
<div class="thaw-date-picker-date-panel__header-month-year">
|
||||||
|
@ -120,13 +120,13 @@ pub fn DatePanel(
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Link
|
variant=ButtonVariant::Link
|
||||||
size=ButtonSize::Small
|
size=ButtonSize::Small
|
||||||
icon=AiIcon::AiRightOutlined
|
icon=icondata::AiRightOutlined
|
||||||
on_click=next_month
|
on_click=next_month
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Link
|
variant=ButtonVariant::Link
|
||||||
size=ButtonSize::Small
|
size=ButtonSize::Small
|
||||||
icon=AiIcon::AiArrowRightOutlined
|
icon=icondata::AiArrowRightOutlined
|
||||||
on_click=next_year
|
on_click=next_year
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use super::PanelVariant;
|
use super::PanelVariant;
|
||||||
use crate::{
|
use crate::{
|
||||||
chrono::{Datelike, Month, Months, NaiveDate},
|
chrono::{Datelike, Month, Months, NaiveDate},
|
||||||
AiIcon, Button, ButtonSize, ButtonVariant,
|
Button, ButtonSize, ButtonVariant,
|
||||||
};
|
};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ pub fn MonthPanel(
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Link
|
variant=ButtonVariant::Link
|
||||||
size=ButtonSize::Small
|
size=ButtonSize::Small
|
||||||
icon=AiIcon::AiArrowLeftOutlined
|
icon=icondata::AiArrowLeftOutlined
|
||||||
on_click=previous_year
|
on_click=previous_year
|
||||||
/>
|
/>
|
||||||
<div class="thaw-date-picker-date-panel__header-year">
|
<div class="thaw-date-picker-date-panel__header-year">
|
||||||
|
@ -42,7 +42,7 @@ pub fn MonthPanel(
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Link
|
variant=ButtonVariant::Link
|
||||||
size=ButtonSize::Small
|
size=ButtonSize::Small
|
||||||
icon=AiIcon::AiArrowRightOutlined
|
icon=icondata::AiArrowRightOutlined
|
||||||
on_click=next_year
|
on_click=next_year
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use super::PanelVariant;
|
use super::PanelVariant;
|
||||||
use crate::{
|
use crate::{
|
||||||
chrono::{Datelike, NaiveDate},
|
chrono::{Datelike, NaiveDate},
|
||||||
AiIcon, Button, ButtonSize, ButtonVariant,
|
Button, ButtonSize, ButtonVariant,
|
||||||
};
|
};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ pub fn YearPanel(
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Link
|
variant=ButtonVariant::Link
|
||||||
size=ButtonSize::Small
|
size=ButtonSize::Small
|
||||||
icon=AiIcon::AiArrowLeftOutlined
|
icon=icondata::AiArrowLeftOutlined
|
||||||
on_click=previous_year_range
|
on_click=previous_year_range
|
||||||
/>
|
/>
|
||||||
<div>
|
<div>
|
||||||
|
@ -47,7 +47,7 @@ pub fn YearPanel(
|
||||||
<Button
|
<Button
|
||||||
variant=ButtonVariant::Link
|
variant=ButtonVariant::Link
|
||||||
size=ButtonSize::Small
|
size=ButtonSize::Small
|
||||||
icon=AiIcon::AiArrowRightOutlined
|
icon=icondata::AiArrowRightOutlined
|
||||||
on_click=next_year_range
|
on_click=next_year_range
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// copy https://github.com/Carlosted/leptos-icons
|
// copy https://github.com/Carlosted/leptos-icons
|
||||||
// leptos updated version causes leptos_icons error
|
// leptos updated version causes leptos_icons error
|
||||||
pub(crate) use icondata::*;
|
pub(crate) use icondata::Icon;
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
|
|
||||||
/// The Icon component.
|
/// The Icon component.
|
||||||
|
@ -22,10 +22,8 @@ pub fn Icon(
|
||||||
#[prop(into, optional)]
|
#[prop(into, optional)]
|
||||||
style: Option<MaybeSignal<String>>,
|
style: Option<MaybeSignal<String>>,
|
||||||
) -> impl IntoView {
|
) -> impl IntoView {
|
||||||
let icon = move || icondata_core::IconData::from(icon.get());
|
|
||||||
|
|
||||||
let svg = move || {
|
let svg = move || {
|
||||||
let icon = icon();
|
let icon = icon.get();
|
||||||
let mut svg = svg::svg();
|
let mut svg = svg::svg();
|
||||||
if let Some(classes) = class.clone() {
|
if let Some(classes) = class.clone() {
|
||||||
svg = svg.classes(classes.get());
|
svg = svg.classes(classes.get());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::utils::StoredMaybeSignal;
|
use crate::utils::StoredMaybeSignal;
|
||||||
use crate::{AiIcon, Button, ButtonVariant, ComponentRef, Icon, Input, InputRef, InputSuffix};
|
use crate::{Button, ButtonVariant, ComponentRef, Icon, Input, InputRef, InputSuffix};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use std::ops::{Add, Sub};
|
use std::ops::{Add, Sub};
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
@ -67,10 +67,10 @@ where
|
||||||
>
|
>
|
||||||
<InputSuffix slot>
|
<InputSuffix slot>
|
||||||
<Button disabled variant=ButtonVariant::Link on_click=sub>
|
<Button disabled variant=ButtonVariant::Link on_click=sub>
|
||||||
<Icon icon=Icon::from(AiIcon::AiMinusOutlined) style="font-size: 18px"/>
|
<Icon icon=icondata::AiMinusOutlined style="font-size: 18px"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button disabled variant=ButtonVariant::Link on_click=add>
|
<Button disabled variant=ButtonVariant::Link on_click=add>
|
||||||
<Icon icon=Icon::from(AiIcon::AiPlusOutlined) style="font-size: 18px"/>
|
<Icon icon=icondata::AiPlusOutlined style="font-size: 18px"/>
|
||||||
</Button>
|
</Button>
|
||||||
</InputSuffix>
|
</InputSuffix>
|
||||||
</Input>
|
</Input>
|
||||||
|
|
|
@ -3,7 +3,6 @@ mod message_provider;
|
||||||
mod theme;
|
mod theme;
|
||||||
|
|
||||||
use crate::{theme::use_theme, Icon, Theme, components::{If, Then}};
|
use crate::{theme::use_theme, Icon, Theme, components::{If, Then}};
|
||||||
use icondata::*;
|
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
pub use message_provider::*;
|
pub use message_provider::*;
|
||||||
|
@ -20,9 +19,9 @@ pub enum MessageVariant {
|
||||||
impl MessageVariant {
|
impl MessageVariant {
|
||||||
fn icon(&self) -> Icon {
|
fn icon(&self) -> Icon {
|
||||||
match self {
|
match self {
|
||||||
MessageVariant::Success => icondata::Icon::Ai(AiCloseCircleFilled),
|
MessageVariant::Success => icondata::AiCloseCircleFilled,
|
||||||
MessageVariant::Warning => icondata::Icon::Ai(AiExclamationCircleFilled),
|
MessageVariant::Warning => icondata::AiExclamationCircleFilled,
|
||||||
MessageVariant::Error => icondata::Icon::Ai(AiCheckCircleFilled),
|
MessageVariant::Error => icondata::AiCheckCircleFilled,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn theme_color(&self, theme: &Theme) -> String {
|
fn theme_color(&self, theme: &Theme) -> String {
|
||||||
|
@ -64,7 +63,7 @@ pub(crate) fn Message(
|
||||||
<If cond=closable>
|
<If cond=closable>
|
||||||
<Then slot>
|
<Then slot>
|
||||||
<div class="thaw-message__close" on:click=move |_| on_close.call(id)>
|
<div class="thaw-message__close" on:click=move |_| on_close.call(id)>
|
||||||
<Icon icon=icondata::Icon::Ai(AiCloseOutlined)/>
|
<Icon icon=icondata::AiCloseOutlined/>
|
||||||
</div>
|
</div>
|
||||||
</Then>
|
</Then>
|
||||||
</If>
|
</If>
|
||||||
|
|
|
@ -78,7 +78,7 @@ pub fn NavBar(
|
||||||
<div class="thaw-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=icondata::AiLeftOutlined/>
|
||||||
</Then>
|
</Then>
|
||||||
</If>
|
</If>
|
||||||
{move || left_text.get()}
|
{move || left_text.get()}
|
||||||
|
|
|
@ -35,7 +35,7 @@ pub fn Modal(
|
||||||
</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)>
|
||||||
<Icon icon=Icon::from(AiIcon::AiCloseOutlined)/>
|
<Icon icon=icondata::AiCloseOutlined/>
|
||||||
</span>
|
</span>
|
||||||
</CardHeaderExtra>
|
</CardHeaderExtra>
|
||||||
{children()}
|
{children()}
|
||||||
|
|
|
@ -5,7 +5,7 @@ use crate::{
|
||||||
components::{Binder, Follower, FollowerPlacement},
|
components::{Binder, Follower, FollowerPlacement},
|
||||||
use_theme,
|
use_theme,
|
||||||
utils::{mount_style, ComponentRef},
|
utils::{mount_style, ComponentRef},
|
||||||
AiIcon, Button, ButtonSize, ButtonVariant, Icon, Input, InputSuffix, SignalWatch, Theme,
|
Button, ButtonSize, ButtonVariant, Icon, Input, InputSuffix, SignalWatch, Theme,
|
||||||
};
|
};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
pub use theme::TimePickerTheme;
|
pub use theme::TimePickerTheme;
|
||||||
|
@ -77,7 +77,7 @@ pub fn TimePicker(
|
||||||
<Input attrs class value=show_time_text on_focus=open_panel on_blur=on_input_blur>
|
<Input attrs class value=show_time_text on_focus=open_panel on_blur=on_input_blur>
|
||||||
<InputSuffix slot>
|
<InputSuffix slot>
|
||||||
<Icon
|
<Icon
|
||||||
icon=Icon::from(AiIcon::AiClockCircleOutlined)
|
icon=icondata::AiClockCircleOutlined
|
||||||
style="font-size: 18px"
|
style="font-size: 18px"
|
||||||
/>
|
/>
|
||||||
</InputSuffix>
|
</InputSuffix>
|
||||||
|
|
Loading…
Add table
Reference in a new issue