@phillips/seldon 1.174.0 → 1.176.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 (41) hide show
  1. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +43 -0
  2. package/dist/components/ProgressIndicator/ProgressIndicator.js +62 -0
  3. package/dist/components/ProgressIndicator/ProgressIndicator.stories.d.ts +52 -0
  4. package/dist/components/ProgressIndicator/ProgressIndicator.test.d.ts +1 -0
  5. package/dist/components/ProgressIndicator/index.d.ts +1 -0
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.js +92 -88
  8. package/dist/node_modules/@radix-ui/react-progress/dist/index.js +84 -0
  9. package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  10. package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  11. package/dist/patterns/CountryPicker/CountryPicker.d.ts +14 -0
  12. package/dist/patterns/CountryPicker/CountryPicker.js +71 -0
  13. package/dist/patterns/CountryPicker/CountryPicker.stories.d.ts +14 -0
  14. package/dist/patterns/CountryPicker/CountryPicker.test.d.ts +1 -0
  15. package/dist/patterns/CountryPicker/CountryPickerCountryList.d.ts +34 -0
  16. package/dist/patterns/CountryPicker/CountryPickerCountryList.js +66 -0
  17. package/dist/patterns/CountryPicker/CountryPickerCountryList.test.d.ts +1 -0
  18. package/dist/patterns/CountryPicker/CountryPickerModal.d.ts +24 -0
  19. package/dist/patterns/CountryPicker/CountryPickerModal.js +117 -0
  20. package/dist/patterns/CountryPicker/CountryPickerModal.test.d.ts +1 -0
  21. package/dist/patterns/CountryPicker/CountryPickerOption.d.ts +20 -0
  22. package/dist/patterns/CountryPicker/CountryPickerOption.js +62 -0
  23. package/dist/patterns/CountryPicker/CountryPickerOption.test.d.ts +1 -0
  24. package/dist/patterns/CountryPicker/CountryPickerTrigger.d.ts +21 -0
  25. package/dist/patterns/CountryPicker/CountryPickerTrigger.js +67 -0
  26. package/dist/patterns/CountryPicker/CountryPickerTrigger.test.d.ts +1 -0
  27. package/dist/patterns/CountryPicker/constants.d.ts +899 -0
  28. package/dist/patterns/CountryPicker/constants.js +279 -0
  29. package/dist/patterns/CountryPicker/index.d.ts +1 -0
  30. package/dist/patterns/CountryPicker/types.d.ts +30 -0
  31. package/dist/patterns/CountryPicker/types.js +6 -0
  32. package/dist/patterns/CountryPicker/utils.d.ts +2 -0
  33. package/dist/patterns/CountryPicker/utils.js +9 -0
  34. package/dist/patterns/CountryPicker/utils.test.d.ts +1 -0
  35. package/dist/scss/componentStyles.scss +4 -0
  36. package/dist/scss/components/Input/_input.scss +0 -3
  37. package/dist/scss/components/ProgressIndicator/_progressIndicator.scss +59 -0
  38. package/dist/scss/patterns/CountryPicker/_countryPickerModal.scss +108 -0
  39. package/dist/scss/patterns/CountryPicker/_countryPickerOption.scss +71 -0
  40. package/dist/scss/patterns/CountryPicker/_countryPickerTrigger.scss +73 -0
  41. package/package.json +2 -1
