@dereekb/dbx-web 13.10.7 → 13.10.8

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.
@@ -76,6 +76,9 @@ $list-item-padded-min-height: 42px;
76
76
  }
77
77
  }
78
78
 
79
+ /// @dbx-utility list-view-no-meta-padding
80
+ /// @intent strip the leading + trailing padding around `mdc-list-item--with-trailing-meta` rows so meta-only items hug their container
81
+ /// @role spacing
79
82
  .dbx-list-view-no-meta-padding {
80
83
  .mdc-list-item--with-trailing-meta.mdc-list-item {
81
84
  padding-left: 4px;
@@ -96,6 +99,9 @@ $list-item-padded-min-height: 42px;
96
99
  }
97
100
  }
98
101
 
102
+ /// @dbx-utility list-sticky-headers
103
+ /// @intent pin `.dbx-list-view-group-header` rows to the top of the list while scrolling
104
+ /// @role state
99
105
  .dbx-list-sticky-headers {
100
106
  .dbx-list-view-group .dbx-list-view-group-header,
101
107
  .dbx-list-view-group.dbx-list-view-group-header {
@@ -111,11 +117,79 @@ $list-item-padded-min-height: 42px;
111
117
  }
112
118
  }
113
119
 
120
+ /// @dbx-utility list-item-padded
121
+ /// @intent baseline padded list-row spacing — guarantees `min-height` plus a tight 2px/6px padding pair
122
+ /// @role spacing
123
+ /// @see-also dbx-list-item-padded-thick, dbx-list-item-p0
114
124
  .dbx-list-item-padded {
115
125
  min-height: $list-item-padded-min-height;
116
126
  padding: 2px 6px;
117
127
  }
118
128
 
129
+ /// @dbx-utility list-item-padded-thick
130
+ /// @intent thicker padded list-row spacing — same `min-height` as `.dbx-list-item-padded` with the workspace `theming.$padding-3` token
131
+ /// @role spacing
132
+ /// @see-also dbx-list-item-padded
133
+ .dbx-list-item-padded-thick {
134
+ min-height: $list-item-padded-min-height;
135
+ padding: theming.$padding-3;
136
+ }
137
+
138
+ // Card-style list — each row becomes a tinted, rounded surface that lives
139
+ // on the actual `.mat-mdc-list-item`, not on a nested template `<div>`.
140
+ // Apply this modifier as the host class on the list wrapper component so
141
+ // the visible card boundary, the hover/focus state-layer, and the click
142
+ // ripple all line up with one another — the inner item template is then
143
+ // free to focus on content layout.
144
+ //
145
+ // Defaults flow through Material system tokens; both are overridable per
146
+ // instance via CSS custom properties:
147
+ // --dbx-list-item-card-background → `--mat-sys-surface-container`
148
+ // --dbx-list-item-card-border-radius → `--mat-sys-corner-large`,
149
+ // falling back to `calc(--mat-chip-container-shape-radius * 2)` when
150
+ // the host theme doesn't emit the M3 shape tokens.
151
+ // Spacing between cards is exposed as `--dbx-list-card-items-list-gap`
152
+ // (default `8px`).
153
+ /// @dbx-utility list-card-items-list
154
+ /// @intent render each list row as a tinted, rounded card surface with a configurable inter-card gap
155
+ /// @role layout
156
+ .dbx-list-card-items-list {
157
+ --dbx-list-card-items-list-gap: 8px;
158
+
159
+ .dbx-list-view-item.mat-mdc-list-item {
160
+ --mat-list-list-item-container-color: var(--dbx-list-item-card-background, var(--mat-sys-surface-container));
161
+ --mat-list-list-item-container-shape: var(--dbx-list-item-card-border-radius, var(--mat-sys-corner-large, calc(var(--mat-chip-container-shape-radius) * 2)));
162
+ // Override Angular Material's `.mat-mdc-nav-list .mat-mdc-list-item`
163
+ // rule, which pins `border-radius` (and the focus-indicator radius) to
164
+ // `var(--mat-list-active-indicator-shape, …)` and would otherwise win
165
+ // out — leaving the card almost square. Redeclaring both here applies
166
+ // our card shape directly without relying solely on the token.
167
+ border-radius: var(--mat-list-list-item-container-shape);
168
+ --mat-focus-indicator-border-radius: var(--mat-list-list-item-container-shape);
169
+ margin-bottom: var(--dbx-list-card-items-list-gap);
170
+ }
171
+
172
+ // Strip the trailing card's bottom gap. The nav-list path wraps each
173
+ // item in a `<dbx-anchor>`; the selection-list path renders
174
+ // `<mat-list-option>` siblings directly under `<mat-selection-list>`.
175
+ dbx-anchor:last-of-type .dbx-list-view-item.mat-mdc-list-item,
176
+ .dbx-list-view-item.mat-mdc-list-option:last-of-type {
177
+ margin-bottom: 0;
178
+ }
179
+ }
180
+
181
+ // When the tile is the leading icon in a two-line list item, override the
182
+ // default `.item-icon` flat spacing with tile-appropriate margins. The
183
+ // base `.dbx-icon-tile` rule lives in `_text.scss` next to its component.
184
+ .dbx-list-two-line-item .item-icon.dbx-icon-tile {
185
+ padding: 8px;
186
+ margin: 0 12px 0 4px;
187
+ }
188
+
189
+ /// @dbx-utility list-two-line-item
190
+ /// @intent two-line list-row layout — flex row with a left column (title + details) and an optional right slot, paired with nested `.item-icon` / `.item-left` / `.item-right` / `.item-title` / `.item-details` / `.item-details-footnote` helpers
191
+ /// @role layout
192
+ /// @see-also dbx-list-item-padded
119
193
  .dbx-list-two-line-item {
120
194
  // item broken into a left and right, and up to two rows on the left with 1 row on the right.
121
195
  display: flex;
@@ -130,11 +204,14 @@ $list-item-padded-min-height: 42px;
130
204
  .item-left {
131
205
  display: flex;
132
206
  flex-direction: column;
207
+ flex: 1 1 auto;
208
+ min-width: 0;
133
209
  }
134
210
 
135
211
  .item-right {
136
212
  display: flex;
137
213
  align-items: center;
214
+ margin-left: 16px;
138
215
  }
139
216
 
140
217
  .item-title {
@@ -154,6 +231,9 @@ $list-item-padded-min-height: 42px;
154
231
  }
155
232
  }
