Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update icondata #82

Merged
merged 5 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@ leptos_meta = { version = "0.5.7" }
leptos_router = { version = "0.5.7" }
leptos_devtools = { version = "0.0.1", optional = true}
thaw = { path = "../thaw", default-features = false }
icondata = { version = "0.1.0", features = [
"AiCloseOutlined",
"AiCheckOutlined",
"AiGithubOutlined",
"AiUserOutlined",
"AiSearchOutlined",
"AiUnorderedListOutlined"
] }
icondata = "0.3.0"
demo_markdown = { path = "../demo_markdown" }

[features]
Expand All @@ -41,4 +34,4 @@ nightly = ["leptos/nightly", "leptos_meta/nightly", "leptos_router/nightly"]
opt-level = 1

[profile.dev.package."*"]
opt-level = 3
opt-level = 3
6 changes: 3 additions & 3 deletions demo/src/components/site_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ pub fn SiteHeader() -> impl IntoView {
comp_ref=auto_complete_ref
>
<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>
</AutoComplete>
<Popover placement=PopoverPlacement::BottomEnd class="demo-header__menu-popover-mobile">
<PopoverTrigger slot class="demo-header__menu-mobile">
<Button
variant=ButtonVariant::Text
icon=icondata::AiIcon::AiUnorderedListOutlined
icon=icondata::AiUnorderedListOutlined
style="font-size: 22px; padding: 0px 6px;"
/>
</PopoverTrigger>
Expand Down Expand Up @@ -192,7 +192,7 @@ pub fn SiteHeader() -> impl IntoView {
</Button>
<Button
variant=ButtonVariant::Text
icon=icondata::AiIcon::AiGithubOutlined
icon=icondata::AiGithubOutlined
round=true
style="font-size: 22px; padding: 0px 6px;"
on_click=move |_| {
Expand Down
2 changes: 1 addition & 1 deletion demo/src/pages/nav_bar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn NavBarDemoPage() -> impl IntoView {
on_click_right=on_click_right
>
<NavBarRight slot>
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiCloseOutlined)/>
<Icon icon=icondata::AiCloseOutlined/>
</NavBarRight>
</NavBar>
<div style="padding-top: 50px">{move || click_text.get()}</div>
Expand Down
2 changes: 1 addition & 1 deletion demo/src/pages/tabbar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn TabbarDemoPage() -> impl IntoView {
{move || value.get()} <Tabbar value>
<TabbarItem key="a">"and"</TabbarItem>
<TabbarItem key="i">"if"</TabbarItem>
<TabbarItem key="o" icon=icondata::AiIcon::AiCloseOutlined>
<TabbarItem key="o" icon=icondata::AiCloseOutlined>
"or"
</TabbarItem>
</Tabbar>
Expand Down
2 changes: 1 addition & 1 deletion demo_markdown/docs/_mobile/nav_bar/mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ view! {
on_click_right=on_click_right
>
<NavBarRight slot>
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiCloseOutlined)/>
<Icon icon=icondata::AiCloseOutlined/>
</NavBarRight>
</NavBar>
<div style="padding-top: 50px">{move || click_text.get()}</div>
Expand Down
2 changes: 1 addition & 1 deletion demo_markdown/docs/_mobile/tabbar/mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ view! {
<Tabbar value>
<TabbarItem key="a">"and"</TabbarItem>
<TabbarItem key="i">"if"</TabbarItem>
<TabbarItem key="o" icon=icondata::AiIcon::AiCloseOutlined>
<TabbarItem key="o" icon=icondata::AiCloseOutlined>
"or"
</TabbarItem>
</Tabbar>
Expand Down
4 changes: 2 additions & 2 deletions demo_markdown/docs/auto_complete/mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ view! {
<Space vertical=true>
<AutoComplete>
<AutoCompletePrefix slot>
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiUserOutlined)/>
<Icon icon=icondata::AiUserOutlined/>
</AutoCompletePrefix>
</AutoComplete>
<AutoComplete>
<AutoCompleteSuffix slot>
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiGithubOutlined)/>
<Icon icon=icondata::AiGithubOutlined/>
</AutoCompleteSuffix>
</AutoComplete>
</Space>
Expand Down
8 changes: 4 additions & 4 deletions demo_markdown/docs/button/mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ view! {
```rust demo
view! {
<Space>
<Button color=ButtonColor::Error icon=icondata::AiIcon::AiCloseOutlined>
<Button color=ButtonColor::Error icon=icondata::AiCloseOutlined>
"Error Color Icon"
</Button>
<Button
color=ButtonColor::Error
icon=icondata::AiIcon::AiCloseOutlined
icon=icondata::AiCloseOutlined
round=true
/>
<Button
color=ButtonColor::Error
icon=icondata::AiIcon::AiCloseOutlined
icon=icondata::AiCloseOutlined
circle=true
/>
</Space>
Expand All @@ -62,7 +62,7 @@ let on_click = move |_| {

view! {
<Space>
<Button loading on_click icon=icondata::AiIcon::AiCloseOutlined>
<Button loading on_click icon=icondata::AiCloseOutlined>
"Click Me"
</Button>
<Button loading on_click>
Expand Down
4 changes: 2 additions & 2 deletions demo_markdown/docs/icon/mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
```rust demo
view! {
<Space>
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiCloseOutlined)/>
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiCheckOutlined)/>
<Icon icon=icondata::AiCloseOutlined/>
<Icon icon=icondata::AiCheckOutlined/>
</Space>
}
```
Expand Down
6 changes: 3 additions & 3 deletions demo_markdown/docs/input/mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ view! {
<Space vertical=true>
<Input value>
<InputPrefix slot>
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiUserOutlined)/>
<Icon icon=icondata::AiUserOutlined/>
</InputPrefix>
</Input>
<Input value>
<InputSuffix slot>"$"</InputSuffix>
</Input>
<Input value>
<InputSuffix slot>
<Icon icon=icondata::Icon::from(icondata::AiIcon::AiGithubOutlined)/>
<Icon icon=icondata::AiGithubOutlined/>
</InputSuffix>
</Input>
</Space>
Expand Down Expand Up @@ -125,4 +125,4 @@ view! {

### TextArea Props

Removes variant and slot from Input component.
Removes variant and slot from Input component.
20 changes: 2 additions & 18 deletions thaw/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,8 @@ web-sys = { version = "0.3.63", features = [
"DataTransfer",
] }
wasm-bindgen = "0.2.89"
icondata = { version = "0.1.0", features = [
"AiCloseOutlined",
"AiCheckOutlined",
"AiLeftOutlined",
"AiLoadingOutlined",
"AiCheckCircleFilled",
"AiExclamationCircleFilled",
"AiCloseCircleFilled",
"AiPlusOutlined",
"AiPlusOutlined",
"AiMinusOutlined",
"AiRightOutlined",
"AiClockCircleOutlined",
"AiCalendarOutlined",
"AiArrowLeftOutlined",
"AiArrowRightOutlined",
] }
icondata_core = "0.0.2"
icondata = "0.3.0"
icondata_core = "0.1.0"
uuid = { version = "1.5.0", features = ["v4"] }
cfg-if = "1.0.0"
chrono = "0.4.31"
Expand Down
7 changes: 3 additions & 4 deletions thaw/src/alert/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::{
utils::{class_list::class_list, mount_style},
Icon, Theme,
};
use icondata::AiIcon;
use leptos::*;
pub use theme::AlertTheme;

Expand Down Expand Up @@ -77,9 +76,9 @@ pub fn Alert(
});
let icon = create_memo(move |_| {
match variant.get() {
AlertVariant::Success => AiIcon::AiCheckCircleFilled,
AlertVariant::Warning => AiIcon::AiExclamationCircleFilled,
AlertVariant::Error => AiIcon::AiCloseCircleFilled,
AlertVariant::Success => icondata::AiCheckCircleFilled,
AlertVariant::Warning => icondata::AiExclamationCircleFilled,
AlertVariant::Error => icondata::AiCloseCircleFilled,
}
.into()
});
Expand Down
2 changes: 1 addition & 1 deletion thaw/src/button/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ pub fn Button(
if loading.get() {
view! {
<Icon
icon=Icon::from(AiIcon::AiLoadingOutlined)
icon=icondata::AiLoadingOutlined
style=format!(
"animation: thawLoadingCircle 1s infinite linear;{icon_style}",
)
Expand Down
5 changes: 2 additions & 3 deletions thaw/src/calendar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use crate::{
Button, ButtonGroup, ButtonVariant, Theme,
};
use chrono::{Month, Months};
use icondata::AiIcon;
use leptos::*;
use std::ops::Deref;
pub use theme::CalendarTheme;
Expand Down Expand Up @@ -137,15 +136,15 @@ pub fn Calendar(
<ButtonGroup>
<Button
variant=ButtonVariant::Solid
icon=AiIcon::AiLeftOutlined
icon=icondata::AiLeftOutlined
on_click=previous_month
/>
<Button variant=ButtonVariant::Solid on_click=today>
"Today"
</Button>
<Button
variant=ButtonVariant::Solid
icon=AiIcon::AiRightOutlined
icon=icondata::AiRightOutlined
on_click=next_month
/>
</ButtonGroup>
Expand Down
3 changes: 1 addition & 2 deletions thaw/src/checkbox/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use crate::{
};
pub use checkbox_group::CheckboxGroup;
pub use checkbox_item::CheckboxItem;
use icondata::AiIcon;
use leptos::*;

#[component]
Expand Down Expand Up @@ -47,7 +46,7 @@ pub fn Checkbox(
<div class="thaw-checkbox__dot">
<If cond=value>
<Then slot>
<Icon icon=Icon::from(AiIcon::AiCheckOutlined) style="color: white"/>
<Icon icon=icondata::AiCheckOutlined style="color: white"/>
</Then>
</If>
</div>
Expand Down
3 changes: 1 addition & 2 deletions thaw/src/collapse/collapse_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use crate::{
utils::{class_list::class_list, StoredMaybeSignal},
Icon,
};
use icondata::AiIcon;
use leptos::*;

#[component]
Expand Down Expand Up @@ -48,7 +47,7 @@ pub fn CollapseItem(
move || class.get()
]>
<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()}
</div>
<CSSTransition node_ref=content_ref show=is_show_content name="thaw-collapse-item" let:display>
Expand Down
4 changes: 2 additions & 2 deletions thaw/src/date_picker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{
chrono::NaiveDate,
components::{Binder, Follower, FollowerPlacement},
utils::{mount_style, now_date, ComponentRef},
AiIcon, Icon, Input, InputSuffix, SignalWatch,
Icon, Input, InputSuffix, SignalWatch,
};
use leptos::*;
use panel::{Panel, PanelRef};
Expand Down Expand Up @@ -76,7 +76,7 @@ pub fn DatePicker(
<div ref=date_picker_ref>
<Input attrs class value=show_date_text on_focus=open_panel on_blur=on_input_blur>
<InputSuffix slot>
<Icon icon=Icon::from(AiIcon::AiCalendarOutlined) style="font-size: 18px"/>
<Icon icon=icondata::AiCalendarOutlined style="font-size: 18px"/>
</InputSuffix>
</Input>
</div>
Expand Down
10 changes: 5 additions & 5 deletions thaw/src/date_picker/panel/date_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::PanelVariant;
use crate::{
chrono::{Datelike, Days, Month, Months, NaiveDate},
utils::now_date,
AiIcon, Button, ButtonSize, ButtonVariant, CalendarItemDate,
Button, ButtonSize, ButtonVariant, CalendarItemDate,
};
use leptos::*;
use std::ops::Deref;
Expand Down Expand Up @@ -92,13 +92,13 @@ pub fn DatePanel(
<Button
variant=ButtonVariant::Link
size=ButtonSize::Small
icon=AiIcon::AiArrowLeftOutlined
icon=icondata::AiArrowLeftOutlined
on_click=previous_year
/>
<Button
variant=ButtonVariant::Link
size=ButtonSize::Small
icon=AiIcon::AiLeftOutlined
icon=icondata::AiLeftOutlined
on_click=previous_month
/>
<div class="thaw-date-picker-date-panel__header-month-year">
Expand All @@ -120,13 +120,13 @@ pub fn DatePanel(
<Button
variant=ButtonVariant::Link
size=ButtonSize::Small
icon=AiIcon::AiRightOutlined
icon=icondata::AiRightOutlined
on_click=next_month
/>
<Button
variant=ButtonVariant::Link
size=ButtonSize::Small
icon=AiIcon::AiArrowRightOutlined
icon=icondata::AiArrowRightOutlined
on_click=next_year
/>
</div>
Expand Down
6 changes: 3 additions & 3 deletions thaw/src/date_picker/panel/month_panel.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::PanelVariant;
use crate::{
chrono::{Datelike, Month, Months, NaiveDate},
AiIcon, Button, ButtonSize, ButtonVariant,
Button, ButtonSize, ButtonVariant,
};
use leptos::*;

Expand All @@ -27,7 +27,7 @@ pub fn MonthPanel(
<Button
variant=ButtonVariant::Link
size=ButtonSize::Small
icon=AiIcon::AiArrowLeftOutlined
icon=icondata::AiArrowLeftOutlined
on_click=previous_year
/>
<div class="thaw-date-picker-date-panel__header-year">
Expand All @@ -42,7 +42,7 @@ pub fn MonthPanel(
<Button
variant=ButtonVariant::Link
size=ButtonSize::Small
icon=AiIcon::AiArrowRightOutlined
icon=icondata::AiArrowRightOutlined
on_click=next_year
/>
</div>
Expand Down
6 changes: 3 additions & 3 deletions thaw/src/date_picker/panel/year_panel.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::PanelVariant;
use crate::{
chrono::{Datelike, NaiveDate},
AiIcon, Button, ButtonSize, ButtonVariant,
Button, ButtonSize, ButtonVariant,
};
use leptos::*;

Expand Down Expand Up @@ -34,7 +34,7 @@ pub fn YearPanel(
<Button
variant=ButtonVariant::Link
size=ButtonSize::Small
icon=AiIcon::AiArrowLeftOutlined
icon=icondata::AiArrowLeftOutlined
on_click=previous_year_range
/>
<div>
Expand All @@ -47,7 +47,7 @@ pub fn YearPanel(
<Button
variant=ButtonVariant::Link
size=ButtonSize::Small
icon=AiIcon::AiArrowRightOutlined
icon=icondata::AiArrowRightOutlined
on_click=next_year_range
/>
</div>
Expand Down
Loading
Loading