@dereekb/dbx-web 13.11.5 → 13.11.6

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.
@@ -9,16 +9,30 @@ $big-button-height: 46px; // 33% bigger
9
9
 
10
10
  // MARK: Mixin
11
11
  @mixin core() {
12
- // increases the height of the mat-mdc-button
12
+ // increases the height of the mat-mdc-button via Material's container-height tokens
13
13
  /// @dbx-utility button-big
14
- /// @intent enlarge the inner `mat-mdc-button` height to 46px (33% taller than default)
14
+ /// @intent enlarge the inner `mat-mdc-button` height to 46px (33% taller than default) by setting Material's `--mat-button-*-container-height` tokens
15
15
  /// @role layout
16
16
  /// @see-also button-wide
17
17
  .dbx-button-big,
18
18
  .dbx-button-large {
19
- .mdc-button.mat-mdc-button {
20
- height: $big-button-height;
21
- }
19
+ --mat-button-text-container-height: #{$big-button-height};
20
+ --mat-button-filled-container-height: #{$big-button-height};
21
+ --mat-button-protected-container-height: #{$big-button-height};
22
+ --mat-button-outlined-container-height: #{$big-button-height};
23
+ --mat-button-tonal-container-height: #{$big-button-height};
24
+ }
25
+
26
+ /// @dbx-utility button-form-field-height
27
+ /// @intent match the inner `mat-mdc-button` height to `--mat-form-field-container-height` so a button aligns vertically with an adjacent form field
28
+ /// @role layout
29
+ /// @see-also button-big
30
+ .dbx-button-form-field-height {
31
+ --mat-button-text-container-height: var(--mat-form-field-container-height);
32
+ --mat-button-filled-container-height: var(--mat-form-field-container-height);
33
+ --mat-button-protected-container-height: var(--mat-form-field-container-height);
34
+ --mat-button-outlined-container-height: var(--mat-form-field-container-height);
35
+ --mat-button-tonal-container-height: var(--mat-form-field-container-height);
22
36
  }
23
37
 
24
38
  // Neutral hover/pressed/focus state layer instead of the primary-colored default.
@@ -1,9 +1,26 @@
1
1
  :host {
2
2
  button {
3
- min-height: 36px;
3
+ // default to text-button container-height; per-variant overrides below read the matching mat token
4
+ min-height: var(--mat-button-text-container-height);
4
5
  height: unset; // allow height to expand
5
6
  outline: none;
6
7
 
8
+ &.mat-mdc-unelevated-button {
9
+ min-height: var(--mat-button-filled-container-height);
10
+ }
11
+
12
+ &.mat-mdc-raised-button {
13
+ min-height: var(--mat-button-protected-container-height);
14
+ }
15
+
16
+ &.mat-mdc-outlined-button {
17
+ min-height: var(--mat-button-outlined-container-height);
18
+ }
19
+
20
+ &.mat-mdc-tonal-button {
21
+ min-height: var(--mat-button-tonal-container-height);
22
+ }
23
+
7
24
  &.working {
8
25
  cursor: not-allowed;
9
26
  }
@@ -168,6 +168,26 @@
168
168
  .dbx-color-tonal {
169
169
  color: var(#{theming.$dbx-bg-color-var});
170
170
  }
171
+
172
+ /// @dbx-utility color-bg
173
+ /// @intent generic themed-background class — pair with `[dbxColor]="config"` to drive `--dbx-bg-color-current` / `--dbx-color-current` from arbitrary CSS color values
174
+ /// @role color
175
+ .dbx-color-bg {
176
+ @include dbx-color-bg-body();
177
+ }
178
+
179
+ /// @dbx-utility color-text
180
+ /// @intent generic themed-text class — pair with `[dbxTextColor]="config"` to drive `--dbx-color-current` from an arbitrary CSS color value
181
+ /// @role color
182
+ .dbx-color-text {
183
+ color: #{theming.$dbx-color};
184
+ }
185
+ }
186
+
187
+ @mixin dbx-color-bg-body($default-bg-tone: 100%) {
188
+ #{theming.$dbx-bg-tone-var}: $default-bg-tone;
189
+ background: color-mix(in srgb, #{theming.$dbx-bg-color} var(#{theming.$dbx-bg-tone-var}), transparent);
190
+ color: #{theming.$dbx-color};
171
191
  }
172
192
 
173
193
  @mixin define-dbx-color-class($name, $color, $contrast, $swap-bg: false) {
@@ -182,9 +202,7 @@
182
202
  .dbx-#{$name}-bg {
183
203
  #{theming.$dbx-color-var}: #{$bg-text};
184
204
  #{theming.$dbx-bg-color-var}: #{$bg-color};
185
- #{theming.$dbx-bg-tone-var}: 100%;
186
- background: color-mix(in srgb, #{theming.$dbx-bg-color} var(#{theming.$dbx-bg-tone-var}), transparent);
187
- color: #{theming.$dbx-color};
205
+ @include dbx-color-bg-body();
188
206
  }
189
207
  }
190
208
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web",
3
- "version": "13.11.5",
3
+ "version": "13.11.6",
4
4
  "sideEffects": [
5
5
  "*.scss",
6
6
  "*.css"
@@ -13,12 +13,12 @@
13
13
  "@angular/material": "^21.2.9",
14
14
  "@angular/platform-browser": "21.2.11",
15
15
  "@cantoo/pdf-lib": "^2.6.5",
16
- "@dereekb/browser": "13.11.5",
17
- "@dereekb/date": "13.11.5",
18
- "@dereekb/dbx-core": "13.11.5",
19
- "@dereekb/rxjs": "13.11.5",
20
- "@dereekb/util": "13.11.5",
21
- "@dereekb/vitest": "13.11.5",
16
+ "@dereekb/browser": "13.11.6",
17
+ "@dereekb/date": "13.11.6",
18
+ "@dereekb/dbx-core": "13.11.6",
19
+ "@dereekb/rxjs": "13.11.6",
20
+ "@dereekb/util": "13.11.6",
21
+ "@dereekb/vitest": "13.11.6",
22
22
  "@ngbracket/ngx-layout": "^21.0.0",
23
23
  "@ngrx/component-store": "^21.1.0",
24
24
  "@ngrx/effects": "^21.1.0",
@@ -14,7 +14,7 @@ import { DbxInjectionComponentConfig, DbxInjectionComponentConfigWithoutInjector
14
14
  import * as _dereekb_rxjs from '@dereekb/rxjs';
15
15
  import { ObservableOrValue, ObservableOrValueGetter } from '@dereekb/rxjs';
16
16
  import * as _dereekb_dbx_web_mapbox from '@dereekb/dbx-web/mapbox';
17
- import { DbxThemeColor, ResizedEvent } from '@dereekb/dbx-web';
17
+ import { DbxColorInput, ResizedEvent } from '@dereekb/dbx-web';
18
18
  import { MatDrawerContainer } from '@angular/material/sidenav';
19
19
  import { MatMenuTrigger } from '@angular/material/menu';
20
20
 
@@ -559,7 +559,7 @@ declare class DbxMapboxLayoutComponent implements OnInit {
559
559
  * Forces the drawer to assume the drawer has content if true, or assume it has no content if false.
560
560
  */
561
561
  readonly forceHasDrawerContent: i0.InputSignal<Maybe<boolean>>;
562
- readonly drawerButtonColor: i0.InputSignalWithTransform<DbxThemeColor, Maybe<DbxThemeColor>>;
562
+ readonly drawerButtonColor: i0.InputSignalWithTransform<DbxColorInput, Maybe<DbxColorInput>>;
563
563
  readonly openDrawer: i0.InputSignal<Maybe<boolean>>;
564
564
  readonly isDrawerOpenSignal: i0.WritableSignal<Maybe<boolean>>;
565
565
  protected readonly _openDrawerEffect: i0.EffectRef;