@astrato-io/visualizations 0.8.0 → 0.9.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/README.md +1 -1
- package/THIRD_PARTY_NOTICES.md +307 -378
- package/chunks/{Button-BrGKp9Nm.js → Button-5CxPEACP.js} +11 -11
- package/chunks/CircularProgress-DFS-LQb7.js +765 -0
- package/chunks/FieldTypeIcon-pSVQFemC.js +22 -0
- package/chunks/LinearProgress-CjIQfkNA.js +327 -0
- package/chunks/{MenuOption-ByRqhRdX.js → MenuOption-Cb7B7x6z.js} +1384 -1002
- package/chunks/Title-CtFw1bVg.js +1804 -0
- package/chunks/ToggleButton-Br9HCPCv.js +150 -0
- package/chunks/{app-filter-bar.compiler-TwVTeoj5.js → app-filter-bar.compiler-B9775gLJ.js} +3 -3
- package/chunks/{bar.compiler-DuQg8EUb.js → bar.compiler-B7wlH_Ro.js} +4 -4
- package/chunks/{builder-DEDvNq1k.js → builder-Dxo7D7c6.js} +118 -55
- package/chunks/{coloring-CncX_JRX.js → coloring-B-Wa8D5P.js} +3 -3
- package/chunks/contains-BK-sRXcB.js +21 -0
- package/chunks/{definitions-BPJQTx16.js → definitions-DNpzD9tY.js} +26 -26
- package/chunks/{escobar-DRhRMYRE.js → escobar-C4Nm3eJ7.js} +4436 -4802
- package/chunks/{extend-preset-CUFNpmPe.js → extend-preset-BVKFtoe-.js} +46 -46
- package/chunks/{filter.compiler-w27dlv0C.js → filter.compiler-BlS3zoy_.js} +7 -7
- package/chunks/{filtering-cc7WqWpg.js → filtering-CGuLpg7u.js} +494 -270
- package/chunks/{handlers-TOT-7INo.js → handlers-CMbyj5y1.js} +1513 -1454
- package/chunks/{icon-picker-styles-CoJmwTRi.js → icon-picker-styles-DYQgVEKG.js} +8 -8
- package/chunks/{isEqual-B8loyPsC.js → isEqual-DBg_b35N.js} +1 -1
- package/chunks/isFocusVisible-B1_z03UT.js +144 -0
- package/chunks/{line.compiler-Ct1WhN2p.js → line.compiler-Bo9i9qag.js} +7 -7
- package/chunks/{logger-DpQtYQnX.js → logger-3lng-wOw.js} +7 -3
- package/chunks/{metadata-WABZrt7Y.js → metadata-Fmx1swpK.js} +1 -1
- package/chunks/{number.compiler-D8TPly-4.js → number.compiler-CdLd5aGW.js} +7 -7
- package/chunks/{operations-Dh4v1Ovt.js → operations-HSqnCRvv.js} +9156 -9112
- package/chunks/{range-Bi-7zT0k.js → range-CzO4isKK.js} +2 -2
- package/chunks/react-dom-BwZT0N3F.js +368 -0
- package/chunks/{render-wrappers-OEmtaM8g.js → render-wrappers-CAuvgMxi.js} +1 -1
- package/chunks/{requirements-Dvd8jqYF.js → requirements-CYpVh65U.js} +52 -52
- package/chunks/responsive.styles-FItb913l.js +93 -0
- package/chunks/{shared-Bn4N5QcZ.js → shared-DFoJxjVN.js} +401 -401
- package/chunks/{standalone-D__XCp-h.js → standalone-530a5lvf.js} +306 -306
- package/chunks/{standalone-CXNP6-xD.js → standalone-5DnapeHH.js} +112 -112
- package/chunks/{standalone-XTgSsTAa.js → standalone-B4jrf4KE.js} +70 -70
- package/chunks/{standalone-Bes8srx1.js → standalone-B6s_xG2u.js} +14 -14
- package/chunks/{standalone-vBnBS2YC.js → standalone-BDrQMxLi.js} +98 -98
- package/chunks/standalone-BMoJXGYe.js +2 -0
- package/chunks/{standalone-CLmGb7nn2.js → standalone-BfvGggeM2.js} +76 -76
- package/chunks/{standalone-D5Q5ngsD.js → standalone-BvWdpUL3.js} +26 -26
- package/chunks/{standalone-we5D5MIn.js → standalone-C6XDHYAM.js} +31 -31
- package/chunks/standalone-CMJJIi9v.js +2 -0
- package/chunks/{standalone-C8ZAEutO.js → standalone-CNkHsynO.js} +28 -28
- package/chunks/{standalone-BMTCb10X.js → standalone-CPUiiWNP.js} +5 -5
- package/chunks/{standalone-XuGksArp.js → standalone-CXniic5x.js} +9 -9
- package/chunks/standalone-C_Jd4gkj.js +6 -0
- package/chunks/{standalone-DW6NT205.js → standalone-CiaaibTa.js} +142 -142
- package/chunks/standalone-CoQxJ6ov.js +3638 -0
- package/chunks/{standalone-CM5XcAN5.js → standalone-Cu73fzSr.js} +7660 -7534
- package/chunks/standalone-DBeXQrwH.js +468 -0
- package/chunks/{standalone-DMcI1afI.js → standalone-DMCwtebn.js} +81 -81
- package/chunks/{standalone-BlMIwpEe.js → standalone-DWPfdP0A.js} +800 -668
- package/chunks/{standalone-DLlyRIE6.js → standalone-DpSRmAWx.js} +59 -59
- package/chunks/{standalone-BGkmozIb.js → standalone-DuwTOBXH.js} +256 -256
- package/chunks/{standalone-BDhPQtzQ.js → standalone-LFVgLhia.js} +234 -234
- package/chunks/{standalone-B55oyW6c.js → standalone-kzAhwH19.js} +149 -149
- package/chunks/{standalone-DN4S1MjT.js → standalone-mb7LwEiq.js} +885 -885
- package/chunks/{standalone-CJvIXsQE.js → standalone-r4ObFvys.js} +155 -155
- package/chunks/{table.compiler-DMeeHxb6.js → table.compiler-C1qjqXaT.js} +7 -7
- package/chunks/{typeof-CJDtcySz.js → typeof-DCq3QgvY.js} +6 -1
- package/chunks/useFieldName-mWrD_uk_.js +7 -0
- package/chunks/{utils-vdmi_2PK.js → utils-DYYD4Zzf.js} +7593 -12707
- package/chunks/{view-BuwQugKb.js → view-7fH6mGmY.js} +2034 -2070
- package/chunks/{visualization-filters-Cc4KU-l-.js → visualization-filters-mVnsnvLP.js} +3581 -3555
- package/chunks/with-html-element-B0Clt4jY.js +15901 -0
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +1 -1
- package/docs/operations/combo.md +1 -1
- package/docs/operations/date-picker.md +1 -1
- package/docs/operations/distribution-gauge.md +1 -1
- package/docs/operations/dot.md +1 -1
- package/docs/operations/filter.md +1 -1
- package/docs/operations/gauge.md +1 -1
- package/docs/operations/heatMap.md +1 -1
- package/docs/operations/histogram.md +1 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +2 -2
- package/docs/operations/line.md +1 -1
- package/docs/operations/number.md +1 -1
- package/docs/operations/pie.md +1 -1
- package/docs/operations/radar.md +1 -1
- package/docs/operations/sankey.md +1 -1
- package/docs/operations/scatter.md +1 -1
- package/docs/operations/shape.md +1 -1
- package/docs/operations/simpleTextObject.md +1 -1
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +66 -1
- package/docs/operations/tree.md +1 -1
- package/docs/operations/treemap.md +1 -1
- package/docs/operations/waterfall.md +1 -1
- package/docs/operations/word-cloud.md +1 -1
- package/getters.js +2 -2
- package/index.js +74 -68
- package/metadata.js +2 -2
- package/operations.js +5 -5
- package/package.json +67 -66
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +348 -348
- package/src/definitions/model/definitions/schema-registry.d.ts +101 -101
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +8 -8
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +29 -29
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +10 -10
- package/src/definitions/model/definitions/schemas/number.schema.d.ts +4 -4
- package/src/definitions/model/definitions/schemas/object.schema.d.ts +38 -38
- package/src/definitions/model/definitions/schemas/table.schema.d.ts +61 -61
- package/src/visualization-catalog.d.ts +26 -26
- package/chunks/DefaultPropsProvider-BsfB7QTn.js +0 -257
- package/chunks/FieldTypeIcon-Drs6hSJF.js +0 -22
- package/chunks/LinearProgress-VtfFx2vJ.js +0 -253
- package/chunks/Title-CO5dP1ma.js +0 -1691
- package/chunks/ToggleButton-KOBAimC1.js +0 -112
- package/chunks/colorManipulator-D8Pjy1pf.js +0 -45
- package/chunks/responsive.styles-DSiOGD7u.js +0 -82
- package/chunks/standalone-BXKRE_Se.js +0 -468
- package/chunks/standalone-BjZp0QMe.js +0 -2
- package/chunks/standalone-C8qAelL4.js +0 -2
- package/chunks/standalone-DT0wKji7.js +0 -6
- package/chunks/standalone-DYQIQH4c.js +0 -2095
- package/chunks/useFieldName-Cjn9KCVp.js +0 -7
- package/chunks/useSlotProps-DLbQp4lc.js +0 -166
- package/chunks/with-html-element-D0uY2zjI.js +0 -7328
- /package/chunks/{src-BOS6SqkZ.js → src-BOS6SqkZ2.js} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ar as e, cr as t, dr as n, fr as r, ir as i, jr as a, lr as o, nr as s, or as c, pr as l, rr as u, sr as d, tr as f, ur as p } from "./utils-DYYD4Zzf.js";
|
|
2
|
+
import { s as m } from "./logger-3lng-wOw.js";
|
|
3
|
+
var h = m(), g = a(), _ = ({ fieldType: a, fill: m, isBucketing: _ }) => {
|
|
4
|
+
if (_) return /* @__PURE__ */ (0, g.jsx)(r, { fill: m });
|
|
5
|
+
switch (a) {
|
|
6
|
+
case h.FieldType.BOOLEAN: return /* @__PURE__ */ (0, g.jsx)(l, { fill: m });
|
|
7
|
+
case h.FieldType.DATE: return /* @__PURE__ */ (0, g.jsx)(n, { fill: m });
|
|
8
|
+
case h.FieldType.DECIMAL: return /* @__PURE__ */ (0, g.jsx)(p, { fill: m });
|
|
9
|
+
case h.FieldType.FLOAT: return /* @__PURE__ */ (0, g.jsx)(o, { fill: m });
|
|
10
|
+
case h.FieldType.GROUPED_DIMENSION: return /* @__PURE__ */ (0, g.jsx)(d, { fill: m });
|
|
11
|
+
case h.FieldType.INT: return /* @__PURE__ */ (0, g.jsx)(c, { fill: m });
|
|
12
|
+
case h.FieldType.JSON: return /* @__PURE__ */ (0, g.jsx)(e, { fill: m });
|
|
13
|
+
case h.FieldType.REAL: return /* @__PURE__ */ (0, g.jsx)(c, { fill: m });
|
|
14
|
+
case h.FieldType.STRING: return /* @__PURE__ */ (0, g.jsx)(i, { fill: m });
|
|
15
|
+
case h.FieldType.TIME: return /* @__PURE__ */ (0, g.jsx)(u, { fill: m });
|
|
16
|
+
case h.FieldType.TIMESTAMP: return /* @__PURE__ */ (0, g.jsx)(s, { fill: m });
|
|
17
|
+
case h.FieldType.TIMESTAMP_TZ: return /* @__PURE__ */ (0, g.jsx)(f, { fill: m });
|
|
18
|
+
case h.FieldType.GEOGRAPHY: return /* @__PURE__ */ (0, g.jsx)(t, { fill: m });
|
|
19
|
+
default: return null;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export { _ as t };
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
+
import { $ as t, Tt as n, ei as r, it as i, jr as a, wt as o } from "./utils-DYYD4Zzf.js";
|
|
3
|
+
import { _ as s, a as c, c as l, d as u, l as d, m as f, n as p, u as m, v as h } from "./react-dom-BwZT0N3F.js";
|
|
4
|
+
import { p as g } from "./responsive.styles-FItb913l.js";
|
|
5
|
+
var _ = /* @__PURE__ */ e(r(), 1);
|
|
6
|
+
function v(e) {
|
|
7
|
+
return h("MuiLinearProgress", e);
|
|
8
|
+
}
|
|
9
|
+
var y = s("MuiLinearProgress", [
|
|
10
|
+
"root",
|
|
11
|
+
"colorPrimary",
|
|
12
|
+
"colorSecondary",
|
|
13
|
+
"determinate",
|
|
14
|
+
"indeterminate",
|
|
15
|
+
"buffer",
|
|
16
|
+
"query",
|
|
17
|
+
"dashed",
|
|
18
|
+
"bar",
|
|
19
|
+
"bar1",
|
|
20
|
+
"bar2"
|
|
21
|
+
]), b = a(), x = 4, S = {}, C = n`
|
|
22
|
+
0% {
|
|
23
|
+
left: -35%;
|
|
24
|
+
right: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
60% {
|
|
28
|
+
left: 100%;
|
|
29
|
+
right: -90%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
100% {
|
|
33
|
+
left: 100%;
|
|
34
|
+
right: -90%;
|
|
35
|
+
}
|
|
36
|
+
`, w = typeof C == "string" ? null : o`
|
|
37
|
+
animation: ${C} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
38
|
+
`, T = n`
|
|
39
|
+
0% {
|
|
40
|
+
left: -200%;
|
|
41
|
+
right: 100%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
60% {
|
|
45
|
+
left: 107%;
|
|
46
|
+
right: -8%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
100% {
|
|
50
|
+
left: 107%;
|
|
51
|
+
right: -8%;
|
|
52
|
+
}
|
|
53
|
+
`, E = typeof T == "string" ? null : o`
|
|
54
|
+
animation: ${T} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
55
|
+
`, D = n`
|
|
56
|
+
0% {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
background-position: 0 -23px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
60% {
|
|
62
|
+
opacity: 0;
|
|
63
|
+
background-position: 0 -23px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
100% {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
background-position: -200px -23px;
|
|
69
|
+
}
|
|
70
|
+
`, O = typeof D == "string" ? null : o`
|
|
71
|
+
animation: ${D} 3s infinite linear;
|
|
72
|
+
`, k = (e) => {
|
|
73
|
+
let { classes: t, variant: n, color: r } = e;
|
|
74
|
+
return f({
|
|
75
|
+
root: [
|
|
76
|
+
"root",
|
|
77
|
+
`color${l(r)}`,
|
|
78
|
+
n
|
|
79
|
+
],
|
|
80
|
+
dashed: ["dashed"],
|
|
81
|
+
bar1: ["bar", "bar1"],
|
|
82
|
+
bar2: [
|
|
83
|
+
"bar",
|
|
84
|
+
"bar2",
|
|
85
|
+
n === "buffer" && `color${l(r)}`
|
|
86
|
+
]
|
|
87
|
+
}, v, t);
|
|
88
|
+
}, A = (e, t) => e.vars ? e.vars.palette.LinearProgress[`${t}Bg`] : e.palette.mode === "light" ? e.lighten(e.palette[t].main, .62) : e.darken(e.palette[t].main, .5), j = u("span", {
|
|
89
|
+
name: "MuiLinearProgress",
|
|
90
|
+
slot: "Root",
|
|
91
|
+
overridesResolver: (e, t) => {
|
|
92
|
+
let { ownerState: n } = e;
|
|
93
|
+
return [
|
|
94
|
+
t.root,
|
|
95
|
+
t[`color${l(n.color)}`],
|
|
96
|
+
t[n.variant]
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
})(m(({ theme: e }) => ({
|
|
100
|
+
position: "relative",
|
|
101
|
+
overflow: "hidden",
|
|
102
|
+
display: "block",
|
|
103
|
+
height: 4,
|
|
104
|
+
zIndex: 0,
|
|
105
|
+
"@media print": { colorAdjust: "exact" },
|
|
106
|
+
variants: [
|
|
107
|
+
...Object.entries(e.palette).filter(g()).map(([t]) => ({
|
|
108
|
+
props: { color: t },
|
|
109
|
+
style: { backgroundColor: A(e, t) }
|
|
110
|
+
})),
|
|
111
|
+
{
|
|
112
|
+
props: ({ ownerState: e }) => e.color === "inherit" && e.variant !== "buffer",
|
|
113
|
+
style: { "&::before": {
|
|
114
|
+
content: "\"\"",
|
|
115
|
+
position: "absolute",
|
|
116
|
+
left: 0,
|
|
117
|
+
top: 0,
|
|
118
|
+
right: 0,
|
|
119
|
+
bottom: 0,
|
|
120
|
+
backgroundColor: "currentColor",
|
|
121
|
+
opacity: .3
|
|
122
|
+
} }
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
props: { variant: "buffer" },
|
|
126
|
+
style: { backgroundColor: "transparent" }
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
props: { variant: "query" },
|
|
130
|
+
style: { transform: "rotate(180deg)" }
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}))), M = u("span", {
|
|
134
|
+
name: "MuiLinearProgress",
|
|
135
|
+
slot: "Dashed"
|
|
136
|
+
})(m(({ theme: e }) => ({
|
|
137
|
+
position: "absolute",
|
|
138
|
+
marginTop: 0,
|
|
139
|
+
height: "100%",
|
|
140
|
+
width: "100%",
|
|
141
|
+
backgroundSize: "10px 10px",
|
|
142
|
+
backgroundPosition: "0 -23px",
|
|
143
|
+
variants: [{
|
|
144
|
+
props: { color: "inherit" },
|
|
145
|
+
style: {
|
|
146
|
+
opacity: .3,
|
|
147
|
+
backgroundImage: "radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"
|
|
148
|
+
}
|
|
149
|
+
}, ...Object.entries(e.palette).filter(g()).map(([t]) => {
|
|
150
|
+
let n = A(e, t);
|
|
151
|
+
return {
|
|
152
|
+
props: { color: t },
|
|
153
|
+
style: { backgroundImage: `radial-gradient(${n} 0%, ${n} 16%, transparent 42%)` }
|
|
154
|
+
};
|
|
155
|
+
})]
|
|
156
|
+
})), O || { animation: `${D} 3s infinite linear` }, m(({ theme: e }) => p(e, { animation: "none" }) || S)), N = u("span", {
|
|
157
|
+
name: "MuiLinearProgress",
|
|
158
|
+
slot: "Bar1",
|
|
159
|
+
overridesResolver: (e, t) => [t.bar, t.bar1]
|
|
160
|
+
})(m(({ theme: e }) => {
|
|
161
|
+
let t = p(e, {
|
|
162
|
+
animation: "none",
|
|
163
|
+
left: "30%",
|
|
164
|
+
right: "auto",
|
|
165
|
+
width: "40%"
|
|
166
|
+
});
|
|
167
|
+
return {
|
|
168
|
+
width: "100%",
|
|
169
|
+
position: "absolute",
|
|
170
|
+
left: 0,
|
|
171
|
+
bottom: 0,
|
|
172
|
+
top: 0,
|
|
173
|
+
...c(e, "transform", {
|
|
174
|
+
duration: "0.2s",
|
|
175
|
+
easing: "linear"
|
|
176
|
+
}),
|
|
177
|
+
transformOrigin: "left",
|
|
178
|
+
variants: [
|
|
179
|
+
{
|
|
180
|
+
props: { color: "inherit" },
|
|
181
|
+
style: { backgroundColor: "currentColor" }
|
|
182
|
+
},
|
|
183
|
+
...Object.entries(e.palette).filter(g()).map(([t]) => ({
|
|
184
|
+
props: { color: t },
|
|
185
|
+
style: { backgroundColor: (e.vars || e).palette[t].main }
|
|
186
|
+
})),
|
|
187
|
+
{
|
|
188
|
+
props: { variant: "determinate" },
|
|
189
|
+
style: { ...c(e, "transform", {
|
|
190
|
+
duration: `.${x}s`,
|
|
191
|
+
easing: "linear"
|
|
192
|
+
}) }
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
props: { variant: "buffer" },
|
|
196
|
+
style: {
|
|
197
|
+
zIndex: 1,
|
|
198
|
+
...c(e, "transform", {
|
|
199
|
+
duration: `.${x}s`,
|
|
200
|
+
easing: "linear"
|
|
201
|
+
})
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
props: ({ ownerState: e }) => e.variant === "indeterminate" || e.variant === "query",
|
|
206
|
+
style: { width: "auto" }
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
props: ({ ownerState: e }) => e.variant === "indeterminate" || e.variant === "query",
|
|
210
|
+
style: w || { animation: `${C} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite` }
|
|
211
|
+
},
|
|
212
|
+
...t ? [{
|
|
213
|
+
props: ({ ownerState: e }) => e.variant === "indeterminate" || e.variant === "query",
|
|
214
|
+
style: t
|
|
215
|
+
}] : []
|
|
216
|
+
]
|
|
217
|
+
};
|
|
218
|
+
})), P = u("span", {
|
|
219
|
+
name: "MuiLinearProgress",
|
|
220
|
+
slot: "Bar2",
|
|
221
|
+
overridesResolver: (e, t) => [t.bar, t.bar2]
|
|
222
|
+
})(m(({ theme: e }) => {
|
|
223
|
+
let t = p(e, {
|
|
224
|
+
animation: "none",
|
|
225
|
+
display: "none"
|
|
226
|
+
});
|
|
227
|
+
return {
|
|
228
|
+
width: "100%",
|
|
229
|
+
position: "absolute",
|
|
230
|
+
left: 0,
|
|
231
|
+
bottom: 0,
|
|
232
|
+
top: 0,
|
|
233
|
+
...c(e, "transform", {
|
|
234
|
+
duration: "0.2s",
|
|
235
|
+
easing: "linear"
|
|
236
|
+
}),
|
|
237
|
+
transformOrigin: "left",
|
|
238
|
+
variants: [
|
|
239
|
+
...Object.entries(e.palette).filter(g()).map(([t]) => ({
|
|
240
|
+
props: { color: t },
|
|
241
|
+
style: { "--LinearProgressBar2-barColor": (e.vars || e).palette[t].main }
|
|
242
|
+
})),
|
|
243
|
+
{
|
|
244
|
+
props: ({ ownerState: e }) => e.variant !== "buffer" && e.color !== "inherit",
|
|
245
|
+
style: { backgroundColor: "var(--LinearProgressBar2-barColor, currentColor)" }
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
props: ({ ownerState: e }) => e.variant !== "buffer" && e.color === "inherit",
|
|
249
|
+
style: { backgroundColor: "currentColor" }
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
props: { color: "inherit" },
|
|
253
|
+
style: { opacity: .3 }
|
|
254
|
+
},
|
|
255
|
+
...Object.entries(e.palette).filter(g()).map(([t]) => ({
|
|
256
|
+
props: {
|
|
257
|
+
color: t,
|
|
258
|
+
variant: "buffer"
|
|
259
|
+
},
|
|
260
|
+
style: {
|
|
261
|
+
backgroundColor: A(e, t),
|
|
262
|
+
...c(e, "transform", {
|
|
263
|
+
duration: `.${x}s`,
|
|
264
|
+
easing: "linear"
|
|
265
|
+
})
|
|
266
|
+
}
|
|
267
|
+
})),
|
|
268
|
+
{
|
|
269
|
+
props: ({ ownerState: e }) => e.variant === "indeterminate" || e.variant === "query",
|
|
270
|
+
style: { width: "auto" }
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
props: ({ ownerState: e }) => e.variant === "indeterminate" || e.variant === "query",
|
|
274
|
+
style: E || { animation: `${T} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite` }
|
|
275
|
+
},
|
|
276
|
+
...t ? [{
|
|
277
|
+
props: ({ ownerState: e }) => e.variant === "indeterminate" || e.variant === "query",
|
|
278
|
+
style: t
|
|
279
|
+
}] : []
|
|
280
|
+
]
|
|
281
|
+
};
|
|
282
|
+
})), F = /*#__PURE__*/ _.forwardRef(function(e, n) {
|
|
283
|
+
let r = d({
|
|
284
|
+
props: e,
|
|
285
|
+
name: "MuiLinearProgress"
|
|
286
|
+
}), { className: a, color: o = "primary", max: s, min: c, value: l, valueBuffer: u, variant: f = "indeterminate", ...p } = r, m = {
|
|
287
|
+
...r,
|
|
288
|
+
color: o,
|
|
289
|
+
variant: f
|
|
290
|
+
}, h = c ?? 0, g = s ?? 100, _ = k(m), v = t(), y = {}, x = {
|
|
291
|
+
bar1: {},
|
|
292
|
+
bar2: {}
|
|
293
|
+
};
|
|
294
|
+
if ((f === "determinate" || f === "buffer") && l !== void 0) {
|
|
295
|
+
let e = g - h, t = (l - h) / e * 100 - 100;
|
|
296
|
+
v && (t = -t), x.bar1.transform = e > 0 ? `translateX(${t}%)` : "translateX(-100%)", y["aria-valuenow"] = l, y["aria-valuemin"] = h, y["aria-valuemax"] = g;
|
|
297
|
+
}
|
|
298
|
+
if (f === "buffer" && u !== void 0) {
|
|
299
|
+
let e = g - h, t = (u - h) / e * 100 - 100;
|
|
300
|
+
v && (t = -t), x.bar2.transform = e > 0 ? `translateX(${t}%)` : "translateX(-100%)";
|
|
301
|
+
}
|
|
302
|
+
return /*#__PURE__*/ (0, b.jsxs)(j, {
|
|
303
|
+
className: i(_.root, a),
|
|
304
|
+
ownerState: m,
|
|
305
|
+
role: "progressbar",
|
|
306
|
+
...y,
|
|
307
|
+
ref: n,
|
|
308
|
+
...p,
|
|
309
|
+
children: [
|
|
310
|
+
f === "buffer" ? /*#__PURE__*/ (0, b.jsx)(M, {
|
|
311
|
+
className: _.dashed,
|
|
312
|
+
ownerState: m
|
|
313
|
+
}) : null,
|
|
314
|
+
/*#__PURE__*/ (0, b.jsx)(N, {
|
|
315
|
+
className: _.bar1,
|
|
316
|
+
ownerState: m,
|
|
317
|
+
style: x.bar1
|
|
318
|
+
}),
|
|
319
|
+
f === "determinate" ? null : /*#__PURE__*/ (0, b.jsx)(P, {
|
|
320
|
+
className: _.bar2,
|
|
321
|
+
ownerState: m,
|
|
322
|
+
style: x.bar2
|
|
323
|
+
})
|
|
324
|
+
]
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
export { y as n, F as t };
|