@phillips/seldon 1.75.4 → 1.76.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 @@
1
+ export { default as PageContentWrapper, type PageContentWrapperProps } from './PageContentWrapper';
package/dist/index.d.ts CHANGED
@@ -50,3 +50,4 @@ export * from './components/Detail';
50
50
  export * from './patterns/DetailList';
51
51
  export * from './components/PinchZoom';
52
52
  export * from './components/SeldonImage';
53
+ export * from './patterns/SaleHeaderBanner';
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { PaddingTokens as f, SpacingTokens as l, defaultYear as m, emailValidation as p, encodeURLSearchParams as s, findChildrenExcludingTypes as d, findChildrenOfType as i, generatePaddingClassName as u, getCommonProps as x, noOp as n, px as g, useNormalizedInputProps as c } from "./utils/index.js";
1
+ import { PaddingTokens as f, SpacingTokens as l, defaultYear as m, emailValidation as s, encodeURLSearchParams as p, findChildrenExcludingTypes as d, findChildrenOfType as u, generatePaddingClassName as n, getCommonProps as i, noOp as x, px as g, useNormalizedInputProps as c } from "./utils/index.js";
2
2
  import { default as C } from "./pages/Page.js";
3
3
  import { default as P } from "./components/Button/Button.js";
4
4
  import { ButtonVariants as T } from "./components/Button/types.js";
5
5
  import { default as b } from "./components/IconButton/IconButton.js";
6
- import { default as A } from "./components/ErrorBoundary/ErrorBoundary.js";
7
- import { default as h } from "./site-furniture/Footer/Footer.js";
8
- import { Grid as N } from "./components/Grid/Grid.js";
9
- import { default as w } from "./site-furniture/Header/Header.js";
10
- import { default as G } from "./components/Navigation/Navigation.js";
11
- import { default as H } from "./components/Navigation/NavigationItem/NavigationItem.js";
6
+ import { default as B } from "./components/ErrorBoundary/ErrorBoundary.js";
7
+ import { default as w } from "./site-furniture/Footer/Footer.js";
8
+ import { Grid as D } from "./components/Grid/Grid.js";
9
+ import { default as v } from "./site-furniture/Header/Header.js";
10
+ import { default as H } from "./components/Navigation/Navigation.js";
11
+ import { default as E } from "./components/Navigation/NavigationItem/NavigationItem.js";
12
12
  import { default as O } from "./components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
13
13
  import { default as U } from "./components/Navigation/NavigationList/NavigationList.js";
14
14
  import { default as F } from "./patterns/HeroBanner/HeroBanner.js";
@@ -18,24 +18,24 @@ import { LinkVariants as J } from "./components/Link/types.js";
18
18
  import { default as Q } from "./components/LinkBlock/LinkBlock.js";
19
19
  import { default as _ } from "./components/LinkList/LinkList.js";
20
20
  import { default as ee } from "./components/Row/Row.js";
21
- import { default as te } from "./components/GridItem/GridItem.js";
21
+ import { default as re } from "./components/GridItem/GridItem.js";
22
22
  import { GridItemAlign as ae } from "./components/GridItem/types.js";
23
23
  import { default as le } from "./components/Search/Search.js";
24
- import { default as pe } from "./components/Select/Select.js";
24
+ import { default as se } from "./components/Select/Select.js";
25
25
  import { default as de } from "./components/SplitPanel/SplitPanel.js";
26
- import { default as ue } from "./patterns/Subscribe/Subscribe.js";
27
- import { SubscriptionState as ne } from "./patterns/Subscribe/types.js";
26
+ import { default as ne } from "./patterns/Subscribe/Subscribe.js";
27
+ import { SubscriptionState as xe } from "./patterns/Subscribe/types.js";
28
28
  import { default as ce } from "./patterns/Social/Social.js";
29
29
  import { default as Ce } from "./patterns/ViewingsList/ViewingsList.js";
30
30
  import { default as Pe } from "./components/Modal/Modal.js";
31
31
  import { default as Te } from "./components/Drawer/Drawer.js";
32
32
  import { default as be } from "./components/Pagination/Pagination.js";
33
- import { default as Ae } from "./patterns/ViewingsList/StatefulViewingsList.js";
34
- import { TextVariants as he } from "./components/Text/types.js";
35
- import { default as Ne } from "./components/Text/Text.js";
36
- import { TextSymbolVariants as we } from "./components/TextSymbol/types.js";
37
- import { default as Ge } from "./components/TextSymbol/TextSymbol.js";
38
- import { default as He } from "./components/Accordion/Accordion.js";
33
+ import { default as Be } from "./patterns/ViewingsList/StatefulViewingsList.js";
34
+ import { TextVariants as we } from "./components/Text/types.js";
35
+ import { default as De } from "./components/Text/Text.js";
36
+ import { TextSymbolVariants as ve } from "./components/TextSymbol/types.js";
37
+ import { default as He } from "./components/TextSymbol/TextSymbol.js";
38
+ import { default as Ee } from "./components/Accordion/Accordion.js";
39
39
  import { default as Oe } from "./components/Accordion/AccordionItem.js";
