@skyux/forms 15.0.0-alpha.7 → 15.0.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/forms",
3
- "version": "15.0.0-alpha.7",
3
+ "version": "15.0.0-alpha.9",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -21,13 +21,13 @@
21
21
  "@angular/core": "^22.1.2",
22
22
  "@angular/forms": "^22.1.2",
23
23
  "@angular/platform-browser": "^22.1.2",
24
- "@skyux/core": "15.0.0-alpha.7",
25
- "@skyux/help-inline": "15.0.0-alpha.7",
26
- "@skyux/i18n": "15.0.0-alpha.7",
27
- "@skyux/icon": "15.0.0-alpha.7",
28
- "@skyux/indicators": "15.0.0-alpha.7",
29
- "@skyux/popovers": "15.0.0-alpha.7",
30
- "@skyux/theme": "15.0.0-alpha.7"
24
+ "@skyux/core": "15.0.0-alpha.9",
25
+ "@skyux/help-inline": "15.0.0-alpha.9",
26
+ "@skyux/i18n": "15.0.0-alpha.9",
27
+ "@skyux/icon": "15.0.0-alpha.9",
28
+ "@skyux/indicators": "15.0.0-alpha.9",
29
+ "@skyux/popovers": "15.0.0-alpha.9",
30
+ "@skyux/theme": "15.0.0-alpha.9"
31
31
  },
