@carbon/vue 2.24.0 → 2.24.1

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.
@@ -23374,8 +23374,8 @@ var component = Object(componentNormalizer["a" /* default */])(
23374
23374
  // ESM COMPAT FLAG
23375
23375
  __webpack_require__.r(__webpack_exports__);
23376
23376
 
23377
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4767fa4f-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/cv-dropdown/cv-dropdown.vue?vue&type=template&id=0ad427d1&
23378
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:{ 'bx--form-item': _vm.formItem }},[_c('div',{staticClass:"bx--dropdown__wrapper",class:{ 'bx--dropdown__wrapper--inline': _vm.inline, 'cv-dropdown': !_vm.formItem },style:(_vm.wrapperStyleOverride)},[(_vm.label)?_c('span',{staticClass:"bx--label",class:{ 'bx--label--disabled': _vm.disabled },attrs:{"id":(_vm.uid + "-label")}},[_vm._v(_vm._s(_vm.label))]):_vm._e(),(!_vm.inline && _vm.isHelper)?_c('div',{staticClass:"bx--form__helper-text",class:{ 'bx--form__helper-text--disabled': _vm.disabled },attrs:{"aria-disabled":_vm.disabled}},[_vm._t("helper-text",[_vm._v(_vm._s(_vm.helperText))])],2):_vm._e(),_c('div',_vm._b({staticClass:"bx--dropdown",class:{
23377
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4767fa4f-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/cv-dropdown/cv-dropdown.vue?vue&type=template&id=2c47caf7&
23378
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:{ 'bx--form-item': _vm.formItem }},[_c('div',{staticClass:"bx--dropdown__wrapper",class:{ 'bx--dropdown__wrapper--inline': _vm.inline, 'cv-dropdown': !_vm.formItem },style:(_vm.wrapperStyleOverride)},[(_vm.label)?_c('span',{staticClass:"bx--label",class:{ 'bx--label--disabled': _vm.disabled },attrs:{"id":(_vm.uid + "-label")}},[_vm._v("\n "+_vm._s(_vm.label)+"\n ")]):_vm._e(),(!_vm.inline && _vm.isHelper)?_c('div',{staticClass:"bx--form__helper-text",class:{ 'bx--form__helper-text--disabled': _vm.disabled },attrs:{"aria-disabled":_vm.disabled}},[_vm._t("helper-text",[_vm._v(_vm._s(_vm.helperText))])],2):_vm._e(),_c('div',_vm._b({staticClass:"bx--dropdown",class:{
23379
23379
  'bx--dropdown--light': _vm.theme === 'light',
23380
23380
  'bx--dropdown--up': _vm.up,
23381
23381
  'bx--dropdown--open': _vm.open,
@@ -23383,11 +23383,11 @@ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._sel
23383
23383
  'bx--dropdown--disabled': _vm.disabled,
23384
23384
  'bx--dropdown--inline': _vm.inline,
23385
23385
  'bx--dropdown--show-selected': !_vm.hideSelected,
23386
- },attrs:{"data-dropdown":"","data-value":_vm.internalValue,"data-invalid":_vm.isInvalid},on:{"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }$event.preventDefault();return _vm.onDown($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }$event.preventDefault();return _vm.onUp($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }$event.preventDefault();return _vm.onClick($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }$event.preventDefault();return _vm.onEsc($event)}],"click":_vm.onClick}},'div',_vm.$attrs,false),[_c('button',{staticClass:"bx--dropdown-text",attrs:{"aria-haspopup":"true","aria-expanded":_vm.open,"aria-controls":(_vm.uid + "-menu"),"aria-labelledby":(_vm.uid + "-label " + _vm.uid + "-value"),"type":"button"}},[(_vm.isInvalid && _vm.inline)?_c('WarningFilled16',{staticClass:"bx--dropdown__invalid-icon"}):_vm._e(),_c('span',{staticClass:"bx--dropdown-text__inner",attrs:{"id":(_vm.uid + "-value")}},[_vm._v(_vm._s(_vm.internalCaption))]),_c('span',{staticClass:"bx--dropdown__arrow-container"},[_c('span',{staticClass:"bx--dropdown__arrow",style:(_vm.chevronStyleOveride)},[_c('chevron-down-glyph')],1)])],1),_c('ul',{staticClass:"bx--dropdown-list",attrs:{"id":(_vm.uid + "-menu"),"role":"menu","aria-hidden":!_vm.open,"wh-menu-anchor":"left","aria-labelledby":(_vm.uid + "-label")}},[_vm._t("default")],2)]),(_vm.isInvalid && _vm.inline)?_c('div',{staticClass:"bx--form-requirement"},[_vm._t("invalid-message",[_vm._v(_vm._s(_vm.invalidMessage))])],2):_vm._e()]),(_vm.isInvalid && !_vm.inline)?_c('div',{staticClass:"bx--form-requirement"},[_vm._t("invalid-message",[_vm._v(_vm._s(_vm.invalidMessage))])],2):_vm._e()])}
23386
+ },attrs:{"data-dropdown":"","data-value":_vm.internalValue,"data-invalid":_vm.isInvalid},on:{"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }$event.preventDefault();return _vm.onDown($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }$event.preventDefault();return _vm.onUp($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }$event.preventDefault();return _vm.onClick($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }$event.preventDefault();return _vm.onEsc($event)}],"click":_vm.onClick}},'div',_vm.$attrs,false),[_c('button',{staticClass:"bx--dropdown-text",attrs:{"aria-haspopup":"true","aria-expanded":_vm.open,"aria-controls":(_vm.uid + "-menu"),"aria-labelledby":(_vm.uid + "-label " + _vm.uid + "-value"),"type":"button"}},[(_vm.isInvalid && _vm.inline)?_c('WarningFilled16',{staticClass:"bx--dropdown__invalid-icon"}):_vm._e(),_c('span',{staticClass:"bx--dropdown-text__inner",attrs:{"id":(_vm.uid + "-value"),"data-test":"internalCaption"},domProps:{"innerHTML":_vm._s(_vm.internalCaption)}}),_c('span',{staticClass:"bx--dropdown__arrow-container"},[_c('span',{staticClass:"bx--dropdown__arrow",style:(_vm.chevronStyleOveride)},[_c('chevron-down-glyph')],1)])],1),_c('ul',{ref:"droplist",staticClass:"bx--dropdown-list",attrs:{"id":(_vm.uid + "-menu"),"role":"menu","aria-hidden":!_vm.open,"wh-menu-anchor":"left","aria-labelledby":(_vm.uid + "-label")}},[_vm._t("default")],2)]),(_vm.isInvalid && _vm.inline)?_c('div',{staticClass:"bx--form-requirement"},[_vm._t("invalid-message",[_vm._v(_vm._s(_vm.invalidMessage))])],2):_vm._e()]),(_vm.isInvalid && !_vm.inline)?_c('div',{staticClass:"bx--form-requirement"},[_vm._t("invalid-message",[_vm._v(_vm._s(_vm.invalidMessage))])],2):_vm._e()])}
23387
23387
  var staticRenderFns = []
23388
23388
 
23389
23389
 
23390
- // CONCATENATED MODULE: ./src/components/cv-dropdown/cv-dropdown.vue?vue&type=template&id=0ad427d1&
23390
+ // CONCATENATED MODULE: ./src/components/cv-dropdown/cv-dropdown.vue?vue&type=template&id=2c47caf7&
23391
23391
 
23392
23392
  // EXTERNAL MODULE: ./src/mixins/theme-mixin.js
23393
23393
  var theme_mixin = __webpack_require__("d43c");
@@ -23497,6 +23497,12 @@ var chevron_down = __webpack_require__("fa89");
23497
23497
  //
23498
23498
  //
23499
23499
  //
23500
+ //
23501
+ //
23502
+ //
23503
+ //
23504
+ //
23505
+ //
23500
23506
 
23501
23507
 
23502
23508
 
@@ -23685,8 +23691,13 @@ var chevron_down = __webpack_require__("fa89");
23685
23691
  this.$el.focus();
23686
23692
  }
23687
23693
 
23688
- if (ev.target.classList.contains('bx--dropdown-link')) {
23689
- const targetItemEl = ev.target.parentNode;
23694
+ let target = ev.target;
23695
+ while (!target.classList.contains('bx--dropdown-link') && this.$refs.droplist.contains(target)) {
23696
+ target = target.parentNode; // try next one up
23697
+ }
23698
+
23699
+ if (target.classList.contains('bx--dropdown-link')) {
23700
+ const targetItemEl = target.parentNode;
23690
23701
  const newValue = targetItemEl.getAttribute('data-value');
23691
23702
 
23692
23703
  this.internalValue = newValue;