@phillips/seldon 1.105.1 → 1.106.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Text/Text.d.ts +6 -2
- package/dist/components/Text/Text.js +21 -14
- package/dist/components/Text/Text.stories.d.ts +14 -2
- package/dist/components/Text/types.d.ts +5 -0
- package/dist/components/Text/types.js +2 -1
- package/dist/patterns/ObjectTile/ObjectTile.d.ts +4 -0
- package/dist/patterns/ObjectTile/ObjectTile.js +65 -64
- package/dist/scss/components/GridItem/_gridItem.scss +0 -2
- package/dist/scss/components/Text/_text.scss +12 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { TextVariants } from './types';
|
|
2
|
+
import { TextAlignments, TextVariants } from './types';
|
|
3
3
|
export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
4
|
/**
|
|
5
5
|
* Optional element to render as the top-level component e.g. 'div', 'span', CustomComponent, etc. Defaults to the appropriate HTML based on the variant.
|
|
@@ -9,6 +9,10 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
9
9
|
* The OOTB style to apply to the text
|
|
10
10
|
*/
|
|
11
11
|
variant?: TextVariants;
|
|
12
|
+
/**
|
|
13
|
+
* The alignment of the text
|
|
14
|
+
*/
|
|
15
|
+
align?: TextAlignments;
|
|
12
16
|
}
|
|
13
17
|
/**
|
|
14
18
|
* ## Overview
|
|
@@ -19,5 +23,5 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
19
23
|
*
|
|
20
24
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-text--overview)
|
|
21
25
|
*/
|
|
22
|
-
declare const Text: ({ children, className, element: CustomElement, variant, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare const Text: ({ children, className, element: CustomElement, variant, align, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
27
|
export default Text;
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { getCommonProps as
|
|
3
|
-
import { TextVariants as
|
|
4
|
-
import { determineDefaultTextElement as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { getCommonProps as i } from "../../utils/index.js";
|
|
3
|
+
import { TextVariants as x, TextAlignments as c } from "./types.js";
|
|
4
|
+
import { determineDefaultTextElement as p, determineTextClassName as T } from "./utils.js";
|
|
5
|
+
import d from "../../node_modules/classnames/index.js";
|
|
6
|
+
const P = ({
|
|
7
|
+
children: o,
|
|
8
|
+
className: s,
|
|
9
|
+
element: r,
|
|
10
|
+
variant: e = x.body2,
|
|
11
|
+
align: n = c.left,
|
|
12
|
+
...t
|
|
13
|
+
}) => {
|
|
14
|
+
const a = r || p(e), { className: m, ...l } = i(t, "Text");
|
|
15
|
+
return /* @__PURE__ */ f(
|
|
16
|
+
a,
|
|
10
17
|
{
|
|
11
|
-
...
|
|
12
|
-
className:
|
|
13
|
-
...
|
|
14
|
-
children:
|
|
18
|
+
...l,
|
|
19
|
+
className: d(m, s, T(e), `${m}--${n}`),
|
|
20
|
+
...t,
|
|
21
|
+
children: o
|
|
15
22
|
}
|
|
16
23
|
);
|
|
17
24
|
};
|
|
18
25
|
export {
|
|
19
|
-
|
|
26
|
+
P as default
|
|
20
27
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TextProps } from './Text';
|
|
2
|
-
import { TextVariants } from './types';
|
|
2
|
+
import { TextAlignments, TextVariants } from './types';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ children, className, element: CustomElement, variant, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ children, className, element: CustomElement, variant, align, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
8
8
|
export declare const Playground: {
|
|
@@ -17,6 +17,12 @@ export declare const Playground: {
|
|
|
17
17
|
type: string;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
+
align: {
|
|
21
|
+
options: typeof TextAlignments;
|
|
22
|
+
control: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
20
26
|
};
|
|
21
27
|
};
|
|
22
28
|
export declare const SuperScript: {
|
|
@@ -32,5 +38,11 @@ export declare const SuperScript: {
|
|
|
32
38
|
type: string;
|
|
33
39
|
};
|
|
34
40
|
};
|
|
41
|
+
align: {
|
|
42
|
+
options: typeof TextAlignments;
|
|
43
|
+
control: {
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
35
47
|
};
|
|
36
48
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
var g = /* @__PURE__ */ ((d) => (d.blockquote = "blockquote", d.heading1 = "heading1", d.heading2 = "heading2", d.heading3 = "heading3", d.heading4 = "heading4", d.heading5 = "heading5", d.title1 = "title1", d.title2 = "title2", d.title3 = "title3", d.title4 = "title4", d.body1 = "body1", d.body2 = "body2", d.body3 = "body3", d.string1 = "string1", d.string2 = "string2", d.string3 = "string3", d.button = "button", d.email = "email", d.label = "label", d.link = "link", d.badge = "badge", d.snwFlyoutLink = "snwFlyoutLink", d.snwHeaderLink = "snwHeaderLink", d.snwHeadingHero1 = "snwHeadingHero1", d.snwHeadingHero2 = "snwHeadingHero2", d))(g || {});
|
|
1
|
+
var g = /* @__PURE__ */ ((d) => (d.blockquote = "blockquote", d.heading1 = "heading1", d.heading2 = "heading2", d.heading3 = "heading3", d.heading4 = "heading4", d.heading5 = "heading5", d.title1 = "title1", d.title2 = "title2", d.title3 = "title3", d.title4 = "title4", d.body1 = "body1", d.body2 = "body2", d.body3 = "body3", d.string1 = "string1", d.string2 = "string2", d.string3 = "string3", d.button = "button", d.email = "email", d.label = "label", d.link = "link", d.badge = "badge", d.snwFlyoutLink = "snwFlyoutLink", d.snwHeaderLink = "snwHeaderLink", d.snwHeadingHero1 = "snwHeadingHero1", d.snwHeadingHero2 = "snwHeadingHero2", d))(g || {}), l = /* @__PURE__ */ ((d) => (d.left = "left", d.center = "center", d.right = "right", d))(l || {});
|
|
2
2
|
export {
|
|
3
|
+
l as TextAlignments,
|
|
3
4
|
g as TextVariants
|
|
4
5
|
};
|
|
@@ -16,6 +16,10 @@ export interface ObjectTileProps extends ComponentProps<'a'> {
|
|
|
16
16
|
* Estimate label text.
|
|
17
17
|
*/
|
|
18
18
|
estimateLabelText?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Estimate on request text to use when estimate is not available.
|
|
21
|
+
*/
|
|
22
|
+
estimateOnRequestText?: string;
|
|
19
23
|
/**
|
|
20
24
|
* Element used for favoriting object
|
|
21
25
|
*/
|
|
@@ -1,104 +1,105 @@
|
|
|
1
|
-
import { jsxs as s, jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import { getCommonProps as
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { memo as z, forwardRef as B } from "react";
|
|
3
|
+
import F from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { getCommonProps as I } from "../../utils/index.js";
|
|
5
5
|
import { TextVariants as l } from "../../components/Text/types.js";
|
|
6
6
|
import i from "../../components/Text/Text.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
|
|
7
|
+
import L from "../DetailList/DetailList.js";
|
|
8
|
+
import R from "../../components/Detail/Detail.js";
|
|
9
|
+
import V from "../../components/SeldonImage/SeldonImage.js";
|
|
10
|
+
const W = z(
|
|
11
|
+
B(
|
|
12
12
|
({
|
|
13
|
-
badgeText:
|
|
14
|
-
className:
|
|
15
|
-
children:
|
|
13
|
+
badgeText: f,
|
|
14
|
+
className: $,
|
|
15
|
+
children: N,
|
|
16
16
|
element: r,
|
|
17
|
-
estimate:
|
|
18
|
-
estimateLabelText:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
17
|
+
estimate: n,
|
|
18
|
+
estimateLabelText: g = "Estimate",
|
|
19
|
+
estimateOnRequestText: o,
|
|
20
|
+
favoriteElement: t,
|
|
21
|
+
imageAlt: u = "Brought to you by Phillips",
|
|
22
|
+
imageUrl: b = "",
|
|
23
|
+
imageSrcSet: v,
|
|
24
|
+
imageSizes: j,
|
|
25
|
+
imageLoading: k,
|
|
26
|
+
imageFetchPriority: y,
|
|
27
|
+
lotNumber: P,
|
|
28
|
+
makerText: c,
|
|
29
|
+
modelText: _,
|
|
30
|
+
referenceNumber: d,
|
|
31
|
+
titleText: h,
|
|
32
|
+
withdrawnText: m,
|
|
33
|
+
...p
|
|
34
|
+
}, S) => {
|
|
35
|
+
const { className: a, ...C } = I(p, "ObjectTile"), x = r != null ? r : "a", D = n || o;
|
|
36
|
+
return /* @__PURE__ */ s(x, { ...C, className: F(a, $), ...p, ref: S, children: [
|
|
37
|
+
/* @__PURE__ */ e(
|
|
38
|
+
V,
|
|
38
39
|
{
|
|
39
|
-
alt:
|
|
40
|
+
alt: u,
|
|
40
41
|
aspectRatio: "1/1",
|
|
41
|
-
className: `${
|
|
42
|
+
className: `${a}__img`,
|
|
42
43
|
objectFit: "cover",
|
|
43
|
-
src:
|
|
44
|
-
srcSet:
|
|
45
|
-
sizes:
|
|
46
|
-
loading:
|
|
47
|
-
fetchPriority:
|
|
44
|
+
src: b,
|
|
45
|
+
srcSet: v,
|
|
46
|
+
sizes: j,
|
|
47
|
+
loading: k,
|
|
48
|
+
fetchPriority: y
|
|
48
49
|
}
|
|
49
50
|
),
|
|
50
|
-
|
|
51
|
-
/* @__PURE__ */ s("div", { className: `${
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
51
|
+
m ? null : /* @__PURE__ */ e(i, { className: `${a}__badge`, variant: l.badge, children: f }),
|
|
52
|
+
/* @__PURE__ */ s("div", { className: `${a}__lot-number-like`, children: [
|
|
53
|
+
/* @__PURE__ */ e(i, { className: `${a}__lot-number`, variant: l.heading3, element: "p", children: P }),
|
|
54
|
+
t && /* @__PURE__ */ e(t, {})
|
|
54
55
|
] }),
|
|
55
|
-
|
|
56
|
-
/* @__PURE__ */ s("div", { className: `${
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
m ? /* @__PURE__ */ e(i, { className: `${a}__withdrawn`, variant: l.heading4, children: m }) : /* @__PURE__ */ s(O, { children: [
|
|
57
|
+
/* @__PURE__ */ s("div", { className: `${a}__meta`, children: [
|
|
58
|
+
c ? /* @__PURE__ */ e(i, { className: `${a}__maker`, variant: l.heading3, children: c }) : null,
|
|
59
|
+
h ? /* @__PURE__ */ e(
|
|
59
60
|
i,
|
|
60
61
|
{
|
|
61
|
-
className: `${
|
|
62
|
+
className: `${a}__title ${a}__token-fix`,
|
|
62
63
|
variant: l.heading4,
|
|
63
64
|
element: "cite",
|
|
64
|
-
children:
|
|
65
|
+
children: h
|
|
65
66
|
}
|
|
66
67
|
) : null,
|
|
67
|
-
|
|
68
|
+
d ? /* @__PURE__ */ e(
|
|
68
69
|
i,
|
|
69
70
|
{
|
|
70
|
-
className: `${
|
|
71
|
+
className: `${a}__reference-number ${a}__token-fix`,
|
|
71
72
|
variant: l.heading4,
|
|
72
73
|
element: "p",
|
|
73
|
-
children:
|
|
74
|
+
children: d
|
|
74
75
|
}
|
|
75
76
|
) : null,
|
|
76
|
-
|
|
77
|
+
_ ? /* @__PURE__ */ e(
|
|
77
78
|
i,
|
|
78
79
|
{
|
|
79
|
-
className: `${
|
|
80
|
+
className: `${a}__model ${a}__token-fix`,
|
|
80
81
|
variant: l.heading4,
|
|
81
82
|
element: "p",
|
|
82
|
-
children:
|
|
83
|
+
children: _
|
|
83
84
|
}
|
|
84
85
|
) : null
|
|
85
86
|
] }),
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
D ? /* @__PURE__ */ e(L, { hasSeparators: !0, className: `${a}__estimate ${a}__section`, children: /* @__PURE__ */ e(
|
|
88
|
+
R,
|
|
88
89
|
{
|
|
89
|
-
className: `${
|
|
90
|
-
label:
|
|
91
|
-
value:
|
|
90
|
+
className: `${a}__estimate__label`,
|
|
91
|
+
label: g,
|
|
92
|
+
value: n || o,
|
|
92
93
|
hasWrap: !1
|
|
93
94
|
}
|
|
94
95
|
) }) : null,
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ e("div", { className: `${a}__section`, children: N })
|
|
96
97
|
] })
|
|
97
98
|
] });
|
|
98
99
|
}
|
|
99
100
|
)
|
|
100
101
|
);
|
|
101
|
-
|
|
102
|
+
W.displayName = "ObjectTile";
|
|
102
103
|
export {
|
|
103
|
-
|
|
104
|
+
W as default
|
|
104
105
|
};
|
|
@@ -11,13 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
&-align-center {
|
|
13
13
|
grid-column: math.ceil(math.div($total-cols + 1 - $span, 2)) / span #{$span};
|
|
14
|
-
text-align: center;
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
.#{$px}-grid-item {
|
|
19
18
|
justify-self: center;
|
|
20
|
-
text-align: center;
|
|
21
19
|
width: 100%;
|
|
22
20
|
|
|
23
21
|
@for $i from 1 through 2 {
|