@brightspace-ui/labs 2.60.0 → 2.60.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -61,14 +61,16 @@ The wizard component can be used to display a stepped workflow.
|
|
|
61
61
|
| `back-button-title` | String | Text that is displayed within the button |
|
|
62
62
|
| `back-button-tooltip` | String | Text that is displayed within the button tooltip |
|
|
63
63
|
| `display-back-button` | Boolean | Display the Back button |
|
|
64
|
+
| `disable-back-button` | Boolean | Disable the Back button |
|
|
64
65
|
| `primary-button` | String | Button to make primary: `next`, `back`, or `restart`. Defaults to `next` |
|
|
65
66
|
| `restart-button-title` | String | Text that is displayed within the button |
|
|
66
67
|
| `restart-button-tooltip` | String | Text that is displayed within the button tooltip |
|
|
67
68
|
| `hide-restart-button` | Boolean | Hide the Restart button |
|
|
69
|
+
| `disable-restart-button` | Boolean | Disable the Restart button |
|
|
68
70
|
| `next-button-title` | String | Text that is displayed within the button |
|
|
69
71
|
| `next-button-tooltip` | String | Text that is displayed within the button tooltip |
|
|
70
|
-
| `disable-next-button` | Boolean | Disable the Next button |
|
|
71
72
|
| `hide-next-button` | Boolean | Hide the Next button |
|
|
73
|
+
| `disable-next-button` | Boolean | Disable the Next button |
|
|
72
74
|
|
|
73
75
|
### Events:
|
|
74
76
|
- `stepper-next`: dispatched when the Next button is clicked
|
|
@@ -56,6 +56,14 @@ class D2LStep extends LocalizeLabsElement(LitElement) {
|
|
|
56
56
|
type: Boolean,
|
|
57
57
|
attribute: 'disable-next-button'
|
|
58
58
|
},
|
|
59
|
+
disableBackButton: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
attribute: 'disable-back-button'
|
|
62
|
+
},
|
|
63
|
+
disableRestartButton: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
attribute: 'disable-restart-button'
|
|
66
|
+
},
|
|
59
67
|
nextButtonAriaLabel: {
|
|
60
68
|
type: String,
|
|
61
69
|
attribute: 'next-button-aria-label'
|
|
@@ -106,6 +114,8 @@ class D2LStep extends LocalizeLabsElement(LitElement) {
|
|
|
106
114
|
this.primaryButton = PRIMARY_BUTTON.NEXT;
|
|
107
115
|
this.hideNextButton = false;
|
|
108
116
|
this.disableNextButton = false;
|
|
117
|
+
this.disableBackButton = false;
|
|
118
|
+
this.disableRestartButton = false;
|
|
109
119
|
this.nextButtonAriaLabel = '';
|
|
110
120
|
this.restartButtonAriaLabel = '';
|
|
111
121
|
this.ariaTitle = '';
|
|
@@ -166,6 +176,7 @@ class D2LStep extends LocalizeLabsElement(LitElement) {
|
|
|
166
176
|
return html`
|
|
167
177
|
<d2l-button
|
|
168
178
|
@click="${this.#handleBackClick}"
|
|
179
|
+
?disabled="${this.disableBackButton}"
|
|
169
180
|
?primary="${this.primaryButton === PRIMARY_BUTTON.BACK}"
|
|
170
181
|
title="${!this.backButtonTooltip ? this.localize('components:wizard:back.button.tooltip') : this.backButtonTooltip}">
|
|
171
182
|
${!this.backButtonTitle ? this.localize('components:wizard:stepper.defaults.back') : this.backButtonTitle}
|
|
@@ -190,6 +201,7 @@ class D2LStep extends LocalizeLabsElement(LitElement) {
|
|
|
190
201
|
<d2l-button
|
|
191
202
|
aria-label="${this.restartButtonAriaLabel}"
|
|
192
203
|
@click="${this.#handleRestartClick}"
|
|
204
|
+
?disabled="${this.disableRestartButton}"
|
|
193
205
|
?primary="${this.primaryButton === PRIMARY_BUTTON.RESTART}"
|
|
194
206
|
title="${!this.restartButtonTooltip ? this.localize('components:wizard:restart.button.tooltip') : this.restartButtonTooltip}">
|
|
195
207
|
${!this.restartButtonTitle ? this.localize('components:wizard:stepper.defaults.restart') : this.restartButtonTitle}
|