@phillips/seldon 1.133.4 → 1.134.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,34 @@
1
+ import { ComponentProps } from 'react';
2
+ export interface FavoritingTileButtonProps extends ComponentProps<'button'> {
3
+ /**
4
+ * Text for when the object is not in the list and the user wants to add it
5
+ */
6
+ actionAddText?: string;
7
+ /**
8
+ * Text for when the object is in the list and the user wants to remove it
9
+ */
10
+ actionRemoveText?: string;
11
+ /**
12
+ * If the selected lot is in the list of listTitle, controls border style and action text displayed on tile
13
+ */
14
+ isLotInList: boolean;
15
+ /**
16
+ * List title shown on tile
17
+ */
18
+ listTitle: React.ReactNode;
19
+ /**
20
+ * Number of objects in list to display on tile
21
+ */
22
+ numberOfObjects: string;
23
+ }
24
+ /**
25
+ * ## Overview
26
+ *
27
+ * Overview of this widget
28
+ *
29
+ * [Figma Link](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?node-id=11973-9023&m=dev)
30
+ *
31
+ * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-favoritingtilebutton--overview)
32
+ */
33
+ declare const FavoritingTileButton: import('react').ForwardRefExoticComponent<Omit<FavoritingTileButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
34
+ export default FavoritingTileButton;
@@ -0,0 +1,46 @@
1
+ import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as v } from "react";
3
+ import { getCommonProps as h } from "../../utils/index.js";
4
+ import b from "../../node_modules/classnames/index.js";
5
+ import { TextVariants as t } from "../Text/types.js";
6
+ import e from "../Text/Text.js";
7
+ const g = v(
8
+ ({
9
+ className: d,
10
+ actionAddText: i = "Add to",
11
+ actionRemoveText: m = "Remove from",
12
+ isLotInList: r,
13
+ listTitle: n,
14
+ numberOfObjects: c,
15
+ onClick: f,
16
+ ...s
17
+ }, p) => {
18
+ const { className: a, ...u } = h(s, "FavoritingTileButton");
19
+ return /* @__PURE__ */ l(
20
+ "button",
21
+ {
22
+ ...u,
23
+ className: b(a, d, {
24
+ [`${a}--lot-in-list`]: r
25
+ }),
26
+ onClick: f,
27
+ ref: p,
28
+ id: s?.id,
29
+ "aria-label": `${r ? m : i} ${n}`,
30
+ "aria-pressed": r,
31
+ role: "switch",
32
+ children: [
33
+ /* @__PURE__ */ l("div", { className: `${a}__text`, children: [
34
+ /* @__PURE__ */ o(e, { variant: t.button, children: r ? m : i }),
35
+ /* @__PURE__ */ o(e, { variant: t.string2, children: n })
36
+ ] }),
37
+ /* @__PURE__ */ o(e, { variant: t.button, children: c })
38
+ ]
39
+ }
40
+ );
41
+ }
42
+ );
43
+ g.displayName = "FavoritingTileButton";
44
+ export {
45
+ g as default
46
+ };
@@ -0,0 +1,16 @@
1
+ import { FavoritingTileButtonProps } from './FavoritingTileButton';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').ForwardRefExoticComponent<Omit<FavoritingTileButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
5
+ };
6
+ export default meta;
7
+ export declare const Playground: {
8
+ (props: FavoritingTileButtonProps): import("react/jsx-runtime").JSX.Element;
9
+ args: {
10
+ listTitle: string;
11
+ numberOfObjects: string;
12
+ isLotInList: boolean;
13
+ };
14
+ argTypes: {};
15
+ };
16
+ export declare const BothStates: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default as FavoritingTileButton, type FavoritingTileButtonProps } from './FavoritingTileButton';
package/dist/index.d.ts CHANGED
@@ -65,5 +65,6 @@ export * from './components/Countdown/types';
65
65
  export * from './patterns/ObjectTile';
