@dereekb/dbx-web 13.12.9 → 13.14.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.
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web/eslint",
3
- "version": "13.12.9",
3
+ "version": "13.14.0",
4
4
  "peerDependencies": {
5
- "@dereekb/util": "13.12.9",
5
+ "@dereekb/util": "13.14.0",
6
6
  "@typescript-eslint/utils": "8.59.3"
7
7
  },
8
8
  "devDependencies": {
9
9
  "@angular/core": "21.2.11",
10
- "@dereekb/dbx-core": "13.12.9",
11
- "@dereekb/rxjs": "13.12.9",
10
+ "@dereekb/dbx-core": "13.14.0",
11
+ "@dereekb/rxjs": "13.14.0",
12
12
  "@typescript-eslint/parser": "8.59.3",
13
13
  "eslint": "10.4.0",
14
14
  "rxjs": "^7.8.2"
@@ -98,6 +98,39 @@ $big-button-height: 46px; // 33% bigger
98
98
  }
99
99
  }
100
100
 
101
+ /// @dbx-utility button-icon-tile
102
+ /// @intent turn a `<dbx-button>` that wraps a `<dbx-icon-tile>` into a clickable tile — strips the button's padding/min-width so it hugs the tile, adopts the tile's `--dbx-icon-tile-border-radius`, and lifts a neutralized (`--mat-sys-on-surface`) state layer above the tile so hover/press/ripple reads on every color variant (including opaque full-color and primary-tonal tiles)
103
+ /// @role layout
104
+ /// @see-also icon-tile, button-neutral-interaction-color
105
+ /// @anti-use don't apply to a `<dbx-button>` with no inner `<dbx-icon-tile>` — there is no tile surface to shape the button to or to overlay
106
+ .dbx-button-icon-tile {
107
+ .mat-mdc-button.dbx-base-button {
108
+ border-radius: var(--dbx-icon-tile-border-radius, var(--mat-button-text-container-shape, var(--mat-sys-corner-full)));
109
+ padding: 0;
110
+ min-height: 0;
111
+ min-width: 0;
112
+
113
+ // Neutralize the interaction color so hover/press/ripple reads as a consistent
114
+ // darkening regardless of the tile's dbxColor. Without this the state layer keeps
115
+ // the default primary color, which is invisible on a primary-tonal tile.
116
+ $neutral: var(--mat-sys-on-surface, #000);
117
+
118
+ --mat-button-text-state-layer-color: #{$neutral};
119
+ --mat-button-text-pressed-state-layer-color: #{$neutral};
120
+ --mat-button-text-focus-state-layer-color: #{$neutral};
121
+ --mat-button-text-ripple-color: color-mix(in srgb, #{$neutral} 12%, transparent);
122
+ }
123
+
124
+ // The tile's background lives inside .mdc-button__label (z-index: 1), which would
125
+ // otherwise paint over the button's state layer / ripple — fully occluding it on an
126
+ // opaque (full-color) tile and washing it out on a tonal one. Lift the ripple above
127
+ // the label so the interaction feedback overlays the tile on every variant.
128
+ .mat-mdc-button-persistent-ripple,
129
+ .mat-mdc-button-ripple {
130
+ z-index: 2;
131
+ }
132
+ }
133
+
101
134
  .dbx-icon-button .mat-mdc-button .mdc-button__label {
102
135
  display: flex;
103
136
  align-items: center;
@@ -40,6 +40,55 @@
40
40
  padding: var(--dbx-padding-2) var(--dbx-padding-3) var(--dbx-padding-3);
41
41
  }
42
42
  }
43
+
44
+ /// @dbx-utility card-select
45
+ /// @intent selectable "choice" `<mat-card appearance="outlined">` whose content is centered in a column (large `<mat-icon>`, title, subtitle). Pair with `[dbxColor]` + `[dbxColorTone]` and toggle the `.dbx-card-selected` modifier to paint the selected border to match the tonal wash. Put the large glyph in a `.dbx-card-select-icon` `<mat-icon>` and an optional round selected checkmark in a `.dbx-card-select-check` `<dbx-icon-tile [round]>` (absolutely positioned top-right). Fills its parent's height (`height: 100%`) so a row of cards laid out with `dbxFlexGroup` + `[dbxFlexSize]` stays equal-height as it shrinks and wraps.
46
+ /// @role layout
47
+ /// @see-also color, color-tonal, icon-tile, card-banner, flex-group, flex-size
48
+ .dbx-card-select {
49
+ position: relative;
50
+ cursor: pointer;
51
+ text-align: center;
52
+ height: 100%;
53
+
54
+ > mat-card-content {
55
+ display: flex;
56
+ flex-direction: column;
57
+ align-items: center;
58
+ gap: var(--dbx-padding-2);
59
+ }
60
+
61
+ .dbx-card-select-icon {
62
+ width: var(--dbx-card-select-icon-size, 40px);
63
+ height: var(--dbx-card-select-icon-size, 40px);
64
+ font-size: var(--dbx-card-select-icon-size, 40px);
65
+ margin-bottom: var(--dbx-padding-2);
66
+ }
67
+
68
+ .dbx-card-select-check {
69
+ position: absolute;
70
+ top: var(--dbx-padding-3);
71
+ right: var(--dbx-padding-3);
72
+ }
73
+
74
+ // Unselected baseline — `[dbxColor]` always applies the `.dbx-color` class
75
+ // (even when bound to a nullish color), and its default-color paint would
76
+ // render the card body in the surface color (invisible). Restore a neutral
77
+ // outlined-card look so the unselected option stays legible. The `:not()`
78
+ // out-specifies the `mat-card.dbx-color` rule and excludes the selected
79
+ // (tonal) card, which keeps its themed paint.
80
+ &:not(.dbx-card-selected) {
81
+ background: var(--mat-sys-surface);
82
+ color: var(--mat-sys-on-surface);
83
+ }
84
+
85
+ // Selected state — repaint the outlined-card border to match the tonal
86
+ // `[dbxColor]` wash applied by DbxColorDirective (`--dbx-bg-color-current`).
87
+ &.dbx-card-selected {
88
+ --mat-outlined-card-outline-color: var(--dbx-bg-color-current);
89
+ --mat-outlined-card-outline-width: 2px;
90
+ }
91
+ }
43
92
  }
44
93
 
45
94
  @mixin theme($theme-config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web",
3
- "version": "13.12.9",
3
+ "version": "13.14.0",
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.12.9",
17
- "@dereekb/date": "13.12.9",
18
- "@dereekb/dbx-core": "13.12.9",
19
- "@dereekb/rxjs": "13.12.9",
20
- "@dereekb/util": "13.12.9",
21
- "@dereekb/vitest": "13.12.9",
16
+ "@dereekb/browser": "13.14.0",
17
+ "@dereekb/date": "13.14.0",
18
+ "@dereekb/dbx-core": "13.14.0",
19
+ "@dereekb/rxjs": "13.14.0",
20
+ "@dereekb/util": "13.14.0",
21
+ "@dereekb/vitest": "13.14.0",
22
22
  "@ngbracket/ngx-layout": "^21.0.0",
23
23
  "@ngrx/component-store": "^21.1.0",
24
24
  "@ngrx/effects": "^21.1.0",