40
40
  import { AccordionItemVariant as Ue, AccordionVariants as ze } from "./components/Accordion/types.js";
41
41
  import { default as We } from "./patterns/UserManagement/UserManagement.js";
@@ -48,26 +48,31 @@ import "react";
48
48
  import { default as Xe } from "./components/Dropdown/Dropdown.js";
49
49
  import { default as $e } from "./components/Video/Video.js";
50
50
  import { default as oo } from "./patterns/LanguageSelector/LanguageSelector.js";
51
- import { default as ro } from "./components/ContentPeek/ContentPeek.js";
51
+ import { default as to } from "./components/ContentPeek/ContentPeek.js";
52
52
  import { default as fo } from "./components/Collapsible/Collapsible.js";
53
53
  import { default as mo } from "./components/Collapsible/CollapsibleContent.js";
54
- import { default as so } from "./components/Collapsible/CollapsibleTrigger.js";
55
- import { SeldonProvider as uo } from "./providers/SeldonProvider/SeldonProvider.js";
56
- import { default as no } from "./components/PageContentWrapper/PageContentWrapper.js";
54
+ import { default as po } from "./components/Collapsible/CollapsibleTrigger.js";
55
+ import { SeldonProvider as no } from "./providers/SeldonProvider/SeldonProvider.js";
56
+ import { default as xo } from "./components/PageContentWrapper/PageContentWrapper.js";
57
57
  import { default as co } from "./components/Carousel/Carousel.js";
58
58
  import { default as Co } from "./components/Carousel/CarouselContent.js";
59
59
  import { default as Po } from "./components/Carousel/CarouselItem.js";
60
60
  import { default as To } from "./components/Carousel/CarouselDots.js";
61
61
  import { default as bo } from "./components/Detail/Detail.js";
