@phillips/seldon 1.59.1 → 1.60.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.
Files changed (53) hide show
  1. package/dist/components/Accordion/Accordion.js +2 -2
  2. package/dist/components/Accordion/AccordionItem.js +4 -4
  3. package/dist/components/Button/Button.js +7 -7
  4. package/dist/components/Carousel/Carousel.d.ts +52 -0
  5. package/dist/components/Carousel/Carousel.js +72 -0
  6. package/dist/components/Carousel/CarouselContent.d.ts +19 -0
  7. package/dist/components/Carousel/CarouselContent.js +33 -0
  8. package/dist/components/Carousel/CarouselDots.d.ts +26 -0
  9. package/dist/components/Carousel/CarouselDots.js +75 -0
  10. package/dist/components/Carousel/CarouselItem.d.ts +11 -0
  11. package/dist/components/Carousel/CarouselItem.js +25 -0
  12. package/dist/components/Carousel/index.d.ts +4 -0
  13. package/dist/components/Carousel/utils.d.ts +8 -0
  14. package/dist/components/Carousel/utils.js +11 -0
  15. package/dist/components/ContentPeek/ContentPeek.js +5 -5
  16. package/dist/components/Drawer/Drawer.js +3 -3
  17. package/dist/components/Dropdown/Dropdown.js +3 -3
  18. package/dist/components/Grid/Grid.js +3 -3
  19. package/dist/components/Grid/utils.js +4 -4
  20. package/dist/components/GridItem/GridItem.js +8 -8
  21. package/dist/components/IconButton/IconButton.js +2 -2
  22. package/dist/components/Link/Link.js +6 -6
  23. package/dist/components/LinkList/LinkList.js +5 -5
  24. package/dist/components/Navigation/Navigation.js +4 -4
  25. package/dist/components/Navigation/NavigationList/NavigationList.js +3 -3
  26. package/dist/components/PageContentWrapper/PageContentWrapper.js +4 -4
  27. package/dist/components/Pagination/Pagination.js +6 -6
  28. package/dist/components/Row/Row.js +4 -4
  29. package/dist/components/Search/Search.js +7 -7
  30. package/dist/components/SplitPanel/SplitPanel.js +2 -2
  31. package/dist/components/Video/Video.js +2 -2
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.js +42 -34
  34. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1198 -0
  35. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +24 -0
  36. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +35 -0
  37. package/dist/node_modules/embla-carousel-wheel-gestures/dist/embla-carousel-wheel-gestures.esm.js +91 -0
  38. package/dist/node_modules/exenv/index.js +1 -1
  39. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  40. package/dist/node_modules/wheel-gestures/dist/wheel-gestures.esm.js +269 -0
  41. package/dist/patterns/LanguageSelector/LanguageSelector.js +4 -4
  42. package/dist/patterns/Social/Social.js +5 -5
  43. package/dist/patterns/Subscribe/Subscribe.js +7 -7
  44. package/dist/patterns/UserManagement/UserManagement.js +2 -2
  45. package/dist/patterns/ViewingsList/ViewingsList.js +10 -10
  46. package/dist/patterns/ViewingsList/ViewingsListCard.js +12 -12
  47. package/dist/patterns/ViewingsList/ViewingsListCardForm.js +6 -6
  48. package/dist/scss/componentStyles.scss +1 -0
  49. package/dist/scss/components/Carousel/_carousel.scss +84 -0
  50. package/dist/scss/components/Modal/_modal.scss +1 -0
  51. package/dist/site-furniture/Footer/Footer.js +2 -2
  52. package/dist/site-furniture/Header/Header.js +4 -4
  53. package/package.json +3 -1
