Merge branch 'breaking' of https://github.com/Demonthos/dioxus into breaking
This commit is contained in:
commit
b165d707c4
29 files changed
+356
-1145
No files matched your search
@@ -1,413 +0,0 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
launch_desktop(app);
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
rsx! {
|
||||
div {
|
||||
align_content: "a",
|
||||
align_items: "a",
|
||||
align_self: "a",
|
||||
alignment_adjust: "a",
|
||||
alignment_baseline: "a",
|
||||
all: "a",
|
||||
alt: "a",
|
||||
animation: "a",
|
||||
animation_delay: "a",
|
||||
animation_direction: "a",
|
||||
animation_duration: "a",
|
||||
animation_fill_mode: "a",
|
||||
animation_iteration_count: "a",
|
||||
animation_name: "a",
|
||||
animation_play_state: "a",
|
||||
animation_timing_function: "a",
|
||||
azimuth: "a",
|
||||
backface_visibility: "a",
|
||||
background: "a",
|
||||
background_attachment: "a",
|
||||
background_clip: "a",
|
||||
background_color: "a",
|
||||
background_image: "a",
|
||||
background_origin: "a",
|
||||
background_position: "a",
|
||||
background_repeat: "a",
|
||||
background_size: "a",
|
||||
background_blend_mode: "a",
|
||||
baseline_shift: "a",
|
||||
bleed: "a",
|
||||
bookmark_label: "a",
|
||||
bookmark_level: "a",
|
||||
bookmark_state: "a",
|
||||
border: "a",
|
||||
border_color: "a",
|
||||
border_style: "a",
|
||||
border_width: "a",
|
||||
border_bottom: "a",
|
||||
border_bottom_color: "a",
|
||||
border_bottom_style: "a",
|
||||
border_bottom_width: "a",
|
||||
border_left: "a",
|
||||
border_left_color: "a",
|
||||
border_left_style: "a",
|
||||
border_left_width: "a",
|
||||
border_right: "a",
|
||||
border_right_color: "a",
|
||||
border_right_style: "a",
|
||||
border_right_width: "a",
|
||||
border_top: "a",
|
||||
border_top_color: "a",
|
||||
border_top_style: "a",
|
||||
border_top_width: "a",
|
||||
border_collapse: "a",
|
||||
border_image: "a",
|
||||
border_image_outset: "a",
|
||||
border_image_repeat: "a",
|
||||
border_image_slice: "a",
|
||||
border_image_source: "a",
|
||||
border_image_width: "a",
|
||||
border_radius: "a",
|
||||
border_bottom_left_radius: "a",
|
||||
border_bottom_right_radius: "a",
|
||||
border_top_left_radius: "a",
|
||||
border_top_right_radius: "a",
|
||||
border_spacing: "a",
|
||||
bottom: "a",
|
||||
box_decoration_break: "a",
|
||||
box_shadow: "a",
|
||||
box_sizing: "a",
|
||||
box_snap: "a",
|
||||
break_after: "a",
|
||||
break_before: "a",
|
||||
break_inside: "a",
|
||||
buffered_rendering: "a",
|
||||
caption_side: "a",
|
||||
clear: "a",
|
||||
clear_side: "a",
|
||||
clip: "a",
|
||||
clip_path: "a",
|
||||
clip_rule: "a",
|
||||
color: "a",
|
||||
color_adjust: "a",
|
||||
color_correction: "a",
|
||||
color_interpolation: "a",
|
||||
color_interpolation_filters: "a",
|
||||
color_profile: "a",
|
||||
color_rendering: "a",
|
||||
column_fill: "a",
|
||||
column_gap: "a",
|
||||
column_rule: "a",
|
||||
column_rule_color: "a",
|
||||
column_rule_style: "a",
|
||||
column_rule_width: "a",
|
||||
column_span: "a",
|
||||
columns: "a",
|
||||
column_count: "a",
|
||||
column_width: "a",
|
||||
contain: "a",
|
||||
content: "a",
|
||||
counter_increment: "a",
|
||||
counter_reset: "a",
|
||||
counter_set: "a",
|
||||
cue: "a",
|
||||
cue_after: "a",
|
||||
cue_before: "a",
|
||||
cursor: "a",
|
||||
direction: "a",
|
||||
display: "a",
|
||||
display_inside: "a",
|
||||
display_outside: "a",
|
||||
display_extras: "a",
|
||||
display_box: "a",
|
||||
dominant_baseline: "a",
|
||||
elevation: "a",
|
||||
empty_cells: "a",
|
||||
enable_background: "a",
|
||||
fill: "a",
|
||||
fill_opacity: "a",
|
||||
fill_rule: "a",
|
||||
filter: "a",
|
||||
float: "a",
|
||||
float_defer_column: "a",
|
||||
float_defer_page: "a",
|
||||
float_offset: "a",
|
||||
float_wrap: "a",
|
||||
flow_into: "a",
|
||||
flow_from: "a",
|
||||
flex: "a",
|
||||
flex_basis: "a",
|
||||
flex_grow: "a",
|
||||
flex_shrink: "a",
|
||||
flex_flow: "a",
|
||||
flex_direction: "a",
|
||||
flex_wrap: "a",
|
||||
flood_color: "a",
|
||||
flood_opacity: "a",
|
||||
font: "a",
|
||||
font_family: "a",
|
||||
font_size: "a",
|
||||
font_stretch: "a",
|
||||
font_style: "a",
|
||||
font_weight: "a",
|
||||
font_feature_settings: "a",
|
||||
font_kerning: "a",
|
||||
font_language_override: "a",
|
||||
font_size_adjust: "a",
|
||||
font_synthesis: "a",
|
||||
font_variant: "a",
|
||||
font_variant_alternates: "a",
|
||||
font_variant_caps: "a",
|
||||
font_variant_east_asian: "a",
|
||||
font_variant_ligatures: "a",
|
||||
font_variant_numeric: "a",
|
||||
font_variant_position: "a",
|
||||
footnote_policy: "a",
|
||||
glyph_orientation_horizontal: "a",
|
||||
glyph_orientation_vertical: "a",
|
||||
grid: "a",
|
||||
grid_auto_flow: "a",
|
||||
grid_auto_columns: "a",
|
||||
grid_auto_rows: "a",
|
||||
grid_template: "a",
|
||||
grid_template_areas: "a",
|
||||
grid_template_columns: "a",
|
||||
grid_template_rows: "a",
|
||||
grid_area: "a",
|
||||
grid_column: "a",
|
||||
grid_column_start: "a",
|
||||
grid_column_end: "a",
|
||||
grid_row: "a",
|
||||
grid_row_start: "a",
|
||||
grid_row_end: "a",
|
||||
hanging_punctuation: "a",
|
||||
height: "a",
|
||||
hyphenate_character: "a",
|
||||
hyphenate_limit_chars: "a",
|
||||
hyphenate_limit_last: "a",
|
||||
hyphenate_limit_lines: "a",
|
||||
hyphenate_limit_zone: "a",
|
||||
hyphens: "a",
|
||||
icon: "a",
|
||||
image_orientation: "a",
|
||||
image_resolution: "a",
|
||||
image_rendering: "a",
|
||||
ime: "a",
|
||||
ime_align: "a",
|
||||
ime_mode: "a",
|
||||
ime_offset: "a",
|
||||
ime_width: "a",
|
||||
initial_letters: "a",
|
||||
inline_box_align: "a",
|
||||
isolation: "a",
|
||||
justify_content: "a",
|
||||
justify_items: "a",
|
||||
justify_self: "a",
|
||||
kerning: "a",
|
||||
left: "a",
|
||||
letter_spacing: "a",
|
||||
lighting_color: "a",
|
||||
line_box_contain: "a",
|
||||
line_break: "a",
|
||||
line_grid: "a",
|
||||
line_height: "a",
|
||||
line_slack: "a",
|
||||
line_snap: "a",
|
||||
list_style: "a",
|
||||
list_style_image: "a",
|
||||
list_style_position: "a",
|
||||
list_style_type: "a",
|
||||
margin: "a",
|
||||
margin_bottom: "a",
|
||||
margin_left: "a",
|
||||
margin_right: "a",
|
||||
margin_top: "a",
|
||||
marker: "a",
|
||||
marker_end: "a",
|
||||
marker_mid: "a",
|
||||
marker_pattern: "a",
|
||||
marker_segment: "a",
|
||||
marker_start: "a",
|
||||
marker_knockout_left: "a",
|
||||
marker_knockout_right: "a",
|
||||
marker_side: "a",
|
||||
marks: "a",
|
||||
marquee_direction: "a",
|
||||
marquee_play_count: "a",
|
||||
marquee_speed: "a",
|
||||
marquee_style: "a",
|
||||
mask: "a",
|
||||
mask_image: "a",
|
||||
mask_repeat: "a",
|
||||
mask_position: "a",
|
||||
mask_clip: "a",
|
||||
mask_origin: "a",
|
||||
mask_size: "a",
|
||||
mask_box: "a",
|
||||
mask_box_outset: "a",
|
||||
mask_box_repeat: "a",
|
||||
mask_box_slice: "a",
|
||||
mask_box_source: "a",
|
||||
mask_box_width: "a",
|
||||
mask_type: "a",
|
||||
max_height: "a",
|
||||
max_lines: "a",
|
||||
max_width: "a",
|
||||
min_height: "a",
|
||||
min_width: "a",
|
||||
mix_blend_mode: "a",
|
||||
nav_down: "a",
|
||||
nav_index: "a",
|
||||
nav_left: "a",
|
||||
nav_right: "a",
|
||||
nav_up: "a",
|
||||
object_fit: "a",
|
||||
object_position: "a",
|
||||
offset_after: "a",
|
||||
offset_before: "a",
|
||||
offset_end: "a",
|
||||
offset_start: "a",
|
||||
opacity: "a",
|
||||
order: "a",
|
||||
orphans: "a",
|
||||
outline: "a",
|
||||
outline_color: "a",
|
||||
outline_style: "a",
|
||||
outline_width: "a",
|
||||
outline_offset: "a",
|
||||
overflow: "a",
|
||||
overflow_x: "a",
|
||||
overflow_y: "a",
|
||||
overflow_style: "a",
|
||||
overflow_wrap: "a",
|
||||
padding: "a",
|
||||
padding_bottom: "a",
|
||||
padding_left: "a",
|
||||
padding_right: "a",
|
||||
padding_top: "a",
|
||||
page: "a",
|
||||
page_break_after: "a",
|
||||
page_break_before: "a",
|
||||
page_break_inside: "a",
|
||||
paint_order: "a",
|
||||
pause: "a",
|
||||
pause_after: "a",
|
||||
pause_before: "a",
|
||||
perspective: "a",
|
||||
perspective_origin: "a",
|
||||
pitch: "a",
|
||||
pitch_range: "a",
|
||||
play_during: "a",
|
||||
pointer_events: "a",
|
||||
position: "a",
|
||||
quotes: "a",
|
||||
region_fragment: "a",
|
||||
resize: "a",
|
||||
rest: "a",
|
||||
rest_after: "a",
|
||||
rest_before: "a",
|
||||
richness: "a",
|
||||
right: "a",
|
||||
ruby_align: "a",
|
||||
ruby_merge: "a",
|
||||
ruby_position: "a",
|
||||
scroll_behavior: "a",
|
||||
scroll_snap_coordinate: "a",
|
||||
scroll_snap_destination: "a",
|
||||
scroll_snap_points_x: "a",
|
||||
scroll_snap_points_y: "a",
|
||||
scroll_snap_type: "a",
|
||||
shape_image_threshold: "a",
|
||||
shape_inside: "a",
|
||||
shape_margin: "a",
|
||||
shape_outside: "a",
|
||||
shape_padding: "a",
|
||||
shape_rendering: "a",
|
||||
size: "a",
|
||||
speak: "a",
|
||||
speak_as: "a",
|
||||
speak_header: "a",
|
||||
speak_numeral: "a",
|
||||
speak_punctuation: "a",
|
||||
speech_rate: "a",
|
||||
stop_color: "a",
|
||||
stop_opacity: "a",
|
||||
stress: "a",
|
||||
string_set: "a",
|
||||
stroke: "a",
|
||||
stroke_dasharray: "a",
|
||||
stroke_dashoffset: "a",
|
||||
stroke_linecap: "a",
|
||||
stroke_linejoin: "a",
|
||||
stroke_miterlimit: "a",
|
||||
stroke_opacity: "a",
|
||||
stroke_width: "a",
|
||||
tab_size: "a",
|
||||
table_layout: "a",
|
||||
text_align: "a",
|
||||
text_align_all: "a",
|
||||
text_align_last: "a",
|
||||
text_anchor: "a",
|
||||
text_combine_upright: "a",
|
||||
text_decoration: "a",
|
||||
text_decoration_color: "a",
|
||||
text_decoration_line: "a",
|
||||
text_decoration_style: "a",
|
||||
text_decoration_skip: "a",
|
||||
text_emphasis: "a",
|
||||
text_emphasis_color: "a",
|
||||
text_emphasis_style: "a",
|
||||
text_emphasis_position: "a",
|
||||
text_emphasis_skip: "a",
|
||||
text_height: "a",
|
||||
text_indent: "a",
|
||||
text_justify: "a",
|
||||
text_orientation: "a",
|
||||
text_overflow: "a",
|
||||
text_rendering: "a",
|
||||
text_shadow: "a",
|
||||
text_size_adjust: "a",
|
||||
text_space_collapse: "a",
|
||||
text_spacing: "a",
|
||||
text_transform: "a",
|
||||
text_underline_position: "a",
|
||||
text_wrap: "a",
|
||||
top: "a",
|
||||
touch_action: "a",
|
||||
transform: "a",
|
||||
transform_box: "a",
|
||||
transform_origin: "a",
|
||||
transform_style: "a",
|
||||
transition: "a",
|
||||
transition_delay: "a",
|
||||
transition_duration: "a",
|
||||
transition_property: "a",
|
||||
unicode_bidi: "a",
|
||||
vector_effect: "a",
|
||||
vertical_align: "a",
|
||||
visibility: "a",
|
||||
voice_balance: "a",
|
||||
voice_duration: "a",
|
||||
voice_family: "a",
|
||||
voice_pitch: "a",
|
||||
voice_range: "a",
|
||||
voice_rate: "a",
|
||||
voice_stress: "a",
|
||||
voice_volumn: "a",
|
||||
volume: "a",
|
||||
white_space: "a",
|
||||
widows: "a",
|
||||
width: "a",
|
||||
will_change: "a",
|
||||
word_break: "a",
|
||||
word_spacing: "a",
|
||||
word_wrap: "a",
|
||||
wrap_flow: "a",
|
||||
wrap_through: "a",
|
||||
writing_mode: "a",
|
||||
z_index: "a",
|
||||
|
||||
"This example isn't quite useful yet"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,17 @@
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
*, *:before, *:after {
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font: 100 14px 'Roboto';
|
||||
font-family: Arial;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -20,18 +24,18 @@ button {
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
button:active {
|
||||
box-shadow: inset 0px 0px 80px 0px rgba(0,0,0,0.25);
|
||||
box-shadow: inset 0px 0px 80px 0px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
/* height: 100vh; */
|
||||
height: max-content;
|
||||
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -47,7 +51,7 @@ button:active {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: black;
|
||||
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -61,14 +65,14 @@ button:active {
|
||||
background: #1c191c;
|
||||
line-height: 130px;
|
||||
/* font-size: 6em; */
|
||||
font-size: 16px;
|
||||
font-size: 4vw;
|
||||
font-size: 16px;
|
||||
font-size: 4vw;
|
||||
|
||||
|
||||
max-height: 160px;
|
||||
padding: 0 30px;
|
||||
/* height: 80px; */
|
||||
|
||||
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@@ -85,7 +89,7 @@ button:active {
|
||||
|
||||
.calculator-keypad {
|
||||
height: 400px;
|
||||
|
||||
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@@ -99,7 +103,7 @@ button:active {
|
||||
|
||||
.calculator .digit-keys {
|
||||
background: #e0e0e7;
|
||||
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap-reverse;
|
||||
@@ -109,28 +113,34 @@ button:active {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-top: 1px solid #777;
|
||||
border-right: 1px solid #666;
|
||||
border-right: 1px solid #666;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
}
|
||||
|
||||
.calculator .function-keys .calculator-key {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.calculator .function-keys .key-multiply {
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.calculator .digit-keys .calculator-key {
|
||||
font-size: 2.25em;
|
||||
}
|
||||
|
||||
.calculator .digit-keys .key-0 {
|
||||
width: 160px;
|
||||
text-align: left;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
.calculator .digit-keys .key-dot {
|
||||
padding-top: 1em;
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
.calculator .operator-keys .calculator-key {
|
||||
color: white;
|
||||
border-right: 0;
|
||||
@@ -138,8 +148,9 @@ button:active {
|
||||
}
|
||||
|
||||
.calculator .function-keys {
|
||||
background: linear-gradient(to bottom, rgba(202,202,204,1) 0%, rgba(196,194,204,1) 100%);
|
||||
background: linear-gradient(to bottom, rgba(202, 202, 204, 1) 0%, rgba(196, 194, 204, 1) 100%);
|
||||
}
|
||||
|
||||
.calculator .operator-keys {
|
||||
background: linear-gradient(to bottom, rgba(252,156,23,1) 0%, rgba(247,126,27,1) 100%);
|
||||
background: linear-gradient(to bottom, rgba(252, 156, 23, 1) 0%, rgba(247, 126, 27, 1) 100%);
|
||||
}
|
||||
@@ -12,10 +12,10 @@ fn main() {
|
||||
let config = Config::new().with_window(
|
||||
WindowBuilder::default()
|
||||
.with_title("Calculator")
|
||||
.with_inner_size(LogicalSize::new(300.0, 500.0)),
|
||||
.with_inner_size(LogicalSize::new(300.0, 525.0)),
|
||||
);
|
||||
|
||||
LaunchBuilder::new(app).cfg(config);
|
||||
LaunchBuilder::new(app).cfg(config).launch();
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
|
||||
+3
-3
@@ -9,7 +9,7 @@ fn main() {
|
||||
|
||||
fn app() -> Element {
|
||||
let mut counters = use_signal(|| vec![0, 0, 0]);
|
||||
let mut sum = use_selector(move || counters.read().iter().copied().sum::<usize>());
|
||||
let sum = use_selector(move || counters.read().iter().copied().sum::<i32>());
|
||||
|
||||
rsx! {
|
||||
div {
|
||||
@@ -29,14 +29,14 @@ fn app() -> Element {
|
||||
}
|
||||
|
||||
#[component]
|
||||
fn Child(i: usize, counters: Signal<Vec<usize>>) -> Element {
|
||||
fn Child(i: usize, counters: Signal<Vec<i32>>) -> Element {
|
||||
rsx! {
|
||||
li {
|
||||
button { onclick: move |_| counters.write()[i] -= 1, "-1" }
|
||||
input {
|
||||
value: "{counters.read()[i]}",
|
||||
oninput: move |e| {
|
||||
if let Ok(value) = e.value().parse::<usize>() {
|
||||
if let Ok(value) = e.value().parse::<i32>() {
|
||||
counters.write()[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-9
@@ -5,15 +5,19 @@ use dioxus_router::prelude::*;
|
||||
fn main() {
|
||||
env_logger::init();
|
||||
|
||||
LaunchBuilder::new(|| rsx! {Router::<Route> {}})
|
||||
.cfg(
|
||||
Config::new().with_window(
|
||||
WindowBuilder::new()
|
||||
.with_inner_size(LogicalSize::new(600, 1000))
|
||||
.with_resizable(false),
|
||||
),
|
||||
)
|
||||
.launch_desktop()
|
||||
LaunchBuilder::new(|| {
|
||||
rsx! {
|
||||
Router::<Route> {}
|
||||
}
|
||||
})
|
||||
.cfg(
|
||||
Config::new().with_window(
|
||||
WindowBuilder::new()
|
||||
.with_inner_size(LogicalSize::new(600, 1000))
|
||||
.with_resizable(false),
|
||||
),
|
||||
)
|
||||
.launch_desktop()
|
||||
}
|
||||
|
||||
#[derive(Routable, Clone)]
|
||||
|
||||
@@ -33,8 +33,6 @@ fn app() -> Element {
|
||||
}
|
||||
}
|
||||
|
||||
type SthElse<T> = Option<T>;
|
||||
|
||||
#[derive(Props, PartialEq, Clone)]
|
||||
struct ButtonProps {
|
||||
a: String,
|
||||
@@ -51,6 +49,8 @@ struct ButtonProps {
|
||||
e: SthElse<String>,
|
||||
}
|
||||
|
||||
type SthElse<T> = Option<T>;
|
||||
|
||||
fn Button(props: ButtonProps) -> Element {
|
||||
rsx! {
|
||||
button {
|
||||
|
||||
+5
-1
@@ -2,7 +2,11 @@ use dioxus::prelude::*;
|
||||
use dioxus_router::prelude::*;
|
||||
|
||||
fn main() {
|
||||
launch_desktop(|| rsx! {Router::<Route> {}});
|
||||
launch_desktop(|| {
|
||||
rsx! {
|
||||
Router::<Route> {}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#[derive(Routable, Clone, Debug, PartialEq)]
|
||||
|
||||
@@ -9,7 +9,11 @@ fn main() {
|
||||
.with_module_level("dioxus", log::LevelFilter::Trace)
|
||||
.init()
|
||||
.unwrap();
|
||||
launch_desktop(|| rsx! {Router::<Route> {}});
|
||||
launch_desktop(|| {
|
||||
rsx! {
|
||||
Router::<Route> {}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#[derive(Routable, Clone)]
|
||||
|
||||
@@ -54,5 +54,5 @@ fn Nav() -> Element {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
launch_desktop(|| rsx! {Router::<Route> {}});
|
||||
launch_desktop(|| rsx! { Router::<Route> {} });
|
||||
}
|
||||
Reference in new issue
Block a user