@dialpad/dialtone-vue 2.55.1 → 2.55.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.55.2](https://github.com/dialpad/dialtone-vue/compare/v2.55.1...v2.55.2) (2023-02-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **Combobox Multi Select:** wrong chips position while on modal ([#742](https://github.com/dialpad/dialtone-vue/issues/742)) ([6525827](https://github.com/dialpad/dialtone-vue/commit/6525827bd07a0cbebc9b0929a103329ed61f95d1))
7
+
1
8
  ## [2.55.1](https://github.com/dialpad/dialtone-vue/compare/v2.55.0...v2.55.1) (2023-02-02)
2
9
 
3
10
  # [2.55.0](https://github.com/dialpad/dialtone-vue/compare/v2.54.2...v2.55.0) (2023-02-01)
@@ -1728,7 +1728,7 @@ var update = add("5017a4ff", content, true, {"sourceMap":false,"shadowMode":fals
1728
1728
 
1729
1729
  /***/ }),
1730
1730
 
1731
- /***/ 1:
1731
+ /***/ 213:
1732
1732
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1733
1733
 
1734
1734
  // style-loader: Adds some css to the DOM by adding a <style> tag
@@ -19961,7 +19961,7 @@ const TOOLTIP_HIDE_ON_CLICK_VARIANTS = [true, false, 'toggle'];
19961
19961
  ;// CONCATENATED MODULE: ./components/tooltip/tooltip.vue?vue&type=script&lang=js&
19962
19962
  /* harmony default export */ const tooltip_tooltipvue_type_script_lang_js_ = (tooltipvue_type_script_lang_js_);
19963
19963
  // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-32[0].rules[0].use[0]!./node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??clonedRuleSet-32[0].rules[0].use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32[0].rules[0].use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32[0].rules[0].use[3]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32[0].rules[0].use[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/tooltip/tooltip.vue?vue&type=style&index=0&lang=less&
19964
- var tooltipvue_type_style_index_0_lang_less_ = __webpack_require__(1);
19964
+ var tooltipvue_type_style_index_0_lang_less_ = __webpack_require__(213);
19965
19965
  ;// CONCATENATED MODULE: ./components/tooltip/tooltip.vue?vue&type=style&index=0&lang=less&
19966
19966
 
19967
19967
  ;// CONCATENATED MODULE: ./components/tooltip/tooltip.vue
@@ -20989,11 +20989,11 @@ var combobox_with_popover_component = normalizeComponent(
20989
20989
  /* harmony default export */ const combobox_with_popover = (combobox_with_popover_component.exports);
20990
20990
  ;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_with_popover/index.js
20991
20991
 
20992
- ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=954b65b2&
20993
- var combobox_multi_selectvue_type_template_id_954b65b2_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-recipe-combobox-with-popover',{ref:"comboboxWithPopover",attrs:{"label":_vm.label,"show-list":_vm.showList,"max-height":_vm.listMaxHeight,"popover-offset":_vm.popoverOffset,"has-suggestion-list":_vm.hasSuggestionList,"visually-hidden-close-label":_vm.visuallyHiddenCloseLabel,"visually-hidden-close":_vm.visuallyHiddenClose,"content-width":"anchor"},on:{"select":_vm.onComboboxSelect},scopedSlots:_vm._u([{key:"input",fn:function(ref){
20992
+ ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=cd2212ea&
20993
+ var combobox_multi_selectvue_type_template_id_cd2212ea_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-recipe-combobox-with-popover',{ref:"comboboxWithPopover",attrs:{"label":_vm.label,"show-list":_vm.showList,"max-height":_vm.listMaxHeight,"popover-offset":_vm.popoverOffset,"has-suggestion-list":_vm.hasSuggestionList,"visually-hidden-close-label":_vm.visuallyHiddenCloseLabel,"visually-hidden-close":_vm.visuallyHiddenClose,"content-width":"anchor"},on:{"select":_vm.onComboboxSelect},scopedSlots:_vm._u([{key:"input",fn:function(ref){
20994
20994
  var onInput = ref.onInput;
20995
20995
  return [_c('span',{ref:"inputSlotWrapper",staticClass:"d-ps-relative d-d-block"},[_c('span',{ref:"chipsWrapper",staticClass:"d-ps-absolute d-mx2"},_vm._l((_vm.selectedItems),function(item){return _c('dt-chip',_vm._g({key:item.id,ref:"chips",refInFor:true,class:['d-mt4', 'd-mx2', 'd-zi-base1'],attrs:{"label-class":['d-chip__label'],"close-button-props":{ ariaLabel: 'close' },"size":_vm.CHIP_SIZES[_vm.size]},on:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"backspace",undefined,$event.key,undefined)){ return null; }return _vm.onChipRemove(item)},"close":function($event){return _vm.onChipRemove(item)}}},_vm.chipListeners),[_vm._v(" "+_vm._s(item)+" ")])}),1),_c('dt-input',_vm._g({ref:"input",staticClass:"d-fl-grow1",attrs:{"aria-label":_vm.label,"label":_vm.labelVisible ? _vm.label : '',"description":_vm.description,"placeholder":_vm.inputPlaceHolder,"show-messages":_vm.showInputMessages,"messages":_vm.inputMessages,"size":_vm.size},on:{"input":onInput},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}},_vm.inputListeners)),_c('dt-validation-messages',{attrs:{"validation-messages":_vm.maxSelectedMessage,"show-messages":_vm.showValidationMessages}})],1)]}},{key:"header",fn:function(){return [(_vm.$slots.header)?_c('div',{ref:"header"},[_vm._t("header")],2):_vm._e()]},proxy:true},{key:"list",fn:function(){return [_c('div',{ref:"list",on:{"mousedown":function($event){$event.preventDefault();}}},[(!_vm.loading)?_vm._t("list"):_c('div',{staticClass:"d-ta-center d-py16"},[_vm._v(" "+_vm._s(_vm.loadingMessage)+" ")])],2)]},proxy:true},{key:"footer",fn:function(){return [(_vm.$slots.footer)?_c('div',{ref:"footer"},[_vm._t("footer")],2):_vm._e()]},proxy:true}],null,true)})}