32
32
  "dependencies": {
33
33
  "tslib": "^2.8.1"
@@ -9,12 +9,18 @@ import { SkyIconHarness } from '@skyux/icon/testing';
9
9
 
10
10
  /**
11
11
  * A set of criteria that can be used to filter a list of SkyCharacterCounterIndicatorHarness instances.
12
+ *
13
+ * @deprecated Use `SkyInputBoxHarnessFilters` with an input box that sets the
14
+ * `characterLimit` input instead.
12
15
  */
13
16
  interface SkyCharacterCounterIndicatorHarnessFilters extends SkyHarnessFilters {
14
17
  }
15
18
 
16
19
  /**
17
20
  * Harness for interacting with a character counter indicator component in tests.
21
+ *
22
+ * @deprecated Use `SkyInputBoxHarness` with an input box that sets the
23
+ * `characterLimit` input instead.
18
24
  */
19
25
  declare class SkyCharacterCounterIndicatorHarness extends SkyComponentHarness {
20
26
  #private;
@@ -100,8 +106,28 @@ declare class SkyInputBoxHarness extends SkyQueryableComponentHarness {
100
106
  /**
101
107
  * Gets the character counter indicator for the input box or throws an error if
102
108
  * a character limit is not specified.
109
+ *
110
+ * @deprecated Use `getCharacterCount()`, `getCharacterLimit()`, and
111
+ * `isOverCharacterLimit()` instead. Those methods require the `characterLimit`
112
+ * input, so an input box that projects a `sky-character-counter-indicator` component
113
+ * must migrate to that input first.
103
114
  */
104
115
  getCharacterCounter(): Promise<SkyCharacterCounterIndicatorHarness>;
116
+ /**
117
+ * Gets the current character count, or throws an error if the input box does
118
+ * not set the `characterLimit` input.
119
+ */
120
+ getCharacterCount(): Promise<number>;
121
+ /**
122
+ * Gets the character limit, or throws an error if the input box does not set
123
+ * the `characterLimit` input.
124
+ */
125
+ getCharacterLimit(): Promise<number>;
126
+ /**
127
+ * Whether the character count has exceeded the character limit. Throws an
128
+ * error if the input box does not set the `characterLimit` input.
129
+ */
130
+ isOverCharacterLimit(): Promise<boolean>;
105
131
  /**
106
132
  * Gets a list of status indicator harnesses for errors not automatically
107
133
  * handled by input box.
@@ -11,6 +11,10 @@ import * as i11 from '@skyux/icon';
11
11
  import * as i12 from '@skyux/core';
12
12
  import { NumberInput, BooleanInput } from '@angular/cdk/coercion';
13
13
 
14
+ /**
15
+ * @deprecated Use [input box](https://developer.blackbaud.com/skyux/components/input-box)
16
+ * with its `characterLimit` input instead.
17
+ */
14
18
  declare class SkyCharacterCounterIndicatorComponent {
15
19
  #private;
16
20
  get characterCount(): number;
@@ -26,6 +30,8 @@ declare class SkyCharacterCounterIndicatorComponent {
26
30
  * an `input` or `textarea` element. If users enter more characters than allowed, then the
27
31
  * input field is invalid and the component displays an error indicator.
28
32
  * @required
33
+ * @deprecated Use [input box](https://developer.blackbaud.com/skyux/components/input-box)
34
+ * with its `characterLimit` input instead.
29
35
  */
30
36
  declare class SkyCharacterCounterInputDirective implements Validator {
31
37
  #private;
@@ -48,6 +54,10 @@ declare class SkyCharacterCounterInputDirective implements Validator {
48
54
  static ɵdir: i0.ɵɵDirectiveDeclaration<SkyCharacterCounterInputDirective, "[skyCharacterCounter]", never, { "skyCharacterCounterIndicator": { "alias": "skyCharacterCounterIndicator"; "required": false; }; "skyCharacterCounterLimit": { "alias": "skyCharacterCounterLimit"; "required": false; }; }, {}, never, never, false, never>;
49
55
  }
50
56
 
57
+ /**
58
+ * @deprecated Use [input box](https://developer.blackbaud.com/skyux/components/input-box)
59
+ * with its `characterLimit` input instead.
60
+ */
51
61
  declare class SkyCharacterCounterScreenReaderPipe implements PipeTransform {
52
62
  #private;
53
63
  transform(characterCount: number | undefined, characterCountLimit: number | undefined): string;
@@ -64,6 +74,10 @@ declare class SkyFormsResourcesModule {
64
74
  static ɵinj: i0.ɵɵInjectorDeclaration<SkyFormsResourcesModule>;
65
75
  }
66
76
 
77
+ /**
78
+ * @deprecated Use [input box](https://developer.blackbaud.com/skyux/components/input-box)
79
+ * with its `characterLimit` input instead.
80
+ */
67
81
  declare class SkyCharacterCounterModule {
68
82
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyCharacterCounterModule, never>;
69
83
  static ɵmod: i0.ɵɵNgModuleDeclaration<SkyCharacterCounterModule, [typeof SkyCharacterCounterInputDirective, typeof SkyCharacterCounterIndicatorComponent], [typeof i4.CommonModule, typeof i4$1.FormsModule, typeof i4$1.ReactiveFormsModule, typeof SkyCharacterCounterScreenReaderPipe, typeof SkyFormsResourcesModule], [typeof SkyCharacterCounterInputDirective, typeof SkyCharacterCounterIndicatorComponent]>;
@@ -1086,6 +1100,16 @@ declare class SkyInputBoxHostService implements OnDestroy {
1086
1100
  static ɵprov: i0.ɵɵInjectableDeclaration<SkyInputBoxHostService>;
1087
1101
  }
1088
1102
 
1103
+ declare class SkyInputBoxCharacterLimit {
1104
+ readonly characterCount: i0.InputSignal<number>;
1105
+ readonly characterLimit: i0.InputSignal<number>;
1106
+ protected readonly ratio: i0.Signal<string>;
1107
+ protected readonly limitReached: i0.Signal<boolean>;
1108
+ protected readonly announcedCount: i0.WritableSignal<number>;
1109
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyInputBoxCharacterLimit, never>;
1110
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyInputBoxCharacterLimit, "sky-input-box-character-limit", never, { "characterCount": { "alias": "characterCount"; "required": true; "isSignal": true; }; "characterLimit": { "alias": "characterLimit"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
1111
+ }
1112
+
1089
1113
  /**
1090
1114
  * @internal
1091
1115
  */
@@ -1108,7 +1132,7 @@ declare class SkyInputBoxHintTextPipe implements PipeTransform {
1108
1132
 
1109
1133
  declare class SkyInputBoxModule {
1110
1134
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyInputBoxModule, never>;
1111
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkyInputBoxModule, [typeof SkyInputBoxComponent], [typeof i4.CommonModule, typeof SkyCharacterCounterModule, typeof SkyFormErrorsModule, typeof SkyFormErrorModule, typeof SkyFormsResourcesModule, typeof i10.SkyHelpInlineModule, typeof SkyInputBoxControlDirective, typeof SkyInputBoxHintTextPipe, typeof i1$1.SkyThemeModule], [typeof SkyInputBoxHintTextPipe, typeof SkyInputBoxComponent, typeof SkyInputBoxControlDirective, typeof SkyFormErrorModule]>;
1135
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SkyInputBoxModule, [typeof SkyInputBoxComponent], [typeof i4.CommonModule, typeof SkyCharacterCounterModule, typeof SkyFormErrorsModule, typeof SkyFormErrorModule, typeof SkyFormsResourcesModule, typeof i10.SkyHelpInlineModule, typeof SkyInputBoxCharacterLimit, typeof SkyInputBoxControlDirective, typeof SkyInputBoxHintTextPipe, typeof i1$1.SkyThemeModule], [typeof SkyInputBoxHintTextPipe, typeof SkyInputBoxComponent, typeof SkyInputBoxControlDirective, typeof SkyFormErrorModule]>;
1112
1136
  static ɵinj: i0.ɵɵInjectorDeclaration<SkyInputBoxModule>;
1113
1137
  }
1114
1138