@skyux/forms 5.5.0 → 5.6.0

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 (60) hide show
  1. package/bundles/skyux-forms.umd.js +388 -388
  2. package/documentation.json +231 -233
  3. package/esm2015/lib/modules/character-counter/character-counter-indicator.component.js.map +1 -1
  4. package/esm2015/lib/modules/character-counter/character-counter.directive.js.map +1 -1
  5. package/esm2015/lib/modules/character-counter/character-counter.module.js +2 -2
  6. package/esm2015/lib/modules/character-counter/character-counter.module.js.map +1 -1
  7. package/esm2015/lib/modules/checkbox/checkbox-required-validator.directive.js.map +1 -1
  8. package/esm2015/lib/modules/checkbox/checkbox.component.js +1 -1
  9. package/esm2015/lib/modules/checkbox/checkbox.component.js.map +1 -1
  10. package/esm2015/lib/modules/checkbox/checkbox.module.js +1 -1
  11. package/esm2015/lib/modules/checkbox/checkbox.module.js.map +1 -1
  12. package/esm2015/lib/modules/file-attachment/file-attachment-label.component.js +1 -1
  13. package/esm2015/lib/modules/file-attachment/file-attachment-label.component.js.map +1 -1
  14. package/esm2015/lib/modules/file-attachment/file-attachment.component.js +3 -3
  15. package/esm2015/lib/modules/file-attachment/file-attachment.component.js.map +1 -1
  16. package/esm2015/lib/modules/file-attachment/file-attachment.service.js +6 -6
  17. package/esm2015/lib/modules/file-attachment/file-attachment.service.js.map +1 -1
  18. package/esm2015/lib/modules/file-attachment/file-attachments.module.js +3 -3
  19. package/esm2015/lib/modules/file-attachment/file-attachments.module.js.map +1 -1
  20. package/esm2015/lib/modules/file-attachment/file-drop.component.js +7 -7
  21. package/esm2015/lib/modules/file-attachment/file-drop.component.js.map +1 -1
  22. package/esm2015/lib/modules/file-attachment/file-item.component.js +2 -2
  23. package/esm2015/lib/modules/file-attachment/file-item.component.js.map +1 -1
  24. package/esm2015/lib/modules/file-attachment/file-item.service.js +3 -3
  25. package/esm2015/lib/modules/file-attachment/file-item.service.js.map +1 -1
  26. package/esm2015/lib/modules/file-attachment/file-size.pipe.js +1 -1
  27. package/esm2015/lib/modules/file-attachment/file-size.pipe.js.map +1 -1
  28. package/esm2015/lib/modules/input-box/input-box-host.service.js.map +1 -1
  29. package/esm2015/lib/modules/input-box/input-box.component.js.map +1 -1
  30. package/esm2015/lib/modules/input-box/input-box.module.js +1 -1
  31. package/esm2015/lib/modules/input-box/input-box.module.js.map +1 -1
  32. package/esm2015/lib/modules/radio/radio-group.component.js.map +1 -1
  33. package/esm2015/lib/modules/radio/radio.component.js +1 -1
  34. package/esm2015/lib/modules/radio/radio.component.js.map +1 -1
  35. package/esm2015/lib/modules/radio/radio.module.js +2 -2
  36. package/esm2015/lib/modules/radio/radio.module.js.map +1 -1
  37. package/esm2015/lib/modules/selection-box/selection-box-adapter.service.js.map +1 -1
  38. package/esm2015/lib/modules/selection-box/selection-box-grid.component.js +2 -2
  39. package/esm2015/lib/modules/selection-box/selection-box-grid.component.js.map +1 -1
  40. package/esm2015/lib/modules/selection-box/selection-box.component.js.map +1 -1
  41. package/esm2015/lib/modules/selection-box/selection-box.module.js +1 -1
  42. package/esm2015/lib/modules/selection-box/selection-box.module.js.map +1 -1
  43. package/esm2015/lib/modules/shared/sky-forms-resources.module.js +1 -1
  44. package/esm2015/lib/modules/shared/sky-forms-resources.module.js.map +1 -1
  45. package/esm2015/lib/modules/toggle-switch/toggle-switch.component.js +1 -1
  46. package/esm2015/lib/modules/toggle-switch/toggle-switch.component.js.map +1 -1
  47. package/esm2015/lib/modules/toggle-switch/toggle-switch.module.js +2 -2
  48. package/esm2015/lib/modules/toggle-switch/toggle-switch.module.js.map +1 -1
  49. package/esm2015/testing/checkbox-fixture.js.map +1 -1
  50. package/fesm2015/skyux-forms-testing.js.map +1 -1
  51. package/fesm2015/skyux-forms.js +105 -105
  52. package/fesm2015/skyux-forms.js.map +1 -1
  53. package/lib/modules/checkbox/checkbox.component.d.ts +1 -1
  54. package/lib/modules/file-attachment/file-attachment.component.d.ts +2 -2
  55. package/lib/modules/file-attachment/file-drop.component.d.ts +2 -2
  56. package/lib/modules/file-attachment/file-item.component.d.ts +2 -2
  57. package/lib/modules/file-attachment/file-size.pipe.d.ts +1 -1
  58. package/lib/modules/input-box/input-box-host.service.d.ts +1 -1
  59. package/lib/modules/selection-box/selection-box-grid.component.d.ts +1 -1
  60. package/package.json +4 -4
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/forms'), require('@angular/core'), require('@skyux/i18n'), require('@skyux/indicators'), require('rxjs'), require('@skyux/theme'), require('rxjs/operators'), require('@skyux/core')) :
3
- typeof define === 'function' && define.amd ? define('@skyux/forms', ['exports', '@angular/common', '@angular/forms', '@angular/core', '@skyux/i18n', '@skyux/indicators', 'rxjs', '@skyux/theme', 'rxjs/operators', '@skyux/core'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.forms = {}), global.ng.common, global.ng.forms, global.ng.core, global.i2, global.i2$1, global.rxjs, global.i1$1, global.rxjs.operators, global.i2$2));
5
- })(this, (function (exports, i1, i4, i0, i2, i2$1, rxjs, i1$1, operators, i2$2) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@skyux/i18n'), require('@skyux/indicators'), require('rxjs'), require('@skyux/theme'), require('rxjs/operators'), require('@skyux/core')) :
3
+ typeof define === 'function' && define.amd ? define('@skyux/forms', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@skyux/i18n', '@skyux/indicators', 'rxjs', '@skyux/theme', 'rxjs/operators', '@skyux/core'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.forms = {}), global.ng.common, global.ng.core, global.ng.forms, global.i2, global.i2$1, global.rxjs, global.i1$1, global.rxjs.operators, global.i2$2));
5
+ })(this, (function (exports, i1, i0, i4, i2, i2$1, rxjs, i1$1, operators, i2$2) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -23,8 +23,8 @@
23
23
  }
24
24
 
25
25
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
26
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
27
26
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
27
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
28
28
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
29
29
  var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
30
30
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
@@ -122,6 +122,48 @@
122
122
  }]