20996
- var combobox_multi_selectvue_type_template_id_954b65b2_staticRenderFns = []
20996
+ var combobox_multi_selectvue_type_template_id_cd2212ea_staticRenderFns = []
20997
20997
 
20998
20998
 
20999
20999
  ;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js
@@ -21099,9 +21099,9 @@ const CHIP_SIZES = {
21099
21099
  md: 'sm'
21100
21100
  };
21101
21101
  const CHIP_TOP_POSITION = {
21102
- xs: 11.1,
21103
- sm: 10.1,
21104
- md: 10.1
21102
+ xs: 1.4,
21103
+ sm: 0.4,
21104
+ md: 0.2
21105
21105
  };
21106
21106
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=script&lang=js&
21107
21107
  //
@@ -21454,7 +21454,7 @@ const CHIP_TOP_POSITION = {
21454
21454
  async handler() {
21455
21455
  await this.$nextTick();
21456
21456
  this.setInputPadding();
21457
- this.setChipsPosition();
21457
+ this.setChipsTopPosition();
21458
21458
  this.setInputMinWidth();
21459
21459
  this.checkMaxSelected();
21460
21460
  }
@@ -21464,13 +21464,13 @@ const CHIP_TOP_POSITION = {
21464
21464
  async label() {
21465
21465
  await this.$nextTick(); // Adjust the chips position if label changed
21466
21466
 
21467
- this.setChipsPosition();
21467
+ this.setChipsTopPosition();
21468
21468
  },
21469
21469
 
21470
21470
  async description() {
21471
21471
  await this.$nextTick(); // Adjust the chips position if description changed
21472
21472
 
21473
- this.setChipsPosition();
21473
+ this.setChipsTopPosition();
21474
21474
  },
21475
21475
 
21476
21476
  size: {
@@ -21480,6 +21480,7 @@ const CHIP_TOP_POSITION = {
21480
21480
  this.revertInputPadding(input);
21481
21481
  this.originalInputSize = input.getBoundingClientRect().height;
21482
21482
  this.setInputPadding();
21483
+ this.setChipsTopPosition();
21483
21484
  },
21484
21485
 
21485
21486
  immediate: true
@@ -21487,10 +21488,9 @@ const CHIP_TOP_POSITION = {
21487
21488
  },
21488
21489
 
21489
21490
  mounted() {
21490
- this.setChipsPosition(); // Recalculate chip position and input padding when resizing window
21491
-
21492
- this.resizeWindowObserver = new ResizeObserver(() => {
21493
- this.setChipsPosition();
21491
+ // Recalculate chip position and input padding when resizing window
21492
+ this.resizeWindowObserver = new ResizeObserver(async () => {
21493
+ this.setChipsTopPosition();
21494
21494
  this.setInputPadding();
21495
21495
  });
21496
21496
  this.resizeWindowObserver.observe(document.body);
@@ -21612,10 +21612,15 @@ const CHIP_TOP_POSITION = {
21612
21612
  this.closeComboboxList();
21613
21613
  },
21614
21614
 
21615
- setChipsPosition() {
21616
- const input = this.getInput().getBoundingClientRect();
21615
+ setChipsTopPosition() {
21616
+ // To place the chips in the input box
21617
+ // The chip "top" position should be the same line as the input box
21618
+ const input = this.getInput();
21619
+ if (!input) return;
21620
+ const inputSlotWrapper = this.$refs.inputSlotWrapper;
21621
+ const top = input.getBoundingClientRect().top - inputSlotWrapper.getBoundingClientRect().top;
21617
21622
  const chipsWrapper = this.$refs.chipsWrapper;
21618
- chipsWrapper.style.top = input.top - CHIP_TOP_POSITION[this.size] + 'px';
21623
+ chipsWrapper.style.top = top - CHIP_TOP_POSITION[this.size] + 'px';
21619
21624
  },
21620
21625
 
21621
21626
  setInputPadding() {
@@ -21690,8 +21695,8 @@ const CHIP_TOP_POSITION = {
21690
21695
  ;
21691
21696
  var combobox_multi_select_component = normalizeComponent(
21692
21697
  combobox_multi_select_combobox_multi_selectvue_type_script_lang_js_,
21693
- combobox_multi_selectvue_type_template_id_954b65b2_render,
21694
- combobox_multi_selectvue_type_template_id_954b65b2_staticRenderFns,
21698
+ combobox_multi_selectvue_type_template_id_cd2212ea_render,
21699
+ combobox_multi_selectvue_type_template_id_cd2212ea_staticRenderFns,
21695
21700
  false,
21696
21701
  null,
21697
21702
  null,
@@ -20999,11 +20999,11 @@ var combobox_with_popover_component = normalizeComponent(
20999
20999
  /* harmony default export */ const combobox_with_popover = (combobox_with_popover_component.exports);
21000
21000
  ;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_with_popover/index.js
21001
21001
 
21002
- ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=954b65b2&
21003
- var combobox_multi_selectvue_type_template_id_954b65b2_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-recipe-combobox-with-popover',{ref:"comboboxWithPopover",attrs:{"label":_vm.label,"show-list":_vm.showList,"max-height":_vm.listMaxHeight,"popover-offset":_vm.popoverOffset,"has-suggestion-list":_vm.hasSuggestionList,"visually-hidden-close-label":_vm.visuallyHiddenCloseLabel,"visually-hidden-close":_vm.visuallyHiddenClose,"content-width":"anchor"},on:{"select":_vm.onComboboxSelect},scopedSlots:_vm._u([{key:"input",fn:function(ref){
21002
+ ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=cd2212ea&
21003
+ var combobox_multi_selectvue_type_template_id_cd2212ea_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-recipe-combobox-with-popover',{ref:"comboboxWithPopover",attrs:{"label":_vm.label,"show-list":_vm.showList,"max-height":_vm.listMaxHeight,"popover-offset":_vm.popoverOffset,"has-suggestion-list":_vm.hasSuggestionList,"visually-hidden-close-label":_vm.visuallyHiddenCloseLabel,"visually-hidden-close":_vm.visuallyHiddenClose,"content-width":"anchor"},on:{"select":_vm.onComboboxSelect},scopedSlots:_vm._u([{key:"input",fn:function(ref){
21004
21004
  var onInput = ref.onInput;
21005
21005
  return [_c('span',{ref:"inputSlotWrapper",staticClass:"d-ps-relative d-d-block"},[_c('span',{ref:"chipsWrapper",staticClass:"d-ps-absolute d-mx2"},_vm._l((_vm.selectedItems),function(item){return _c('dt-chip',_vm._g({key:item.id,ref:"chips",refInFor:true,class:['d-mt4', 'd-mx2', 'd-zi-base1'],attrs:{"label-class":['d-chip__label'],"close-button-props":{ ariaLabel: 'close' },"size":_vm.CHIP_SIZES[_vm.size]},on:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"backspace",undefined,$event.key,undefined)){ return null; }return _vm.onChipRemove(item)},"close":function($event){return _vm.onChipRemove(item)}}},_vm.chipListeners),[_vm._v(" "+_vm._s(item)+" ")])}),1),_c('dt-input',_vm._g({ref:"input",staticClass:"d-fl-grow1",attrs:{"aria-label":_vm.label,"label":_vm.labelVisible ? _vm.label : '',"description":_vm.description,"placeholder":_vm.inputPlaceHolder,"show-messages":_vm.showInputMessages,"messages":_vm.inputMessages,"size":_vm.size},on:{"input":onInput},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}},_vm.inputListeners)),_c('dt-validation-messages',{attrs:{"validation-messages":_vm.maxSelectedMessage,"show-messages":_vm.showValidationMessages}})],1)]}},{key:"header",fn:function(){return [(_vm.$slots.header)?_c('div',{ref:"header"},[_vm._t("header")],2):_vm._e()]},proxy:true},{key:"list",fn:function(){return [_c('div',{ref:"list",on:{"mousedown":function($event){$event.preventDefault();}}},[(!_vm.loading)?_vm._t("list"):_c('div',{staticClass:"d-ta-center d-py16"},[_vm._v(" "+_vm._s(_vm.loadingMessage)+" ")])],2)]},proxy:true},{key:"footer",fn:function(){return [(_vm.$slots.footer)?_c('div',{ref:"footer"},[_vm._t("footer")],2):_vm._e()]},proxy:true}],null,true)})}
