playbook_ui 14.6.0.pre.alpha.play1586datearea4218 → 14.6.0.pre.rc.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +7 -25
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/index.js +0 -60
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +9 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +9 -1
- data/app/pb_kits/playbook/pb_card/_card.tsx +1 -5
- data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +1 -5
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.html.erb +7 -30
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.md +2 -0
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +3 -84
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +5 -28
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +0 -3
- data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +1 -10
- 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/FilterDouble.tsx +0 -2
- data/app/pb_kits/playbook/pb_filter/Filter/FilterSingle.tsx +0 -2
- data/app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.tsx +1 -4
- data/app/pb_kits/playbook/pb_filter/Filter/ResultsCount.tsx +2 -4
- data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_filter/docs/example.yml +0 -3
- data/app/pb_kits/playbook/pb_filter/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_filter/filter.html.erb +2 -2
- data/app/pb_kits/playbook/pb_filter/filter.rb +0 -2
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -3
- data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +2 -8
- data/app/pb_kits/playbook/pb_flex/flex_item.html.erb +6 -3
- data/app/pb_kits/playbook/pb_flex/flex_item.rb +2 -7
- data/app/pb_kits/playbook/pb_form/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_form/form.rb +0 -2
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -9
- data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_form_pill/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +227 -211
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +65 -169
- 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 +9 -15
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +6 -28
- data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.rb +1 -31
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +18 -86
- 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/app/pb_kits/playbook/pb_popover/_popover.tsx +2 -6
- data/app/pb_kits/playbook/pb_popover/docs/_popover_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_popover/popover.rb +1 -3
- data/app/pb_kits/playbook/pb_timeline/_item.tsx +23 -59
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +0 -8
- data/app/pb_kits/playbook/pb_timeline/docs/example.yml +1 -2
- data/app/pb_kits/playbook/pb_timeline/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_timeline/item.html.erb +21 -17
- data/app/pb_kits/playbook/pb_timeline/item.rb +0 -4
- data/app/pb_kits/playbook/pb_timeline/timeline.test.js +0 -84
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -4
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -3
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -3
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -3
- data/app/pb_kits/playbook/utilities/globalProps.ts +2 -39
- data/dist/chunks/_typeahead-BYw0HEgO.js +22 -0
- data/dist/chunks/_weekday_stacked-DumiyWjh.js +45 -0
- data/dist/chunks/{lib-D-mTv-kp.js → lib-CEpcaI8y.js} +1 -1
- data/dist/chunks/{pb_form_validation-BkWGwJsl.js → pb_form_validation-D9zkwt2b.js} +1 -1
- 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/kit_base.rb +1 -21
- data/lib/playbook/pb_doc_helper.rb +5 -5
- data/lib/playbook/pb_forms_helper.rb +1 -3
- data/lib/playbook/version.rb +2 -2
- metadata +6 -48
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx +0 -72
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.md +0 -5
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx +0 -45
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb +0 -9
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx +0 -33
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.html.erb +0 -10
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.jsx +0 -34
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +0 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.html.erb +0 -41
- data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.jsx +0 -71
- data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_rails.md +0 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_react.md +0 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +0 -39
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.md +0 -1
- data/app/pb_kits/playbook/pb_form/formHelper.js +0 -27
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +0 -19
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +0 -27
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md +0 -1
- data/app/pb_kits/playbook/pb_multi_level_select/context/index.tsx +0 -5
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.html.erb +0 -93
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.md +0 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.jsx +0 -105
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.md +0 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.jsx +0 -106
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.md +0 -1
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select_options.tsx +0 -149
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.html.erb +0 -336
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.jsx +0 -97
- data/app/pb_kits/playbook/pb_timeline/date_area.html.erb +0 -12
- data/app/pb_kits/playbook/pb_timeline/date_area.rb +0 -13
- data/app/pb_kits/playbook/pb_timeline/detail_area.html.erb +0 -3
- data/app/pb_kits/playbook/pb_timeline/detail_area.rb +0 -11
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +0 -43
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +0 -68
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md +0 -4
- data/app/pb_kits/playbook/pb_timeline/node_area.html.erb +0 -14
- data/app/pb_kits/playbook/pb_timeline/node_area.rb +0 -16
- data/app/pb_kits/playbook/pb_timeline/subcomponents/Detail.tsx +0 -29
- data/app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx +0 -38
- data/app/pb_kits/playbook/pb_timeline/subcomponents/Step.tsx +0 -42
- data/app/pb_kits/playbook/pb_timeline/subcomponents/index.tsx +0 -3
- data/dist/chunks/_typeahead-BhHnXJjy.js +0 -22
- data/dist/chunks/_weekday_stacked-C-VEa5Ar.js +0 -45
@@ -5,54 +5,7 @@ $transform-rotate-deg: 135deg;
|
|
5
5
|
$dropdown-min-width: 340px;
|
6
6
|
$flag-min-resolution: 192dpi;
|
7
7
|
|
8
|
-
:root {
|
9
|
-
--iti-arrow-padding: #{$space_xs};
|
10
|
-
--iti-spacer-horizontal: #{$space_sm};
|
11
|
-
--iti-path-flags-1x: url("https://unpkg.com/intl-tel-input@24.6.0/build/img/flags.png");
|
12
|
-
--iti-path-flags-2x: url("https://unpkg.com/intl-tel-input@24.6.0/build/img/flags@2x.png");
|
13
|
-
--iti-path-globe-1x: url("https://unpkg.com/intl-tel-input@24.6.0/build/img/globe.png");
|
14
|
-
--iti-path-globe-2x: url("https://unpkg.com/intl-tel-input@24.6.0/build/img/globe@2x.png");
|
15
|
-
}
|
16
|
-
|
17
8
|
.pb_phone_number_input {
|
18
|
-
.iti {
|
19
|
-
width: 100%;
|
20
|
-
}
|
21
|
-
|
22
|
-
.iti__flag {
|
23
|
-
margin-right: 6px;
|
24
|
-
}
|
25
|
-
|
26
|
-
.iti__a11y-text {
|
27
|
-
display: none;
|
28
|
-
}
|
29
|
-
|
30
|
-
.iti__selected-dial-code {
|
31
|
-
font-family: $font_family_base;
|
32
|
-
font-size: $font_base;
|
33
|
-
line-height: 1.5;
|
34
|
-
letter-spacing: $lspace_normal;
|
35
|
-
font-weight: $regular;
|
36
|
-
font-style: normal;
|
37
|
-
text-rendering: optimizeLegibility;
|
38
|
-
-moz-font-feature-settings: "liga" on;
|
39
|
-
color: $charcoal;
|
40
|
-
}
|
41
|
-
|
42
|
-
// iti-spacer-horizontal's default is 8px, or $space_xs
|
43
|
-
.iti__country-list .iti__flag, .iti__country-name {
|
44
|
-
margin-right: $space_xs;
|
45
|
-
}
|
46
|
-
[dir=rtl] .iti__country-list .iti__flag, [dir=rtl] .iti__country-name {
|
47
|
-
margin-right: 0;
|
48
|
-
margin-left: $space_xs;
|
49
|
-
}
|
50
|
-
|
51
|
-
.iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country-primary:hover,
|
52
|
-
.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 {
|
53
|
-
background-color: transparent;
|
54
|
-
}
|
55
|
-
|
56
9
|
input::placeholder {
|
57
10
|
color: $focus_input_light;
|
58
11
|
}
|
@@ -62,13 +15,13 @@ $flag-min-resolution: 192dpi;
|
|
62
15
|
border-color: $primary !important;
|
63
16
|
}
|
64
17
|
|
65
|
-
.iti__selected-
|
18
|
+
.iti__selected-flag:focus-visible {
|
66
19
|
outline-style: none;
|
67
20
|
}
|
68
21
|
}
|
69
22
|
|
70
23
|
.iti__country {
|
71
|
-
padding: 5px
|
24
|
+
padding: 5px 10px 5px 16px;
|
72
25
|
transition: $transition_default;
|
73
26
|
}
|
74
27
|
|
@@ -76,23 +29,8 @@ $flag-min-resolution: 192dpi;
|
|
76
29
|
border-bottom: 1px solid $border_light !important;
|
77
30
|
}
|
78
31
|
|
79
|
-
.iti__selected-
|
80
|
-
|
81
|
-
justify-content: center;
|
82
|
-
align-items: center;
|
83
|
-
.iti__flag {
|
84
|
-
margin-right: 0;
|
85
|
-
}
|
86
|
-
}
|
87
|
-
|
88
|
-
.iti__selected-country {
|
89
|
-
position: absolute;
|
90
|
-
top: 0;
|
91
|
-
display: flex;
|
92
|
-
height: 100%;
|
93
|
-
justify-content: center;
|
94
|
-
align-items: center;
|
95
|
-
border-width: 0;
|
32
|
+
.iti__selected-flag {
|
33
|
+
padding: 0 $space_xxs 0 $space_sm;
|
96
34
|
border-radius: $space_xxs;
|
97
35
|
|
98
36
|
&[aria-expanded="true"] {
|
@@ -113,24 +51,24 @@ $flag-min-resolution: 192dpi;
|
|
113
51
|
}
|
114
52
|
}
|
115
53
|
|
116
|
-
.
|
54
|
+
.iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag {
|
55
|
+
background-color: $focus_input_light;
|
56
|
+
}
|
57
|
+
|
58
|
+
.iti__flag-container:hover + .text_input {
|
117
59
|
background-color: $focus_input_light;
|
118
60
|
}
|
119
61
|
|
120
62
|
.iti__flag {
|
121
|
-
background-image: url("https://unpkg.com/
|
63
|
+
background-image: url("https://unpkg.com/playbook-ui@14.2.0-alpha.fixphonenumberinputflag3631/dist/assets/flags.png");
|
122
64
|
border-radius: 1px;
|
123
65
|
}
|
124
66
|
|
125
|
-
.
|
126
|
-
|
127
|
-
background-position: center;
|
128
|
-
height: 16px;
|
129
|
-
width: 16px;
|
130
|
-
background-size: 16px 16px;
|
67
|
+
.iti--separate-dial-code {
|
68
|
+
width: 100%;
|
131
69
|
}
|
132
70
|
|
133
|
-
.iti--
|
71
|
+
.iti--separate-dial-code .iti__selected-flag {
|
134
72
|
background-color: rgba($white, $opacity_1);
|
135
73
|
}
|
136
74
|
|
@@ -198,12 +136,10 @@ $flag-min-resolution: 192dpi;
|
|
198
136
|
.iti__dropdown-content {
|
199
137
|
border-radius: $space_xs;
|
200
138
|
border: 1px solid $border_light !important;
|
201
|
-
position: absolute;
|
202
|
-
top: 100%;
|
203
139
|
}
|
204
140
|
|
205
141
|
&.dark {
|
206
|
-
.iti--allow-dropdown .
|
142
|
+
.iti--allow-dropdown .iti__flag-container {
|
207
143
|
background-color: rgba($white, 0);
|
208
144
|
|
209
145
|
&:hover {
|
@@ -213,13 +149,13 @@ $flag-min-resolution: 192dpi;
|
|
213
149
|
background-color: rgba($white, 0.15);
|
214
150
|
}
|
215
151
|
|
216
|
-
.iti__selected-
|
152
|
+
.iti__selected-flag {
|
217
153
|
background-color: rgba($white, 0);
|
218
154
|
}
|
219
155
|
}
|
220
156
|
}
|
221
157
|
|
222
|
-
.iti__selected-
|
158
|
+
.iti__selected-flag {
|
223
159
|
background-color: rgba($white, 0);
|
224
160
|
color: $white;
|
225
161
|
}
|
@@ -260,15 +196,11 @@ $flag-min-resolution: 192dpi;
|
|
260
196
|
background-color: rgba($white, 0.025) !important;
|
261
197
|
}
|
262
198
|
}
|
263
|
-
|
264
|
-
.iti__selected-dial-code {
|
265
|
-
color: $white;
|
266
|
-
}
|
267
199
|
}
|
268
|
-
|
200
|
+
|
269
201
|
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: $flag-min-resolution) {
|
270
202
|
.iti__flag {
|
271
|
-
background-image: url("https://unpkg.com/
|
203
|
+
background-image: url("https://unpkg.com/playbook-ui@14.2.0-alpha.fixphonenumberinputflag3631/dist/assets/flags.png");
|
272
204
|
}
|
273
205
|
}
|
274
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.
|