@dereekb/dbx-web 13.5.2 → 13.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.
@@ -78,6 +78,7 @@ $big-button-height: 46px; // 33% bigger
78
78
  .dbx-button-column {
79
79
  display: flex;
80
80
  flex-direction: column;
81
+ align-items: flex-start;
81
82
 
82
83
  > * {
83
84
  margin-bottom: 6px !important;
@@ -142,6 +142,12 @@
142
142
  @include define-dbx-color-class($color, map.get($colorConfig, 'color'), map.get($colorConfig, 'contrast'));
143
143
  }
144
144
 
145
+ // tonal mode: use the vibrant theme color as text instead of the contrast color.
146
+ // Applied via CSS class (not [style.color]) to avoid conflicting with [ngStyle] on buttons.
147
+ .dbx-color-tonal {
148
+ color: var(#{theming.$dbx-bg-color-var});
149
+ }
150
+
145
151
  // material color overrides
146
152
  // --mdc-text-button-label-text-color: #{theming.$dbx-color-var};
147
153
  --mat-button-text-label-text-color: #{theming.$dbx-color-var};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web",
3
- "version": "13.5.2",
3
+ "version": "13.6.0",
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.5.2",
12
- "@dereekb/date": "13.5.2",
13
- "@dereekb/dbx-core": "13.5.2",
14
- "@dereekb/rxjs": "13.5.2",
15
- "@dereekb/util": "13.5.2",
11
+ "@dereekb/browser": "13.6.0",
12
+ "@dereekb/date": "13.6.0",
13
+ "@dereekb/dbx-core": "13.6.0",
14
+ "@dereekb/rxjs": "13.6.0",
15
+ "@dereekb/util": "13.6.0",
16
16
  "@ngbracket/ngx-layout": "^21.0.0",
17
17
  "@ngrx/component-store": "^21.0.0",
18
18
  "@ngrx/effects": "^21.0.0",
@@ -889,11 +889,11 @@ type DbxColorTone = number;
889
889
  * @example
890
890
  * ```ts
891
891
  * dbxColorBackground('primary'); // 'dbx-primary-bg'
892
- * dbxColorBackground(undefined); // 'dbx-default-bg'
892
+ * dbxColorBackground(undefined); // 'dbx-default'
893
893
  * ```
894
894
  *
895
895
  * @param color - the theme color to convert, or nullish/empty for the default class
896
- * @returns the CSS class name for the themed background (e.g., `'dbx-primary-bg'` or `'dbx-default-bg'`)
896
+ * @returns the CSS class name for the themed background (e.g., `'dbx-primary-bg'` or `'dbx-default'`)
897
897
  */
898
898
  declare function dbxColorBackground(color: Maybe<DbxThemeColor | ''>): CssClass;
899
899
  /**
@@ -3835,6 +3835,8 @@ declare class DbxStepLayoutModule {
3835
3835
  * Applies a themed background color to the host element based on a {@link DbxThemeColor} value.
3836
3836
  *
3837
3837
  * Optionally set {@link dbxColorTone} to control background opacity for a tonal/muted appearance.
3838
+ * When tonal mode is active, the `dbx-color-tonal` CSS class is added and a CSS rule
3839
+ * overrides the text color to the vibrant theme color (via `--dbx-bg-color-current`).
3838
3840
  *
3839
3841
  * @example
3840
3842
  * ```html
@@ -3851,17 +3853,15 @@ declare class DbxColorDirective {
3851
3853
  readonly dbxColorTone: _angular_core.InputSignal<Maybe<number>>;
3852
3854
  readonly cssClassSignal: _angular_core.Signal<string>;
3853
3855
  /**
3854
- * Sets `--dbx-color-bg-tone` on the host to control the background opacity via `color-mix` in the `-bg` class mixin.
3856
+ * Whether tonal mode is active. Adds the `dbx-color-tonal` CSS class which
3857
+ * overrides the text color to the vibrant theme color via CSS rather than
3858
+ * an inline style binding (which would conflict with `[ngStyle]`).
3855
3859
  */
3856
- readonly bgToneStyleSignal: _angular_core.Signal<string | null>;
3860
+ readonly isTonalSignal: _angular_core.Signal<boolean>;
3857
3861
  /**
3858
- * Overrides the host text color to use the vibrant theme color when tonal mode is active.
3859
- *
3860
- * Normally a `-bg` class sets the contrast color as text (e.g. white on blue).
3861
- * In tonal mode the background is semi-transparent, so white text would be unreadable.
3862
- * Instead we use `--dbx-bg-color-current` (the vibrant color set by the `-bg` mixin) as the text color.
3862
+ * Sets `--dbx-color-bg-tone` on the host to control the background opacity via `color-mix` in the `-bg` class mixin.
3863
3863
  */
3864
- readonly tonalColorSignal: _angular_core.Signal<"var(--dbx-bg-color-current)" | null>;
3864
+ readonly bgToneStyleSignal: _angular_core.Signal<string | null>;
3865
3865
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxColorDirective, never>;
3866
3866
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DbxColorDirective, "[dbxColor]", never, { "dbxColor": { "alias": "dbxColor"; "required": false; "isSignal": true; }; "dbxColorTone": { "alias": "dbxColorTone"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
3867
3867
  }
@@ -4408,13 +4408,11 @@ declare class DbxChipDirective {
4408
4408
  */
4409
4409
  readonly bgToneStyleSignal: _angular_core.Signal<string | null>;
4410
4410
  /**
4411
- * Overrides the host text color to use the vibrant theme color when tonal mode is active.
4412
- *
4413
- * Normally a `-bg` class sets the contrast color as text (e.g. white on blue).
4414
- * In tonal mode the background is semi-transparent, so white text would be unreadable.
4415
- * Instead we use `--dbx-bg-color-current` (the vibrant color set by the `-bg` mixin) as the text color.
4411
+ * Whether tonal mode is active (color is set and tone < 100). Adds the `dbx-color-tonal`
4412
+ * CSS class which overrides text color to the vibrant theme color via CSS rather than
4413
+ * an inline style binding (which would conflict with `[ngStyle]`).
4416
4414
  */
4417
- readonly tonalColorSignal: _angular_core.Signal<"var(--dbx-bg-color-current)" | null>;
4415
+ readonly isTonalSignal: _angular_core.Signal<boolean>;
4418
4416
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxChipDirective, never>;
4419
4417
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DbxChipDirective, "dbx-chip", never, { "small": { "alias": "small"; "required": false; "isSignal": true; }; "block": { "alias": "block"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
4420
4418
  }
@@ -4920,6 +4918,11 @@ interface DbxProgressButtonConfig {
4920
4918
  * Whether to render as a floating action button (FAB).
4921
4919
  */
4922
4920
  readonly fab?: Maybe<boolean>;
4921
+ /**
4922
+ * Accessible label for the button, applied as `aria-label`.
4923
+ * Especially important for icon-only buttons that lack visible text.
4924
+ */
4925
+ readonly ariaLabel?: Maybe<string>;
4923
4926
  }
4924
4927
  /**
4925
4928
  * Configuration for the icon displayed inside a progress button.
@@ -9262,6 +9265,7 @@ declare class DbxFileUploadButtonComponent extends AbstractDbxFileUploadComponen
9262
9265
  readonly fileInput: _angular_core.Signal<ElementRef<HTMLInputElement>>;
9263
9266
  readonly text: _angular_core.InputSignal<Maybe<string>>;
9264
9267
  readonly icon: _angular_core.InputSignal<Maybe<string>>;
9268
+ readonly ariaLabel: _angular_core.InputSignal<Maybe<string>>;
9265
9269
  readonly buttonStyle: _angular_core.InputSignal<Maybe<DbxButtonStyle>>;
9266
9270
  readonly filesChanged: _angular_core.OutputEmitterRef<DbxFileUploadFilesChangedEvent>;
9267
9271
  readonly buttonAcceptSignal: _angular_core.Signal<string | undefined>;
@@ -9280,7 +9284,7 @@ declare class DbxFileUploadButtonComponent extends AbstractDbxFileUploadComponen
9280
9284
  openInput(): void;
9281
9285
  fileInputChanged(): void;
9282
9286
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DbxFileUploadButtonComponent, never>;
9283
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFileUploadButtonComponent, "dbx-file-upload-button", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "buttonStyle": { "alias": "buttonStyle"; "required": false; "isSignal": true; }; }, { "filesChanged": "filesChanged"; }, never, ["*"], true, never>;
9287
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFileUploadButtonComponent, "dbx-file-upload-button", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "buttonStyle": { "alias": "buttonStyle"; "required": false; "isSignal": true; }; }, { "filesChanged": "filesChanged"; }, never, ["*"], true, never>;
9284
9288
  }
9285
9289
 
9286
9290
  /**