|
8 | 8 | } |
9 | 9 |
|
10 | 10 | <CascadingValue Value="this" IsFixed="true"> |
11 | | - <MudStack Row="@Vertical" Class="@Class" Style="@Style"> |
12 | | - <div class="mud-stepper-inner-header-extended" style="@GetStepperStyle()"> |
13 | | - <div class="mud-stepper-sub-inner-header-extended" style=@GetStepperSubStyle()> |
14 | | - @{ |
15 | | - MudStepExtended? currentStep = null; |
16 | | - } |
17 | | - @foreach (MudStepExtended step in _steps) |
18 | | - { |
19 | | - if (IsStepActive(step)) |
20 | | - { |
21 | | - currentStep = step; |
| 11 | + <MudStack Class="@Class" Style="@Style"> |
| 12 | + <MudStack Class="mud-stepper-header-content-wrapper-extended" Row="@Vertical"> |
| 13 | + <div class="mud-stepper-inner-header-extended" style="@GetStepperStyle()"> |
| 14 | + <div class="mud-stepper-sub-inner-header-extended" style=@GetStepperSubStyle()> |
| 15 | + @{ |
| 16 | + MudStepExtended? currentStep = null; |
22 | 17 | } |
23 | | - if (step.IsResultStep || step.IsIntroStep || (MobileView == true && IsStepActive(step) == false)) |
| 18 | + @foreach (MudStepExtended step in _steps) |
24 | 19 | { |
25 | | - continue; |
26 | | - } |
| 20 | + if (IsStepActive(step)) |
| 21 | + { |
| 22 | + currentStep = step; |
| 23 | + } |
| 24 | + if (step.IsResultStep || step.IsIntroStep || (MobileView == true && IsStepActive(step) == false)) |
| 25 | + { |
| 26 | + continue; |
| 27 | + } |
27 | 28 |
|
28 | | - <div class="@GetStepClass()" style="@GetStepPercent()"> |
29 | | - <div @onclick="@(Linear ? null : () => GoToStepByReferenceAsync(step))" class="@HeaderClassname"> |
30 | | - @{ |
31 | | - bool active = IsStepActive(step); |
32 | | - } |
33 | | - @if (step.Template != null) |
34 | | - { |
35 | | - @step.Template(step) |
36 | | - } |
37 | | - else |
38 | | - { |
39 | | - @if (step.Status == StepStatus.Completed) |
40 | | - { |
41 | | - <MudBadge BadgeClass="mud-stepper-badge" Overlap="true" Bordered="true" Color="@Color" Icon="@Icons.Material.Filled.Done"> |
42 | | - <MudAvatar Style="@AvatarStylename" Color="@Color" Variant="@Variant" Size="@HeaderSize"> |
43 | | - @if (!string.IsNullOrWhiteSpace(step.Icon)) |
44 | | - { |
45 | | - <MudIcon Class="pa-1" Icon="@step.Icon" Size="@HeaderSize" /> |
46 | | - } |
47 | | - </MudAvatar> |
48 | | - </MudBadge> |
| 29 | + <div class="@GetStepClass()" style="@GetStepPercent()"> |
| 30 | + <div @onclick="@(Linear ? null! : () => GoToStepByReferenceAsync(step))" class="@HeaderClassname"> |
| 31 | + @{ |
| 32 | + bool active = IsStepActive(step); |
49 | 33 | } |
50 | | - else |
| 34 | + @if (step.Template != null) |
51 | 35 | { |
52 | | - Color incompleteColor = (HeaderBadgeView == HeaderBadgeView.GreyOutIncomplete) && !active ? Color.Transparent : @Color; |
53 | | - <MudAvatar Style="@AvatarStylename" Color="@incompleteColor" Variant="@Variant" Size="@HeaderSize"> |
54 | | - <MudIcon Class="pa-1" Icon="@step.Icon" Size="@HeaderSize" /> |
55 | | - </MudAvatar> |
| 36 | + @step.Template(step) |
56 | 37 | } |
57 | | - @if (HeaderTextView == HeaderTextView.All || HeaderTextView == HeaderTextView.OnlyActiveText) |
| 38 | + else |
58 | 39 | { |
59 | | - <MudText Align="Align.Center" Class="mt-n1"> |
60 | | - @if (step.MudStepperExtended.GetActiveIndex() == @step.MudStepperExtended.Steps.IndexOf(@step)) |
61 | | - { |
62 | | - <MudText Color="@(step.Status != StepStatus.Continued ? Color : Color.Inherit)"><b>@step.Title</b></MudText> |
63 | | - } |
64 | | - else if (HeaderTextView != HeaderTextView.OnlyActiveText) |
65 | | - { |
66 | | - <MudText Color="@(step.Status != StepStatus.Continued ? Color : Color.Inherit)">@step.Title</MudText> |
67 | | - } |
68 | | - </MudText> |
| 40 | + @if (step.Status == StepStatus.Completed) |
| 41 | + { |
| 42 | + <MudBadge BadgeClass="mud-stepper-badge" Overlap="true" Bordered="true" Color="@Color" Icon="@Icons.Material.Filled.Done"> |
| 43 | + <MudAvatar Style="@AvatarStylename" Color="@Color" Variant="@Variant" Size="@HeaderSize"> |
| 44 | + @if (!string.IsNullOrWhiteSpace(step.Icon)) |
| 45 | + { |
| 46 | + <MudIcon Class="pa-1" Icon="@step.Icon" Size="@HeaderSize" /> |
| 47 | + } |
| 48 | + </MudAvatar> |
| 49 | + </MudBadge> |
| 50 | + } |
| 51 | + else |
| 52 | + { |
| 53 | + Color incompleteColor = (HeaderBadgeView == HeaderBadgeView.GreyOutIncomplete) && !active ? Color.Transparent : @Color; |
| 54 | + <MudAvatar Style="@AvatarStylename" Color="@incompleteColor" Variant="@Variant" Size="@HeaderSize"> |
| 55 | + <MudIcon Class="pa-1" Icon="@step.Icon" Size="@HeaderSize" /> |
| 56 | + </MudAvatar> |
| 57 | + } |
| 58 | + @if (HeaderTextView == HeaderTextView.All || HeaderTextView == HeaderTextView.OnlyActiveText) |
| 59 | + { |
| 60 | + <MudText Align="Align.Center" Class="mt-n1"> |
| 61 | + @if (step.MudStepperExtended.GetActiveIndex() == @step.MudStepperExtended.Steps.IndexOf(@step)) |
| 62 | + { |
| 63 | + <MudText Color="@(step.Status != StepStatus.Continued ? Color : Color.Inherit)"><b>@step.Title</b></MudText> |
| 64 | + } |
| 65 | + else if (HeaderTextView != HeaderTextView.OnlyActiveText) |
| 66 | + { |
| 67 | + <MudText Color="@(step.Status != StepStatus.Continued ? Color : Color.Inherit)">@step.Title</MudText> |
| 68 | + } |
| 69 | + </MudText> |
| 70 | + } |
69 | 71 | } |
70 | | - } |
| 72 | + </div> |
71 | 73 | </div> |
72 | | - </div> |
| 74 | + } |
| 75 | + </div> |
| 76 | + @if (MobileView == true) |
| 77 | + { |
| 78 | + <MudText Style="@GetMobileStyle()" Typo="Typo.body2" Color="@Color">@GetMobileStepPositionText()</MudText> |
73 | 79 | } |
| 80 | + <MudProgressLinear Vertical="@Vertical" Color="@Color" Value="@ProgressValue" Min="0" Max="100" Style="@GetProgressLinearStyle()" /> |
| 81 | + |
74 | 82 | </div> |
75 | | - @if (MobileView == true) |
| 83 | + @if (Loading) |
76 | 84 | { |
77 | | - <MudText Style="@GetMobileStyle()" Typo="Typo.body2" Color="@Color">@(_steps?.IndexOf(currentStep ?? new()) + 1) / @(_steps?.Count)</MudText> |
| 85 | + <MudProgressLinear Indeterminate="true" Color="@Color" /> |
78 | 86 | } |
79 | | - <MudProgressLinear Vertical="@Vertical" Color="@Color" Value="@ProgressValue" Min="0" Max="100" Style="@GetProgressLinearStyle()" /> |
80 | | - |
81 | | - </div> |
82 | | - @if (Loading) |
83 | | - { |
84 | | - <MudProgressLinear Indeterminate="true" Color="@Color" /> |
85 | | - } |
86 | | - @StaticContent |
87 | | - <div class="@ContentClassname" style="@ContentStyle"> |
88 | | - @ChildContent |
89 | | - </div> |
| 87 | + @StaticContent |
| 88 | + <div class="@ContentClassname" style="@ContentStyle"> |
| 89 | + @ChildContent |
| 90 | + </div> |
| 91 | + </MudStack> |
90 | 92 | @if (ShowActions && (ShowPreviousButton || ShowNextButton || ShowSkipButton)) |
91 | 93 | { |
92 | 94 | <div class="@ActionClassname"> |
|
0 commit comments