@phillips/seldon 1.213.0 → 1.214.0-beta.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/_virtual/index4.js +2 -2
- package/dist/_virtual/index5.js +2 -2
- package/dist/_virtual/index6.js +2 -2
- package/dist/assets/formatted/Clock.d.ts +9 -0
- package/dist/assets/formatted/Clock.js +35 -0
- package/dist/assets/formatted/index.d.ts +1 -0
- package/dist/assets/formatted/index.js +14 -12
- package/dist/components/AddToCalendar/AddToCalendar.js +24 -25
- package/dist/components/Article/Article.js +17 -17
- package/dist/components/Breadcrumb/BreadcrumbItem.js +13 -13
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.js +71 -53
- package/dist/components/Button/Button.stories.d.ts +7 -1
- package/dist/components/ComboBox/ComboBox.js +34 -29
- package/dist/components/ComposedModal/ComposedModal.js +33 -33
- package/dist/components/ComposedModal/ComposedModal.stories.d.ts +1 -0
- package/dist/components/Countdown/Countdown.js +90 -51
- package/dist/components/Countdown/Duration.d.ts +3 -1
- package/dist/components/Countdown/Duration.js +17 -9
- package/dist/components/Countdown/types.d.ts +2 -1
- package/dist/components/Countdown/types.js +1 -1
- package/dist/components/DescriptiveRadioButton/DescriptiveRadioButton.js +21 -21
- package/dist/components/Detail/Detail.d.ts +2 -0
- package/dist/components/Detail/Detail.js +26 -15
- package/dist/components/Detail/Detail.stories.d.ts +9 -2
- package/dist/components/Drawer/DrawerHeader.js +22 -20
- package/dist/components/ExitGateCard/ExitGateCard.js +29 -29
- package/dist/components/FavoritingTileButton/FavoritingTileButton.js +30 -31
- package/dist/components/Filter/Filter.js +36 -34
- package/dist/components/Filter/FilterHeader.d.ts +4 -0
- package/dist/components/Filter/FilterHeader.js +30 -22
- package/dist/components/Input/Input.js +43 -39
- package/dist/components/Input/Input.stories.d.ts +16 -0
- package/dist/components/Link/Link.js +11 -11
- package/dist/components/Link/Link.stories.d.ts +17 -1
- package/dist/components/Link/types.d.ts +9 -4
- package/dist/components/Link/types.js +3 -3
- package/dist/components/LinkBlock/LinkBlock.js +19 -11
- package/dist/components/Modal/Modal.d.ts +0 -4
- package/dist/components/Modal/Modal.js +6 -6
- package/dist/components/Navigation/NavigationItem/NavigationItem.js +31 -23
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +29 -29
- package/dist/components/Navigation/NavigationList/NavigationList.js +5 -5
- package/dist/components/Pagination/Pagination.js +22 -21
- package/dist/components/ProgressIndicator/ProgressIndicator.js +22 -22
- package/dist/components/Search/Search.js +55 -53
- package/dist/components/Search/SearchResults/SearchResults.js +16 -16
- package/dist/components/Select/Select.d.ts +4 -0
- package/dist/components/Select/Select.js +51 -45
- package/dist/components/Select/Select.stories.d.ts +1 -0
- package/dist/components/Tabs/TabsContainer.js +1 -1
- package/dist/components/Tags/Tags.js +32 -30
- package/dist/components/Text/Text.js +17 -9
- package/dist/components/Text/types.d.ts +42 -1
- package/dist/components/Text/types.js +3 -3
- package/dist/components/Text/utils.js +40 -7
- package/dist/components/TextArea/TextArea.js +38 -34
- package/dist/components/Toast/Toast.js +4 -4
- package/dist/node_modules/ics/dist/index.js +2 -2
- package/dist/node_modules/ics/dist/pipeline/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/patterns/AccountPageHeader/AccountPageHeader.js +45 -28
- package/dist/patterns/BidSnapshot/BidMessage.d.ts +6 -1
- package/dist/patterns/BidSnapshot/BidMessage.js +14 -13
- package/dist/patterns/BidSnapshot/BidSnapshot.d.ts +7 -1
- package/dist/patterns/BidSnapshot/BidSnapshot.js +84 -66
- package/dist/patterns/BidSnapshot/BidSnapshot.stories.d.ts +100 -0
- package/dist/patterns/CountryPicker/CountryPickerCountryList.js +5 -5
- package/dist/patterns/CountryPicker/CountryPickerModal.js +8 -8
- package/dist/patterns/CountryPicker/CountryPickerOption.js +22 -20
- package/dist/patterns/CountryPicker/CountryPickerTrigger.js +39 -38
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.js +52 -52
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.stories.d.ts +1 -0
- package/dist/patterns/FiltersInline/FilterButton.js +41 -25
- package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.js +50 -52
- package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.js +31 -31
- package/dist/patterns/HeroBanner/HeroBanner.js +21 -21
- package/dist/patterns/LanguageSelector/LanguageSelector.js +34 -34
- package/dist/patterns/ObjectTile/ObjectTile.js +51 -66
- package/dist/patterns/ObjectTile/ObjectTile.stories.d.ts +36 -0
- package/dist/patterns/PhoneNumberInput/PhoneNumberInput.js +7 -6
- package/dist/patterns/SaleCard/SaleCard.js +37 -45
- package/dist/patterns/SaleCard/SaleCard.stories.d.ts +1 -1
- package/dist/patterns/SaleCard/SaleCardActions.js +9 -8
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.js +49 -49
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js +19 -12
- package/dist/patterns/Social/Social.js +20 -20
- package/dist/patterns/Subscribe/Subscribe.stories.d.ts +0 -1
- package/dist/patterns/TextBanner/TextBanner.js +12 -12
- package/dist/patterns/UserManagement/UserManagement.js +13 -13
- package/dist/patterns/ViewingDetails/ViewingDetails.d.ts +4 -0
- package/dist/patterns/ViewingDetails/ViewingDetails.js +36 -34
- package/dist/patterns/ViewingDetails/ViewingDetails.stories.d.ts +2 -0
- package/dist/patterns/ViewingDetails/ViewingDetailsMock.d.ts +2 -0
- package/dist/scss/_reset.scss +4 -0
- package/dist/scss/_type.scss +172 -65
- package/dist/scss/_vars.scss +92 -197
- package/dist/scss/_vars.scss.js +94 -199
- package/dist/scss/componentStyles.scss +178 -0
- package/dist/scss/components/Accordion/_accordion.scss +6 -4
- package/dist/scss/components/Breadcrumb/_breadcrumb.scss +8 -1
- package/dist/scss/components/Button/_button.scss +33 -7
- package/dist/scss/components/ComboBox/_combobox.scss +7 -5
- package/dist/scss/components/ComposedModal/_composedModal.scss +0 -4
- package/dist/scss/components/Countdown/_countdown.scss +8 -9
- package/dist/scss/components/Countdown/_duration.scss +0 -2
- package/dist/scss/components/DatePicker/_datePicker.scss +11 -10
- package/dist/scss/components/Detail/_detail.scss +15 -6
- package/dist/scss/components/Divider/_divider.scss +3 -3
- package/dist/scss/components/Drawer/_drawerHeader.scss +0 -7
- package/dist/scss/components/Dropdown/_dropdown.scss +2 -2
- package/dist/scss/components/FavoritingTileButton/_favoritingTileButton.scss +5 -0
- package/dist/scss/components/Filter/_filter.scss +23 -8
- package/dist/scss/components/Icon/_icon.stories.scss +1 -1
- package/dist/scss/components/IconButton/_iconButton.scss +3 -5
- package/dist/scss/components/Input/_input.scss +22 -14
- package/dist/scss/components/Link/_link.scss +13 -8
- package/dist/scss/components/LinkBlock/_linkBlock.scss +5 -1
- package/dist/scss/components/LinkList/_linkList.scss +8 -0
- package/dist/scss/components/Modal/_modal.scss +2 -2
- package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +33 -14
- package/dist/scss/components/Navigation/NavigationItemTrigger/_navigationItemTrigger.scss +1 -1
- package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +2 -2
- package/dist/scss/components/NotificationBanner/_notificationBanner.scss +4 -10
- package/dist/scss/components/Pagination/_pagination.scss +17 -1
- package/dist/scss/components/ProgressIndicator/_progressIndicator.scss +5 -0
- package/dist/scss/components/Search/SearchResults/_searchResults.scss +5 -0
- package/dist/scss/components/Search/_search.scss +9 -10
- package/dist/scss/components/Search/_searchButton.scss +0 -1
- package/dist/scss/components/Select/_select.scss +8 -3
- package/dist/scss/components/Tabs/_tabs.scss +4 -5
- package/dist/scss/components/Tags/_tags.scss +0 -2
- package/dist/scss/components/TextArea/_textArea.scss +2 -4
- package/dist/scss/components/TextSymbol/_textSymbol.scss +2 -2
- package/dist/scss/patterns/AccountPageHeader/_accountPageHeader.scss +4 -0
- package/dist/scss/patterns/BidSnapshot/_bidSnapshot.scss +9 -10
- package/dist/scss/patterns/CountryPicker/_countryPickerModal.scss +4 -0
- package/dist/scss/patterns/CountryPicker/_countryPickerOption.scss +3 -0
- package/dist/scss/patterns/CountryPicker/_countryPickerTrigger.scss +4 -7
- package/dist/scss/patterns/DetailList/_detailList.scss +4 -0
- package/dist/scss/patterns/FavoritesCollectionTile/_favoritesCollectionTile.scss +6 -8
- package/dist/scss/patterns/FilterMenu/_filterMenu.scss +2 -1
- package/dist/scss/patterns/FiltersInline/_filterButton.scss +11 -2
- package/dist/scss/patterns/FiltersInline/_filterDropdownMenu.scss +1 -9
- package/dist/scss/patterns/FiltersInline/_filtersInline.scss +5 -0
- package/dist/scss/patterns/HeroBanner/_heroBanner.scss +13 -6
- package/dist/scss/patterns/ObjectTile/_objectTile.scss +13 -12
- package/dist/scss/patterns/PhoneNumberInput/_phoneNumberInput.scss +9 -2
- package/dist/scss/patterns/SaleCard/_saleCard.scss +13 -22
- package/dist/scss/patterns/SaleHeaderBanner/_saleHeaderBanner.scss +16 -3
- package/dist/scss/patterns/Social/_social.scss +4 -1
- package/dist/scss/patterns/Subscribe/_subscribe.scss +3 -3
- package/dist/scss/patterns/TextBanner/_textBanner.scss +9 -3
- package/dist/scss/patterns/ViewingDetails/_viewingDetails.scss +15 -3
- package/dist/scss/site-furniture/Footer/_footer.scss +8 -2
- package/dist/scss/site-furniture/Header/_header.scss +8 -4
- package/dist/site-furniture/Footer/Footer.js +4 -4
- package/package.json +4 -3
|
@@ -1,10 +1,43 @@
|
|
|
1
|
-
import { px as
|
|
2
|
-
import { TextVariants as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { px as r } from "../../utils/index.js";
|
|
2
|
+
import { TextVariants as t } from "./types.js";
|
|
3
|
+
const u = (e = t.body1) => {
|
|
4
|
+
switch (e) {
|
|
5
|
+
case t.email:
|
|
6
|
+
return `${r}-text--bodyMedium`;
|
|
7
|
+
case t.link:
|
|
8
|
+
return `${r}-text--bodyMedium`;
|
|
9
|
+
case t.linkSmall:
|
|
10
|
+
return `${r}-text--bodySmall`;
|
|
11
|
+
case t.linkMedium:
|
|
12
|
+
return `${r}-text--bodyMedium`;
|
|
13
|
+
case t.linkLarge:
|
|
14
|
+
return `${r}-text--bodyLarge`;
|
|
15
|
+
default:
|
|
16
|
+
return `${r}-text--${e.charAt(0).toLowerCase() + e.slice(1)}`;
|
|
17
|
+
}
|
|
18
|
+
}, i = (e = t.body1) => {
|
|
19
|
+
if (e === t.blockquote) return "blockquote";
|
|
20
|
+
if (e.includes("body") || e.includes("string") || e.includes("title")) return "span";
|
|
21
|
+
if (e.includes("label"))
|
|
22
|
+
return "label";
|
|
23
|
+
if (e.includes("heading") || e.includes("display"))
|
|
24
|
+
switch (e) {
|
|
25
|
+
case t.headingLarge:
|
|
26
|
+
case t.displayMedium:
|
|
27
|
+
return "h1";
|
|
28
|
+
case t.headingMedium:
|
|
29
|
+
case t.displaySmall:
|
|
30
|
+
return "h2";
|
|
31
|
+
case t.headingSmall:
|
|
32
|
+
return "h3";
|
|
33
|
+
case t.headingExtraSmall:
|
|
34
|
+
return "h4";
|
|
35
|
+
default:
|
|
36
|
+
return `h${isNaN(parseInt(e.slice(-1))) ? 3 : parseInt(e.slice(-1))}`;
|
|
37
|
+
}
|
|
38
|
+
return "span";
|
|
6
39
|
};
|
|
7
40
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
41
|
+
i as determineDefaultTextElement,
|
|
42
|
+
u as determineTextClassName
|
|
10
43
|
};
|
|
@@ -1,46 +1,50 @@
|
|
|
1
1
|
import { jsxs as n, Fragment as w, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as I, useId as
|
|
2
|
+
import { forwardRef as I, useId as T } from "react";
|
|
3
3
|
import l from "../../node_modules/classnames/index.js";
|
|
4
|
-
import { px as
|
|
5
|
-
import
|
|
6
|
-
|
|
4
|
+
import { px as e, useNormalizedInputProps as A } from "../../utils/index.js";
|
|
5
|
+
import j from "../Icon/Icon.js";
|
|
6
|
+
import y from "../Text/Text.js";
|
|
7
|
+
import { TextVariants as z } from "../Text/types.js";
|
|
8
|
+
const C = I(
|
|
7
9
|
({
|
|
8
10
|
className: o,
|
|
9
11
|
id: t,
|
|
10
12
|
isSkeletonLoading: d,
|
|
11
13
|
labelText: m,
|
|
12
|
-
maxLength:
|
|
13
|
-
name:
|
|
14
|
-
rows:
|
|
14
|
+
maxLength: p = 3e3,
|
|
15
|
+
name: x,
|
|
16
|
+
rows: c = 2,
|
|
15
17
|
disabled: $,
|
|
16
|
-
warn:
|
|
17
|
-
warnText:
|
|
18
|
+
warn: f,
|
|
19
|
+
warnText: _,
|
|
18
20
|
invalid: b,
|
|
19
|
-
invalidText:
|
|
20
|
-
...
|
|
21
|
-
},
|
|
22
|
-
const i = `${
|
|
21
|
+
invalidText: u,
|
|
22
|
+
...v
|
|
23
|
+
}, N) => {
|
|
24
|
+
const i = `${e}-text-area`, r = T(), a = A({
|
|
23
25
|
disabled: $,
|
|
24
26
|
id: t ?? r,
|
|
25
27
|
invalid: b,
|
|
26
|
-
invalidText:
|
|
28
|
+
invalidText: u,
|
|
27
29
|
type: "text-area",
|
|
28
|
-
warn:
|
|
29
|
-
warnText:
|
|
30
|
+
warn: f,
|
|
31
|
+
warnText: _
|
|
30
32
|
}), h = l(`${i}__wrapper`, {
|
|
31
|
-
[`${
|
|
32
|
-
[`${
|
|
33
|
-
[`${
|
|
33
|
+
[`${e}-text-area--disabled`]: a.disabled,
|
|
34
|
+
[`${e}-text-area--invalid`]: a.invalid,
|
|
35
|
+
[`${e}-text-area--warn`]: a.warn
|
|
34
36
|
});
|
|
35
37
|
return /* @__PURE__ */ n(w, { children: [
|
|
36
38
|
/* @__PURE__ */ n("div", { className: h, children: [
|
|
37
39
|
/* @__PURE__ */ s(
|
|
38
|
-
|
|
40
|
+
y,
|
|
39
41
|
{
|
|
42
|
+
element: "label",
|
|
43
|
+
variant: z.labelMedium,
|
|
40
44
|
"data-testid": `text-area-${t ?? r}-label`,
|
|
41
45
|
htmlFor: t ?? r,
|
|
42
|
-
className: l(`${
|
|
43
|
-
[`${
|
|
46
|
+
className: l(`${e}-text-area__label`, {
|
|
47
|
+
[`${e}-skeleton`]: d
|
|
44
48
|
}),
|
|
45
49
|
children: m
|
|
46
50
|
}
|
|
@@ -48,26 +52,26 @@ const z = I(
|
|
|
48
52
|
/* @__PURE__ */ s(
|
|
49
53
|
"textarea",
|
|
50
54
|
{
|
|
51
|
-
...
|
|
52
|
-
className: l(i, o, `${
|
|
53
|
-
[`${
|
|
55
|
+
...v,
|
|
56
|
+
className: l(i, o, `${e}-text-area__input`, {
|
|
57
|
+
[`${e}-skeleton`]: d
|
|
54
58
|
}),
|
|
55
59
|
id: t ?? r,
|
|
56
|
-
rows:
|
|
57
|
-
maxLength:
|
|
58
|
-
name:
|
|
59
|
-
ref:
|
|
60
|
+
rows: c,
|
|
61
|
+
maxLength: p,
|
|
62
|
+
name: x,
|
|
63
|
+
ref: N,
|
|
60
64
|
"data-testid": `text-area-${t ?? r}-input`,
|
|
61
|
-
disabled:
|
|
65
|
+
disabled: a.disabled
|
|
62
66
|
}
|
|
63
67
|
),
|
|
64
|
-
/* @__PURE__ */ s(
|
|
68
|
+
/* @__PURE__ */ s(j, { icon: "Menu", className: `${i}-resizer__icon` })
|
|
65
69
|
] }),
|
|
66
|
-
/* @__PURE__ */ s("div", { children:
|
|
70
|
+
/* @__PURE__ */ s("div", { children: a.validation ?? /* @__PURE__ */ s("div", { className: `${e}-text-area__validation`, id: a.invalidId }) })
|
|
67
71
|
] });
|
|
68
72
|
}
|
|
69
73
|
);
|
|
70
|
-
|
|
74
|
+
C.displayName = "TextArea";
|
|
71
75
|
export {
|
|
72
|
-
|
|
76
|
+
C as default
|
|
73
77
|
};
|
|
@@ -7,14 +7,14 @@ import _ from "../Icon/Icon.js";
|
|
|
7
7
|
import T from "../IconButton/IconButton.js";
|
|
8
8
|
import { ButtonVariants as $ } from "../Button/types.js";
|
|
9
9
|
const x = d(
|
|
10
|
-
({ className: i, title: m, actionElement: a, actionAltText: s, closeButtonLabel: t, ...l },
|
|
11
|
-
const { className: r, ...
|
|
12
|
-
return /* @__PURE__ */ e(h, { ...
|
|
10
|
+
({ className: i, title: m, actionElement: a, actionAltText: s, closeButtonLabel: t, ...l }, c) => {
|
|
11
|
+
const { className: r, ...n } = p(l, "Toast");
|
|
12
|
+
return /* @__PURE__ */ e(h, { ...n, className: f(r, i), ref: c, children: [
|
|
13
13
|
/* @__PURE__ */ e("div", { className: `${r}__content`, children: [
|
|
14
14
|
/* @__PURE__ */ o(N, { children: m }),
|
|
15
15
|
a && s && /* @__PURE__ */ o(u, { asChild: !0, altText: s, className: `${r}__action`, children: a })
|
|
16
16
|
] }),
|
|
17
|
-
/* @__PURE__ */ o(C, { className: `${r}__close`, "aria-label": t, asChild: !0, children: /* @__PURE__ */ o(T, { variant: $.
|
|
17
|
+
/* @__PURE__ */ o(C, { className: `${r}__close`, "aria-label": t, asChild: !0, children: /* @__PURE__ */ o(T, { variant: $.tertiary, children: /* @__PURE__ */ o(_, { icon: "CloseX", title: t, color: "$white-100", "aria-hidden": !0 }) }) })
|
|
18
18
|
] });
|
|
19
19
|
}
|
|
20
20
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __exports as l } from "../../../_virtual/
|
|
1
|
+
import { __exports as l } from "../../../_virtual/index5.js";
|
|
2
2
|
import "./pipeline/index.js";
|
|
3
|
-
import { __exports as _ } from "../../../_virtual/
|
|
3
|
+
import { __exports as _ } from "../../../_virtual/index6.js";
|
|
4
4
|
Object.defineProperty(l, "__esModule", {
|
|
5
5
|
value: !0
|
|
6
6
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../_virtual/
|
|
1
|
+
import { __module as e } from "../../../../_virtual/index4.js";
|
|
2
2
|
import { __require as o } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as t } from "./cjs/react-is.development.js";
|
|
4
4
|
var r;
|
|
@@ -1,38 +1,55 @@
|
|
|
1
|
-
import { jsxs as n, jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { TextVariants as
|
|
7
|
-
import
|
|
1
|
+
import { jsxs as n, jsx as a, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y } from "react";
|
|
3
|
+
import { getCommonProps as C } from "../../utils/index.js";
|
|
4
|
+
import P from "../../node_modules/classnames/index.js";
|
|
5
|
+
import o from "../../components/Text/Text.js";
|
|
6
|
+
import { TextVariants as k } from "../../components/Text/types.js";
|
|
7
|
+
import L from "../../components/Divider/Divider.js";
|
|
8
8
|
import x from "../../components/Button/Button.js";
|
|
9
|
-
import { ButtonVariants as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { SSRMediaQuery as
|
|
13
|
-
const T =
|
|
14
|
-
({ className: _, title: N, subtitle:
|
|
15
|
-
const { className:
|
|
16
|
-
d && /* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
import { ButtonVariants as c } from "../../components/Button/types.js";
|
|
10
|
+
import t from "../../components/Icon/Icon.js";
|
|
11
|
+
import h from "../../components/IconButton/IconButton.js";
|
|
12
|
+
import { SSRMediaQuery as f } from "../../providers/SeldonProvider/utils.js";
|
|
13
|
+
const T = y(
|
|
14
|
+
({ className: _, title: N, subtitle: m, actionButtons: l, overline: s, showDivider: v = !0, ...b }, g) => {
|
|
15
|
+
const { className: e, ...u } = C(b, "AccountPageHeader"), i = l?.find((r) => r.isPrimary), d = l?.filter((r) => !r.isPrimary), $ = () => /* @__PURE__ */ n("div", { className: `${e}__button-wrapper`, children: [
|
|
16
|
+
d && /* @__PURE__ */ a(p, { children: d.map((r) => /* @__PURE__ */ a(
|
|
17
|
+
h,
|
|
18
|
+
{
|
|
19
|
+
variant: c.tertiary,
|
|
20
|
+
onClick: r.onClick,
|
|
21
|
+
"aria-label": r.ariaLabel,
|
|
22
|
+
children: /* @__PURE__ */ a(t, { icon: r.icon, "aria-label": r.ariaLabel, title: r.ariaLabel })
|
|
23
|
+
},
|
|
24
|
+
`icon-button-${r.icon}`
|
|
25
|
+
)) }),
|
|
26
|
+
i && /* @__PURE__ */ n(p, { children: [
|
|
27
|
+
/* @__PURE__ */ a(f.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ n(x, { variant: c.secondary, onClick: i.onClick, children: [
|
|
28
|
+
/* @__PURE__ */ a(t, { icon: i.icon }),
|
|
20
29
|
" ",
|
|
21
|
-
e.label
|
|
30
|
+
/* @__PURE__ */ a("span", { className: `${e}__button-label`, children: i.label })
|
|
22
31
|
] }) }),
|
|
23
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ a(f.Media, { lessThan: "md", children: /* @__PURE__ */ a(
|
|
33
|
+
h,
|
|
34
|
+
{
|
|
35
|
+
variant: c.tertiary,
|
|
36
|
+
onClick: i.onClick,
|
|
37
|
+
"aria-label": i.ariaLabel,
|
|
38
|
+
children: /* @__PURE__ */ a(t, { icon: i.icon, title: i.ariaLabel })
|
|
39
|
+
}
|
|
40
|
+
) })
|
|
24
41
|
] })
|
|
25
42
|
] });
|
|
26
|
-
return /* @__PURE__ */ n("div", { ...
|
|
27
|
-
/* @__PURE__ */ n("div", { className: `${
|
|
28
|
-
s && /* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */ n("div", { className: `${
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
43
|
+
return /* @__PURE__ */ n("div", { ...u, className: P(e, _), ref: g, children: [
|
|
44
|
+
/* @__PURE__ */ n("div", { className: `${e}__container`, children: [
|
|
45
|
+
s && /* @__PURE__ */ a(o, { className: `${e}__overline`, children: s }),
|
|
46
|
+
/* @__PURE__ */ n("div", { className: `${e}__title-wrapper`, children: [
|
|
47
|
+
/* @__PURE__ */ a(o, { variant: k.headingLarge, className: `${e}__title`, children: N }),
|
|
48
|
+
l && l.length > 0 && $()
|
|
32
49
|
] }),
|
|
33
|
-
|
|
50
|
+
m && /* @__PURE__ */ a(o, { className: `${e}__subtitle`, children: m })
|
|
34
51
|
] }),
|
|
35
|
-
v && /* @__PURE__ */
|
|
52
|
+
v && /* @__PURE__ */ a(L, { className: `${e}__divider` })
|
|
36
53
|
] });
|
|
37
54
|
}
|
|
38
55
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
+
import { TextVariants } from '../../components/Text';
|
|
2
3
|
import { BidMessageVariants } from './types';
|
|
3
4
|
export interface BidMessageProps extends ComponentProps<'p'> {
|
|
4
5
|
/**
|
|
@@ -13,6 +14,10 @@ export interface BidMessageProps extends ComponentProps<'p'> {
|
|
|
13
14
|
* Variant type - positive | negative
|
|
14
15
|
*/
|
|
15
16
|
variant?: BidMessageVariants;
|
|
17
|
+
/**
|
|
18
|
+
* Text variant to use for the message text
|
|
19
|
+
*/
|
|
20
|
+
textVariant?: TextVariants;
|
|
16
21
|
}
|
|
17
22
|
/**
|
|
18
23
|
* ## Overview
|
|
@@ -23,5 +28,5 @@ export interface BidMessageProps extends ComponentProps<'p'> {
|
|
|
23
28
|
*
|
|
24
29
|
* [Storybook Link](Point back to yourself here)
|
|
25
30
|
*/
|
|
26
|
-
declare const BidMessage: ({ className, hasIcon, message, variant, ...props }: BidMessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare const BidMessage: ({ className, hasIcon, message, variant, textVariant, ...props }: BidMessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
32
|
export default BidMessage;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import { TextVariants as
|
|
5
|
-
import
|
|
6
|
-
import { BidMessageVariants as
|
|
1
|
+
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import f from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { getCommonProps as h } from "../../utils/index.js";
|
|
4
|
+
import { TextVariants as g } from "../../components/Text/types.js";
|
|
5
|
+
import x from "../../components/Text/Text.js";
|
|
6
|
+
import { BidMessageVariants as s } from "./types.js";
|
|
7
7
|
import t from "../../components/Icon/Icon.js";
|
|
8
|
-
const
|
|
8
|
+
const b = ({
|
|
9
9
|
className: r,
|
|
10
10
|
hasIcon: m = !0,
|
|
11
11
|
message: a,
|
|
12
|
-
variant: n =
|
|
12
|
+
variant: n = s.positive,
|
|
13
|
+
textVariant: c = g.labelMedium,
|
|
13
14
|
...o
|
|
14
15
|
}) => {
|
|
15
|
-
const { className:
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
m ?
|
|
18
|
-
/* @__PURE__ */ e(
|
|
16
|
+
const { className: i, ...l } = h(o, "BidMessage"), d = n === s.positive ? /* @__PURE__ */ e(t, { icon: "IconGreenCircle", height: 8, width: 8 }) : /* @__PURE__ */ e(t, { icon: "IconRedCircle", height: 8, width: 8 });
|
|
17
|
+
return /* @__PURE__ */ p("div", { ...l, className: f(i, r), ...o, children: [
|
|
18
|
+
m ? d : null,
|
|
19
|
+
/* @__PURE__ */ e(x, { variant: c, className: `${i}-text`, children: a })
|
|
19
20
|
] });
|
|
20
21
|
};
|
|
21
22
|
export {
|
|
22
|
-
|
|
23
|
+
b as default
|
|
23
24
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
+
import { DetailListProps } from '../DetailList/index';
|
|
2
3
|
import { LotStatus, SupportedLanguages } from '../../types/commonTypes';
|
|
3
4
|
import { BidStatusEnum } from './types';
|
|
4
|
-
export
|
|
5
|
+
export type BidSnapshotVariant = 'md' | 'sm';
|
|
6
|
+
export interface BidSnapshotProps extends ComponentProps<'div'>, Pick<DetailListProps, 'hasSeparators'> {
|
|
5
7
|
/**
|
|
6
8
|
* The user's current bid state, winning or losing, etc.
|
|
7
9
|
*/
|
|
@@ -10,6 +12,10 @@ export interface BidSnapshotProps extends ComponentProps<'div'> {
|
|
|
10
12
|
* State of the object
|
|
11
13
|
*/
|
|
12
14
|
lotStatus?: LotStatus;
|
|
15
|
+
/**
|
|
16
|
+
* Variant of the bid snapshot - 'sm' uses labelSmall for text
|
|
17
|
+
*/
|
|
18
|
+
variant?: BidSnapshotVariant;
|
|
13
19
|
/**
|
|
14
20
|
* 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.
|
|
15
21
|
*/
|
|
@@ -1,84 +1,102 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { getCommonProps as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { LotStatus as
|
|
8
|
-
import
|
|
9
|
-
import { CountdownVariants as
|
|
10
|
-
import { BidStatusEnum as
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
1
|
+
import { jsxs as C, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Q, isValidElement as U, cloneElement as X } from "react";
|
|
3
|
+
import Y from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { getCommonProps as Z, findChildrenOfType as O, findChildrenExcludingTypes as oo } from "../../utils/index.js";
|
|
5
|
+
import so from "../DetailList/DetailList.js";
|
|
6
|
+
import c from "../../components/Detail/Detail.js";
|
|
7
|
+
import { LotStatus as t, SupportedLanguages as ao } from "../../types/commonTypes.js";
|
|
8
|
+
import eo from "../../components/Countdown/Countdown.js";
|
|
9
|
+
import { CountdownVariants as _ } from "../../components/Countdown/types.js";
|
|
10
|
+
import { BidStatusEnum as no } from "./types.js";
|
|
11
|
+
import M from "./BidMessage.js";
|
|
12
|
+
import { TextVariants as T } from "../../components/Text/types.js";
|
|
13
|
+
import "../../components/Text/Text.js";
|
|
14
|
+
import { isAfter as V } from "../../node_modules/date-fns/isAfter.js";
|
|
15
|
+
import { differenceInMinutes as to } from "../../node_modules/date-fns/differenceInMinutes.js";
|
|
16
|
+
const io = (s) => s === 1 ? `${s} bid` : `${s} bids`, lo = Q(
|
|
15
17
|
({
|
|
16
|
-
lotStatus:
|
|
17
|
-
bidStatus:
|
|
18
|
-
bidsLabelText:
|
|
19
|
-
children:
|
|
20
|
-
className:
|
|
21
|
-
closingText:
|
|
22
|
-
currency:
|
|
23
|
-
currentBid:
|
|
24
|
-
currentBidText:
|
|
25
|
-
formatDurationStr:
|
|
26
|
-
lang:
|
|
27
|
-
saleCloseDate:
|
|
28
|
-
lotCloseDate:
|
|
29
|
-
numberOfBids:
|
|
30
|
-
startingBid:
|
|
31
|
-
startingBidText:
|
|
32
|
-
soldPrice:
|
|
33
|
-
showSoldLabel:
|
|
34
|
-
soldForText:
|
|
35
|
-
wonForText:
|
|
36
|
-
getCurrentDateTime:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
18
|
+
lotStatus: s = t.ready,
|
|
19
|
+
bidStatus: f,
|
|
20
|
+
bidsLabelText: W = io,
|
|
21
|
+
children: u,
|
|
22
|
+
className: y,
|
|
23
|
+
closingText: E = "Closes in",
|
|
24
|
+
currency: i = "$",
|
|
25
|
+
currentBid: $,
|
|
26
|
+
currentBidText: B = "Current bid",
|
|
27
|
+
formatDurationStr: j = (o) => o.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
|
|
28
|
+
lang: P = "en",
|
|
29
|
+
saleCloseDate: l,
|
|
30
|
+
lotCloseDate: r,
|
|
31
|
+
numberOfBids: b = 0,
|
|
32
|
+
startingBid: h,
|
|
33
|
+
startingBidText: R = "Starting bid",
|
|
34
|
+
soldPrice: g,
|
|
35
|
+
showSoldLabel: A = !0,
|
|
36
|
+
soldForText: I = "Sold for",
|
|
37
|
+
wonForText: k = "Won for",
|
|
38
|
+
getCurrentDateTime: w = () => /* @__PURE__ */ new Date(),
|
|
39
|
+
hasSeparators: q = !0,
|
|
40
|
+
variant: S = "md",
|
|
41
|
+
...L
|
|
42
|
+
}, z) => {
|
|
43
|
+
const { className: o, ...D } = Z(L, "BidSnapshot"), a = S === "sm" ? T.labelSmall : T.labelMedium, F = S === "sm" ? _.sm : _.compact, m = $ !== null && b > 0, v = s === t.ready, e = s === t.live, x = s === t.past, d = w() || /* @__PURE__ */ new Date(), G = e && r && V(r, d) && l && (to(l, d) < 60 || V(d, l)), N = O(u, M), H = oo(u, [M]), J = N ? N.map(
|
|
44
|
+
(p) => U(p) ? X(p, { textVariant: a }) : p
|
|
45
|
+
) : null, K = Y(o, y, {
|
|
46
|
+
[`${o}--live`]: e,
|
|
47
|
+
[`${o}--has-bids`]: m || x
|
|
42
48
|
});
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
return /* @__PURE__ */ C("div", { ...D, ...L, ref: z, className: K, children: [
|
|
50
|
+
/* @__PURE__ */ C(so, { hasSeparators: q, className: `${o}__text`, children: [
|
|
51
|
+
A && x ? /* @__PURE__ */ n(
|
|
52
|
+
c,
|
|
47
53
|
{
|
|
48
|
-
label:
|
|
49
|
-
value:
|
|
50
|
-
hasWrap: !1
|
|
54
|
+
label: f === no.Won ? k : I,
|
|
55
|
+
value: g ? `${i}${g?.toLocaleString()}` : "",
|
|
56
|
+
hasWrap: !1,
|
|
57
|
+
className: `${o}__sold`,
|
|
58
|
+
textVariant: a
|
|
51
59
|
}
|
|
52
60
|
) : null,
|
|
53
|
-
|
|
54
|
-
|
|
61
|
+
e && m ? /* @__PURE__ */ n(
|
|
62
|
+
c,
|
|
55
63
|
{
|
|
56
|
-
label:
|
|
57
|
-
subLabel: `(${
|
|
58
|
-
value: `${
|
|
59
|
-
hasWrap: !1
|
|
64
|
+
label: B,
|
|
65
|
+
subLabel: `(${W(b)})`,
|
|
66
|
+
value: `${i}${$?.toLocaleString()}`,
|
|
67
|
+
hasWrap: !1,
|
|
68
|
+
className: `${o}__current-bid`,
|
|
69
|
+
textVariant: a
|
|
60
70
|
}
|
|
61
71
|
) : null,
|
|
62
|
-
|
|
72
|
+
h && (v || e && !m) ? /* @__PURE__ */ n(
|
|
73
|
+
c,
|
|
74
|
+
{
|
|
75
|
+
label: R,
|
|
76
|
+
value: `${i}${h?.toLocaleString()}`,
|
|
77
|
+
hasWrap: !1,
|
|
78
|
+
textVariant: a
|
|
79
|
+
}
|
|
80
|
+
) : null
|
|
63
81
|
] }),
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
82
|
+
f && !v ? J : null,
|
|
83
|
+
H,
|
|
84
|
+
G ? /* @__PURE__ */ n(
|
|
85
|
+
eo,
|
|
68
86
|
{
|
|
69
|
-
endDateTime:
|
|
70
|
-
label:
|
|
71
|
-
variant:
|
|
72
|
-
locale:
|
|
73
|
-
formatDurationStr:
|
|
87
|
+
endDateTime: r,
|
|
88
|
+
label: E,
|
|
89
|
+
variant: F,
|
|
90
|
+
locale: ao[P],
|
|
91
|
+
formatDurationStr: j,
|
|
74
92
|
showBottomBorder: !1,
|
|
75
|
-
getCurrentDateTime:
|
|
93
|
+
getCurrentDateTime: w
|
|
76
94
|
}
|
|
77
95
|
) : null
|
|
78
96
|
] });
|
|
79
97
|
}
|
|
80
98
|
);
|
|
81
|
-
|
|
99
|
+
lo.displayName = "BidSnapshot";
|
|
82
100
|
export {
|
|
83
|
-
|
|
101
|
+
lo as default
|
|
84
102
|
};
|