@webitel/ui-sdk 0.9.30 → 0.9.34

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": "0.9.30",
3
+ "version": "0.9.34",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -8,10 +8,11 @@
8
8
  v-for="(option, index) in options"
9
9
  :key="index"
10
10
  >
11
+ <!-- <a> click.prevent prevents redirect to # -->
11
12
  <a
12
13
  class="wt-context-menu__option"
13
14
  href="#"
14
- @click="$emit('click', { option, index })"
15
+ @click.prevent="$emit('click', { option, index })"
15
16
  >
16
17
  {{ option.text || option }}
17
18
  </a>
@@ -40,6 +41,7 @@ export default {
40
41
  .wt-context-menu {
41
42
  @extend %typo-body-sm;
42
43
  min-width: var(--context-menu-min-width);
44
+ max-width: var(--context-menu-max-width);
43
45
  background-color: var(--context-menu-background-color);
44
46
  border-radius: var(--border-radius);
45
47
  box-shadow: var(--box-shadow);
@@ -22,7 +22,6 @@
22
22
  :class="{'wt-button-select__select-arrow--active': isOpened}"
23
23
  v-bind="$attrs"
24
24
  icon="arrow-down"
25
- size="sm"
26
25
  ></wt-icon>
27
26
  </wt-button>
28
27
 
@@ -42,7 +41,7 @@ export default {
42
41
  }),
43
42
  methods: {
44
43
  selectOption({ option, index }) {
45
- this.$emit('click:option', { option, index });
44
+ this.$emit('click:option', option, index);
46
45
  this.isOpened = false;
47
46
  },
48
47
  away() {
@@ -60,7 +59,7 @@ export default {
60
59
 
61
60
  .wt-context-menu {
62
61
  position: absolute;
63
- top: 100%;
62
+ top: calc(100% + 1px);
64
63
  left: 0;
65
64
  }
66
65
  }
@@ -9,7 +9,7 @@
9
9
  <input
10
10
  class="wt-search-bar__input"
11
11
  :value="value"
12
- :placeholder="placeholder"
12
+ :placeholder="searchBarPlaceholder"
13
13
  type="search"
14
14
  v-on="listeners"
15
15
  >
@@ -46,7 +46,6 @@
46
46
  */
47
47
  placeholder: {
48
48
  type: String,
49
- default: 'Search',
50
49
  },
51
50
  debounce: {
52
51
  type: Boolean,
@@ -82,6 +81,9 @@
82
81
  keyup: this.handleKeyup,
83
82
  };
84
83
  },
84
+ searchBarPlaceholder() {
85
+ return this.placeholder || this.$t('webitelUI.searchBar.placeholder');
86
+ },
85
87
  },
86
88
 
87
89
  methods: {
@@ -1,8 +1,10 @@
1
1
  .wt-context-menu {
2
+ --context-menu-min-width : 160px;
3
+ --context-menu-max-width : 300px;
4
+
2
5
  --context-menu-option-color--hover: var(--secondary-color);
3
6
 
4
7
  --context-menu-background-color: var(--main-color);
5
8
 
6
9
  --context-menu-option-padding: var(--spacing--sm);
7
- --context-menu-min-width : 150px;
8
10
  }
@@ -4,7 +4,7 @@
4
4
  Reduce 1px from "spacing--md" for align a difference between arrow size in "wt-button-select__select"
5
5
  and line-height of text in "wt-button-select__button"
6
6
  */
7
- --button-select-icon-button-padding: calc(var(--spacing--md) - 1px);
7
+ --button-select-icon-button-padding: calc(var(--spacing--sm) - 1px);
8
8
 
9
9
  --button-select-buttons-gap: 1px;
10
10
 
@@ -96,6 +96,9 @@ export default {
96
96
  url: 'Should look like url',
97
97
  },
98
98
  webitelUI: {
99
+ searchBar: {
100
+ placeholder: 'Search',
101
+ },
99
102
  timepicker: {
100
103
  hour: 'Hour:',
101
104
  min: 'Min:',
@@ -94,6 +94,9 @@ export default {
94
94
  url: 'Необходимо ввести корректный url-адрес',
95
95
  },
96
96
  webitelUI: {
97
+ searchBar: {
98
+ placeholder: 'Поиск',
99
+ },
97
100
  timepicker: {
98
101
  hour: 'Час:',
99
102
  min: 'Мин:',
@@ -94,6 +94,9 @@ export default {
94
94
  url: 'Необхідно ввести правильну url-адресу',
95
95
  },
96
96
  webitelUI: {
97
+ searchBar: {
98
+ placeholder: 'Пошук',
99
+ },
97
100
  timepicker: {
98
101
  hour: 'Год:',
99
102
  min: 'Хв:',