@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
package/accordion/index.mjs
CHANGED
|
@@ -15,7 +15,7 @@ const h = b(`.accordion {
|
|
|
15
15
|
--bs-accordion-btn-icon-width: 1.25rem;
|
|
16
16
|
--bs-accordion-btn-icon-transform: rotate(-180deg);
|
|
17
17
|
--bs-accordion-btn-icon-transition: transform 0.2s ease-in-out;
|
|
18
|
-
--bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='rgb%
|
|
18
|
+
--bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='rgb%282.0392156863%, 17.2549019608%, 39.6862745098%%29' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
|
|
19
19
|
--bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
|
|
20
20
|
--bs-accordion-body-padding-x: 1.25rem;
|
|
21
21
|
--bs-accordion-body-padding-y: 1rem;
|
|
@@ -132,8 +132,8 @@ const h = b(`.accordion {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
[data-bs-theme=dark] .accordion-button::after {
|
|
135
|
-
--bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='rgb%
|
|
136
|
-
--bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='rgb%
|
|
135
|
+
--bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='rgb%2843.0588235294%, 65.8823529412%, 99.5294117647%%29'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");
|
|
136
|
+
--bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='rgb%2843.0588235294%, 65.8823529412%, 99.5294117647%%29'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
:host {
|
|
@@ -153,7 +153,7 @@ const h = b(`.accordion {
|
|
|
153
153
|
--bs-accordion-btn-icon-width: 1.25rem;
|
|
154
154
|
--bs-accordion-btn-icon-transform: rotate(-180deg);
|
|
155
155
|
--bs-accordion-btn-icon-transition: transform 0.2s ease-in-out;
|
|
156
|
-
--bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='rgb%
|
|
156
|
+
--bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='rgb%282.0392156863%, 17.2549019608%, 39.6862745098%%29' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
|
|
157
157
|
--bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
|
|
158
158
|
--bs-accordion-body-padding-x: 0;
|
|
159
159
|
--bs-accordion-body-padding-y: 0;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { a as e, b as r, c as o, d as i, e as l, l as c, p as t, f as n, r as b, s as f, g as p } from "../../chunks/color-5yPBn70k.mjs";
|
|
2
|
+
import { l as m, n as L, a as T, t as d } from "../../chunks/scale-B0bRUdc7.mjs";
|
|
3
|
+
export {
|
|
4
|
+
e as arcLabelTransform,
|
|
5
|
+
r as arcLabelVisible,
|
|
6
|
+
o as arcPath,
|
|
7
|
+
i as buildIndex,
|
|
8
|
+
l as colorScale,
|
|
9
|
+
c as levelOf,
|
|
10
|
+
m as linearScale,
|
|
11
|
+
L as niceDomain,
|
|
12
|
+
T as niceTicks,
|
|
13
|
+
t as partitionLayout,
|
|
14
|
+
n as pathTo,
|
|
15
|
+
b as resolveFocus,
|
|
16
|
+
f as squarifyLayout,
|
|
17
|
+
p as subtreeDepth,
|
|
18
|
+
d as timeTicks
|
|
19
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Annular-sector path math for the sunburst layout. Pure string-in/string-out
|
|
3
|
+
* so it is trivially unit-testable (jsdom has no SVG geometry APIs at all).
|
|
4
|
+
*
|
|
5
|
+
* Convention: angles in radians, 0 = 12 o'clock, increasing clockwise
|
|
6
|
+
* (x = cx + r*sin a, y = cy - r*cos a).
|
|
7
|
+
*/
|
|
8
|
+
export interface ArcOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Angular padding between adjacent arcs, clamped per arc to half its sweep
|
|
11
|
+
* so a tiny arc can never invert (codecov's guard). Converted to a
|
|
12
|
+
* per-radius offset so the visual gap is constant at both edges.
|
|
13
|
+
*/
|
|
14
|
+
padAngle?: number;
|
|
15
|
+
/** Radius the pad is anchored at; defaults to sqrt(r0² + r1²) (d3's default). */
|
|
16
|
+
padRadius?: number;
|
|
17
|
+
/** Radial gap between rings, subtracted from the outer radius. Default 1. */
|
|
18
|
+
ringGap?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function arcPath(cx: number, cy: number, r0: number, r1: number, a0: number, a1: number, options?: ArcOptions): string;
|
|
21
|
+
/**
|
|
22
|
+
* Sunburst label placement: translate to the arc's radial midpoint and rotate
|
|
23
|
+
* to read along the radius, flipping on the lower half so text is never
|
|
24
|
+
* upside-down (Observable's transform).
|
|
25
|
+
*/
|
|
26
|
+
export declare function arcLabelTransform(x0: number, x1: number, rMid: number): string;
|
|
27
|
+
/** Observable's area threshold: label only arcs whose (rings × sweep-fraction) area clears it. */
|
|
28
|
+
export declare function arcLabelVisible(x0: number, x1: number, rings: number, minArea?: number): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Two-stop clamped HSL color scale (codecov's coverage ramp: a long-way hue
|
|
3
|
+
* sweep red -> green with yellow in the middle, clamped outside the domain).
|
|
4
|
+
* Accepts #rgb/#rrggbb and rgb(r, g, b) stops.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Returns v -> "hsl(...)" mapping [min, max] onto [from, to], clamped outside.
|
|
8
|
+
* Hue interpolates linearly WITHOUT shortest-path wrapping (d3's
|
|
9
|
+
* interpolateHslLong behaviour, which is what produces red->yellow->green).
|
|
10
|
+
*/
|
|
11
|
+
export declare function colorScale(min: number, max: number, from: string, to: string): (value: number) => string;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { HierarchyNode } from './types';
|
|
2
|
+
export interface HierarchyIndex {
|
|
3
|
+
root: HierarchyNode;
|
|
4
|
+
byId: Map<string, HierarchyNode>;
|
|
5
|
+
parents: Map<string, HierarchyNode | null>;
|
|
6
|
+
/** Rolled-up weight per node id. */
|
|
7
|
+
values: Map<string, number>;
|
|
8
|
+
/**
|
|
9
|
+
* Effective color metric per node id: the node's own `colorValue`, or for a
|
|
10
|
+
* branch without one, the value-weighted average of its children's — so a
|
|
11
|
+
* coverage tree colors its folders like codecov does without the consumer
|
|
12
|
+
* precomputing folder metrics.
|
|
13
|
+
*/
|
|
14
|
+
colorValues: Map<string, number | undefined>;
|
|
15
|
+
}
|
|
16
|
+
export declare function buildIndex(root: HierarchyNode): HierarchyIndex;
|
|
17
|
+
/** Ancestors from the data root down to (and including) the node. */
|
|
18
|
+
export declare function pathTo(index: HierarchyIndex, node: HierarchyNode): HierarchyNode[];
|
|
19
|
+
/** Absolute depth in the data tree; the root is level 1 (aria-level semantics). */
|
|
20
|
+
export declare function levelOf(index: HierarchyIndex, node: HierarchyNode): number;
|
|
21
|
+
interface LayoutNodeBase {
|
|
22
|
+
node: HierarchyNode;
|
|
23
|
+
/** Depth relative to the focus node; the first rendered ring/column is 1. */
|
|
24
|
+
depth: number;
|
|
25
|
+
/** Absolute aria-level (data root = 1). */
|
|
26
|
+
level: number;
|
|
27
|
+
setsize: number;
|
|
28
|
+
posinset: number;
|
|
29
|
+
hasChildren: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface PartitionNode extends LayoutNodeBase {
|
|
32
|
+
/** Normalized span of the full sweep, in [0, 1]. */
|
|
33
|
+
x0: number;
|
|
34
|
+
x1: number;
|
|
35
|
+
}
|
|
36
|
+
export interface PartitionOptions {
|
|
37
|
+
/** Rings/columns rendered outward from the focus. */
|
|
38
|
+
maxDepth?: number;
|
|
39
|
+
/** Spans narrower than this fraction are culled (with their subtree). */
|
|
40
|
+
minFraction?: number;
|
|
41
|
+
}
|
|
42
|
+
export declare function resolveFocus(index: HierarchyIndex, focusId: string | undefined): HierarchyNode;
|
|
43
|
+
/**
|
|
44
|
+
* Levels of loaded descendants below the focus node — 0 for a leaf, 1 when its
|
|
45
|
+
* children are leaves, and so on. This is what an unbounded (`auto`) depth
|
|
46
|
+
* resolves to: with lazy loading it grows as children arrive, so the rendered
|
|
47
|
+
* window follows the data rather than guessing ahead of it.
|
|
48
|
+
*/
|
|
49
|
+
export declare function subtreeDepth(index: HierarchyIndex, focusId: string | undefined): number;
|
|
50
|
+
export declare function partitionLayout(index: HierarchyIndex, focusId: string | undefined, options?: PartitionOptions): PartitionNode[];
|
|
51
|
+
export interface RectNode extends LayoutNodeBase {
|
|
52
|
+
/** Normalized rect in the unit square, x rightward, y downward. */
|
|
53
|
+
x0: number;
|
|
54
|
+
y0: number;
|
|
55
|
+
x1: number;
|
|
56
|
+
y1: number;
|
|
57
|
+
}
|
|
58
|
+
export interface SquarifyOptions {
|
|
59
|
+
maxDepth?: number;
|
|
60
|
+
/** Rects with normalized area below this are culled (with their subtree). */
|
|
61
|
+
minArea?: number;
|
|
62
|
+
/** Normalized inset applied on all sides of a parent rect before laying out its children. */
|
|
63
|
+
childPadding?: number;
|
|
64
|
+
/** Extra normalized inset at the TOP of a parent rect, reserving a label strip. */
|
|
65
|
+
childHeaderSpace?: number;
|
|
66
|
+
}
|
|
67
|
+
export declare function squarifyLayout(index: HierarchyIndex, focusId: string | undefined, options?: SquarifyOptions): RectNode[];
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear + time scales for the trend chart. Pure functions; the time ticks
|
|
3
|
+
* are the genuinely fiddly part, so they live here behind table-driven specs
|
|
4
|
+
* rather than inside the element.
|
|
5
|
+
*/
|
|
6
|
+
export declare function linearScale(domain: readonly [number, number], range: readonly [number, number]): (value: number) => number;
|
|
7
|
+
/** Ticks at 1-2-5 steps covering [min, max]; endpoints snapped outward to the step. */
|
|
8
|
+
export declare function niceTicks(min: number, max: number, count?: number): number[];
|
|
9
|
+
/** Domain snapped outward to the tick step, for un-pinned axes. */
|
|
10
|
+
export declare function niceDomain(min: number, max: number, count?: number): [number, number];
|
|
11
|
+
export interface TimeTick {
|
|
12
|
+
/** Epoch milliseconds. */
|
|
13
|
+
time: number;
|
|
14
|
+
label: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Locale-aware calendar-boundary ticks over [from, to] (epoch ms, local time).
|
|
18
|
+
* Picks the smallest hour/day/week/month/year step that yields at most
|
|
19
|
+
* ~targetCount ticks; labels via Intl.DateTimeFormat.
|
|
20
|
+
*/
|
|
21
|
+
export declare function timeTicks(from: number, to: number, targetCount?: number, locale?: string): TimeTick[];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared data models for the charts/ family. Framework-agnostic, DOM-free.
|
|
3
|
+
*/
|
|
4
|
+
export interface HierarchyNode {
|
|
5
|
+
/** Stable identity — keyed rendering, focus restore and lazy loading all rely on it. */
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
/**
|
|
9
|
+
* Weight of a leaf (e.g. line count). On a node with loaded children the
|
|
10
|
+
* rollup uses the children's sum instead and this value is ignored.
|
|
11
|
+
*/
|
|
12
|
+
value?: number;
|
|
13
|
+
/** Metric mapped through the chart's color scale (e.g. coverage %). */
|
|
14
|
+
colorValue?: number;
|
|
15
|
+
/** Explicit fill; wins over colorValue. */
|
|
16
|
+
color?: string;
|
|
17
|
+
/** Marks a node whose children exist but are not loaded yet (lazy loading). */
|
|
18
|
+
hasChildren?: boolean;
|
|
19
|
+
children?: HierarchyNode[];
|
|
20
|
+
}
|
|
21
|
+
export interface TrendPoint {
|
|
22
|
+
x: number | Date;
|
|
23
|
+
/** null renders a gap; forward-filling is the consumer's choice. */
|
|
24
|
+
y: number | null;
|
|
25
|
+
}
|
|
26
|
+
export interface TrendSeries {
|
|
27
|
+
id: string;
|
|
28
|
+
label: string;
|
|
29
|
+
color?: string;
|
|
30
|
+
points: TrendPoint[];
|
|
31
|
+
}
|
|
32
|
+
export interface HierarchyNodeEventDetail {
|
|
33
|
+
node: HierarchyNode;
|
|
34
|
+
/** Ancestors from the data root down to (and including) the node. */
|
|
35
|
+
path: HierarchyNode[];
|
|
36
|
+
}
|
|
37
|
+
export interface HierarchyHoverEventDetail {
|
|
38
|
+
node: HierarchyNode | null;
|
|
39
|
+
path: HierarchyNode[];
|
|
40
|
+
}
|
|
41
|
+
export interface HierarchyLoadErrorEventDetail {
|
|
42
|
+
node: HierarchyNode;
|
|
43
|
+
error: unknown;
|
|
44
|
+
}
|
|
45
|
+
export interface TrendPointEventDetail {
|
|
46
|
+
seriesId: string;
|
|
47
|
+
point: TrendPoint;
|
|
48
|
+
}
|
|
49
|
+
export interface TrendHoverEventDetail {
|
|
50
|
+
seriesId: string | null;
|
|
51
|
+
point: TrendPoint | null;
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|