@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.mjs
CHANGED
|
@@ -4172,15 +4172,168 @@ function TopicTierBadge({
|
|
|
4172
4172
|
);
|
|
4173
4173
|
}
|
|
4174
4174
|
|
|
4175
|
+
// src/CompassCoverageCallout.jsx
|
|
4176
|
+
import React19, { useState as useState10 } from "react";
|
|
4177
|
+
var TIER_LABELS = {
|
|
4178
|
+
federal: "federal",
|
|
4179
|
+
state: "state",
|
|
4180
|
+
local: "local"
|
|
4181
|
+
};
|
|
4182
|
+
function CompassCoverageCallout({
|
|
4183
|
+
tier,
|
|
4184
|
+
count,
|
|
4185
|
+
totalSelected,
|
|
4186
|
+
compassUrl,
|
|
4187
|
+
onDismiss
|
|
4188
|
+
}) {
|
|
4189
|
+
const [dismissed, setDismissed] = useState10(false);
|
|
4190
|
+
if (dismissed) return null;
|
|
4191
|
+
const tierLabel = TIER_LABELS[tier] || tier;
|
|
4192
|
+
const tierStyle = tierColors[tier] || tierColors.federal;
|
|
4193
|
+
const containerStyle2 = {
|
|
4194
|
+
display: "flex",
|
|
4195
|
+
alignItems: "flex-start",
|
|
4196
|
+
gap: spacing[3],
|
|
4197
|
+
padding: `${spacing[3]} ${spacing[4]}`,
|
|
4198
|
+
borderLeft: `4px solid ${tierStyle.text}`,
|
|
4199
|
+
backgroundColor: tierStyle.bg,
|
|
4200
|
+
borderRadius: `0 ${borderRadius.md} ${borderRadius.md} 0`,
|
|
4201
|
+
fontFamily: fonts.primary,
|
|
4202
|
+
margin: `${spacing[3]} 0`
|
|
4203
|
+
};
|
|
4204
|
+
const textStyle = {
|
|
4205
|
+
flex: 1,
|
|
4206
|
+
fontSize: fontSizes.sm,
|
|
4207
|
+
color: "#2d3748",
|
|
4208
|
+
lineHeight: 1.5
|
|
4209
|
+
};
|
|
4210
|
+
const headlineStyle = {
|
|
4211
|
+
fontWeight: fontWeights.semibold,
|
|
4212
|
+
marginBottom: spacing[1],
|
|
4213
|
+
color: tierStyle.text
|
|
4214
|
+
};
|
|
4215
|
+
const ctaStyle = {
|
|
4216
|
+
display: "inline-block",
|
|
4217
|
+
marginTop: spacing[2],
|
|
4218
|
+
padding: `${spacing[2]} ${spacing[4]}`,
|
|
4219
|
+
backgroundColor: tierStyle.text,
|
|
4220
|
+
color: "#ffffff",
|
|
4221
|
+
borderRadius: borderRadius.full,
|
|
4222
|
+
fontSize: fontSizes.sm,
|
|
4223
|
+
fontWeight: fontWeights.semibold,
|
|
4224
|
+
textDecoration: "none",
|
|
4225
|
+
cursor: "pointer"
|
|
4226
|
+
};
|
|
4227
|
+
const closeStyle = {
|
|
4228
|
+
background: "none",
|
|
4229
|
+
border: "none",
|
|
4230
|
+
padding: spacing[1],
|
|
4231
|
+
cursor: "pointer",
|
|
4232
|
+
color: "#718096",
|
|
4233
|
+
fontSize: fontSizes.lg,
|
|
4234
|
+
lineHeight: 1
|
|
4235
|
+
};
|
|
4236
|
+
const handleDismiss = () => {
|
|
4237
|
+
setDismissed(true);
|
|
4238
|
+
if (onDismiss) onDismiss();
|
|
4239
|
+
};
|
|
4240
|
+
return /* @__PURE__ */ React19.createElement(
|
|
4241
|
+
"div",
|
|
4242
|
+
{
|
|
4243
|
+
className: "ev-compass-coverage-callout",
|
|
4244
|
+
role: "status",
|
|
4245
|
+
style: containerStyle2
|
|
4246
|
+
},
|
|
4247
|
+
/* @__PURE__ */ React19.createElement("div", { style: textStyle }, /* @__PURE__ */ React19.createElement("div", { style: headlineStyle }, "Your compass covers ", tierLabel, " issues lightly"), /* @__PURE__ */ React19.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__ */ React19.createElement("a", { href: compassUrl, style: ctaStyle }, "Add ", tierLabel, " topics \u2192")),
|
|
4248
|
+
onDismiss !== void 0 && /* @__PURE__ */ React19.createElement(
|
|
4249
|
+
"button",
|
|
4250
|
+
{
|
|
4251
|
+
onClick: handleDismiss,
|
|
4252
|
+
style: closeStyle,
|
|
4253
|
+
"aria-label": "Dismiss coverage callout"
|
|
4254
|
+
},
|
|
4255
|
+
"\xD7"
|
|
4256
|
+
)
|
|
4257
|
+
);
|
|
4258
|
+
}
|
|
4259
|
+
|
|
4260
|
+
// src/ExpandCompassNudge.jsx
|
|
4261
|
+
import React20 from "react";
|
|
4262
|
+
function ExpandCompassNudge({
|
|
4263
|
+
politicianName,
|
|
4264
|
+
missingCount,
|
|
4265
|
+
compassUrl,
|
|
4266
|
+
style = {}
|
|
4267
|
+
}) {
|
|
4268
|
+
if (!missingCount || missingCount <= 0) return null;
|
|
4269
|
+
const containerStyle2 = {
|
|
4270
|
+
display: "flex",
|
|
4271
|
+
flexDirection: "column",
|
|
4272
|
+
alignItems: "flex-start",
|
|
4273
|
+
gap: spacing[2],
|
|
4274
|
+
padding: spacing[4],
|
|
4275
|
+
marginTop: spacing[4],
|
|
4276
|
+
backgroundColor: "#F5F9FA",
|
|
4277
|
+
borderRadius: borderRadius.lg,
|
|
4278
|
+
border: "1px solid #e0e6eb",
|
|
4279
|
+
fontFamily: fonts.primary,
|
|
4280
|
+
...style
|
|
4281
|
+
};
|
|
4282
|
+
const headlineStyle = {
|
|
4283
|
+
fontSize: fontSizes.base,
|
|
4284
|
+
fontWeight: fontWeights.semibold,
|
|
4285
|
+
color: "#2d3748",
|
|
4286
|
+
margin: 0
|
|
4287
|
+
};
|
|
4288
|
+
const bodyStyle = {
|
|
4289
|
+
fontSize: fontSizes.sm,
|
|
4290
|
+
color: "#4a5568",
|
|
4291
|
+
lineHeight: 1.5,
|
|
4292
|
+
margin: 0
|
|
4293
|
+
};
|
|
4294
|
+
const ctaStyle = {
|
|
4295
|
+
display: "inline-block",
|
|
4296
|
+
marginTop: spacing[2],
|
|
4297
|
+
padding: `${spacing[2]} ${spacing[4]}`,
|
|
4298
|
+
backgroundColor: "#00657c",
|
|
4299
|
+
color: "#ffffff",
|
|
4300
|
+
borderRadius: borderRadius.full,
|
|
4301
|
+
fontSize: fontSizes.sm,
|
|
4302
|
+
fontWeight: fontWeights.semibold,
|
|
4303
|
+
textDecoration: "none",
|
|
4304
|
+
cursor: "pointer"
|
|
4305
|
+
};
|
|
4306
|
+
const topicsLabel = missingCount === 1 ? "topic" : "topics";
|
|
4307
|
+
const speakerName = politicianName || "This politician";
|
|
4308
|
+
return /* @__PURE__ */ React20.createElement("div", { className: "ev-expand-compass-nudge", style: containerStyle2, role: "region" }, /* @__PURE__ */ React20.createElement("p", { style: headlineStyle }, "Want a richer comparison?"), /* @__PURE__ */ React20.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__ */ React20.createElement("a", { href: compassUrl, style: ctaStyle }, "Expand my compass \u2192"));
|
|
4309
|
+
}
|
|
4310
|
+
|
|
4311
|
+
// src/computeTierCoverage.js
|
|
4312
|
+
function computeTierCoverage(topics) {
|
|
4313
|
+
const counts = { federal: 0, state: 0, local: 0 };
|
|
4314
|
+
if (!Array.isArray(topics)) return counts;
|
|
4315
|
+
for (const t of topics) {
|
|
4316
|
+
if (!t) continue;
|
|
4317
|
+
const hasFlags = "applies_federal" in t || "applies_state" in t || "applies_local" in t;
|
|
4318
|
+
const f = hasFlags ? Boolean(t.applies_federal) : true;
|
|
4319
|
+
const s = hasFlags ? Boolean(t.applies_state) : true;
|
|
4320
|
+
const l = hasFlags ? Boolean(t.applies_local) : true;
|
|
4321
|
+
if (f) counts.federal++;
|
|
4322
|
+
if (s) counts.state++;
|
|
4323
|
+
if (l) counts.local++;
|
|
4324
|
+
}
|
|
4325
|
+
return counts;
|
|
4326
|
+
}
|
|
4327
|
+
|
|
4175
4328
|
// src/StanceAccordion.jsx
|
|
4176
|
-
import
|
|
4329
|
+
import React22, { useState as useState11, useRef as useRef3, useCallback, useEffect as useEffect6 } from "react";
|
|
4177
4330
|
|
|
4178
4331
|
// src/Favicon.jsx
|
|
4179
|
-
import
|
|
4332
|
+
import React21 from "react";
|
|
4180
4333
|
function Favicon({ url, size = 16 }) {
|
|
4181
4334
|
try {
|
|
4182
4335
|
const domain = new URL(url).hostname;
|
|
4183
|
-
return /* @__PURE__ */
|
|
4336
|
+
return /* @__PURE__ */ React21.createElement(
|
|
4184
4337
|
"img",
|
|
4185
4338
|
{
|
|
4186
4339
|
src: `https://www.google.com/s2/favicons?sz=${size}&domain=${domain}`,
|
|
@@ -4191,7 +4344,7 @@ function Favicon({ url, size = 16 }) {
|
|
|
4191
4344
|
}
|
|
4192
4345
|
);
|
|
4193
4346
|
} catch {
|
|
4194
|
-
return /* @__PURE__ */
|
|
4347
|
+
return /* @__PURE__ */ React21.createElement(
|
|
4195
4348
|
"svg",
|
|
4196
4349
|
{
|
|
4197
4350
|
width: size,
|
|
@@ -4202,8 +4355,8 @@ function Favicon({ url, size = 16 }) {
|
|
|
4202
4355
|
strokeWidth: "1.5",
|
|
4203
4356
|
style: { verticalAlign: "middle", flexShrink: 0 }
|
|
4204
4357
|
},
|
|
4205
|
-
/* @__PURE__ */
|
|
4206
|
-
/* @__PURE__ */
|
|
4358
|
+
/* @__PURE__ */ React21.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
4359
|
+
/* @__PURE__ */ React21.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" })
|
|
4207
4360
|
);
|
|
4208
4361
|
}
|
|
4209
4362
|
}
|
|
@@ -4234,9 +4387,9 @@ function StanceAccordion({
|
|
|
4234
4387
|
apiUrl = "https://api.empowered.vote"
|
|
4235
4388
|
}) {
|
|
4236
4389
|
var _a;
|
|
4237
|
-
const [expandedTopicId, setExpandedTopicId] =
|
|
4238
|
-
const [loadingId, setLoadingId] =
|
|
4239
|
-
const [showAll, setShowAll] =
|
|
4390
|
+
const [expandedTopicId, setExpandedTopicId] = useState11(null);
|
|
4391
|
+
const [loadingId, setLoadingId] = useState11(null);
|
|
4392
|
+
const [showAll, setShowAll] = useState11(false);
|
|
4240
4393
|
const contextCache = useRef3(/* @__PURE__ */ new Map());
|
|
4241
4394
|
const quotesCache = useRef3(null);
|
|
4242
4395
|
const polAnswerMap = {};
|
|
@@ -4330,13 +4483,13 @@ function StanceAccordion({
|
|
|
4330
4483
|
visibleTopics = [pinned, ...baseTopics.filter((t) => String(t.id) !== String(initialExpandedTopicId))];
|
|
4331
4484
|
}
|
|
4332
4485
|
}
|
|
4333
|
-
return /* @__PURE__ */
|
|
4486
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4334
4487
|
"div",
|
|
4335
4488
|
{
|
|
4336
4489
|
className: "flex flex-col",
|
|
4337
4490
|
style: { fontFamily: "'Manrope', sans-serif" }
|
|
4338
4491
|
},
|
|
4339
|
-
/* @__PURE__ */
|
|
4492
|
+
/* @__PURE__ */ React22.createElement(
|
|
4340
4493
|
"h3",
|
|
4341
4494
|
{
|
|
4342
4495
|
className: "text-sm font-semibold text-neutral-400 uppercase tracking-wider mb-2",
|
|
@@ -4358,15 +4511,15 @@ function StanceAccordion({
|
|
|
4358
4511
|
if (topic.topic_key) return q.issue === topic.topic_key;
|
|
4359
4512
|
return topic.short_title && q.issue.toLowerCase() === topic.short_title.toLowerCase();
|
|
4360
4513
|
}) : [];
|
|
4361
|
-
return /* @__PURE__ */
|
|
4514
|
+
return /* @__PURE__ */ React22.createElement("div", { key: topicId, className: "border-b border-neutral-100" }, /* @__PURE__ */ React22.createElement(
|
|
4362
4515
|
"button",
|
|
4363
4516
|
{
|
|
4364
4517
|
type: "button",
|
|
4365
4518
|
onClick: () => handleToggle(topicId),
|
|
4366
4519
|
className: "w-full flex items-center justify-between py-3 px-2 text-left cursor-pointer hover:bg-neutral-50 transition-colors"
|
|
4367
4520
|
},
|
|
4368
|
-
/* @__PURE__ */
|
|
4369
|
-
/* @__PURE__ */
|
|
4521
|
+
/* @__PURE__ */ React22.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React22.createElement("span", { className: "text-sm font-medium text-neutral-800 truncate" }, topic.short_title), questionText && /* @__PURE__ */ React22.createElement("span", { className: "text-xs text-neutral-400 mt-0.5" }, questionText), /* @__PURE__ */ React22.createElement("span", { className: "text-xs text-neutral-500 mt-0.5" }, label)),
|
|
4522
|
+
/* @__PURE__ */ React22.createElement(
|
|
4370
4523
|
"svg",
|
|
4371
4524
|
{
|
|
4372
4525
|
width: "16",
|
|
@@ -4383,9 +4536,9 @@ function StanceAccordion({
|
|
|
4383
4536
|
transition: "transform 0.2s ease"
|
|
4384
4537
|
}
|
|
4385
4538
|
},
|
|
4386
|
-
/* @__PURE__ */
|
|
4539
|
+
/* @__PURE__ */ React22.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
4387
4540
|
)
|
|
4388
|
-
), /* @__PURE__ */
|
|
4541
|
+
), /* @__PURE__ */ React22.createElement(
|
|
4389
4542
|
"div",
|
|
4390
4543
|
{
|
|
4391
4544
|
style: {
|
|
@@ -4394,7 +4547,7 @@ function StanceAccordion({
|
|
|
4394
4547
|
transition: "grid-template-rows 0.25s ease"
|
|
4395
4548
|
}
|
|
4396
4549
|
},
|
|
4397
|
-
/* @__PURE__ */
|
|
4550
|
+
/* @__PURE__ */ React22.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ React22.createElement("div", { className: "px-2 pb-4" }, isLoading && /* @__PURE__ */ React22.createElement("div", { className: "flex items-center py-3" }, /* @__PURE__ */ React22.createElement(
|
|
4398
4551
|
"div",
|
|
4399
4552
|
{
|
|
4400
4553
|
style: {
|
|
@@ -4406,14 +4559,14 @@ function StanceAccordion({
|
|
|
4406
4559
|
animation: "ev-spin 0.8s linear infinite"
|
|
4407
4560
|
}
|
|
4408
4561
|
}
|
|
4409
|
-
)), !isLoading && cached && /* @__PURE__ */
|
|
4562
|
+
)), !isLoading && cached && /* @__PURE__ */ React22.createElement(React22.Fragment, null, cached.reasoning ? /* @__PURE__ */ React22.createElement(
|
|
4410
4563
|
"p",
|
|
4411
4564
|
{
|
|
4412
4565
|
className: "text-sm text-neutral-700 mb-3",
|
|
4413
4566
|
style: { whiteSpace: "pre-wrap", lineHeight: 1.6 }
|
|
4414
4567
|
},
|
|
4415
4568
|
cached.reasoning
|
|
4416
|
-
) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */
|
|
4569
|
+
) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ React22.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React22.createElement("p", { className: "text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-1.5" }, "References"), /* @__PURE__ */ React22.createElement("ol", { className: "list-decimal list-inside space-y-1" }, cached.sources.map((src, i) => /* @__PURE__ */ React22.createElement("li", { key: i, className: "text-xs text-neutral-600" }, /* @__PURE__ */ React22.createElement(
|
|
4417
4570
|
"a",
|
|
4418
4571
|
{
|
|
4419
4572
|
href: src,
|
|
@@ -4421,9 +4574,9 @@ function StanceAccordion({
|
|
|
4421
4574
|
rel: "noreferrer",
|
|
4422
4575
|
className: "inline-flex items-center gap-1.5 hover:text-[#00657c] transition-colors"
|
|
4423
4576
|
},
|
|
4424
|
-
/* @__PURE__ */
|
|
4425
|
-
/* @__PURE__ */
|
|
4426
|
-
))))), topicQuotes.length > 0 && /* @__PURE__ */
|
|
4577
|
+
/* @__PURE__ */ React22.createElement(Favicon, { url: src }),
|
|
4578
|
+
/* @__PURE__ */ React22.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
|
|
4579
|
+
))))), topicQuotes.length > 0 && /* @__PURE__ */ React22.createElement("div", { style: { marginTop: "12px" } }, /* @__PURE__ */ React22.createElement(
|
|
4427
4580
|
"p",
|
|
4428
4581
|
{
|
|
4429
4582
|
style: {
|
|
@@ -4440,7 +4593,7 @@ function StanceAccordion({
|
|
|
4440
4593
|
const verdict = verdictsByQuote ? verdictsByQuote[quote.id] : void 0;
|
|
4441
4594
|
const borderColor = verdict === "agreed" ? "#0e7490" : verdict === "disagreed" ? "#b45309" : "#e2e8f0";
|
|
4442
4595
|
const sourceName = quote.source_name || quote.sourceName;
|
|
4443
|
-
return /* @__PURE__ */
|
|
4596
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4444
4597
|
"div",
|
|
4445
4598
|
{
|
|
4446
4599
|
key: quote.id,
|
|
@@ -4452,7 +4605,7 @@ function StanceAccordion({
|
|
|
4452
4605
|
marginBottom: "8px"
|
|
4453
4606
|
}
|
|
4454
4607
|
},
|
|
4455
|
-
/* @__PURE__ */
|
|
4608
|
+
/* @__PURE__ */ React22.createElement(
|
|
4456
4609
|
"p",
|
|
4457
4610
|
{
|
|
4458
4611
|
style: {
|
|
@@ -4465,7 +4618,7 @@ function StanceAccordion({
|
|
|
4465
4618
|
},
|
|
4466
4619
|
quote.text
|
|
4467
4620
|
),
|
|
4468
|
-
verdict === "agreed" && /* @__PURE__ */
|
|
4621
|
+
verdict === "agreed" && /* @__PURE__ */ React22.createElement(
|
|
4469
4622
|
"span",
|
|
4470
4623
|
{
|
|
4471
4624
|
style: {
|
|
@@ -4482,10 +4635,10 @@ function StanceAccordion({
|
|
|
4482
4635
|
flexShrink: 0
|
|
4483
4636
|
}
|
|
4484
4637
|
},
|
|
4485
|
-
/* @__PURE__ */
|
|
4638
|
+
/* @__PURE__ */ React22.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M5 13l4 4L19 7" })),
|
|
4486
4639
|
"Agreed"
|
|
4487
4640
|
),
|
|
4488
|
-
verdict === "disagreed" && /* @__PURE__ */
|
|
4641
|
+
verdict === "disagreed" && /* @__PURE__ */ React22.createElement(
|
|
4489
4642
|
"span",
|
|
4490
4643
|
{
|
|
4491
4644
|
style: {
|
|
@@ -4502,10 +4655,10 @@ function StanceAccordion({
|
|
|
4502
4655
|
flexShrink: 0
|
|
4503
4656
|
}
|
|
4504
4657
|
},
|
|
4505
|
-
/* @__PURE__ */
|
|
4658
|
+
/* @__PURE__ */ React22.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
|
|
4506
4659
|
"Disagreed"
|
|
4507
4660
|
),
|
|
4508
|
-
sourceName && /* @__PURE__ */
|
|
4661
|
+
sourceName && /* @__PURE__ */ React22.createElement(
|
|
4509
4662
|
"a",
|
|
4510
4663
|
{
|
|
4511
4664
|
href: quote.source_url || quote.sourceUrl,
|
|
@@ -4522,10 +4675,10 @@ function StanceAccordion({
|
|
|
4522
4675
|
sourceName
|
|
4523
4676
|
)
|
|
4524
4677
|
);
|
|
4525
|
-
})), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */
|
|
4678
|
+
})), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ React22.createElement("p", { className: "text-sm text-neutral-400 italic py-2" }, "No detailed reasoning available for this topic."))))
|
|
4526
4679
|
));
|
|
4527
4680
|
}),
|
|
4528
|
-
hasToggle && /* @__PURE__ */
|
|
4681
|
+
hasToggle && /* @__PURE__ */ React22.createElement(
|
|
4529
4682
|
"button",
|
|
4530
4683
|
{
|
|
4531
4684
|
type: "button",
|
|
@@ -4539,9 +4692,9 @@ function StanceAccordion({
|
|
|
4539
4692
|
}
|
|
4540
4693
|
|
|
4541
4694
|
// src/icons.js
|
|
4542
|
-
import
|
|
4695
|
+
import React23 from "react";
|
|
4543
4696
|
function BallotIcon({ size = 16, color = "currentColor" }) {
|
|
4544
|
-
return /* @__PURE__ */
|
|
4697
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4545
4698
|
"svg",
|
|
4546
4699
|
{
|
|
4547
4700
|
width: size,
|
|
@@ -4554,13 +4707,13 @@ function BallotIcon({ size = 16, color = "currentColor" }) {
|
|
|
4554
4707
|
strokeLinejoin: "round",
|
|
4555
4708
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4556
4709
|
},
|
|
4557
|
-
/* @__PURE__ */
|
|
4558
|
-
/* @__PURE__ */
|
|
4559
|
-
/* @__PURE__ */
|
|
4710
|
+
/* @__PURE__ */ React23.createElement("path", { d: "m9 12 2 2 4-4" }),
|
|
4711
|
+
/* @__PURE__ */ React23.createElement("path", { d: "M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z" }),
|
|
4712
|
+
/* @__PURE__ */ React23.createElement("path", { d: "M22 19H2" })
|
|
4560
4713
|
);
|
|
4561
4714
|
}
|
|
4562
4715
|
function CompassIcon({ size = 16, color = "currentColor" }) {
|
|
4563
|
-
return /* @__PURE__ */
|
|
4716
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4564
4717
|
"svg",
|
|
4565
4718
|
{
|
|
4566
4719
|
width: size,
|
|
@@ -4573,27 +4726,27 @@ function CompassIcon({ size = 16, color = "currentColor" }) {
|
|
|
4573
4726
|
strokeLinejoin: "round",
|
|
4574
4727
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4575
4728
|
},
|
|
4576
|
-
/* @__PURE__ */
|
|
4577
|
-
/* @__PURE__ */
|
|
4729
|
+
/* @__PURE__ */ React23.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
4730
|
+
/* @__PURE__ */ React23.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" })
|
|
4578
4731
|
);
|
|
4579
4732
|
}
|
|
4580
4733
|
function BranchIcon({ size = 16, color = "currentColor", branch }) {
|
|
4581
4734
|
let paths;
|
|
4582
4735
|
switch (branch) {
|
|
4583
4736
|
case "executive":
|
|
4584
|
-
paths = /* @__PURE__ */
|
|
4737
|
+
paths = /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("path", { d: "M3 21h18" }), /* @__PURE__ */ React23.createElement("path", { d: "M5 21V7l8-4v18" }), /* @__PURE__ */ React23.createElement("path", { d: "M19 21V11l-6-4" }), /* @__PURE__ */ React23.createElement("path", { d: "M9 9v.01" }), /* @__PURE__ */ React23.createElement("path", { d: "M9 12v.01" }), /* @__PURE__ */ React23.createElement("path", { d: "M9 15v.01" }), /* @__PURE__ */ React23.createElement("path", { d: "M9 18v.01" }), /* @__PURE__ */ React23.createElement("path", { d: "M5 21h14" }), /* @__PURE__ */ React23.createElement("line", { x1: "13", y1: "5", x2: "13", y2: "3" }), /* @__PURE__ */ React23.createElement("line", { x1: "13", y1: "3", x2: "15", y2: "4" }));
|
|
4585
4738
|
break;
|
|
4586
4739
|
case "legislative":
|
|
4587
|
-
paths = /* @__PURE__ */
|
|
4740
|
+
paths = /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.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__ */ React23.createElement("path", { d: "M19 17V5a2 2 0 0 0-2-2H4" }), /* @__PURE__ */ React23.createElement("path", { d: "M15 8h-5" }), /* @__PURE__ */ React23.createElement("path", { d: "M15 12h-5" }));
|
|
4588
4741
|
break;
|
|
4589
4742
|
case "judicial":
|
|
4590
|
-
paths = /* @__PURE__ */
|
|
4743
|
+
paths = /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("path", { d: "M12 3v19" }), /* @__PURE__ */ React23.createElement("path", { d: "M5 8l7-5 7 5" }), /* @__PURE__ */ React23.createElement("path", { d: "M3 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ React23.createElement("path", { d: "M17 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ React23.createElement("path", { d: "M8 21h8" }));
|
|
4591
4744
|
break;
|
|
4592
4745
|
default:
|
|
4593
|
-
paths = /* @__PURE__ */
|
|
4746
|
+
paths = /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("path", { d: "M10 18v-7" }), /* @__PURE__ */ React23.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__ */ React23.createElement("path", { d: "M14 18v-7" }), /* @__PURE__ */ React23.createElement("path", { d: "M18 18v-7" }), /* @__PURE__ */ React23.createElement("path", { d: "M3 22h18" }), /* @__PURE__ */ React23.createElement("path", { d: "M6 18v-7" }));
|
|
4594
4747
|
break;
|
|
4595
4748
|
}
|
|
4596
|
-
return /* @__PURE__ */
|
|
4749
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4597
4750
|
"svg",
|
|
4598
4751
|
{
|
|
4599
4752
|
width: size,
|
|
@@ -4615,7 +4768,9 @@ export {
|
|
|
4615
4768
|
BranchIcon,
|
|
4616
4769
|
CategorySection,
|
|
4617
4770
|
CommitteeTable,
|
|
4771
|
+
CompassCoverageCallout,
|
|
4618
4772
|
CompassIcon,
|
|
4773
|
+
ExpandCompassNudge,
|
|
4619
4774
|
FilterSidebar,
|
|
4620
4775
|
GovernmentBodySection,
|
|
4621
4776
|
Header,
|
|
@@ -4637,6 +4792,7 @@ export {
|
|
|
4637
4792
|
breakpoints,
|
|
4638
4793
|
colorScales,
|
|
4639
4794
|
colors,
|
|
4795
|
+
computeTierCoverage,
|
|
4640
4796
|
dataVizPalette,
|
|
4641
4797
|
defaultCtaButton,
|
|
4642
4798
|
defaultNavItems,
|