@teamimpact/veda-ui-blocks 0.1.0-beta.12 → 0.1.0-beta.14

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 CHANGED
@@ -103,51 +103,9 @@ var DEFAULT_EXPANDED_CONTENT_JSX = /* @__PURE__ */ jsxs("div", { className: "blo
103
103
  ] })
104
104
  ] });
105
105
 
106
- // src/components/Cards/Card/Card.tsx
107
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
108
- function Card({
109
- tag,
110
- title,
111
- description,
112
- subtitle,
113
- callToAction,
114
- callToActionSecondary,
115
- image,
116
- imagePosition = "cover",
117
- colorMode = "light",
118
- isMastHead = false,
119
- className,
120
- children
121
- }) {
122
- const rootClassName = make_class_name("blocks-card", [
123
- imagePosition === "left" ? "blocks-card--image-left" : imagePosition === "right" ? "blocks-card--image-right" : void 0,
124
- colorMode === "dark" ? "blocks-card--dark" : colorMode === "brand" ? "blocks-card--brand" : void 0,
125
- isMastHead ? "blocks-card--mast-head" : void 0,
126
- className
127
- ]);
128
- const hasContent = tag || title || subtitle || description || callToAction || callToActionSecondary;
129
- return /* @__PURE__ */ jsxs2("div", { className: rootClassName, children: [
130
- imagePosition === "cover" && /* @__PURE__ */ jsx2("div", { className: "blocks-card__media", children: image }),
131
- /* @__PURE__ */ jsxs2("div", { className: "blocks-card__content-container", children: [
132
- imagePosition !== "cover" && /* @__PURE__ */ jsx2("div", { className: "blocks-card__media", children: image }),
133
- hasContent && /* @__PURE__ */ jsxs2("div", { className: "blocks-card__content", children: [
134
- tag && /* @__PURE__ */ jsx2("div", { className: "blocks-card__tag", children: tag }),
135
- title && (typeof title === "string" ? /* @__PURE__ */ jsx2("h2", { className: "blocks-card__title", children: title }) : title),
136
- subtitle && /* @__PURE__ */ jsx2("div", { className: "blocks-card__subtitle", children: subtitle }),
137
- description && /* @__PURE__ */ jsx2("p", { className: "blocks-card__description", children: description }),
138
- (callToAction || callToActionSecondary) && /* @__PURE__ */ jsxs2("div", { className: "blocks-card__actions", children: [
139
- callToAction && /* @__PURE__ */ jsx2("a", { href: callToAction.href, className: "usa-button", children: callToAction.label }),
140
- callToActionSecondary && /* @__PURE__ */ jsx2("a", { href: callToActionSecondary.href, className: "usa-button usa-button--outline", children: callToActionSecondary.label })
141
- ] })
142
- ] })
143
- ] }),
144
- children && /* @__PURE__ */ jsx2("div", { className: "blocks-card__children", children })
145
- ] });
146
- }
147
-
148
106
  // src/components/icons/ArrowIcon.tsx
