@phillips/seldon 1.94.0 → 1.95.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.
@@ -1,9 +1,9 @@
1
1
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as N, useState as L, useEffect as v } from "react";
3
- import { getCommonProps as g } from "../../utils/index.js";
2
+ import { forwardRef as N, useState as L, useEffect as g } from "react";
3
+ import { getCommonProps as v } from "../../utils/index.js";
4
4
  import x from "../../node_modules/classnames/index.js";
5
5
  import { SupportedLanguages as j } from "../../types/commonTypes.js";
6
- import { CountdownVariants as m } from "./types.js";
6
+ import { CountdownVariants as i } from "./types.js";
7
7
  import { Duration as s } from "./Duration.js";
8
8
  import { zhCN as z } from "../../node_modules/date-fns/locale/zh-CN.js";
9
9
  import { enUS as P } from "../../node_modules/date-fns/locale/en-US.js";
@@ -16,19 +16,19 @@ const E = N(
16
16
  endDateTime: n,
17
17
  formatDurationStr: a,
18
18
  label: l = "Lots Close in",
19
- intervalDescription: f = "Lots Close in 1-minute intervals",
19
+ intervalDescription: f,
20
20
  className: p,
21
21
  locale: h = "en",
22
- variant: u = m.default,
23
- ...c
22
+ variant: c = i.default,
23
+ ...u
24
24
  }, C) => {
25
- const { className: i, ...w } = g(c, "Countdown"), [r, y] = L(/* @__PURE__ */ new Date()), t = h === j.zh ? z : P, o = {
25
+ const { className: m, ...w } = v(u, "Countdown"), [r, y] = L(/* @__PURE__ */ new Date()), t = h === j.zh ? z : P, o = {
26
26
  days: S(n, r),
27
27
  hours: _(n, r) % 24,
28
28
  minutes: $(n, r) % 60,
29
29
  seconds: b(n, r) % 60 % 60
30
30
  };
31
- return v(() => {
31
+ return g(() => {
32
32
  const I = setInterval(() => {
33
33
  y(/* @__PURE__ */ new Date());
34
34
  }, 1e3);
@@ -37,20 +37,20 @@ const E = N(
37
37
  "div",
38
38
  {
39
39
  ...w,
40
- className: x(i, p, {
41
- [`${i}--compact`]: u === m.compact
40
+ className: x(m, p, {
41
+ [`${m}--compact`]: c === i.compact
42
42
  }),
43
- ...c,
43
+ ...u,
44
44
  ref: C,
45
45
  children: [
46
- /* @__PURE__ */ d("div", { className: `${i}__countdown-container`, role: "timer", "aria-label": l, children: [
46
+ /* @__PURE__ */ d("div", { className: `${m}__countdown-container`, role: "timer", "aria-label": l, children: [
47
47
  /* @__PURE__ */ e("span", { children: l }),
48
48
  o.days > 0 ? /* @__PURE__ */ e(s, { duration: o, unit: "days", locale: t, formatDurationStr: a }) : null,
49
49
  o.days > 0 || o.hours > 0 ? /* @__PURE__ */ e(s, { duration: o, unit: "hours", locale: t }) : null,
50
50
  o.days === 0 ? /* @__PURE__ */ e(s, { duration: o, unit: "minutes", locale: t, formatDurationStr: a }) : null,
51
51
  o.days === 0 && o.hours === 0 ? /* @__PURE__ */ e(s, { duration: o, unit: "seconds", locale: t, formatDurationStr: a }) : null
52
52
  ] }),
53
- u === m.default ? /* @__PURE__ */ e("span", { children: f }) : null
53
+ c === i.default ? /* @__PURE__ */ e("span", { children: f }) : null
54
54
  ]
55
55
  }
56
56
  );
@@ -19,15 +19,15 @@ const E = ({
19
19
  selectLabel: C = "Select",
20
20
  ...s
21
21
  }) => {
22
- const N = "pagination", { className: u, ..._ } = w(s, "Pagination"), { id: c } = s, { pendingState: y, setPendingState: I } = k(o(g)), m = y || g, d = (t, e) => {
22
+ const N = "pagination", { className: u, ...I } = w(s, "Pagination"), { id: c } = s, { pendingState: _, setPendingState: y } = k(o(g)), m = _ || g, d = (t, e) => {
23
23
  const a = o(t);
24
- I(a), P(a, e);
24
+ y(a), P(a, e);
25
25
  };
26
26
  return /* @__PURE__ */ O(
27
27
  "div",
28
28
  {
29
29
  className: p(`${r}-${N}`, { [`${u}__wrapper`]: u }, b),
30
- ..._,
30
+ ...I,
31
31
  ...s,
32
32
  children: [
33
33
  /* @__PURE__ */ i(
@@ -58,6 +58,7 @@ const E = ({
58
58
  "data-testid": `${c}-select-button`,
59
59
  hideLabel: !0,
60
60
  disabled: l,
61
+ showIcon: !1,
61
62
  children: n.map((t) => {
62
63
  const e = o(t);
63
64
  return /* @__PURE__ */ i("option", { value: e, children: typeof t == "string" || typeof t == "number" ? t : t.label }, e);
@@ -1,9 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { PaddingTokens } from '../../utils';
3
- import { default as GridItem, GridItemProps } from '../GridItem/GridItem';
4
3
  export interface RowProps extends React.HTMLAttributes<HTMLElement> {
5
- /** These children can be an array of GridItem components */
6
- children: React.ReactElement<GridItemProps, typeof GridItem> | React.ReactElement<GridItemProps, typeof GridItem>[];
7
4
  /**
8
5
  * Optional element to render as the top-level component e.g. 'div', 'span', CustomComponent, etc. Defaults to 'section'.
9
6
  */
@@ -1,10 +1,19 @@
1
1
  import { InputProps } from '../Input/Input';
2
+ import { SelectVariants } from './types';
2
3
  import * as React from 'react';
3
4
  export interface SelectProps extends InputProps {
4
5
  /**
5
6
  * Option elements that are selectable
6
7
  */
7
8
  children: React.ReactNode;
9
+ /**
10
+ * Determines if you want to show the icon
11
+ */
12
+ showIcon?: boolean;
13
+ /**
14
+ * Determines the variant of the select
15
+ */
16
+ variant: SelectVariants;
8
17
  }
9
18
  /**
10
19
  * ## Overview
@@ -1,59 +1,70 @@
1
- import { jsxs as P, jsx as l } from "react/jsx-runtime";
2
- import * as R from "react";
3
- import n from "../../node_modules/classnames/index.js";
4
- import { px as t, useNormalizedInputProps as S } from "../../utils/index.js";
5
- const z = R.forwardRef(
1
+ import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
+ import * as k from "react";
3
+ import i from "../../node_modules/classnames/index.js";
4
+ import { px as e, useNormalizedInputProps as z } from "../../utils/index.js";
5
+ import { SelectVariants as c } from "./types.js";
6
+ import D from "../../assets/chevronDown.svg.js";
7
+ const F = k.forwardRef(
6
8
  ({
7
- children: r,
9
+ children: d,
8
10
  className: a,
9
- defaultValue: d,
10
- disabled: o,
11
- hideLabel: u,
12
- id: i,
13
- inline: m,
14
- invalid: $,
15
- invalidText: c,
16
- labelText: _,
17
- onChange: b,
18
- onClick: f,
19
- readOnly: p,
20
- size: w = "md",
21
- value: h,
22
- warn: v,
23
- warnText: x,
24
- ...N
11
+ defaultValue: m,
12
+ disabled: u,
13
+ hideLabel: $,
14
+ id: n,
15
+ showIcon: l = !0,
16
+ variant: _ = c.default,
17
+ inline: f,
18
+ invalid: b,
19
+ invalidText: v,
20
+ labelText: h,
21
+ onChange: w,
22
+ onClick: V,
23
+ readOnly: r,
24
+ size: C = "md",
25
+ value: x,
26
+ warn: y,
27
+ warnText: N,
28
+ ...S
25
29
  }, j) => {
26
- const s = "select", e = S({ disabled: o, id: i, invalid: $, invalidText: c, readOnly: p, type: s, warn: v, warnText: x }), y = n(`${t}-${s}-input`, `${t}-input`, `${t}-input--${w}`, {
27
- [`${t}-input--inline`]: m,
28
- [`${t}-input--readonly`]: p,
29
- [`${t}-input--disabled`]: e.disabled,
30
- [`${t}-input--invalid`]: e.invalid,
31
- [`${t}-input--warn`]: e.warn,
30
+ const o = "select", t = z({ disabled: u, id: n, invalid: b, invalidText: v, readOnly: r, type: o, warn: y, warnText: N }), P = i(`${e}-${o}-input`, `${e}-input`, `${e}-input--${C}`, {
31
+ [`${e}-input--inline`]: f,
32
+ [`${e}-input--readonly`]: r,
33
+ [`${e}-input--disabled`]: t.disabled,
34
+ [`${e}-input--invalid`]: t.invalid,
35
+ [`${e}-input--warn`]: t.warn,
32
36
  [`${a}__wrapper`]: a
37
+ }), R = i(`${e}-input__input`, {
38
+ className: a,
39
+ [`${e}-input__select--tertiary`]: _ === c.tertiary
40
+ }), g = i(`${e}-select-container`, {
41
+ [`${e}-select-container--show__icon`]: l
33
42
  });
34
- return /* @__PURE__ */ P("div", { className: y, children: [
35
- /* @__PURE__ */ l("label", { htmlFor: i, className: n(`${t}-input__label`, { [`${t}-input__label--hidden`]: u }), children: _ }),
36
- /* @__PURE__ */ l(
37
- "select",
38
- {
39
- className: n(`${t}-input__input`, { className: a }),
40
- "data-testid": i,
41
- defaultValue: d,
42
- disabled: e.disabled,
43
- id: i,
44
- onChange: b,
45
- onClick: f,
46
- ref: j,
47
- value: h,
48
- ...N,
49
- children: r
50
- }
51
- ),
52
- e.validation
43
+ return /* @__PURE__ */ p("div", { className: P, children: [
44
+ /* @__PURE__ */ s("label", { htmlFor: n, className: i(`${e}-input__label`, { [`${e}-input__label--hidden`]: $ }), children: h }),
45
+ /* @__PURE__ */ p("div", { className: g, children: [
46
+ /* @__PURE__ */ s(
47
+ "select",
48
+ {
49
+ className: R,
50
+ "data-testid": n,
51
+ defaultValue: m,
52
+ disabled: t.disabled,
53
+ id: n,
54
+ onChange: w,
55
+ ref: j,
56
+ value: x,
57
+ ...S,
58
+ children: d
59
+ }
60
+ ),
61
+ l ? /* @__PURE__ */ s(D, {}) : null
62
+ ] }),
63
+ t.validation
53
64
  ] });
54
65
  }
55
66
  );
56
- z.displayName = "Select";
67
+ F.displayName = "Select";
57
68
  export {
58
- z as default
69
+ F as default
59
70
  };
@@ -1,4 +1,5 @@
1
1
  import { SelectProps } from './Select';
2
+ import { SelectVariants } from './types';
2
3
  declare const meta: {
3
4
  title: string;
4
5
  component: import('react').ForwardRefExoticComponent<Omit<SelectProps, "ref"> & import('react').RefAttributes<HTMLSelectElement>>;
@@ -13,12 +14,14 @@ export declare const Playground: {
13
14
  playgroundWidth: number;
14
15
  className: string;
15
16
  defaultValue: string;
17
+ showIcon: boolean;
16
18
  disabled: boolean;
17
19
  invalid: boolean;
18
20
  invalidText: string;
19
21
  labelText: string;
20
22
  readOnly: boolean;
21
23
  size: string;
24
+ variant: SelectVariants;
22
25
  warn: boolean;
23
26
  warnText: string;
24
27
  };
@@ -33,6 +36,11 @@ export declare const Playground: {
33
36
  type: string;
34
37
  };
35
38
  };
39
+ showIcon: {
40
+ control: {
41
+ type: string;
42
+ };
43
+ };
36
44
  invalid: {
37
45
  control: {
38
46
  type: string;
@@ -68,6 +76,12 @@ export declare const Playground: {
68
76
  type: string;
69
77
  };
70
78
  };
79
+ variant: {
80
+ options: SelectVariants[];
81
+ control: {
82
+ type: string;
83
+ };
84
+ };
71
85
  value: {
72
86
  control: {
73
87
  type: string;
@@ -90,3 +104,19 @@ export declare const Playground: {
90
104
  };
91
105
  };
92
106
  };
107
+ export declare const Tertiary: {
108
+ ({ playgroundWidth, ...args }: StoryProps): import("react/jsx-runtime").JSX.Element;
109
+ args: {
110
+ showIcon: boolean;
111
+ variant: SelectVariants;
112
+ };
113
+ argTypes: {
114
+ variant: {
115
+ options: SelectVariants[];
116
+ control: {
117
+ type: string;
118
+ };
119
+ defaultValue: SelectVariants;
120
+ };
121
+ };
122
+ };
@@ -0,0 +1,4 @@
1
+ export declare enum SelectVariants {
2
+ default = "default",
3
+ tertiary = "tertiary"
4
+ }
@@ -0,0 +1,4 @@
1
+ var t = /* @__PURE__ */ ((r) => (r.default = "default", r.tertiary = "tertiary", r))(t || {});
2
+ export {
3
+ t as SelectVariants
4
+ };
package/dist/index.d.ts CHANGED
@@ -26,6 +26,7 @@ export { default as GridItem, type GridItemProps } from './components/GridItem/G
26
26
  export { GridItemAlign } from './components/GridItem/types';
27
27
  export { default as Search, type SearchProps } from './components/Search/Search';
28
28
  export { default as Select, type SelectProps } from './components/Select/Select';
29
+ export { SelectVariants } from './components/Select/types';
29
30
  export { default as SplitPanel, type SplitPanelProps } from './components/SplitPanel/SplitPanel';
30
31
  export { default as Subscribe, type SubscribeProps } from './patterns/Subscribe/Subscribe';
31
32
  export { SubscriptionState } from './patterns/Subscribe/types';
package/dist/index.js CHANGED
@@ -3,12 +3,12 @@ import { default as S } from "./assets/account_circle.svg.js";
3
3
  import { default as L } from "./assets/arrowPrev.svg.js";
4
4
  import { default as b } from "./assets/calendar.svg.js";
5
5
  import { default as T } from "./assets/calendarAlt.svg.js";
6
- import { default as k } from "./assets/chevronDown.svg.js";
6
+ import { default as V } from "./assets/chevronDown.svg.js";
7
7
  import { default as B } from "./assets/chevronNext.svg.js";
8
8
  import { default as w } from "./assets/chevronRight.svg.js";
9
9
  import { default as D } from "./assets/close.svg.js";
10
- import { default as F } from "./assets/favorite.svg.js";
11
- import { default as M } from "./assets/favoriteOutline.svg.js";
10
+ import { default as N } from "./assets/favorite.svg.js";
11
+ import { default as H } from "./assets/favoriteOutline.svg.js";
12
12
  import { default as O } from "./assets/icon-footer-facebook.svg.js";
13
13
  import { default as G } from "./assets/icon-footer-instagram.svg.js";
14
14
  import { default as E } from "./assets/icon-footer-linkedin.svg.js";
@@ -30,12 +30,12 @@ import { usePendingState as ce } from "./utils/hooks.js";
30
30
  import { SSRMediaQuery as Se, ssrMediaQueryStyle as he } from "./providers/SeldonProvider/utils.js";
31
31
  import { AuctionStatus as Pe, SupportedLanguages as be } from "./types/commonTypes.js";
32
32
  import { default as Te } from "./components/Button/Button.js";
33
- import { ButtonVariants as ke } from "./components/Button/types.js";
33
+ import { ButtonVariants as Ve } from "./components/Button/types.js";
34
34
  import { default as Be } from "./components/IconButton/IconButton.js";
35
35
  import { default as we } from "./components/ErrorBoundary/ErrorBoundary.js";
36
36
  import { default as De } from "./site-furniture/Footer/Footer.js";
37
- import { Grid as Fe } from "./components/Grid/Grid.js";
38
- import { default as Me } from "./site-furniture/Header/Header.js";
37
+ import { Grid as Ne } from "./components/Grid/Grid.js";
38
+ import { default as He } from "./site-furniture/Header/Header.js";
39
39
  import { default as Oe } from "./components/Navigation/Navigation.js";
40
40
  import { default as Ge } from "./components/Navigation/NavigationItem/NavigationItem.js";
41
41
  import { default as Ee } from "./components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
@@ -51,110 +51,113 @@ import { default as so } from "./components/GridItem/GridItem.js";
51
51
  import { GridItemAlign as mo } from "./components/GridItem/types.js";
52
52
  import { default as uo } from "./components/Search/Search.js";
53
53
  import { default as no } from "./components/Select/Select.js";
54
- import { default as go } from "./components/SplitPanel/SplitPanel.js";
55
- import { default as Co } from "./patterns/Subscribe/Subscribe.js";
56
- import { SubscriptionState as ho } from "./patterns/Subscribe/types.js";
57
- import { default as Po } from "./patterns/Social/Social.js";
58
- import { default as Io } from "./patterns/ViewingsList/ViewingsList.js";
59
- import { default as Ao } from "./components/Modal/Modal.js";
54
+ import { SelectVariants as go } from "./components/Select/types.js";
55
+ import { default as Co } from "./components/SplitPanel/SplitPanel.js";
56
+ import { default as ho } from "./patterns/Subscribe/Subscribe.js";
57
+ import { SubscriptionState as Po } from "./patterns/Subscribe/types.js";
58
+ import { default as Io } from "./patterns/Social/Social.js";
59
+ import { default as Ao } from "./patterns/ViewingsList/ViewingsList.js";
60
+ import { default as ko } from "./components/Modal/Modal.js";
60
61
  import { default as vo } from "./components/Drawer/Drawer.js";
61
- import { default as Vo } from "./components/Pagination/Pagination.js";
62
- import { default as yo } from "./components/Tags/Tags.js";
63
- import { default as No } from "./patterns/ViewingsList/StatefulViewingsList.js";
64
- import { TextVariants as Ho } from "./components/Text/types.js";
65
- import { default as Ro } from "./components/Text/Text.js";
66
- import { TextSymbolVariants as Uo } from "./components/TextSymbol/types.js";
67
- import { default as Wo } from "./components/TextSymbol/TextSymbol.js";
68
- import { default as Qo } from "./components/Accordion/Accordion.js";
69
- import { default as jo } from "./components/Accordion/AccordionItem.js";
70
- import { AccordionItemVariant as Zo, AccordionVariants as qo } from "./components/Accordion/types.js";
71
- import { default as Ko } from "./patterns/UserManagement/UserManagement.js";
72
- import { AuthState as _o } from "./patterns/UserManagement/types.js";
73
- import { default as et } from "./components/Breadcrumb/Breadcrumb.js";
62
+ import { default as yo } from "./components/Pagination/Pagination.js";
63
+ import { default as Mo } from "./components/Tags/Tags.js";
64
+ import { default as Fo } from "./patterns/ViewingsList/StatefulViewingsList.js";
65
+ import { TextVariants as Ro } from "./components/Text/types.js";
66
+ import { default as Uo } from "./components/Text/Text.js";
67
+ import { TextSymbolVariants as Wo } from "./components/TextSymbol/types.js";
68
+ import { default as Qo } from "./components/TextSymbol/TextSymbol.js";
69
+ import { default as jo } from "./components/Accordion/Accordion.js";
70
+ import { default as Zo } from "./components/Accordion/AccordionItem.js";
71
+ import { AccordionItemVariant as Jo, AccordionVariants as Ko } from "./components/Accordion/types.js";
72
+ import { default as _o } from "./patterns/UserManagement/UserManagement.js";
73
+ import { AuthState as et } from "./patterns/UserManagement/types.js";
74
+ import { default as tt } from "./components/Breadcrumb/Breadcrumb.js";
74
75
  import "react/jsx-runtime";
75
76
  import "./node_modules/classnames/index.js";
76
- import { default as tt } from "./components/Dropdown/Dropdown.js";
77
- import { default as at } from "./components/Video/Video.js";
78
- import { default as st } from "./patterns/LanguageSelector/LanguageSelector.js";
79
- import { default as dt } from "./components/ContentPeek/ContentPeek.js";
80
- import { HeightUnits as pt } from "./components/ContentPeek/utils.js";
81
- import { default as xt } from "./components/Collapsible/Collapsible.js";
82
- import { default as it } from "./components/Collapsible/CollapsibleContent.js";
83
- import { default as ct } from "./components/Collapsible/CollapsibleTrigger.js";
84
- import { SeldonProvider as St } from "./providers/SeldonProvider/SeldonProvider.js";
85
- import { default as Lt } from "./components/PageContentWrapper/PageContentWrapper.js";
86
- import { default as bt } from "./components/Carousel/Carousel.js";
87
- import { default as Tt } from "./components/Carousel/CarouselContent.js";
88
- import { default as kt } from "./components/Carousel/CarouselItem.js";
89
- import { default as Bt } from "./components/Carousel/CarouselDots.js";
90
- import { default as wt } from "./components/Detail/Detail.js";
91
- import { default as Dt } from "./patterns/DetailList/DetailList.js";
92
- import { DetailListAlignment as Ft } from "./patterns/DetailList/types.js";
93
- import { default as Mt } from "./components/PinchZoom/PinchZoom.js";
94
- import { default as Ot } from "./components/Tabs/TabsContainer.js";
95
- import { default as Gt } from "./components/Tabs/TabsContent.js";
96
- import { default as Et } from "./components/SeldonImage/SeldonImage.js";
97
- import { default as Yt } from "./patterns/SaleHeaderBanner/SaleHeaderBanner.js";
98
- import { default as zt } from "./patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js";
99
- import { AuctionState as qt } from "./patterns/SaleHeaderBanner/types.js";
100
- import { default as Kt } from "./components/Countdown/Countdown.js";
101
- import { CountdownVariants as _t } from "./components/Countdown/types.js";
102
- import { default as er } from "./patterns/ObjectTile/ObjectTile.js";
103
- import { default as tr } from "./patterns/BidSnapshot/BidSnapshot.js";
104
- import { default as ar } from "./patterns/BidSnapshot/BidMessage.js";
77
+ import { default as at } from "./components/Dropdown/Dropdown.js";
78
+ import { default as st } from "./components/Video/Video.js";
79
+ import { default as dt } from "./patterns/LanguageSelector/LanguageSelector.js";
80
+ import { default as pt } from "./components/ContentPeek/ContentPeek.js";
81
+ import { HeightUnits as xt } from "./components/ContentPeek/utils.js";
82
+ import { default as it } from "./components/Collapsible/Collapsible.js";
83
+ import { default as ct } from "./components/Collapsible/CollapsibleContent.js";
84
+ import { default as St } from "./components/Collapsible/CollapsibleTrigger.js";
85
+ import { SeldonProvider as Lt } from "./providers/SeldonProvider/SeldonProvider.js";
86
+ import { default as bt } from "./components/PageContentWrapper/PageContentWrapper.js";
87
+ import { default as Tt } from "./components/Carousel/Carousel.js";
88
+ import { default as Vt } from "./components/Carousel/CarouselContent.js";
89
+ import { default as Bt } from "./components/Carousel/CarouselItem.js";
90
+ import { default as wt } from "./components/Carousel/CarouselDots.js";
91
+ import { default as Dt } from "./components/Detail/Detail.js";
92
+ import { default as Nt } from "./patterns/DetailList/DetailList.js";
93
+ import { DetailListAlignment as Ht } from "./patterns/DetailList/types.js";
94
+ import { default as Ot } from "./components/PinchZoom/PinchZoom.js";
95
+ import { default as Gt } from "./components/Tabs/TabsContainer.js";
96
+ import { default as Et } from "./components/Tabs/TabsContent.js";
97
+ import { default as Yt } from "./components/SeldonImage/SeldonImage.js";
98
+ import { default as zt } from "./patterns/SaleHeaderBanner/SaleHeaderBanner.js";
99
+ import { default as qt } from "./patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js";
100
+ import { AuctionState as Kt } from "./patterns/SaleHeaderBanner/types.js";
101
+ import { default as _t } from "./components/Countdown/Countdown.js";
102
+ import { CountdownVariants as er } from "./components/Countdown/types.js";
103
+ import { default as tr } from "./patterns/ObjectTile/ObjectTile.js";
104
+ import { default as ar } from "./patterns/BidSnapshot/BidSnapshot.js";
105
+ import { default as sr } from "./patterns/BidSnapshot/BidMessage.js";
106
+ import { BidMessageVariants as dr } from "./patterns/BidSnapshot/types.js";
105
107
  export {
106
- Qo as Accordion,
107
- jo as AccordionItem,
108
- Zo as AccordionItemVariant,
109
- qo as AccordionVariants,
108
+ jo as Accordion,
109
+ Zo as AccordionItem,
110
+ Jo as AccordionItemVariant,
111
+ Ko as AccordionVariants,
110
112
  S as AccountCircle,
111
113
  L as ArrowPrev,
112
- qt as AuctionState,
114
+ Kt as AuctionState,
113
115
  Pe as AuctionStatus,
114
- _o as AuthState,
115
- ar as BidMessage,
116
- tr as BidSnapshot,
117
- et as Breadcrumb,
116
+ et as AuthState,
117
+ sr as BidMessage,
118
+ dr as BidMessageVariants,
119
+ ar as BidSnapshot,
120
+ tt as Breadcrumb,
118
121
  Te as Button,
119
- ke as ButtonVariants,
122
+ Ve as ButtonVariants,
120
123
  b as Calendar,
121
124
  T as CalendarAlt,
122
- bt as Carousel,
123
- Tt as CarouselContent,
124
- Bt as CarouselDots,
125
- kt as CarouselItem,
126
- k as ChevronDown,
125
+ Tt as Carousel,
126
+ Vt as CarouselContent,
127
+ wt as CarouselDots,
128
+ Bt as CarouselItem,
129
+ V as ChevronDown,
127
130
  B as ChevronNext,
128
131
  w as ChevronRight,
129
132
  D as Close,
130
- xt as Collapsible,
131
- it as CollapsibleContent,
132
- ct as CollapsibleTrigger,
133
- dt as ContentPeek,
134
- pt as ContentPeekHeightUnits,
135
- Kt as Countdown,
136
- _t as CountdownVariants,
137
- wt as Detail,
138
- Dt as DetailList,
139
- Ft as DetailListAlignment,
133
+ it as Collapsible,
134
+ ct as CollapsibleContent,
135
+ St as CollapsibleTrigger,
136
+ pt as ContentPeek,
137
+ xt as ContentPeekHeightUnits,
138
+ _t as Countdown,
139
+ er as CountdownVariants,
140
+ Dt as Detail,
141
+ Nt as DetailList,
142
+ Ht as DetailListAlignment,
140
143
  vo as Drawer,
141
- tt as Dropdown,
144
+ at as Dropdown,
142
145
  we as ErrorBoundary,
143
146
  O as Facebook,
144
- F as Favorite,
145
- M as FavoriteOutline,
147
+ N as Favorite,
148
+ H as FavoriteOutline,
146
149
  De as Footer,
147
150
  G as FooterInstagram,
148
151
  z as FooterWeChat,
149
- Fe as Grid,
152
+ Ne as Grid,
150
153
  so as GridItem,
151
154
  mo as GridItemAlign,
152
- Me as Header,
155
+ He as Header,
153
156
  ze as HeroBanner,
154
157
  Be as IconButton,
155
158
  qe as Input,
156
159
  q as Instagram,
157
- st as LanguageSelector,
160
+ dt as LanguageSelector,
158
161
  Ke as Link,
159
162
  eo as LinkBlock,
160
163
  to as LinkList,
@@ -162,48 +165,49 @@ export {
162
165
  E as LinkedIn,
163
166
  K as Lock,
164
167
  _ as Minus,
165
- Ao as Modal,
168
+ ko as Modal,
166
169
  Oe as Navigation,
167
170
  Ge as NavigationItem,
168
171
  Ee as NavigationItemTrigger,
169
172
  Ye as NavigationList,
170
- er as ObjectTile,
173
+ tr as ObjectTile,
171
174
  f as PaddingTokens,
172
175
  ie as Page,
173
- Lt as PageContentWrapper,
174
- Vo as Pagination,
176
+ bt as PageContentWrapper,
177
+ yo as Pagination,
175
178
  ee as PhillipsLogo,
176
- Mt as PinchZoom,
179
+ Ot as PinchZoom,
177
180
  te as Plus,
178
181
  ae as React,
179
182
  Y as Reddit,
180
183
  ao as Row,
181
184
  Se as SSRMediaQuery,
182
- Yt as SaleHeaderBanner,
183
- zt as SaleHeaderBrowseAuctions,
185
+ zt as SaleHeaderBanner,
186
+ qt as SaleHeaderBrowseAuctions,
184
187
  uo as Search,
185
- Et as SeldonImage,
186
- St as SeldonProvider,
188
+ Yt as SeldonImage,
189
+ Lt as SeldonProvider,
187
190
  no as Select,
191
+ go as SelectVariants,
188
192
  se as Share,
189
- Po as Social,
193
+ Io as Social,
190
194
  s as SpacingTokens,
191
- go as SplitPanel,
195
+ Co as SplitPanel,
192
196
  de as Spotify,
193
- No as StatefulViewingsList,
194
- Co as Subscribe,
195
- ho as SubscriptionState,
197
+ Fo as StatefulViewingsList,
198
+ ho as Subscribe,
199
+ Po as SubscriptionState,
196
200
  be as SupportedLanguages,
197
- Ot as TabsContainer,
198
- Gt as TabsContent,
199
- yo as TagsList,
200
- Ro as Text,
201
- Uo as TextSymbolVariants,
202
- Wo as TextSymbols,
203
- Ho as TextVariants,
204
- Ko as UserManagement,
205
- at as Video,
206
- Io as ViewingsList,
201
+ Gt as TabsContainer,
202
+ Et as TabsContent,
203
+ Mo as TagsList,
204
+ Uo as Text,
205
+ Wo as TextSymbolVariants,
206
+ Qo as TextSymbols,
207
+ Ro as TextVariants,
208
+ _o as UserManagement,
209
+ st as Video,
210
+ Ao as ViewingsList,
207
211
  pe as WeChat,
208
212
  xe as Youtube,
209
213
  l as defaultYear,
@@ -2,21 +2,25 @@ import { ComponentProps } from 'react';
2
2
  import { AuctionStatus, SupportedLanguages } from '../../types/commonTypes';
3
3
  export interface BidSnapshotProps extends ComponentProps<'div'> {
4
4
  /**
5
- * Active bid of current signed in user. - '$1,000'
5
+ * Active bid of current signed in user. - '1000'
6
6
  */
7
- activeBid?: string;
7
+ activeBid?: number | null;
8
8
  /**
9
9
  * State of the object
10
10
  */
11
11
  auctionStatus?: AuctionStatus;
12
- /**
13
- * An array of bids for the Object. Should include current bid as last element
14
- */
15
- bids?: string[];
16
12
  /**
17
13
  * Bids label text, a fucntion for label of bids amoutn (2 bids, 3 bids, etc) where the number is the length of the bids array.
18
14
  */
19
15
  bidsLabelText?: (numberOfBids: number) => string;
16
+ /**
17
+ * Currency to use for object - '$'
18
+ */
19
+ currency?: string | null;
20
+ /**
21
+ * The current highest bid for the object - '1000'
22
+ */
23
+ currentBid?: number | null;
20
24
  /**
21
25
  * Current bid text, a string for label of current bid detail
22
26
  */
@@ -36,11 +40,15 @@ export interface BidSnapshotProps extends ComponentProps<'div'> {
36
40
  /**
37
41
  * End time for this object
38
42
  */
39
- lotCloseDate?: Date;
43
+ lotCloseDate?: Date | null;
44
+ /**
45
+ * Number of bids for each lot
46
+ */
47
+ numberOfBids?: number;
40
48
  /**
41
- * Default Starting bid amount for the object - '$1,000'
49
+ * Default Starting bid amount for the object - '1000'
42
50
  */
43
- startingBid: string;
51
+ startingBid?: number | null;
44
52
  /**
45
53
  * Starting bid text, a string for label of starting bid detail
46
54
  */
@@ -1,61 +1,64 @@
1
- import { jsxs as j, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as D } from "react";
3
- import R from "../../node_modules/classnames/index.js";
4
- import { getCommonProps as W } from "../../utils/index.js";
5
- import _ from "../DetailList/DetailList.js";
6
- import A from "../../components/Detail/Detail.js";
7
- import { AuctionStatus as t, SupportedLanguages as V } from "../../types/commonTypes.js";
8
- import k from "../../components/Countdown/Countdown.js";
9
- import { CountdownVariants as q } from "../../components/Countdown/types.js";
10
- const z = (s) => s === 1 ? `${s} bid` : `${s} bids`, E = D(
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 = _(
11
11
  ({
12
12
  activeBid: s,
13
- auctionStatus: n = t.ready,
14
- bids: a = [],
15
- bidsLabelText: f = z,
16
- children: h,
17
- className: u,
18
- closingText: g = "Closes in",
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,
19
20
  currentBidText: C = "Current bid",
20
- formatDurationStr: S = (o) => o.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
21
- lang: $ = "en",
21
+ formatDurationStr: g = (o) => o.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
22
+ lang: v = "en",
22
23
  lotCloseDate: m,
23
- startingBid: b,
24
- startingBidText: v = "Starting bid",
25
- soldForText: N = "Sold for",
26
- wonForText: w = "Won for",
24
+ numberOfBids: p = 0,
25
+ startingBid: L,
26
+ startingBidText: N = "Starting bid",
27
+ soldForText: w = "Sold for",
28
+ wonForText: x = "Won for",
27
29
  ...c
28
- }, x) => {
29
- const { className: o, ...y } = W(c, "BidSnapshot"), e = a.length > 0, p = e && a[a.length - 1], L = s === p, d = n === t.ready, r = n === t.live, T = n === t.past, B = r && m, P = R(o, u, {
30
- [`${o}--live`]: r,
31
- [`${o}--has-bids`]: e
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
35
  });
33
- let i = C;
34
- return (d || !e) && (i = v), T && e && (i = L ? w : N), /* @__PURE__ */ j("div", { ...y, ...c, ref: x, className: P, children: [
35
- /* @__PURE__ */ l(_, { hasSeparators: !0, className: `${o}__text`, children: /* @__PURE__ */ l(
36
- A,
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,
37
40
  {
38
- label: i,
39
- subLabel: r && a.length > 0 && `(${f(a.length)})`,
40
- value: p || b,
41
+ label: r,
42
+ subLabel: n && a && `(${h(p)})`,
43
+ value: `${S}${(f = a || L) == null ? void 0 : f.toLocaleString()}`,
41
44
  hasWrap: !1
42
45
  }
43
46
  ) }),
44
- s && !d ? h : null,
45
- B ? /* @__PURE__ */ l(
46
- k,
47
+ s && !d ? $ : null,
48
+ D ? /* @__PURE__ */ l(
49
+ E,
47
50
  {
48
51
  endDateTime: m,
49
- label: g,
50
- variant: q.compact,
51
- locale: V[$],
52
- formatDurationStr: S
52
+ label: u,
53
+ variant: F.compact,
54
+ locale: z[v],
55
+ formatDurationStr: g
53
56
  }
54
57
  ) : null
55
58
  ] });
56
59
  }
57
60
  );
58
- E.displayName = "BidSnapshot";
61
+ H.displayName = "BidSnapshot";
59
62
  export {
60
- E as default
63
+ H as default
61
64
  };
@@ -16,12 +16,14 @@ export default meta;
16
16
  export declare const Playground: {
17
17
  (props: BidSnapshotProps): import("react/jsx-runtime").JSX.Element;
18
18
  args: {
19
- activeBid: string;
19
+ activeBid: number;
20
+ currency: string;
21
+ numberOfBids: number;
20
22
  auctionStatus: AuctionStatus;
21
- bids: string[];
23
+ currentBid: number;
22
24
  lotCloseDate: Date;
23
25
  lang: import('date-fns').Locale;
24
- startingBid: string;
26
+ startingBid: number;
25
27
  };
26
28
  argTypes: {};
27
29
  };
@@ -1,2 +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';
@@ -1,7 +1,4 @@
1
1
  import { ComponentProps, ElementType } from 'react';
2
- type ObjectTileElement = ElementType<Omit<ObjectTileProps, 'imageUrl' | 'lotNumber' | 'referenceNumber'> & {
3
- 'data-testid': string;
4
- }>;
5
2
  export interface ObjectTileProps extends ComponentProps<'a'> {
6
3
  /**
7
4
  * Optional Object badge.
@@ -10,7 +7,7 @@ export interface ObjectTileProps extends ComponentProps<'a'> {
10
7
  /**
11
8
  * Optional Element to render at the top level.
12
9
  */
13
- element?: ObjectTileElement;
10
+ element?: ElementType<ComponentProps<'a'>>;
14
11
  /**
15
12
  * Estimate for object.
16
13
  */
@@ -9,25 +9,25 @@ import D from "../../components/Detail/Detail.js";
9
9
  import R from "../../components/SeldonImage/SeldonImage.js";
10
10
  const S = y(
11
11
  ({
12
- badgeText: f,
13
- className: p,
12
+ badgeText: p,
13
+ className: f,
14
14
  children: $,
15
15
  element: r,
16
- estimate: m,
16
+ estimate: t,
17
17
  estimateLabelText: N = "Estimate",
18
- favoriteElement: o,
18
+ favoriteElement: m,
19
19
  imageAlt: u = "Brought to you by Phillips",
20
20
  imageUrl: g = "",
21
- lotNumber: v,
22
- makerText: c,
23
- modelText: _,
24
- referenceNumber: d,
25
- titleText: h,
21
+ lotNumber: b,
22
+ makerText: o,
23
+ modelText: c,
24
+ referenceNumber: _,
25
+ titleText: d,
26
26
  withdrawnText: n,
27
- ...t
28
- }, b) => {
29
- const { className: a, ...j } = O(t, "ObjectTile"), k = r != null ? r : t.href ? "a" : "div";
30
- return /* @__PURE__ */ s(k, { ...j, className: C(a, p), ...t, ref: b, children: [
27
+ ...h
28
+ }, v) => {
29
+ const { className: a, ...j } = O(h, "ObjectTile"), k = r != null ? r : "a";
30
+ return /* @__PURE__ */ s(k, { ...j, className: C(a, f), ...h, ref: v, children: [
31
31
  /* @__PURE__ */ e(
32
32
  R,
33
33
  {
@@ -38,48 +38,48 @@ const S = y(
38
38
  src: g
39
39
  }
40
40
  ),
41
- n ? null : /* @__PURE__ */ e(i, { className: `${a}__badge`, variant: l.badge, children: f }),
41
+ n ? null : /* @__PURE__ */ e(i, { className: `${a}__badge`, variant: l.badge, children: p }),
42
42
  /* @__PURE__ */ s("div", { className: `${a}__lot-number-like`, children: [
43
- /* @__PURE__ */ e(i, { className: `${a}__lot-number`, variant: l.heading3, element: "p", children: v }),
44
- o && /* @__PURE__ */ e(o, {})
43
+ /* @__PURE__ */ e(i, { className: `${a}__lot-number`, variant: l.heading3, element: "p", children: b }),
44
+ m && /* @__PURE__ */ e(m, {})
45
45
  ] }),
46
46
  n ? /* @__PURE__ */ e(i, { className: `${a}__withdrawn`, variant: l.heading4, children: n }) : /* @__PURE__ */ s(x, { children: [
47
47
  /* @__PURE__ */ s("div", { className: `${a}__meta`, children: [
48
- c ? /* @__PURE__ */ e(i, { className: `${a}__maker`, variant: l.heading3, children: c }) : null,
49
- h ? /* @__PURE__ */ e(
48
+ o ? /* @__PURE__ */ e(i, { className: `${a}__maker`, variant: l.heading3, children: o }) : null,
49
+ d ? /* @__PURE__ */ e(
50
50
  i,
51
51
  {
52
52
  className: `${a}__title ${a}__token-fix`,
53
53
  variant: l.heading4,
54
54
  element: "cite",
55
- children: h
55
+ children: d
56
56
  }
57
57
  ) : null,
58
- d ? /* @__PURE__ */ e(
58
+ _ ? /* @__PURE__ */ e(
59
59
  i,
60
60
  {
61
61
  className: `${a}__reference-number ${a}__token-fix`,
62
62
  variant: l.heading4,
63
63
  element: "p",
64
- children: d
64
+ children: _
65
65
  }
66
66
  ) : null,
67
- _ ? /* @__PURE__ */ e(
67
+ c ? /* @__PURE__ */ e(
68
68
  i,
69
69
  {
70
70
  className: `${a}__model ${a}__token-fix`,
71
71
  variant: l.heading4,
72
72
  element: "p",
73
- children: _
73
+ children: c
74
74
  }
75
75
  ) : null
76
76
  ] }),
77
- m ? /* @__PURE__ */ e(P, { hasSeparators: !0, className: `${a}__estimate ${a}__section`, children: /* @__PURE__ */ e(
77
+ t ? /* @__PURE__ */ e(P, { hasSeparators: !0, className: `${a}__estimate ${a}__section`, children: /* @__PURE__ */ e(
78
78
  D,
79
79
  {
80
80
  className: `${a}__estimate__label`,
81
81
  label: N,
82
- value: m,
82
+ value: t,
83
83
  hasWrap: !1
84
84
  }
85
85
  ) }) : null,
@@ -32,6 +32,7 @@
32
32
  @use 'components/Drawer/drawer';
33
33
  @use 'components/Dropdown/dropdown';
34
34
  @use 'components/Video/video';
35
+ @use 'components/Select/select';
35
36
  @use 'components/Pagination/pagination';
36
37
  @use 'components/ContentPeek/contentPeek';
37
38
  @use 'components/PageContentWrapper/pageContentWrapper';
@@ -0,0 +1,74 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-select-input {
4
+ position: relative;
5
+
6
+ .#{$px}-select-container {
7
+ position: relative;
8
+
9
+ &--show__icon {
10
+ select {
11
+ appearance: none;
12
+ padding-right: 1.55rem;
13
+
14
+ @media (min-width: $breakpoint-md) {
15
+ padding-right: 1.95rem;
16
+ }
17
+
18
+ @media (min-width: $breakpoint-xl) {
19
+ padding-right: 2.25rem;
20
+ }
21
+ }
22
+ }
23
+ }
24
+
25
+ svg {
26
+ height: 1rem;
27
+ pointer-events: none;
28
+ position: absolute;
29
+ right: 0.35rem;
30
+ top: 45%;
31
+ transform: translateY(-45%);
32
+ width: 1rem;
33
+
34
+ @media (min-width: $breakpoint-md) {
35
+ height: 1.25rem;
36
+ right: 0.5rem;
37
+ width: 1.25rem;
38
+ }
39
+
40
+ @media (min-width: $breakpoint-xl) {
41
+ height: 1.5rem;
42
+ right: 0.55rem;
43
+ width: 1.5rem;
44
+ }
45
+
46
+ path {
47
+ fill: $pure-black;
48
+ }
49
+ }
50
+
51
+ select.#{$px}-input {
52
+ &__select {
53
+ &--tertiary {
54
+ border: 0;
55
+ color: inherit;
56
+
57
+ &:hover {
58
+ cursor: pointer;
59
+ }
60
+
61
+ &:focus-visible {
62
+ background-color: $pure-white;
63
+ border-radius: 0;
64
+ outline-color: $soft-black;
65
+ outline-offset: 4.5px;
66
+ }
67
+
68
+ svg {
69
+ top: 0.625rem;
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
@@ -23,9 +23,10 @@
23
23
  @include Montserrat;
24
24
  }
25
25
 
26
- &--live {
26
+ &--live:has(.#{$px}-countdown) {
27
27
  border-bottom: 1px solid $light-gray;
28
28
  }
29
+
29
30
  &--has-bids .#{$px}-detail__value {
30
31
  font-variation-settings: 'wght' 600;
31
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.94.0",
3
+ "version": "1.95.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"