@phillips/seldon 1.96.1 → 1.97.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/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Filter/Filter.d.ts +25 -0
- package/dist/components/Filter/Filter.js +62 -0
- package/dist/components/Filter/Filter.stories.d.ts +29 -0
- package/dist/components/Filter/Filter.test.d.ts +1 -0
- package/dist/components/Filter/FilterHeader.d.ts +14 -0
- package/dist/components/Filter/FilterHeader.js +36 -0
- package/dist/components/Filter/FilterInput.d.ts +15 -0
- package/dist/components/Filter/FilterInput.js +27 -0
- package/dist/components/Filter/index.d.ts +3 -0
- package/dist/components/Input/Input.d.ts +5 -5
- package/dist/components/Input/Input.js +67 -53
- package/dist/components/Input/Input.stories.d.ts +0 -1
- package/dist/components/Pagination/Pagination.js +27 -26
- package/dist/components/Select/Select.d.ts +3 -2
- package/dist/components/Select/Select.js +53 -44
- package/dist/index.d.ts +3 -0
- package/dist/index.js +148 -140
- package/dist/patterns/FilterMenu/FilterMenu.d.ts +22 -0
- package/dist/patterns/FilterMenu/FilterMenu.js +23 -0
- package/dist/patterns/FilterMenu/FilterMenu.stories.d.ts +29 -0
- package/dist/patterns/FilterMenu/FilterMenu.test.d.ts +1 -0
- package/dist/patterns/FilterMenu/index.d.ts +1 -0
- package/dist/patterns/FilterMenu/utils.d.ts +10 -0
- package/dist/patterns/ViewingsList/ViewingsListCard.js +1 -1
- package/dist/patterns/ViewingsList/ViewingsListCardForm.js +30 -32
- package/dist/scss/componentStyles.scss +9 -7
- package/dist/scss/components/Filter/_filter.scss +112 -0
- package/dist/scss/components/Input/_input.scss +1 -1
- package/dist/scss/patterns/FilterMenu/_filterMenu.scss +15 -0
- package/package.json +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import * as
|
|
1
|
+
import { jsxs as T, Fragment as W, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import f from "../../node_modules/classnames/index.js";
|
|
3
|
+
import * as a from "react";
|
|
4
4
|
import { px as X } from "../../utils/index.js";
|
|
5
5
|
import u from "../../components/Input/Input.js";
|
|
6
6
|
const o = `${X}-viewings-list-card-form`, l = ({
|
|
@@ -12,7 +12,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
12
12
|
address2Label: h = "City, State, Zip ('New York, NY 10019')",
|
|
13
13
|
address3: z,
|
|
14
14
|
address3Label: L = "Country (United States)",
|
|
15
|
-
emailOn: O
|
|
15
|
+
emailOn: O,
|
|
16
16
|
emailToggleLabel: D = "Include Email Address",
|
|
17
17
|
email: C,
|
|
18
18
|
emailLabel: S = "Email",
|
|
@@ -28,7 +28,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
28
28
|
previewHours2Label: P = "Hours2",
|
|
29
29
|
previewLabel: j = "Label ('Preview', 'Opening Night', etc)",
|
|
30
30
|
previewLabelValue: I,
|
|
31
|
-
previewOn: p
|
|
31
|
+
previewOn: p,
|
|
32
32
|
previewToggleLabel: R = "Additional Hours",
|
|
33
33
|
viewingLabel: Y = "Label ('Open to public')",
|
|
34
34
|
viewingLabelValue: Z,
|
|
@@ -39,10 +39,10 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
39
39
|
viewingHours2: K,
|
|
40
40
|
viewingHours2Label: M = "Hours2"
|
|
41
41
|
}) => {
|
|
42
|
-
const [m,
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
}, [p]), /* @__PURE__ */
|
|
42
|
+
const [m, b] = a.useState(p === "true"), [w, Q] = a.useState(O === "true");
|
|
43
|
+
return a.useEffect(() => {
|
|
44
|
+
b(p === "true");
|
|
45
|
+
}, [p]), /* @__PURE__ */ T(W, { children: [
|
|
46
46
|
/* @__PURE__ */ t(
|
|
47
47
|
u,
|
|
48
48
|
{
|
|
@@ -51,7 +51,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
51
51
|
defaultValue: Z,
|
|
52
52
|
labelText: Y,
|
|
53
53
|
size: "sm",
|
|
54
|
-
invalid: e
|
|
54
|
+
invalid: !!(e != null && e.viewingLabelValue),
|
|
55
55
|
invalidText: e == null ? void 0 : e.viewingLabelValue
|
|
56
56
|
}
|
|
57
57
|
),
|
|
@@ -63,7 +63,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
63
63
|
defaultValue: q,
|
|
64
64
|
labelText: B,
|
|
65
65
|
size: "sm",
|
|
66
|
-
invalid: e
|
|
66
|
+
invalid: !!(e != null && e.viewingDates),
|
|
67
67
|
invalidText: e == null ? void 0 : e.viewingDates
|
|
68
68
|
}
|
|
69
69
|
),
|
|
@@ -75,7 +75,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
75
75
|
defaultValue: G,
|
|
76
76
|
labelText: J,
|
|
77
77
|
size: "sm",
|
|
78
|
-
invalid: e
|
|
78
|
+
invalid: !!(e != null && e.viewingHours1),
|
|
79
79
|
invalidText: e == null ? void 0 : e.viewingHours1
|
|
80
80
|
}
|
|
81
81
|
),
|
|
@@ -87,7 +87,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
87
87
|
defaultValue: K,
|
|
88
88
|
labelText: M,
|
|
89
89
|
size: "sm",
|
|
90
|
-
invalid: e
|
|
90
|
+
invalid: !!(e != null && e.viewingHours2),
|
|
91
91
|
invalidText: e == null ? void 0 : e.viewingHours2
|
|
92
92
|
}
|
|
93
93
|
),
|
|
@@ -100,18 +100,17 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
100
100
|
size: "md",
|
|
101
101
|
defaultChecked: m,
|
|
102
102
|
inline: !0,
|
|
103
|
-
invalid: e
|
|
103
|
+
invalid: !!(e != null && e.previewOn),
|
|
104
104
|
invalidText: e == null ? void 0 : e.previewOn,
|
|
105
|
-
value: !0,
|
|
106
105
|
name: "previewOn",
|
|
107
|
-
onChange: () =>
|
|
106
|
+
onChange: () => b((x) => !x)
|
|
108
107
|
}
|
|
109
108
|
),
|
|
110
109
|
m ? null : /* @__PURE__ */ t("input", { type: "hidden", name: "previewOn", value: "false" }),
|
|
111
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ T(
|
|
112
111
|
"div",
|
|
113
112
|
{
|
|
114
|
-
className:
|
|
113
|
+
className: f(`${o}__preview-set`, { [`${o}__preview-set--hidden`]: !m }),
|
|
115
114
|
children: [
|
|
116
115
|
/* @__PURE__ */ t(
|
|
117
116
|
u,
|
|
@@ -121,7 +120,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
121
120
|
defaultValue: I,
|
|
122
121
|
labelText: j,
|
|
123
122
|
size: "sm",
|
|
124
|
-
invalid: e
|
|
123
|
+
invalid: !!(e != null && e.previewLabelValue),
|
|
125
124
|
invalidText: e == null ? void 0 : e.previewLabelValue,
|
|
126
125
|
hidden: !m
|
|
127
126
|
}
|
|
@@ -134,7 +133,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
134
133
|
defaultValue: y,
|
|
135
134
|
labelText: E,
|
|
136
135
|
size: "sm",
|
|
137
|
-
invalid: e
|
|
136
|
+
invalid: !!(e != null && e.previewDates),
|
|
138
137
|
invalidText: e == null ? void 0 : e.previewDates,
|
|
139
138
|
hidden: !m
|
|
140
139
|
}
|
|
@@ -147,7 +146,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
147
146
|
defaultValue: U,
|
|
148
147
|
labelText: A,
|
|
149
148
|
size: "sm",
|
|
150
|
-
invalid: e
|
|
149
|
+
invalid: !!(e != null && e.previewHours1),
|
|
151
150
|
invalidText: e == null ? void 0 : e.previewHours1,
|
|
152
151
|
hidden: !m
|
|
153
152
|
}
|
|
@@ -160,7 +159,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
160
159
|
defaultValue: N,
|
|
161
160
|
labelText: P,
|
|
162
161
|
size: "sm",
|
|
163
|
-
invalid: e
|
|
162
|
+
invalid: !!(e != null && e.previewHours2),
|
|
164
163
|
invalidText: e == null ? void 0 : e.previewHours2,
|
|
165
164
|
hidden: !m
|
|
166
165
|
}
|
|
@@ -176,7 +175,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
176
175
|
defaultValue: g,
|
|
177
176
|
labelText: H,
|
|
178
177
|
size: "sm",
|
|
179
|
-
invalid: e
|
|
178
|
+
invalid: !!(e != null && e.address1),
|
|
180
179
|
invalidText: e == null ? void 0 : e.address1
|
|
181
180
|
}
|
|
182
181
|
),
|
|
@@ -188,7 +187,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
188
187
|
defaultValue: c,
|
|
189
188
|
labelText: h,
|
|
190
189
|
size: "sm",
|
|
191
|
-
invalid: e
|
|
190
|
+
invalid: !!(e != null && e.address2),
|
|
192
191
|
invalidText: e == null ? void 0 : e.address2
|
|
193
192
|
}
|
|
194
193
|
),
|
|
@@ -200,7 +199,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
200
199
|
defaultValue: z,
|
|
201
200
|
labelText: L,
|
|
202
201
|
size: "sm",
|
|
203
|
-
invalid: e
|
|
202
|
+
invalid: !!(e != null && e.address3),
|
|
204
203
|
invalidText: e == null ? void 0 : e.address3
|
|
205
204
|
}
|
|
206
205
|
),
|
|
@@ -213,7 +212,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
213
212
|
labelText: $,
|
|
214
213
|
size: "sm",
|
|
215
214
|
type: "url",
|
|
216
|
-
invalid: e
|
|
215
|
+
invalid: !!(e != null && e.addressUrl),
|
|
217
216
|
invalidText: e == null ? void 0 : e.addressUrl
|
|
218
217
|
}
|
|
219
218
|
),
|
|
@@ -226,18 +225,17 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
226
225
|
size: "md",
|
|
227
226
|
defaultChecked: w,
|
|
228
227
|
inline: !0,
|
|
229
|
-
invalid: e
|
|
228
|
+
invalid: !!(e != null && e.emailOn),
|
|
230
229
|
invalidText: e == null ? void 0 : e.emailOn,
|
|
231
|
-
value: !0,
|
|
232
230
|
name: "emailOn",
|
|
233
231
|
onChange: () => Q((x) => !x)
|
|
234
232
|
}
|
|
235
233
|
),
|
|
236
234
|
w ? null : /* @__PURE__ */ t("input", { type: "hidden", name: "emailOn", value: "false" }),
|
|
237
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ T(
|
|
238
236
|
"div",
|
|
239
237
|
{
|
|
240
|
-
className:
|
|
238
|
+
className: f(`${o}__preview-set`, { [`${o}__preview-set--hidden`]: !w }),
|
|
241
239
|
children: [
|
|
242
240
|
/* @__PURE__ */ t(
|
|
243
241
|
u,
|
|
@@ -247,7 +245,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
247
245
|
defaultValue: C,
|
|
248
246
|
labelText: S,
|
|
249
247
|
size: "sm",
|
|
250
|
-
invalid: e
|
|
248
|
+
invalid: !!(e != null && e.address2),
|
|
251
249
|
invalidText: e == null ? void 0 : e.address2,
|
|
252
250
|
hidden: !w
|
|
253
251
|
}
|
|
@@ -260,7 +258,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
260
258
|
defaultValue: _,
|
|
261
259
|
labelText: k,
|
|
262
260
|
size: "sm",
|
|
263
|
-
invalid: e
|
|
261
|
+
invalid: !!(e != null && e.address3),
|
|
264
262
|
invalidText: e == null ? void 0 : e.address3,
|
|
265
263
|
hidden: !w
|
|
266
264
|
}
|
|
@@ -40,6 +40,11 @@
|
|
|
40
40
|
@use 'components/Tags/tags';
|
|
41
41
|
@use 'components/Countdown/countdown';
|
|
42
42
|
@use 'components/Countdown/duration';
|
|
43
|
+
@use 'components/Detail/detail';
|
|
44
|
+
@use 'components/PinchZoom/pinchZoom';
|
|
45
|
+
@use 'components/Tabs/tabs';
|
|
46
|
+
@use 'components/SeldonImage/seldonImage';
|
|
47
|
+
@use 'components/Filter/filter';
|
|
43
48
|
|
|
44
49
|
// Patterns
|
|
45
50
|
@use 'patterns/HeroBanner/heroBanner';
|
|
@@ -49,14 +54,11 @@
|
|
|
49
54
|
@use 'patterns/Subscribe/subscribe';
|
|
50
55
|
@use 'patterns/Social/social';
|
|
51
56
|
@use 'patterns/SaleHeaderBanner/saleHeaderBanner';
|
|
57
|
+
@use 'patterns/ObjectTile/objectTile';
|
|
58
|
+
@use 'patterns/BidSnapshot/bidSnapshot';
|
|
59
|
+
@use 'patterns/FilterMenu/filterMenu';
|
|
60
|
+
@use 'patterns/DetailList/detailList';
|
|
52
61
|
|
|
53
62
|
// Site Furniture
|
|
54
63
|
@use 'site-furniture/Header/header';
|
|
55
64
|
@use 'site-furniture/Footer/footer';
|
|
56
|
-
@use 'components/Detail/detail';
|
|
57
|
-
@use 'patterns/DetailList/detailList';
|
|
58
|
-
@use 'components/PinchZoom/pinchZoom';
|
|
59
|
-
@use 'components/Tabs/tabs';
|
|
60
|
-
@use 'components/SeldonImage/seldonImage';
|
|
61
|
-
@use 'patterns/ObjectTile/objectTile';
|
|
62
|
-
@use 'patterns/BidSnapshot/bidSnapshot';
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
@use '../../allPartials' as *;
|
|
2
|
+
|
|
3
|
+
$default-transition-duration: 0.3s;
|
|
4
|
+
$default-easing: ease-in-out;
|
|
5
|
+
$chevron-scale: 0.8;
|
|
6
|
+
|
|
7
|
+
@keyframes slide-in {
|
|
8
|
+
from {
|
|
9
|
+
opacity: 0;
|
|
10
|
+
transform: translateX(100%);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
to {
|
|
14
|
+
opacity: 1;
|
|
15
|
+
transform: translateX(0);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@keyframes slide-out {
|
|
20
|
+
from {
|
|
21
|
+
opacity: 1;
|
|
22
|
+
transform: translateX(0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
to {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
transform: translateX(100%);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.#{$px}-filter {
|
|
32
|
+
&-header {
|
|
33
|
+
margin-bottom: $spacing-md;
|
|
34
|
+
|
|
35
|
+
legend {
|
|
36
|
+
padding-inline: 0; // needed for default browser styles
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__back {
|
|
40
|
+
@include text($body2); // workaround where the tertiary button text is not scaling at different breakpoints
|
|
41
|
+
|
|
42
|
+
margin-top: $spacing-sm;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&__chevron {
|
|
46
|
+
transform: rotateY(180deg) scale($chevron-scale);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&__chevron {
|
|
51
|
+
transform: scale($chevron-scale);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&__fieldset {
|
|
55
|
+
border: 0;
|
|
56
|
+
margin: 0 3px 0 0; // save room for input borders
|
|
57
|
+
padding: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&__filters {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
gap: $spacing-sm;
|
|
64
|
+
padding-bottom: $spacing-sm;
|
|
65
|
+
|
|
66
|
+
.#{$px}-input {
|
|
67
|
+
align-items: center;
|
|
68
|
+
height: unset;
|
|
69
|
+
|
|
70
|
+
&__label {
|
|
71
|
+
@include text($body2);
|
|
72
|
+
|
|
73
|
+
color: inherit;
|
|
74
|
+
margin-bottom: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&__input {
|
|
78
|
+
align-self: center;
|
|
79
|
+
height: $body-line-height-size3;
|
|
80
|
+
margin-bottom: 0;
|
|
81
|
+
width: $body-line-height-size3;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&__validation {
|
|
85
|
+
display: none;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&__view-all {
|
|
91
|
+
@include text($body2); // workaround where the tertiary button text is not scaling at different breakpoints
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&.is-opening {
|
|
95
|
+
animation: slide-in $default-transition-duration $default-easing forwards;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&.is-closing {
|
|
99
|
+
animation: slide-out $default-transition-duration $default-easing forwards;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.#{$px}-filter-input {
|
|
104
|
+
&__input {
|
|
105
|
+
&__wrapper {
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-direction: row;
|
|
108
|
+
height: 40px;
|
|
109
|
+
justify-content: space-between;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use '../../allPartials' as *;
|
|
2
|
+
|
|
3
|
+
.#{$px}-filter-menu {
|
|
4
|
+
overflow-y: scroll;
|
|
5
|
+
width: 100%;
|
|
6
|
+
|
|
7
|
+
&::-webkit-scrollbar {
|
|
8
|
+
display: none;
|
|
9
|
+
}
|
|
10
|
+
.#{$px}-filter:not([hidden]) + .#{$px}-filter {
|
|
11
|
+
border-top: 1px solid $light-gray;
|
|
12
|
+
margin-top: $spacing-sm;
|
|
13
|
+
padding-top: $spacing-md;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.97.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PhillipsAuctionHouse/seldon"
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"stylelint-order": "^6.0.4",
|
|
116
116
|
"stylelint-scss": "^6.4.1",
|
|
117
117
|
"ts-node": "^10.9.2",
|
|
118
|
+
"type-fest": "^4.27.0",
|
|
118
119
|
"typescript": "^5.5.4",
|
|
119
120
|
"vite": "^5.4.6",
|
|
120
121
|
"vite-plugin-dts": "^4.2.4",
|