@dataloop-ai/components 0.17.48 → 0.17.50

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.48",
3
+ "version": "0.17.50",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -123,15 +123,7 @@ export default defineComponent({
123
123
  : 'flex-end',
124
124
  '--option-group-width':
125
125
  this.leftLabel && !this.inline ? '100%' : 'auto',
126
- '--option-group-max-width': this.maxWidth,
127
- '--control-element-padding-left': this.leftLabel
128
- ? '10px'
129
- : this.inline
130
- ? '12px'
131
- : '0px',
132
- '--control-element-padding-right': this.leftLabel
133
- ? '0px'
134
- : '10px'
126
+ '--option-group-max-width': this.maxWidth
135
127
  }
136
128
  }
137
129
  },
@@ -160,6 +152,11 @@ export default defineComponent({
160
152
  </script>
161
153
 
162
154
  <style scoped lang="scss">
155
+ .control-element {
156
+ display: flex;
157
+ align-items: center;
158
+ }
159
+
163
160
  .tooltip-icon {
164
161
  color: var(--dl-color-medium);
165
162
  display: flex !important;
@@ -181,8 +178,9 @@ export default defineComponent({
181
178
  justify-content: var(--option-justify-content);
182
179
  font-size: var(--dl-font-size-body);
183
180
  user-select: none;
184
- height: 24px;
185
181
  color: var(--dl-color-darker);
182
+ margin: 10px 5px;
183
+ gap: 5px;
186
184
  }
187
185
 
188
186
  .disabled {
@@ -192,9 +190,4 @@ export default defineComponent({
192
190
  }
193
191
  color: var(--dl-color-disabled);
194
192
  }
195
-
196
- .control-element {
197
- padding-left: var(--control-element-padding-left);
198
- padding-right: var(--control-element-padding-right);
199
- }
200
193
  </style>
@@ -103,7 +103,7 @@ export default defineComponent({
103
103
  indeterminateValue: { type: ValueTypes, default: null },
104
104
  value: { type: ValueTypes, default: null },
105
105
  falseValue: { type: ValueTypes, default: false },
106
- padding: { type: String, default: '5px' },
106
+ padding: { type: String, default: '0' },
107
107
  trueValue: { type: ValueTypes, default: true },
108
108
  tabindex: { type: String, default: '0' },
109
109
  subLabelSize: { type: String, default: '10px' }
@@ -242,7 +242,7 @@ export default defineComponent({
242
242
  display: inline-flex;
243
243
  max-width: max-content;
244
244
  align-items: center;
245
- gap: 10px;
245
+ gap: 6px;
246
246
  padding: var(--dl-checkbox-padding);
247
247
  user-select: none;
248
248
  }
@@ -76,7 +76,7 @@ export default defineComponent({
76
76
  disabled: { type: Boolean, default: false },
77
77
  id: { type: [String, Number], default: null },
78
78
  label: { type: String, default: null },
79
- padding: { type: String, default: '5px' },
79
+ padding: { type: String, default: '0' },
80
80
  modelValue: { type: [String, Number, Boolean], required: true },
81
81
  value: { type: [String, Number, Boolean], required: true },
82
82
  tabindex: { type: String, default: '0' },
@@ -216,6 +216,10 @@ export default defineComponent({
216
216
  counterReverse: {
217
217
  type: Boolean,
218
218
  default: false
219
+ },
220
+ maxHeight: {
221
+ type: String,
222
+ default: '120px'
219
223
  }
220
224
  },
221
225
  emits: ['input', 'focus', 'blur', 'clear', 'update:model-value', 'keydown'],
@@ -228,6 +232,7 @@ export default defineComponent({
228
232
  const cssVars = computed(() => {
229
233
  return {
230
234
  '--dl-textarea-max-width': props.width || 'auto',
235
+ '--dl-textarea-max-height': props.maxHeight,
231
236
  '--dl-textarea-width':
232
237
  borderBoxSize.value?.[0].inlineSize + 'px' || '100%'
233
238
  }
@@ -359,7 +364,7 @@ export default defineComponent({
359
364
  min-width: 100px;
360
365
  max-width: 100%;
361
366
  min-height: 80px;
362
- max-height: 120px;
367
+ max-height: var(--dl-textarea-max-height);
363
368
  outline: none;
364
369
  color: var(--dl-color-darker);
365
370
  box-sizing: border-box;
@@ -1,27 +1,23 @@
1
1
  <template>
2
2
  <div style="width: 800px">
3
+ <div style="font-size: 14px">
4
+ <span>Max length: </span>
5
+ <input v-model="maxLength">
6
+ </div>
3
7
  <div style="max-width: 500px; width: 100%">
4
8
  <dl-text-area
5
9
  v-model="textAreaValue"
6
10
  placeholder="Type your text..."
7
11
  show-counter
8
- :max-length="20"
12
+ :max-length="maxLength"
13
+ max-height="500px"
9
14
  title="Text area title"
10
15
  required
11
16
  tooltip="Quis fugiat et non eu proident sit et amet."
12
17
  top-message="Pariatur consequat non sit aliqua labore ad reprehenderit deserunt ullamco incididunt non irure laborum deserunt."
13
18
  enable-resize
14
- error
15
19
  clear-button-tooltip
16
- error-message="Something went wrong!"
17
- @keydown="log"
18
- @focus="textAreaFocused = true"
19
- @blur="textAreaFocused = false"
20
20
  />
21
- <div style="margin-left: 20px">
22
- <p>Value: {{ textAreaValue }}</p>
23
- <p>Status: {{ textAreaFocused ? 'focused' : 'unfocused' }}</p>
24
- </div>
25
21
  </div>
26
22
  </div>
27
23
  </template>
@@ -36,14 +32,10 @@ export default defineComponent({
36
32
  },
37
33
  setup() {
38
34
  const textAreaValue = ref('')
39
- const textAreaFocused = ref(false)
40
-
41
- const log = (e: KeyboardEvent) => console.log(e)
42
-
35
+ const maxLength = ref(20)
43
36
  return {
44
- log,
45
- textAreaValue,
46
- textAreaFocused
37
+ maxLength,
38
+ textAreaValue
47
39
  }
48
40
  }
49
41
  })