From 396e654f0b2cf50867ad01db2895d985877a6de1 Mon Sep 17 00:00:00 2001 From: luoxiaozero <48741584+luoxiaozero@users.noreply.github.com> Date: Fri, 9 Feb 2024 22:44:22 +0800 Subject: [PATCH] docs: update (#99) --- demo_markdown/docs/_guide/installation.md | 2 +- .../docs/_guide/server_sider_rendering.md | 4 +-- demo_markdown/docs/_mobile/nav_bar/mod.md | 14 ++++----- demo_markdown/docs/_mobile/tabbar/mod.md | 8 ++--- demo_markdown/docs/alert/mod.md | 12 ++++---- demo_markdown/docs/auto_complete/mod.md | 6 ++-- demo_markdown/docs/avatar/mod.md | 12 ++++---- demo_markdown/docs/badge/mod.md | 2 +- demo_markdown/docs/breadcrumb/mod.md | 18 +++++------ demo_markdown/docs/button/mod.md | 13 ++++++-- demo_markdown/docs/calendar/mod.md | 8 ++--- demo_markdown/docs/card/mod.md | 10 +++---- demo_markdown/docs/checkbox/mod.md | 28 ++++++++--------- demo_markdown/docs/collapse/mod.md | 24 +++++++-------- demo_markdown/docs/color_picker/mod.md | 2 +- demo_markdown/docs/date_picker/mod.md | 4 +-- demo_markdown/docs/divider/mod.md | 6 ++-- demo_markdown/docs/drawer/mod.md | 22 +++++++------- demo_markdown/docs/grid/mod.md | 22 +++++++------- demo_markdown/docs/image/mod.md | 18 +++++------ demo_markdown/docs/input/mod.md | 6 ++-- demo_markdown/docs/input_number/mod.md | 8 ++--- demo_markdown/docs/layout/mod.md | 15 +++++----- demo_markdown/docs/menu/mod.md | 30 +++++++++---------- demo_markdown/docs/message/mod.md | 14 ++++----- demo_markdown/docs/modal/mod.md | 2 +- demo_markdown/docs/popover/mod.md | 10 +++---- demo_markdown/docs/radio/mod.md | 10 +++---- demo_markdown/docs/select/mod.md | 4 +-- demo_markdown/docs/slider/mod.md | 14 ++++----- demo_markdown/docs/space/mod.md | 12 ++++---- demo_markdown/docs/spinner/mod.md | 8 ++--- demo_markdown/docs/switch/mod.md | 8 ++--- demo_markdown/docs/table/mod.md | 14 ++++----- demo_markdown/docs/tabs/mod.md | 22 +++++++------- demo_markdown/docs/tag/mod.md | 10 +++---- demo_markdown/docs/time_picker/mod.md | 8 ++--- demo_markdown/docs/typography/mod.md | 10 +++---- thaw/src/message/message_provider.rs | 1 - thaw/src/slider/slider_label.rs | 3 +- 40 files changed, 225 insertions(+), 219 deletions(-) diff --git a/demo_markdown/docs/_guide/installation.md b/demo_markdown/docs/_guide/installation.md index aea6c9c..0b55806 100644 --- a/demo_markdown/docs/_guide/installation.md +++ b/demo_markdown/docs/_guide/installation.md @@ -3,5 +3,5 @@ Installation thaw ```shell -cargo add thaw +cargo add thaw --features=csr ``` diff --git a/demo_markdown/docs/_guide/server_sider_rendering.md b/demo_markdown/docs/_guide/server_sider_rendering.md index bc8e91c..68fce55 100644 --- a/demo_markdown/docs/_guide/server_sider_rendering.md +++ b/demo_markdown/docs/_guide/server_sider_rendering.md @@ -3,11 +3,11 @@ To enable the ssr mode, the following configurations are required: ```toml -thaw = { ..., default-features = false, features = ["ssr"] } +thaw = { ..., features = ["ssr"] } ``` To enable the hydrate mode, the following configurations are required: ```toml -thaw = { ..., default-features = false, features = ["hydrate"] } +thaw = { ..., features = ["hydrate"] } ``` diff --git a/demo_markdown/docs/_mobile/nav_bar/mod.md b/demo_markdown/docs/_mobile/nav_bar/mod.md index 78993a1..7940912 100644 --- a/demo_markdown/docs/_mobile/nav_bar/mod.md +++ b/demo_markdown/docs/_mobile/nav_bar/mod.md @@ -17,7 +17,7 @@ view! { on_click_right=on_click_right > - +
{move || click_text.get()}
@@ -29,16 +29,16 @@ view! { | Name | Type | Default | Description | | --- | --- | --- | --- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the NavBar element. | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the NavBar element. | | title | `MaybeSignal` | `Default::default()` | NavBar title. | | left_arrow | `MaybeSignal` | `false` | Whether to show left arrow. | -| left_text | `MaybeSignal` | `Default::default()` | NavBar left text. | +| left_text | `OptionalProp>` | `Default::default()` | NavBar left text. | | on_click_left | `Option>` | `Default::default()` | NavBar left click. | -| right_text | `MaybeSignal` | `Default::default()` | NavBar right text. | +| right_text | `OptionalProp>` | `Default::default()` | NavBar right text. | | on_click_right | `Option>` | `Default::default()` | NavBar right click. | ### NavBarLeft and NavBarRight Props -| Name | Type | Default | Description | -| --- | --- | --- | --- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the element. | +| Name | Type | Default | Description | +| ----- | ----------------------------------- | -------------------- | ---------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the element. | diff --git a/demo_markdown/docs/_mobile/tabbar/mod.md b/demo_markdown/docs/_mobile/tabbar/mod.md index f145a90..ea8305d 100644 --- a/demo_markdown/docs/_mobile/tabbar/mod.md +++ b/demo_markdown/docs/_mobile/tabbar/mod.md @@ -21,10 +21,10 @@ view! { ### Tabbar Props -| Name | Type | Default | Description | -| -------- | ------------------ | -------------------- | ----------------- | -| value | `RwSignal` | `Default::default()` | Tabbar's value. | -| children | `Children` | | Tabbar's content. | +| Name | Type | Default | Description | +| -------- | --------------- | -------------------- | ----------------- | +| value | `Model` | `Default::default()` | Tabbar's value. | +| children | `Children` | | Tabbar's content. | ### TabbarItem Props diff --git a/demo_markdown/docs/alert/mod.md b/demo_markdown/docs/alert/mod.md index 2bfc410..1241d24 100644 --- a/demo_markdown/docs/alert/mod.md +++ b/demo_markdown/docs/alert/mod.md @@ -18,9 +18,9 @@ view! { ### Alert Props -| Name | Type | Default | Description | -| -------- | --------------------------- | -------------------- | ----------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Additional classes for the alert element. | -| title | `MaybeSignal` | `Default::default()` | Title of the alert. | -| variant | `MaybeSignal` | | Alert variant. | -| children | `Children` | | The content of the alert. | +| Name | Type | Default | Description | +| -------- | ----------------------------------- | -------------------- | ----------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Additional classes for the alert element. | +| title | `Option>` | `Default::default()` | Title of the alert. | +| variant | `MaybeSignal` | | Alert variant. | +| children | `Children` | | The content of the alert. | diff --git a/demo_markdown/docs/auto_complete/mod.md b/demo_markdown/docs/auto_complete/mod.md index 9fa5d96..7f12129 100644 --- a/demo_markdown/docs/auto_complete/mod.md +++ b/demo_markdown/docs/auto_complete/mod.md @@ -60,9 +60,9 @@ view! { | Name | Type | Default | Description | | --- | --- | --- | --- | -| class | `MaybeSignal` | `Default::default()` | Additional classes for the autocomplete element. | -| value | `RwSignal` | `Default::default()` | Input of autocomplete. | -| placeholder | `RwSignal` | `Default::default()` | Autocomplete's placeholder. | +| class | `OptionalProp>` | `Default::default()` | Additional classes for the autocomplete element. | +| value | `Model` | `Default::default()` | Input of autocomplete. | +| placeholder | `OptionalProp>` | `Default::default()` | Autocomplete's placeholder. | | options | `MaybeSignal>` | `Default::default()` | Options to autocomplete from. | | disabled | `MaybeSignal` | `false` | Whether the input is disabled. | | invalid | `MaybeSignal` | `false` | Whether the input is invalid. | diff --git a/demo_markdown/docs/avatar/mod.md b/demo_markdown/docs/avatar/mod.md index f9ec9bd..117633c 100644 --- a/demo_markdown/docs/avatar/mod.md +++ b/demo_markdown/docs/avatar/mod.md @@ -12,9 +12,9 @@ view! { ### Avatar Props -| Name | Type | Default | Description | -| ----- | --------------------- | -------------------- | ----------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the avatar element. | -| src | `MaybeSignal` | `Default::default()` | Avatar's image source. | -| round | `MaybeSignal` | `false` | Whether to display a rounded avatar. | -| size | `MaybeSignal` | `30` | Avatar's size. | +| Name | Type | Default | Description | +| ----- | ----------------------------------- | -------------------- | ----------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the avatar element. | +| src | `Option>` | `Default::default()` | Avatar's image source. | +| round | `MaybeSignal` | `false` | Whether to display a rounded avatar. | +| size | `MaybeSignal` | `30` | Avatar's size. | diff --git a/demo_markdown/docs/badge/mod.md b/demo_markdown/docs/badge/mod.md index 6a3775e..72365a0 100644 --- a/demo_markdown/docs/badge/mod.md +++ b/demo_markdown/docs/badge/mod.md @@ -36,7 +36,7 @@ view! { | Name | Type | Default | Description | | --- | --- | --- | --- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the badge element. | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the badge element. | | value | `MaybeSignal` | `0` | Badge's value. | | max | `MaybeSignal` | `u32::MAX` | The maximum number of the badge when its value overflows. | | variant | `MaybeSignal` | `BadgeVariant::Error` | Badge variant. | diff --git a/demo_markdown/docs/breadcrumb/mod.md b/demo_markdown/docs/breadcrumb/mod.md index c57bc54..b0726ca 100644 --- a/demo_markdown/docs/breadcrumb/mod.md +++ b/demo_markdown/docs/breadcrumb/mod.md @@ -24,15 +24,15 @@ view! { ### Breadcrumb Props -| Name | Type | Default | Description | -| --------- | --------------------- | -------------------- | --------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the breadcrumb element. | -| separator | `MaybeSignal` | `/` | Breadcrumb separator. | -| children | `Children` | | Breadcrumb's content. | +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the breadcrumb element. | +| separator | `MaybeSignal` | `/` | Breadcrumb separator. | +| children | `Children` | | Breadcrumb's content. | ### BreadcrumbItem Props -| Name | Type | Default | Description | -| -------- | --------------------- | -------------------- | -------------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the breadcrumb link element. | -| children | `Children` | | BreadcrumbItem's content. | +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the breadcrumb link element. | +| children | `Children` | | BreadcrumbItem's content. | diff --git a/demo_markdown/docs/button/mod.md b/demo_markdown/docs/button/mod.md index ae8c087..8f3cffd 100644 --- a/demo_markdown/docs/button/mod.md +++ b/demo_markdown/docs/button/mod.md @@ -129,8 +129,8 @@ view! { | Name | Type | Default | Description | | --- | --- | --- | --- | -| class | `MaybeSignal` | `Default::default()` | Additional classes for the button element. | -| style | `MaybeSignal` | `Default::default()` | Button's style. | +| class | `OptionalProp>` | `Default::default()` | Additional classes for the button element. | +| style | `Option>` | `Default::default()` | Button's style. | | variant | `MaybeSignal` | `ButtonVariant::Primary` | Button's variant. | | color | `MaybeSignal` | `ButtonColor::Primary` | Button's color. | | round | `MaybeSignal` | `false` | Whether the button shows rounded corners. | @@ -140,4 +140,11 @@ view! { | disabled | `MaybeSignal` | `false` | Whether the button is disabled. | | size | `MaybeSignal` | `ButtonSize::Medium` | Button size. | | on_click | `Option>` | `None` | Listen for button click events. | -| children | `Children` | | Button's content. | +| children | `Option` | | Button's content. | + +### ButtonGroup props + +| Name | Type | Default | Description | +| -------- | ---------- | ------- | ----------------------------------- | +| vertical | `bool` | `false` | Directions of buttons in the group. | +| children | `Children` | | ButtonGroup's content. | diff --git a/demo_markdown/docs/calendar/mod.md b/demo_markdown/docs/calendar/mod.md index bc5c995..d5a0c09 100644 --- a/demo_markdown/docs/calendar/mod.md +++ b/demo_markdown/docs/calendar/mod.md @@ -11,7 +11,7 @@ view! { ### Calendar Props -| Name | Type | Default | Desciption | -| ----- | ----------------------------- | -------------------- | ------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the calendar element. | -| value | `RwSignal>` | `Default::default()` | Set the calendar value | +| Name | Type | Default | Desciption | +| ----- | ----------------------------------- | -------------------- | ------------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the calendar element. | +| value | `Model>` | `Default::default()` | Set the calendar value | diff --git a/demo_markdown/docs/card/mod.md b/demo_markdown/docs/card/mod.md index 327a30b..8b93675 100644 --- a/demo_markdown/docs/card/mod.md +++ b/demo_markdown/docs/card/mod.md @@ -23,11 +23,11 @@ view! { ### Card Props -| Name | Type | Default | Description | -| -------- | --------------------- | -------------------- | --------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the card element. | -| title | `MaybeSignal` | `Default::default()` | Card title. | -| children | `Children` | | Card's content. | +| Name | Type | Default | Description | +| -------- | ----------------------------------- | -------------------- | --------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the card element. | +| title | `OptionalProp>` | `Default::default()` | Card title. | +| children | `Children` | | Card's content. | ### Card Slots diff --git a/demo_markdown/docs/checkbox/mod.md b/demo_markdown/docs/checkbox/mod.md index ffc7c2d..e1eb6fd 100644 --- a/demo_markdown/docs/checkbox/mod.md +++ b/demo_markdown/docs/checkbox/mod.md @@ -28,23 +28,23 @@ view! { ### Checkbox Props -| Name | Type | Default | Description | -| -------- | --------------------- | -------------------- | ------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the checkbox element. | -| value | `RwSignal` | `false` | Whether the checkbox is being checked. | -| children | `Children` | | Checkbox's content. | +| Name | Type | Default | Description | +| -------- | ----------------------------------- | -------------------- | ------------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the checkbox element. | +| value | `Model` | `false` | Whether the checkbox is being checked. | +| children | `Children` | | Checkbox's content. | ### CheckboxGroup Props -| Name | Type | Default | Description | -| -------- | --------------------------- | -------------------- | ------------------------------------- | -| value | `RwSignal>` | `Default::default()` | Sets the value of the checkbox group. | -| children | `Children` | | CheckboxGroup's content. | +| Name | Type | Default | Description | +| -------- | ------------------------ | -------------------- | ------------------------------------- | +| value | `Model>` | `Default::default()` | Sets the value of the checkbox group. | +| children | `Children` | | CheckboxGroup's content. | ### CheckboxItem Props -| Name | Type | Default | Description | -| ----- | --------------------- | -------------------- | ------------------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the checkbox element. | -| key | `String` | | The key of the checkbox to be used in a checkbox group. | -| label | `Option` | `None` | Checkbox's label. | +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the checkbox element. | +| key | `String` | | The key of the checkbox to be used in a checkbox group. | +| label | `Option` | `None` | Checkbox's label. | diff --git a/demo_markdown/docs/collapse/mod.md b/demo_markdown/docs/collapse/mod.md index 119410d..2891b44 100644 --- a/demo_markdown/docs/collapse/mod.md +++ b/demo_markdown/docs/collapse/mod.md @@ -39,18 +39,18 @@ view! { ### Collapse Props -| Name | Type | Default | Description | -| --------- | --------------------------- | -------------------- | ------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the collapse element. | -| value | `RwSignal>` | `Default::default()` | Currently active panel. | -| accordion | `bool` | `false` | Only allow one panel open at a time. | -| children | `Children` | | Collapse's content. | +| Name | Type | Default | Description | +| --------- | ----------------------------------- | -------------------- | ------------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the collapse element. | +| value | `Model>` | `Default::default()` | Currently active panel. | +| accordion | `bool` | `false` | Only allow one panel open at a time. | +| children | `Children` | | Collapse's content. | ### CollapseItem Props -| Name | Type | Default | Description | -| ------- | --------------------- | -------------------- | ------------------------------------------------ | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the collapse item element. | -| title | `MaybeSignal` | | The title of the CollapseItem. | -| key | `MaybeSignal` | | The indentifier of CollapseItem. | -| chilren | `Children` | | CollapseItem's content. | +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the collapse item element. | +| title | `MaybeSignal` | | The title of the CollapseItem. | +| key | `MaybeSignal` | | The indentifier of CollapseItem. | +| chilren | `Children` | | CollapseItem's content. | diff --git a/demo_markdown/docs/color_picker/mod.md b/demo_markdown/docs/color_picker/mod.md index 6739e89..e697529 100644 --- a/demo_markdown/docs/color_picker/mod.md +++ b/demo_markdown/docs/color_picker/mod.md @@ -30,7 +30,7 @@ view! { } ``` -### DatePicker Props +### ColorPicker Props | Name | Type | Default | Desciption | | ----- | ----------------------------------- | -------------------- | ----------------------------------------------- | diff --git a/demo_markdown/docs/date_picker/mod.md b/demo_markdown/docs/date_picker/mod.md index 08c4d0c..fb9b264 100644 --- a/demo_markdown/docs/date_picker/mod.md +++ b/demo_markdown/docs/date_picker/mod.md @@ -13,6 +13,6 @@ view! { | Name | Type | Default | Desciption | | --- | --- | --- | --- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the date picker element. | -| value | `RwSignal>` | `Default::default()` | Set the date picker value | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the date picker element. | +| value | `Model>` | `Default::default()` | Set the date picker value | | attr: | `Vec<(&'static str, Attribute)>` | `Default::default()` | The dom attrs of the input element inside the component. | diff --git a/demo_markdown/docs/divider/mod.md b/demo_markdown/docs/divider/mod.md index d095fd8..385e2d9 100644 --- a/demo_markdown/docs/divider/mod.md +++ b/demo_markdown/docs/divider/mod.md @@ -10,6 +10,6 @@ view! { ### Divider Props -| Name | Type | Default | Desciption | -| ----- | --------------------- | -------------------- | ------------------------------------------ | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the divider element. | +| Name | Type | Default | Desciption | +| ----- | ----------------------------------- | -------------------- | ------------------------------------------ | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the divider element. | diff --git a/demo_markdown/docs/drawer/mod.md b/demo_markdown/docs/drawer/mod.md index 8761017..ec0a447 100644 --- a/demo_markdown/docs/drawer/mod.md +++ b/demo_markdown/docs/drawer/mod.md @@ -39,14 +39,14 @@ view! { ### Drawer Props -| Name | Type | Default | Desciption | -| --------- | ------------------------------ | ------------------------ | ----------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the drawer element. | -| show | `MaybeSignal` | | Whether to show drawer. | -| title | `MaybeSignal` | `Default::default()` | Drawer title. | -| placement | `MaybeSignal` | `DrawerPlacement::Right` | Drawer placement. | -| width | `MaybeSignal` | `520px` | Drawer width. | -| height | `MaybeSignal` | `260px` | Drawer height. | -| z_index | `MaybeSignal` | `2000` | z-index of the drawer. | -| mount | `DrawerMount` | `DrawerMount::Body` | Container node of the drawer. | -| children | `Children` | | Drawer content. | +| Name | Type | Default | Desciption | +| --- | --- | --- | --- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the drawer element. | +| show | `Model` | | Whether to show drawer. | +| title | `OptionalProp>` | `Default::default()` | Drawer title. | +| placement | `MaybeSignal` | `DrawerPlacement::Right` | Drawer placement. | +| width | `MaybeSignal` | `520px` | Drawer width. | +| height | `MaybeSignal` | `260px` | Drawer height. | +| z_index | `MaybeSignal` | `2000` | z-index of the drawer. | +| mount | `DrawerMount` | `DrawerMount::Body` | Container node of the drawer. | +| children | `Children` | | Drawer content. | diff --git a/demo_markdown/docs/grid/mod.md b/demo_markdown/docs/grid/mod.md index 50c9961..20d0e90 100644 --- a/demo_markdown/docs/grid/mod.md +++ b/demo_markdown/docs/grid/mod.md @@ -95,17 +95,17 @@ view! { ### Grid Props -| Name | Type | Default | Desciption | -| ----- | --------------------- | -------------------- | --------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the grid element. | -| cols | `MaybeSignal` | `1` | Number of grids displayed. | -| x_gap | `MaybeSignal` | `0` | Horizontal gap. | -| y_gap | `MaybeSignal` | `0` | Vertical gap. | +| Name | Type | Default | Desciption | +| ----- | ----------------------------------- | -------------------- | --------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the grid element. | +| cols | `MaybeSignal` | `1` | Number of grids displayed. | +| x_gap | `MaybeSignal` | `0` | Horizontal gap. | +| y_gap | `MaybeSignal` | `0` | Vertical gap. | ### GridItem Props -| Name | Type | Default | Desciption | -| ------ | --------------------- | -------------------- | --------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the grid item element. | -| column | `MaybeSignal` | `1` | Number of columns this grid item will occupy. | -| offset | `MaybeSignal` | `0` | Horizontal offset. | +| Name | Type | Default | Desciption | +| ------ | ----------------------------------- | -------------------- | --------------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the grid item element. | +| column | `MaybeSignal` | `1` | Number of columns this grid item will occupy. | +| offset | `MaybeSignal` | `0` | Horizontal offset. | diff --git a/demo_markdown/docs/image/mod.md b/demo_markdown/docs/image/mod.md index 117bd2f..46bee1f 100644 --- a/demo_markdown/docs/image/mod.md +++ b/demo_markdown/docs/image/mod.md @@ -9,12 +9,12 @@ view! { ### Image Props -| Name | Type | Default | Desciption | -| ------------- | --------------------- | -------------------- | ---------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the image element. | -| src | `MaybeSignal` | `Default::default()` | Image source. | -| alt | `MaybeSignal` | `Default::default()` | Image alt information. | -| width | `MaybeSignal` | `Default::default()` | Image width. | -| height | `MaybeSignal` | `Default::default()` | Image height. | -| border_radius | `MaybeSignal` | `Default::default()` | Image border radius. | -| object_fit | `MaybeSignal` | `Default::default()` | Object-fit type of the image in the container. | +| Name | Type | Default | Desciption | +| --- | --- | --- | --- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the image element. | +| src | `OptionalProp>` | `Default::default()` | Image source. | +| alt | `OptionalProp>` | `Default::default()` | Image alt information. | +| width | `MaybeSignal` | `Default::default()` | Image width. | +| height | `MaybeSignal` | `Default::default()` | Image height. | +| border_radius | `MaybeSignal` | `Default::default()` | Image border radius. | +| object_fit | `MaybeSignal` | `Default::default()` | Object-fit type of the image in the container. | diff --git a/demo_markdown/docs/input/mod.md b/demo_markdown/docs/input/mod.md index 01ddf12..20ba362 100644 --- a/demo_markdown/docs/input/mod.md +++ b/demo_markdown/docs/input/mod.md @@ -98,10 +98,10 @@ view! { | Name | Type | Default | Description | | --- | --- | --- | --- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the input element. | -| value | `RwSignal` | `Default::default()` | Set the input value. | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the input element. | +| value | `Model` | `Default::default()` | Set the input value. | | variant | `MaybeSignal` | `InputVariant::Text` | Input's variant. | -| placeholder | `MaybeSignal` | `Default::default()` | Placeholder of input. | +| placeholder | `OptionalProp>` | `Default::default()` | Placeholder of input. | | disabled | `MaybeSignal` | `false` | Whether the input is disabled. | | invalid | `MaybeSignal` | `false` | Whether the input is invalid. | | allow_value | `Option>` | `None` | Check the incoming value, if it returns false, input will not be accepted. | diff --git a/demo_markdown/docs/input_number/mod.md b/demo_markdown/docs/input_number/mod.md index c077498..4c5e0c4 100644 --- a/demo_markdown/docs/input_number/mod.md +++ b/demo_markdown/docs/input_number/mod.md @@ -36,9 +36,9 @@ view! { | Name | Type | Default | Description | | --- | --- | --- | --- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the input element. | -| value | `RwSignal` | `T::default()` | Set the input value. | -| placeholder | `MaybeSignal` | `Default::default()` | Placeholder of input number. | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the input element. | +| value | `Model` | `T::default()` | Set the input value. | +| placeholder | `OptionalProp>` | `Default::default()` | Placeholder of input number. | | step | `MaybeSignal` | | The number which the current value is increased or decreased on key or button press. | | disabled | `MaybeSignal` | `false` | Whether the input is disabled. | | invalid | `MaybeSignal` | `false` | Whether the input is invalid. | @@ -53,4 +53,4 @@ view! { | Name | Type | Description | | ----- | ----------- | ------------------------ | | focus | `Fn(&self)` | Focus the input element. | -| blur | `Fn(&self)` | Blur the input element. | \ No newline at end of file +| blur | `Fn(&self)` | Blur the input element. | diff --git a/demo_markdown/docs/layout/mod.md b/demo_markdown/docs/layout/mod.md index 55e2e06..76dd7dd 100644 --- a/demo_markdown/docs/layout/mod.md +++ b/demo_markdown/docs/layout/mod.md @@ -35,15 +35,16 @@ view! { | Name | Type | Default | Description | | --- | --- | --- | --- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the layout element. | -| style | `MaybeSignal` | `Default::default()` | Layout's style. | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the layout element. | +| style | `OptionalProp>` | `Default::default()` | Layout's style. | | position | `LayoutPosition` | `LayoutPosition::Static` | static position will make it css position set to static. absolute position will make it css position set to absolute and left, right, top, bottom to 0. absolute position is very useful when you want to make content scroll in a fixed container or make the whole page's layout in a fixed position. You may need to change the style of the component to make it display as you expect. | +| has_sider | `MaybeSignal` | `false` | Whether the component has sider inside. If so it must be true. | | children | `Children` | | Layout's content. | ### LayoutHeader, LayoutSider Props -| Name | Type | Default | Description | -| -------- | --------------------- | -------------------- | ------------------------------------------------ | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the layout header element. | -| style | `MaybeSignal` | `Default::default()` | LayoutHeader's style. | -| children | `Children` | | LayoutHeader's content. | +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the layout header element. | +| style | `OptionalProp>` | `Default::default()` | LayoutHeader's style. | +| children | `Children` | | LayoutHeader's content. | diff --git a/demo_markdown/docs/menu/mod.md b/demo_markdown/docs/menu/mod.md index ad9555c..ea2ef07 100644 --- a/demo_markdown/docs/menu/mod.md +++ b/demo_markdown/docs/menu/mod.md @@ -13,24 +13,24 @@ view! { ### Menu Props -| Name | Type | Default | Description | -| -------- | --------------------- | -------------------- | --------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the menu element. | -| value | `MaybeSignal` | `Default::default()` | The selected item key of the menu. | -| children | `Children` | | Menu's content. | +| Name | Type | Default | Description | +| -------- | ----------------------------------- | -------------------- | --------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the menu element. | +| value | `Model` | `Default::default()` | The selected item key of the menu. | +| children | `Children` | | Menu's content. | ### MenuGroup Props -| Name | Type | Default | Description | -| -------- | --------------------- | -------------------- | --------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the menu group element. | -| label | `String` | | The label of the menu group. | -| children | `Children` | | MenuGroup's content. | +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the menu group element. | +| label | `String` | | The label of the menu group. | +| children | `Children` | | MenuGroup's content. | ### MenuItem Props -| Name | Type | Default | Description | -| ----- | --------------------- | -------------------- | -------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the menu item element. | -| label | `MaybeSignal` | `Default::default()` | The label of the menu item. | -| key | `MaybeSignal` | `Default::default()` | The indentifier of the menu item. | +| Name | Type | Default | Description | +| ----- | ----------------------------------- | -------------------- | -------------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the menu item element. | +| label | `MaybeSignal` | `Default::default()` | The label of the menu item. | +| key | `MaybeSignal` | `Default::default()` | The indentifier of the menu item. | diff --git a/demo_markdown/docs/message/mod.md b/demo_markdown/docs/message/mod.md index 16a4263..e7f7f42 100644 --- a/demo_markdown/docs/message/mod.md +++ b/demo_markdown/docs/message/mod.md @@ -35,9 +35,9 @@ view! { ### MessageProvider Props -| Name | Type | Default | Desciption | -| --------- | ----------------------------- | ----------------------- | ------------------------------- | -| placement | `MessagePlacement` | `MessagePlacement::Top` | Position to place the messages. | +| Name | Type | Default | Desciption | +| --------- | ------------------ | ----------------------- | ------------------------------- | +| placement | `MessagePlacement` | `MessagePlacement::Top` | Position to place the messages. | ### MessageProvider Injection Methods @@ -47,7 +47,7 @@ view! { ### MessageOptions fields -| Name | Type | Default | Description | -| -------- | ----------------- | ------------------------- | --------------------------------------------------------------- | -| duration | `Duration` | `Duration::from_secs(3)` | How long the message will be displayed. 0 for permanent message | -| closable | `bool` | `false` | Can the message be manually closed. | +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| duration | `Duration` | `std::time::Duration::from_secs(3)` | How long the message will be displayed. 0 for permanent message | +| closable | `bool` | `false` | Can the message be manually closed. | diff --git a/demo_markdown/docs/modal/mod.md b/demo_markdown/docs/modal/mod.md index db64149..4f7434b 100644 --- a/demo_markdown/docs/modal/mod.md +++ b/demo_markdown/docs/modal/mod.md @@ -15,7 +15,7 @@ view! { | Name | Type | Default | Description | | -------- | --------------------- | -------------------- | ---------------------- | -| show | `MaybeSignal` | | Whether to show modal. | +| show | `Model` | | Whether to show modal. | | title | `MaybeSignal` | `Default::default()` | Modal title. | | children | `Children` | | Modal's content. | diff --git a/demo_markdown/docs/popover/mod.md b/demo_markdown/docs/popover/mod.md index b76d6f3..614bcd3 100644 --- a/demo_markdown/docs/popover/mod.md +++ b/demo_markdown/docs/popover/mod.md @@ -131,11 +131,11 @@ view! { ### Popover Props -| Name | Type | Default | Description | -| --------- | --------------------- | ----------------------- | ----------------------------- | -| class | `MaybeSignal` | `Default::default()` | Content class of the popover. | -| placement | `PopoverPlacement` | `PopoverPlacement::Top` | Popover placement. | -| children | `Children` | | The content inside popover. | +| Name | Type | Default | Description | +| --------- | ----------------------------------- | ----------------------- | ----------------------------- | +| class | `OptionalProp>` | `Default::default()` | Content class of the popover. | +| placement | `PopoverPlacement` | `PopoverPlacement::Top` | Popover placement. | +| children | `Children` | | The content inside popover. | ### Popover Slots diff --git a/demo_markdown/docs/radio/mod.md b/demo_markdown/docs/radio/mod.md index 9a12180..6eb9c3b 100644 --- a/demo_markdown/docs/radio/mod.md +++ b/demo_markdown/docs/radio/mod.md @@ -10,8 +10,8 @@ view! { ### Radio Props -| Name | Type | Default | Description | -| -------- | --------------------- | -------------------- | ---------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the radio element. | -| value | `RwSignal` | `false` | Checked value. | -| children | `Children` | | Radio's content. | +| Name | Type | Default | Description | +| -------- | ----------------------------------- | -------------------- | ---------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the radio element. | +| value | `Model` | `false` | Checked value. | +| children | `Children` | | Radio's content. | diff --git a/demo_markdown/docs/select/mod.md b/demo_markdown/docs/select/mod.md index 93b5d4f..25934eb 100644 --- a/demo_markdown/docs/select/mod.md +++ b/demo_markdown/docs/select/mod.md @@ -23,6 +23,6 @@ view! { | Name | Type | Default | Description | | ------- | ----------------------------------- | -------------------- | ----------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the select element. | -| value | `RwSignal>` | `None` | Checked value. | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the select element. | +| value | `Model>` | `None` | Checked value. | | options | `MaybeSignal>>` | `vec![]` | Options that can be selected. | diff --git a/demo_markdown/docs/slider/mod.md b/demo_markdown/docs/slider/mod.md index 0e9461e..f37522a 100644 --- a/demo_markdown/docs/slider/mod.md +++ b/demo_markdown/docs/slider/mod.md @@ -40,13 +40,13 @@ view! { ### Slider Props -| Name | Type | Default | Description | -| -------- | --------------------- | -------------------- | ----------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the slider element. | -| value | `MaybeSignal` | `Default::default()` | Value of the slider. | -| max | `MaybeSignal` | `100` | Max value of the slider. | -| step | `MaybeSignal` | `Default::default()` | The step in which value is incremented. | -| children | `Option` | `None` | Slider's content. | +| Name | Type | Default | Description | +| -------- | ----------------------------------- | -------------------- | ----------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the slider element. | +| value | `MaybeSignal` | `Default::default()` | Value of the slider. | +| max | `MaybeSignal` | `100` | Max value of the slider. | +| step | `MaybeSignal` | `Default::default()` | The step in which value is incremented. | +| children | `Option` | `None` | Slider's content. | ### SliderLabel props diff --git a/demo_markdown/docs/space/mod.md b/demo_markdown/docs/space/mod.md index 6e2dfa2..5ef940a 100644 --- a/demo_markdown/docs/space/mod.md +++ b/demo_markdown/docs/space/mod.md @@ -41,9 +41,9 @@ view! { ### Space Props -| Name | Type | Default | Description | -| -------- | --------------------- | -------------------- | ---------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the space element. | -| vertical | `bool` | `false` | Whether to lay out vertically. | -| gap | `SpaceGap` | `SpaceGap::Medium` | Space's gap. | -| children | `Children` | | Space's content. | +| Name | Type | Default | Description | +| -------- | ----------------------------------- | -------------------- | ---------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the space element. | +| vertical | `bool` | `false` | Whether to lay out vertically. | +| gap | `SpaceGap` | `SpaceGap::Medium` | Space's gap. | +| children | `Children` | | Space's content. | diff --git a/demo_markdown/docs/spinner/mod.md b/demo_markdown/docs/spinner/mod.md index 39af9e7..f3f2f9c 100644 --- a/demo_markdown/docs/spinner/mod.md +++ b/demo_markdown/docs/spinner/mod.md @@ -21,7 +21,7 @@ view! { ### Spinner Props -| Name | Type | Default | Description | -| ----- | -------------------------- | --------------------- | ------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Additional classes for the spinner element. | -| size | `MaybeSignal` | `SpinnerSize::Medium` | Spinner size. | +| Name | Type | Default | Description | +| ----- | ----------------------------------- | --------------------- | ------------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Additional classes for the spinner element. | +| size | `MaybeSignal` | `SpinnerSize::Medium` | Spinner size. | diff --git a/demo_markdown/docs/switch/mod.md b/demo_markdown/docs/switch/mod.md index 0ba2c23..399d681 100644 --- a/demo_markdown/docs/switch/mod.md +++ b/demo_markdown/docs/switch/mod.md @@ -10,7 +10,7 @@ view! { ### Switch Props -| Name | Type | Default | Description | -| ----- | --------------------- | -------------------- | ----------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the switch element. | -| value | `RwSignal` | `Default::default()` | Switch's value. | +| Name | Type | Default | Description | +| ----- | ----------------------------------- | -------------------- | ----------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the switch element. | +| value | `Model` | `false` | Switch's value. | diff --git a/demo_markdown/docs/table/mod.md b/demo_markdown/docs/table/mod.md index 0817bf2..d658fe5 100644 --- a/demo_markdown/docs/table/mod.md +++ b/demo_markdown/docs/table/mod.md @@ -28,10 +28,10 @@ view! { ### Table Props -| Name | Type | Default | Description | -| ------------- | --------------------- | -------------------- | ------------------------------------------------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the table element. | -| style | `MaybeSignal` | `Default::default()` | Table's style. | -| single_row | `RwSignal` | `true` | Whether columns are not divided. If the prop is true, table cell has no border-right. | -| single_column | `RwSignal` | `false` | Whether rows are not divided. If the prop is true, table cell has no border-bottom. | -| children | `Children` | | Table's content. | +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the table element. | +| style | `MaybeSignal` | `Default::default()` | Table's style. | +| single_row | `MaybeSignal` | `true` | Whether columns are not divided. If the prop is true, table cell has no border-right. | +| single_column | `MaybeSignal` | `false` | Whether rows are not divided. If the prop is true, table cell has no border-bottom. | +| children | `Children` | | Table's content. | diff --git a/demo_markdown/docs/tabs/mod.md b/demo_markdown/docs/tabs/mod.md index 6a0d902..fdc30dc 100644 --- a/demo_markdown/docs/tabs/mod.md +++ b/demo_markdown/docs/tabs/mod.md @@ -44,20 +44,20 @@ view! { ### Tabs Props -| Name | Type | Default | Description | -| -------- | --------------------- | --------------------- | --------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the tabs element. | -| value | `RwSignal` | `TagVariant::Default` | Tabs value. | -| children | `Children` | | Tabs content. | +| Name | Type | Default | Description | +| -------- | ----------------------------------- | -------------------- | --------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the tabs element. | +| value | `Model` | `Default::default()` | Tabs value. | +| children | `Children` | | Tabs content. | ### Tab Props -| Name | Type | Default | Description | -| -------- | --------------------- | -------------------- | -------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the tab element. | -| key | `String` | | The indentifier of the tab. | -| label | `String` | `Default::default()` | The label of the tab. | -| children | `Children` | | Tabs content. | +| Name | Type | Default | Description | +| -------- | ----------------------------------- | -------------------- | -------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the tab element. | +| key | `String` | | The indentifier of the tab. | +| label | `String` | `Default::default()` | The label of the tab. | +| children | `Children` | | Tabs content. | ### Tab Slots diff --git a/demo_markdown/docs/tag/mod.md b/demo_markdown/docs/tag/mod.md index 2302fb6..b2eaf62 100644 --- a/demo_markdown/docs/tag/mod.md +++ b/demo_markdown/docs/tag/mod.md @@ -13,8 +13,8 @@ view! { ### Tag Props -| Name | Type | Default | Description | -| -------- | ------------------------- | --------------------- | -------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the tag element. | -| variant | `MaybeSignal` | `TagVariant::Default` | Tag's variant. | -| children | `Children` | | Tag's content. | +| Name | Type | Default | Description | +| -------- | ----------------------------------- | --------------------- | -------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the tag element. | +| variant | `MaybeSignal` | `TagVariant::Default` | Tag's variant. | +| children | `Children` | | Tag's content. | diff --git a/demo_markdown/docs/time_picker/mod.md b/demo_markdown/docs/time_picker/mod.md index 0aec29b..e9cc65c 100644 --- a/demo_markdown/docs/time_picker/mod.md +++ b/demo_markdown/docs/time_picker/mod.md @@ -12,8 +12,8 @@ view! { ## TimePicker Props -| Name | Type | Default | Description | -| ----- | -------------------------------- | -------------------- | -------------------------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the time picker element. | -| value | `RwSignal>` | `Default::default()` | Set the TimePicker value. | +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the time picker element. | +| value | `Model>` | `Default::default()` | Set the TimePicker value. | | attr: | `Vec<(&'static str, Attribute)>` | `Default::default()` | The dom attrs of the input element inside the component. | diff --git a/demo_markdown/docs/typography/mod.md b/demo_markdown/docs/typography/mod.md index 80c4625..2f4f6c2 100644 --- a/demo_markdown/docs/typography/mod.md +++ b/demo_markdown/docs/typography/mod.md @@ -11,8 +11,8 @@ view! { ## Text Props -| Name | Type | Default | Description | -| -------- | --------------------- | -------------------- | --------------------------------------- | -| class | `MaybeSignal` | `Default::default()` | Addtional classes for the text element. | -| code | `bool` | `false` | Use the code tag and style. | -| children | `Children` | | Text's content. | +| Name | Type | Default | Description | +| -------- | ----------------------------------- | -------------------- | --------------------------------------- | +| class | `OptionalProp>` | `Default::default()` | Addtional classes for the text element. | +| code | `bool` | `false` | Use the code tag and style. | +| children | `Children` | | Text's content. | diff --git a/thaw/src/message/message_provider.rs b/thaw/src/message/message_provider.rs index cd32d24..0fd7b46 100644 --- a/thaw/src/message/message_provider.rs +++ b/thaw/src/message/message_provider.rs @@ -1,5 +1,4 @@ use std::time::Duration; - use super::{message_environment::MessageEnvironment, MessageVariant}; use crate::{ components::Teleport, diff --git a/thaw/src/slider/slider_label.rs b/thaw/src/slider/slider_label.rs index b82c852..a8346bb 100644 --- a/thaw/src/slider/slider_label.rs +++ b/thaw/src/slider/slider_label.rs @@ -1,6 +1,5 @@ -use leptos::*; - use crate::utils::mount_style; +use leptos::*; #[component] pub fn SliderLabel(#[prop(into)] value: MaybeSignal, children: Children) -> impl IntoView {