From 009ee770337c8f97a496f9d7fbb50a37dad85dcf Mon Sep 17 00:00:00 2001 From: Annie Wang Date: Wed, 17 Jun 2020 15:52:42 -0700 Subject: [PATCH 1/3] expansion panel --- ...expansion-expand-collapse-all-example.html | 5 +- .../expansion-overview-example.html | 21 ++--- .../expansion-steps-example.html | 3 +- src/material/expansion/expansion.md | 83 ++++--------------- 4 files changed, 31 insertions(+), 81 deletions(-) diff --git a/src/components-examples/material/expansion/expansion-expand-collapse-all/expansion-expand-collapse-all-example.html b/src/components-examples/material/expansion/expansion-expand-collapse-all/expansion-expand-collapse-all-example.html index 2c314cd946c7..1b1f68e136d9 100644 --- a/src/components-examples/material/expansion/expansion-expand-collapse-all/expansion-expand-collapse-all-example.html +++ b/src/components-examples/material/expansion/expansion-expand-collapse-all/expansion-expand-collapse-all-example.html @@ -2,7 +2,9 @@ + + @@ -25,8 +27,9 @@ - + + Destination diff --git a/src/components-examples/material/expansion/expansion-overview/expansion-overview-example.html b/src/components-examples/material/expansion/expansion-overview/expansion-overview-example.html index 76c98d933393..552cd3d161ca 100644 --- a/src/components-examples/material/expansion/expansion-overview/expansion-overview-example.html +++ b/src/components-examples/material/expansion/expansion-overview/expansion-overview-example.html @@ -1,24 +1,19 @@ - + + + + - Personal data + This is the expansion title - Type your name and age + This is a summary of the content - - - First name - - - - - Age - - +

This is the primary content of the panel.

+ diff --git a/src/components-examples/material/expansion/expansion-steps/expansion-steps-example.html b/src/components-examples/material/expansion/expansion-steps/expansion-steps-example.html index 85d0a66ff4d2..c69815f92c8e 100644 --- a/src/components-examples/material/expansion/expansion-steps/expansion-steps-example.html +++ b/src/components-examples/material/expansion/expansion-steps/expansion-steps-example.html @@ -19,10 +19,11 @@ Age - + + diff --git a/src/material/expansion/expansion.md b/src/material/expansion/expansion.md index d93ad448fac9..fc1e745dc703 100644 --- a/src/material/expansion/expansion.md +++ b/src/material/expansion/expansion.md @@ -4,8 +4,6 @@ ### Expansion-panel content -Each expansion-panel must include a header and may optionally include an action bar. - #### Header The `` shows a summary of the panel content and acts @@ -13,61 +11,34 @@ as the control for expanding and collapsing. This header may optionally contain `` and an ``, which format the content of the header to align with Material Design specifications. + + By default, the expansion-panel header includes a toggle icon at the end of the header to indicate the expansion state. This icon can be hidden via the -`hideToggle` property. +`hideToggle` property. -```html - - - - This is the expansion title - - - This is a summary of the content - - - -

This is the primary content of the panel.

- -
-``` + #### Action bar Actions may optionally be included at the bottom of the panel, visible only when the expansion is in its expanded state. -```html - - - This is the expansion title - - -

This is the primary content of the panel.

