@phillips/seldon 1.74.4 → 1.75.1

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 (48) hide show
  1. package/dist/components/Accordion/Accordion.js +2 -2
  2. package/dist/components/Accordion/AccordionItem.js +3 -3
  3. package/dist/components/Breadcrumb/Breadcrumb.js +6 -6
  4. package/dist/components/Breadcrumb/BreadcrumbItem.js +6 -6
  5. package/dist/components/Button/Button.js +7 -7
  6. package/dist/components/Carousel/Carousel.js +8 -8
  7. package/dist/components/Carousel/CarouselContent.js +3 -3
  8. package/dist/components/Carousel/CarouselDots.js +24 -24
  9. package/dist/components/Carousel/CarouselItem.js +3 -3
  10. package/dist/components/ContentPeek/ContentPeek.js +5 -5
  11. package/dist/components/Drawer/Drawer.js +6 -6
  12. package/dist/components/Dropdown/Dropdown.js +3 -3
  13. package/dist/components/Grid/Grid.js +3 -3
  14. package/dist/components/Grid/utils.js +4 -4
  15. package/dist/components/GridItem/GridItem.js +8 -8
  16. package/dist/components/IconButton/IconButton.js +2 -2
  17. package/dist/components/Link/Link.js +6 -6
  18. package/dist/components/LinkBlock/LinkBlock.js +6 -6
  19. package/dist/components/LinkList/LinkList.js +5 -5
  20. package/dist/components/Modal/Modal.js +4 -4
  21. package/dist/components/Navigation/Navigation.js +4 -4
  22. package/dist/components/Navigation/NavigationList/NavigationList.js +3 -3
  23. package/dist/components/PageContentWrapper/PageContentWrapper.js +4 -4
  24. package/dist/components/PinchZoom/PinchZoom.js +3 -3
  25. package/dist/components/Row/Row.js +4 -4
  26. package/dist/components/Search/Search.js +5 -5
  27. package/dist/components/SeldonImage/SeldonImage.d.ts +47 -0
  28. package/dist/components/SeldonImage/SeldonImage.js +73 -0
  29. package/dist/components/SeldonImage/index.d.ts +1 -0
  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 +2 -0
  34. package/dist/patterns/DetailList/DetailList.js +7 -7
  35. package/dist/patterns/LanguageSelector/LanguageSelector.js +4 -4
  36. package/dist/patterns/Social/Social.js +5 -5
  37. package/dist/patterns/Subscribe/Subscribe.js +8 -8
  38. package/dist/patterns/UserManagement/UserManagement.js +2 -2
  39. package/dist/patterns/ViewingsList/ViewingsList.js +10 -10
  40. package/dist/patterns/ViewingsList/ViewingsListCard.js +12 -12
  41. package/dist/patterns/ViewingsList/ViewingsListCardForm.js +6 -6
  42. package/dist/scss/componentStyles.scss +1 -0
  43. package/dist/scss/components/Carousel/_carousel.scss +3 -3
  44. package/dist/scss/components/SeldonImage/_seldonImage.scss +68 -0
  45. package/dist/scss/patterns/DetailList/_detailList.scss +1 -1
  46. package/dist/site-furniture/Footer/Footer.js +2 -2
  47. package/dist/site-furniture/Header/Header.js +4 -4
  48. package/package.json +1 -1
@@ -4,7 +4,7 @@ import { px as t } from "../../../utils/index.js";
4
4
  import l from "../../../node_modules/classnames/index.js";
5
5
  import { TextVariants as p } from "../../Text/types.js";
6
6
  import f from "../../Text/Text.js";