66
66
  export * from './patterns/BidSnapshot';
67
67
  export * from './components/Article';
68
+ export * from './components/FavoritingTileButton';
68
69
  export * from './components/Icon';
69
70
  export * from './components/TextArea';
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { PaddingTokens as a, SpacingTokens as f, defaultYear as s, emailValidation as l, encodeURLSearchParams as m, findChildrenExcludingTypes as d, findChildrenOfType as p, generatePaddingClassName as u, getCommonProps as n, noOp as i, px as x, useNormalizedInputProps as g } from "./utils/index.js";
1
+ import { PaddingTokens as a, SpacingTokens as f, defaultYear as s, emailValidation as l, encodeURLSearchParams as m, findChildrenExcludingTypes as d, findChildrenOfType as p, generatePaddingClassName as u, getCommonProps as i, noOp as n, px as x, useNormalizedInputProps as g } from "./utils/index.js";
2
2
  import { default as S } from "./pages/Page.js";
3
3
  import { usePendingState as T } from "./utils/hooks.js";
4
- import { SSRMediaQuery as P, ssrMediaQueryStyle as A } from "./providers/SeldonProvider/utils.js";
4
+ import { SSRMediaQuery as B, ssrMediaQueryStyle as P } from "./providers/SeldonProvider/utils.js";
5
5
  import { AuctionStatus as I, LotStatus as V, SupportedLanguages as b } from "./types/commonTypes.js";
6
6
  import { default as k } from "./components/Button/Button.js";
7
7
  import { ButtonVariants as y } from "./components/Button/types.js";
8
8
  import { default as M } from "./components/IconButton/IconButton.js";
9
- import { default as N } from "./components/ErrorBoundary/ErrorBoundary.js";
10
- import { default as F } from "./site-furniture/Footer/Footer.js";
9
+ import { default as D } from "./components/ErrorBoundary/ErrorBoundary.js";
10
+ import { default as N } from "./site-furniture/Footer/Footer.js";
11
11
  import { Grid as E } from "./components/Grid/Grid.js";
12
12
  import { default as O } from "./site-furniture/Header/Header.js";
13
13
  import { default as Q } from "./components/Navigation/Navigation.js";
@@ -22,19 +22,19 @@ import { default as ae } from "./components/LinkBlock/LinkBlock.js";
22
22
  import { default as se } from "./components/LinkList/LinkList.js";
23
23
  import { default as me } from "./components/Row/Row.js";
24
24
  import { default as pe } from "./components/GridItem/GridItem.js";
25
- import { GridItemAlign as ne } from "./components/GridItem/types.js";
25
+ import { GridItemAlign as ie } from "./components/GridItem/types.js";
26
26
  import { default as xe } from "./components/Search/Search.js";
27
27
  import { default as ce } from "./components/Select/Select.js";
28
28
  import { SelectVariants as Ce } from "./components/Select/types.js";
29
29
  import { default as Le } from "./components/SplitPanel/SplitPanel.js";
30
- import { default as Ae } from "./patterns/Subscribe/Subscribe.js";
30
+ import { default as Pe } from "./patterns/Subscribe/Subscribe.js";
31
31
  import { SubscriptionState as Ie } from "./patterns/Subscribe/types.js";
32
32
  import { default as be } from "./patterns/Social/Social.js";
33
33
  import { default as ke } from "./patterns/ViewingsList/ViewingsList.js";
34
34
  import { default as ye } from "./components/Modal/Modal.js";
35
35
  import { default as Me } from "./components/Drawer/Drawer.js";
36
- import { default as Ne } from "./components/Pagination/Pagination.js";
37
- import { Tag as Fe, default as Ue } from "./components/Tags/Tags.js";
36
+ import { default as De } from "./components/Pagination/Pagination.js";
37
+ import { Tag as Ne, default as Ue } from "./components/Tags/Tags.js";
38
38
  import { default as Ge } from "./patterns/ViewingsList/StatefulViewingsList.js";
