@astrato-io/visualizations 0.0.0-stage → 0.6.5

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.
Files changed (139) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE +93 -0
  3. package/README.md +843 -2
  4. package/THIRD_PARTY_NOTICES.md +8477 -0
  5. package/VISUALIZATION_DEFINITIONS.md +2378 -0
  6. package/chunks/ClickAwayListener-BbeNMAvj.js +52 -0
  7. package/chunks/LinearProgress-B1FeWaen.js +253 -0
  8. package/chunks/accessors-DemrDevR.js +128 -0
  9. package/chunks/app-filter-bar.compiler-BGJ7HAbr.js +64 -0
  10. package/chunks/bar.compiler-CT0ZbQKc.js +374 -0
  11. package/chunks/builder-B6dWSIdD.js +12289 -0
  12. package/chunks/color-settings-ZIvgNTq1.js +10 -0
  13. package/chunks/coloring-B1XAfg6b.js +664 -0
  14. package/chunks/debounce-fn-CUixuz45.js +7 -0
  15. package/chunks/definitions-D3OVqmXl.js +2102 -0
  16. package/chunks/escobar-eDjtGpkC.js +34606 -0
  17. package/chunks/events-WZut5Ow6.js +4 -0
  18. package/chunks/extend-BKUkc4_i.js +37 -0
  19. package/chunks/filter.compiler-DBsyRBJt.js +70 -0
  20. package/chunks/filtering-tqjAyJH5.js +1072 -0
  21. package/chunks/grouping-type-On4s9Thj.js +3 -0
  22. package/chunks/handlers-VTBfIZYZ.js +13072 -0
  23. package/chunks/isEqual-BDxAhUo8.js +7514 -0
  24. package/chunks/line.compiler-CzdM5Ld0.js +198 -0
  25. package/chunks/metadata-BGElBy5Z.js +28 -0
  26. package/chunks/number.compiler-G-R7y16P.js +53 -0
  27. package/chunks/operations-CTNUX6Sy.js +26249 -0
  28. package/chunks/range-CiwTbMig.js +22 -0
  29. package/chunks/registry-CsQQzukD.js +920 -0
  30. package/chunks/requirements-DYjZCFyf.js +6 -0
  31. package/chunks/rolldown-runtime-DleVn1XH.js +28 -0
  32. package/chunks/set-coloring-datafield-B3uIS1Pe.js +8 -0
  33. package/chunks/shared-CBvcC5YV.js +1218 -0
  34. package/chunks/src-BOS6SqkZ.js +67 -0
  35. package/chunks/src-D9XogOrc.js +422 -0
  36. package/chunks/standalone-0M4HlmDW2.js +3944 -0
  37. package/chunks/standalone-0ashe9w1.js +411 -0
  38. package/chunks/standalone-B7jax8wa.js +339 -0
  39. package/chunks/standalone-BK0VYU-l.js +463 -0
  40. package/chunks/standalone-BMIbT1b2.js +4619 -0
  41. package/chunks/standalone-BZV5vOwA.js +6 -0
  42. package/chunks/standalone-BhDrWj4p.js +1980 -0
  43. package/chunks/standalone-BtSHCp2U2.js +673 -0
  44. package/chunks/standalone-BvaKdky9.js +344 -0
  45. package/chunks/standalone-BwtM31-f.js +2 -0
  46. package/chunks/standalone-C3gg736V.js +1129 -0
  47. package/chunks/standalone-CC1VUjO32.js +299 -0
  48. package/chunks/standalone-C_rYnZ0N.js +741 -0
  49. package/chunks/standalone-CoLrAxRV.js +13198 -0
  50. package/chunks/standalone-DC-aUgXC.js +3855 -0
  51. package/chunks/standalone-DCtRoTWg.js +675 -0
  52. package/chunks/standalone-DUDFTBqL.js +833 -0
  53. package/chunks/standalone-DhZkX9Td.js +2 -0
  54. package/chunks/standalone-DtLElfuM.js +512 -0
  55. package/chunks/standalone-G9Q4Uczu.js +726 -0
  56. package/chunks/standalone-JuLF-OoH.js +1762 -0
  57. package/chunks/standalone-_DeX21JJ.js +383 -0
  58. package/chunks/standalone-gFhKZh8m.js +179 -0
  59. package/chunks/standalone-tDNy-SFH.js +281 -0
  60. package/chunks/standalone-v1oxfU20.js +68 -0
  61. package/chunks/standalone-vzBY6q0I2.js +140 -0
  62. package/chunks/stroke-dash-UgMEcCS4.js +6 -0
  63. package/chunks/table.compiler-tb914oj3.js +222 -0
  64. package/chunks/typeof-CJDtcySz.js +13 -0
  65. package/chunks/ui-DQWtv2iM.js +63551 -0
  66. package/chunks/url-utils-B17gj_mr.js +5501 -0
  67. package/chunks/useFieldName-BvdcoJRl.js +7 -0
  68. package/chunks/utils-Bg7K-t6K.js +32379 -0
  69. package/chunks/view-Bn83C8d9.js +12466 -0
  70. package/definitions.js +3 -0
  71. package/docs/operations/astrato-app-filter-bar.md +161 -0
  72. package/docs/operations/bar.md +6968 -0
  73. package/docs/operations/combo.md +5804 -0
  74. package/docs/operations/date-picker.md +644 -0
  75. package/docs/operations/distribution-gauge.md +3082 -0
  76. package/docs/operations/dot.md +5570 -0
  77. package/docs/operations/filter.md +1483 -0
  78. package/docs/operations/gauge.md +3316 -0
  79. package/docs/operations/heatMap.md +5944 -0
  80. package/docs/operations/histogram.md +1856 -0
  81. package/docs/operations/iframe.md +56 -0
  82. package/docs/operations/image.md +177 -0
  83. package/docs/operations/index.md +46 -0
  84. package/docs/operations/line.md +6391 -0
  85. package/docs/operations/number.md +3903 -0
  86. package/docs/operations/pie.md +5956 -0
  87. package/docs/operations/radar.md +4566 -0
  88. package/docs/operations/sankey.md +3088 -0
  89. package/docs/operations/scatter.md +5969 -0
  90. package/docs/operations/shape.md +315 -0
  91. package/docs/operations/simpleTextObject.md +699 -0
  92. package/docs/operations/slider.md +220 -0
  93. package/docs/operations/table.md +8800 -0
  94. package/docs/operations/tree.md +2867 -0
  95. package/docs/operations/treemap.md +3527 -0
  96. package/docs/operations/waterfall.md +2928 -0
  97. package/docs/operations/word-cloud.md +3000 -0
  98. package/getters.js +18 -0
  99. package/index.js +1183 -0
  100. package/metadata.js +20 -0
  101. package/operations.js +64 -0
  102. package/package.json +185 -4
  103. package/src/definitions/index.d.ts +2 -0
  104. package/src/definitions/model/definitions/available-fields.d.ts +35 -0
  105. package/src/definitions/model/definitions/compilers/compile.d.ts +7 -0
  106. package/src/definitions/model/definitions/data-item-resolution.d.ts +19 -0
  107. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +1341 -0
  108. package/src/definitions/model/definitions/descriptors/json-schema.d.ts +2 -0
  109. package/src/definitions/model/definitions/diagnostics.d.ts +5 -0
  110. package/src/definitions/model/definitions/field-suggestions.d.ts +2 -0
  111. package/src/definitions/model/definitions/index.d.ts +23 -0
  112. package/src/definitions/model/definitions/registry/compile.d.ts +2 -0
  113. package/src/definitions/model/definitions/registry/descriptor-registry.d.ts +3 -0
  114. package/src/definitions/model/definitions/schema-registry.d.ts +660 -0
  115. package/src/definitions/model/definitions/schemas/app-filter-bar.schema.d.ts +22 -0
  116. package/src/definitions/model/definitions/schemas/bar.schema.d.ts +73 -0
  117. package/src/definitions/model/definitions/schemas/broad-chart.schema.d.ts +68 -0
  118. package/src/definitions/model/definitions/schemas/common.schema.d.ts +303 -0
  119. package/src/definitions/model/definitions/schemas/filter.schema.d.ts +22 -0
  120. package/src/definitions/model/definitions/schemas/index.d.ts +9 -0
  121. package/src/definitions/model/definitions/schemas/line.schema.d.ts +72 -0
  122. package/src/definitions/model/definitions/schemas/number.schema.d.ts +21 -0
  123. package/src/definitions/model/definitions/schemas/object.schema.d.ts +215 -0
  124. package/src/definitions/model/definitions/schemas/table.schema.d.ts +458 -0
  125. package/src/definitions/model/definitions/types/compilation.types.d.ts +36 -0
  126. package/src/definitions/model/definitions/types/definition.types.d.ts +2 -0
  127. package/src/definitions/model/definitions/types/descriptor.types.d.ts +39 -0
  128. package/src/definitions/model/definitions/types/index.d.ts +3 -0
  129. package/src/definitions/model/definitions/validation.d.ts +3 -0
  130. package/src/getters/index.d.ts +30 -0
  131. package/src/index.d.ts +4 -0
  132. package/src/metadata/index.d.ts +4 -0
  133. package/src/operations/index.d.ts +30 -0
  134. package/src/registry/index.d.ts +6 -0
  135. package/src/runtime/index.d.ts +2 -0
  136. package/src/types.d.ts +307 -0
  137. package/src/visualization-catalog.d.ts +82 -0
  138. package/src/web-components/index.d.ts +12 -0
  139. package/styles.css +2 -0
