@dataloop-ai/components 0.19.130 → 0.19.131
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
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
<dl-tooltip
|
|
50
50
|
v-if="tooltip || hasTooltipSlot"
|
|
51
51
|
style="pointer-events: auto"
|
|
52
|
+
:trigger-percentage="tooltipTriggerPercentage"
|
|
52
53
|
>
|
|
53
54
|
<slot name="tooltip">
|
|
54
55
|
{{ tooltip }}
|
|
@@ -173,6 +174,13 @@ export default defineComponent({
|
|
|
173
174
|
* The tooltip displayed when hovering over the button
|
|
174
175
|
*/
|
|
175
176
|
tooltip: { type: String, default: null, required: false },
|
|
177
|
+
/**
|
|
178
|
+
* The percentage of the button's width that will trigger the tooltip
|
|
179
|
+
*/
|
|
180
|
+
tooltipTriggerPercentage: {
|
|
181
|
+
type: Number,
|
|
182
|
+
default: 1
|
|
183
|
+
},
|
|
176
184
|
/**
|
|
177
185
|
* The button will maintain the styles it has when it's pressed if this prop is active
|
|
178
186
|
*/
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
+
<div style="padding-bottom: 10px">
|
|
4
|
+
<div>switch the disalbed prop: {{ disabledInput }}</div>
|
|
5
|
+
<dl-switch v-model="disabledInput" />
|
|
6
|
+
<dl-input
|
|
7
|
+
v-model="textVal"
|
|
8
|
+
placeholder="Test reactivity"
|
|
9
|
+
:disabled="disabledInput"
|
|
10
|
+
/>
|
|
11
|
+
</div>
|
|
3
12
|
<div>
|
|
4
13
|
<input v-model="textVal">
|
|
5
14
|
<div>This is to test v-model reactivity</div>
|
|
@@ -255,11 +264,12 @@
|
|
|
255
264
|
<script lang="ts">
|
|
256
265
|
import { v4 } from 'uuid'
|
|
257
266
|
import { computed, defineComponent, ref } from 'vue-demi'
|
|
258
|
-
import { DlInput, DlButton, DlIcon } from '../components'
|
|
267
|
+
import { DlInput, DlButton, DlIcon, DlSwitch } from '../components'
|
|
259
268
|
import { DlInputFile } from '../components/compound/DlInput/types'
|
|
260
269
|
export default defineComponent({
|
|
261
270
|
name: 'DlInputDemo',
|
|
262
271
|
components: {
|
|
272
|
+
DlSwitch,
|
|
263
273
|
DlInput,
|
|
264
274
|
DlButton,
|
|
265
275
|
DlIcon
|
|
@@ -298,6 +308,8 @@ export default defineComponent({
|
|
|
298
308
|
files.value = val
|
|
299
309
|
}
|
|
300
310
|
|
|
311
|
+
const disabledInput = ref<boolean>(false)
|
|
312
|
+
|
|
301
313
|
const textVal = ref<string>('test me')
|
|
302
314
|
|
|
303
315
|
const trimmedValue = ref('')
|
|
@@ -305,6 +317,7 @@ export default defineComponent({
|
|
|
305
317
|
return {
|
|
306
318
|
log: console.log,
|
|
307
319
|
textVal,
|
|
320
|
+
disabledInput,
|
|
308
321
|
trimmedValue,
|
|
309
322
|
textInputValue,
|
|
310
323
|
passFieldValue,
|