Skip to content

Commit

Permalink
feat(ui5-wizard): introduce new component (#2400)
Browse files Browse the repository at this point in the history
Introduce ui5-wizard and ui5-wizard-step components that enables users to accomplish a single goal that consists of multiple dependable sub-tasks. The ui5-wizard-step API defines both the content of particular step and its corresponding tab, displayed within the Wizard's navigation header with the icon and text properties. Also, the component provides selected and disabled properties, that determine which step is currently "selected" (active), which ones are enabled or disabled. Тhe Wizard does not provide "move to next button", instead we give the user freedom to decide how to move to particular step. It might be button, or something else, placed inside the content of step. At the end, to move to particular step, the user can use the API of the ui5-wizard-step (selected and disabled).
In terms of user experience, the wizard allows navigation between enabled (validated) steps upon clicking the steps within the navigation header and via scrolling. When these interactions occur, the wizard updates the selected state and fires selection-change event to notify the interested parties.

FIXES: #2368
  • Loading branch information
ilhan007 committed Nov 2, 2020
1 parent 20d3a4f commit eacbb26
Show file tree
Hide file tree
Showing 29 changed files with 3,126 additions and 42 deletions.
14 changes: 8 additions & 6 deletions docs/Public Module Imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ For API documentation and samples, please check the [UI5 Web Components Playgrou
| Carousel | `ui5-carousel` | `import "@ui5/webcomponents/dist/Carousel.js";` |
| Checkbox | `ui5-checkbox` | `import "@ui5/webcomponents/dist/CheckBox.js";` |
| ComboBox | `ui5-combobox` | `import "@ui5/webcomponents/dist/ComboBox.js";` |
| ComboBox Item | `ui5-cb-item` | comes with `ui5-combobox` |
| Date Picker | `ui5-date-picker` | `import "@ui5/webcomponents/dist/DatePicker.js";` |
| ComboBox Item | `ui5-cb-item` | comes with `ui5-combobox` |
| Date Picker | `ui5-date-picker` | `import "@ui5/webcomponents/dist/DatePicker.js";` |
| Dialog | `ui5-dialog` | `import "@ui5/webcomponents/dist/Dialog.js";` |
| File Uploader | `ui5-file-uploader` | `import "@ui5/webcomponents/dist/FileUploader.js";` |
| Icon | `ui5-icon` | `import "@ui5/webcomponents/dist/Icon.js";` |
Expand All @@ -45,13 +45,13 @@ For API documentation and samples, please check the [UI5 Web Components Playgrou
| List - Group Header Item | `ui5-li-groupheader` | `import "@ui5/webcomponents/dist/GroupHeaderListItem.js";` |
| Message Strip | `ui5-messagestrip` | `import "@ui5/webcomponents/dist/MessageStrip.js";` |
| Multi ComboBox | `ui5-multi-combobox` | `import "@ui5/webcomponents/dist/MultiComboBox.js";` |
| Multi ComboBox Item | `ui5-mcb-item` | comes with `ui5-multi-combobox` |
| Multi ComboBox Item | `ui5-mcb-item` | comes with `ui5-multi-combobox` |
| Panel | `ui5-panel` | `import "@ui5/webcomponents/dist/Panel.js";` |
| Popover | `ui5-popover` | `import "@ui5/webcomponents/dist/Popover.js";` |
| Radio Button | `ui5-radiobutton` | `import "@ui5/webcomponents/dist/RadioButton.js";` |
| Responsive Popover | `ui5-responsive-popover`| `import "@ui5/webcomponents/dist/ResponsivePopover.js";`|
| Select | `ui5-select` | `import "@ui5/webcomponents/dist/Select.js";` |
| Select Option | `ui5-option` | comes with `ui5-select ` |
| Select Option | `ui5-option` | comes with `ui5-select ` |
| Segmented Button | `ui5-segmentedbutton`|`import "@ui5/webcomponents/dist/SegmentedButton.js";` |
| Suggestion Item | `ui5-suggestion-item`|`import "@ui5/webcomponents/dist/SuggestionItem.js";` |
| Switch | `ui5-switch` | `import "@ui5/webcomponents/dist/Switch.js";` |
Expand All @@ -63,9 +63,9 @@ For API documentation and samples, please check the [UI5 Web Components Playgrou
| Table Row | `ui5-table-row` | `import "@ui5/webcomponents/dist/TableRow.js";` |
| Table Cell | `ui5-table-cell` | `import "@ui5/webcomponents/dist/TableCell.js";` |
| Textarea | `ui5-textarea` | `import "@ui5/webcomponents/dist/TextArea.js";` |
| TimePicker | `ui5-time-picker` | `import "@ui5/webcomponents/dist/TimePicker.js";` |
| TimePicker | `ui5-time-picker` | `import "@ui5/webcomponents/dist/TimePicker.js";` |
| Timeline | `ui5-timeline` | `import "@ui5/webcomponents/dist/Timeline.js";` |
| Timeline Item | `ui5-timeline-item` | comes with `ui5-timeline` |
| Timeline Item | `ui5-timeline-item` | comes with `ui5-timeline` |
| Title | `ui5-title` | `import "@ui5/webcomponents/dist/Title.js";` |
| Toast | `ui5-toast` | `import "@ui5/webcomponents/dist/Toast.js";` |
| Toggle Button | `ui5-togglebutton` | `import "@ui5/webcomponents/dist/ToggleButton.js";` |
Expand Down Expand Up @@ -147,6 +147,8 @@ For API documentation and samples, please check the [UI5 Web Components Playgrou
| Notification Overflow Action | `ui5-notification-overflow-action` | `import "@ui5/webcomponents-fiori/dist/NotificationOverflowAction.js";`|
| Upload Collection | `ui5-upload-collection` | `import "@ui5/webcomponents-fiori/dist/UploadCollection.js";` |
| Upload Collection Item | `ui5-upload-collection-item` | `import "@ui5/webcomponents-fiori/dist/UploadCollectionItem.js";` |
| Wizard | `ui5-wizard` | `import "@ui5/webcomponents-fiori/dist/Wizard.js";` |
| Wizard Step | `ui5-wizard-step` | comes with `ui5-wizard` |

### 2. Assets

Expand Down
1 change: 1 addition & 0 deletions packages/fiori/bundle.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ import UploadCollectionItem from "./dist/UploadCollectionItem.js";
import NotificationListItem from "./dist/NotificationListItem.js"
import NotificationListGroupItem from "./dist/NotificationListGroupItem.js";
import NotificationOverflowAction from "./dist/NotificationOverflowAction.js";
import Wizard from "./dist/Wizard.js";

export default testAssets;
41 changes: 41 additions & 0 deletions packages/fiori/src/Wizard.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<div class="ui5-wiz-root" aria-label="{{ariaLabelText}}">
<div class="ui5-wiz-nav" role="navigation" aria-roledescription="{{navAriaRoleDescription}}" tabindex="-1">
<ul class="ui5-wiz-nav-list" role="list">
{{#each _stepsInHeader}}
<ui5-wizard-tab
heading="{{heading}}"
subheading="{{subheading}}"
icon="{{icon}}"
number="{{number}}"
?disabled="{{disabled}}"
?selected="{{selected}}"
?hide-separator="{{hideSeparator}}"
?active-separator="{{activeSeparator}}"
?branching-separator="{{branchingSeparator}}"
role="listitem"
aria-posinset="{{pos}}"
aria-setsize="{{size}}"
aria-roledescription="{{roleDescription}}"
aria-label="{{ariaLabel}}"
data-ui5-content-ref-id="{{this.refStepId}}"
data-ui5-index="{{pos}}"
_tab-index="{{tabIndex}}"
@selection-change-requested="{{../onSelectionChangeRequested}}"
@focused="{{../onStepInHeaderFocused}}"
></ui5-wizard-tab>
{{/each}}
</ul>
</div>

<div class="ui5-wiz-content" @scroll="{{onScroll}}">
{{#each _steps}}
<div class="ui5-wiz-content-item"
?hidden="{{disabled}}"
?selected="{{selected}}"
?stretch="{{stretch}}"
data-ui5-content-item-ref-id="{{_id}}">
<slot name="{{this._individualSlot}}"></slot>
</div>
{{/each}}
</div>
</div>
Loading

0 comments on commit eacbb26

Please sign in to comment.