@@ -0,0 +1,24 @@
1
+ import { useRef as l, useState as f, useCallback as p, useEffect as c } from "react";
2
+ import { areOptionsEqual as E, arePluginsEqual as O, canUseDOM as w } from "../../embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js";
3
+ import m from "../../embla-carousel/esm/embla-carousel.esm.js";
4
+ function b(e = {}, r = []) {
5
+ const t = l(e), n = l(r), [u, s] = f(), [a, d] = f(), o = p(() => {
6
+ u && u.reInit(t.current, n.current);
7
+ }, [u]);
8
+ return c(() => {
9
+ E(t.current, e) || (t.current = e, o());
10
+ }, [e, o]), c(() => {
11
+ O(n.current, r) || (n.current = r, o());
12
+ }, [r, o]), c(() => {
13
+ if (w() && a) {
14
+ m.globalOptions = b.globalOptions;
15
+ const i = m(a, t.current, n.current);
16
+ return s(i), () => i.destroy();
17
+ } else
18
+ s(void 0);
19
+ }, [a, s]), [d, u];
20
+ }
21
+ b.globalOptions = void 0;
22
+ export {
23
+ b as default
24
+ };
@@ -0,0 +1,35 @@
1
+ function y(n) {
2
+ return Object.prototype.toString.call(n) === "[object Object]";
3
+ }
4
+ function a(n) {
5
+ return y(n) || Array.isArray(n);
6
+ }
7
+ function p() {
8
+ return !!(typeof window != "undefined" && window.document && window.document.createElement);
9
+ }
10
+ function l(n, t) {
11
+ const e = Object.keys(n), c = Object.keys(t);
12
+ if (e.length !== c.length) return !1;
13
+ const s = JSON.stringify(Object.keys(n.breakpoints || {})), u = JSON.stringify(Object.keys(t.breakpoints || {}));
14
+ return s !== u ? !1 : e.every((o) => {
15
+ const r = n[o], i = t[o];
16
+ return typeof r == "function" ? `${r}` == `${i}` : !a(r) || !a(i) ? r === i : l(r, i);
17
+ });
18
+ }
19
+ function f(n) {
20
+ return n.concat().sort((t, e) => t.name > e.name ? 1 : -1).map((t) => t.options);
21
+ }
22
+ function O(n, t) {
23
+ if (n.length !== t.length) return !1;
24
+ const e = f(n), c = f(t);
25
+ return e.every((s, u) => {
26
+ const o = c[u];
27
+ return l(s, o);
28
+ });
29
+ }
30
+ export {
31
+ l as areOptionsEqual,
32
+ O as arePluginsEqual,
33
+ p as canUseDOM,
34
+ f as sortAndMapPluginToOptions
35
+ };
@@ -0,0 +1,91 @@
1
+ import P from "../../wheel-gestures/dist/wheel-gestures.esm.js";
2
+ var T = {
3
+ active: !0,
4
+ breakpoints: {},
5
+ wheelDraggingClass: "is-wheel-dragging",
6
+ forceWheelAxis: void 0,
7
+ target: void 0
8
+ };
9
+ N.globalOptions = void 0;
10
+ var V = process.env.NODE_ENV !== "production";
11
+ function N(v) {
12
+ v === void 0 && (v = {});
13
+ var r, f = function() {
14
+ };
15
+ function y(u, w) {
16
+ var M, x, b = w.mergeOptions, G = w.optionsAtMedia, X = b(T, N.globalOptions), Y = b(X, v);
17
+ r = G(Y);
18
+ var o = u.internalEngine(), h = (M = r.target) != null ? M : u.containerNode().parentNode, c = (x = r.forceWheelAxis) != null ? x : o.options.axis, D = P({
19
+ preventWheelAction: c,
20
+ reverseSign: [!0, !0, !1]
21
+ }), _ = D.observe(h), C = D.on("wheel", k), l = !1, i;
22
+ function O(e) {
23
+ try {
24
+ i = new MouseEvent("mousedown", e.event), E(i);
25
+ } catch {
26
+ return V && console.warn("Legacy browser requires events-polyfill (https://github.com/xiel/embla-carousel-wheel-gestures#legacy-browsers)"), f();
27
+ }
28
+ l = !0, S(), r.wheelDraggingClass && h.classList.add(r.wheelDraggingClass);
29
+ }
30
+ function R(e) {
31
+ l = !1, E(A("mouseup", e)), L(), r.wheelDraggingClass && h.classList.remove(r.wheelDraggingClass);
32
+ }
33
+ function S() {
34
+ document.documentElement.addEventListener("mousemove", s, !0), document.documentElement.addEventListener("mouseup", s, !0), document.documentElement.addEventListener("mousedown", s, !0);
35
+ }
36
+ function L() {
37
+ document.documentElement.removeEventListener("mousemove", s, !0), document.documentElement.removeEventListener("mouseup", s, !0), document.documentElement.removeEventListener("mousedown", s, !0);
38
+ }
39
+ function s(e) {
40
+ l && e.isTrusted && e.stopImmediatePropagation();
41
+ }
42
+ function A(e, a) {
43
+ var n, t;
44
+ if (c === o.options.axis) {
45
+ var m = a.axisMovement;
46
+ n = m[0], t = m[1];
47
+ } else {
48
+ var d = a.axisMovement;
49
+ t = d[0], n = d[1];
50
+ }
51
+ if (!o.options.skipSnaps && !o.options.dragFree) {
52
+ var g = o.containerRect.width, p = o.containerRect.height;
53
+ n = n < 0 ? Math.max(n, -g) : Math.min(n, g), t = t < 0 ? Math.max(t, -p) : Math.min(t, p);
54
+ }
55
+ return new MouseEvent(e, {
56
+ clientX: i.clientX + n,
57
+ clientY: i.clientY + t,
58
+ screenX: i.screenX + n,
59
+ screenY: i.screenY + t,
60
+ movementX: n,
61
+ movementY: t,
62
+ button: 0,
63
+ bubbles: !0,
64
+ cancelable: !0,
65
+ composed: !0
66
+ });
67
+ }
68
+ function E(e) {
69
+ u.containerNode().dispatchEvent(e);
70
+ }
71
+ function k(e) {
72
+ var a = e.axisDelta, n = a[0], t = a[1], m = c === "x" ? n : t, d = c === "x" ? t : n, g = e.isMomentum && e.previous && !e.previous.isMomentum, p = e.isEnding && !e.isMomentum || g, I = Math.abs(m) > Math.abs(d);
73
+ I && !l && !e.isMomentum && O(e), l && (p ? R(e) : E(A("mousemove", e)));
74
+ }
75
+ f = function() {
76
+ _(), C(), L();
77
+ };
78
+ }
79
+ var W = {
80
+ name: "wheelGestures",
81
+ options: v,
82
+ init: y,
83
+ destroy: function() {
84
+ return f();
85
+ }
86
+ };
87
+ return W;
88
+ }
89
+ export {
90
+ N as WheelGesturesPlugin
91
+ };
@@ -1,4 +1,4 @@
1
- import { __module as t } from "../../_virtual/index6.js";
1
+ import { __module as t } from "../../_virtual/index5.js";
2
2
  /*!
3
3
  Copyright (c) 2015 Jed Watson.
4
4
  Based on code that is Copyright 2013-2015, Facebook, Inc.
@@ -1,4 +1,4 @@
1
- import { __module as e } from "../../../../_virtual/index5.js";
1
+ import { __module as e } from "../../../../_virtual/index6.js";
2
2
  import { __require as o } from "./cjs/react-is.production.min.js";
3
3
  import { __require as t } from "./cjs/react-is.development.js";
4
4
  var r;
@@ -0,0 +1,269 @@
1
+ function p() {
2
+ return p = Object.assign || function(t) {
3
+ for (var r = 1; r < arguments.length; r++) {
4
+ var a = arguments[r];
5
+ for (var o in a)
6
+ Object.prototype.hasOwnProperty.call(a, o) && (t[o] = a[o]);
7
+ }
8
+ return t;
9
+ }, p.apply(this, arguments);
10
+ }
11
+ var $ = 0.996, q = function(r, a) {
12
+ return a === void 0 && (a = $), r * a / (1 - a);
13
+ };
14
+ function J(t) {
15
+ return t[t.length - 1];
16
+ }
17
+ function K(t) {
18
+ return t.reduce(function(r, a) {
19
+ return r + a;
20
+ }) / t.length;
21
+ }
22
+ var Q = function(r, a, o) {
23
+ return Math.min(Math.max(a, r), o);
24
+ };
25
+ function S(t, r) {
26
+ if (t.length !== r.length)
27
+ throw new Error("vectors must be same length");
28
+ return t.map(function(a, o) {
29
+ return a + r[o];
30
+ });
31
+ }
32
+ function y(t) {
33
+ return Math.max.apply(Math, t.map(Math.abs));
34
+ }
35
+ function h(t) {
36
+ return Object.freeze(t), Object.values(t).forEach(function(r) {
37
+ r !== null && typeof r == "object" && !Object.isFrozen(r) && h(r);
38
+ }), t;
39
+ }
40
+ function k() {
41
+ var t = {};
42
+ function r(l, c) {
43
+ return t[l] = (t[l] || []).concat(c), function() {
44
+ return a(l, c);
45
+ };
46
+ }
47
+ function a(l, c) {
48
+ t[l] = (t[l] || []).filter(function(e) {
49
+ return e !== c;
50
+ });
51
+ }
52
+ function o(l, c) {
53
+ l in t && t[l].forEach(function(e) {
54
+ return e(c);
55
+ });
56
+ }
57
+ return h({
58
+ on: r,
59
+ off: a,
60
+ dispatch: o
61
+ });
62
+ }
63
+ function ee(t) {
64
+ var r = [], a = function(e) {
65
+ return e.addEventListener("wheel", t, {
66
+ passive: !1
67
+ }), r.push(e), function() {
68
+ return o(e);
69
+ };
70
+ }, o = function(e) {
71
+ e.removeEventListener("wheel", t), r = r.filter(function(M) {
72
+ return M !== e;
73
+ });
74
+ }, l = function() {
75
+ r.forEach(o);
76
+ };
77
+ return h({
78
+ observe: a,
79
+ unobserve: o,
80
+ disconnect: l
81
+ });
82
+ }
83
+ var te = 16 * 1.125, ne = typeof window != "undefined" && window.innerHeight || 800, T = [1, te, ne];
84
+ function re(t) {
85
+ var r = t.deltaX * T[t.deltaMode], a = t.deltaY * T[t.deltaMode], o = (t.deltaZ || 0) * T[t.deltaMode];
86
+ return {
87
+ timeStamp: t.timeStamp,
88
+ axisDelta: [r, a, o]
89
+ };
90
+ }
91
+ var ae = [-1, -1, -1];
92
+ function ie(t, r) {
93
+ if (!r)
94
+ return t;
95
+ var a = r === !0 ? ae : r.map(function(o) {
96
+ return o ? -1 : 1;
97
+ });
98
+ return p({}, t, {
99
+ axisDelta: t.axisDelta.map(function(o, l) {
100
+ return o * a[l];
101
+ })
102
+ });
103
+ }
104
+ var j = 700, oe = function(r) {
105
+ return p({}, r, {
106
+ axisDelta: r.axisDelta.map(function(a) {
107
+ return Q(a, -j, j);
108
+ })
109
+ });
110
+ }, D = process.env.NODE_ENV !== "production", ue = 0.6, se = 0.96, le = 2, w = 5, I = /* @__PURE__ */ h({
111
+ preventWheelAction: !0,
112
+ reverseSign: [!0, !0, !1]
113
+ }), ce = 400;
114
+ function F() {
115
+ return {
116
+ isStarted: !1,
117
+ isStartPublished: !1,
118
+ isMomentum: !1,
119
+ startTime: 0,
120
+ lastAbsDelta: 1 / 0,
121
+ axisMovement: [0, 0, 0],
122
+ axisVelocity: [0, 0, 0],
123
+ accelerationFactors: [],
124
+ scrollPoints: [],
125
+ scrollPointsToMerge: [],
126
+ willEndTimeout: ce
127
+ };
128
+ }
129
+ function fe(t) {
130
+ t === void 0 && (t = {});
131
+ var r = k(), a = r.on, o = r.off, l = r.dispatch, c = I, e = F(), M, E = !1, g, A = function(n) {
132
+ Array.isArray(n) ? n.forEach(function(i) {
133
+ return P(i);
134
+ }) : P(n);
135
+ }, _ = function(n) {
136
+ return n === void 0 && (n = {}), Object.values(n).some(function(i) {
137
+ return i == null;
138
+ }) ? (D && console.error("updateOptions ignored! undefined & null options not allowed"), c) : c = h(p({}, I, c, n));
139
+ }, b = function(n) {
140
+ var i = p({
141
+ event: M,
142
+ isStart: !1,
143
+ isEnding: !1,
144
+ isMomentumCancel: !1,
145
+ isMomentum: e.isMomentum,
146
+ axisDelta: [0, 0, 0],
147
+ axisVelocity: e.axisVelocity,
148
+ axisMovement: e.axisMovement,
149
+ get axisMovementProjection() {
150
+ return S(i.axisMovement, i.axisVelocity.map(function(s) {
151
+ return q(s);
152
+ }));
153
+ }
154
+ }, n);
155
+ l("wheel", p({}, i, {
156
+ previous: g
157
+ })), g = i;
158
+ }, L = function(n, i) {
159
+ var s = c, f = s.preventWheelAction, v = i[0], m = i[1], d = i[2];
160
+ if (typeof f == "boolean") return f;
161
+ switch (f) {
162
+ case "x":
163
+ return Math.abs(v) >= n;
164
+ case "y":
165
+ return Math.abs(m) >= n;
166
+ case "z":
167
+ return Math.abs(d) >= n;
168
+ default:
169
+ return D && console.warn("unsupported preventWheelAction value: " + f, "warn"), !1;
170
+ }
171
+ }, P = function(n) {
172
+ var i = oe(ie(re(n), c.reverseSign)), s = i.axisDelta, f = i.timeStamp, v = y(s);
173
+ if (n.preventDefault && L(v, s) && n.preventDefault(), e.isStarted ? e.isMomentum && v > Math.max(2, e.lastAbsDelta * 2) && (V(!0), O()) : O(), v === 0 && Object.is && Object.is(n.deltaX, -0)) {
174
+ E = !0;
175
+ return;
176
+ }
177
+ M = n, e.axisMovement = S(e.axisMovement, s), e.lastAbsDelta = v, e.scrollPointsToMerge.push({
178
+ axisDelta: s,
179
+ timeStamp: f
180
+ }), C(), b({
181
+ axisDelta: s,
182
+ isStart: !e.isStartPublished
183
+ }), e.isStartPublished = !0, X();
184
+ }, C = function() {
185
+ e.scrollPointsToMerge.length === le ? (e.scrollPoints.unshift({
186
+ axisDeltaSum: e.scrollPointsToMerge.map(function(n) {
187
+ return n.axisDelta;
188
+ }).reduce(S),
189
+ timeStamp: K(e.scrollPointsToMerge.map(function(n) {
190
+ return n.timeStamp;
191
+ }))
192
+ }), z(), e.scrollPointsToMerge.length = 0, e.scrollPoints.length = 1, e.isMomentum || R()) : e.isStartPublished || N();
193
+ }, N = function() {
194
+ e.axisVelocity = J(e.scrollPointsToMerge).axisDelta.map(function(n) {
195
+ return n / e.willEndTimeout;
196
+ });
197
+ }, z = function() {
198
+ var n = e.scrollPoints, i = n[0], s = n[1];
199
+ if (!(!s || !i)) {
200
+ var f = i.timeStamp - s.timeStamp;
201
+ if (f <= 0) {
202
+ D && console.warn("invalid deltaTime");
203
+ return;
204
+ }
205
+ var v = i.axisDeltaSum.map(function(d) {
206
+ return d / f;
207
+ }), m = v.map(function(d, B) {
208
+ return d / (e.axisVelocity[B] || 1);
209
+ });
210
+ e.axisVelocity = v, e.accelerationFactors.push(m), H(f);
211
+ }
212
+ }, H = function(n) {
213
+ var i = Math.ceil(n / 10) * 10 * 1.2;
214
+ e.isMomentum || (i = Math.max(100, i * 2)), e.willEndTimeout = Math.min(1e3, Math.round(i));
215
+ }, G = function(n) {
216
+ return n === 0 ? !0 : n <= se && n >= ue;
217
+ }, R = function() {
218
+ if (e.accelerationFactors.length >= w) {
219
+ if (E && (E = !1, y(e.axisVelocity) >= 0.2)) {
220
+ W();
221
+ return;
222
+ }
223
+ var n = e.accelerationFactors.slice(w * -1), i = n.every(function(s) {
224
+ var f = !!s.reduce(function(m, d) {
225
+ return m && m < 1 && m === d ? 1 : 0;
226
+ }), v = s.filter(G).length === s.length;
227
+ return f || v;
228
+ });
229
+ i && W(), e.accelerationFactors = n;
230
+ }
231
+ }, W = function() {
232
+ e.isMomentum = !0;
233
+ }, O = function() {
234
+ e = F(), e.isStarted = !0, e.startTime = Date.now(), g = void 0, E = !1;
235
+ }, X = /* @__PURE__ */ function() {
236
+ var u;
237
+ return function() {
238
+ clearTimeout(u), u = setTimeout(V, e.willEndTimeout);
239
+ };
240
+ }(), V = function(n) {
241
+ n === void 0 && (n = !1), e.isStarted && (e.isMomentum && n ? b({
242
+ isEnding: !0,
243
+ isMomentumCancel: !0
244
+ }) : b({
245
+ isEnding: !0
246
+ }), e.isMomentum = !1, e.isStarted = !1);
247
+ }, x = ee(A), Z = x.observe, U = x.unobserve, Y = x.disconnect;
248
+ return _(t), h({
249
+ on: a,
250
+ off: o,
251
+ observe: Z,
252
+ unobserve: U,
253
+ disconnect: Y,
254
+ feedWheel: A,
255
+ updateOptions: _
256
+ });
257
+ }
258
+ export {
259
+ fe as WheelGestures,
260
+ y as absMax,
261
+ S as addVectors,
262
+ K as average,
263
+ Q as clamp,
264
+ I as configDefaults,
265
+ h as deepFreeze,
266
+ fe as default,
267
+ J as lastOf,
268
+ q as projection
269
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as b, Fragment as L, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as S } from "react";
3
- import { getCommonProps as N, noOp as x } from "../../utils/index.js";
2
+ import { forwardRef as N } from "react";
3
+ import { getCommonProps as S, noOp as x } from "../../utils/index.js";
4
4
  import C from "../../node_modules/classnames/index.js";