123
123
  }] });
124
124
 
125
+ var SkyCharacterCounterIndicatorComponent = /** @class */ (function () {
126
+ function SkyCharacterCounterIndicatorComponent(changeDetector) {
127
+ this.changeDetector = changeDetector;
128
+ this.currentCharacterCountLimit = 0;
129
+ this.currentCharacterCount = 0;
130
+ }
131
+ Object.defineProperty(SkyCharacterCounterIndicatorComponent.prototype, "characterCount", {
132
+ get: function () {
133
+ return this.currentCharacterCount;
134
+ },
135
+ set: function (count) {
136
+ this.currentCharacterCount = count;
137
+ this.changeDetector.markForCheck();
138
+ },
139
+ enumerable: false,
140
+ configurable: true
141
+ });
142
+ Object.defineProperty(SkyCharacterCounterIndicatorComponent.prototype, "characterCountLimit", {
143
+ get: function () {
144
+ return this.currentCharacterCountLimit;
145
+ },
146
+ set: function (limit) {
147
+ this.currentCharacterCountLimit = limit;
148
+ this.changeDetector.markForCheck();
149
+ },
150
+ enumerable: false,
151
+ configurable: true
152
+ });
153
+ return SkyCharacterCounterIndicatorComponent;
154
+ }());
155
+ SkyCharacterCounterIndicatorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCharacterCounterIndicatorComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
156
+ SkyCharacterCounterIndicatorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyCharacterCounterIndicatorComponent, selector: "sky-character-counter-indicator", ngImport: i0__namespace, template: "<span\n class=\"sky-character-count-label sky-deemphasized\"\n [ngClass]=\"{ 'sky-error-label': characterCount > characterCountLimit }\"\n>\n {{ characterCount + '/' + characterCountLimit }}\n</span>\n<span aria-live=\"polite\" class=\"sky-screen-reader-only\">\n {{ characterCount }} {{ 'skyux_character_count_message' | skyLibResources }}\n {{ characterCountLimit }}.\n {{\n characterCount > characterCountLimit\n ? ('skyux_character_count_over_limit' | skyLibResources)\n : ''\n }}\n</span>\n", styles: [":host{flex-shrink:.0001}.sky-character-count-label.sky-error-label{margin:0}.sky-character-count-label.sky-error-label:before{font-style:normal}.sky-screen-reader-only{width:0;height:0;padding:0;opacity:0;position:absolute;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);outline:none;white-space:nowrap}\n"], directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "skyLibResources": i2__namespace.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
157
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCharacterCounterIndicatorComponent, decorators: [{
158
+ type: i0.Component,
159
+ args: [{
160
+ selector: 'sky-character-counter-indicator',
161
+ template: "<span\n class=\"sky-character-count-label sky-deemphasized\"\n [ngClass]=\"{ 'sky-error-label': characterCount > characterCountLimit }\"\n>\n {{ characterCount + '/' + characterCountLimit }}\n</span>\n<span aria-live=\"polite\" class=\"sky-screen-reader-only\">\n {{ characterCount }} {{ 'skyux_character_count_message' | skyLibResources }}\n {{ characterCountLimit }}.\n {{\n characterCount > characterCountLimit\n ? ('skyux_character_count_over_limit' | skyLibResources)\n : ''\n }}\n</span>\n",
162
+ styles: [":host{flex-shrink:.0001}.sky-character-count-label.sky-error-label{margin:0}.sky-character-count-label.sky-error-label:before{font-style:normal}.sky-screen-reader-only{width:0;height:0;padding:0;opacity:0;position:absolute;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);outline:none;white-space:nowrap}\n"],
163
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
164
+ }]
165
+ }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; } });
166
+
125
167
  /**
126
168
  * Creates an input field that validates the number of characters. Place this directive on
127
169
  * an `input` or `textarea` element. If users enter more characters than allowed, then the
@@ -206,48 +248,6 @@
206
248
  type: i0.Input
207
249
  }] } });
208
250
 
209
- var SkyCharacterCounterIndicatorComponent = /** @class */ (function () {
210
- function SkyCharacterCounterIndicatorComponent(changeDetector) {
211
- this.changeDetector = changeDetector;
212
- this.currentCharacterCountLimit = 0;
213
- this.currentCharacterCount = 0;
214
- }
215
- Object.defineProperty(SkyCharacterCounterIndicatorComponent.prototype, "characterCount", {
216
- get: function () {
217
- return this.currentCharacterCount;
218
- },
219
- set: function (count) {
220
- this.currentCharacterCount = count;
221
- this.changeDetector.markForCheck();
222
- },
223
- enumerable: false,
224
- configurable: true
225
- });
226
- Object.defineProperty(SkyCharacterCounterIndicatorComponent.prototype, "characterCountLimit", {
227
- get: function () {
228
- return this.currentCharacterCountLimit;
229
- },
230
- set: function (limit) {
231
- this.currentCharacterCountLimit = limit;
232
- this.changeDetector.markForCheck();
233
- },
234
- enumerable: false,
235
- configurable: true
236
- });
237
- return SkyCharacterCounterIndicatorComponent;
238
- }());
239
- SkyCharacterCounterIndicatorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCharacterCounterIndicatorComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
240
- SkyCharacterCounterIndicatorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyCharacterCounterIndicatorComponent, selector: "sky-character-counter-indicator", ngImport: i0__namespace, template: "<span\n class=\"sky-character-count-label sky-deemphasized\"\n [ngClass]=\"{ 'sky-error-label': characterCount > characterCountLimit }\"\n>\n {{ characterCount + '/' + characterCountLimit }}\n</span>\n<span aria-live=\"polite\" class=\"sky-screen-reader-only\">\n {{ characterCount }} {{ 'skyux_character_count_message' | skyLibResources }}\n {{ characterCountLimit }}.\n {{\n characterCount > characterCountLimit\n ? ('skyux_character_count_over_limit' | skyLibResources)\n : ''\n }}\n</span>\n", styles: [":host{flex-shrink:.0001}.sky-character-count-label.sky-error-label{margin:0}.sky-character-count-label.sky-error-label:before{font-style:normal}.sky-screen-reader-only{width:0;height:0;padding:0;opacity:0;position:absolute;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);outline:none;white-space:nowrap}\n"], directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "skyLibResources": i2__namespace.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
241
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCharacterCounterIndicatorComponent, decorators: [{
242
- type: i0.Component,
243
- args: [{
244
- selector: 'sky-character-counter-indicator',
245
- template: "<span\n class=\"sky-character-count-label sky-deemphasized\"\n [ngClass]=\"{ 'sky-error-label': characterCount > characterCountLimit }\"\n>\n {{ characterCount + '/' + characterCountLimit }}\n</span>\n<span aria-live=\"polite\" class=\"sky-screen-reader-only\">\n {{ characterCount }} {{ 'skyux_character_count_message' | skyLibResources }}\n {{ characterCountLimit }}.\n {{\n characterCount > characterCountLimit\n ? ('skyux_character_count_over_limit' | skyLibResources)\n : ''\n }}\n</span>\n",
246
- styles: [":host{flex-shrink:.0001}.sky-character-count-label.sky-error-label{margin:0}.sky-character-count-label.sky-error-label:before{font-style:normal}.sky-screen-reader-only{width:0;height:0;padding:0;opacity:0;position:absolute;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);outline:none;white-space:nowrap}\n"],
247
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
248
- }]
249
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; } });
250
-
251
251
  var SkyCharacterCounterModule = /** @class */ (function () {
252
252
  function SkyCharacterCounterModule() {
253
253
  }
@@ -298,297 +298,6 @@
298
298
  return SkyCheckboxChange;
299
299
  }());
