@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.17.20",
3
+ "version": "0.17.21",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -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
- padding: 20px 20px 20px 0px;
641
+ margin: var(--dl-input-margin);
627
642
 
628
643
  /* Chrome, Safari, Edge, Opera */
629
644
  input::-webkit-outer-spin-button,
@@ -5,6 +5,7 @@
5
5
  style="width: 920px"
6
6
  placeholder="Select option"
7
7
  size="l"
8
+ margin="20px"
8
9
  title="Input Title"
9
10
  required
10
11
  tooltip="Quis fugiat et non eu proident sit et amet."