@phillips/seldon 1.111.0 → 1.112.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,22 @@
1
+ import { ComponentProps, ElementType } from 'react';
2
+ import { LinkProps } from '../Link';
3
+ export interface ArticleProps extends ComponentProps<'div'> {
4
+ imageSrc?: string;
5
+ label?: string;
6
+ header?: string;
7
+ description?: string;
8
+ linkElement?: ElementType<LinkProps>;
9
+ linkLabel?: string;
10
+ linkHref?: string;
11
+ }
12
+ /**
13
+ * ## Overview
14
+ *
15
+ * Overview of this widget
16
+ *
17
+ * [Figma Link](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?node-id=20704-18000&p=f&m=dev)
18
+ *
19
+ * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-article--overview)
20
+ */
21
+ declare const Article: import('react').ForwardRefExoticComponent<Omit<ArticleProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
22
+ export default Article;
@@ -0,0 +1,27 @@
1
+ import { jsxs as c, jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as u } from "react";
3
+ import { getCommonProps as h } from "../../utils/index.js";
4
+ import x from "../../node_modules/classnames/index.js";
5
+ import $ from "../SeldonImage/SeldonImage.js";
6
+ import { TextVariants as e } from "../Text/types.js";
7
+ import r from "../Text/Text.js";
8
+ import "../Link/types.js";
9
+ import v from "../Link/Link.js";
10
+ const b = u(
11
+ ({ className: d, imageSrc: a, label: n, header: o, description: m, linkElement: f = v, linkLabel: s, linkHref: p, ...i }, _) => {
12
+ const { className: t, ...N } = h(i, "Article");
13
+ return /* @__PURE__ */ c("article", { ...N, className: x(t, d), ...i, ref: _, children: [
14
+ a ? /* @__PURE__ */ l($, { aspectRatio: "16/9", src: a, alt: "bull" }) : null,
15
+ /* @__PURE__ */ c("div", { className: `${t}__content`, children: [
16
+ n ? /* @__PURE__ */ l(r, { variant: e.label, className: `${t}__content-label`, children: n }) : null,
17
+ o ? /* @__PURE__ */ l(r, { variant: e.heading3, className: `${t}__content-title`, children: o }) : null,
18
+ m ? /* @__PURE__ */ l(r, { variant: e.body2, className: `${t}__content-description`, children: m }) : null,
19
+ s ? /* @__PURE__ */ l(f, { href: p, className: `${t}__content-link`, children: s }) : null
20
+ ] })
21
+ ] });
22
+ }
23
+ );
24
+ b.displayName = "Article";
25
+ export {
26
+ b as default
27
+ };
@@ -0,0 +1,18 @@
1
+ import { ArticleProps } from './Article';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').ForwardRefExoticComponent<Omit<ArticleProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
5
+ };
6
+ export default meta;
7
+ export declare const Playground: {
8
+ (props: ArticleProps): import("react/jsx-runtime").JSX.Element;
9
+ args: {
10
+ imageSrc: string;
11
+ label: string;
12
+ header: string;
13
+ description: string;
14
+ linkLabel: string;
15
+ linkHref: string;
16
+ };
17
+ argTypes: {};
18
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { default as Article, type ArticleProps } from './Article';
package/dist/index.d.ts CHANGED
@@ -65,3 +65,4 @@ export * from './components/Countdown';
65
65
  export * from './components/Countdown/types';
66
66
  export * from './patterns/ObjectTile';
67
67
  export * from './patterns/BidSnapshot';
68
+ export * from './components/Article';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { PaddingTokens as f, SpacingTokens as s, defaultYear as l, emailValidation as d, encodeURLSearchParams as m, findChildrenExcludingTypes as p, findChildrenOfType as u, generatePaddingClassName as x, getCommonProps as n, noOp as i, px as g, useNormalizedInputProps as c } from "./utils/index.js";
1
+ import { PaddingTokens as f, SpacingTokens as s, defaultYear as l, emailValidation as d, encodeURLSearchParams as m, findChildrenExcludingTypes as p, findChildrenOfType as u, generatePaddingClassName as x, getCommonProps as i, noOp as n, px as g, useNormalizedInputProps as c } from "./utils/index.js";
2
2
  import { default as S } from "./assets/account_circle.svg.js";
3
3
  import { default as L } from "./assets/arrowPrev.svg.js";
4
4
  import { default as T } from "./assets/calendar.svg.js";
@@ -25,7 +25,7 @@ import "react";
25
25
  import { default as de } from "./assets/share.svg.js";
26
26
  import { default as pe } from "./assets/spotify.svg.js";
27
27
  import { default as xe } from "./assets/wechat.svg.js";
28
- import { default as ie } from "./assets/youtube.svg.js";
28
+ import { default as ne } from "./assets/youtube.svg.js";
29
29
  import { default as ce } from "./assets/icon-green-circle.svg.js";
30
30
  import { default as Se } from "./assets/icon-red-circle.svg.js";
31
31
  import { default as Le } from "./pages/Page.js";
@@ -50,7 +50,7 @@ import { LinkVariants as ft } from "./components/Link/types.js";
50
50
  import { default as lt } from "./components/LinkBlock/LinkBlock.js";
51
51
  import { default as mt } from "./components/LinkList/LinkList.js";
52
52
  import { default as ut } from "./components/Row/Row.js";
53
- import { default as nt } from "./components/GridItem/GridItem.js";
53
+ import { default as it } from "./components/GridItem/GridItem.js";
54
54
  import { GridItemAlign as gt } from "./components/GridItem/types.js";
55
55
  import { default as Ct } from "./components/Search/Search.js";
56
56
  import { default as ht } from "./components/Select/Select.js";
@@ -77,7 +77,7 @@ import { AuthState as mo } from "./patterns/UserManagement/types.js";
77
77
  import { default as uo } from "./components/Breadcrumb/Breadcrumb.js";
78
78
  import "react/jsx-runtime";
79
79
  import "./node_modules/classnames/index.js";
80
- import { default as no } from "./components/Dropdown/Dropdown.js";
80
+ import { default as io } from "./components/Dropdown/Dropdown.js";
81
81
  import { default as go } from "./components/Video/Video.js";
82
82
  import { default as Co } from "./patterns/LanguageSelector/LanguageSelector.js";
83
83
  import { default as ho } from "./components/ContentPeek/ContentPeek.js";
@@ -104,12 +104,13 @@ import { default as fr } from "./patterns/FilterMenu/FilterMenu.js";
104
104
  import { default as lr } from "./components/Filter/Filter.js";
105
105
  import { default as mr } from "./components/Filter/FilterInput.js";
106
106
  import { default as ur } from "./components/Filter/FilterHeader.js";
107
- import { default as nr } from "./components/Countdown/Countdown.js";
107
+ import { default as ir } from "./components/Countdown/Countdown.js";
108
108
  import { CountdownVariants as gr } from "./components/Countdown/types.js";
109
109
  import { default as Cr } from "./patterns/ObjectTile/ObjectTile.js";
110
110
  import { default as hr } from "./patterns/BidSnapshot/BidSnapshot.js";
111
111
  import { default as Pr } from "./patterns/BidSnapshot/BidMessage.js";
112
112
  import { BidMessageVariants as Ir, BidStatusEnum as br } from "./patterns/BidSnapshot/types.js";
113
+ import { default as Ar } from "./components/Article/Article.js";
113
114
  export {
114
115
  $t as Accordion,
115
116
  to as AccordionItem,
@@ -117,6 +118,7 @@ export {
117
118
  ao as AccordionVariants,
118
119
  S as AccountCircle,
119
120
  L as ArrowPrev,
121
+ Ar as Article,
120
122
  Be as AuctionStatus,
121
123
  mo as AuthState,
122
124
  Pr as BidMessage,
@@ -142,13 +144,13 @@ export {
142
144
  Bo as CollapsibleTrigger,
143
145
  ho as ContentPeek,
144
146
  Po as ContentPeekHeightUnits,
145
- nr as Countdown,
147
+ ir as Countdown,
146
148
  gr as CountdownVariants,
147
149
  Eo as Detail,
148
150
  Qo as DetailList,
149
151
  jo as DetailListAlignment,
150
152
  Ht as Drawer,
151
- no as Dropdown,
153
+ io as Dropdown,
152
154
  Re as ErrorBoundary,
153
155
  U as Facebook,
154
156
  N as Favorite,
@@ -162,7 +164,7 @@ export {
162
164
  q as FooterWeChat,
163
165
  ce as GreenCircle,
164
166
  Ee as Grid,
165
- nt as GridItem,
167
+ it as GridItem,
166
168
  gt as GridItemAlign,
167
169
  Qe as Header,
168
170
  $e as HeroBanner,
@@ -225,15 +227,15 @@ export {
225
227
  go as Video,
226
228
  Ft as ViewingsList,
227
229
  xe as WeChat,
228
- ie as Youtube,
230
+ ne as Youtube,
229
231
  l as defaultYear,
230
232
  d as emailValidation,
231
233
  m as encodeURLSearchParams,
232
234
  p as findChildrenExcludingTypes,
233
235
  u as findChildrenOfType,
234
236
  x as generatePaddingClassName,
235
- n as getCommonProps,
236
- i as noOp,
237
+ i as getCommonProps,
238
+ n as noOp,
237
239
  g as px,
238
240
  ke as ssrMediaQueryStyle,
239
241
  c as useNormalizedInputProps,
@@ -1,4 +1,4 @@
1
- import { __module as t } from "../../_virtual/index5.js";
1
+ import { __module as t } from "../../_virtual/index6.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/index6.js";
1
+ import { __module as e } from "../../../../_virtual/index5.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;
@@ -64,6 +64,10 @@ export interface SaleHeaderBannerProps extends ComponentProps<'div'> {
64
64
  * An element to be rendered at the bottom of the banner
65
65
  */
66
66
  footerElement?: React.ReactNode;
67
+ /**
68
+ * Determines if the countdown timer should be shown (if relevant)
69
+ */
70
+ showTimer: boolean;
67
71
  /**
68
72
  * What action does the CTA take?
69
73
  */
@@ -1,73 +1,75 @@
1
- import { jsxs as o, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as j } from "react";
3
- import { getCommonProps as H } from "../../utils/index.js";
4
- import y from "../../node_modules/classnames/index.js";
5
- import p from "../../components/Countdown/Countdown.js";
1
+ import { jsxs as n, jsx as a } from "react/jsx-runtime";
2
+ import { forwardRef as H } from "react";
3
+ import { getCommonProps as M } from "../../utils/index.js";
4
+ import R from "../../node_modules/classnames/index.js";
5
+ import h from "../../components/Countdown/Countdown.js";
6
6
  import D from "../../components/SeldonImage/SeldonImage.js";
7
7
  import { AuctionStatus as F } from "../../types/commonTypes.js";
8
8
  import { TextVariants as r } from "../../components/Text/types.js";
9
9
  import t from "../../components/Text/Text.js";
10
- import R from "../../components/PageContentWrapper/PageContentWrapper.js";
11
- const z = j(
10
+ import O from "../../components/PageContentWrapper/PageContentWrapper.js";
11
+ import { SSRMediaQuery as f } from "../../providers/SeldonProvider/utils.js";
12
+ const q = H(
12
13
  ({
13
- auctionEndTime: s,
14
- auctionTitle: i,
15
- imageSrcUrl: f,
16
- imageSrcSet: h,
17
- imageSizes: v,
18
- imageLoading: N,
19
- imageFetchPriority: g,
20
- location: u,
21
- countdownTimerLabel: S,
22
- countdownFormatDuration: $,
23
- auctionState: w,
14
+ auctionEndTime: i,
15
+ auctionTitle: o,
16
+ imageSrcUrl: g,
17
+ imageSrcSet: v,
18
+ imageSizes: N,
19
+ imageLoading: u,
20
+ imageFetchPriority: S,
21
+ location: $,
22
+ countdownTimerLabel: w,
23
+ countdownFormatDuration: x,
24
+ auctionState: B,
24
25
  occurrenceInformation: k,
25
- onClick: A,
26
- children: x,
27
- className: B,
26
+ onClick: z,
27
+ children: C,
28
+ className: P,
28
29
  footerElement: b,
29
- headerLabel: C,
30
- ...n
31
- }, c) => {
32
- const { className: e, ...l } = H(n, "SaleHeaderBanner"), m = w === F.live, d = {
33
- endDateTime: s,
34
- label: S,
35
- formatDurationStr: $
30
+ headerLabel: j,
31
+ showTimer: c,
32
+ ...s
33
+ }, l) => {
34
+ const { className: e, ...m } = M(s, "SaleHeaderBanner"), d = B === F.live, _ = {
35
+ endDateTime: i,
36
+ label: w,
37
+ formatDurationStr: x
36
38
  };
37
- return /* @__PURE__ */ o("div", { ...l, className: y(e, B), ...n, ref: c, children: [
38
- m && s ? /* @__PURE__ */ a("div", { className: `${e}__stack__mobile-countdown`, children: /* @__PURE__ */ a(p, { ...d, showBottomBorder: !1 }) }) : null,
39
+ return /* @__PURE__ */ n("div", { ...m, className: R(e, P), ...s, ref: l, children: [
40
+ d && i && c ? /* @__PURE__ */ a(f.Media, { lessThan: "md", children: /* @__PURE__ */ a("div", { className: `${e}__stack__countdown`, children: /* @__PURE__ */ a(h, { ..._, showBottomBorder: !1 }) }) }) : null,
39
41
  /* @__PURE__ */ a(
40
42
  D,
41
43
  {
42
44
  aspectRatio: "16/9",
43
- src: f,
44
- alt: String(i),
45
+ src: g,
46
+ alt: String(o),
45
47
  objectFit: "cover",
46
48
  className: `${e}__image`,
47
- srcSet: h,
48
- sizes: v,
49
- loading: N,
50
- fetchPriority: g
49
+ srcSet: v,
50
+ sizes: N,
51
+ loading: u,
52
+ fetchPriority: S
51
53
  }
52
54
  ),
53
- /* @__PURE__ */ a(R, { className: `${e}__stack-wrapper`, ...l, ...n, ref: c, children: /* @__PURE__ */ o("div", { className: `${e}__stack`, children: [
54
- m && s ? /* @__PURE__ */ a("div", { className: `${e}__stack__desktop-countdown`, children: /* @__PURE__ */ a(p, { ...d }) }) : null,
55
- /* @__PURE__ */ a(t, { variant: r.badge, children: C }),
56
- /* @__PURE__ */ a(t, { variant: r.title1, children: i }),
57
- /* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__location`, children: u }),
58
- /* @__PURE__ */ o("div", { className: `${e}__occurrence-details`, children: [
59
- k.map(({ date: _, occurrenceLabel: P }) => /* @__PURE__ */ o("div", { className: `${e}__occurrence-details-text`, children: [
60
- /* @__PURE__ */ a(t, { variant: r.string2, children: P }),
61
- /* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__date`, children: _ })
62
- ] }, String(_))),
63
- x
55
+ /* @__PURE__ */ a(O, { className: `${e}__stack-wrapper`, ...m, ...s, ref: l, children: /* @__PURE__ */ n("div", { className: `${e}__stack`, children: [
56
+ d && i && c ? /* @__PURE__ */ a(f.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ a("div", { className: `${e}__stack__countdown`, children: /* @__PURE__ */ a(h, { ..._ }) }) }) : null,
57
+ /* @__PURE__ */ a(t, { variant: r.badge, children: j }),
58
+ /* @__PURE__ */ a(t, { variant: r.title1, children: o }),
59
+ /* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__location`, children: $ }),
60
+ /* @__PURE__ */ n("div", { className: `${e}__occurrence-details`, children: [
61
+ k.map(({ date: p, occurrenceLabel: y }) => /* @__PURE__ */ n("div", { className: `${e}__occurrence-details-text`, children: [
62
+ /* @__PURE__ */ a(t, { variant: r.string2, children: y }),
63
+ /* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__date`, children: p })
64
+ ] }, String(p))),
65
+ C
64
66
  ] }),
65
67
  b
66
68
  ] }) })
67
69
  ] });
68
70
  }
69
71
  );
70
- z.displayName = "SaleHeaderBanner";
72
+ q.displayName = "SaleHeaderBanner";
71
73
  export {
72
- z as default
74
+ q as default
73
75
  };
@@ -62,3 +62,4 @@
62
62
  // Site Furniture
63
63
  @use 'site-furniture/Header/header';
64
64
  @use 'site-furniture/Footer/footer';
65
+ @use 'components/Article/article';
@@ -0,0 +1,29 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-article {
4
+ border-bottom: 1px solid $pure-black;
5
+ border-top: 1px solid $pure-black;
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: $spacing-md;
9
+ padding: $spacing-md;
10
+
11
+ @media (min-width: $breakpoint-md) {
12
+ flex-direction: row;
13
+ }
14
+
15
+ &__content {
16
+ display: flex;
17
+ flex-direction: column;
18
+ justify-content: center;
19
+
20
+ &-label,
21
+ &-description {
22
+ color: $soft-black;
23
+ }
24
+
25
+ &-label {
26
+ margin-bottom: $spacing-xsm;
27
+ }
28
+ }
29
+ }
@@ -22,22 +22,9 @@
22
22
  justify-content: center;
23
23
  padding: $spacing-md 0;
24
24
 
25
- &__mobile-countdown {
25
+ &__countdown {
26
26
  display: flex;
27
27
  width: 100%;
28
-
29
- @include media($size-md, $type: 'min') {
30
- display: none;
31
- }
32
- }
33
-
34
- &__desktop-countdown {
35
- display: none;
36
- width: 100%;
37
-
38
- @include media($size-md, $type: 'min') {
39
- display: flex;
40
- }
41
28
  }
42
29
  }
43
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.111.0",
3
+ "version": "1.112.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"