@phillips/seldon 1.96.1 → 1.97.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.
Files changed (43) hide show
  1. package/dist/assets/icon-green-circle.svg.js +5 -0
  2. package/dist/assets/icon-red-circle.svg.js +5 -0
  3. package/dist/assets/icons.d.ts +2 -0
  4. package/dist/components/DatePicker/DatePicker.d.ts +1 -1
  5. package/dist/components/Filter/Filter.d.ts +25 -0
  6. package/dist/components/Filter/Filter.js +62 -0
  7. package/dist/components/Filter/Filter.stories.d.ts +29 -0
  8. package/dist/components/Filter/Filter.test.d.ts +1 -0
  9. package/dist/components/Filter/FilterHeader.d.ts +14 -0
  10. package/dist/components/Filter/FilterHeader.js +36 -0
  11. package/dist/components/Filter/FilterInput.d.ts +15 -0
  12. package/dist/components/Filter/FilterInput.js +27 -0
  13. package/dist/components/Filter/index.d.ts +3 -0
  14. package/dist/components/Input/Input.d.ts +5 -5
  15. package/dist/components/Input/Input.js +67 -53
  16. package/dist/components/Input/Input.stories.d.ts +0 -1
  17. package/dist/components/Pagination/Pagination.js +27 -26
  18. package/dist/components/Select/Select.d.ts +3 -2
  19. package/dist/components/Select/Select.js +53 -44
  20. package/dist/index.d.ts +3 -0
  21. package/dist/index.js +193 -180
  22. package/dist/patterns/BidSnapshot/BidMessage.js +20 -17
  23. package/dist/patterns/BidSnapshot/BidSnapshot.d.ts +3 -2
  24. package/dist/patterns/BidSnapshot/BidSnapshot.js +49 -46
  25. package/dist/patterns/BidSnapshot/BidSnapshot.stories.d.ts +9 -2
  26. package/dist/patterns/BidSnapshot/index.d.ts +1 -1
  27. package/dist/patterns/BidSnapshot/types.d.ts +6 -0
  28. package/dist/patterns/BidSnapshot/types.js +3 -2
  29. package/dist/patterns/FilterMenu/FilterMenu.d.ts +22 -0
  30. package/dist/patterns/FilterMenu/FilterMenu.js +23 -0
  31. package/dist/patterns/FilterMenu/FilterMenu.stories.d.ts +29 -0
  32. package/dist/patterns/FilterMenu/FilterMenu.test.d.ts +1 -0
  33. package/dist/patterns/FilterMenu/index.d.ts +1 -0
  34. package/dist/patterns/FilterMenu/utils.d.ts +10 -0
  35. package/dist/patterns/ViewingsList/ViewingsListCard.js +1 -1
  36. package/dist/patterns/ViewingsList/ViewingsListCardForm.js +30 -32
  37. package/dist/scss/componentStyles.scss +9 -7
  38. package/dist/scss/components/Filter/_filter.scss +112 -0
  39. package/dist/scss/components/Input/_input.scss +1 -1
  40. package/dist/scss/patterns/BidSnapshot/_bidSnapshot.scss +1 -1
  41. package/dist/scss/patterns/FilterMenu/_filterMenu.scss +15 -0
  42. package/dist/scss/patterns/Social/_social.scss +1 -0
  43. package/package.json +2 -1
