@phillips/seldon 1.154.0 → 1.155.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 (31) hide show
  1. package/dist/_virtual/index5.js +2 -2
  2. package/dist/_virtual/index6.js +2 -2
  3. package/dist/_virtual/index7.js +2 -2
  4. package/dist/_virtual/index8.js +2 -2
  5. package/dist/components/ComboBox/ComboBox.d.ts +30 -13
  6. package/dist/components/ComboBox/ComboBox.js +253 -148
  7. package/dist/components/ComboBox/ComboBox.stories.d.ts +46 -4
  8. package/dist/components/ComboBox/types.d.ts +18 -0
  9. package/dist/components/PhoneNumberPicker/PhoneNumberPicker.d.ts +8 -28
  10. package/dist/components/PhoneNumberPicker/PhoneNumberPicker.js +39 -0
  11. package/dist/components/PhoneNumberPicker/PhoneNumberPicker.stories.d.ts +1 -2
  12. package/dist/components/PhoneNumberPicker/index.d.ts +1 -0
  13. package/dist/index.d.ts +1 -0
  14. package/dist/index.js +59 -57
  15. package/dist/node_modules/exenv/index.js +1 -1
  16. package/dist/node_modules/ics/dist/index.js +2 -2
  17. package/dist/node_modules/ics/dist/pipeline/index.js +1 -1
  18. package/dist/node_modules/libphonenumber-js/es6/getCountries.js +7 -0
  19. package/dist/node_modules/libphonenumber-js/es6/helpers/isObject.js +7 -0
  20. package/dist/node_modules/libphonenumber-js/es6/metadata.js +456 -0
  21. package/dist/node_modules/libphonenumber-js/es6/tools/semver-compare.js +14 -0
  22. package/dist/node_modules/libphonenumber-js/metadata.min.json.js +4 -0
  23. package/dist/node_modules/libphonenumber-js/min/exports/getCountries.js +8 -0
  24. package/dist/node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js +8 -0
  25. package/dist/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +8 -0
  26. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  27. package/dist/pages/page.test.d.ts +1 -0
  28. package/dist/scss/components/ComboBox/_combobox.scss +93 -57
  29. package/dist/utils/usePrevious.d.ts +1 -0
  30. package/dist/utils/usePrevious.js +10 -0
  31. package/package.json +1 -1
@@ -1,36 +1,16 @@
1
1
  import { default as React } from 'react';
2
- export interface PhoneNumberPickerProps {
3
- /**
4
- * Unique id for the ComboBox.
5
- */
6
- id: string;
7
- /**
8
- * Optional className for custom styling.
9
- */
10
- className?: string;
11
- /**
12
- * Label for the ComboBox.
13
- */
14
- labelText: string;
15
- /**
16
- * Optional placeholder text for the input.
17
- */
18
- placeholder?: string;
19
- /**
20
- * Input value for the ComboBox.
21
- */
22
- inputValue: string;
23
- /**
24
- * Passed in function to handle input value changes.
25
- */
26
- setInputValue: (value: string) => void;
27
- }
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'>;
28
8
  /**
29
9
  * ## Overview
30
10
  *
31
- * Overview of PhoneNumberPicker component
11
+ * A component for entering and selecting phone number country codes
32
12
  *
33
- * [Figma Link] https://www.figma.com/design/rIefa3bRPyZbZmtyV9PSQv/My-Account?node-id=1-3&p=f&m=dev
13
+ * [Figma Link](https://www.figma.com/design/rIefa3bRPyZbZmtyV9PSQv/My-Account?node-id=1-3&p=f&m=dev)
34
14
  *
35
15
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-PhoneNumberPicker--overview)
36
16
  */
@@ -0,0 +1,39 @@
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,8 +1,7 @@
1
- import { default as React } from 'react';
2
1
  import { PhoneNumberPickerProps } from './PhoneNumberPicker';
3
2
  declare const meta: {
4
3
  title: string;
5
- component: React.ForwardRefExoticComponent<PhoneNumberPickerProps & React.RefAttributes<HTMLDivElement>>;
4
+ component: import('react').ForwardRefExoticComponent<PhoneNumberPickerProps & import('react').RefAttributes<HTMLDivElement>>;
6
5
  };
7
6
  export default meta;
