@phillips/seldon 1.133.5 → 1.134.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/FavoritingTileButton/FavoritingTileButton.d.ts +34 -0
- package/dist/components/FavoritingTileButton/FavoritingTileButton.js +46 -0
- package/dist/components/FavoritingTileButton/FavoritingTileButton.stories.d.ts +16 -0
- package/dist/components/FavoritingTileButton/FavoritingTileButton.test.d.ts +1 -0
- package/dist/components/FavoritingTileButton/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +36 -34
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/FavoritingTileButton/_favoritingTileButton.scss +39 -0
- package/dist/scss/components/Tabs/_tabs.scss +1 -1
- package/package.json +1 -1
|
@@ -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 {};
|
|
@@ -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
|
|
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
|
|
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
|
|
10
|
-
import { default as
|
|
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
|
|
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
|
|
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
|
|
37
|
-
import { Tag as
|
|
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
|
|
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
|
|
58
|
-
import { default as
|
|
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
|
|
64
|
-
import { default as
|
|
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
|
|
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
|
|
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/
|
|
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
|
-
|
|
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
|
-
|
|
105
|
-
|
|
105
|
+
vt as CarouselArrows,
|
|
106
|
+
Ft as CarouselContent,
|
|
106
107
|
Gt as CarouselDots,
|
|
107
108
|
Ut as CarouselItem,
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
121
|
+
D as ErrorBoundary,
|
|
122
|
+
wo as FavoritingTileButton,
|
|
121
123
|
lo as Filter,
|
|
122
|
-
|
|
124
|
+
io as FilterHeader,
|
|
123
125
|
po as FilterInput,
|
|
124
126
|
fo as FilterMenu,
|
|
125
|
-
|
|
127
|
+
N as Footer,
|
|
126
128
|
E as Grid,
|
|
127
129
|
pe as GridItem,
|
|
128
|
-
|
|
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
|
-
|
|
151
|
+
De as Pagination,
|
|
150
152
|
Zt as PinchZoom,
|
|
151
153
|
me as Row,
|
|
152
|
-
|
|
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
|
-
|
|
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
|
-
|
|
171
|
+
Ne as Tag,
|
|
170
172
|
Ue as TagsList,
|
|
171
173
|
ze as Text,
|
|
172
174
|
Re as TextAlignments,
|
|
173
|
-
|
|
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
|
-
|
|
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
|
-
|
|
187
|
-
|
|
188
|
+
i as getCommonProps,
|
|
189
|
+
n as noOp,
|
|
188
190
|
x as px,
|
|
189
|
-
|
|
191
|
+
P as ssrMediaQueryStyle,
|
|
190
192
|
g as useNormalizedInputProps,
|
|
191
193
|
T as usePendingState
|
|
192
194
|
};
|
|
@@ -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
|
+
}
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
color: $button-hover;
|
|
33
33
|
cursor: pointer;
|
|
34
34
|
font-size: $body-size2;
|
|
35
|
+
font-variation-settings: 'wght' 600;
|
|
35
36
|
line-height: $body-line-height-size2;
|
|
36
37
|
|
|
37
38
|
&:hover {
|
|
@@ -50,7 +51,6 @@
|
|
|
50
51
|
}
|
|
51
52
|
.#{$px}-text {
|
|
52
53
|
color: $pure-black;
|
|
53
|
-
font-variation-settings: 'wght' 600;
|
|
54
54
|
|
|
55
55
|
&:hover {
|
|
56
56
|
color: $button-hover;
|