@@ -1,64 +1,67 @@
1
- import { jsxs as W, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as _ } from "react";
3
- import A from "../../node_modules/classnames/index.js";
4
- import { getCommonProps as V } from "../../utils/index.js";
5
- import k from "../DetailList/DetailList.js";
6
- import q from "../../components/Detail/Detail.js";
7
- import { AuctionStatus as t, SupportedLanguages as z } from "../../types/commonTypes.js";
8
- import E from "../../components/Countdown/Countdown.js";
9
- import { CountdownVariants as F } from "../../components/Countdown/types.js";
10
- const G = (s) => s === 1 ? `${s} bid` : `${s} bids`, H = _(
1
+ import { jsxs as _, jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as A } from "react";
3
+ import V from "../../node_modules/classnames/index.js";
4
+ import { getCommonProps as k, findChildrenOfType as q, findChildrenExcludingTypes as z } from "../../utils/index.js";
5
+ import F from "../DetailList/DetailList.js";
6
+ import G from "../../components/Detail/Detail.js";
7
+ import { AuctionStatus as a, SupportedLanguages as H } from "../../types/commonTypes.js";
8
+ import I from "../../components/Countdown/Countdown.js";
9
+ import { CountdownVariants as J } from "../../components/Countdown/types.js";
10
+ import { BidStatusEnum as g } from "./types.js";
11
+ import u from "./BidMessage.js";
12
+ const K = (o) => o === 1 ? `${o} bid` : `${o} bids`, Q = A(
11
13
  ({
12
- activeBid: s,
13
- auctionStatus: e = t.ready,
14
- bidsLabelText: h = G,
15
- children: $,
16
- className: b,
17
- closingText: u = "Closes in",
18
- currency: S = "$",
19
- currentBid: a,
20
- currentBidText: C = "Current bid",
21
- formatDurationStr: g = (o) => o.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
22
- lang: v = "en",
23
- lotCloseDate: m,
14
+ bidStatus: o,
15
+ auctionStatus: e = a.ready,
16
+ bidsLabelText: C = K,
17
+ children: m,
18
+ className: $,
19
+ closingText: b = "Closes in",
20
+ currency: v = "$",
21
+ currentBid: i,
22
+ currentBidText: y = "Current bid",
23
+ formatDurationStr: S = (s) => s.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
24
+ lang: T = "en",
25
+ lotCloseDate: d,
24
26
  numberOfBids: p = 0,
25
- startingBid: L,
26
- startingBidText: N = "Starting bid",
27
- soldForText: w = "Sold for",
28
- wonForText: x = "Won for",
27
+ startingBid: x,
28
+ startingBidText: L = "Starting bid",
29
+ soldForText: N = "Sold for",
30
+ wonForText: w = "Won for",
29
31
  ...c
30
- }, y) => {
31
- var f;
32
- const { className: o, ...T } = V(c, "BidSnapshot"), i = a !== null && p > 0, P = s === a, d = e === t.ready, n = e === t.live, j = e === t.past, D = n && m, R = A(o, b, {
33
- [`${o}--live`]: n,
34
- [`${o}--has-bids`]: i
32
+ }, W) => {
33
+ var h;
34
+ const { className: s, ...P } = k(c, "BidSnapshot"), n = i !== null && p > 0, j = o === g.Winning || o === g.Won, f = e === a.ready, t = e === a.live, B = e === a.past, D = t && d, E = q(m, u), M = z(m, [u]), R = V(s, $, {
35
+ [`${s}--live`]: t,
36
+ [`${s}--has-bids`]: n
35
37
  });
36
- let r = C;
37
- return (d || !i) && (r = N), j && i && (r = P ? x : w), /* @__PURE__ */ W("div", { ...T, ...c, ref: y, className: R, children: [
38
- /* @__PURE__ */ l(k, { hasSeparators: !0, className: `${o}__text`, children: /* @__PURE__ */ l(
39
- q,
38
+ let r = y;
39
+ return (f || !n) && (r = L), B && n && (r = j ? w : N), /* @__PURE__ */ _("div", { ...P, ...c, ref: W, className: R, children: [
40
+ /* @__PURE__ */ l(F, { hasSeparators: !0, className: `${s}__text`, children: /* @__PURE__ */ l(
41
+ G,
40
42
  {
41
43
  label: r,
42
- subLabel: n && a && `(${h(p)})`,
43
- value: `${S}${(f = a || L) == null ? void 0 : f.toLocaleString()}`,
44
+ subLabel: t && i && `(${C(p)})`,
45
+ value: `${v}${(h = i || x) == null ? void 0 : h.toLocaleString()}`,
44
46
  hasWrap: !1
45
47
  }
46
48
  ) }),
47
- s && !d ? $ : null,
49
+ o && !f ? E : null,
50
+ M,
48
51
  D ? /* @__PURE__ */ l(
49
- E,
52
+ I,
50
53
  {
51
- endDateTime: m,
52
- label: u,
53
- variant: F.compact,
54
- locale: z[v],
55
- formatDurationStr: g
54
+ endDateTime: d,
55
+ label: b,
56
+ variant: J.compact,
57
+ locale: H[T],
58
+ formatDurationStr: S
56
59
  }
57
60
  ) : null
58
61
  ] });
59
62
  }
60
63
  );
61
- H.displayName = "BidSnapshot";
64
+ Q.displayName = "BidSnapshot";
62
65
  export {
63
- H as default
66
+ Q as default
64
67
  };
@@ -1,5 +1,6 @@
1
1
  import { BidSnapshotProps } from './BidSnapshot';
2
2
  import { AuctionStatus } from '../../types/commonTypes';
3
+ import { BidStatusEnum } from './types';
3
4
  declare const meta: {
4
5
  title: string;
5
6
  component: import('react').ForwardRefExoticComponent<Omit<BidSnapshotProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
@@ -16,7 +17,6 @@ export default meta;
16
17
  export declare const Playground: {
17
18
  (props: BidSnapshotProps): import("react/jsx-runtime").JSX.Element;
18
19
  args: {
19
- activeBid: number;
20
20
  currency: string;
21
21
  numberOfBids: number;
22
22
  auctionStatus: AuctionStatus;
@@ -25,5 +25,12 @@ export declare const Playground: {
25
25
  lang: import('date-fns').Locale;
26
26
  startingBid: number;
27
27
  };
28
- argTypes: {};
28
+ argTypes: {
29
+ bidStatus: {
30
+ options: typeof BidStatusEnum;
31
+ control: {
32
+ type: string;
33
+ };
34
+ };
35
+ };
29
36
  };
@@ -1,3 +1,3 @@
1
1
  export { default as BidSnapshot, type BidSnapshotProps } from './BidSnapshot';
2
2
  export { default as BidMessage } from './BidMessage';
3
- export { BidMessageVariants } from './types';
3
+ export { BidMessageVariants, BidStatusEnum } from './types';
@@ -2,3 +2,9 @@ export declare enum BidMessageVariants {
2
2
  positive = "POSITIVE",
3
3
  negative = "NEGATIVE"
4
4
  }
5
+ export declare enum BidStatusEnum {
6
+ Winning = "winning",
7
+ Losing = "losing",
8
+ Won = "won",
9
+ Lost = "lost"
10
+ }
@@ -1,4 +1,5 @@
1
- var r = /* @__PURE__ */ ((e) => (e.positive = "POSITIVE", e.negative = "NEGATIVE", e))(r || {});
1
+ var o = /* @__PURE__ */ ((n) => (n.positive = "POSITIVE", n.negative = "NEGATIVE", n))(o || {}), r = /* @__PURE__ */ ((n) => (n.Winning = "winning", n.Losing = "losing", n.Won = "won", n.Lost = "lost", n))(r || {});
2
2
  export {
3
- r as BidMessageVariants
3
+ o as BidMessageVariants,
4
+ r as BidStatusEnum
4
5
  };
@@ -0,0 +1,22 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ export interface FilterMenuProps<ElementType = HTMLFormElement> extends React.HTMLAttributes<ElementType> {
3
+ /**
4
+ * Typically would be a Filter component
5
+ * */
6
+ children: ReactNode;
7
+ /**
8
+ * Optional element to render as the top-level component e.g. 'div', Form, CustomComponent, etc. Defaults to 'form'.
9
+ */
10
+ element?: React.ElementType;
11
+ }
12
+ /**
13
+ * ## Overview
14
+ *
15
+ * A container for filters that controls the state of parent and child filters
16
+ *
17
+ * [Figma Link](https://www.figma.com/design/OvBXAq48blO1r4qYbeBPjW/RW---Sale-Page-(PLP)?node-id=892-71019&node-type=frame&t=AsBDn4UgUEjNUnf7-0)
18
+ *
19
+ * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/patterns-filtercontrol--overview)
20
+ */
21
+ declare const FilterMenu: React.ForwardRefExoticComponent<FilterMenuProps<HTMLFormElement> & React.RefAttributes<HTMLFormElement>>;
22
+ export default FilterMenu;
@@ -0,0 +1,23 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import d, { forwardRef as N, useState as C, Children as g, cloneElement as F } from "react";
3
+ import { getCommonProps as V } from "../../utils/index.js";
4
+ import a from "../../node_modules/classnames/index.js";
5
+ import w from "../../components/Filter/Filter.js";
6
+ const x = N(
7
+ ({ className: t, children: m, element: n = "form", ...r }, l) => {
8
+ const { className: i, ...p } = V(r, "FilterMenu"), [s, f] = C(null), o = s == null ? void 0 : s.length, c = g.map(
9
+ m,
10
+ (e) => d.isValidElement(e) && e.type === w ? F(e, {
11
+ setViewAllFilter: f,
12
+ hidden: o ? s !== e.props.name : !1,
13
+ isViewingAll: o,
14
+ className: o && a(e.props.className, "is-opening")
15
+ }) : e
16
+ );
17
+ return /* @__PURE__ */ u(n, { ...p, ...r, className: a(i, t), ref: l, children: c });
18
+ }
19
+ );
20
+ x.displayName = "FilterControl";
21
+ export {
22
+ x as default
23
+ };
@@ -0,0 +1,29 @@
1
+ declare const meta: {
2
+ title: string;
3
+ component: import('react').ForwardRefExoticComponent<import('./FilterMenu').FilterMenuProps<HTMLFormElement> & import('react').RefAttributes<HTMLFormElement>>;
4
+ };
5
+ export default meta;
6
+ type FilterDimension = {
7
+ label: string;
8
+ active: boolean;
9
+ disabled?: boolean | undefined;
10
+ };
11
+ type FilterType = {
12
+ label: string;
13
+ id: string;
14
+ filterDimensions: FilterDimension[];
15
+ type: 'checkbox' | 'radio';
16
+ };
17
+ type PropTypes = {
18
+ isOpen: boolean;
19
+ filters: FilterType[];
20
+ onClose: () => void;
21
+ };
22
+ export declare const Playground: {
23
+ (props: PropTypes): import("react/jsx-runtime").JSX.Element;
24
+ args: {
25
+ isOpen: boolean;
26
+ filters: FilterType[];
27
+ };
28
+ argTypes: {};
29
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { default as FilterMenu, type FilterMenuProps } from './FilterMenu';
@@ -0,0 +1,10 @@
1
+ export type lotType = {
2
+ id: string;
3
+ lotNumber: number;
4
+ title: string;
5
+ imageSrc: string;
6
+ maker: string;
7
+ price: number;
8
+ collection: string;
9
+ };
10
+ export declare const exampleAuctionLots: lotType[];
@@ -88,7 +88,7 @@ const i = `${u}-viewings-list-card`, dt = ({
88
88
  labelText: q,
89
89
  size: "sm",
90
90
  name: "location",
91
- invalid: n == null ? void 0 : n.location,
91
+ invalid: !!(n != null && n.location),
92
92
  invalidText: n == null ? void 0 : n.location,
93
93
  readOnly: !o
94
94
  }
@@ -1,6 +1,6 @@
1
- import { jsxs as a, Fragment as W, jsx as t } from "react/jsx-runtime";
2
- import b from "../../node_modules/classnames/index.js";
3
- import * as T from "react";
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 = "false",
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 = "false",
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, f] = T.useState(p === "true"), [w, Q] = T.useState(O === "true");
43
- return T.useEffect(() => {
44
- f(p === "true");
45
- }, [p]), /* @__PURE__ */ a(W, { children: [
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 == null ? void 0 : e.viewingLabelValue,
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 == null ? void 0 : e.viewingDates,
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 == null ? void 0 : e.viewingHours1,
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 == null ? void 0 : e.viewingHours2,
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 == null ? void 0 : e.previewOn,
103
+ invalid: !!(e != null && e.previewOn),
104
104
  invalidText: e == null ? void 0 : e.previewOn,
105
- value: !0,
106
105
  name: "previewOn",
107
- onChange: () => f((x) => !x)
106
+ onChange: () => b((x) => !x)
108
107
  }
109
108
  ),
110
109
  m ? null : /* @__PURE__ */ t("input", { type: "hidden", name: "previewOn", value: "false" }),
111
- /* @__PURE__ */ a(
110
+ /* @__PURE__ */ T(
112
111
  "div",
113
112
  {
114
- className: b(`${o}__preview-set`, { [`${o}__preview-set--hidden`]: !m }),
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 == null ? void 0 : e.previewLabelValue,
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 == null ? void 0 : e.previewDates,
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 == null ? void 0 : e.previewHours1,
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 == null ? void 0 : e.previewHours2,
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 == null ? void 0 : e.address1,
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 == null ? void 0 : e.address2,
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 == null ? void 0 : e.address3,
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 == null ? void 0 : e.addressUrl,
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 == null ? void 0 : e.emailOn,
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__ */ a(
235
+ /* @__PURE__ */ T(
238
236
  "div",
239
237
  {
240
- className: b(`${o}__preview-set`, { [`${o}__preview-set--hidden`]: !w }),
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 == null ? void 0 : e.address2,
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 == null ? void 0 : e.address3,
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
+ }
@@ -40,7 +40,7 @@ $lg: #{$px}-input--lg;
40
40
  font-variation-settings: 'wght' 400;
41
41
  }
42
42
 
43
- &:focus-within {
43
+ &:focus-visible {
44
44
  outline: 1px solid $pure-black;
45
45
  }
46
46
  }
@@ -35,7 +35,7 @@
35
35
  .#{$px}-bid-message {
36
36
  align-items: center;
37
37
  display: flex;
38
- gap: 6px;
38
+ gap: $spacing-micro;
39
39
 
40
40
  // Override the default text style being too specific
41
41
  &.#{$px}-bid-message {
@@ -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
+ }