@dataloop-ai/components 0.13.7 → 0.13.9
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
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
<div
|
|
14
14
|
class="dialog-wrapper"
|
|
15
15
|
:style="{ maxWidth: Number(width) ? `${width}px` : width }"
|
|
16
|
-
:class="{
|
|
16
|
+
:class="{
|
|
17
|
+
'dialog-wrapper--fullscreen': fullscreen,
|
|
18
|
+
'dialog-wrapper--right': right,
|
|
19
|
+
'dialog-wrapper--left': left
|
|
20
|
+
}"
|
|
17
21
|
>
|
|
18
22
|
<div
|
|
19
23
|
v-if="hasHeader"
|
|
@@ -51,6 +55,8 @@ export default defineComponent({
|
|
|
51
55
|
props: {
|
|
52
56
|
width: { type: [Number, String], default: 400 },
|
|
53
57
|
fullscreen: Boolean,
|
|
58
|
+
right: Boolean,
|
|
59
|
+
left: Boolean,
|
|
54
60
|
modelValue: Boolean,
|
|
55
61
|
volatile: { type: Boolean, default: false }
|
|
56
62
|
},
|
|
@@ -159,6 +165,14 @@ export default defineComponent({
|
|
|
159
165
|
max-width: 100vw !important;
|
|
160
166
|
border-radius: 0px;
|
|
161
167
|
}
|
|
168
|
+
&--right {
|
|
169
|
+
position: absolute !important;
|
|
170
|
+
right: 0;
|
|
171
|
+
}
|
|
172
|
+
&--left {
|
|
173
|
+
position: absolute !important;
|
|
174
|
+
left: 0;
|
|
175
|
+
}
|
|
162
176
|
}
|
|
163
177
|
|
|
164
178
|
.header {
|
|
@@ -178,7 +192,7 @@ export default defineComponent({
|
|
|
178
192
|
|
|
179
193
|
.footer {
|
|
180
194
|
display: flex;
|
|
181
|
-
padding:
|
|
195
|
+
padding: 16px;
|
|
182
196
|
border-top: 1px solid var(--dl-color-separator);
|
|
183
197
|
}
|
|
184
198
|
|
|
@@ -10,11 +10,21 @@
|
|
|
10
10
|
style="padding: 0; margin-bottom: 10px"
|
|
11
11
|
@click.stop.prevent="$emit('onClose')"
|
|
12
12
|
/>
|
|
13
|
-
<h2
|
|
14
|
-
|
|
13
|
+
<h2
|
|
14
|
+
v-if="hasTitle"
|
|
15
|
+
class="title"
|
|
16
|
+
>
|
|
17
|
+
<slot name="title">
|
|
18
|
+
{{ title }}
|
|
19
|
+
</slot>
|
|
15
20
|
</h2>
|
|
16
|
-
<p
|
|
17
|
-
|
|
21
|
+
<p
|
|
22
|
+
v-if="hasSubtitle"
|
|
23
|
+
class="subtitle"
|
|
24
|
+
>
|
|
25
|
+
<slot name="subtitle">
|
|
26
|
+
{{ subtitle }}
|
|
27
|
+
</slot>
|
|
18
28
|
</p>
|
|
19
29
|
</div>
|
|
20
30
|
<dl-button
|
|
@@ -44,7 +54,15 @@ export default defineComponent({
|
|
|
44
54
|
closeButton: { type: Boolean, default: true },
|
|
45
55
|
hasBackButton: Boolean
|
|
46
56
|
},
|
|
47
|
-
emits: ['onClose']
|
|
57
|
+
emits: ['onClose'],
|
|
58
|
+
computed: {
|
|
59
|
+
hasTitle() {
|
|
60
|
+
return !!this.title || this.$slots.title
|
|
61
|
+
},
|
|
62
|
+
hasSubtitle() {
|
|
63
|
+
return !!this.subtitle || this.$slots.subtitle
|
|
64
|
+
}
|
|
65
|
+
}
|
|
48
66
|
})
|
|
49
67
|
</script>
|
|
50
68
|
|
|
@@ -60,6 +78,7 @@ export default defineComponent({
|
|
|
60
78
|
font-size: var(--dl-font-size-h2);
|
|
61
79
|
margin: 0;
|
|
62
80
|
color: var(--dl-color-darker);
|
|
81
|
+
line-height: 2rem !important;
|
|
63
82
|
}
|
|
64
83
|
|
|
65
84
|
.subtitle {
|
|
@@ -350,19 +350,6 @@ export default defineComponent({
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
// expose public methods
|
|
354
|
-
Object.assign(proxy, {
|
|
355
|
-
show,
|
|
356
|
-
hide,
|
|
357
|
-
toggle,
|
|
358
|
-
onClickHide,
|
|
359
|
-
onClick,
|
|
360
|
-
onBeforeShow,
|
|
361
|
-
onShow,
|
|
362
|
-
onBeforeHide,
|
|
363
|
-
onHide
|
|
364
|
-
})
|
|
365
|
-
|
|
366
353
|
onMounted(() => {
|
|
367
354
|
if (props.modelValue) {
|
|
368
355
|
show()
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
class="select-search-input"
|
|
77
77
|
:style="!isExpanded ? 'display: none;' : 'width: 100%;'"
|
|
78
78
|
:disabled="disabled"
|
|
79
|
+
:readonly="readonly"
|
|
79
80
|
@input="handleSearchInput"
|
|
80
81
|
@focus="handleSearchFocus"
|
|
81
82
|
@blur="handleSearchBlur"
|
|
@@ -139,7 +140,7 @@
|
|
|
139
140
|
no-focus
|
|
140
141
|
:offset="[0, 3]"
|
|
141
142
|
style="border-radius: 0"
|
|
142
|
-
:disabled="disabled"
|
|
143
|
+
:disabled="disabled || readonly"
|
|
143
144
|
@show="onMenuOpen"
|
|
144
145
|
@hide="closeMenu"
|
|
145
146
|
>
|
|
@@ -309,6 +310,7 @@ export default defineComponent({
|
|
|
309
310
|
errorMessage: { type: String, default: '' },
|
|
310
311
|
error: { type: Boolean, default: false },
|
|
311
312
|
disabled: { type: Boolean, default: false },
|
|
313
|
+
readonly: { type: Boolean, default: false },
|
|
312
314
|
emitValue: { type: Boolean, default: false }, // We emit the value from the option and compare with it as a modelvalue
|
|
313
315
|
options: {
|
|
314
316
|
type: Array as PropType<SelectOptionType[]>,
|
|
@@ -497,6 +499,9 @@ export default defineComponent({
|
|
|
497
499
|
if (this.disabled) {
|
|
498
500
|
classes.push('dl_select__select--disabled')
|
|
499
501
|
}
|
|
502
|
+
if (this.readonly) {
|
|
503
|
+
classes.push('dl_select__select--readonly')
|
|
504
|
+
}
|
|
500
505
|
if (this.isExpanded) {
|
|
501
506
|
classes.push('dl_select__select--focused')
|
|
502
507
|
}
|
|
@@ -902,6 +907,18 @@ export default defineComponent({
|
|
|
902
907
|
pointer-events: none;
|
|
903
908
|
}
|
|
904
909
|
}
|
|
910
|
+
|
|
911
|
+
&--readonly {
|
|
912
|
+
border-color: var(--dl-color-separator);
|
|
913
|
+
cursor: text;
|
|
914
|
+
|
|
915
|
+
&:hover {
|
|
916
|
+
border-color: var(--dl-color-separator);
|
|
917
|
+
}
|
|
918
|
+
& input {
|
|
919
|
+
pointer-events: none;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
905
922
|
}
|
|
906
923
|
|
|
907
924
|
.selected {
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
:maxlength="maxLength"
|
|
52
52
|
:type="showPass ? 'text' : type"
|
|
53
53
|
:disabled="disabled"
|
|
54
|
+
:readonly="readonly"
|
|
54
55
|
@input="onChange"
|
|
55
56
|
@focus="onFocus"
|
|
56
57
|
@blur="debouncedBlur()"
|
|
@@ -283,6 +284,10 @@ export default defineComponent({
|
|
|
283
284
|
type: Boolean,
|
|
284
285
|
default: false
|
|
285
286
|
},
|
|
287
|
+
readonly: {
|
|
288
|
+
type: Boolean,
|
|
289
|
+
default: false
|
|
290
|
+
},
|
|
286
291
|
maxLength: {
|
|
287
292
|
type: Number,
|
|
288
293
|
default: null
|
|
@@ -412,6 +417,7 @@ export default defineComponent({
|
|
|
412
417
|
!this.disableClearBtn &&
|
|
413
418
|
this.type !== 'password' &&
|
|
414
419
|
!this.disabled &&
|
|
420
|
+
!this.readonly &&
|
|
415
421
|
!!this.modelValue
|
|
416
422
|
// this.focused
|
|
417
423
|
)
|
|
@@ -716,6 +722,13 @@ export default defineComponent({
|
|
|
716
722
|
color: var(--dl-color-disabled);
|
|
717
723
|
cursor: not-allowed;
|
|
718
724
|
}
|
|
725
|
+
&:readonly {
|
|
726
|
+
border-color: var(--dl-color-separator);
|
|
727
|
+
cursor: text;
|
|
728
|
+
&:hover {
|
|
729
|
+
border-color: var(--dl-color-separator) !important;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
719
732
|
}
|
|
720
733
|
|
|
721
734
|
&__adornment-container {
|