@design.estate/dees-catalog 3.61.2 → 3.63.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.
@@ -114,29 +114,48 @@ export const tableStyles: CSSResult[] = [
114
114
  border-bottom-width: 0px;
115
115
  }
116
116
 
117
+ /* Default mode (Mode B, page sticky): horizontal scroll lives on
118
+ .tableScroll (so wide tables don't get clipped by an ancestor
119
+ overflow:hidden such as dees-tile). Vertical sticky is handled by
120
+ a JS-managed floating header (.floatingHeader, position:fixed),
121
+ which is unaffected by ancestor overflow. */
117
122
  .tableScroll {
118
- /* enable horizontal scroll only when content exceeds width */
123
+ position: relative;
119
124
  overflow-x: auto;
120
- /* prevent vertical scroll inside the table container */
121
- overflow-y: hidden;
122
- /* avoid reserving extra space for classic scrollbars where possible */
125
+ overflow-y: visible;
126
+ scrollbar-gutter: stable;
127
+ }
128
+ /* Mode A, internal scroll: opt-in via fixed-height attribute.
129
+ The table scrolls inside its own box and the header sticks via plain CSS sticky. */
130
+ :host([fixed-height]) .tableScroll {
131
+ max-height: var(--table-max-height, 360px);
132
+ overflow: auto;
123
133
  scrollbar-gutter: stable both-edges;
124
134
  }
125
- /* Hide horizontal scrollbar entirely when not using sticky header */
126
- :host(:not([sticky-header])) .tableScroll {
127
- -ms-overflow-style: none; /* IE/Edge */
128
- scrollbar-width: none; /* Firefox (hides both axes) */
135
+ :host([fixed-height]) .tableScroll::-webkit-scrollbar:horizontal {
136
+ height: 0px;
129
137
  }
130
- :host(:not([sticky-header])) .tableScroll::-webkit-scrollbar {
131
- display: none; /* Chrome/Safari */
138
+
139
+ /* Floating header overlay (Mode B). Position is managed by JS so it
140
+ escapes any ancestor overflow:hidden (position:fixed is not clipped
141
+ by overflow ancestors). */
142
+ .floatingHeader {
143
+ position: fixed;
144
+ top: 0;
145
+ left: 0;
146
+ z-index: 100;
147
+ visibility: hidden;
148
+ overflow: hidden;
149
+ pointer-events: none;
132
150
  }
133
- /* In sticky-header mode, hide only the horizontal scrollbar in WebKit/Blink */
134
- :host([sticky-header]) .tableScroll::-webkit-scrollbar:horizontal {
135
- height: 0px;
151
+ .floatingHeader.active {
152
+ visibility: visible;
136
153
  }
137
- :host([sticky-header]) .tableScroll {
138
- max-height: var(--table-max-height, 360px);
139
- overflow: auto;
154
+ .floatingHeader table {
155
+ margin: 0;
156
+ }
157
+ .floatingHeader th {
158
+ pointer-events: auto;
140
159
  }
141
160
 
142
161
  table {
@@ -159,11 +178,20 @@ export const tableStyles: CSSResult[] = [
159
178
  background: ${cssManager.bdTheme('hsl(210 40% 96.1%)', 'hsl(0 0% 9%)')};
160
179
  border-bottom: 1px solid var(--dees-color-border-strong);
161
180
  }
162
- :host([sticky-header]) thead th {
181
+ /* th needs its own background so sticky cells paint over scrolled rows
182
+ (browsers don't paint the <thead> box behind a sticky <th>). */
183
+ th {
184
+ background: ${cssManager.bdTheme('hsl(210 40% 96.1%)', 'hsl(0 0% 9%)')};
185
+ }
186
+ /* Mode A — internal scroll sticky */
187
+ :host([fixed-height]) thead th {
163
188
  position: sticky;
164
189
  top: 0;
165
190
  z-index: 2;
166
191
  }
192
+ :host([fixed-height]) thead tr.filtersRow th {
193
+ top: 36px; /* matches th { height: 36px } below */
194
+ }
167
195
 
168
196
  tbody tr {
169
197
  transition: background-color 0.15s ease;
@@ -276,6 +304,32 @@ export const tableStyles: CSSResult[] = [
276
304
  color: ${cssManager.bdTheme('hsl(215.4 16.3% 46.9%)', 'hsl(215 20.2% 65.1%)')};
277
305
  letter-spacing: -0.01em;
278
306
  }
307
+
308
+ th[role='columnheader']:hover {
309
+ color: var(--dees-color-text-primary);
310
+ }
311
+
312
+ th .sortArrow {
313
+ display: inline-block;
314
+ margin-left: 6px;
315
+ font-size: 10px;
316
+ line-height: 1;
317
+ opacity: 0.7;
318
+ vertical-align: middle;
319
+ }
320
+
321
+ th .sortBadge {
322
+ display: inline-block;
323
+ margin-left: 3px;
324
+ padding: 1px 5px;
325
+ font-size: 10px;
326
+ font-weight: 600;
327
+ line-height: 1;
328
+ color: ${cssManager.bdTheme('hsl(222.2 47.4% 30%)', 'hsl(217.2 91.2% 75%)')};
329
+ background: ${cssManager.bdTheme('hsl(222.2 47.4% 51.2% / 0.12)', 'hsl(217.2 91.2% 59.8% / 0.18)')};
330
+ border-radius: 999px;
331
+ vertical-align: middle;
332
+ }
279
333
 
280
334
  :host([show-vertical-lines]) th {
281
335
  border-right: 1px solid var(--dees-color-border-default);
@@ -26,4 +26,13 @@ export interface Column<T = any> {
26
26
  hidden?: boolean;
27
27
  }
28
28
 
29
+ /**
30
+ * One entry in a multi-column sort cascade. Order in the array reflects priority:
31
+ * index 0 is the primary sort key, index 1 the secondary tiebreaker, and so on.
32
+ */
33
+ export interface ISortDescriptor {
34
+ key: string;
35
+ dir: 'asc' | 'desc';
36
+ }
37
+
29
38
  export type TDisplayFunction<T = any> = (itemArg: T) => Record<string, any>;