playbook_ui 14.5.0.pre.alpha.PLAY1548intltelinputupdatelatest4073 → 14.5.0.pre.alpha.PLAY1601updatereactzoompanpinch4123
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +20 -4
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx +45 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +2 -2
- data/app/pb_kits/playbook/pb_filter/Filter/ResultsCount.tsx +4 -2
- data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +17 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.html.erb +93 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +169 -65
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.test.js +5 -5
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +15 -9
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.html.erb +336 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.jsx +97 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +28 -6
- data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.rb +31 -1
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +14 -71
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +6 -15
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.md +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/intlTelInput.scss +931 -849
- data/app/pb_kits/playbook/pb_phone_number_input/types.d.ts +1 -4
- data/dist/chunks/{_typeahead-CY44rh9x.js → _typeahead-C9g4qCcE.js} +1 -1
- data/dist/chunks/_weekday_stacked-DZpRml83.js +45 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +10 -4
- data/dist/chunks/_weekday_stacked-NcRanohJ.js +0 -45
@@ -6,35 +6,6 @@ $dropdown-min-width: 340px;
|
|
6
6
|
$flag-min-resolution: 192dpi;
|
7
7
|
|
8
8
|
.pb_phone_number_input {
|
9
|
-
.iti {
|
10
|
-
width: 100%;
|
11
|
-
}
|
12
|
-
|
13
|
-
.iti__flag {
|
14
|
-
margin-right: 6px;
|
15
|
-
}
|
16
|
-
|
17
|
-
.iti__a11y-text {
|
18
|
-
display: none;
|
19
|
-
}
|
20
|
-
|
21
|
-
.iti__selected-dial-code {
|
22
|
-
font-family: $font_family_base;
|
23
|
-
font-size: $font_base;
|
24
|
-
line-height: 1.5;
|
25
|
-
letter-spacing: $lspace_normal;
|
26
|
-
font-weight: $regular;
|
27
|
-
font-style: normal;
|
28
|
-
text-rendering: optimizeLegibility;
|
29
|
-
-moz-font-feature-settings: "liga" on;
|
30
|
-
color: $charcoal;
|
31
|
-
}
|
32
|
-
|
33
|
-
.iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country-primary:hover,
|
34
|
-
.iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country:has(+ .iti__dropdown-content:hover) .iti__selected-country-primary {
|
35
|
-
background-color: transparent;
|
36
|
-
}
|
37
|
-
|
38
9
|
input::placeholder {
|
39
10
|
color: $focus_input_light;
|
40
11
|
}
|
@@ -44,7 +15,7 @@ $flag-min-resolution: 192dpi;
|
|
44
15
|
border-color: $primary !important;
|
45
16
|
}
|
46
17
|
|
47
|
-
.iti__selected-
|
18
|
+
.iti__selected-flag:focus-visible {
|
48
19
|
outline-style: none;
|
49
20
|
}
|
50
21
|
}
|
@@ -58,26 +29,8 @@ $flag-min-resolution: 192dpi;
|
|
58
29
|
border-bottom: 1px solid $border_light !important;
|
59
30
|
}
|
60
31
|
|
61
|
-
.iti__selected-
|
62
|
-
|
63
|
-
justify-content: center;
|
64
|
-
align-items: center;
|
65
|
-
.iti__flag {
|
66
|
-
margin-right: 0;
|
67
|
-
}
|
68
|
-
}
|
69
|
-
|
70
|
-
.iti__selected-country {
|
71
|
-
position: absolute;
|
72
|
-
z-index: 2;
|
73
|
-
top: 0;
|
74
|
-
display: flex;
|
75
|
-
height: 100%;
|
76
|
-
justify-content: center;
|
77
|
-
align-items: center;
|
78
|
-
border-width: 0;
|
79
|
-
|
80
|
-
padding: 0 $space_xxs 0 $space_xs;
|
32
|
+
.iti__selected-flag {
|
33
|
+
padding: 0 $space_xxs 0 $space_sm;
|
81
34
|
border-radius: $space_xxs;
|
82
35
|
|
83
36
|
&[aria-expanded="true"] {
|
@@ -98,27 +51,24 @@ $flag-min-resolution: 192dpi;
|
|
98
51
|
}
|
99
52
|
}
|
100
53
|
|
101
|
-
.iti--allow-dropdown .
|
54
|
+
.iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag {
|
102
55
|
background-color: $focus_input_light;
|
103
56
|
}
|
104
57
|
|
105
|
-
.
|
58
|
+
.iti__flag-container:hover + .text_input {
|
106
59
|
background-color: $focus_input_light;
|
107
60
|
}
|
108
61
|
|
109
62
|
.iti__flag {
|
110
|
-
background-image: url("https://unpkg.com/
|
63
|
+
background-image: url("https://unpkg.com/playbook-ui@14.2.0-alpha.fixphonenumberinputflag3631/dist/assets/flags.png");
|
111
64
|
border-radius: 1px;
|
112
65
|
}
|
113
66
|
|
114
|
-
.
|
115
|
-
|
116
|
-
background-position: center;
|
117
|
-
height: 20px;
|
118
|
-
background-size: 20px 20px;
|
67
|
+
.iti--separate-dial-code {
|
68
|
+
width: 100%;
|
119
69
|
}
|
120
70
|
|
121
|
-
.iti--
|
71
|
+
.iti--separate-dial-code .iti__selected-flag {
|
122
72
|
background-color: rgba($white, $opacity_1);
|
123
73
|
}
|
124
74
|
|
@@ -186,13 +136,10 @@ $flag-min-resolution: 192dpi;
|
|
186
136
|
.iti__dropdown-content {
|
187
137
|
border-radius: $space_xs;
|
188
138
|
border: 1px solid $border_light !important;
|
189
|
-
position: absolute;
|
190
|
-
z-index: 2;
|
191
|
-
top: 100%;
|
192
139
|
}
|
193
140
|
|
194
141
|
&.dark {
|
195
|
-
.iti--allow-dropdown .
|
142
|
+
.iti--allow-dropdown .iti__flag-container {
|
196
143
|
background-color: rgba($white, 0);
|
197
144
|
|
198
145
|
&:hover {
|
@@ -202,13 +149,13 @@ $flag-min-resolution: 192dpi;
|
|
202
149
|
background-color: rgba($white, 0.15);
|
203
150
|
}
|
204
151
|
|
205
|
-
.iti__selected-
|
152
|
+
.iti__selected-flag {
|
206
153
|
background-color: rgba($white, 0);
|
207
154
|
}
|
208
155
|
}
|
209
156
|
}
|
210
157
|
|
211
|
-
.iti__selected-
|
158
|
+
.iti__selected-flag {
|
212
159
|
background-color: rgba($white, 0);
|
213
160
|
color: $white;
|
214
161
|
}
|
@@ -249,15 +196,11 @@ $flag-min-resolution: 192dpi;
|
|
249
196
|
background-color: rgba($white, 0.025) !important;
|
250
197
|
}
|
251
198
|
}
|
252
|
-
|
253
|
-
.iti__selected-dial-code {
|
254
|
-
color: $white;
|
255
|
-
}
|
256
199
|
}
|
257
|
-
|
200
|
+
|
258
201
|
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: $flag-min-resolution) {
|
259
202
|
.iti__flag {
|
260
|
-
background-image: url("https://unpkg.com/
|
203
|
+
background-image: url("https://unpkg.com/playbook-ui@14.2.0-alpha.fixphonenumberinputflag3631/dist/assets/flags.png");
|
261
204
|
}
|
262
205
|
}
|
263
206
|
}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import React, { forwardRef, useEffect, useRef, useState, useImperativeHandle } from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
|
-
import intlTelInput from 'intl-tel-input
|
4
|
+
import intlTelInput from 'intl-tel-input'
|
5
|
+
import 'intl-tel-input/build/js/utils.js'
|
5
6
|
|
6
7
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
7
8
|
import { globalProps } from '../utilities/globalProps'
|
@@ -49,7 +50,7 @@ const formatToGlobalCountryName = (countryName: string) => {
|
|
49
50
|
}
|
50
51
|
|
51
52
|
const formatAllCountries = () => {
|
52
|
-
const countryData =
|
53
|
+
const countryData = window.intlTelInputGlobals.getCountryData()
|
53
54
|
|
54
55
|
for (let i = 0; i < countryData.length; i++) {
|
55
56
|
const country = countryData[i]
|
@@ -213,24 +214,14 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.MutableRefOb
|
|
213
214
|
// This also Fixes things for our react_component rendering on the Rails Side
|
214
215
|
useEffect(formatAllCountries, [])
|
215
216
|
|
216
|
-
// If an initial country is not specified, the "globe" icon will show
|
217
|
-
// Always set a country
|
218
|
-
const fallbackCountry =
|
219
|
-
preferredCountries.length > 0 ? preferredCountries[0] :
|
220
|
-
onlyCountries.length > 0 ? onlyCountries.sort()[0] :
|
221
|
-
"af";
|
222
|
-
|
223
217
|
useEffect(() => {
|
224
218
|
const telInputInit = intlTelInput(inputRef.current, {
|
225
219
|
separateDialCode: true,
|
226
|
-
|
220
|
+
preferredCountries,
|
227
221
|
allowDropdown: !disabled,
|
228
222
|
autoInsertDialCode: false,
|
229
|
-
initialCountry
|
230
|
-
onlyCountries
|
231
|
-
countrySearch: false,
|
232
|
-
fixDropdownWidth: false,
|
233
|
-
formatAsYouType: false,
|
223
|
+
initialCountry,
|
224
|
+
onlyCountries
|
234
225
|
})
|
235
226
|
|
236
227
|
inputRef.current.addEventListener("countrychange", (evt: Event) => {
|
data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Preferred countries will display in the order they are listed with the first country preselected, and all non-preferred countries listed alphabetically below
|
1
|
+
Preferred countries will display in the order they are listed with the first country preselected, and all non-preferred countries listed alphabetically below a section separator within the remaining dropdown.
|