149
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
150
- var ArrowIcon = () => /* @__PURE__ */ jsxs3(
107
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
108
+ var ArrowIcon = () => /* @__PURE__ */ jsxs2(
151
109
  "svg",
152
110
  {
153
111
  width: "20",
@@ -157,8 +115,8 @@ var ArrowIcon = () => /* @__PURE__ */ jsxs3(
157
115
  preserveAspectRatio: "xMidYMid meet",
158
116
  "aria-hidden": "true",
159
117
  children: [
160
- /* @__PURE__ */ jsx3("circle", { cx: "10", cy: "10", r: "10", fill: "currentColor" }),
161
- /* @__PURE__ */ jsx3("g", { transform: "translate(5.333, 5.333)", children: /* @__PURE__ */ jsx3(
118
+ /* @__PURE__ */ jsx2("circle", { cx: "10", cy: "10", r: "10", fill: "currentColor" }),
119
+ /* @__PURE__ */ jsx2("g", { transform: "translate(5.333, 5.333)", children: /* @__PURE__ */ jsx2(
162
120
  "path",
163
121
  {
164
122
  fillRule: "evenodd",
@@ -171,35 +129,188 @@ var ArrowIcon = () => /* @__PURE__ */ jsxs3(
171
129
  }
172
130
  );
173
131
 
132
+ // src/components/Link/AsLink.tsx
133
+ import { jsx as jsx3 } from "react/jsx-runtime";
134
+ function AsLink({
135
+ as,
136
+ isExternal,
137
+ children,
138
+ ...rest
139
+ }) {
140
+ const Component = as ?? "a";
141
+ return /* @__PURE__ */ jsx3(
142
+ Component,
143
+ {
144
+ ...rest,
145
+ ...typeof as !== "string" || as === "a" ? get_external_anchor_props(isExternal) : {},
146
+ children
147
+ }
148
+ );
149
+ }
150
+
151
+ // src/components/Link/Link.tsx
152
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
153
+ function Link({
154
+ variant = "text",
155
+ size = "md",
156
+ isExternal,
157
+ className,
158
+ as,
159
+ children,
160
+ ...rest
161
+ }) {
162
+ const rootClassName = make_class_name("blocks-link", [
163
+ `blocks-link--${variant}`,
164
+ variant === "button" || variant === "button-outline" ? "usa-button" : void 0,
165
+ variant === "button-outline" ? "usa-button--outline" : void 0,
166
+ variant === "text" ? "usa-button--unstyled" : void 0,
167
+ `blocks-link--${size}`,
168
+ isExternal ? "blocks-link--external usa-link--external" : void 0,
169
+ className
170
+ ]);
171
+ const props = {
172
+ className: rootClassName,
173
+ as,
174
+ isExternal,
175
+ ...rest
176
+ };
177
+ return /* @__PURE__ */ jsxs3(AsLink, { ...props, children: [
178
+ children,
179
+ variant === "arrow" && /* @__PURE__ */ jsx4(ArrowIcon, {})
180
+ ] });
181
+ }
182
+
183
+ // src/components/Cards/Card/Card.tsx
184
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
185
+ function Card(props) {
186
+ const {
187
+ tag,
188
+ title,
189
+ description,
190
+ subtitle,
191
+ callToAction,
192
+ callToActionSecondary,
193
+ image,
194
+ imagePosition = "cover",
195
+ colorMode = "light",
196
+ isMastHead = false,
197
+ className,
198
+ children
199
+ } = props;
200
+ const {
201
+ label: callToActionLabel,
202
+ variant: callToActionVariant = "button",
203
+ ...callToActionProps
204
+ } = callToAction ?? {};
205
+ const {
206
+ label: callToActionSecondaryLabel,
207
+ variant: callToActionSecondaryVariant = "button-outline",
208
+ ...callToActionSecondaryProps
209
+ } = callToActionSecondary ?? {};
210
+ const rootClassName = make_class_name("blocks-card", [
211
+ imagePosition === "left" ? "blocks-card--image-left" : imagePosition === "right" ? "blocks-card--image-right" : void 0,
212
+ colorMode === "dark" ? "blocks-card--dark" : colorMode === "brand" ? "blocks-card--brand" : void 0,
213
+ isMastHead ? "blocks-card--mast-head" : void 0,
214
+ className
215
+ ]);
216
+ const hasContent = tag || title || subtitle || description || callToAction || callToActionSecondary;
217
+ return /* @__PURE__ */ jsxs4("div", { className: rootClassName, children: [
218
+ imagePosition === "cover" && /* @__PURE__ */ jsx5("div", { className: "blocks-card__media", children: image }),
219
+ /* @__PURE__ */ jsxs4("div", { className: "blocks-card__content-container", children: [
220
+ imagePosition !== "cover" && /* @__PURE__ */ jsx5("div", { className: "blocks-card__media", children: image }),
221
+ hasContent && /* @__PURE__ */ jsxs4("div", { className: "blocks-card__content", children: [
222
+ tag && /* @__PURE__ */ jsx5("div", { className: "blocks-card__tag", children: tag }),
223
+ title && (typeof title === "string" ? /* @__PURE__ */ jsx5("h2", { className: "blocks-card__title", children: title }) : title),
224
+ subtitle && /* @__PURE__ */ jsx5("div", { className: "blocks-card__subtitle", children: subtitle }),
225
+ description && /* @__PURE__ */ jsx5("p", { className: "blocks-card__description", children: description }),
226
+ (callToAction || callToActionSecondary) && /* @__PURE__ */ jsxs4("div", { className: "blocks-card__actions", children: [
227
+ callToAction && /* @__PURE__ */ jsx5(
228
+ Link,
229
+ {
230
+ ...{
231
+ ...callToActionProps,
232
+ variant: callToActionVariant,
233
+ children: callToActionLabel
234
+ // TypeScript cannot verify that spread props for callToAction satisfy Omit<ComponentPropsWithRef<T>, "as">
235
+ // for an unconstrained generic T. Cast through unknown preserves T so callers still get
236
+ // accurate prop checking (e.g. href only valid when as="a").
237
+ // TypeScript cannot verify generics when props are spread and generics must be inferred
238
+ // For accurate prop checking, all props need to be explicitly defined
239
+ // ex. ❌ <Card {...props} callToAction={...callToActionProps} /> vs ✅ <Card {...props} callToAction={{label: "text", href="/", as: "a"}} />
240
+ }
241
+ }
242
+ ),
243
+ callToActionSecondary && /* @__PURE__ */ jsx5(
244
+ Link,
245
+ {
246
+ ...{
247
+ ...callToActionSecondaryProps,
248
+ variant: callToActionSecondaryVariant,
249
+ children: callToActionSecondaryLabel
250
+ // See typescript warning above
251
+ }
252
+ }
253
+ )
254
+ ] })
255
+ ] })
256
+ ] }),
257
+ children && /* @__PURE__ */ jsx5("div", { className: "blocks-card__children", children })
258
+ ] });
259
+ }
260
+
174
261
  // src/components/Cards/CardCTA/CardCTA.tsx
175
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
262
+ import { useState as useState2 } from "react";
263
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
176
264
  function CardCTA({
177
265
  title,
178
- url,
266
+ titleAs = "h2",
179
267
  description,
180
268
  accentColor,
181
- titleAs = "h2",
182
269
  className,
183
270
  style,
271
+ isExternal,
272
+ as,
184
273
  ...rest
185
274
  }) {
186
- const TitleTag = titleAs;
187
275
  const rootClassName = make_class_name("blocks-card-cta", [
188
276
  !description ? "blocks-card-cta--without-description" : void 0,
189
277
  className
190
278
  ]);
191
279
  const accentColorStyle = accentColor ? { "--blocks-card-cta-custom-accent-color": accentColor } : void 0;
192
- return /* @__PURE__ */ jsx4("a", { href: url, className: rootClassName, style: { ...accentColorStyle, ...style }, ...rest, children: /* @__PURE__ */ jsxs4("div", { className: "blocks-card-cta__body", children: [
193
- /* @__PURE__ */ jsxs4(TitleTag, { className: "blocks-card-cta__title", title, children: [
194
- title,
195
- /* @__PURE__ */ jsx4("span", { className: "blocks-card-cta__icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx4(ArrowIcon, {}) })
196
- ] }),
197
- description && /* @__PURE__ */ jsx4("p", { className: "blocks-card-cta__description", children: description })
198
- ] }) });
280
+ const [isHovered, setIsHovered] = useState2(false);
281
+ const props = {
282
+ className: rootClassName,
283
+ style: { ...accentColorStyle, ...style },
284
+ as,
285
+ isExternal,
286
+ ...rest
287
+ };
288
+ return /* @__PURE__ */ jsx6(
289
+ AsLink,
290
+ {
291
+ ...props,
292
+ onMouseEnter: () => setIsHovered(true),
293
+ onMouseLeave: () => setIsHovered(false),
294
+ children: /* @__PURE__ */ jsxs5("div", { className: "blocks-card-cta__body", children: [
295
+ /* @__PURE__ */ jsx6(
296
+ Link,
297
+ {
298
+ as: titleAs,
299
+ className: `blocks-card-cta__title ${isHovered ? "usa-button--hover" : ""}`,
300
+ isExternal,
301
+ size: "lg",
302
+ variant: "arrow",
303
+ children: title
304
+ }
305
+ ),
306
+ description && /* @__PURE__ */ jsx6("p", { className: "blocks-card-cta__description", children: description })
307
+ ] })
308
+ }
309
+ );
199
310
  }
200
311
 
201
312
  // src/components/Cards/CardDetailed/CardDetailed.tsx
202
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
313
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
203
314
  function CardDetailed({
204
315
  intro,
205
316
  title,
@@ -212,58 +323,111 @@ function CardDetailed({
212
323
  imagePosition = "top",
213
324
  className = ""
214
325
  }) {
326
+ const {
327
+ label: callToActionLabel,
328
+ variant: callToActionVariant = "button",
329
+ ...callToActionProps
330
+ } = callToAction ?? {};
331
+ const {
332
+ label: callToActionSecondaryLabel,
333
+ variant: callToActionSecondaryVariant = "button-outline",
334
+ ...callToActionSecondaryProps
335
+ } = callToActionSecondary ?? {};
215
336
  const rootClassName = make_class_name("blocks-card-detailed", [
216
337
  imagePosition !== "top" ? `blocks-card-detailed--image-${imagePosition}` : "",
217
338
  className
218
339
  ]);
219
340
  const hasContent = intro || title || description || tags.length || callToAction || callToActionSecondary;
220
- return /* @__PURE__ */ jsxs5("div", { className: rootClassName, children: [
221
- /* @__PURE__ */ jsxs5("div", { className: "blocks-card-detailed__media", children: [
341
+ return /* @__PURE__ */ jsxs6("div", { className: rootClassName, children: [
342
+ /* @__PURE__ */ jsxs6("div", { className: "blocks-card-detailed__media", children: [
222
343
  image,
223
- tagPrimary && /* @__PURE__ */ jsx5("div", { className: "blocks-card-detailed__tag-primary", children: tagPrimary })
344
+ tagPrimary && /* @__PURE__ */ jsx7("div", { className: "blocks-card-detailed__tag-primary", children: tagPrimary })
224
345
  ] }),
225
- hasContent && /* @__PURE__ */ jsxs5("div", { className: "blocks-card-detailed__content-container", children: [
226
- intro && /* @__PURE__ */ jsx5("div", { className: "blocks-card-detailed__intro", title: intro, children: intro }),
227
- title && (typeof title === "string" ? /* @__PURE__ */ jsx5("h2", { className: "blocks-card-detailed__title", title, children: title }) : title),
228
- isNonEmptyArray(tags) && /* @__PURE__ */ jsx5("div", { className: "blocks-card-detailed__tags", children: tags }),
229
- description && /* @__PURE__ */ jsx5("p", { className: "blocks-card-detailed__description", children: description }),
230
- (callToAction || callToActionSecondary) && /* @__PURE__ */ jsxs5("div", { className: "blocks-card-detailed__actions", children: [
231
- callToAction && /* @__PURE__ */ jsx5("a", { href: callToAction.href, className: "usa-button", children: callToAction.label }),
232
- callToActionSecondary && /* @__PURE__ */ jsx5("a", { href: callToActionSecondary.href, className: "usa-button usa-button--outline", children: callToActionSecondary.label })
346
+ hasContent && /* @__PURE__ */ jsxs6("div", { className: "blocks-card-detailed__content-container", children: [
347
+ intro && /* @__PURE__ */ jsx7("div", { className: "blocks-card-detailed__intro", title: intro, children: intro }),
348
+ title && (typeof title === "string" ? /* @__PURE__ */ jsx7("h2", { className: "blocks-card-detailed__title", title, children: title }) : title),
349
+ isNonEmptyArray(tags) && /* @__PURE__ */ jsx7("div", { className: "blocks-card-detailed__tags", children: tags }),
350
+ description && /* @__PURE__ */ jsx7("p", { className: "blocks-card-detailed__description", children: description }),
351
+ (callToAction || callToActionSecondary) && /* @__PURE__ */ jsxs6("div", { className: "blocks-card-detailed__actions", children: [
352
+ callToAction && /* @__PURE__ */ jsx7(
353
+ Link,
354
+ {
355
+ ...{
356
+ ...callToActionProps,
357
+ variant: callToActionVariant,
358
+ children: callToActionLabel
359
+ // TypeScript cannot verify that spread props for callToAction satisfy Omit<ComponentPropsWithRef<T>, "as">
360
+ // for an unconstrained generic T. Cast through unknown preserves T so callers still get
361
+ // accurate prop checking (e.g. href only valid when as="a").
362
+ // TypeScript cannot verify generics when props are spread and generics must be inferred
363
+ // For accurate prop checking, all props need to be explicitly defined
364
+ // ex. ❌ <CardDetailed {...props} callToAction={...callToActionProps} /> vs ✅ <CardDetailed {...props} callToAction={{label: "text", href="/", as: "a"}} />
365
+ }
366
+ }
367
+ ),
368
+ callToActionSecondary && /* @__PURE__ */ jsx7(
369
+ Link,
370
+ {
371
+ ...{
372
+ ...callToActionSecondaryProps,
373
+ variant: callToActionSecondaryVariant,
374
+ children: callToActionSecondaryLabel
375
+ // See typescript warning above
376
+ }
377
+ }
378
+ )
233
379
  ] })
234
380
  ] })
235
381
  ] });
236
382
  }
237
383
 
238
384
  // src/components/Cards/CardMini/CardMini.tsx
239
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
240
- function CardMini({ image, title, url, tag, titleAs = "h2", className }) {
385
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
386
+ function CardMini({
387
+ image,
388
+ title,
389
+ titleAs = "h2",
390
+ tag,
391
+ className,
392
+ isExternal,
393
+ as,
394
+ ...rest
395
+ }) {
241
396
  const TitleTag = titleAs;
242
- const hasTag = Boolean(tag);
243
397
  const rootClassName = make_class_name("blocks-card-mini", [
244
- hasTag ? "blocks-card-mini--with-tag" : void 0,
398
+ isDefined(tag) ? "blocks-card-mini--with-tag" : void 0,
245
399
  className
246
400
  ]);
247
- return /* @__PURE__ */ jsxs6("a", { href: url, className: rootClassName, children: [
248
- /* @__PURE__ */ jsx6("div", { className: "blocks-card-mini__image", children: image }),
249
- /* @__PURE__ */ jsxs6("div", { className: "blocks-card-mini__body", children: [
250
- /* @__PURE__ */ jsx6(TitleTag, { className: "blocks-card-mini__title", title, children: title }),
251
- tag && /* @__PURE__ */ jsx6("div", { className: "blocks-card-mini__tag", children: tag })
401
+ const titleClassName = make_class_name("blocks-card-mini__title", [
402
+ isExternal ? "usa-link--external" : void 0
403
+ ]);
404
+ const props = {
405
+ className: rootClassName,
406
+ as,
407
+ isExternal,
408
+ ...rest
409
+ };
410
+ return /* @__PURE__ */ jsxs7(AsLink, { ...props, children: [
411
+ /* @__PURE__ */ jsx8("div", { className: "blocks-card-mini__image", children: image }),
412
+ /* @__PURE__ */ jsxs7("div", { className: "blocks-card-mini__body", children: [
413
+ /* @__PURE__ */ jsx8(TitleTag, { className: titleClassName, title, children: title }),
414
+ tag && /* @__PURE__ */ jsx8("div", { className: "blocks-card-mini__tag", children: tag })
252
415
  ] })
253
416
  ] });
254
417
  }
255
418
 
256
419
  // src/components/Cards/CardSimple/CardSimple.tsx
257
- import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
420
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
258
421
  function CardSimple({
259
- title,
260
422
  image,
261
- url,
262
- isExternal,
423
+ title,
424
+ titleAs = "h2",
263
425
  tag,
264
426
  size = "default",
265
- titleAs = "h2",
266
- className
427
+ className,
428
+ isExternal,
429
+ as,
430
+ ...rest
267
431
  }) {
268
432
  const TitleTag = titleAs;
269
433
  const rootClassName = make_class_name("blocks-card-simple", [
@@ -273,21 +437,290 @@ function CardSimple({
273
437
  const titleClassName = make_class_name("blocks-card-simple__title", [
274
438
  isExternal ? "usa-link--external" : void 0
275
439
  ]);
276
- return /* @__PURE__ */ jsxs7("a", { href: url, className: rootClassName, ...get_external_anchor_props(isExternal), children: [
277
- /* @__PURE__ */ jsxs7("div", { className: "blocks-card-simple__media", children: [
440
+ const props = {
441
+ className: rootClassName,
442
+ as,
443
+ isExternal,
444
+ ...rest
445
+ };
446
+ return /* @__PURE__ */ jsxs8(AsLink, { ...props, children: [
447
+ /* @__PURE__ */ jsxs8("div", { className: "blocks-card-simple__media", children: [
278
448
  image,
279
- /* @__PURE__ */ jsx7("div", { className: "blocks-card-simple__overlay", "aria-hidden": "true" })
449
+ /* @__PURE__ */ jsx9("div", { className: "blocks-card-simple__overlay", "aria-hidden": "true" })
280
450
  ] }),
281
- /* @__PURE__ */ jsxs7("div", { className: "blocks-card-simple__body", children: [
282
- tag && /* @__PURE__ */ jsx7("div", { className: "blocks-card-simple__tag", children: tag }),
283
- /* @__PURE__ */ jsx7(TitleTag, { className: titleClassName, children: title })
451
+ /* @__PURE__ */ jsxs8("div", { className: "blocks-card-simple__body", children: [
452
+ tag && /* @__PURE__ */ jsx9("div", { className: "blocks-card-simple__tag", children: tag }),
453
+ /* @__PURE__ */ jsx9(TitleTag, { className: titleClassName, children: title })
284
454
  ] })
285
455
  ] });
286
456
  }
287
457
 
458
+ // src/components/Carousel/Carousel.tsx
459
+ import useEmblaCarousel from "embla-carousel-react";
460
+ import { useCallback, useEffect, useState as useState3 } from "react";
461
+
462
+ // src/components/icons/NavigateBeforeIcon.tsx
463
+ import { jsx as jsx10 } from "react/jsx-runtime";
464
+ var NavigateBeforeIcon = () => /* @__PURE__ */ jsx10(
465
+ "svg",
466
+ {
467
+ xmlns: "http://www.w3.org/2000/svg",
468
+ width: "24",
469
+ height: "24",
470
+ viewBox: "0 0 24 24",
471
+ "aria-hidden": "true",
472
+ focusable: "false",
473
+ role: "img",
474
+ children: /* @__PURE__ */ jsx10("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" })
475
+ }
476
+ );
477
+
478
+ // src/components/icons/NavigateNextIcon.tsx
479
+ import { jsx as jsx11 } from "react/jsx-runtime";
480
+ var NavigateNextIcon = () => /* @__PURE__ */ jsx11(
481
+ "svg",
482
+ {
483
+ xmlns: "http://www.w3.org/2000/svg",
484
+ width: "24",
485
+ height: "24",
486
+ viewBox: "0 0 24 24",
487
+ "aria-hidden": "true",
488
+ focusable: "false",
489
+ role: "img",
490
+ children: /* @__PURE__ */ jsx11("path", { d: "m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z" })
491
+ }
492
+ );
493
+
494
+ // src/foundations/theme-token-bridge.helpers.ts
495
+ var BASE_COLOR_TOKENS = [
496
+ "base-lightest",
497
+ "base-lighter",
498
+ "base-light",
499
+ "base",
500
+ "base-dark",
501
+ "base-darker",
502
+ "base-darkest",
503
+ "ink"
504
+ ];
505
+ var PRIMARY_COLOR_TOKENS = [
506
+ "primary-lightest",
507
+ "primary-lighter",
508
+ "primary-light",
509
+ "primary",
510
+ "primary-vivid",
511
+ "primary-dark",
512
+ "primary-darker",
513
+ "primary-darkest"
514
+ ];
515
+ var SECONDARY_COLOR_TOKENS = [
516
+ "secondary-lightest",
517
+ "secondary-lighter",
518
+ "secondary-light",
519
+ "secondary",
520
+ "secondary-vivid",
521
+ "secondary-dark",
522
+ "secondary-darker",
523
+ "secondary-darkest"
524
+ ];
525
+ var ACCENT_COOL_COLOR_TOKENS = [
526
+ "accent-cool-lightest",
527
+ "accent-cool-lighter",
528
+ "accent-cool-light",
529
+ "accent-cool",
530
+ "accent-cool-dark",
531
+ "accent-cool-darker",
532
+ "accent-cool-darkest"
533
+ ];
534
+ var ACCENT_WARM_COLOR_TOKENS = [
535
+ "accent-warm-lightest",
536
+ "accent-warm-lighter",
537
+ "accent-warm-light",
538
+ "accent-warm",
539
+ "accent-warm-dark",
540
+ "accent-warm-darker",
541
+ "accent-warm-darkest"
542
+ ];
543
+ var INFO_COLOR_TOKENS = [
544
+ "info-lighter",
545
+ "info-light",
546
+ "info",
547
+ "info-dark",
548
+ "info-darker"
549
+ ];
550
+ var WARNING_COLOR_TOKENS = [
551
+ "warning-lighter",
552
+ "warning-light",
553
+ "warning",
554
+ "warning-dark",
555
+ "warning-darker"
556
+ ];
557
+ var ERROR_COLOR_TOKENS = [
558
+ "error-lighter",
559
+ "error-light",
560
+ "error",
561
+ "error-dark",
562
+ "error-darker"
563
+ ];
564
+ var SUCCESS_COLOR_TOKENS = [
565
+ "success-lighter",
566
+ "success-light",
567
+ "success",
568
+ "success-dark",
569
+ "success-darker"
570
+ ];
571
+ var DISABLED_COLOR_TOKENS = [
572
+ "disabled-lighter",
573
+ "disabled-light",
574
+ "disabled",
575
+ "disabled-dark",
576
+ "disabled-darker"
577
+ ];
578
+ var EMERGENCY_COLOR_TOKENS = ["emergency", "emergency-dark"];
579
+ var COLOR_TOKENS = [
580
+ ...BASE_COLOR_TOKENS,
581
+ ...PRIMARY_COLOR_TOKENS,
582
+ ...SECONDARY_COLOR_TOKENS,
583
+ ...ACCENT_COOL_COLOR_TOKENS,
584
+ ...ACCENT_WARM_COLOR_TOKENS,
585
+ ...INFO_COLOR_TOKENS,
586
+ ...WARNING_COLOR_TOKENS,
587
+ ...ERROR_COLOR_TOKENS,
588
+ ...SUCCESS_COLOR_TOKENS,
589
+ ...EMERGENCY_COLOR_TOKENS,
590
+ ...DISABLED_COLOR_TOKENS
591
+ ];
592
+ var resolveColorToken = (color) => COLOR_TOKENS.includes(color) ? `var(--color-${color})` : color;
593
+
594
+ // src/components/icons/CloseIcon.tsx
595
+ import { jsx as jsx12 } from "react/jsx-runtime";
596
+ var CloseIcon = () => /* @__PURE__ */ jsx12("svg", { height: "24", width: "24", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ jsx12("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) });
597
+
598
+ // src/components/Tag/Tag.tsx
599
+ import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
600
+ function Tag({
601
+ variant = "solid",
602
+ size = "default",
603
+ color,
604
+ bgColor,
605
+ borderColor,
606
+ textColor,
607
+ icon,
608
+ onClose,
609
+ children,
610
+ className
611
+ }) {
612
+ const rootClassName = make_class_name("blocks-tag", [
613
+ `blocks-tag--${variant}`,
614
+ size === "big" ? "blocks-tag--big" : void 0,
615
+ icon ? "blocks-tag--icon" : void 0,
616
+ onClose ? "blocks-tag--x-close" : void 0,
617
+ className
618
+ ]);
619
+ const customStyle = color || textColor || bgColor || borderColor ? {
620
+ ...color ? { "--blocks-tag-custom-color": resolveColorToken(color) } : void 0,
621
+ ...textColor ? { "--blocks-tag-custom-text-color": resolveColorToken(textColor) } : void 0,
622
+ ...bgColor ? { "--blocks-tag-custom-bg-color": resolveColorToken(bgColor) } : void 0,
623
+ ...borderColor ? { "--blocks-tag-custom-border-color": resolveColorToken(borderColor) } : void 0
624
+ } : void 0;
625
+ return /* @__PURE__ */ jsxs9("span", { className: rootClassName, style: customStyle, children: [
626
+ icon && /* @__PURE__ */ jsx13("span", { className: "blocks-tag__icon", children: icon }),
627
+ children,
628
+ onClose && /* @__PURE__ */ jsx13(
629
+ "button",
630
+ {
631
+ type: "button",
632
+ className: "blocks-tag__close-button",
633
+ "aria-label": "Remove tag",
634
+ tabIndex: 0,
635
+ onClick: onClose,
636
+ children: /* @__PURE__ */ jsx13(CloseIcon, {})
637
+ }
638
+ )
639
+ ] });
640
+ }
641
+
642
+ // src/components/Carousel/Carousel.tsx
643
+ import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
644
+ function Carousel({ items, maxVisibleItems = 2, className }) {
645
+ const [emblaRef, emblaApi] = useEmblaCarousel({
646
+ loop: false,
647
+ slidesToScroll: "auto"
648
+ });
649
+ const [, forceUpdate] = useState3(0);
650
+ useEffect(() => {
651
+ if (!emblaApi) return;
652
+ const onEmblaStateChange = () => forceUpdate((n) => n + 1);
653
+ emblaApi.on("select", onEmblaStateChange).on("reInit", onEmblaStateChange).on("init", onEmblaStateChange);
654
+ }, [emblaApi]);
655
+ const scrollPrev = useCallback(() => emblaApi?.scrollPrev(), [emblaApi]);
656
+ const scrollNext = useCallback(() => emblaApi?.scrollNext(), [emblaApi]);
657
+ const showControls = items.length > maxVisibleItems;
658
+ const effectiveVisibleItems = Math.min(items.length, maxVisibleItems);
659
+ return /* @__PURE__ */ jsxs10("div", { className: make_class_name("blocks-carousel", [className]), children: [
660
+ /* @__PURE__ */ jsx14("div", { className: "blocks-carousel__viewport", ref: emblaRef, children: /* @__PURE__ */ jsx14("div", { className: "blocks-carousel__track", children: items.map(({ tag: { label: tagLabel, ...tagProps } = {}, ...cardProps }, index) => /* @__PURE__ */ jsx14(
661
+ "div",
662
+ {
663
+ className: make_class_name("blocks-carousel__item", [
664
+ `blocks-carousel__item--${effectiveVisibleItems}`
665
+ ]),
666
+ children: /* @__PURE__ */ jsx14(
667
+ Card,
668
+ {
669
+ ...cardProps,
670
+ ...tagLabel && { tag: /* @__PURE__ */ jsx14(Tag, { ...tagProps, children: tagLabel }) }
671
+ }
672
+ )
673
+ },
674
+ index
675
+ )) }) }),
676
+ /* @__PURE__ */ jsxs10(
677
+ "div",
678
+ {
679
+ className: make_class_name("blocks-carousel__controls", [
680
+ !showControls ? "blocks-carousel__controls--hidden" : void 0
681
+ ]),
682
+ "aria-hidden": !showControls || void 0,
683
+ children: [
684
+ /* @__PURE__ */ jsx14(
685
+ Link,
686
+ {
687
+ as: "button",
688
+ type: "button",
689
+ variant: "text",
690
+ className: "blocks-carousel__btn blocks-carousel__btn--prev",
691
+ onClick: scrollPrev,
692
+ disabled: !emblaApi?.canScrollPrev(),
693
+ "aria-label": "Previous slide",
694
+ children: /* @__PURE__ */ jsx14(NavigateBeforeIcon, {})
695
+ }
696
+ ),
697
+ /* @__PURE__ */ jsxs10("span", { className: "blocks-carousel__counter", "aria-live": "polite", children: [
698
+ (emblaApi?.selectedScrollSnap() ?? 0) + 1,
699
+ " / ",
700
+ emblaApi?.scrollSnapList().length ?? 0
701
+ ] }),
702
+ /* @__PURE__ */ jsx14(
703
+ Link,
704
+ {
705
+ as: "button",
706
+ type: "button",
707
+ variant: "text",
708
+ className: "blocks-carousel__btn blocks-carousel__btn--next",
709
+ onClick: scrollNext,
710
+ disabled: !emblaApi?.canScrollNext(),
711
+ "aria-label": "Next slide",
712
+ children: /* @__PURE__ */ jsx14(NavigateNextIcon, {})
713
+ }
714
+ )
715
+ ]
716
+ }
717
+ )
718
+ ] });
719
+ }
720
+
288
721
  // src/components/Footer/Footer.tsx
289
- import { GridContainer, Icon as Icon2, Link, Footer as USWDSFooter } from "@trussworks/react-uswds";
290
- import { Fragment, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
722
+ import { GridContainer, Icon as Icon2, Link as Link2, Footer as USWDSFooter } from "@trussworks/react-uswds";
723
+ import { Fragment, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
291
724
  function Footer({
292
725
  portalDetails,
293
726
  primaryNavItems,
@@ -296,21 +729,21 @@ function Footer({
296
729
  className
297
730
  }) {
298
731
  const footerClassName = make_class_name("blocks-footer", [className]);
299
- return /* @__PURE__ */ jsx8(
732
+ return /* @__PURE__ */ jsx15(
300
733
  USWDSFooter,
301
734
  {
302
735
  className: footerClassName,
303
736
  size: "slim",
304
- primary: /* @__PURE__ */ jsx8(GridContainer, { children: /* @__PURE__ */ jsxs8("section", { className: "blocks-footer__primary-section", children: [
305
- /* @__PURE__ */ jsxs8("div", { className: "blocks-footer__title", children: [
306
- portalDetails.logo ? /* @__PURE__ */ jsx8("div", { className: "blocks-footer__logo", children: portalDetails.logo }) : null,
307
- /* @__PURE__ */ jsxs8("div", { className: "blocks-footer__title-text", children: [
308
- /* @__PURE__ */ jsx8("span", { children: portalDetails.title }),
309
- portalDetails.tagline ? /* @__PURE__ */ jsx8("p", { children: portalDetails.tagline }) : null
737
+ primary: /* @__PURE__ */ jsx15(GridContainer, { children: /* @__PURE__ */ jsxs11("section", { className: "blocks-footer__primary-section", children: [
738
+ /* @__PURE__ */ jsxs11("div", { className: "blocks-footer__title", children: [
739
+ portalDetails.logo ? /* @__PURE__ */ jsx15("div", { className: "blocks-footer__logo", children: portalDetails.logo }) : null,
740
+ /* @__PURE__ */ jsxs11("div", { className: "blocks-footer__title-text", children: [
741
+ /* @__PURE__ */ jsx15("span", { children: portalDetails.title }),
742
+ portalDetails.tagline ? /* @__PURE__ */ jsx15("p", { children: portalDetails.tagline }) : null
310
743
  ] })
311
744
  ] }),
312
- primaryNavItems.length > 0 ? /* @__PURE__ */ jsx8("nav", { className: "blocks-footer__primary-nav", "aria-label": "Footer primary navigation", children: /* @__PURE__ */ jsx8("ul", { children: primaryNavItems.map(({ label, href, isExternal }) => /* @__PURE__ */ jsx8("li", { className: "usa-footer__primary-content", children: /* @__PURE__ */ jsx8(
313
- Link,
745
+ primaryNavItems.length > 0 ? /* @__PURE__ */ jsx15("nav", { className: "blocks-footer__primary-nav", "aria-label": "Footer primary navigation", children: /* @__PURE__ */ jsx15("ul", { children: primaryNavItems.map(({ label, href, isExternal }) => /* @__PURE__ */ jsx15("li", { className: "usa-footer__primary-content", children: /* @__PURE__ */ jsx15(
746
+ Link2,
314
747
  {
315
748
  className: "usa-footer__primary-link",
316
749
  href,
@@ -319,31 +752,31 @@ function Footer({
319
752
  }
320
753
  ) }, href)) }) }) : null
321
754
  ] }) }),
322
- secondary: /* @__PURE__ */ jsxs8(Fragment, { children: [
323
- secondaryNavItems.length > 0 ? /* @__PURE__ */ jsx8("section", { className: "blocks-footer__secondary-section-upper", children: /* @__PURE__ */ jsx8(
755
+ secondary: /* @__PURE__ */ jsxs11(Fragment, { children: [
756
+ secondaryNavItems.length > 0 ? /* @__PURE__ */ jsx15("section", { className: "blocks-footer__secondary-section-upper", children: /* @__PURE__ */ jsx15(
324
757
  "nav",
325
758
  {
326
759
  className: "blocks-footer__secondary-nav",
327
760
  "aria-label": "Footer secondary navigation",
328
- children: /* @__PURE__ */ jsx8("ul", { children: secondaryNavItems.map(({ label, href, isExternal }) => /* @__PURE__ */ jsx8("li", { className: "usa-footer__secondary-link", children: /* @__PURE__ */ jsx8(Link, { href, ...get_external_anchor_props(isExternal), children: label }) }, href)) })
761
+ children: /* @__PURE__ */ jsx15("ul", { children: secondaryNavItems.map(({ label, href, isExternal }) => /* @__PURE__ */ jsx15("li", { className: "usa-footer__secondary-link", children: /* @__PURE__ */ jsx15(Link2, { href, ...get_external_anchor_props(isExternal), children: label }) }, href)) })
329
762
  }
330
763
  ) }) : null,
331
- utilityNavItems?.length || portalDetails.updatedDate || portalDetails.contacts?.length ? /* @__PURE__ */ jsxs8("section", { className: "blocks-footer__secondary-section-lower", children: [
332
- utilityNavItems?.length ? /* @__PURE__ */ jsx8("nav", { className: "blocks-footer__utility-nav", "aria-label": "Site utilities", children: /* @__PURE__ */ jsx8("ul", { children: utilityNavItems.length ? utilityNavItems.map(({ text, label, href, isExternal }) => /* @__PURE__ */ jsxs8("li", { children: [
764
+ utilityNavItems?.length || portalDetails.updatedDate || portalDetails.contacts?.length ? /* @__PURE__ */ jsxs11("section", { className: "blocks-footer__secondary-section-lower", children: [
765
+ utilityNavItems?.length ? /* @__PURE__ */ jsx15("nav", { className: "blocks-footer__utility-nav", "aria-label": "Site utilities", children: /* @__PURE__ */ jsx15("ul", { children: utilityNavItems.length ? utilityNavItems.map(({ text, label, href, isExternal }) => /* @__PURE__ */ jsxs11("li", { children: [
333
766
  text,
334
767
  " ",
335
- /* @__PURE__ */ jsx8(Link, { href, ...get_external_anchor_props(isExternal), children: label })
768
+ /* @__PURE__ */ jsx15(Link2, { href, ...get_external_anchor_props(isExternal), children: label })
336
769
  ] }, href)) : null }) }) : null,
337
- portalDetails.updatedDate || portalDetails.contacts?.length ? /* @__PURE__ */ jsxs8("div", { className: "blocks-footer__secondary-meta", children: [
338
- portalDetails.updatedDate ? /* @__PURE__ */ jsxs8("p", { children: [
770
+ portalDetails.updatedDate || portalDetails.contacts?.length ? /* @__PURE__ */ jsxs11("div", { className: "blocks-footer__secondary-meta", children: [
771
+ portalDetails.updatedDate ? /* @__PURE__ */ jsxs11("p", { children: [
339
772
  "Site last updated: ",
340
773
  portalDetails.updatedDate
341
774
  ] }) : null,
342
- portalDetails.contacts?.length ? /* @__PURE__ */ jsx8("nav", { className: "blocks-footer__contacts-nav", "aria-label": "Site contacts", children: /* @__PURE__ */ jsx8("ul", { children: portalDetails.contacts.map(({ label, name, email }) => /* @__PURE__ */ jsxs8("li", { children: [
343
- /* @__PURE__ */ jsx8("span", { children: label }),
344
- /* @__PURE__ */ jsxs8(Link, { href: `mailto:${email}`, ...get_external_anchor_props(), children: [
345
- /* @__PURE__ */ jsx8(Icon2.Mail, { "aria-hidden": "true", focusable: false }),
346
- /* @__PURE__ */ jsx8("span", { children: name })
775
+ portalDetails.contacts?.length ? /* @__PURE__ */ jsx15("nav", { className: "blocks-footer__contacts-nav", "aria-label": "Site contacts", children: /* @__PURE__ */ jsx15("ul", { children: portalDetails.contacts.map(({ label, name, email }) => /* @__PURE__ */ jsxs11("li", { children: [
776
+ /* @__PURE__ */ jsx15("span", { children: label }),
777
+ /* @__PURE__ */ jsxs11(Link2, { href: `mailto:${email}`, ...get_external_anchor_props(), children: [
778
+ /* @__PURE__ */ jsx15(Icon2.Mail, { "aria-hidden": "true", focusable: false }),
779
+ /* @__PURE__ */ jsx15("span", { children: name })
347
780
  ] })
348
781
  ] }, `${label}-${email}`)) }) }) : null
349
782
  ] }) : null
@@ -355,14 +788,14 @@ function Footer({
355
788
 
356
789
  // src/components/Header/Header.tsx
357
790
  import { NavMenuButton, PrimaryNav, Title, Header as USWDSHeader } from "@trussworks/react-uswds";
358
- import { useCallback, useMemo, useRef as useRef2, useState as useState2 } from "react";
791
+ import { useCallback as useCallback2, useMemo, useRef as useRef2, useState as useState4 } from "react";
359
792
 
360
793
  // src/hooks/useClickOutside.ts
361
- import { useEffect, useRef } from "react";
794
+ import { useEffect as useEffect2, useRef } from "react";
362
795
  function useClickOutside(callback, options) {
363
796
  const ref = useRef(null);
364
797
  const { excludeRefs, bindEscapeKey } = options ?? {};
365
- useEffect(() => {
798
+ useEffect2(() => {
366
799
  const handleClickOutside = (event) => {
367
800
  if ([ref, ...excludeRefs ?? []].every(
368
801
  (r) => r.current && !r.current.contains(event.target)
@@ -373,7 +806,7 @@ function useClickOutside(callback, options) {
373
806
  document.addEventListener("click", handleClickOutside);
374
807
  return () => document.removeEventListener("click", handleClickOutside);
375
808
  }, [callback, excludeRefs]);
376
- useEffect(() => {
809
+ useEffect2(() => {
377
810
  if (!bindEscapeKey) return;
378
811
  const handleEscape = (event) => {
379
812
  if (event.key === "Escape") {
@@ -389,9 +822,9 @@ function useClickOutside(callback, options) {
389
822
  }
390
823
 
391
824
  // src/hooks/useWindowResize.ts
392
- import { useEffect as useEffect2 } from "react";
825
+ import { useEffect as useEffect3 } from "react";
393
826
  function useWindowResize(handleResize) {
394
- useEffect2(() => {
827
+ useEffect3(() => {
395
828
  window.addEventListener("resize", handleResize);
396
829
  return () => {
397
830
  window.removeEventListener("resize", handleResize);
@@ -400,8 +833,8 @@ function useWindowResize(handleResize) {
400
833
  }
401
834
 
402
835
  // src/components/Header/Header.helpers.tsx
403
- import { Link as Link2, Menu, NavDropDownButton } from "@trussworks/react-uswds";
404
- import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
836
+ import { Link as Link3, Menu, NavDropDownButton } from "@trussworks/react-uswds";
837
+ import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
405
838
  var make_nav_items_initial_state = (navItems) => {
406
839
  const initialState = {};
407
840
  const initialProps = navItems.map((item) => {
@@ -433,14 +866,14 @@ var make_menu_link_jsx = ({ label, href, isExternal, isPrimary }, options) => {
433
866
  if (isCurrent) {
434
867
  className.push("usa-current");
435
868
  }
436
- return /* @__PURE__ */ jsx9(
869
+ return /* @__PURE__ */ jsx16(
437
870
  "a",
438
871
  {
439
872
  href,
440
873
  className: className.join(" "),
441
874
  "aria-current": isCurrent ? "page" : void 0,
442
875
  ...get_external_anchor_props(isExternal),
443
- children: /* @__PURE__ */ jsx9("span", { children: label })
876
+ children: /* @__PURE__ */ jsx16("span", { children: label })
444
877
  },
445
878
  href
446
879
  );
@@ -448,8 +881,8 @@ var make_menu_link_jsx = ({ label, href, isExternal, isPrimary }, options) => {
448
881
  var make_menu_link_with_dropdown_jsx = ({ label, menuId, subItems }, options) => {
449
882
  const { navDropDownOpenState, handleToggleDropdown, currentPath } = options;
450
883
  const sublinks = subItems.map((item) => make_menu_link_jsx(item, { currentPath }));
451
- return /* @__PURE__ */ jsxs9(Fragment2, { children: [
452
- /* @__PURE__ */ jsx9(
884
+ return /* @__PURE__ */ jsxs12(Fragment2, { children: [
885
+ /* @__PURE__ */ jsx16(
453
886
  NavDropDownButton,
454
887
  {
455
888
  menuId,
@@ -459,11 +892,11 @@ var make_menu_link_with_dropdown_jsx = ({ label, menuId, subItems }, options) =>
459
892
  isCurrent: sublinks.some((sublink) => is_current_path(sublink.props.href, currentPath))
460
893
  }
461
894
  ),
462
- /* @__PURE__ */ jsx9(Menu, { items: sublinks, isOpen: navDropDownOpenState[menuId] ?? false, id: menuId }, "one")
895
+ /* @__PURE__ */ jsx16(Menu, { items: sublinks, isOpen: navDropDownOpenState[menuId] ?? false, id: menuId }, "one")
463
896
  ] });
464
897
  };
465
- var make_custom_nav_item_jsx = (customNavItem) => isNavItem(customNavItem) ? /* @__PURE__ */ jsx9(
466
- Link2,
898
+ var make_custom_nav_item_jsx = (customNavItem) => isNavItem(customNavItem) ? /* @__PURE__ */ jsx16(
899
+ Link3,
467
900
  {
468
901
  className: "blocks-header__custom-nav-item usa-button",
469
902
  variant: "unstyled",
@@ -474,7 +907,7 @@ var make_custom_nav_item_jsx = (customNavItem) => isNavItem(customNavItem) ? /*
474
907
  ) : customNavItem;
475
908
 
476
909
  // src/components/Header/Header.tsx
477
- import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
910
+ import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
478
911
  function Header(props) {
479
912
  const {
480
913
  portalDetails: { logo, title, url },
@@ -487,11 +920,11 @@ function Header(props) {
487
920
  () => make_nav_items_initial_state(navItems),
488
921
  [navItems]
489
922
  );
490
- const [navDropDownOpenState, setNavDropDownOpenState] = useState2(
923
+ const [navDropDownOpenState, setNavDropDownOpenState] = useState4(
491
924
  initialNavDropDownOpenState
492
925
  );
493
- const [isMobileNavExpanded, setIsMobileNavExpanded] = useState2(false);
494
- const handleToggleDropdown = useCallback(
926
+ const [isMobileNavExpanded, setIsMobileNavExpanded] = useState4(false);
927
+ const handleToggleDropdown = useCallback2(
495
928
  (menuId) => {
496
929
  if (isMobileNavExpanded) {
497
930
  setNavDropDownOpenState((prev) => ({
@@ -510,8 +943,8 @@ function Header(props) {
510
943
  },
511
944
  [isMobileNavExpanded]
512
945
  );
513
- const handleToggleMobileNav = useCallback(() => setIsMobileNavExpanded((prev) => !prev), []);
514
- const handleClickOutside = useCallback(() => {
946
+ const handleToggleMobileNav = useCallback2(() => setIsMobileNavExpanded((prev) => !prev), []);
947
+ const handleClickOutside = useCallback2(() => {
515
948
  if (isMobileNavExpanded) {
516
949
  setIsMobileNavExpanded(false);
517
950
  } else {
@@ -542,15 +975,15 @@ function Header(props) {
542
975
  currentPath
543
976
  }) : make_menu_link_jsx(item, { currentPath })
544
977
  );
545
- return /* @__PURE__ */ jsx10(USWDSHeader, { className: headerClassName, basic: true, showMobileOverlay: isMobileNavExpanded, children: /* @__PURE__ */ jsxs10("div", { className: "usa-nav-container", children: [
546
- /* @__PURE__ */ jsxs10("div", { className: "usa-navbar", children: [
547
- /* @__PURE__ */ jsxs10("div", { className: "blocks-header__portal-details", children: [
548
- /* @__PURE__ */ jsx10("a", { className: "blocks-header__portal-logo", href: url ?? "/", children: logo }),
549
- title ? /* @__PURE__ */ jsx10(Title, { children: /* @__PURE__ */ jsx10("a", { href: url ?? "/", children: title }) }) : null
978
+ return /* @__PURE__ */ jsx17(USWDSHeader, { className: headerClassName, basic: true, showMobileOverlay: isMobileNavExpanded, children: /* @__PURE__ */ jsxs13("div", { className: "usa-nav-container", children: [
979
+ /* @__PURE__ */ jsxs13("div", { className: "usa-navbar", children: [
980
+ /* @__PURE__ */ jsxs13("div", { className: "blocks-header__portal-details", children: [
981
+ /* @__PURE__ */ jsx17("a", { className: "blocks-header__portal-logo", href: url ?? "/", children: logo }),
982
+ title ? /* @__PURE__ */ jsx17(Title, { children: /* @__PURE__ */ jsx17("a", { href: url ?? "/", children: title }) }) : null
550
983
  ] }),
551
- /* @__PURE__ */ jsx10(NavMenuButton, { ref: mobileNavToggleRef, onClick: handleToggleMobileNav, label: "Menu" })
984
+ /* @__PURE__ */ jsx17(NavMenuButton, { ref: mobileNavToggleRef, onClick: handleToggleMobileNav, label: "Menu" })
552
985
  ] }),
553
- /* @__PURE__ */ jsx10(
986
+ /* @__PURE__ */ jsx17(
554
987
  PrimaryNav,
555
988
  {
556
989
  ref: menuRef,
@@ -563,181 +996,6 @@ function Header(props) {
563
996
  ] }) });
564
997
  }
565
998
 
566
- // src/components/Link/Link.tsx
567
- import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
568
- function Link3({
569
- variant = "text",
570
- size = "md",
571
- isExternal,
572
- className,
573
- as,
574
- children,
575
- ...rest
576
- }) {
577
- const Component = isExternal ? "a" : as ?? "a";
578
- const rootClassName = make_class_name("blocks-link", [
579
- `blocks-link--${variant}`,
580
- variant === "button" || variant === "button-outline" ? "usa-button" : void 0,
581
- variant === "button-outline" ? "usa-button--outline" : void 0,
582
- variant === "text" ? "usa-button--unstyled" : void 0,
583
- `blocks-link--${size}`,
584
- isExternal ? "blocks-link--external usa-link--external" : void 0,
585
- className
586
- ]);
587
- return /* @__PURE__ */ jsxs11(Component, { className: rootClassName, ...get_external_anchor_props(isExternal), ...rest, children: [
588
- children,
589
- variant === "arrow" && /* @__PURE__ */ jsx11(ArrowIcon, {})
590
- ] });
591
- }
592
-
593
- // src/foundations/theme-token-bridge.helpers.ts
594
- var BASE_COLOR_TOKENS = [
595
- "base-lightest",
596
- "base-lighter",
597
- "base-light",
598
- "base",
599
- "base-dark",
600
- "base-darker",
601
- "base-darkest",
602
- "ink"
603
- ];
604
- var PRIMARY_COLOR_TOKENS = [
605
- "primary-lightest",
606
- "primary-lighter",
607
- "primary-light",
608
- "primary",
609
- "primary-vivid",
610
- "primary-dark",
611
- "primary-darker",
612
- "primary-darkest"
613
- ];
614
- var SECONDARY_COLOR_TOKENS = [
615
- "secondary-lightest",
616
- "secondary-lighter",
617
- "secondary-light",
618
- "secondary",
619
- "secondary-vivid",
620
- "secondary-dark",
621
- "secondary-darker",
622
- "secondary-darkest"
623
- ];
624
- var ACCENT_COOL_COLOR_TOKENS = [
625
- "accent-cool-lightest",
626
- "accent-cool-lighter",
627
- "accent-cool-light",
628
- "accent-cool",
629
- "accent-cool-dark",
630
- "accent-cool-darker",
631
- "accent-cool-darkest"
632
- ];
633
- var ACCENT_WARM_COLOR_TOKENS = [
634
- "accent-warm-lightest",
635
- "accent-warm-lighter",
636
- "accent-warm-light",
637
- "accent-warm",
638
- "accent-warm-dark",
639
- "accent-warm-darker",
640
- "accent-warm-darkest"
641
- ];
642
- var INFO_COLOR_TOKENS = [
643
- "info-lighter",
644
- "info-light",
645
- "info",
646
- "info-dark",
647
- "info-darker"
648
- ];
649
- var WARNING_COLOR_TOKENS = [
650
- "warning-lighter",
651
- "warning-light",
652
- "warning",
653
- "warning-dark",
654
- "warning-darker"
655
- ];
656
- var ERROR_COLOR_TOKENS = [
657
- "error-lighter",
658
- "error-light",
659
- "error",
660
- "error-dark",
661
- "error-darker"
662
- ];
663
- var SUCCESS_COLOR_TOKENS = [
664
- "success-lighter",
665
- "success-light",
666
- "success",
667
- "success-dark",
668
- "success-darker"
669
- ];
670
- var DISABLED_COLOR_TOKENS = [
671
- "disabled-lighter",
672
- "disabled-light",
673
- "disabled",
674
- "disabled-dark",
675
- "disabled-darker"
676
- ];
677
- var EMERGENCY_COLOR_TOKENS = ["emergency", "emergency-dark"];
678
- var COLOR_TOKENS = [
679
- ...BASE_COLOR_TOKENS,
680
- ...PRIMARY_COLOR_TOKENS,
681
- ...SECONDARY_COLOR_TOKENS,
682
- ...ACCENT_COOL_COLOR_TOKENS,
683
- ...ACCENT_WARM_COLOR_TOKENS,
684
- ...INFO_COLOR_TOKENS,
685
- ...WARNING_COLOR_TOKENS,
686
- ...ERROR_COLOR_TOKENS,
687
- ...SUCCESS_COLOR_TOKENS,
688
- ...EMERGENCY_COLOR_TOKENS,
689
- ...DISABLED_COLOR_TOKENS
690
- ];
691
- var resolveColorToken = (color) => COLOR_TOKENS.includes(color) ? `var(--color-${color})` : color;
692
-
693
- // src/components/icons/CloseIcon.tsx
694
- import { jsx as jsx12 } from "react/jsx-runtime";
695
- var CloseIcon = () => /* @__PURE__ */ jsx12("svg", { height: "24", width: "24", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ jsx12("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) });
696
-
697
- // src/components/Tag/Tag.tsx
698
- import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
699
- function Tag({
700
- variant = "solid",
701
- size = "default",
702
- color,
703
- bgColor,
704
- borderColor,
705
- textColor,
706
- icon,
707
- onClose,
708
- children,
709
- className
710
- }) {
711
- const rootClassName = make_class_name("blocks-tag", [
712
- `blocks-tag--${variant}`,
713
- size === "big" ? "blocks-tag--big" : void 0,
714
- icon ? "blocks-tag--icon" : void 0,
715
- onClose ? "blocks-tag--x-close" : void 0,
716
- className
717
- ]);
718
- const customStyle = color || textColor || bgColor || borderColor ? {
719
- ...color ? { "--blocks-tag-custom-color": resolveColorToken(color) } : void 0,
720
- ...textColor ? { "--blocks-tag-custom-text-color": resolveColorToken(textColor) } : void 0,
721
- ...bgColor ? { "--blocks-tag-custom-bg-color": resolveColorToken(bgColor) } : void 0,
722
- ...borderColor ? { "--blocks-tag-custom-border-color": resolveColorToken(borderColor) } : void 0
723
- } : void 0;
724
- return /* @__PURE__ */ jsxs12("span", { className: rootClassName, style: customStyle, children: [
725
- icon && /* @__PURE__ */ jsx13("span", { className: "blocks-tag__icon", children: icon }),
726
- children,
727
- onClose && /* @__PURE__ */ jsx13(
728
- "button",
729
- {
730
- type: "button",
731
- className: "blocks-tag__close-button",
732
- "aria-label": "Remove tag",
733
- tabIndex: 0,
734
- onClick: onClose,
735
- children: /* @__PURE__ */ jsx13(CloseIcon, {})
736
- }
737
- )
738
- ] });
739
- }
740
-
741
999
  // src/geo/GeoConfigProvider.tsx
742
1000
  import { StacApiProvider } from "@developmentseed/stac-react";
743
1001
  import { createContext, useContext } from "react";
@@ -749,7 +1007,7 @@ var DEFAULT_TILE_MATRIX_SET = "WebMercatorQuad";
749
1007
  var STAC_COLORSTOP_RGBA_ARG_COUNT = 4;
750
1008
 
751
1009
  // src/geo/GeoConfigProvider.tsx
752
- import { jsx as jsx14 } from "react/jsx-runtime";
1010
+ import { jsx as jsx18 } from "react/jsx-runtime";
753
1011
  var GeoConfigContext = createContext(null);
754
1012
  function useGeoConfig() {
755
1013
  const ctx = useContext(GeoConfigContext);
@@ -761,24 +1019,24 @@ function GeoConfigProvider({
761
1019
  titilerBaseUrl = TITILER_BASE_URL,
762
1020
  children
763
1021
  }) {
764
- return /* @__PURE__ */ jsx14(GeoConfigContext.Provider, { value: { titilerBaseUrl }, children: /* @__PURE__ */ jsx14(StacApiProvider, { apiUrl: stacApiUrl, children }) });
1022
+ return /* @__PURE__ */ jsx18(GeoConfigContext.Provider, { value: { titilerBaseUrl }, children: /* @__PURE__ */ jsx18(StacApiProvider, { apiUrl: stacApiUrl, children }) });
765
1023
  }
766
1024
 
767
1025
  // src/geo/Legend/Legend.tsx
768
1026
  import { Icon as Icon3 } from "@trussworks/react-uswds";
769
- import { useState as useState3 } from "react";
770
- import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
1027
+ import { useState as useState5 } from "react";
1028
+ import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
771
1029
  function Legend({ initialExpanded = false, ...props }) {
772
1030
  const { title, description, unit, min, max, colorStops, provider, spatialExtent, timeDensity } = props;
773
- const [isExpanded, setIsExpanded] = useState3(initialExpanded);
1031
+ const [isExpanded, setIsExpanded] = useState5(initialExpanded);
774
1032
  const subtitle = [provider, spatialExtent, timeDensity].some(isDefined) ? [provider, spatialExtent, timeDensity].filter(isDefined).join(" \xB7 ") : void 0;
775
- return /* @__PURE__ */ jsxs13("div", { className: "blocks-legend", children: [
776
- /* @__PURE__ */ jsxs13("div", { className: "blocks-legend__header", children: [
777
- /* @__PURE__ */ jsxs13("div", { className: "blocks-legend__header-text", children: [
778
- title && /* @__PURE__ */ jsx15("h3", { className: "blocks-legend__title", title, children: title }),
779
- subtitle && /* @__PURE__ */ jsx15("p", { className: "blocks-legend__subtitle", title: subtitle, children: subtitle })
1033
+ return /* @__PURE__ */ jsxs14("div", { className: "blocks-legend", children: [
1034
+ /* @__PURE__ */ jsxs14("div", { className: "blocks-legend__header", children: [
1035
+ /* @__PURE__ */ jsxs14("div", { className: "blocks-legend__header-text", children: [
1036
+ title && /* @__PURE__ */ jsx19("h3", { className: "blocks-legend__title", title, children: title }),
1037
+ subtitle && /* @__PURE__ */ jsx19("p", { className: "blocks-legend__subtitle", title: subtitle, children: subtitle })
780
1038
  ] }),
781
- description && /* @__PURE__ */ jsx15(
1039
+ description && /* @__PURE__ */ jsx19(
782
1040
  "button",
783
1041
  {
784
1042
  type: "button",
@@ -786,12 +1044,12 @@ function Legend({ initialExpanded = false, ...props }) {
786
1044
  "aria-expanded": isExpanded,
787
1045
  "aria-label": "Toggle layer description",
788
1046
  onClick: () => setIsExpanded((v) => !v),
789
- children: /* @__PURE__ */ jsx15(Icon3.InfoOutline, { "aria-hidden": true, focusable: false, size: 3 })
1047
+ children: /* @__PURE__ */ jsx19(Icon3.InfoOutline, { "aria-hidden": true, focusable: false, size: 3 })
790
1048
  }
791
1049
  )
792
1050
  ] }),
793
- colorStops && /* @__PURE__ */ jsxs13(Fragment3, { children: [
794
- /* @__PURE__ */ jsx15("div", { className: "blocks-legend__gradient-bar", children: /* @__PURE__ */ jsx15(
1051
+ colorStops && /* @__PURE__ */ jsxs14(Fragment3, { children: [
1052
+ /* @__PURE__ */ jsx19("div", { className: "blocks-legend__gradient-bar", children: /* @__PURE__ */ jsx19(
795
1053
  "div",
796
1054
  {
797
1055
  className: "blocks-legend__gradient",
@@ -800,18 +1058,18 @@ function Legend({ initialExpanded = false, ...props }) {
800
1058
  }
801
1059
  }
802
1060
  ) }),
803
- isDefined(min) && isDefined(max) && /* @__PURE__ */ jsxs13("div", { className: "blocks-legend__labels", children: [
804
- /* @__PURE__ */ jsx15("span", { className: "blocks-legend__min", children: min }),
805
- /* @__PURE__ */ jsx15("span", { className: "blocks-legend__unit", children: unit }),
806
- /* @__PURE__ */ jsx15("span", { className: "blocks-legend__max", children: max })
1061
+ isDefined(min) && isDefined(max) && /* @__PURE__ */ jsxs14("div", { className: "blocks-legend__labels", children: [
1062
+ /* @__PURE__ */ jsx19("span", { className: "blocks-legend__min", children: min }),
1063
+ /* @__PURE__ */ jsx19("span", { className: "blocks-legend__unit", children: unit }),
1064
+ /* @__PURE__ */ jsx19("span", { className: "blocks-legend__max", children: max })
807
1065
  ] })
808
1066
  ] }),
809
- isExpanded && description && /* @__PURE__ */ jsx15("div", { className: "blocks-legend__description", children: /* @__PURE__ */ jsx15("div", { className: "blocks-legend__description-inner", children: description }) })
1067
+ isExpanded && description && /* @__PURE__ */ jsx19("div", { className: "blocks-legend__description", children: /* @__PURE__ */ jsx19("div", { className: "blocks-legend__description-inner", children: description }) })
810
1068
  ] });
811
1069
  }
812
1070
 
813
1071
  // src/geo/StacCompareMap/StacCompareMap.tsx
814
- import { useEffect as useEffect3, useId, useRef as useRef3, useState as useState4 } from "react";
1072
+ import { useEffect as useEffect5, useId, useRef as useRef3, useState as useState8 } from "react";
815
1073
  import {
816
1074
  Layer,
817
1075
  Map as MapLibreMap,
@@ -876,10 +1134,38 @@ var formatRenderPropertiesToQuery = (renderProperties) => {
876
1134
  };
877
1135
 
878
1136
  // src/geo/DateChip/DateChip.tsx
879
- import { jsx as jsx16 } from "react/jsx-runtime";
1137
+ import { jsx as jsx20 } from "react/jsx-runtime";
880
1138
  function DateChip({ left, right }) {
881
1139
  const label = right === void 0 || left.from === right.from && left.to === right.to ? formatDateRange(left) : `${formatDateRange(left)} vs ${formatDateRange(right)}`;
882
- return /* @__PURE__ */ jsx16("div", { className: "blocks-date-chip", children: label });
1140
+ return /* @__PURE__ */ jsx20("div", { className: "blocks-date-chip", children: label });
1141
+ }
1142
+
1143
+ // src/geo/hooks/useMapScrollGuard.ts
1144
+ import { useEffect as useEffect4, useState as useState6 } from "react";
1145
+ function useMapScrollGuard(enabled, containerRef) {
1146
+ const [isInteractive, setIsInteractive] = useState6(false);
1147
+ useEffect4(() => {
1148
+ if (!enabled || !isInteractive) return;
1149
+ const handleClick = (e) => {
1150
+ if (!containerRef.current?.contains(e.target)) {
1151
+ setIsInteractive(false);
1152
+ }
1153
+ };
1154
+ const handleKeyDown = (e) => {
1155
+ if (e.key === "Escape") setIsInteractive(false);
1156
+ };
1157
+ document.addEventListener("click", handleClick);
1158
+ document.addEventListener("keydown", handleKeyDown);
1159
+ return () => {
1160
+ document.removeEventListener("click", handleClick);
1161
+ document.removeEventListener("keydown", handleKeyDown);
1162
+ };
1163
+ }, [enabled, isInteractive, containerRef]);
1164
+ return {
1165
+ isInteractive,
1166
+ onActivate: () => setIsInteractive(true),
1167
+ onDeactivate: () => setIsInteractive(false)
1168
+ };
883
1169
  }
884
1170
 
885
1171
  // src/geo/hooks/useStacRasterLayer.ts
@@ -1067,6 +1353,106 @@ function useStacRasterLayer(rasterLayerConfig) {
1067
1353
  };
1068
1354
  }
1069
1355
 
1356
+ // src/geo/MapScrollGuard/LockMapControl.tsx
1357
+ import { useState as useState7 } from "react";
1358
+ import { createPortal } from "react-dom";
1359
+ import { useControl as useControl2 } from "react-map-gl/maplibre";
1360
+
1361
+ // src/components/icons/LockIcon.tsx
1362
+ import { jsx as jsx21 } from "react/jsx-runtime";
1363
+ var LockIcon = () => /* @__PURE__ */ jsx21(
1364
+ "svg",
1365
+ {
1366
+ width: "24",
1367
+ height: "24",
1368
+ viewBox: "0 0 24 24",
1369
+ fill: "currentColor",
1370
+ "aria-hidden": "true",
1371
+ focusable: "false",
1372
+ xmlns: "http://www.w3.org/2000/svg",
1373
+ children: /* @__PURE__ */ jsx21("path", { d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z" })
1374
+ }
1375
+ );
1376
+
1377
+ // src/geo/MapScrollGuard/MapScrollGuardExit.tsx
1378
+ import { jsx as jsx22 } from "react/jsx-runtime";
1379
+ function MapScrollGuardExit({ onDeactivate }) {
1380
+ return /* @__PURE__ */ jsx22(
1381
+ "button",
1382
+ {
1383
+ className: "blocks-map-scroll-guard-exit",
1384
+ onClick: onDeactivate,
1385
+ type: "button",
1386
+ "aria-label": "Lock map \u2014 stop interacting",
1387
+ children: /* @__PURE__ */ jsx22(LockIcon, {})
1388
+ }
1389
+ );
1390
+ }
1391
+
1392
+ // src/geo/MapScrollGuard/LockMapControl.tsx
1393
+ import { jsx as jsx23 } from "react/jsx-runtime";
1394
+ var LockControl = class {
1395
+ container = null;
1396
+ onAdd(_map) {
1397
+ const container = document.createElement("div");
1398
+ container.className = "maplibregl-ctrl maplibregl-ctrl-group blocks-map-scroll-guard-exit-control";
1399
+ this.container = container;
1400
+ return container;
1401
+ }
1402
+ onRemove() {
1403
+ this.container?.remove();
1404
+ this.container = null;
1405
+ }
1406
+ };
1407
+ function LockMapControl({ onDeactivate }) {
1408
+ const [portalTarget, setPortalTarget] = useState7(null);
1409
+ const ctrl = useControl2(
1410
+ () => new LockControl(),
1411
+ () => setPortalTarget(ctrl?.container ?? null),
1412
+ () => setPortalTarget(null),
1413
+ { position: "top-left" }
1414
+ );
1415
+ if (!portalTarget) return null;
1416
+ return createPortal(/* @__PURE__ */ jsx23(MapScrollGuardExit, { onDeactivate }), portalTarget);
1417
+ }
1418
+
1419
+ // src/components/icons/CursorClickIcon.tsx
1420
+ import { jsx as jsx24 } from "react/jsx-runtime";
1421
+ var CursorClickIcon = () => /* @__PURE__ */ jsx24(
1422
+ "svg",
1423
+ {
1424
+ width: "24",
1425
+ height: "24",
1426
+ viewBox: "0 0 24 24",
1427
+ fill: "currentColor",
1428
+ "aria-hidden": "true",
1429
+ focusable: "false",
1430
+ xmlns: "http://www.w3.org/2000/svg",
1431
+ children: /* @__PURE__ */ jsx24("path", { d: "M11.5803 8.69C11.3787 8.69 11.1854 8.77007 11.0429 8.9126C10.9004 9.05513 10.8203 9.24844 10.8203 9.45V20.9C10.8203 21.32 11.1603 21.66 11.5803 21.66C11.7703 21.66 11.9303 21.6 12.0603 21.5L13.9703 19.95L15.6303 23.57C15.7603 23.84 16.0303 24 16.3203 24C16.4303 24 16.5403 24 16.6503 23.92L19.4103 22.64C19.7903 22.46 19.9703 22 19.7703 21.63L18.1003 18L20.5103 17.55C20.6703 17.5 20.8203 17.43 20.9403 17.29C21.2103 16.97 21.1703 16.5 20.8203 16.21L12.0803 8.86L12.0703 8.87C11.9403 8.76 11.7703 8.69 11.5803 8.69ZM15.8203 10V8H20.8203V10H15.8203ZM14.6503 4.76L17.4803 1.93L18.8903 3.34L16.0603 6.17L14.6503 4.76ZM10.8203 0H12.8203V5H10.8203V0ZM4.75031 14.66L7.58031 11.83L8.99031 13.24L6.16031 16.07L4.75031 14.66ZM4.75031 3.34L6.16031 1.93L8.99031 4.76L7.58031 6.17L4.75031 3.34ZM7.82031 10H2.82031V8H7.82031V10Z" })
1432
+ }
1433
+ );
1434
+
1435
+ // src/geo/MapScrollGuard/MapScrollGuard.tsx
1436
+ import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
1437
+ function MapScrollGuard({ onActivate }) {
1438
+ return /* @__PURE__ */ jsx25(
1439
+ "button",
1440
+ {
1441
+ className: "blocks-map-scroll-guard",
1442
+ onClick: (e) => {
1443
+ e.stopPropagation();
1444
+ onActivate();
1445
+ },
1446
+ type: "button",
1447
+ "aria-label": "Click to interact with map",
1448
+ children: /* @__PURE__ */ jsxs15("span", { className: "blocks-map-scroll-guard__pill", children: [
1449
+ /* @__PURE__ */ jsx25(CursorClickIcon, {}),
1450
+ /* @__PURE__ */ jsx25("span", { className: "blocks-map-scroll-guard__label", children: "Click to interact with the map" })
1451
+ ] })
1452
+ }
1453
+ );
1454
+ }
1455
+
1070
1456
  // src/geo/stac.basemaps.ts
1071
1457
  var createRasterBasemapStyle = ({
1072
1458
  id,
@@ -1115,7 +1501,7 @@ var BASEMAP_LABEL_LAYER_IDS = {
1115
1501
  };
1116
1502
 
1117
1503
  // src/geo/StacCompareMap/StacCompareMap.tsx
1118
- import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
1504
+ import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
1119
1505
  var MAP_PANEL_STYLE = {
1120
1506
  position: "absolute",
1121
1507
  top: 0,
@@ -1127,7 +1513,8 @@ function StacCompareMap({
1127
1513
  initialViewState,
1128
1514
  leftLayerConfig,
1129
1515
  rightLayerConfig,
1130
- className
1516
+ className,
1517
+ showScrollGuard = false
1131
1518
  }) {
1132
1519
  const resolvedBeforeLayerId = typeof baseMapStyle === "string" ? BASEMAP_LABEL_LAYER_IDS[baseMapStyle] : void 0;
1133
1520
  const instanceId = useId();
@@ -1135,8 +1522,12 @@ function StacCompareMap({
1135
1522
  const rightMapRef = useRef3(null);
1136
1523
  const compareRef = useRef3(null);
1137
1524
  const containerRef = useRef3(null);
1138
- const [leftMapLoaded, setLeftMapLoaded] = useState4(false);
1139
- const [rightMapLoaded, setRightMapLoaded] = useState4(false);
1525
+ const [leftMapLoaded, setLeftMapLoaded] = useState8(false);
1526
+ const [rightMapLoaded, setRightMapLoaded] = useState8(false);
1527
+ const { isInteractive, onActivate, onDeactivate } = useMapScrollGuard(
1528
+ showScrollGuard,
1529
+ containerRef
1530
+ );
1140
1531
  const containerClassName = make_class_name("blocks-stacmap-compare", [className]);
1141
1532
  const left = useStacRasterLayer(leftLayerConfig);
1142
1533
  const right = useStacRasterLayer(rightLayerConfig);
@@ -1145,7 +1536,7 @@ function StacCompareMap({
1145
1536
  const leftLayerId = `${leftLayerConfig.collectionId}-raster-layer-left-${instanceId}`;
1146
1537
  const rightSourceId = `${rightLayerConfig.collectionId}-raster-source-right-${instanceId}`;
1147
1538
  const rightLayerId = `${rightLayerConfig.collectionId}-raster-layer-right-${instanceId}`;
1148
- useEffect3(() => {
1539
+ useEffect5(() => {
1149
1540
  if (!leftMapLoaded || !rightMapLoaded) return;
1150
1541
  if (compareRef.current) return;
1151
1542
  const leftMap = leftMapRef.current?.getMap();
@@ -1164,7 +1555,7 @@ function StacCompareMap({
1164
1555
  }
1165
1556
  });
1166
1557
  }, [leftMapLoaded, rightMapLoaded]);
1167
- useEffect3(() => {
1558
+ useEffect5(() => {
1168
1559
  return () => {
1169
1560
  compareRef.current?.remove();
1170
1561
  compareRef.current = null;
@@ -1175,8 +1566,8 @@ function StacCompareMap({
1175
1566
  ...initialViewState && { initialViewState },
1176
1567
  style: MAP_PANEL_STYLE
1177
1568
  };
1178
- return /* @__PURE__ */ jsxs14("div", { ref: containerRef, className: containerClassName, children: [
1179
- /* @__PURE__ */ jsxs14(
1569
+ return /* @__PURE__ */ jsxs16("div", { ref: containerRef, className: containerClassName, children: [
1570
+ /* @__PURE__ */ jsxs16(
1180
1571
  MapLibreMap,
1181
1572
  {
1182
1573
  ref: leftMapRef,
@@ -1184,9 +1575,10 @@ function StacCompareMap({
1184
1575
  attributionControl: false,
1185
1576
  onLoad: () => setLeftMapLoaded(true),
1186
1577
  children: [
1187
- /* @__PURE__ */ jsx17(AttributionMapControl, {}),
1188
- /* @__PURE__ */ jsx17(NavigationControl, { position: "top-left", showCompass: false }),
1189
- left.mapSource.tiles && /* @__PURE__ */ jsx17(Source, { id: leftSourceId, type: "raster", tiles: [left.mapSource.tiles], children: /* @__PURE__ */ jsx17(
1578
+ /* @__PURE__ */ jsx26(AttributionMapControl, {}),
1579
+ /* @__PURE__ */ jsx26(NavigationControl, { position: "top-left", showCompass: false }),
1580
+ showScrollGuard && isInteractive && /* @__PURE__ */ jsx26(LockMapControl, { onDeactivate }),
1581
+ left.mapSource.tiles && /* @__PURE__ */ jsx26(Source, { id: leftSourceId, type: "raster", tiles: [left.mapSource.tiles], children: /* @__PURE__ */ jsx26(
1190
1582
  Layer,
1191
1583
  {
1192
1584
  id: leftLayerId,
@@ -1197,7 +1589,7 @@ function StacCompareMap({
1197
1589
  ]
1198
1590
  }
1199
1591
  ),
1200
- /* @__PURE__ */ jsxs14(
1592
+ /* @__PURE__ */ jsxs16(
1201
1593
  MapLibreMap,
1202
1594
  {
1203
1595
  ref: rightMapRef,
@@ -1205,8 +1597,8 @@ function StacCompareMap({
1205
1597
  attributionControl: false,
1206
1598
  onLoad: () => setRightMapLoaded(true),
1207
1599
  children: [
1208
- /* @__PURE__ */ jsx17(AttributionMapControl, {}),
1209
- right.mapSource.tiles && /* @__PURE__ */ jsx17(Source, { id: rightSourceId, type: "raster", tiles: [right.mapSource.tiles], children: /* @__PURE__ */ jsx17(
1600
+ /* @__PURE__ */ jsx26(AttributionMapControl, {}),
1601
+ right.mapSource.tiles && /* @__PURE__ */ jsx26(Source, { id: rightSourceId, type: "raster", tiles: [right.mapSource.tiles], children: /* @__PURE__ */ jsx26(
1210
1602
  Layer,
1211
1603
  {
1212
1604
  id: rightLayerId,
@@ -1217,33 +1609,40 @@ function StacCompareMap({
1217
1609
  ]
1218
1610
  }
1219
1611
  ),
1220
- /* @__PURE__ */ jsx17("div", { className: "blocks-stacmap-compare__date-chip", children: /* @__PURE__ */ jsx17(DateChip, { left: leftLayerConfig.dateRange, right: rightLayerConfig.dateRange }) }),
1221
- !isSameCollection && left.legend && /* @__PURE__ */ jsx17("div", { className: "blocks-stacmap-compare__legend-left", children: /* @__PURE__ */ jsx17(Legend, { ...left.legend }) }),
1222
- right.legend && /* @__PURE__ */ jsx17("div", { className: "blocks-stacmap-compare__legend-right", children: /* @__PURE__ */ jsx17(Legend, { ...right.legend }) })
1612
+ /* @__PURE__ */ jsx26("div", { className: "blocks-stacmap-compare__date-chip", children: /* @__PURE__ */ jsx26(DateChip, { left: leftLayerConfig.dateRange, right: rightLayerConfig.dateRange }) }),
1613
+ !isSameCollection && left.legend && /* @__PURE__ */ jsx26("div", { className: "blocks-stacmap-compare__legend-left", children: /* @__PURE__ */ jsx26(Legend, { ...left.legend }) }),
1614
+ right.legend && /* @__PURE__ */ jsx26("div", { className: "blocks-stacmap-compare__legend-right", children: /* @__PURE__ */ jsx26(Legend, { ...right.legend }) }),
1615
+ showScrollGuard && !isInteractive && /* @__PURE__ */ jsx26(MapScrollGuard, { onActivate })
1223
1616
  ] });
1224
1617
  }
1225
1618
 
1226
1619
  // src/geo/StacSingleLayerMap/StacSingleLayerMap.tsx
1227
- import { useId as useId2 } from "react";
1620
+ import { useId as useId2, useRef as useRef4 } from "react";
1228
1621
  import {
1229
1622
  Layer as Layer2,
1230
1623
  Map as MapLibreMap2,
1231
1624
  NavigationControl as NavigationControl2,
1232
1625
  Source as Source2
1233
1626
  } from "react-map-gl/maplibre";
1234
- import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
1627
+ import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
1235
1628
  function StacSingleLayerMap({
1236
1629
  baseMapStyle = CARTO_DARK_WITH_LABELS_BASEMAP_STYLE,
1237
1630
  initialViewState,
1238
- layerConfig
1631
+ layerConfig,
1632
+ showScrollGuard = false
1239
1633
  }) {
1240
1634
  const resolvedBeforeLayerId = typeof baseMapStyle === "string" ? BASEMAP_LABEL_LAYER_IDS[baseMapStyle] : void 0;
1241
1635
  const instanceId = useId2();
1242
1636
  const sourceId = `${layerConfig.collectionId}-raster-source-${instanceId}`;
1243
1637
  const layerId = `${layerConfig.collectionId}-raster-layer-${instanceId}`;
1244
1638
  const { mapSource, legend } = useStacRasterLayer(layerConfig);
1245
- return /* @__PURE__ */ jsxs15("div", { className: "blocks-stacmap-singlelayer", children: [
1246
- /* @__PURE__ */ jsxs15(
1639
+ const containerRef = useRef4(null);
1640
+ const { isInteractive, onActivate, onDeactivate } = useMapScrollGuard(
1641
+ showScrollGuard,
1642
+ containerRef
1643
+ );
1644
+ return /* @__PURE__ */ jsxs17("div", { className: "blocks-stacmap-singlelayer", ref: containerRef, children: [
1645
+ /* @__PURE__ */ jsxs17(
1247
1646
  MapLibreMap2,
1248
1647
  {
1249
1648
  mapStyle: baseMapStyle,
@@ -1251,9 +1650,10 @@ function StacSingleLayerMap({
1251
1650
  style: { position: "absolute", inset: 0 },
1252
1651
  attributionControl: false,
1253
1652
  children: [
1254
- /* @__PURE__ */ jsx18(AttributionMapControl, {}),
1255
- /* @__PURE__ */ jsx18(NavigationControl2, { position: "top-left", showCompass: false }),
1256
- mapSource.tiles && /* @__PURE__ */ jsx18(Source2, { id: sourceId, type: "raster", tiles: [mapSource.tiles], children: /* @__PURE__ */ jsx18(
1653
+ /* @__PURE__ */ jsx27(AttributionMapControl, {}),
1654
+ /* @__PURE__ */ jsx27(NavigationControl2, { position: "top-left", showCompass: false }),
1655
+ showScrollGuard && isInteractive && /* @__PURE__ */ jsx27(LockMapControl, { onDeactivate }),
1656
+ mapSource.tiles && /* @__PURE__ */ jsx27(Source2, { id: sourceId, type: "raster", tiles: [mapSource.tiles], children: /* @__PURE__ */ jsx27(
1257
1657
  Layer2,
1258
1658
  {
1259
1659
  id: layerId,
@@ -1264,8 +1664,9 @@ function StacSingleLayerMap({
1264
1664
  ]
1265
1665
  }
1266
1666
  ),
1267
- /* @__PURE__ */ jsx18("div", { className: "blocks-stacmap-singlelayer__legend", children: legend && /* @__PURE__ */ jsx18(Legend, { ...legend }) }),
1268
- /* @__PURE__ */ jsx18("div", { className: "blocks-stacmap-singlelayer__date-chip", children: /* @__PURE__ */ jsx18(DateChip, { left: layerConfig.dateRange }) })
1667
+ /* @__PURE__ */ jsx27("div", { className: "blocks-stacmap-singlelayer__legend", children: legend && /* @__PURE__ */ jsx27(Legend, { ...legend }) }),
1668
+ /* @__PURE__ */ jsx27("div", { className: "blocks-stacmap-singlelayer__date-chip", children: /* @__PURE__ */ jsx27(DateChip, { left: layerConfig.dateRange }) }),
1669
+ showScrollGuard && !isInteractive && /* @__PURE__ */ jsx27(MapScrollGuard, { onActivate })
1269
1670
  ] });
1270
1671
  }
1271
1672
  export {
@@ -1278,11 +1679,12 @@ export {
1278
1679
  CardDetailed,
1279
1680
  CardMini,
1280
1681
  CardSimple,
1682
+ Carousel,
1281
1683
  Footer,
1282
1684
  GeoConfigProvider,
1283
1685
  Header,
1284
1686
  Legend,
1285
- Link3 as Link,
1687
+ Link,
1286
1688
  NASA_BLUE_MARBLE_BASEMAP_STYLE,
1287
1689
  OPEN_FREE_MAP_DARK_BASEMAP_STYLE,
1288
1690
  OPEN_FREE_MAP_LABELS_LAYER_ID,