|
31 | 31 | <m:MaterialPanel> |
32 | 32 | <m:MaterialPanel addStyleNames="code"> |
33 | 33 | <m:MaterialTitle title="Usage" /> |
34 | | - <demo:PrettyPre marginTop="100" addStyleNames="lang-xml"> |
| 34 | + <demo:PrettyPre addStyleNames="lang-xml"> |
35 | 35 |  <!-- Addin Import --><br/> |
36 | 36 | xmlns:ma="urn:import:gwt.material.design.addins.client"<br/><br/> |
37 | 37 | <!-- Addin Usage --><br/> |
|
64 | 64 | <m:MaterialButton ui:field="btnPrev3" text="Cancel" grid="l4" marginTop="12" type="FLAT" waves="DEFAULT"/> |
65 | 65 | </ma:stepper.MaterialStep> |
66 | 66 | </ma:stepper.MaterialStepper> |
67 | | - <demo:PrettyPre marginTop="100" addStyleNames="lang-xml"> |
| 67 | + <demo:PrettyPre addStyleNames="lang-xml"> |
68 | 68 |  <ma:stepper.MaterialStepper ui:field="stepper"><br/> |
69 | 69 |  <ma:stepper.MaterialStep step="1" title="Name of Step 1" description="Description of Step 1"><br/> |
70 | 70 |   <m:MaterialPanel width="100%" addStyleNames="{style.block}" backgroundColor="GREY_LIGHTEN_2"/><br/> |
|
83 | 83 |  </ma:stepper.MaterialStep><br/> |
84 | 84 | </ma:stepper.MaterialStepper><br/> |
85 | 85 | </demo:PrettyPre> |
86 | | - <demo:PrettyPre marginTop="100" addStyleNames="lang-xml"> |
| 86 | + <demo:PrettyPre addStyleNames="lang-xml"> |
87 | 87 |  @UiHandler({"btnContinue1", "btnContinue2", "btnContinue3"})<br/> |
88 | 88 | void onNextStep(ClickEvent e){<br/> |
89 | 89 |  stepper.nextStep();<br/> |
|
101 | 101 | }<br/> |
102 | 102 | </demo:PrettyPre> |
103 | 103 | </m:MaterialPanel> |
| 104 | + |
| 105 | + <m:MaterialPanel addStyleNames="code"> |
| 106 | + <m:MaterialTitle title="Mobile" description="Open this stepper on a mobile device to test." /> |
| 107 | + <m:MaterialPanel height="600px"> |
| 108 | + <ma:stepper.MaterialStepper ui:field="stepperMobile" detectOrientation="true" shadow="1"> |
| 109 | + <ma:stepper.MaterialStep step="1" title="Name of Step 1" description="Description of Step 1"> |
| 110 | + <m:MaterialPanel width="100%" addStyleNames="{style.block}" backgroundColor="GREY_LIGHTEN_2"/> |
| 111 | + <m:MaterialButton ui:field="btnMobileContinue1" text="Continue to Step 2" grid="l4" marginTop="12" textColor="WHITE" waves="DEFAULT"/> |
| 112 | + <m:MaterialButton ui:field="btnMobilePrev1" text="Cancel" grid="l4" marginTop="12" type="FLAT" waves="DEFAULT"/> |
| 113 | + </ma:stepper.MaterialStep> |
| 114 | + <ma:stepper.MaterialStep step="2" title="Name of Step 2" description="Description of Step 1"> |
| 115 | + <m:MaterialPanel width="100%" addStyleNames="{style.block}" backgroundColor="GREY_LIGHTEN_2"/> |
| 116 | + <m:MaterialButton ui:field="btnMobileContinue2" text="Continue to Step 3" grid="l4" marginTop="12" textColor="WHITE" waves="DEFAULT"/> |
| 117 | + <m:MaterialButton ui:field="btnMobilePrev2" text="Cancel" grid="l4" marginTop="12" type="FLAT" waves="DEFAULT"/> |
| 118 | + </ma:stepper.MaterialStep> |
| 119 | + <ma:stepper.MaterialStep step="3" title="Name of Step 3" description="Description of Step 1"> |
| 120 | + <m:MaterialPanel width="100%" addStyleNames="{style.block}" backgroundColor="GREY_LIGHTEN_2"/> |
| 121 | + <m:MaterialButton ui:field="btnMobileContinue3" text="Finish" grid="l4" marginTop="12" textColor="WHITE" waves="DEFAULT"/> |
| 122 | + <m:MaterialButton ui:field="btnMobilePrev3" text="Cancel" grid="l4" marginTop="12" type="FLAT" waves="DEFAULT"/> |
| 123 | + </ma:stepper.MaterialStep> |
| 124 | + </ma:stepper.MaterialStepper> |
| 125 | + </m:MaterialPanel> |
| 126 | + <demo:PrettyPre addStyleNames="lang-xml"> |
| 127 | + <m:MaterialStepper detectOrientation="true" shadow="1"> |
| 128 | + <!-- Steps here --> |
| 129 | + </m:MaterialStepper> |
| 130 | + </demo:PrettyPre> |
| 131 | + </m:MaterialPanel> |
104 | 132 |
|
105 | 133 | <m:MaterialPanel addStyleNames="code"> |
106 | | - <m:MaterialTitle hideOn="HIDE_ON_SMALL" title="Horizontal Steppers" description="Vertical steppers are designed for narrow screen sizes. They are ideal for mobile." /> |
107 | | - <m:MaterialPanel hideOn="HIDE_ON_SMALL" height="500px" width="100%"> |
108 | | - <ma:stepper.MaterialStepper ui:field="stepperHori" axis="HORIZONTAL" shadow="1"> |
| 134 | + <m:MaterialTitle title="Horizontal Steppers" description="Vertical steppers are designed for narrow screen sizes. They are ideal for mobile." /> |
| 135 | + <m:MaterialPanel height="600px" width="100%"> |
| 136 | + <ma:stepper.MaterialStepper ui:field="stepperHori" axis="HORIZONTAL" detectOrientation="true" shadow="1"> |
109 | 137 | <ma:stepper.MaterialStep step="1" title="Name of Step 1" description="Description of Step 1"> |
110 | 138 | <m:MaterialPanel width="100%" addStyleNames="{style.block}" backgroundColor="GREY_LIGHTEN_2"/> |
111 | 139 | <m:MaterialButton ui:field="btnContinue01" text="Continue to Step 2" grid="l4" marginTop="12" textColor="WHITE" waves="DEFAULT"/> |
|
124 | 152 | </ma:stepper.MaterialStepper> |
125 | 153 | </m:MaterialPanel> |
126 | 154 |
|
127 | | - <demo:PrettyPre marginTop="100" addStyleNames="lang-xml"> |
| 155 | + <demo:PrettyPre addStyleNames="lang-xml"> |
128 | 156 |  <!-- You need to contain your horizontal Stepper into a MaterialPanel to specify the width and height of your stepper --><br/> |
129 | 157 | <m:MaterialPanel height="500px" width="100%"><br/> |
130 | 158 |  <ma:stepper.MaterialStepper axis="HORIZONTAL" shadow="1"><br/> |
|
153 | 181 | <m:MaterialButton ui:field="btnEventPrev3" text="Cancel" grid="l4" marginTop="12" type="FLAT" waves="DEFAULT"/> |
154 | 182 | </ma:stepper.MaterialStep> |
155 | 183 | </ma:stepper.MaterialStepper> |
156 | | - <demo:PrettyPre marginTop="100" addStyleNames="lang-java"> |
| 184 | + <demo:PrettyPre addStyleNames="lang-java"> |
157 | 185 |  @UiHandler("stepper") <br/> |
158 | 186 | void onCompleteEvent(CompleteEvent event) { <br/> |
159 | 187 |  event.getLastStep(); // Get the last step <br/> |
|
226 | 254 | </m:MaterialPanel> |
227 | 255 |
|
228 | 256 | <m:MaterialPanel addStyleNames="code"> |
229 | | - <m:MaterialTitle hideOn="HIDE_ON_SMALL" title="Error on Steppers" description="You can specify a global stepper error by : setError('Error Message'); " /> |
230 | | - <m:MaterialPanel hideOn="HIDE_ON_SMALL" height="500px" width="100%"> |
231 | | - <ma:stepper.MaterialStepper ui:field="stepperError" axis="HORIZONTAL" shadow="1"> |
| 257 | + <m:MaterialTitle title="Error on Steppers" description="You can specify a global stepper error by : setError('Error Message'); " /> |
| 258 | + <m:MaterialPanel height="500px" width="100%"> |
| 259 | + <ma:stepper.MaterialStepper ui:field="stepperError" axis="HORIZONTAL" detectOrientation="true" shadow="1"> |
232 | 260 | <ma:stepper.MaterialStep step="1" title="Name of Step 1" description="Description of Step 1"> |
233 | 261 | <m:MaterialPanel width="100%" addStyleNames="{style.block}" backgroundColor="GREY_LIGHTEN_2"/> |
234 | 262 | <m:MaterialButton ui:field="btnError" text="Set Error" grid="l4" marginTop="12" textColor="WHITE" waves="DEFAULT"/> |
|
254 | 282 |
|
255 | 283 | <m:MaterialPanel addStyleNames="code"> |
256 | 284 | <m:MaterialTitle title="Feedback on Steppers" description="Steppers may display a transient feedback message after a step is saved. Stepper feedback should only be used if there is a long latency between steps"/> |
257 | | - <m:MaterialPanel hideOn="HIDE_ON_SMALL" height="500px" width="100%"> |
258 | | - <ma:stepper.MaterialStepper ui:field="stepperFeedback" axis="HORIZONTAL" shadow="1"> |
| 285 | + <m:MaterialPanel height="500px" width="100%"> |
| 286 | + <ma:stepper.MaterialStepper ui:field="stepperFeedback" axis="HORIZONTAL" detectOrientation="true" shadow="1"> |
259 | 287 | <ma:stepper.MaterialStep step="1" title="Name of Step 1" description="Description of Step 1"> |
260 | 288 | <m:MaterialPanel width="100%" backgroundColor="GREY_LIGHTEN_2" addStyleNames="{style.block}"/> |
261 | 289 | <m:MaterialButton ui:field="btnContinue41" text="Continue with Feedback Loader" grid="l4" marginTop="12" textColor="WHITE" waves="DEFAULT"/> |
|
0 commit comments