@phillips/seldon 1.205.2 → 1.207.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.
Files changed (34) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +88 -79
  3. package/dist/patterns/CountryPicker/CountryPickerTrigger.js +39 -33
  4. package/dist/patterns/PhoneNumberInput/PhoneNumberInput.js +51 -47
  5. package/dist/patterns/PhoneNumberInput/PhoneNumberInput.stories.d.ts +1 -1
  6. package/dist/patterns/ProgressWizard/ProgressWizard.d.ts +25 -0
  7. package/dist/patterns/ProgressWizard/ProgressWizard.js +78 -0
  8. package/dist/patterns/ProgressWizard/ProgressWizard.stories.d.ts +469 -0
  9. package/dist/patterns/ProgressWizard/ProgressWizard.test.d.ts +1 -0
  10. package/dist/patterns/ProgressWizard/components/ProgressWizardFooter.d.ts +35 -0
  11. package/dist/patterns/ProgressWizard/components/ProgressWizardFooter.js +56 -0
  12. package/dist/patterns/ProgressWizard/components/ProgressWizardFooter.test.d.ts +1 -0
  13. package/dist/patterns/ProgressWizard/hooks/useHistoryManagement.d.ts +28 -0
  14. package/dist/patterns/ProgressWizard/hooks/useHistoryManagement.js +24 -0
  15. package/dist/patterns/ProgressWizard/hooks/useHistoryManagement.test.d.ts +1 -0
  16. package/dist/patterns/ProgressWizard/index.d.ts +4 -0
  17. package/dist/patterns/ProgressWizard/types.d.ts +133 -0
  18. package/dist/patterns/ProgressWizard/types.js +17 -0
  19. package/dist/patterns/ProgressWizard/utils.d.ts +6 -0
  20. package/dist/patterns/ProgressWizard/utils.js +16 -0
  21. package/dist/patterns/ProgressWizard/utils.test.d.ts +1 -0
  22. package/dist/providers/SeldonProvider/utils.d.ts +1 -1
  23. package/dist/scss/componentStyles.scss +1 -0
  24. package/dist/scss/components/ComboBox/_combobox.scss +2 -2
  25. package/dist/scss/components/ComposedModal/_composedModal.scss +10 -0
  26. package/dist/scss/components/ProgressIndicator/_progressIndicator.scss +4 -0
  27. package/dist/scss/components/TextArea/_textArea.scss +2 -2
  28. package/dist/scss/patterns/CountryPicker/_countryPickerTrigger.scss +14 -13
  29. package/dist/scss/patterns/PhoneNumberInput/_phoneNumberInput.scss +19 -24
  30. package/dist/scss/patterns/ProgressWizard/_progressWizard.scss +83 -0
  31. package/dist/utils/index.d.ts +1 -1
  32. package/dist/utils/index.js +1 -1
  33. package/dist/utils/staticContent.test.d.ts +1 -0
  34. 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 c, useNormalizedInputProps as g } from "./utils/index.js";
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 B, ssrMediaQueryStyle as P } from "./providers/SeldonProvider/utils.js";
4
- import { usePendingState as A } from "./utils/hooks.js";
5
- import { AuctionStatus as b, LotStatus as V, SupportedLanguages as y } from "./types/commonTypes.js";
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 w } from "./components/Button/types.js";
8
- import { default as F } from "./components/IconButton/IconButton.js";
9
- import { default as H } from "./components/Accordion/Accordion.js";
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 Q } from "./components/Breadcrumb/Breadcrumb.js";
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 z } from "./components/Icon/Icon.js";
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 ge } from "./components/Dropdown/Dropdown.js";
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 Be } from "./components/Grid/Grid.js";
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 Le } from "./components/GridItem/types.js";
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 De } from "./components/LinkBlock/LinkBlock.js";
37
- import { default as Ne } from "./components/LinkList/LinkList.js";
38
- import { default as Me } from "./components/Modal/Modal.js";
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 Qe } from "./components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
42
- import { default as ze } from "./components/Navigation/NavigationList/NavigationList.js";
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 ct, TextVariants as gt } from "./components/Text/types.js";
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 Bt } from "./components/TextSymbol/types.js";
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 Lt } from "./components/Video/Video.js";
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 Dt } from "./patterns/HeroBanner/HeroBanner.js";
63
- import { default as Nt } from "./patterns/TextBanner/TextBanner.js";
64
- import { default as Mt } from "./patterns/LanguageSelector/LanguageSelector.js";
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 Qt } from "./patterns/Social/Social.js";
68
- import { default as zt } from "./patterns/Subscribe/Subscribe.js";
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 co } from "./components/PhoneNumberPicker/PhoneNumberPicker.js";
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 Bo } from "./patterns/FiltersInline/types.js";
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 Lo } from "./patterns/SaleCard/SaleCardActions.js";
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 Do } from "./site-furniture/Footer/Footer.js";
89
- import { default as No } from "./site-furniture/Header/Header.js";
90
- import { default as Mo } from "./components/AddToCalendar/AddToCalendar.js";
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 Qo } from "./components/Countdown/types.js";
94
- import { default as zo } from "./components/DescriptiveRadioButton/DescriptiveRadioButton.js";
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 gr } from "./patterns/AccountPageHeader/AccountPageHeader.js";
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 Br } from "./patterns/BidSnapshot/BidMessage.js";
110
- import { BidMessageVariants as Ir, BidStatusEnum as Ar } from "./patterns/BidSnapshot/types.js";
111
- import { default as br } from "./patterns/FilterMenu/FilterMenu.js";
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 wr } from "./patterns/PhoneNumberInput/PhoneNumberInput.js";
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
- H as Accordion,
120
+ M as Accordion,
117
121
  E as AccordionItem,
