@ruckc/truss-chart 1.51.1 → 1.52.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/dist/BarChart.svelte
CHANGED
|
@@ -296,9 +296,9 @@
|
|
|
296
296
|
<style>
|
|
297
297
|
.fillwrap { height: 100%; min-height: 0; overflow: hidden; }
|
|
298
298
|
svg { display: block; overflow: visible; }
|
|
299
|
-
.grid { stroke: var(--tr-outline-variant); stroke-opacity: 0.6; }
|
|
299
|
+
.grid { stroke: var(--tr-chart-grid-color, var(--tr-outline-variant)); stroke-opacity: var(--tr-chart-grid-opacity, 0.6); stroke-dasharray: var(--tr-chart-grid-dash, none); }
|
|
300
300
|
.grid[data-zero='true'] { stroke-opacity: 1; }
|
|
301
|
-
.tick { fill: var(--tr-on-surface-variant); font-size: var(--tr-text-xs); font-variant-numeric: tabular-nums; }
|
|
301
|
+
.tick { fill: var(--tr-chart-tick-color, var(--tr-on-surface-variant)); font-size: var(--tr-text-xs); font-variant-numeric: tabular-nums; }
|
|
302
302
|
.val { fill: var(--tr-on-surface-variant); font-size: var(--tr-text-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
303
303
|
.bar { outline: none; transition: filter var(--tr-dur-fast) var(--tr-ease); }
|
|
304
304
|
.bar.act { cursor: pointer; }
|
package/dist/ChartFrame.svelte
CHANGED
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
</figure>
|
|
76
76
|
|
|
77
77
|
<style>
|
|
78
|
-
.rdc { margin: 0; padding: 12px 12px 8px; background: var(--tr-surface-container-low); border: 1px solid var(--tr-outline-variant); border-radius: var(--tr-radius-md); color: var(--tr-on-surface); font-family: var(--tr-font-sans); }
|
|
78
|
+
.rdc { margin: 0; padding: 12px 12px 8px; background: var(--tr-card-bg, var(--tr-surface-container-low)); border: 1px solid var(--tr-card-border-color, var(--tr-outline-variant)); border-radius: var(--tr-radius-card, var(--tr-radius-md)); box-shadow: var(--tr-card-shadow, none); color: var(--tr-on-surface); font-family: var(--tr-font-sans); }
|
|
79
79
|
figcaption { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
|
|
80
80
|
.title { font-weight: 700; }
|
|
81
81
|
.sub { font-size: var(--tr-text-sm); color: var(--tr-on-surface-variant); }
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 6px; padding: 0; list-style: none; }
|
|
86
86
|
.legend button { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px; border: 0; border-radius: var(--tr-radius-sm); background: none; color: var(--tr-on-surface-variant); font: var(--tr-text-sm) var(--tr-font-sans); cursor: pointer; }
|
|
87
87
|
.legend button[aria-pressed='false'] { opacity: 0.45; text-decoration: line-through; }
|
|
88
|
-
.key { width: 10px; height: 10px; border-radius: 2px; }
|
|
88
|
+
.key { width: 10px; height: 10px; border-radius: var(--tr-chart-key-radius, 2px); }
|
|
89
89
|
.body { position: relative; }
|
|
90
90
|
.tbl { max-height: 320px; overflow: auto; }
|
|
91
91
|
.tbl:focus-visible { outline: none; box-shadow: inset var(--tr-focus-ring); }
|
package/dist/DensityChart.svelte
CHANGED
|
@@ -249,10 +249,10 @@
|
|
|
249
249
|
schedule();
|
|
250
250
|
return () => { cancelAnimationFrame(raf); raf = 0; };
|
|
251
251
|
});
|
|
252
|
-
// colours come from CSS custom properties, so follow theme switches (explicit data-theme or the OS preference)
|
|
252
|
+
// colours come from CSS custom properties, so follow theme switches (explicit data-theme, a data-truss-theme theme, or the OS preference)
|
|
253
253
|
$effect(() => {
|
|
254
254
|
const mo = new MutationObserver(schedule);
|
|
255
|
-
mo.observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme', 'class'] });
|
|
255
|
+
mo.observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme', 'data-truss-theme', 'class'] });
|
|
256
256
|
// the default theme follows the OS, which changes without touching any attribute
|
|
257
257
|
const os = matchMedia('(prefers-color-scheme: dark)');
|
|
258
258
|
os.addEventListener('change', schedule);
|
package/dist/Histogram.svelte
CHANGED
|
@@ -229,8 +229,8 @@
|
|
|
229
229
|
.fillwrap { height: 100%; min-height: 0; overflow: hidden; }
|
|
230
230
|
svg { display: block; outline: none; overflow: visible; }
|
|
231
231
|
svg:focus-visible { border-radius: var(--tr-radius-sm); box-shadow: var(--tr-focus-ring); }
|
|
232
|
-
.grid { stroke: var(--tr-outline-variant); stroke-opacity: 0.6; }
|
|
233
|
-
.tick { fill: var(--tr-on-surface-variant); font-size: var(--tr-text-xs); font-variant-numeric: tabular-nums; }
|
|
232
|
+
.grid { stroke: var(--tr-chart-grid-color, var(--tr-outline-variant)); stroke-opacity: var(--tr-chart-grid-opacity, 0.6); stroke-dasharray: var(--tr-chart-grid-dash, none); }
|
|
233
|
+
.tick { fill: var(--tr-chart-tick-color, var(--tr-on-surface-variant)); font-size: var(--tr-text-xs); font-variant-numeric: tabular-nums; }
|
|
234
234
|
.bar { transition: opacity var(--tr-dur-fast) var(--tr-ease), filter var(--tr-dur-fast) var(--tr-ease); }
|
|
235
235
|
.bar[data-hover='true'] { filter: brightness(1.12) saturate(1.1); }
|
|
236
236
|
.bar[data-dim='true'] { opacity: 0.3; }
|
package/dist/LineChart.svelte
CHANGED
|
@@ -361,8 +361,8 @@
|
|
|
361
361
|
svg { display: block; outline: none; overflow: visible; }
|
|
362
362
|
svg.act { cursor: pointer; }
|
|
363
363
|
svg:focus-visible { border-radius: var(--tr-radius-sm); box-shadow: var(--tr-focus-ring); }
|
|
364
|
-
.grid { stroke: var(--tr-outline-variant); stroke-opacity: 0.6; stroke-width: 1; }
|
|
365
|
-
.tick { fill: var(--tr-on-surface-variant); font-size: var(--tr-text-xs); font-variant-numeric: tabular-nums; }
|
|
364
|
+
.grid { stroke: var(--tr-chart-grid-color, var(--tr-outline-variant)); stroke-opacity: var(--tr-chart-grid-opacity, 0.6); stroke-dasharray: var(--tr-chart-grid-dash, none); stroke-width: 1; }
|
|
365
|
+
.tick { fill: var(--tr-chart-tick-color, var(--tr-on-surface-variant)); font-size: var(--tr-text-xs); font-variant-numeric: tabular-nums; }
|
|
366
366
|
.line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
|
|
367
367
|
.area { fill-opacity: 0.14; }
|
|
368
368
|
.area.stack { fill-opacity: 0.55; }
|
package/dist/ScatterChart.svelte
CHANGED
|
@@ -237,8 +237,8 @@
|
|
|
237
237
|
svg { display: block; outline: none; overflow: visible; }
|
|
238
238
|
svg.act { cursor: pointer; }
|
|
239
239
|
svg:focus-visible { border-radius: var(--tr-radius-sm); box-shadow: var(--tr-focus-ring); }
|
|
240
|
-
.grid { stroke: var(--tr-outline-variant); stroke-opacity: 0.6; stroke-width: 1; }
|
|
241
|
-
.tick { fill: var(--tr-on-surface-variant); font-size: var(--tr-text-xs); font-variant-numeric: tabular-nums; }
|
|
240
|
+
.grid { stroke: var(--tr-chart-grid-color, var(--tr-outline-variant)); stroke-opacity: var(--tr-chart-grid-opacity, 0.6); stroke-dasharray: var(--tr-chart-grid-dash, none); stroke-width: 1; }
|
|
241
|
+
.tick { fill: var(--tr-chart-tick-color, var(--tr-on-surface-variant)); font-size: var(--tr-text-xs); font-variant-numeric: tabular-nums; }
|
|
242
242
|
.axis { fill: var(--tr-on-surface-variant); font-size: var(--tr-text-sm); font-weight: 600; }
|
|
243
243
|
.pt { fill-opacity: 0.85; stroke: var(--tr-surface-container-low); stroke-width: 2; }
|
|
244
244
|
.pt.on { fill-opacity: 1; }
|
package/dist/StatTile.svelte
CHANGED
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
.tile.sm .value { font-size: var(--trc-stat-value-size, var(--tr-text-xl)); }
|
|
103
103
|
.label { color: var(--tr-on-surface-variant); font-size: var(--tr-text-sm); font-weight: 600; }
|
|
104
104
|
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
|
|
105
|
-
.value { font-size: var(--trc-stat-value-size, 28px); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
|
|
105
|
+
.value { font-size: var(--trc-stat-value-size, 28px); font-family: var(--tr-font-display, inherit); font-weight: var(--tr-display-weight, 700); font-variation-settings: var(--tr-display-axes, normal); line-height: 1.2; font-variant-numeric: tabular-nums; }
|
|
106
106
|
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: var(--tr-text-sm); font-variant-numeric: tabular-nums; }
|
|
107
107
|
.delta.good { color: var(--tr-success); }
|
|
108
108
|
.delta.bad { color: var(--tr-danger); }
|