39
39
  import { TextAlignments as Re, TextVariants as Qe } from "./components/Text/types.js";
40
40
  import { default as ze } from "./components/Text/Text.js";
@@ -50,18 +50,18 @@ import "react/jsx-runtime";
50
50
  import "./node_modules/classnames/index.js";
51
51
  import { default as dt } from "./components/Icon/Icon.js";
52
52
  import { default as ut } from "./components/Dropdown/Dropdown.js";
53
- import { default as it } from "./components/Video/Video.js";
53
+ import { default as nt } from "./components/Video/Video.js";
54
54
  import { default as gt } from "./patterns/LanguageSelector/LanguageSelector.js";
55
55
  import { default as St } from "./components/ContentPeek/ContentPeek.js";
56
56
  import { HeightUnits as Tt } from "./components/ContentPeek/utils.js";
57
- import { default as Pt } from "./components/Collapsible/Collapsible.js";
58
- import { default as Bt } from "./components/Collapsible/CollapsibleContent.js";
57
+ import { default as Bt } from "./components/Collapsible/Collapsible.js";
58
+ import { default as At } from "./components/Collapsible/CollapsibleContent.js";
59
59
  import { default as Vt } from "./components/Collapsible/CollapsibleTrigger.js";
60
60
  import { SeldonProvider as ht } from "./providers/SeldonProvider/SeldonProvider.js";
61
61
  import { default as wt } from "./components/PageContentWrapper/PageContentWrapper.js";
62
62
  import { default as Ht } from "./components/Carousel/Carousel.js";
63
- import { default as Dt } from "./components/Carousel/CarouselArrows.js";
64
- import { default as vt } from "./components/Carousel/CarouselContent.js";
63
+ import { default as vt } from "./components/Carousel/CarouselArrows.js";
64
+ import { default as Ft } from "./components/Carousel/CarouselContent.js";
65
65
  import { default as Ut } from "./components/Carousel/CarouselItem.js";
66
66
  import { default as Gt } from "./components/Carousel/CarouselDots.js";
67
67
  import { default as Rt } from "./components/Detail/Detail.js";
@@ -76,15 +76,16 @@ import { default as ro } from "./patterns/SaleHeaderBanner/SaleHeaderBrowseAucti
76
76
  import { default as fo } from "./patterns/FilterMenu/FilterMenu.js";
77
77
  import { default as lo } from "./components/Filter/Filter.js";
78
78
  import { default as po } from "./components/Filter/FilterInput.js";
79
- import { default as no } from "./components/Filter/FilterHeader.js";
79
+ import { default as io } from "./components/Filter/FilterHeader.js";
80
80
  import { default as xo } from "./components/Countdown/Countdown.js";
81
81
  import { CountdownVariants as co } from "./components/Countdown/types.js";
82
82
  import { default as Co } from "./patterns/ObjectTile/ObjectTile.js";
83
83
  import { default as Lo } from "./patterns/BidSnapshot/BidSnapshot.js";
84
- import { default as Ao } from "./patterns/BidSnapshot/BidMessage.js";
84
+ import { default as Po } from "./patterns/BidSnapshot/BidMessage.js";
85
85
  import { BidMessageVariants as Io, BidStatusEnum as Vo } from "./patterns/BidSnapshot/types.js";
86
86
  import { default as ho } from "./components/Article/Article.js";
