@skyux/progress-indicator 4.0.0-rc.0 → 4.1.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.
Files changed (82) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/README.md +1 -1
  3. package/bundles/skyux-progress-indicator.umd.js +204 -56
  4. package/bundles/skyux-progress-indicator.umd.js.map +1 -1
  5. package/bundles/skyux-progress-indicator.umd.min.js +12 -12
  6. package/bundles/skyux-progress-indicator.umd.min.js.map +1 -1
  7. package/esm2015/modules/progress-indicator/progress-indicator-item/progress-indicator-item.component.js +7 -3
  8. package/esm2015/modules/progress-indicator/progress-indicator-nav-button/progress-indicator-nav-button.component.js +68 -30
  9. package/esm2015/modules/progress-indicator/progress-indicator-reset-button/progress-indicator-reset-button.component.js +14 -1
  10. package/esm2015/modules/progress-indicator/progress-indicator-status-marker/progress-indicator-status-marker.component.js +26 -8
  11. package/esm2015/modules/progress-indicator/progress-indicator-title/progress-indicator-title.component.js +6 -3
  12. package/esm2015/modules/progress-indicator/progress-indicator.component.js +28 -2
  13. package/esm2015/modules/progress-indicator/progress-indicator.module.js +4 -2
  14. package/esm2015/modules/progress-indicator/types/progress-indicator-action-click-args.js +1 -1
  15. package/esm2015/modules/progress-indicator/types/progress-indicator-action-click-progress-handler.js +3 -2
  16. package/esm2015/modules/progress-indicator/types/progress-indicator-change.js +1 -1
  17. package/esm2015/modules/progress-indicator/types/progress-indicator-item-status.js +13 -1
  18. package/esm2015/modules/progress-indicator/types/progress-indicator-message-type.js +20 -1
  19. package/esm2015/modules/progress-indicator/types/progress-indicator-message.js +1 -1
  20. package/esm2015/modules/progress-indicator/types/progress-indicator-mode.js +7 -1
  21. package/esm2015/modules/progress-indicator/types/progress-indicator-nav-button-type.js +1 -1
  22. package/esm2015/public_api.js +6 -0
  23. package/esm2015/skyux-progress-indicator.js +2 -2
  24. package/esm5/modules/progress-indicator/progress-indicator-item/progress-indicator-item.component.js +7 -3
  25. package/esm5/modules/progress-indicator/progress-indicator-nav-button/progress-indicator-nav-button.component.js +73 -31
  26. package/esm5/modules/progress-indicator/progress-indicator-reset-button/progress-indicator-reset-button.component.js +14 -1
  27. package/esm5/modules/progress-indicator/progress-indicator-status-marker/progress-indicator-status-marker.component.js +27 -8
  28. package/esm5/modules/progress-indicator/progress-indicator-title/progress-indicator-title.component.js +6 -3
  29. package/esm5/modules/progress-indicator/progress-indicator.component.js +28 -2
  30. package/esm5/modules/progress-indicator/progress-indicator.module.js +4 -2
  31. package/esm5/modules/progress-indicator/types/progress-indicator-action-click-args.js +1 -1
  32. package/esm5/modules/progress-indicator/types/progress-indicator-action-click-progress-handler.js +3 -2
  33. package/esm5/modules/progress-indicator/types/progress-indicator-change.js +1 -1
  34. package/esm5/modules/progress-indicator/types/progress-indicator-item-status.js +13 -1
  35. package/esm5/modules/progress-indicator/types/progress-indicator-message-type.js +20 -1
  36. package/esm5/modules/progress-indicator/types/progress-indicator-message.js +1 -1
  37. package/esm5/modules/progress-indicator/types/progress-indicator-mode.js +7 -1
  38. package/esm5/modules/progress-indicator/types/progress-indicator-nav-button-type.js +1 -1
  39. package/esm5/public_api.js +6 -0
  40. package/esm5/skyux-progress-indicator.js +2 -2
  41. package/fesm2015/skyux-progress-indicator.js +180 -41
  42. package/fesm2015/skyux-progress-indicator.js.map +1 -1
  43. package/fesm5/skyux-progress-indicator.js +185 -41
  44. package/fesm5/skyux-progress-indicator.js.map +1 -1
  45. package/modules/progress-indicator/progress-indicator-item/progress-indicator-item.component.d.ts +12 -3
  46. package/modules/progress-indicator/progress-indicator-nav-button/progress-indicator-nav-button.component.d.ts +41 -9
  47. package/modules/progress-indicator/progress-indicator-reset-button/progress-indicator-reset-button.component.d.ts +19 -1
  48. package/modules/progress-indicator/progress-indicator-status-marker/progress-indicator-status-marker.component.d.ts +16 -8
  49. package/modules/progress-indicator/progress-indicator-title/progress-indicator-title.component.d.ts +3 -0
  50. package/modules/progress-indicator/progress-indicator.component.d.ts +40 -9
  51. package/modules/progress-indicator/types/progress-indicator-action-click-args.d.ts +9 -0
  52. package/modules/progress-indicator/types/progress-indicator-action-click-progress-handler.d.ts +2 -1
  53. package/modules/progress-indicator/types/progress-indicator-change.d.ts +9 -0
  54. package/modules/progress-indicator/types/progress-indicator-item-status.d.ts +12 -0
  55. package/modules/progress-indicator/types/progress-indicator-message-type.d.ts +19 -0
  56. package/modules/progress-indicator/types/progress-indicator-message.d.ts +7 -4
  57. package/modules/progress-indicator/types/progress-indicator-mode.d.ts +6 -0
  58. package/modules/progress-indicator/types/progress-indicator-nav-button-type.d.ts +4 -1
  59. package/package.json +8 -7
  60. package/{index.d.ts → public_api.d.ts} +0 -0
  61. package/skyux-progress-indicator.d.ts +1 -1
  62. package/skyux-progress-indicator.metadata.json +1 -1
  63. package/src/assets/img/guidelines/passive-indicator/passive-progress-anatomy.png +0 -0
  64. package/src/assets/img/guidelines/passive-indicator/passive-progress-usage-1.png +0 -0
  65. package/src/assets/img/guidelines/passive-indicator/passive-progress-usage-2.png +0 -0
  66. package/src/assets/img/guidelines/passive-indicator/passive-progress-usage-3.png +0 -0
  67. package/src/assets/img/guidelines/passive-indicator/passive-progress-usage-4.png +0 -0
  68. package/src/assets/img/guidelines/passive-indicator/passive-progress-usage-5.png +0 -0
  69. package/src/assets/img/guidelines/passive-indicator/passive-progress-usage-6.png +0 -0
  70. package/src/assets/img/guidelines/passive-indicator/waterfall-progress-anatomy.png +0 -0
  71. package/src/assets/img/guidelines/passive-indicator/waterfall-progress-layout.png +0 -0
  72. package/src/assets/img/guidelines/passive-indicator/waterfall-progress-usage-1.png +0 -0
  73. package/src/assets/img/guidelines/passive-indicator/waterfall-progress-usage-2.png +0 -0
  74. package/src/assets/img/guidelines/passive-indicator/waterfall-progress-usage-3.png +0 -0
  75. package/src/assets/img/guidelines/passive-indicator/waterfall-progress-usage-4.png +0 -0
  76. package/src/assets/img/guidelines/passive-indicator/waterfall-progress-usage-5.png +0 -0
  77. package/src/assets/img/guidelines/passive-indicator/waterfall-progress-usage-6.png +0 -0
  78. package/src/assets/img/guidelines/passive-indicator/waterfall-progress-usage-7.png +0 -0
  79. package/src/assets/img/guidelines/passive-indicator/waterfall-progress-usage-8.png +0 -0
  80. package/src/assets/img/guidelines/passive-indicator/waterfall-progress-usage-9.png +0 -0
  81. package/esm2015/index.js +0 -6
  82. package/esm5/index.js +0 -6