156
233
 
234
+ /// @dbx-utility list-no-hover-effects
235
+ /// @intent disable hover cursor + state-layer opacity on list items inside a `.dbx-list`
236
+ /// @role state
157
237
  .dbx-list-no-hover-effects .dbx-list > .dbx-list-content .dbx-list-view .mat-mdc-list-item {
158
238
  cursor: unset;
159
239
 
@@ -162,10 +242,29 @@ $list-item-padded-min-height: 42px;
162
242
  }
163
243
  }
164
244
 
245
+ /// @dbx-utility list-no-item-padding
246
+ /// @intent zero the inner `.mat-mdc-list-item-content` padding on every nav-list row in a `.dbx-list`
247
+ /// @role spacing
248
+ /// @see-also dbx-list-item-p0
165
249
  .dbx-list-no-item-padding .dbx-list > .dbx-list-content .dbx-list-view > .mat-mdc-nav-list .dbx-list-view-item.mat-mdc-list-item > .mat-mdc-list-item-content {
166
250
  padding: 0;
167
251
  }
168
252
 
253
+ // Zeros all padding on the underlying Material list item. Per-item utility
254
+ // (apply as host class on the value-list view) for templates that supply
255
+ // their own padding/leading element — e.g. a `.dbx-icon-tile` in a
256
+ // `.dbx-list-two-line-item-with-icon` — where Material's default item
257
+ // padding would otherwise double up. Complements the container-scope
258
+ // `.dbx-list-no-item-padding`, which zeros the inner
259
+ // `.mat-mdc-list-item-content` padding for all items in the list.
260
+ /// @dbx-utility list-item-p0
261
+ /// @intent zero all padding on the host `.mat-mdc-list-item` — per-item complement to `.dbx-list-no-item-padding` for templates that supply their own padding/leading element
262
+ /// @role spacing
263
+ /// @see-also dbx-list-no-item-padding
264
+ .dbx-list-item-p0 .mat-mdc-list-item.mdc-list-item {
265
+ padding: 0;
266
+ }
267
+
169
268
  .dbx-list-content .dbx-list-view .mat-mdc-list-base .mat-mdc-list-item .mat-divider {
170
269
  position: unset; // do not touch the divider in dbx-list
171
270
  }
@@ -14,6 +14,9 @@ $header-left-reserved-space-small-screen: 120px;
14
14
  // MARK: Mixin
15
15
  @mixin core() {
16
16
  // MARK: Section
17
+ /// @dbx-utility section
18
+ /// @intent rounded section container — exposes --dbx-section-container-shape for shape overrides
19
+ /// @role layout
17
20
  .dbx-section {
18
21
  border-radius: var(--dbx-section-container-shape, var(--mat-sys-corner-medium));
19
22
  }
@@ -60,6 +63,10 @@ $header-left-reserved-space-small-screen: 120px;
60
63
  }
61
64
  }
62
65
 
