@phillips/seldon 1.215.0 → 1.216.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.stories.d.ts +1 -1
- package/dist/components/Accordion/AccordionItem.js +101 -105
- package/dist/components/Accordion/types.d.ts +9 -3
- package/dist/components/Accordion/types.js +1 -1
- package/dist/components/Accordion/utils.d.ts +3 -3
- package/dist/components/Accordion/utils.js +7 -7
- 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 +33 -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 +27 -16
- package/dist/components/Detail/Detail.stories.d.ts +35 -2
- package/dist/components/Detail/index.d.ts +1 -0
- package/dist/components/Detail/types.d.ts +5 -0
- package/dist/components/Detail/types.js +4 -0
- 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 +37 -39
- 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/index.js +192 -190
- 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 +11 -1
- package/dist/patterns/BidSnapshot/BidSnapshot.js +76 -64
- package/dist/patterns/BidSnapshot/BidSnapshot.stories.d.ts +114 -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/DetailList/DetailList.d.ts +7 -2
- package/dist/patterns/DetailList/DetailList.js +25 -24
- package/dist/patterns/DetailList/DetailList.stories.d.ts +1 -0
- 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 +26 -28
- package/dist/patterns/ObjectTile/ObjectTile.js +66 -73
- package/dist/patterns/ObjectTile/ObjectTile.stories.d.ts +36 -0
- package/dist/patterns/PhoneNumberInput/PhoneNumberInput.js +7 -6
- package/dist/patterns/SaleCard/SaleCard.js +31 -39
- 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 +22 -22
- package/dist/patterns/Subscribe/Subscribe.js +57 -55
- 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 +181 -0
- package/dist/scss/components/Accordion/_accordion.scss +14 -28
- package/dist/scss/components/AddToCalendar/_addToCalendar.scss +0 -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 +13 -10
- 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 +6 -0
- package/dist/scss/components/Modal/_modal.scss +2 -2
- package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +30 -14
- package/dist/scss/components/Navigation/NavigationItemTrigger/_navigationItemTrigger.scss +2 -2
- package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +5 -4
- 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 +3 -11
- 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 +1 -6
- 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 +1 -4
- package/dist/scss/patterns/AccountPageHeader/_accountPageHeader.scss +4 -0
- package/dist/scss/patterns/BidSnapshot/_bidSnapshot.scss +12 -11
- 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 +8 -2
- 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 +12 -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 +5 -6
- package/dist/scss/patterns/LanguageSelector/_languageSelector.scss +4 -0
- 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 +7 -23
- package/dist/scss/patterns/SaleHeaderBanner/_saleHeaderBanner.scss +16 -3
- package/dist/scss/patterns/Social/_social.scss +5 -1
- package/dist/scss/patterns/Subscribe/_subscribe.scss +0 -12
- 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 +24 -4
- package/dist/scss/site-furniture/Header/_header.scss +12 -4
- package/dist/site-furniture/Footer/Footer.js +4 -4
- package/dist/site-furniture/Header/Header.js +76 -57
- package/package.json +4 -3
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { getCommonProps as
|
|
5
|
-
import { DetailListAlignment as
|
|
6
|
-
import { getDetailKey as
|
|
7
|
-
const
|
|
8
|
-
({ alignment:
|
|
9
|
-
const { className: m, ...
|
|
10
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as j, isValidElement as y, cloneElement as D } from "react";
|
|
3
|
+
import p from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { getCommonProps as N, px as s } from "../../utils/index.js";
|
|
5
|
+
import { DetailListAlignment as e } from "./types.js";
|
|
6
|
+
import { getDetailKey as A } from "./utils.js";
|
|
7
|
+
const L = j(
|
|
8
|
+
({ alignment: o = e.justified, className: c, children: t, hasSeparators: i = !1, variant: a = "md", ...l }, d) => {
|
|
9
|
+
const { className: m, ...n } = N(l, "DetailList"), u = Array.isArray(t) ? t : [t];
|
|
10
|
+
return /* @__PURE__ */ f(
|
|
11
11
|
"dl",
|
|
12
12
|
{
|
|
13
|
-
...
|
|
14
|
-
className:
|
|
13
|
+
...n,
|
|
14
|
+
className: p(m, c, {
|
|
15
15
|
[`${s}-has-separators`]: i,
|
|
16
|
-
[`${s}-columns`]:
|
|
17
|
-
[`${s}-justified`]:
|
|
16
|
+
[`${s}-columns`]: o === e.columns,
|
|
17
|
+
[`${s}-justified`]: o === e.justified,
|
|
18
|
+
[`${m}--${a}`]: a
|
|
18
19
|
}),
|
|
19
|
-
...
|
|
20
|
-
ref:
|
|
20
|
+
...l,
|
|
21
|
+
ref: d,
|
|
21
22
|
children: u?.map(
|
|
22
|
-
(r,
|
|
23
|
+
(r, $) => y(r) ? /* @__PURE__ */ f(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
|
-
className:
|
|
26
|
+
className: p(`${m}-wrapper`, {
|
|
26
27
|
[`${s}-has-separators`]: i,
|
|
27
|
-
[`${s}-columns`]:
|
|
28
|
-
[`${s}-justified`]:
|
|
28
|
+
[`${s}-columns`]: o === e.columns,
|
|
29
|
+
[`${s}-justified`]: o === e.justified
|
|
29
30
|
}),
|
|
30
|
-
children: r
|
|
31
|
+
children: D(r, { variant: r.props.variant || a })
|
|
31
32
|
},
|
|
32
|
-
|
|
33
|
+
A(r, $)
|
|
33
34
|
) : void 0
|
|
34
35
|
)
|
|
35
36
|
}
|
|
36
37
|
);
|
|
37
38
|
}
|
|
38
39
|
);
|
|
39
|
-
|
|
40
|
+
L.displayName = "DetailList";
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
L as default
|
|
42
43
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { Root as q, Trigger as B, Portal as G, Content as H } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
|
|
3
|
-
import
|
|
3
|
+
import _ from "../../node_modules/classnames/index.js";
|
|
4
4
|
import { memo as J, forwardRef as Q, useRef as U } from "react";
|
|
5
5
|
import $ from "../../components/Icon/Icon.js";
|
|
6
6
|
import W from "../../components/Link/Link.js";
|
|
7
7
|
import X from "../../components/SeldonImage/SeldonImage.js";
|
|
8
|
-
import { TextVariants as
|
|
9
|
-
import
|
|
8
|
+
import { TextVariants as l } from "../../components/Text/types.js";
|
|
9
|
+
import m from "../../components/Text/Text.js";
|
|
10
10
|
import { getCommonProps as Z } from "../../utils/index.js";
|
|
11
11
|
const S = ({
|
|
12
12
|
baseClassName: e,
|
|
@@ -23,7 +23,7 @@ const S = ({
|
|
|
23
23
|
onClick: (n) => {
|
|
24
24
|
n.stopPropagation(), o?.(n);
|
|
25
25
|
},
|
|
26
|
-
children: /* @__PURE__ */ t("span", { className:
|
|
26
|
+
children: /* @__PURE__ */ t("span", { className: _(`${e}__empty`, `${e}__empty--create-list`), children: /* @__PURE__ */ s("span", { className: `${e}__empty__content`, children: [
|
|
27
27
|
/* @__PURE__ */ t(
|
|
28
28
|
$,
|
|
29
29
|
{
|
|
@@ -31,11 +31,11 @@ const S = ({
|
|
|
31
31
|
width: r,
|
|
32
32
|
height: r,
|
|
33
33
|
color: "$gray-75",
|
|
34
|
-
className:
|
|
34
|
+
className: _(`${e}__icon`, `${e}__icon-circle`),
|
|
35
35
|
"aria-hidden": "true"
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
|
-
/* @__PURE__ */ t(
|
|
38
|
+
/* @__PURE__ */ t(m, { className: `${e}__text`, variant: l.bodyMedium, children: a })
|
|
39
39
|
] }) })
|
|
40
40
|
}
|
|
41
41
|
), N = ({
|
|
@@ -44,7 +44,7 @@ const S = ({
|
|
|
44
44
|
text: a,
|
|
45
45
|
ariaLabel: o,
|
|
46
46
|
dataTestId: n
|
|
47
|
-
}) => /* @__PURE__ */ t("div", { className: `${e}__media-container`, "data-testid": n, "aria-label": o, role: "region", children: /* @__PURE__ */ t("div", { className:
|
|
47
|
+
}) => /* @__PURE__ */ t("div", { className: `${e}__media-container`, "data-testid": n, "aria-label": o, role: "region", children: /* @__PURE__ */ t("div", { className: _(`${e}__empty`, `${e}__empty--bg`), children: /* @__PURE__ */ s("div", { className: `${e}__empty__content`, children: [
|
|
48
48
|
/* @__PURE__ */ t(
|
|
49
49
|
$,
|
|
50
50
|
{
|
|
@@ -52,11 +52,11 @@ const S = ({
|
|
|
52
52
|
width: r,
|
|
53
53
|
height: r,
|
|
54
54
|
color: "$gray-75",
|
|
55
|
-
className:
|
|
55
|
+
className: _(`${e}__icon`),
|
|
56
56
|
"aria-hidden": "true"
|
|
57
57
|
}
|
|
58
58
|
),
|
|
59
|
-
/* @__PURE__ */ t(
|
|
59
|
+
/* @__PURE__ */ t(m, { className: `${e}__text`, variant: l.bodyMedium, children: a })
|
|
60
60
|
] }) }) }), z = ({
|
|
61
61
|
baseClassName: e,
|
|
62
62
|
imageRef: r,
|
|
@@ -85,7 +85,7 @@ const S = ({
|
|
|
85
85
|
}
|
|
86
86
|
)
|
|
87
87
|
}
|
|
88
|
-
),
|
|
88
|
+
), lt = J(
|
|
89
89
|
Q(
|
|
90
90
|
({
|
|
91
91
|
id: e,
|
|
@@ -93,41 +93,41 @@ const S = ({
|
|
|
93
93
|
count: a,
|
|
94
94
|
name: o,
|
|
95
95
|
imageSrc: n,
|
|
96
|
-
variant:
|
|
97
|
-
element:
|
|
98
|
-
href:
|
|
99
|
-
emptyFavoritesText:
|
|
96
|
+
variant: p,
|
|
97
|
+
element: b = W,
|
|
98
|
+
href: L,
|
|
99
|
+
emptyFavoritesText: w = "You have not added any objects to your Favorites yet.",
|
|
100
100
|
emptyListsText: x = "You have not added any objects to your List yet.",
|
|
101
101
|
createFirstListText: k = "Create your first List.",
|
|
102
102
|
editListText: I = "Edit List",
|
|
103
|
-
deleteListText:
|
|
103
|
+
deleteListText: M = "Delete List",
|
|
104
104
|
onEdit: E,
|
|
105
105
|
onDelete: F,
|
|
106
|
-
formatlotStr:
|
|
106
|
+
formatlotStr: v = (i, u = i === 1 ? "Lot" : "Lots") => `${i} ${u}`,
|
|
107
107
|
linkClassName: P,
|
|
108
|
-
iconSize:
|
|
108
|
+
iconSize: c = 22,
|
|
109
109
|
menuAriaLabel: R = "Manage List",
|
|
110
|
-
favoritesAriaLabel:
|
|
111
|
-
emptyListAriaLabel:
|
|
112
|
-
listAriaLabel:
|
|
113
|
-
...
|
|
114
|
-
},
|
|
115
|
-
const { className: i, ...
|
|
110
|
+
favoritesAriaLabel: T = "Favorites",
|
|
111
|
+
emptyListAriaLabel: V = "Empty List",
|
|
112
|
+
listAriaLabel: j = "List",
|
|
113
|
+
...f
|
|
114
|
+
}, C) => {
|
|
115
|
+
const { className: i, ...u } = Z({ id: e, ...f }, "FavoritesCollectionTile"), D = U(null), h = o && a !== null && a !== void 0, y = a === 0, g = p === "lists", A = p === "create", O = p === "favorites" && y, Y = h && y && g, K = () => A ? /* @__PURE__ */ t(
|
|
116
116
|
S,
|
|
117
117
|
{
|
|
118
118
|
baseClassName: i,
|
|
119
|
-
iconSize:
|
|
119
|
+
iconSize: c,
|
|
120
120
|
createFirstListText: k,
|
|
121
|
-
onClick:
|
|
121
|
+
onClick: f.onClick
|
|
122
122
|
}
|
|
123
|
-
) : /* @__PURE__ */
|
|
124
|
-
|
|
123
|
+
) : /* @__PURE__ */ s(b, { href: L, className: _(`${i}__media-link`, P), tabIndex: 0, children: [
|
|
124
|
+
O && /* @__PURE__ */ t(
|
|
125
125
|
N,
|
|
126
126
|
{
|
|
127
127
|
baseClassName: i,
|
|
128
|
-
iconSize:
|
|
129
|
-
text:
|
|
130
|
-
ariaLabel:
|
|
128
|
+
iconSize: c,
|
|
129
|
+
text: w,
|
|
130
|
+
ariaLabel: T,
|
|
131
131
|
dataTestId: "favorites"
|
|
132
132
|
}
|
|
133
133
|
),
|
|
@@ -135,31 +135,31 @@ const S = ({
|
|
|
135
135
|
N,
|
|
136
136
|
{
|
|
137
137
|
baseClassName: i,
|
|
138
|
-
iconSize:
|
|
138
|
+
iconSize: c,
|
|
139
139
|
text: x,
|
|
140
|
-
ariaLabel:
|
|
140
|
+
ariaLabel: V,
|
|
141
141
|
dataTestId: "empty-list"
|
|
142
142
|
}
|
|
143
143
|
),
|
|
144
|
-
!
|
|
144
|
+
!y && h && /* @__PURE__ */ t(
|
|
145
145
|
z,
|
|
146
146
|
{
|
|
147
147
|
baseClassName: i,
|
|
148
148
|
imageRef: D,
|
|
149
|
-
listAriaLabel:
|
|
149
|
+
listAriaLabel: j,
|
|
150
150
|
name: o,
|
|
151
151
|
imageSrc: n,
|
|
152
|
-
iconSize:
|
|
152
|
+
iconSize: c
|
|
153
153
|
}
|
|
154
154
|
)
|
|
155
155
|
] });
|
|
156
|
-
return /* @__PURE__ */ t("div", { ...
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
|
|
160
|
-
o && /* @__PURE__ */ t(
|
|
156
|
+
return /* @__PURE__ */ t("div", { ...u, className: _(i, r), ref: C, id: e, children: /* @__PURE__ */ s("div", { className: `${i}__content`, children: [
|
|
157
|
+
/* @__PURE__ */ s("div", { className: `${i}__header`, children: [
|
|
158
|
+
/* @__PURE__ */ s("div", { className: `${i}__info`, children: [
|
|
159
|
+
h && /* @__PURE__ */ t(m, { element: "span", className: `${i}__count`, variant: l.labelMedium, children: v && h && v(a) }),
|
|
160
|
+
o && /* @__PURE__ */ t(m, { element: "h3", className: `${i}__title`, variant: l.bodyMedium, children: o })
|
|
161
161
|
] }),
|
|
162
|
-
|
|
162
|
+
h && g && /* @__PURE__ */ s(q, { children: [
|
|
163
163
|
/* @__PURE__ */ t(B, { asChild: !0, children: /* @__PURE__ */ t(
|
|
164
164
|
"div",
|
|
165
165
|
{
|
|
@@ -169,15 +169,15 @@ const S = ({
|
|
|
169
169
|
role: "button",
|
|
170
170
|
"aria-label": R,
|
|
171
171
|
"aria-haspopup": "menu",
|
|
172
|
-
onKeyDown: (
|
|
173
|
-
|
|
172
|
+
onKeyDown: (d) => {
|
|
173
|
+
d.key === "Enter" && (d.preventDefault(), d.stopPropagation(), d.target.click());
|
|
174
174
|
},
|
|
175
175
|
children: /* @__PURE__ */ t("div", { className: `${i}__icon-rotate`, children: /* @__PURE__ */ t(
|
|
176
176
|
$,
|
|
177
177
|
{
|
|
178
178
|
icon: "Icon",
|
|
179
|
-
width:
|
|
180
|
-
height:
|
|
179
|
+
width: c,
|
|
180
|
+
height: c,
|
|
181
181
|
color: "$gray-75",
|
|
182
182
|
className: `${i}__icon-button`,
|
|
183
183
|
"aria-hidden": "true"
|
|
@@ -194,23 +194,23 @@ const S = ({
|
|
|
194
194
|
align: "start",
|
|
195
195
|
alignOffset: 5,
|
|
196
196
|
className: `${i}__popover-content`,
|
|
197
|
-
children: /* @__PURE__ */
|
|
197
|
+
children: /* @__PURE__ */ s("div", { className: `${i}__dropdown`, "data-testid": "dropdown-menu", children: [
|
|
198
198
|
/* @__PURE__ */ t(
|
|
199
199
|
"button",
|
|
200
200
|
{
|
|
201
201
|
className: `${i}__dropdown--item`,
|
|
202
|
-
onClick: (
|
|
202
|
+
onClick: (d) => E?.(e, d),
|
|
203
203
|
type: "button",
|
|
204
|
-
children: I
|
|
204
|
+
children: /* @__PURE__ */ t(m, { variant: l.bodyMedium, children: I })
|
|
205
205
|
}
|
|
206
206
|
),
|
|
207
207
|
/* @__PURE__ */ t(
|
|
208
208
|
"button",
|
|
209
209
|
{
|
|
210
210
|
className: `${i}__dropdown--item`,
|
|
211
|
-
onClick: (
|
|
211
|
+
onClick: (d) => F?.(e, d),
|
|
212
212
|
type: "button",
|
|
213
|
-
children:
|
|
213
|
+
children: /* @__PURE__ */ t(m, { variant: l.bodyMedium, children: M })
|
|
214
214
|
}
|
|
215
215
|
)
|
|
216
216
|
] })
|
|
@@ -224,5 +224,5 @@ const S = ({
|
|
|
224
224
|
)
|
|
225
225
|
);
|
|
226
226
|
export {
|
|
227
|
-
|
|
227
|
+
lt as default
|
|
228
228
|
};
|
|
@@ -1,36 +1,52 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { ButtonVariants as
|
|
6
|
-
import
|
|
7
|
-
import { TextVariants as
|
|
8
|
-
import
|
|
1
|
+
import { jsxs as u, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import $ from "../../node_modules/classnames/index.js";
|
|
3
|
+
import h from "react";
|
|
4
|
+
import x from "../../components/Button/Button.js";
|
|
5
|
+
import { ButtonVariants as _ } from "../../components/Button/types.js";
|
|
6
|
+
import v from "../../components/Icon/Icon.js";
|
|
7
|
+
import { TextVariants as l } from "../../components/Text/types.js";
|
|
8
|
+
import m from "../../components/Text/Text.js";
|
|
9
9
|
import { px as t } from "../../utils/index.js";
|
|
10
|
-
import { getIcon as
|
|
11
|
-
const
|
|
12
|
-
({ className:
|
|
13
|
-
|
|
10
|
+
import { getIcon as F } from "./utils.js";
|
|
11
|
+
const N = h.forwardRef(
|
|
12
|
+
({ className: n, label: s, onClick: f, isSelected: i, type: r = "ChevronDown", count: c, id: a, ariaLabel: d, isMobile: b, totalCount: e }, p) => /* @__PURE__ */ u(
|
|
13
|
+
x,
|
|
14
14
|
{
|
|
15
|
-
ref:
|
|
16
|
-
className:
|
|
17
|
-
[`${t}-filter-button--selected`]:
|
|
15
|
+
ref: p,
|
|
16
|
+
className: $(`${t}-filter-button`, n, {
|
|
17
|
+
[`${t}-filter-button--selected`]: i || c > 0 || r === "Filter" && e > 0,
|
|
18
18
|
[`${t}-filter-button--filter`]: r === "Filter"
|
|
19
19
|
}),
|
|
20
|
-
"aria-label":
|
|
21
|
-
variant:
|
|
22
|
-
"data-testid": `${
|
|
23
|
-
"data-viewport":
|
|
24
|
-
onClick:
|
|
20
|
+
"aria-label": d,
|
|
21
|
+
variant: _.secondary,
|
|
22
|
+
"data-testid": `${a}-filter-button`,
|
|
23
|
+
"data-viewport": b ? "mobile" : "desktop",
|
|
24
|
+
onClick: f,
|
|
25
25
|
children: [
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
/* @__PURE__ */ o(
|
|
27
|
+
m,
|
|
28
|
+
{
|
|
29
|
+
className: `${t}-filter-button__label`,
|
|
30
|
+
variant: l.labelSmall,
|
|
31
|
+
"data-testid": `${a}-filter-label`,
|
|
32
|
+
children: s
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ o(v, { icon: F(r, i), height: 8, width: 8, className: `${t}__icon` }),
|
|
36
|
+
e > 0 && r === "Filter" && /* @__PURE__ */ o(
|
|
37
|
+
m,
|
|
38
|
+
{
|
|
39
|
+
variant: l.labelSmall,
|
|
40
|
+
className: `${t}-filter-button--count`,
|
|
41
|
+
"data-testid": `${a}-filter-count`,
|
|
42
|
+
children: e
|
|
43
|
+
}
|
|
44
|
+
)
|
|
29
45
|
]
|
|
30
46
|
}
|
|
31
47
|
)
|
|
32
48
|
);
|
|
33
|
-
|
|
49
|
+
N.displayName = "FilterButton";
|
|
34
50
|
export {
|
|
35
|
-
|
|
51
|
+
N as FilterButton
|
|
36
52
|
};
|
|
@@ -1,73 +1,71 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { ButtonVariants as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { getFilterDimensions as D, handleInputChange as F } from "./utils.js";
|
|
11
|
-
const B = C.forwardRef(
|
|
1
|
+
import { jsxs as c, jsx as e, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import r from "../../node_modules/classnames/index.js";
|
|
3
|
+
import w from "react";
|
|
4
|
+
import l from "../../components/Button/Button.js";
|
|
5
|
+
import { ButtonVariants as n } from "../../components/Button/types.js";
|
|
6
|
+
import x from "../../components/Filter/FilterInput.js";
|
|
7
|
+
import { px as C } from "../../utils/index.js";
|
|
8
|
+
import { getFilterDimensions as D, handleInputChange as g } from "./utils.js";
|
|
9
|
+
const F = w.forwardRef(
|
|
12
10
|
({
|
|
13
|
-
className:
|
|
14
|
-
buttonType:
|
|
15
|
-
filters:
|
|
16
|
-
filterIndex:
|
|
17
|
-
onSelectFilter:
|
|
18
|
-
onClickClear:
|
|
19
|
-
onApplyFilter:
|
|
20
|
-
resultsCount:
|
|
21
|
-
ariaLabels:
|
|
22
|
-
dropdownMenuTranslation:
|
|
23
|
-
},
|
|
24
|
-
const
|
|
25
|
-
return /* @__PURE__ */
|
|
11
|
+
className: d,
|
|
12
|
+
buttonType: o,
|
|
13
|
+
filters: p,
|
|
14
|
+
filterIndex: f,
|
|
15
|
+
onSelectFilter: _,
|
|
16
|
+
onClickClear: h,
|
|
17
|
+
onApplyFilter: m,
|
|
18
|
+
resultsCount: b,
|
|
19
|
+
ariaLabels: $,
|
|
20
|
+
dropdownMenuTranslation: s
|
|
21
|
+
}, N) => {
|
|
22
|
+
const i = o === "Sort", t = `${C}-filter-dropdown-menu`;
|
|
23
|
+
return /* @__PURE__ */ c(
|
|
26
24
|
"div",
|
|
27
25
|
{
|
|
28
|
-
className:
|
|
29
|
-
ref:
|
|
26
|
+
className: r(t, d),
|
|
27
|
+
ref: N,
|
|
30
28
|
"data-testid": "filter-dropdown-desktop",
|
|
31
|
-
"aria-label":
|
|
29
|
+
"aria-label": $ || `${o} dropdown desktop`,
|
|
32
30
|
children: [
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
|
|
31
|
+
/* @__PURE__ */ e("div", { className: r(`${t}__filters`), children: D(p, f).map((a) => /* @__PURE__ */ e(
|
|
32
|
+
x,
|
|
35
33
|
{
|
|
36
34
|
id: a.label,
|
|
37
35
|
labelText: a.label,
|
|
38
36
|
name: a.label,
|
|
39
|
-
type:
|
|
37
|
+
type: i ? "radio" : "checkbox",
|
|
40
38
|
checked: a.active,
|
|
41
39
|
disabled: a?.disabled,
|
|
42
|
-
onChange: (
|
|
40
|
+
onChange: (k) => g(k, o ?? "", _)
|
|
43
41
|
},
|
|
44
42
|
a.label
|
|
45
43
|
)) }),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
44
|
+
/* @__PURE__ */ e("div", { className: r(i ? `${t}__button-wrap` : `${t}__buttons-wrap`), children: i ? /* @__PURE__ */ e(
|
|
45
|
+
l,
|
|
48
46
|
{
|
|
49
|
-
className:
|
|
50
|
-
variant:
|
|
51
|
-
onClick: () =>
|
|
52
|
-
children: /* @__PURE__ */
|
|
47
|
+
className: r(`${t}__button`),
|
|
48
|
+
variant: n.primary,
|
|
49
|
+
onClick: () => m?.(!1),
|
|
50
|
+
children: /* @__PURE__ */ e("span", { className: `${t}__button-text`, children: s?.confirm || "Confirm" })
|
|
53
51
|
}
|
|
54
|
-
) : /* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
52
|
+
) : /* @__PURE__ */ c(u, { children: [
|
|
53
|
+
/* @__PURE__ */ e(
|
|
54
|
+
l,
|
|
57
55
|
{
|
|
58
|
-
className:
|
|
59
|
-
variant:
|
|
60
|
-
onClick: () =>
|
|
61
|
-
children:
|
|
56
|
+
className: r(`${t}__buttons`),
|
|
57
|
+
variant: n.secondary,
|
|
58
|
+
onClick: () => h?.(o ?? ""),
|
|
59
|
+
children: s?.clearAll || "Clear all"
|
|
62
60
|
}
|
|
63
61
|
),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
|
|
62
|
+
/* @__PURE__ */ e(
|
|
63
|
+
l,
|
|
66
64
|
{
|
|
67
|
-
className:
|
|
68
|
-
variant:
|
|
69
|
-
onClick: () =>
|
|
70
|
-
children: /* @__PURE__ */
|
|
65
|
+
className: r(`${t}__buttons`),
|
|
66
|
+
variant: n.primary,
|
|
67
|
+
onClick: () => m?.(!1),
|
|
68
|
+
children: /* @__PURE__ */ e("span", { className: `${t}__button-text`, children: s?.showAuctions || `Show ${b} Auctions` })
|
|
71
69
|
}
|
|
72
70
|
)
|
|
73
71
|
] }) })
|
|
@@ -76,7 +74,7 @@ const B = C.forwardRef(
|
|
|
76
74
|
);
|
|
77
75
|
}
|
|
78
76
|
);
|
|
79
|
-
|
|
77
|
+
F.displayName = "FilterDropdownMenuDesktop";
|
|
80
78
|
export {
|
|
81
|
-
|
|
79
|
+
F as FilterDropdownMenuDesktop
|
|
82
80
|
};
|