118
122
  R as AccordionItemVariant,
119
123
  U as AccordionVariants,
120
- gr as AccountPageHeader,
121
- Mo as AddToCalendar,
124
+ cr as AccountPageHeader,
125
+ No as AddToCalendar,
122
126
  Go as Article,
123
- b as AuctionStatus,
127
+ A as AuctionStatus,
124
128
  qt as AuthState,
125
- Br as BidMessage,
129
+ Pr as BidMessage,
126
130
  Ir as BidMessageVariants,
127
131
  Cr as BidSnapshot,
128
- Ar as BidStatusEnum,
129
- Q as Breadcrumb,
132
+ Lr as BidStatusEnum,
133
+ O as Breadcrumb,
130
134
  k as Button,
131
- w as ButtonVariants,
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
- Qo as CountdownVariants,
149
+ Oo as CountdownVariants,
146
150
  kr as CountryPicker,
147
- zo as DescriptiveRadioButton,
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
- ge as Dropdown,
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
- Bo as FilterButtonType,
166
+ Po as FilterButtonType,
162
167
  or as FilterHeader,
163
168
  er as FilterInput,
164
- br as FilterMenu,
169
+ Ar as FilterMenu,
165
170
  So as FiltersInline,
166
- Do as Footer,
167
- Be as Grid,
171
+ Fo as Footer,
172
+ Pe as Grid,
168
173
  Ie as GridItem,
169
- Le as GridItemAlign,
170
- No as Header,
171
- Dt as HeroBanner,
172
- z as Icon,
173
- F as IconButton,
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
- Mt as LanguageSelector,
180
+ Nt as LanguageSelector,
176
181
  he as Link,
177
- De as LinkBlock,
178
- Ne as LinkList,
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
- Me as Modal,
188
+ Ne as Modal,
183
189
  Ge as Navigation,
184
190
  Ue as NavigationItem,
185
- Qe as NavigationItemTrigger,
186
- ze as NavigationList,
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
- wr as PhoneNumberInput,
194
- co as PhoneNumberPicker,
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
- B as SSRMediaQuery,
207
+ P as SSRMediaQuery,
200
208
  Io as SaleCard,
