@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/CHANGELOG.md +8 -3
- package/bin/mortar.mjs +16 -4
- package/catalog.json +735 -358
- package/cli/audit.mjs +24 -9
- package/cli/data.mjs +10 -0
- package/cli/packet.mjs +41 -3
- package/cli/render.mjs +315 -0
- package/cli/tools.mjs +24 -2
- package/dist/agent-data.json +1 -1
- package/dist/application.d.ts +4 -33
- package/dist/application.js +4 -57
- package/dist/chart-core.d.ts +30 -0
- package/dist/chart-core.js +100 -0
- package/dist/charts.d.ts +3 -0
- package/dist/charts.js +3 -0
- package/dist/data-grid.d.ts +2 -0
- package/dist/data-grid.js +4 -0
- package/dist/grid.d.ts +102 -0
- package/dist/grid.js +371 -0
- package/dist/sparkline.d.ts +28 -0
- package/dist/sparkline.js +31 -0
- package/dist/table-core.d.ts +54 -0
- package/dist/table-core.js +59 -0
- package/docs/agents.md +17 -1
- package/docs/charts.md +68 -0
- package/docs/data-grid.md +155 -0
- package/package.json +21 -3
- package/skills/mortar/SKILL.md +1 -1
- package/src/application.css +6 -1
- package/src/application.tsx +25 -114
- package/src/chart-core.ts +113 -0
- package/src/charts.css +58 -0
- package/src/charts.ts +6 -0
- package/src/data-grid.ts +13 -0
- package/src/data.css +64 -1
- package/src/foundation.css +3 -1
- package/src/grid.tsx +906 -0
- package/src/sparkline.tsx +124 -0
- package/src/table-core.tsx +128 -0
- package/src/tokens.css +26 -0
- package/styles.css +1 -0
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
|
-
:
|
|
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) {
|
package/src/foundation.css
CHANGED
|
@@ -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;
|