300
300
 
301
- // Need to add the following to classes which contain static methods.
302
- // See: https://github.com/ng-packagr/ng-packagr/issues/641
303
- // @dynamic
304
- var SkyFormsUtility = /** @class */ (function () {
305
- function SkyFormsUtility() {
306
- }
307
- /** Coerces a data-bound value (typically a string) to a boolean. */
308
- SkyFormsUtility.coerceBooleanProperty = function (value) {
309
- return value !== undefined && "" + value !== 'false';
310
- };
311
- /**
312
- * Gets the required state of the checkbox.
313
- * Currently, Angular doesn't offer a way to get this easily, so we have to create an empty
314
- * control using the current validator to see if it throws a `required` validation error.
315
- * https://github.com/angular/angular/issues/13461#issuecomment-340368046
316
- */
317
- SkyFormsUtility.hasRequiredValidation = function (ngControl) {
318
- var abstractControl = ngControl.control;
319
- if (abstractControl && abstractControl.validator) {
320
- var validator = abstractControl.validator({});
321
- if (validator && validator.required) {
322
- return true;
323
- }
324
- }
325
- return false;
326
- };
327
- return SkyFormsUtility;
328
- }());
329
-
330
- /**
331
- * Monotonically increasing integer used to auto-generate unique ids for checkbox components.
332
- */
333
- var nextId = 0;
334
- /**
335
- * Replaces the HTML input element with `type="checkbox"`. When users select a checkbox, its value
336
- * is driven through an `ngModel` attribute that you specify on the `sky-checkbox` element.
337
- */
338
- var SkyCheckboxComponent = /** @class */ (function () {
339
- function SkyCheckboxComponent(ngControl) {
340
- this.ngControl = ngControl;
341
- /**
342
- * Specifies an ID for the checkbox.
343
- * @default a unique, auto-incrementing integer. For example: `sky-checkbox-1`
344
- */
345
- this.id = "sky-checkbox-" + ++nextId;
346
- /**
347
- * Specifies an index for the checkbox. If not defined, the index is set to the position of the
348
- * checkbox on load.
349
- */
350
- this.tabindex = 0;
351
- /**
352
- * Specifies a name for a group of checkboxes.
353
- * @default a unique, auto-incrementing integer. For example: `sky-checkbox-1`
354
- */
355
- this.name = "sky-checkbox-" + ++nextId;
356
- /**
357
- * Fires when the selected value changes.
358
- */
359
- this.change = new i0.EventEmitter();
360
- this.isFirstChange = true;
361
- this._checked = false;
362
- this._checkedChange = new rxjs.BehaviorSubject(this._checked);
363
- this._disabled = false;
364
- this._disabledChange = new rxjs.BehaviorSubject(this._disabled);
365
- this._required = false;
366
- /** Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor. */
367
- /*istanbul ignore next */
368
- this.onTouched = function () { };
369
- this._controlValueAccessorChangeFn = function (value) { };
370
- if (this.ngControl) {
371
- this.ngControl.valueAccessor = this;
372
- }
373
- }
374
- Object.defineProperty(SkyCheckboxComponent.prototype, "disabled", {
375
- /**
376
- * Indicates whether the checkbox is disabled.
377
- */
378
- get: function () {
379
- return this._disabled;
380
- },
381
- /**
382
- * Indicates whether to disable the checkbox.
383
- * @default false
384
- */
385
- set: function (value) {
386
- var coercedValue = SkyFormsUtility.coerceBooleanProperty(value);
387
- if (coercedValue !== this.disabled) {
388
- this._disabled = coercedValue;
389
- this._disabledChange.next(this._disabled);
390
- }
391
- },
392
- enumerable: false,
393
- configurable: true
394
- });
395
- Object.defineProperty(SkyCheckboxComponent.prototype, "checkboxType", {
396
- get: function () {
397
- return this._checkboxType || 'info';
398
- },
399
- /**
400
- * Specifies a type to set the background color after users select a checkbox where the
401
- * `icon` property displays an icon in place of the checkbox. The valid options correspond to
402
- * [the label component's](https://developer.blackbaud.com/skyux/components/label)
403
- * label types. `"info"` creates a blue background, `"success"` creates a green
404
- * background, `"warning"` creates an orange background, and `"danger"` creates a red background.
405
- * @default "info"
406
- */
407
- set: function (value) {
408
- if (value) {
409
- this._checkboxType = value.toLowerCase();
410
- }
411
- },
412
- enumerable: false,
413
- configurable: true
414
- });
415
- Object.defineProperty(SkyCheckboxComponent.prototype, "inputId", {
416
- get: function () {
417
- return "input-" + this.id;
418
- },
419
- enumerable: false,
420
- configurable: true
421
- });
422
- Object.defineProperty(SkyCheckboxComponent.prototype, "checked", {
423
- /**
424
- * Indicates whether the checkbox is selected.
425
- */
426
- get: function () {
427
- return this._checked;
428
- },
429
- /**
430
- * Indicates whether the checkbox is selected.
431
- * @default false
432
- */
433
- set: function (checked) {
434
- if (checked !== this.checked) {
435
- this._checked = checked;
436
- this._controlValueAccessorChangeFn(checked);
437
- this._checkedChange.next(this._checked);
438
- // Do not mark the field as "dirty"
439
- // if the field has been initialized with a value.
440
- if (this.isFirstChange && this.ngControl && this.ngControl.control) {
441
- this.ngControl.control.markAsPristine();
442
- this.isFirstChange = false;
443
- }
444
- }
445
- },
446
- enumerable: false,
447
- configurable: true
448
- });
449
- Object.defineProperty(SkyCheckboxComponent.prototype, "required", {
450
- get: function () {
451
- return this._required;
452
- },
453
- /**
454
- * Indicates whether the input is required for form validation.
455
- * When you set this property to `true`, the component adds `aria-required` and `required`
456
- * attributes to the input element so that forms display an invalid state until the input element
457
- * is complete.
458
- * @default false
459
- */
460
- set: function (value) {
461
- this._required = SkyFormsUtility.coerceBooleanProperty(value);
462
- },
463
- enumerable: false,
464
- configurable: true
465
- });
466
- Object.defineProperty(SkyCheckboxComponent.prototype, "checkedChange", {
467
- /**
468
- * Fires when users select or deselect the checkbox.
469
- */
470
- get: function () {
471
- return this._checkedChange;
472
- },
473
- enumerable: false,
474
- configurable: true
475
- });
476
- Object.defineProperty(SkyCheckboxComponent.prototype, "disabledChange", {
477
- /**
478
- * Fires when the selected value changes.
479
- */
480
- get: function () {
481
- return this._disabledChange;
482
- },
483
- enumerable: false,
484
- configurable: true
485
- });
486
- SkyCheckboxComponent.prototype.ngOnInit = function () {
487
- if (this.ngControl) {
488
- // Backwards compatibility support for anyone still using Validators.Required.
489
- this.required =
490
- this.required || SkyFormsUtility.hasRequiredValidation(this.ngControl);
491
- }
492
- };
493
- /**
494
- * Implemented as part of ControlValueAccessor.
495
- */
496
- SkyCheckboxComponent.prototype.writeValue = function (value) {
497
- this.checked = !!value;
498
- };
499
- /**
500
- * Implemented as part of ControlValueAccessor.
501
- */
502
- SkyCheckboxComponent.prototype.registerOnChange = function (fn) {
503
- this._controlValueAccessorChangeFn = fn;
504
- };
505
- /**
506
- * Implemented as part of ControlValueAccessor.
507
- */
508
- SkyCheckboxComponent.prototype.registerOnTouched = function (fn) {
509
- this.onTouched = fn;
510
- };
511
- /**
512
- * Implemented as part of ControlValueAccessor.
513
- */
514
- SkyCheckboxComponent.prototype.setDisabledState = function (isDisabled) {
515
- this.disabled = isDisabled;
516
- };
517
- /**
518
- * Event handler for checkbox input element.
519
- * Toggles checked state if element is not disabled.
520
- */
521
- SkyCheckboxComponent.prototype.onInteractionEvent = function (event) {
522
- // We always have to stop propagation on the change event.
523
- // Otherwise the change event, from the input element, will bubble up and
524
- // emit its event object to the `change` output.
525
- event.stopPropagation();
526
- if (!this.disabled) {
527
- this._toggle();
528
- this._emitChangeEvent();
529
- }
530
- };
531
- SkyCheckboxComponent.prototype.onInputBlur = function () {
532
- this.onTouched();
533
- };
534
- SkyCheckboxComponent.prototype._emitChangeEvent = function () {
535
- var event = new SkyCheckboxChange();
536
- event.source = this;
537
- event.checked = this._checked;
538
- this._controlValueAccessorChangeFn(this._checked);
539
- this.change.emit(event);
540
- };
541
- /**
542
- * Toggles the `checked` value between true and false
543
- */
544
- SkyCheckboxComponent.prototype._toggle = function () {
545
- this.checked = !this.checked;
546
- };
547
- return SkyCheckboxComponent;
548
- }());
549
- SkyCheckboxComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCheckboxComponent, deps: [{ token: i4__namespace.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
550
- SkyCheckboxComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyCheckboxComponent, selector: "sky-checkbox", inputs: { label: "label", labelledBy: "labelledBy", id: "id", disabled: "disabled", tabindex: "tabindex", name: "name", icon: "icon", checkboxType: "checkboxType", checked: "checked", required: "required" }, outputs: { change: "change", checkedChange: "checkedChange", disabledChange: "disabledChange" }, ngImport: i0__namespace, template: "<label\n class=\"sky-checkbox-wrapper sky-switch\"\n [ngClass]=\"{\n 'sky-control-label-required': required,\n 'sky-switch-disabled': disabled\n }\"\n>\n <input\n class=\"sky-checkbox-input sky-switch-input\"\n type=\"checkbox\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n [attr.aria-label]=\"label\"\n [attr.aria-labelledby]=\"labelledBy\"\n [attr.aria-required]=\"required ? true : null\"\n (blur)=\"onInputBlur()\"\n (change)=\"onInteractionEvent($event)\"\n />\n <span\n class=\"sky-switch-control sky-rounded-corners\"\n [ngClass]=\"{\n 'sky-switch-control-icon': icon,\n 'sky-switch-control-info': checkboxType === 'info',\n 'sky-switch-control-success': checkboxType === 'success',\n 'sky-switch-control-warning': checkboxType === 'warning',\n 'sky-switch-control-danger': checkboxType === 'danger'\n }\"\n >\n <sky-icon\n *ngIf=\"icon || checked\"\n class=\"sky-checkbox-icon-default\"\n fixedWidth=\"true\"\n [icon]=\"icon || 'check'\"\n >\n </sky-icon>\n <div class=\"sky-checkbox-icon-modern\">\n <sky-icon\n *ngIf=\"icon; else checkedTemplate\"\n fixedWidth=\"true\"\n [icon]=\"icon\"\n >\n </sky-icon>\n <ng-template #checkedTemplate>\n <sky-icon\n *ngIf=\"checked\"\n class=\"sky-checkbox-icon-modern-checked\"\n fixedWidth=\"true\"\n icon=\"check\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </ng-template>\n </div>\n </span>\n <ng-content select=\"sky-checkbox-label\"> </ng-content>\n</label>\n", styles: [".sky-checkbox-icon-modern{display:none}:host-context(.sky-theme-modern) .sky-checkbox-icon-default{display:none}:host-context(.sky-theme-modern) .sky-checkbox-icon-modern{display:inline}:host-context(.sky-theme-modern) .sky-checkbox-icon-modern-checked{color:#1870b8}:host-context(.sky-theme-modern) .sky-checkbox-input:disabled+.sky-switch-control .sky-checkbox-icon-modern-checked{color:#212327}:host-context(.sky-theme-modern) .sky-switch-control{border-radius:6px}.sky-theme-modern .sky-checkbox-icon-default{display:none}.sky-theme-modern .sky-checkbox-icon-modern{display:inline}.sky-theme-modern .sky-checkbox-icon-modern-checked{color:#1870b8}.sky-theme-modern .sky-checkbox-input:disabled+.sky-switch-control .sky-checkbox-icon-modern-checked{color:#212327}.sky-theme-modern .sky-switch-control{border-radius:6px}\n"], components: [{ type: i2__namespace$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
551
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCheckboxComponent, decorators: [{
552
- type: i0.Component,
553
- args: [{
554
- selector: 'sky-checkbox',
555
- template: "<label\n class=\"sky-checkbox-wrapper sky-switch\"\n [ngClass]=\"{\n 'sky-control-label-required': required,\n 'sky-switch-disabled': disabled\n }\"\n>\n <input\n class=\"sky-checkbox-input sky-switch-input\"\n type=\"checkbox\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n [attr.aria-label]=\"label\"\n [attr.aria-labelledby]=\"labelledBy\"\n [attr.aria-required]=\"required ? true : null\"\n (blur)=\"onInputBlur()\"\n (change)=\"onInteractionEvent($event)\"\n />\n <span\n class=\"sky-switch-control sky-rounded-corners\"\n [ngClass]=\"{\n 'sky-switch-control-icon': icon,\n 'sky-switch-control-info': checkboxType === 'info',\n 'sky-switch-control-success': checkboxType === 'success',\n 'sky-switch-control-warning': checkboxType === 'warning',\n 'sky-switch-control-danger': checkboxType === 'danger'\n }\"\n >\n <sky-icon\n *ngIf=\"icon || checked\"\n class=\"sky-checkbox-icon-default\"\n fixedWidth=\"true\"\n [icon]=\"icon || 'check'\"\n >\n </sky-icon>\n <div class=\"sky-checkbox-icon-modern\">\n <sky-icon\n *ngIf=\"icon; else checkedTemplate\"\n fixedWidth=\"true\"\n [icon]=\"icon\"\n >\n </sky-icon>\n <ng-template #checkedTemplate>\n <sky-icon\n *ngIf=\"checked\"\n class=\"sky-checkbox-icon-modern-checked\"\n fixedWidth=\"true\"\n icon=\"check\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </ng-template>\n </div>\n </span>\n <ng-content select=\"sky-checkbox-label\"> </ng-content>\n</label>\n",
556
- styles: [".sky-checkbox-icon-modern{display:none}:host-context(.sky-theme-modern) .sky-checkbox-icon-default{display:none}:host-context(.sky-theme-modern) .sky-checkbox-icon-modern{display:inline}:host-context(.sky-theme-modern) .sky-checkbox-icon-modern-checked{color:#1870b8}:host-context(.sky-theme-modern) .sky-checkbox-input:disabled+.sky-switch-control .sky-checkbox-icon-modern-checked{color:#212327}:host-context(.sky-theme-modern) .sky-switch-control{border-radius:6px}.sky-theme-modern .sky-checkbox-icon-default{display:none}.sky-theme-modern .sky-checkbox-icon-modern{display:inline}.sky-theme-modern .sky-checkbox-icon-modern-checked{color:#1870b8}.sky-theme-modern .sky-checkbox-input:disabled+.sky-switch-control .sky-checkbox-icon-modern-checked{color:#212327}.sky-theme-modern .sky-switch-control{border-radius:6px}\n"],
557
- }]
558
- }], ctorParameters: function () {
559
- return [{ type: i4__namespace.NgControl, decorators: [{
560
- type: i0.Self
561
- }, {
562
- type: i0.Optional
563
- }] }];
564
- }, propDecorators: { label: [{
565
- type: i0.Input
566
- }], labelledBy: [{
567
- type: i0.Input
568
- }], id: [{
569
- type: i0.Input
570
- }], disabled: [{
571
- type: i0.Input
572
- }], tabindex: [{
573
- type: i0.Input
574
- }], name: [{
575
- type: i0.Input
576
- }], change: [{
577
- type: i0.Output
578
- }], icon: [{
579
- type: i0.Input
580
- }], checkboxType: [{
581
- type: i0.Input
582
- }], checked: [{
583
- type: i0.Input
584
- }], required: [{
585
- type: i0.Input
586
- }], checkedChange: [{
587
- type: i0.Output
588
- }], disabledChange: [{
589
- type: i0.Output
590
- }] } });
591
-
592
301
  /**
593
302
  * Specifies a label for the checkbox.
594
303
  */
@@ -952,11 +661,302 @@
952
661
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCheckboxRequiredValidatorDirective, decorators: [{
953
662
  type: i0.Directive,
954
663
  args: [{
955
- // eslint-disable-next-line @angular-eslint/directive-selector
956
- selector: "sky-checkbox[required][formControlName],\n sky-checkbox[required][formControl], sky-checkbox[required][ngModel]",
957
- providers: [SKY_CHECKBOX_REQUIRED_VALIDATOR],
664
+ // eslint-disable-next-line @angular-eslint/directive-selector
665
+ selector: "sky-checkbox[required][formControlName],\n sky-checkbox[required][formControl], sky-checkbox[required][ngModel]",
666
+ providers: [SKY_CHECKBOX_REQUIRED_VALIDATOR],
667
+ }]
668
+ }] });
669
+
670
+ // Need to add the following to classes which contain static methods.
671
+ // See: https://github.com/ng-packagr/ng-packagr/issues/641
672
+ // @dynamic
673
+ var SkyFormsUtility = /** @class */ (function () {
674
+ function SkyFormsUtility() {
675
+ }
676
+ /** Coerces a data-bound value (typically a string) to a boolean. */
677
+ SkyFormsUtility.coerceBooleanProperty = function (value) {
678
+ return value !== undefined && "" + value !== 'false';
679
+ };
680
+ /**
681
+ * Gets the required state of the checkbox.
682
+ * Currently, Angular doesn't offer a way to get this easily, so we have to create an empty
683
+ * control using the current validator to see if it throws a `required` validation error.
684
+ * https://github.com/angular/angular/issues/13461#issuecomment-340368046
685
+ */
686
+ SkyFormsUtility.hasRequiredValidation = function (ngControl) {
687
+ var abstractControl = ngControl.control;
688
+ if (abstractControl && abstractControl.validator) {
689
+ var validator = abstractControl.validator({});
690
+ if (validator && validator.required) {
691
+ return true;
692
+ }
693
+ }
694
+ return false;
695
+ };
696
+ return SkyFormsUtility;
697
+ }());
698
+
699
+ /**
700
+ * Monotonically increasing integer used to auto-generate unique ids for checkbox components.
701
+ */
702
+ var nextId = 0;
703
+ /**
704
+ * Replaces the HTML input element with `type="checkbox"`. When users select a checkbox, its value
705
+ * is driven through an `ngModel` attribute that you specify on the `sky-checkbox` element.
706
+ */
707
+ var SkyCheckboxComponent = /** @class */ (function () {
708
+ function SkyCheckboxComponent(ngControl) {
709
+ this.ngControl = ngControl;
710
+ /**
711
+ * Specifies an ID for the checkbox.
712
+ * @default a unique, auto-incrementing integer. For example: `sky-checkbox-1`
713
+ */
714
+ this.id = "sky-checkbox-" + ++nextId;
715
+ /**
716
+ * Specifies an index for the checkbox. If not defined, the index is set to the position of the
717
+ * checkbox on load.
718
+ */
719
+ this.tabindex = 0;
720
+ /**
721
+ * Specifies a name for a group of checkboxes.
722
+ * @default a unique, auto-incrementing integer. For example: `sky-checkbox-1`
723
+ */
724
+ this.name = "sky-checkbox-" + ++nextId;
725
+ /**
726
+ * Fires when the selected value changes.
727
+ */
728
+ this.change = new i0.EventEmitter();
729
+ this.isFirstChange = true;
730
+ this._checked = false;
731
+ this._checkedChange = new rxjs.BehaviorSubject(this._checked);
732
+ this._disabled = false;
733
+ this._disabledChange = new rxjs.BehaviorSubject(this._disabled);
734
+ this._required = false;
735
+ /** Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor. */
736
+ /*istanbul ignore next */
737
+ this.onTouched = function () { };
738
+ this._controlValueAccessorChangeFn = function (value) { };
739
+ if (this.ngControl) {
740
+ this.ngControl.valueAccessor = this;
741
+ }
742
+ }
743
+ Object.defineProperty(SkyCheckboxComponent.prototype, "disabled", {
744
+ /**
745
+ * Indicates whether the checkbox is disabled.
746
+ */
747
+ get: function () {
748
+ return this._disabled;
749
+ },
750
+ /**
751
+ * Indicates whether to disable the checkbox.
752
+ * @default false
753
+ */
754
+ set: function (value) {
755
+ var coercedValue = SkyFormsUtility.coerceBooleanProperty(value);
756
+ if (coercedValue !== this.disabled) {
757
+ this._disabled = coercedValue;
758
+ this._disabledChange.next(this._disabled);
759
+ }
760
+ },
761
+ enumerable: false,
762
+ configurable: true
763
+ });
764
+ Object.defineProperty(SkyCheckboxComponent.prototype, "checkboxType", {
765
+ get: function () {
766
+ return this._checkboxType || 'info';
767
+ },
768
+ /**
769
+ * Specifies a type to set the background color after users select a checkbox where the
770
+ * `icon` property displays an icon in place of the checkbox. The valid options correspond to
771
+ * [the label component's](https://developer.blackbaud.com/skyux/components/label)
772
+ * label types. `"info"` creates a blue background, `"success"` creates a green
773
+ * background, `"warning"` creates an orange background, and `"danger"` creates a red background.
774
+ * @default "info"
775
+ */
776
+ set: function (value) {
777
+ if (value) {
778
+ this._checkboxType = value.toLowerCase();
779
+ }
780
+ },
781
+ enumerable: false,
782
+ configurable: true
783
+ });
784
+ Object.defineProperty(SkyCheckboxComponent.prototype, "inputId", {
785
+ get: function () {
786
+ return "input-" + this.id;
787
+ },
788
+ enumerable: false,
789
+ configurable: true
790
+ });
791
+ Object.defineProperty(SkyCheckboxComponent.prototype, "checked", {
792
+ /**
793
+ * Indicates whether the checkbox is selected.
794
+ */
795
+ get: function () {
796
+ return this._checked;
797
+ },
798
+ /**
799
+ * Indicates whether the checkbox is selected.
800
+ * @default false
801
+ */
802
+ set: function (checked) {
803
+ if (checked !== this.checked) {
804
+ this._checked = checked;
805
+ this._controlValueAccessorChangeFn(checked);
806
+ this._checkedChange.next(this._checked);
807
+ // Do not mark the field as "dirty"
808
+ // if the field has been initialized with a value.
809
+ if (this.isFirstChange && this.ngControl && this.ngControl.control) {
810
+ this.ngControl.control.markAsPristine();
811
+ this.isFirstChange = false;
812
+ }
813
+ }
814
+ },
815
+ enumerable: false,
816
+ configurable: true
817
+ });
818
+ Object.defineProperty(SkyCheckboxComponent.prototype, "required", {
819
+ get: function () {
820
+ return this._required;
821
+ },
822
+ /**
823
+ * Indicates whether the input is required for form validation.
824
+ * When you set this property to `true`, the component adds `aria-required` and `required`
825
+ * attributes to the input element so that forms display an invalid state until the input element
826
+ * is complete.
827
+ * @default false
828
+ */
829
+ set: function (value) {
830
+ this._required = SkyFormsUtility.coerceBooleanProperty(value);
831
+ },
832
+ enumerable: false,
833
+ configurable: true
834
+ });
835
+ Object.defineProperty(SkyCheckboxComponent.prototype, "checkedChange", {
836
+ /**
837
+ * Fires when users select or deselect the checkbox.
838
+ */
839
+ get: function () {
840
+ return this._checkedChange;
841
+ },
842
+ enumerable: false,
843
+ configurable: true
844
+ });
845
+ Object.defineProperty(SkyCheckboxComponent.prototype, "disabledChange", {
846
+ /**
847
+ * Fires when the selected value changes.
848
+ */
849
+ get: function () {
850
+ return this._disabledChange;
851
+ },
852
+ enumerable: false,
853
+ configurable: true
854
+ });
855
+ SkyCheckboxComponent.prototype.ngOnInit = function () {
856
+ if (this.ngControl) {
857
+ // Backwards compatibility support for anyone still using Validators.Required.
858
+ this.required =
859
+ this.required || SkyFormsUtility.hasRequiredValidation(this.ngControl);
860
+ }
861
+ };
862
+ /**
863
+ * Implemented as part of ControlValueAccessor.
864
+ */
865
+ SkyCheckboxComponent.prototype.writeValue = function (value) {
866
+ this.checked = !!value;
867
+ };
868
+ /**
869
+ * Implemented as part of ControlValueAccessor.
870
+ */
871
+ SkyCheckboxComponent.prototype.registerOnChange = function (fn) {
872
+ this._controlValueAccessorChangeFn = fn;
873
+ };
874
+ /**
875
+ * Implemented as part of ControlValueAccessor.
876
+ */
877
+ SkyCheckboxComponent.prototype.registerOnTouched = function (fn) {
878
+ this.onTouched = fn;
879
+ };
880
+ /**
881
+ * Implemented as part of ControlValueAccessor.
882
+ */
883
+ SkyCheckboxComponent.prototype.setDisabledState = function (isDisabled) {
884
+ this.disabled = isDisabled;
885
+ };
886
+ /**
887
+ * Event handler for checkbox input element.
888
+ * Toggles checked state if element is not disabled.
889
+ */
890
+ SkyCheckboxComponent.prototype.onInteractionEvent = function (event) {
891
+ // We always have to stop propagation on the change event.
892
+ // Otherwise the change event, from the input element, will bubble up and
893
+ // emit its event object to the `change` output.
894
+ event.stopPropagation();
895
+ if (!this.disabled) {
896
+ this._toggle();
897
+ this._emitChangeEvent();
898
+ }
899
+ };
900
+ SkyCheckboxComponent.prototype.onInputBlur = function () {
901
+ this.onTouched();
902
+ };
903
+ SkyCheckboxComponent.prototype._emitChangeEvent = function () {
904
+ var event = new SkyCheckboxChange();
905
+ event.source = this;
906
+ event.checked = this._checked;
907
+ this._controlValueAccessorChangeFn(this._checked);
908
+ this.change.emit(event);
909
+ };
910
+ /**
911
+ * Toggles the `checked` value between true and false
912
+ */
913
+ SkyCheckboxComponent.prototype._toggle = function () {
914
+ this.checked = !this.checked;
915
+ };
916
+ return SkyCheckboxComponent;
917
+ }());
918
+ SkyCheckboxComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCheckboxComponent, deps: [{ token: i4__namespace.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
919
+ SkyCheckboxComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyCheckboxComponent, selector: "sky-checkbox", inputs: { label: "label", labelledBy: "labelledBy", id: "id", disabled: "disabled", tabindex: "tabindex", name: "name", icon: "icon", checkboxType: "checkboxType", checked: "checked", required: "required" }, outputs: { change: "change", checkedChange: "checkedChange", disabledChange: "disabledChange" }, ngImport: i0__namespace, template: "<label\n class=\"sky-checkbox-wrapper sky-switch\"\n [ngClass]=\"{\n 'sky-control-label-required': required,\n 'sky-switch-disabled': disabled\n }\"\n>\n <input\n class=\"sky-checkbox-input sky-switch-input\"\n type=\"checkbox\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n [attr.aria-label]=\"label\"\n [attr.aria-labelledby]=\"labelledBy\"\n [attr.aria-required]=\"required ? true : null\"\n (blur)=\"onInputBlur()\"\n (change)=\"onInteractionEvent($event)\"\n />\n <span\n class=\"sky-switch-control sky-rounded-corners\"\n [ngClass]=\"{\n 'sky-switch-control-icon': icon,\n 'sky-switch-control-info': checkboxType === 'info',\n 'sky-switch-control-success': checkboxType === 'success',\n 'sky-switch-control-warning': checkboxType === 'warning',\n 'sky-switch-control-danger': checkboxType === 'danger'\n }\"\n >\n <sky-icon\n *ngIf=\"icon || checked\"\n class=\"sky-checkbox-icon-default\"\n fixedWidth=\"true\"\n [icon]=\"icon || 'check'\"\n >\n </sky-icon>\n <div class=\"sky-checkbox-icon-modern\">\n <sky-icon\n *ngIf=\"icon; else checkedTemplate\"\n fixedWidth=\"true\"\n [icon]=\"icon\"\n >\n </sky-icon>\n <ng-template #checkedTemplate>\n <sky-icon\n *ngIf=\"checked\"\n class=\"sky-checkbox-icon-modern-checked\"\n fixedWidth=\"true\"\n icon=\"check\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </ng-template>\n </div>\n </span>\n <ng-content select=\"sky-checkbox-label\"> </ng-content>\n</label>\n", styles: [".sky-checkbox-icon-modern{display:none}:host-context(.sky-theme-modern) .sky-checkbox-icon-default{display:none}:host-context(.sky-theme-modern) .sky-checkbox-icon-modern{display:inline}:host-context(.sky-theme-modern) .sky-checkbox-icon-modern-checked{color:#1870b8}:host-context(.sky-theme-modern) .sky-checkbox-input:disabled+.sky-switch-control .sky-checkbox-icon-modern-checked{color:#212327}:host-context(.sky-theme-modern) .sky-switch-control{border-radius:6px}.sky-theme-modern .sky-checkbox-icon-default{display:none}.sky-theme-modern .sky-checkbox-icon-modern{display:inline}.sky-theme-modern .sky-checkbox-icon-modern-checked{color:#1870b8}.sky-theme-modern .sky-checkbox-input:disabled+.sky-switch-control .sky-checkbox-icon-modern-checked{color:#212327}.sky-theme-modern .sky-switch-control{border-radius:6px}\n"], components: [{ type: i2__namespace$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
920
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCheckboxComponent, decorators: [{
921
+ type: i0.Component,
922
+ args: [{
923
+ selector: 'sky-checkbox',
924
+ template: "<label\n class=\"sky-checkbox-wrapper sky-switch\"\n [ngClass]=\"{\n 'sky-control-label-required': required,\n 'sky-switch-disabled': disabled\n }\"\n>\n <input\n class=\"sky-checkbox-input sky-switch-input\"\n type=\"checkbox\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n [attr.aria-label]=\"label\"\n [attr.aria-labelledby]=\"labelledBy\"\n [attr.aria-required]=\"required ? true : null\"\n (blur)=\"onInputBlur()\"\n (change)=\"onInteractionEvent($event)\"\n />\n <span\n class=\"sky-switch-control sky-rounded-corners\"\n [ngClass]=\"{\n 'sky-switch-control-icon': icon,\n 'sky-switch-control-info': checkboxType === 'info',\n 'sky-switch-control-success': checkboxType === 'success',\n 'sky-switch-control-warning': checkboxType === 'warning',\n 'sky-switch-control-danger': checkboxType === 'danger'\n }\"\n >\n <sky-icon\n *ngIf=\"icon || checked\"\n class=\"sky-checkbox-icon-default\"\n fixedWidth=\"true\"\n [icon]=\"icon || 'check'\"\n >\n </sky-icon>\n <div class=\"sky-checkbox-icon-modern\">\n <sky-icon\n *ngIf=\"icon; else checkedTemplate\"\n fixedWidth=\"true\"\n [icon]=\"icon\"\n >\n </sky-icon>\n <ng-template #checkedTemplate>\n <sky-icon\n *ngIf=\"checked\"\n class=\"sky-checkbox-icon-modern-checked\"\n fixedWidth=\"true\"\n icon=\"check\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </ng-template>\n </div>\n </span>\n <ng-content select=\"sky-checkbox-label\"> </ng-content>\n</label>\n",
925
+ styles: [".sky-checkbox-icon-modern{display:none}:host-context(.sky-theme-modern) .sky-checkbox-icon-default{display:none}:host-context(.sky-theme-modern) .sky-checkbox-icon-modern{display:inline}:host-context(.sky-theme-modern) .sky-checkbox-icon-modern-checked{color:#1870b8}:host-context(.sky-theme-modern) .sky-checkbox-input:disabled+.sky-switch-control .sky-checkbox-icon-modern-checked{color:#212327}:host-context(.sky-theme-modern) .sky-switch-control{border-radius:6px}.sky-theme-modern .sky-checkbox-icon-default{display:none}.sky-theme-modern .sky-checkbox-icon-modern{display:inline}.sky-theme-modern .sky-checkbox-icon-modern-checked{color:#1870b8}.sky-theme-modern .sky-checkbox-input:disabled+.sky-switch-control .sky-checkbox-icon-modern-checked{color:#212327}.sky-theme-modern .sky-switch-control{border-radius:6px}\n"],
958
926
  }]
959
- }] });
927
+ }], ctorParameters: function () {
928
+ return [{ type: i4__namespace.NgControl, decorators: [{
929
+ type: i0.Self
930
+ }, {
931
+ type: i0.Optional
932
+ }] }];
933
+ }, propDecorators: { label: [{
934
+ type: i0.Input
935
+ }], labelledBy: [{
936
+ type: i0.Input
937
+ }], id: [{
938
+ type: i0.Input
939
+ }], disabled: [{
940
+ type: i0.Input
941
+ }], tabindex: [{
942
+ type: i0.Input
943
+ }], name: [{
944
+ type: i0.Input
945
+ }], change: [{
946
+ type: i0.Output
947
+ }], icon: [{
948
+ type: i0.Input
949
+ }], checkboxType: [{
950
+ type: i0.Input
951
+ }], checked: [{
952
+ type: i0.Input
953
+ }], required: [{
954
+ type: i0.Input
955
+ }], checkedChange: [{
956
+ type: i0.Output
957
+ }], disabledChange: [{
958
+ type: i0.Output
959
+ }] } });
960
960
 