- - - - -
-``` - + #### Disabling a panel Expansion panels can be disabled using the `disabled` attribute. A disabled expansion panel can't be toggled by the user, but can still be manipulated programmatically. -```html - - - This is the expansion title - - - This is a summary of the content - - -``` - + ### Accordion @@ -75,29 +46,9 @@ Multiple expansion-panels can be combined into an accordion. The `multi="true"` expansions state to be set independently of each other. When `multi="false"` (default) just one panel can be expanded at a given time: -```html - - - - - This is the expansion 1 title - - - This the expansion 1 content - - - - - - This is the expansion 2 title - - - This the expansion 2 content - - - - -``` + ### Lazy rendering By default, the expansion panel content will be initialized even when the panel is closed. From 66e56f432c3798cc39c7678c62616282f927910e Mon Sep 17 00:00:00 2001 From: Annie Wang Date: Wed, 17 Jun 2020 16:31:57 -0700 Subject: [PATCH 2/3] stepper --- .../stepper-editable-example.html | 4 + ...stepper-label-position-bottom-example.html | 4 + .../stepper-optional-example.html | 2 + .../stepper-states-example.html | 6 + src/material/expansion/expansion.md | 2 +- src/material/stepper/stepper.md | 106 +++++------------- 6 files changed, 43 insertions(+), 81 deletions(-) diff --git a/src/components-examples/material/stepper/stepper-editable/stepper-editable-example.html b/src/components-examples/material/stepper/stepper-editable/stepper-editable-example.html index 3d11b063e5c2..ea3d8302316f 100644 --- a/src/components-examples/material/stepper/stepper-editable/stepper-editable-example.html +++ b/src/components-examples/material/stepper/stepper-editable/stepper-editable-example.html @@ -3,9 +3,13 @@ + +
+ Fill out your name + Name diff --git a/src/components-examples/material/stepper/stepper-label-position-bottom/stepper-label-position-bottom-example.html b/src/components-examples/material/stepper/stepper-label-position-bottom/stepper-label-position-bottom-example.html index 8c2fdb184522..c781ddf6e10d 100644 --- a/src/components-examples/material/stepper/stepper-label-position-bottom/stepper-label-position-bottom-example.html +++ b/src/components-examples/material/stepper/stepper-label-position-bottom/stepper-label-position-bottom-example.html @@ -1,4 +1,6 @@ + + Fill out your name @@ -20,8 +22,10 @@ required>
+ +
diff --git a/src/components-examples/material/stepper/stepper-optional/stepper-optional-example.html b/src/components-examples/material/stepper/stepper-optional/stepper-optional-example.html index f4030d409739..b67f202ad668 100644 --- a/src/components-examples/material/stepper/stepper-optional/stepper-optional-example.html +++ b/src/components-examples/material/stepper/stepper-optional/stepper-optional-example.html @@ -15,7 +15,9 @@ + +
Fill out your address diff --git a/src/components-examples/material/stepper/stepper-states/stepper-states-example.html b/src/components-examples/material/stepper/stepper-states/stepper-states-example.html index 487506522625..25a1370f2b6d 100644 --- a/src/components-examples/material/stepper/stepper-states/stepper-states-example.html +++ b/src/components-examples/material/stepper/stepper-states/stepper-states-example.html @@ -35,13 +35,16 @@ + +

Put down your phones.

+

Socialize with each other.

@@ -54,6 +57,7 @@ + call_end @@ -61,3 +65,5 @@ forum + + diff --git a/src/material/expansion/expansion.md b/src/material/expansion/expansion.md index fc1e745dc703..66d8272b1658 100644 --- a/src/material/expansion/expansion.md +++ b/src/material/expansion/expansion.md @@ -17,7 +17,7 @@ header to align with Material Design specifications. By default, the expansion-panel header includes a toggle icon at the end of the header to indicate the expansion state. This icon can be hidden via the -`hideToggle` property. +`hideToggle` property. - Material stepper builds on the foundation of the CDK stepper that is responsible for the logic that drives a stepped workflow. Material stepper extends the CDK stepper and has Material Design styling. @@ -10,6 +8,8 @@ styling. There are two stepper components: `mat-horizontal-stepper` and `mat-vertical-stepper`. They can be used the same way. The only difference is the orientation of stepper. + + `mat-horizontal-stepper` selector can be used to create a horizontal stepper, and @@ -18,49 +18,31 @@ placed inside either one of the two stepper components. ### Labels If a step's label is only text, then the `label` attribute can be used. -```html - - - Content 1 - - - Content 2 - - -``` + For more complex labels, add a template with the `matStepLabel` directive inside the `mat-step`. -```html - - - ... - ... - - -``` + #### Label position For `mat-horizontal-stepper` it's possible to define the position of the label. `end` is the default value, while `bottom` will place it under the step icon instead of at its side. This behaviour is controlled by `labelPosition` property. - + ### Stepper buttons There are two button directives to support navigation between different steps: `matStepperPrevious` and `matStepperNext`. -```html - - - ... -
- - -
-
-
-``` + ### Linear stepper The `linear` attribute can be set on `mat-horizontal-stepper` and `mat-vertical-stepper` to create @@ -122,14 +104,18 @@ are completed. If completion of a step in linear stepper is not required, then the `optional` attribute can be set on `mat-step`. - + #### Editable step By default, steps are editable, which means users can return to previously completed steps and edit their responses. `editable="false"` can be set on `mat-step` to change the default. - + #### Completed step By default, the `completed` attribute of a step returns `true` if the step is valid (in case of @@ -142,24 +128,9 @@ set via `` elements. If you want to provide a different set of icons, by placing a `matStepperIcon` for each of the icons that you want to override. The `index`, `active`, and `optional` values of the individual steps are available through template variables: -```html - - - insert_drive_file - - - - done_all - - - - - {{index + 10}} - - - - -``` + Note that you aren't limited to using the `mat-icon` component when providing custom icons. @@ -167,34 +138,9 @@ Note that you aren't limited to using the `mat-icon` component when providing cu You can set the state of a step to whatever you want. The given state by default maps to an icon. However, it can be overridden the same way as mentioned above. -```html - - -

