@hybridcore/ui 1.6.16 → 1.6.18
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/CATALOG.md +1 -0
- package/dist/IconCircle-HcgE1lHy.js +11 -0
- package/dist/IconMinus-B6OPYVyo.js +11 -0
- package/dist/IconPlus-7KPPhzOb.js +11 -0
- package/dist/IconTrendingUp-CW4SFYmc.js +27 -0
- package/dist/components/charts/_common/utils.js +21 -11
- package/dist/components/charts/column-line-mix/logic.js +59 -59
- package/dist/components/charts/line/logic.js +55 -55
- package/dist/components/charts/logaritmic-scale/logic.js +27 -27
- package/dist/components/charts/multiple-value-axes/logic.js +70 -70
- package/dist/components/charts/xy-chart/logic.js +31 -31
- package/dist/components/color-picker/index.js +1393 -1399
- package/dist/components/data-map/components/controls/index.js +7 -6
- package/dist/components/heat-map/components/controls/index.js +7 -6
- package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +8738 -8753
- package/dist/components/metric-card/logic.js +57 -77
- package/dist/components/prr-map/components/controls/index.js +7 -6
- package/dist/components/range-selector/components/enum-range/index.js +66 -0
- package/dist/components/range-selector/index.js +40 -30
- package/dist/components/range-selector/styled.js +11 -11
- package/dist/components/raster-grid-map/components/controls/index.js +7 -6
- package/dist/components/status-indicator/index.js +44 -0
- package/dist/components/status-indicator/logic.js +105 -0
- package/dist/components/status-indicator/styled.js +114 -0
- package/dist/main.d.ts +92 -0
- package/dist/main.js +65 -63
- package/package.json +1 -1
- package/dist/IconPlus-yPkff_Vj.js +0 -19
|
@@ -1,116 +1,96 @@
|
|
|
1
1
|
import { useThemeProps as K } from "@mui/material";
|
|
2
|
-
import { formatValue as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license.
|
|
8
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/
|
|
10
|
-
const Q = [["path", { d: "M5 12l14 0", key: "svg-0" }], ["path", { d: "M13 18l6 -6", key: "svg-1" }], ["path", { d: "M13 6l6 6", key: "svg-2" }]], W = m("outline", "arrow-right", "ArrowRight", Q);
|
|
11
|
-
/**
|
|
12
|
-
* @license @tabler/icons-react v3.44.0 - MIT
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the MIT license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/
|
|
17
|
-
const X = [["path", { d: "M3 7l6 6l4 -4l8 8", key: "svg-0" }], ["path", { d: "M21 10l0 7l-7 0", key: "svg-1" }]], Y = m("outline", "trending-down", "TrendingDown", X);
|
|
18
|
-
/**
|
|
19
|
-
* @license @tabler/icons-react v3.44.0 - MIT
|
|
20
|
-
*
|
|
21
|
-
* This source code is licensed under the MIT license.
|
|
22
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
23
|
-
*/
|
|
24
|
-
const ee = [["path", { d: "M3 17l6 -6l4 4l8 -8", key: "svg-0" }], ["path", { d: "M14 7l7 0l0 7", key: "svg-1" }]], oe = m("outline", "trending-up", "TrendingUp", ee), ce = (F) => {
|
|
25
|
-
const i = K({ props: F, name: "HCMetricCard" }), {
|
|
2
|
+
import { formatValue as D, resolveConditionalStyle as M } from "../charts/_common/format.js";
|
|
3
|
+
import { I as Q, a as W, b as X } from "../../IconTrendingUp-CW4SFYmc.js";
|
|
4
|
+
const oe = ($) => {
|
|
5
|
+
const i = K({ props: $, name: "HCMetricCard" }), {
|
|
26
6
|
value: c = [],
|
|
27
|
-
secondValue:
|
|
28
|
-
secondValueFormat:
|
|
29
|
-
variant:
|
|
30
|
-
layout:
|
|
31
|
-
valuePrefix:
|
|
32
|
-
valueSuffix:
|
|
7
|
+
secondValue: v = [],
|
|
8
|
+
secondValueFormat: k,
|
|
9
|
+
variant: O = "default",
|
|
10
|
+
layout: C = "overlay",
|
|
11
|
+
valuePrefix: Z,
|
|
12
|
+
valueSuffix: A,
|
|
33
13
|
format: o,
|
|
34
|
-
showChange:
|
|
35
|
-
changeType:
|
|
36
|
-
showTrend:
|
|
37
|
-
showIcon:
|
|
38
|
-
icon:
|
|
39
|
-
iconPosition:
|
|
40
|
-
} = i,
|
|
14
|
+
showChange: H = !1,
|
|
15
|
+
changeType: l = "percentage",
|
|
16
|
+
showTrend: J = !1,
|
|
17
|
+
showIcon: b = !1,
|
|
18
|
+
icon: u,
|
|
19
|
+
iconPosition: d = "right"
|
|
20
|
+
} = i, L = c.length > 0, f = c[c.length - 1], S = c[c.length - 2], e = f ? Number(f.v) : NaN, t = S ? Number(S.v) : NaN, w = !isNaN(e) && !isNaN(t), g = {
|
|
41
21
|
...o,
|
|
42
|
-
prefix: (o == null ? void 0 : o.prefix) ??
|
|
43
|
-
suffix: (o == null ? void 0 : o.suffix) ??
|
|
22
|
+
prefix: (o == null ? void 0 : o.prefix) ?? Z,
|
|
23
|
+
suffix: (o == null ? void 0 : o.suffix) ?? A
|
|
44
24
|
};
|
|
45
|
-
let r = "—",
|
|
25
|
+
let r = "—", y = "", I, V;
|
|
46
26
|
if (!isNaN(e)) {
|
|
47
|
-
r =
|
|
48
|
-
const
|
|
49
|
-
|
|
27
|
+
r = D(e, g), y = f.t;
|
|
28
|
+
const a = M(e, g);
|
|
29
|
+
I = a.color, V = a.backgroundColor;
|
|
50
30
|
}
|
|
51
|
-
const
|
|
52
|
-
let
|
|
53
|
-
const
|
|
54
|
-
if (!isNaN(
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
T =
|
|
31
|
+
const x = k ?? g;
|
|
32
|
+
let p, T, B;
|
|
33
|
+
const F = v[v.length - 1], h = F ? Number(F.v) : NaN;
|
|
34
|
+
if (!isNaN(h)) {
|
|
35
|
+
p = D(h, x);
|
|
36
|
+
const a = M(h, x);
|
|
37
|
+
T = a.color, B = a.backgroundColor;
|
|
58
38
|
}
|
|
59
39
|
let s;
|
|
60
|
-
if (
|
|
61
|
-
if (
|
|
62
|
-
const
|
|
63
|
-
s = `${z}${Math.abs(
|
|
40
|
+
if (H)
|
|
41
|
+
if (w && !(t === 0 && l === "percentage")) {
|
|
42
|
+
const m = l === "absolute" ? e - t : (e - t) / t * 100, z = m > 0 ? "+" : m < 0 ? "−" : "", E = l === "percentage" ? 1 : 2, G = l === "percentage" ? "%" : "";
|
|
43
|
+
s = `${z}${Math.abs(m).toFixed(E)}${G}`;
|
|
64
44
|
} else
|
|
65
45
|
s = "—";
|
|
66
46
|
let n;
|
|
67
|
-
|
|
68
|
-
let
|
|
69
|
-
n === "up" ?
|
|
70
|
-
const
|
|
47
|
+
J && w && (e > t ? n = "up" : e < t ? n = "down" : n = "neutral");
|
|
48
|
+
let N = Q;
|
|
49
|
+
n === "up" ? N = W : n === "down" && (N = X);
|
|
50
|
+
const P = [
|
|
71
51
|
"top-left",
|
|
72
52
|
"top-right",
|
|
73
53
|
"bottom-left",
|
|
74
54
|
"bottom-right"
|
|
75
|
-
].includes(
|
|
55
|
+
].includes(d), R = b && !!u && P, U = b && !!u && !P, j = JSON.stringify({
|
|
76
56
|
metric: i.label,
|
|
77
57
|
value: r,
|
|
78
58
|
change: s,
|
|
79
|
-
asOf:
|
|
59
|
+
asOf: y
|
|
80
60
|
}), q = {
|
|
81
61
|
...i,
|
|
82
|
-
variant:
|
|
83
|
-
layout:
|
|
84
|
-
changeType:
|
|
85
|
-
iconPosition:
|
|
62
|
+
variant: O,
|
|
63
|
+
layout: C,
|
|
64
|
+
changeType: l,
|
|
65
|
+
iconPosition: d,
|
|
86
66
|
calculatedValue: r,
|
|
87
|
-
calculatedSecondValue:
|
|
67
|
+
calculatedSecondValue: p,
|
|
88
68
|
calculatedSecondValueColor: T,
|
|
89
|
-
calculatedSecondValueBg:
|
|
69
|
+
calculatedSecondValueBg: B,
|
|
90
70
|
calculatedChange: s,
|
|
91
71
|
calculatedTrend: n,
|
|
92
|
-
calculatedValueColor:
|
|
93
|
-
calculatedValueBg:
|
|
94
|
-
hasData:
|
|
72
|
+
calculatedValueColor: I,
|
|
73
|
+
calculatedValueBg: V,
|
|
74
|
+
hasData: L
|
|
95
75
|
};
|
|
96
76
|
return {
|
|
97
77
|
refs: {},
|
|
98
78
|
state: {
|
|
99
79
|
ownerState: q,
|
|
100
|
-
layout:
|
|
80
|
+
layout: C,
|
|
101
81
|
calculatedValue: r,
|
|
102
|
-
calculatedSecondValue:
|
|
82
|
+
calculatedSecondValue: p,
|
|
103
83
|
calculatedChange: s,
|
|
104
|
-
TrendIcon:
|
|
105
|
-
Icon:
|
|
106
|
-
showCornerIcon:
|
|
107
|
-
showSideIcon:
|
|
108
|
-
iconPosition:
|
|
84
|
+
TrendIcon: N,
|
|
85
|
+
Icon: u,
|
|
86
|
+
showCornerIcon: R,
|
|
87
|
+
showSideIcon: U,
|
|
88
|
+
iconPosition: d,
|
|
109
89
|
snapshotPayload: j
|
|
110
90
|
},
|
|
111
91
|
actions: {}
|
|
112
92
|
};
|
|
113
93
|
};
|
|
114
94
|
export {
|
|
115
|
-
|
|
95
|
+
oe as useMetricCardLogic
|
|
116
96
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Container as t, Button as
|
|
3
|
-
import { I as s
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/* @__PURE__ */ o(
|
|
2
|
+
import { Container as t, Button as n } from "./styled.js";
|
|
3
|
+
import { I as s } from "../../../../IconPlus-7KPPhzOb.js";
|
|
4
|
+
import { I as l } from "../../../../IconMinus-B6OPYVyo.js";
|
|
5
|
+
const I = ({ mapRef: r }) => r ? /* @__PURE__ */ i(t, { children: [
|
|
6
|
+
/* @__PURE__ */ o(n, { onClick: r.zoomIn, children: /* @__PURE__ */ o(s, { size: 18 }) }),
|
|
7
|
+
/* @__PURE__ */ o(n, { onClick: r.zoomOut, children: /* @__PURE__ */ o(l, { size: 18 }) })
|
|
7
8
|
] }) : null;
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
I as Controls
|
|
10
11
|
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Select as y, MenuItem as u, Checkbox as o, ListItemText as h } from "@mui/material";
|
|
3
|
+
const c = "__ALL__", P = (d) => {
|
|
4
|
+
const { value: m, options: l, onChange: a, variant: p = "outlined" } = d, t = m.listOfPossibleValues ?? [], r = l.length > 0 && t.length === l.length, g = t.length > 0 && !r;
|
|
5
|
+
return /* @__PURE__ */ s(
|
|
6
|
+
y,
|
|
7
|
+
{
|
|
8
|
+
multiple: !0,
|
|
9
|
+
size: "small",
|
|
10
|
+
fullWidth: !0,
|
|
11
|
+
displayEmpty: !0,
|
|
12
|
+
variant: p,
|
|
13
|
+
value: t,
|
|
14
|
+
onChange: (e) => {
|
|
15
|
+
const i = e.target.value;
|
|
16
|
+
if (i.includes(c)) {
|
|
17
|
+
a({ listOfPossibleValues: r ? [] : [...l] });
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
a({ listOfPossibleValues: i });
|
|
21
|
+
},
|
|
22
|
+
MenuProps: { PaperProps: { sx: { maxHeight: 320 } } },
|
|
23
|
+
renderValue: (e) => e.length === 0 ? "Select values" : e.length === l.length ? "All values" : e.length <= 2 ? e.join(", ") : `${e.length} of ${l.length} selected`,
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ s(u, { dense: !0, value: c, children: [
|
|
26
|
+
/* @__PURE__ */ n(
|
|
27
|
+
o,
|
|
28
|
+
{
|
|
29
|
+
size: "small",
|
|
30
|
+
sx: { py: 0.25, pl: 0, mr: 0.5 },
|
|
31
|
+
checked: r,
|
|
32
|
+
indeterminate: g
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ n(
|
|
36
|
+
h,
|
|
37
|
+
{
|
|
38
|
+
primary: "Select All",
|
|
39
|
+
primaryTypographyProps: { variant: "body2" }
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] }),
|
|
43
|
+
l.map((e) => /* @__PURE__ */ s(u, { dense: !0, value: e, children: [
|
|
44
|
+
/* @__PURE__ */ n(
|
|
45
|
+
o,
|
|
46
|
+
{
|
|
47
|
+
size: "small",
|
|
48
|
+
sx: { py: 0.25, pl: 0, mr: 0.5 },
|
|
49
|
+
checked: t.includes(e)
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ n(
|
|
53
|
+
h,
|
|
54
|
+
{
|
|
55
|
+
primary: e,
|
|
56
|
+
primaryTypographyProps: { variant: "body2" }
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] }, e))
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
P as EnumRange
|
|
66
|
+
};
|
|
@@ -1,65 +1,75 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { CompositeListRange as
|
|
4
|
-
import { DateRange as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import g from "lodash";
|
|
3
|
+
import { CompositeListRange as u } from "./components/composite-list-range/index.js";
|
|
4
|
+
import { DateRange as f } from "./components/date-range/index.js";
|
|
5
|
+
import { EnumRange as c } from "./components/enum-range/index.js";
|
|
6
|
+
import { GeometryRange as R } from "./components/geometry-range/index.js";
|
|
7
|
+
import { NumberRange as D } from "./components/number-range/index.js";
|
|
8
|
+
import { StringRange as x } from "./components/string-range/index.js";
|
|
9
|
+
import { useRangeSelectorLogic as y } from "./logic.js";
|
|
10
|
+
import { RangeSelectorRoot as b } from "./styled.js";
|
|
11
|
+
const L = (t) => {
|
|
12
|
+
const { state: r } = y(t), { ownerState: l } = r, { type: e, value: i, mapboxAccessToken: o, onChange: m, sx: s } = t;
|
|
12
13
|
let a = null;
|
|
13
14
|
return e === "byte" || e === "double" || e === "integer" || e === "long" ? a = /* @__PURE__ */ n(
|
|
14
|
-
|
|
15
|
+
D,
|
|
15
16
|
{
|
|
16
|
-
value:
|
|
17
|
+
value: i || {
|
|
17
18
|
minValue: "",
|
|
18
19
|
maxValue: ""
|
|
19
20
|
},
|
|
20
|
-
onChange:
|
|
21
|
+
onChange: m
|
|
21
22
|
}
|
|
22
23
|
) : e === "string" || e === "text" ? a = /* @__PURE__ */ n(
|
|
23
|
-
|
|
24
|
+
x,
|
|
24
25
|
{
|
|
25
|
-
value:
|
|
26
|
+
value: i || {
|
|
26
27
|
listOfPossibleValues: []
|
|
27
28
|
},
|
|
28
|
-
onChange:
|
|
29
|
+
onChange: m
|
|
29
30
|
}
|
|
30
|
-
) : e === "
|
|
31
|
+
) : e === "enum" ? a = /* @__PURE__ */ n(
|
|
31
32
|
c,
|
|
32
33
|
{
|
|
33
|
-
value:
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
value: i || {
|
|
35
|
+
listOfPossibleValues: []
|
|
36
|
+
},
|
|
37
|
+
options: t.enumValues || [],
|
|
38
|
+
onChange: m
|
|
39
|
+
}
|
|
40
|
+
) : e === "geometry" ? a = /* @__PURE__ */ n(
|
|
41
|
+
R,
|
|
42
|
+
{
|
|
43
|
+
value: i || { geometryArea: "" },
|
|
44
|
+
mapboxAccessToken: o,
|
|
45
|
+
onChange: m
|
|
36
46
|
}
|
|
37
47
|
) : e === "date" ? a = /* @__PURE__ */ n(
|
|
38
|
-
|
|
48
|
+
f,
|
|
39
49
|
{
|
|
40
|
-
value:
|
|
41
|
-
startDate:
|
|
50
|
+
value: i || {
|
|
51
|
+
startDate: g.get(t, "minDate", ""),
|
|
42
52
|
timeUnit: "MINUTE",
|
|
43
53
|
endRange: 0,
|
|
44
54
|
startRange: 0,
|
|
45
55
|
limitForScenarioTimeRange: !1
|
|
46
56
|
},
|
|
47
|
-
onChange:
|
|
57
|
+
onChange: m,
|
|
48
58
|
minDate: t.minDate || "",
|
|
49
59
|
maxDate: t.maxDate || ""
|
|
50
60
|
}
|
|
51
61
|
) : e === "composite-list" && (a = /* @__PURE__ */ n(
|
|
52
|
-
|
|
62
|
+
u,
|
|
53
63
|
{
|
|
54
|
-
value:
|
|
55
|
-
mapboxAccessToken:
|
|
56
|
-
onChange:
|
|
64
|
+
value: i || { count: "" },
|
|
65
|
+
mapboxAccessToken: o,
|
|
66
|
+
onChange: m,
|
|
57
67
|
innerType: t.innerType,
|
|
58
68
|
minDate: t.minDate,
|
|
59
69
|
maxDate: t.maxDate
|
|
60
70
|
}
|
|
61
|
-
)), /* @__PURE__ */ n(
|
|
71
|
+
)), /* @__PURE__ */ n(b, { ownerState: l, sx: s, children: a });
|
|
62
72
|
};
|
|
63
73
|
export {
|
|
64
|
-
|
|
74
|
+
L as RangeSelector
|
|
65
75
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { styled as t, Box as o, TextField as n, Typography as a, IconButton as i, FormControl as r } from "@mui/material";
|
|
2
2
|
import { ArrowForward as g } from "@mui/icons-material";
|
|
3
3
|
import { DateTimePicker as s } from "@mui/x-date-pickers/DateTimePicker";
|
|
4
|
-
const l = (e) => e !== "ownerState",
|
|
4
|
+
const l = (e) => e !== "ownerState", p = t(o, {
|
|
5
5
|
name: "HCRangeSelector",
|
|
6
6
|
slot: "root",
|
|
7
7
|
shouldForwardProp: l
|
|
8
|
-
})({}), R = t(o, {
|
|
8
|
+
})({ width: "100%", minWidth: 0 }), R = t(o, {
|
|
9
9
|
name: "HCRangeSelector",
|
|
10
10
|
slot: "numberRow"
|
|
11
11
|
})({
|
|
@@ -17,12 +17,12 @@ const l = (e) => e !== "ownerState", d = t(o, {
|
|
|
17
17
|
})({
|
|
18
18
|
display: "flex",
|
|
19
19
|
width: "100%"
|
|
20
|
-
}),
|
|
20
|
+
}), w = t(n, {
|
|
21
21
|
name: "HCRangeSelector",
|
|
22
22
|
slot: "numberInput"
|
|
23
23
|
})(({ theme: e }) => ({
|
|
24
24
|
marginRight: e.spacing(0.25)
|
|
25
|
-
})),
|
|
25
|
+
})), u = t(n, {
|
|
26
26
|
name: "HCRangeSelector",
|
|
27
27
|
slot: "numberInput"
|
|
28
28
|
})(({ theme: e }) => ({
|
|
@@ -47,13 +47,13 @@ const l = (e) => e !== "ownerState", d = t(o, {
|
|
|
47
47
|
marginRight: e.spacing(0.5),
|
|
48
48
|
minWidth: 50,
|
|
49
49
|
width: 85
|
|
50
|
-
})),
|
|
50
|
+
})), h = t(o, {
|
|
51
51
|
name: "HCRangeSelector",
|
|
52
52
|
slot: "compositeChild"
|
|
53
53
|
})({
|
|
54
54
|
flex: 1,
|
|
55
55
|
maxWidth: 300
|
|
56
|
-
}),
|
|
56
|
+
}), H = t(o, {
|
|
57
57
|
name: "HCRangeSelector",
|
|
58
58
|
slot: "dateTrigger"
|
|
59
59
|
})(({ theme: e }) => ({
|
|
@@ -110,22 +110,22 @@ const l = (e) => e !== "ownerState", d = t(o, {
|
|
|
110
110
|
marginLeft: e.spacing(1)
|
|
111
111
|
}));
|
|
112
112
|
export {
|
|
113
|
-
|
|
113
|
+
h as CompositeChild,
|
|
114
114
|
x as CompositeCount,
|
|
115
115
|
S as CompositeRow,
|
|
116
116
|
I as DateLimitCaption,
|
|
117
117
|
y as DatePicker,
|
|
118
118
|
B as DateRangeInput,
|
|
119
|
-
|
|
119
|
+
H as DateTrigger,
|
|
120
120
|
b as DateTriggerArrow,
|
|
121
121
|
D as DateTriggerEditButton,
|
|
122
122
|
T as DateTriggerText,
|
|
123
123
|
N as DateUnitControl,
|
|
124
124
|
L as DateUnitRow,
|
|
125
125
|
f as ModeColumn,
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
u as NumberInputMax,
|
|
127
|
+
w as NumberInputMin,
|
|
128
128
|
C as NumberRangeRow,
|
|
129
129
|
R as NumberRow,
|
|
130
|
-
|
|
130
|
+
p as RangeSelectorRoot
|
|
131
131
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Container as t, Button as
|
|
3
|
-
import { I as s
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/* @__PURE__ */ o(
|
|
2
|
+
import { Container as t, Button as n } from "./styled.js";
|
|
3
|
+
import { I as s } from "../../../../IconPlus-7KPPhzOb.js";
|
|
4
|
+
import { I as l } from "../../../../IconMinus-B6OPYVyo.js";
|
|
5
|
+
const I = ({ mapRef: r }) => r ? /* @__PURE__ */ i(t, { children: [
|
|
6
|
+
/* @__PURE__ */ o(n, { onClick: r.zoomIn, children: /* @__PURE__ */ o(s, { size: 18 }) }),
|
|
7
|
+
/* @__PURE__ */ o(n, { onClick: r.zoomOut, children: /* @__PURE__ */ o(l, { size: 18 }) })
|
|
7
8
|
] }) : null;
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
I as Controls
|
|
10
11
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as t, jsxs as e, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as x, Skeleton as d } from "@mui/material";
|
|
3
|
+
import { useStatusIndicatorLogic as v } from "./logic.js";
|
|
4
|
+
import { StatusIndicatorRoot as o, StatusIndicatorCaption as b, StatusIndicatorDescription as f, StatusIndicatorIconContainer as h, StatusIndicatorContent as g, StatusIndicatorLabel as u, StatusIndicatorValue as I, StatusIndicatorBadge as w } from "./styled.js";
|
|
5
|
+
const j = (i) => {
|
|
6
|
+
const { state: S } = v(i), { ownerState: n, variant: r, activeLabel: c, Icon: a } = S;
|
|
7
|
+
if (i.loading)
|
|
8
|
+
return /* @__PURE__ */ t(o, { ownerState: n, sx: i.sx, children: /* @__PURE__ */ e(
|
|
9
|
+
x,
|
|
10
|
+
{
|
|
11
|
+
spacing: 1,
|
|
12
|
+
alignItems: r === "prominent" ? "center" : "flex-start",
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ t(d, { variant: "text", width: "50%" }),
|
|
15
|
+
/* @__PURE__ */ t(d, { variant: "circular", width: 40, height: 40 }),
|
|
16
|
+
/* @__PURE__ */ t(d, { variant: "text", width: "70%" })
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
) });
|
|
20
|
+
const l = i.caption && /* @__PURE__ */ t(b, { variant: "caption", children: i.caption }), s = i.description && /* @__PURE__ */ t(f, { variant: "body2", children: i.description });
|
|
21
|
+
return r === "split" ? /* @__PURE__ */ e(o, { ownerState: n, sx: i.sx, children: [
|
|
22
|
+
a && /* @__PURE__ */ t(h, { ownerState: n, children: /* @__PURE__ */ t(a, { size: 28 }) }),
|
|
23
|
+
/* @__PURE__ */ e(g, { children: [
|
|
24
|
+
i.label && /* @__PURE__ */ t(u, { variant: "body2", children: i.label }),
|
|
25
|
+
/* @__PURE__ */ t(I, { variant: "h5", ownerState: n, children: c }),
|
|
26
|
+
l,
|
|
27
|
+
s
|
|
28
|
+
] })
|
|
29
|
+
] }) : /* @__PURE__ */ e(o, { ownerState: n, sx: i.sx, children: [
|
|
30
|
+
i.label && /* @__PURE__ */ t(u, { variant: "body2", children: i.label }),
|
|
31
|
+
r === "prominent" ? /* @__PURE__ */ e(m, { children: [
|
|
32
|
+
a && /* @__PURE__ */ t(h, { ownerState: n, children: /* @__PURE__ */ t(a, { size: 48 }) }),
|
|
33
|
+
/* @__PURE__ */ t(I, { variant: "h4", ownerState: n, children: c })
|
|
34
|
+
] }) : /* @__PURE__ */ e(w, { ownerState: n, children: [
|
|
35
|
+
a && /* @__PURE__ */ t(a, { size: 18 }),
|
|
36
|
+
c
|
|
37
|
+
] }),
|
|
38
|
+
l,
|
|
39
|
+
s
|
|
40
|
+
] });
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
j as StatusIndicator
|
|
44
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { useThemeProps as u } from "@mui/material";
|
|
2
|
+
import { a as w, b as k, I as v } from "../../IconTrendingUp-CW4SFYmc.js";
|
|
3
|
+
import { c as n } from "../../createReactComponent-C7L-DMHj.js";
|
|
4
|
+
import { I } from "../../IconMinus-B6OPYVyo.js";
|
|
5
|
+
import { I as y } from "../../IconCircle-HcgE1lHy.js";
|
|
6
|
+
/**
|
|
7
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
const M = [["path", { d: "M12 9v4", key: "svg-0" }], ["path", { d: "M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0", key: "svg-1" }], ["path", { d: "M12 16h.01", key: "svg-2" }]], m = n("outline", "alert-triangle", "AlertTriangle", M);
|
|
13
|
+
/**
|
|
14
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license.
|
|
17
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/
|
|
19
|
+
const C = [["path", { d: "M12 5l0 14", key: "svg-0" }], ["path", { d: "M18 13l-6 6", key: "svg-1" }], ["path", { d: "M6 13l6 6", key: "svg-2" }]], _ = n("outline", "arrow-down", "ArrowDown", C);
|
|
20
|
+
/**
|
|
21
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license.
|
|
24
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/
|
|
26
|
+
const $ = [["path", { d: "M12 5l0 14", key: "svg-0" }], ["path", { d: "M18 11l-6 -6", key: "svg-1" }], ["path", { d: "M6 11l6 -6", key: "svg-2" }]], N = n("outline", "arrow-up", "ArrowUp", $);
|
|
27
|
+
/**
|
|
28
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license.
|
|
31
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/
|
|
33
|
+
const b = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", key: "svg-0" }], ["path", { d: "M5.7 5.7l12.6 12.6", key: "svg-1" }]], f = n("outline", "ban", "Ban", b);
|
|
34
|
+
/**
|
|
35
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the MIT license.
|
|
38
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/
|
|
40
|
+
const A = [["path", { d: "M6 10l6 6l6 -6h-12", key: "svg-0" }]], D = n("outline", "caret-down", "CaretDown", A);
|
|
41
|
+
/**
|
|
42
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the MIT license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/
|
|
47
|
+
const L = [["path", { d: "M18 14l-6 -6l-6 6h12", key: "svg-0" }]], T = n("outline", "caret-up", "CaretUp", L);
|
|
48
|
+
/**
|
|
49
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the MIT license.
|
|
52
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/
|
|
54
|
+
const U = [["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]], B = n("outline", "check", "Check", U);
|
|
55
|
+
/**
|
|
56
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the MIT license.
|
|
59
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/
|
|
61
|
+
const H = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 16v.01", key: "svg-1" }], ["path", { d: "M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483", key: "svg-2" }]], R = n("outline", "help-circle", "HelpCircle", H), x = {
|
|
62
|
+
"trending-up": w,
|
|
63
|
+
"trending-down": k,
|
|
64
|
+
"arrow-right": v,
|
|
65
|
+
"arrow-up": N,
|
|
66
|
+
"arrow-down": _,
|
|
67
|
+
"caret-up": T,
|
|
68
|
+
"caret-down": D,
|
|
69
|
+
minus: I,
|
|
70
|
+
ban: f,
|
|
71
|
+
help: R,
|
|
72
|
+
check: B,
|
|
73
|
+
alert: m,
|
|
74
|
+
circle: y
|
|
75
|
+
}, z = (p) => {
|
|
76
|
+
const t = u({ props: p, name: "HCStatusIndicator" }), {
|
|
77
|
+
value: e,
|
|
78
|
+
states: d = [],
|
|
79
|
+
variant: c = "prominent",
|
|
80
|
+
showIcon: s = !0,
|
|
81
|
+
emptyLabel: a = "—"
|
|
82
|
+
} = t, r = e != null && `${e}`.trim() !== "", o = r ? d.find((g) => `${g.value}`.toLowerCase() === `${e}`.toLowerCase()) : void 0, l = (o == null ? void 0 : o.label) ?? (r ? `${e}` : a), i = s && (o != null && o.icon) ? x[o.icon] : void 0, h = {
|
|
83
|
+
...t,
|
|
84
|
+
variant: c,
|
|
85
|
+
showIcon: s,
|
|
86
|
+
emptyLabel: a,
|
|
87
|
+
activeLabel: l,
|
|
88
|
+
resolvedColor: o == null ? void 0 : o.color,
|
|
89
|
+
resolvedBackgroundColor: o == null ? void 0 : o.backgroundColor,
|
|
90
|
+
hasValue: r
|
|
91
|
+
};
|
|
92
|
+
return {
|
|
93
|
+
refs: {},
|
|
94
|
+
state: {
|
|
95
|
+
ownerState: h,
|
|
96
|
+
variant: c,
|
|
97
|
+
activeLabel: l,
|
|
98
|
+
Icon: i
|
|
99
|
+
},
|
|
100
|
+
actions: {}
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export {
|
|
104
|
+
z as useStatusIndicatorLogic
|
|
105
|
+
};
|