@@ -0,0 +1,279 @@
1
+ const e = [
2
+ { name: "Afghanistan", code: "AF" },
3
+ { name: "Åland Islands", code: "AX" },
4
+ { name: "Albania", code: "AL" },
5
+ { name: "Algeria", code: "DZ" },
6
+ { name: "American Samoa", code: "AS" },
7
+ { name: "Andorra", code: "AD" },
8
+ { name: "Angola", code: "AO" },
9
+ { name: "Anguilla", code: "AI" },
10
+ { name: "Antigua and Barbuda", code: "AG" },
11
+ { name: "Argentina", code: "AR" },
12
+ { name: "Armenia", code: "AM" },
13
+ { name: "Aruba", code: "AW" },
14
+ { name: "Australia", code: "AU" },
15
+ { name: "Austria", code: "AT" },
16
+ { name: "Azerbaijan", code: "AZ" },
17
+ { name: "Bahamas", code: "BS" },
18
+ { name: "Bahrain", code: "BH" },
19
+ { name: "Bangladesh", code: "BD" },
20
+ { name: "Barbados", code: "BB" },
21
+ { name: "Belarus", code: "BY" },
22
+ { name: "Belgium", code: "BE" },
23
+ { name: "Belize", code: "BZ" },
24
+ { name: "Benin", code: "BJ" },
25
+ { name: "Bermuda", code: "BM" },
26
+ { name: "Bhutan", code: "BT" },
27
+ { name: "Bolivia", code: "BO" },
28
+ {
29
+ name: "Caribbean Netherlands",
30
+ code: "BQ"
31
+ },
32
+ { name: "Bosnia and Herzegovina", code: "BA" },
33
+ { name: "Botswana", code: "BW" },
34
+ { name: "Brazil", code: "BR" },
35
+ {
36
+ name: "British Indian Ocean Territory",
37
+ code: "IO"
38
+ },
39
+ { name: "Brunei", code: "BN" },
40
+ { name: "Bulgaria", code: "BG" },
41
+ { name: "Burkina Faso", code: "BF" },
42
+ { name: "Burundi", code: "BI" },
43
+ { name: "Cape Verde", code: "CV" },
44
+ { name: "Cambodia", code: "KH" },
45
+ { name: "Cameroon", code: "CM" },
46
+ { name: "Canada", code: "CA" },
47
+ { name: "Cayman Islands", code: "KY" },
48
+ { name: "Central African Republic", code: "CF" },
49
+ { name: "Chad", code: "TD" },
50
+ { name: "Chile", code: "CL" },
51
+ { name: "China", code: "CN" },
52
+ { name: "Christmas Island", code: "CX" },
53
+ { name: "Cocos (Keeling) Islands", code: "CC" },
54
+ { name: "Colombia", code: "CO" },
55
+ { name: "Comoros", code: "KM" },
56
+ { name: "Congo (Republic)", code: "CG" },
57
+ { name: "Congo (DRC)", code: "CD" },
58
+ { name: "Cook Islands", code: "CK" },
59
+ { name: "Costa Rica", code: "CR" },
60
+ { name: "Côte d'Ivoire", code: "CI" },
61
+ { name: "Croatia", code: "HR" },
62
+ { name: "Cuba", code: "CU" },
63
+ { name: "Curaçao", code: "CW" },
64
+ { name: "Cyprus", code: "CY" },
65
+ { name: "Czech Republic", code: "CZ" },
66
+ {
67
+ name: "Timor-Leste",
68
+ code: "TL"
69
+ },
70
+ { name: "Denmark", code: "DK" },
71
+ { name: "Djibouti", code: "DJ" },
72
+ { name: "Dominica", code: "DM" },
73
+ { name: "Dominican Republic", code: "DO" },
74
+ { name: "Ecuador", code: "EC" },
75
+ { name: "Egypt", code: "EG" },
76
+ { name: "El Salvador", code: "SV" },
77
+ { name: "Equatorial Guinea", code: "GQ" },
78
+ { name: "Eritrea", code: "ER" },
79
+ { name: "Estonia", code: "EE" },
80
+ { name: "Ethiopia", code: "ET" },
81
+ {
82
+ name: "Falkland Islands",
83
+ code: "FK"
84
+ },
85
+ { name: "Faroe Islands", code: "FO" },
86
+ { name: "Fiji", code: "FJ" },
87
+ { name: "Finland", code: "FI" },
88
+ { name: "France", code: "FR" },
89
+ { name: "French Guiana", code: "GF" },
90
+ { name: "French Polynesia", code: "PF" },
91
+ { name: "Gabon", code: "GA" },
92
+ { name: "Gambia", code: "GM" },
93
+ { name: "Georgia", code: "GE" },
94
+ { name: "Germany", code: "DE" },
95
+ { name: "Ghana", code: "GH" },
96
+ { name: "Gibraltar", code: "GI" },
97
+ { name: "Greece", code: "GR" },
98
+ { name: "Greenland", code: "GL" },
99
+ { name: "Grenada", code: "GD" },
100
+ { name: "Guadeloupe", code: "GP" },
101
+ { name: "Guam", code: "GU" },
102
+ { name: "Guatemala", code: "GT" },
103
+ { name: "Guernsey", code: "GG" },
104
+ { name: "Guinea", code: "GN" },
105
+ { name: "Guinea-Bissau", code: "GW" },
106
+ { name: "Guyana", code: "GY" },
107
+ { name: "Haiti", code: "HT" },
108
+ { name: "Honduras", code: "HN" },
109
+ { name: "Hong Kong", code: "HK" },
110
+ { name: "Hungary", code: "HU" },
111
+ { name: "Iceland", code: "IS" },
112
+ { name: "India", code: "IN" },
113
+ { name: "Indonesia", code: "ID" },
114
+ { name: "Iran", code: "IR" },
115
+ { name: "Iraq", code: "IQ" },
116
+ { name: "Ireland", code: "IE" },
117
+ { name: "Israel", code: "IL" },
118
+ { name: "Italy", code: "IT" },
119
+ { name: "Jamaica", code: "JM" },
120
+ { name: "Japan", code: "JP" },
121
+ { name: "Jersey", code: "JE" },
122
+ { name: "Jordan", code: "JO" },
123
+ { name: "Kazakhstan", code: "KZ" },
124
+ { name: "Kenya", code: "KE" },
125
+ { name: "Kiribati", code: "KI" },
126
+ { name: "South Korea", code: "KR" },
127
+ { name: "Kosovo", code: "XK" },
128
+ { name: "Kuwait", code: "KW" },
129
+ { name: "Kyrgyzstan", code: "KG" },
130
+ { name: "Laos", code: "LA" },
131
+ { name: "Latvia", code: "LV" },
132
+ { name: "Lebanon", code: "LB" },
133
+ { name: "Lesotho", code: "LS" },
134
+ { name: "Liberia", code: "LR" },
135
+ { name: "Libya", code: "LY" },
136
+ { name: "Liechtenstein", code: "LI" },
137
+ { name: "Lithuania", code: "LT" },
138
+ { name: "Luxembourg", code: "LU" },
139
+ { name: "Macau", code: "MO" },
140
+ {
141
+ name: "Macedonia",
142
+ code: "MK"
143
+ },
144
+ { name: "Madagascar", code: "MG" },
145
+ { name: "Malawi", code: "MW" },
146
+ { name: "Malaysia", code: "MY" },
147
+ { name: "Maldives", code: "MV" },
148
+ { name: "Mali", code: "ML" },
149
+ { name: "Malta", code: "MT" },
150
+ { name: "Isle of Man", code: "IM" },
151
+ { name: "Marshall Islands", code: "MH" },
152
+ { name: "Martinique", code: "MQ" },
153
+ { name: "Mauritania", code: "MR" },
154
+ { name: "Mauritius", code: "MU" },
155
+ { name: "Mayotte", code: "YT" },
156
+ { name: "Mexico", code: "MX" },
157
+ { name: "Micronesia", code: "FM" },
158
+ { name: "Moldova", code: "MD" },
159
+ { name: "Monaco", code: "MC" },
160
+ { name: "Mongolia", code: "MN" },
161
+ { name: "Montenegro", code: "ME" },
162
+ { name: "Montserrat", code: "MS" },
163
+ { name: "Morocco", code: "MA" },
164
+ { name: "Mozambique", code: "MZ" },
165
+ { name: "Myanmar (Burma)", code: "MM" },
166
+ { name: "Namibia", code: "NA" },
167
+ { name: "Nauru", code: "NR" },
168
+ { name: "Nepal", code: "NP" },
169
+ { name: "Netherlands", code: "NL" },
170
+ { name: "New Caledonia", code: "NC" },
171
+ { name: "New Zealand", code: "NZ" },
172
+ { name: "Nicaragua", code: "NI" },
173
+ { name: "Niger", code: "NE" },
174
+ { name: "Nigeria", code: "NG" },
175
+ { name: "Niue", code: "NU" },
176
+ { name: "Norfolk Island", code: "NF" },
177
+ { name: "North Korea", code: "KP" },
178
+ { name: "Northern Mariana Islands", code: "MP" },
179
+ { name: "Norway", code: "NO" },
180
+ { name: "Oman", code: "OM" },
181
+ { name: "Pakistan", code: "PK" },
182
+ { name: "Palau", code: "PW" },
183
+ { name: "Palestine", code: "PS" },
184
+ { name: "Panama", code: "PA" },
185
+ { name: "Papua New Guinea", code: "PG" },
186
+ { name: "Paraguay", code: "PY" },
187
+ { name: "Peru", code: "PE" },
188
+ { name: "Philippines", code: "PH" },
189
+ { name: "Poland", code: "PL" },
190
+ { name: "Portugal", code: "PT" },
191
+ { name: "Puerto Rico", code: "PR" },
192
+ { name: "Qatar", code: "QA" },
193
+ { name: "Réunion", code: "RE" },
194
+ { name: "Romania", code: "RO" },
195
+ { name: "Russia", code: "RU" },
196
+ { name: "Rwanda", code: "RW" },
197
+ { name: "Saint Barthélemy", code: "BL" },
198
+ {
199
+ name: "Saint Helena",
200
+ code: "SH"
201
+ },
202
+ { name: "Saint Kitts and Nevis", code: "KN" },
203
+ { name: "Saint Lucia", code: "LC" },
204
+ {
205
+ name: "Saint Martin",
206
+ code: "MF"
207
+ },
208
+ { name: "Saint Pierre and Miquelon", code: "PM" },
209
+ {
210
+ name: "Saint Vincent and the Grenadines",
211
+ code: "VC"
212
+ },
213
+ { name: "Samoa", code: "WS" },
214
+ { name: "San Marino", code: "SM" },
215
+ { name: "São Tomé and Príncipe", code: "ST" },
216
+ { name: "Saudi Arabia", code: "SA" },
217
+ { name: "Senegal", code: "SN" },
218
+ { name: "Serbia", code: "RS" },
219
+ { name: "Seychelles", code: "SC" },
220
+ { name: "Sierra Leone", code: "SL" },
221
+ { name: "Singapore", code: "SG" },
222
+ { name: "Sint Maarten", code: "SX" },
223
+ { name: "Slovakia", code: "SK" },
224
+ { name: "Slovenia", code: "SI" },
225
+ { name: "Solomon Islands", code: "SB" },
226
+ { name: "Somalia", code: "SO" },
227
+ { name: "South Africa", code: "ZA" },
228
+ {
229
+ name: "South Georgia and the South Sandwich Islands",
230
+ code: "GS"
231
+ },
232
+ { name: "South Sudan", code: "SS" },
233
+ { name: "Spain", code: "ES" },
234
+ { name: "Sri Lanka", code: "LK" },
235
+ { name: "Sudan", code: "SD" },
236
+ { name: "Suriname", code: "SR" },
237
+ { name: "Svalbard and Jan Mayen", code: "SJ" },
238
+ { name: "Swaziland", code: "SZ" },
239
+ { name: "Sweden", code: "SE" },
240
+ { name: "Switzerland", code: "CH" },
241
+ { name: "Syria", code: "SY" },
242
+ { name: "Taiwan", code: "TW" },
243
+ { name: "Tajikistan", code: "TJ" },
244
+ { name: "Tanzania", code: "TZ" },
245
+ { name: "Thailand", code: "TH" },
246
+ { name: "Togo", code: "TG" },
247
+ { name: "Tokelau", code: "TK" },
248
+ { name: "Tonga", code: "TO" },
249
+ { name: "Trinidad and Tobago", code: "TT" },
250
+ { name: "Tunisia", code: "TN" },
251
+ { name: "Türkiye", code: "TR" },
252
+ { name: "Turkmenistan", code: "TM" },
253
+ { name: "Turks and Caicos Islands", code: "TC" },
254
+ { name: "Tuvalu", code: "TV" },
255
+ { name: "Western Sahara", code: "EH" },
256
+ { name: "Uganda", code: "UG" },
257
+ { name: "Ukraine", code: "UA" },
258
+ { name: "United Arab Emirates", code: "AE" },
259
+ { name: "United Kingdom", code: "GB" },
260
+ { name: "United States", code: "US" },
261
+ { name: "Uruguay", code: "UY" },
262
+ { name: "Uzbekistan", code: "UZ" },
263
+ { name: "Vanuatu", code: "VU" },
264
+ { name: "Vatican City", code: "VA" },
265
+ {
266
+ name: "Venezuela",
267
+ code: "VE"
268
+ },
269
+ { name: "Vietnam", code: "VN" },
270
+ { name: "U.S. Virgin Islands", code: "VI" },
271
+ { name: "British Virgin Islands", code: "VG" },
272
+ { name: "Wallis and Futuna", code: "WF" },
273
+ { name: "Yemen", code: "YE" },
274
+ { name: "Zambia", code: "ZM" },
275
+ { name: "Zimbabwe", code: "ZW" }
276
+ ];
277
+ export {
278
+ e as countries
279
+ };
@@ -0,0 +1 @@
1
+ export { default as CountryPicker, type CountryPickerProps } from './CountryPicker';
@@ -0,0 +1,30 @@
1
+ import { countries } from './constants';
2
+ export declare function toConfig(isPhone: true, value: Country['code'] | undefined, onChange: (v: Country['code']) => void): PhoneConfig;
3
+ export declare function toConfig(isPhone: false, value: Country['name'] | undefined, onChange: (v: Country['name']) => void): CountryConfig;
4
+ export type PrependTrigger<T> = {
5
+ [K in keyof T as K extends 'hasError' ? 'hasTriggerError' : `trigger${Capitalize<string & K>}`]: T[K];
6
+ };
7
+ export type Country = {
8
+ code: (typeof countries)[number]['code'];
9
+ name: (typeof countries)[number]['name'];
10
+ };
11
+ export type PhoneConfig = {
12
+ isPhone: true;
13
+ value: Country['code'] | undefined;
14
+ onChange: (v: Country['code']) => void;
15
+ };
16
+ export type CountryConfig = {
17
+ isPhone: false;
18
+ value: Country['name'] | undefined;
19
+ onChange: (v: Country['name']) => void;
20
+ };
21
+ export type Config = PhoneConfig | CountryConfig;
22
+ export type CommonProps = {
23
+ baseClassName?: string;
24
+ variantConfig: Config;
25
+ };
26
+ export type ModalStateProps = {
27
+ isOpen?: boolean;
28
+ onClose?: () => void;
29
+ };
30
+ export type ModalBaseProps = CommonProps & ModalStateProps;
@@ -0,0 +1,6 @@
1
+ function i(e, o, t) {
2
+ return e ? { isPhone: !0, value: o, onChange: t } : { isPhone: !1, value: o, onChange: t };
3
+ }
4
+ export {
5
+ i as toConfig
6
+ };
@@ -0,0 +1,2 @@
1
+ import { CountryCode } from 'libphonenumber-js';
2
+ export declare const getSafeCountryCallingCode: (countryCode: CountryCode | string) => string;
@@ -0,0 +1,9 @@
1
+ import { getCountryCallingCode as n } from "../../node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js";
2
+ const r = {
3
+ GS: "500"
4
+ // South Georgia and the South Sandwich Islands
5
+ // Add more special cases here as needed
6
+ }, e = (t) => r[t] ? r[t] : String(n(t));
7
+ export {
8
+ e as getSafeCountryCallingCode
9
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -53,6 +53,10 @@
53
53
  @use 'components/Toast/toast';
54
54
  @use 'components/ExitGateCard/exitGateCard';
55
55
  @use 'components/ComposedModal/composedModal';
56
+ @use 'patterns/CountryPicker/countryPickerOption';
57
+ @use 'patterns/CountryPicker/countryPickerModal';
58
+ @use 'patterns/CountryPicker/countryPickerTrigger';
59
+ @use 'components/ProgressIndicator/progressIndicator';
56
60
  @use 'components/DescriptiveRadioButton/descriptiveRadioButton';
57
61
  @use 'components/DescriptiveRadioButtonGroup/descriptiveRadioButtonGroup';
58
62
 
@@ -67,9 +67,6 @@ $lg: #{$px}-input--lg;
67
67
  display: flex;
68
68
  margin-right: 0.25rem;
69
69
  user-select: none;
70
- user-select: none;
71
- user-select: none;
72
- user-select: none;
73
70
  white-space: nowrap;
74
71
  }
