@mintplayer/web-components 2.9.0 → 2.11.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/accordion/index.mjs +4 -4
- package/charts/core/index.d.ts +1 -0
- package/charts/core/index.mjs +19 -0
- package/charts/core/src/arc.d.ts +28 -0
- package/charts/core/src/color.d.ts +11 -0
- package/charts/core/src/hierarchy-layout.d.ts +68 -0
- package/charts/core/src/index.d.ts +5 -0
- package/charts/core/src/scale.d.ts +21 -0
- package/charts/core/src/types.d.ts +52 -0
- package/charts/hierarchy/index.d.ts +1 -0
- package/charts/hierarchy/index.mjs +816 -0
- package/charts/hierarchy/src/components/index.d.ts +1 -0
- package/charts/hierarchy/src/components/mp-hierarchy-chart.d.ts +188 -0
- package/charts/hierarchy/src/index.d.ts +2 -0
- package/charts/hierarchy/src/styles/hierarchy-chart.styles.d.ts +2 -0
- package/charts/hierarchy/src/styles/index.d.ts +1 -0
- package/charts/sparkline/index.d.ts +1 -0
- package/charts/sparkline/index.mjs +162 -0
- package/charts/sparkline/src/components/index.d.ts +1 -0
- package/charts/sparkline/src/components/mp-sparkline.d.ts +51 -0
- package/charts/sparkline/src/index.d.ts +1 -0
- package/charts/sparkline/src/styles/index.d.ts +1 -0
- package/charts/sparkline/src/styles/sparkline.styles.d.ts +2 -0
- package/charts/trend/index.d.ts +1 -0
- package/charts/trend/index.mjs +432 -0
- package/charts/trend/src/components/index.d.ts +1 -0
- package/charts/trend/src/components/mp-trend-chart.d.ts +104 -0
- package/charts/trend/src/index.d.ts +2 -0
- package/charts/trend/src/styles/index.d.ts +1 -0
- package/charts/trend/src/styles/trend-chart.styles.d.ts +2 -0
- package/checkbox/index.mjs +1 -1
- package/chunks/color-5yPBn70k.mjs +179 -0
- package/chunks/{form-check.styles-jBlHetYX.mjs → form-check.styles-B0pxJ6YC.mjs} +2 -2
- package/chunks/{form-control.styles-BOTBdmvg.mjs → form-control.styles-C3j87Sn3.mjs} +1 -1
- package/chunks/{mp-checkbox-6EJwdUIn.mjs → mp-checkbox-CzwS7Y_t.mjs} +2 -2
- package/chunks/{mp-datatable-25O1GtvU.mjs → mp-datatable-GmKqaN8y.mjs} +1 -1
- package/chunks/{mp-input-group-Bf9a9Xut.mjs → mp-input-group-CQ55efCq.mjs} +31 -18
- package/chunks/{mp-radio-DvKgrTFL.mjs → mp-radio-cL46sUA0.mjs} +2 -2
- package/chunks/{mp-select-lHP00OBH.mjs → mp-select-BNrbPwN4.mjs} +1 -1
- package/chunks/{mp-toggle-button-C4Loq_p4.mjs → mp-toggle-button-eo_aTQtu.mjs} +32 -32
- package/chunks/scale-B0bRUdc7.mjs +91 -0
- package/datatable/index.mjs +1 -1
- package/file-manager/index.mjs +1 -1
- package/input-group/index.mjs +1 -1
- package/package.json +17 -1
- package/phone-input/index.mjs +7 -6
- package/query-builder/index.mjs +101 -101
- package/radio/index.mjs +1 -1
- package/radio-group/index.mjs +1 -1
- package/scheduler/index.mjs +3 -3
- package/select/index.mjs +1 -1
- package/toggle-button/index.mjs +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './mp-hierarchy-chart';
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import { HierarchyNode } from '@mintplayer/web-components/charts/core';
|
|
3
|
+
export type HierarchyChartLayout = 'sunburst' | 'icicle' | 'treemap';
|
|
4
|
+
/** String-returning formatters; return `undefined` to fall back to the built-in text. */
|
|
5
|
+
export type HierarchyNodeFormatter = (node: HierarchyNode) => string | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Async loader for a lazy node's children (a node with `hasChildren: true`
|
|
8
|
+
* and no `children`). Invoked once per node when its child ring would enter
|
|
9
|
+
* the rendered window; resolve with the children, or reject to surface a
|
|
10
|
+
* `hierarchy-node-load-error` (activating the node again retries).
|
|
11
|
+
* Matches codecov's report/tree API shape (depth + path).
|
|
12
|
+
*/
|
|
13
|
+
export type HierarchyChildrenLoader = (node: HierarchyNode) => Promise<HierarchyNode[]>;
|
|
14
|
+
/**
|
|
15
|
+
* `<mp-hierarchy-chart>` — one weighted tree, three projections.
|
|
16
|
+
*
|
|
17
|
+
* `layout="sunburst" | "icicle" | "treemap"` switches the projection at
|
|
18
|
+
* runtime; data model, color scale, focus/zoom state and the ARIA-tree
|
|
19
|
+
* contract are shared. Arc size follows the summed LEAF `value` (never the
|
|
20
|
+
* color metric — sizing by a percentage inverts salience, PRD charts-wc §1.1),
|
|
21
|
+
* color follows `colorValue` through a clamped two-stop scale.
|
|
22
|
+
*
|
|
23
|
+
* No-JS tier: none (a proportional chart is meaningless without computed
|
|
24
|
+
* geometry); the demo registers in axe.spec.ts only.
|
|
25
|
+
*
|
|
26
|
+
* Light-DOM properties:
|
|
27
|
+
* - `data: HierarchyNode` (property only)
|
|
28
|
+
* - `root-id` / `rootId` — controlled focus node (two-way via `hierarchy-zoom`)
|
|
29
|
+
* - `max-depth`, `min-angle` (deg), `min-size` (logical px), `show-labels`,
|
|
30
|
+
* `label-min-area`, `color-min`, `color-max`, `color-start`, `color-end`
|
|
31
|
+
* - `input-label` / `aria-label` — accessible name for the in-shadow tree
|
|
32
|
+
*
|
|
33
|
+
* Events: `hierarchy-zoom`, `hierarchy-node-select`, `hierarchy-node-hover`,
|
|
34
|
+
* `hierarchy-node-load-error` (all bubbling + composed).
|
|
35
|
+
*/
|
|
36
|
+
export declare class MpHierarchyChart extends LitElement {
|
|
37
|
+
static styles: import('lit').CSSResult[];
|
|
38
|
+
static get observedAttributes(): string[];
|
|
39
|
+
private _data;
|
|
40
|
+
private _index;
|
|
41
|
+
private _layout;
|
|
42
|
+
private _rootId;
|
|
43
|
+
private _maxDepth;
|
|
44
|
+
private _minAngle;
|
|
45
|
+
private _minSize;
|
|
46
|
+
private _showLabels;
|
|
47
|
+
private _labelMinArea;
|
|
48
|
+
private _colorMin;
|
|
49
|
+
private _colorMax;
|
|
50
|
+
private _colorStart;
|
|
51
|
+
private _colorEnd;
|
|
52
|
+
private _inputLabel;
|
|
53
|
+
private _transitionDuration;
|
|
54
|
+
private _locale;
|
|
55
|
+
private _tooltipFormatter;
|
|
56
|
+
private _labelFormatter;
|
|
57
|
+
private _loadChildren;
|
|
58
|
+
private _loadingIds;
|
|
59
|
+
private _failedIds;
|
|
60
|
+
/**
|
|
61
|
+
* Nodes whose loader has already resolved. A folder can legitimately come
|
|
62
|
+
* back EMPTY, which leaves `hasChildren` true and `children` empty — the
|
|
63
|
+
* same shape as 'not loaded yet'. Without this, such a node is re-requested
|
|
64
|
+
* on every render forever.
|
|
65
|
+
*/
|
|
66
|
+
private _loadedIds;
|
|
67
|
+
private _loadingLabel;
|
|
68
|
+
private _fill;
|
|
69
|
+
/** Sunburst tween: spans of the previous render, and progress 0..1 (1 = settled). */
|
|
70
|
+
private _prevSpans;
|
|
71
|
+
private _tween;
|
|
72
|
+
private _tweenFrame;
|
|
73
|
+
private _hoveredId;
|
|
74
|
+
private _focusedId;
|
|
75
|
+
private _restoreFocus;
|
|
76
|
+
private _rendered;
|
|
77
|
+
private _typeahead;
|
|
78
|
+
private _typeaheadTimer;
|
|
79
|
+
private _zoomOutLabel;
|
|
80
|
+
private _metricUnitLabel;
|
|
81
|
+
private _valueUnitLabel;
|
|
82
|
+
private readonly liveAnnouncer;
|
|
83
|
+
/** The whole tree, rolled up once per write. */
|
|
84
|
+
get data(): HierarchyNode | undefined;
|
|
85
|
+
set data(value: HierarchyNode | undefined);
|
|
86
|
+
get layout(): HierarchyChartLayout;
|
|
87
|
+
set layout(value: HierarchyChartLayout);
|
|
88
|
+
get rootId(): string | undefined;
|
|
89
|
+
set rootId(value: string | undefined);
|
|
90
|
+
/**
|
|
91
|
+
* Levels rendered outward from the focus node, or `'auto'` for every loaded
|
|
92
|
+
* level. Default 2 (codecov's window), which keeps the DOM small on a big
|
|
93
|
+
* tree; any positive number is valid, and `'auto'` follows the data — with
|
|
94
|
+
* lazy loading that means each arriving level reveals the next.
|
|
95
|
+
*/
|
|
96
|
+
get maxDepth(): number | 'auto';
|
|
97
|
+
set maxDepth(value: number | 'auto');
|
|
98
|
+
/**
|
|
99
|
+
* `maxDepth` resolved against the current data. Never 0: a chart showing no
|
|
100
|
+
* ring at all is not a rendering anyone asked for, so a leaf focus still
|
|
101
|
+
* draws its (empty) first ring.
|
|
102
|
+
*/
|
|
103
|
+
private get renderedDepth();
|
|
104
|
+
get minAngle(): number;
|
|
105
|
+
set minAngle(value: number);
|
|
106
|
+
get minSize(): number;
|
|
107
|
+
set minSize(value: number);
|
|
108
|
+
get showLabels(): boolean;
|
|
109
|
+
set showLabels(value: boolean);
|
|
110
|
+
get labelMinArea(): number;
|
|
111
|
+
set labelMinArea(value: number);
|
|
112
|
+
get colorMin(): number;
|
|
113
|
+
set colorMin(value: number);
|
|
114
|
+
get colorMax(): number;
|
|
115
|
+
set colorMax(value: number);
|
|
116
|
+
get colorStart(): string;
|
|
117
|
+
set colorStart(value: string);
|
|
118
|
+
get colorEnd(): string;
|
|
119
|
+
set colorEnd(value: string);
|
|
120
|
+
get inputLabel(): string | null;
|
|
121
|
+
set inputLabel(value: string | null);
|
|
122
|
+
get transitionDuration(): number;
|
|
123
|
+
set transitionDuration(value: number);
|
|
124
|
+
get locale(): string | undefined;
|
|
125
|
+
set locale(value: string | undefined);
|
|
126
|
+
get tooltipFormatter(): HierarchyNodeFormatter | undefined;
|
|
127
|
+
set tooltipFormatter(value: HierarchyNodeFormatter | undefined);
|
|
128
|
+
get labelFormatter(): HierarchyNodeFormatter | undefined;
|
|
129
|
+
set labelFormatter(value: HierarchyNodeFormatter | undefined);
|
|
130
|
+
get loadChildren(): HierarchyChildrenLoader | undefined;
|
|
131
|
+
set loadChildren(value: HierarchyChildrenLoader | undefined);
|
|
132
|
+
get loadingLabel(): string;
|
|
133
|
+
set loadingLabel(value: string);
|
|
134
|
+
private rebuildScale;
|
|
135
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
136
|
+
get zoomOutLabel(): string;
|
|
137
|
+
set zoomOutLabel(value: string);
|
|
138
|
+
get metricUnitLabel(): string;
|
|
139
|
+
set metricUnitLabel(value: string);
|
|
140
|
+
get valueUnitLabel(): string;
|
|
141
|
+
set valueUnitLabel(value: string);
|
|
142
|
+
/** The node the chart is rooted on right now (tree root when root-id is unset). */
|
|
143
|
+
private get focusedRoot();
|
|
144
|
+
/** Re-root on a node id (undefined = tree root) and emit `hierarchy-zoom`. */
|
|
145
|
+
zoomTo(id: string | undefined): void;
|
|
146
|
+
/** Move the roving tabindex (and DOM focus) to a rendered node. */
|
|
147
|
+
focusNode(id: string): void;
|
|
148
|
+
private zoomOut;
|
|
149
|
+
private beginTween;
|
|
150
|
+
private tweenedSpan;
|
|
151
|
+
private nodeFromEvent;
|
|
152
|
+
private onClick;
|
|
153
|
+
private onPointerMove;
|
|
154
|
+
private clearHover;
|
|
155
|
+
private tooltipText;
|
|
156
|
+
private labelText;
|
|
157
|
+
/** Localized per-node accessible name: "components, 82%, 1,234 lines". */
|
|
158
|
+
private accessibleName;
|
|
159
|
+
private emit;
|
|
160
|
+
private onKeyDown;
|
|
161
|
+
private handleTypeahead;
|
|
162
|
+
/**
|
|
163
|
+
* Roving tabindex target for this render: the focused node while it is
|
|
164
|
+
* still rendered, else the first rendered node (announcement rides the
|
|
165
|
+
* zoom announce that caused the window to change).
|
|
166
|
+
*/
|
|
167
|
+
private resolveTabFocus;
|
|
168
|
+
protected updated(changed: PropertyValues): void;
|
|
169
|
+
private isLazy;
|
|
170
|
+
/** Kick a load for every lazy node whose CHILD ring is inside the rendered window. */
|
|
171
|
+
private loadLazyCandidates;
|
|
172
|
+
private fillOf;
|
|
173
|
+
private treeLabel;
|
|
174
|
+
render(): TemplateResult;
|
|
175
|
+
private _tabFocusId;
|
|
176
|
+
private captureRendered;
|
|
177
|
+
private renderSunburst;
|
|
178
|
+
private renderArc;
|
|
179
|
+
private arcLabelFits;
|
|
180
|
+
private renderIcicle;
|
|
181
|
+
private renderTreemap;
|
|
182
|
+
private renderCell;
|
|
183
|
+
}
|
|
184
|
+
declare global {
|
|
185
|
+
interface HTMLElementTagNameMap {
|
|
186
|
+
'mp-hierarchy-chart': MpHierarchyChart;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { hierarchyChartStyles } from './hierarchy-chart.styles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { unsafeCSS as k, LitElement as v, html as u, nothing as c, svg as d } from "lit";
|
|
2
|
+
import { l as b } from "../../chunks/scale-B0bRUdc7.mjs";
|
|
3
|
+
const x = k(`:host {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
width: 8rem;
|
|
6
|
+
height: 2rem;
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
--mp-sparkline-stroke: var(--bs-primary, #0d6efd);
|
|
9
|
+
--mp-sparkline-fill: var(--bs-primary-bg-subtle, rgba(13, 110, 253, 0.15));
|
|
10
|
+
--mp-sparkline-dot-color: var(--bs-primary, #0d6efd);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
svg {
|
|
14
|
+
display: block;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.line {
|
|
20
|
+
fill: none;
|
|
21
|
+
stroke: var(--mp-sparkline-stroke);
|
|
22
|
+
stroke-width: 2;
|
|
23
|
+
stroke-linejoin: round;
|
|
24
|
+
stroke-linecap: round;
|
|
25
|
+
vector-effect: non-scaling-stroke;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.fill {
|
|
29
|
+
fill: var(--mp-sparkline-fill);
|
|
30
|
+
stroke: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dot {
|
|
34
|
+
fill: var(--mp-sparkline-dot-color);
|
|
35
|
+
}`), g = 100, o = 28, n = 3;
|
|
36
|
+
class M extends v {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(...arguments), this._points = [], this._area = !1, this._showLastDot = !0, this._inputLabel = null;
|
|
39
|
+
}
|
|
40
|
+
static {
|
|
41
|
+
this.styles = [x];
|
|
42
|
+
}
|
|
43
|
+
static get observedAttributes() {
|
|
44
|
+
return [
|
|
45
|
+
...super.observedAttributes ?? [],
|
|
46
|
+
"area",
|
|
47
|
+
"show-last-dot",
|
|
48
|
+
"y-min",
|
|
49
|
+
"y-max",
|
|
50
|
+
"locale",
|
|
51
|
+
// Copied onto the in-shadow role=img node — the host is generic.
|
|
52
|
+
"aria-label",
|
|
53
|
+
"input-label"
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
get points() {
|
|
57
|
+
return this._points;
|
|
58
|
+
}
|
|
59
|
+
set points(t) {
|
|
60
|
+
this._points = Array.isArray(t) ? t : [], this.requestUpdate();
|
|
61
|
+
}
|
|
62
|
+
get area() {
|
|
63
|
+
return this._area;
|
|
64
|
+
}
|
|
65
|
+
set area(t) {
|
|
66
|
+
this._area = !!t, this.requestUpdate();
|
|
67
|
+
}
|
|
68
|
+
get showLastDot() {
|
|
69
|
+
return this._showLastDot;
|
|
70
|
+
}
|
|
71
|
+
set showLastDot(t) {
|
|
72
|
+
this._showLastDot = !!t, this.requestUpdate();
|
|
73
|
+
}
|
|
74
|
+
get yMin() {
|
|
75
|
+
return this._yMin;
|
|
76
|
+
}
|
|
77
|
+
set yMin(t) {
|
|
78
|
+
this._yMin = t == null ? void 0 : Number(t), this.requestUpdate();
|
|
79
|
+
}
|
|
80
|
+
get yMax() {
|
|
81
|
+
return this._yMax;
|
|
82
|
+
}
|
|
83
|
+
set yMax(t) {
|
|
84
|
+
this._yMax = t == null ? void 0 : Number(t), this.requestUpdate();
|
|
85
|
+
}
|
|
86
|
+
get locale() {
|
|
87
|
+
return this._locale;
|
|
88
|
+
}
|
|
89
|
+
set locale(t) {
|
|
90
|
+
this._locale = t || void 0, this.requestUpdate();
|
|
91
|
+
}
|
|
92
|
+
get inputLabel() {
|
|
93
|
+
return this._inputLabel;
|
|
94
|
+
}
|
|
95
|
+
set inputLabel(t) {
|
|
96
|
+
this._inputLabel = t ?? null, this.requestUpdate();
|
|
97
|
+
}
|
|
98
|
+
get summaryFormatter() {
|
|
99
|
+
return this._summaryFormatter;
|
|
100
|
+
}
|
|
101
|
+
set summaryFormatter(t) {
|
|
102
|
+
this._summaryFormatter = t, this.requestUpdate();
|
|
103
|
+
}
|
|
104
|
+
attributeChangedCallback(t, i, e) {
|
|
105
|
+
switch (super.attributeChangedCallback(t, i, e), t) {
|
|
106
|
+
case "area":
|
|
107
|
+
this.area = e !== null && e !== "false";
|
|
108
|
+
break;
|
|
109
|
+
case "show-last-dot":
|
|
110
|
+
this.showLastDot = e !== "false" && e !== null;
|
|
111
|
+
break;
|
|
112
|
+
case "y-min":
|
|
113
|
+
this.yMin = e === null ? void 0 : Number(e);
|
|
114
|
+
break;
|
|
115
|
+
case "y-max":
|
|
116
|
+
this.yMax = e === null ? void 0 : Number(e);
|
|
117
|
+
break;
|
|
118
|
+
case "locale":
|
|
119
|
+
this.locale = e ?? void 0;
|
|
120
|
+
break;
|
|
121
|
+
case "aria-label":
|
|
122
|
+
this.requestUpdate();
|
|
123
|
+
break;
|
|
124
|
+
case "input-label":
|
|
125
|
+
this.inputLabel = e;
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
accessibleName() {
|
|
130
|
+
const t = this.getAttribute("aria-label") ?? this._inputLabel;
|
|
131
|
+
if (t) return t;
|
|
132
|
+
const i = this._summaryFormatter?.(this._points);
|
|
133
|
+
if (i !== void 0) return i;
|
|
134
|
+
const e = this._points.filter((h) => h !== null);
|
|
135
|
+
if (!e.length) return "";
|
|
136
|
+
const a = new Intl.NumberFormat(this._locale || this.closest("[lang]")?.getAttribute("lang") || void 0);
|
|
137
|
+
return [
|
|
138
|
+
a.format(e[0]),
|
|
139
|
+
a.format(e[e.length - 1]),
|
|
140
|
+
a.format(Math.min(...e)),
|
|
141
|
+
a.format(Math.max(...e))
|
|
142
|
+
].join(", ");
|
|
143
|
+
}
|
|
144
|
+
render() {
|
|
145
|
+
const t = this._points.filter((s) => s !== null);
|
|
146
|
+
if (!t.length) return u``;
|
|
147
|
+
const i = this._yMin ?? Math.min(...t), e = this._yMax ?? Math.max(...t), a = b([0, Math.max(1, this._points.length - 1)], [n, g - n]), h = b(i === e ? [i - 1, e + 1] : [i, e], [o - n, n]), l = this._points.reduce((s, r, m) => {
|
|
148
|
+
if (r === null) return [...s, []];
|
|
149
|
+
const _ = s[s.length - 1] ?? [];
|
|
150
|
+
return [...s.slice(0, -1), [..._, { px: a(m), py: h(r) }]];
|
|
151
|
+
}, [[]]).filter((s) => s.length > 0), y = l.map((s) => s.map((r, m) => `${m === 0 ? "M" : "L"} ${r.px} ${r.py}`).join(" ")).join(" "), f = l.filter((s) => s.length > 1).map((s) => `M ${s[0].px} ${o - n} ` + s.map((r) => `L ${r.px} ${r.py}`).join(" ") + ` L ${s[s.length - 1].px} ${o - n} Z`).join(" "), p = l[l.length - 1]?.[l[l.length - 1].length - 1];
|
|
152
|
+
return u`<svg viewBox="0 0 ${g} ${o}" role="img" aria-label=${this.accessibleName() || c} preserveAspectRatio="none">
|
|
153
|
+
${this._area ? d`<path class="fill" d=${f}></path>` : c}
|
|
154
|
+
<path class="line" d=${y}></path>
|
|
155
|
+
${this._showLastDot && p ? d`<circle class="dot" cx=${p.px} cy=${p.py} r="3"></circle>` : c}
|
|
156
|
+
</svg>`;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
typeof customElements < "u" && !customElements.get("mp-sparkline") && customElements.define("mp-sparkline", M);
|
|
160
|
+
export {
|
|
161
|
+
M as MpSparkline
|
|
162
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './mp-sparkline';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* `<mp-sparkline>` — axis-less inline trend for table cells (the codecov
|
|
4
|
+
* flags/components-table shape). Deliberately NOT keyboard-interactive: it is
|
|
5
|
+
* a non-interactive graphic (`role="img"`) whose accessible name summarizes
|
|
6
|
+
* the series ("first, last, lowest, highest", locale-formatted). The real
|
|
7
|
+
* numbers belong in the table cell next to it — which is where sparklines live
|
|
8
|
+
* anyway.
|
|
9
|
+
*
|
|
10
|
+
* Naming follows the library contract: host `aria-label` > `input-label` >
|
|
11
|
+
* `summaryFormatter` > the generated summary (a data-derived default).
|
|
12
|
+
*
|
|
13
|
+
* `points: (number | null)[]` is property-only; `null` renders a gap.
|
|
14
|
+
* No-JS tier: none; registers in axe.spec.ts only.
|
|
15
|
+
*/
|
|
16
|
+
export declare class MpSparkline extends LitElement {
|
|
17
|
+
static styles: import('lit').CSSResult[];
|
|
18
|
+
static get observedAttributes(): string[];
|
|
19
|
+
private _points;
|
|
20
|
+
private _area;
|
|
21
|
+
private _showLastDot;
|
|
22
|
+
private _yMin;
|
|
23
|
+
private _yMax;
|
|
24
|
+
private _locale;
|
|
25
|
+
private _inputLabel;
|
|
26
|
+
private _summaryFormatter;
|
|
27
|
+
get points(): (number | null)[];
|
|
28
|
+
set points(value: (number | null)[]);
|
|
29
|
+
get area(): boolean;
|
|
30
|
+
set area(value: boolean);
|
|
31
|
+
get showLastDot(): boolean;
|
|
32
|
+
set showLastDot(value: boolean);
|
|
33
|
+
get yMin(): number | undefined;
|
|
34
|
+
set yMin(value: number | undefined);
|
|
35
|
+
get yMax(): number | undefined;
|
|
36
|
+
set yMax(value: number | undefined);
|
|
37
|
+
get locale(): string | undefined;
|
|
38
|
+
set locale(value: string | undefined);
|
|
39
|
+
get inputLabel(): string | null;
|
|
40
|
+
set inputLabel(value: string | null);
|
|
41
|
+
get summaryFormatter(): ((points: (number | null)[]) => string | undefined) | undefined;
|
|
42
|
+
set summaryFormatter(value: ((points: (number | null)[]) => string | undefined) | undefined);
|
|
43
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
44
|
+
private accessibleName;
|
|
45
|
+
render(): TemplateResult;
|
|
46
|
+
}
|
|
47
|
+
declare global {
|
|
48
|
+
interface HTMLElementTagNameMap {
|
|
49
|
+
'mp-sparkline': MpSparkline;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { sparklineStyles } from './sparkline.styles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|