@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.
@@ -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
- export function ActionButton({ label, type, onClick, varient, size, customColors, disabled, classname, ...attributes }: {
2
- [x: string]: any;
3
- label: any;
4
- type?: string | undefined;
5
- onClick?: (() => void) | undefined;
6
- varient?: string | undefined;
7
- size?: string | undefined;
8
- customColors?: {
9
- bgColor: string;
10
- bgHoverColor: string;
11
- color: string;
12
- hoverColor: string;
13
- borderColor: string;
14
- borderHoverColor: string;
15
- } | undefined;
16
- disabled: any;
17
- classname?: string | undefined;
18
- }): import("react/jsx-runtime").JSX.Element;
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
- export function AdBlock({ image, ad, theme }: {
2
- image: any;
3
- ad: any;
4
- theme?: string | undefined;
5
- }): import("react/jsx-runtime").JSX.Element;
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
- export function AdjustableTwoColumnGrid({ children, gap, firstColumnWidth, classname }: {
2
- children: any;
3
- gap?: string | undefined;
4
- firstColumnWidth?: number | undefined;
5
- classname?: string | undefined;
6
- }): import("react/jsx-runtime").JSX.Element;
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
- export function AnchorTag({ href, classname, label, type, image, clickHandler }: {
2
- href?: string | undefined;
3
- classname?: string | undefined;
4
- label?: string | undefined;
5
- type?: string | undefined;
6
- image?: null | undefined;
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;
@@ -19,6 +19,7 @@ export function Carousel({ id, slides, options }: {
19
19
  cellsPerSlide: number;
20
20
  cellAspectRatio: string;
21
21
  cellsPosition: string;
22
+ groupSlides: boolean;
22
23
  wrapAround: boolean;
23
24
  } | undefined;
24
25
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,24 +1,15 @@
1
- import { jsx as n, Fragment as F, jsxs as D } from "react/jsx-runtime";
2
- import { useRef as c, useState as P, useEffect as O, useCallback as u } from "react";
3
- import W from "./CarouselUtils.class.js";
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 y } from "../../utils/helpers.js";
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
- import '../../assets/Pagination.css';const Z = "_carousel_1booq_1", ee = "_carousel__scroller_1booq_11", a = {
9
- carousel: Z,
10
- carousel__scroller: ee,
11
- "carousel-controls": "_carousel-controls_1booq_38",
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 _ = c(`carousel-${A}`), R = c(null), i = c(null), I = c(null), m = c(z), E = c(null), S = c(null), l = c(null), e = c(x), $ = c(x.showPagination), T = c("-50%"), [N, V] = P([]), [t, d] = P(null), [k, j] = P([]);
44
- O(() => {
45
- ((o = null) => {
46
- re.matches ? (d({
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) : te.matches ? e.current.cellsPerSlide > 2 ? (d({
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
- }) : le.matches ? e.current.cellsPerSlide > 3 ? (d({
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
- }) : oe.matches && e.current.showPagination ? (d({
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((r, o) => {
108
- const f = Q(o, r);
109
- j([...f]);
110
- let h = [];
111
- for (let s = 0; s <= f.length - 1; s++) {
112
- h[s] = {}, h[s].ariaLabel = `${s + 1} of ${f.length}`, h[s].layout = f[s][0].layout, h[s].cells = [];
113
- for (let w = 0; w <= f[s].length - 1; w++)
114
- h[s].cells[w] = {
115
- props: f[s][w].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 C = [...h], b = [...h], U = C.slice(-1), K = C.slice(0);
119
- return b.push(K[0]), b.unshift(U[0]), e.current.wrapAround && r.length > o ? b : C;
120
- }, []), p = u(() => {
121
- e.current.autoplay && l.current.clearTimer();
122
- }, []), B = u((r) => {
123
- p();
124
- const o = r.key;
125
- o === "ArrowLeft" ? (r.preventDefault(), l.current.determineScrollAction(-1)) : o === "ArrowRight" && (r.preventDefault(), l.current.determineScrollAction(1));
126
- }, [p]), G = u((r) => {
127
- p(), i.current.addEventListener("scrollend", () => {
128
- l.current.handleScrollEnd();
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
- }, [p]), g = u((r) => {
131
- p(), i.current.addEventListener("scrollend", () => {
132
- l.current.handleScrollEnd(), i.current.addEventListener("scroll", g, { once: !0 });
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
- }, [p]), H = () => {
135
- l.current && e.current.autoplay && l.current.clearTimer();
136
- }, v = u(() => {
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
- l.current === null && (l.current = new W({
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: m.current,
135
+ slides: w.current,
144
136
  navBtnEls: {
145
137
  next: E.current,
146
- previous: S.current
138
+ previous: g.current
147
139
  },
148
- id: _.current,
140
+ id: m.current,
149
141
  options: {
150
142
  autoplay: e.current.autoplay,
151
- wrapAround: e.current.wrapAround && m.current.length > e.current.cellsPerSlide,
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 && m.current.length > e.current.cellsPerSlide,
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", g, { once: !0 });
162
- }, [g]), q = u(() => {
163
- if (V(L(m.current, e.current.cellsPerSlide)), m.current.length > e.current.cellsPerSlide) {
164
- let r = setInterval(() => {
165
- i.current !== null && (S.current !== null && e.current.showControls || !e.current.showControls) && (clearInterval(r), M(), v());
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 r = setInterval(() => {
169
- i.current !== null && (clearInterval(r), v());
160
+ let l = setInterval(() => {
161
+ i.current !== null && (clearInterval(l), C());
170
162
  }, 100);
171
163
  }
172
- }, [L, M, v]);
173
- return O(() => {
174
- if (t !== null) {
175
- if (t.showControls) {
176
- let r = 0;
177
- t.showPagination && (r = r + 25), t.showScrollbar && (r = r + 6), T.current = `calc(-50% - ${r}px)`;
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
- q();
171
+ D();
180
172
  }
181
173
  return () => {
182
- H();
174
+ U();
183
175
  };
184
- }, [q, t]), /* @__PURE__ */ n(F, { children: t !== null && /* @__PURE__ */ D(
176
+ }, [D, r]), /* @__PURE__ */ o(W, { children: r !== null && /* @__PURE__ */ O(
185
177
  "div",
186
178
  {
187
179
  className: a.carousel,
188
- id: _.current,
180
+ id: m.current,
189
181
  ref: R,
190
182
  tabIndex: -1,
191
183
  role: "region",
192
184
  "aria-roledescription": "carousel",
193
- "aria-label": t.title,
194
- onKeyDown: B,
185
+ "aria-label": r.title,
186
+ onKeyDown: G,
195
187
  style: {
196
- "--_carousel-gutters": t.wrapAround ? `${t.gutterSize <= 25 ? t.gutterSize : 25}%` : `0 ${t.gutterSize <= 25 ? t.gutterSize : 25}%`,
197
- "--_slide-aspect-ratio": t.slideAspectRatio,
198
- "--_cell-aspect-ratio": t.cellAspectRatio,
199
- "--_slide-cell-size": `${100 / t.cellsPerSlide}%`,
200
- "--_cells-position": t.cellsPosition,
201
- "--_control-btns-offset-x": `${t.controlButtonsOffset}rem`,
202
- "--_slide-gap": `${t.slideGap}rem`,
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__ */ n(
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: (r) => {
216
- e.current.autoplay && l.current !== null && l.current.clearTimer();
207
+ onMouseEnter: () => {
208
+ e.current.autoplay && t.current !== null && t.current.clearTimer();
217
209
  },
218
- onMouseLeave: (r) => {
219
- e.current.autoplay && l.current !== null && l.current.startTimer();
210
+ onMouseLeave: () => {
211
+ e.current.autoplay && t.current !== null && t.current.startTimer();
220
212
  },
221
- onTouchStart: G,
222
- "data-scrollbar": t.showScrollbar,
223
- children: N.length > 0 && N.map((r, o) => /* @__PURE__ */ n(
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: r,
227
- index: o,
228
- currentIndex: t.wrapAround ? 1 : 0,
229
- variableHeight: t.variableHeight
218
+ slide: l,
219
+ index: n,
220
+ currentIndex: r.wrapAround ? 1 : 0,
221
+ variableHeight: r.variableHeight
230
222
  },
231
- `carousel${A}-slide${o}`
223
+ `carousel${_}-slide${n}`
232
224
  ))
233
225
  }
234
226
  ),
235
- t.showControls && z.length > e.current.cellsPerSlide && /* @__PURE__ */ D("div", { className: a["carousel-controls"], children: [
236
- /* @__PURE__ */ n(
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: S,
232
+ ref: g,
241
233
  title: "Previous Item",
242
- className: y([a["carousel-controls__btn"], a["carousel-controls__previous"], "carousel-controls__previous"]),
243
- "aria-controls": _.current,
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: (r) => {
246
- l.current.determineScrollAction(-1);
241
+ onClick: () => {
242
+ t.current.determineScrollAction(-1);
247
243
  },
248
- onMouseEnter: (r) => {
249
- e.current.autoplay && l.current !== null && l.current.clearTimer();
244
+ onMouseEnter: () => {
245
+ e.current.autoplay && t.current !== null && t.current.clearTimer();
250
246
  },
251
- onMouseLeave: (r) => {
252
- e.current.autoplay && l.current !== null && l.current.startTimer();
247
+ onMouseLeave: () => {
248
+ e.current.autoplay && t.current !== null && t.current.startTimer();
253
249
  },
254
- children: /* @__PURE__ */ n("i", { "aria-hidden": "true", children: /* @__PURE__ */ n(X, { width: t.controlArrowSize, height: t.controlArrowSize }) })
250
+ children: /* @__PURE__ */ o("i", { "aria-hidden": "true", children: /* @__PURE__ */ o(X, { width: r.controlArrowSize, height: r.controlArrowSize }) })
255
251
  }
256
252
  ),
257
- /* @__PURE__ */ n(
253
+ /* @__PURE__ */ o(
258
254
  "button",
259
255
  {
260
256
  type: "button",
261
257
  ref: E,
262
258
  title: "Next Item",
263
- className: y([a["carousel-controls__btn"], a["carousel-controls__next"], "carousel-controls__next"]),
264
- "aria-controls": _.current,
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: (r) => {
267
- l.current.determineScrollAction(1);
262
+ onClick: () => {
263
+ t.current.determineScrollAction(1);
268
264
  },
269
- onMouseEnter: (r) => {
270
- e.current.autoplay && l.current !== null && l.current.clearTimer();
265
+ onMouseEnter: () => {
266
+ e.current.autoplay && t.current !== null && t.current.clearTimer();
271
267
  },
272
- onMouseLeave: (r) => {
273
- e.current.autoplay && l.current !== null && l.current.startTimer();
268
+ onMouseLeave: () => {
269
+ e.current.autoplay && t.current !== null && t.current.startTimer();
274
270
  },
275
- children: /* @__PURE__ */ n("i", { "aria-hidden": "true", children: /* @__PURE__ */ n(Y, { width: t.controlArrowSize, height: t.controlArrowSize }) })
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__ */ n("div", { className: [a["carousel-nav"], "carousel-nav"].join(" "), children: /* @__PURE__ */ n("ol", { className: a["carousel-nav__list"], ref: I, children: k.map((r, o) => /* @__PURE__ */ n(
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: y([a["carousel-nav__item"], "carousel-nav__item"]),
283
- "data-current": o === 0 ? "true" : "false",
284
- onClick: (f) => {
285
- l.current.navigateToIndex(o);
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 ${o + 1}`
283
+ title: `Navigate to slide ${n + 1}`
288
284
  },
289
- `carousel${_}-nav-${o}`
285
+ `carousel${m}-nav-${n}`
290
286
  )) }) })
291
287
  ]
292
288
  }
293
289
  ) });
294
290
  }
295
291
  export {
296
- fe as Carousel,
297
- fe as default
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 t from "react";
3
- import '../../../assets/Pagination.css';const l = {
4
- "carousel-nav": "_carousel-nav_1booq_86",
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: `${l["carousel-nav__item"]} carousel-nav__item`,
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${r}-nav-${a}`
11
+ `carousel${l}-nav-${a}`
15
12
  )) }) }));
16
13
  export {
17
- v as default
14
+ n as default
18
15
  };
@@ -1,10 +1,7 @@
1
- export function DrawerNavigation({ links, items, classname, logo, clipPathStart, clipPathEnd, overlayAppendEl }: {
2
- links?: never[] | undefined;
3
- items?: never[] | undefined;
4
- classname?: string | undefined;
5
- logo?: {} | undefined;
6
- clipPathStart?: string | undefined;
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
- export function FindUs({ network, baseApiUrl, platformsApiUrl, authApiUrl, allowStateSearch, allowZipcodeSearch, allowAutoScroll, autoScrollOffset, compactLayout, showChannelSearchAndRescan, numberOfColumns, ad }: {
2
- network: any;
3
- baseApiUrl: any;
4
- platformsApiUrl?: string | undefined;
5
- authApiUrl?: string | undefined;
6
- allowStateSearch?: boolean | undefined;
7
- allowZipcodeSearch?: boolean | undefined;
8
- allowAutoScroll?: boolean | undefined;
9
- autoScrollOffset?: number | undefined;
10
- compactLayout?: boolean | undefined;
11
- showChannelSearchAndRescan?: boolean | undefined;
12
- numberOfColumns: any;
13
- ad?: {
14
- campaign: string;
15
- source: string;
16
- medium: string;
17
- content: string;
18
- } | undefined;
19
- }): import("react/jsx-runtime").JSX.Element;
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
- declare function useSourcePointPrivacyTrigger({ messageId }: {
3
- messageId?: number | undefined;
4
- }): null;
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;
@@ -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('.').AdBlock>>;
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.15",
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