@webitel/ui-sdk 2.0.4 → 2.0.5-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "2.0.4",
3
+ "version": "2.0.5-2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -6,7 +6,7 @@
6
6
  placement="bottom-end"
7
7
  >
8
8
  <slot name="activator"></slot>
9
- <template #popper>
9
+ <template #popper="{ hide }">
10
10
  <ul class="wt-context-menu__menu">
11
11
  <li
12
12
  class="wt-context-menu__option-wrapper"
@@ -17,7 +17,7 @@
17
17
  <a
18
18
  class="wt-context-menu__option"
19
19
  href="#"
20
- @click.prevent="$emit('click', { option, index })"
20
+ @click.prevent="handleOptionClick({ option, index, hide })"
21
21
  >
22
22
  {{ option.text || option }}
23
23
  </a>
@@ -38,13 +38,23 @@ export default {
38
38
  },
39
39
  visible: {
40
40
  type: Boolean,
41
- default: true,
41
+ default: false,
42
+ },
43
+ },
44
+ methods: {
45
+ handleOptionClick({ option, index, hide }) {
46
+ this.$emit('click', { option, index });
47
+ hide();
42
48
  },
43
49
  },
44
50
  };
45
51
  </script>
46
52
 
47
53
  <style lang="scss" scoped>
54
+ .wt-context-menu {
55
+ line-height: 0;
56
+ }
57
+
48
58
  .wt-context-menu__menu {
49
59
  @extend %typo-body-2;
50
60
  min-width: var(--context-menu-min-width);
@@ -223,6 +223,7 @@ export default {
223
223
  const inputEl = this.$refs['wt-input'];
224
224
  const defaultInputPadding = getComputedStyle(document.documentElement)
225
225
  .getPropertyValue('--input-padding');
226
+ console.info('ipnut:', defaultInputPadding, afterWrapperWidth, defaultInputPadding*2+afterWrapperWidth);
226
227
  inputEl.style.paddingRight = `calc(${defaultInputPadding} * 2 + ${afterWrapperWidth}px)`;
227
228
  },
228
229
  },