201
- Lo as SaleCardActions,
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
- Qt as Social,
218
+ Ot as Social,
211
219
  f as SpacingTokens,
212
220
  st as SplitPanel,
213
221
  _t as StatefulViewingsList,
214
- zt as Subscribe,
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
- ct as TextAlignments,
230
+ gt as TextAlignments,
223
231
  dr as TextArea,
224
- Nt as TextBanner,
225
- Bt as TextSymbolVariants,
232
+ Ht as TextBanner,
233
+ Pt as TextSymbolVariants,
226
234
  It as TextSymbols,
227
- gt as TextVariants,
235
+ ct as TextVariants,
228
236
  pr as Toast,
229
237
  ir as ToastProvider,
230
238
  Kt as UserManagement,
231
- Lt as Video,
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
- c as px,
244
- P as ssrMediaQueryStyle,
245
- g as useNormalizedInputProps,
246
- A as usePendingState,
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 a, jsx as t } from "react/jsx-runtime";
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 m } from "../../components/Text/types.js";
4
- import f from "../../components/Text/Text.js";
5
- import i from "../../node_modules/classnames/index.js";
6
- import { countries as y } from "./constants.js";
7
- import { forwardRef as k } from "react";
8
- const w = k(
9
- ({ labelText: c, displayValue: p, onClick: $, hasError: o = !1, errorMsg: e, id: n, className: h, baseClassName: r, variantConfig: u }, v) => {
10
- const { isPhone: l, value: g } = u, d = e ? `${r}__trigger-error-msg` : void 0, _ = l ? g : y.filter((s) => s.name === g)?.[0]?.code;
11
- return /* @__PURE__ */ a("div", { className: i(`${r}__trigger`, h), children: [
12
- /* @__PURE__ */ t(
13
- f,
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: m.string2,
16
- className: i(`${r}__trigger-label`, {
21
+ variant: y.string2,
22
+ className: t(`${r}__trigger-label`, {
17
23
  [`${r}__trigger-label--error`]: o
18
24
  }),
19
- id: n ? `${n}-label` : void 0,
20
- children: c
25
+ id: e ? `${e}-label` : void 0,
26
+ children: l
21
27
  }
22
28
  ),
23
- /* @__PURE__ */ a(
29
+ /* @__PURE__ */ d(
24
30
  "button",
25
31
  {
26
- ref: v,
32
+ ref: u,
27
33
  type: "button",
28
- "aria-label": c,
29
- "aria-invalid": o,
30
- "aria-describedby": d,
31
- className: i(`${r}__trigger-btn`, {
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`]: l
39
+ [`${r}__trigger-btn--is-phone`]: a
34
40
  }),
35
- onClick: $,
41
+ onClick: m,
36
42
  "data-testid": "country-picker-trigger",
37
- id: n,
43
+ id: e,
38
44
  children: [
39
- _ && /* @__PURE__ */ t(
45
+ g && /* @__PURE__ */ i(
40
46
  "img",
41
47
  {
42
- src: `https://flagcdn.com/24x18/${_.toLowerCase()}.png`,
43
- alt: `${g} flag`,
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__ */ t("span", { className: i(`${r}__trigger-text`), children: p }),
48
- /* @__PURE__ */ t("span", { className: i(`${r}__trigger-icon`), children: /* @__PURE__ */ t(x, { icon: "ChevronDown", color: "black-100", width: 16, height: 16 }) })
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
- o && e && /* @__PURE__ */ t(f, { variant: m.string2, className: `${r}__trigger-error-msg`, id: d, children: e })
58
+ !a && $()
53
59
  ] });
54
60
  }
55
61
  );
56
- w.displayName = "CountryPickerTrigger";
62
+ b.displayName = "CountryPickerTrigger";
57
63
  export {
58
- w as default
64
+ b as default
59
65
  };
@@ -1,79 +1,83 @@
1
- import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
- import v, { forwardRef as P } from "react";
3
- import { getCommonProps as $ } from "../../utils/index.js";
4
- import I from "../../node_modules/classnames/index.js";
5
- import x from "../CountryPicker/CountryPicker.js";
6
- import S from "../../components/Input/Input.js";
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 T } from "../CountryPicker/constants.js";
9
- import l from "../../components/Text/Text.js";
10
- const j = P(
8
+ import { countries as j } from "../CountryPicker/constants.js";
9
+ const k = P(
11
10
  ({
12
- className: m,
13
- value: d = "",
14
- countryCode: u = "",
15
- handleValueChange: p,
16
- label: h = "Phone",
17
- required: f = !1,
18
- error: s,
19
- errorText: t,
20
- disabled: y = !1,
21
- ...b
22
- }, g) => {
23
- const { className: e, ...N } = $(b, "PhoneNumberInput"), [o, _] = v.useState(u || void 0), n = T.find((a) => a.code === o), C = (a) => {
24
- p?.(a.target.value, o || "");
25
- }, c = t ? `${e}-error-text` : void 0;
26
- return /* @__PURE__ */ i("div", { ref: g, className: I(`${e}`, m), ...N, children: [
27
- /* @__PURE__ */ i("div", { className: `${e}__wrapper`, children: [
28
- /* @__PURE__ */ i("div", { className: `${e}__country-picker`, children: [
29
- /* @__PURE__ */ r("input", { type: "hidden", name: "phoneNumber", value: d, "data-testid": "phone-number-hidden-input" }),
30
- /* @__PURE__ */ r(
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: o || "",
39
+ value: a || "",
36
40
  "data-testid": "phone-country-code-hidden-input"
37
41
  }
38
42
  ),
39
- /* @__PURE__ */ r(
40
- x,
43
+ /* @__PURE__ */ e(
44
+ T,
41
45
  {
42
46
  triggerLabelText: "Phone Number",
43
- triggerDisplayValue: n ? `+${L(n.code)}` : "",
44
- hasTriggerError: !!s,
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: n?.code,
51
- onChange: _
54
+ value: o?.code,
55
+ onChange: N
52
56
  }
53
57
  )
54
58
  ] }),
55
- /* @__PURE__ */ r("div", { className: `${e}__input`, children: /* @__PURE__ */ r(
56
- S,
59
+ /* @__PURE__ */ e("div", { className: `${t}__input`, children: /* @__PURE__ */ e(
60
+ $,
57
61
  {
58
62
  id: "phone-input",
59
63
  type: "tel",
60
- labelText: h,
64
+ labelText: c,
61
65
  hideLabel: !0,
62
- value: d,
63
- onChange: C,
64
- required: f,
65
- invalid: !!s,
66
- disabled: y,
66
+ value: l,
67
+ onChange: g,
68
+ required: m,
69
+ invalid: !!n,
70
+ disabled: f,
67
71
  invalidText: "",
68
- "aria-describedby": c
72
+ "aria-describedby": i.invalidId
69
73
  }
70
74
  ) })
71
75
  ] }),
72
- t ? /* @__PURE__ */ r(l, { className: `${e}__error ${e}__error-msg`, id: c, children: t }) : /* @__PURE__ */ r(l, { className: `${e}__error`, children: " " })
76
+ i.validation ? i.validation : /* @__PURE__ */ e("p", { className: `${x}-input__validation`, children: " " })
73
77
  ] });
74
78
  }
75
79
  );
76
- j.displayName = "PhoneNumberInput";
80
+ k.displayName = "PhoneNumberInput";
77
81
  export {
78
- j as default
82
+ k as default
79
83
  };
@@ -46,4 +46,4 @@ export declare const Playground: {
46
46
  };
47
47
  };
48
48
  };
49
- export declare const InDrawerWithControllerAndValidation: () => import("react/jsx-runtime").JSX.Element;
49
+ export declare const InDrawerWithValidation: () => import("react/jsx-runtime").JSX.Element;
@@ -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;