@phillips/seldon 1.183.0 → 1.183.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.
- package/dist/components/Article/Article.js +10 -10
- package/dist/components/Text/Text.js +17 -25
- package/dist/components/Text/utils.js +6 -6
- package/dist/patterns/SaleCard/SaleCardActions.js +9 -9
- package/dist/patterns/ViewingDetails/ViewingDetails.js +23 -16
- package/dist/scss/components/Text/_text.scss +14 -7
- package/dist/scss/patterns/ObjectTile/_objectTile.scss +2 -1
- package/dist/scss/patterns/ViewingDetails/_viewingDetails.scss +6 -0
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as u } from "react";
|
|
3
3
|
import { getCommonProps as h } from "../../utils/index.js";
|
|
4
4
|
import x from "../../node_modules/classnames/index.js";
|
|
5
5
|
import $ from "../SeldonImage/SeldonImage.js";
|
|
6
|
-
import { TextVariants as
|
|
7
|
-
import
|
|
6
|
+
import { TextVariants as l } from "../Text/types.js";
|
|
7
|
+
import n from "../Text/Text.js";
|
|
8
8
|
import "../Link/types.js";
|
|
9
9
|
import v from "../Link/Link.js";
|
|
10
10
|
const b = u(
|
|
11
|
-
({ className:
|
|
11
|
+
({ className: p, imageSrc: r, label: a, header: o, description: m, linkElement: d = v, linkLabel: s, linkHref: f, ...i }, _) => {
|
|
12
12
|
const { className: t, ...N } = h(i, "Article");
|
|
13
|
-
return /* @__PURE__ */ c("article", { ...N, className: x(t,
|
|
14
|
-
|
|
13
|
+
return /* @__PURE__ */ c("article", { ...N, className: x(t, p), ...i, ref: _, children: [
|
|
14
|
+
r ? /* @__PURE__ */ e($, { aspectRatio: "16/9", src: r, alt: "bull" }) : null,
|
|
15
15
|
/* @__PURE__ */ c("div", { className: `${t}__content`, children: [
|
|
16
|
-
|
|
17
|
-
o ? /* @__PURE__ */
|
|
18
|
-
m ? /* @__PURE__ */
|
|
19
|
-
s ? /* @__PURE__ */
|
|
16
|
+
a ? /* @__PURE__ */ e(n, { variant: l.label, className: `${t}__content-label`, children: a }) : null,
|
|
17
|
+
o ? /* @__PURE__ */ e(n, { variant: l.heading3, className: `${t}__content-title`, children: o }) : null,
|
|
18
|
+
m ? /* @__PURE__ */ e(n, { variant: l.body2, className: `${t}__content-description`, element: "p", children: m }) : null,
|
|
19
|
+
s ? /* @__PURE__ */ e(d, { href: f, className: `${t}__content-link`, children: s }) : null
|
|
20
20
|
] })
|
|
21
21
|
] });
|
|
22
22
|
}
|
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import { TextVariants as
|
|
5
|
-
import { determineDefaultTextElement as
|
|
6
|
-
import
|
|
7
|
-
const $ =
|
|
8
|
-
({ children:
|
|
9
|
-
const
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import { getCommonProps as i, px as d } from "../../utils/index.js";
|
|
4
|
+
import { TextVariants as N } from "./types.js";
|
|
5
|
+
import { determineDefaultTextElement as T, determineTextClassName as C } from "./utils.js";
|
|
6
|
+
import u from "../../node_modules/classnames/index.js";
|
|
7
|
+
const $ = c(
|
|
8
|
+
({ children: e, className: a, element: n, variant: m = N.body2, align: o, isSkeletonLoading: l, ...t }, p) => {
|
|
9
|
+
const f = n || T(m), { className: s, ...x } = i(t, "Text");
|
|
10
|
+
return /* @__PURE__ */ r(
|
|
11
|
+
f,
|
|
12
12
|
{
|
|
13
|
-
...
|
|
14
|
-
className:
|
|
15
|
-
[`${
|
|
13
|
+
...x,
|
|
14
|
+
className: u(s, a, C(m), {
|
|
15
|
+
[`${s}--${o}`]: !!o
|
|
16
16
|
}),
|
|
17
|
-
ref:
|
|
18
|
-
...
|
|
19
|
-
children: /* @__PURE__ */
|
|
20
|
-
"span",
|
|
21
|
-
{
|
|
22
|
-
className: r({
|
|
23
|
-
[`${N}-skeleton`]: p
|
|
24
|
-
}),
|
|
25
|
-
children: a
|
|
26
|
-
}
|
|
27
|
-
)
|
|
17
|
+
ref: p,
|
|
18
|
+
...t,
|
|
19
|
+
children: l ? /* @__PURE__ */ r("span", { className: `${d}-skeleton`, children: e }) : e
|
|
28
20
|
}
|
|
29
21
|
);
|
|
30
22
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { px as
|
|
2
|
-
import { TextVariants as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
return e ===
|
|
1
|
+
import { px as n } from "../../utils/index.js";
|
|
2
|
+
import { TextVariants as r } from "./types.js";
|
|
3
|
+
const o = (e = r.body1) => `${n}-text--${e.charAt(0).toLowerCase() + e.slice(1)}`, u = (e = r.body1) => {
|
|
4
|
+
let t = e.toLowerCase();
|
|
5
|
+
return e === r.blockquote ? "blockquote" : e.includes("body") || e.includes("string") || e.includes("title") ? "span" : e === r.label ? "label" : t.includes("heading") ? (t = t.replace("italic", ""), `h${isNaN(parseInt(t.slice(-1))) ? 3 : parseInt(t.slice(-1))}`) : "span";
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
8
|
u as determineDefaultTextElement,
|
|
9
|
-
|
|
9
|
+
o as determineTextClassName
|
|
10
10
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
const
|
|
5
|
-
const { className:
|
|
6
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { getCommonProps as c } from "../../utils/index.js";
|
|
4
|
+
const i = t(({ children: a, ...o }, s) => {
|
|
5
|
+
const { className: r, ...m } = c(o, "SaleCardActions");
|
|
6
|
+
return /* @__PURE__ */ e("div", { className: `${r}__ctas`, ...m, ref: s, children: a });
|
|
7
7
|
});
|
|
8
|
-
|
|
8
|
+
i.displayName = "SaleCardActions";
|
|
9
9
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
i as SaleCardActions,
|
|
11
|
+
i as default
|
|
12
12
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import v from "../../node_modules/classnames/index.js";
|
|
3
3
|
import { forwardRef as b } from "react";
|
|
4
4
|
import "../../components/Link/types.js";
|
|
5
5
|
import g from "../../components/Link/Link.js";
|
|
@@ -10,28 +10,35 @@ const y = b(
|
|
|
10
10
|
({
|
|
11
11
|
className: p,
|
|
12
12
|
children: m,
|
|
13
|
-
label:
|
|
14
|
-
sessionTimesLabel:
|
|
13
|
+
label: s,
|
|
14
|
+
sessionTimesLabel: o,
|
|
15
15
|
sessionTimes: n,
|
|
16
16
|
viewingTimes: t,
|
|
17
17
|
location: c,
|
|
18
18
|
mapLink: d,
|
|
19
19
|
onClose: V,
|
|
20
|
-
linkElement:
|
|
20
|
+
linkElement: N = g,
|
|
21
21
|
...h
|
|
22
|
-
},
|
|
23
|
-
const { className:
|
|
24
|
-
return /* @__PURE__ */ a("div", {
|
|
25
|
-
m && /* @__PURE__ */ a("div", { className: `${
|
|
26
|
-
s && /* @__PURE__ */ a(l, { variant: i.heading4, children: s }),
|
|
27
|
-
n && n.length > 0 && n.map((e) => /* @__PURE__ */ _("div", { children: [
|
|
28
|
-
e.sessionLabel && /* @__PURE__ */ a(l, { variant: i.heading5, className: `${r}__label`, children: e.sessionLabel }),
|
|
29
|
-
e.sessionTime && /* @__PURE__ */ a(l, { variant: i.body2, className: `${r}__text`, children: e.sessionTime })
|
|
30
|
-
] }, `${e.sessionLabel ?? ""}-${e.sessionTime ?? ""}`)),
|
|
22
|
+
}, f) => {
|
|
23
|
+
const { className: e, ...$ } = x(h, "ViewingDetails");
|
|
24
|
+
return /* @__PURE__ */ a("div", { ...$, ...h, className: v(e, p), ref: f, children: /* @__PURE__ */ _("div", { className: `${e}__content`, children: [
|
|
25
|
+
m && /* @__PURE__ */ a("div", { className: `${e}__children`, children: m }),
|
|
31
26
|
o && /* @__PURE__ */ a(l, { variant: i.heading4, children: o }),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
n && n.length > 0 && n.map((r) => /* @__PURE__ */ _(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: `${e}__session`,
|
|
31
|
+
children: [
|
|
32
|
+
r.sessionLabel && /* @__PURE__ */ a(l, { variant: i.heading5, className: `${e}__label`, children: r.sessionLabel }),
|
|
33
|
+
r.sessionTime && /* @__PURE__ */ a(l, { variant: i.body2, className: `${e}__text`, children: r.sessionTime })
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
`${r.sessionLabel ?? ""}-${r.sessionTime ?? ""}`
|
|
37
|
+
)),
|
|
38
|
+
s && /* @__PURE__ */ a(l, { variant: i.heading4, children: s }),
|
|
39
|
+
t && t.length > 0 && t.map((r) => /* @__PURE__ */ a(l, { variant: i.body2, className: `${e}__label`, children: r }, r)),
|
|
40
|
+
c && /* @__PURE__ */ a(l, { variant: i.body2, className: `${e}__location`, children: c }),
|
|
41
|
+
d && /* @__PURE__ */ a(l, { variant: i.body2, className: `${e}__map-link`, children: /* @__PURE__ */ a(N, { href: d, children: "(Map)" }) })
|
|
35
42
|
] }) });
|
|
36
43
|
}
|
|
37
44
|
);
|
|
@@ -22,22 +22,29 @@
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
.#{$px}-text--blockquote,
|
|
26
|
+
.#{$px}-text--heading1,
|
|
27
|
+
.#{$px}-text--snwHeadingHero1,
|
|
28
|
+
.#{$px}-text--snwHeadingHero2 {
|
|
27
29
|
margin-bottom: $spacing-lg;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
.#{$px}-text--heading2 {
|
|
31
33
|
margin-bottom: $spacing-lg;
|
|
32
34
|
}
|
|
33
|
-
|
|
35
|
+
|
|
36
|
+
.#{$px}-text--heading3,
|
|
37
|
+
.#{$px}-text--heading3Italic {
|
|
34
38
|
margin-bottom: $spacing-md;
|
|
35
39
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
|
|
41
|
+
.#{$px}-text--heading4,
|
|
42
|
+
.#{$px}-text--heading4Italic,
|
|
43
|
+
.#{$px}-text--heading5,
|
|
44
|
+
.#{$px}-text--heading6 {
|
|
39
45
|
margin-bottom: $spacing-sm;
|
|
40
46
|
}
|
|
47
|
+
|
|
41
48
|
p.#{$px}-text {
|
|
42
49
|
margin-bottom: $spacing-md;
|
|
43
50
|
}
|
|
@@ -15,9 +15,14 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
&__label {
|
|
18
|
+
display: block;
|
|
18
19
|
margin-bottom: 0;
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
&__session {
|
|
23
|
+
margin-bottom: $spacing-sm;
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
&__close-icon {
|
|
22
27
|
cursor: pointer;
|
|
23
28
|
position: absolute;
|
|
@@ -30,6 +35,7 @@
|
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
&__location {
|
|
38
|
+
display: block;
|
|
33
39
|
margin-bottom: $spacing-xsm;
|
|
34
40
|
margin-top: $spacing-md;
|
|
35
41
|
}
|