@scrippsproduct/networks-ui-library 1.0.15 → 1.0.17-dev.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/Carousel.module-CzL9vVtu.mjs +14 -0
- package/dist/assets/Carousel.css +1 -0
- package/dist/components/ActionButton/ActionButton.d.ts +21 -18
- package/dist/components/AdBlock/AdBlock.d.ts +9 -5
- package/dist/components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.d.ts +10 -6
- package/dist/components/AnchorTag/AnchorTag.d.ts +6 -8
- package/dist/components/Carousel/Carousel.d.ts +1 -0
- package/dist/components/Carousel/Carousel.js +123 -127
- package/dist/components/Carousel/navigations/Pagination.js +6 -9
- package/dist/components/Carousel/types.d.js +1 -0
- package/dist/components/DrawerNavigation/DrawerNavigation.d.ts +6 -9
- package/dist/components/FindUs/FindUs.d.ts +22 -19
- package/dist/hooks/useSourcepointPrivacyTrigger.d.ts +9 -3
- package/dist/settings.d.ts +1 -1
- package/package.json +2 -2
- package/dist/assets/Pagination.css +0 -1
- /package/dist/{secl-ui.d.ts → networks-ui.d.ts} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import './assets/Carousel.css';const _ = "_carousel_idy2d_1", o = "_carousel__scroller_idy2d_11", s = {
|
|
2
|
+
carousel: _,
|
|
3
|
+
carousel__scroller: o,
|
|
4
|
+
"carousel-controls": "_carousel-controls_idy2d_39",
|
|
5
|
+
"carousel-controls__btn": "_carousel-controls__btn_idy2d_43",
|
|
6
|
+
"carousel-controls__previous": "_carousel-controls__previous_idy2d_68",
|
|
7
|
+
"carousel-controls__next": "_carousel-controls__next_idy2d_75",
|
|
8
|
+
"carousel-nav": "_carousel-nav_idy2d_87",
|
|
9
|
+
"carousel-nav__list": "_carousel-nav__list_idy2d_91",
|
|
10
|
+
"carousel-nav__item": "_carousel-nav__item_idy2d_100"
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
s as c
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._carousel_idy2d_1{--_carousel-scrollbar-gutter: 1.75rem;--_carousel-pagination-size: 1rem;--_slide-gap: 1.5rem;position:relative;display:grid;grid-template-columns:1fr;grid-template-rows:[carousel-scroller] 1fr [carousel-pagination]}._carousel__scroller_idy2d_11{display:flex;box-sizing:border-box;overflow-x:auto;scroll-behavior:smooth;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-snap-align:center;scroll-padding-inline:var(--_carousel-gutters);padding-inline:var(--_carousel-gutters);scrollbar-width:none;list-style:none;margin:0}._carousel__scroller_idy2d_11[data-scrollbar=true]{scrollbar-width:auto;overflow-x:scroll}._carousel__scroller_idy2d_11:not([data-scrollbar=true])::-webkit-scrollbar{display:none}._carousel__scroller_idy2d_11::-webkit-scrollbar{display:auto}._carousel-controls_idy2d_39{display:contents}._carousel-controls__btn_idy2d_43{position:absolute;top:50%;transform:translateY(var(--_controls-transform));border-radius:50%;background-color:#fff6;color:#000;aspect-ratio:1;border:1px solid transparent;padding:0;overflow:hidden;z-index:1;cursor:pointer;transition:opacity .325s ease-out}._carousel-controls__btn_idy2d_43>i>svg{display:block;block-size:auto;max-inline-size:100%;stroke:currentColor}._carousel-controls__btn_idy2d_43[disabled]{opacity:0}._carousel-controls__previous_idy2d_68{inset-inline-start:var(--_control-btns-offset-x)}._carousel-controls__previous_idy2d_68 svg{transform:translate(-2px)}._carousel-controls__next_idy2d_75{inset-inline-end:var(--_control-btns-offset-x)}._carousel-controls__next_idy2d_75 svg{transform:translate(2px)}._carousel-controls__btn_idy2d_43[disabled]{cursor:not-allowed;transition-delay:0s}._carousel-nav_idy2d_87{margin-top:0}._carousel-nav__list_idy2d_91{display:flex;gap:1rem;justify-content:center;align-items:flex-start;list-style:none;padding:0}._carousel-nav__item_idy2d_100{flex-basis:1rem;min-width:1rem;max-width:1rem;height:1rem;background-color:transparent;border-radius:50%;border:1px solid rgba(65,65,65,.1)}._carousel-nav__item_idy2d_100[data-current=true]{background-color:#8080801a}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* ActionButton component for rendering a button that will display a loading state.
|
|
3
|
+
* @param {*} param0 - Component props.
|
|
4
|
+
* @param {string} param0.label - The text label for the button.
|
|
5
|
+
* @param {string} param0.type - The type of button (default is 'button').
|
|
6
|
+
* @param {function} param0.onClick - The click handler function for the button.
|
|
7
|
+
* @param {string} param0.varient - The style variant of the button (default is '').
|
|
8
|
+
* @param {string} param0.size - The size of the button (default is '').
|
|
9
|
+
* @param {object} param0.customColors - Custom colors for the button.
|
|
10
|
+
* @param {string} param0.customColors.bgColor - Background color of the button.
|
|
11
|
+
* @param {string} param0.customColors.bgHoverColor - Background color on hover.
|
|
12
|
+
* @param {string} param0.customColors.color - Text color of the button.
|
|
13
|
+
* @param {string} param0.customColors.hoverColor - Text color on hover.
|
|
14
|
+
* @param {string} param0.customColors.borderColor - Border color of the button.
|
|
15
|
+
* @param {string} param0.customColors.borderHoverColor - Border color on hover.
|
|
16
|
+
* @param {boolean} param0.disabled - Whether the button is disabled (default is false).
|
|
17
|
+
* @param {string} param0.classname - Additional CSS classes for the button.
|
|
18
|
+
* @param {object} param0.attributes - Additional attributes to be applied to the button.
|
|
19
|
+
* @returns {JSX.Element} The rendered action button.
|
|
20
|
+
*/
|
|
21
|
+
export function ActionButton({ label, type, onClick, varient, size, customColors, disabled, classname, ...attributes }: any): JSX.Element;
|
|
19
22
|
export default ActionButton;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* AdBlock component for rendering an advertisement block with various themes.
|
|
3
|
+
* @param {*} param0 - Component props.
|
|
4
|
+
* @param {Object} param0.image - The image object containing the ad image URL and alt text.
|
|
5
|
+
* @param {Object} param0.ad - The ad object containing campaign, source, medium, content, header, description, linkText, and href.
|
|
6
|
+
* @param {string} [param0.theme='default'] - The theme to apply to the ad block (default is 'default').
|
|
7
|
+
* @returns {JSX.Element} The rendered ad block.
|
|
8
|
+
*/
|
|
9
|
+
export function AdBlock({ image, ad, theme }: any): JSX.Element;
|
|
6
10
|
export default AdBlock;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* AdjustableTwoColumnGrid component for rendering a two-column layout with adjustable widths.
|
|
3
|
+
* @param {*} param0 - Component props.
|
|
4
|
+
* @param {React.ReactNode} param0.children - The child components to be rendered in the two columns.
|
|
5
|
+
* @param {string} [param0.gap='1.5rem'] - The gap size between the columns.
|
|
6
|
+
* @param {number|string} [param0.firstColumnWidth=33] - The width of the first column, can be a percentage or pixel value.
|
|
7
|
+
* @param {string} [param0.classname=''] - Additional CSS classes for the layout.
|
|
8
|
+
* @returns {JSX.Element} The rendered two-column layout.
|
|
9
|
+
*/
|
|
10
|
+
export function AdjustableTwoColumnGrid({ children, gap, firstColumnWidth, classname }: any): JSX.Element;
|
|
7
11
|
export default AdjustableTwoColumnGrid;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
clickHandler?: null | undefined;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
/**
|
|
2
|
+
* AnchorTag component for rendering anchor links with optional image support.
|
|
3
|
+
* @param {*} param0 - Component props.
|
|
4
|
+
* @returns {JSX.Element} The rendered anchor tag.
|
|
5
|
+
*/
|
|
6
|
+
export function AnchorTag({ href, classname, label, type, image, clickHandler }: any): JSX.Element;
|
|
9
7
|
export default AnchorTag;
|
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as c, useState as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as o, Fragment as W, jsxs as O } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as c, useState as A, useEffect as V, useCallback as u } from "react";
|
|
3
|
+
import q from "./CarouselUtils.class.js";
|
|
4
4
|
import { CarouselSlide as J } from "../CarouselSlide/CarouselSlide.js";
|
|
5
|
-
import { chunkArray as Q, classes as
|
|
5
|
+
import { chunkArray as Q, classes as z } from "../../utils/helpers.js";
|
|
6
|
+
import { c as a } from "../../Carousel.module-CzL9vVtu.mjs";
|
|
6
7
|
import { C as X } from "../../chevron-left-DmvQntvu.mjs";
|
|
7
8
|
import { C as Y } from "../../chevron-right-CaAz6ISN.mjs";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"carousel-controls__btn": "_carousel-controls__btn_1booq_42",
|
|
13
|
-
"carousel-controls__previous": "_carousel-controls__previous_1booq_67",
|
|
14
|
-
"carousel-controls__next": "_carousel-controls__next_1booq_74",
|
|
15
|
-
"carousel-nav": "_carousel-nav_1booq_86",
|
|
16
|
-
"carousel-nav__list": "_carousel-nav__list_1booq_90",
|
|
17
|
-
"carousel-nav__item": "_carousel-nav__item_1booq_99"
|
|
18
|
-
}, re = window.matchMedia("(max-width: 600px)"), te = window.matchMedia("(max-width: 800px"), le = window.matchMedia("(max-width: 1024px"), oe = window.matchMedia("(max-width: 1280px");
|
|
19
|
-
function fe({
|
|
20
|
-
id: A,
|
|
21
|
-
slides: z,
|
|
9
|
+
const Z = window.matchMedia("(max-width: 600px)"), ee = window.matchMedia("(max-width: 800px"), re = window.matchMedia("(max-width: 1024px"), te = window.matchMedia("(max-width: 1280px");
|
|
10
|
+
function de({
|
|
11
|
+
id: _,
|
|
12
|
+
slides: b,
|
|
22
13
|
options: x = {
|
|
23
14
|
paginationType: "dots",
|
|
24
15
|
showControls: !0,
|
|
@@ -37,13 +28,14 @@ function fe({
|
|
|
37
28
|
cellsPerSlide: 1,
|
|
38
29
|
cellAspectRatio: "4/2",
|
|
39
30
|
cellsPosition: "center",
|
|
31
|
+
groupSlides: !0,
|
|
40
32
|
wrapAround: !0
|
|
41
33
|
}
|
|
42
34
|
}) {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
((
|
|
46
|
-
|
|
35
|
+
const m = c(`carousel-${_}`), R = c(null), i = c(null), I = c(null), w = c(b), E = c(null), g = c(null), t = c(null), e = c(x), $ = c(x.showPagination), T = c("-50%"), [N, j] = A([]), [r, d] = A(null), [k, B] = A([]);
|
|
36
|
+
V(() => {
|
|
37
|
+
(() => {
|
|
38
|
+
Z.matches ? (d({
|
|
47
39
|
...e.current,
|
|
48
40
|
showControls: !1,
|
|
49
41
|
showPagination: !1,
|
|
@@ -57,7 +49,7 @@ function fe({
|
|
|
57
49
|
cellsPerSlide: 1,
|
|
58
50
|
cellsPosition: e.current.wrapAround ? "center" : "flex-start",
|
|
59
51
|
gutterSize: 10
|
|
60
|
-
}, $.current = !1) :
|
|
52
|
+
}, $.current = !1) : ee.matches ? e.current.cellsPerSlide > 2 ? (d({
|
|
61
53
|
...e.current,
|
|
62
54
|
cellsPerSlide: 2,
|
|
63
55
|
showControls: !1,
|
|
@@ -75,7 +67,7 @@ function fe({
|
|
|
75
67
|
...e.current,
|
|
76
68
|
showControls: !1,
|
|
77
69
|
gutterSize: 10
|
|
78
|
-
}) :
|
|
70
|
+
}) : re.matches ? e.current.cellsPerSlide > 3 ? (d({
|
|
79
71
|
...e.current,
|
|
80
72
|
cellsPerSlide: 3,
|
|
81
73
|
showControls: !1,
|
|
@@ -93,7 +85,7 @@ function fe({
|
|
|
93
85
|
...e.current,
|
|
94
86
|
showControls: !1,
|
|
95
87
|
gutterSize: 10
|
|
96
|
-
}) :
|
|
88
|
+
}) : te.matches && e.current.showPagination ? (d({
|
|
97
89
|
...e.current,
|
|
98
90
|
showControls: !1
|
|
99
91
|
}), e.current = {
|
|
@@ -104,106 +96,106 @@ function fe({
|
|
|
104
96
|
});
|
|
105
97
|
})();
|
|
106
98
|
}, []);
|
|
107
|
-
const L = u((
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
let
|
|
111
|
-
for (let s = 0; s <=
|
|
112
|
-
|
|
113
|
-
for (let
|
|
114
|
-
|
|
115
|
-
props:
|
|
99
|
+
const L = u((l, n) => {
|
|
100
|
+
const p = Q(n, l);
|
|
101
|
+
B([...p]);
|
|
102
|
+
let f = [];
|
|
103
|
+
for (let s = 0; s <= p.length - 1; s++) {
|
|
104
|
+
f[s] = {}, f[s].ariaLabel = `${s + 1} of ${p.length}`, f[s].layout = p[s][0].layout, f[s].cells = [];
|
|
105
|
+
for (let S = 0; S <= p[s].length - 1; S++)
|
|
106
|
+
f[s].cells[S] = {
|
|
107
|
+
props: p[s][S].props
|
|
116
108
|
};
|
|
117
109
|
}
|
|
118
|
-
const
|
|
119
|
-
return
|
|
120
|
-
}, []),
|
|
121
|
-
e.current.autoplay &&
|
|
122
|
-
}, []),
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
}, [
|
|
127
|
-
|
|
128
|
-
|
|
110
|
+
const P = [...f], y = [...f], K = P.slice(-1), F = P.slice(0);
|
|
111
|
+
return y.push(F[0]), y.unshift(K[0]), e.current.wrapAround && l.length > n ? y : P;
|
|
112
|
+
}, []), h = u(() => {
|
|
113
|
+
e.current.autoplay && t.current.clearTimer();
|
|
114
|
+
}, []), G = u((l) => {
|
|
115
|
+
h();
|
|
116
|
+
const n = l.key;
|
|
117
|
+
n === "ArrowLeft" ? (l.preventDefault(), t.current.determineScrollAction(-1)) : n === "ArrowRight" && (l.preventDefault(), t.current.determineScrollAction(1));
|
|
118
|
+
}, [h]), H = u(() => {
|
|
119
|
+
h(), i.current.addEventListener("scrollend", () => {
|
|
120
|
+
t.current.handleScrollEnd();
|
|
129
121
|
}, { once: !0 });
|
|
130
|
-
}, [
|
|
131
|
-
|
|
132
|
-
|
|
122
|
+
}, [h]), v = u(() => {
|
|
123
|
+
h(), i.current.addEventListener("scrollend", () => {
|
|
124
|
+
t.current.handleScrollEnd(), i.current.addEventListener("scroll", v, { once: !0 });
|
|
133
125
|
}, { once: !0 });
|
|
134
|
-
}, [
|
|
135
|
-
|
|
136
|
-
},
|
|
126
|
+
}, [h]), U = () => {
|
|
127
|
+
t.current && e.current.autoplay && t.current.clearTimer();
|
|
128
|
+
}, C = u(() => {
|
|
137
129
|
//! make sure class is only instantiated once because of reacts
|
|
138
130
|
//! "strict" mode double do hocus pocus
|
|
139
|
-
|
|
131
|
+
t.current === null && (t.current = new q({
|
|
140
132
|
carouselEl: R.current,
|
|
141
133
|
scrollerEl: i.current,
|
|
142
134
|
paginationEl: I.current,
|
|
143
|
-
slides:
|
|
135
|
+
slides: w.current,
|
|
144
136
|
navBtnEls: {
|
|
145
137
|
next: E.current,
|
|
146
|
-
previous:
|
|
138
|
+
previous: g.current
|
|
147
139
|
},
|
|
148
|
-
id:
|
|
140
|
+
id: m.current,
|
|
149
141
|
options: {
|
|
150
142
|
autoplay: e.current.autoplay,
|
|
151
|
-
wrapAround: e.current.wrapAround &&
|
|
143
|
+
wrapAround: e.current.wrapAround && w.current.length > e.current.cellsPerSlide,
|
|
152
144
|
showPagination: e.current.showPagination,
|
|
153
145
|
delay: e.current.autoplayDelay,
|
|
154
146
|
slideGutterSize: e.current.gutterSize,
|
|
155
147
|
slideAspectRatio: e.current.slideAspectRatio,
|
|
156
|
-
showControls: e.current.showControls &&
|
|
148
|
+
showControls: e.current.showControls && w.current.length > e.current.cellsPerSlide,
|
|
157
149
|
cellsPerSlide: e.current.cellsPerSlide
|
|
158
150
|
}
|
|
159
151
|
}));
|
|
160
152
|
}, []), M = u(() => {
|
|
161
|
-
i.current.addEventListener("scroll",
|
|
162
|
-
}, [
|
|
163
|
-
if (
|
|
164
|
-
let
|
|
165
|
-
i.current !== null && (
|
|
153
|
+
i.current.addEventListener("scroll", v, { once: !0 });
|
|
154
|
+
}, [v]), D = u(() => {
|
|
155
|
+
if (j(L(w.current, e.current.cellsPerSlide)), w.current.length > e.current.cellsPerSlide) {
|
|
156
|
+
let l = setInterval(() => {
|
|
157
|
+
i.current !== null && (g.current !== null && e.current.showControls || !e.current.showControls) && (clearInterval(l), M(), C());
|
|
166
158
|
}, 100);
|
|
167
159
|
} else {
|
|
168
|
-
let
|
|
169
|
-
i.current !== null && (clearInterval(
|
|
160
|
+
let l = setInterval(() => {
|
|
161
|
+
i.current !== null && (clearInterval(l), C());
|
|
170
162
|
}, 100);
|
|
171
163
|
}
|
|
172
|
-
}, [L, M,
|
|
173
|
-
return
|
|
174
|
-
if (
|
|
175
|
-
if (
|
|
176
|
-
let
|
|
177
|
-
|
|
164
|
+
}, [L, M, C]);
|
|
165
|
+
return V(() => {
|
|
166
|
+
if (r !== null) {
|
|
167
|
+
if (r.showControls) {
|
|
168
|
+
let l = 0;
|
|
169
|
+
r.showPagination && (l = l + 25), r.showScrollbar && (l = l + 6), T.current = `calc(-50% - ${l}px)`;
|
|
178
170
|
}
|
|
179
|
-
|
|
171
|
+
D();
|
|
180
172
|
}
|
|
181
173
|
return () => {
|
|
182
|
-
|
|
174
|
+
U();
|
|
183
175
|
};
|
|
184
|
-
}, [
|
|
176
|
+
}, [D, r]), /* @__PURE__ */ o(W, { children: r !== null && /* @__PURE__ */ O(
|
|
185
177
|
"div",
|
|
186
178
|
{
|
|
187
179
|
className: a.carousel,
|
|
188
|
-
id:
|
|
180
|
+
id: m.current,
|
|
189
181
|
ref: R,
|
|
190
182
|
tabIndex: -1,
|
|
191
183
|
role: "region",
|
|
192
184
|
"aria-roledescription": "carousel",
|
|
193
|
-
"aria-label":
|
|
194
|
-
onKeyDown:
|
|
185
|
+
"aria-label": r.title,
|
|
186
|
+
onKeyDown: G,
|
|
195
187
|
style: {
|
|
196
|
-
"--_carousel-gutters":
|
|
197
|
-
"--_slide-aspect-ratio":
|
|
198
|
-
"--_cell-aspect-ratio":
|
|
199
|
-
"--_slide-cell-size": `${100 /
|
|
200
|
-
"--_cells-position":
|
|
201
|
-
"--_control-btns-offset-x": `${
|
|
202
|
-
"--_slide-gap": `${
|
|
188
|
+
"--_carousel-gutters": r.wrapAround ? `${r.gutterSize <= 25 ? r.gutterSize : 25}%` : `0 ${r.gutterSize <= 25 ? r.gutterSize : 25}%`,
|
|
189
|
+
"--_slide-aspect-ratio": r.slideAspectRatio,
|
|
190
|
+
"--_cell-aspect-ratio": r.cellAspectRatio,
|
|
191
|
+
"--_slide-cell-size": `${100 / r.cellsPerSlide}%`,
|
|
192
|
+
"--_cells-position": r.cellsPosition,
|
|
193
|
+
"--_control-btns-offset-x": `${r.controlButtonsOffset}rem`,
|
|
194
|
+
"--_slide-gap": `${r.slideGap}rem`,
|
|
203
195
|
"--_controls-transform": T.current
|
|
204
196
|
},
|
|
205
197
|
children: [
|
|
206
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ o(
|
|
207
199
|
"ol",
|
|
208
200
|
{
|
|
209
201
|
className: a.carousel__scroller,
|
|
@@ -212,87 +204,91 @@ function fe({
|
|
|
212
204
|
"aria-label": "Items Scroller",
|
|
213
205
|
"aria-live": "Polite",
|
|
214
206
|
tabIndex: 0,
|
|
215
|
-
onMouseEnter: (
|
|
216
|
-
e.current.autoplay &&
|
|
207
|
+
onMouseEnter: () => {
|
|
208
|
+
e.current.autoplay && t.current !== null && t.current.clearTimer();
|
|
217
209
|
},
|
|
218
|
-
onMouseLeave: (
|
|
219
|
-
e.current.autoplay &&
|
|
210
|
+
onMouseLeave: () => {
|
|
211
|
+
e.current.autoplay && t.current !== null && t.current.startTimer();
|
|
220
212
|
},
|
|
221
|
-
onTouchStart:
|
|
222
|
-
"data-scrollbar":
|
|
223
|
-
children: N.length > 0 && N.map((
|
|
213
|
+
onTouchStart: H,
|
|
214
|
+
"data-scrollbar": r.showScrollbar,
|
|
215
|
+
children: N.length > 0 && N.map((l, n) => /* @__PURE__ */ o(
|
|
224
216
|
J,
|
|
225
217
|
{
|
|
226
|
-
slide:
|
|
227
|
-
index:
|
|
228
|
-
currentIndex:
|
|
229
|
-
variableHeight:
|
|
218
|
+
slide: l,
|
|
219
|
+
index: n,
|
|
220
|
+
currentIndex: r.wrapAround ? 1 : 0,
|
|
221
|
+
variableHeight: r.variableHeight
|
|
230
222
|
},
|
|
231
|
-
`carousel${
|
|
223
|
+
`carousel${_}-slide${n}`
|
|
232
224
|
))
|
|
233
225
|
}
|
|
234
226
|
),
|
|
235
|
-
|
|
236
|
-
/* @__PURE__ */
|
|
227
|
+
r.showControls && b.length > e.current.cellsPerSlide && /* @__PURE__ */ O("div", { className: a["carousel-controls"], children: [
|
|
228
|
+
/* @__PURE__ */ o(
|
|
237
229
|
"button",
|
|
238
230
|
{
|
|
239
231
|
type: "button",
|
|
240
|
-
ref:
|
|
232
|
+
ref: g,
|
|
241
233
|
title: "Previous Item",
|
|
242
|
-
className:
|
|
243
|
-
|
|
234
|
+
className: z([
|
|
235
|
+
a["carousel-controls__btn"],
|
|
236
|
+
a["carousel-controls__previous"],
|
|
237
|
+
"carousel-controls__previous"
|
|
238
|
+
]),
|
|
239
|
+
"aria-controls": m.current,
|
|
244
240
|
"aria-label": "Previous Item",
|
|
245
|
-
onClick: (
|
|
246
|
-
|
|
241
|
+
onClick: () => {
|
|
242
|
+
t.current.determineScrollAction(-1);
|
|
247
243
|
},
|
|
248
|
-
onMouseEnter: (
|
|
249
|
-
e.current.autoplay &&
|
|
244
|
+
onMouseEnter: () => {
|
|
245
|
+
e.current.autoplay && t.current !== null && t.current.clearTimer();
|
|
250
246
|
},
|
|
251
|
-
onMouseLeave: (
|
|
252
|
-
e.current.autoplay &&
|
|
247
|
+
onMouseLeave: () => {
|
|
248
|
+
e.current.autoplay && t.current !== null && t.current.startTimer();
|
|
253
249
|
},
|
|
254
|
-
children: /* @__PURE__ */
|
|
250
|
+
children: /* @__PURE__ */ o("i", { "aria-hidden": "true", children: /* @__PURE__ */ o(X, { width: r.controlArrowSize, height: r.controlArrowSize }) })
|
|
255
251
|
}
|
|
256
252
|
),
|
|
257
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ o(
|
|
258
254
|
"button",
|
|
259
255
|
{
|
|
260
256
|
type: "button",
|
|
261
257
|
ref: E,
|
|
262
258
|
title: "Next Item",
|
|
263
|
-
className:
|
|
264
|
-
"aria-controls":
|
|
259
|
+
className: z([a["carousel-controls__btn"], a["carousel-controls__next"], "carousel-controls__next"]),
|
|
260
|
+
"aria-controls": m.current,
|
|
265
261
|
"aria-label": "Next Item",
|
|
266
|
-
onClick: (
|
|
267
|
-
|
|
262
|
+
onClick: () => {
|
|
263
|
+
t.current.determineScrollAction(1);
|
|
268
264
|
},
|
|
269
|
-
onMouseEnter: (
|
|
270
|
-
e.current.autoplay &&
|
|
265
|
+
onMouseEnter: () => {
|
|
266
|
+
e.current.autoplay && t.current !== null && t.current.clearTimer();
|
|
271
267
|
},
|
|
272
|
-
onMouseLeave: (
|
|
273
|
-
e.current.autoplay &&
|
|
268
|
+
onMouseLeave: () => {
|
|
269
|
+
e.current.autoplay && t.current !== null && t.current.startTimer();
|
|
274
270
|
},
|
|
275
|
-
children: /* @__PURE__ */
|
|
271
|
+
children: /* @__PURE__ */ o("i", { "aria-hidden": "true", children: /* @__PURE__ */ o(Y, { width: r.controlArrowSize, height: r.controlArrowSize }) })
|
|
276
272
|
}
|
|
277
273
|
)
|
|
278
274
|
] }),
|
|
279
|
-
$.current && k.length > 1 && /* @__PURE__ */
|
|
275
|
+
$.current && k.length > 1 && /* @__PURE__ */ o("div", { className: [a["carousel-nav"], "carousel-nav"].join(" "), children: /* @__PURE__ */ o("ol", { className: a["carousel-nav__list"], ref: I, children: k.map((l, n) => /* @__PURE__ */ o(
|
|
280
276
|
"li",
|
|
281
277
|
{
|
|
282
|
-
className:
|
|
283
|
-
"data-current":
|
|
284
|
-
onClick: (
|
|
285
|
-
|
|
278
|
+
className: z([a["carousel-nav__item"], "carousel-nav__item"]),
|
|
279
|
+
"data-current": n === 0 ? "true" : "false",
|
|
280
|
+
onClick: () => {
|
|
281
|
+
t.current.navigateToIndex(n);
|
|
286
282
|
},
|
|
287
|
-
title: `Navigate to slide ${
|
|
283
|
+
title: `Navigate to slide ${n + 1}`
|
|
288
284
|
},
|
|
289
|
-
`carousel${
|
|
285
|
+
`carousel${m}-nav-${n}`
|
|
290
286
|
)) }) })
|
|
291
287
|
]
|
|
292
288
|
}
|
|
293
289
|
) });
|
|
294
290
|
}
|
|
295
291
|
export {
|
|
296
|
-
|
|
297
|
-
|
|
292
|
+
de as Carousel,
|
|
293
|
+
de as default
|
|
298
294
|
};
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
"carousel-nav__list": "_carousel-nav__list_1booq_90",
|
|
6
|
-
"carousel-nav__item": "_carousel-nav__item_1booq_99"
|
|
7
|
-
}, v = t.forwardRef(({ slides: o, carouselId: r, CarouselUtil: _, scrollerRef: c }, s) => /* @__PURE__ */ e("div", { className: `${l["carousel-nav"]} carousel-nav`, children: /* @__PURE__ */ e("ol", { className: l["carousel-nav__list"], ref: s, children: o.map((u, a) => /* @__PURE__ */ e(
|
|
2
|
+
import o from "react";
|
|
3
|
+
import { c as r } from "../../../Carousel.module-CzL9vVtu.mjs";
|
|
4
|
+
const n = o.forwardRef(({ slides: t, carouselId: l }, s) => /* @__PURE__ */ e("div", { className: `${r["carousel-nav"]} carousel-nav`, children: /* @__PURE__ */ e("ol", { className: r["carousel-nav__list"], ref: s, children: t.map((c, a) => /* @__PURE__ */ e(
|
|
8
5
|
"li",
|
|
9
6
|
{
|
|
10
|
-
className: `${
|
|
7
|
+
className: `${r["carousel-nav__item"]} carousel-nav__item`,
|
|
11
8
|
"data-current": a === 0 ? "true" : "false",
|
|
12
9
|
title: `Navigate to slide ${a + 1}`
|
|
13
10
|
},
|
|
14
|
-
`carousel${
|
|
11
|
+
`carousel${l}-nav-${a}`
|
|
15
12
|
)) }) }));
|
|
16
13
|
export {
|
|
17
|
-
|
|
14
|
+
n as default
|
|
18
15
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
clipPathEnd?: string | undefined;
|
|
8
|
-
overlayAppendEl?: Element | null | undefined;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
/**
|
|
2
|
+
* DrawerNavigation component for rendering a drawer-style navigation menu.
|
|
3
|
+
* @param {*} param0 - Component props.
|
|
4
|
+
* @returns {JSX.Element} The rendered drawer navigation.
|
|
5
|
+
*/
|
|
6
|
+
export function DrawerNavigation({ links, items, classname, logo, clipPathStart, clipPathEnd, overlayAppendEl }: any): JSX.Element;
|
|
10
7
|
export default DrawerNavigation;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* FindUs component for rendering the "Find Us" section.
|
|
3
|
+
* @param {*} param0 - Component props.
|
|
4
|
+
* @param {Object} param0.network - The network object containing platform information.
|
|
5
|
+
* @param {string} param0.baseApiUrl - The base API URL for fetching data.
|
|
6
|
+
* @param {string} [param0.platformsApiUrl='https://api.scrippscloud.com/viewing-platforms/v1'] - The API URL for fetching viewing platforms.
|
|
7
|
+
* @param {string} [param0.authApiUrl=''] - The API URL for authentication.
|
|
8
|
+
* @param {boolean} [param0.allowStateSearch=true] - Whether to allow state search.
|
|
9
|
+
* @param {boolean} [param0.allowZipcodeSearch=true] - Whether to allow zipcode search.
|
|
10
|
+
* @param {boolean} [param0.allowAutoScroll=true] - Whether to allow auto-scrolling.
|
|
11
|
+
* @param {number} [param0.autoScrollOffset=25] - The offset for auto-scrolling.
|
|
12
|
+
* @param {boolean} [param0.compactLayout=true] - Whether to use a compact layout.
|
|
13
|
+
* @param {boolean} [param0.showChannelSearchAndRescan=true] - Whether to show the channel search and rescan section.
|
|
14
|
+
* @param {number} [param0.numberOfColumns] - The number of columns for the device and platform lists.
|
|
15
|
+
* @param {Object} [param0.ad] - The ad object containing campaign, source, medium, and content.
|
|
16
|
+
* @param {string} [param0.ad.campaign=''] - The ad campaign.
|
|
17
|
+
* @param {string} [param0.ad.source=''] - The ad source.
|
|
18
|
+
* @param {string} [param0.ad.medium='referral'] - The ad medium.
|
|
19
|
+
* @param {string} [param0.ad.content='learn_more'] - The ad content.
|
|
20
|
+
* @returns {JSX.Element} The rendered "Find Us" section.
|
|
21
|
+
*/
|
|
22
|
+
export function FindUs({ network, baseApiUrl, platformsApiUrl, authApiUrl, allowStateSearch, allowZipcodeSearch, allowAutoScroll, autoScrollOffset, compactLayout, showChannelSearchAndRescan, numberOfColumns, ad }: any): JSX.Element;
|
|
20
23
|
export default FindUs;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export default useSourcePointPrivacyTrigger;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook to trigger the Sourcepoint privacy manager modal.
|
|
4
|
+
* @param {*} param0 - Configuration object.
|
|
5
|
+
* @param {number} param0.messageId - The message ID to load in the privacy manager modal.
|
|
6
|
+
* Defaults to 1192723.
|
|
7
|
+
*
|
|
8
|
+
* @returns void
|
|
9
|
+
*/
|
|
10
|
+
declare function useSourcePointPrivacyTrigger({ messageId }: any): null;
|
package/dist/settings.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export const slideLayoutsMap: Map<string, import('react').LazyExoticComponent<typeof import('.').FigureSlide>>;
|
|
2
2
|
export const pageHeroLayoutsMap: Map<string, import('react').LazyExoticComponent<typeof import('./components/PageHero/page-hero-layouts').IONShowHero>>;
|
|
3
|
-
export const blockLayoutsMap: Map<string, import('react').LazyExoticComponent<typeof import('.').
|
|
3
|
+
export const blockLayoutsMap: Map<string, import('react').LazyExoticComponent<typeof import('.').CtaBlock>>;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.17-dev.0",
|
|
3
3
|
"name": "@scrippsproduct/networks-ui-library",
|
|
4
4
|
"description": "React Component Library for use in Scripps Networks external applications",
|
|
5
5
|
"author": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"storybook": "storybook dev -p 6006 --no-open",
|
|
24
24
|
"build-storybook": "storybook build",
|
|
25
25
|
"chromatic": "npx chromatic --project-token=f011f556f41a",
|
|
26
|
-
"create-component": "node componentFolderBuilder.js"
|
|
26
|
+
"create-component": "node scripts/componentFolderBuilder.js"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"date-fns": "^3.6.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._carousel_1booq_1{--_carousel-scrollbar-gutter: 1.75rem;--_carousel-pagination-size: 1rem;--_slide-gap: 1.5rem;position:relative;display:grid;grid-template-columns:1fr;grid-template-rows:[carousel-scroller] 1fr [carousel-pagination]}._carousel__scroller_1booq_11{display:flex;box-sizing:border-box;overflow-x:auto;scroll-behavior:smooth;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-snap-align:center;scroll-padding-inline:var(--_carousel-gutters);padding-inline:var(--_carousel-gutters);scrollbar-width:none;list-style:none;margin:0}._carousel__scroller_1booq_11[data-scrollbar=true]{scrollbar-width:auto}._carousel__scroller_1booq_11:not([data-scrollbar=true])::-webkit-scrollbar{display:none}._carousel__scroller_1booq_11::-webkit-scrollbar{display:auto}._carousel-controls_1booq_38{display:contents}._carousel-controls__btn_1booq_42{position:absolute;top:50%;transform:translateY(var(--_controls-transform));border-radius:50%;background-color:#fff6;color:#000;aspect-ratio:1;border:1px solid transparent;padding:0;overflow:hidden;z-index:1;cursor:pointer;transition:opacity .325s ease-out}._carousel-controls__btn_1booq_42>i>svg{display:block;block-size:auto;max-inline-size:100%;stroke:currentColor}._carousel-controls__btn_1booq_42[disabled]{opacity:0}._carousel-controls__previous_1booq_67{inset-inline-start:var(--_control-btns-offset-x)}._carousel-controls__previous_1booq_67 svg{transform:translate(-2px)}._carousel-controls__next_1booq_74{inset-inline-end:var(--_control-btns-offset-x)}._carousel-controls__next_1booq_74 svg{transform:translate(2px)}._carousel-controls__btn_1booq_42[disabled]{cursor:not-allowed;transition-delay:0s}._carousel-nav_1booq_86{margin-top:0}._carousel-nav__list_1booq_90{display:flex;gap:1rem;justify-content:center;align-items:flex-start;list-style:none;padding:0}._carousel-nav__item_1booq_99{flex-basis:1rem;min-width:1rem;max-width:1rem;height:1rem;background-color:transparent;border-radius:50%;border:1px solid rgba(65,65,65,.1)}._carousel-nav__item_1booq_99[data-current=true]{background-color:#8080801a}
|
|
File without changes
|