8
7
  export declare const Playground: {
@@ -0,0 +1 @@
1
+ export { default as PhoneNumberPicker, type PhoneNumberPickerProps } from './PhoneNumberPicker';
package/dist/index.d.ts CHANGED
@@ -56,6 +56,7 @@ export { default as ViewingsList, type ViewingsListProps } from './patterns/View
56
56
  export * from './providers/SeldonProvider/SeldonProvider';
57
57
  export * from './components/Carousel';
58
58
  export * from './components/ComboBox';
59
+ export * from './components/PhoneNumberPicker';
59
60
  export * from './components/Detail';
60
61
  export * from './components/Loader';
61
62
  export { default as PageContentWrapper } from './components/PageContentWrapper/PageContentWrapper';
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ 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 P, ssrMediaQueryStyle as A } from "./providers/SeldonProvider/utils.js";
4
4
  import { usePendingState as L } from "./utils/hooks.js";
5
- import { AuctionStatus as b, LotStatus as V, SupportedLanguages as h } from "./types/commonTypes.js";
5
+ import { AuctionStatus as I, LotStatus as V, SupportedLanguages as h } from "./types/commonTypes.js";
6
6
  import { default as v } from "./components/Button/Button.js";
7
7
  import { ButtonVariants as y } from "./components/Button/types.js";
8
8
  import { default as D } from "./components/IconButton/IconButton.js";
@@ -29,7 +29,7 @@ import { default as ce } from "./components/Dropdown/Dropdown.js";
29
29
  import { default as Ce } from "./components/ErrorBoundary/ErrorBoundary.js";
30
30
  import { Grid as Pe } from "./components/Grid/Grid.js";
31
31
  import { default as Be } from "./components/GridItem/GridItem.js";
32
- import { GridItemAlign as Ie } 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 ke } from "./components/Link/Link.js";
35
35
  import { LinkVariants as we } from "./components/Link/types.js";
@@ -55,7 +55,7 @@ import { TextAlignments as gt, TextVariants as ct } from "./components/Text/type
55
55
  import { default as Ct } from "./components/Text/Text.js";
56
56
  import { TextSymbolVariants as Pt } from "./components/TextSymbol/types.js";
57
57
  import { default as Bt } from "./components/TextSymbol/TextSymbol.js";
58
- import { default as It } 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 kt } from "./patterns/DetailList/types.js";
61
61
  import { default as wt } from "./patterns/FavoritesCollectionTile/FavoritesCollectionTile.js";
@@ -72,46 +72,47 @@ import { default as Kt } from "./patterns/ViewingsList/StatefulViewingsList.js";
72
72
  import { default as _t } from "./patterns/ViewingsList/ViewingsList.js";
73
73
  import { SeldonProvider as eo } from "./providers/SeldonProvider/SeldonProvider.js";
74
74
  import { default as oo } from "./components/ComboBox/ComboBox.js";
