Skip to main content

repose_material/material3/
defaults.rs

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