bank20baht-ui 0.4.0 → 0.4.2
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/chunks/{baht-workflow-h9pLnwlk.js → baht-workflow-Dy8HZQ_f.js} +1352 -1256
- package/dist/components/primitives/baht-bar-chart.d.ts +32 -0
- package/dist/components/primitives/baht-meter.d.ts +8 -1
- package/dist/components/primitives/baht-stat.d.ts +4 -1
- package/dist/custom-elements.json +148 -4
- package/dist/index.js +1 -1
- package/dist/react.d.ts +1 -0
- package/dist/ssr.js +1 -1
- package/dist/tokens.css +74 -5
- package/dist/vscode.html-custom-data.json +11 -1
- package/dist/web-types.json +23 -3
- package/package.json +1 -1
|
@@ -24,6 +24,8 @@ export declare class BahtBarChart extends BahtChartBase {
|
|
|
24
24
|
stacked: boolean;
|
|
25
25
|
/** Previous-period values, drawn as a muted bar under each current bar. */
|
|
26
26
|
compare: number[];
|
|
27
|
+
/** Names the muted `compare` bar in the key and the table twin. */
|
|
28
|
+
compareLabel: string;
|
|
27
29
|
/** Budget / target lines drawn over the bars. */
|
|
28
30
|
markers: ChartMarker[];
|
|
29
31
|
/** `ends` prints the value at the bar tip; `none` leaves it to the tooltip. */
|
|
@@ -34,6 +36,21 @@ export declare class BahtBarChart extends BahtChartBase {
|
|
|
34
36
|
color: string;
|
|
35
37
|
/** Accessible summary used by the vertical (graphics-only) rendering. */
|
|
36
38
|
label: string;
|
|
39
|
+
/**
|
|
40
|
+
* Measured px per category for the vertical rendering; `0` until the host has
|
|
41
|
+
* been measured, where the CSS flex fallback (`flex: 1 1 0; min-width: 0`)
|
|
42
|
+
* already keeps the columns inside the host. Measuring lets the element also
|
|
43
|
+
* thin the x labels and shrink the bars below the 24px cap, so 31 days fit a
|
|
44
|
+
* 400px card instead of spilling out of it.
|
|
45
|
+
*/
|
|
46
|
+
private band;
|
|
47
|
+
private resizeObserver?;
|
|
48
|
+
connectedCallback(): void;
|
|
49
|
+
disconnectedCallback(): void;
|
|
50
|
+
protected firstUpdated(): void;
|
|
51
|
+
/** Host width → px per category. Never runs on the server (`hasDom` guard). */
|
|
52
|
+
private measure;
|
|
53
|
+
private get columnCount();
|
|
37
54
|
/** The series actually drawn — `groups` is normalised into one series. */
|
|
38
55
|
private get model();
|
|
39
56
|
private colorFor;
|
|
@@ -43,7 +60,22 @@ export declare class BahtBarChart extends BahtChartBase {
|
|
|
43
60
|
private tableTwin;
|
|
44
61
|
/** Markers with no `category` span the chart; the rest ride their own row. */
|
|
45
62
|
private markersFor;
|
|
63
|
+
/** Markers that apply to every row / column. */
|
|
64
|
+
private get chartMarkers();
|
|
65
|
+
/** What a marker reads as: its own label, else its formatted value. */
|
|
66
|
+
private markerText;
|
|
67
|
+
/**
|
|
68
|
+
* Marker lines, positioned along the value axis. The label is drawn separately
|
|
69
|
+
* (`markerLabels`) as real text — a `title` attribute alone never reaches AT.
|
|
70
|
+
*/
|
|
46
71
|
private markerOverlay;
|
|
72
|
+
/**
|
|
73
|
+
* Marker labels, sorted along the axis and thinned so neighbours never collide:
|
|
74
|
+
* a dropped label keeps its line, and its value still reads in the table twin.
|
|
75
|
+
*/
|
|
76
|
+
private placedMarkers;
|
|
77
|
+
/** Legend rows: one per series, plus the muted `compare` key when it is set. */
|
|
78
|
+
private legendEntries;
|
|
47
79
|
private renderHorizontal;
|
|
48
80
|
private renderVertical;
|
|
49
81
|
}
|
|
@@ -31,10 +31,17 @@ export declare class BahtMeter extends BahtElement {
|
|
|
31
31
|
expected: number | null;
|
|
32
32
|
/** Word shown after the numbers when the meter is over budget. */
|
|
33
33
|
overLabel: string;
|
|
34
|
+
/** Word shown when the value has reached the budget exactly, but not passed it. */
|
|
35
|
+
atLabel: string;
|
|
34
36
|
/** Word shown after the numbers when the meter is near its limit. */
|
|
35
37
|
nearLabel: string;
|
|
36
38
|
private get fraction();
|
|
37
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* `ok` | `warning` | `danger`, from the fraction and the thresholds. `danger` is
|
|
41
|
+
* strictly **above** its threshold: spending exactly the budget is not
|
|
42
|
+
* overspending, so it reads as the warning tone with an "At budget" status.
|
|
43
|
+
* `warning` stays inclusive (`>=`).
|
|
44
|
+
*/
|
|
38
45
|
private get severity();
|
|
39
46
|
private get statusText();
|
|
40
47
|
protected render(): TemplateResult;
|
|
@@ -30,7 +30,10 @@ export declare class BahtStat extends BahtElement {
|
|
|
30
30
|
delta: number | null;
|
|
31
31
|
/** Whether `delta` is a percentage or an absolute amount. */
|
|
32
32
|
deltaKind: 'abs' | 'pct';
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* What the delta is measured against, e.g. "vs August". With no `delta` it is
|
|
35
|
+
* still rendered on its own as a muted caption, so a figure can name its period.
|
|
36
|
+
*/
|
|
34
37
|
deltaLabel: string;
|
|
35
38
|
/** Is a rise good news? Spending tiles set `up-is-good="false"`. */
|
|
36
39
|
upIsGood: boolean;
|
|
@@ -2087,6 +2087,16 @@
|
|
|
2087
2087
|
"default": "[]",
|
|
2088
2088
|
"description": "Previous-period values, drawn as a muted bar under each current bar."
|
|
2089
2089
|
},
|
|
2090
|
+
{
|
|
2091
|
+
"kind": "field",
|
|
2092
|
+
"name": "compareLabel",
|
|
2093
|
+
"type": {
|
|
2094
|
+
"text": "string"
|
|
2095
|
+
},
|
|
2096
|
+
"default": "'Previous period'",
|
|
2097
|
+
"description": "Names the muted `compare` bar in the key and the table twin.",
|
|
2098
|
+
"attribute": "compare-label"
|
|
2099
|
+
},
|
|
2090
2100
|
{
|
|
2091
2101
|
"kind": "field",
|
|
2092
2102
|
"name": "markers",
|
|
@@ -2136,6 +2146,44 @@
|
|
|
2136
2146
|
"description": "Accessible summary used by the vertical (graphics-only) rendering.",
|
|
2137
2147
|
"attribute": "label"
|
|
2138
2148
|
},
|
|
2149
|
+
{
|
|
2150
|
+
"kind": "field",
|
|
2151
|
+
"name": "band",
|
|
2152
|
+
"type": {
|
|
2153
|
+
"text": "number"
|
|
2154
|
+
},
|
|
2155
|
+
"privacy": "private",
|
|
2156
|
+
"default": "0",
|
|
2157
|
+
"description": "Measured px per category for the vertical rendering; `0` until the host has\nbeen measured, where the CSS flex fallback (`flex: 1 1 0; min-width: 0`)\nalready keeps the columns inside the host. Measuring lets the element also\nthin the x labels and shrink the bars below the 24px cap, so 31 days fit a\n400px card instead of spilling out of it."
|
|
2158
|
+
},
|
|
2159
|
+
{
|
|
2160
|
+
"kind": "field",
|
|
2161
|
+
"name": "resizeObserver",
|
|
2162
|
+
"type": {
|
|
2163
|
+
"text": "ResizeObserver | undefined"
|
|
2164
|
+
},
|
|
2165
|
+
"privacy": "private"
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
"kind": "method",
|
|
2169
|
+
"name": "measure",
|
|
2170
|
+
"privacy": "private",
|
|
2171
|
+
"return": {
|
|
2172
|
+
"type": {
|
|
2173
|
+
"text": "void"
|
|
2174
|
+
}
|
|
2175
|
+
},
|
|
2176
|
+
"description": "Host width → px per category. Never runs on the server (`hasDom` guard)."
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
"kind": "field",
|
|
2180
|
+
"name": "columnCount",
|
|
2181
|
+
"type": {
|
|
2182
|
+
"text": "number"
|
|
2183
|
+
},
|
|
2184
|
+
"privacy": "private",
|
|
2185
|
+
"readonly": true
|
|
2186
|
+
},
|
|
2139
2187
|
{
|
|
2140
2188
|
"kind": "field",
|
|
2141
2189
|
"name": "model",
|
|
@@ -2256,6 +2304,35 @@
|
|
|
2256
2304
|
],
|
|
2257
2305
|
"description": "Markers with no `category` span the chart; the rest ride their own row."
|
|
2258
2306
|
},
|
|
2307
|
+
{
|
|
2308
|
+
"kind": "field",
|
|
2309
|
+
"name": "chartMarkers",
|
|
2310
|
+
"type": {
|
|
2311
|
+
"text": "ChartMarker[]"
|
|
2312
|
+
},
|
|
2313
|
+
"privacy": "private",
|
|
2314
|
+
"description": "Markers that apply to every row / column.",
|
|
2315
|
+
"readonly": true
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
"kind": "method",
|
|
2319
|
+
"name": "markerText",
|
|
2320
|
+
"privacy": "private",
|
|
2321
|
+
"return": {
|
|
2322
|
+
"type": {
|
|
2323
|
+
"text": "string"
|
|
2324
|
+
}
|
|
2325
|
+
},
|
|
2326
|
+
"parameters": [
|
|
2327
|
+
{
|
|
2328
|
+
"name": "m",
|
|
2329
|
+
"type": {
|
|
2330
|
+
"text": "ChartMarker"
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
],
|
|
2334
|
+
"description": "What a marker reads as: its own label, else its formatted value."
|
|
2335
|
+
},
|
|
2259
2336
|
{
|
|
2260
2337
|
"kind": "method",
|
|
2261
2338
|
"name": "markerOverlay",
|
|
@@ -2278,7 +2355,46 @@
|
|
|
2278
2355
|
"text": "string"
|
|
2279
2356
|
}
|
|
2280
2357
|
}
|
|
2281
|
-
]
|
|
2358
|
+
],
|
|
2359
|
+
"description": "Marker lines, positioned along the value axis. The label is drawn separately\n(`markerLabels`) as real text — a `title` attribute alone never reaches AT."
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
"kind": "method",
|
|
2363
|
+
"name": "placedMarkers",
|
|
2364
|
+
"privacy": "private",
|
|
2365
|
+
"return": {
|
|
2366
|
+
"type": {
|
|
2367
|
+
"text": "{ m: ChartMarker; pct: number }[]"
|
|
2368
|
+
}
|
|
2369
|
+
},
|
|
2370
|
+
"parameters": [
|
|
2371
|
+
{
|
|
2372
|
+
"name": "max",
|
|
2373
|
+
"type": {
|
|
2374
|
+
"text": "number"
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
],
|
|
2378
|
+
"description": "Marker labels, sorted along the axis and thinned so neighbours never collide:\na dropped label keeps its line, and its value still reads in the table twin."
|
|
2379
|
+
},
|
|
2380
|
+
{
|
|
2381
|
+
"kind": "method",
|
|
2382
|
+
"name": "legendEntries",
|
|
2383
|
+
"privacy": "private",
|
|
2384
|
+
"return": {
|
|
2385
|
+
"type": {
|
|
2386
|
+
"text": "{ label: string; color: string }[]"
|
|
2387
|
+
}
|
|
2388
|
+
},
|
|
2389
|
+
"parameters": [
|
|
2390
|
+
{
|
|
2391
|
+
"name": "series",
|
|
2392
|
+
"type": {
|
|
2393
|
+
"text": "ChartSeries[]"
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
],
|
|
2397
|
+
"description": "Legend rows: one per series, plus the muted `compare` key when it is set."
|
|
2282
2398
|
},
|
|
2283
2399
|
{
|
|
2284
2400
|
"kind": "method",
|
|
@@ -2619,6 +2735,15 @@
|
|
|
2619
2735
|
"description": "Stack the series inside one band instead of grouping them side by side.",
|
|
2620
2736
|
"fieldName": "stacked"
|
|
2621
2737
|
},
|
|
2738
|
+
{
|
|
2739
|
+
"name": "compare-label",
|
|
2740
|
+
"type": {
|
|
2741
|
+
"text": "string"
|
|
2742
|
+
},
|
|
2743
|
+
"default": "'Previous period'",
|
|
2744
|
+
"description": "Names the muted `compare` bar in the key and the table twin.",
|
|
2745
|
+
"fieldName": "compareLabel"
|
|
2746
|
+
},
|
|
2622
2747
|
{
|
|
2623
2748
|
"name": "label-values",
|
|
2624
2749
|
"type": {
|
|
@@ -8181,6 +8306,16 @@
|
|
|
8181
8306
|
"description": "Word shown after the numbers when the meter is over budget.",
|
|
8182
8307
|
"attribute": "over-label"
|
|
8183
8308
|
},
|
|
8309
|
+
{
|
|
8310
|
+
"kind": "field",
|
|
8311
|
+
"name": "atLabel",
|
|
8312
|
+
"type": {
|
|
8313
|
+
"text": "string"
|
|
8314
|
+
},
|
|
8315
|
+
"default": "'At budget'",
|
|
8316
|
+
"description": "Word shown when the value has reached the budget exactly, but not passed it.",
|
|
8317
|
+
"attribute": "at-label"
|
|
8318
|
+
},
|
|
8184
8319
|
{
|
|
8185
8320
|
"kind": "field",
|
|
8186
8321
|
"name": "nearLabel",
|
|
@@ -8207,7 +8342,7 @@
|
|
|
8207
8342
|
"text": "'ok' | 'warning' | 'danger'"
|
|
8208
8343
|
},
|
|
8209
8344
|
"privacy": "private",
|
|
8210
|
-
"description": "`ok` | `warning` | `danger`, from the fraction and the thresholds.",
|
|
8345
|
+
"description": "`ok` | `warning` | `danger`, from the fraction and the thresholds. `danger` is\nstrictly **above** its threshold: spending exactly the budget is not\noverspending, so it reads as the warning tone with an \"At budget\" status.\n`warning` stays inclusive (`>=`).",
|
|
8211
8346
|
"readonly": true
|
|
8212
8347
|
},
|
|
8213
8348
|
{
|
|
@@ -8298,6 +8433,15 @@
|
|
|
8298
8433
|
"description": "Word shown after the numbers when the meter is over budget.",
|
|
8299
8434
|
"fieldName": "overLabel"
|
|
8300
8435
|
},
|
|
8436
|
+
{
|
|
8437
|
+
"name": "at-label",
|
|
8438
|
+
"type": {
|
|
8439
|
+
"text": "string"
|
|
8440
|
+
},
|
|
8441
|
+
"default": "'At budget'",
|
|
8442
|
+
"description": "Word shown when the value has reached the budget exactly, but not passed it.",
|
|
8443
|
+
"fieldName": "atLabel"
|
|
8444
|
+
},
|
|
8301
8445
|
{
|
|
8302
8446
|
"name": "near-label",
|
|
8303
8447
|
"type": {
|
|
@@ -13456,7 +13600,7 @@
|
|
|
13456
13600
|
"text": "string"
|
|
13457
13601
|
},
|
|
13458
13602
|
"default": "''",
|
|
13459
|
-
"description": "What the delta is measured against, e.g. \"vs August\".",
|
|
13603
|
+
"description": "What the delta is measured against, e.g. \"vs August\". With no `delta` it is\nstill rendered on its own as a muted caption, so a figure can name its period.",
|
|
13460
13604
|
"attribute": "delta-label"
|
|
13461
13605
|
},
|
|
13462
13606
|
{
|
|
@@ -13593,7 +13737,7 @@
|
|
|
13593
13737
|
"text": "string"
|
|
13594
13738
|
},
|
|
13595
13739
|
"default": "''",
|
|
13596
|
-
"description": "What the delta is measured against, e.g. \"vs August\".",
|
|
13740
|
+
"description": "What the delta is measured against, e.g. \"vs August\". With no `delta` it is\nstill rendered on its own as a muted caption, so a figure can name its period.",
|
|
13597
13741
|
"fieldName": "deltaLabel"
|
|
13598
13742
|
},
|
|
13599
13743
|
{
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { a as s, b as e, d as h, c as r, e as B, f as o, g as l, h as i, i as n,
|
|
|
2
2
|
import { g as T, s as b, a as k, t as x } from "./chunks/i18n-BcPL9_Jh.js";
|
|
3
3
|
import { LEGACY_KEY_MAP as F, normalizeLegacySchema as v } from "./engine.js";
|
|
4
4
|
import { B as R, a as y, b as L, i as A, r as P } from "./chunks/baht-toast-CD1WrOYr.js";
|
|
5
|
-
import { B as I, a as M, b as V, c as _, d as N, e as O, f as Y, g as G, h as H, i as K, j, k as q, l as z, m as U, n as W, o as J, p as Q, q as X, r as Z, s as $, t as aa, u as ta, v as sa, w as ea, x as ha, y as ra, z as Ba, A as oa, C as la, D as ia, E as na, F as da, G as pa, H as ca, I as ma, J as Sa, K as ga, L as fa, M as Ca, N as ua, O as Ta, P as ba, Q as ka, R as xa, S as Ea, T as Fa, U as va, V as Da, W as Ra, X as ya, Y as La, Z as Aa, _ as Pa, $ as wa, a0 as Ia, a1 as Ma, a2 as Va, a3 as _a, a4 as Na } from "./chunks/baht-workflow-
|
|
5
|
+
import { B as I, a as M, b as V, c as _, d as N, e as O, f as Y, g as G, h as H, i as K, j, k as q, l as z, m as U, n as W, o as J, p as Q, q as X, r as Z, s as $, t as aa, u as ta, v as sa, w as ea, x as ha, y as ra, z as Ba, A as oa, C as la, D as ia, E as na, F as da, G as pa, H as ca, I as ma, J as Sa, K as ga, L as fa, M as Ca, N as ua, O as Ta, P as ba, Q as ka, R as xa, S as Ea, T as Fa, U as va, V as Da, W as Ra, X as ya, Y as La, Z as Aa, _ as Pa, $ as wa, a0 as Ia, a1 as Ma, a2 as Va, a3 as _a, a4 as Na } from "./chunks/baht-workflow-Dy8HZQ_f.js";
|
|
6
6
|
import { B as Ya, a as Ga, S as Ha, b as Ka, h as ja, c as qa } from "./chunks/base-CajA2aCO.js";
|
|
7
7
|
export {
|
|
8
8
|
I as BahtAccordion,
|
package/dist/react.d.ts
CHANGED
package/dist/ssr.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render as d } from "@lit-labs/ssr";
|
|
2
2
|
import { collectResult as u } from "@lit-labs/ssr/lib/render-result.js";
|
|
3
3
|
import "./chunks/baht-toast-CD1WrOYr.js";
|
|
4
|
-
import "./chunks/baht-workflow-
|
|
4
|
+
import "./chunks/baht-workflow-Dy8HZQ_f.js";
|
|
5
5
|
import "./chunks/base-CajA2aCO.js";
|
|
6
6
|
const c = /<template shadowroot="(?:open|closed)" shadowrootmode="(?:open|closed)"[^>]*>|<template\b[^>]*>|<\/template>/g, x = (e) => e.startsWith("baht-");
|
|
7
7
|
function f(e, i = x) {
|
package/dist/tokens.css
CHANGED
|
@@ -2643,7 +2643,9 @@ code.baht-code {
|
|
|
2643
2643
|
display: flex;
|
|
2644
2644
|
align-items: center;
|
|
2645
2645
|
border-radius: var(--baht-radius-sm);
|
|
2646
|
-
|
|
2646
|
+
/* one step lighter than bg-sunken in both themes, so the muted `compare` bar
|
|
2647
|
+
never disappears into the empty track at small values */
|
|
2648
|
+
background: color-mix(in oklab, var(--baht-color-bg-sunken) 55%, var(--baht-color-surface));
|
|
2647
2649
|
}
|
|
2648
2650
|
.baht-bar-chart-bars {
|
|
2649
2651
|
display: flex;
|
|
@@ -2685,6 +2687,44 @@ code.baht-code {
|
|
|
2685
2687
|
width: auto;
|
|
2686
2688
|
height: 1px;
|
|
2687
2689
|
}
|
|
2690
|
+
/* The strip of marker labels above the rows (horizontal orientation). */
|
|
2691
|
+
.baht-bar-chart-row--markers {
|
|
2692
|
+
align-items: flex-end;
|
|
2693
|
+
min-height: 1.1rem;
|
|
2694
|
+
}
|
|
2695
|
+
.baht-bar-chart-markbar {
|
|
2696
|
+
position: relative;
|
|
2697
|
+
flex: 1;
|
|
2698
|
+
height: 1.1rem;
|
|
2699
|
+
}
|
|
2700
|
+
.baht-bar-chart-marker-label {
|
|
2701
|
+
position: absolute;
|
|
2702
|
+
bottom: 0;
|
|
2703
|
+
white-space: nowrap;
|
|
2704
|
+
font-size: var(--baht-text-xs);
|
|
2705
|
+
color: var(--baht-color-text-muted);
|
|
2706
|
+
line-height: 1.1rem;
|
|
2707
|
+
}
|
|
2708
|
+
.baht-bar-chart-marker-label::before {
|
|
2709
|
+
content: '';
|
|
2710
|
+
display: inline-block;
|
|
2711
|
+
width: 8px;
|
|
2712
|
+
height: 1px;
|
|
2713
|
+
margin-right: 4px;
|
|
2714
|
+
vertical-align: middle;
|
|
2715
|
+
background: var(--baht-color-text-muted);
|
|
2716
|
+
}
|
|
2717
|
+
.baht-bar-chart-marker-label--end {
|
|
2718
|
+
right: 0;
|
|
2719
|
+
bottom: 0;
|
|
2720
|
+
transform: translateY(-2px);
|
|
2721
|
+
/* over the columns, which are painted later in the DOM, and on the surface so
|
|
2722
|
+
a bar behind it never runs through the text */
|
|
2723
|
+
z-index: 2;
|
|
2724
|
+
background: var(--baht-chart-surface);
|
|
2725
|
+
padding: 0 2px 0 4px;
|
|
2726
|
+
border-radius: var(--baht-radius-xs);
|
|
2727
|
+
}
|
|
2688
2728
|
.baht-bar-chart-count {
|
|
2689
2729
|
min-width: 2.5rem;
|
|
2690
2730
|
font-size: var(--baht-text-sm);
|
|
@@ -2700,6 +2740,17 @@ code.baht-code {
|
|
|
2700
2740
|
.baht-bar-chart-plot {
|
|
2701
2741
|
display: flex;
|
|
2702
2742
|
gap: var(--baht-space-2);
|
|
2743
|
+
max-width: 100%;
|
|
2744
|
+
/* the top tick label is shifted up half a line — pad so `overflow: hidden`
|
|
2745
|
+
(which keeps the columns inside the host) never crops it */
|
|
2746
|
+
padding-top: 8px;
|
|
2747
|
+
overflow: hidden;
|
|
2748
|
+
}
|
|
2749
|
+
.baht-bar-chart-yaxis {
|
|
2750
|
+
flex: 0 0 auto;
|
|
2751
|
+
}
|
|
2752
|
+
.baht-bar-chart-grid {
|
|
2753
|
+
min-width: 0;
|
|
2703
2754
|
}
|
|
2704
2755
|
.baht-bar-chart-yaxis {
|
|
2705
2756
|
display: flex;
|
|
@@ -2733,17 +2784,21 @@ code.baht-code {
|
|
|
2733
2784
|
inset: 0;
|
|
2734
2785
|
display: flex;
|
|
2735
2786
|
align-items: flex-end;
|
|
2736
|
-
justify-content: space-
|
|
2787
|
+
justify-content: space-between;
|
|
2737
2788
|
gap: 2px;
|
|
2738
2789
|
}
|
|
2739
2790
|
.baht-bar-chart-column {
|
|
2791
|
+
position: relative;
|
|
2740
2792
|
display: flex;
|
|
2741
2793
|
flex-direction: column;
|
|
2742
2794
|
align-items: center;
|
|
2743
2795
|
justify-content: flex-end;
|
|
2744
2796
|
height: 100%;
|
|
2745
|
-
|
|
2746
|
-
|
|
2797
|
+
/* share the plot evenly and shrink below the content width: 31 columns fit a
|
|
2798
|
+
400px card instead of spilling past it. The element writes an exact width
|
|
2799
|
+
once it has measured the host. */
|
|
2800
|
+
flex: 1 1 0;
|
|
2801
|
+
min-width: 0;
|
|
2747
2802
|
cursor: default;
|
|
2748
2803
|
}
|
|
2749
2804
|
.baht-bar-chart-column-bars {
|
|
@@ -2757,6 +2812,8 @@ code.baht-code {
|
|
|
2757
2812
|
.baht-bar-chart-col {
|
|
2758
2813
|
border-radius: 4px 4px 0 0;
|
|
2759
2814
|
max-width: 24px;
|
|
2815
|
+
min-width: 0;
|
|
2816
|
+
flex: 0 1 auto;
|
|
2760
2817
|
}
|
|
2761
2818
|
.baht-bar-chart-col--compare {
|
|
2762
2819
|
background: var(--baht-chart-muted);
|
|
@@ -2764,9 +2821,12 @@ code.baht-code {
|
|
|
2764
2821
|
.baht-bar-chart-xlabel {
|
|
2765
2822
|
position: absolute;
|
|
2766
2823
|
bottom: -20px;
|
|
2824
|
+
left: 50%;
|
|
2825
|
+
transform: translateX(-50%);
|
|
2767
2826
|
font-size: var(--baht-text-xs);
|
|
2768
2827
|
color: var(--baht-color-text-subtle);
|
|
2769
2828
|
white-space: nowrap;
|
|
2829
|
+
pointer-events: none;
|
|
2770
2830
|
}
|
|
2771
2831
|
.baht-bar-chart--vertical .baht-bar-chart-plot {
|
|
2772
2832
|
padding-bottom: 22px;
|
|
@@ -2899,6 +2959,11 @@ code.baht-code {
|
|
|
2899
2959
|
|
|
2900
2960
|
/* ---------- Sparkline ---------- */
|
|
2901
2961
|
|
|
2962
|
+
baht-sparkline {
|
|
2963
|
+
display: inline-block;
|
|
2964
|
+
vertical-align: middle;
|
|
2965
|
+
line-height: 0;
|
|
2966
|
+
}
|
|
2902
2967
|
.baht-sparkline {
|
|
2903
2968
|
display: block;
|
|
2904
2969
|
overflow: visible;
|
|
@@ -2951,9 +3016,13 @@ code.baht-code {
|
|
|
2951
3016
|
.baht-stat-delta--flat {
|
|
2952
3017
|
color: var(--baht-color-text-subtle);
|
|
2953
3018
|
}
|
|
2954
|
-
.baht-stat-delta-label
|
|
3019
|
+
.baht-stat-delta-label,
|
|
3020
|
+
.baht-stat-caption {
|
|
2955
3021
|
color: var(--baht-color-text-subtle);
|
|
2956
3022
|
}
|
|
3023
|
+
.baht-stat-caption {
|
|
3024
|
+
font-size: var(--baht-text-sm);
|
|
3025
|
+
}
|
|
2957
3026
|
.baht-stat-trend {
|
|
2958
3027
|
margin-top: var(--baht-space-1);
|
|
2959
3028
|
}
|
|
@@ -100,6 +100,11 @@
|
|
|
100
100
|
"description": "Stack the series inside one band instead of grouping them side by side.",
|
|
101
101
|
"values": []
|
|
102
102
|
},
|
|
103
|
+
{
|
|
104
|
+
"name": "compare-label",
|
|
105
|
+
"description": "Names the muted `compare` bar in the key and the table twin.",
|
|
106
|
+
"values": []
|
|
107
|
+
},
|
|
103
108
|
{
|
|
104
109
|
"name": "label-values",
|
|
105
110
|
"description": "`ends` prints the value at the bar tip; `none` leaves it to the tooltip.",
|
|
@@ -584,6 +589,11 @@
|
|
|
584
589
|
"description": "Word shown after the numbers when the meter is over budget.",
|
|
585
590
|
"values": []
|
|
586
591
|
},
|
|
592
|
+
{
|
|
593
|
+
"name": "at-label",
|
|
594
|
+
"description": "Word shown when the value has reached the budget exactly, but not passed it.",
|
|
595
|
+
"values": []
|
|
596
|
+
},
|
|
587
597
|
{
|
|
588
598
|
"name": "near-label",
|
|
589
599
|
"description": "Word shown after the numbers when the meter is near its limit.",
|
|
@@ -958,7 +968,7 @@
|
|
|
958
968
|
},
|
|
959
969
|
{
|
|
960
970
|
"name": "delta-label",
|
|
961
|
-
"description": "What the delta is measured against, e.g. \"vs August\".",
|
|
971
|
+
"description": "What the delta is measured against, e.g. \"vs August\". With no `delta` it is\nstill rendered on its own as a muted caption, so a figure can name its period.",
|
|
962
972
|
"values": []
|
|
963
973
|
},
|
|
964
974
|
{
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "bank20baht-ui",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.2",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -237,6 +237,11 @@
|
|
|
237
237
|
"description": "Stack the series inside one band instead of grouping them side by side.",
|
|
238
238
|
"value": { "type": "boolean", "default": "false" }
|
|
239
239
|
},
|
|
240
|
+
{
|
|
241
|
+
"name": "compare-label",
|
|
242
|
+
"description": "Names the muted `compare` bar in the key and the table twin.",
|
|
243
|
+
"value": { "type": "string", "default": "'Previous period'" }
|
|
244
|
+
},
|
|
240
245
|
{
|
|
241
246
|
"name": "label-values",
|
|
242
247
|
"description": "`ends` prints the value at the bar tip; `none` leaves it to the tooltip.",
|
|
@@ -317,6 +322,11 @@
|
|
|
317
322
|
"description": "Previous-period values, drawn as a muted bar under each current bar.",
|
|
318
323
|
"type": "number[]"
|
|
319
324
|
},
|
|
325
|
+
{
|
|
326
|
+
"name": "compareLabel",
|
|
327
|
+
"description": "Names the muted `compare` bar in the key and the table twin.",
|
|
328
|
+
"type": "string"
|
|
329
|
+
},
|
|
320
330
|
{
|
|
321
331
|
"name": "markers",
|
|
322
332
|
"description": "Budget / target lines drawn over the bars.",
|
|
@@ -1335,6 +1345,11 @@
|
|
|
1335
1345
|
"description": "Word shown after the numbers when the meter is over budget.",
|
|
1336
1346
|
"value": { "type": "string", "default": "'Over budget'" }
|
|
1337
1347
|
},
|
|
1348
|
+
{
|
|
1349
|
+
"name": "at-label",
|
|
1350
|
+
"description": "Word shown when the value has reached the budget exactly, but not passed it.",
|
|
1351
|
+
"value": { "type": "string", "default": "'At budget'" }
|
|
1352
|
+
},
|
|
1338
1353
|
{
|
|
1339
1354
|
"name": "near-label",
|
|
1340
1355
|
"description": "Word shown after the numbers when the meter is near its limit.",
|
|
@@ -1385,6 +1400,11 @@
|
|
|
1385
1400
|
"description": "Word shown after the numbers when the meter is over budget.",
|
|
1386
1401
|
"type": "string"
|
|
1387
1402
|
},
|
|
1403
|
+
{
|
|
1404
|
+
"name": "atLabel",
|
|
1405
|
+
"description": "Word shown when the value has reached the budget exactly, but not passed it.",
|
|
1406
|
+
"type": "string"
|
|
1407
|
+
},
|
|
1388
1408
|
{
|
|
1389
1409
|
"name": "nearLabel",
|
|
1390
1410
|
"description": "Word shown after the numbers when the meter is near its limit.",
|
|
@@ -2176,7 +2196,7 @@
|
|
|
2176
2196
|
},
|
|
2177
2197
|
{
|
|
2178
2198
|
"name": "delta-label",
|
|
2179
|
-
"description": "What the delta is measured against, e.g. \"vs August\".",
|
|
2199
|
+
"description": "What the delta is measured against, e.g. \"vs August\". With no `delta` it is\nstill rendered on its own as a muted caption, so a figure can name its period.",
|
|
2180
2200
|
"value": { "type": "string", "default": "''" }
|
|
2181
2201
|
},
|
|
2182
2202
|
{
|
|
@@ -2231,7 +2251,7 @@
|
|
|
2231
2251
|
},
|
|
2232
2252
|
{
|
|
2233
2253
|
"name": "deltaLabel",
|
|
2234
|
-
"description": "What the delta is measured against, e.g. \"vs August\".",
|
|
2254
|
+
"description": "What the delta is measured against, e.g. \"vs August\". With no `delta` it is\nstill rendered on its own as a muted caption, so a figure can name its period.",
|
|
2235
2255
|
"type": "string"
|
|
2236
2256
|
},
|
|
2237
2257
|
{
|