961
961
  var SkyCheckboxModule = /** @class */ (function () {
962
962
  function SkyCheckboxModule() {
@@ -1036,7 +1036,7 @@
1036
1036
  }
1037
1037
  else if (validateFn) {
1038
1038
  var errorParam = validateFn(fileItem);
1039
- if (!!errorParam) {
1039
+ if (errorParam) {
1040
1040
  fileItem.errorType = 'validate';
1041
1041
  fileItem.errorParam = errorParam;
1042
1042
  }
@@ -2455,33 +2455,6 @@
2455
2455
  type: i0.Output
2456
2456
  }] } });
2457
2457
 
2458
- /**
2459
- * Specifies a label for the radio button.
2460
- */
2461
- var SkyRadioLabelComponent = /** @class */ (function () {
2462
- function SkyRadioLabelComponent() {
2463
- }
2464
- // When clicking on a checkbox label, Angular registers two click events.
2465
- // This handler ignores all events except for those that deal
2466
- // with the checkbox input explicitly.
2467
- SkyRadioLabelComponent.prototype.onClick = function (event) {
2468
- event.stopPropagation();
2469
- };
2470
- return SkyRadioLabelComponent;
2471
- }());
2472
- SkyRadioLabelComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyRadioLabelComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2473
- SkyRadioLabelComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyRadioLabelComponent, selector: "sky-radio-label", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0__namespace, template: "<span class=\"sky-switch-label\">\n <ng-content></ng-content>\n</span>\n" });
2474
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyRadioLabelComponent, decorators: [{
2475
- type: i0.Component,
2476
- args: [{
2477
- selector: 'sky-radio-label',
2478
- template: "<span class=\"sky-switch-label\">\n <ng-content></ng-content>\n</span>\n",
2479
- }]
2480
- }], propDecorators: { onClick: [{
2481
- type: i0.HostListener,
2482
- args: ['click', ['$event']]
2483
- }] } });
2484
-
2485
2458
  var nextUniqueId = 0;
