@dataloop-ai/components 0.17.47 → 0.17.49

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.47",
3
+ "version": "0.17.49",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -146,7 +146,7 @@ export default defineComponent({
146
146
  return to > this.totalItems ? this.totalItems : to
147
147
  },
148
148
  max(): number {
149
- return this.rowsPerPageState === 0
149
+ return this.rowsPerPageState === 0 || this.totalItems === 0
150
150
  ? 1
151
151
  : Math.ceil(this.totalItems / this.rowsPerPageState)
152
152
  }
@@ -36,7 +36,5 @@ export default defineComponent({
36
36
  justify-content: flex-end;
37
37
  display: flex;
38
38
  color: var(--dl-color-lighter);
39
- padding-left: 16px;
40
- margin-left: auto;
41
39
  }
42
40
  </style>
@@ -69,11 +69,9 @@ export default defineComponent({
69
69
  <style scoped lang="scss">
70
70
  .dl-pagination {
71
71
  &--rows_selector {
72
- width: 15%;
73
72
  display: flex;
74
73
  align-items: center;
75
74
  color: var(--dl-color-darker);
76
- padding-right: 2px;
77
75
  }
78
76
 
79
77
  &--rows_per_page_label {
@@ -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
  })