21006
- var combobox_multi_selectvue_type_template_id_954b65b2_staticRenderFns = []
21006
+ var combobox_multi_selectvue_type_template_id_cd2212ea_staticRenderFns = []
21007
21007
 
21008
21008
 
21009
21009
  ;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js
@@ -21109,9 +21109,9 @@ const CHIP_SIZES = {
21109
21109
  md: 'sm'
21110
21110
  };
21111
21111
  const CHIP_TOP_POSITION = {
21112
- xs: 11.1,
21113
- sm: 10.1,
21114
- md: 10.1
21112
+ xs: 1.4,
21113
+ sm: 0.4,
21114
+ md: 0.2
21115
21115
  };
21116
21116
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-80[0].rules[0].use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=script&lang=js&
21117
21117
  //
@@ -21464,7 +21464,7 @@ const CHIP_TOP_POSITION = {
21464
21464
  async handler() {
21465
21465
  await this.$nextTick();
21466
21466
  this.setInputPadding();
21467
- this.setChipsPosition();
21467
+ this.setChipsTopPosition();
21468
21468
  this.setInputMinWidth();
21469
21469
  this.checkMaxSelected();
21470
21470
  }
@@ -21474,13 +21474,13 @@ const CHIP_TOP_POSITION = {
21474
21474
  async label() {
21475
21475
  await this.$nextTick(); // Adjust the chips position if label changed
21476
21476
 
21477
- this.setChipsPosition();
21477
+ this.setChipsTopPosition();
21478
21478
  },
21479
21479
 
21480
21480
  async description() {
21481
21481
  await this.$nextTick(); // Adjust the chips position if description changed
21482
21482
 
21483
- this.setChipsPosition();
21483
+ this.setChipsTopPosition();
21484
21484
  },
21485
21485
 
21486
21486
  size: {
@@ -21490,6 +21490,7 @@ const CHIP_TOP_POSITION = {
21490
21490
  this.revertInputPadding(input);
21491
21491
  this.originalInputSize = input.getBoundingClientRect().height;
21492
21492
  this.setInputPadding();
21493
+ this.setChipsTopPosition();
21493
21494
  },
21494
21495
 
21495
21496
  immediate: true
@@ -21497,10 +21498,9 @@ const CHIP_TOP_POSITION = {
21497
21498
  },
21498
21499
 
21499
21500
  mounted() {
21500
- this.setChipsPosition(); // Recalculate chip position and input padding when resizing window
21501
-
21502
- this.resizeWindowObserver = new ResizeObserver(() => {
21503
- this.setChipsPosition();
21501
+ // Recalculate chip position and input padding when resizing window
21502
+ this.resizeWindowObserver = new ResizeObserver(async () => {
21503
+ this.setChipsTopPosition();
21504
21504
  this.setInputPadding();
21505
21505
  });
21506
21506
  this.resizeWindowObserver.observe(document.body);
@@ -21622,10 +21622,15 @@ const CHIP_TOP_POSITION = {
21622
21622
  this.closeComboboxList();
21623
21623
  },
21624
21624
 
21625
- setChipsPosition() {
21626
- const input = this.getInput().getBoundingClientRect();
21625
+ setChipsTopPosition() {
21626
+ // To place the chips in the input box
21627
+ // The chip "top" position should be the same line as the input box
21628
+ const input = this.getInput();
21629
+ if (!input) return;
21630
+ const inputSlotWrapper = this.$refs.inputSlotWrapper;
21631
+ const top = input.getBoundingClientRect().top - inputSlotWrapper.getBoundingClientRect().top;
21627
21632
  const chipsWrapper = this.$refs.chipsWrapper;
21628
- chipsWrapper.style.top = input.top - CHIP_TOP_POSITION[this.size] + 'px';
21633
+ chipsWrapper.style.top = top - CHIP_TOP_POSITION[this.size] + 'px';
21629
21634
  },
21630
21635
 
21631
21636
  setInputPadding() {
@@ -21700,8 +21705,8 @@ const CHIP_TOP_POSITION = {
21700
21705
  ;
21701
21706
  var combobox_multi_select_component = normalizeComponent(
21702
21707
  combobox_multi_select_combobox_multi_selectvue_type_script_lang_js_,
21703
- combobox_multi_selectvue_type_template_id_954b65b2_render,
21704
- combobox_multi_selectvue_type_template_id_954b65b2_staticRenderFns,
21708
+ combobox_multi_selectvue_type_template_id_cd2212ea_render,
21709
+ combobox_multi_selectvue_type_template_id_cd2212ea_staticRenderFns,
21705
21710
  false,
21706
21711
  null,
21707
21712
  null,