2486
2459
  /**
2487
2460
  * Organizes radio buttons into a group. It is required for radio
@@ -2722,6 +2695,33 @@
2722
2695
  args: [SkyRadioComponent, { descendants: true }]
2723
2696
  }] } });
2724
2697
 
2698
+ /**
2699
+ * Specifies a label for the radio button.
2700
+ */
2701
+ var SkyRadioLabelComponent = /** @class */ (function () {
2702
+ function SkyRadioLabelComponent() {
2703
+ }
2704
+ // When clicking on a checkbox label, Angular registers two click events.
2705
+ // This handler ignores all events except for those that deal
2706
+ // with the checkbox input explicitly.
2707
+ SkyRadioLabelComponent.prototype.onClick = function (event) {
2708
+ event.stopPropagation();
2709
+ };
2710
+ return SkyRadioLabelComponent;
2711
+ }());
2712
+ SkyRadioLabelComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyRadioLabelComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2713
+ SkyRadioLabelComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyRadioLabelComponent, selector: "sky-radio-label", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0__namespace, template: "<span class=\"sky-switch-label\">\n <ng-content></ng-content>\n</span>\n" });
2714
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyRadioLabelComponent, decorators: [{
2715
+ type: i0.Component,
2716
+ args: [{
2717
+ selector: 'sky-radio-label',
2718
+ template: "<span class=\"sky-switch-label\">\n <ng-content></ng-content>\n</span>\n",
2719
+ }]
2720
+ }], propDecorators: { onClick: [{
2721
+ type: i0.HostListener,
2722
+ args: ['click', ['$event']]
2723
+ }] } });
2724
+
2725
2725
  var SkyRadioModule = /** @class */ (function () {
2726
2726
  function SkyRadioModule() {
2727
2727
  }
@@ -2884,24 +2884,6 @@
2884
2884
  }]
