intl-tel-input 18.1.1 → 18.1.3

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/src/css/demo.scss CHANGED
@@ -1,20 +1,13 @@
1
1
  * {
2
2
  box-sizing: border-box;
3
- -moz-box-sizing: border-box;
4
3
  }
5
-
6
4
  body {
7
5
  margin: 20px;
8
-
9
6
  font-size: 14px;
10
- font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
7
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
11
8
  color: #555;
12
9
  }
13
10
 
14
- .iti__hide {
15
- display: none;
16
- }
17
-
18
11
  // example code blocks
19
12
  pre {
20
13
  margin: 0 !important; // override prism.css
@@ -31,7 +24,8 @@ pre {
31
24
  }
32
25
 
33
26
  // general form styling
34
- input, button {
27
+ input,
28
+ button {
35
29
  height: 35px;
36
30
  margin: 0;
37
31
  padding: 6px 12px;
@@ -48,34 +42,24 @@ input, button {
48
42
  }
49
43
 
50
44
  // select useful for examples
51
- input, select {
52
- border: 1px solid #CCC;
45
+ input,
46
+ select {
47
+ border: 1px solid #ccc;
53
48
  width: 250px;
54
49
  }
55
- ::-webkit-input-placeholder {
56
- color: #BBB;
57
- }
58
- ::-moz-placeholder { /* Firefox 19+ */
59
- color: #BBB;
60
- opacity: 1;
61
- }
50
+ ::placeholder,
62
51
  :-ms-input-placeholder {
63
- color: #BBB;
52
+ color: #bbb;
64
53
  }
65
54
 
66
55
  // borrowed from bootstrap
67
56
  button {
68
- color: #FFF;
69
- background-color: #428BCA;
70
- border: 1px solid #357EBD;
57
+ color: #fff;
58
+ background-color: #428bca;
59
+ border: 1px solid #357ebd;
71
60
  &:hover {
72
- background-color: #3276B1;
73
- border-color: #285E8E;
61
+ background-color: #3276b1;
62
+ border-color: #285e8e;
74
63
  cursor: pointer;
75
64
  }
76
65
  }
77
-
78
- // examples
79
- #result {
80
- margin-bottom: 100px;
81
- }
@@ -1,3 +1,5 @@
1
+ @use "sass:math";
2
+
1
3
  // NOTE: by using !default on all variables, we're saying only declare the variable if it doesn't
2
4
  // already exist, which allows devs to declare these variables themselves and assign them any value
3
5
  // they want before importing this file
@@ -6,7 +8,7 @@
6
8
  // the border-highlighting some browsers give the input on focus
7
9
  $hoverColor: rgba(0, 0, 0, 0.05) !default;
8
10
  $greyText: #999 !default;
9
- $greyBorder: #CCC !default;
11
+ $greyBorder: #ccc !default;
10
12
 
11
13
  $flagHeight: 15px !default;
12
14
  $flagWidth: 20px !default;
@@ -17,13 +19,14 @@ $borderWidth: 1px !default;
17
19
 
18
20
  $arrowHeight: 4px !default;
19
21
  $arrowWidth: 6px !default;
20
- $triangleBorder: 3px !default;
21
- $arrowPadding: 6px !default;
22
+ $triangleBorder: math.div($arrowWidth, 2) !default;
23
+ $arrowPadding: $arrowWidth !default;
22
24
  $arrowColor: #555 !default;
23
25
 
24
26
  $inputPadding: 6px !default;
25
27
  $selectedFlagWidth: $flagWidth + (2 * $flagPadding) !default;
26
- $selectedFlagArrowWidth: $flagWidth + $flagPadding + $arrowWidth + (2 * $arrowPadding) !default;
28
+ $selectedFlagArrowWidth: $flagWidth + $flagPadding + $arrowWidth +
29
+ (2 * $arrowPadding) !default;
27
30
 
28
31
  // image related variables
29
32
  $flagsImagePath: "../img/" !default;
@@ -55,7 +58,9 @@ $mobilePopupMargin: 30px !default;
55
58
  }
56
59
 
57
60
  // specify types to increase specificity e.g. to override bootstrap v2.3
58
- input, input[type=text], input[type=tel] {
61
+ input,
62
+ input[type="text"],
63
+ input[type="tel"] {
59
64
  position: relative;
60
65
  // input is bottom level, below selected flag and dropdown
61
66
  z-index: 0;
@@ -110,7 +115,7 @@ $mobilePopupMargin: 30px !default;
110
115
  border-right: $triangleBorder solid transparent;
111
116
  border-top: $arrowHeight solid $arrowColor;
112
117
 
113
- [dir=rtl] & {
118
+ [dir="rtl"] & {
114
119
  margin-right: $arrowPadding;
115
120
  margin-left: 0;
116
121
  }
@@ -140,7 +145,7 @@ $mobilePopupMargin: 30px !default;
140
145
  // margin-left to compensate for the padding on the parent
141
146
  margin: 0 0 0 (-$borderWidth);
142
147
 
143
- box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
148
+ box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
144
149
  background-color: white;
145
150
  border: $borderWidth solid $greyBorder;
146
151
 
@@ -192,23 +197,27 @@ $mobilePopupMargin: 30px !default;
192
197
  }
193
198
 
194
199
  // spacing between country flag, name and dial code
195
- &__flag-box, &__country-name {
200
+ &__flag-box,
201
+ &__country-name {
196
202
  margin-right: 6px;
197
203
 
198
- [dir=rtl] & {
204
+ [dir="rtl"] & {
199
205
  margin-right: 0;
200
206
  margin-left: 6px;
201
207
  }
202
208
  }
203
209
 
204
210
  // these settings are independent of each other, but both move selected flag to left of input
205
- &--allow-dropdown, &--separate-dial-code {
206
- input, input[type=text], input[type=tel] {
211
+ &--allow-dropdown,
212
+ &--separate-dial-code {
213
+ input,
214
+ input[type="text"],
215
+ input[type="tel"] {
207
216
  padding-right: $inputPadding;
208
217
  padding-left: $selectedFlagArrowWidth + $inputPadding;
209
218
  margin-left: 0;
210
219
 
211
- [dir=rtl] & {
220
+ [dir="rtl"] & {
212
221
  padding-right: $selectedFlagArrowWidth + $inputPadding;
213
222
  padding-left: $inputPadding;
214
223
  margin-right: 0;
@@ -218,7 +227,7 @@ $mobilePopupMargin: 30px !default;
218
227
  right: auto;
219
228
  left: 0;
220
229
 
221
- [dir=rtl] & {
230
+ [dir="rtl"] & {
222
231
  right: 0;
223
232
  left: auto;
224
233
  }
@@ -288,11 +297,6 @@ $mobilePopupMargin: 30px !default;
288
297
  }
289
298
  }
290
299
 
291
-
292
-
293
-
294
-
295
-
296
300
  @import "sprite";
297
301
 
298
302
  .iti__flag {
@@ -301,7 +305,7 @@ $mobilePopupMargin: 30px !default;
301
305
  background-image: url("#{$flagsImagePath}#{$flagsImageName}.#{$flagsImageExtension}");
302
306
  background-repeat: no-repeat;
303
307
  // empty state
304
- background-color: #DBDBDB;
308
+ background-color: #dbdbdb;
305
309
  background-position: $flagWidth 0;
306
310
 
307
311
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
@@ -309,8 +313,6 @@ $mobilePopupMargin: 30px !default;
309
313
  }
310
314
  }
311
315
 
312
-
313
-
314
316
  // hack for Nepal which is the only flag that is not square/rectangle, so it has transparency, so you can see the default grey behind it
315
317
  .iti__flag.iti__np {
316
318
  background-color: transparent;
package/src/js/data.js CHANGED
@@ -220,7 +220,7 @@ var allCountries = [
220
220
  "ca",
221
221
  "1",
222
222
  1,
223
- ["204", "226", "236", "249", "250", "289", "306", "343", "365", "367", "368", "387", "403", "416", "418", "431", "437", "438", "450", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "705", "709", "742", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905"]
223
+ ["204", "226", "236", "249", "250", "263", "289", "306", "343", "354", "365", "367", "368", "382", "387", "403", "416", "418", "428", "431", "437", "438", "450", "584", "468", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "683", "705", "709", "742", "753", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905"]
224
224
  ],
225
225
  [
226
226
  "Cape Verde (Kabu Verdi)",