75
72
  }
@@ -0,0 +1,59 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-progress-indicator {
4
+ &__steps {
5
+ align-items: flex-start;
6
+ display: flex;
7
+ gap: 0;
8
+ justify-content: space-between;
9
+ margin: 0;
10
+ padding: 0;
11
+ }
12
+
13
+ &__item {
14
+ align-items: center;
15
+ display: flex;
16
+ gap: $spacing-xsm;
17
+ position: relative;
18
+ }
19
+
20
+ &__circle {
21
+ align-items: center;
22
+ border: 1px solid $pure-black;
23
+ border-radius: 50%;
24
+ display: flex;
25
+ height: 1.5rem;
26
+ justify-content: center;
27
+ padding: 0;
28
+ width: 1.5rem;
29
+
30
+ &--active,
31
+ &--current {
32
+ background-color: $pure-black;
33
+ color: $white;
34
+
35
+ svg {
36
+ color: $white;
37
+ }
38
+ }
39
+ }
40
+
41
+ &__label {
42
+ display: none;
43
+
44
+ @media (min-width: $breakpoint-md) {
45
+ display: inline-block;
46
+ text-align: center;
47
+ white-space: nowrap;
48
+ }
49
+ }
50
+
51
+ &__connector {
52
+ align-self: center;
53
+ background: $pure-black;
54
+ flex: 1 1 0;
55
+ height: 1px;
56
+ margin: 0 $spacing-xsm;
57
+ min-width: 8px;
58
+ }
59
+ }
@@ -0,0 +1,108 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-country-picker {
4
+ &__modal {
5
+ display: flex;
6
+ flex-direction: column;
7
+ height: 80vh;
8
+ width: 635px;
9
+
10
+ @media (max-width: $breakpoint-md) {
11
+ height: 100vh;
12
+ width: 100%;
13
+ }
14
+ }
15
+
16
+ &__wrapper {
17
+ display: flex;
18
+ flex-direction: column;
19
+ height: 100%;
20
+ }
21
+
22
+ &__header {
23
+ background: $white;
24
+ margin-bottom: 24px; // no token for this yet
25
+ position: sticky;
26
+ top: 0;
27
+ z-index: 2;
28
+ }
29
+
30
+ &__list {
31
+ flex: 1;
32
+ margin-bottom: $spacing-sm;
33
+ min-height: 0;
34
+ overflow-y: auto;
35
+ }
36
+
37
+ &__letter-header {
38
+ align-items: flex-start;
39
+ display: flex;
40
+ flex-direction: column;
41
+ margin: $spacing-sm 0;
42
+ }
43
+
44
+ &__letter-text {
45
+ &.seldon-text {
46
+ margin-bottom: 0;
47
+ }
48
+ }
49
+
50
+ &__letter-line {
51
+ border-bottom: 1px solid $light-gray;
52
+ height: 0;
53
+ width: 100%;
54
+ }
55
+
56
+ &__button-container {
57
+ background: $white;
58
+ border-top: 1px solid $light-gray;
59
+ margin-top: auto;
60
+ padding-top: 1rem;
61
+ width: 100%;
62
+
63
+ button {
64
+ width: 100%;
65
+ }
66
+ }
67
+
68
+ &__input-wrapper {
69
+ padding-bottom: 0.25rem;
70
+ position: relative;
71
+ width: 100%;
72
+
73
+ .seldon-input__validation {
74
+ display: none;
75
+ }
76
+
77
+ input {
78
+ padding-left: $spacing-md;
79
+
80
+ &::placeholder {
81
+ font-variation-settings: 'wght' 700;
82
+ }
83
+ }
84
+ }
85
+
86
+ &__input-icon {
87
+ align-items: center;
88
+ color: $dark-gray;
89
+ display: flex;
90
+ left: $spacing-xsm;
91
+ pointer-events: none;
92
+ position: absolute;
93
+ top: 50%;
94
+ transform: translateY(-50%);
95
+ z-index: 2;
96
+ }
97
+
98
+ .#{$px}-country-picker__input-wrapper .seldon-input__label {
99
+ border: 0;
100
+ height: 1px;
101
+ margin: -1px;
102
+ overflow: hidden;
103
+ padding: 0;
104
+ position: absolute;
105
+ white-space: nowrap;
106
+ width: 1px;
107
+ }
108
+ }
@@ -0,0 +1,71 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-country-picker {
4
+ &__option {
5
+ align-items: center;
6
+ background: $white;
7
+ border: 1px solid transparent;
8
+ border-radius: 6px;
9
+ cursor: pointer;
10
+ display: flex;
11
+ flex-direction: row-reverse;
12
+ font-variation-settings: 'wght' 600;
13
+ justify-content: space-between;
14
+ margin-bottom: $spacing-micro;
15
+ margin-right: 1px; // account for scroll bar
16
+ outline: none;
17
+ padding: 12px $spacing-sm;
18
+ transition:
19
+ border-color 0.2s,
20
+ background 0.2s;
21
+
22
+ &--selected {
23
+ border: 1px solid $pure-black;
24
+
25
+ .#{$px}-country-picker__radio {
26
+ accent-color: $pure-black;
27
+ }
28
+ }
29
+
30
+ &--is-phone:focus-within {
31
+ outline: 1px solid $soft-black;
32
+ outline-offset: 1px;
33
+ }
34
+
35
+ &-content {
36
+ display: flex;
37
+ flex: 1;
38
+ justify-content: space-between;
39
+ }
40
+
41
+ &-flag {
42
+ height: 1rem;
43
+ margin-right: $spacing-sm;
44
+ vertical-align: middle;
45
+ }
46
+ }
47
+ .#{$px}-country-picker__radio {
48
+ height: 1.25rem;
49
+ width: 1.25rem;
50
+ }
51
+
52
+ &__radio--visually-hidden {
53
+ border: 0;
54
+ height: 1px;
55
+ margin: -1px;
56
+ opacity: 0;
57
+ padding: 0;
58
+ white-space: nowrap;
59
+ width: 1px;
60
+ }
61
+ }
62
+
63
+ // Override focus within styles when phone option is clicked
64
+ // TODO: align with design on focus states since the radio input is hidden
65
+ .#{$px}-country-picker__option--is-phone.#{$px}-country-picker__option--selected {
66
+ border: 1px solid $pure-black;
67
+
68
+ &:focus-within {
69
+ outline: none;
70
+ }
71
+ }
@@ -0,0 +1,73 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-country-picker {
4
+ &__trigger {
5
+ display: flex;
6
+ flex-direction: column;
7
+ width: 100%;
8
+
9
+ &-label {
10
+ color: $soft-black;
11
+ font-variation-settings: 'wght' 600;
12
+ margin-bottom: $spacing-micro;
13
+
14
+ &--error {
15
+ color: $error-red;
16
+ }
17
+ }
18
+
19
+ &-btn {
20
+ align-items: center;
21
+ appearance: none;
22
+ background: $white;
23
+ border: 1px solid $light-gray;
24
+ border-radius: 6px;
25
+ box-sizing: border-box;
26
+ cursor: pointer;
27
+ display: flex;
28
+ flex-direction: row;
29
+ font-variation-settings: 'wght' 600;
30
+ justify-content: space-between;
31
+ padding: $spacing-xsm;
32
+ transition:
33
+ border-color 0.2s,
34
+ box-shadow 0.2s;
35
+ width: 100%;
36
+
37
+ &:focus-visible {
38
+ border-color: $pure-black;
39
+ box-shadow: 0 0 0 2px rgba($pure-black, 0.08);
40
+ outline: none;
41
+ }
42
+
43
+ &--error {
44
+ border-color: $error-red;
45
+ }
46
+ }
47
+
48
+ &-text {
49
+ color: $soft-black;
50
+ flex: 1;
51
+ overflow: hidden;
52
+ text-align: left;
53
+ text-overflow: ellipsis;
54
+ white-space: nowrap;
55
+ }
56
+
57
+ &-icon {
58
+ align-items: center;
59
+ display: flex;
60
+ margin-left: $spacing-sm;
61
+ }
62
+
63
+ &-error-msg {
64
+ color: $error-red;
65
+ margin-top: $spacing-micro;
66
+ }
67
+
68
+ &-flag {
69
+ height: 1rem;
70
+ margin-right: $spacing-sm;
71
+ }
72
+ }
73
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.174.0",
3
+ "version": "1.176.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"
@@ -48,6 +48,7 @@
48
48
  "@radix-ui/react-dialog": "^1.1.4",
49
49
  "@radix-ui/react-dropdown-menu": "^2.1.14",
50
50
  "@radix-ui/react-popover": "^1.1.11",
51
+ "@radix-ui/react-progress": "^1.1.7",
51
52
  "@radix-ui/react-select": "^2.1.1",
52
53
  "@radix-ui/react-tabs": "^1.1.1",
53
54
  "@radix-ui/react-toast": "^1.2.11",