@empoweredvote/ev-ui 0.5.0 → 0.5.1
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/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1624,7 +1624,8 @@ function PoliticianCard({
|
|
|
1624
1624
|
},
|
|
1625
1625
|
imageWrapper: {
|
|
1626
1626
|
width: isHorizontal ? "90px" : "100%",
|
|
1627
|
-
height: isHorizontal ?
|
|
1627
|
+
height: isHorizontal ? "100%" : "auto",
|
|
1628
|
+
maxHeight: isHorizontal ? "200px" : void 0,
|
|
1628
1629
|
aspectRatio: isHorizontal ? void 0 : "4/5",
|
|
1629
1630
|
flexShrink: 0,
|
|
1630
1631
|
overflow: "hidden"
|
|
@@ -2360,7 +2361,7 @@ function CompassCardHorizontal({
|
|
|
2360
2361
|
"Calibrate your compass"
|
|
2361
2362
|
));
|
|
2362
2363
|
}
|
|
2363
|
-
function renderUnavailablePlate() {
|
|
2364
|
+
function renderUnavailablePlate(message = "Compass currently unavailable for this role.") {
|
|
2364
2365
|
return /* @__PURE__ */ import_react13.default.createElement("div", { style: {
|
|
2365
2366
|
width: "100%",
|
|
2366
2367
|
height: "100%",
|
|
@@ -2379,12 +2380,16 @@ function CompassCardHorizontal({
|
|
|
2379
2380
|
maxWidth: "180px",
|
|
2380
2381
|
margin: 0,
|
|
2381
2382
|
fontFamily: fonts.primary
|
|
2382
|
-
} },
|
|
2383
|
+
} }, message));
|
|
2383
2384
|
}
|
|
2384
2385
|
function renderSlotContent() {
|
|
2385
2386
|
if (view === "portrait") return renderPortrait();
|
|
2386
2387
|
if (variant === "empty") return renderEmptyVariant();
|
|
2387
2388
|
if (variant === "administrative" || variant === "judicial") return renderUnavailablePlate();
|
|
2389
|
+
if (variant === "no-stances") {
|
|
2390
|
+
const name = (politician == null ? void 0 : politician.full_name) || "this official";
|
|
2391
|
+
return renderUnavailablePlate(`No compass stances on file for ${name} yet.`);
|
|
2392
|
+
}
|
|
2388
2393
|
return /* @__PURE__ */ import_react13.default.createElement("div", { style: {
|
|
2389
2394
|
width: "100%",
|
|
2390
2395
|
height: "100%",
|