@phillips/seldon 1.205.2 → 1.206.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/index.d.ts +1 -0
- package/dist/index.js +88 -79
- package/dist/patterns/CountryPicker/CountryPickerTrigger.js +39 -33
- package/dist/patterns/PhoneNumberInput/PhoneNumberInput.js +51 -47
- package/dist/patterns/PhoneNumberInput/PhoneNumberInput.stories.d.ts +1 -1
- package/dist/patterns/ProgressWizard/ProgressWizard.d.ts +25 -0
- package/dist/patterns/ProgressWizard/ProgressWizard.js +78 -0
- package/dist/patterns/ProgressWizard/ProgressWizard.stories.d.ts +469 -0
- package/dist/patterns/ProgressWizard/ProgressWizard.test.d.ts +1 -0
- package/dist/patterns/ProgressWizard/components/ProgressWizardFooter.d.ts +35 -0
- package/dist/patterns/ProgressWizard/components/ProgressWizardFooter.js +56 -0
- package/dist/patterns/ProgressWizard/components/ProgressWizardFooter.test.d.ts +1 -0
- package/dist/patterns/ProgressWizard/hooks/useHistoryManagement.d.ts +28 -0
- package/dist/patterns/ProgressWizard/hooks/useHistoryManagement.js +24 -0
- package/dist/patterns/ProgressWizard/hooks/useHistoryManagement.test.d.ts +1 -0
- package/dist/patterns/ProgressWizard/index.d.ts +4 -0
- package/dist/patterns/ProgressWizard/types.d.ts +133 -0
- package/dist/patterns/ProgressWizard/types.js +17 -0
- package/dist/patterns/ProgressWizard/utils.d.ts +6 -0
- package/dist/patterns/ProgressWizard/utils.js +16 -0
- package/dist/patterns/ProgressWizard/utils.test.d.ts +1 -0
- package/dist/providers/SeldonProvider/utils.d.ts +1 -1
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/ComboBox/_combobox.scss +2 -2
- package/dist/scss/components/ProgressIndicator/_progressIndicator.scss +4 -0
- package/dist/scss/components/TextArea/_textArea.scss +2 -2
- package/dist/scss/patterns/CountryPicker/_countryPickerTrigger.scss +14 -13
- package/dist/scss/patterns/PhoneNumberInput/_phoneNumberInput.scss +19 -24
- package/dist/scss/patterns/ProgressWizard/_progressWizard.scss +83 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/staticContent.test.d.ts +1 -0
- package/package.json +1 -2
package/dist/index.d.ts
CHANGED
|
@@ -97,5 +97,6 @@ export * from './utils/hooks';
|
|
|
97
97
|
export * from './patterns/CountryPicker';
|
|
98
98
|
export * from './components/DescriptiveRadioButton';
|
|
99
99
|
export * from './components/DescriptiveRadioButtonGroup';
|
|
100
|
+
export * from './patterns/ProgressWizard';
|
|
100
101
|
export * from './patterns/TextBanner';
|
|
101
102
|
export * from './patterns/PhoneNumberInput';
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { PaddingTokens as a, SpacingTokens as f, defaultYear as s, emailValidation as l, encodeURLSearchParams as d, findChildrenExcludingTypes as m, findChildrenOfType as p, focusElementById as u, generatePaddingClassName as i, getCommonProps as x, noOp as n, px as
|
|
1
|
+
import { PaddingTokens as a, SpacingTokens as f, defaultYear as s, emailValidation as l, encodeURLSearchParams as d, findChildrenExcludingTypes as m, findChildrenOfType as p, focusElementById as u, generatePaddingClassName as i, getCommonProps as x, noOp as n, px as g, useNormalizedInputProps as c } from "./utils/index.js";
|
|
2
2
|
import { default as C } from "./pages/Page.js";
|
|
3
|
-
import { SSRMediaQuery as
|
|
4
|
-
import { usePendingState as
|
|
5
|
-
import { AuctionStatus as
|
|
3
|
+
import { SSRMediaQuery as P, ssrMediaQueryStyle as B } from "./providers/SeldonProvider/utils.js";
|
|
4
|
+
import { usePendingState as L } from "./utils/hooks.js";
|
|
5
|
+
import { AuctionStatus as A, LotStatus as V, SupportedLanguages as y } from "./types/commonTypes.js";
|
|
6
6
|
import { default as k } from "./components/Button/Button.js";
|
|
7
|
-
import { ButtonVariants as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
7
|
+
import { ButtonVariants as D } from "./components/Button/types.js";
|
|
8
|
+
import { default as w } from "./components/IconButton/IconButton.js";
|
|
9
|
+
import { default as M } from "./components/Accordion/Accordion.js";
|
|
10
10
|
import { default as E } from "./components/Accordion/AccordionItem.js";
|
|
11
11
|
import { AccordionItemVariant as R, AccordionVariants as U } from "./components/Accordion/types.js";
|
|
12
|
-
import { default as
|
|
12
|
+
import { default as O } from "./components/Breadcrumb/Breadcrumb.js";
|
|
13
13
|
import "react/jsx-runtime";
|
|
14
14
|
import "./node_modules/classnames/index.js";
|
|
15
|
-
import { default as
|
|
15
|
+
import { default as Q } from "./components/Icon/Icon.js";
|
|
16
16
|
import { default as Y } from "./components/Carousel/Carousel.js";
|
|
17
17
|
import { default as q } from "./components/Carousel/CarouselArrows.js";
|
|
18
18
|
import { default as K } from "./components/Carousel/CarouselContent.js";
|
|
@@ -25,21 +25,21 @@ import { default as de } from "./components/ContentPeek/ContentPeek.js";
|
|
|
25
25
|
import { HeightUnits as pe } from "./components/ContentPeek/utils.js";
|
|
26
26
|
import { default as ie } from "./components/Detail/Detail.js";
|
|
27
27
|
import { default as ne } from "./components/Drawer/Drawer.js";
|
|
28
|
-
import { default as
|
|
28
|
+
import { default as ce } from "./components/Dropdown/Dropdown.js";
|
|
29
29
|
import { default as Ce } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
30
|
-
import { default as
|
|
30
|
+
import { default as Pe } from "./components/Grid/Grid.js";
|
|
31
31
|
import { default as Ie } from "./components/GridItem/GridItem.js";
|
|
32
|
-
import { GridItemAlign as
|
|
32
|
+
import { GridItemAlign as be } from "./components/GridItem/types.js";
|
|
33
33
|
import { default as Ve } from "./components/Input/Input.js";
|
|
34
34
|
import { default as he } from "./components/Link/Link.js";
|
|
35
35
|
import { LinkVariants as ve } from "./components/Link/types.js";
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
36
|
+
import { default as Fe } from "./components/LinkBlock/LinkBlock.js";
|
|
37
|
+
import { default as He } from "./components/LinkList/LinkList.js";
|
|
38
|
+
import { default as Ne } from "./components/Modal/Modal.js";
|
|
39
39
|
import { default as Ge } from "./components/Navigation/Navigation.js";
|
|
40
40
|
import { default as Ue } from "./components/Navigation/NavigationItem/NavigationItem.js";
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
41
|
+
import { default as Oe } from "./components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
|
|
42
|
+
import { default as Qe } from "./components/Navigation/NavigationList/NavigationList.js";
|
|
43
43
|
import { default as Ye } from "./components/Pagination/Pagination.js";
|
|
44
44
|
import { default as qe } from "./components/PinchZoom/PinchZoom.js";
|
|
45
45
|
import { default as Ke } from "./components/Row/Row.js";
|
|
@@ -51,21 +51,21 @@ import { default as st } from "./components/SplitPanel/SplitPanel.js";
|
|
|
51
51
|
import { default as dt } from "./components/Tabs/TabsContainer.js";
|
|
52
52
|
import { default as pt } from "./components/Tabs/TabsContent.js";
|
|
53
53
|
import { Tag as it, default as xt } from "./components/Tags/Tags.js";
|
|
54
|
-
import { TextAlignments as
|
|
54
|
+
import { TextAlignments as gt, TextVariants as ct } from "./components/Text/types.js";
|
|
55
55
|
import { default as Ct } from "./components/Text/Text.js";
|
|
56
|
-
import { TextSymbolVariants as
|
|
56
|
+
import { TextSymbolVariants as Pt } from "./components/TextSymbol/types.js";
|
|
57
57
|
import { default as It } from "./components/TextSymbol/TextSymbol.js";
|
|
58
|
-
import { default as
|
|
58
|
+
import { default as bt } from "./components/Video/Video.js";
|
|
59
59
|
import { default as Vt } from "./patterns/DetailList/DetailList.js";
|
|
60
60
|
import { DetailListAlignment as ht } from "./patterns/DetailList/types.js";
|
|
61
61
|
import { default as vt } from "./patterns/FavoritesCollectionTile/FavoritesCollectionTile.js";
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
62
|
+
import { default as Ft } from "./patterns/HeroBanner/HeroBanner.js";
|
|
63
|
+
import { default as Ht } from "./patterns/TextBanner/TextBanner.js";
|
|
64
|
+
import { default as Nt } from "./patterns/LanguageSelector/LanguageSelector.js";
|
|
65
65
|
import { default as Gt } from "./patterns/SaleHeaderBanner/SaleHeaderBanner.js";
|
|
66
66
|
import { default as Ut } from "./patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js";
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
67
|
+
import { default as Ot } from "./patterns/Social/Social.js";
|
|
68
|
+
import { default as Qt } from "./patterns/Subscribe/Subscribe.js";
|
|
69
69
|
import { SubscriptionState as Yt } from "./patterns/Subscribe/types.js";
|
|
70
70
|
import { AuthState as qt } from "./patterns/UserManagement/types.js";
|
|
71
71
|
import { default as Kt } from "./patterns/UserManagement/UserManagement.js";
|
|
@@ -77,21 +77,21 @@ import { default as so } from "./components/ComposedModal/ComposedModal.js";
|
|
|
77
77
|
import { default as mo } from "./components/ExitGateCard/ExitGateCard.js";
|
|
78
78
|
import { default as uo } from "./components/Loader/Loader.js";
|
|
79
79
|
import { default as xo } from "./components/PageContentWrapper/PageContentWrapper.js";
|
|
80
|
-
import { default as
|
|
80
|
+
import { default as go } from "./components/PhoneNumberPicker/PhoneNumberPicker.js";
|
|
81
81
|
import { default as So } from "./patterns/FiltersInline/FiltersInline.js";
|
|
82
|
-
import { FilterButtonIconType as To, FilterButtonType as
|
|
82
|
+
import { FilterButtonIconType as To, FilterButtonType as Po } from "./patterns/FiltersInline/types.js";
|
|
83
83
|
import { default as Io } from "./patterns/SaleCard/SaleCard.js";
|
|
84
|
-
import { SaleCardActions as
|
|
84
|
+
import { SaleCardActions as bo } from "./patterns/SaleCard/SaleCardActions.js";
|
|
85
85
|
import { SaleCardVariants as Vo } from "./patterns/SaleCard/types.js";
|
|
86
86
|
import { default as ho } from "./patterns/ViewingDetails/ViewingDetails.js";
|
|
87
87
|
import { default as vo } from "./components/ProgressIndicator/ProgressIndicator.js";
|
|
88
|
-
import { default as
|
|
89
|
-
import { default as
|
|
90
|
-
import { default as
|
|
88
|
+
import { default as Fo } from "./site-furniture/Footer/Footer.js";
|
|
89
|
+
import { default as Ho } from "./site-furniture/Header/Header.js";
|
|
90
|
+
import { default as No } from "./components/AddToCalendar/AddToCalendar.js";
|
|
91
91
|
import { default as Go } from "./components/Article/Article.js";
|
|
92
92
|
import { default as Uo } from "./components/Countdown/Countdown.js";
|
|
93
|
-
import { CountdownVariants as
|
|
94
|
-
import { default as
|
|
93
|
+
import { CountdownVariants as Oo } from "./components/Countdown/types.js";
|
|
94
|
+
import { default as Qo } from "./components/DescriptiveRadioButton/DescriptiveRadioButton.js";
|
|
95
95
|
import { default as Yo } from "./components/DescriptiveRadioButtonGroup/DescriptiveRadioButtonGroup.js";
|
|
96
96
|
import { default as qo } from "./components/Divider/Divider.js";
|
|
97
97
|
import { default as Ko } from "./components/FavoritingTileButton/FavoritingTileButton.js";
|
|
@@ -104,31 +104,35 @@ import { default as dr } from "./components/TextArea/TextArea.js";
|
|
|
104
104
|
import { default as pr } from "./components/Toast/Toast.js";
|
|
105
105
|
import { ToastProvider as ir } from "./components/Toast/ToastContextProvider.js";
|
|
106
106
|
import { useToast as nr } from "./components/Toast/useToast.js";
|
|
107
|
-
import { default as
|
|
107
|
+
import { default as cr } from "./patterns/AccountPageHeader/AccountPageHeader.js";
|
|
108
108
|
import { default as Cr } from "./patterns/BidSnapshot/BidSnapshot.js";
|
|
109
|
-
import { default as
|
|
110
|
-
import { BidMessageVariants as Ir, BidStatusEnum as
|
|
111
|
-
import { default as
|
|
109
|
+
import { default as Pr } from "./patterns/BidSnapshot/BidMessage.js";
|
|
110
|
+
import { BidMessageVariants as Ir, BidStatusEnum as Lr } from "./patterns/BidSnapshot/types.js";
|
|
111
|
+
import { default as Ar } from "./patterns/FilterMenu/FilterMenu.js";
|
|
112
112
|
import { default as yr } from "./patterns/ObjectTile/ObjectTile.js";
|
|
113
113
|
import { default as kr } from "./patterns/CountryPicker/CountryPicker.js";
|
|
114
|
-
import { default as
|
|
114
|
+
import { default as Dr } from "./patterns/ProgressWizard/ProgressWizard.js";
|
|
115
|
+
import { ProgressWizardFooter as wr } from "./patterns/ProgressWizard/components/ProgressWizardFooter.js";
|
|
116
|
+
import { useHistoryManagement as Mr } from "./patterns/ProgressWizard/hooks/useHistoryManagement.js";
|
|
117
|
+
import { DefaultButtonLabels as Er, LoadingState as Gr } from "./patterns/ProgressWizard/types.js";
|
|
118
|
+
import { default as Ur } from "./patterns/PhoneNumberInput/PhoneNumberInput.js";
|
|
115
119
|
export {
|
|
116
|
-
|
|
120
|
+
M as Accordion,
|
|
117
121
|
E as AccordionItem,
|
|
118
122
|
R as AccordionItemVariant,
|
|
119
123
|
U as AccordionVariants,
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
cr as AccountPageHeader,
|
|
125
|
+
No as AddToCalendar,
|
|
122
126
|
Go as Article,
|
|
123
|
-
|
|
127
|
+
A as AuctionStatus,
|
|
124
128
|
qt as AuthState,
|
|
125
|
-
|
|
129
|
+
Pr as BidMessage,
|
|
126
130
|
Ir as BidMessageVariants,
|
|
127
131
|
Cr as BidSnapshot,
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
Lr as BidStatusEnum,
|
|
133
|
+
O as Breadcrumb,
|
|
130
134
|
k as Button,
|
|
131
|
-
|
|
135
|
+
D as ButtonVariants,
|
|
132
136
|
Y as Carousel,
|
|
133
137
|
q as CarouselArrows,
|
|
134
138
|
K as CarouselContent,
|
|
@@ -142,63 +146,67 @@ export {
|
|
|
142
146
|
de as ContentPeek,
|
|
143
147
|
pe as ContentPeekHeightUnits,
|
|
144
148
|
Uo as Countdown,
|
|
145
|
-
|
|
149
|
+
Oo as CountdownVariants,
|
|
146
150
|
kr as CountryPicker,
|
|
147
|
-
|
|
151
|
+
Er as DefaultButtonLabels,
|
|
152
|
+
Qo as DescriptiveRadioButton,
|
|
148
153
|
Yo as DescriptiveRadioButtonGroup,
|
|
149
154
|
ie as Detail,
|
|
150
155
|
Vt as DetailList,
|
|
151
156
|
ht as DetailListAlignment,
|
|
152
157
|
qo as Divider,
|
|
153
158
|
ne as Drawer,
|
|
154
|
-
|
|
159
|
+
ce as Dropdown,
|
|
155
160
|
Ce as ErrorBoundary,
|
|
156
161
|
mo as ExitGateCard,
|
|
157
162
|
vt as FavoritesCollectionTile,
|
|
158
163
|
Ko as FavoritingTileButton,
|
|
159
164
|
_o as Filter,
|
|
160
165
|
To as FilterButtonIconType,
|
|
161
|
-
|
|
166
|
+
Po as FilterButtonType,
|
|
162
167
|
or as FilterHeader,
|
|
163
168
|
er as FilterInput,
|
|
164
|
-
|
|
169
|
+
Ar as FilterMenu,
|
|
165
170
|
So as FiltersInline,
|
|
166
|
-
|
|
167
|
-
|
|
171
|
+
Fo as Footer,
|
|
172
|
+
Pe as Grid,
|
|
168
173
|
Ie as GridItem,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
+
be as GridItemAlign,
|
|
175
|
+
Ho as Header,
|
|
176
|
+
Ft as HeroBanner,
|
|
177
|
+
Q as Icon,
|
|
178
|
+
w as IconButton,
|
|
174
179
|
Ve as Input,
|
|
175
|
-
|
|
180
|
+
Nt as LanguageSelector,
|
|
176
181
|
he as Link,
|
|
177
|
-
|
|
178
|
-
|
|
182
|
+
Fe as LinkBlock,
|
|
183
|
+
He as LinkList,
|
|
179
184
|
ve as LinkVariants,
|
|
180
185
|
uo as Loader,
|
|
186
|
+
Gr as LoadingState,
|
|
181
187
|
V as LotStatus,
|
|
182
|
-
|
|
188
|
+
Ne as Modal,
|
|
183
189
|
Ge as Navigation,
|
|
184
190
|
Ue as NavigationItem,
|
|
185
|
-
|
|
186
|
-
|
|
191
|
+
Oe as NavigationItemTrigger,
|
|
192
|
+
Qe as NavigationList,
|
|
187
193
|
ar as NotificationBanner,
|
|
188
194
|
yr as ObjectTile,
|
|
189
195
|
a as PaddingTokens,
|
|
190
196
|
C as Page,
|
|
191
197
|
xo as PageContentWrapper,
|
|
192
198
|
Ye as Pagination,
|
|
193
|
-
|
|
194
|
-
|
|
199
|
+
Ur as PhoneNumberInput,
|
|
200
|
+
go as PhoneNumberPicker,
|
|
195
201
|
sr as Pictogram,
|
|
196
202
|
qe as PinchZoom,
|
|
197
203
|
vo as ProgressIndicator,
|
|
204
|
+
Dr as ProgressWizard,
|
|
205
|
+
wr as ProgressWizardFooter,
|
|
198
206
|
Ke as Row,
|
|
199
|
-
|
|
207
|
+
P as SSRMediaQuery,
|
|
200
208
|
Io as SaleCard,
|
|
201
|
-
|
|
209
|
+
bo as SaleCardActions,
|
|
202
210
|
Vo as SaleCardVariants,
|
|
203
211
|
Gt as SaleHeaderBanner,
|
|
204
212
|
Ut as SaleHeaderBrowseAuctions,
|
|
@@ -207,11 +215,11 @@ export {
|
|
|
207
215
|
oo as SeldonProvider,
|
|
208
216
|
ot as Select,
|
|
209
217
|
at as SelectVariants,
|
|
210
|
-
|
|
218
|
+
Ot as Social,
|
|
211
219
|
f as SpacingTokens,
|
|
212
220
|
st as SplitPanel,
|
|
213
221
|
_t as StatefulViewingsList,
|
|
214
|
-
|
|
222
|
+
Qt as Subscribe,
|
|
215
223
|
Yt as SubscriptionState,
|
|
216
224
|
y as SupportedLanguages,
|
|
217
225
|
dt as TabsContainer,
|
|
@@ -219,16 +227,16 @@ export {
|
|
|
219
227
|
it as Tag,
|
|
220
228
|
xt as TagsList,
|
|
221
229
|
Ct as Text,
|
|
222
|
-
|
|
230
|
+
gt as TextAlignments,
|
|
223
231
|
dr as TextArea,
|
|
224
|
-
|
|
225
|
-
|
|
232
|
+
Ht as TextBanner,
|
|
233
|
+
Pt as TextSymbolVariants,
|
|
226
234
|
It as TextSymbols,
|
|
227
|
-
|
|
235
|
+
ct as TextVariants,
|
|
228
236
|
pr as Toast,
|
|
229
237
|
ir as ToastProvider,
|
|
230
238
|
Kt as UserManagement,
|
|
231
|
-
|
|
239
|
+
bt as Video,
|
|
232
240
|
ho as ViewingDetails,
|
|
233
241
|
eo as ViewingsList,
|
|
234
242
|
s as defaultYear,
|
|
@@ -240,9 +248,10 @@ export {
|
|
|
240
248
|
i as generatePaddingClassName,
|
|
241
249
|
x as getCommonProps,
|
|
242
250
|
n as noOp,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
251
|
+
g as px,
|
|
252
|
+
B as ssrMediaQueryStyle,
|
|
253
|
+
Mr as useHistoryManagement,
|
|
254
|
+
c as useNormalizedInputProps,
|
|
255
|
+
L as usePendingState,
|
|
247
256
|
nr as useToast
|
|
248
257
|
};
|
|
@@ -1,59 +1,65 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import x from "../../components/Icon/Icon.js";
|
|
3
|
-
import { TextVariants as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { countries as
|
|
7
|
-
import { forwardRef as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { TextVariants as y } from "../../components/Text/types.js";
|
|
4
|
+
import k from "../../components/Text/Text.js";
|
|
5
|
+
import t from "../../node_modules/classnames/index.js";
|
|
6
|
+
import { countries as P } from "./constants.js";
|
|
7
|
+
import { forwardRef as w } from "react";
|
|
8
|
+
import { useNormalizedInputProps as I, px as T } from "../../utils/index.js";
|
|
9
|
+
const b = w(
|
|
10
|
+
({ labelText: l, displayValue: p, onClick: m, hasError: o = !1, errorMsg: _, id: e, className: s, baseClassName: r, variantConfig: f }, u) => {
|
|
11
|
+
const { isPhone: a, value: c } = f, n = I({
|
|
12
|
+
id: "country-picker-trigger-input",
|
|
13
|
+
invalid: o,
|
|
14
|
+
invalidText: _,
|
|
15
|
+
type: "text"
|
|
16
|
+
}), v = n.invalidId, g = a ? c : P.filter((h) => h.name === c)?.[0]?.code, $ = () => n.validation ? n.validation : /* @__PURE__ */ i("p", { className: `${T}-input__validation`, children: " " });
|
|
17
|
+
return /* @__PURE__ */ d("div", { className: t(`${r}__trigger`, s), children: [
|
|
18
|
+
/* @__PURE__ */ i(
|
|
19
|
+
k,
|
|
14
20
|
{
|
|
15
|
-
variant:
|
|
16
|
-
className:
|
|
21
|
+
variant: y.string2,
|
|
22
|
+
className: t(`${r}__trigger-label`, {
|
|
17
23
|
[`${r}__trigger-label--error`]: o
|
|
18
24
|
}),
|
|
19
|
-
id:
|
|
20
|
-
children:
|
|
25
|
+
id: e ? `${e}-label` : void 0,
|
|
26
|
+
children: l
|
|
21
27
|
}
|
|
22
28
|
),
|
|
23
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ d(
|
|
24
30
|
"button",
|
|
25
31
|
{
|
|
26
|
-
ref:
|
|
32
|
+
ref: u,
|
|
27
33
|
type: "button",
|
|
28
|
-
"aria-label":
|
|
29
|
-
"aria-invalid":
|
|
30
|
-
"aria-describedby":
|
|
31
|
-
className:
|
|
34
|
+
"aria-label": l,
|
|
35
|
+
"aria-invalid": n.invalid,
|
|
36
|
+
"aria-describedby": v,
|
|
37
|
+
className: t(`${r}__trigger-btn`, {
|
|
32
38
|
[`${r}__trigger-btn--error`]: o,
|
|
33
|
-
[`${r}__trigger-btn--is-phone`]:
|
|
39
|
+
[`${r}__trigger-btn--is-phone`]: a
|
|
34
40
|
}),
|
|
35
|
-
onClick:
|
|
41
|
+
onClick: m,
|
|
36
42
|
"data-testid": "country-picker-trigger",
|
|
37
|
-
id:
|
|
43
|
+
id: e,
|
|
38
44
|
children: [
|
|
39
|
-
|
|
45
|
+
g && /* @__PURE__ */ i(
|
|
40
46
|
"img",
|
|
41
47
|
{
|
|
42
|
-
src: `https://flagcdn.com/24x18/${
|
|
43
|
-
alt: `${
|
|
48
|
+
src: `https://flagcdn.com/24x18/${g.toLowerCase()}.png`,
|
|
49
|
+
alt: `${c} flag`,
|
|
44
50
|
className: `${r}__trigger-flag`
|
|
45
51
|
}
|
|
46
52
|
),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ i("span", { className: t(`${r}__trigger-text`), children: p }),
|
|
54
|
+
/* @__PURE__ */ i("span", { className: t(`${r}__trigger-icon`), children: /* @__PURE__ */ i(x, { icon: "ChevronDown", color: "black-100", width: 16, height: 16 }) })
|
|
49
55
|
]
|
|
50
56
|
}
|
|
51
57
|
),
|
|
52
|
-
|
|
58
|
+
!a && $()
|
|
53
59
|
] });
|
|
54
60
|
}
|
|
55
61
|
);
|
|
56
|
-
|
|
62
|
+
b.displayName = "CountryPickerTrigger";
|
|
57
63
|
export {
|
|
58
|
-
|
|
64
|
+
b as default
|
|
59
65
|
};
|
|
@@ -1,79 +1,83 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import C, { forwardRef as P } from "react";
|
|
3
|
+
import { getCommonProps as _, px as x, useNormalizedInputProps as I } from "../../utils/index.js";
|
|
4
|
+
import S from "../../node_modules/classnames/index.js";
|
|
5
|
+
import T from "../CountryPicker/CountryPicker.js";
|
|
6
|
+
import $ from "../../components/Input/Input.js";
|
|
7
7
|
import { getSafeCountryCallingCode as L } from "../CountryPicker/utils.js";
|
|
8
|
-
import { countries as
|
|
9
|
-
|
|
10
|
-
const j = P(
|
|
8
|
+
import { countries as j } from "../CountryPicker/constants.js";
|
|
9
|
+
const k = P(
|
|
11
10
|
({
|
|
12
|
-
className:
|
|
13
|
-
value:
|
|
14
|
-
countryCode:
|
|
15
|
-
handleValueChange:
|
|
16
|
-
label:
|
|
17
|
-
required:
|
|
18
|
-
error:
|
|
19
|
-
errorText:
|
|
20
|
-
disabled:
|
|
21
|
-
...
|
|
22
|
-
},
|
|
23
|
-
const { className:
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
className: s,
|
|
12
|
+
value: l = "",
|
|
13
|
+
countryCode: p = "",
|
|
14
|
+
handleValueChange: u,
|
|
15
|
+
label: c = "Phone",
|
|
16
|
+
required: m = !1,
|
|
17
|
+
error: n,
|
|
18
|
+
errorText: h,
|
|
19
|
+
disabled: f = !1,
|
|
20
|
+
...y
|
|
21
|
+
}, v) => {
|
|
22
|
+
const { className: t, ...b } = _(y, "PhoneNumberInput"), [a, N] = C.useState(p || void 0), o = j.find((r) => r.code === a), g = (r) => {
|
|
23
|
+
u?.(r.target.value, a || "");
|
|
24
|
+
}, i = I({
|
|
25
|
+
id: "phone-input",
|
|
26
|
+
invalid: n,
|
|
27
|
+
invalidText: h,
|
|
28
|
+
type: "text"
|
|
29
|
+
});
|
|
30
|
+
return /* @__PURE__ */ d("div", { ref: v, className: S(`${t}`, s), ...b, children: [
|
|
31
|
+
/* @__PURE__ */ d("div", { className: `${t}__wrapper`, children: [
|
|
32
|
+
/* @__PURE__ */ d("div", { className: `${t}__country-picker`, children: [
|
|
33
|
+
/* @__PURE__ */ e("input", { type: "hidden", name: "phoneNumber", value: l, "data-testid": "phone-number-hidden-input" }),
|
|
34
|
+
/* @__PURE__ */ e(
|
|
31
35
|
"input",
|
|
32
36
|
{
|
|
33
37
|
type: "hidden",
|
|
34
38
|
name: "phoneCountryCode",
|
|
35
|
-
value:
|
|
39
|
+
value: a || "",
|
|
36
40
|
"data-testid": "phone-country-code-hidden-input"
|
|
37
41
|
}
|
|
38
42
|
),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
43
|
+
/* @__PURE__ */ e(
|
|
44
|
+
T,
|
|
41
45
|
{
|
|
42
46
|
triggerLabelText: "Phone Number",
|
|
43
|
-
triggerDisplayValue:
|
|
44
|
-
hasTriggerError: !!
|
|
47
|
+
triggerDisplayValue: o ? `+${L(o.code)}` : "",
|
|
48
|
+
hasTriggerError: !!n,
|
|
45
49
|
modalTitle: "Country code",
|
|
46
50
|
searchInputLabel: "Search country",
|
|
47
51
|
searchInputPlaceholder: "Search country",
|
|
48
52
|
selectButtonLabel: "Select",
|
|
49
53
|
isPhone: !0,
|
|
50
|
-
value:
|
|
51
|
-
onChange:
|
|
54
|
+
value: o?.code,
|
|
55
|
+
onChange: N
|
|
52
56
|
}
|
|
53
57
|
)
|
|
54
58
|
] }),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
59
|
+
/* @__PURE__ */ e("div", { className: `${t}__input`, children: /* @__PURE__ */ e(
|
|
60
|
+
$,
|
|
57
61
|
{
|
|
58
62
|
id: "phone-input",
|
|
59
63
|
type: "tel",
|
|
60
|
-
labelText:
|
|
64
|
+
labelText: c,
|
|
61
65
|
hideLabel: !0,
|
|
62
|
-
value:
|
|
63
|
-
onChange:
|
|
64
|
-
required:
|
|
65
|
-
invalid: !!
|
|
66
|
-
disabled:
|
|
66
|
+
value: l,
|
|
67
|
+
onChange: g,
|
|
68
|
+
required: m,
|
|
69
|
+
invalid: !!n,
|
|
70
|
+
disabled: f,
|
|
67
71
|
invalidText: "",
|
|
68
|
-
"aria-describedby":
|
|
72
|
+
"aria-describedby": i.invalidId
|
|
69
73
|
}
|
|
70
74
|
) })
|
|
71
75
|
] }),
|
|
72
|
-
|
|
76
|
+
i.validation ? i.validation : /* @__PURE__ */ e("p", { className: `${x}-input__validation`, children: " " })
|
|
73
77
|
] });
|
|
74
78
|
}
|
|
75
79
|
);
|
|
76
|
-
|
|
80
|
+
k.displayName = "PhoneNumberInput";
|
|
77
81
|
export {
|
|
78
|
-
|
|
82
|
+
k as default
|
|
79
83
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CallbackProps, ProgressWizardBaseProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the main ProgressWizard component.
|
|
4
|
+
*
|
|
5
|
+
* @property customHeader - Optional custom header ReactNode displayed above the progress indicator. This can be used to add a logo or other branding element to the top of the wizard. If not provided, no header will be shown. For Phillips, it should probably be ` <Icon icon="PhillipsLogo" height={32} width={120} aria-label="Phillips Logo" />
|
|
6
|
+
* @property hideNavigation - If true, hides the default footer navigation. When hidden you must manage step index changes yourself (e.g. via currentStepIndex prop)
|
|
7
|
+
* @property hideProgressIndicator - If true, hides the progress indicator bar.
|
|
8
|
+
* @property isEnableHistoryManagement - If true step advances push a history state so the browser back/forward buttons navigate between steps. Default is false and if you want this behavior you should use the useHistoryManagement hook directly in your controlling component.
|
|
9
|
+
* @property currentStepIndex - Controlled current step index (0‑based). When provided the component becomes controlled and internal navigation state will not respond to the built-in buttons.
|
|
10
|
+
* @property defaultStepIndex - Default step index (0‑based). Used to initialize the internal step state.
|
|
11
|
+
* @property shouldAllowContinue - set false to disable continue/submit buttons
|
|
12
|
+
* @property loadingState - Current loading state (aligns with remix fetchers, see type LoadingState).
|
|
13
|
+
* @property buttonLabels - Button labels for the footer navigation buttons (start/cancel/back/continue/submit).
|
|
14
|
+
* @property onBack - Called before navigating to the previous step. Return false to block navigation.
|
|
15
|
+
* @property onCancel - Called when the user cancels from the first step.
|
|
16
|
+
* @property onContinue - Called before advancing to next step (including first -> second). Return false to block navigation.
|
|
17
|
+
* @property onFormSubmit - Called on final submit click. Return false to block submission (async supported).
|
|
18
|
+
* @property children - The step content. Each direct child is treated as a step; its aria-label (if present) is used as the progress indicator label.
|
|
19
|
+
*/
|
|
20
|
+
export interface ProgressWizardProps extends ProgressWizardBaseProps, CallbackProps {
|
|
21
|
+
}
|
|
22
|
+
declare const ProgressWizard: import('react').ForwardRefExoticComponent<ProgressWizardProps & {
|
|
23
|
+
children?: import('react').ReactNode | undefined;
|
|
24
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export default ProgressWizard;
|