impaktapps-design 0.2.993-alpha.252 → 0.2.993-alpha.253
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.
|
@@ -18147,7 +18147,7 @@ function Legend({
|
|
|
18147
18147
|
theme,
|
|
18148
18148
|
style: style2
|
|
18149
18149
|
}) {
|
|
18150
|
-
var _a, _b;
|
|
18150
|
+
var _a, _b, _c, _d;
|
|
18151
18151
|
const legendGlyphSize = 16;
|
|
18152
18152
|
const defaultColour = (_b = (_a = theme == null ? void 0 : theme.palette) == null ? void 0 : _a.primary) == null ? void 0 : _b.main;
|
|
18153
18153
|
const ordinalColorScale = createOrdinalScale$1({
|
|
@@ -18171,7 +18171,7 @@ function Legend({
|
|
|
18171
18171
|
},
|
|
18172
18172
|
children: [/* @__PURE__ */ jsx$1("div", {
|
|
18173
18173
|
className: "title",
|
|
18174
|
-
children: value.main.legend.legendTitle
|
|
18174
|
+
children: (_d = (_c = value.main) == null ? void 0 : _c.legend) == null ? void 0 : _d.legendTitle
|
|
18175
18175
|
}), /* @__PURE__ */ jsx$1(Ordinal, {
|
|
18176
18176
|
scale: ordinalColorScale,
|
|
18177
18177
|
labelFormat: (label) => `${label}`,
|
|
@@ -18185,41 +18185,44 @@ function Legend({
|
|
|
18185
18185
|
paddingLeft: smallScreen ? "25px" : void 0,
|
|
18186
18186
|
...style2
|
|
18187
18187
|
},
|
|
18188
|
-
children: labels.map((label, i) =>
|
|
18189
|
-
|
|
18190
|
-
|
|
18191
|
-
|
|
18192
|
-
|
|
18193
|
-
|
|
18194
|
-
|
|
18195
|
-
|
|
18196
|
-
|
|
18197
|
-
|
|
18198
|
-
|
|
18199
|
-
|
|
18200
|
-
|
|
18201
|
-
|
|
18202
|
-
|
|
18203
|
-
children: /* @__PURE__ */ jsx$1("rect", {
|
|
18204
|
-
fill: label.value,
|
|
18188
|
+
children: labels.map((label, i) => {
|
|
18189
|
+
var _a2, _b2;
|
|
18190
|
+
return /* @__PURE__ */ jsxs(LegendItem, {
|
|
18191
|
+
margin: "0 5px",
|
|
18192
|
+
...value.main.legendDirection === "column" && !smallScreen ? {
|
|
18193
|
+
style: {
|
|
18194
|
+
display: "flex",
|
|
18195
|
+
flexDirection: "row"
|
|
18196
|
+
}
|
|
18197
|
+
} : {},
|
|
18198
|
+
children: [/* @__PURE__ */ jsx$1("div", {
|
|
18199
|
+
style: {
|
|
18200
|
+
minWidth: smallScreen ? 20 : void 0
|
|
18201
|
+
},
|
|
18202
|
+
children: /* @__PURE__ */ jsx$1("svg", {
|
|
18205
18203
|
width: legendGlyphSize,
|
|
18206
18204
|
height: legendGlyphSize,
|
|
18207
|
-
|
|
18208
|
-
|
|
18205
|
+
children: /* @__PURE__ */ jsx$1("rect", {
|
|
18206
|
+
fill: label.value,
|
|
18207
|
+
width: legendGlyphSize,
|
|
18208
|
+
height: legendGlyphSize,
|
|
18209
|
+
rx: legendGlyphSize / 2,
|
|
18210
|
+
ry: legendGlyphSize / 2
|
|
18211
|
+
})
|
|
18209
18212
|
})
|
|
18210
|
-
})
|
|
18211
|
-
|
|
18212
|
-
|
|
18213
|
-
|
|
18214
|
-
|
|
18215
|
-
|
|
18216
|
-
|
|
18217
|
-
|
|
18218
|
-
|
|
18219
|
-
|
|
18220
|
-
|
|
18221
|
-
})
|
|
18222
|
-
}
|
|
18213
|
+
}), /* @__PURE__ */ jsx$1(LegendLabel, {
|
|
18214
|
+
align: `${((_b2 = (_a2 = value.main) == null ? void 0 : _a2.legend) == null ? void 0 : _b2.align) || "left"}`,
|
|
18215
|
+
margin: "0 0 0 4px",
|
|
18216
|
+
style: {
|
|
18217
|
+
fontSize: "13px",
|
|
18218
|
+
marginLeft: "5px",
|
|
18219
|
+
color: label.value,
|
|
18220
|
+
marginBottom: smallScreen ? "5px" : void 0
|
|
18221
|
+
},
|
|
18222
|
+
children: label.text
|
|
18223
|
+
})]
|
|
18224
|
+
}, `legend-quantile-${i}`);
|
|
18225
|
+
})
|
|
18223
18226
|
})
|
|
18224
18227
|
})]
|
|
18225
18228
|
});
|