@@ -4,6 +4,7 @@ import { CommonModule } from '@angular/common';
4
4
  import { SkyAppWindowRef } from '@skyux/core';
5
5
  import { getStringForLocale, SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule } from '@skyux/i18n';
6
6
  import { SkyIconModule } from '@skyux/indicators';
7
+ import { SkyThemeService, SkyThemeModule } from '@skyux/theme';
7
8
  import { Subject } from 'rxjs';
8
9
  import { takeUntil, delay, distinctUntilChanged } from 'rxjs/operators';
9
10
 
@@ -33,12 +34,28 @@ SkyProgressIndicatorResourcesModule = __decorate([
33
34
 
34
35
  var SkyProgressIndicatorItemStatus;
35
36
  (function (SkyProgressIndicatorItemStatus) {
37
+ /**
38
+ * Indicates the item is active.
39
+ */
36
40
  SkyProgressIndicatorItemStatus[SkyProgressIndicatorItemStatus["Active"] = 0] = "Active";
41
+ /**
42
+ * Indicates the item is complete.
43
+ */
37
44
  SkyProgressIndicatorItemStatus[SkyProgressIndicatorItemStatus["Complete"] = 1] = "Complete";
45
+ /**
46
+ * Indicates the item is incomplete.
47
+ */
38
48
  SkyProgressIndicatorItemStatus[SkyProgressIndicatorItemStatus["Incomplete"] = 2] = "Incomplete";
49
+ /**
50
+ * Indicates the item is pending.
51
+ */
39
52
  SkyProgressIndicatorItemStatus[SkyProgressIndicatorItemStatus["Pending"] = 3] = "Pending";
40
53
  })(SkyProgressIndicatorItemStatus || (SkyProgressIndicatorItemStatus = {}));
41
54
 
55
+ /**
56
+ * Specifies a step to include in the progress indicator. Each step requires a label,
57
+ * and you can also specify step details within the `sky-progress-indicator-item` element.
58
+ */
42
59
  let SkyProgressIndicatorItemComponent = class SkyProgressIndicatorItemComponent {
43
60
  constructor(changeDetector) {
44
61
  this.changeDetector = changeDetector;
@@ -98,24 +115,49 @@ __decorate([
98
115
  SkyProgressIndicatorItemComponent = __decorate([
99
116
  Component({
100
117
  selector: 'sky-progress-indicator-item',
101
- template: "<div *ngIf=\"isVisible\"\n class=\"sky-progress-indicator-item\"\n [ngClass]=\"'sky-progress-indicator-item-status-' + statusName\"\n>\n <sky-progress-indicator-status-marker *ngIf=\"showStatusMarker\"\n [status]=\"status\"\n >\n </sky-progress-indicator-status-marker>\n\n <div\n class=\"sky-progress-indicator-item-content\"\n >\n <div *ngIf=\"showTitle\"\n aria-level=\"2\"\n class=\"sky-progress-indicator-item-heading\"\n role=\"heading\"\n [ngClass]=\"{ 'sky-deemphasized': statusName === 'pending' }\"\n >\n {{ formattedTitle }}\n </div>\n <div\n class=\"sky-progress-indicator-item-body\"\n >\n <ng-template [ngIf]=\"statusName !== 'incomplete'\">\n <ng-content></ng-content>\n </ng-template>\n </div>\n </div>\n</div>\n",
118
+ template: "<div *ngIf=\"isVisible\"\n class=\"sky-progress-indicator-item\"\n [ngClass]=\"'sky-progress-indicator-item-status-' + statusName\"\n>\n <sky-progress-indicator-status-marker *ngIf=\"showStatusMarker\"\n [status]=\"status\"\n >\n </sky-progress-indicator-status-marker>\n\n <div\n class=\"sky-progress-indicator-item-content\"\n >\n <div *ngIf=\"showTitle\"\n aria-level=\"2\"\n class=\"sky-progress-indicator-item-heading\"\n role=\"heading\"\n [ngClass]=\"{\n 'sky-deemphasized': statusName === 'pending'\n }\"\n [skyThemeClass]=\"{\n 'sky-font-display-3': 'modern'\n }\"\n >\n {{ formattedTitle }}\n </div>\n <div\n class=\"sky-progress-indicator-item-body\"\n >\n <ng-template [ngIf]=\"statusName !== 'incomplete'\">\n <ng-content></ng-content>\n </ng-template>\n </div>\n </div>\n</div>\n",
102
119
  changeDetection: ChangeDetectionStrategy.OnPush,
103
- styles: [".sky-progress-indicator-item{display:flex;margin-bottom:-1px}.sky-progress-indicator-item-content{flex:1 1 100%}.sky-progress-indicator-item-body{min-height:20px;padding-top:10px;padding-bottom:30px}.sky-progress-indicator-item-status-incomplete .sky-progress-indicator-item-body{padding:0}"]
120
+ styles: [".sky-progress-indicator-item{display:flex;margin-bottom:-1px}.sky-progress-indicator-item-content{flex:1 1 100%}.sky-progress-indicator-item-body{min-height:20px;padding-top:10px;padding-bottom:30px}.sky-progress-indicator-item-status-incomplete .sky-progress-indicator-item-body{padding:0}:host-context(.sky-theme-modern) .sky-progress-indicator-item{margin:0}:host-context(.sky-theme-modern) .sky-progress-indicator-item-body{padding:20px 0 30px}:host-context(.sky-theme-modern) .sky-progress-indicator-item-body:empty{padding:0}.sky-theme-modern .sky-progress-indicator-item{margin:0}.sky-theme-modern .sky-progress-indicator-item-body{padding:20px 0 30px}.sky-theme-modern .sky-progress-indicator-item-body:empty{padding:0}"]
104
121
  })
105
122
  ], SkyProgressIndicatorItemComponent);
106
123
 
107
124
  var SkyProgressIndicatorDisplayMode;
108
125
  (function (SkyProgressIndicatorDisplayMode) {
126
+ /**
127
+ * Specifies a vertical layout for the progress indicator.
128
+ */
109
129
  SkyProgressIndicatorDisplayMode[SkyProgressIndicatorDisplayMode["Vertical"] = 0] = "Vertical";
130
+ /**
131
+ * Specifies a horizontal layout for the progress indicator.
132
+ */
110
133
  SkyProgressIndicatorDisplayMode[SkyProgressIndicatorDisplayMode["Horizontal"] = 1] = "Horizontal";
111
134
  })(SkyProgressIndicatorDisplayMode || (SkyProgressIndicatorDisplayMode = {}));
112
135
 
113
136
  var SkyProgressIndicatorMessageType;
114
137
  (function (SkyProgressIndicatorMessageType) {
138
+ /**
139
+ * Indicates that the current step is complete.
140
+ * This completes the active item and moves to the next item.
141
+ */
115
142
  SkyProgressIndicatorMessageType[SkyProgressIndicatorMessageType["Progress"] = 0] = "Progress";
143
+ /**
144
+ * Indicates that progress should return to the previous step.
145
+ * This moves from the active item to the item that precedes it.
146
+ */
116
147
  SkyProgressIndicatorMessageType[SkyProgressIndicatorMessageType["Regress"] = 1] = "Regress";
148
+ /**
149
+ * Indicates that progress is incomplete.
150
+ * This marks all items as incomplete and sets the first item as the active item.
151
+ */
117
152
  SkyProgressIndicatorMessageType[SkyProgressIndicatorMessageType["Reset"] = 2] = "Reset";
153
+ /**
154
+ * Indicates that progress is complete.
155
+ * This marks all items as complete and sets the last item as the active item.
156
+ */
118
157
  SkyProgressIndicatorMessageType[SkyProgressIndicatorMessageType["Finish"] = 3] = "Finish";
158
+ /**
159
+ * Indicates that progress should move to the item indicated by the `data.activeIndex` property.
160
+ */
119
161
  SkyProgressIndicatorMessageType[SkyProgressIndicatorMessageType["GoTo"] = 4] = "GoTo";
120
162
  })(SkyProgressIndicatorMessageType || (SkyProgressIndicatorMessageType = {}));
121
163
 
@@ -123,10 +165,21 @@ let SkyProgressIndicatorComponent = class SkyProgressIndicatorComponent {
123
165
  constructor(changeDetector, windowRef) {
124
166
  this.changeDetector = changeDetector;
125
167
  this.windowRef = windowRef;
168
+ /**
169
+ * Fires when the progress indicator changes the status of an item.
170
+ */
126
171
  this.progressChanges = new EventEmitter();
127
172
  this.ngUnsubscribe = new Subject();
128
173
  this._messageStream = new Subject();
129
174
  }
175
+ /**
176
+ * Specifies whether to display the progress indicator vertically or horizontally.
177
+ * For [passive progress indicators](https://developer.blackbaud.com/skyux-progress-indicator/docs/passive-indicator)
178
+ * and [waterfall progress indicators](https://developer.blackbaud.com/skyux/components/progress-indicator/waterfall-progress-indicator),
179
+ * use the vertical display mode. For [modal wizards](https://developer.blackbaud.com/skyux/components/wizard),
180
+ * use the horizontal display mode.
181
+ * @default vertical
182
+ */
130
183
  set displayMode(value) {
131
184
  this._displayMode = value;
132
185
  }
@@ -136,6 +189,11 @@ let SkyProgressIndicatorComponent = class SkyProgressIndicatorComponent {
136
189
  }
137
190
  return this._displayMode;
138
191
  }
192
+ /**
193
+ * Indicates whether the progress indicator is passive. Passive progress indicators inform users of
194
+ * progress that concerns them but that they are not responsible for, and they must use the vertical display mode.
195
+ * @default false
196
+ */
139
197
  set isPassive(value) {
140
198
  this._isPassive = value;
141
199
  }
@@ -146,11 +204,21 @@ let SkyProgressIndicatorComponent = class SkyProgressIndicatorComponent {
146
204
  }
147
205
  return this._isPassive || false;
148
206
  }
207
+ /**
208
+ * Specifies an observable of `SkyProgressIndicatorMessage` that determines the status to
209
+ * display for items in the progress indicator. The message stream is a queue of
210
+ * commanding messages to change the state of the progress indicator based on the message type.
211
+ */
149
212
  set messageStream(value) {
150
213
  if (value) {
151
214
  this._messageStream = value;
152
215
  }
153
216
  }
217
+ /**
218
+ * Specifies the index for the item to make active when the progress indicator
219
+ * loads. All steps that precede the active item are marked as complete, and all steps
220
+ * that follow the active item are marked as incomplete.
221
+ */
154
222
  set startingIndex(value) {
155
223
  this._startingIndex = value;
156
224
  }
@@ -387,12 +455,13 @@ SkyProgressIndicatorComponent = __decorate([
387
455
  selector: 'sky-progress-indicator',
388
456
  template: "<div\n class=\"sky-progress-indicator\"\n [ngClass]=\"cssClassNames\"\n>\n <div *ngIf=\"displayModeName === 'horizontal'\"\n class=\"sky-progress-indicator-horizontal-status-markers\"\n >\n <sky-progress-indicator-status-marker *ngFor=\"let status of itemStatuses\"\n [displayMode]=\"displayMode\"\n [status]=\"status\"\n >\n </sky-progress-indicator-status-marker>\n </div>\n <ng-content></ng-content>\n</div>\n",
389
457
  changeDetection: ChangeDetectionStrategy.OnPush,
390
- styles: [".sky-progress-indicator ::ng-deep sky-progress-indicator-item:last-of-type .sky-progress-indicator-status-marker-line{display:none}.sky-progress-indicator-mode-vertical{max-width:400px;min-width:250px;margin:0 auto}.sky-progress-indicator-mode-vertical ::ng-deep .sky-progress-indicator-item-body{text-align:center;margin-left:-30px}.sky-progress-indicator-mode-vertical ::ng-deep sky-progress-indicator-nav-button,.sky-progress-indicator-mode-vertical ::ng-deep sky-progress-indicator-reset-button{display:block;padding-top:30px;padding-left:15px}.sky-progress-indicator-mode-horizontal ::ng-deep .sky-progress-indicator-item-heading{font-weight:600;font-size:16px}.sky-progress-indicator-horizontal-status-markers{display:flex;margin-bottom:10px}.sky-progress-indicator-horizontal-status-markers ::ng-deep sky-progress-indicator-status-marker{flex-basis:45px;flex-grow:0}.sky-progress-indicator-horizontal-status-markers ::ng-deep sky-progress-indicator-status-marker:first-of-type{margin-left:-5px}.sky-progress-indicator-horizontal-status-markers ::ng-deep sky-progress-indicator-status-marker:first-of-type .sky-progress-indicator-status-marker .sky-progress-indicator-status-marker-icon:before{display:none!important}.sky-progress-indicator-horizontal-status-markers ::ng-deep sky-progress-indicator-status-marker:last-of-type .sky-progress-indicator-status-marker-line{display:none}"]
458
+ styles: [".sky-progress-indicator ::ng-deep sky-progress-indicator-item:last-of-type .sky-progress-indicator-status-marker-line{display:none}.sky-progress-indicator-mode-vertical{max-width:400px;min-width:250px;margin:0 auto}.sky-progress-indicator-mode-vertical ::ng-deep .sky-progress-indicator-item-body{text-align:center;margin-left:-30px}.sky-progress-indicator-mode-vertical ::ng-deep sky-progress-indicator-nav-button,.sky-progress-indicator-mode-vertical ::ng-deep sky-progress-indicator-reset-button{display:block;padding-top:30px;padding-left:15px}::ng-deep .sky-popover ::ng-deep .sky-progress-indicator-mode-vertical{min-width:auto}.sky-progress-indicator-mode-horizontal ::ng-deep .sky-progress-indicator-item-heading{font-weight:600;font-size:16px}.sky-progress-indicator-horizontal-status-markers{display:flex;margin-bottom:10px}.sky-progress-indicator-horizontal-status-markers ::ng-deep sky-progress-indicator-status-marker{flex-basis:45px;flex-grow:0}.sky-progress-indicator-horizontal-status-markers ::ng-deep sky-progress-indicator-status-marker:first-of-type{margin-left:-5px}.sky-progress-indicator-horizontal-status-markers ::ng-deep sky-progress-indicator-status-marker:first-of-type .sky-progress-indicator-status-marker .sky-progress-indicator-status-marker-icon:before{display:none!important}.sky-progress-indicator-horizontal-status-markers ::ng-deep sky-progress-indicator-status-marker:last-of-type .sky-progress-indicator-status-marker-line{display:none}:host-context(.sky-theme-modern) .sky-progress-indicator-mode-horizontal ::ng-deep .sky-progress-indicator-item-heading{font-weight:inherit;font-size:inherit}:host-context(.sky-theme-modern) .sky-progress-indicator-mode-vertical ::ng-deep sky-progress-indicator-nav-button,:host-context(.sky-theme-modern) .sky-progress-indicator-mode-vertical ::ng-deep sky-progress-indicator-reset-button{padding:0;margin:60px 0 0;text-align:center}.sky-theme-modern .sky-progress-indicator-mode-horizontal ::ng-deep .sky-progress-indicator-item-heading{font-weight:inherit;font-size:inherit}.sky-theme-modern .sky-progress-indicator-mode-vertical ::ng-deep sky-progress-indicator-nav-button,.sky-theme-modern .sky-progress-indicator-mode-vertical ::ng-deep sky-progress-indicator-reset-button{padding:0;margin:60px 0 0;text-align:center}"]
391
459
  })
392
460
  ], SkyProgressIndicatorComponent);
393
461
 
394
462
  /**
395
- * Allows the consumer to trigger step advancement manually.
463
+ * Allows the consumer to decide whether the button's action should be completed successfully.
464
+ * The handler is provided with all nav button types.
396
465
  */
397
466
  class SkyProgressIndicatorActionClickProgressHandler {
398
467
  /**
@@ -404,13 +473,27 @@ class SkyProgressIndicatorActionClickProgressHandler {
404
473
  }
405
474
  }
406
475
 
476
+ /**
477
+ * Displays a button to navigate the steps in modal wizards. We recommend against using it in
478
+ * passive progress indicators and waterfall progress indicators.
479
+ */
407
480
  let SkyProgressIndicatorNavButtonComponent = class SkyProgressIndicatorNavButtonComponent {
408
481
  constructor(changeDetector, parentComponent) {
409
482
  this.changeDetector = changeDetector;
410
483
  this.parentComponent = parentComponent;
484
+ /**
485
+ * Fires when users select the nav button and emits a `SkyProgressIndicatorActionClickArgs`
486
+ * object that is passed into the callback function to allow consumers to decide whether
487
+ * the button’s action should complete successfully.
488
+ */
411
489
  this.actionClick = new EventEmitter();
412
490
  this.ngUnsubscribe = new Subject();
413
491
  }
492
+ /**
493
+ * Specifies the type of nav button to include.
494
+ * The valid options are `finish`, `next`, `previous`, and `reset`.
495
+ * @default next
496
+ */
414
497
  set buttonType(value) {
415
498
  this._buttonType = value;
416
499
  }
@@ -420,6 +503,10 @@ let SkyProgressIndicatorNavButtonComponent = class SkyProgressIndicatorNavButton
420
503
  }
421
504
  return this._buttonType;
422
505
  }
506
+ /**
507
+ * Indicates whether to disable the nav button.
508
+ * @default false
509
+ */
423
510
  set disabled(value) {
424
511
  this._disabled = value;
425
512
  this.changeDetector.markForCheck();
@@ -438,6 +525,48 @@ let SkyProgressIndicatorNavButtonComponent = class SkyProgressIndicatorNavButton
438
525
  }
439
526
  return this._disabled || false;
440
527
  }
528
+ /**
529
+ * Specifies the progress indicator component to associate with the nav button.
530
+ * @required
531
+ */
532
+ set progressIndicator(value) {
533
+ this._progressIndicator = value;
534
+ if (value) {
535
+ if (this.buttonType === 'finish') {
536
+ // The `hasFinishButton` field was added to support legacy API.
537
+ // Some implementations only include a next button; we cannot
538
+ // assume that every implementation includes both a finish button and a next button.
539
+ this._progressIndicator.hasFinishButton = true;
540
+ }
541
+ this._progressIndicator.progressChanges
542
+ .pipe(distinctUntilChanged(), takeUntil(this.ngUnsubscribe))
543
+ .subscribe((change) => {
544
+ this.lastProgressChange = change;
545
+ this.updateButtonVisibility(change);
546
+ });
547
+ }
548
+ else {
549
+ if (!this.parentTimeout) {
550
+ this.parentTimeout = window.setTimeout(() => {
551
+ if (!this.progressIndicator) {
552
+ throw new Error('The `<sky-progress-indicator-nav-button>` component requires a reference to ' +
553
+ 'the `<sky-progress-indicator>` component it controls. For example:\n' +
554
+ '<sky-progress-indicator\n' +
555
+ ' #myProgressIndicator\n' +
556
+ '>\n' +
557
+ '</sky-progress-indicator>\n' +
558
+ '<sky-progress-indicator-nav-button\n' +
559
+ ' [progressIndicator]="myProgressIndicator"\n' +
560
+ '>\n' +
561
+ '</sky-progress-indicator-nav-button>');
562
+ }
563
+ }, 50);
564
+ }
565
+ }
566
+ }
567
+ get progressIndicator() {
568
+ return this._progressIndicator;
569
+ }
441
570
  get cssClassNames() {
442
571
  const buttonType = this.buttonType;
443
572
  const classNames = [
@@ -467,34 +596,13 @@ let SkyProgressIndicatorNavButtonComponent = class SkyProgressIndicatorNavButton
467
596
  get isVisible() {
468
597
  return this._isVisible || false;
469
598
  }
470
- ngOnInit() {
471
- if (!this.progressIndicator) {
472
- if (!this.parentComponent) {
473
- throw new Error('The `<sky-progress-indicator-nav-button>` component requires a reference to ' +
474
- 'the `<sky-progress-indicator>` component it controls. For example:\n' +
475
- '<sky-progress-indicator\n' +
476
- ' #myProgressIndicator\n' +
477
- '>\n' +
478
- '</sky-progress-indicator>\n' +
479
- '<sky-progress-indicator-nav-button\n' +
480
- ' [progressIndicator]="myProgressIndicator"\n' +
481
- '>\n' +
482
- '</sky-progress-indicator-nav-button>');
483
- }
599
+ ngAfterViewInit() {
600
+ if (!this.progressIndicator && this.parentComponent) {
484
601
  this.progressIndicator = this.parentComponent;
485
602
  }
486
- if (this.buttonType === 'finish') {
487
- // The `hasFinishButton` field was added to support legacy API.
488
- // Some implementations only include a next button; we cannot
489
- // assume that every implementation includes both a finish button and a next button.
490
- this.progressIndicator.hasFinishButton = true;
491
- }
492
- this.progressIndicator.progressChanges
493
- .pipe(distinctUntilChanged(), takeUntil(this.ngUnsubscribe))
494
- .subscribe((change) => {
495
- this.lastProgressChange = change;
496
- this.updateButtonVisibility(change);
497
- });
603
+ else if (!this.progressIndicator) {
604
+ this.progressIndicator = undefined;
605
+ }
498
606
  }
499
607
  ngOnDestroy() {
500
608
  this.ngUnsubscribe.next();
@@ -503,7 +611,6 @@ let SkyProgressIndicatorNavButtonComponent = class SkyProgressIndicatorNavButton
503
611
  }
504
612
  onClick(event) {
505
613
  event.preventDefault();
506
- event.stopPropagation();
507
614
  let type;
508
615
  switch (this.buttonType) {
509
616
  case 'finish':
@@ -574,27 +681,40 @@ __decorate([
574
681
  ], SkyProgressIndicatorNavButtonComponent.prototype, "disabled", null);
575
682
  __decorate([
576
683
  Input()
577
- ], SkyProgressIndicatorNavButtonComponent.prototype, "progressIndicator", void 0);
684
+ ], SkyProgressIndicatorNavButtonComponent.prototype, "progressIndicator", null);
578
685
  __decorate([
579
686
  Output()
580
687
  ], SkyProgressIndicatorNavButtonComponent.prototype, "actionClick", void 0);
581
688
  SkyProgressIndicatorNavButtonComponent = __decorate([
582
689
  Component({
583
690
  selector: 'sky-progress-indicator-nav-button',
584
- template: "<button *ngIf=\"isVisible\"\n class=\"sky-btn sky-margin-inline-compact\"\n type=\"button\"\n [disabled]=\"disabled\"\n [ngClass]=\"cssClassNames\"\n (click)=\"onClick($event)\"\n>\n {{ buttonText || (buttonLabelResourceString | skyLibResources) }}\n</button>\n",
691
+ template: "<button *ngIf=\"isVisible\"\n class=\"sky-btn\"\n type=\"button\"\n [disabled]=\"disabled\"\n [ngClass]=\"cssClassNames\"\n [skyThemeClass]=\"{\n 'sky-margin-inline-compact' : 'default',\n 'sky-btn-link' : 'modern'\n }\"\n (click)=\"onClick($event)\"\n>\n {{ buttonText || (buttonLabelResourceString | skyLibResources) }}\n</button>\n",
585
692
  changeDetection: ChangeDetectionStrategy.OnPush
586
693
  }),
587
694
  __param(1, Optional())
588
695
  ], SkyProgressIndicatorNavButtonComponent);
589
696
 
697
+ /**
698
+ * Displays a button to mark all items in the progress indicator as incomplete and set the
699
+ * first item as the active item. The steps after the active item remain incomplete until
700
+ * users reach them in their sequential order.
701
+ */
590
702
  let SkyProgressIndicatorResetButtonComponent = class SkyProgressIndicatorResetButtonComponent {
591
703
  constructor(changeDetector) {
592
704
  this.changeDetector = changeDetector;
705
+ /**
706
+ * Fires when users select the reset button that marks all items as incomplete and sets the
707
+ * first item as the active item.
708
+ */
593
709
  this.resetClick = new EventEmitter();
594
710
  console.warn('[Deprecation warning] The `<sky-progress-indicator-reset-button>` component is ' +
595
711
  'deprecated. Please use the `<sky-progress-indicator-nav-button>` component instead, with ' +
596
712
  '`buttonType` set to "reset".');
597
713
  }
714
+ /**
715
+ * Indicates whether to disable the reset button.
716
+ * @default false
717
+ */
598
718
  set disabled(value) {
599
719
  this._disabled = value;
600
720
  this.changeDetector.markForCheck();
@@ -632,9 +752,18 @@ SkyProgressIndicatorResetButtonComponent = __decorate([
632
752
  })
633
753
  ], SkyProgressIndicatorResetButtonComponent);
634
754
 
755
+ /**
756
+ * Specifies the content to display in the status marker.
757
+ * @internal
758
+ */
635
759
  let SkyProgressIndicatorStatusMarkerComponent = class SkyProgressIndicatorStatusMarkerComponent {
636
- constructor(changeDetector) {
760
+ constructor(changeDetector, themeSvc) {
637
761
  this.changeDetector = changeDetector;
762
+ this.ngUnsubscribe = new Subject();
763
+ // Update icons when theme changes.
764
+ themeSvc === null || themeSvc === void 0 ? void 0 : themeSvc.settingsChange.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
765
+ this.changeDetector.markForCheck();
766
+ });
638
767
  }
639
768
  set displayMode(value) {
640
769
  this._displayMode = value;
@@ -681,9 +810,14 @@ let SkyProgressIndicatorStatusMarkerComponent = class SkyProgressIndicatorStatus
681
810
  }
682
811
  return name;
683
812
  }
813
+ ngOnDestroy() {
814
+ this.ngUnsubscribe.next();
815
+ this.ngUnsubscribe.complete();
816
+ }
684
817
  };
685
818
  SkyProgressIndicatorStatusMarkerComponent.ctorParameters = () => [
686
- { type: ChangeDetectorRef }
819
+ { type: ChangeDetectorRef },
820
+ { type: SkyThemeService, decorators: [{ type: Optional }] }
687
821
  ];
688
822
  __decorate([
689
823
  Input()
@@ -694,20 +828,24 @@ __decorate([
694
828
  SkyProgressIndicatorStatusMarkerComponent = __decorate([
695
829
  Component({
696
830
  selector: 'sky-progress-indicator-status-marker',
697
- template: "<div\n class=\"sky-progress-indicator-status-marker\"\n role=\"presentation\"\n [ngClass]=\"cssClassNames\"\n>\n <div\n class=\"sky-progress-indicator-status-marker-icon\"\n >\n <sky-icon *ngIf=\"statusName === 'complete'\"\n icon=\"check\"\n >\n </sky-icon>\n </div>\n <div\n class=\"sky-progress-indicator-status-marker-line\"\n >\n </div>\n</div>\n",
831
+ template: "<div\n class=\"sky-progress-indicator-status-marker\"\n role=\"presentation\"\n [ngClass]=\"cssClassNames\"\n>\n <div *skyThemeIf=\"'default'\"\n class=\"sky-progress-indicator-status-marker-icon\"\n >\n <sky-icon *ngIf=\"statusName === 'complete'\"\n icon=\"check\"\n >\n </sky-icon>\n </div>\n <div *skyThemeIf=\"'modern'\"\n class=\"sky-progress-indicator-status-marker-icon\"\n >\n <sky-icon *ngIf=\"statusName === 'complete'\"\n icon=\"check\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </div>\n <div\n class=\"sky-progress-indicator-status-marker-line\"\n >\n </div>\n</div>\n",
698
832
  changeDetection: ChangeDetectionStrategy.OnPush,
699
- styles: [".sky-progress-indicator-status-marker{display:flex;height:100%}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-vertical{flex-basis:15px;flex-grow:0;flex-direction:column;margin-right:15px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-vertical .sky-progress-indicator-status-marker-icon{margin-top:1px;width:15px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-vertical .sky-progress-indicator-status-marker-icon>::ng-deep sky-icon{margin-left:-1px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-vertical .sky-progress-indicator-status-marker-line{margin:0 auto;width:1px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal{flex-direction:row;width:100%;padding-left:5px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal .sky-progress-indicator-status-marker-icon{height:15px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal .sky-progress-indicator-status-marker-line{margin:auto 0;height:1px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal.sky-progress-indicator-status-marker-status-complete .sky-progress-indicator-status-marker-icon{border:0;margin-right:5px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal.sky-progress-indicator-status-marker-status-active .sky-progress-indicator-status-marker-icon{position:relative}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal.sky-progress-indicator-status-marker-status-active .sky-progress-indicator-status-marker-icon:before{content:\"\";display:block;width:5px;height:1px;background-color:#72bf44;position:absolute;left:-7px;top:5px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal.sky-progress-indicator-status-marker-status-incomplete .sky-progress-indicator-status-marker-icon{position:relative}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal.sky-progress-indicator-status-marker-status-incomplete .sky-progress-indicator-status-marker-icon:before{content:\"\";display:block;width:5px;height:1px;background-color:#cdcfd2;position:absolute;left:-7px;top:5px}.sky-progress-indicator-status-marker-icon{border-radius:15px;border:2px solid #cdcfd2;flex:0 0 15px}.sky-progress-indicator-status-marker-line{background-color:#cdcfd2;flex:1 0 auto}.sky-progress-indicator-status-marker-status-active .sky-progress-indicator-status-marker-icon{background-color:#72bf44;border-color:transparent}.sky-progress-indicator-status-marker-status-pending .sky-progress-indicator-status-marker-icon{border-color:#72bf44}.sky-progress-indicator-status-marker-status-complete .sky-progress-indicator-status-marker-icon{border-color:transparent;color:#72bf44;margin-top:0}.sky-progress-indicator-status-marker-status-complete .sky-progress-indicator-status-marker-icon>::ng-deep sky-icon{display:inline-flex;vertical-align:top}.sky-progress-indicator-status-marker-status-complete .sky-progress-indicator-status-marker-line{background-color:#72bf44}"]
700
- })
833
+ styles: [".sky-progress-indicator-status-marker{display:flex;height:100%}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-vertical{flex-basis:15px;flex-grow:0;flex-direction:column;margin-right:15px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-vertical .sky-progress-indicator-status-marker-icon{margin-top:1px;width:15px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-vertical .sky-progress-indicator-status-marker-icon>::ng-deep sky-icon{margin-left:-1px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-vertical .sky-progress-indicator-status-marker-line{margin:0 auto;width:1px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal{flex-direction:row;width:100%;padding-left:5px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal .sky-progress-indicator-status-marker-icon{height:15px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal .sky-progress-indicator-status-marker-line{margin:auto 0;height:1px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal.sky-progress-indicator-status-marker-status-complete .sky-progress-indicator-status-marker-icon{border:0;margin-right:5px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal.sky-progress-indicator-status-marker-status-active .sky-progress-indicator-status-marker-icon{position:relative}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal.sky-progress-indicator-status-marker-status-active .sky-progress-indicator-status-marker-icon:before{content:\"\";display:block;width:5px;height:1px;background-color:#72bf44;position:absolute;left:-7px;top:5px}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal.sky-progress-indicator-status-marker-status-incomplete .sky-progress-indicator-status-marker-icon{position:relative}.sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal.sky-progress-indicator-status-marker-status-incomplete .sky-progress-indicator-status-marker-icon:before{content:\"\";display:block;width:5px;height:1px;background-color:#cdcfd2;position:absolute;left:-7px;top:5px}.sky-progress-indicator-status-marker-icon{border-radius:15px;border:2px solid #cdcfd2;flex:0 0 15px}.sky-progress-indicator-status-marker-line{background-color:#cdcfd2;flex:1 0 auto}.sky-progress-indicator-status-marker-status-active .sky-progress-indicator-status-marker-icon{background-color:#72bf44;border-color:transparent}.sky-progress-indicator-status-marker-status-pending .sky-progress-indicator-status-marker-icon{border-color:#72bf44}.sky-progress-indicator-status-marker-status-complete .sky-progress-indicator-status-marker-icon{border-color:transparent;color:#72bf44;margin-top:0}.sky-progress-indicator-status-marker-status-complete .sky-progress-indicator-status-marker-icon>::ng-deep sky-icon{display:inline-flex;vertical-align:top}.sky-progress-indicator-status-marker-status-complete .sky-progress-indicator-status-marker-line{background-color:#72bf44}:host-context(.sky-theme-modern) .sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-vertical{position:relative;top:3px;margin-right:20px}:host-context(.sky-theme-modern) .sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-vertical .sky-progress-indicator-status-marker-icon{width:17px}:host-context(.sky-theme-modern) .sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal .sky-progress-indicator-status-marker-icon{height:17px;top:1px}:host-context(.sky-theme-modern) .sky-progress-indicator-status-marker-icon{border-radius:17px;flex:0 0 17px}.sky-theme-modern .sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-vertical{position:relative;top:3px;margin-right:20px}.sky-theme-modern .sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-vertical .sky-progress-indicator-status-marker-icon{width:17px}.sky-theme-modern .sky-progress-indicator-status-marker.sky-progress-indicator-status-marker-mode-horizontal .sky-progress-indicator-status-marker-icon{height:17px;top:1px}.sky-theme-modern .sky-progress-indicator-status-marker-icon{border-radius:17px;flex:0 0 17px}"]
834
+ }),
835
+ __param(1, Optional())
701
836
  ], SkyProgressIndicatorStatusMarkerComponent);
702
837
 
838
+ /**
839
+ * Specifies a header to display above the progress indicator.
840
+ */
703
841
  let SkyProgressIndicatorTitleComponent = class SkyProgressIndicatorTitleComponent {
704
842
  };
705
843
  SkyProgressIndicatorTitleComponent = __decorate([
706
844
  Component({
707
845
  selector: 'sky-progress-indicator-title',
708
- template: "<div\n aria-level=\"1\"\n class=\"sky-progress-indicator-title sky-section-heading\"\n role=\"heading\"\n>\n <ng-content></ng-content>\n</div>\n",
846
+ template: "<div\n aria-level=\"1\"\n class=\"sky-progress-indicator-title\"\n role=\"heading\"\n [skyThemeClass]=\"{\n 'sky-section-heading': 'default',\n 'sky-font-heading-1' : 'modern'\n }\"\n>\n <ng-content></ng-content>\n</div>\n",
709
847
  changeDetection: ChangeDetectionStrategy.OnPush,
710
- styles: [".sky-progress-indicator-title{line-height:1.1;margin:0 0 30px;text-align:center}"]
848
+ styles: [".sky-progress-indicator-title{line-height:1.1;margin:0 0 30px;text-align:center}:host-context(.sky-theme-modern) .sky-progress-indicator-title{line-height:inherit;margin:0 0 60px}.sky-theme-modern .sky-progress-indicator-title{line-height:inherit;margin:0 0 60px}"]
711
849
  })
712
850
  ], SkyProgressIndicatorTitleComponent);
713
851
 
@@ -727,7 +865,8 @@ SkyProgressIndicatorModule = __decorate([
727
865
  CommonModule,
728
866
  SkyI18nModule,
729
867
  SkyIconModule,
730
- SkyProgressIndicatorResourcesModule
868
+ SkyProgressIndicatorResourcesModule,
869
+ SkyThemeModule
731
870
  ],
732
871
  exports: [
733
872
  SkyProgressIndicatorComponent,