@phillips/seldon 1.219.0 → 1.221.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/IconButton/IconButton.stories.d.ts +3 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +101 -103
- package/dist/scss/_utils.scss +18 -0
- package/dist/scss/components/Button/_button.scss +4 -4
- package/dist/scss/components/FavoritingTileButton/_favoritingTileButton.scss +1 -1
- package/dist/scss/components/IconButton/_iconButton.scss +6 -3
- package/package.json +1 -1
- package/dist/components/PhoneNumberPicker/PhoneNumberPicker.d.ts +0 -18
- package/dist/components/PhoneNumberPicker/PhoneNumberPicker.js +0 -39
- package/dist/components/PhoneNumberPicker/PhoneNumberPicker.stories.d.ts +0 -13
- package/dist/components/PhoneNumberPicker/PhoneNumberPicker.test.d.ts +0 -1
- package/dist/components/PhoneNumberPicker/index.d.ts +0 -1
- package/dist/node_modules/libphonenumber-js/es6/getCountries.js +0 -7
- package/dist/node_modules/libphonenumber-js/min/exports/getCountries.js +0 -8
|
@@ -2,6 +2,9 @@ import { ButtonVariants } from '../Button/types';
|
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').ForwardRefExoticComponent<import('./IconButton').IconButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
args: {
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
};
|
|
5
8
|
argTypes: {
|
|
6
9
|
variant: {
|
|
7
10
|
options: ButtonVariants[];
|
package/dist/index.d.ts
CHANGED
|
@@ -62,7 +62,6 @@ export * from './components/Detail';
|
|
|
62
62
|
export * from './components/ExitGateCard';
|
|
63
63
|
export * from './components/Loader';
|
|
64
64
|
export { default as PageContentWrapper } from './components/PageContentWrapper/PageContentWrapper';
|
|
65
|
-
export * from './components/PhoneNumberPicker';
|
|
66
65
|
export * from './components/PinchZoom';
|
|
67
66
|
export * from './components/SeldonImage';
|
|
68
67
|
export * from './components/Tabs';
|
package/dist/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import { PaddingTokens as a, SpacingTokens as f, defaultYear as s, emailValidati
|
|
|
2
2
|
import { default as C } from "./pages/Page.js";
|
|
3
3
|
import { SSRMediaQuery as B, ssrMediaQueryStyle as P } from "./providers/SeldonProvider/utils.js";
|
|
4
4
|
import { usePendingState as L } from "./utils/hooks.js";
|
|
5
|
-
import { AuctionStatus as
|
|
5
|
+
import { AuctionStatus as V, LotStatus as b, SupportedLanguages as y } from "./types/commonTypes.js";
|
|
6
6
|
import { default as F } from "./components/Button/Button.js";
|
|
7
|
-
import { ButtonVariants as
|
|
7
|
+
import { ButtonVariants as h } from "./components/Button/types.js";
|
|
8
8
|
import { default as w } from "./components/IconButton/IconButton.js";
|
|
9
9
|
import { default as M } from "./components/Accordion/Accordion.js";
|
|
10
10
|
import { default as E } from "./components/Accordion/AccordionItem.js";
|
|
@@ -29,11 +29,11 @@ import { default as ce } from "./components/Drawer/Drawer.js";
|
|
|
29
29
|
import { default as Ce } from "./components/Dropdown/Dropdown.js";
|
|
30
30
|
import { default as Be } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
31
31
|
import { default as Ie } from "./components/Grid/Grid.js";
|
|
32
|
-
import { default as
|
|
33
|
-
import { GridItemAlign as
|
|
32
|
+
import { default as Ae } from "./components/GridItem/GridItem.js";
|
|
33
|
+
import { GridItemAlign as be } from "./components/GridItem/types.js";
|
|
34
34
|
import { default as De } from "./components/Input/Input.js";
|
|
35
|
-
import { default as
|
|
36
|
-
import { LinkVariants as
|
|
35
|
+
import { default as ve } from "./components/Link/Link.js";
|
|
36
|
+
import { LinkVariants as ke } from "./components/Link/types.js";
|
|
37
37
|
import { default as He } from "./components/LinkBlock/LinkBlock.js";
|
|
38
38
|
import { default as Ne } from "./components/LinkList/LinkList.js";
|
|
39
39
|
import { default as Ge } from "./components/Modal/Modal.js";
|
|
@@ -55,11 +55,11 @@ import { Tag as nt, default as gt } from "./components/Tags/Tags.js";
|
|
|
55
55
|
import { TextAlignments as St, TextVariants as Ct } from "./components/Text/types.js";
|
|
56
56
|
import { default as Bt } from "./components/Text/Text.js";
|
|
57
57
|
import { TextSymbolVariants as It } from "./components/TextSymbol/types.js";
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
58
|
+
import { default as At } from "./components/TextSymbol/TextSymbol.js";
|
|
59
|
+
import { default as bt } from "./components/Video/Video.js";
|
|
60
60
|
import { default as Dt } from "./patterns/DetailList/DetailList.js";
|
|
61
|
-
import { DetailListAlignment as
|
|
62
|
-
import { default as
|
|
61
|
+
import { DetailListAlignment as vt } from "./patterns/DetailList/types.js";
|
|
62
|
+
import { default as kt } from "./patterns/FavoritesCollectionTile/FavoritesCollectionTile.js";
|
|
63
63
|
import { default as Ht } from "./patterns/HeroBanner/HeroBanner.js";
|
|
64
64
|
import { default as Nt } from "./patterns/TextBanner/TextBanner.js";
|
|
65
65
|
import { default as Gt } from "./patterns/LanguageSelector/LanguageSelector.js";
|
|
@@ -78,63 +78,62 @@ import { default as mo } from "./components/ComposedModal/ComposedModal.js";
|
|
|
78
78
|
import { default as uo } from "./components/ExitGateCard/ExitGateCard.js";
|
|
79
79
|
import { default as xo } from "./components/Loader/Loader.js";
|
|
80
80
|
import { default as go } from "./components/PageContentWrapper/PageContentWrapper.js";
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import { default as wo } from "./
|
|
89
|
-
import { default as Mo } from "./
|
|
90
|
-
import { default as Eo } from "./site-furniture/
|
|
91
|
-
import { default as Ro } from "./
|
|
92
|
-
import { default as zo } from "./components/
|
|
93
|
-
import { default as Wo } from "./components/
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import { default as Jo } from "./components/
|
|
97
|
-
import { default as Xo } from "./components/
|
|
98
|
-
import { default as $o } from "./components/
|
|
99
|
-
import { default as tr } from "./components/
|
|
100
|
-
import { default as rr } from "./components/Filter/
|
|
101
|
-
import { default as fr } from "./components/Filter/
|
|
102
|
-
import { default as lr } from "./components/
|
|
103
|
-
import { default as mr } from "./components/
|
|
104
|
-
import { default as ur } from "./components/
|
|
105
|
-
import { default as xr } from "./components/
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import { default as Pr } from "./patterns/
|
|
110
|
-
import { default as Lr } from "./patterns/BidSnapshot/
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import { default as hr } from "./patterns/FilterMenu/FilterMenu.js";
|
|
81
|
+
import { FilterButton as So } from "./patterns/FiltersInline/FilterButton.js";
|
|
82
|
+
import { default as To } from "./patterns/FiltersInline/FiltersInline.js";
|
|
83
|
+
import { FilterButtonIconType as Po, FilterButtonType as Io } from "./patterns/FiltersInline/types.js";
|
|
84
|
+
import { default as Ao } from "./patterns/SaleCard/SaleCard.js";
|
|
85
|
+
import { SaleCardActions as bo } from "./patterns/SaleCard/SaleCardActions.js";
|
|
86
|
+
import { SaleCardImageDisplay as Do, SaleCardVariants as Fo } from "./patterns/SaleCard/types.js";
|
|
87
|
+
import { default as ho } from "./patterns/ViewingDetails/ViewingDetails.js";
|
|
88
|
+
import { default as wo } from "./components/ProgressIndicator/ProgressIndicator.js";
|
|
89
|
+
import { default as Mo } from "./site-furniture/Footer/Footer.js";
|
|
90
|
+
import { default as Eo } from "./site-furniture/Header/Header.js";
|
|
91
|
+
import { default as Ro } from "./components/AddToCalendar/AddToCalendar.js";
|
|
92
|
+
import { default as zo } from "./components/Article/Article.js";
|
|
93
|
+
import { default as Wo } from "./components/Countdown/Countdown.js";
|
|
94
|
+
import { CountdownVariants as jo } from "./components/Countdown/types.js";
|
|
95
|
+
import { default as Zo } from "./components/DescriptiveRadioButton/DescriptiveRadioButton.js";
|
|
96
|
+
import { default as Jo } from "./components/DescriptiveRadioButtonGroup/DescriptiveRadioButtonGroup.js";
|
|
97
|
+
import { default as Xo } from "./components/Divider/Divider.js";
|
|
98
|
+
import { default as $o } from "./components/FavoritingTileButton/FavoritingTileButton.js";
|
|
99
|
+
import { default as tr } from "./components/Filter/Filter.js";
|
|
100
|
+
import { default as rr } from "./components/Filter/FilterInput.js";
|
|
101
|
+
import { default as fr } from "./components/Filter/FilterHeader.js";
|
|
102
|
+
import { default as lr } from "./components/NotificationBanner/NotificationBanner.js";
|
|
103
|
+
import { default as mr } from "./components/Pictogram/Pictogram.js";
|
|
104
|
+
import { default as ur } from "./components/TextArea/TextArea.js";
|
|
105
|
+
import { default as xr } from "./components/Toast/Toast.js";
|
|
106
|
+
import { ToastProvider as gr } from "./components/Toast/ToastContextProvider.js";
|
|
107
|
+
import { useToast as Sr } from "./components/Toast/useToast.js";
|
|
108
|
+
import { default as Tr } from "./patterns/AccountPageHeader/AccountPageHeader.js";
|
|
109
|
+
import { default as Pr } from "./patterns/BidSnapshot/BidSnapshot.js";
|
|
110
|
+
import { default as Lr } from "./patterns/BidSnapshot/BidMessage.js";
|
|
111
|
+
import { BidMessageVariants as Vr, BidStatusEnum as br } from "./patterns/BidSnapshot/types.js";
|
|
112
|
+
import { default as Dr } from "./patterns/FilterMenu/FilterMenu.js";
|
|
114
113
|
import { default as vr } from "./patterns/ObjectTile/ObjectTile.js";
|
|
115
|
-
import { default as
|
|
116
|
-
import { default as
|
|
117
|
-
import { ProgressWizardFooter as
|
|
118
|
-
import { useHistoryManagement as
|
|
119
|
-
import { DefaultButtonLabels as
|
|
120
|
-
import { default as
|
|
114
|
+
import { default as kr } from "./patterns/CountryPicker/CountryPicker.js";
|
|
115
|
+
import { default as Hr } from "./patterns/ProgressWizard/ProgressWizard.js";
|
|
116
|
+
import { ProgressWizardFooter as Nr } from "./patterns/ProgressWizard/components/ProgressWizardFooter.js";
|
|
117
|
+
import { useHistoryManagement as Gr } from "./patterns/ProgressWizard/hooks/useHistoryManagement.js";
|
|
118
|
+
import { DefaultButtonLabels as Ur, LoadingState as zr } from "./patterns/ProgressWizard/types.js";
|
|
119
|
+
import { default as Wr } from "./patterns/PhoneNumberInput/PhoneNumberInput.js";
|
|
121
120
|
export {
|
|
122
121
|
M as Accordion,
|
|
123
122
|
E as AccordionItem,
|
|
124
123
|
R as AccordionItemVariant,
|
|
125
124
|
U as AccordionVariants,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
Tr as AccountPageHeader,
|
|
126
|
+
Ro as AddToCalendar,
|
|
127
|
+
zo as Article,
|
|
128
|
+
V as AuctionStatus,
|
|
130
129
|
Kt as AuthState,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
Lr as BidMessage,
|
|
131
|
+
Vr as BidMessageVariants,
|
|
132
|
+
Pr as BidSnapshot,
|
|
133
|
+
br as BidStatusEnum,
|
|
135
134
|
O as Breadcrumb,
|
|
136
135
|
F as Button,
|
|
137
|
-
|
|
136
|
+
h as ButtonVariants,
|
|
138
137
|
Y as Carousel,
|
|
139
138
|
q as CarouselArrows,
|
|
140
139
|
K as CarouselContent,
|
|
@@ -147,72 +146,71 @@ export {
|
|
|
147
146
|
mo as ComposedModal,
|
|
148
147
|
de as ContentPeek,
|
|
149
148
|
pe as ContentPeekHeightUnits,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
149
|
+
Wo as Countdown,
|
|
150
|
+
jo as CountdownVariants,
|
|
151
|
+
kr as CountryPicker,
|
|
152
|
+
Ur as DefaultButtonLabels,
|
|
153
|
+
Zo as DescriptiveRadioButton,
|
|
154
|
+
Jo as DescriptiveRadioButtonGroup,
|
|
156
155
|
ie as Detail,
|
|
157
156
|
Dt as DetailList,
|
|
158
|
-
|
|
157
|
+
vt as DetailListAlignment,
|
|
159
158
|
ne as DetailVariants,
|
|
160
|
-
|
|
159
|
+
Xo as Divider,
|
|
161
160
|
ce as Drawer,
|
|
162
161
|
Ce as Dropdown,
|
|
163
162
|
Be as ErrorBoundary,
|
|
164
163
|
uo as ExitGateCard,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
164
|
+
kt as FavoritesCollectionTile,
|
|
165
|
+
$o as FavoritingTileButton,
|
|
166
|
+
tr as Filter,
|
|
167
|
+
So as FilterButton,
|
|
168
|
+
Po as FilterButtonIconType,
|
|
169
|
+
Io as FilterButtonType,
|
|
170
|
+
fr as FilterHeader,
|
|
171
|
+
rr as FilterInput,
|
|
172
|
+
Dr as FilterMenu,
|
|
173
|
+
To as FiltersInline,
|
|
174
|
+
Mo as Footer,
|
|
176
175
|
Ie as Grid,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
Ae as GridItem,
|
|
177
|
+
be as GridItemAlign,
|
|
178
|
+
Eo as Header,
|
|
180
179
|
Ht as HeroBanner,
|
|
181
180
|
Q as Icon,
|
|
182
181
|
w as IconButton,
|
|
183
182
|
De as Input,
|
|
184
183
|
Gt as LanguageSelector,
|
|
185
|
-
|
|
184
|
+
ve as Link,
|
|
186
185
|
He as LinkBlock,
|
|
187
186
|
Ne as LinkList,
|
|
188
|
-
|
|
187
|
+
ke as LinkVariants,
|
|
189
188
|
xo as Loader,
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
zr as LoadingState,
|
|
190
|
+
b as LotStatus,
|
|
192
191
|
Ge as Modal,
|
|
193
192
|
Ue as Navigation,
|
|
194
193
|
Oe as NavigationItem,
|
|
195
194
|
Qe as NavigationItemTrigger,
|
|
196
195
|
Ye as NavigationList,
|
|
197
|
-
|
|
196
|
+
lr as NotificationBanner,
|
|
198
197
|
vr as ObjectTile,
|
|
199
198
|
a as PaddingTokens,
|
|
200
199
|
C as Page,
|
|
201
200
|
go as PageContentWrapper,
|
|
202
201
|
qe as Pagination,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
ur as Pictogram,
|
|
202
|
+
Wr as PhoneNumberInput,
|
|
203
|
+
mr as Pictogram,
|
|
206
204
|
Ke as PinchZoom,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
205
|
+
wo as ProgressIndicator,
|
|
206
|
+
Hr as ProgressWizard,
|
|
207
|
+
Nr as ProgressWizardFooter,
|
|
210
208
|
_e as Row,
|
|
211
209
|
B as SSRMediaQuery,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
210
|
+
Ao as SaleCard,
|
|
211
|
+
bo as SaleCardActions,
|
|
212
|
+
Do as SaleCardImageDisplay,
|
|
213
|
+
Fo as SaleCardVariants,
|
|
216
214
|
Ut as SaleHeaderBanner,
|
|
217
215
|
Ot as SaleHeaderBrowseAuctions,
|
|
218
216
|
et as Search,
|
|
@@ -233,16 +231,16 @@ export {
|
|
|
233
231
|
gt as TagsList,
|
|
234
232
|
Bt as Text,
|
|
235
233
|
St as TextAlignments,
|
|
236
|
-
|
|
234
|
+
ur as TextArea,
|
|
237
235
|
Nt as TextBanner,
|
|
238
236
|
It as TextSymbolVariants,
|
|
239
|
-
|
|
237
|
+
At as TextSymbols,
|
|
240
238
|
Ct as TextVariants,
|
|
241
|
-
|
|
242
|
-
|
|
239
|
+
xr as Toast,
|
|
240
|
+
gr as ToastProvider,
|
|
243
241
|
_t as UserManagement,
|
|
244
|
-
|
|
245
|
-
|
|
242
|
+
bt as Video,
|
|
243
|
+
ho as ViewingDetails,
|
|
246
244
|
oo as ViewingsList,
|
|
247
245
|
s as defaultYear,
|
|
248
246
|
l as emailValidation,
|
|
@@ -255,8 +253,8 @@ export {
|
|
|
255
253
|
n as noOp,
|
|
256
254
|
g as px,
|
|
257
255
|
P as ssrMediaQueryStyle,
|
|
258
|
-
|
|
256
|
+
Gr as useHistoryManagement,
|
|
259
257
|
c as useNormalizedInputProps,
|
|
260
258
|
L as usePendingState,
|
|
261
|
-
|
|
259
|
+
Sr as useToast
|
|
262
260
|
};
|
package/dist/scss/_utils.scss
CHANGED
|
@@ -221,3 +221,21 @@
|
|
|
221
221
|
@mixin cursorPointer() {
|
|
222
222
|
cursor: pointer;
|
|
223
223
|
}
|
|
224
|
+
|
|
225
|
+
// Provides pointer-aware interaction states that adapt to the user's input device:
|
|
226
|
+
// - Fine pointer devices (mouse/trackpad): shows styles on :hover
|
|
227
|
+
// - Coarse pointer devices (touch screens): shows styles on :active
|
|
228
|
+
// This prevents sticky hover states on touch devices and ensures proper feedback for all users.
|
|
229
|
+
@mixin hoverOrActive() {
|
|
230
|
+
@media (pointer: fine) and (hover: hover) {
|
|
231
|
+
&:hover {
|
|
232
|
+
@content;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@media (pointer: coarse) {
|
|
237
|
+
&:active {
|
|
238
|
+
@content;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
@include hoverOrActive {
|
|
61
61
|
background-color: $button-hover;
|
|
62
62
|
|
|
63
63
|
svg {
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
&--secondary {
|
|
135
135
|
transition: box-shadow 0.25s;
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
@include hoverOrActive {
|
|
138
138
|
background-color: transparent;
|
|
139
139
|
box-shadow: 0 0 0 1px rgba($pure-black, 1);
|
|
140
140
|
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
&--ghost {
|
|
148
148
|
border-color: transparent;
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
@include hoverOrActive {
|
|
151
151
|
background-color: transparent;
|
|
152
152
|
border: 1px solid transparent;
|
|
153
153
|
color: $pure-white;
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
|
|
187
|
+
@include hoverOrActive {
|
|
188
188
|
background-color: transparent;
|
|
189
189
|
color: $button-hover;
|
|
190
190
|
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
& svg {
|
|
12
12
|
height: $button-label-line-height;
|
|
13
|
+
pointer-events: none;
|
|
13
14
|
width: $button-label-line-height;
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
@include hoverOrActive {
|
|
16
17
|
color: $white-100;
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -44,11 +45,12 @@
|
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
@include hoverOrActive {
|
|
48
49
|
svg {
|
|
49
50
|
color: $pure-white;
|
|
50
51
|
|
|
51
52
|
path {
|
|
53
|
+
color: $pure-white;
|
|
52
54
|
fill: $pure-white;
|
|
53
55
|
}
|
|
54
56
|
}
|
|
@@ -56,6 +58,7 @@
|
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
&--ghost {
|
|
61
|
+
border: 1px solid transparent;
|
|
59
62
|
border-color: transparent;
|
|
60
63
|
|
|
61
64
|
svg {
|
|
@@ -94,7 +97,7 @@
|
|
|
94
97
|
border-radius: $radius-3xl;
|
|
95
98
|
}
|
|
96
99
|
|
|
97
|
-
|
|
100
|
+
@include hoverOrActive {
|
|
98
101
|
& svg {
|
|
99
102
|
color: $cta-hover;
|
|
100
103
|
fill: $cta-hover;
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { ComboBoxProps } from '../ComboBox/ComboBox';
|
|
3
|
-
/**
|
|
4
|
-
* PhoneNumberPickerProps extends ComboBoxProps, allowing for all ComboBox options
|
|
5
|
-
* while adding any phone-specific props
|
|
6
|
-
*/
|
|
7
|
-
export type PhoneNumberPickerProps = Omit<ComboBoxProps, 'options'>;
|
|
8
|
-
/**
|
|
9
|
-
* ## Overview
|
|
10
|
-
*
|
|
11
|
-
* A component for entering and selecting phone number country codes
|
|
12
|
-
*
|
|
13
|
-
* [Figma Link](https://www.figma.com/design/rIefa3bRPyZbZmtyV9PSQv/My-Account?node-id=1-3&p=f&m=dev)
|
|
14
|
-
*
|
|
15
|
-
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-PhoneNumberPicker--overview)
|
|
16
|
-
*/
|
|
17
|
-
declare const PhoneNumberPicker: React.ForwardRefExoticComponent<PhoneNumberPickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
export default PhoneNumberPicker;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import b from "../../node_modules/classnames/index.js";
|
|
3
|
-
import N, { useRef as P, useEffect as g, useMemo as h } from "react";
|
|
4
|
-
import { getCommonProps as x } from "../../utils/index.js";
|
|
5
|
-
import $ from "../ComboBox/ComboBox.js";
|
|
6
|
-
import { getCountries as _ } from "../../node_modules/libphonenumber-js/min/exports/getCountries.js";
|
|
7
|
-
import { getCountryCallingCode as k } from "../../node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js";
|
|
8
|
-
const v = N.forwardRef((i, l) => {
|
|
9
|
-
const { className: f, id: t, value: o, onChange: a, ...u } = i, { className: n, ...p } = x({ id: t }, "PhoneNumberPicker"), m = P(o);
|
|
10
|
-
g(() => {
|
|
11
|
-
o && (m.current = o);
|
|
12
|
-
}, [o]);
|
|
13
|
-
const d = h(() => {
|
|
14
|
-
const r = _(), s = (e) => k(e);
|
|
15
|
-
return r.map((e) => ({
|
|
16
|
-
label: `(${e}) +${s(e)}`,
|
|
17
|
-
value: e,
|
|
18
|
-
displayValue: `+${s(e)}`
|
|
19
|
-
}));
|
|
20
|
-
}, []), C = (r, s) => {
|
|
21
|
-
r ? s && (m.current = r) : m.current = "", a && a(r, s);
|
|
22
|
-
};
|
|
23
|
-
return /* @__PURE__ */ c("div", { className: b(n, f), id: t, ...p, children: /* @__PURE__ */ c(
|
|
24
|
-
$,
|
|
25
|
-
{
|
|
26
|
-
ref: l,
|
|
27
|
-
className: `${n}__combobox`,
|
|
28
|
-
id: `${t}-combobox`,
|
|
29
|
-
options: d,
|
|
30
|
-
value: o,
|
|
31
|
-
onChange: C,
|
|
32
|
-
...u
|
|
33
|
-
}
|
|
34
|
-
) });
|
|
35
|
-
});
|
|
36
|
-
v.displayName = "PhoneNumberPicker";
|
|
37
|
-
export {
|
|
38
|
-
v as default
|
|
39
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PhoneNumberPickerProps } from './PhoneNumberPicker';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: import('react').ForwardRefExoticComponent<PhoneNumberPickerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
-
};
|
|
6
|
-
export default meta;
|
|
7
|
-
export declare const Playground: {
|
|
8
|
-
({ ...props }: PhoneNumberPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
args: {
|
|
10
|
-
labelText: string;
|
|
11
|
-
id: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as PhoneNumberPicker, type PhoneNumberPickerProps } from './PhoneNumberPicker';
|