5
5
  import { SupportedLanguages as s } from "../../types/commonTypes.js";
6
6
  import T from "../../components/Dropdown/Dropdown.js";
@@ -36,7 +36,7 @@ const j = ({
36
36
  o.value
37
37
  )) })
38
38
  }
39
- ) }), A = S(
39
+ ) }), A = N(
40
40
  ({
41
41
  className: a,
42
42
  currentLanguage: n = s.en,
@@ -50,7 +50,7 @@ const j = ({
50
50
  ...o
51
51
  }, c) => {
52
52
  var u, g;
53
- const { className: p, ...h } = N({ id: l }, "LanguageSelector"), v = (g = (u = r.find((i) => i.value === n)) == null ? void 0 : u.label) != null ? g : "English", d = {
53
+ const { className: p, ...h } = S({ id: l }, "LanguageSelector"), v = (g = (u = r.find((i) => i.value === n)) == null ? void 0 : u.label) != null ? g : "English", d = {
54
54
  ...h,
55
55
  ...o,
56
56
  id: l,
@@ -2,9 +2,9 @@ import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
2
  import l from "../../node_modules/classnames/index.js";
3
3
  import { getCommonProps as f } from "../../utils/index.js";
4
4
  import p from "../../components/Button/Button.js";
5
- import { ButtonVariants as d } from "../../components/Button/types.js";
6
- import { TextVariants as u } from "../../components/Text/types.js";
7
- import N from "../../components/Text/Text.js";
5
+ import { ButtonVariants as N } from "../../components/Button/types.js";
6
+ import { TextVariants as d } from "../../components/Text/types.js";
7
+ import u from "../../components/Text/Text.js";
8
8
  const T = ({
9
9
  className: a,
10
10
  children: e,
@@ -15,8 +15,8 @@ const T = ({
15
15
  }) => {
16
16
  const { className: r, ...n } = f(o, "Social");
17
17
  return /* @__PURE__ */ c("div", { ...n, className: l(r, a), ...o, children: [
18
- /* @__PURE__ */ t(N, { variant: u.heading4, className: `${r}__header`, children: s }),
19
- /* @__PURE__ */ t(p, { onClick: i, variant: d.tertiary, className: `${r}__button`, children: m }),
18
+ /* @__PURE__ */ t(u, { variant: d.heading4, className: `${r}__header`, children: s }),
19
+ /* @__PURE__ */ t(p, { onClick: i, variant: N.tertiary, className: `${r}__button`, children: m }),
20
20
  e
21
21
  ] });
22
22
  };
@@ -16,19 +16,19 @@ const Y = ({
16
16
  title: f = "Never Miss A Moment",
17
17
  loadingText: g = "Loading...",
18
18
  invalidText: _ = "",
19
- errorText: h = "An error occurred. Please try again.",
20
- successText: v,
19
+ errorText: N = "An error occurred. Please try again.",
20
+ successText: h,
21
21
  privacyText: i = "By signing up, you agree to receive email communications from Phillips.",
22
22
  subscriptionState: e = o.Default,
23
23
  ...l
24
24
  }) => {
25
- const { className: r, ...x } = I(l, "Subscribe"), N = e === o.Invalid, y = e === o.Loading, $ = e === o.Success, b = e === o.Error, E = {
25
+ const { className: r, ...v } = I(l, "Subscribe"), x = e === o.Invalid, y = e === o.Loading, $ = e === o.Success, b = e === o.Error, E = {
26
26
  invalid: _,
27
- success: v,
27
+ success: h,
28
28
  loading: g,
29
- error: h
30
- }, t = e !== o.Default ? E[e] : "", P = $ || y, A = N || b;
31
- return /* @__PURE__ */ B(d, { ...x, className: C(r, s), noValidate: !0, ...l, children: [
29
+ error: N
30
+ }, t = e !== o.Default ? E[e] : "", P = $ || y, A = x || b;
31
+ return /* @__PURE__ */ B(d, { ...v, className: C(r, s), noValidate: !0, ...l, children: [
32
32
  /* @__PURE__ */ n("h3", { className: `${r}__title`, children: f }),
33
33
  a ? /* @__PURE__ */ n("p", { className: `${r}__blurb`, children: a }) : null,
34
34
  /* @__PURE__ */ n(
@@ -17,8 +17,8 @@ const A = x(
17
17
  href: u = "/account",
18
18
  ...t
19
19
  }, f) => {
20
- const { className: n, ...h } = C(t, "UserManagement"), N = e === a.LoggedIn, _ = e !== a.Loading;
21
- return /* @__PURE__ */ o("div", { ...h, className: v(n, l), ...t, ref: f, children: _ && /* @__PURE__ */ o(L, { children: N ? /* @__PURE__ */ c(i, { className: `${n}__login`, href: u, children: [
20
+ const { className: n, ...N } = C(t, "UserManagement"), h = e === a.LoggedIn, _ = e !== a.Loading;
21
+ return /* @__PURE__ */ o("div", { ...N, className: v(n, l), ...t, ref: f, children: _ && /* @__PURE__ */ o(L, { children: h ? /* @__PURE__ */ c(i, { className: `${n}__login`, href: u, children: [
22
22
  /* @__PURE__ */ o(r, { className: `${n}__account-icon` }),
23
23
  /* @__PURE__ */ o(m, { variant: s.body3, children: p })
24
24
  ] }) : /* @__PURE__ */ c("button", { className: `${n}__login`, onClick: d, children: [
@@ -1,17 +1,17 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
3
  import { createElement as L } from "react";
4
- import S from "../../node_modules/classnames/index.js";
4
+ import N from "../../node_modules/classnames/index.js";
5
5
  import { getCommonProps as M } from "../../utils/index.js";
6
6
  import P from "./ViewingsListCard.js";
7
7
  import R from "../../components/Button/Button.js";
8
- const $ = () => Math.floor(Math.random() * 100) + Date.now(), G = ({
9
- cardTitle: C = "Viewing Details",
10
- className: E,
8
+ const S = () => Math.floor(Math.random() * 100) + Date.now(), G = ({
9
+ cardTitle: $ = "Viewing Details",
10
+ className: C,
11
11
  i18n: f = {},
12
12
  onAdd: r,
13
13
  onDelete: e,
14
- onSave: N,
14
+ onSave: E,
15
15
  title: O,
16
16
  viewings: c,
17
17
  ...i
@@ -21,23 +21,23 @@ const $ = () => Math.floor(Math.random() * 100) + Date.now(), G = ({
21
21
  h(c);
22
22
  }, [c]);
23
23
  const { addViewingsBtnLabel: y = "ADD VIEWINGS" } = f, b = () => {
24
- const t = `${$()}${a ? "-" + a.length : ""}`;
24
+ const t = `${S()}${a ? "-" + a.length : ""}`;
25
25
  n(t), u(t), r && r(t);
26
26
  }, V = (t) => {
27
27
  n(""), typeof e == "function" && e(t);
28
28
  }, k = (t) => {
29
29
  n(t), u(a == null ? void 0 : a.find((o) => o.id === t));
30
30
  }, x = (t) => {
31
- N(t) && n("");
31
+ E(t) && n("");
32
32
  }, B = () => {
33
33
  typeof s == "string" ? typeof e == "function" && e(s) : m === (s == null ? void 0 : s.id) && h((t) => t == null ? void 0 : t.map((o) => o.id === s.id ? s : o)), n("");
34
34
  };
35
- return /* @__PURE__ */ L("div", { ...D, className: S(p, E), key: m, ...i }, /* @__PURE__ */ l("h2", { className: S(`${p}__title`), children: O }), a == null ? void 0 : a.map((t, o) => /* @__PURE__ */ l(
35
+ return /* @__PURE__ */ L("div", { ...D, className: N(p, C), key: m, ...i }, /* @__PURE__ */ l("h2", { className: N(`${p}__title`), children: O }), a == null ? void 0 : a.map((t, o) => /* @__PURE__ */ l(
36
36
  P,
37
37
  {
38
38
  ...t,
39
39
  ...f,
40
- cardTitle: t.location ? `${C} ${o + 1}` : void 0,
40
+ cardTitle: t.location ? `${$} ${o + 1}` : void 0,
41
41
  isEditState: m === t.id,
42
42
  onCancel: B,
43
43
  onDelete: V,
@@ -45,7 +45,7 @@ const $ = () => Math.floor(Math.random() * 100) + Date.now(), G = ({
45
45
  onSave: x
46
46
  },
47
47
  `${t.id}`
48
- )), /* @__PURE__ */ l(R, { id: `viewings-list-add-btn-${i.id || $()}`, size: "sm", onClick: b, children: y }));
48
+ )), /* @__PURE__ */ l(R, { id: `viewings-list-add-btn-${i.id || S()}`, size: "sm", onClick: b, children: y }));
49
49
  };
50
50
  export {
51
51
  G as default
@@ -16,14 +16,14 @@ const i = `${u}-viewings-list-card`, dt = ({
16
16
  address3: z,
17
17
  address3Label: A,
18
18
  cancelBtnLabel: L = "CANCEL",
19
- cardTitle: T = "Add New Viewing",
20
- deleteBtnLabel: V = "DELETE",
21
- editBtnLabel: _ = "EDIT",
19
+ cardTitle: N = "Add New Viewing",
20
+ deleteBtnLabel: T = "DELETE",
21
+ editBtnLabel: V = "EDIT",
22
22
  isEditState: o,
23
23
  enableOnSite: f = "false",
24
- enableOnSiteToggleLabel: k = "Enabled on website",
25
- email: I,
26
- emailLabel: N = "Email",
24
+ enableOnSiteToggleLabel: _ = "Enabled on website",
25
+ email: k,
26
+ emailLabel: I = "Email",
27
27
  emailLink: S,
28
28
  emailLinkLabel: j = "Email Address",
29
29
  emailOn: B = "false",
@@ -77,7 +77,7 @@ const i = `${u}-viewings-list-card`, dt = ({
77
77
  id: e,
78
78
  className: mt(`${i}`, { [`${i}--edit-state`]: o }),
79
79
  children: [
80
- /* @__PURE__ */ t("h3", { className: `${i}__title`, children: T }),
80
+ /* @__PURE__ */ t("h3", { className: `${i}__title`, children: N }),
81
81
  /* @__PURE__ */ t("input", { type: "hidden", name: "id", value: e }),
82
82
  /* @__PURE__ */ t(
83
83
  y,
@@ -104,8 +104,8 @@ const i = `${u}-viewings-list-card`, dt = ({
104
104
  address2Label: x,
105
105
  address3: z,
106
106
  address3Label: A,
107
- email: I,
108
- emailLabel: N,
107
+ email: k,
108
+ emailLabel: I,
109
109
  emailLink: S,
110
110
  emailLinkLabel: j,
111
111
  emailOn: B,
@@ -138,7 +138,7 @@ const i = `${u}-viewings-list-card`, dt = ({
138
138
  id: `enableOnSite-${e}`,
139
139
  type: "toggle",
140
140
  defaultChecked: f === "true",
141
- labelText: k,
141
+ labelText: _,
142
142
  size: "md",
143
143
  inline: !0,
144
144
  value: "true",
@@ -181,7 +181,7 @@ const i = `${u}-viewings-list-card`, dt = ({
181
181
  type: "button",
182
182
  size: "sm",
183
183
  onClick: it,
184
- children: _
184
+ children: V
185
185
  }
186
186
  ),
187
187
  /* @__PURE__ */ t(
@@ -192,7 +192,7 @@ const i = `${u}-viewings-list-card`, dt = ({
192
192
  type: "button",
193
193
  size: "sm",
194
194
  onClick: () => typeof b == "function" && b(e),
195
- children: V
195
+ children: T
196
196
  }
197
197
  )
198
198
  ] }) })