intl-tel-input 18.1.7 → 18.1.8
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.
- package/build/css/intlTelInput.css +233 -209
- package/build/css/intlTelInput.min.css +1 -1
- package/build/img/flags.png +0 -0
- package/build/img/flags@2x.png +0 -0
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput-jquery.js +9 -3
- package/build/js/intlTelInput-jquery.min.js +3 -3
- package/build/js/intlTelInput.js +9 -3
- package/build/js/intlTelInput.min.js +3 -3
- package/composer.json +1 -1
- package/package.json +2 -2
- package/src/css/intlTelInput.scss +5 -0
- package/src/css/sprite.scss +230 -210
- package/src/js/intlTelInput.js +8 -1
package/src/js/intlTelInput.js
CHANGED
|
@@ -154,6 +154,9 @@ class Iti {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
// check if input has one parent with RTL
|
|
158
|
+
this.isRTL = !!this.telInput.closest('[dir=rtl]');
|
|
159
|
+
|
|
157
160
|
// these promises get resolved when their individual requests complete
|
|
158
161
|
// this way the dev can do something like iti.promise.then(...) to know when all requests are
|
|
159
162
|
// complete
|
|
@@ -1202,7 +1205,11 @@ class Iti {
|
|
|
1202
1205
|
this.selectedFlag.offsetWidth || this._getHiddenSelectedFlagWidth();
|
|
1203
1206
|
|
|
1204
1207
|
// add 6px of padding after the grey selected-dial-code box, as this is what we use in the css
|
|
1205
|
-
this.
|
|
1208
|
+
if (this.isRTL) {
|
|
1209
|
+
this.telInput.style.paddingRight = `${selectedFlagWidth + 6}px`;
|
|
1210
|
+
} else {
|
|
1211
|
+
this.telInput.style.paddingLeft = `${selectedFlagWidth + 6}px`;
|
|
1212
|
+
}
|
|
1206
1213
|
}
|
|
1207
1214
|
|
|
1208
1215
|
// and the input's placeholder
|