@empoweredvote/ev-ui 0.2.2 → 0.3.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 +190 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +182 -41
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -50,6 +50,7 @@ __export(index_exports, {
|
|
|
50
50
|
SocialLinks: () => SocialLinks,
|
|
51
51
|
StanceAccordion: () => StanceAccordion,
|
|
52
52
|
SubGroupSection: () => SubGroupSection,
|
|
53
|
+
TopicTierBadge: () => TopicTierBadge,
|
|
53
54
|
accessibleText: () => accessibleText,
|
|
54
55
|
borderRadius: () => borderRadius,
|
|
55
56
|
breakpoints: () => breakpoints,
|
|
@@ -4112,15 +4113,155 @@ var styles = {
|
|
|
4112
4113
|
}
|
|
4113
4114
|
};
|
|
4114
4115
|
|
|
4116
|
+
// src/TopicTierBadge.jsx
|
|
4117
|
+
var import_react20 = __toESM(require("react"));
|
|
4118
|
+
function LandmarkIcon({ size = 14 }) {
|
|
4119
|
+
return /* @__PURE__ */ import_react20.default.createElement(
|
|
4120
|
+
"svg",
|
|
4121
|
+
{
|
|
4122
|
+
width: size,
|
|
4123
|
+
height: size,
|
|
4124
|
+
viewBox: "0 0 24 24",
|
|
4125
|
+
fill: "none",
|
|
4126
|
+
stroke: "currentColor",
|
|
4127
|
+
strokeWidth: "2",
|
|
4128
|
+
strokeLinecap: "round",
|
|
4129
|
+
strokeLinejoin: "round",
|
|
4130
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4131
|
+
"aria-hidden": "true"
|
|
4132
|
+
},
|
|
4133
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "M10 18v-7" }),
|
|
4134
|
+
/* @__PURE__ */ import_react20.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" }),
|
|
4135
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "M14 18v-7" }),
|
|
4136
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "M18 18v-7" }),
|
|
4137
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "M3 22h18" }),
|
|
4138
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "M6 18v-7" })
|
|
4139
|
+
);
|
|
4140
|
+
}
|
|
4141
|
+
function Building2Icon({ size = 14 }) {
|
|
4142
|
+
return /* @__PURE__ */ import_react20.default.createElement(
|
|
4143
|
+
"svg",
|
|
4144
|
+
{
|
|
4145
|
+
width: size,
|
|
4146
|
+
height: size,
|
|
4147
|
+
viewBox: "0 0 24 24",
|
|
4148
|
+
fill: "none",
|
|
4149
|
+
stroke: "currentColor",
|
|
4150
|
+
strokeWidth: "2",
|
|
4151
|
+
strokeLinecap: "round",
|
|
4152
|
+
strokeLinejoin: "round",
|
|
4153
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4154
|
+
"aria-hidden": "true"
|
|
4155
|
+
},
|
|
4156
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
|
|
4157
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "M6 12H4a2 2 0 0 0-2 2v8h4" }),
|
|
4158
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "M18 9h2a2 2 0 0 1 2 2v11h-4" }),
|
|
4159
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "M10 6h4" }),
|
|
4160
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "M10 10h4" }),
|
|
4161
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "M10 14h4" }),
|
|
4162
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "M10 18h4" })
|
|
4163
|
+
);
|
|
4164
|
+
}
|
|
4165
|
+
function HomeIcon({ size = 14 }) {
|
|
4166
|
+
return /* @__PURE__ */ import_react20.default.createElement(
|
|
4167
|
+
"svg",
|
|
4168
|
+
{
|
|
4169
|
+
width: size,
|
|
4170
|
+
height: size,
|
|
4171
|
+
viewBox: "0 0 24 24",
|
|
4172
|
+
fill: "none",
|
|
4173
|
+
stroke: "currentColor",
|
|
4174
|
+
strokeWidth: "2",
|
|
4175
|
+
strokeLinecap: "round",
|
|
4176
|
+
strokeLinejoin: "round",
|
|
4177
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4178
|
+
"aria-hidden": "true"
|
|
4179
|
+
},
|
|
4180
|
+
/* @__PURE__ */ import_react20.default.createElement("path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
|
|
4181
|
+
/* @__PURE__ */ import_react20.default.createElement("polyline", { points: "9 22 9 12 15 12 15 22" })
|
|
4182
|
+
);
|
|
4183
|
+
}
|
|
4184
|
+
var TIER_INFO = {
|
|
4185
|
+
federal: { label: "Federal", Icon: LandmarkIcon },
|
|
4186
|
+
state: { label: "State", Icon: Building2Icon },
|
|
4187
|
+
local: { label: "Local", Icon: HomeIcon }
|
|
4188
|
+
};
|
|
4189
|
+
var SIZE_STYLES = {
|
|
4190
|
+
xs: {
|
|
4191
|
+
iconSize: 12,
|
|
4192
|
+
fontSize: fontSizes.xs,
|
|
4193
|
+
pillPadding: `${spacing[1]} ${spacing[2]}`,
|
|
4194
|
+
gap: spacing[1],
|
|
4195
|
+
iconGap: "3px"
|
|
4196
|
+
},
|
|
4197
|
+
sm: {
|
|
4198
|
+
iconSize: 14,
|
|
4199
|
+
fontSize: fontSizes.xs,
|
|
4200
|
+
pillPadding: `${spacing[1]} ${spacing[2]}`,
|
|
4201
|
+
gap: spacing[2],
|
|
4202
|
+
iconGap: "4px"
|
|
4203
|
+
}
|
|
4204
|
+
};
|
|
4205
|
+
function TopicTierBadge({
|
|
4206
|
+
topic,
|
|
4207
|
+
tiers,
|
|
4208
|
+
size = "sm",
|
|
4209
|
+
iconOnly = false,
|
|
4210
|
+
variant = "tinted",
|
|
4211
|
+
style = {}
|
|
4212
|
+
}) {
|
|
4213
|
+
const effectiveTiers = tiers != null ? tiers : topic ? [
|
|
4214
|
+
topic.applies_federal ? "federal" : null,
|
|
4215
|
+
topic.applies_state ? "state" : null,
|
|
4216
|
+
topic.applies_local ? "local" : null
|
|
4217
|
+
].filter(Boolean) : [];
|
|
4218
|
+
if (effectiveTiers.length === 0) return null;
|
|
4219
|
+
const sizeStyle = SIZE_STYLES[size] || SIZE_STYLES.sm;
|
|
4220
|
+
const containerStyle2 = {
|
|
4221
|
+
display: "inline-flex",
|
|
4222
|
+
alignItems: "center",
|
|
4223
|
+
gap: sizeStyle.gap,
|
|
4224
|
+
flexWrap: "wrap",
|
|
4225
|
+
...style
|
|
4226
|
+
};
|
|
4227
|
+
const itemStyle = (tier) => {
|
|
4228
|
+
const color = variant === "muted" ? "#6B7280" : tierColors[tier].text;
|
|
4229
|
+
return {
|
|
4230
|
+
display: "inline-flex",
|
|
4231
|
+
alignItems: "center",
|
|
4232
|
+
gap: sizeStyle.iconGap,
|
|
4233
|
+
fontFamily: fonts.primary,
|
|
4234
|
+
fontWeight: fontWeights.medium,
|
|
4235
|
+
fontSize: sizeStyle.fontSize,
|
|
4236
|
+
color,
|
|
4237
|
+
lineHeight: 1,
|
|
4238
|
+
userSelect: "none"
|
|
4239
|
+
};
|
|
4240
|
+
};
|
|
4241
|
+
return /* @__PURE__ */ import_react20.default.createElement(
|
|
4242
|
+
"span",
|
|
4243
|
+
{
|
|
4244
|
+
className: "ev-topic-tier-badge",
|
|
4245
|
+
style: containerStyle2,
|
|
4246
|
+
role: "group",
|
|
4247
|
+
"aria-label": `Applies at: ${effectiveTiers.map((t) => TIER_INFO[t].label).join(", ")}`
|
|
4248
|
+
},
|
|
4249
|
+
effectiveTiers.map((tier) => {
|
|
4250
|
+
const { label, Icon } = TIER_INFO[tier];
|
|
4251
|
+
return /* @__PURE__ */ import_react20.default.createElement("span", { key: tier, style: itemStyle(tier) }, /* @__PURE__ */ import_react20.default.createElement(Icon, { size: sizeStyle.iconSize }), !iconOnly && /* @__PURE__ */ import_react20.default.createElement("span", null, label));
|
|
4252
|
+
})
|
|
4253
|
+
);
|
|
4254
|
+
}
|
|
4255
|
+
|
|
4115
4256
|
// src/StanceAccordion.jsx
|
|
4116
|
-
var
|
|
4257
|
+
var import_react22 = __toESM(require("react"));
|
|
4117
4258
|
|
|
4118
4259
|
// src/Favicon.jsx
|
|
4119
|
-
var
|
|
4260
|
+
var import_react21 = __toESM(require("react"));
|
|
4120
4261
|
function Favicon({ url, size = 16 }) {
|
|
4121
4262
|
try {
|
|
4122
4263
|
const domain = new URL(url).hostname;
|
|
4123
|
-
return /* @__PURE__ */
|
|
4264
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
4124
4265
|
"img",
|
|
4125
4266
|
{
|
|
4126
4267
|
src: `https://www.google.com/s2/favicons?sz=${size}&domain=${domain}`,
|
|
@@ -4131,7 +4272,7 @@ function Favicon({ url, size = 16 }) {
|
|
|
4131
4272
|
}
|
|
4132
4273
|
);
|
|
4133
4274
|
} catch {
|
|
4134
|
-
return /* @__PURE__ */
|
|
4275
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
4135
4276
|
"svg",
|
|
4136
4277
|
{
|
|
4137
4278
|
width: size,
|
|
@@ -4142,8 +4283,8 @@ function Favicon({ url, size = 16 }) {
|
|
|
4142
4283
|
strokeWidth: "1.5",
|
|
4143
4284
|
style: { verticalAlign: "middle", flexShrink: 0 }
|
|
4144
4285
|
},
|
|
4145
|
-
/* @__PURE__ */
|
|
4146
|
-
/* @__PURE__ */
|
|
4286
|
+
/* @__PURE__ */ import_react21.default.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
4287
|
+
/* @__PURE__ */ import_react21.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" })
|
|
4147
4288
|
);
|
|
4148
4289
|
}
|
|
4149
4290
|
}
|
|
@@ -4174,11 +4315,11 @@ function StanceAccordion({
|
|
|
4174
4315
|
apiUrl = "https://api.empowered.vote"
|
|
4175
4316
|
}) {
|
|
4176
4317
|
var _a;
|
|
4177
|
-
const [expandedTopicId, setExpandedTopicId] = (0,
|
|
4178
|
-
const [loadingId, setLoadingId] = (0,
|
|
4179
|
-
const [showAll, setShowAll] = (0,
|
|
4180
|
-
const contextCache = (0,
|
|
4181
|
-
const quotesCache = (0,
|
|
4318
|
+
const [expandedTopicId, setExpandedTopicId] = (0, import_react22.useState)(null);
|
|
4319
|
+
const [loadingId, setLoadingId] = (0, import_react22.useState)(null);
|
|
4320
|
+
const [showAll, setShowAll] = (0, import_react22.useState)(false);
|
|
4321
|
+
const contextCache = (0, import_react22.useRef)(/* @__PURE__ */ new Map());
|
|
4322
|
+
const quotesCache = (0, import_react22.useRef)(null);
|
|
4182
4323
|
const polAnswerMap = {};
|
|
4183
4324
|
if (polAnswers) {
|
|
4184
4325
|
polAnswers.forEach((a) => {
|
|
@@ -4237,7 +4378,7 @@ function StanceAccordion({
|
|
|
4237
4378
|
quotesCache.current = [];
|
|
4238
4379
|
}
|
|
4239
4380
|
}
|
|
4240
|
-
const handleToggle = (0,
|
|
4381
|
+
const handleToggle = (0, import_react22.useCallback)(
|
|
4241
4382
|
async (topicId) => {
|
|
4242
4383
|
if (expandedTopicId === topicId) {
|
|
4243
4384
|
setExpandedTopicId(null);
|
|
@@ -4254,7 +4395,7 @@ function StanceAccordion({
|
|
|
4254
4395
|
},
|
|
4255
4396
|
[expandedTopicId, politicianId, apiUrl]
|
|
4256
4397
|
);
|
|
4257
|
-
(0,
|
|
4398
|
+
(0, import_react22.useEffect)(() => {
|
|
4258
4399
|
if (initialExpandedTopicId && topics && topics.length > 0) {
|
|
4259
4400
|
handleToggle(String(initialExpandedTopicId));
|
|
4260
4401
|
}
|
|
@@ -4270,13 +4411,13 @@ function StanceAccordion({
|
|
|
4270
4411
|
visibleTopics = [pinned, ...baseTopics.filter((t) => String(t.id) !== String(initialExpandedTopicId))];
|
|
4271
4412
|
}
|
|
4272
4413
|
}
|
|
4273
|
-
return /* @__PURE__ */
|
|
4414
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
|
4274
4415
|
"div",
|
|
4275
4416
|
{
|
|
4276
4417
|
className: "flex flex-col",
|
|
4277
4418
|
style: { fontFamily: "'Manrope', sans-serif" }
|
|
4278
4419
|
},
|
|
4279
|
-
/* @__PURE__ */
|
|
4420
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
|
4280
4421
|
"h3",
|
|
4281
4422
|
{
|
|
4282
4423
|
className: "text-sm font-semibold text-neutral-400 uppercase tracking-wider mb-2",
|
|
@@ -4298,15 +4439,15 @@ function StanceAccordion({
|
|
|
4298
4439
|
if (topic.topic_key) return q.issue === topic.topic_key;
|
|
4299
4440
|
return topic.short_title && q.issue.toLowerCase() === topic.short_title.toLowerCase();
|
|
4300
4441
|
}) : [];
|
|
4301
|
-
return /* @__PURE__ */
|
|
4442
|
+
return /* @__PURE__ */ import_react22.default.createElement("div", { key: topicId, className: "border-b border-neutral-100" }, /* @__PURE__ */ import_react22.default.createElement(
|
|
4302
4443
|
"button",
|
|
4303
4444
|
{
|
|
4304
4445
|
type: "button",
|
|
4305
4446
|
onClick: () => handleToggle(topicId),
|
|
4306
4447
|
className: "w-full flex items-center justify-between py-3 px-2 text-left cursor-pointer hover:bg-neutral-50 transition-colors"
|
|
4307
4448
|
},
|
|
4308
|
-
/* @__PURE__ */
|
|
4309
|
-
/* @__PURE__ */
|
|
4449
|
+
/* @__PURE__ */ import_react22.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react22.default.createElement("span", { className: "text-sm font-medium text-neutral-800 truncate" }, topic.short_title), questionText && /* @__PURE__ */ import_react22.default.createElement("span", { className: "text-xs text-neutral-400 mt-0.5" }, questionText), /* @__PURE__ */ import_react22.default.createElement("span", { className: "text-xs text-neutral-500 mt-0.5" }, label)),
|
|
4450
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
|
4310
4451
|
"svg",
|
|
4311
4452
|
{
|
|
4312
4453
|
width: "16",
|
|
@@ -4323,9 +4464,9 @@ function StanceAccordion({
|
|
|
4323
4464
|
transition: "transform 0.2s ease"
|
|
4324
4465
|
}
|
|
4325
4466
|
},
|
|
4326
|
-
/* @__PURE__ */
|
|
4467
|
+
/* @__PURE__ */ import_react22.default.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
4327
4468
|
)
|
|
4328
|
-
), /* @__PURE__ */
|
|
4469
|
+
), /* @__PURE__ */ import_react22.default.createElement(
|
|
4329
4470
|
"div",
|
|
4330
4471
|
{
|
|
4331
4472
|
style: {
|
|
@@ -4334,7 +4475,7 @@ function StanceAccordion({
|
|
|
4334
4475
|
transition: "grid-template-rows 0.25s ease"
|
|
4335
4476
|
}
|
|
4336
4477
|
},
|
|
4337
|
-
/* @__PURE__ */
|
|
4478
|
+
/* @__PURE__ */ import_react22.default.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ import_react22.default.createElement("div", { className: "px-2 pb-4" }, isLoading && /* @__PURE__ */ import_react22.default.createElement("div", { className: "flex items-center py-3" }, /* @__PURE__ */ import_react22.default.createElement(
|
|
4338
4479
|
"div",
|
|
4339
4480
|
{
|
|
4340
4481
|
style: {
|
|
@@ -4346,14 +4487,14 @@ function StanceAccordion({
|
|
|
4346
4487
|
animation: "ev-spin 0.8s linear infinite"
|
|
4347
4488
|
}
|
|
4348
4489
|
}
|
|
4349
|
-
)), !isLoading && cached && /* @__PURE__ */
|
|
4490
|
+
)), !isLoading && cached && /* @__PURE__ */ import_react22.default.createElement(import_react22.default.Fragment, null, cached.reasoning ? /* @__PURE__ */ import_react22.default.createElement(
|
|
4350
4491
|
"p",
|
|
4351
4492
|
{
|
|
4352
4493
|
className: "text-sm text-neutral-700 mb-3",
|
|
4353
4494
|
style: { whiteSpace: "pre-wrap", lineHeight: 1.6 }
|
|
4354
4495
|
},
|
|
4355
4496
|
cached.reasoning
|
|
4356
|
-
) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */
|
|
4497
|
+
) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ import_react22.default.createElement("div", { className: "mt-2" }, /* @__PURE__ */ import_react22.default.createElement("p", { className: "text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-1.5" }, "References"), /* @__PURE__ */ import_react22.default.createElement("ol", { className: "list-decimal list-inside space-y-1" }, cached.sources.map((src, i) => /* @__PURE__ */ import_react22.default.createElement("li", { key: i, className: "text-xs text-neutral-600" }, /* @__PURE__ */ import_react22.default.createElement(
|
|
4357
4498
|
"a",
|
|
4358
4499
|
{
|
|
4359
4500
|
href: src,
|
|
@@ -4361,9 +4502,9 @@ function StanceAccordion({
|
|
|
4361
4502
|
rel: "noreferrer",
|
|
4362
4503
|
className: "inline-flex items-center gap-1.5 hover:text-[#00657c] transition-colors"
|
|
4363
4504
|
},
|
|
4364
|
-
/* @__PURE__ */
|
|
4365
|
-
/* @__PURE__ */
|
|
4366
|
-
))))), topicQuotes.length > 0 && /* @__PURE__ */
|
|
4505
|
+
/* @__PURE__ */ import_react22.default.createElement(Favicon, { url: src }),
|
|
4506
|
+
/* @__PURE__ */ import_react22.default.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
|
|
4507
|
+
))))), topicQuotes.length > 0 && /* @__PURE__ */ import_react22.default.createElement("div", { style: { marginTop: "12px" } }, /* @__PURE__ */ import_react22.default.createElement(
|
|
4367
4508
|
"p",
|
|
4368
4509
|
{
|
|
4369
4510
|
style: {
|
|
@@ -4380,7 +4521,7 @@ function StanceAccordion({
|
|
|
4380
4521
|
const verdict = verdictsByQuote ? verdictsByQuote[quote.id] : void 0;
|
|
4381
4522
|
const borderColor = verdict === "agreed" ? "#0e7490" : verdict === "disagreed" ? "#b45309" : "#e2e8f0";
|
|
4382
4523
|
const sourceName = quote.source_name || quote.sourceName;
|
|
4383
|
-
return /* @__PURE__ */
|
|
4524
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
|
4384
4525
|
"div",
|
|
4385
4526
|
{
|
|
4386
4527
|
key: quote.id,
|
|
@@ -4392,7 +4533,7 @@ function StanceAccordion({
|
|
|
4392
4533
|
marginBottom: "8px"
|
|
4393
4534
|
}
|
|
4394
4535
|
},
|
|
4395
|
-
/* @__PURE__ */
|
|
4536
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
|
4396
4537
|
"p",
|
|
4397
4538
|
{
|
|
4398
4539
|
style: {
|
|
@@ -4405,7 +4546,7 @@ function StanceAccordion({
|
|
|
4405
4546
|
},
|
|
4406
4547
|
quote.text
|
|
4407
4548
|
),
|
|
4408
|
-
verdict === "agreed" && /* @__PURE__ */
|
|
4549
|
+
verdict === "agreed" && /* @__PURE__ */ import_react22.default.createElement(
|
|
4409
4550
|
"span",
|
|
4410
4551
|
{
|
|
4411
4552
|
style: {
|
|
@@ -4422,10 +4563,10 @@ function StanceAccordion({
|
|
|
4422
4563
|
flexShrink: 0
|
|
4423
4564
|
}
|
|
4424
4565
|
},
|
|
4425
|
-
/* @__PURE__ */
|
|
4566
|
+
/* @__PURE__ */ import_react22.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_react22.default.createElement("path", { d: "M5 13l4 4L19 7" })),
|
|
4426
4567
|
"Agreed"
|
|
4427
4568
|
),
|
|
4428
|
-
verdict === "disagreed" && /* @__PURE__ */
|
|
4569
|
+
verdict === "disagreed" && /* @__PURE__ */ import_react22.default.createElement(
|
|
4429
4570
|
"span",
|
|
4430
4571
|
{
|
|
4431
4572
|
style: {
|
|
@@ -4442,10 +4583,10 @@ function StanceAccordion({
|
|
|
4442
4583
|
flexShrink: 0
|
|
4443
4584
|
}
|
|
4444
4585
|
},
|
|
4445
|
-
/* @__PURE__ */
|
|
4586
|
+
/* @__PURE__ */ import_react22.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_react22.default.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
|
|
4446
4587
|
"Disagreed"
|
|
4447
4588
|
),
|
|
4448
|
-
sourceName && /* @__PURE__ */
|
|
4589
|
+
sourceName && /* @__PURE__ */ import_react22.default.createElement(
|
|
4449
4590
|
"a",
|
|
4450
4591
|
{
|
|
4451
4592
|
href: quote.source_url || quote.sourceUrl,
|
|
@@ -4462,10 +4603,10 @@ function StanceAccordion({
|
|
|
4462
4603
|
sourceName
|
|
4463
4604
|
)
|
|
4464
4605
|
);
|
|
4465
|
-
})), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */
|
|
4606
|
+
})), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ import_react22.default.createElement("p", { className: "text-sm text-neutral-400 italic py-2" }, "No detailed reasoning available for this topic."))))
|
|
4466
4607
|
));
|
|
4467
4608
|
}),
|
|
4468
|
-
hasToggle && /* @__PURE__ */
|
|
4609
|
+
hasToggle && /* @__PURE__ */ import_react22.default.createElement(
|
|
4469
4610
|
"button",
|
|
4470
4611
|
{
|
|
4471
4612
|
type: "button",
|
|
@@ -4479,9 +4620,9 @@ function StanceAccordion({
|
|
|
4479
4620
|
}
|
|
4480
4621
|
|
|
4481
4622
|
// src/icons.js
|
|
4482
|
-
var
|
|
4623
|
+
var import_react23 = __toESM(require("react"));
|
|
4483
4624
|
function BallotIcon({ size = 16, color = "currentColor" }) {
|
|
4484
|
-
return /* @__PURE__ */
|
|
4625
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
4485
4626
|
"svg",
|
|
4486
4627
|
{
|
|
4487
4628
|
width: size,
|
|
@@ -4494,13 +4635,13 @@ function BallotIcon({ size = 16, color = "currentColor" }) {
|
|
|
4494
4635
|
strokeLinejoin: "round",
|
|
4495
4636
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4496
4637
|
},
|
|
4497
|
-
/* @__PURE__ */
|
|
4498
|
-
/* @__PURE__ */
|
|
4499
|
-
/* @__PURE__ */
|
|
4638
|
+
/* @__PURE__ */ import_react23.default.createElement("path", { d: "m9 12 2 2 4-4" }),
|
|
4639
|
+
/* @__PURE__ */ import_react23.default.createElement("path", { d: "M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z" }),
|
|
4640
|
+
/* @__PURE__ */ import_react23.default.createElement("path", { d: "M22 19H2" })
|
|
4500
4641
|
);
|
|
4501
4642
|
}
|
|
4502
4643
|
function CompassIcon({ size = 16, color = "currentColor" }) {
|
|
4503
|
-
return /* @__PURE__ */
|
|
4644
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
4504
4645
|
"svg",
|
|
4505
4646
|
{
|
|
4506
4647
|
width: size,
|
|
@@ -4513,27 +4654,27 @@ function CompassIcon({ size = 16, color = "currentColor" }) {
|
|
|
4513
4654
|
strokeLinejoin: "round",
|
|
4514
4655
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4515
4656
|
},
|
|
4516
|
-
/* @__PURE__ */
|
|
4517
|
-
/* @__PURE__ */
|
|
4657
|
+
/* @__PURE__ */ import_react23.default.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
4658
|
+
/* @__PURE__ */ import_react23.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" })
|
|
4518
4659
|
);
|
|
4519
4660
|
}
|
|
4520
4661
|
function BranchIcon({ size = 16, color = "currentColor", branch }) {
|
|
4521
4662
|
let paths;
|
|
4522
4663
|
switch (branch) {
|
|
4523
4664
|
case "executive":
|
|
4524
|
-
paths = /* @__PURE__ */
|
|
4665
|
+
paths = /* @__PURE__ */ import_react23.default.createElement(import_react23.default.Fragment, null, /* @__PURE__ */ import_react23.default.createElement("path", { d: "M3 21h18" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M5 21V7l8-4v18" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M19 21V11l-6-4" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M9 9v.01" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M9 12v.01" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M9 15v.01" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M9 18v.01" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M5 21h14" }), /* @__PURE__ */ import_react23.default.createElement("line", { x1: "13", y1: "5", x2: "13", y2: "3" }), /* @__PURE__ */ import_react23.default.createElement("line", { x1: "13", y1: "3", x2: "15", y2: "4" }));
|
|
4525
4666
|
break;
|
|
4526
4667
|
case "legislative":
|
|
4527
|
-
paths = /* @__PURE__ */
|
|
4668
|
+
paths = /* @__PURE__ */ import_react23.default.createElement(import_react23.default.Fragment, null, /* @__PURE__ */ import_react23.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_react23.default.createElement("path", { d: "M19 17V5a2 2 0 0 0-2-2H4" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M15 8h-5" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M15 12h-5" }));
|
|
4528
4669
|
break;
|
|
4529
4670
|
case "judicial":
|
|
4530
|
-
paths = /* @__PURE__ */
|
|
4671
|
+
paths = /* @__PURE__ */ import_react23.default.createElement(import_react23.default.Fragment, null, /* @__PURE__ */ import_react23.default.createElement("path", { d: "M12 3v19" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M5 8l7-5 7 5" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M3 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M17 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M8 21h8" }));
|
|
4531
4672
|
break;
|
|
4532
4673
|
default:
|
|
4533
|
-
paths = /* @__PURE__ */
|
|
4674
|
+
paths = /* @__PURE__ */ import_react23.default.createElement(import_react23.default.Fragment, null, /* @__PURE__ */ import_react23.default.createElement("path", { d: "M10 18v-7" }), /* @__PURE__ */ import_react23.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_react23.default.createElement("path", { d: "M14 18v-7" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M18 18v-7" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M3 22h18" }), /* @__PURE__ */ import_react23.default.createElement("path", { d: "M6 18v-7" }));
|
|
4534
4675
|
break;
|
|
4535
4676
|
}
|
|
4536
|
-
return /* @__PURE__ */
|
|
4677
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
4537
4678
|
"svg",
|
|
4538
4679
|
{
|
|
4539
4680
|
width: size,
|
|
@@ -4572,6 +4713,7 @@ function BranchIcon({ size = 16, color = "currentColor", branch }) {
|
|
|
4572
4713
|
SocialLinks,
|
|
4573
4714
|
StanceAccordion,
|
|
4574
4715
|
SubGroupSection,
|
|
4716
|
+
TopicTierBadge,
|
|
4575
4717
|
accessibleText,
|
|
4576
4718
|
borderRadius,
|
|
4577
4719
|
breakpoints,
|