Skip to content

Commit d64eaf8

Browse files
committed
feat: remove re-export of chrono
1 parent 2c25886 commit d64eaf8

File tree

13 files changed

+22
-26
lines changed

13 files changed

+22
-26
lines changed

demo/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ edition = "2021"
1010
leptos = { version = "0.6.5" }
1111
leptos_meta = { version = "0.6.5" }
1212
leptos_router = { version = "0.6.5" }
13-
leptos_devtools = { version = "0.0.1", optional = true}
13+
leptos_devtools = { version = "0.0.1", optional = true }
1414
thaw = { path = "../thaw" }
1515
demo_markdown = { path = "../demo_markdown" }
1616
icondata = "0.3.0"
1717
palette = "0.7.4"
18+
chrono = "0.4.33"
1819

1920
[features]
2021
default = ["csr"]

demo_markdown/docs/calendar/mod.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Calendar
22

33
```rust demo
4-
use thaw::chrono::prelude::*;
4+
use chrono::prelude::*;
55
let value = create_rw_signal(Some(Local::now().date_naive()));
66

77
view! {

demo_markdown/docs/date_picker/mod.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Date Picker
22

33
```rust demo
4-
use thaw::chrono::prelude::*;
4+
use chrono::prelude::*;
55
let value = create_rw_signal(Some(Local::now().date_naive()));
66

77
view! {

demo_markdown/docs/time_picker/mod.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Time Picker
22

33
```rust demo
4-
use thaw::chrono::prelude::*;
4+
use chrono::prelude::*;
55

66
let value = create_rw_signal(Some(Local::now().time()));
77

thaw/src/calendar/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
mod theme;
22

3+
pub use theme::CalendarTheme;
4+
35
use crate::{
4-
chrono::{Datelike, Days, Local, NaiveDate},
56
use_theme,
67
utils::{class_list::class_list, mount_style, Model, OptionalProp},
78
Button, ButtonGroup, ButtonVariant, Theme,
89
};
10+
use chrono::{Datelike, Days, Local, NaiveDate};
911
use chrono::{Month, Months};
1012
use leptos::*;
1113
use std::ops::Deref;
12-
pub use theme::CalendarTheme;
1314

1415
#[component]
1516
pub fn Calendar(

thaw/src/date_picker/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
mod panel;
22
mod theme;
33

4+
pub use theme::DatePickerTheme;
5+
46
use crate::{
5-
chrono::NaiveDate,
67
components::{Binder, Follower, FollowerPlacement},
78
utils::{mount_style, now_date, ComponentRef, Model, OptionalProp},
89
Icon, Input, InputSuffix, SignalWatch,
910
};
11+
use chrono::NaiveDate;
1012
use leptos::*;
1113
use panel::{Panel, PanelRef};
12-
pub use theme::DatePickerTheme;
1314

1415
#[component]
1516
pub fn DatePicker(

thaw/src/date_picker/panel/date_panel.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
use super::PanelVariant;
2-
use crate::{
3-
chrono::{Datelike, Days, Month, Months, NaiveDate},
4-
utils::now_date,
5-
Button, ButtonSize, ButtonVariant, CalendarItemDate,
6-
};
2+
use crate::{utils::now_date, Button, ButtonSize, ButtonVariant, CalendarItemDate};
3+
use chrono::{Datelike, Days, Month, Months, NaiveDate};
74
use leptos::*;
85
use std::ops::Deref;
96

thaw/src/date_picker/panel/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ mod month_panel;
33
mod year_panel;
44

55
use crate::{
6-
chrono::NaiveDate,
76
use_theme,
87
utils::{now_date, ComponentRef},
98
Theme,
109
};
10+
use chrono::NaiveDate;
1111
use date_panel::DatePanel;
1212
use leptos::*;
1313
use month_panel::MonthPanel;

thaw/src/date_picker/panel/month_panel.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
use super::PanelVariant;
2-
use crate::{
3-
chrono::{Datelike, Month, Months, NaiveDate},
4-
Button, ButtonSize, ButtonVariant,
5-
};
2+
use crate::{Button, ButtonSize, ButtonVariant};
3+
use chrono::{Datelike, Month, Months, NaiveDate};
64
use leptos::*;
75

86
#[component]

thaw/src/date_picker/panel/year_panel.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
use super::PanelVariant;
2-
use crate::{
3-
chrono::{Datelike, NaiveDate},
4-
Button, ButtonSize, ButtonVariant,
5-
};
2+
use crate::{Button, ButtonSize, ButtonVariant};
3+
use chrono::{Datelike, NaiveDate};
64
use leptos::*;
75

86
const MAX_YEAR: i32 = (i32::MAX >> 13) / 10 - 1;

thaw/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ pub use button::*;
5353
pub use calendar::*;
5454
pub use card::*;
5555
pub use checkbox::*;
56-
pub use chrono;
5756
pub use code::*;
5857
pub use collapse::*;
5958
pub use color_picker::*;

thaw/src/time_picker/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
mod theme;
22

3+
pub use theme::TimePickerTheme;
4+
35
use crate::{
4-
chrono::{Local, NaiveTime, Timelike},
56
components::{Binder, Follower, FollowerPlacement},
67
use_theme,
78
utils::{mount_style, ComponentRef, Model, OptionalProp},
89
Button, ButtonSize, ButtonVariant, Icon, Input, InputSuffix, SignalWatch, Theme,
910
};
11+
use chrono::{Local, NaiveTime, Timelike};
1012
use leptos::*;
11-
pub use theme::TimePickerTheme;
1213

1314
#[component]
1415
pub fn TimePicker(

thaw/src/utils/time.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::chrono::{Local, NaiveDate};
1+
use chrono::{Local, NaiveDate};
22

33
pub fn now_date() -> NaiveDate {
44
Local::now().date_naive()

0 commit comments

Comments
 (0)