@skyux/forms 10.0.0-alpha.2 → 10.0.0-alpha.4

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 (68) hide show
  1. package/documentation.json +4430 -3033
  2. package/esm2022/lib/modules/character-counter/character-counter-indicator.component.mjs +5 -5
  3. package/esm2022/lib/modules/character-counter/character-counter-screen-reader.pipe.mjs +3 -3
  4. package/esm2022/lib/modules/character-counter/character-counter.directive.mjs +3 -3
  5. package/esm2022/lib/modules/character-counter/character-counter.module.mjs +4 -4
  6. package/esm2022/lib/modules/checkbox/checkbox-label-text-label.component.mjs +30 -0
  7. package/esm2022/lib/modules/checkbox/checkbox-label.component.mjs +5 -4
  8. package/esm2022/lib/modules/checkbox/checkbox.component.mjs +53 -7
  9. package/esm2022/lib/modules/checkbox/checkbox.module.mjs +13 -6
  10. package/esm2022/lib/modules/file-attachment/file-attachment-label.component.mjs +14 -6
  11. package/esm2022/lib/modules/file-attachment/file-attachment.component.mjs +49 -17
  12. package/esm2022/lib/modules/file-attachment/file-attachment.service.mjs +3 -3
  13. package/esm2022/lib/modules/file-attachment/file-attachments.module.mjs +13 -5
  14. package/esm2022/lib/modules/file-attachment/file-drop.component.mjs +7 -6
  15. package/esm2022/lib/modules/file-attachment/file-item.component.mjs +3 -3
  16. package/esm2022/lib/modules/file-attachment/file-item.service.mjs +3 -3
  17. package/esm2022/lib/modules/file-attachment/file-size.pipe.mjs +3 -3
  18. package/esm2022/lib/modules/form-error/form-error.component.mjs +3 -3
  19. package/esm2022/lib/modules/form-error/form-error.module.mjs +4 -4
  20. package/esm2022/lib/modules/form-error/form-errors.component.mjs +5 -5
  21. package/esm2022/lib/modules/form-error/form-errors.module.mjs +4 -4
  22. package/esm2022/lib/modules/input-box/input-box-adapter.service.mjs +3 -3
  23. package/esm2022/lib/modules/input-box/input-box-control.directive.mjs +3 -3
  24. package/esm2022/lib/modules/input-box/input-box-help-inline.component.mjs +5 -5
  25. package/esm2022/lib/modules/input-box/input-box-hint-text.pipe.mjs +23 -0
  26. package/esm2022/lib/modules/input-box/input-box-host.service.mjs +16 -4
  27. package/esm2022/lib/modules/input-box/input-box.component.mjs +17 -6
  28. package/esm2022/lib/modules/input-box/input-box.module.mjs +8 -5
  29. package/esm2022/lib/modules/radio/radio-group-id.service.mjs +3 -3
  30. package/esm2022/lib/modules/radio/radio-group.component.mjs +12 -11
  31. package/esm2022/lib/modules/radio/radio-label.component.mjs +3 -3
  32. package/esm2022/lib/modules/radio/radio.component.mjs +4 -4
  33. package/esm2022/lib/modules/radio/radio.module.mjs +4 -4
  34. package/esm2022/lib/modules/selection-box/selection-box-adapter.service.mjs +3 -3
  35. package/esm2022/lib/modules/selection-box/selection-box-description.component.mjs +3 -3
  36. package/esm2022/lib/modules/selection-box/selection-box-grid.component.mjs +3 -3
  37. package/esm2022/lib/modules/selection-box/selection-box-header.component.mjs +3 -3
  38. package/esm2022/lib/modules/selection-box/selection-box.component.mjs +3 -3
  39. package/esm2022/lib/modules/selection-box/selection-box.module.mjs +4 -4
  40. package/esm2022/lib/modules/shared/sky-forms-resources.module.mjs +15 -6
  41. package/esm2022/lib/modules/toggle-switch/toggle-switch-label.component.mjs +14 -6
  42. package/esm2022/lib/modules/toggle-switch/toggle-switch.component.mjs +41 -7
  43. package/esm2022/lib/modules/toggle-switch/toggle-switch.module.mjs +4 -4
  44. package/esm2022/testing/checkbox/checkbox-harness.mjs +26 -4
  45. package/esm2022/testing/checkbox/checkbox-label-text-label.harness.mjs +19 -0
  46. package/esm2022/testing/input-box/input-box-harness.mjs +4 -10
  47. package/fesm2022/skyux-forms-testing.mjs +44 -11
  48. package/fesm2022/skyux-forms-testing.mjs.map +1 -1
  49. package/fesm2022/skyux-forms.mjs +376 -159
  50. package/fesm2022/skyux-forms.mjs.map +1 -1
  51. package/lib/modules/checkbox/checkbox-label-text-label.component.d.ts +12 -0
  52. package/lib/modules/checkbox/checkbox-label.component.d.ts +1 -0
  53. package/lib/modules/checkbox/checkbox.component.d.ts +14 -3
  54. package/lib/modules/checkbox/checkbox.module.d.ts +9 -8
  55. package/lib/modules/file-attachment/file-attachment-label.component.d.ts +2 -0
  56. package/lib/modules/file-attachment/file-attachment.component.d.ts +19 -2
  57. package/lib/modules/file-attachment/file-attachments.module.d.ts +6 -4
  58. package/lib/modules/input-box/input-box-hint-text.pipe.d.ts +10 -0
  59. package/lib/modules/input-box/input-box-host.service.d.ts +2 -0
  60. package/lib/modules/input-box/input-box.component.d.ts +4 -0
  61. package/lib/modules/input-box/input-box.module.d.ts +3 -2
  62. package/lib/modules/radio/radio-group.component.d.ts +3 -1
  63. package/lib/modules/toggle-switch/toggle-switch-label.component.d.ts +2 -0
  64. package/lib/modules/toggle-switch/toggle-switch.component.d.ts +15 -2
  65. package/package.json +12 -12
  66. package/testing/checkbox/checkbox-harness.d.ts +6 -1
  67. package/testing/checkbox/checkbox-label-text-label.harness.d.ts +16 -0
  68. package/testing/input-box/input-box-harness.d.ts +3 -7
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ @internal
4
+ */
5
+ export declare class SkyCheckboxLabelTextLabelComponent {
6
+ #private;
7
+ labelHidden: boolean;
8
+ set labelText(value: string);
9
+ get labelText(): string;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyCheckboxLabelTextLabelComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyCheckboxLabelTextLabelComponent, "sky-checkbox-label-text-label", never, { "labelHidden": { "alias": "labelHidden"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; }, {}, never, never, false, never>;
12
+ }
@@ -3,6 +3,7 @@ import * as i0 from "@angular/core";
3
3
  * Specifies a label for the checkbox. To display a help button beside the label, include a help button element, such as
4
4
  * `sky-help-inline`, in the `sky-checkbox-label` element and a `sky-control-help` CSS class on that help button
5
5
  * element.
6
+ * @deprecated Use `labelText` input on `sky-checkbox-component` instead.
6
7
  */
7
8
  export declare class SkyCheckboxLabelComponent {
8
9
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyCheckboxLabelComponent, never>;
@@ -14,15 +14,19 @@ export declare class SkyCheckboxComponent implements ControlValueAccessor, OnIni
14
14
  * [to support accessibility](https://developer.blackbaud.com/skyux/components/checkbox#accessibility)
15
15
  * when the checkbox does not include a visible label. You must set this property for icon
16
16
  * checkboxes. If the checkbox includes a visible label, use `labelledBy` instead.
17
+ * @deprecated Use `labelText` instead.
17
18
  */
18
- label: string | undefined;
19
+ set label(value: string | undefined);
20
+ get label(): string | undefined;
19
21
  /**
20
22
  * The HTML element ID of the element that labels the
21
23
  * checkbox. This sets the checkbox's `aria-labelledby` attribute
22
24
  * [to support accessibility](https://developer.blackbaud.com/skyux/components/checkbox#accessibility).
23
25
  * If the checkbox does not include a visible label, use `label` instead.
26
+ * @deprecated Use `labelText` instead.
24
27
  */
25
- labelledBy: string | undefined;
28
+ set labelledBy(value: string | undefined);
29
+ get labelledBy(): string | undefined;
26
30
  /**
27
31
  * The ID for the checkbox.
28
32
  * If a value is not provided, an autogenerated ID is used.
@@ -97,8 +101,14 @@ export declare class SkyCheckboxComponent implements ControlValueAccessor, OnIni
97
101
  /**
98
102
  * The text to display as the checkbox's label. Use this instead of the `sky-checkbox-label` when the label is text-only.
99
103
  * Specifying `labelText` also enables automatic error message handling for checkbox.
104
+ * @preview
100
105
  */
101
106
  labelText: string | undefined;
107
+ /**
108
+ * Indicates whether to hide the `labelText`.
109
+ * @preview
110
+ */
111
+ labelHidden: boolean;
102
112
  /**
103
113
  * Fires when users select or deselect the checkbox.
104
114
  */
@@ -144,5 +154,6 @@ export declare class SkyCheckboxComponent implements ControlValueAccessor, OnIni
144
154
  /** Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor. */
145
155
  onTouched: () => any;
146
156
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyCheckboxComponent, never>;
147
- static ɵcmp: i0.ɵɵComponentDeclaration<SkyCheckboxComponent, "sky-checkbox", never, { "label": { "alias": "label"; "required": false; }; "labelledBy": { "alias": "labelledBy"; "required": false; }; "id": { "alias": "id"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "name": { "alias": "name"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "checkboxType": { "alias": "checkboxType"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "required": { "alias": "required"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; }, { "change": "change"; "checkedChange": "checkedChange"; "disabledChange": "disabledChange"; "indeterminateChange": "indeterminateChange"; }, never, ["sky-checkbox-label", "sky-form-error"], false, never>;
157
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyCheckboxComponent, "sky-checkbox", never, { "label": { "alias": "label"; "required": false; }; "labelledBy": { "alias": "labelledBy"; "required": false; }; "id": { "alias": "id"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "name": { "alias": "name"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "checkboxType": { "alias": "checkboxType"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "required": { "alias": "required"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; }, { "change": "change"; "checkedChange": "checkedChange"; "disabledChange": "disabledChange"; "indeterminateChange": "indeterminateChange"; }, never, ["sky-checkbox-label", "sky-form-error"], false, never>;
158
+ static ngAcceptInputType_labelHidden: unknown;
148
159
  }
@@ -1,15 +1,16 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./checkbox.component";
3
3
  import * as i2 from "./checkbox-label.component";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "@angular/forms";
6
- import * as i5 from "../form-error/form-error.module";
7
- import * as i6 from "../form-error/form-errors.module";
8
- import * as i7 from "../shared/sky-forms-resources.module";
9
- import * as i8 from "@skyux/indicators";
10
- import * as i9 from "@skyux/core";
4
+ import * as i3 from "./checkbox-label-text-label.component";
5
+ import * as i4 from "@angular/common";
6
+ import * as i5 from "@angular/forms";
7
+ import * as i6 from "../form-error/form-error.module";
8
+ import * as i7 from "../form-error/form-errors.module";
9
+ import * as i8 from "../shared/sky-forms-resources.module";
10
+ import * as i9 from "@skyux/indicators";
11
+ import * as i10 from "@skyux/core";
11
12
  export declare class SkyCheckboxModule {
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyCheckboxModule, never>;
13
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkyCheckboxModule, [typeof i1.SkyCheckboxComponent, typeof i2.SkyCheckboxLabelComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.SkyFormErrorModule, typeof i6.SkyFormErrorsModule, typeof i7.SkyFormsResourcesModule, typeof i8.SkyIconModule, typeof i9.SkyTrimModule], [typeof i1.SkyCheckboxComponent, typeof i2.SkyCheckboxLabelComponent, typeof i5.SkyFormErrorModule]>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SkyCheckboxModule, [typeof i1.SkyCheckboxComponent, typeof i2.SkyCheckboxLabelComponent, typeof i3.SkyCheckboxLabelTextLabelComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i6.SkyFormErrorModule, typeof i7.SkyFormErrorsModule, typeof i8.SkyFormsResourcesModule, typeof i9.SkyIconModule, typeof i10.SkyTrimModule], [typeof i1.SkyCheckboxComponent, typeof i2.SkyCheckboxLabelComponent, typeof i6.SkyFormErrorModule]>;
14
15
  static ɵinj: i0.ɵɵInjectorDeclaration<SkyCheckboxModule>;
15
16
  }
@@ -3,11 +3,13 @@ import * as i0 from "@angular/core";
3
3
  * Displays a label above the file attachment element. To display a help button beside the label, include a help button
4
4
  * element, such as `sky-help-inline`, in the `sky-file-attachment-label` element and a `sky-control-help` CSS class on
5
5
  * that help button element.
6
+ * @deprecated use the `labelText` input on the single file attachment component instead.
6
7
  */
7
8
  export declare class SkyFileAttachmentLabelComponent {
8
9
  labelContentId: {
9
10
  id: string;
10
11
  } | undefined;
12
+ constructor();
11
13
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyFileAttachmentLabelComponent, never>;
12
14
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyFileAttachmentLabelComponent, "sky-file-attachment-label", never, {}, {}, never, ["*", ".sky-control-help"], false, never>;
13
15
  }
@@ -1,9 +1,10 @@
1
1
  import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList } from '@angular/core';
2
- import { NgControl } from '@angular/forms';
2
+ import { NgControl, ValidationErrors } from '@angular/forms';
3
3
  import { SkyThemeService } from '@skyux/theme';
4
4
  import { SkyFileAttachmentLabelComponent } from './file-attachment-label.component';
5
5
  import { SkyFileAttachmentService } from './file-attachment.service';
6
6
  import { SkyFileItem } from './file-item';
7
+ import { SkyFileItemErrorType } from './file-item-error-type';
7
8
  import { SkyFileItemService } from './file-item.service';
8
9
  import { SkyFileValidateFn } from './file-validate-function';
9
10
  import { SkyFileAttachmentChange } from './types/file-attachment-change';
@@ -27,6 +28,16 @@ export declare class SkyFileAttachmentComponent implements AfterViewInit, AfterC
27
28
  */
28
29
  set disabled(value: boolean | undefined);
29
30
  get disabled(): boolean;
31
+ /**
32
+ * The text to display as the file attachment's label.
33
+ * @preview
34
+ */
35
+ labelText: string | undefined;
36
+ /**
37
+ * Whether to hide `labelText` from view.
38
+ * @preview
39
+ */
40
+ labelHidden: boolean;
30
41
  /**
31
42
  * The maximum size in bytes for valid files.
32
43
  * @default 500000
@@ -75,6 +86,11 @@ export declare class SkyFileAttachmentComponent implements AfterViewInit, AfterC
75
86
  inputEl: ElementRef | undefined;
76
87
  labelComponents: QueryList<SkyFileAttachmentLabelComponent> | undefined;
77
88
  isImage: boolean;
89
+ protected ngControl: NgControl | undefined;
90
+ protected errorId: string;
91
+ protected fileErrorName: SkyFileItemErrorType | undefined;
92
+ protected fileErrorParam: string | undefined;
93
+ protected fileErrorValidation: ValidationErrors | null | undefined;
78
94
  constructor(changeDetector: ChangeDetectorRef, fileAttachmentService: SkyFileAttachmentService, fileItemService: SkyFileItemService, ngControl?: NgControl, themeSvc?: SkyThemeService);
79
95
  ngOnInit(): void;
80
96
  ngAfterViewInit(): void;
@@ -98,5 +114,6 @@ export declare class SkyFileAttachmentComponent implements AfterViewInit, AfterC
98
114
  setDisabledState(isDisabled: boolean): void;
99
115
  emitClick(): void;
100
116
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyFileAttachmentComponent, [null, null, null, { optional: true; self: true; }, { optional: true; }]>;
101
- static ɵcmp: i0.ɵɵComponentDeclaration<SkyFileAttachmentComponent, "sky-file-attachment", never, { "acceptedTypes": { "alias": "acceptedTypes"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "minFileSize": { "alias": "minFileSize"; "required": false; }; "validateFn": { "alias": "validateFn"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, { "fileChange": "fileChange"; "fileClick": "fileClick"; }, ["labelComponents"], ["sky-file-attachment-label"], false, never>;
117
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyFileAttachmentComponent, "sky-file-attachment", never, { "acceptedTypes": { "alias": "acceptedTypes"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "minFileSize": { "alias": "minFileSize"; "required": false; }; "validateFn": { "alias": "validateFn"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, { "fileChange": "fileChange"; "fileClick": "fileClick"; }, ["labelComponents"], ["sky-form-error", "sky-file-attachment-label"], false, never>;
118
+ static ngAcceptInputType_labelHidden: unknown;
102
119
  }
@@ -7,11 +7,13 @@ import * as i5 from "./file-size.pipe";
7
7
  import * as i6 from "@angular/common";
8
8
  import * as i7 from "@angular/forms";
9
9
  import * as i8 from "../shared/sky-forms-resources.module";
10
- import * as i9 from "@skyux/indicators";
11
- import * as i10 from "@skyux/core";
12
- import * as i11 from "@skyux/theme";
10
+ import * as i9 from "../form-error/form-error.module";
11
+ import * as i10 from "../form-error/form-errors.module";
12
+ import * as i11 from "@skyux/indicators";
13
+ import * as i12 from "@skyux/core";
14
+ import * as i13 from "@skyux/theme";
13
15
  export declare class SkyFileAttachmentsModule {
14
16
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyFileAttachmentsModule, never>;
15
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkyFileAttachmentsModule, [typeof i1.SkyFileAttachmentComponent, typeof i2.SkyFileAttachmentLabelComponent, typeof i3.SkyFileDropComponent, typeof i4.SkyFileItemComponent, typeof i5.SkyFileSizePipe], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.SkyFormsResourcesModule, typeof i9.SkyIconModule, typeof i10.SkyIdModule, typeof i11.SkyThemeModule, typeof i10.SkyTrimModule], [typeof i1.SkyFileAttachmentComponent, typeof i2.SkyFileAttachmentLabelComponent, typeof i3.SkyFileDropComponent, typeof i4.SkyFileItemComponent, typeof i5.SkyFileSizePipe]>;
17
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SkyFileAttachmentsModule, [typeof i1.SkyFileAttachmentComponent, typeof i2.SkyFileAttachmentLabelComponent, typeof i3.SkyFileDropComponent, typeof i4.SkyFileItemComponent, typeof i5.SkyFileSizePipe], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.SkyFormsResourcesModule, typeof i9.SkyFormErrorModule, typeof i10.SkyFormErrorsModule, typeof i11.SkyIconModule, typeof i12.SkyIdModule, typeof i13.SkyThemeModule, typeof i12.SkyTrimModule], [typeof i1.SkyFileAttachmentComponent, typeof i2.SkyFileAttachmentLabelComponent, typeof i3.SkyFileDropComponent, typeof i4.SkyFileItemComponent, typeof i5.SkyFileSizePipe]>;
16
18
  static ɵinj: i0.ɵɵInjectorDeclaration<SkyFileAttachmentsModule>;
17
19
  }
@@ -0,0 +1,10 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare class SkyInputBoxHintTextPipe implements PipeTransform {
7
+ transform(hintText?: string, hostHintText?: string): string | undefined;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyInputBoxHintTextPipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<SkyInputBoxHintTextPipe, "skyInputBoxHintText", true>;
10
+ }
@@ -12,6 +12,8 @@ export declare class SkyInputBoxHostService {
12
12
  get ariaDescribedBy(): Observable<string | undefined> | undefined;
13
13
  init(host: SkyInputBoxComponent): void;
14
14
  populate(args: SkyInputBoxPopulateArgs): void;
15
+ setHintText(hintText: string | undefined): void;
16
+ setHintTextHidden(hide: boolean): void;
15
17
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyInputBoxHostService, never>;
16
18
  static ɵprov: i0.ɵɵInjectableDeclaration<SkyInputBoxHostService>;
17
19
  }
@@ -64,6 +64,8 @@ export declare class SkyInputBoxComponent implements OnInit, AfterContentChecked
64
64
  formControlHasFocus: boolean;
65
65
  hostIconsInsetTemplate: TemplateRef<unknown> | undefined;
66
66
  hostIconsInsetLeftTemplate: TemplateRef<unknown> | undefined;
67
+ protected hintTextHidden: boolean;
68
+ protected hostHintText: string | undefined;
67
69
  readonly controlId: string;
68
70
  readonly errorId: string;
69
71
  readonly hintTextId: string;
@@ -85,6 +87,8 @@ export declare class SkyInputBoxComponent implements OnInit, AfterContentChecked
85
87
  formControlFocusOut(): void;
86
88
  onInsetIconClick(): void;
87
89
  populate(args: SkyInputBoxPopulateArgs): void;
90
+ setHintTextHidden(hide: boolean): void;
91
+ setHostHintText(value: string | undefined): void;
88
92
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyInputBoxComponent, never>;
89
93
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyInputBoxComponent, "sky-input-box", never, { "hasErrors": { "alias": "hasErrors"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "characterLimit": { "alias": "characterLimit"; "required": false; }; "stacked": { "alias": "stacked"; "required": false; }; "helpPopoverTitle": { "alias": "helpPopoverTitle"; "required": false; }; "helpPopoverContent": { "alias": "helpPopoverContent"; "required": false; }; "hintText": { "alias": "hintText"; "required": false; }; }, {}, ["formControl", "formControlByName", "ngModel", "inputRef"], [".sky-control-label", ".sky-control-help", "sky-character-counter-indicator", "input,select,.sky-form-control:not(textarea),sky-text-editor", "textarea", ".sky-input-group-btn.sky-input-box-btn-left", ".sky-input-group-btn:not(.sky-input-box-btn-left):not(.sky-input-box-btn-inset)", ".sky-input-group-btn.sky-input-box-btn-inset", ".sky-input-group-icon.sky-input-box-icon-inset", ".sky-input-group-icon.sky-input-box-icon-inset-left", "sky-form-error", ".sky-error-label,.sky-error-indicator"], false, never>;
90
94
  }
@@ -7,9 +7,10 @@ import * as i5 from "../form-error/form-error.module";
7
7
  import * as i6 from "../shared/sky-forms-resources.module";
8
8
  import * as i7 from "./input-box-control.directive";
9
9
  import * as i8 from "./input-box-help-inline.component";
10
- import * as i9 from "@skyux/theme";
10
+ import * as i9 from "./input-box-hint-text.pipe";
11
+ import * as i10 from "@skyux/theme";
11
12
  export declare class SkyInputBoxModule {
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyInputBoxModule, never>;
13
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkyInputBoxModule, [typeof i1.SkyInputBoxComponent], [typeof i2.CommonModule, typeof i3.SkyCharacterCounterModule, typeof i4.SkyFormErrorsModule, typeof i5.SkyFormErrorModule, typeof i6.SkyFormsResourcesModule, typeof i7.SkyInputBoxControlDirective, typeof i8.SkyInputBoxHelpInlineComponent, typeof i9.SkyThemeModule], [typeof i1.SkyInputBoxComponent, typeof i7.SkyInputBoxControlDirective, typeof i5.SkyFormErrorModule]>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SkyInputBoxModule, [typeof i1.SkyInputBoxComponent], [typeof i2.CommonModule, typeof i3.SkyCharacterCounterModule, typeof i4.SkyFormErrorsModule, typeof i5.SkyFormErrorModule, typeof i6.SkyFormsResourcesModule, typeof i7.SkyInputBoxControlDirective, typeof i8.SkyInputBoxHelpInlineComponent, typeof i9.SkyInputBoxHintTextPipe, typeof i10.SkyThemeModule], [typeof i1.SkyInputBoxComponent, typeof i7.SkyInputBoxControlDirective, typeof i5.SkyFormErrorModule]>;
14
15
  static ɵinj: i0.ɵɵInjectorDeclaration<SkyInputBoxModule>;
15
16
  }
@@ -72,10 +72,12 @@ export declare class SkyRadioGroupComponent implements AfterContentInit, AfterVi
72
72
  get tabIndex(): number | undefined;
73
73
  /**
74
74
  * The text to display as the radio group's label.
75
+ * @preview
75
76
  */
76
77
  labelText: string | undefined;
77
78
  /**
78
79
  * Indicates whether to hide the `labelText`.
80
+ * @preview
79
81
  */
80
82
  labelHidden: boolean;
81
83
  /**
@@ -87,7 +89,6 @@ export declare class SkyRadioGroupComponent implements AfterContentInit, AfterVi
87
89
  */
88
90
  ariaOwns: string | undefined;
89
91
  radios: QueryList<SkyRadioComponent> | undefined;
90
- protected labelId: string;
91
92
  protected errorId: string;
92
93
  protected ngControl: NgControl | undefined;
93
94
  constructor(changeDetector: ChangeDetectorRef, radioGroupIdSvc: SkyRadioGroupIdService, ngControl: NgControl);
@@ -105,4 +106,5 @@ export declare class SkyRadioGroupComponent implements AfterContentInit, AfterVi
105
106
  registerOnTouched(fn: any): void;
106
107
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyRadioGroupComponent, [null, null, { optional: true; self: true; }]>;
107
108
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyRadioGroupComponent, "sky-radio-group", never, { "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "name": { "alias": "name"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; }, {}, ["radios"], ["*", "sky-form-error"], false, never>;
109
+ static ngAcceptInputType_labelHidden: unknown;
108
110
  }
@@ -3,8 +3,10 @@ import * as i0 from "@angular/core";
3
3
  * Specifies the label to display beside the toggle switch. To display a help button beside the label, include a help
4
4
  * button element, such as `sky-help-inline`, in the `sky-toggle-switch` element and a `sky-control-help` CSS class on
5
5
  * that help button element.
6
+ * @deprecated Use the `labelText` input on the toggle switch component instead.
6
7
  */
7
8
  export declare class SkyToggleSwitchLabelComponent {
9
+ constructor();
8
10
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyToggleSwitchLabelComponent, never>;
9
11
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyToggleSwitchLabelComponent, "sky-toggle-switch-label", never, {}, {}, never, ["*"], false, never>;
10
12
  }
@@ -12,8 +12,10 @@ export declare class SkyToggleSwitchComponent implements AfterContentInit, OnDes
12
12
  * Use a context-sensitive label, such as "Activate annual fundraiser" for a toggle switch that activates and deactivates an annual fundraiser. Context is especially important if multiple toggle switches are in close proximity.
13
13
  * When the `sky-toggle-switch-label` component displays a visible label, this property is only necessary if that label requires extra context.
14
14
  * For more information about the `aria-label` attribute, see the [WAI-ARIA definition](https://www.w3.org/TR/wai-aria/#aria-label).
15
+ * @deprecated Use the `labelText` input instead.
15
16
  */
16
- ariaLabel: string | undefined;
17
+ set ariaLabel(value: string | undefined);
18
+ get ariaLabel(): string | undefined;
17
19
  /**
18
20
  * Whether the toggle switch is selected.
19
21
  * @default false
@@ -30,6 +32,16 @@ export declare class SkyToggleSwitchComponent implements AfterContentInit, OnDes
30
32
  * of the toggle switch on load.
31
33
  */
32
34
  tabIndex: number | undefined;
35
+ /**
36
+ * The text to display as the toggle switch's label.
37
+ * @preview
38
+ */
39
+ labelText: string | undefined;
40
+ /**
41
+ * Whether to hide `labelText` from view.
42
+ * @preview
43
+ */
44
+ labelHidden: boolean;
33
45
  /**
34
46
  * Fires when the checked state of a toggle switch changes.
35
47
  */
@@ -49,5 +61,6 @@ export declare class SkyToggleSwitchComponent implements AfterContentInit, OnDes
49
61
  onButtonClick(event: any): void;
50
62
  onButtonBlur(): void;
51
63
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyToggleSwitchComponent, never>;
52
- static ɵcmp: i0.ɵɵComponentDeclaration<SkyToggleSwitchComponent, "sky-toggle-switch", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "toggleChange": "toggleChange"; }, ["labelComponents"], [".sky-control-help", "sky-toggle-switch-label"], false, never>;
64
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyToggleSwitchComponent, "sky-toggle-switch", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; }, { "toggleChange": "toggleChange"; }, ["labelComponents"], [".sky-control-help", "sky-toggle-switch-label"], false, never>;
65
+ static ngAcceptInputType_labelHidden: unknown;
53
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/forms",
3
- "version": "10.0.0-alpha.2",
3
+ "version": "10.0.0-alpha.4",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -36,17 +36,17 @@
36
36
  }
37
37
  },
38
38
  "peerDependencies": {
39
- "@angular/cdk": "^17.1.1",
40
- "@angular/common": "^17.1.1",
41
- "@angular/core": "^17.1.1",
42
- "@angular/forms": "^17.1.1",
43
- "@angular/platform-browser": "^17.1.1",
44
- "@skyux-sdk/testing": "10.0.0-alpha.2",
45
- "@skyux/core": "10.0.0-alpha.2",
46
- "@skyux/i18n": "10.0.0-alpha.2",
47
- "@skyux/indicators": "10.0.0-alpha.2",
48
- "@skyux/popovers": "10.0.0-alpha.2",
49
- "@skyux/theme": "10.0.0-alpha.2"
39
+ "@angular/cdk": "^17.2.2",
40
+ "@angular/common": "^17.2.4",
41
+ "@angular/core": "^17.2.4",
42
+ "@angular/forms": "^17.2.4",
43
+ "@angular/platform-browser": "^17.2.4",
44
+ "@skyux-sdk/testing": "10.0.0-alpha.4",
45
+ "@skyux/core": "10.0.0-alpha.4",
46
+ "@skyux/i18n": "10.0.0-alpha.4",
47
+ "@skyux/indicators": "10.0.0-alpha.4",
48
+ "@skyux/popovers": "10.0.0-alpha.4",
49
+ "@skyux/theme": "10.0.0-alpha.4"
50
50
  },
51
51
  "dependencies": {
52
52
  "tslib": "^2.6.2"
@@ -37,9 +37,14 @@ export declare class SkyCheckboxHarness extends SkyComponentHarness {
37
37
  */
38
38
  getAriaLabelledby(): Promise<string | null>;
39
39
  /**
40
- * Gets the checkbox's label text.
40
+ * Gets the checkbox's label text. If the label is set via `labelText` and `labelHidden` is true,
41
+ * the text will still be returned.
41
42
  */
42
43
  getLabelText(): Promise<string | undefined>;
44
+ /**
45
+ * Whether the label is hidden. Only supported when using the `labelText` input to set the label.
46
+ */
47
+ getLabelHidden(): Promise<boolean>;
43
48
  /**
44
49
  * Gets the checkbox's name.
45
50
  */
@@ -0,0 +1,16 @@
1
+ import { ComponentHarness } from '@angular/cdk/testing';
2
+ /**
3
+ * Harness for interacting with a `labelText` checkbox label component in tests.
4
+ * @internal
5
+ */
6
+ export declare class SkyCheckboxLabelTextLabelHarness extends ComponentHarness {
7
+ #private;
8
+ /**
9
+ * @internal
10
+ */
11
+ static hostSelector: string;
12
+ /**
13
+ * Gets the text content of the `labelText` checkbox label.
14
+ */
15
+ getText(): Promise<string | undefined>;
16
+ }
@@ -1,5 +1,5 @@
1
- import { ComponentHarness, HarnessPredicate, HarnessQuery } from '@angular/cdk/testing';
2
- import { SkyComponentHarness } from '@skyux/core/testing';
1
+ import { HarnessPredicate } from '@angular/cdk/testing';
2
+ import { SkyQueryableComponentHarness } from '@skyux/core/testing';
3
3
  import { SkyStatusIndicatorHarness } from '@skyux/indicators/testing';
4
4
  import { SkyPopoverHarness } from '@skyux/popovers/testing';
5
5
  import { SkyCharacterCounterIndicatorHarness } from '../character-counter/character-counter-indicator-harness';
@@ -7,7 +7,7 @@ import { SkyInputBoxHarnessFilters } from './input-box-harness-filters';
7
7
  /**
8
8
  * Harness for interacting with an input box component in tests.
9
9
  */
10
- export declare class SkyInputBoxHarness extends SkyComponentHarness {
10
+ export declare class SkyInputBoxHarness extends SkyQueryableComponentHarness {
11
11
  #private;
12
12
  /**
13
13
  * @internal
@@ -18,10 +18,6 @@ export declare class SkyInputBoxHarness extends SkyComponentHarness {
18
18
  * `SkyInputBoxHarness` that meets certain criteria.
19
19
  */
20
20
  static with(filters: SkyInputBoxHarnessFilters): HarnessPredicate<SkyInputBoxHarness>;
21
- /**
22
- * Returns a child harness.
23
- */
24
- queryHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null>;
25
21
  /**
26
22
  * Gets the character counter indicator for the input box or throws an error if
27
23
  * a character limit is not specified.