62
- import { default as Ao } from "./patterns/DetailList/DetailList.js";
63
- import { DetailListAlignment as ho } from "./patterns/DetailList/types.js";
64
- import { default as No } from "./components/PinchZoom/PinchZoom.js";
65
- import { default as wo } from "./components/SeldonImage/SeldonImage.js";
62
+ import { default as Bo } from "./patterns/DetailList/DetailList.js";
63
+ import { DetailListAlignment as wo } from "./patterns/DetailList/types.js";
64
+ import { default as Do } from "./components/PinchZoom/PinchZoom.js";
65
+ import { default as vo } from "./components/SeldonImage/SeldonImage.js";
66
+ import { default as Ho } from "./patterns/SaleHeaderBanner/SaleHeaderBanner.js";
67
+ import { default as Eo } from "./patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js";
68
+ import { default as Oo } from "./patterns/SaleHeaderBanner/SaleHeaderCountdown.js";
69
+ import { AuctionState as Uo } from "./patterns/SaleHeaderBanner/types.js";
66
70
  export {
67
- He as Accordion,
71
+ Ee as Accordion,
68
72
  Oe as AccordionItem,
69
73
  Ue as AccordionItemVariant,
70
74
  ze as AccordionVariants,
75
+ Uo as AuctionState,
71
76
  Ze as AuthState,
72
77
  Ke as Breadcrumb,
73
78
  P as Button,
@@ -78,19 +83,19 @@ export {
78
83
  Po as CarouselItem,
79
84
  fo as Collapsible,
80
85
  mo as CollapsibleContent,
81
- so as CollapsibleTrigger,
82
- ro as ContentPeek,
86
+ po as CollapsibleTrigger,
87
+ to as ContentPeek,
83
88
  bo as Detail,
84
- Ao as DetailList,
85
- ho as DetailListAlignment,
89
+ Bo as DetailList,
90
+ wo as DetailListAlignment,
86
91
  Te as Drawer,
87
92
  Xe as Dropdown,
88
- A as ErrorBoundary,
89
- h as Footer,
90
- N as Grid,
91
- te as GridItem,
93
+ B as ErrorBoundary,
94
+ w as Footer,
95
+ D as Grid,
96
+ re as GridItem,
92
97
  ae as GridItemAlign,
93
- w as Header,
98
+ v as Header,
94
99
  F as HeroBanner,
95
100
  b as IconButton,
96
101
  Y as Input,
@@ -100,42 +105,45 @@ export {
100
105
  _ as LinkList,
101
106
  J as LinkVariants,
102
107
  Pe as Modal,
103
- G as Navigation,
104
- H as NavigationItem,
108
+ H as Navigation,
109
+ E as NavigationItem,
105
110
  O as NavigationItemTrigger,
106
111
  U as NavigationList,
107
112
  f as PaddingTokens,
108
113
  C as Page,
109
- no as PageContentWrapper,
114
+ xo as PageContentWrapper,
110
115
  be as Pagination,
111
- No as PinchZoom,
116
+ Do as PinchZoom,
112
117
  ee as Row,
118
+ Ho as SaleHeaderBanner,
119
+ Eo as SaleHeaderBrowseAuctions,
120
+ Oo as SaleHeaderCountdown,
113
121
  le as Search,
114
- wo as SeldonImage,
115
- uo as SeldonProvider,
116
- pe as Select,
122
+ vo as SeldonImage,
123
+ no as SeldonProvider,
124
+ se as Select,
117
125
  ce as Social,
118
126
  l as SpacingTokens,
119
127
  de as SplitPanel,
120
- Ae as StatefulViewingsList,
121
- ue as Subscribe,
122
- ne as SubscriptionState,
128
+ Be as StatefulViewingsList,
129
+ ne as Subscribe,
130
+ xe as SubscriptionState,
123
131
  qe as SupportedLanguages,
124
- Ne as Text,
125
- we as TextSymbolVariants,
126
- Ge as TextSymbols,
127
- he as TextVariants,
132
+ De as Text,
133
+ ve as TextSymbolVariants,
134
+ He as TextSymbols,
135
+ we as TextVariants,
128
136
  We as UserManagement,
129
137
  $e as Video,
130
138
  Ce as ViewingsList,
131
139
  m as defaultYear,
132
- p as emailValidation,
133
- s as encodeURLSearchParams,
140
+ s as emailValidation,
141
+ p as encodeURLSearchParams,
134
142
  d as findChildrenExcludingTypes,
135
- i as findChildrenOfType,
136
- u as generatePaddingClassName,
137
- x as getCommonProps,
138
- n as noOp,
143
+ u as findChildrenOfType,
144
+ n as generatePaddingClassName,
145
+ i as getCommonProps,
146
+ x as noOp,
139
147
  g as px,
140
148
  c as useNormalizedInputProps
141
149
  };
@@ -0,0 +1,49 @@
1
+ import { ComponentProps } from 'react';
2
+ import { AuctionState } from './types';
3
+ export interface SaleHeaderBannerProps extends ComponentProps<'div'> {
4
+ /**
5
+ * What is the title of the auction?
6
+ */
7
+ auctionTitle: React.ReactNode;
8
+ /**
9
+ * The URL of the banner image
10
+ */
11
+ imageSrcUrl: string;
12
+ /**
13
+ * Where is the auction taking place?
14
+ */
15
+ location: React.ReactNode;
16
+ occurrenceInformation: {
17
+ /**
18
+ * Depending on auction state, when does the auction open or close
19
+ */
20
+ date: React.ReactNode;
21
+ /**
22
+ * Clarifies the date based on the auction state
23
+ */
24
+ occurrenceLabel: React.ReactNode;
25
+ }[];
26
+ /**
27
+ * What is the current state of the auction?
28
+ */
29
+ auctionState: AuctionState;
30
+ /**
31
+ * What text should the CTA button display?
32
+ */
33
+ ctaLabel?: React.ReactNode;
34
+ /**
35
+ * What action does the CTA take?
36
+ */
37
+ onClick?: () => void;
38
+ }
39
+ /**
40
+ * ## Overview
41
+ *
42
+ * Sale header banner component, supports 3 states of the auction: pre-sale, open for bidding, and closed.
43
+ *
44
+ * [Figma Link](https://www.figma.com/design/OvBXAq48blO1r4qYbeBPjW/RW---Sale-Page-(PLP)?node-id=1-6&m=dev)
45
+ *
46
+ * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/patterns-saleheaderbanner--overview)
47
+ */
48
+ declare const SaleHeaderBanner: import("react").ForwardRefExoticComponent<Omit<SaleHeaderBannerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
49
+ export default SaleHeaderBanner;
@@ -0,0 +1,55 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as S } from "react";
3
+ import { getCommonProps as u } from "../../utils/index.js";
4
+ import C from "../../node_modules/classnames/index.js";
5
+ import j from "../../components/SeldonImage/SeldonImage.js";
6
+ import { AuctionState as _ } from "./types.js";
7
+ import { TextVariants as s } from "../../components/Text/types.js";
8
+ import t from "../../components/Text/Text.js";
9
+ import F from "../../components/PageContentWrapper/PageContentWrapper.js";
10
+ import H from "../../components/Button/Button.js";
11
+ const P = S(
12
+ ({
13
+ auctionTitle: o,
14
+ imageSrcUrl: f,
15
+ location: g,
16
+ auctionState: n,
17
+ occurrenceInformation: N,
18
+ ctaLabel: h = "Register to Bid",
19
+ onClick: v,
20
+ children: m,
21
+ className: $,
22
+ ...i
23
+ }, c) => {
24
+ const { className: a, ...l } = u(i, "SaleHeaderBanner"), B = n === _.openForBidding, d = n === _.past;
25
+ return /* @__PURE__ */ r("div", { ...l, className: C(a, $), ...i, ref: c, children: [
26
+ /* @__PURE__ */ e(
27
+ j,
28
+ {
29
+ aspectRatio: "16/9",
30
+ src: f,
31
+ alt: String(o),
32
+ objectFit: "cover",
33
+ className: `${a}__image`
34
+ }
35
+ ),
36
+ /* @__PURE__ */ e(F, { className: `${a}__stack-wrapper`, ...l, ...i, ref: c, children: /* @__PURE__ */ r("div", { className: `${a}__stack`, children: [
37
+ B && m,
38
+ /* @__PURE__ */ e(t, { variant: s.title1, children: o }),
39
+ /* @__PURE__ */ e(t, { variant: s.string2, className: `${a}__location`, children: g }),
40
+ /* @__PURE__ */ r("div", { className: `${a}__occurrence-details`, children: [
41
+ N.map(({ date: p, occurrenceLabel: x }) => /* @__PURE__ */ r("div", { className: `${a}__occurrence-details-text`, children: [
42
+ /* @__PURE__ */ e(t, { variant: s.string2, children: x }),
43
+ /* @__PURE__ */ e(t, { variant: s.string2, className: `${a}__date`, children: p })
44
+ ] }, String(p))),
45
+ d && m
46
+ ] }),
47
+ !d && /* @__PURE__ */ e(H, { className: `${a}__cta`, onClick: v, children: h })
48
+ ] }) })
49
+ ] });
50
+ }
51
+ );
52
+ P.displayName = "SaleHeaderBanner";
53
+ export {
54
+ P as default
55
+ };
@@ -0,0 +1,7 @@
1
+ import { ComponentProps } from 'react';
2
+ export interface SaleHeaderBrowseAuctionsProps extends ComponentProps<'div'> {
3
+ ctaLabel?: string;
4
+ ctaText?: string;
5
+ }
6
+ declare const SaleHeaderBrowseAuctions: import("react").ForwardRefExoticComponent<Omit<SaleHeaderBrowseAuctionsProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
7
+ export default SaleHeaderBrowseAuctions;
@@ -0,0 +1,20 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as i } from "react";
3
+ import { getCommonProps as m } from "../../utils/index.js";
4
+ import { TextVariants as n } from "../../components/Text/types.js";
5
+ import l from "../../components/Text/Text.js";
6
+ import "../../components/Link/types.js";
7
+ import c from "../../components/Link/Link.js";
8
+ const d = i(
9
+ ({ ctaText: r = "View Calendar", ctaLabel: a = "Browse Upcoming Sale", className: f, ...o }, p) => {
10
+ const { className: s } = m(o, "SaleHeaderBanner");
11
+ return /* @__PURE__ */ t("div", { className: `${s}__occurrence-details-text`, children: [
12
+ /* @__PURE__ */ e(l, { variant: n.string2, children: a }),
13
+ /* @__PURE__ */ e(c, { href: "/calendar", children: r })
14
+ ] });
15
+ }
16
+ );
17
+ d.displayName = "SaleHeaderBrowseAuctions";
18
+ export {
19
+ d as default
20
+ };
@@ -0,0 +1,8 @@
1
+ import { ComponentProps } from 'react';
2
+ export interface SaleHeaderCountdownProps extends ComponentProps<'div'> {
3
+ label?: string;
4
+ daysLabel?: string;
5
+ hoursLabel?: string;
6
+ }
7
+ declare const SaleHeaderCountdown: import("react").ForwardRefExoticComponent<Omit<SaleHeaderCountdownProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
8
+ export default SaleHeaderCountdown;
@@ -0,0 +1,35 @@
1
+ import { jsxs as a, jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as c } from "react";
3
+ import { getCommonProps as f } from "../../utils/index.js";
4
+ import { TextVariants as e } from "../../components/Text/types.js";
5
+ import r from "../../components/Text/Text.js";
6
+ const h = c(
7
+ ({ label: n = "Lots Close in", daysLabel: s = "Days", hoursLabel: t = "Hours", className: p, ...o }, i) => {
8
+ const { className: m, ...d } = f(o, "SaleHeaderBanner");
9
+ return /* @__PURE__ */ a(
10
+ "div",
11
+ {
12
+ id: "PLACEHOLDER FOR TIMER COMPONENT",
13
+ className: `${m}__countdown-container`,
14
+ ...d,
15
+ ...o,
16
+ ref: i,
17
+ children: [
18
+ /* @__PURE__ */ l(r, { variant: e.heading5, children: n }),
19
+ /* @__PURE__ */ a(r, { variant: e.heading5, children: [
20
+ "2 ",
21
+ s
22
+ ] }),
23
+ /* @__PURE__ */ a(r, { variant: e.heading5, children: [
24
+ "17 ",
25
+ t
26
+ ] })
27
+ ]
28
+ }
29
+ );
30
+ }
31
+ );
32
+ h.displayName = "SaleHeaderCountdown";
33
+ export {
34
+ h as default
35
+ };
@@ -0,0 +1,4 @@
1
+ export { default as SaleHeaderBanner, type SaleHeaderBannerProps } from './SaleHeaderBanner';
2
+ export { default as SaleHeaderBrowseAuctions, type SaleHeaderBrowseAuctionsProps } from './SaleHeaderBrowseAuctions';
3
+ export { default as SaleHeaderCountdown, type SaleHeaderCountdownProps } from './SaleHeaderCountdown';
4
+ export { AuctionState } from './types';
@@ -0,0 +1,5 @@
1
+ export declare enum AuctionState {
2
+ preSale = "PRESALE",
3
+ openForBidding = "OPEN_FOR_BIDDING",
4
+ past = "PAST"
5
+ }
@@ -0,0 +1,4 @@
1
+ var p = /* @__PURE__ */ ((r) => (r.preSale = "PRESALE", r.openForBidding = "OPEN_FOR_BIDDING", r.past = "PAST", r))(p || {});
2
+ export {
3
+ p as AuctionState
4
+ };
@@ -44,6 +44,7 @@
44
44
  @use 'patterns/ViewingsList/viewingsList';