@@ -0,0 +1,299 @@
1
+ import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
+ import { An as t, Fa as n, Ma as r, Mo as i, Na as a, Sa as o, Si as s, Ti as c, as as l, fc as u, ja as d, os as f } from "./isEqual-BDxAhUo8.js";
3
+ import { $t as p, Ei as m, G as h, Kn as g, Yi as _, d as v, hn as y } from "./utils-Bg7K-t6K.js";
4
+ import { u as b } from "./ui-DQWtv2iM.js";
5
+ import { _ as x } from "./coloring-B1XAfg6b.js";
6
+ var S = /* @__PURE__ */ e(_()), C = (e, t) => {
7
+ switch (e.thresholdType) {
8
+ case a.Range: return T(t, e.rangeThresholds ?? []);
9
+ case a.Target: return w(t, e.targetThreshold);
10
+ case a.None: return {};
11
+ }
12
+ }, w = (e, n) => {
13
+ let r = t(n?.target, 0), { belowTargetColorAndIcon: i, targetColorAndIcon: a, aboveTargetColorAndIcon: o } = n || {};
14
+ return e < r * (1 - n.targetTolerance) ? i : e > r * (1 + n.targetTolerance) ? o : a;
15
+ }, T = (e, n) => [...n].sort((e, n) => t(n.rangeTo, 0) - t(e.rangeTo, 0)).reduce((n, r) => e < t(r.rangeTo, 0) ? r.colorAndIcon : n, {}), E = (e) => {
16
+ let t = ["numberColor"], n = ["comparisonColor"];
17
+ switch (e) {
18
+ case "main": return t;
19
+ case "comparison": return n;
20
+ case "both": return [...t, ...n];
21
+ }
22
+ }, D = (e, t, n) => n.reduce((n, r) => t in e ? {
23
+ ...n,
24
+ [r]: e[t]
25
+ } : n, {}), O = {
26
+ numberColor: "#1f1c3b",
27
+ iconColor: "#1f1c3b",
28
+ iconPosition: i.Left,
29
+ comparisonColor: "#1f1c3b",
30
+ comparisonPosition: i.Bottom
31
+ }, k = {
32
+ numberValue: 0,
33
+ textAlign: l.Center,
34
+ horizontalAlign: l.Center,
35
+ verticalAlign: f.Middle,
36
+ numberStyle: {
37
+ fontSize: 12,
38
+ fontFamily: "Roboto",
39
+ bold: !1,
40
+ italic: !1,
41
+ underlined: !1,
42
+ strikethrough: !1
43
+ },
44
+ comparisonStyle: {
45
+ relativeFontSizePercentage: c.relativeFontSizePercentage,
46
+ fontFamily: "Roboto",
47
+ bold: !1,
48
+ italic: !1,
49
+ underlined: !1,
50
+ strikethrough: !1
51
+ },
52
+ comparisonGap: d.SmallGap,
53
+ ...O
54
+ }, A = (e, t, r) => {
55
+ if (!r?.length || !e) return k;
56
+ let i = t || o, a = i.fonts.general.fontFamily, c = F(r, e.measures.find((e) => s(e) && e.role === n.NUMBER_MEASURE), !0), { numberValue: l, numberFormat: u, comparisonNumberValue: d, comparisonFormat: f } = j(e, r);
57
+ return {
58
+ ...N(e, i, c, d),
59
+ numberValue: l,
60
+ numberFormat: u,
61
+ comparisonNumberValue: d,
62
+ comparisonFormat: f,
63
+ numberStyle: {
64
+ fontSize: e.numberSettings?.numberStyle?.fontSize ?? k.numberStyle.fontSize,
65
+ fontFamily: e.numberSettings?.numberStyle?.fontFamily ?? a,
66
+ bold: e.numberSettings?.numberStyle?.bold ?? k.numberStyle.bold,
67
+ weight: e.numberSettings?.numberStyle?.weight,
68
+ italic: e.numberSettings?.numberStyle?.italic ?? k.numberStyle.italic,
69
+ underlined: e.numberSettings?.numberStyle?.underlined ?? k.numberStyle.underlined,
70
+ strikethrough: e.numberSettings?.numberStyle?.strikethrough ?? k.numberStyle.strikethrough
71
+ },
72
+ comparisonStyle: {
73
+ relativeFontSizePercentage: e.numberSettings?.comparisonStyle?.relativeFontSizePercentage ?? k.comparisonStyle.relativeFontSizePercentage,
74
+ fontFamily: e.numberSettings?.comparisonStyle?.fontFamily ?? a,
75
+ bold: e.numberSettings?.comparisonStyle?.bold ?? k.comparisonStyle.bold,
76
+ weight: e.numberSettings?.comparisonStyle?.weight,
77
+ italic: e.numberSettings?.comparisonStyle?.italic ?? k.comparisonStyle.italic,
78
+ underlined: e.numberSettings?.comparisonStyle?.underlined ?? k.comparisonStyle.underlined,
79
+ strikethrough: e.numberSettings?.comparisonStyle?.strikethrough ?? k.comparisonStyle.strikethrough
80
+ },
81
+ textAlign: e.numberSettings?.position?.textAlign ?? k.textAlign,
82
+ horizontalAlign: e.numberSettings?.position?.numberHorizontalAlign ?? k.horizontalAlign,
83
+ verticalAlign: e.numberSettings?.position?.numberVerticalAlign ?? k.verticalAlign,
84
+ comparisonGap: e.numberSettings?.position?.comparisonGap ?? k.comparisonGap
85
+ };
86
+ }, j = (e, t) => {
87
+ let r, i, a, o, c = e.measures.filter(s), l = c.filter((e) => e.role === n.NUMBER_MEASURE), u = c.filter((e) => e.role === n.NUMBER_COMPARISON), d = l[0], f = u[0];
88
+ return r = F(t, d, !0), a = M(e, t), d?.formatter && typeof d?.formatter?.format != "string" && (i = d.formatter), f?.formatter && typeof f?.formatter?.format != "string" && (o = f.formatter), f && e.numberSettings?.data?.showOnlyComparison && (r = a, i = o, a = void 0, o = void 0), {
89
+ numberValue: r,
90
+ numberFormat: i,
91
+ comparisonNumberValue: a,
92
+ comparisonFormat: o
93
+ };
94
+ }, M = (e, t) => {
95
+ let i = e.measures.filter(s), a = i.filter((e) => e.role === n.NUMBER_MEASURE), o = i.filter((e) => e.role === n.NUMBER_COMPARISON), c = a[0], l = o[0];
96
+ if (!l) return;
97
+ let u = +F(t, c), d = +F(t, l), f = e.numberSettings?.data?.comparisonType, p = Math.abs(d);
98
+ return f === r.PercentageToComparison ? u === 0 && d === 0 ? 1 : u / p : f === r.PercentageAboveBelow ? u === 0 && d === 0 ? 0 : (u - d) / p : f === r.Difference ? u - d : d;
99
+ }, N = (e, t, r, i) => {
100
+ let o = e.measures.filter(s), c = o.filter((e) => e.role === n.NUMBER_MEASURE), l = o.filter((e) => e.role === n.NUMBER_COMPARISON), u = c[0], d = l[0];
101
+ return (e.numberSettings?.thresholds ?? []).filter((e) => e.thresholdType !== a.None).reduce((e, t) => {
102
+ if (t.measureRule === "main" ? u : d) {
103
+ let n = C(t, t.measureRule === "main" ? r : i);
104
+ return {
105
+ ...e,
106
+ ...D(n, "icon", ["icon"]),
107
+ ...D(n, "iconColor", ["iconColor"]),
108
+ ...D(n, "numberColor", E(t.colorRule)),
109
+ backgroundColor: n.backgroundColor ?? e.backgroundColor
110
+ };
111
+ }
112
+ return e;
113
+ }, P(e, t));
114
+ }, P = (e, t) => {
115
+ let { icon: n, iconColor: r } = e.numberSettings?.colorAndIcon || {};
116
+ return {
117
+ icon: n,
118
+ iconColor: x(t, r ?? "black"),
119
+ iconPosition: e?.numberSettings?.position?.iconPosition ?? i.Left,
120
+ numberColor: x(t, e?.numberSettings?.numberStyle?.fontColor ?? t.fonts.general.color),
121
+ ...I(e, t, e.numberSettings?.comparisonStyle?.fontColor)
122
+ };
123
+ }, F = (e, t, n = !1) => {
124
+ let r = u(t?.dataItem), i = (e?.[0])?.items?.[0]?.[r], a = +`${i}`, o = n && (!t?.formatter || t?.formatter?.format === "string") ? `${i}` : 0;
125
+ return isNaN(a) ? o : a;
126
+ }, I = (e, t, r) => !e.measures.filter(s).filter((e) => e.role === n.NUMBER_COMPARISON)[0] || e.numberSettings.data?.showOnlyComparison ? {
127
+ comparisonPosition: void 0,
128
+ comparisonColor: void 0
129
+ } : {
130
+ comparisonColor: x(t, r ?? t.fonts.general.color),
131
+ comparisonPosition: e.numberSettings?.position?.comparisonPosition ?? i.Left
132
+ }, L = h({
133
+ mainContainer: {
134
+ width: "100%",
135
+ height: "100%",
136
+ display: "flex",
137
+ lineHeight: 1,
138
+ overflow: "hidden"
139
+ },
140
+ numbersContainer: {
141
+ display: "flex",
142
+ justifyContent: "center",
143
+ letterSpacing: "0.05em"
144
+ },
145
+ number: { fontSize: "1em" },
146
+ comparisonIconContainer: {
147
+ display: "flex",
148
+ justifyContent: "center"
149
+ }
150
+ }), R = (e) => {
151
+ switch (e) {
152
+ case f.Top:
153
+ case l.Left: return "flex-start";
154
+ case f.Bottom:
155
+ case l.Right: return "flex-end";
156
+ default: return "center";
157
+ }
158
+ }, z = (e) => {
159
+ let t = e.comparisonPosition ?? e.iconPosition;
160
+ return t === i.Top || t === i.Bottom ? R(e.textAlign) : "center";
161
+ }, B = (e, t, n, r = !1) => {
162
+ let i, a, o = 0;
163
+ r && Math.floor(e) !== e && (o = e.toString().split(".")[1].length || 0);
164
+ let s = async (c) => {
165
+ a === void 0 && (a = c);
166
+ let l = c - a, u = Math.min(l / 500, 1), d = t + (e - t) * u;
167
+ r && (d = Number(d.toFixed(o))), n(d), l < 500 ? i = requestAnimationFrame(s) : (n(e), cancelAnimationFrame(i));
168
+ };
169
+ return e !== t && (i = requestAnimationFrame(s)), () => cancelAnimationFrame(i);
170
+ }, V = .5, H = `${V}em`, U = (e, t) => !(t === i.Left || t === i.Right) || !e || e === d.None ? {} : e === d.SmallGap ? { gap: H } : {
171
+ width: "100%",
172
+ justifyContent: e
173
+ }, W = (e, t) => e ? t === i.Top || t === i.Bottom ? "0.33em" : "0.5em" : t === i.Top || t === i.Bottom ? "0.5em" : "1.0em", G = (e) => {
174
+ switch (e) {
175
+ case i.Top: return "column";
176
+ case i.Bottom: return "column-reverse";
177
+ case i.Right: return "row-reverse";
178
+ default: return "row";
179
+ }
180
+ }, K = (e, t) => !e && !t ? "inherit" : `${e ? "underline" : ""} ${t ? "line-through" : ""}`, q = ({ numberSize: e, comparisonNumberSize: t, numberProps: n, elementSize: r, fontSize: a }) => {
181
+ let o = n.comparisonNumberValue != null && !!t && (n.comparisonPosition === i.Left || n.comparisonPosition === i.Right), s = !!n.icon && (n.iconPosition === i.Left || n.iconPosition === i.Right), c = o ? e.width + t.width : Math.max(e.width, t?.width ?? 0);
182
+ return o && n.comparisonGap === d.SmallGap && (c += V * a), s && (c += e.height), c <= r.width;
183
+ }, J = ({ numberSize: e, comparisonNumberSize: t, numberProps: n, elementSize: r }) => {
184
+ let a = n.comparisonNumberValue != null && !!t && (n.comparisonPosition === i.Top || n.comparisonPosition === i.Bottom), o = !!n.icon && (n.iconPosition === i.Top || n.iconPosition === i.Bottom), s = a ? e.height + t.height : Math.max(e.height, t?.height ?? 0);
185
+ return o && (s += e.height), s <= r.height;
186
+ }, Y = 1.2, X = ({ number: e, comparisonNumber: t }, n, r) => {
187
+ let { numberStyle: i, comparisonStyle: a } = n;
188
+ if (r.width === 0) return i.fontSize;
189
+ let o = g(), s = (a.relativeFontSizePercentage ?? c.relativeFontSizePercentage) / 100, l = 1;
190
+ for (let c = i.fontSize; c >= 1; --c) {
191
+ let u, d;
192
+ if (e && (u = {
193
+ width: o.getTextSize({
194
+ size: c,
195
+ label: e,
196
+ fontFamily: i.fontFamily,
197
+ letterSpacing: "0.05em",
198
+ fontWeight: 400
199
+ }).width,
200
+ height: c * Y
201
+ }), t) {
202
+ let e = c * s;
203
+ d = {
204
+ width: o.getTextSize({
205
+ size: e,
206
+ label: t,
207
+ fontFamily: a.fontFamily,
208
+ letterSpacing: "0.05em",
209
+ fontWeight: 400
210
+ }).width,
211
+ height: e * Y
212
+ };
213
+ }
214
+ if (q({
215
+ numberSize: u,
216
+ comparisonNumberSize: d,
217
+ numberProps: n,
218
+ elementSize: r,
219
+ fontSize: c
220
+ }) && J({
221
+ numberSize: u,
222
+ comparisonNumberSize: d,
223
+ numberProps: n,
224
+ elementSize: r,
225
+ fontSize: c
226
+ })) {
227
+ l = c;
228
+ break;
229
+ }
230
+ }
231
+ return o.cleanDOM(), l;
232
+ }, Z = m(), Q = p((0, S.memo)(({ vSpec: e, vTheme: t, elementSize: n, data: r, vizProperties: i }) => {
233
+ let [a, o] = (0, S.useState)(0), s = L(), l = v(), u = A(e, t, r), { numberValue: d, numberFormat: f, comparisonNumberValue: p, comparisonFormat: m, backgroundColor: h } = u, g = a, _ = f ? y(f, a) : a, x = m ? y(m, p) : p, C = _ === "" || _ == null, w = C ? void 0 : `${_}`, T = x === "" || x == null ? void 0 : `${x}`, E = C ? u.numberStyle.fontSize || 14 : X({
234
+ number: w,
235
+ comparisonNumber: T
236
+ }, u, n);
237
+ return (0, S.useEffect)(() => {
238
+ let e;
239
+ return !i?.disable?.animations && typeof d == "number" ? (typeof g != "number" && (o(0), g = 0), e = B(d, g, o, !f)) : o(d), () => {
240
+ e && e();
241
+ };
242
+ }, [d]), (0, S.useEffect)(() => {
243
+ e && l();
244
+ }, [e]), /* @__PURE__ */ (0, Z.jsx)("div", {
245
+ className: s.mainContainer,
246
+ style: {
247
+ fontSize: `${E}px`,
248
+ alignItems: R(u.verticalAlign),
249
+ justifyContent: R(u.horizontalAlign),
250
+ backgroundColor: h
251
+ },
252
+ children: /* @__PURE__ */ (0, Z.jsxs)("div", {
253
+ className: s.numbersContainer,
254
+ style: {
255
+ alignItems: z(u),
256
+ flexDirection: G(u.comparisonPosition ?? u.iconPosition),
257
+ ...U(u.comparisonGap, u.comparisonPosition)
258
+ },
259
+ children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
260
+ className: s.comparisonIconContainer,
261
+ style: {
262
+ alignItems: R(u.textAlign),
263
+ flexDirection: G(u.iconPosition)
264
+ },
265
+ children: [/* @__PURE__ */ (0, Z.jsx)(b, {
266
+ name: u.icon,
267
+ testId: "indicator-icon",
268
+ style: {
269
+ fontSize: W(u.comparisonPosition, u.iconPosition),
270
+ color: u.iconColor ?? "inherit"
271
+ }
272
+ }), /* @__PURE__ */ (0, Z.jsx)("div", {
273
+ "data-testid": "number-comparison",
274
+ style: {
275
+ fontSize: `${(u.comparisonStyle.relativeFontSizePercentage ?? c.relativeFontSizePercentage) / 100}em`,
276
+ fontFamily: u.comparisonStyle.fontFamily,
277
+ fontStyle: u.comparisonStyle.italic ? "italic" : "normal",
278
+ fontWeight: u.comparisonStyle.weight || (u.comparisonStyle.bold ? "bold" : "normal"),
279
+ textDecoration: K(u.comparisonStyle.underlined, u.comparisonStyle.strikethrough),
280
+ color: u.comparisonColor ?? "inherit"
281
+ },
282
+ children: T
283
+ })]
284
+ }), /* @__PURE__ */ (0, Z.jsx)("div", {
285
+ className: s.number,
286
+ "data-testid": "number-base",
287
+ style: {
288
+ fontFamily: u.numberStyle.fontFamily,
289
+ fontStyle: u.numberStyle.italic ? "italic" : "normal",
290
+ fontWeight: u.numberStyle.weight || (u.numberStyle.bold ? "bold" : "normal"),
291
+ textDecoration: K(u.numberStyle.underlined, u.numberStyle.strikethrough),
292
+ color: u.numberColor
293
+ },
294
+ children: f && typeof a == "number" ? y(f, a) : a
295
+ })]
296
+ })
297
+ });
298
+ }));
299
+ export { Q as Number };