@canopy-iiif/app 1.11.1 → 1.12.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/lib/build/search.js +1 -1
- package/lib/build/sitemap.js +1 -1
- package/lib/components/hero-slider-runtime.js +64 -46
- package/lib/components/slider-runtime-entry.js +0 -3
- package/lib/search/search-form-runtime.js +1 -1
- package/lib/search/search.js +1 -4
- package/package.json +1 -1
- package/ui/dist/index.mjs +5 -5
- package/ui/dist/index.mjs.map +1 -1
- package/ui/dist/server.mjs +64 -45
- package/ui/dist/server.mjs.map +2 -2
- package/ui/styles/components/_interstitial-hero.scss +23 -11
- package/ui/styles/index.css +22 -11
package/ui/dist/server.mjs
CHANGED
|
@@ -1182,7 +1182,6 @@ function Hero({
|
|
|
1182
1182
|
item,
|
|
1183
1183
|
index,
|
|
1184
1184
|
random = true,
|
|
1185
|
-
transition = "fade",
|
|
1186
1185
|
headline,
|
|
1187
1186
|
description,
|
|
1188
1187
|
links = [],
|
|
@@ -1308,15 +1307,6 @@ function Hero({
|
|
|
1308
1307
|
backgroundClassName,
|
|
1309
1308
|
className
|
|
1310
1309
|
].filter(Boolean).join(" ");
|
|
1311
|
-
const normalizedTransition = (() => {
|
|
1312
|
-
try {
|
|
1313
|
-
const raw = transition == null ? "" : String(transition);
|
|
1314
|
-
const normalized = raw.trim().toLowerCase();
|
|
1315
|
-
return normalized === "slide" ? "slide" : "fade";
|
|
1316
|
-
} catch (_) {
|
|
1317
|
-
return "fade";
|
|
1318
|
-
}
|
|
1319
|
-
})();
|
|
1320
1310
|
const renderSlide = (slide, idx, { showVeil = true, captionVariant = "overlay" } = {}) => {
|
|
1321
1311
|
const safeHref = applyBasePath(slide.href || "#");
|
|
1322
1312
|
const isStaticCaption = captionVariant === "static";
|
|
@@ -1351,38 +1341,68 @@ function Hero({
|
|
|
1351
1341
|
);
|
|
1352
1342
|
};
|
|
1353
1343
|
if (isStaticCaption) {
|
|
1354
|
-
return /* @__PURE__ */ React12.createElement(
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
|
|
1344
|
+
return /* @__PURE__ */ React12.createElement(
|
|
1345
|
+
"div",
|
|
1346
|
+
{
|
|
1347
|
+
className: "canopy-interstitial__slide",
|
|
1348
|
+
key: safeHref || idx,
|
|
1349
|
+
role: "group",
|
|
1350
|
+
"aria-roledescription": "slide",
|
|
1351
|
+
"aria-label": `${idx + 1} of ${orderedSlides.length}`
|
|
1352
|
+
},
|
|
1353
|
+
wrapWithLink(
|
|
1354
|
+
/* @__PURE__ */ React12.createElement("article", { className: paneClassName }, slide.thumbnail ? /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__media-frame" }, /* @__PURE__ */ React12.createElement(
|
|
1355
|
+
"img",
|
|
1356
|
+
{
|
|
1357
|
+
...buildImageProps(
|
|
1358
|
+
"canopy-interstitial__media canopy-interstitial__media--static"
|
|
1359
|
+
)
|
|
1360
|
+
}
|
|
1361
|
+
)) : null, slide.title ? /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__caption canopy-interstitial__caption--static" }, /* @__PURE__ */ React12.createElement("span", { className: "canopy-interstitial__caption-link" }, slide.title)) : null)
|
|
1362
|
+
)
|
|
1363
|
+
);
|
|
1364
1364
|
}
|
|
1365
|
-
return /* @__PURE__ */ React12.createElement(
|
|
1366
|
-
|
|
1367
|
-
|
|
1365
|
+
return /* @__PURE__ */ React12.createElement(
|
|
1366
|
+
"div",
|
|
1367
|
+
{
|
|
1368
|
+
className: "canopy-interstitial__slide",
|
|
1369
|
+
key: safeHref || idx,
|
|
1370
|
+
role: "group",
|
|
1371
|
+
"aria-roledescription": "slide",
|
|
1372
|
+
"aria-label": `${idx + 1} of ${orderedSlides.length}`
|
|
1373
|
+
},
|
|
1374
|
+
wrapWithLink(
|
|
1375
|
+
/* @__PURE__ */ React12.createElement("article", { className: paneClassName }, slide.thumbnail ? /* @__PURE__ */ React12.createElement("img", { ...buildImageProps("canopy-interstitial__media") }) : null, showVeil ? /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__veil", "aria-hidden": "true" }) : null, slide.title ? /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__caption" }, /* @__PURE__ */ React12.createElement("span", { className: "canopy-interstitial__caption-link" }, slide.title)) : null)
|
|
1376
|
+
)
|
|
1377
|
+
);
|
|
1368
1378
|
};
|
|
1369
|
-
const renderSlider = (options = {}) => /* @__PURE__ */ React12.createElement(
|
|
1370
|
-
"
|
|
1371
|
-
{
|
|
1372
|
-
type: "button",
|
|
1373
|
-
"aria-label": "Previous slide",
|
|
1374
|
-
className: "canopy-interstitial__nav-btn canopy-interstitial__nav-btn--prev swiper-button-prev"
|
|
1375
|
-
},
|
|
1376
|
-
/* @__PURE__ */ React12.createElement(PrevArrowIcon, null)
|
|
1377
|
-
), /* @__PURE__ */ React12.createElement(
|
|
1378
|
-
"button",
|
|
1379
|
+
const renderSlider = (options = {}) => /* @__PURE__ */ React12.createElement(
|
|
1380
|
+
"div",
|
|
1379
1381
|
{
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1382
|
+
className: "canopy-interstitial__slider",
|
|
1383
|
+
role: "region",
|
|
1384
|
+
"aria-roledescription": "carousel",
|
|
1385
|
+
"aria-label": overlayTitle || "Featured content"
|
|
1383
1386
|
},
|
|
1384
|
-
/* @__PURE__ */ React12.createElement(
|
|
1385
|
-
|
|
1387
|
+
/* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__slide-wrapper" }, orderedSlides.map((slide, idx) => renderSlide(slide, idx, options))),
|
|
1388
|
+
/* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__nav" }, /* @__PURE__ */ React12.createElement(
|
|
1389
|
+
"button",
|
|
1390
|
+
{
|
|
1391
|
+
type: "button",
|
|
1392
|
+
"aria-label": "Previous slide",
|
|
1393
|
+
className: "canopy-interstitial__nav-btn canopy-interstitial__nav-btn--prev"
|
|
1394
|
+
},
|
|
1395
|
+
/* @__PURE__ */ React12.createElement(PrevArrowIcon, null)
|
|
1396
|
+
), /* @__PURE__ */ React12.createElement(
|
|
1397
|
+
"button",
|
|
1398
|
+
{
|
|
1399
|
+
type: "button",
|
|
1400
|
+
"aria-label": "Next slide",
|
|
1401
|
+
className: "canopy-interstitial__nav-btn canopy-interstitial__nav-btn--next"
|
|
1402
|
+
},
|
|
1403
|
+
/* @__PURE__ */ React12.createElement(NextArrowIcon, null)
|
|
1404
|
+
))
|
|
1405
|
+
);
|
|
1386
1406
|
const overlayContent = /* @__PURE__ */ React12.createElement(React12.Fragment, null, overlayTitle ? /* @__PURE__ */ React12.createElement("h1", { className: "canopy-interstitial__headline" }, overlayTitle) : null, derivedDescription ? /* @__PURE__ */ React12.createElement("p", { className: "canopy-interstitial__description" }, derivedDescription) : null, finalOverlayLinks.length ? /* @__PURE__ */ React12.createElement(ButtonWrapper, { className: "canopy-interstitial__actions" }, finalOverlayLinks.map((link) => /* @__PURE__ */ React12.createElement(
|
|
1387
1407
|
Button,
|
|
1388
1408
|
{
|
|
@@ -1401,11 +1421,10 @@ function Hero({
|
|
|
1401
1421
|
};
|
|
1402
1422
|
if (!isBreadcrumbVariant) {
|
|
1403
1423
|
sectionProps["data-canopy-hero-slider"] = "1";
|
|
1404
|
-
sectionProps["data-transition"] = normalizedTransition;
|
|
1405
1424
|
} else {
|
|
1406
1425
|
sectionProps["data-canopy-hero-variant"] = "breadcrumb";
|
|
1407
1426
|
}
|
|
1408
|
-
return /* @__PURE__ */ React12.createElement("section", { ...sectionProps }, isBreadcrumbVariant ? /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__layout canopy-interstitial__layout--breadcrumb" }, /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__panel" }, /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__body" }, breadcrumbNode, overlayContent))) : /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__layout" }, /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__panel" }, /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__body" }, overlayContent)), /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__media-group" }, renderSlider({ showVeil: false, captionVariant: "static" }))));
|
|
1427
|
+
return /* @__PURE__ */ React12.createElement("section", { ...sectionProps }, isBreadcrumbVariant ? /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__layout canopy-interstitial__layout--breadcrumb" }, /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__panel" }, /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__body" }, breadcrumbNode, overlayContent))) : /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__layout" }, /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__panel" }, /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__body" }, overlayContent)), /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__media-group" }, renderSlider({ showVeil: false, captionVariant: "static" }), /* @__PURE__ */ React12.createElement("div", { className: "canopy-interstitial__pagination" }))));
|
|
1409
1428
|
}
|
|
1410
1429
|
|
|
1411
1430
|
// ui/src/layout/SubNavigation.jsx
|
|
@@ -2591,7 +2610,7 @@ function isAbsoluteUrl(href) {
|
|
|
2591
2610
|
}
|
|
2592
2611
|
function resolveSearchPath(pathValue) {
|
|
2593
2612
|
let raw = typeof pathValue === "string" ? pathValue.trim() : "";
|
|
2594
|
-
if (!raw) raw = "/search";
|
|
2613
|
+
if (!raw) raw = "/search/index.html";
|
|
2595
2614
|
if (isAbsoluteUrl(raw)) return raw;
|
|
2596
2615
|
const normalizedPath = raw.startsWith("/") ? raw : `/${raw}`;
|
|
2597
2616
|
const base = readBasePath2();
|
|
@@ -2610,7 +2629,7 @@ function SearchPanelForm(props = {}) {
|
|
|
2610
2629
|
placeholder,
|
|
2611
2630
|
buttonLabel,
|
|
2612
2631
|
label,
|
|
2613
|
-
searchPath = "/search",
|
|
2632
|
+
searchPath = "/search/index.html",
|
|
2614
2633
|
inputId: inputIdProp,
|
|
2615
2634
|
clearLabel
|
|
2616
2635
|
} = props || {};
|
|
@@ -2766,7 +2785,7 @@ function SearchPanel(props = {}) {
|
|
|
2766
2785
|
// eslint-disable-line no-unused-vars
|
|
2767
2786
|
buttonLabel: buttonLabelProp,
|
|
2768
2787
|
label,
|
|
2769
|
-
searchPath = "/search"
|
|
2788
|
+
searchPath = "/search/index.html"
|
|
2770
2789
|
} = props || {};
|
|
2771
2790
|
const { getString } = useLocale();
|
|
2772
2791
|
const placeholder = placeholderProp != null ? placeholderProp : getString("common.phrases.placeholder_search", "Search\u2026");
|
|
@@ -3595,7 +3614,7 @@ function CanopyHeader(props = {}) {
|
|
|
3595
3614
|
const defaultSearchRoute = siteDefaultRoutes && typeof siteDefaultRoutes.search === "string" ? siteDefaultRoutes.search : "search";
|
|
3596
3615
|
const trimmedSearchRoute = searchRouteValue ? searchRouteValue.replace(/^\/+|\/+$/g, "") : "";
|
|
3597
3616
|
const usesDirectorySearchRoute = trimmedSearchRoute && trimmedSearchRoute !== (defaultSearchRoute || "search");
|
|
3598
|
-
const normalizedSearchRoute = usesDirectorySearchRoute ? `/${trimmedSearchRoute}/` : `/${(trimmedSearchRoute || defaultSearchRoute || "search").replace(/^\/+/, "")}`;
|
|
3617
|
+
const normalizedSearchRoute = usesDirectorySearchRoute ? `/${trimmedSearchRoute}/` : `/${(trimmedSearchRoute || defaultSearchRoute || "search").replace(/^\/+/, "")}/index.html`;
|
|
3599
3618
|
const resolvedLanguageToggle = languageToggleProp === false ? null : languageToggleProp === true || typeof languageToggleProp === "undefined" ? siteLanguageToggle : languageToggleProp;
|
|
3600
3619
|
const resolvedSearchLabel = searchLabelProp != null ? searchLabelProp : getString("common.nouns.search", "Search");
|
|
3601
3620
|
const resolvedSearchPlaceholder = searchPlaceholderProp != null ? searchPlaceholderProp : getString("common.phrases.placeholder_search", "Search\u2026");
|
|
@@ -7079,7 +7098,7 @@ function MdxSearchFormModal(props = {}) {
|
|
|
7079
7098
|
// kept for backward compat; ignored by teaser form
|
|
7080
7099
|
buttonLabel: buttonLabelProp,
|
|
7081
7100
|
label,
|
|
7082
|
-
searchPath = "/search"
|
|
7101
|
+
searchPath = "/search/index.html"
|
|
7083
7102
|
} = props || {};
|
|
7084
7103
|
const { getString } = useLocale();
|
|
7085
7104
|
const placeholder = placeholderProp != null ? placeholderProp : getString("common.phrases.placeholder_search", "Search\u2026");
|