45
45
  @use 'patterns/Subscribe/subscribe';
46
46
  @use 'patterns/Social/social';
47
+ @use 'patterns/SaleHeaderBanner/saleHeaderBanner';
47
48
 
48
49
  // Site Furniture
49
50
  @use 'site-furniture/Header/header';
@@ -0,0 +1,70 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-sale-header-banner {
4
+ display: flex;
5
+ flex-direction: column;
6
+ margin-bottom: $spacing-md;
7
+
8
+ @include media($size-md, $type: 'min') {
9
+ flex-direction: row-reverse;
10
+
11
+ &__image,
12
+ &__stack-wrapper {
13
+ flex: 0 50%;
14
+ }
15
+ }
16
+
17
+ &__stack {
18
+ align-items: start;
19
+ display: flex;
20
+ flex-direction: column;
21
+ height: 100%;
22
+ justify-content: center;
23
+ padding: $spacing-md 0;
24
+ }
25
+
26
+ // update when adding in actual countdown timer
27
+ &__countdown-container {
28
+ align-items: center;
29
+ border-bottom: 1px solid $light-gray;
30
+ display: flex;
31
+ gap: $spacing-sm;
32
+ justify-content: center;
33
+ margin-bottom: 1.5rem;
34
+ width: 100%;
35
+ }
36
+
37
+ &__location {
38
+ font-variation-settings: 'wght' 600;
39
+ margin: $margin-xsm 0;
40
+ }
41
+
42
+ &__occurrence-details {
43
+ display: flex;
44
+ margin-bottom: 1.5rem;
45
+
46
+ &-text {
47
+ align-items: flex-start;
48
+ display: flex;
49
+ flex-direction: column;
50
+ gap: 4px;
51
+
52
+ &:first-child {
53
+ padding-right: $spacing-md;
54
+ }
55
+
56
+ &:not(:first-child) {
57
+ border-left: 1px solid $keyline-gray;
58
+ padding: 0 $spacing-md;
59
+ }
60
+ }
61
+ }
62
+
63
+ &__date {
64
+ font-variation-settings: 'wght' 600;
65
+ }
66
+
67
+ &__cta {
68
+ margin: $spacing-sm 0;
69
+ }
70
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.75.4",
3
+ "version": "1.76.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"