@dataloop-ai/components 0.17.20 → 0.17.21
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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
:id="uuid"
|
|
4
4
|
:class="rootContainerClasses"
|
|
5
|
+
:style="cssVars"
|
|
5
6
|
>
|
|
6
7
|
<div :class="wrapperClasses">
|
|
7
8
|
<div
|
|
@@ -333,7 +334,11 @@ export default defineComponent({
|
|
|
333
334
|
type: Boolean,
|
|
334
335
|
default: false
|
|
335
336
|
},
|
|
336
|
-
fitContent: Boolean
|
|
337
|
+
fitContent: Boolean,
|
|
338
|
+
margin: {
|
|
339
|
+
type: String,
|
|
340
|
+
default: null
|
|
341
|
+
}
|
|
337
342
|
},
|
|
338
343
|
emits: ['input', 'focus', 'blur', 'clear', 'enter', 'update:model-value'],
|
|
339
344
|
setup(props, { emit }) {
|
|
@@ -396,6 +401,16 @@ export default defineComponent({
|
|
|
396
401
|
}
|
|
397
402
|
return classes
|
|
398
403
|
},
|
|
404
|
+
cssVars(): Record<string, any> {
|
|
405
|
+
let inputMargin = this.margin
|
|
406
|
+
|
|
407
|
+
if (!this.margin && this.isSmall) {
|
|
408
|
+
inputMargin = '0px 20px 0px 0px'
|
|
409
|
+
}
|
|
410
|
+
return {
|
|
411
|
+
'--dl-input-margin': inputMargin
|
|
412
|
+
}
|
|
413
|
+
},
|
|
399
414
|
inputClasses(): string[] {
|
|
400
415
|
const classes = [
|
|
401
416
|
'dl-text-input__input',
|
|
@@ -623,7 +638,7 @@ export default defineComponent({
|
|
|
623
638
|
|
|
624
639
|
<style scoped lang="scss">
|
|
625
640
|
.dl-text-input {
|
|
626
|
-
|
|
641
|
+
margin: var(--dl-input-margin);
|
|
627
642
|
|
|
628
643
|
/* Chrome, Safari, Edge, Opera */
|
|
629
644
|
input::-webkit-outer-spin-button,
|