66
+ /// @dbx-utility section-header-padded
67
+ /// @intent zero the host padding and add a 4px horizontal inset to the inner `.dbx-section-header` — useful when a parent already provides outer padding
68
+ /// @role spacing
69
+ /// @see-also section
63
70
  .dbx-section-header-padded {
64
71
  padding: 0 !important;
65
72
 
@@ -3,6 +3,10 @@
3
3
 
4
4
  // Sections
5
5
  @mixin core() {
6
+ /// @dbx-utility spacer
7
+ /// @intent flex spacer — fills remaining space in a flex container to push siblings apart
8
+ /// @role flex
9
+ /// @see-also dbx-flex-fill, dbx-button-spacer
6
10
  .dbx-spacer,
7
11
  .spacer {
8
12
  flex: 1 1 auto;
@@ -13,14 +17,24 @@
13
17
  pointer-events: none;
14
18
  }
15
19
 
20
+ /// @dbx-utility no-margin
21
+ /// @intent strip margin (forced) — `margin: 0 !important`
22
+ /// @role spacing
16
23
  .no-margin {
17
24
  margin: 0 !important;
18
25
  }
19
26
 
27
+ /// @dbx-utility no-padding
28
+ /// @intent strip padding (forced) — `padding: 0 !important`
29
+ /// @role spacing
30
+ /// @see-also dbx-list-item-p0
20
31
  .no-padding {
21
32
  padding: 0 !important;
22
33
  }
23
34
 
35
+ /// @dbx-utility hide
36
+ /// @intent hide element (forced) — `display: none !important`
37
+ /// @role state
24
38
  .dbx-hide {
25
39
  display: none !important;
26
40
  }
@@ -63,40 +77,72 @@
63
77
  }
64
78
  }
65
79
 
80
+ /// @dbx-utility h100
81
+ /// @intent fill height — `height: 100%`
82
+ /// @role layout
83
+ /// @see-also dbx-w100
66
84
  .dbx-h100 {
67
85
  height: 100%;
68
86
  }
69
87
 
88
+ /// @dbx-utility block
89
+ /// @intent set display: block
90
+ /// @role layout
91
+ /// @see-also dbx-iblock, dbx-flex
70
92
  .d-block,
71
93
  .dbx-block {
72
94
  display: block;
73
95
  }
74
96
 
97
+ /// @dbx-utility iblock
98
+ /// @intent set display: inline-block
99
+ /// @role layout
100
+ /// @see-also dbx-block, dbx-iflex
75
101
  .d-iblock,
76
102
  .dbx-iblock {
77
103
  display: inline-block;
78
104
  }
79
105
 
106
+ /// @dbx-utility inline
107
+ /// @intent set display: inline
108
+ /// @role layout
109
+ /// @see-also dbx-iblock
80
110
  .d-inline,
81
111
  .dbx-inline {
82
112
  display: inline;
83
113
  }
84
114
 
115
+ /// @dbx-utility flex
116
+ /// @intent set display: flex (no other flex defaults)
117
+ /// @role flex
118
+ /// @see-also dbx-flex-bar, dbx-flex-center, dbx-flex-column, dbx-iflex
85
119
  .d-flex,
86
120
  .dbx-flex {
87
121
  display: flex;
88
122
  }
89
123
 
124
+ /// @dbx-utility iflex
125
+ /// @intent set display: inline-flex
126
+ /// @role flex
127
+ /// @see-also dbx-flex, dbx-fiflex
90
128
  .d-iflex,
91
129
  .dbx-iflex {
92
130
  display: inline-flex;
93
131
  }
94
132
 
133
+ /// @dbx-utility w100
134
+ /// @intent fill width — `width: 100%`
135
+ /// @role layout
136
+ /// @see-also dbx-h100
95
137
  .dbx-w100 {
96
138
  width: 100%;
97
139
  }
98
140
 
99
141
  // force
142
+ /// @dbx-utility fiflex
143
+ /// @intent set display: inline-flex (forced) — wins over inherited `display`
144
+ /// @role flex
145
+ /// @see-also dbx-iflex
100
146
  .d-fiflex,
101
147
  .dbx-fiflex {
102
148
  display: inline-flex !important;
@@ -116,6 +162,9 @@
116
162
 
117
163
  // tonal mode: use the vibrant theme color as text instead of the contrast color.
118
164
  // Applied via CSS class (not [style.color]) to avoid conflicting with [ngStyle] on buttons.
165
+ /// @dbx-utility color-tonal
166
+ /// @intent paint text with the vibrant `--dbx-bg-color` (tonal mode) instead of the contrast color — pair with `[dbxColor]` + `[dbxColorTone]` for the muted background variant
167
+ /// @role state
119
168
  .dbx-color-tonal {
120
169
  color: var(#{theming.$dbx-bg-color-var});
121
170
  }