@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
|
@@ -90,3 +90,103 @@ export declare const Playground: {
|
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
|
+
export declare const CurrentlyWinning: {
|
|
94
|
+
(props: BidSnapshotProps): import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
args: {
|
|
96
|
+
currency: string;
|
|
97
|
+
numberOfBids: number;
|
|
98
|
+
lotStatus: LotStatus;
|
|
99
|
+
currentBid: number;
|
|
100
|
+
lotCloseDate: Date;
|
|
101
|
+
saleCloseDate: Date;
|
|
102
|
+
lang: import('date-fns').Locale;
|
|
103
|
+
startingBid: number;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export declare const Outbid: {
|
|
107
|
+
(props: BidSnapshotProps): import("react/jsx-runtime").JSX.Element;
|
|
108
|
+
args: {
|
|
109
|
+
currency: string;
|
|
110
|
+
numberOfBids: number;
|
|
111
|
+
lotStatus: LotStatus;
|
|
112
|
+
currentBid: number;
|
|
113
|
+
lotCloseDate: Date;
|
|
114
|
+
saleCloseDate: Date;
|
|
115
|
+
lang: import('date-fns').Locale;
|
|
116
|
+
startingBid: number;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export declare const WonBid: {
|
|
120
|
+
(props: BidSnapshotProps): import("react/jsx-runtime").JSX.Element;
|
|
121
|
+
args: {
|
|
122
|
+
currency: string;
|
|
123
|
+
numberOfBids: number;
|
|
124
|
+
lotStatus: LotStatus;
|
|
125
|
+
currentBid: number;
|
|
126
|
+
soldPrice: number;
|
|
127
|
+
lang: import('date-fns').Locale;
|
|
128
|
+
startingBid: number;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
export declare const LostBid: {
|
|
132
|
+
(props: BidSnapshotProps): import("react/jsx-runtime").JSX.Element;
|
|
133
|
+
args: {
|
|
134
|
+
currency: string;
|
|
135
|
+
numberOfBids: number;
|
|
136
|
+
lotStatus: LotStatus;
|
|
137
|
+
currentBid: number;
|
|
138
|
+
soldPrice: number;
|
|
139
|
+
lang: import('date-fns').Locale;
|
|
140
|
+
startingBid: number;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
export declare const StartingBid: {
|
|
144
|
+
(props: BidSnapshotProps): import("react/jsx-runtime").JSX.Element;
|
|
145
|
+
args: {
|
|
146
|
+
currency: string;
|
|
147
|
+
lotStatus: LotStatus;
|
|
148
|
+
startingBid: number;
|
|
149
|
+
startingBidText: string;
|
|
150
|
+
lang: import('date-fns').Locale;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
export declare const NoSeparators: {
|
|
154
|
+
(props: BidSnapshotProps): import("react/jsx-runtime").JSX.Element;
|
|
155
|
+
args: {
|
|
156
|
+
currency: string;
|
|
157
|
+
numberOfBids: number;
|
|
158
|
+
lotStatus: LotStatus;
|
|
159
|
+
currentBid: number;
|
|
160
|
+
lotCloseDate: Date;
|
|
161
|
+
saleCloseDate: Date;
|
|
162
|
+
lang: import('date-fns').Locale;
|
|
163
|
+
startingBid: number;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
export declare const SmallVariant: {
|
|
167
|
+
(props: BidSnapshotProps): import("react/jsx-runtime").JSX.Element;
|
|
168
|
+
args: {
|
|
169
|
+
currency: string;
|
|
170
|
+
numberOfBids: number;
|
|
171
|
+
lotStatus: LotStatus;
|
|
172
|
+
currentBid: number;
|
|
173
|
+
lotCloseDate: Date;
|
|
174
|
+
saleCloseDate: Date;
|
|
175
|
+
lang: import('date-fns').Locale;
|
|
176
|
+
startingBid: number;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
export declare const SmallVariantWithBidMessage: {
|
|
180
|
+
(props: BidSnapshotProps): import("react/jsx-runtime").JSX.Element;
|
|
181
|
+
args: {
|
|
182
|
+
currency: string;
|
|
183
|
+
numberOfBids: number;
|
|
184
|
+
lotStatus: LotStatus;
|
|
185
|
+
currentBid: number;
|
|
186
|
+
lotCloseDate: Date;
|
|
187
|
+
saleCloseDate: Date;
|
|
188
|
+
lang: import('date-fns').Locale;
|
|
189
|
+
startingBid: number;
|
|
190
|
+
bidStatus: BidStatusEnum;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback as
|
|
2
|
+
import { useCallback as _ } from "react";
|
|
3
3
|
import x from "../../components/Text/Text.js";
|
|
4
4
|
import { TextVariants as k } from "../../components/Text/types.js";
|
|
5
5
|
import { CountryPickerOption as v } from "./CountryPickerOption.js";
|
|
@@ -12,7 +12,7 @@ const j = ({
|
|
|
12
12
|
variantConfig: c,
|
|
13
13
|
inputName: d
|
|
14
14
|
}) => {
|
|
15
|
-
const { isPhone: p, value: h } = c, s =
|
|
15
|
+
const { isPhone: p, value: h } = c, s = _(
|
|
16
16
|
(r) => r.map(({ name: t, code: n }) => /* @__PURE__ */ l(
|
|
17
17
|
v,
|
|
18
18
|
{
|
|
@@ -26,7 +26,7 @@ const j = ({
|
|
|
26
26
|
n
|
|
27
27
|
)),
|
|
28
28
|
[h, p, d, e, c]
|
|
29
|
-
),
|
|
29
|
+
), a = (r) => {
|
|
30
30
|
if (!i.current) return;
|
|
31
31
|
const t = Array.from(i.current.querySelectorAll('input[type="radio"]')), n = t.findIndex((o) => o === document.activeElement);
|
|
32
32
|
if (r.key === "ArrowDown" || r.key === "ArrowRight") {
|
|
@@ -45,14 +45,14 @@ const j = ({
|
|
|
45
45
|
className: `${e}__list`,
|
|
46
46
|
ref: i,
|
|
47
47
|
tabIndex: -1,
|
|
48
|
-
onKeyDown:
|
|
48
|
+
onKeyDown: a,
|
|
49
49
|
role: "radiogroup",
|
|
50
50
|
"aria-label": m,
|
|
51
51
|
children: [
|
|
52
52
|
s(y),
|
|
53
53
|
Object.entries(f).map(([r, t]) => /* @__PURE__ */ u("div", { className: `${e}__group`, children: [
|
|
54
54
|
/* @__PURE__ */ u("div", { className: `${e}__letter-header`, children: [
|
|
55
|
-
/* @__PURE__ */ l(x, { variant: k.
|
|
55
|
+
/* @__PURE__ */ l(x, { variant: k.headingLarge, className: `${e}__letter-text`, children: r }),
|
|
56
56
|
/* @__PURE__ */ l("div", { className: `${e}__letter-line` })
|
|
57
57
|
] }),
|
|
58
58
|
s(t)
|
|
@@ -35,14 +35,14 @@ const w = ["US", "GB", "HK", "CH"], z = (n, l) => {
|
|
|
35
35
|
H(() => {
|
|
36
36
|
I(g);
|
|
37
37
|
}, [n, g]);
|
|
38
|
-
const [s,
|
|
38
|
+
const [s, M] = S(""), B = V(null), D = V(null), [x, P] = f(() => {
|
|
39
39
|
const e = w.map((r) => v.filter(($) => $.code === r)).flat(), a = v.filter((r) => !w.includes(r.code));
|
|
40
40
|
return [
|
|
41
41
|
e,
|
|
42
42
|
// keep original order for prioritized
|
|
43
43
|
a.sort((r, $) => r.name.localeCompare($.name))
|
|
44
44
|
];
|
|
45
|
-
}, []),
|
|
45
|
+
}, []), F = f(() => z(x, s), [x, s]), R = f(() => z(P, s), [P, s]), T = f(() => {
|
|
46
46
|
const e = {};
|
|
47
47
|
return R.forEach((a) => {
|
|
48
48
|
const r = a.name[0].toUpperCase();
|
|
@@ -59,7 +59,7 @@ const w = ["US", "GB", "HK", "CH"], z = (n, l) => {
|
|
|
59
59
|
ref: p,
|
|
60
60
|
children: /* @__PURE__ */ k("div", { className: `${t}__wrapper`, children: [
|
|
61
61
|
/* @__PURE__ */ k("div", { className: `${t}__header`, children: [
|
|
62
|
-
/* @__PURE__ */ o(A, { variant: G.
|
|
62
|
+
/* @__PURE__ */ o(A, { variant: G.headingMedium, className: `${t}__header-text`, children: m }),
|
|
63
63
|
/* @__PURE__ */ o("div", { className: `${t}__input-wrapper`, children: /* @__PURE__ */ o(
|
|
64
64
|
N,
|
|
65
65
|
{
|
|
@@ -70,22 +70,22 @@ const w = ["US", "GB", "HK", "CH"], z = (n, l) => {
|
|
|
70
70
|
placeholder: i,
|
|
71
71
|
value: s,
|
|
72
72
|
onChange: (e) => {
|
|
73
|
-
|
|
73
|
+
M(e.target.value);
|
|
74
74
|
},
|
|
75
75
|
autoFocus: !0,
|
|
76
76
|
className: `${t}__input`,
|
|
77
|
-
inputAdornment: /* @__PURE__ */ o("span", { "aria-hidden": "true", children: /* @__PURE__ */ o(Z, { icon: "Search", width:
|
|
77
|
+
inputAdornment: /* @__PURE__ */ o("span", { "aria-hidden": "true", children: /* @__PURE__ */ o(Z, { icon: "Search", width: 20, height: 20, color: "$cta-inactive" }) })
|
|
78
78
|
}
|
|
79
79
|
) })
|
|
80
80
|
] }),
|
|
81
81
|
/* @__PURE__ */ o(
|
|
82
82
|
q,
|
|
83
83
|
{
|
|
84
|
-
filteredPrioritized:
|
|
84
|
+
filteredPrioritized: F,
|
|
85
85
|
groupedCountries: T,
|
|
86
86
|
baseClassName: t,
|
|
87
87
|
modalTitle: m,
|
|
88
|
-
listRef:
|
|
88
|
+
listRef: D,
|
|
89
89
|
variantConfig: _,
|
|
90
90
|
inputName: h
|
|
91
91
|
}
|
|
@@ -98,7 +98,7 @@ const w = ["US", "GB", "HK", "CH"], z = (n, l) => {
|
|
|
98
98
|
},
|
|
99
99
|
className: `${t}__button`,
|
|
100
100
|
"data-testid": "country-picker-modal-select-button",
|
|
101
|
-
ref:
|
|
101
|
+
ref: B,
|
|
102
102
|
type: "button",
|
|
103
103
|
variant: O.secondary,
|
|
104
104
|
isDisabled: !c,
|
|
@@ -1,48 +1,50 @@
|
|
|
1
1
|
import { jsxs as _, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import d from "
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
2
|
+
import c from "../../components/Text/Text.js";
|
|
3
|
+
import $ from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { getSafeCountryCallingCode as d } from "./utils.js";
|
|
5
|
+
import { TextVariants as f } from "../../components/Text/types.js";
|
|
6
|
+
const s = ({
|
|
7
7
|
code: t,
|
|
8
8
|
name: n,
|
|
9
9
|
isChecked: p,
|
|
10
|
-
inputName:
|
|
10
|
+
inputName: h,
|
|
11
11
|
baseClassName: o,
|
|
12
|
-
variantConfig:
|
|
12
|
+
variantConfig: g
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
14
|
+
const l = `${o}__radio-${t}`, { isPhone: i, onChange: e } = g;
|
|
15
15
|
return /* @__PURE__ */ _(
|
|
16
|
-
|
|
16
|
+
c,
|
|
17
17
|
{
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
element: "label",
|
|
19
|
+
variant: f.labelMedium,
|
|
20
|
+
htmlFor: l,
|
|
21
|
+
className: $(`${o}__option`, {
|
|
20
22
|
[`${o}__option--selected`]: p,
|
|
21
23
|
[`${o}__option--is-phone`]: i
|
|
22
24
|
}),
|
|
23
|
-
"aria-label": i ? `${n} +${
|
|
25
|
+
"aria-label": i ? `${n} +${d(t)}` : n,
|
|
24
26
|
children: [
|
|
25
27
|
/* @__PURE__ */ r(
|
|
26
28
|
"input",
|
|
27
29
|
{
|
|
28
30
|
type: "radio",
|
|
29
|
-
id:
|
|
30
|
-
name:
|
|
31
|
+
id: l,
|
|
32
|
+
name: h,
|
|
31
33
|
checked: p,
|
|
32
|
-
className:
|
|
34
|
+
className: $(`${o}__radio`, {
|
|
33
35
|
[`${o}__radio--selected`]: p,
|
|
34
36
|
[`${o}__radio--visually-hidden`]: i
|
|
35
37
|
}),
|
|
36
38
|
onChange: () => {
|
|
37
|
-
|
|
39
|
+
e(i ? t : n);
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
),
|
|
41
43
|
/* @__PURE__ */ _("span", { className: `${o}__option-content`, children: [
|
|
42
|
-
/* @__PURE__ */ r(
|
|
43
|
-
i && /* @__PURE__ */ _(
|
|
44
|
+
/* @__PURE__ */ r(c, { className: `${o}__option-name`, children: n }),
|
|
45
|
+
i && /* @__PURE__ */ _(c, { className: `${o}__option-code`, children: [
|
|
44
46
|
"+",
|
|
45
|
-
|
|
47
|
+
d(t)
|
|
46
48
|
] })
|
|
47
49
|
] }),
|
|
48
50
|
/* @__PURE__ */ r("span", { className: `${o}__option-flag`, children: /* @__PURE__ */ r(
|
|
@@ -59,5 +61,5 @@ const y = ({
|
|
|
59
61
|
);
|
|
60
62
|
};
|
|
61
63
|
export {
|
|
62
|
-
|
|
64
|
+
s as CountryPickerOption
|
|
63
65
|
};
|
|
@@ -1,73 +1,74 @@
|
|
|
1
1
|
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { TextVariants as
|
|
4
|
-
import
|
|
2
|
+
import k from "../../components/Icon/Icon.js";
|
|
3
|
+
import { TextVariants as w } from "../../components/Text/types.js";
|
|
4
|
+
import p from "../../components/Text/Text.js";
|
|
5
5
|
import t from "../../node_modules/classnames/index.js";
|
|
6
6
|
import { countries as P } from "./constants.js";
|
|
7
|
-
import { forwardRef as
|
|
8
|
-
import { useNormalizedInputProps as
|
|
9
|
-
const j =
|
|
7
|
+
import { forwardRef as b } from "react";
|
|
8
|
+
import { useNormalizedInputProps as I, px as T } from "../../utils/index.js";
|
|
9
|
+
const j = b(
|
|
10
10
|
({
|
|
11
|
-
labelText:
|
|
12
|
-
ariaLabel:
|
|
13
|
-
displayValue:
|
|
14
|
-
onClick:
|
|
15
|
-
hasError:
|
|
11
|
+
labelText: g,
|
|
12
|
+
ariaLabel: m = g,
|
|
13
|
+
displayValue: _,
|
|
14
|
+
onClick: f,
|
|
15
|
+
hasError: n = !1,
|
|
16
16
|
errorMsg: s,
|
|
17
|
-
id:
|
|
18
|
-
className:
|
|
17
|
+
id: o,
|
|
18
|
+
className: u,
|
|
19
19
|
baseClassName: r,
|
|
20
20
|
variantConfig: h
|
|
21
|
-
},
|
|
22
|
-
const { isPhone:
|
|
21
|
+
}, $) => {
|
|
22
|
+
const { isPhone: l, value: c } = h, e = I({
|
|
23
23
|
id: "country-picker-trigger-input",
|
|
24
|
-
invalid:
|
|
24
|
+
invalid: n,
|
|
25
25
|
invalidText: s,
|
|
26
26
|
type: "text"
|
|
27
|
-
}),
|
|
28
|
-
return /* @__PURE__ */ d("div", { className: t(`${r}__trigger`,
|
|
27
|
+
}), v = e.invalidId, a = l ? c : P.filter((y) => y.name === c)?.[0]?.code, x = () => e.validation ? e.validation : /* @__PURE__ */ i("p", { className: `${T}-input__empty-validation`, children: " " });
|
|
28
|
+
return /* @__PURE__ */ d("div", { className: t(`${r}__trigger`, u), children: [
|
|
29
29
|
/* @__PURE__ */ i(
|
|
30
|
-
|
|
30
|
+
p,
|
|
31
31
|
{
|
|
32
|
-
|
|
32
|
+
element: "label",
|
|
33
|
+
variant: w.labelMedium,
|
|
33
34
|
className: t(`${r}__trigger-label`, {
|
|
34
|
-
[`${r}__trigger-label--error`]:
|
|
35
|
+
[`${r}__trigger-label--error`]: n
|
|
35
36
|
}),
|
|
36
|
-
id:
|
|
37
|
-
children:
|
|
37
|
+
id: o ? `${o}-label` : void 0,
|
|
38
|
+
children: g
|
|
38
39
|
}
|
|
39
40
|
),
|
|
40
41
|
/* @__PURE__ */ d(
|
|
41
42
|
"button",
|
|
42
43
|
{
|
|
43
|
-
ref:
|
|
44
|
+
ref: $,
|
|
44
45
|
type: "button",
|
|
45
|
-
"aria-label":
|
|
46
|
-
"aria-invalid":
|
|
47
|
-
"aria-describedby":
|
|
46
|
+
"aria-label": m,
|
|
47
|
+
"aria-invalid": e.invalid,
|
|
48
|
+
"aria-describedby": v,
|
|
48
49
|
className: t(`${r}__trigger-btn`, {
|
|
49
|
-
[`${r}__trigger-btn--error`]:
|
|
50
|
-
[`${r}__trigger-btn--is-phone`]:
|
|
50
|
+
[`${r}__trigger-btn--error`]: n,
|
|
51
|
+
[`${r}__trigger-btn--is-phone`]: l
|
|
51
52
|
}),
|
|
52
|
-
onClick:
|
|
53
|
+
onClick: f,
|
|
53
54
|
"data-testid": "country-picker-trigger",
|
|
54
|
-
id:
|
|
55
|
+
id: o,
|
|
55
56
|
children: [
|
|
56
|
-
|
|
57
|
+
a && /* @__PURE__ */ i("span", { className: `${r}__trigger-flag`, children: /* @__PURE__ */ i(
|
|
57
58
|
"img",
|
|
58
59
|
{
|
|
59
|
-
src: `https://flagcdn.com/h20/${
|
|
60
|
-
srcSet: `https://flagcdn.com/h40/${
|
|
61
|
-
alt: `${
|
|
60
|
+
src: `https://flagcdn.com/h20/${a.toLowerCase()}.png`,
|
|
61
|
+
srcSet: `https://flagcdn.com/h40/${a.toLowerCase()}.png 2x`,
|
|
62
|
+
alt: `${c} flag`,
|
|
62
63
|
className: `${r}__trigger-flag-img`
|
|
63
64
|
}
|
|
64
65
|
) }),
|
|
65
|
-
/* @__PURE__ */ i(
|
|
66
|
-
/* @__PURE__ */ i("span", { className: t(`${r}__trigger-icon`), children: /* @__PURE__ */ i(
|
|
66
|
+
/* @__PURE__ */ i(p, { className: t(`${r}__trigger-text`), children: _ }),
|
|
67
|
+
/* @__PURE__ */ i("span", { className: t(`${r}__trigger-icon`), children: /* @__PURE__ */ i(k, { icon: "ChevronDown", color: "black-100", width: 16, height: 16 }) })
|
|
67
68
|
]
|
|
68
69
|
}
|
|
69
70
|
),
|
|
70
|
-
!
|
|
71
|
+
!l && x()
|
|
71
72
|
] });
|
|
72
73
|
}
|
|
73
74
|
);
|
|
@@ -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
|
};
|