7
- const N = i.forwardRef(
7
+ const h = i.forwardRef(
8
8
  ({ id: o, children: n, className: d, isOffScreen: _, leftSectionHeading: m, rightSectionHeading: v }, u) => {
9
9
  const s = i.Children.toArray(n).filter((a) => {
10
10
  if (a && a.props.navGroup === "nav-link-start")
@@ -37,7 +37,7 @@ const N = i.forwardRef(
37
37
  );
38
38
  }
39
39
  );
40
- N.displayName = "NavigationList";
40
+ h.displayName = "NavigationList";
41
41
  export {
42
- N as default
42
+ h as default
43
43
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as p } from "react";
3
- import { getCommonProps as n } from "../../utils/index.js";
2
+ import { forwardRef as n } from "react";
3
+ import { getCommonProps as p } from "../../utils/index.js";
4
4
  import f from "../../node_modules/classnames/index.js";
5
- const c = p(
5
+ const c = n(
6
6
  ({ children: e, className: o, ...a }, r) => {
7
- const { className: m, ...s } = n(a, "PageContentWrapper");
7
+ const { className: m, ...s } = p(a, "PageContentWrapper");
8
8
  return /* @__PURE__ */ t("div", { ...s, className: f(m, o), ...a, ref: r, children: e });
9
9
  }
10
10
  );
@@ -1,11 +1,11 @@
1
1
  import { jsx as p } from "react/jsx-runtime";
2
- import { useState as N, useCallback as b, isValidElement as n, cloneElement as S } from "react";
2
+ import { useState as b, useCallback as n, isValidElement as N, cloneElement as S } from "react";
3
3
  import { getCommonProps as w } from "../../utils/index.js";
4
4
  import { TransformWrapper as x, TransformComponent as T } from "../../node_modules/react-zoom-pan-pinch/dist/index.esm.js";
5
5
  import c from "../../node_modules/classnames/index.js";
6
6
  const $ = ({ onZoomChange: s, children: e, maxZoom: i = 10, className: f, ...r }) => {
7
7
  var l;
8
- const { className: t, ...d } = w(r, "PinchZoom"), [a, m] = N(!1), u = b(
8
+ const { className: t, ...d } = w(r, "PinchZoom"), [a, m] = b(!1), u = n(
9
9
  (P) => {
10
10
  const { state: o } = P;
11
11
  o.scale > 0.99 && o.scale < 1.01 ? (m(!1), s == null || s(!1)) : (m(!0), s == null || s(!0));
@@ -36,7 +36,7 @@ const $ = ({ onZoomChange: s, children: e, maxZoom: i = 10, className: f, ...r }
36
36
  [`${t}-zoomed`]: a
37
37
  }),
38
38
  contentClass: `${t}-content`,
39
- children: n(e) ? S(e, { className: c(`${t}-child`, (l = e == null ? void 0 : e.props) == null ? void 0 : l.className) }) : e
39
+ children: N(e) ? S(e, { className: c(`${t}-child`, (l = e == null ? void 0 : e.props) == null ? void 0 : l.className) }) : e
40
40
  }
41
41
  )
42
42
  }
@@ -3,21 +3,21 @@ import { getCommonProps as p, generatePaddingClassName as e, PaddingTokens as m
3
3
  import C from "../../node_modules/classnames/index.js";
4
4
  const g = ({
5
5
  children: s,
6
- element: a,
6
+ element: n,
7
7
  padding: o = { top: m.lg, bottom: m.lg },
8
- className: n,
8
+ className: a,
9
9
  ...t
10
10
  }) => {
11
11
  const { className: r, ...l } = p(t, "Row");
12
12
  return /* @__PURE__ */ c(
13
- a || "section",
13
+ n || "section",
14
14
  {
15
15
  ...l,
16
16
  className: C(
17
17
  r,
18
18
  o.top && e(o.top, "start"),
19
19
  o.bottom && e(o.bottom, "end"),
20
- n
20
+ a
21
21
  ),
22
22
  ...t,
23
23
  children: s
@@ -1,6 +1,6 @@
1
1
  import { jsx as a, jsxs as u } from "react/jsx-runtime";
2
2
  import c, { useEffect as V } from "react";
3
- import { getCommonProps as j, px as D, encodeURLSearchParams as I } from "../../utils/index.js";
3
+ import { getCommonProps as j, px as D, encodeURLSearchParams as N } from "../../utils/index.js";
4
4
  import f from "../../node_modules/classnames/index.js";
5
5
  import H from "../Input/Input.js";
6
6
  import O from "../Link/Link.js";
@@ -26,8 +26,8 @@ const ne = ({
26
26
  getAllResultsLink: S = (r) => `/Search?Search=${r}`,
27
27
  ...v
28
28
  }) => {
29
- var N;
30
- const { className: r, "data-testid": m, ...P } = j(v, "Search"), o = c.useContext(U), h = c.useRef(null), p = c.useRef(null), x = c.useRef(null), t = o.isSearchExpanded, s = (N = h.current) == null ? void 0 : N.value, T = _ ? (e) => {
29
+ var I;
30
+ const { className: r, "data-testid": m, ...P } = j(v, "Search"), o = c.useContext(U), h = c.useRef(null), p = c.useRef(null), x = c.useRef(null), t = o.isSearchExpanded, s = (I = h.current) == null ? void 0 : I.value, T = _ ? (e) => {
31
31
  _(e.target.value);
32
32
  } : void 0;
33
33
  M(x, (e) => {
@@ -37,7 +37,7 @@ const ne = ({
37
37
  var n;
38
38
  if (e.stopPropagation(), e.key === "Enter") {
39
39
  if (e.preventDefault(), s && s.length > 2) {
40
- const y = I(S(s));
40
+ const y = N(S(s));
41
41
  window.location.href = y;
42
42
  }
43
43
  e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.click();
@@ -142,7 +142,7 @@ const ne = ({
142
142
  children: /* @__PURE__ */ a("li", { className: `${r}__result`, children: /* @__PURE__ */ a(
143
143
  O,
144
144
  {
145
- href: ((e) => I(S(e)))(s),
145
+ href: ((e) => N(S(e)))(s),
146
146
  children: /* @__PURE__ */ a("p", { children: L(s) })
147
147
  }
148
148
  ) }, "viewAllSearchResults")
@@ -0,0 +1,47 @@
1
+ import { ComponentProps } from 'react';
2
+ type AspectRatio = '16/9' | '1/1' | 'none';
3
+ export interface SeldonImageProps extends ComponentProps<'div'> {
4
+ /**
5
+ * The aspect ratio of the image container.
6
+ */
7
+ aspectRatio?: AspectRatio;
8
+ /**
9
+ * The resize behavior of the image (see CSS object-fit).
10
+ */
11
+ objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
12
+ /**
13
+ * Whether the image has a blur background covering the background of the image container
14
+ */
15
+ hasBlurBackground?: boolean;
16
+ /**
17
+ * The image to display.
18
+ */
19
+ src: string;
20
+ /**
21
+ * The alt text of the image.
22
+ */
23
+ alt: string;
24
+ /**
25
+ * The class name of the child img element.
26
+ */
27
+ imageClassName?: string;
28
+ /**
29
+ * The style of the child img element.
30
+ */
31
+ imageStyle?: React.CSSProperties;
32
+ /**
33
+ * The text to display when the image fails to load.
34
+ */
35
+ errorText?: string;
36
+ }
37
+ /**
38
+ * ## Overview
39
+ *
40
+ * Component for displaying an image with optional blur background, aspect ratio, and object fit.
41
+ *
42
+ * [Figma Link](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?m=auto&node-id=4501-64590)
43
+ *
44
+ * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-seldonimage--overview)
45
+ */
46
+ declare const SeldonImage: import("react").ForwardRefExoticComponent<Omit<SeldonImageProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
47
+ export default SeldonImage;
@@ -0,0 +1,73 @@
1
+ import { jsxs as b, jsx as a } from "react/jsx-runtime";
2
+ import { forwardRef as h, useRef as I, useState as v, useEffect as x } from "react";
3
+ import { getCommonProps as y } from "../../utils/index.js";
4
+ import n from "../../node_modules/classnames/index.js";
5
+ const E = h(
6
+ ({
7
+ className: f,
8
+ aspectRatio: d = "none",
9
+ objectFit: l = "none",
10
+ hasBlurBackground: $ = !1,
11
+ imageClassName: u,
12
+ imageStyle: p,
13
+ src: s,
14
+ alt: m,
15
+ errorText: N = "Error loading image",
16
+ ...i
17
+ }, S) => {
18
+ const { className: e, ...t } = y(i, "SeldonImage"), g = I(null), [r, o] = v("loading");
19
+ return x(() => {
20
+ var c;
21
+ (c = g.current) != null && c.complete && o("loaded");
22
+ }, []), /* @__PURE__ */ b(
23
+ "div",
24
+ {
25
+ ref: S,
26
+ className: n(e, f, {
27
+ [`${e}--hidden`]: r === "loading" || r === "error",
28
+ [`${e}--aspect-ratio-${d.replace("/", "-")}`]: d !== "none"
29
+ }),
30
+ role: "img",
31
+ "aria-label": m,
32
+ ...i,
33
+ ...t,
34
+ children: [
35
+ $ && /* @__PURE__ */ a(
36
+ "div",
37
+ {
38
+ className: n(`${e}-blur`, {
39
+ [`${e}-blur--hidden`]: r === "loading" || r === "error"
40
+ }),
41
+ style: { backgroundImage: `url(${s})` }
42
+ }
43
+ ),
44
+ r === "error" && /* @__PURE__ */ a("div", { className: `${e}--error`, children: `${N}` }),
45
+ /* @__PURE__ */ a(
46
+ "img",
47
+ {
48
+ className: n(`${e}-img`, u, {
49
+ [`${e}-img--hidden`]: r === "loading" || r === "error",
50
+ [`${e}-img--object-fit-${l}`]: l !== "none"
51
+ }),
52
+ style: p,
53
+ src: s,
54
+ alt: m,
55
+ "data-testid": `${t["data-testid"]}-img`,
56
+ ref: g,
57
+ onLoad: () => {
58
+ o("loaded");
59
+ },
60
+ onError: () => {
61
+ o("error");
62
+ }
63
+ }
64
+ )
65
+ ]
66
+ }
67
+ );
68
+ }
69
+ );
70
+ E.displayName = "SeldonImage";
71
+ export {
72
+ E as default
73
+ };
@@ -0,0 +1 @@
1
+ export { default as SeldonImage, type SeldonImageProps } from './SeldonImage';
@@ -1,7 +1,7 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import n from "../../node_modules/classnames/index.js";
3
3
  import { getCommonProps as c } from "../../utils/index.js";
4
- const N = ({
4
+ const P = ({
5
5
  children: o,
6
6
  className: m,
7
7
  element: t = "section",
@@ -20,5 +20,5 @@ const N = ({
20
20
  );
21
21
  };
22
22
  export {
23
- N as default
23
+ P as default
24
24
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { getCommonProps as d } from "../../utils/index.js";
3
3
  import l from "../../node_modules/classnames/index.js";
4
- const N = ({ aspectRatio: s = 16 / 9, className: o, videoSource: m, ...e }) => {
4
+ const u = ({ aspectRatio: s = 16 / 9, className: o, videoSource: m, ...e }) => {
5
5
  const { className: a, "data-testid": r, ...i } = d(e, "Video"), c = {
6
6
  className: l(a, o),
7
7
  "data-testid": r,
@@ -22,5 +22,5 @@ const N = ({ aspectRatio: s = 16 / 9, className: o, videoSource: m, ...e }) => {
22
22
  ) });
23
23
  };
24
24
  export {
25
- N as default
25
+ u as default
26
26
  };
package/dist/index.d.ts CHANGED
@@ -49,3 +49,4 @@ export * from './components/Carousel';
49
49
  export * from './components/Detail';
50
50
  export * from './patterns/DetailList';
51
51
  export * from './components/PinchZoom';
52
+ export * from './components/SeldonImage';
package/dist/index.js CHANGED
@@ -62,6 +62,7 @@ import { default as bo } from "./components/Detail/Detail.js";
62
62
  import { default as Ao } from "./patterns/DetailList/DetailList.js";
63
63
  import { DetailListAlignment as ho } from "./patterns/DetailList/types.js";
64
64
  import { default as No } from "./components/PinchZoom/PinchZoom.js";
65
+ import { default as wo } from "./components/SeldonImage/SeldonImage.js";
65
66
  export {
66
67
  He as Accordion,
67
68
  Oe as AccordionItem,
@@ -110,6 +111,7 @@ export {
110
111
  No as PinchZoom,
111
112
  ee as Row,
112
113
  le as Search,
114
+ wo as SeldonImage,
113
115
  uo as SeldonProvider,
114
116
  pe as Select,
115
117
  ce as Social,
@@ -1,12 +1,12 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
- import n, { forwardRef as N } from "react";
2
+ import j, { forwardRef as $ } from "react";
3
3
  import l from "../../node_modules/classnames/index.js";
4
- import { getCommonProps as $, px as s } from "../../utils/index.js";
4
+ import { getCommonProps as D, px as s } from "../../utils/index.js";
5
5
  import { DetailListAlignment as t } from "./types.js";
6
- import { getDetailKey as D } from "./utils.js";
7
- const L = N(
6
+ import { getDetailKey as N } from "./utils.js";
7
+ const L = $(
8
8
  ({ alignment: a = t.justified, className: p, children: e, hasSeparators: u = !1, ...m }, c) => {
9
- const { className: r, ...d } = $(m, "DetailList"), o = Array.isArray(e) ? e : [e];
9
+ const { className: r, ...d } = D(m, "DetailList"), o = Array.isArray(e) ? e : [e];
10
10
  return /* @__PURE__ */ f(
11
11
  "dl",
12
12
  {
@@ -18,7 +18,7 @@ const L = N(
18
18
  ...m,
19
19
  ref: c,
20
20
  children: o == null ? void 0 : o.map(
21
- (i, j) => n.isValidElement(i) ? /* @__PURE__ */ f(
21
+ (i, n) => j.isValidElement(i) ? /* @__PURE__ */ f(
22
22
  "div",
23
23
  {
24
24
  className: l(`${r}-wrapper`, {
@@ -28,7 +28,7 @@ const L = N(
28
28
  }),
29
29
  children: i
30
30
  },
31
- D(i, j)
31
+ N(i, n)
32
32
  ) : void 0
33
33
  )
34
34
  }
@@ -1,6 +1,6 @@
1
1
  import { jsxs as b, Fragment as L, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as N } from "react";
3
- import { getCommonProps as S, noOp as T } from "../../utils/index.js";
2
+ import { forwardRef as S } from "react";
3
+ import { getCommonProps as N, noOp as T } from "../../utils/index.js";
4
4
  import x from "../../node_modules/classnames/index.js";
5
5
  import { SupportedLanguages as s } from "../../types/commonTypes.js";
6
6
  import C from "../../components/Dropdown/Dropdown.js";
@@ -36,7 +36,7 @@ const j = ({
36
36
  o.value
37
37
  )) })
38
38
  }
39
- ) }), A = N(
39
+ ) }), A = S(
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 d, g;
53
- const { className: p, ...h } = S({ id: l }, "LanguageSelector"), v = (g = (d = r.find((i) => i.value === n)) == null ? void 0 : d.label) != null ? g : "English", u = {
53
+ const { className: p, ...h } = N({ id: l }, "LanguageSelector"), v = (g = (d = r.find((i) => i.value === n)) == null ? void 0 : d.label) != null ? g : "English", u = {
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 N } from "../../components/Button/types.js";
6
- import { TextVariants as d } from "../../components/Text/types.js";
7
- import u from "../../components/Text/Text.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";
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(u, { variant: d.heading4, className: `${r}__header`, children: s }),
19
- /* @__PURE__ */ t(p, { onClick: i, variant: N.tertiary, className: `${r}__button`, children: m }),
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 }),
20
20
  e
21
21
  ] });
22
22
  };
@@ -16,20 +16,20 @@ const k = ({
16
16
  inputPlaceholder: f = "example@email.com",
17
17
  title: g = "Never Miss A Moment",
18
18
  loadingText: _ = "Loading...",
19
- invalidText: N = "",
20
- errorText: h = "An error occurred. Please try again.",
21
- successText: v,
19
+ invalidText: h = "",
20
+ errorText: v = "An error occurred. Please try again.",
21
+ successText: x,
22
22
  privacyText: i = "By signing up, you agree to receive email communications from Phillips.",
23
23
  subscriptionState: e = o.Default,
24
24
  ...t
25
25
  }) => {
26
- const { className: r, ...x } = L(t, "Subscribe"), y = e === o.Invalid, $ = e === o.Loading, b = e === o.Success, E = e === o.Error, P = {
27
- invalid: N,
28
- success: v,
26
+ const { className: r, ...N } = L(t, "Subscribe"), y = e === o.Invalid, $ = e === o.Loading, b = e === o.Success, E = e === o.Error, P = {
27
+ invalid: h,
28
+ success: x,
29
29
  loading: _,
30
- error: h
30
+ error: v
31
31
  }, l = e !== o.Default ? P[e] : "", A = b || $, B = y || E;
32
- return /* @__PURE__ */ C(u, { ...x, className: I(r, s), noValidate: !0, ...t, children: [
32
+ return /* @__PURE__ */ C(u, { ...N, className: I(r, s), noValidate: !0, ...t, children: [
33
33
  /* @__PURE__ */ n("h3", { className: `${r}__title`, children: g }),
34
34
  a ? /* @__PURE__ */ n("p", { className: `${r}__blurb`, children: a }) : null,
35
35
  /* @__PURE__ */ n(
@@ -17,8 +17,8 @@ const A = x(
17
17
  href: u = "/account",
18
18
  ...t
19
19
  }, f) => {
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: [
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: [
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 N from "../../node_modules/classnames/index.js";
4
+ import S 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 S = () => Math.floor(Math.random() * 100) + Date.now(), G = ({
9
- cardTitle: $ = "Viewing Details",
10
- className: C,
8
+ const $ = () => Math.floor(Math.random() * 100) + Date.now(), G = ({
9
+ cardTitle: C = "Viewing Details",
10
+ className: E,
11
11
  i18n: f = {},
12
12
  onAdd: r,
13
13
  onDelete: e,
14
- onSave: E,
14
+ onSave: N,
15
15
  title: O,
16
16
  viewings: c,
17
17
  ...i
@@ -21,23 +21,23 @@ const S = () => 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 = `${S()}${a ? "-" + a.length : ""}`;
24
+ const t = `${$()}${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
- E(t) && n("");
31
+ N(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: 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(
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(
36
36
  P,
37
37
  {
38
38
  ...t,
39
39
  ...f,
40
- cardTitle: t.location ? `${$} ${o + 1}` : void 0,
40
+ cardTitle: t.location ? `${C} ${o + 1}` : void 0,
41
41
  isEditState: m === t.id,
42
42
  onCancel: B,
43
43
  onDelete: V,
@@ -45,7 +45,7 @@ const S = () => 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 || S()}`, size: "sm", onClick: b, children: y }));
48
+ )), /* @__PURE__ */ l(R, { id: `viewings-list-add-btn-${i.id || $()}`, 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: N = "Add New Viewing",
20
- deleteBtnLabel: T = "DELETE",
21
- editBtnLabel: V = "EDIT",
19
+ cardTitle: T = "Add New Viewing",
20
+ deleteBtnLabel: V = "DELETE",
21
+ editBtnLabel: _ = "EDIT",
22
22
  isEditState: o,
23
23
  enableOnSite: f = "false",
24
- enableOnSiteToggleLabel: _ = "Enabled on website",
25
- email: k,
26
- emailLabel: I = "Email",
24
+ enableOnSiteToggleLabel: k = "Enabled on website",
25
+ email: I,
26
+ emailLabel: N = "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: N }),
80
+ /* @__PURE__ */ t("h3", { className: `${i}__title`, children: T }),
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: k,
108
- emailLabel: I,
107
+ email: I,
108
+ emailLabel: N,
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: _,
141
+ labelText: k,
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: V
184
+ children: _
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: T
195
+ children: V
196
196
  }
197
197
  )
198
198
  ] }) })
@@ -22,9 +22,9 @@ const o = `${X}-viewings-list-card-form`, l = ({
22
22
  invalidFields: e,
23
23
  previewDates: y,
24
24
  previewDatesLabel: E = "Date(s)",
25
- previewHours1: N,
26
- previewHours1Label: U = "Hours1",
27
- previewHours2: A,
25
+ previewHours1: U,
26
+ previewHours1Label: A = "Hours1",
27
+ previewHours2: N,
28
28
  previewHours2Label: P = "Hours2",
29
29
  previewLabel: j = "Label ('Preview', 'Opening Night', etc)",
30
30
  previewLabelValue: I,
@@ -144,8 +144,8 @@ const o = `${X}-viewings-list-card-form`, l = ({
144
144
  {
145
145
  id: `previewHours1-${r}`,
146
146
  name: "previewHours1",
147
- defaultValue: N,
148
- labelText: U,
147
+ defaultValue: U,
148
+ labelText: A,
149
149
  size: "sm",
150
150
  invalid: e == null ? void 0 : e.previewHours1,
151
151
  invalidText: e == null ? void 0 : e.previewHours1,
@@ -157,7 +157,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
157
157
  {
158
158
  id: `previewHours2-${r}`,
159
159
  name: "previewHours2",
160
- defaultValue: A,
160
+ defaultValue: N,
161
161
  labelText: P,
162
162
  size: "sm",
163
163
  invalid: e == null ? void 0 : e.previewHours2,
@@ -54,3 +54,4 @@
54
54
  @use 'components/Detail/detail';
55
55
  @use 'patterns/DetailList/detailList';
56
56
  @use 'components/PinchZoom/pinchZoom';
57
+ @use 'components/SeldonImage/seldonImage';
@@ -69,19 +69,19 @@
69
69
  display: flex;
70
70
  height: 8px;
71
71
  justify-content: center;
72
- padding: 0;
72
+ padding: 1px;
73
73
  width: 8px;
74
74
  }
75
75
 
76
76
  &-dot {
77
- border: 1px solid #adadad;
78
77
  border-radius: 50%;
79
78
  height: 100%;
79
+ outline: 1px solid #adadad;
80
80
  width: 100%;
81
81
 
82
82
  &-selected {
83
83
  background-color: #525050;
84
- border-color: #525050;
84
+ outline-color: #525050;
85
85
  }
86
86
  }
87
87
  }