Put down your phones.

-
- -
-
- -

Socialize with each other.

-
- - -
-
- -

You're welcome.

-
- - - - call_end - - - forum - -
-``` + In order to use the custom step states, you must add the `displayDefaultIndicatorType` option to the global default stepper options which can be specified by providing a value for From a1579320e4747e7a884f4fb53522c5aa24258eff Mon Sep 17 00:00:00 2001 From: Annie Wang Date: Fri, 19 Jun 2020 13:04:46 -0700 Subject: [PATCH 3/3] add space in obj literal --- src/material/expansion/expansion.md | 30 +++++++++--------- src/material/stepper/stepper.md | 48 ++++++++++++++--------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/material/expansion/expansion.md b/src/material/expansion/expansion.md index 66d8272b1658..6eec1c62f840 100644 --- a/src/material/expansion/expansion.md +++ b/src/material/expansion/expansion.md @@ -11,34 +11,34 @@ as the control for expanding and collapsing. This header may optionally contain `` and an ``, which format the content of the header to align with Material Design specifications. - + By default, the expansion-panel header includes a toggle icon at the end of the header to indicate the expansion state. This icon can be hidden via the `hideToggle` property. - + #### Action bar Actions may optionally be included at the bottom of the panel, visible only when the expansion is in its expanded state. - + #### Disabling a panel Expansion panels can be disabled using the `disabled` attribute. A disabled expansion panel can't be toggled by the user, but can still be manipulated programmatically. - + ### Accordion @@ -46,9 +46,9 @@ Multiple expansion-panels can be combined into an accordion. The `multi="true"` expansions state to be set independently of each other. When `multi="false"` (default) just one panel can be expanded at a given time: - + ### Lazy rendering By default, the expansion panel content will be initialized even when the panel is closed. diff --git a/src/material/stepper/stepper.md b/src/material/stepper/stepper.md index ee98fce3f7f2..76e2d1311434 100644 --- a/src/material/stepper/stepper.md +++ b/src/material/stepper/stepper.md @@ -18,31 +18,31 @@ placed inside either one of the two stepper components. ### Labels If a step's label is only text, then the `label` attribute can be used. - + For more complex labels, add a template with the `matStepLabel` directive inside the `mat-step`. - + #### Label position For `mat-horizontal-stepper` it's possible to define the position of the label. `end` is the default value, while `bottom` will place it under the step icon instead of at its side. This behaviour is controlled by `labelPosition` property. - + ### Stepper buttons There are two button directives to support navigation between different steps: `matStepperPrevious` and `matStepperNext`. - + ### Linear stepper The `linear` attribute can be set on `mat-horizontal-stepper` and `mat-vertical-stepper` to create @@ -104,18 +104,18 @@ are completed. If completion of a step in linear stepper is not required, then the `optional` attribute can be set on `mat-step`. - + #### Editable step By default, steps are editable, which means users can return to previously completed steps and edit their responses. `editable="false"` can be set on `mat-step` to change the default. - + #### Completed step By default, the `completed` attribute of a step returns `true` if the step is valid (in case of @@ -128,9 +128,9 @@ set via `` elements. If you want to provide a different set of icons, by placing a `matStepperIcon` for each of the icons that you want to override. The `index`, `active`, and `optional` values of the individual steps are available through template variables: - + Note that you aren't limited to using the `mat-icon` component when providing custom icons. @@ -138,9 +138,9 @@ Note that you aren't limited to using the `mat-icon` component when providing cu You can set the state of a step to whatever you want. The given state by default maps to an icon. However, it can be overridden the same way as mentioned above. - + In order to use the custom step states, you must add the `displayDefaultIndicatorType` option to the global default stepper options which can be specified by providing a value for