@tonycodes-ui/mortar 0.28.1 → 0.30.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.
package/src/data.css CHANGED
@@ -171,7 +171,8 @@
171
171
  --m-cell-pad-y: 6px;
172
172
  --m-cell-pad-x: 10px;
173
173
  }
174
- :is(.m-data-table, .m-table) [data-align="end"] {
174
+ /* Cells only: a Stack or Grid in the toolbar also carries data-align. */
175
+ :is(.m-data-table, .m-table) :is(th, td)[data-align="end"] {
175
176
  text-align: right;
176
177
  font-variant-numeric: tabular-nums;
177
178
  }
@@ -293,6 +294,68 @@
293
294
  :where(.m-data-table) tr[data-selected] > [data-pin] {
294
295
  background-color: var(--m-selected);
295
296
  }
297
+ /* DataGrid pins columns to the start too; the inline inset comes from the
298
+ measured widths of the pinned columns before it. */
299
+ /* Zero specificity, like the end pin above, so stripes and selection win. */
300
+ :where(.m-data-grid) :where(th, td)[data-pin="start"] {
301
+ position: sticky;
302
+ inset-inline-start: 0;
303
+ z-index: 2;
304
+ background-color: var(--m-surface);
305
+ box-shadow: inset -1px 0 0 var(--m-line);
306
+ }
307
+ :where(.m-data-grid:dir(rtl)) :where(th, td)[data-pin="start"] {
308
+ box-shadow: inset 1px 0 0 var(--m-line);
309
+ }
310
+ /* Bottom-align labelled filter controls; the selection bar stays centred. */
311
+ .m-data-grid .m-table-toolbar:has(> .m-data-grid-controls) {
312
+ align-items: flex-end;
313
+ }
314
+ .m-data-grid-controls {
315
+ display: flex;
316
+ flex-wrap: wrap;
317
+ align-items: flex-end;
318
+ gap: 12px;
319
+ min-width: 0;
320
+ }
321
+ .m-sort-order {
322
+ display: inline-grid;
323
+ place-items: center;
324
+ min-width: 16px;
325
+ height: 16px;
326
+ border-radius: var(--m-radius-full);
327
+ background: var(--m-sunken);
328
+ color: var(--m-muted);
329
+ font-size: 11px;
330
+ font-variant-numeric: tabular-nums;
331
+ }
332
+ .m-data-grid-columns-panel {
333
+ z-index: 30;
334
+ min-width: 200px;
335
+ margin-top: 4px;
336
+ padding: 12px;
337
+ border: 1px solid var(--m-line);
338
+ border-radius: var(--m-radius);
339
+ background: var(--m-surface);
340
+ box-shadow: var(--m-float);
341
+ }
342
+ .m-data-grid-columns-panel fieldset {
343
+ display: grid;
344
+ gap: 8px;
345
+ margin: 0;
346
+ padding: 0;
347
+ border: 0;
348
+ }
349
+ .m-data-grid-columns-panel legend {
350
+ margin-bottom: 8px;
351
+ color: var(--m-muted);
352
+ font-size: 12px;
353
+ font-weight: var(--m-weight-semibold);
354
+ }
355
+ .m-data-grid-spacer > td {
356
+ padding: 0;
357
+ border: 0;
358
+ }
296
359
  /* Column priority follows the table's own width, so a table in a narrow
297
360
  panel collapses as it would on a phone. */
298
361
  @container m-data-table (max-width: 767px) {
@@ -552,10 +552,12 @@
552
552
  background: var(--m-surface);
553
553
  overflow: hidden;
554
554
  }
555
+ /* The group draws the 1px border, so the whole field matches --m-control
556
+ like Select and Button beside it. */
555
557
  .m-input-group input {
556
558
  min-width: 0;
557
559
  width: 100%;
558
- min-height: var(--m-control);
560
+ min-height: calc(var(--m-control) - 2px);
559
561
  padding: 4px var(--m-pad);
560
562
  border: 0;
561
563
  background: transparent;