vue-tel-input 6.0.0-beta.5 → 6.0.0-beta.6

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.
@@ -5169,7 +5169,7 @@ var es_function_name = __webpack_require__("b0c0");
5169
5169
  // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
5170
5170
  var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
5171
5171
 
5172
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/vue-tel-input.vue?vue&type=template&id=6b666c26
5172
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/vue-tel-input.vue?vue&type=template&id=e63ac01c
5173
5173
 
5174
5174
 
5175
5175
  var _hoisted_1 = {
@@ -5193,20 +5193,28 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5193
5193
  disabled: $props.disabled
5194
5194
  }]
5195
5195
  }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("div", {
5196
+ "aria-label": "Country Code Selector",
5197
+ "aria-haspopup": "listbox",
5198
+ "aria-expanded": $data.open,
5199
+ role: "button",
5196
5200
  class: ['vti__dropdown', {
5197
5201
  open: $data.open,
5198
5202
  disabled: $props.dropdownOptions.disabled
5199
5203
  }],
5200
5204
  tabindex: $props.dropdownOptions.tabindex,
5201
- onKeydown: [_cache[2] || (_cache[2] = function () {
5205
+ onKeydown: [_cache[1] || (_cache[1] = function () {
5202
5206
  return $options.keyboardNav && $options.keyboardNav.apply($options, arguments);
5203
- }), _cache[4] || (_cache[4] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(function () {
5207
+ }), _cache[3] || (_cache[3] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(function () {
5208
+ return $options.toggleDropdown && $options.toggleDropdown.apply($options, arguments);
5209
+ }, ["space"])), _cache[4] || (_cache[4] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(function () {
5210
+ return $options.reset && $options.reset.apply($options, arguments);
5211
+ }, ["esc"])), _cache[5] || (_cache[5] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(function () {
5204
5212
  return $options.reset && $options.reset.apply($options, arguments);
5205
- }, ["esc"]))],
5206
- onClick: _cache[3] || (_cache[3] = function () {
5213
+ }, ["tab"]))],
5214
+ onClick: _cache[2] || (_cache[2] = function () {
5207
5215
  return $options.toggleDropdown && $options.toggleDropdown.apply($options, arguments);
5208
5216
  })
5209
- }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("span", _hoisted_1, [$props.dropdownOptions.showFlags ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
5217
+ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("span", _hoisted_1, [$props.dropdownOptions.showFlags ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("span", {
5210
5218
  key: 0,
5211
5219
  class: ['vti__flag', $data.activeCountryCode.toLowerCase()]
5212
5220
  }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), $props.dropdownOptions.showDialCodeInSelection ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("span", _hoisted_2, " +" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])($options.activeCountry && $options.activeCountry.dialCode), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "arrow-icon", {
@@ -5216,23 +5224,27 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5216
5224
  })]), $data.open ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("ul", {
5217
5225
  key: 0,
5218
5226
  ref: "list",
5219
- class: ["vti__dropdown-list", $data.dropdownOpenDirection]
5220
- }, [_cache[1] || (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["setBlockTracking"])(-1), _cache[1] = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])($options.sortedCountries, function (pb, index) {
5227
+ class: ["vti__dropdown-list", $data.dropdownOpenDirection],
5228
+ role: "listbox"
5229
+ }, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])($options.sortedCountries, function (pb, index) {
5221
5230
  return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("li", {
5231
+ role: "option",
5222
5232
  class: ['vti__dropdown-item', $options.getItemClass(index, pb.iso2)],
5223
5233
  key: pb.iso2 + (pb.preferred ? '-preferred' : ''),
5234
+ tabindex: "-1",
5224
5235
  onClick: function onClick($event) {
5225
5236
  return $options.choose(pb);
5226
5237
  },
5227
5238
  onMousemove: function onMousemove($event) {
5228
5239
  return $data.selectedIndex = index;
5229
- }
5230
- }, [$props.dropdownOptions.showFlags ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
5240
+ },
5241
+ "aria-selected": $data.activeCountryCode === pb.iso2 && !pb.preferred
5242
+ }, [$props.dropdownOptions.showFlags ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("span", {
5231
5243
  key: 0,
5232
5244
  class: ['vti__flag', pb.iso2.toLowerCase()]
5233
- }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("strong", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(pb.name), 1), $props.dropdownOptions.showDialCodeInList ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("span", _hoisted_4, " +" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(pb.dialCode), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 42, ["onClick", "onMousemove"]);
5234
- }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["setBlockTracking"])(1), _cache[1])], 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 42, ["tabindex"]), [[_directive_click_outside, $options.clickedOutside]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("input", {
5235
- "onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) {
5245
+ }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("strong", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(pb.name), 1), $props.dropdownOptions.showDialCodeInList ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("span", _hoisted_4, " +" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(pb.dialCode), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 42, ["onClick", "onMousemove", "aria-selected"]);
5246
+ }), 128))], 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 42, ["aria-expanded", "tabindex"]), [[_directive_click_outside, $options.clickedOutside]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("input", {
5247
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) {
5236
5248
  return $data.phone = $event;
5237
5249
  }),
5238
5250
  ref: "input",
@@ -5250,23 +5262,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5250
5262
  tabindex: $props.inputOptions.tabindex,
5251
5263
  value: $props.modelValue,
5252
5264
  "aria-describedby": $props.inputOptions['aria-describedby'],
5253
- onBlur: _cache[6] || (_cache[6] = function () {
5265
+ onBlur: _cache[7] || (_cache[7] = function () {
5254
5266
  return $options.onBlur && $options.onBlur.apply($options, arguments);
5255
5267
  }),
5256
- onFocus: _cache[7] || (_cache[7] = function () {
5268
+ onFocus: _cache[8] || (_cache[8] = function () {
5257
5269
  return $options.onFocus && $options.onFocus.apply($options, arguments);
5258
5270
  }),
5259
- onInput: _cache[8] || (_cache[8] = function () {
5271
+ onInput: _cache[9] || (_cache[9] = function () {
5260
5272
  return $options.onInput && $options.onInput.apply($options, arguments);
5261
5273
  }),
5262
- onKeyup: [_cache[9] || (_cache[9] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(function () {
5274
+ onKeyup: [_cache[10] || (_cache[10] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(function () {
5263
5275
  return $options.onEnter && $options.onEnter.apply($options, arguments);
5264
- }, ["enter"])), _cache[10] || (_cache[10] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(function () {
5276
+ }, ["enter"])), _cache[11] || (_cache[11] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(function () {
5265
5277
  return $options.onSpace && $options.onSpace.apply($options, arguments);
5266
5278
  }, ["space"]))]
5267
5279
  }, null, 42, ["type", "autocomplete", "autofocus", "disabled", "id", "maxlength", "name", "placeholder", "readonly", "required", "tabindex", "value", "aria-describedby"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelDynamic"], $data.phone]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "icon-right")], 2);
5268
5280
  }
5269
- // CONCATENATED MODULE: ./src/components/vue-tel-input.vue?vue&type=template&id=6b666c26
5281
+ // CONCATENATED MODULE: ./src/components/vue-tel-input.vue?vue&type=template&id=e63ac01c
5270
5282
 
5271
5283
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
5272
5284
  var objectWithoutProperties = __webpack_require__("15fd");
@@ -8917,6 +8929,7 @@ function getDefault(key) {
8917
8929
  }
8918
8930
 
8919
8931
  var selEle = this.$refs.list.children[this.selectedIndex];
8932
+ selEle.focus();
8920
8933
 
8921
8934
  if (selEle.offsetTop + selEle.clientHeight > this.$refs.list.scrollTop + this.$refs.list.clientHeight) {
8922
8935
  this.$refs.list.scrollTop = selEle.offsetTop - this.$refs.list.clientHeight + selEle.clientHeight;
@@ -8934,6 +8947,8 @@ function getDefault(key) {
8934
8947
 
8935
8948
  var _selEle = this.$refs.list.children[this.selectedIndex];
8936
8949
 
8950
+ _selEle.focus();
8951
+
8937
8952
  if (_selEle.offsetTop < this.$refs.list.scrollTop) {
8938
8953
  this.$refs.list.scrollTop = _selEle.offsetTop;
8939
8954
  }