87
- import { default as wo } from "./components/TextArea/TextArea.js";
87
+ import { default as wo } from "./components/FavoritingTileButton/FavoritingTileButton.js";
88
+ import { default as Ho } from "./components/TextArea/TextArea.js";
88
89
  export {
89
90
  Ke as Accordion,
90
91
  _e as AccordionItem,
@@ -93,7 +94,7 @@ export {
93
94
  ho as Article,
94
95
  I as AuctionStatus,
95
96
  ft as AuthState,
96
- Ao as BidMessage,
97
+ Po as BidMessage,
97
98
  Io as BidMessageVariants,
98
99
  Lo as BidSnapshot,
99
100
  Vo as BidStatusEnum,
@@ -101,12 +102,12 @@ export {
101
102
  k as Button,
102
103
  y as ButtonVariants,
103
104
  Ht as Carousel,
104
- Dt as CarouselArrows,
105
- vt as CarouselContent,
105
+ vt as CarouselArrows,
106
+ Ft as CarouselContent,
106
107
  Gt as CarouselDots,
107
108
  Ut as CarouselItem,
108
- Pt as Collapsible,
109
- Bt as CollapsibleContent,
109
+ Bt as Collapsible,
110
+ At as CollapsibleContent,
110
111
  Vt as CollapsibleTrigger,
111
112
  St as ContentPeek,
112
113
  Tt as ContentPeekHeightUnits,
@@ -117,15 +118,16 @@ export {
117
118
  Wt as DetailListAlignment,
118
119
  Me as Drawer,
119
120
  ut as Dropdown,
120
- N as ErrorBoundary,
121
+ D as ErrorBoundary,
122
+ wo as FavoritingTileButton,
121
123
  lo as Filter,
122
- no as FilterHeader,
124
+ io as FilterHeader,
123
125
  po as FilterInput,
124
126
  fo as FilterMenu,
125
- F as Footer,
127
+ N as Footer,
126
128
  E as Grid,
127
129
  pe as GridItem,
128
- ne as GridItemAlign,
130
+ ie as GridItemAlign,
129
131
  O as Header,
130
132
  K as HeroBanner,
131
133
  dt as Icon,
@@ -146,10 +148,10 @@ export {
146
148
  a as PaddingTokens,
147
149
  S as Page,
148
150
  wt as PageContentWrapper,
149
- Ne as Pagination,
151
+ De as Pagination,
150
152
  Zt as PinchZoom,
151
153
  me as Row,
152
- P as SSRMediaQuery,
154
+ B as SSRMediaQuery,
153
155
  to as SaleHeaderBanner,
154
156
  ro as SaleHeaderBrowseAuctions,
155
157
  xe as Search,
@@ -161,21 +163,21 @@ export {
161
163
  f as SpacingTokens,
162
164
  Le as SplitPanel,
163
165
  Ge as StatefulViewingsList,
164
- Ae as Subscribe,
166
+ Pe as Subscribe,
165
167
  Ie as SubscriptionState,
166
168
  b as SupportedLanguages,
167
169
  Jt as TabsContainer,
168
170
  Xt as TabsContent,
169
- Fe as Tag,
171
+ Ne as Tag,
170
172
  Ue as TagsList,
171
173
  ze as Text,
172
174
  Re as TextAlignments,
173
- wo as TextArea,
175
+ Ho as TextArea,
174
176
  Ye as TextSymbolVariants,
175
177
  qe as TextSymbols,
176
178
  Qe as TextVariants,
177
179
  rt as UserManagement,
178
- it as Video,
180
+ nt as Video,
179
181
  ke as ViewingsList,
180
182
  s as defaultYear,
181
183
  l as emailValidation,
@@ -183,10 +185,10 @@ export {
183
185
  d as findChildrenExcludingTypes,
184
186
  p as findChildrenOfType,
185
187
  u as generatePaddingClassName,
186
- n as getCommonProps,
187
- i as noOp,
188
+ i as getCommonProps,
189
+ n as noOp,
188
190
  x as px,
189
- A as ssrMediaQueryStyle,
191
+ P as ssrMediaQueryStyle,
190
192
  g as useNormalizedInputProps,
191
193
  T as usePendingState
192
194
  };
@@ -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;
@@ -3,21 +3,21 @@ import { memo as z, forwardRef as F } from "react";
3
3
  import I from "../../node_modules/classnames/index.js";
4
4
  import { getCommonProps as L } from "../../utils/index.js";
5
5
  import { TextVariants as l } from "../../components/Text/types.js";
6
- import i from "../../components/Text/Text.js";
6
+ import n from "../../components/Text/Text.js";
7
7
  import R from "../DetailList/DetailList.js";
8
8
  import V from "../../components/Detail/Detail.js";
9
9
  import W from "../../components/SeldonImage/SeldonImage.js";
10
10
  const w = z(
11
11
  F(
12
12
  ({
13
- badgeText: p,
13
+ badgeText: f,
14
14
  className: $,
15
15
  children: N,
16
16
  element: g,
17
- estimate: n,
17
+ estimate: i,
18
18
  estimateLabelText: b = "Estimate",
19
- estimateOnRequestText: r,
20
- badgeElement: m,
19
+ estimateOnRequestText: m,
20
+ badgeElement: r,
21
21
  favoriteElement: o,
22
22
  imageAlt: u = "Brought to you by Phillips",
23
23
  imageUrl: v = "",
@@ -31,10 +31,10 @@ const w = z(
31
31
  referenceNumber: d,
32
32
  titleText: h,
33
33
  withdrawnText: t,
34
- ...f
34
+ ...p
35
35
  }, x) => {
36
- const { className: e, ...C } = L(f, "ObjectTile"), D = g ?? "a", E = n || r;
37
- return /* @__PURE__ */ s(D, { ...C, className: I(e, $), ...f, ref: x, children: [
36
+ const { className: e, ...C } = L(p, "ObjectTile"), D = g ?? "a", E = i || m;
37
+ return /* @__PURE__ */ s(D, { ...C, className: I(e, $), ...p, ref: x, children: [
38
38
  /* @__PURE__ */ a(
39
39
  W,
40
40
  {
@@ -49,17 +49,17 @@ const w = z(
49
49
  fetchPriority: P
50
50
  }
51
51
  ),
52
- t ? null : /* @__PURE__ */ a(i, { className: `${e}__badge`, variant: l.badge, children: p }),
52
+ t ? null : /* @__PURE__ */ a(n, { element: "span", className: `${e}__badge`, variant: l.badge, children: f }),
53
53
  /* @__PURE__ */ s("div", { className: `${e}__lot-number-like`, children: [
54
- /* @__PURE__ */ a(i, { className: `${e}__lot-number`, variant: l.heading4, element: "p", children: S }),
55
- m && /* @__PURE__ */ a("div", { className: `${e}__lot-badge`, children: /* @__PURE__ */ a(m, {}) }),
54
+ /* @__PURE__ */ a(n, { element: "span", className: `${e}__lot-number`, variant: l.heading4, children: S }),
55
+ r && /* @__PURE__ */ a("div", { className: `${e}__lot-badge`, children: /* @__PURE__ */ a(r, {}) }),
56
56
  o && /* @__PURE__ */ a(o, {})
57
57
  ] }),
58
- t ? /* @__PURE__ */ a(i, { className: `${e}__withdrawn`, variant: l.heading4, children: t }) : /* @__PURE__ */ s(O, { children: [
58
+ t ? /* @__PURE__ */ a(n, { element: "span", className: `${e}__withdrawn`, variant: l.heading4, children: t }) : /* @__PURE__ */ s(O, { children: [
59
59
  /* @__PURE__ */ s("div", { className: `${e}__meta`, children: [
60
- c ? /* @__PURE__ */ a(i, { className: `${e}__maker`, variant: l.heading4, children: c }) : null,
60
+ c ? /* @__PURE__ */ a(n, { element: "span", className: `${e}__maker`, variant: l.heading4, children: c }) : null,
61
61
  h ? /* @__PURE__ */ a(
62
- i,
62
+ n,
63
63
  {
64
64
  className: `${e}__title ${e}__token-fix ${e}__token-fix--no-transform`,
65
65
  variant: l.heading4,
@@ -68,20 +68,20 @@ const w = z(
68
68
  }
69
69
  ) : null,
70
70
  d ? /* @__PURE__ */ a(
71
- i,
71
+ n,
72
72
  {
73
73
  className: `${e}__reference-number ${e}__token-fix`,
74
74
  variant: l.heading4,
75
- element: "p",
75
+ element: "span",
76
76
  children: d
77
77
  }
78
78
  ) : null,
79
79
  _ ? /* @__PURE__ */ a(
80
- i,
80
+ n,
81
81
  {
82
82
  className: `${e}__model ${e}__token-fix`,
83
83
  variant: l.heading4,
84
- element: "p",
84
+ element: "span",
85
85
  children: _
86
86
  }
87
87
  ) : null
@@ -91,7 +91,7 @@ const w = z(
91
91
  {
92
92
  className: `${e}__estimate__label`,
93
93
  label: b,
94
- value: n || r,
94
+ value: i || m,
95
95
  hasWrap: !1
96
96
  }
97
97
  ) }) : null,
@@ -46,6 +46,7 @@
46
46
  @use 'components/Tabs/tabs';
47
47
  @use 'components/SeldonImage/seldonImage';
48
48
  @use 'components/Filter/filter';
49
+ @use 'components/FavoritingTileButton/favoritingTileButton';
49
50
 
50
51
  // Patterns
51
52
  @use 'patterns/HeroBanner/heroBanner';
@@ -0,0 +1,39 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-favoriting-tile-button {
4
+ align-items: center;
5
+ background-color: $white;
6
+ border: 1px solid $light-gray;
7
+ display: flex;
8
+ flex-shrink: 0;
9
+ gap: $spacing-md;
10
+ justify-content: space-between;
11
+ padding: $padding-md $padding-sm;
12
+ transition: all 0.2s ease-in-out;
13
+ width: 100%;
14
+
15
+ &--lot-in-list {
16
+ border: 1px solid $pure-black;
17
+ }
18
+
19
+ &__text {
20
+ display: flex;
21
+ gap: $spacing-xsm;
22
+ overflow: hidden;
23
+
24
+ span {
25
+ color: inherit;
26
+ overflow: hidden;
27
+ text-overflow: ellipsis;
28
+ white-space: nowrap;
29
+ }
30
+ }
31
+
32
+ &:hover {
33
+ align-items: center;
34
+ background: $button-hover;
35
+ border: 1px solid $button-hover;
36
+ color: $white;
37
+ cursor: pointer;
38
+ }
39
+ }
@@ -13,6 +13,7 @@
13
13
 
14
14
  &__badge {
15
15
  color: $widget-red;
16
+ display: block; // Ensures the badge can be sized correctly
16
17
  }
17
18
 
18
19
  &__badge:empty {
@@ -47,7 +48,7 @@
47
48
  }
48
49
 
49
50
  .#{$px}-object-tile__lot-badge {
50
- display: inline-block;
51
+ display: block;
51
52
  padding-left: $spacing-xsm;
52
53
  position: relative;
53
54
 
@@ -63,7 +64,7 @@
63
64
  }
64
65
 
65
66
  & .#{$px}-object-tile__lot-number {
66
- display: inline-block;
67
+ display: block;
67
68
  margin-bottom: 0;
68
69
  padding-top: 2px;
69
70
  }
@@ -71,6 +72,7 @@
71
72
  & .#{$px}-object-tile__maker,
72
73
  & .#{$px}-object-tile__model,
73
74
  & .#{$px}-object-tile__reference-number {
75
+ display: block;
74
76
  margin-bottom: 0;
75
77
  }
76
78
 
@@ -80,6 +82,7 @@
80
82
  }
81
83
 
82
84
  &__meta {
85
+ display: block;
83
86
  margin-bottom: $spacing-sm;
84
87
  }
85
88
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.133.4",
3
+ "version": "1.134.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"