@empoweredvote/ev-ui 0.3.0 → 0.4.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/dist/index.js +207 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +200 -44
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,7 +34,9 @@ __export(index_exports, {
|
|
|
34
34
|
BranchIcon: () => BranchIcon,
|
|
35
35
|
CategorySection: () => CategorySection,
|
|
36
36
|
CommitteeTable: () => CommitteeTable,
|
|
37
|
+
CompassCoverageCallout: () => CompassCoverageCallout,
|
|
37
38
|
CompassIcon: () => CompassIcon,
|
|
39
|
+
ExpandCompassNudge: () => ExpandCompassNudge,
|
|
38
40
|
FilterSidebar: () => FilterSidebar,
|
|
39
41
|
GovernmentBodySection: () => GovernmentBodySection,
|
|
40
42
|
Header: () => Header,
|
|
@@ -56,6 +58,7 @@ __export(index_exports, {
|
|
|
56
58
|
breakpoints: () => breakpoints,
|
|
57
59
|
colorScales: () => colorScales,
|
|
58
60
|
colors: () => colors,
|
|
61
|
+
computeTierCoverage: () => computeTierCoverage,
|
|
59
62
|
dataVizPalette: () => dataVizPalette,
|
|
60
63
|
defaultCtaButton: () => defaultCtaButton,
|
|
61
64
|
defaultNavItems: () => defaultNavItems,
|
|
@@ -4253,15 +4256,168 @@ function TopicTierBadge({
|
|
|
4253
4256
|
);
|
|
4254
4257
|
}
|
|
4255
4258
|
|
|
4256
|
-
// src/
|
|
4259
|
+
// src/CompassCoverageCallout.jsx
|
|
4260
|
+
var import_react21 = __toESM(require("react"));
|
|
4261
|
+
var TIER_LABELS = {
|
|
4262
|
+
federal: "federal",
|
|
4263
|
+
state: "state",
|
|
4264
|
+
local: "local"
|
|
4265
|
+
};
|
|
4266
|
+
function CompassCoverageCallout({
|
|
4267
|
+
tier,
|
|
4268
|
+
count,
|
|
4269
|
+
totalSelected,
|
|
4270
|
+
compassUrl,
|
|
4271
|
+
onDismiss
|
|
4272
|
+
}) {
|
|
4273
|
+
const [dismissed, setDismissed] = (0, import_react21.useState)(false);
|
|
4274
|
+
if (dismissed) return null;
|
|
4275
|
+
const tierLabel = TIER_LABELS[tier] || tier;
|
|
4276
|
+
const tierStyle = tierColors[tier] || tierColors.federal;
|
|
4277
|
+
const containerStyle2 = {
|
|
4278
|
+
display: "flex",
|
|
4279
|
+
alignItems: "flex-start",
|
|
4280
|
+
gap: spacing[3],
|
|
4281
|
+
padding: `${spacing[3]} ${spacing[4]}`,
|
|
4282
|
+
borderLeft: `4px solid ${tierStyle.text}`,
|
|
4283
|
+
backgroundColor: tierStyle.bg,
|
|
4284
|
+
borderRadius: `0 ${borderRadius.md} ${borderRadius.md} 0`,
|
|
4285
|
+
fontFamily: fonts.primary,
|
|
4286
|
+
margin: `${spacing[3]} 0`
|
|
4287
|
+
};
|
|
4288
|
+
const textStyle = {
|
|
4289
|
+
flex: 1,
|
|
4290
|
+
fontSize: fontSizes.sm,
|
|
4291
|
+
color: "#2d3748",
|
|
4292
|
+
lineHeight: 1.5
|
|
4293
|
+
};
|
|
4294
|
+
const headlineStyle = {
|
|
4295
|
+
fontWeight: fontWeights.semibold,
|
|
4296
|
+
marginBottom: spacing[1],
|
|
4297
|
+
color: tierStyle.text
|
|
4298
|
+
};
|
|
4299
|
+
const ctaStyle = {
|
|
4300
|
+
display: "inline-block",
|
|
4301
|
+
marginTop: spacing[2],
|
|
4302
|
+
padding: `${spacing[2]} ${spacing[4]}`,
|
|
4303
|
+
backgroundColor: tierStyle.text,
|
|
4304
|
+
color: "#ffffff",
|
|
4305
|
+
borderRadius: borderRadius.full,
|
|
4306
|
+
fontSize: fontSizes.sm,
|
|
4307
|
+
fontWeight: fontWeights.semibold,
|
|
4308
|
+
textDecoration: "none",
|
|
4309
|
+
cursor: "pointer"
|
|
4310
|
+
};
|
|
4311
|
+
const closeStyle = {
|
|
4312
|
+
background: "none",
|
|
4313
|
+
border: "none",
|
|
4314
|
+
padding: spacing[1],
|
|
4315
|
+
cursor: "pointer",
|
|
4316
|
+
color: "#718096",
|
|
4317
|
+
fontSize: fontSizes.lg,
|
|
4318
|
+
lineHeight: 1
|
|
4319
|
+
};
|
|
4320
|
+
const handleDismiss = () => {
|
|
4321
|
+
setDismissed(true);
|
|
4322
|
+
if (onDismiss) onDismiss();
|
|
4323
|
+
};
|
|
4324
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
4325
|
+
"div",
|
|
4326
|
+
{
|
|
4327
|
+
className: "ev-compass-coverage-callout",
|
|
4328
|
+
role: "status",
|
|
4329
|
+
style: containerStyle2
|
|
4330
|
+
},
|
|
4331
|
+
/* @__PURE__ */ import_react21.default.createElement("div", { style: textStyle }, /* @__PURE__ */ import_react21.default.createElement("div", { style: headlineStyle }, "Your compass covers ", tierLabel, " issues lightly"), /* @__PURE__ */ import_react21.default.createElement("div", null, count === 0 ? `None of your ${totalSelected != null ? totalSelected : "selected"} compass topics apply at the ${tierLabel} level. ` : `Only ${count} of your ${totalSelected != null ? totalSelected : "selected"} compass topics apply at the ${tierLabel} level. `, "Add more ", tierLabel, "-applicable topics to get better comparisons with ", tierLabel, " officials."), /* @__PURE__ */ import_react21.default.createElement("a", { href: compassUrl, style: ctaStyle }, "Add ", tierLabel, " topics \u2192")),
|
|
4332
|
+
onDismiss !== void 0 && /* @__PURE__ */ import_react21.default.createElement(
|
|
4333
|
+
"button",
|
|
4334
|
+
{
|
|
4335
|
+
onClick: handleDismiss,
|
|
4336
|
+
style: closeStyle,
|
|
4337
|
+
"aria-label": "Dismiss coverage callout"
|
|
4338
|
+
},
|
|
4339
|
+
"\xD7"
|
|
4340
|
+
)
|
|
4341
|
+
);
|
|
4342
|
+
}
|
|
4343
|
+
|
|
4344
|
+
// src/ExpandCompassNudge.jsx
|
|
4257
4345
|
var import_react22 = __toESM(require("react"));
|
|
4346
|
+
function ExpandCompassNudge({
|
|
4347
|
+
politicianName,
|
|
4348
|
+
missingCount,
|
|
4349
|
+
compassUrl,
|
|
4350
|
+
style = {}
|
|
4351
|
+
}) {
|
|
4352
|
+
if (!missingCount || missingCount <= 0) return null;
|
|
4353
|
+
const containerStyle2 = {
|
|
4354
|
+
display: "flex",
|
|
4355
|
+
flexDirection: "column",
|
|
4356
|
+
alignItems: "flex-start",
|
|
4357
|
+
gap: spacing[2],
|
|
4358
|
+
padding: spacing[4],
|
|
4359
|
+
marginTop: spacing[4],
|
|
4360
|
+
backgroundColor: "#F5F9FA",
|
|
4361
|
+
borderRadius: borderRadius.lg,
|
|
4362
|
+
border: "1px solid #e0e6eb",
|
|
4363
|
+
fontFamily: fonts.primary,
|
|
4364
|
+
...style
|
|
4365
|
+
};
|
|
4366
|
+
const headlineStyle = {
|
|
4367
|
+
fontSize: fontSizes.base,
|
|
4368
|
+
fontWeight: fontWeights.semibold,
|
|
4369
|
+
color: "#2d3748",
|
|
4370
|
+
margin: 0
|
|
4371
|
+
};
|
|
4372
|
+
const bodyStyle = {
|
|
4373
|
+
fontSize: fontSizes.sm,
|
|
4374
|
+
color: "#4a5568",
|
|
4375
|
+
lineHeight: 1.5,
|
|
4376
|
+
margin: 0
|
|
4377
|
+
};
|
|
4378
|
+
const ctaStyle = {
|
|
4379
|
+
display: "inline-block",
|
|
4380
|
+
marginTop: spacing[2],
|
|
4381
|
+
padding: `${spacing[2]} ${spacing[4]}`,
|
|
4382
|
+
backgroundColor: "#00657c",
|
|
4383
|
+
color: "#ffffff",
|
|
4384
|
+
borderRadius: borderRadius.full,
|
|
4385
|
+
fontSize: fontSizes.sm,
|
|
4386
|
+
fontWeight: fontWeights.semibold,
|
|
4387
|
+
textDecoration: "none",
|
|
4388
|
+
cursor: "pointer"
|
|
4389
|
+
};
|
|
4390
|
+
const topicsLabel = missingCount === 1 ? "topic" : "topics";
|
|
4391
|
+
const speakerName = politicianName || "This politician";
|
|
4392
|
+
return /* @__PURE__ */ import_react22.default.createElement("div", { className: "ev-expand-compass-nudge", style: containerStyle2, role: "region" }, /* @__PURE__ */ import_react22.default.createElement("p", { style: headlineStyle }, "Want a richer comparison?"), /* @__PURE__ */ import_react22.default.createElement("p", { style: bodyStyle }, speakerName, " has stances on ", missingCount, " more ", topicsLabel, " you haven't answered yet. Expand your compass to see where you stand on all of them."), /* @__PURE__ */ import_react22.default.createElement("a", { href: compassUrl, style: ctaStyle }, "Expand my compass \u2192"));
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4395
|
+
// src/computeTierCoverage.js
|
|
4396
|
+
function computeTierCoverage(topics) {
|
|
4397
|
+
const counts = { federal: 0, state: 0, local: 0 };
|
|
4398
|
+
if (!Array.isArray(topics)) return counts;
|
|
4399
|
+
for (const t of topics) {
|
|
4400
|
+
if (!t) continue;
|
|
4401
|
+
const hasFlags = "applies_federal" in t || "applies_state" in t || "applies_local" in t;
|
|
4402
|
+
const f = hasFlags ? Boolean(t.applies_federal) : true;
|
|
4403
|
+
const s = hasFlags ? Boolean(t.applies_state) : true;
|
|
4404
|
+
const l = hasFlags ? Boolean(t.applies_local) : true;
|
|
4405
|
+
if (f) counts.federal++;
|
|
4406
|
+
if (s) counts.state++;
|
|
4407
|
+
if (l) counts.local++;
|
|
4408
|
+
}
|
|
4409
|
+
return counts;
|
|
4410
|
+
}
|
|
4411
|
+
|
|
4412
|
+
// src/StanceAccordion.jsx
|
|
4413
|
+
var import_react24 = __toESM(require("react"));
|
|
4258
4414
|
|
|
4259
4415
|
// src/Favicon.jsx
|
|
4260
|
-
var
|
|
4416
|
+
var import_react23 = __toESM(require("react"));
|
|
4261
4417
|
function Favicon({ url, size = 16 }) {
|
|
4262
4418
|
try {
|
|
4263
4419
|
const domain = new URL(url).hostname;
|
|
4264
|
-
return /* @__PURE__ */
|
|
4420
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
4265
4421
|
"img",
|
|
4266
4422
|
{
|
|
4267
4423
|
src: `https://www.google.com/s2/favicons?sz=${size}&domain=${domain}`,
|
|
@@ -4272,7 +4428,7 @@ function Favicon({ url, size = 16 }) {
|
|
|
4272
4428
|
}
|
|
4273
4429
|
);
|
|
4274
4430
|
} catch {
|
|
4275
|
-
return /* @__PURE__ */
|
|
4431
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
4276
4432
|
"svg",
|
|
4277
4433
|
{
|
|
4278
4434
|
width: size,
|
|
@@ -4283,8 +4439,8 @@ function Favicon({ url, size = 16 }) {
|
|
|
4283
4439
|
strokeWidth: "1.5",
|
|
4284
4440
|
style: { verticalAlign: "middle", flexShrink: 0 }
|
|
4285
4441
|
},
|
|
4286
|
-
/* @__PURE__ */
|
|
4287
|
-
/* @__PURE__ */
|
|
4442
|
+
/* @__PURE__ */ import_react23.default.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
4443
|
+
/* @__PURE__ */ import_react23.default.createElement("path", { d: "M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
|
|
4288
4444
|
);
|
|
4289
4445
|
}
|
|
4290
4446
|
}
|
|
@@ -4315,11 +4471,11 @@ function StanceAccordion({
|
|
|
4315
4471
|
apiUrl = "https://api.empowered.vote"
|
|
4316
4472
|
}) {
|
|
4317
4473
|
var _a;
|
|
4318
|
-
const [expandedTopicId, setExpandedTopicId] = (0,
|
|
4319
|
-
const [loadingId, setLoadingId] = (0,
|
|
4320
|
-
const [showAll, setShowAll] = (0,
|
|
4321
|
-
const contextCache = (0,
|
|
4322
|
-
const quotesCache = (0,
|
|
4474
|
+
const [expandedTopicId, setExpandedTopicId] = (0, import_react24.useState)(null);
|
|
4475
|
+
const [loadingId, setLoadingId] = (0, import_react24.useState)(null);
|
|
4476
|
+
const [showAll, setShowAll] = (0, import_react24.useState)(false);
|
|
4477
|
+
const contextCache = (0, import_react24.useRef)(/* @__PURE__ */ new Map());
|
|
4478
|
+
const quotesCache = (0, import_react24.useRef)(null);
|
|
4323
4479
|
const polAnswerMap = {};
|
|
4324
4480
|
if (polAnswers) {
|
|
4325
4481
|
polAnswers.forEach((a) => {
|
|
@@ -4378,7 +4534,7 @@ function StanceAccordion({
|
|
|
4378
4534
|
quotesCache.current = [];
|
|
4379
4535
|
}
|
|
4380
4536
|
}
|
|
4381
|
-
const handleToggle = (0,
|
|
4537
|
+
const handleToggle = (0, import_react24.useCallback)(
|
|
4382
4538
|
async (topicId) => {
|
|
4383
4539
|
if (expandedTopicId === topicId) {
|
|
4384
4540
|
setExpandedTopicId(null);
|
|
@@ -4395,7 +4551,7 @@ function StanceAccordion({
|
|
|
4395
4551
|
},
|
|
4396
4552
|
[expandedTopicId, politicianId, apiUrl]
|
|
4397
4553
|
);
|
|
4398
|
-
(0,
|
|
4554
|
+
(0, import_react24.useEffect)(() => {
|
|
4399
4555
|
if (initialExpandedTopicId && topics && topics.length > 0) {
|
|
4400
4556
|
handleToggle(String(initialExpandedTopicId));
|
|
4401
4557
|
}
|
|
@@ -4411,13 +4567,13 @@ function StanceAccordion({
|
|
|
4411
4567
|
visibleTopics = [pinned, ...baseTopics.filter((t) => String(t.id) !== String(initialExpandedTopicId))];
|
|
4412
4568
|
}
|
|
4413
4569
|
}
|
|
4414
|
-
return /* @__PURE__ */
|
|
4570
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
4415
4571
|
"div",
|
|
4416
4572
|
{
|
|
4417
4573
|
className: "flex flex-col",
|
|
4418
4574
|
style: { fontFamily: "'Manrope', sans-serif" }
|
|
4419
4575
|
},
|
|
4420
|
-
/* @__PURE__ */
|
|
4576
|
+
/* @__PURE__ */ import_react24.default.createElement(
|
|
4421
4577
|
"h3",
|
|
4422
4578
|
{
|
|
4423
4579
|
className: "text-sm font-semibold text-neutral-400 uppercase tracking-wider mb-2",
|
|
@@ -4439,15 +4595,15 @@ function StanceAccordion({
|
|
|
4439
4595
|
if (topic.topic_key) return q.issue === topic.topic_key;
|
|
4440
4596
|
return topic.short_title && q.issue.toLowerCase() === topic.short_title.toLowerCase();
|
|
4441
4597
|
}) : [];
|
|
4442
|
-
return /* @__PURE__ */
|
|
4598
|
+
return /* @__PURE__ */ import_react24.default.createElement("div", { key: topicId, className: "border-b border-neutral-100" }, /* @__PURE__ */ import_react24.default.createElement(
|
|
4443
4599
|
"button",
|
|
4444
4600
|
{
|
|
4445
4601
|
type: "button",
|
|
4446
4602
|
onClick: () => handleToggle(topicId),
|
|
4447
4603
|
className: "w-full flex items-center justify-between py-3 px-2 text-left cursor-pointer hover:bg-neutral-50 transition-colors"
|
|
4448
4604
|
},
|
|
4449
|
-
/* @__PURE__ */
|
|
4450
|
-
/* @__PURE__ */
|
|
4605
|
+
/* @__PURE__ */ import_react24.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react24.default.createElement("span", { className: "text-sm font-medium text-neutral-800 truncate" }, topic.short_title), questionText && /* @__PURE__ */ import_react24.default.createElement("span", { className: "text-xs text-neutral-400 mt-0.5" }, questionText), /* @__PURE__ */ import_react24.default.createElement("span", { className: "text-xs text-neutral-500 mt-0.5" }, label)),
|
|
4606
|
+
/* @__PURE__ */ import_react24.default.createElement(
|
|
4451
4607
|
"svg",
|
|
4452
4608
|
{
|
|
4453
4609
|
width: "16",
|
|
@@ -4464,9 +4620,9 @@ function StanceAccordion({
|
|
|
4464
4620
|
transition: "transform 0.2s ease"
|
|
4465
4621
|
}
|
|
4466
4622
|
},
|
|
4467
|
-
/* @__PURE__ */
|
|
4623
|
+
/* @__PURE__ */ import_react24.default.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
4468
4624
|
)
|
|
4469
|
-
), /* @__PURE__ */
|
|
4625
|
+
), /* @__PURE__ */ import_react24.default.createElement(
|
|
4470
4626
|
"div",
|
|
4471
4627
|
{
|
|
4472
4628
|
style: {
|
|
@@ -4475,7 +4631,7 @@ function StanceAccordion({
|
|
|
4475
4631
|
transition: "grid-template-rows 0.25s ease"
|
|
4476
4632
|
}
|
|
4477
4633
|
},
|
|
4478
|
-
/* @__PURE__ */
|
|
4634
|
+
/* @__PURE__ */ import_react24.default.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ import_react24.default.createElement("div", { className: "px-2 pb-4" }, isLoading && /* @__PURE__ */ import_react24.default.createElement("div", { className: "flex items-center py-3" }, /* @__PURE__ */ import_react24.default.createElement(
|
|
4479
4635
|
"div",
|
|
4480
4636
|
{
|
|
4481
4637
|
style: {
|
|
@@ -4487,14 +4643,14 @@ function StanceAccordion({
|
|
|
4487
4643
|
animation: "ev-spin 0.8s linear infinite"
|
|
4488
4644
|
}
|
|
4489
4645
|
}
|
|
4490
|
-
)), !isLoading && cached && /* @__PURE__ */
|
|
4646
|
+
)), !isLoading && cached && /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, cached.reasoning ? /* @__PURE__ */ import_react24.default.createElement(
|
|
4491
4647
|
"p",
|
|
4492
4648
|
{
|
|
4493
4649
|
className: "text-sm text-neutral-700 mb-3",
|
|
4494
4650
|
style: { whiteSpace: "pre-wrap", lineHeight: 1.6 }
|
|
4495
4651
|
},
|
|
4496
4652
|
cached.reasoning
|
|
4497
|
-
) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */
|
|
4653
|
+
) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ import_react24.default.createElement("div", { className: "mt-2" }, /* @__PURE__ */ import_react24.default.createElement("p", { className: "text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-1.5" }, "References"), /* @__PURE__ */ import_react24.default.createElement("ol", { className: "list-decimal list-inside space-y-1" }, cached.sources.map((src, i) => /* @__PURE__ */ import_react24.default.createElement("li", { key: i, className: "text-xs text-neutral-600" }, /* @__PURE__ */ import_react24.default.createElement(
|
|
4498
4654
|
"a",
|
|
4499
4655
|
{
|
|
4500
4656
|
href: src,
|
|
@@ -4502,9 +4658,9 @@ function StanceAccordion({
|
|
|
4502
4658
|
rel: "noreferrer",
|
|
4503
4659
|
className: "inline-flex items-center gap-1.5 hover:text-[#00657c] transition-colors"
|
|
4504
4660
|
},
|
|
4505
|
-
/* @__PURE__ */
|
|
4506
|
-
/* @__PURE__ */
|
|
4507
|
-
))))), topicQuotes.length > 0 && /* @__PURE__ */
|
|
4661
|
+
/* @__PURE__ */ import_react24.default.createElement(Favicon, { url: src }),
|
|
4662
|
+
/* @__PURE__ */ import_react24.default.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
|
|
4663
|
+
))))), topicQuotes.length > 0 && /* @__PURE__ */ import_react24.default.createElement("div", { style: { marginTop: "12px" } }, /* @__PURE__ */ import_react24.default.createElement(
|
|
4508
4664
|
"p",
|
|
4509
4665
|
{
|
|
4510
4666
|
style: {
|
|
@@ -4521,7 +4677,7 @@ function StanceAccordion({
|
|
|
4521
4677
|
const verdict = verdictsByQuote ? verdictsByQuote[quote.id] : void 0;
|
|
4522
4678
|
const borderColor = verdict === "agreed" ? "#0e7490" : verdict === "disagreed" ? "#b45309" : "#e2e8f0";
|
|
4523
4679
|
const sourceName = quote.source_name || quote.sourceName;
|
|
4524
|
-
return /* @__PURE__ */
|
|
4680
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
4525
4681
|
"div",
|
|
4526
4682
|
{
|
|
4527
4683
|
key: quote.id,
|
|
@@ -4533,7 +4689,7 @@ function StanceAccordion({
|
|
|
4533
4689
|
marginBottom: "8px"
|
|
4534
4690
|
}
|
|
4535
4691
|
},
|
|
4536
|
-
/* @__PURE__ */
|
|
4692
|
+
/* @__PURE__ */ import_react24.default.createElement(
|
|
4537
4693
|
"p",
|
|
4538
4694
|
{
|
|
4539
4695
|
style: {
|
|
@@ -4546,7 +4702,7 @@ function StanceAccordion({
|
|
|
4546
4702
|
},
|
|
4547
4703
|
quote.text
|
|
4548
4704
|
),
|
|
4549
|
-
verdict === "agreed" && /* @__PURE__ */
|
|
4705
|
+
verdict === "agreed" && /* @__PURE__ */ import_react24.default.createElement(
|
|
4550
4706
|
"span",
|
|
4551
4707
|
{
|
|
4552
4708
|
style: {
|
|
@@ -4563,10 +4719,10 @@ function StanceAccordion({
|
|
|
4563
4719
|
flexShrink: 0
|
|
4564
4720
|
}
|
|
4565
4721
|
},
|
|
4566
|
-
/* @__PURE__ */
|
|
4722
|
+
/* @__PURE__ */ import_react24.default.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react24.default.createElement("path", { d: "M5 13l4 4L19 7" })),
|
|
4567
4723
|
"Agreed"
|
|
4568
4724
|
),
|
|
4569
|
-
verdict === "disagreed" && /* @__PURE__ */
|
|
4725
|
+
verdict === "disagreed" && /* @__PURE__ */ import_react24.default.createElement(
|
|
4570
4726
|
"span",
|
|
4571
4727
|
{
|
|
4572
4728
|
style: {
|
|
@@ -4583,10 +4739,10 @@ function StanceAccordion({
|
|
|
4583
4739
|
flexShrink: 0
|
|
4584
4740
|
}
|
|
4585
4741
|
},
|
|
4586
|
-
/* @__PURE__ */
|
|
4742
|
+
/* @__PURE__ */ import_react24.default.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react24.default.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
|
|
4587
4743
|
"Disagreed"
|
|
4588
4744
|
),
|
|
4589
|
-
sourceName && /* @__PURE__ */
|
|
4745
|
+
sourceName && /* @__PURE__ */ import_react24.default.createElement(
|
|
4590
4746
|
"a",
|
|
4591
4747
|
{
|
|
4592
4748
|
href: quote.source_url || quote.sourceUrl,
|
|
@@ -4603,10 +4759,10 @@ function StanceAccordion({
|
|
|
4603
4759
|
sourceName
|
|
4604
4760
|
)
|
|
4605
4761
|
);
|
|
4606
|
-
})), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */
|
|
4762
|
+
})), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ import_react24.default.createElement("p", { className: "text-sm text-neutral-400 italic py-2" }, "No detailed reasoning available for this topic."))))
|
|
4607
4763
|
));
|
|
4608
4764
|
}),
|
|
4609
|
-
hasToggle && /* @__PURE__ */
|
|
4765
|
+
hasToggle && /* @__PURE__ */ import_react24.default.createElement(
|
|
4610
4766
|
"button",
|
|
4611
4767
|
{
|
|
4612
4768
|
type: "button",
|
|
@@ -4620,9 +4776,9 @@ function StanceAccordion({
|
|
|
4620
4776
|
}
|
|
4621
4777
|
|
|
4622
4778
|
// src/icons.js
|
|
4623
|
-
var
|
|
4779
|
+
var import_react25 = __toESM(require("react"));
|
|
4624
4780
|
function BallotIcon({ size = 16, color = "currentColor" }) {
|
|
4625
|
-
return /* @__PURE__ */
|
|
4781
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
4626
4782
|
"svg",
|
|
4627
4783
|
{
|
|
4628
4784
|
width: size,
|
|
@@ -4635,13 +4791,13 @@ function BallotIcon({ size = 16, color = "currentColor" }) {
|
|
|
4635
4791
|
strokeLinejoin: "round",
|
|
4636
4792
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4637
4793
|
},
|
|
4638
|
-
/* @__PURE__ */
|
|
4639
|
-
/* @__PURE__ */
|
|
4640
|
-
/* @__PURE__ */
|
|
4794
|
+
/* @__PURE__ */ import_react25.default.createElement("path", { d: "m9 12 2 2 4-4" }),
|
|
4795
|
+
/* @__PURE__ */ import_react25.default.createElement("path", { d: "M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z" }),
|
|
4796
|
+
/* @__PURE__ */ import_react25.default.createElement("path", { d: "M22 19H2" })
|
|
4641
4797
|
);
|
|
4642
4798
|
}
|
|
4643
4799
|
function CompassIcon({ size = 16, color = "currentColor" }) {
|
|
4644
|
-
return /* @__PURE__ */
|
|
4800
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
4645
4801
|
"svg",
|
|
4646
4802
|
{
|
|
4647
4803
|
width: size,
|
|
@@ -4654,27 +4810,27 @@ function CompassIcon({ size = 16, color = "currentColor" }) {
|
|
|
4654
4810
|
strokeLinejoin: "round",
|
|
4655
4811
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4656
4812
|
},
|
|
4657
|
-
/* @__PURE__ */
|
|
4658
|
-
/* @__PURE__ */
|
|
4813
|
+
/* @__PURE__ */ import_react25.default.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
4814
|
+
/* @__PURE__ */ import_react25.default.createElement("path", { d: "m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" })
|
|
4659
4815
|
);
|
|
4660
4816
|
}
|
|
4661
4817
|
function BranchIcon({ size = 16, color = "currentColor", branch }) {
|
|
4662
4818
|
let paths;
|
|
4663
4819
|
switch (branch) {
|
|
4664
4820
|
case "executive":
|
|
4665
|
-
paths = /* @__PURE__ */
|
|
4821
|
+
paths = /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement("path", { d: "M3 21h18" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M5 21V7l8-4v18" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M19 21V11l-6-4" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M9 9v.01" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M9 12v.01" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M9 15v.01" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M9 18v.01" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M5 21h14" }), /* @__PURE__ */ import_react25.default.createElement("line", { x1: "13", y1: "5", x2: "13", y2: "3" }), /* @__PURE__ */ import_react25.default.createElement("line", { x1: "13", y1: "3", x2: "15", y2: "4" }));
|
|
4666
4822
|
break;
|
|
4667
4823
|
case "legislative":
|
|
4668
|
-
paths = /* @__PURE__ */
|
|
4824
|
+
paths = /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement("path", { d: "M8 21h12a2 2 0 0 0 2-2v-2H10v2a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v3h4" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M19 17V5a2 2 0 0 0-2-2H4" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M15 8h-5" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M15 12h-5" }));
|
|
4669
4825
|
break;
|
|
4670
4826
|
case "judicial":
|
|
4671
|
-
paths = /* @__PURE__ */
|
|
4827
|
+
paths = /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement("path", { d: "M12 3v19" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M5 8l7-5 7 5" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M3 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M17 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M8 21h8" }));
|
|
4672
4828
|
break;
|
|
4673
4829
|
default:
|
|
4674
|
-
paths = /* @__PURE__ */
|
|
4830
|
+
paths = /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement("path", { d: "M10 18v-7" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M14 18v-7" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M18 18v-7" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M3 22h18" }), /* @__PURE__ */ import_react25.default.createElement("path", { d: "M6 18v-7" }));
|
|
4675
4831
|
break;
|
|
4676
4832
|
}
|
|
4677
|
-
return /* @__PURE__ */
|
|
4833
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
4678
4834
|
"svg",
|
|
4679
4835
|
{
|
|
4680
4836
|
width: size,
|
|
@@ -4697,7 +4853,9 @@ function BranchIcon({ size = 16, color = "currentColor", branch }) {
|
|
|
4697
4853
|
BranchIcon,
|
|
4698
4854
|
CategorySection,
|
|
4699
4855
|
CommitteeTable,
|
|
4856
|
+
CompassCoverageCallout,
|
|
4700
4857
|
CompassIcon,
|
|
4858
|
+
ExpandCompassNudge,
|
|
4701
4859
|
FilterSidebar,
|
|
4702
4860
|
GovernmentBodySection,
|
|
4703
4861
|
Header,
|
|
@@ -4719,6 +4877,7 @@ function BranchIcon({ size = 16, color = "currentColor", branch }) {
|
|
|
4719
4877
|
breakpoints,
|
|
4720
4878
|
colorScales,
|
|
4721
4879
|
colors,
|
|
4880
|
+
computeTierCoverage,
|
|
4722
4881
|
dataVizPalette,
|
|
4723
4882
|
defaultCtaButton,
|
|
4724
4883
|
defaultNavItems,
|