75
- import { default as ao } from "./components/Loader/Loader.js";
76
- import { default as so } from "./components/PageContentWrapper/PageContentWrapper.js";
77
- import { default as mo } from "./site-furniture/Footer/Footer.js";
78
- import { default as uo } from "./site-furniture/Header/Header.js";
79
- import { default as xo } from "./components/AddToCalendar/AddToCalendar.js";
80
- import { default as go } from "./components/Article/Article.js";
81
- import { default as So } from "./components/AuctionTile/AuctionTile.js";
82
- import { default as To } from "./components/Countdown/Countdown.js";
83
- import { CountdownVariants as Ao } from "./components/Countdown/types.js";
84
- import { default as Lo } from "./components/Divider/Divider.js";
85
- import { default as bo } from "./components/FavoritingTileButton/FavoritingTileButton.js";
86
- import { default as ho } from "./components/Filter/Filter.js";
87
- import { default as vo } from "./components/Filter/FilterInput.js";
88
- import { default as yo } from "./components/Filter/FilterHeader.js";
89
- import { default as Do } from "./components/Pictogram/Pictogram.js";
90
- import { default as Mo } from "./components/TextArea/TextArea.js";
91
- import { default as Eo } from "./components/Toast/Toast.js";
92
- import { ToastProvider as Go } from "./components/Toast/ToastContextProvider.js";
93
- import { useToast as Ro } from "./components/Toast/useToast.js";
94
- import { default as jo } from "./patterns/AccountPageHeader/AccountPageHeader.js";
95
- import { default as Wo } from "./patterns/BidSnapshot/BidSnapshot.js";
96
- import { default as Zo } from "./patterns/BidSnapshot/BidMessage.js";
97
- import { BidMessageVariants as Jo, BidStatusEnum as Ko } from "./patterns/BidSnapshot/types.js";
98
- import { default as _o } from "./patterns/FilterMenu/FilterMenu.js";
99
- import { default as er } from "./patterns/ObjectTile/ObjectTile.js";
75
+ import { default as ao } from "./components/PhoneNumberPicker/PhoneNumberPicker.js";
76
+ import { default as so } from "./components/Loader/Loader.js";
77
+ import { default as mo } from "./components/PageContentWrapper/PageContentWrapper.js";
78
+ import { default as uo } from "./site-furniture/Footer/Footer.js";
79
+ import { default as xo } from "./site-furniture/Header/Header.js";
80
+ import { default as go } from "./components/AddToCalendar/AddToCalendar.js";
81
+ import { default as So } from "./components/Article/Article.js";
82
+ import { default as To } from "./components/AuctionTile/AuctionTile.js";
83
+ import { default as Ao } from "./components/Countdown/Countdown.js";
84
+ import { CountdownVariants as Lo } from "./components/Countdown/types.js";
85
+ import { default as Io } from "./components/Divider/Divider.js";
86
+ import { default as ho } from "./components/FavoritingTileButton/FavoritingTileButton.js";
87
+ import { default as vo } from "./components/Filter/Filter.js";
88
+ import { default as yo } from "./components/Filter/FilterInput.js";
89
+ import { default as Do } from "./components/Filter/FilterHeader.js";
90
+ import { default as Mo } from "./components/Pictogram/Pictogram.js";
91
+ import { default as Eo } from "./components/TextArea/TextArea.js";
92
+ import { default as Go } from "./components/Toast/Toast.js";
93
+ import { ToastProvider as Ro } from "./components/Toast/ToastContextProvider.js";
94
+ import { useToast as jo } from "./components/Toast/useToast.js";
95
+ import { default as Wo } from "./patterns/AccountPageHeader/AccountPageHeader.js";
96
+ import { default as Zo } from "./patterns/BidSnapshot/BidSnapshot.js";
97
+ import { default as Jo } from "./patterns/BidSnapshot/BidMessage.js";
98
+ import { BidMessageVariants as Xo, BidStatusEnum as _o } from "./patterns/BidSnapshot/types.js";
99
+ import { default as er } from "./patterns/FilterMenu/FilterMenu.js";
100
+ import { default as or } from "./patterns/ObjectTile/ObjectTile.js";
100
101
  export {
101
102
  M as Accordion,
102
103
  E as AccordionItem,
103
104
  G as AccordionItemVariant,
104
105
  O as AccordionVariants,
105
- jo as AccountPageHeader,
106
- xo as AddToCalendar,
107
- go as Article,
108
- b as AuctionStatus,
109
- So as AuctionTile,
106
+ Wo as AccountPageHeader,
107
+ go as AddToCalendar,
108
+ So as Article,
109
+ I as AuctionStatus,
110
+ To as AuctionTile,
110
111
  Yt as AuthState,
111
- Zo as BidMessage,
112
- Jo as BidMessageVariants,
113
- Wo as BidSnapshot,
114
- Ko as BidStatusEnum,
112
+ Jo as BidMessage,
113
+ Xo as BidMessageVariants,
114
+ Zo as BidSnapshot,
115
+ _o as BidStatusEnum,
115
116
  Q as Breadcrumb,
116
117
  v as Button,
117
118
  y as ButtonVariants,
@@ -126,26 +127,26 @@ export {
126
127
  oo as ComboBox,
127
128
  de as ContentPeek,
128
129
  pe as ContentPeekHeightUnits,
129
- To as Countdown,
130
- Ao as CountdownVariants,
130
+ Ao as Countdown,
131
+ Lo as CountdownVariants,
131
132
  ie as Detail,
132
133
  Vt as DetailList,
133
134
  kt as DetailListAlignment,
134
- Lo as Divider,
135
+ Io as Divider,
135
136
  ne as Drawer,
136
137
  ce as Dropdown,
137
138
  Ce as ErrorBoundary,
138
139
  wt as FavoritesCollectionTile,
139
- bo as FavoritingTileButton,
140
- ho as Filter,
141
- yo as FilterHeader,
142
- vo as FilterInput,
143
- _o as FilterMenu,
144
- mo as Footer,
140
+ ho as FavoritingTileButton,
141
+ vo as Filter,
142
+ Do as FilterHeader,
143
+ yo as FilterInput,
144
+ er as FilterMenu,
145
+ uo as Footer,
145
146
  Pe as Grid,
146
147
  Be as GridItem,
147
- Ie as GridItemAlign,
148
- uo as Header,
148
+ be as GridItemAlign,
149
+ xo as Header,
149
150
  Ht as HeroBanner,
150
151
  z as Icon,
151
152
  D as IconButton,
@@ -155,19 +156,20 @@ export {
155
156
  He as LinkBlock,
156
157
  Fe as LinkList,
157
158
  we as LinkVariants,
158
- ao as Loader,
159
+ so as Loader,
159
160
  V as LotStatus,
160
161
  Ne as Modal,
161
162
  Ue as Navigation,
162
163
  Oe as NavigationItem,
163
164
  Qe as NavigationItemTrigger,
164
165
  ze as NavigationList,
165
- er as ObjectTile,
166
+ or as ObjectTile,
166
167
  a as PaddingTokens,
167
168
  C as Page,
168
- so as PageContentWrapper,
169
+ mo as PageContentWrapper,
169
170
  Ye as Pagination,
170
- Do as Pictogram,
171
+ ao as PhoneNumberPicker,
172
+ Mo as Pictogram,
171
173
  qe as PinchZoom,
172
174
  Ke as Row,
173
175
  P as SSRMediaQuery,
@@ -191,14 +193,14 @@ export {
191
193
  xt as TagsList,
192
194
  Ct as Text,
193
195
  gt as TextAlignments,
194
- Mo as TextArea,
196
+ Eo as TextArea,
195
197
  Pt as TextSymbolVariants,
196
198
  Bt as TextSymbols,
197
199
  ct as TextVariants,
198
- Eo as Toast,
199
- Go as ToastProvider,
200
+ Go as Toast,
201
+ Ro as ToastProvider,
200
202
  qt as UserManagement,
201
- It as Video,
203
+ bt as Video,
202
204
  _t as ViewingsList,
203
205
  s as defaultYear,
204
206
  l as emailValidation,
@@ -213,5 +215,5 @@ export {
213
215
  A as ssrMediaQueryStyle,
214
216
  c as useNormalizedInputProps,
215
217
  L as usePendingState,
216
- Ro as useToast
218
+ jo as useToast
217
219
  };
@@ -1,4 +1,4 @@
1
- import { __module as t } from "../../_virtual/index7.js";
1
+ import { __module as t } from "../../_virtual/index5.js";
2
2
  /*!
3
3
  Copyright (c) 2015 Jed Watson.
4
4
  Based on code that is Copyright 2013-2015, Facebook, Inc.
@@ -1,6 +1,6 @@
1
- import { __exports as l } from "../../../_virtual/index5.js";
1
+ import { __exports as l } from "../../../_virtual/index7.js";
2
2
  import "./pipeline/index.js";
3
- import { __exports as _ } from "../../../_virtual/index6.js";
3
+ import { __exports as _ } from "../../../_virtual/index8.js";
4
4
  Object.defineProperty(l, "__esModule", {
5
5
  value: !0
6
6
  });
@@ -1,4 +1,4 @@
1
- import { __exports as u } from "../../../../_virtual/index6.js";
1
+ import { __exports as u } from "../../../../_virtual/index8.js";
2
2
  import "./build.js";
3
3
  import "./format.js";
4
4
  import "./validate.js";
@@ -0,0 +1,7 @@
1
+ import e from "./metadata.js";
2
+ function n(t) {
3
+ return new e(t).getCountries();
4
+ }
5
+ export {
6
+ n as default
7
+ };
@@ -0,0 +1,7 @@
1
+ var t = {}.constructor;
2
+ function n(r) {
3
+ return r != null && r.constructor === t;
4
+ }
5
+ export {
6
+ n as default
7
+ };