@theseam/ui-common 1.0.2-beta.45 → 1.0.2-beta.51

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/layout/index.d.ts CHANGED
@@ -1,8 +1,5 @@
1
- import * as i0 from '@angular/core';
2
- import * as i1 from '@angular/common';
3
- import * as i2 from '@angular/flex-layout';
4
- import { MediaObserver } from '@angular/flex-layout';
5
1
  import { Observable } from 'rxjs';
2
+ import * as i0 from '@angular/core';
6
3
 
7
4
  /**
8
5
  * | breakpoint | mediaQuery |
@@ -25,14 +22,7 @@ import { Observable } from 'rxjs';
25
22
  */
26
23
  type MediaQueryAliases = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'lt-sm' | 'lt-md' | 'lt-lg' | 'lt-xl' | 'gt-xs' | 'gt-sm' | 'gt-md' | 'gt-lg';
27
24
 
28
- declare class TheSeamLayoutModule {
29
- static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamLayoutModule, never>;
30
- static ɵmod: i0.ɵɵNgModuleDeclaration<TheSeamLayoutModule, never, [typeof i1.CommonModule, typeof i2.FlexLayoutModule], [typeof i2.FlexLayoutModule]>;
31
- static ɵinj: i0.ɵɵInjectorDeclaration<TheSeamLayoutModule>;
32
- }
33
-
34
25
  declare class TheSeamLayoutService {
35
- private _media;
36
26
  /**
37
27
  * Observes if app is a mobile-like size.
38
28
  * Default mobile breakpoint is <= 599px,
@@ -41,7 +31,7 @@ declare class TheSeamLayoutService {
41
31
  isMobile$: Observable<boolean>;
42
32
  private _mobileBreakpoint;
43
33
  mobileBreakpoint$: Observable<MediaQueryAliases>;
44
- constructor(_media: MediaObserver);
34
+ constructor();
45
35
  observe(alias: MediaQueryAliases): Observable<boolean>;
46
36
  /**
47
37
  * Update breakpoint observed by isMobile$
@@ -52,10 +42,10 @@ declare class TheSeamLayoutService {
52
42
  }
53
43
 
54
44
  /**
55
- * Observable helper for observing a single breakpoint alias with
56
- * `@angular/flex-layout` MediaObserver.
45
+ * Observable helper for observing a single breakpoint alias using native
46
+ * `window.matchMedia`.
57
47
  */
58
- declare function observeMediaQuery(mediaObserver: MediaObserver, alias: MediaQueryAliases): Observable<boolean>;
48
+ declare function observeMediaQuery(alias: MediaQueryAliases): Observable<boolean>;
59
49
 
60
- export { TheSeamLayoutModule, TheSeamLayoutService, observeMediaQuery };
50
+ export { TheSeamLayoutService, observeMediaQuery };
61
51
  export type { MediaQueryAliases };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theseam/ui-common",
3
- "version": "1.0.2-beta.45",
3
+ "version": "1.0.2-beta.51",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^20.2.3",
6
6
  "@angular/common": "^20.3.0",
@@ -8,7 +8,6 @@
8
8
  "@angular/forms": "^20.3.0",
9
9
  "@angular/animations": "^20.3.0",
10
10
  "@angular/router": "^20.3.0",
11
- "@angular/flex-layout": "^15.0.0-beta.42",
12
11
  "rxjs": "~7.8.0",
13
12
  "@fortawesome/angular-fontawesome": "^0.13.0",
14
13
  "@fortawesome/fontawesome-svg-core": "^1.2.35",
@@ -1,7 +1,26 @@
1
+ import { ComponentHarness } from '@angular/cdk/testing';
1
2
  import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
2
3
  import * as i0 from '@angular/core';
4
+ import { AbstractControl } from '@angular/forms';
3
5
  import * as i2 from '@angular/common';
4
6
 
7
+ /** Harness for a single cell inside `TheSeamSegmentedProgressBarComponent`. */
8
+ declare class TheSeamSegmentedProgressBarCellHarness extends ComponentHarness {
9
+ static hostSelector: string;
10
+ /** The visual state of the cell, derived from its host classes. */
11
+ getState(): Promise<'default' | 'complete'>;
12
+ click(): Promise<void>;
13
+ }
14
+ /** Harness for `TheSeamSegmentedProgressBarComponent`. */
15
+ declare class TheSeamSegmentedProgressBarHarness extends ComponentHarness {
16
+ static hostSelector: string;
17
+ private readonly _cells;
18
+ /** Gets harnesses for every rendered cell, in order. */
19
+ getCells(): Promise<TheSeamSegmentedProgressBarCellHarness[]>;
20
+ /** Clicks the cell at the given zero-based index. */
21
+ clickCell(index: number): Promise<void>;
22
+ }
23
+
5
24
  interface IProgressInfo {
6
25
  dashoffset: number;
7
26
  circumference: number;
@@ -29,10 +48,48 @@ declare class ProgressCircleComponent {
29
48
  static ɵcmp: i0.ɵɵComponentDeclaration<ProgressCircleComponent, "seam-progress-circle", never, { "fillBackground": { "alias": "fillBackground"; "required": false; }; "showText": { "alias": "showText"; "required": false; }; "hiddenOnEmpty": { "alias": "hiddenOnEmpty"; "required": false; }; "pending": { "alias": "pending"; "required": false; }; "percentage": { "alias": "percentage"; "required": false; }; }, {}, never, never, false, never>;
30
49
  }
31
50
 
51
+ /**
52
+ * Describes a single step rendered by `TheSeamSegmentedProgressBarComponent`.
53
+ *
54
+ * A step's visual state is derived from either an explicit `completed` flag
55
+ * or the validity of an injected `control`. When a `control` is provided,
56
+ * the step is considered visually complete only after it has been visited
57
+ * (either `isCurrent` or `hasVisited` is true) to avoid marking steps as
58
+ * done before the user has seen them.
59
+ */
60
+ interface TheSeamSegmentedProgressBarStep {
61
+ /** Tooltip label shown on hover when `enableTooltip` is true. */
62
+ label: string;
63
+ /** Unique identifier for the step — used as the `@for` track key. */
64
+ value: string;
65
+ /**
66
+ * Explicit completion flag. When set, takes precedence over `control`.
67
+ * Leave undefined to derive state from `control` instead.
68
+ */
69
+ completed?: boolean;
70
+ /** Optional form control whose validity drives state when `completed` is unset. */
71
+ control?: AbstractControl;
72
+ /** Whether this step is the currently-active step. */
73
+ isCurrent?: boolean;
74
+ /** Whether the user has previously visited this step. */
75
+ hasVisited?: boolean;
76
+ }
77
+
78
+ declare class TheSeamSegmentedProgressBarComponent {
79
+ readonly progressSteps: i0.InputSignal<TheSeamSegmentedProgressBarStep[]>;
80
+ readonly clickable: i0.InputSignalWithTransform<boolean, unknown>;
81
+ readonly enableTooltip: i0.InputSignalWithTransform<boolean, unknown>;
82
+ readonly cellClicked: i0.OutputEmitterRef<TheSeamSegmentedProgressBarStep>;
83
+ onClickProgressCell(step: TheSeamSegmentedProgressBarStep): void;
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamSegmentedProgressBarComponent, never>;
85
+ static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSegmentedProgressBarComponent, "seam-segmented-progress-bar", never, { "progressSteps": { "alias": "progressSteps"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "enableTooltip": { "alias": "enableTooltip"; "required": false; "isSignal": true; }; }, { "cellClicked": "cellClicked"; }, never, never, true, never>;
86
+ }
87
+
32
88
  declare class TheSeamProgressModule {
33
89
  static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamProgressModule, never>;
34
- static ɵmod: i0.ɵɵNgModuleDeclaration<TheSeamProgressModule, [typeof ProgressCircleComponent], [typeof i2.CommonModule], [typeof ProgressCircleComponent]>;
90
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TheSeamProgressModule, [typeof ProgressCircleComponent], [typeof i2.CommonModule, typeof TheSeamSegmentedProgressBarComponent], [typeof ProgressCircleComponent, typeof TheSeamSegmentedProgressBarComponent]>;
35
91
  static ɵinj: i0.ɵɵInjectorDeclaration<TheSeamProgressModule>;
36
92
  }
37
93
 
38
- export { ProgressCircleComponent, TheSeamProgressModule, calcDashoffset };
94
+ export { ProgressCircleComponent, TheSeamProgressModule, TheSeamSegmentedProgressBarCellHarness, TheSeamSegmentedProgressBarComponent, TheSeamSegmentedProgressBarHarness, calcDashoffset };
95
+ export type { TheSeamSegmentedProgressBarStep };