@webitel/ui-sdk 24.2.53 → 24.2.55

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": "24.2.53",
3
+ "version": "24.2.55",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -39,6 +39,32 @@
39
39
  >
40
40
  {{ hint }}
41
41
  </wt-hint>
42
+
43
+ <wt-context-menu
44
+ v-if="searchMode"
45
+ :options="searchModeOptions"
46
+ @click="emit('change:search-mode', $event.option)"
47
+ >
48
+ <template #activator>
49
+ <wt-tooltip>
50
+ <template #activator>
51
+ <wt-icon-btn
52
+ :color="invalid ? 'error' : 'default'"
53
+ icon="filter"
54
+ />
55
+ </template>
56
+ {{ $t('webitelUI.searchBar.settingsHint') }}
57
+ </wt-tooltip>
58
+ </template>
59
+ <template #option="{ value, text }">
60
+ <wt-radio
61
+ :label="text"
62
+ :selected="searchMode.value === value"
63
+ :value="true"
64
+ />
65
+ </template>
66
+ </wt-context-menu>
67
+
42
68
  <slot
43
69
  :invalid="invalid"
44
70
  name="additional-actions"
@@ -78,12 +104,20 @@ const props = defineProps({
78
104
  type: String,
79
105
  description: 'Adds hint icon + tooltip with text, passed as "hint" prop',
80
106
  },
107
+ searchMode: {
108
+ type: String,
109
+ },
110
+ searchModeOptions: {
111
+ type: Array,
112
+ default: () => ([]),
113
+ },
81
114
  });
82
115
 
83
116
  const emit = defineEmits([
84
117
  'input',
85
118
  'search',
86
119
  'enter',
120
+ 'change:search-mode',
87
121
  ]);
88
122
 
89
123
  const { v, customValidators } = toRefs(props);
@@ -1,10 +1,15 @@
1
1
  <template>
2
- <nav class="wt-tabs">
2
+ <nav
3
+ class="wt-tabs"
4
+ :class="{
5
+ 'wt-tabs--wide': wide,
6
+ }"
7
+ >
3
8
  <button
4
9
  v-for="(tab) in tabs"
5
10
  :key="tab.value"
6
11
  :class="{
7
- 'wt-tab--highlight': tab.value === current.value
12
+ 'wt-tab--highlight': tab.value === current.value,
8
13
  }"
9
14
  :value="tab.text"
10
15
  class="wt-tab"
@@ -48,6 +53,10 @@ export default {
48
53
  type: Array,
49
54
  default: () => [],
50
55
  },
56
+ wide: {
57
+ type: Boolean,
58
+ default: false,
59
+ },
51
60
  },
52
61
  emits: [
53
62
  'change',
@@ -85,6 +94,13 @@ export default {
85
94
  display: flex;
86
95
  flex-wrap: nowrap;
87
96
  gap: var(--tab-gap);
97
+
98
+ &--wide {
99
+ .wt-tab {
100
+ display: block;
101
+ width: 100%;
102
+ }
103
+ }
88
104
  }
89
105
 
90
106
  .wt-tab {