@dataloop-ai/components 0.14.4 → 0.14.6
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
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
:class="classes"
|
|
16
16
|
:style="styles"
|
|
17
17
|
>
|
|
18
|
-
<draggable-upper
|
|
18
|
+
<draggable-upper
|
|
19
|
+
v-if="draggable"
|
|
20
|
+
@move="movePopup"
|
|
21
|
+
/>
|
|
19
22
|
<popup-header
|
|
20
23
|
:title="title"
|
|
21
24
|
:additional-info="additionalInfo"
|
|
@@ -157,7 +160,8 @@ export default defineComponent({
|
|
|
157
160
|
maxHeight: { type: String, default: 'auto' },
|
|
158
161
|
maxWidth: { type: String, default: 'auto' },
|
|
159
162
|
height: { type: String, default: 'auto' },
|
|
160
|
-
width: { type: String, default: 'auto' }
|
|
163
|
+
width: { type: String, default: 'auto' },
|
|
164
|
+
draggable: Boolean
|
|
161
165
|
},
|
|
162
166
|
emits: [
|
|
163
167
|
'hide-button-click',
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
|
|
29
29
|
th:first-child,
|
|
30
30
|
td:first-child {
|
|
31
|
-
padding-left:
|
|
31
|
+
padding-left: 8px;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
th:last-child,
|
|
35
35
|
td:last-child {
|
|
36
|
-
padding-right:
|
|
36
|
+
padding-right: 8px;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
thead tr {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
text-overflow: ellipsis;
|
|
56
56
|
white-space: nowrap;
|
|
57
57
|
overflow: hidden;
|
|
58
|
-
padding: 10px
|
|
58
|
+
padding: 10px 8px;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
th {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
:disabled="disabled"
|
|
14
14
|
:class="!enableResize ? 'textarea-disable-resize' : ''"
|
|
15
15
|
@input="onChange"
|
|
16
|
+
@keydown="onKeydown"
|
|
16
17
|
@focus="onFocus"
|
|
17
18
|
@blur="onBlur"
|
|
18
19
|
/>
|
|
@@ -63,7 +64,7 @@ export default defineComponent({
|
|
|
63
64
|
default: false
|
|
64
65
|
}
|
|
65
66
|
},
|
|
66
|
-
emits: ['input', 'focus', 'blur', 'update:model-value'],
|
|
67
|
+
emits: ['input', 'focus', 'blur', 'update:model-value', 'keydown'],
|
|
67
68
|
data() {
|
|
68
69
|
return {
|
|
69
70
|
uuid: `dl-text-area-${v4()}`
|
|
@@ -81,6 +82,9 @@ export default defineComponent({
|
|
|
81
82
|
this.$emit('input', e.target.value, e)
|
|
82
83
|
this.$emit('update:model-value', e.target.value)
|
|
83
84
|
},
|
|
85
|
+
onKeydown(e: KeyboardEvent) {
|
|
86
|
+
this.$emit('keydown', e)
|
|
87
|
+
},
|
|
84
88
|
onFocus(e: InputEvent) {
|
|
85
89
|
this.$emit('focus', e)
|
|
86
90
|
},
|
|
@@ -104,8 +108,8 @@ export default defineComponent({
|
|
|
104
108
|
display: flex;
|
|
105
109
|
flex-direction: column;
|
|
106
110
|
align-items: flex-end;
|
|
107
|
-
width:
|
|
108
|
-
max-width:
|
|
111
|
+
width: 100%;
|
|
112
|
+
max-width: var(--dl-textarea-width);
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
.textarea {
|
|
@@ -115,13 +119,14 @@ export default defineComponent({
|
|
|
115
119
|
padding: 10px;
|
|
116
120
|
font-family: 'Roboto', sans-serif;
|
|
117
121
|
font-size: var(--dl-font-size-body);
|
|
118
|
-
width:
|
|
122
|
+
width: 100%;
|
|
119
123
|
min-width: 100px;
|
|
120
124
|
max-width: 100%;
|
|
121
125
|
min-height: 80px;
|
|
122
126
|
max-height: 120px;
|
|
123
127
|
outline: none;
|
|
124
128
|
color: var(--dl-color-darker);
|
|
129
|
+
box-sizing: border-box;
|
|
125
130
|
|
|
126
131
|
&:hover {
|
|
127
132
|
border-color: var(--dl-color-hover);
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
2
|
+
<div style="width: 800px">
|
|
3
|
+
<div style="max-width: 500px; width: 100%">
|
|
4
|
+
<dl-text-area
|
|
5
|
+
v-model="textAreaValue"
|
|
6
|
+
placeholder="Type your text..."
|
|
7
|
+
show-counter
|
|
8
|
+
:max-length="20"
|
|
9
|
+
enable-resize
|
|
10
|
+
@keydown="log"
|
|
11
|
+
@focus="textAreaFocused = true"
|
|
12
|
+
@blur="textAreaFocused = false"
|
|
13
|
+
/>
|
|
14
|
+
<div style="margin-left: 20px">
|
|
15
|
+
<p>Value: {{ textAreaValue }}</p>
|
|
16
|
+
<p>Status: {{ textAreaFocused ? 'focused' : 'unfocused' }}</p>
|
|
17
|
+
</div>
|
|
15
18
|
</div>
|
|
16
19
|
</div>
|
|
17
20
|
</template>
|
|
@@ -28,7 +31,10 @@ export default defineComponent({
|
|
|
28
31
|
const textAreaValue = ref('')
|
|
29
32
|
const textAreaFocused = ref(false)
|
|
30
33
|
|
|
34
|
+
const log = (e: KeyboardEvent) => console.log(e)
|
|
35
|
+
|
|
31
36
|
return {
|
|
37
|
+
log,
|
|
32
38
|
textAreaValue,
|
|
33
39
|
textAreaFocused
|
|
34
40
|
}
|