2885
2885
  }] });
2886
2886
 
2887
- /**
2888
- * Specifies the header to display in a selection box.
2889
- */
2890
- var SkySelectionBoxHeaderComponent = /** @class */ (function () {
2891
- function SkySelectionBoxHeaderComponent() {
2892
- }
2893
- return SkySelectionBoxHeaderComponent;
2894
- }());
2895
- SkySelectionBoxHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySelectionBoxHeaderComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2896
- SkySelectionBoxHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkySelectionBoxHeaderComponent, selector: "sky-selection-box-header", ngImport: i0__namespace, template: "<ng-content></ng-content>\n" });
2897
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySelectionBoxHeaderComponent, decorators: [{
2898
- type: i0.Component,
2899
- args: [{
2900
- selector: 'sky-selection-box-header',
2901
- template: "<ng-content></ng-content>\n",
2902
- }]
2903
- }] });
2904
-
2905
2887
  /**
2906
2888
  * Creates a button to present users with a choice or question before proceeding with a one-time process.
2907
2889
  */
@@ -3144,6 +3126,24 @@
3144
3126
  args: ['window:resize']
3145
3127
  }] } });
3146
3128
 
3129
+ /**
3130
+ * Specifies the header to display in a selection box.
3131
+ */
3132
+ var SkySelectionBoxHeaderComponent = /** @class */ (function () {
3133
+ function SkySelectionBoxHeaderComponent() {
3134
+ }
3135
+ return SkySelectionBoxHeaderComponent;
3136
+ }());
3137
+ SkySelectionBoxHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySelectionBoxHeaderComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
3138
+ SkySelectionBoxHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkySelectionBoxHeaderComponent, selector: "sky-selection-box-header", ngImport: i0__namespace, template: "<ng-content></ng-content>\n" });
3139
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySelectionBoxHeaderComponent, decorators: [{
3140
+ type: i0.Component,
3141
+ args: [{
3142
+ selector: 'sky-selection-box-header',
3143
+ template: "<ng-content></ng-content>\n",
3144
+ }]
3145
+ }] });
3146
+
3147
3147
  var SkySelectionBoxModule = /** @class */ (function () {
3148
3148
  function SkySelectionBoxModule() {
3149
3149
  }