Skip to content

Commit cb12965

Browse files
heyMPgithub-actions[bot]castastrophe
authored
feat: pfe-progress-steps [new component] (#1436) (#1613)
* fix: merged master fix and issue-1405-product-trials-epic--broken-master * feat: added better logic for switching grid gaps for button-group * feat: updated demo * feat: pfe-progress-steps disable link on current and error state. * feat: pfe-progress-steps fixed thin white line around svgs * chore: pfe-progress-steps cleanup * feat: updated demo to use remote libs * fix: pfe-popover fixed darkmode button color * feat: pfe-absolute-position switch from attr change callback to prop observers * fix: pfe-alert added correct icon gap, moved to css grid * chore: update to 1.6.0 * chore: commit dist files for short term * chore: remove dist files * chore: removing unrelated components * chore: removing dist directories * chore: remove console.log * feat: made vertical min-height dynamic * chore: version bump * First pass at updating styles to use pfe functions * Remove debugging * Update polyfills * Add documentation folder * Remove jump links content from progress stepper docs * Add documentation for the variable hooks * Update documentation; add values array * First pass at storybook view * Abstract item template * Update story * Update tests for progress steps * Update progress steps * Add todo notes * Remove progress steps html now that it's using the new testing framework * [pfe-progress-steps] CSS Variable Notes NO MERGE (#1623) * feat: added inline comments * Update elements/pfe-progress-steps/src/pfe-progress-steps-item.scss * Update elements/pfe-progress-steps/src/pfe-progress-steps-item.scss * Update elements/pfe-progress-steps/src/pfe-progress-steps-item.scss * Apply suggestions from code review * Allow text to inherit font color * Adding a few setters Co-authored-by: [ Cassondra ] <[email protected]> * Reworking the styles to simplify the markup * Fixing a few hangnails * Update links to use inherit * Update logic to use more precise math for determining alignment * Revert storybook update * Minor updates * update changelog * Updating typo * Remove html test from old testing suite * Update styles on demo page * feat: updated css vars for RH theme in demo * feat: updated preview image for docs * fix: fixed the description of the progress steps * Update feedback--info colors to ui-accent Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: [ Cassondra ] <[email protected]>
1 parent b89bd6b commit cb12965

22 files changed

+1622
-18
lines changed

CHANGELOG-1.x.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
# 1.9.0 (TBD)
1+
# 1.9.0 (2021)
22

3-
- [](https://github.com/patternfly/patternfly-elements/commit/) feat: [pfe-styles] ordered list primary styles
3+
- [](https://github.com/patternfly/patternfly-elements/commit/) feat: pfe-progress-steps (new) (#1436)
4+
- [9411f1f](https://github.com/patternfly/patternfly-elements/commit/9411f1f7e614be43e50105540262cd1992bca50f) feat: [pfe-styles] ordered list primary styles
5+
- [b89bd6b](https://github.com/patternfly/patternfly-elements/commit/b89bd6b34dc5bd42c61dd1670bf273587b650268) feat: persist debugLog in localStorage
46

57
# 1.8.0 (2021-05-18)
68

7-
- [](https://github.com/patternfly/patternfly-elements/commit/) feat: persist debugLog in localStorage
89
- [267ff8e](https://github.com/patternfly/patternfly-elements/commit/267ff8ee7df7cd0512f16c58fdb169f941bfa4cd) feat: Update fetch mixin to support region input (#1328)
910
- [f1c1176](https://github.com/patternfly/patternfly-elements/commit/f1c1176d9278d6e5b8066b42fc040ea01d98ecb2) feat: pfe-icon now supports setting default icon sets
1011
- [56eb55e](https://github.com/patternfly/patternfly-elements/commit/56eb55ec8b4b62aee7d36950d158229cbf50ddef) fix: pfe-accordion IE11 regression; background context should always be white with black text
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright 2021 Red Hat, Inc.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# PatternFly Element | Progress stepper element
2+
A component that gives the user a visual representation of the current state of their progress through an application (typically a multistep form).
3+
4+
## Usage
5+
Describe how best to use this web component along with best practices.
6+
7+
```html
8+
<pfe-progress-steps>
9+
<pfe-progress-steps-item state="active" current>
10+
<div slot="title">Current</div>
11+
<a slot="link" href="#">View current step</a>
12+
</pfe-progress-steps-item>
13+
<pfe-progress-steps-item>
14+
<div slot="title">Next</div>
15+
<a slot="link" href="#">View next step</a>
16+
</pfe-progress-steps-item>
17+
<pfe-progress-steps-item>
18+
<div slot="title">Last</div>
19+
<a slot="link" href="#">View last step</a>
20+
</pfe-progress-steps-item>
21+
</pfe-progress-steps>
22+
```
23+
24+
## Slots
25+
26+
### pfe-progress-steps-item
27+
28+
- `title`: The item's short descriptive title.
29+
- `description`: A short description of what the item represents.
30+
31+
## Attributes
32+
33+
### pfe-progress-steps
34+
35+
- `vertical`: Describe each available attribute and what function is serves.
36+
37+
### pfe-progress-steps-item
38+
39+
- `current`: Indicates if this item is the current active item.
40+
- `state`: Describes the state of the current item; allows "inactive", "done", or "error".
41+
42+
## Variable hooks
43+
44+
Available hooks for styling:
45+
46+
| Variable name | Default value | Region |
47+
| --- | --- | --- |
48+
| `--pfe-progress-steps__item--Width` | var(--pfe-theme--ui--element--size--lg, 75px) | item |
49+
| `--pfe-progress-steps__circle--Size` | var(--pfe-theme--ui--element--size--md, 32px) | circle |
50+
| `--pfe-progress-steps__progress-bar--Color` | var(--pfe-theme--color--ui--border--lighter, #d2d2d2) | progress |
51+
| `--pfe-progress-steps__progress-bar--Fill` | var(--pfe-theme--color--ui-accent, #06c) | progress |
52+
| `--pfe-progress-steps__progress-bar--Width` | var(--pfe-theme--ui--border-width--md, 2px) | progress |
53+
| --- | --- | --- |
54+
| `--pfe-progress-steps-item--Width` | auto | |
55+
| `--pfe-progress-steps-item--MinHeight--vertical` | var(--pfe-progress-steps__item--Width, var(--pfe-theme--ui--element--size--lg, 75px)) | |
56+
| `--pfe-progress-steps-item__circle--Size` | var(--pfe-theme--ui--element--size--md, 32px) | circle |
57+
| `--pfe-progress-steps-item__circle--Color` | var(--pfe-theme--color--feedback--info, #06c) | circle |
58+
| `--pfe-progress-steps-item__circle--Color--hover` | var(--pfe-theme--color--feedback--info, #06c) | circle |
59+
| `--pfe-progress-steps-item__circle--Color--focus` | var(--pfe-theme--color--feedback--info, #06c) | circle |
60+
| `--pfe-progress-steps-item__circle--Background` | radial-gradient(circle, white 60%, rgba(255, 255, 255, 0) 61%) | circle |
61+
| `--pfe-progress-steps-item__circle--Width` | var(--pfe-progress-steps-item__circle--Size, var(--pfe-theme--ui--element--size--md, 32px)) | circle |
62+
| `--pfe-progress-steps-item__circle--Height` | var(--pfe-progress-steps-item__circle--Size, var(--pfe-theme--ui--element--size--md, 32px)) | circle |
63+
| `--pfe-progress-steps-item__circle-wrapper--Width` | var(--pfe-progress-steps-item__circle--Width, var(--pfe-progress-steps-item__circle--Size, var(--pfe-theme--ui--element--size--md, 32px))) | circle |
64+
| `--pfe-progress-steps-item__circle-wrapper--Height` | var(--pfe-progress-steps-item__circle--Height, var(--pfe-progress-steps-item__circle--Size, var(--pfe-theme--ui--element--size--md, 32px))) | circle |
65+
| `--pfe-progress-steps-item__title--Color` | var(--pfe-theme--color--text, #151515) | title |
66+
| `--pfe-progress-steps-item__title--Color--active` | var(--pfe-theme--color--feedback--info, #06c) | title |
67+
| `--pfe-progress-steps-item__title--Color--error` | var(--pfe-theme--color--feedback--critical--lighter, #c9190b) | title |
68+
| `--pfe-progress-steps-item__title--MarginTop--vertical` | calc( var(--pfe-progress-steps-item__circle--Size, var(--pfe-theme--ui--element--size--md, 32px)) / 6) | title |
69+
| `--pfe-progress-steps-item__description--Color` | var(--pfe-theme--color--text--muted, #6a6e73) | description |
70+
| `--pfe-progress-steps-item__description--Color--error` | var(--pfe-theme--color--feedback--critical--lighter, #c9190b) | description |
71+
| `--pfe-progress-steps-item--spacer` | var(--pfe-theme--content-spacer--body--sm, 0.5rem) | |
72+
| `--pfe-progress-steps-item__circle-inner--Width` | calc( var(--pfe-progress-steps-item__circle--Width, var(--pfe-progress-steps-item__circle--Size, var(--pfe-theme--ui--element--size--md, 32px))) / 2.2) | circle |
73+
| `--pfe-progress-steps-item__circle-inner--Height` | calc( var(--pfe-progress-steps-item__circle--Height, var(--pfe-progress-steps-item__circle--Size, var(--pfe-theme--ui--element--size--md, 32px))) / 2.2) | circle |
74+
| `--pfe-progress-steps-item__circle-outer--Width` | var(--pfe-progress-steps-item__circle--Width, var(--pfe-progress-steps-item__circle--Size, var(--pfe-theme--ui--element--size--md, 32px))) | circle |
75+
| `--pfe-progress-steps-item__circle-outer--Height` | var(--pfe-progress-steps-item__circle--Height, var(--pfe-progress-steps-item__circle--Size, var(--pfe-theme--ui--element--size--md, 32px))) | circle |
76+
77+
## Dev
78+
79+
`npm start`
80+
81+
## Test
82+
83+
`npm run test`
84+
85+
## Build
86+
87+
`npm run build`
88+
89+
## Demo
90+
91+
From the PFElements root directory, run:
92+
93+
`npm run demo`
94+
95+
## Code style
96+
97+
Progress stepper (and all PFElements) use [Prettier][prettier] to auto-format JS and JSON. The style rules get applied when you commit a change. If you choose to, you can [integrate your editor][prettier-ed] with Prettier to have the style rules applied on every save.
98+
99+
[prettier]: https://github.com/prettier/prettier/
100+
[prettier-ed]: https://prettier.io/docs/en/editors.html
101+
[web-component-tester]: https://github.com/Polymer/web-component-tester

0 commit comments

Comments
 (0)