@scrippsproduct/networks-ui-library 2.0.10 → 2.0.11-alpha.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/assets/CarouselSlide.css +1 -1
- package/dist/assets/GridList.css +1 -1
- package/dist/assets/HighlightGrid.css +1 -0
- package/dist/assets/LogoCard.css +1 -1
- package/dist/components/CarouselSlide/CarouselSlide.js +14 -14
- package/dist/components/GridList/GridList.js +32 -24
- package/dist/components/HighlightGrid/HighlightGrid.js +54 -0
- package/dist/components/HighlightGrid/HighlightGrid.test.js +17 -0
- package/dist/components/HighlightGrid/index.js +5 -0
- package/dist/components/LogoCard/LogoCard.js +19 -19
- package/dist/src/components/GridList/GridList.d.ts +2 -1
- package/dist/src/components/HighlightGrid/HighlightGrid.d.ts +9 -0
- package/dist/src/components/HighlightGrid/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._slide_1msk4_2{scroll-snap-align:center;overflow:hidden;display:flex;flex:0 0 100%;column-gap:var(--_slide-gap);align-items:stretch;justify-content:var(--_cells-position);box-sizing:border-box;aspect-ratio:var(--_slide-aspect-ratio);padding-inline-end:0}._slide_1msk4_2[inert]{opacity:.5}._slide--variable-height_1msk4_18{aspect-ratio:unset}._slide_1msk4_2>*{flex:0 1 calc(var(--_slide-cell-size) - var(--_slide-gap));aspect-ratio:var(--_cell-aspect-ratio)}._slide_1msk4_2>image-card{display:flex;gap:0;place-items:flex-start}
|
package/dist/assets/GridList.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._grid-
|
|
1
|
+
._grid-list_1iv7r_1{display:grid;margin:0;padding:0;list-style:none}._grid-list-header_1iv7r_8{margin:.5em 0}._grid-list--1-columns_1iv7r_12{grid-template-columns:repeat(1,1fr)}._grid-list--2-columns_1iv7r_16{grid-template-columns:repeat(2,1fr)}._grid-list--3-columns_1iv7r_20{grid-template-columns:repeat(3,1fr)}._grid-list--4-columns_1iv7r_24{grid-template-columns:repeat(4,1fr)}._grid-list--5-columns_1iv7r_28{grid-template-columns:repeat(5,1fr)}._grid-list--6-columns_1iv7r_32{grid-template-columns:repeat(6,1fr)}._grid-list--7-columns_1iv7r_36{grid-template-columns:repeat(7,1fr)}._grid-list--8-columns_1iv7r_40{grid-template-columns:repeat(8,1fr)}._grid-list--9-columns_1iv7r_44{grid-template-columns:repeat(9,1fr)}._grid-list--10-columns_1iv7r_48{grid-template-columns:repeat(10,1fr)}@media screen and (max-width:960px){._grid-list--3-columns_1iv7r_20,._grid-list--4-columns_1iv7r_24{grid-template-columns:repeat(2,1fr)}._grid-list--5-columns_1iv7r_28,._grid-list--6-columns_1iv7r_32{grid-template-columns:repeat(3,1fr)}._grid-list--7-columns_1iv7r_36,._grid-list--8-columns_1iv7r_40{grid-template-columns:repeat(4,1fr)}._grid-list--9-columns_1iv7r_44,._grid-list--10-columns_1iv7r_48{grid-template-columns:repeat(5,1fr)}}@media screen and (max-width:600px){._grid-list_1iv7r_1{display:block}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._highlight-grid_14d9z_1{--gap: 2rem;display:grid;gap:var(--gap);box-sizing:border-box;margin:0}._highlight-grid__item_14d9z_9{display:contents;min-width:0}._highlight-grid__highlighted-items_14d9z_14{display:grid;grid-template-columns:minmax(200px,1fr) minmax(200px,1fr);gap:var(--gap)}._highlight-grid__highlighted-items_14d9z_14>._highlight-grid__item_14d9z_9{flex:1 1 50%}
|
package/dist/assets/LogoCard.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
logo-card{--logo-box-width: "100%";--logo-box-height: "auto";display:flex;flex-direction:column;gap:1.5rem;box-sizing:border-box;margin:0}._logo-card__logo-
|
|
1
|
+
logo-card{--logo-box-width: "100%";--logo-box-height: "auto";display:flex;flex-direction:column;gap:1.5rem;box-sizing:border-box;margin:0}._logo-card__logo-box_otu2k_11{overflow:hidden;display:grid;grid-template-areas:"stack";place-content:center;width:100%;height:var(--logo-box-height)}._logo-card__logo_otu2k_11{display:block;grid-area:stack;width:100%;height:100%}._logo-card__logo_otu2k_11>img{display:block;width:auto;max-width:100%;height:100%;max-height:100%;object-fit:contain;object-position:left center}._logo-card__body_otu2k_37{display:flex;flex:1 1 auto;flex-direction:column;gap:1rem;min-width:0}._logo-card__content_otu2k_45{text-align:left}._logo-card__content_otu2k_45>:first-child{margin-top:0}._logo-card__content_otu2k_45>:last-child{margin-bottom:0}._logo-card__cta-wrapper_otu2k_55{margin-top:auto}._logo-card__cta_otu2k_55{color:var(--base-anchor-color);text-align:left}._logo-card--inline_otu2k_64{flex-direction:row;gap:2.5rem;align-items:center}._logo-card--inline_otu2k_64 ._logo-card__logo-box_otu2k_11{width:var(--logo-box-width);max-width:100%;height:auto}._logo-card--inline_otu2k_64 ._logo-card__logo_otu2k_11{height:auto}._logo-card--inline_otu2k_64 ._logo-card__logo_otu2k_11>img{width:100%;height:auto;max-height:none}._logo-card--inline_otu2k_64 ._logo-card__body_otu2k_37{justify-content:center}._logo-card--inline_otu2k_64 ._logo-card__cta-wrapper_otu2k_55{margin-top:0}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as r, Fragment as
|
|
2
|
-
import { useMemo as
|
|
1
|
+
import { jsx as r, Fragment as n } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as u, createElement as c } from "react";
|
|
3
3
|
import { classes as d } from "../../utils/helpers.js";
|
|
4
|
-
import { slideLayoutsMap as
|
|
5
|
-
import '../../assets/CarouselSlide.css';const
|
|
6
|
-
slide:
|
|
7
|
-
"slide--variable-height": "_slide--variable-
|
|
4
|
+
import { slideLayoutsMap as p } from "../../settings.js";
|
|
5
|
+
import '../../assets/CarouselSlide.css';const h = "_slide_1msk4_2", i = {
|
|
6
|
+
slide: h,
|
|
7
|
+
"slide--variable-height": "_slide--variable-height_1msk4_18"
|
|
8
8
|
};
|
|
9
9
|
function g({
|
|
10
10
|
slide: e,
|
|
11
11
|
index: l,
|
|
12
|
-
currentIndex:
|
|
13
|
-
variableHeight:
|
|
12
|
+
currentIndex: s,
|
|
13
|
+
variableHeight: t = !1
|
|
14
14
|
}) {
|
|
15
|
-
const a =
|
|
16
|
-
() =>
|
|
15
|
+
const a = u(
|
|
16
|
+
() => p.get(e.layout) ?? null,
|
|
17
17
|
[e.layout]
|
|
18
18
|
);
|
|
19
|
-
return /* @__PURE__ */ r(
|
|
19
|
+
return /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(
|
|
20
20
|
"li",
|
|
21
21
|
{
|
|
22
22
|
"aria-label": e.ariaLabel,
|
|
@@ -24,11 +24,11 @@ function g({
|
|
|
24
24
|
className: d([
|
|
25
25
|
i.slide,
|
|
26
26
|
"slide",
|
|
27
|
-
|
|
27
|
+
t ? i["slide--variable-height"] : ""
|
|
28
28
|
]),
|
|
29
29
|
"data-index": l,
|
|
30
|
-
...
|
|
31
|
-
children: a !== null && e.cells.map((o,
|
|
30
|
+
...s !== l ? { inert: !0 } : {},
|
|
31
|
+
children: a !== null && e.cells.map((o, m) => /* @__PURE__ */ c(a, { ...o.props, key: `slide${l}-cell${m}` }))
|
|
32
32
|
}
|
|
33
33
|
) });
|
|
34
34
|
}
|
|
@@ -1,32 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as g, Fragment as o, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { classes as t } from "../../utils/helpers.js";
|
|
3
|
-
import '../../assets/GridList.css';const
|
|
4
|
-
"grid-list": "_grid-
|
|
5
|
-
"grid-list-header": "_grid-list-
|
|
6
|
-
"grid-list--1-columns": "_grid-list--1-
|
|
7
|
-
"grid-list--2-columns": "_grid-list--2-
|
|
8
|
-
"grid-list--3-columns": "_grid-list--3-
|
|
9
|
-
"grid-list--4-columns": "_grid-list--4-
|
|
10
|
-
"grid-list--5-columns": "_grid-list--5-
|
|
11
|
-
"grid-list--6-columns": "_grid-list--6-
|
|
12
|
-
"grid-list--7-columns": "_grid-list--7-
|
|
13
|
-
"grid-list--8-columns": "_grid-list--8-
|
|
14
|
-
"grid-list--9-columns": "_grid-list--9-
|
|
15
|
-
"grid-list--10-columns": "_grid-list--10-
|
|
3
|
+
import '../../assets/GridList.css';const s = {
|
|
4
|
+
"grid-list": "_grid-list_1iv7r_1",
|
|
5
|
+
"grid-list-header": "_grid-list-header_1iv7r_8",
|
|
6
|
+
"grid-list--1-columns": "_grid-list--1-columns_1iv7r_12",
|
|
7
|
+
"grid-list--2-columns": "_grid-list--2-columns_1iv7r_16",
|
|
8
|
+
"grid-list--3-columns": "_grid-list--3-columns_1iv7r_20",
|
|
9
|
+
"grid-list--4-columns": "_grid-list--4-columns_1iv7r_24",
|
|
10
|
+
"grid-list--5-columns": "_grid-list--5-columns_1iv7r_28",
|
|
11
|
+
"grid-list--6-columns": "_grid-list--6-columns_1iv7r_32",
|
|
12
|
+
"grid-list--7-columns": "_grid-list--7-columns_1iv7r_36",
|
|
13
|
+
"grid-list--8-columns": "_grid-list--8-columns_1iv7r_40",
|
|
14
|
+
"grid-list--9-columns": "_grid-list--9-columns_1iv7r_44",
|
|
15
|
+
"grid-list--10-columns": "_grid-list--10-columns_1iv7r_48"
|
|
16
16
|
};
|
|
17
|
-
function
|
|
17
|
+
function u({
|
|
18
18
|
children: d,
|
|
19
|
-
numberOfColumns:
|
|
20
|
-
headerText:
|
|
19
|
+
numberOfColumns: i = 2,
|
|
20
|
+
headerText: l = "",
|
|
21
|
+
gap: _ = "1em"
|
|
21
22
|
}) {
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
/* @__PURE__ */ r(
|
|
23
|
+
i > 10 && (i = 10);
|
|
24
|
+
const c = `grid-list--${i}-columns`;
|
|
25
|
+
return /* @__PURE__ */ g(o, { children: [
|
|
26
|
+
l !== "" && /* @__PURE__ */ r("h3", { className: t([s["grid-list-header"], "grid-list-header"]), children: l }),
|
|
27
|
+
/* @__PURE__ */ r(
|
|
28
|
+
"ul",
|
|
29
|
+
{
|
|
30
|
+
className: t([s["grid-list"], "grid-list", s[c]]),
|
|
31
|
+
style: { gap: _ },
|
|
32
|
+
children: d
|
|
33
|
+
}
|
|
34
|
+
)
|
|
27
35
|
] });
|
|
28
36
|
}
|
|
29
37
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
u as GridList,
|
|
39
|
+
u as default
|
|
32
40
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsxs as n, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as o } from "react";
|
|
3
|
+
import { GridList as a } from "../GridList/GridList.js";
|
|
4
|
+
import { classes as t } from "../../utils/helpers.js";
|
|
5
|
+
import '../../assets/HighlightGrid.css';const r = {
|
|
6
|
+
"highlight-grid": "_highlight-grid_14d9z_1",
|
|
7
|
+
"highlight-grid__item": "_highlight-grid__item_14d9z_9",
|
|
8
|
+
"highlight-grid__highlighted-items": "_highlight-grid__highlighted-items_14d9z_14"
|
|
9
|
+
}, z = ({
|
|
10
|
+
list: e,
|
|
11
|
+
numberOfColumns: l = 3,
|
|
12
|
+
gap: d = "2rem",
|
|
13
|
+
classname: s = "",
|
|
14
|
+
ref: m
|
|
15
|
+
}) => {
|
|
16
|
+
const _ = () => {
|
|
17
|
+
const h = e.slice(0, 2);
|
|
18
|
+
return /* @__PURE__ */ i(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: t([
|
|
22
|
+
r["highlight-grid__highlighted-items"],
|
|
23
|
+
"highlight-grid__highlighted-items"
|
|
24
|
+
]),
|
|
25
|
+
children: h.map((g, c) => /* @__PURE__ */ i(o, { children: g }, `highlight-grid-item-${c}`))
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ n(
|
|
30
|
+
"highlight-grid",
|
|
31
|
+
{
|
|
32
|
+
class: t([r["highlight-grid"], s]),
|
|
33
|
+
ref: m,
|
|
34
|
+
style: { "--gap": d },
|
|
35
|
+
children: [
|
|
36
|
+
_(),
|
|
37
|
+
/* @__PURE__ */ i(a, { gap: d, numberOfColumns: l, children: e.slice(2).map(
|
|
38
|
+
(h, g) => /* @__PURE__ */ i(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: t([r["highlight-grid__item"], "highlight-grid__item"]),
|
|
42
|
+
children: h
|
|
43
|
+
},
|
|
44
|
+
`highlight-grid-item-${g + 2}`
|
|
45
|
+
)
|
|
46
|
+
) })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
z as HighlightGrid,
|
|
53
|
+
z as default
|
|
54
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { d as a, i as o, r as i, g as e, s as r } from "../../react.esm-CX7MGXBg.mjs";
|
|
3
|
+
import { HighlightGrid as n } from "./HighlightGrid.js";
|
|
4
|
+
a("HighlightGrid", () => {
|
|
5
|
+
o("renders the first two items as highlighted items and the rest in the grid", () => {
|
|
6
|
+
const { container: t } = i(/* @__PURE__ */ s(n, { list: ["One", "Two", "Three", "Four"] })), h = t.querySelector(".highlight-grid__highlighted-items");
|
|
7
|
+
e(h).toHaveTextContent("OneTwo"), e(h).not.toHaveTextContent("Three"), e(r.getByText("Three")).toBeInTheDocument(), e(r.getByText("Four")).toBeInTheDocument();
|
|
8
|
+
}), o("renders what it can when the list has fewer than two items", () => {
|
|
9
|
+
i(/* @__PURE__ */ s(n, { list: ["Only"] })), e(r.getByText("Only")).toBeInTheDocument();
|
|
10
|
+
}), o("does not mutate the list prop", () => {
|
|
11
|
+
const t = ["One", "Two", "Three"];
|
|
12
|
+
i(/* @__PURE__ */ s(n, { list: t })), e(t).toEqual(["One", "Two", "Three"]);
|
|
13
|
+
}), o("applies a custom classname", () => {
|
|
14
|
+
const { container: t } = i(/* @__PURE__ */ s(n, { classname: "custom-class", list: [] }));
|
|
15
|
+
e(t.querySelector("highlight-grid")).toHaveClass("custom-class");
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -5,13 +5,13 @@ import { AnchorTag as d } from "../AnchorTag/AnchorTag.js";
|
|
|
5
5
|
import { ButtonAnchor as _ } from "../ButtonAnchor/ButtonAnchor.js";
|
|
6
6
|
import { ResponsiveImage as I } from "../ResponsiveImage/ResponsiveImage.js";
|
|
7
7
|
import '../../assets/LogoCard.css';const r = {
|
|
8
|
-
"logo-card__logo-box": "_logo-card__logo-
|
|
9
|
-
"logo-card__logo": "_logo-
|
|
10
|
-
"logo-card__body": "_logo-
|
|
11
|
-
"logo-card__content": "_logo-
|
|
12
|
-
"logo-card__cta-wrapper": "_logo-card__cta-
|
|
13
|
-
"logo-card__cta": "_logo-
|
|
14
|
-
"logo-card--inline": "_logo-card--
|
|
8
|
+
"logo-card__logo-box": "_logo-card__logo-box_otu2k_11",
|
|
9
|
+
"logo-card__logo": "_logo-card__logo_otu2k_11",
|
|
10
|
+
"logo-card__body": "_logo-card__body_otu2k_37",
|
|
11
|
+
"logo-card__content": "_logo-card__content_otu2k_45",
|
|
12
|
+
"logo-card__cta-wrapper": "_logo-card__cta-wrapper_otu2k_55",
|
|
13
|
+
"logo-card__cta": "_logo-card__cta_otu2k_55",
|
|
14
|
+
"logo-card--inline": "_logo-card--inline_otu2k_64"
|
|
15
15
|
}, u = (e) => typeof e == "number" ? `${e}px` : e, m = /* @__PURE__ */ new Map([
|
|
16
16
|
["play-video", { label: "View Video", component: _ }],
|
|
17
17
|
["internal-link", { label: "View More", component: d }],
|
|
@@ -20,8 +20,8 @@ import '../../assets/LogoCard.css';const r = {
|
|
|
20
20
|
["show-modal", { label: "See More", component: _ }]
|
|
21
21
|
]), S = ({
|
|
22
22
|
logo: e = { url: "", altText: "", aspectRatio: 1, sources: [] },
|
|
23
|
-
logoBoxWidth:
|
|
24
|
-
logoBoxHeight:
|
|
23
|
+
logoBoxWidth: y = "100%",
|
|
24
|
+
logoBoxHeight: b = "auto",
|
|
25
25
|
content: n = "",
|
|
26
26
|
cta: o = {
|
|
27
27
|
label: "",
|
|
@@ -30,14 +30,14 @@ import '../../assets/LogoCard.css';const r = {
|
|
|
30
30
|
relatedResourceId: "",
|
|
31
31
|
relatedResourceType: ""
|
|
32
32
|
},
|
|
33
|
-
displayCTA:
|
|
33
|
+
displayCTA: h = !0,
|
|
34
34
|
displayInline: f = !1,
|
|
35
35
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36
36
|
handleClicks: x = (c) => {
|
|
37
37
|
},
|
|
38
|
-
lazyLoad:
|
|
39
|
-
decoding:
|
|
40
|
-
classname:
|
|
38
|
+
lazyLoad: k = !0,
|
|
39
|
+
decoding: T = "async",
|
|
40
|
+
classname: w = "",
|
|
41
41
|
ref: C
|
|
42
42
|
}) => {
|
|
43
43
|
var s;
|
|
@@ -65,15 +65,15 @@ import '../../assets/LogoCard.css';const r = {
|
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
67
|
}, A = {
|
|
68
|
-
"--logo-box-width": u(
|
|
69
|
-
"--logo-box-height": u(
|
|
68
|
+
"--logo-box-width": u(y),
|
|
69
|
+
"--logo-box-height": u(b)
|
|
70
70
|
};
|
|
71
71
|
return /* @__PURE__ */ p(
|
|
72
72
|
"logo-card",
|
|
73
73
|
{
|
|
74
74
|
class: a([
|
|
75
75
|
f ? r["logo-card--inline"] : null,
|
|
76
|
-
|
|
76
|
+
w
|
|
77
77
|
]),
|
|
78
78
|
ref: C,
|
|
79
79
|
style: A,
|
|
@@ -83,15 +83,15 @@ import '../../assets/LogoCard.css';const r = {
|
|
|
83
83
|
{
|
|
84
84
|
altText: e.altText,
|
|
85
85
|
classname: r["logo-card__logo"],
|
|
86
|
-
decoding:
|
|
86
|
+
decoding: T,
|
|
87
87
|
fullSizeUrl: e.url,
|
|
88
|
-
loading:
|
|
88
|
+
loading: k ? "lazy" : void 0,
|
|
89
89
|
sources: e.sources
|
|
90
90
|
}
|
|
91
91
|
) }),
|
|
92
92
|
/* @__PURE__ */ p("div", { className: a([r["logo-card__body"], "logo-card__body"]), children: [
|
|
93
93
|
n !== "" && /* @__PURE__ */ t("div", { className: a([r["logo-card__content"], "logo-card__content"]), children: typeof n == "string" ? M(n) : n }),
|
|
94
|
-
|
|
94
|
+
h && o.type && /* @__PURE__ */ t("div", { className: a([r["logo-card__cta-wrapper"], "logo-card__cta-wrapper"]), children: v() })
|
|
95
95
|
] })
|
|
96
96
|
]
|
|
97
97
|
}
|
|
@@ -2,6 +2,7 @@ type GridListProps = {
|
|
|
2
2
|
children: React.ReactNode;
|
|
3
3
|
numberOfColumns?: number;
|
|
4
4
|
headerText?: string;
|
|
5
|
+
gap?: string;
|
|
5
6
|
};
|
|
6
|
-
export declare function GridList({ children, numberOfColumns, headerText, }: GridListProps): JSX.Element;
|
|
7
|
+
export declare function GridList({ children, numberOfColumns, headerText, gap, }: GridListProps): JSX.Element;
|
|
7
8
|
export default GridList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type HighlightGridProps = {
|
|
2
|
+
list: (React.ReactNode | string)[];
|
|
3
|
+
numberOfColumns?: number;
|
|
4
|
+
gap?: string;
|
|
5
|
+
classname?: string;
|
|
6
|
+
ref?: React.Ref<HTMLElement>;
|
|
7
|
+
};
|
|
8
|
+
export declare const HighlightGrid: ({ list, numberOfColumns, gap, classname, ref, }: HighlightGridProps) => JSX.Element;
|
|
9
|
+
export default HighlightGrid;
|
package/package.json
CHANGED