adata-ui 0.1.21 → 0.1.22
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/dist/adata-ui.common.js +18 -23
- package/dist/adata-ui.common.js.map +1 -1
- package/dist/adata-ui.umd.js +18 -23
- package/dist/adata-ui.umd.js.map +1 -1
- package/dist/adata-ui.umd.min.js +1 -1
- package/dist/adata-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Header/Header.vue +3 -1
- package/src/components/SearchTextField/SearchTextField.stories.js +3 -8
- package/src/components/SearchTextField/SearchTextField.vue +2 -9
- package/src/components/index.js +1 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<header class="a-header" :class="[{'bordered': isBordered}, {'fixed': isFixed}]">
|
|
2
|
+
<header v-if="windowOpen" class="a-header" :class="[{'bordered': isBordered}, {'fixed': isFixed}]">
|
|
3
3
|
<div class="container">
|
|
4
4
|
<div class="a-header__left">
|
|
5
5
|
<a class="logo" :href="toAdtdev('https://adata.kz')">
|
|
@@ -130,6 +130,7 @@ export default {
|
|
|
130
130
|
data() {
|
|
131
131
|
return {
|
|
132
132
|
profileDropDown,
|
|
133
|
+
windowOpen: false,
|
|
133
134
|
subheaderItems: [
|
|
134
135
|
{
|
|
135
136
|
id: 1,
|
|
@@ -156,6 +157,7 @@ export default {
|
|
|
156
157
|
};
|
|
157
158
|
},
|
|
158
159
|
mounted() {
|
|
160
|
+
this.windowOpen = true;
|
|
159
161
|
this.setBalance(this.balance);
|
|
160
162
|
},
|
|
161
163
|
computed: {
|
|
@@ -4,19 +4,14 @@ export default {
|
|
|
4
4
|
title: 'SearchTextField',
|
|
5
5
|
component: ASearchTextField,
|
|
6
6
|
data: () => ({ value: "" }),
|
|
7
|
-
|
|
8
|
-
inputHandle(val) {
|
|
9
|
-
console.log(val);
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
template: "<a-search-text-field v-model='value' @input='inputHandle' label='Example'></a-search-text-field>>"
|
|
7
|
+
template: "<a-search-text-field @input='(val) => {this.value = val}' label='Example'></a-search-text-field>>"
|
|
13
8
|
}
|
|
14
9
|
|
|
10
|
+
|
|
15
11
|
const Template = (args, { argTypes }) => ({
|
|
16
12
|
components: { ASearchTextField },
|
|
17
13
|
props: Object.keys(argTypes),
|
|
18
|
-
|
|
19
|
-
template: '<a-search-text-field v-model="val" v-bind="$props"></a-search-text-field>'
|
|
14
|
+
template: '<a-search-text-field v-bind="$props"></a-search-text-field>'
|
|
20
15
|
})
|
|
21
16
|
|
|
22
17
|
export const WithIcon = Template.bind({});
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
:type="type"
|
|
11
11
|
:value="value"
|
|
12
12
|
required
|
|
13
|
-
@input="
|
|
14
|
-
@keydown="handleKeyDown"
|
|
13
|
+
@input="$emit('input', $event.target.value)"
|
|
15
14
|
@keypress.enter="$emit('enterPressed')"
|
|
16
15
|
@focus="showAutocomplete = true"
|
|
17
16
|
@click="$emit('showVTour')"
|
|
@@ -91,6 +90,7 @@ export default {
|
|
|
91
90
|
value: {
|
|
92
91
|
type: String,
|
|
93
92
|
required: true,
|
|
93
|
+
default: ""
|
|
94
94
|
},
|
|
95
95
|
clearable: {
|
|
96
96
|
type: Boolean,
|
|
@@ -179,13 +179,6 @@ export default {
|
|
|
179
179
|
autocompleteOption.setAttribute("id", 'searchVariant');
|
|
180
180
|
return autocompleteOption.innerText;
|
|
181
181
|
},
|
|
182
|
-
handleKeyDown(e) {
|
|
183
|
-
if (+e.keyCode === 9) this.showAutocomplete = false;
|
|
184
|
-
const specialKeys = [8, 188, 190, 110] // 8 - Backspace, 188 - ",", 190 and 110 - "."
|
|
185
|
-
const charCode = e.keyCode
|
|
186
|
-
if ((charCode >= 48 && charCode <= 57) || (charCode >= 96 && charCode <= 105) || specialKeys.indexOf(charCode) !== -1) return;
|
|
187
|
-
else e.preventDefault()
|
|
188
|
-
},
|
|
189
182
|
inputHandler(e) {
|
|
190
183
|
this.$emit('input', e.target.value);
|
|
191
184
|
this.showAutocomplete = true;
|
package/src/components/index.js
CHANGED