repose_material/material3/
defaults.rs1use repose_core::*;
2
3pub struct SurfaceDefaults;
5
6impl SurfaceDefaults {
7 pub fn color() -> Color {
8 theme().surface
9 }
10 pub fn content_color() -> Color {
11 theme().on_surface
12 }
13 pub const SHAPE_RADIUS: f32 = 0.0;
14 pub const TONAL_ELEVATION: f32 = 0.0;
15 pub const SHADOW_ELEVATION: f32 = 0.0;
16}
17
18pub struct ToggleButtonDefaults;
20
21impl ToggleButtonDefaults {
22 pub const HEIGHT: f32 = 40.0;
23 pub const HORIZONTAL_PADDING: f32 = 24.0;
24 pub const SHAPE_RADIUS: f32 = 20.0;
25 pub fn content_color() -> Color {
26 theme().on_surface_variant
27 }
28 pub fn checked_container_color() -> Color {
29 theme().primary
30 }
31 pub fn checked_content_color() -> Color {
32 theme().on_primary
33 }
34 pub fn tonal_content_color() -> Color {
35 theme().on_surface_variant
36 }
37 pub fn tonal_checked_container_color() -> Color {
38 theme().secondary_container
39 }
40 pub fn tonal_checked_content_color() -> Color {
41 theme().on_secondary_container
42 }
43 pub fn outlined_content_color() -> Color {
44 theme().on_surface_variant
45 }
46 pub fn outlined_border_color() -> Color {
47 theme().outline
48 }
49 pub fn outlined_checked_container_color() -> Color {
50 theme().secondary_container
51 }
52 pub fn outlined_checked_content_color() -> Color {
53 theme().on_secondary_container
54 }
55 pub fn elevated_content_color() -> Color {
56 theme().primary
57 }
58 pub fn elevated_checked_container_color() -> Color {
59 theme().surface_container_low
60 }
61 pub fn elevated_checked_content_color() -> Color {
62 theme().primary
63 }
64 pub fn state_colors_default() -> StateColors {
65 let th = theme();
66 StateColors {
67 default: Color::TRANSPARENT,
68 hovered: Color::TRANSPARENT,
69 focused: Color::TRANSPARENT,
70 pressed: Color::TRANSPARENT,
71 dragged: th.on_surface.with_alpha_f32(0.12),
72 disabled: th.on_surface.with_alpha_f32(0.12),
73 }
74 }
75 pub fn state_elevation_default() -> StateElevation {
76 StateElevation {
77 default: 0.0,
78 hovered: 1.0,
79 focused: 0.0,
80 pressed: 0.0,
81 dragged: 0.0,
82 disabled: 0.0,
83 }
84 }
85 pub fn elevated_state_elevation() -> StateElevation {
86 let th = theme();
87 StateElevation {
88 default: th.elevation.level1,
89 hovered: th.elevation.level2,
90 focused: th.elevation.level1,
91 pressed: th.elevation.level1,
92 dragged: th.elevation.level1,
93 disabled: 0.0,
94 }
95 }
96}
97
98pub struct ProgressIndicatorDefaults;
100
101impl ProgressIndicatorDefaults {
102 pub fn linear_color() -> Color {
103 theme().primary
104 }
105 pub fn linear_track_color() -> Color {
106 theme().secondary_container
107 }
108 pub const LINEAR_INDICATOR_HEIGHT: f32 = 4.0;
109 pub const LINEAR_INDICATOR_GAP_SIZE: f32 = 4.0;
110 pub const LINEAR_TRACK_STOP_SIZE: f32 = 4.0;
111
112 pub fn circular_color() -> Color {
113 theme().primary
114 }
115 pub fn circular_track_color() -> Color {
116 theme().secondary_container
117 }
118 pub const CIRCULAR_INDICATOR_SIZE: f32 = 40.0;
119 pub const CIRCULAR_STROKE_WIDTH: f32 = 4.0;
120
121 pub const SLIDER_THUMB_TRACK_GAP: f32 = 6.0;
123}
124
125pub struct ButtonDefaults;
127
128impl ButtonDefaults {
129 pub fn content_color() -> Color {
130 theme().on_primary
131 }
132 pub fn container_color() -> Color {
133 theme().primary
134 }
135 pub fn tonal_container_color() -> Color {
136 theme().secondary_container
137 }
138 pub fn tonal_content_color() -> Color {
139 theme().on_secondary_container
140 }
141 pub fn elevated_container_color() -> Color {
142 theme().surface_container_low
143 }
144 pub fn elevated_content_color() -> Color {
145 theme().primary
146 }
147 pub fn outlined_content_color() -> Color {
148 theme().on_surface_variant
149 }
150 pub fn outlined_border_color() -> Color {
151 theme().outline
152 }
153 pub fn text_content_color() -> Color {
154 theme().primary
155 }
156 pub const HEIGHT: f32 = 40.0;
157 pub const MIN_HEIGHT: f32 = 40.0;
158 pub const MIN_WIDTH: f32 = 58.0;
159 pub const HORIZONTAL_PADDING: f32 = 24.0;
160 pub const TEXT_HORIZONTAL_PADDING: f32 = 12.0;
161 pub const CONTENT_PADDING: PaddingValues = PaddingValues {
162 left: 24.0,
163 right: 24.0,
164 top: 8.0,
165 bottom: 8.0,
166 };
167 pub const TEXT_CONTENT_PADDING: PaddingValues = PaddingValues {
168 left: 12.0,
169 right: 12.0,
170 top: 8.0,
171 bottom: 8.0,
172 };
173 pub const SHAPE_RADIUS: f32 = 20.0;
174 pub fn state_colors_default() -> StateColors {
175 let th = theme();
176 StateColors {
177 default: Color::TRANSPARENT,
178 hovered: Color::TRANSPARENT,
179 focused: Color::TRANSPARENT,
180 pressed: Color::TRANSPARENT,
181 dragged: th.on_surface.with_alpha_f32(0.12),
182 disabled: th.on_surface.with_alpha_f32(0.12),
183 }
184 }
185 pub fn state_elevation_default() -> StateElevation {
186 StateElevation {
187 default: 0.0,
188 hovered: 1.0,
189 focused: 0.0,
190 pressed: 0.0,
191 dragged: 0.0,
192 disabled: 0.0,
193 }
194 }
195 pub fn elevated_state_elevation() -> StateElevation {
196 let th = theme();
197 StateElevation {
198 default: th.elevation.level1,
199 hovered: th.elevation.level2,
200 focused: th.elevation.level1,
201 pressed: th.elevation.level1,
202 dragged: th.elevation.level1,
203 disabled: 0.0,
204 }
205 }
206}
207
208pub struct SnackbarDefaults;
210
211impl SnackbarDefaults {
212 pub const MIN_HEIGHT: f32 = 48.0;
213 pub const MIN_WIDTH: f32 = 280.0;
214 pub const MAX_WIDTH: f32 = 600.0;
215 pub const SHAPE_RADIUS: f32 = 4.0;
216 pub fn container_color() -> Color {
217 theme().inverse_surface
218 }
219 pub fn content_color() -> Color {
220 theme().inverse_on_surface
221 }
222 pub fn action_color() -> Color {
223 theme().inverse_primary
224 }
225 pub fn dismiss_action_content_color() -> Color {
226 theme().inverse_on_surface
227 }
228}
229
230pub struct CardDefaults;
232
233impl CardDefaults {
234 pub fn filled_container_color() -> Color {
235 theme().surface_container_highest
236 }
237 pub fn elevated_container_color() -> Color {
238 theme().surface_container_low
239 }
240 pub fn outlined_container_color() -> Color {
241 theme().surface
242 }
243 pub fn outlined_border_color() -> Color {
244 theme().outline_variant
245 }
246 pub fn filled_content_color() -> Color {
247 theme().on_surface
248 }
249 pub fn elevated_content_color() -> Color {
250 theme().on_surface
251 }
252 pub fn outlined_content_color() -> Color {
253 theme().on_surface
254 }
255 pub fn disabled_container_color() -> Color {
256 theme().on_surface.with_alpha_f32(0.04)
257 }
258 pub fn disabled_content_color() -> Color {
259 theme().on_surface.with_alpha_f32(0.38)
260 }
261 pub const SHAPE_RADIUS: f32 = 12.0;
262 pub const ELEVATION: f32 = 0.0;
263}
264
265pub struct DialogDefaults;
267
268impl DialogDefaults {
269 pub fn container_color() -> Color {
270 theme().surface_container_high
271 }
272 pub const SHAPE_RADIUS: f32 = 28.0;
273 pub const MIN_WIDTH: f32 = 280.0;
274 pub const MAX_WIDTH: f32 = 560.0;
275 pub const HORIZONTAL_PADDING: f32 = 24.0;
276 pub const PREFERRED_WIDTH_COMPACT: f32 = 320.0; pub const PREFERRED_WIDTH_MEDIUM: f32 = 440.0; pub const PREFERRED_WIDTH_EXPANDED: f32 = 580.0; }
281
282pub struct IconButtonDefaults;
284
285impl IconButtonDefaults {
286 pub const CONTAINER_SIZE: f32 = 40.0;
287 pub const FILLED_CONTAINER_SIZE: f32 = 40.0;
288 pub const MIN_INTERACTIVE_SIZE: f32 = 48.0;
289 pub const STATE_LAYER_RADIUS: f32 = 20.0;
290
291 pub fn content_color() -> Color {
292 repose_core::content_color()
293 }
294
295 pub fn disabled_content_color() -> Color {
296 Self::content_color().with_alpha_f32(0.38)
298 }
299
300 pub fn filled_container_color() -> Color {
301 theme().primary
302 }
303
304 pub fn filled_content_color() -> Color {
305 repose_core::content_color_for(Self::filled_container_color())
306 }
307
308 pub fn filled_tonal_container_color() -> Color {
309 theme().secondary_container
310 }
311
312 pub fn filled_tonal_content_color() -> Color {
313 repose_core::content_color_for(Self::filled_tonal_container_color())
314 }
315
316 pub fn colors() -> super::IconButtonColors {
317 let th = theme();
318 super::IconButtonColors {
319 container_color: Color::TRANSPARENT,
320 content_color: Self::content_color(),
321 disabled_container_color: Color::TRANSPARENT,
322 disabled_content_color: th.on_surface.with_alpha_f32(0.38),
323 }
324 }
325
326 pub fn filled_colors() -> super::IconButtonColors {
328 let th = theme();
329 let container = Self::filled_container_color();
330 super::IconButtonColors {
331 container_color: container,
332 content_color: Self::filled_content_color(),
333 disabled_container_color: th
334 .on_surface
335 .with_alpha_f32(0.12)
336 .composite_over(th.surface),
337 disabled_content_color: th.on_surface.with_alpha_f32(0.38),
338 }
339 }
340
341 pub fn filled_tonal_colors() -> super::IconButtonColors {
343 let th = theme();
344 super::IconButtonColors {
345 container_color: Self::filled_tonal_container_color(),
346 content_color: Self::filled_tonal_content_color(),
347 disabled_container_color: th
348 .on_surface
349 .with_alpha_f32(0.12)
350 .composite_over(th.surface),
351 disabled_content_color: th.on_surface.with_alpha_f32(0.38),
352 }
353 }
354
355 pub fn outlined_colors() -> super::IconButtonColors {
357 Self::colors()
358 }
359
360 pub fn state_colors_default() -> StateColors {
361 let th = theme();
362 StateColors {
363 default: Color::TRANSPARENT,
364 hovered: Color::TRANSPARENT,
365 focused: Color::TRANSPARENT,
366 pressed: Color::TRANSPARENT,
367 dragged: th.on_surface.with_alpha_f32(0.12),
368 disabled: Color::TRANSPARENT,
369 }
370 }
371}
372
373pub struct CheckboxDefaults;
375
376impl CheckboxDefaults {
377 pub const TOUCH_TARGET_SIZE: f32 = 40.0;
378 pub const BOX_SIZE: f32 = 18.0;
379 pub const STROKE_WIDTH: f32 = 2.0;
380 pub const CORNER_RADIUS: f32 = 2.0;
381 pub const CHECK_ICON_SIZE: f32 = 14.0;
382 pub fn checked_color() -> Color {
383 theme().primary
384 }
385 pub fn unchecked_color() -> Color {
386 theme().on_surface_variant
387 }
388 pub fn checkmark_color() -> Color {
389 theme().on_primary
390 }
391 pub fn disabled_checked_box_color() -> Color {
392 theme().on_surface.with_alpha_f32(0.38)
393 }
394 pub fn disabled_checkmark_color() -> Color {
395 theme().surface
396 }
397 pub fn disabled_unchecked_border_color() -> Color {
398 theme().on_surface.with_alpha_f32(0.38)
399 }
400 pub fn state_colors_default() -> StateColors {
401 let th = theme();
402 StateColors {
403 default: Color::TRANSPARENT,
404 hovered: Color::TRANSPARENT,
405 focused: Color::TRANSPARENT,
406 pressed: Color::TRANSPARENT,
407 dragged: th.on_surface.with_alpha_f32(0.12),
408 disabled: Color::TRANSPARENT,
409 }
410 }
411}
412
413pub struct RadioButtonDefaults;
415
416impl RadioButtonDefaults {
417 pub const TOUCH_TARGET_SIZE: f32 = 40.0;
418 pub const OUTER_RADIUS: f32 = 10.0;
419 pub const DOT_RADIUS: f32 = 5.0;
420 pub const STROKE_WIDTH: f32 = 2.0;
421 pub fn selected_color() -> Color {
422 theme().primary
423 }
424 pub fn unselected_color() -> Color {
425 theme().on_surface_variant
426 }
427 pub fn disabled_selected_color() -> Color {
428 theme().on_surface.with_alpha_f32(0.38)
429 }
430 pub fn disabled_unselected_color() -> Color {
431 theme().on_surface.with_alpha_f32(0.38)
432 }
433 pub fn state_colors_default() -> StateColors {
434 let th = theme();
435 StateColors {
436 default: Color::TRANSPARENT,
437 hovered: Color::TRANSPARENT,
438 focused: Color::TRANSPARENT,
439 pressed: Color::TRANSPARENT,
440 dragged: th.on_surface.with_alpha_f32(0.12),
441 disabled: Color::TRANSPARENT,
442 }
443 }
444}
445
446pub struct SwitchDefaults;
448
449impl SwitchDefaults {
450 pub const TRACK_WIDTH: f32 = 52.0;
451 pub const TRACK_HEIGHT: f32 = 32.0;
452 pub const THUMB_CHECKED_SIZE: f32 = 24.0;
453 pub const THUMB_UNCHECKED_SIZE: f32 = 16.0;
454 pub fn checked_track_color() -> Color {
455 theme().primary
456 }
457 pub fn unchecked_track_color() -> Color {
458 theme().surface_container_highest
459 }
460 pub fn checked_thumb_color() -> Color {
461 theme().on_primary
462 }
463 pub fn unchecked_thumb_color() -> Color {
464 theme().outline
465 }
466 pub fn checked_icon_color() -> Color {
467 theme().on_primary
468 }
469 pub fn unchecked_icon_color() -> Color {
470 theme().outline
471 }
472 pub fn unchecked_border_color() -> Color {
473 theme().outline
474 }
475 pub fn disabled_checked_thumb_color() -> Color {
476 theme().surface
477 }
478 pub fn disabled_checked_track_color() -> Color {
479 theme().on_surface.with_alpha_f32(0.12)
480 }
481 pub fn disabled_checked_icon_color() -> Color {
482 theme().on_surface.with_alpha_f32(0.38)
483 }
484 pub fn disabled_unchecked_thumb_color() -> Color {
485 theme().on_surface.with_alpha_f32(0.38)
486 }
487 pub fn disabled_unchecked_track_color() -> Color {
488 theme().surface_container_highest.with_alpha_f32(0.12)
489 }
490 pub fn disabled_unchecked_border_color() -> Color {
491 theme().on_surface.with_alpha_f32(0.12)
492 }
493 pub fn disabled_unchecked_icon_color() -> Color {
494 theme().surface_container_highest.with_alpha_f32(0.38)
495 }
496 pub fn state_colors_default() -> StateColors {
497 let th = theme();
498 StateColors {
499 default: Color::TRANSPARENT,
500 hovered: Color::TRANSPARENT,
501 focused: Color::TRANSPARENT,
502 pressed: Color::TRANSPARENT,
503 dragged: th.on_surface.with_alpha_f32(0.12),
504 disabled: Color::TRANSPARENT,
505 }
506 }
507}
508
509pub struct SliderDefaults;
511
512impl SliderDefaults {
513 pub const TRACK_HEIGHT: f32 = 16.0;
514 pub const THUMB_WIDTH: f32 = 4.0;
515 pub const THUMB_HEIGHT: f32 = 44.0;
516 pub const STATE_LAYER_SIZE: f32 = 40.0;
518 pub const THUMB_SIZE: f32 = 20.0;
520 pub fn active_track_color() -> Color {
521 theme().primary
522 }
523 pub fn inactive_track_color() -> Color {
524 theme().secondary_container
525 }
526 pub fn thumb_color() -> Color {
527 theme().primary
528 }
529 pub fn active_tick_color() -> Color {
530 theme().secondary_container
531 }
532 pub fn inactive_tick_color() -> Color {
533 theme().primary
534 }
535 pub fn disabled_thumb_color() -> Color {
536 theme().on_surface.with_alpha_f32(0.38)
537 }
538 pub fn disabled_active_track_color() -> Color {
539 theme().on_surface.with_alpha_f32(0.38)
540 }
541 pub fn disabled_inactive_track_color() -> Color {
542 theme().on_surface.with_alpha_f32(0.12)
543 }
544 pub fn disabled_active_tick_color() -> Color {
545 theme().on_surface.with_alpha_f32(0.12)
546 }
547 pub fn disabled_inactive_tick_color() -> Color {
548 theme().on_surface.with_alpha_f32(0.38)
549 }
550 pub fn state_colors_default() -> StateColors {
551 let th = theme();
552 let c = th.primary;
553 StateColors {
554 default: Color::TRANSPARENT,
555 hovered: c.with_alpha_f32(0.08),
556 focused: c.with_alpha_f32(0.12),
557 pressed: c.with_alpha_f32(0.10),
558 dragged: c.with_alpha_f32(0.10),
559 disabled: Color::TRANSPARENT,
560 }
561 }
562}
563
564pub struct DividerDefaults;
566
567impl DividerDefaults {
568 pub const THICKNESS: f32 = 1.0;
569 pub fn color() -> Color {
570 theme().outline_variant
571 }
572}
573
574pub struct BadgeDefaults;
576
577impl BadgeDefaults {
578 pub const DOT_SIZE: f32 = 6.0;
579 pub const LABEL_MIN_WIDTH: f32 = 16.0;
580 pub const LABEL_HEIGHT: f32 = 16.0;
581 pub const DOT_OFFSET_X: f32 = 6.0;
582 pub const DOT_OFFSET_Y: f32 = 6.0;
583 pub const CONTENT_OFFSET_X: f32 = 12.0;
584 pub const CONTENT_OFFSET_Y: f32 = 14.0;
585 pub fn container_color() -> Color {
586 theme().error
587 }
588 pub fn content_color() -> Color {
589 theme().on_error
590 }
591}
592
593pub struct ListItemDefaults;
595
596impl ListItemDefaults {
597 pub const ONE_LINE_HEIGHT: f32 = 56.0;
598 pub const TWO_LINE_HEIGHT: f32 = 72.0;
599 pub const THREE_LINE_HEIGHT: f32 = 88.0;
600 pub const HORIZONTAL_PADDING: f32 = 16.0;
601 pub const TRAILING_PADDING: f32 = 24.0;
602 pub fn headline_color() -> Color {
603 theme().on_surface
604 }
605 pub fn supporting_color() -> Color {
606 theme().on_surface_variant
607 }
608 pub fn overline_color() -> Color {
609 theme().on_surface_variant
610 }
611 pub fn leading_icon_color() -> Color {
612 theme().on_surface_variant
613 }
614 pub fn trailing_icon_color() -> Color {
615 theme().on_surface_variant
616 }
617 pub fn disabled_container_color() -> Color {
619 theme().on_surface.with_alpha_f32(0.04)
620 }
621 pub fn disabled_headline_color() -> Color {
622 theme().on_surface.with_alpha_f32(0.38)
623 }
624 pub fn disabled_supporting_color() -> Color {
625 theme().on_surface.with_alpha_f32(0.38)
626 }
627 pub fn disabled_overline_color() -> Color {
628 theme().on_surface.with_alpha_f32(0.38)
629 }
630 pub fn disabled_leading_icon_color() -> Color {
631 theme().on_surface.with_alpha_f32(0.38)
632 }
633 pub fn disabled_trailing_icon_color() -> Color {
634 theme().on_surface.with_alpha_f32(0.38)
635 }
636 pub fn selected_container_color() -> Color {
638 theme().surface_container_high
639 }
640 pub fn selected_headline_color() -> Color {
641 theme().on_surface
642 }
643 pub fn selected_supporting_color() -> Color {
644 theme().on_surface_variant
645 }
646 pub fn selected_overline_color() -> Color {
647 theme().on_surface_variant
648 }
649 pub fn selected_leading_icon_color() -> Color {
650 theme().on_surface_variant
651 }
652 pub fn selected_trailing_icon_color() -> Color {
653 theme().on_surface_variant
654 }
655 pub fn dragged_container_color() -> Color {
657 theme().surface_container_high
658 }
659 pub fn dragged_headline_color() -> Color {
660 theme().on_surface
661 }
662 pub fn dragged_supporting_color() -> Color {
663 theme().on_surface_variant
664 }
665 pub fn dragged_overline_color() -> Color {
666 theme().on_surface_variant
667 }
668 pub fn dragged_leading_icon_color() -> Color {
669 theme().on_surface_variant
670 }
671 pub fn dragged_trailing_icon_color() -> Color {
672 theme().on_surface_variant
673 }
674 pub fn state_colors_default() -> StateColors {
675 let th = theme();
676 StateColors {
677 default: Color::TRANSPARENT,
678 hovered: Color::TRANSPARENT,
679 focused: Color::TRANSPARENT,
680 pressed: Color::TRANSPARENT,
681 dragged: th.on_surface.with_alpha_f32(0.12),
682 disabled: Color::TRANSPARENT,
683 }
684 }
685}
686
687pub struct TopAppBarDefaults;
689
690impl TopAppBarDefaults {
691 pub const HEIGHT: f32 = 64.0;
692 pub fn container_color() -> Color {
693 theme().surface
694 }
695 pub fn scrolled_container_color() -> Color {
696 theme().surface_container
697 }
698 pub fn title_content_color() -> Color {
699 theme().on_surface
700 }
701 pub fn subtitle_content_color() -> Color {
702 theme().on_surface_variant
703 }
704 pub fn navigation_icon_content_color() -> Color {
705 theme().on_surface
706 }
707 pub fn action_icon_content_color() -> Color {
708 theme().on_surface_variant
709 }
710}
711
712pub struct TabDefaults;
714
715impl TabDefaults {
716 pub const HEIGHT: f32 = 48.0;
717 pub const INDICATOR_HEIGHT: f32 = 3.0;
718 pub const INDICATOR_CORNER: f32 = 1.5;
719 pub fn container_color() -> Color {
720 theme().surface
721 }
722 pub fn selected_content_color() -> Color {
723 theme().primary
724 }
725 pub fn unselected_content_color() -> Color {
726 theme().on_surface_variant
727 }
728 pub fn indicator_color() -> Color {
729 theme().primary
730 }
731}
732
733pub struct NavigationBarDefaults;
735
736impl NavigationBarDefaults {
737 pub const HEIGHT: f32 = 80.0;
738 pub const TONAL_ELEVATION: f32 = 0.0;
739 pub const ITEM_ACTIVE_INDICATOR_OPACITY: f32 = 1.0;
740 pub const ITEM_SPACING: f32 = 8.0;
741 pub const ACTIVE_INDICATOR_WIDTH: f32 = 56.0;
742 pub const ACTIVE_INDICATOR_HEIGHT: f32 = 32.0;
743 pub fn container_color() -> Color {
744 theme().surface_container
745 }
746 pub fn content_color() -> Color {
747 theme().on_surface
748 }
749 pub fn selected_icon_color() -> Color {
750 theme().on_secondary_container
751 }
752 pub fn selected_text_color() -> Color {
753 theme().secondary
754 }
755 pub fn unselected_icon_color() -> Color {
756 theme().on_surface_variant
757 }
758 pub fn unselected_text_color() -> Color {
759 theme().on_surface_variant
760 }
761 pub fn indicator_color() -> Color {
762 theme().secondary_container
763 }
764 pub const INDICATOR_RADIUS: f32 = 16.0;
765}
766
767pub struct NavigationRailDefaults;
769
770impl NavigationRailDefaults {
771 pub const WIDTH: f32 = 80.0;
772 pub const ITEM_RADIUS: f32 = 16.0;
773 pub const ITEM_MIN_HEIGHT: f32 = 56.0;
774 pub const ITEM_ACTIVE_INDICATOR_OPACITY: f32 = 1.0;
775 pub const ITEM_SPACING: f32 = 4.0;
776 pub const ACTIVE_INDICATOR_WIDTH: f32 = 56.0;
777 pub const ACTIVE_INDICATOR_HEIGHT: f32 = 32.0;
778 pub fn container_color() -> Color {
779 theme().surface
780 }
781 pub fn selected_icon_color() -> Color {
782 theme().on_secondary_container
783 }
784 pub fn selected_text_color() -> Color {
785 theme().secondary
786 }
787 pub fn unselected_icon_color() -> Color {
788 theme().on_surface_variant
789 }
790 pub fn unselected_text_color() -> Color {
791 theme().on_surface_variant
792 }
793 pub fn indicator_color() -> Color {
794 theme().secondary_container
795 }
796}
797
798pub struct SegmentedButtonDefaults;
800
801impl SegmentedButtonDefaults {
802 pub const HEIGHT: f32 = 40.0;
803 pub const SHAPE_RADIUS: f32 = 20.0;
804 pub const CONTENT_PADDING: PaddingValues = PaddingValues {
805 left: 12.0,
806 right: 12.0,
807 top: 0.0,
808 bottom: 0.0,
809 };
810 pub fn border_color() -> Color {
811 theme().outline
812 }
813 pub fn selected_container_color() -> Color {
814 theme().secondary_container
815 }
816 pub fn selected_content_color() -> Color {
817 theme().on_secondary_container
818 }
819 pub fn unselected_content_color() -> Color {
820 theme().on_surface
821 }
822 pub fn state_colors_default() -> StateColors {
823 let th = theme();
824 StateColors {
825 default: Color::TRANSPARENT,
826 hovered: Color::TRANSPARENT,
827 focused: Color::TRANSPARENT,
828 pressed: Color::TRANSPARENT,
829 dragged: th.on_surface.with_alpha_f32(0.12),
830 disabled: Color::TRANSPARENT,
831 }
832 }
833}
834
835pub struct FABDefaults;
837
838impl FABDefaults {
839 pub const SMALL_SIZE: f32 = 40.0;
840 pub const SMALL_SHAPE_RADIUS: f32 = 12.0;
841 pub const SIZE: f32 = 56.0;
842 pub const LARGE_SIZE: f32 = 96.0;
843 pub const SHAPE_RADIUS: f32 = 28.0;
844 pub const LARGE_SHAPE_RADIUS: f32 = 28.0;
845 pub fn container_color() -> Color {
846 theme().primary_container
847 }
848 pub fn content_color() -> Color {
849 repose_core::content_color_for(Self::container_color())
850 }
851 pub fn state_elevation() -> StateElevation {
852 StateElevation {
853 default: theme().elevation.level3,
854 hovered: theme().elevation.level4,
855 focused: theme().elevation.level3,
856 pressed: theme().elevation.level5,
857 dragged: theme().elevation.level5,
858 disabled: 0.0,
859 }
860 }
861}
862
863pub struct ChipDefaults;
865
866impl ChipDefaults {
867 pub const HEIGHT: f32 = 32.0;
868 pub const HORIZONTAL_PADDING: f32 = 16.0;
869 pub const SHAPE_RADIUS: f32 = 8.0;
870 pub const BORDER_WIDTH: f32 = 1.0;
871
872 pub fn container_color() -> Color {
874 Color::TRANSPARENT
875 }
876 pub fn label_color() -> Color {
877 theme().on_surface_variant
878 }
879 pub fn leading_icon_color() -> Color {
880 theme().primary
881 }
882 pub fn trailing_icon_color() -> Color {
883 theme().primary
884 }
885
886 pub fn disabled_container_color() -> Color {
888 Color::TRANSPARENT
889 }
890 pub fn disabled_label_color() -> Color {
891 theme().on_surface.with_alpha_f32(0.38)
892 }
893 pub fn disabled_leading_icon_color() -> Color {
894 theme().on_surface.with_alpha_f32(0.38)
895 }
896 pub fn disabled_trailing_icon_color() -> Color {
897 theme().on_surface.with_alpha_f32(0.38)
898 }
899
900 pub fn selected_container_color() -> Color {
902 theme().secondary_container
903 }
904 pub fn selected_label_color() -> Color {
905 theme().on_secondary_container
906 }
907 pub fn selected_leading_icon_color() -> Color {
908 theme().primary
909 }
910 pub fn selected_trailing_icon_color() -> Color {
911 theme().on_secondary_container
912 }
913
914 pub fn disabled_selected_container_color() -> Color {
916 theme()
917 .on_surface
918 .with_alpha_f32(0.12)
919 .composite_over(theme().secondary_container)
920 }
921
922 pub fn border_color() -> Color {
924 theme().outline_variant
925 }
926 pub fn selected_border_color() -> Color {
927 Color::TRANSPARENT
928 }
929 pub fn disabled_border_color() -> Color {
930 theme().on_surface.with_alpha_f32(0.12)
931 }
932 pub fn disabled_selected_border_color() -> Color {
933 Color::TRANSPARENT
934 }
935
936 pub fn elevation_default() -> f32 {
938 0.0
939 }
940 pub fn elevation_hovered() -> f32 {
941 0.0
942 }
943 pub fn elevation_focused() -> f32 {
944 0.0
945 }
946 pub fn elevation_pressed() -> f32 {
947 0.0
948 }
949 pub fn elevation_dragged() -> f32 {
950 0.0
951 }
952 pub fn elevation_disabled() -> f32 {
953 0.0
954 }
955
956 pub fn elevated_elevation_default() -> f32 {
958 theme().elevation.level1
959 }
960 pub fn elevated_elevation_hovered() -> f32 {
961 theme().elevation.level2
962 }
963 pub fn elevated_elevation_focused() -> f32 {
964 theme().elevation.level1
965 }
966 pub fn elevated_elevation_pressed() -> f32 {
967 theme().elevation.level1
968 }
969 pub fn elevated_elevation_dragged() -> f32 {
970 theme().elevation.level4
972 }
973 pub fn elevated_elevation_disabled() -> f32 {
974 0.0
975 }
976
977 pub fn elevated_container_color() -> Color {
979 theme().surface_container_low
980 }
981 pub fn elevated_selected_container_color() -> Color {
982 theme().secondary_container
983 }
984 pub fn disabled_elevated_container_color() -> Color {
985 theme()
986 .on_surface
987 .with_alpha_f32(0.12)
988 .composite_over(theme().surface_container_low)
989 }
990}
991
992pub struct ScaffoldDefaults;
994
995impl ScaffoldDefaults {
996 pub fn container_color() -> Color {
997 theme().background
998 }
999 pub fn content_color() -> Color {
1000 theme().on_background
1001 }
1002 pub const TOP_BAR_HEIGHT: f32 = 64.0;
1003 pub const BOTTOM_BAR_HEIGHT: f32 = 80.0;
1004 pub const FAB_MARGIN: f32 = 16.0;
1005}
1006
1007pub struct NavigationDrawerDefaults;
1009
1010impl NavigationDrawerDefaults {
1011 pub const WIDTH: f32 = 300.0;
1012 pub const TONAL_ELEVATION: f32 = 0.0;
1013 pub fn container_color() -> Color {
1014 theme().surface_container_low
1015 }
1016 pub fn content_color() -> Color {
1017 theme().on_surface_variant
1018 }
1019 pub fn scrim_color() -> Color {
1020 theme().scrim.with_alpha(82)
1021 }
1022 pub const SHAPE_RADIUS: f32 = 16.0;
1023}
1024
1025pub struct BottomSheetDefaults;
1027
1028impl BottomSheetDefaults {
1029 pub const TONAL_ELEVATION: f32 = 0.0;
1030 pub fn container_color() -> Color {
1031 theme().surface_container_low
1032 }
1033 pub fn content_color() -> Color {
1034 theme().on_surface
1035 }
1036 pub fn drag_handle_color() -> Color {
1037 theme().on_surface_variant
1038 }
1039 pub fn scrim_color() -> Color {
1040 theme().scrim.with_alpha(85)
1041 }
1042 pub const DRAG_HANDLE_WIDTH: f32 = 32.0;
1043 pub const DRAG_HANDLE_HEIGHT: f32 = 4.0;
1044 pub const SHAPE_RADIUS: f32 = 16.0;
1045 pub const PEEK_HEIGHT: f32 = 56.0;
1046 pub const MAX_WIDTH: f32 = 640.0;
1047}
1048
1049pub struct SearchBarDefaults;
1051
1052impl SearchBarDefaults {
1053 pub const HEIGHT: f32 = 56.0;
1054 pub const EXPANDED_WIDTH: f32 = 360.0;
1055 pub const COLLAPSED_WIDTH: f32 = 240.0;
1056 pub const DOCKED_HEIGHT: f32 = 400.0;
1057 pub const TONAL_ELEVATION: f32 = 0.0;
1058 pub const SHADOW_ELEVATION: f32 = 0.0;
1059 pub const SHAPE_RADIUS: f32 = 28.0; pub const ACTIVE_SHAPE_RADIUS: f32 = 28.0;
1061 pub const DOCKED_SHAPE_RADIUS: f32 = 28.0;
1062 pub const DROPDOWN_SHAPE_RADIUS: f32 = 12.0;
1063 pub const DROPDOWN_GAP_SIZE: f32 = 2.0;
1064 pub const MIN_WIDTH: f32 = Self::COLLAPSED_WIDTH;
1065 pub const MAX_WIDTH: f32 = 720.0;
1066 pub const VERTICAL_PADDING: f32 = 8.0;
1067
1068 pub const CONTENT_PADDING: PaddingValues = PaddingValues {
1069 left: 16.0,
1070 right: 16.0,
1071 top: 0.0,
1072 bottom: 0.0,
1073 };
1074
1075 pub fn container_color() -> Color {
1076 theme().surface_container
1077 }
1078 pub fn active_container_color() -> Color {
1079 theme().surface_container_high
1080 }
1081 pub fn content_color() -> Color {
1082 theme().on_surface
1083 }
1084 pub fn placeholder_color() -> Color {
1085 theme().on_surface_variant
1086 }
1087 pub fn divider_color() -> Color {
1088 theme().outline_variant
1089 }
1090 pub fn scrim_color() -> Color {
1091 theme().scrim.with_alpha(85)
1092 }
1093 pub fn scrolled_container_color() -> Color {
1094 theme().surface_container_highest
1095 }
1096 pub fn app_bar_container_color() -> Color {
1097 theme().surface
1098 }
1099 pub fn scrolled_app_bar_container_color() -> Color {
1100 theme().surface_container
1101 }
1102 pub fn navigation_icon_content_color() -> Color {
1103 theme().on_surface
1104 }
1105 pub fn action_icon_content_color() -> Color {
1106 theme().on_surface_variant
1107 }
1108 pub fn dropdown_scrim_color() -> Color {
1109 Color::TRANSPARENT
1110 }
1111}
1112
1113pub struct DropdownMenuDefaults;
1115
1116impl DropdownMenuDefaults {
1117 pub const MIN_WIDTH: f32 = 112.0;
1118 pub const ITEM_HEIGHT: f32 = 48.0;
1119 pub const VERTICAL_MARGIN: f32 = 48.0;
1120 pub const HORIZONTAL_MARGIN: f32 = 8.0;
1121 pub const MAX_WIDTH: f32 = 280.0;
1122 pub fn container_color() -> Color {
1123 theme().surface_container
1124 }
1125 pub fn item_text_color() -> Color {
1126 theme().on_surface
1127 }
1128 pub fn disabled_item_text_color() -> Color {
1129 theme().on_surface.with_alpha_f32(0.38)
1130 }
1131 pub fn divider_color() -> Color {
1132 theme().outline_variant
1133 }
1134}
1135
1136pub struct TooltipDefaults;
1138
1139impl TooltipDefaults {
1140 pub const OFFSET_Y: f32 = -28.0;
1141 pub const HORIZONTAL_PADDING: f32 = 8.0;
1142 pub const VERTICAL_PADDING: f32 = 4.0;
1143 pub const MAX_WIDTH: f32 = 200.0;
1144 pub fn container_color() -> Color {
1145 theme().inverse_surface
1146 }
1147 pub fn content_color() -> Color {
1148 theme().inverse_on_surface
1149 }
1150}
1151
1152pub struct PullToRefreshDefaults;
1154
1155impl PullToRefreshDefaults {
1156 pub const THRESHOLD: f32 = 64.0;
1157 pub fn indicator_color() -> Color {
1158 theme().primary
1159 }
1160 pub fn container_color() -> Color {
1161 Color::TRANSPARENT
1162 }
1163}
1164
1165pub struct AlertDialogDefaults;
1167
1168impl AlertDialogDefaults {
1169 pub const MIN_WIDTH: f32 = 280.0;
1170 pub const MAX_WIDTH: f32 = 560.0;
1171 pub const HORIZONTAL_PADDING: f32 = 24.0;
1172 pub fn scrim_color() -> Color {
1173 theme().scrim.with_alpha(82)
1174 }
1175}
1176
1177pub struct OutlinedTextFieldDefaults;
1179
1180impl OutlinedTextFieldDefaults {
1181 pub const MIN_HEIGHT: f32 = 56.0;
1182 pub const MIN_WIDTH: f32 = 280.0;
1183 pub const UNFOCUSED_BORDER_THICKNESS: f32 = 1.0;
1184 pub const FOCUSED_BORDER_THICKNESS: f32 = 2.0;
1185 pub const TEXT_FIELD_PADDING: f32 = 16.0;
1186 pub const VERTICAL_PADDING_WITH_LABEL: f32 = 8.0;
1187
1188 pub fn label_color() -> Color {
1189 theme().on_surface_variant
1190 }
1191 pub fn focused_label_color() -> Color {
1192 theme().primary
1193 }
1194 pub fn error_label_color() -> Color {
1195 theme().error
1196 }
1197 pub fn input_color() -> Color {
1198 theme().on_surface
1199 }
1200 pub fn disabled_input_color() -> Color {
1201 theme().on_surface.with_alpha_f32(0.38)
1202 }
1203 pub fn supporting_color() -> Color {
1204 theme().on_surface_variant
1205 }
1206 pub fn placeholder_color() -> Color {
1207 theme().on_surface_variant
1208 }
1209 pub fn leading_icon_color() -> Color {
1210 theme().on_surface_variant
1211 }
1212 pub fn trailing_icon_color() -> Color {
1213 theme().on_surface_variant
1214 }
1215 pub fn unfocused_border_color() -> Color {
1216 theme().outline
1217 }
1218 pub fn focused_border_color() -> Color {
1219 theme().primary
1220 }
1221 pub fn error_border_color() -> Color {
1222 theme().error
1223 }
1224 pub fn cursor_color() -> Color {
1225 theme().primary
1226 }
1227 pub fn container_color() -> Color {
1228 Color::TRANSPARENT
1229 }
1230}
1231
1232pub struct DatePickerDefaults;
1234
1235impl DatePickerDefaults {
1236 pub const CONTAINER_WIDTH: f32 = 360.0;
1237 pub const CONTAINER_HEIGHT: f32 = 568.0;
1238 pub const HEADER_CONTAINER_HEIGHT: f32 = 120.0;
1239 pub const DATE_CELL_SIZE: f32 = 40.0;
1240 pub const YEAR_CELL_HEIGHT: f32 = 36.0;
1241 pub const YEAR_CELL_WIDTH: f32 = 72.0;
1242 pub const TODAY_BORDER_WIDTH: f32 = 1.0;
1243 pub const HORIZONTAL_PADDING: f32 = 12.0;
1244
1245 pub fn container_color() -> Color {
1246 theme().surface_container_high
1247 }
1248 pub fn header_color() -> Color {
1249 theme().on_surface_variant
1250 }
1251 pub fn weekday_color() -> Color {
1252 theme().on_surface
1253 }
1254 pub fn day_color() -> Color {
1255 theme().on_surface
1256 }
1257 pub fn selected_day_color() -> Color {
1258 theme().on_primary
1259 }
1260 pub fn selected_day_container_color() -> Color {
1261 theme().primary
1262 }
1263 pub fn today_content_color() -> Color {
1264 theme().primary
1265 }
1266 pub fn today_border_color() -> Color {
1267 theme().primary
1268 }
1269 pub fn year_selected_container_color() -> Color {
1270 theme().primary
1271 }
1272 pub fn year_selected_content_color() -> Color {
1273 theme().on_primary
1274 }
1275 pub fn year_unselected_content_color() -> Color {
1276 theme().on_surface_variant
1277 }
1278}
1279
1280pub struct TimePickerDefaults;
1282
1283impl TimePickerDefaults {
1284 pub const CLOCK_DIAL_CONTAINER_SIZE: f32 = 256.0;
1285 pub const CLOCK_DIAL_MIN_CONTAINER_SIZE: f32 = 200.0;
1286 pub const PERIOD_SELECTOR_HORIZONTAL_WIDTH: f32 = 216.0;
1287 pub const PERIOD_SELECTOR_HORIZONTAL_HEIGHT: f32 = 38.0;
1288 pub const PERIOD_SELECTOR_VERTICAL_WIDTH: f32 = 52.0;
1289 pub const PERIOD_SELECTOR_VERTICAL_HEIGHT: f32 = 80.0;
1290 pub const TIME_SELECTOR_CONTAINER_WIDTH: f32 = 96.0;
1291 pub const TIME_SELECTOR_CONTAINER_HEIGHT: f32 = 80.0;
1292 pub const TIME_SELECTOR_24H_WIDTH: f32 = 114.0;
1293 pub const MAX_HEIGHT: f32 = 384.0;
1294
1295 pub fn clock_dial_color() -> Color {
1296 theme().surface_container_highest
1297 }
1298 pub fn clock_dial_selected_content_color() -> Color {
1299 theme().on_primary
1300 }
1301 pub fn clock_dial_unselected_content_color() -> Color {
1302 theme().on_surface
1303 }
1304 pub fn selector_color() -> Color {
1305 theme().primary
1306 }
1307 pub fn container_color() -> Color {
1308 theme().surface_container_high
1309 }
1310 pub fn period_selector_selected_container_color() -> Color {
1311 theme().tertiary_container
1312 }
1313 pub fn period_selector_unselected_container_color() -> Color {
1314 Color::TRANSPARENT
1315 }
1316 pub fn period_selector_selected_content_color() -> Color {
1317 theme().on_tertiary_container
1318 }
1319 pub fn period_selector_unselected_content_color() -> Color {
1320 theme().on_surface_variant
1321 }
1322 pub fn period_selector_border_color() -> Color {
1323 theme().outline
1324 }
1325 pub fn time_selector_selected_container_color() -> Color {
1326 theme().primary_container
1327 }
1328 pub fn time_selector_selected_content_color() -> Color {
1329 theme().on_primary_container
1330 }
1331 pub fn time_selector_unselected_container_color() -> Color {
1332 theme().surface_container_highest
1333 }
1334 pub fn time_selector_unselected_content_color() -> Color {
1335 theme().on_surface
1336 }
1337 pub fn time_selector_separator_color() -> Color {
1338 theme().on_surface
1339 }
1340}
1341
1342pub struct SwipeToDismissDefaults;
1344
1345impl SwipeToDismissDefaults {
1346 pub const POSITIONAL_THRESHOLD: f32 = 56.0;
1347 pub const DISMISS_THRESHOLD: f32 = 150.0;
1348 pub const DISMISSED_OFFSET: f32 = 300.0;
1349 pub const MAX_WIDTH: f32 = 400.0;
1350}
1351
1352pub struct SplitButtonDefaults;
1356
1357impl SplitButtonDefaults {
1358 pub const SPACING: f32 = 2.0;
1360 pub const LEADING_BUTTON_MIN_WIDTH: f32 = 48.0;
1361
1362 pub const XSMALL_CONTAINER_HEIGHT: f32 = 32.0;
1363 pub const SMALL_CONTAINER_HEIGHT: f32 = 40.0; pub const MEDIUM_CONTAINER_HEIGHT: f32 = 56.0;
1365 pub const LARGE_CONTAINER_HEIGHT: f32 = 64.0; pub const XLARGE_CONTAINER_HEIGHT: f32 = 72.0; pub const OUTER_CORNER_SIZE: f32 = f32::INFINITY; pub const SMALL_INNER_CORNER_SIZE: f32 = 4.0;
1372 pub const XSMALL_INNER_CORNER_SIZE: f32 = 4.0;
1374 pub const MEDIUM_INNER_CORNER_SIZE: f32 = 4.0;
1376 pub const LARGE_INNER_CORNER_SIZE: f32 = 4.0;
1378 pub const XLARGE_INNER_CORNER_SIZE: f32 = 4.0;
1380
1381 pub const XSMALL_INNER_CORNER_SIZE_PRESSED: f32 = 6.0;
1383 pub const SMALL_INNER_CORNER_SIZE_PRESSED: f32 = 6.0;
1384 pub const MEDIUM_INNER_CORNER_SIZE_PRESSED: f32 = 6.0;
1385 pub const LARGE_INNER_CORNER_SIZE_PRESSED: f32 = 6.0;
1386 pub const XLARGE_INNER_CORNER_SIZE_PRESSED: f32 = 6.0;
1387
1388 pub const LEADING_ICON_SIZE: f32 = 18.0;
1390 pub const TRAILING_ICON_SIZE: f32 = 22.0;
1392 pub const XSMALL_TRAILING_ICON_SIZE: f32 = 22.0;
1393 pub const MEDIUM_TRAILING_ICON_SIZE: f32 = 26.0;
1394 pub const LARGE_TRAILING_ICON_SIZE: f32 = 26.0;
1395 pub const XLARGE_TRAILING_ICON_SIZE: f32 = 26.0;
1396
1397 pub fn small_leading_content_padding() -> PaddingValues {
1401 PaddingValues {
1402 left: 16.0,
1403 right: 12.0,
1404 top: 0.0,
1405 bottom: 0.0,
1406 }
1407 }
1408
1409 pub fn small_trailing_content_padding() -> PaddingValues {
1413 PaddingValues {
1414 left: 13.0,
1415 right: 13.0,
1416 top: 0.0,
1417 bottom: 0.0,
1418 }
1419 }
1420
1421 pub fn xsmall_leading_content_padding() -> PaddingValues {
1425 PaddingValues {
1426 left: 12.0,
1427 right: 10.0,
1428 top: 0.0,
1429 bottom: 0.0,
1430 }
1431 }
1432
1433 pub fn xsmall_trailing_content_padding() -> PaddingValues {
1437 PaddingValues {
1438 left: 13.0,
1439 right: 13.0,
1440 top: 0.0,
1441 bottom: 0.0,
1442 }
1443 }
1444
1445 pub fn medium_leading_content_padding() -> PaddingValues {
1449 PaddingValues {
1450 left: 24.0,
1451 right: 24.0,
1452 top: 0.0,
1453 bottom: 0.0,
1454 }
1455 }
1456
1457 pub fn medium_trailing_content_padding() -> PaddingValues {
1461 PaddingValues {
1462 left: 15.0,
1463 right: 15.0,
1464 top: 0.0,
1465 bottom: 0.0,
1466 }
1467 }
1468
1469 pub fn large_leading_content_padding() -> PaddingValues {
1471 PaddingValues {
1472 left: 32.0,
1473 right: 32.0,
1474 top: 0.0,
1475 bottom: 0.0,
1476 }
1477 }
1478
1479 pub fn large_trailing_content_padding() -> PaddingValues {
1481 PaddingValues {
1482 left: 24.0,
1483 right: 24.0,
1484 top: 0.0,
1485 bottom: 0.0,
1486 }
1487 }
1488
1489 pub fn xlarge_leading_content_padding() -> PaddingValues {
1491 PaddingValues {
1492 left: 32.0,
1493 right: 32.0,
1494 top: 0.0,
1495 bottom: 0.0,
1496 }
1497 }
1498
1499 pub fn xlarge_trailing_content_padding() -> PaddingValues {
1501 PaddingValues {
1502 left: 24.0,
1503 right: 24.0,
1504 top: 0.0,
1505 bottom: 0.0,
1506 }
1507 }
1508}
1509
1510pub struct ButtonGroupDefaults;
1515
1516impl ButtonGroupDefaults {
1517 pub const EXPANDED_RATIO: f32 = 0.15;
1519
1520 pub const STANDARD_GAP: f32 = 12.0;
1523
1524 pub const CONNECTED_GAP: f32 = 2.0;
1527
1528 pub const CONTAINER_HEIGHT: f32 = 40.0;
1529
1530 pub const CONNECTED_INNER_CORNER: f32 = 8.0; pub const CONNECTED_PRESSED_INNER_CORNER: f32 = 4.0; pub const CONNECTED_CHECKED_CORNER: f32 = f32::INFINITY;
1538 pub const CONNECTED_OUTER_CORNER: f32 = f32::INFINITY;
1540}
1541
1542pub struct CarouselDefaults;
1544
1545impl CarouselDefaults {
1546 pub const MIN_SMALL_ITEM_SIZE: f32 = 40.0;
1547 pub const MAX_SMALL_ITEM_SIZE: f32 = 56.0;
1548 pub const ANCHOR_SIZE: f32 = 10.0;
1549}