@dereekb/dbx-web 13.6.3 → 13.6.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.
@@ -17,6 +17,30 @@ $big-button-height: 46px; // 33% bigger
17
17
  }
18
18
  }
19
19
 
20
+ // Neutral hover/pressed/focus state layer instead of the primary-colored default.
21
+ // Apply to buttons with custom background colors where the primary tint looks wrong.
22
+ .dbx-button-neutral-interaction-color {
23
+ .mdc-button,
24
+ &.mdc-button {
25
+ $neutral: var(--mat-sys-on-surface, #000);
26
+
27
+ --mat-button-text-state-layer-color: #{$neutral};
28
+ --mat-button-text-pressed-state-layer-color: #{$neutral};
29
+ --mat-button-text-focus-state-layer-color: #{$neutral};
30
+ --mat-button-text-ripple-color: color-mix(in srgb, #{$neutral} 12%, transparent);
31
+ --mat-button-protected-state-layer-color: #{$neutral};
32
+ --mat-button-protected-pressed-state-layer-color: #{$neutral};
33
+ --mat-button-protected-focus-state-layer-color: #{$neutral};
34
+ --mat-button-protected-ripple-color: color-mix(in srgb, #{$neutral} 12%, transparent);
35
+ --mat-button-outlined-state-layer-color: #{$neutral};
36
+ --mat-button-outlined-pressed-state-layer-color: #{$neutral};
37
+ --mat-button-outlined-focus-state-layer-color: #{$neutral};
38
+ --mat-button-filled-state-layer-color: #{$neutral};
39
+ --mat-button-filled-pressed-state-layer-color: #{$neutral};
40
+ --mat-button-filled-focus-state-layer-color: #{$neutral};
41
+ }
42
+ }
43
+
20
44
  .dbx-button-wide {
21
45
  .dbx-button {
22
46
  min-width: 120px;
@@ -4,15 +4,23 @@ $bar-button-progress-bar-height-default: 5px;
4
4
  > button.dbx-progress-bar-button.mdc-button.mat-mdc-button {
5
5
  overflow: hidden; // clip progress bar to rounded corners
6
6
 
7
+ // normalize icon offset to match spinner button
8
+ --mat-button-text-icon-offset: 0px;
9
+ --mat-button-outlined-icon-offset: 0px;
10
+ --mat-button-protected-icon-offset: 0px;
11
+ --mat-button-filled-icon-offset: 0px;
12
+ --mat-button-tonal-icon-offset: 0px;
13
+
7
14
  &.working {
8
15
  cursor: not-allowed;
9
16
  }
10
17
  &.fullWidth {
11
18
  width: 100%;
12
19
  }
20
+
21
+ // ::ng-deep required for Material's internal .mdc-button__label element
13
22
  > ::ng-deep .mdc-button__label {
14
23
  position: unset; // required so the bar can expand fully
15
-
16
24
  display: flex;
17
25
  align-items: center;
18
26
 
@@ -23,15 +31,47 @@ $bar-button-progress-bar-height-default: 5px;
23
31
  --mat-progress-bar-track-height: var(--dbx-progress-bar-button-height, #{$bar-button-progress-bar-height-default});
24
32
  --mat-progress-bar-active-indicator-height: var(--dbx-progress-bar-button-height, #{$bar-button-progress-bar-height-default});
25
33
  }
34
+ }
35
+
36
+ // icon and text styles — outside ::ng-deep for proper view encapsulation
37
+ mat-icon.mat-button-icon {
38
+ padding-right: 5px;
39
+
40
+ font-size: 1.125rem;
41
+ height: 1.125rem;
42
+ width: 1.125rem;
43
+
44
+ margin-right: var(--mat-button-protected-icon-spacing, 8px);
45
+
46
+ &.is-mat-icon {
47
+ position: relative;
48
+ }
26
49
 
27
- mat-icon {
28
- padding-right: 5px;
29
- &.is-mat-icon {
30
- font-size: 18px;
31
- position: relative;
32
- top: 3px;
33
- }
50
+ &.working {
51
+ opacity: 0;
52
+ transition: opacity 0.3s ease-in-out;
34
53
  }
35
54
  }
55
+
56
+ span {
57
+ transition: opacity 0.3s ease-in-out;
58
+
59
+ &.working {
60
+ opacity: 0;
61
+ }
62
+ }
63
+
64
+ // echo overlay icon — centered within the button
65
+ .echo-overlay-icon {
66
+ position: absolute;
67
+ inset: 0;
68
+ margin: 0;
69
+ width: 100%;
70
+ height: 100%;
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ opacity: 1;
75
+ }
36
76
  }
37
77
  }
@@ -18,6 +18,8 @@
18
18
  &.mat-mdc-button.mat-mdc-icon-button {
19
19
  // icon button fixes
20
20
  min-width: unset;
21
+ width: var(--mat-icon-button-state-layer-size, 36px);
22
+ padding: 0;
21
23
  --mat-icon-button-icon-size: unset;
22
24
  --mat-text-button-with-icon-horizontal-padding: 0px;
23
25
  --mat-icon-button-state-layer-size: 36px;
@@ -55,12 +57,6 @@
55
57
  }
56
58
  }
57
59
 
58
- // mat-spinners marked with dbx-progress-spinner-custom should allow the stroke to be inherited.
59
- .dbx-progress-spinner-custom.mat-progress-spinner.mat-accent circle,
60
- .dbx-progress-spinner-custom.mat-mdc-progress-spinner.mat-accent circle {
61
- stroke: unset !important;
62
- }
63
-
64
60
  .button-text {
65
61
  opacity: 1;
66
62
  transition: opacity 0.3s ease-in-out;
@@ -89,5 +85,18 @@
89
85
  opacity: 0;
90
86
  }
91
87
  }
88
+
89
+ // echo overlay icon — mirrors the spinner: absolutely positioned, centered in the button
90
+ .echo-overlay-icon {
91
+ position: absolute;
92
+ inset: 0;
93
+ margin: 0;
94
+ width: 100%;
95
+ height: 100%;
96
+ display: flex;
97
+ align-items: center;
98
+ justify-content: center;
99
+ opacity: 1;
100
+ }
92
101
  }
93
102
  }
@@ -15,7 +15,7 @@ $dbx-detail-block-big-header-icon-size: 18px;
15
15
 
16
16
  $dbx-step-block-badge-size: 32px;
17
17
  $dbx-step-block-gap: 16px;
18
- $dbx-step-block-padding: 6px;
18
+ $dbx-step-block-padding: 16px;
19
19
  $dbx-step-block-badge-font-size: 14px;
20
20
  $dbx-step-block-badge-icon-size: 18px;
21
21
  $dbx-step-block-header-font-weight: 500;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web",
3
- "version": "13.6.3",
3
+ "version": "13.6.4",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "21.2.3",
6
6
  "@angular/common": "21.2.3",
@@ -8,11 +8,11 @@
8
8
  "@angular/forms": "21.2.3",
9
9
  "@angular/material": "21.2.3",
10
10
  "@angular/platform-browser": "21.2.3",
11
- "@dereekb/browser": "13.6.3",
12
- "@dereekb/date": "13.6.3",
13
- "@dereekb/dbx-core": "13.6.3",
14
- "@dereekb/rxjs": "13.6.3",
15
- "@dereekb/util": "13.6.3",
11
+ "@dereekb/browser": "13.6.4",
12
+ "@dereekb/date": "13.6.4",
13
+ "@dereekb/dbx-core": "13.6.4",
14
+ "@dereekb/rxjs": "13.6.4",
15
+ "@dereekb/util": "13.6.4",
16
16
  "@ngbracket/ngx-layout": "^21.0.0",
17
17
  "@ngrx/component-store": "^21.0.0",
18
18
  "@ngrx/effects": "^21.0.0",
@@ -1,5 +1,5 @@
1
1
  import * as _dereekb_dbx_core from '@dereekb/dbx-core';
2
- import { DbxActionWorkOrWorkProgress, DbxActionWorkProgress, DbxActionContextStoreSourceInstance, DbxActionContextSourceReference, DbxActionSuccessHandlerFunction, AbstractTransitionWatcherDirective, AbstractDbxButtonDirective, AuthUserIdentifier, DbxInjectionComponentConfig, SegueRef, ClickableAnchor, SegueRefOrSegueRefRouterLink, DbxButtonWorking, SimpleStorageAccessorFactory, StorageAccessor, DbxButtonDisplay, AbstractDbxAnchorDirective, ClickableIconAnchorLink, ClickableAnchorLink, DbxInjectionTemplateConfig, ClickableAnchorLinkTree, ExpandedClickableAnchorLinkTree, AbstractTransitionDirective, ClickableAnchorLinkSegueRef, AbstractIfDirective, AbstractDbxActionValueGetterDirective, FilterSourceDirective, ClickablePartialFilterPreset, AbstractDbxActionHandlerDirective, ClickableFilterPresetOrPartialPreset, ClickableFilterPreset, DbxButtonInterceptor, DbxButton } from '@dereekb/dbx-core';
2
+ import { DbxActionWorkOrWorkProgress, DbxActionWorkProgress, DbxActionContextStoreSourceInstance, DbxActionContextSourceReference, DbxActionSuccessHandlerFunction, AbstractTransitionWatcherDirective, AbstractDbxButtonDirective, AuthUserIdentifier, DbxInjectionComponentConfig, SegueRef, ClickableAnchor, SegueRefOrSegueRefRouterLink, DbxButtonWorking, DbxButtonEcho, SimpleStorageAccessorFactory, StorageAccessor, DbxButtonDisplay, AbstractDbxAnchorDirective, ClickableIconAnchorLink, ClickableAnchorLink, DbxInjectionTemplateConfig, ClickableAnchorLinkTree, ExpandedClickableAnchorLinkTree, AbstractTransitionDirective, ClickableAnchorLinkSegueRef, AbstractIfDirective, AbstractDbxActionValueGetterDirective, FilterSourceDirective, ClickablePartialFilterPreset, AbstractDbxActionHandlerDirective, ClickableFilterPresetOrPartialPreset, ClickableFilterPreset, DbxButtonInterceptor, DbxButton } from '@dereekb/dbx-core';
3
3
  import * as _angular_core from '@angular/core';
4
4
  import { Signal, ElementRef, AfterViewInit, InjectionToken, Type, OnInit, OnDestroy, ViewContainerRef, Provider, Injector, TrackByFunction, OutputEmitterRef, OutputRef, EnvironmentProviders, TemplateRef } from '@angular/core';
5
5
  import { ProgressBarMode } from '@angular/material/progress-bar';
@@ -769,6 +769,10 @@ declare class DbxActionModule {
769
769
  * Lightweight button that renders as either an icon-only Material icon button or a text button
770
770
  * with an icon prefix, depending on whether text is provided.
771
771
  *
772
+ * @deprecated Use `dbx-button` instead. For icon-only buttons use `<dbx-button icon="settings" iconOnly>`.
773
+ * For icon+text buttons use `<dbx-button icon="settings" text="Label">`. The `dbx-button` component
774
+ * supports all the same inputs plus working/loading states, colors, and button style variants.
775
+ *
772
776
  * @example
773
777
  * ```html
774
778
  * <dbx-icon-button icon="settings" (buttonClick)="openSettings()"></dbx-icon-button>
@@ -785,7 +789,7 @@ declare class DbxIconButtonComponent extends AbstractDbxButtonDirective {
785
789
  }
786
790
 
787
791
  /**
788
- * @deprecated import DbxIconButtonComponent directly instead.
792
+ * @deprecated Use `dbx-button` instead of `dbx-icon-button`. See {@link DbxIconButtonComponent} for migration guidance.
789
793
  */
790
794
  declare class DbxIconButtonModule {
791
795
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxIconButtonModule, never>;
@@ -4943,6 +4947,11 @@ interface DbxProgressButtonConfig {
4943
4947
  * Especially important for icon-only buttons that lack visible text.
4944
4948
  */
4945
4949
  readonly ariaLabel?: Maybe<string>;
4950
+ /**
4951
+ * Active button echo. When set, the button's text/icon fade out (preserving width)
4952
+ * and a centered echo icon overlay appears, mirroring the spinner working animation.
4953
+ */
4954
+ readonly buttonEcho?: Maybe<DbxButtonEcho>;
4946
4955
  }
4947
4956
  /**
4948
4957
  * Configuration for the icon displayed inside a progress button.
@@ -5014,6 +5023,14 @@ declare abstract class AbstractProgressButtonDirective {
5014
5023
  readonly buttonTypeAttributeSignal: Signal<Maybe<string>>;
5015
5024
  readonly buttonDisabledSignal: Signal<Maybe<boolean>>;
5016
5025
  readonly showProgressSignal: Signal<boolean>;
5026
+ /**
5027
+ * Whether a button echo overlay is active (iconOnly echo mode).
5028
+ */
5029
+ readonly echoActiveSignal: Signal<boolean>;
5030
+ /**
5031
+ * Whether button content should be hidden via opacity (working spinner or echo overlay active).
5032
+ */
5033
+ readonly hideContentSignal: Signal<boolean>;
5017
5034
  /**
5018
5035
  * When true, the click handler will not call `stopImmediatePropagation()`,
5019
5036
  * allowing the click event to continue bubbling. Needed for components like
@@ -5063,7 +5080,7 @@ declare class DbxProgressSpinnerButtonComponent extends AbstractProgressButtonDi
5063
5080
  readonly showTextButtonIconSignal: _angular_core.Signal<false | Maybe<_dereekb_dbx_web.DbxProgressButtonIcon>>;
5064
5081
  readonly showIconSignal: _angular_core.Signal<boolean | _dereekb_util.MaybeNot>;
5065
5082
  readonly customSpinnerStyleSignal: _angular_core.Signal<{
5066
- stroke: string;
5083
+ '--mat-progress-spinner-active-indicator-color': string;
5067
5084
  } | undefined>;
5068
5085
  readonly customSpinnerStyleClassSignal: _angular_core.Signal<{
5069
5086
  'dbx-progress-spinner-custom': boolean;