@policystudio/policy-studio-ui-vue 1.1.32 → 1.1.34
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 +1 -1
- package/src/components/forms/PsInput.vue +44 -21
package/package.json
CHANGED
|
@@ -2,40 +2,50 @@
|
|
|
2
2
|
<div class="psui-el-input" :class="[getComponentClass, `layout-${layout}`]" >
|
|
3
3
|
|
|
4
4
|
<label v-if="label"> {{ label }} </label>
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
<div
|
|
7
7
|
class="psui-el-input-wrapper"
|
|
8
8
|
@mouseenter="$emit('mouseenter',$event)"
|
|
9
9
|
@mouseleave="$emit('mouseleave',$event)"
|
|
10
10
|
>
|
|
11
|
-
|
|
12
11
|
<div v-if="$slots.prepend" class="psui-el-input-prepend">
|
|
13
12
|
<slot name="prepend"></slot>
|
|
14
13
|
</div>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
:
|
|
18
|
-
|
|
19
|
-
:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
<PsRichTooltip
|
|
15
|
+
css-class="w-48"
|
|
16
|
+
:ignore-dialog="!showTooltip"
|
|
17
|
+
>
|
|
18
|
+
<template v-slot:trigger>
|
|
19
|
+
<input
|
|
20
|
+
:title="title"
|
|
21
|
+
:type="type"
|
|
22
|
+
:placeholder="placeholder"
|
|
23
|
+
:disabled="disabled"
|
|
24
|
+
:value="value"
|
|
25
|
+
:step="step"
|
|
26
|
+
:min="minValue"
|
|
27
|
+
:max="maxValue"
|
|
28
|
+
@focus="onInputFocus"
|
|
29
|
+
@blur="onInputBlur"
|
|
30
|
+
@input="$emit('input', $event)"
|
|
31
|
+
@keydown="$emit('keydown', $event)"
|
|
32
|
+
@change="$emit('change', $event)"
|
|
33
|
+
v-bind="getAttrs"
|
|
34
|
+
:class="{ 'focus': isFocus }"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
37
|
+
<template v-slot:content>
|
|
38
|
+
<div class="text-left">
|
|
39
|
+
{{ tooltipText }}
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
</PsRichTooltip>
|
|
32
43
|
<div v-if="$slots.append || hasError" class="psui-el-input-append">
|
|
33
44
|
<span v-if="hasError" class="material-icons psui-text-red-20 material-icons-sharp">error</span>
|
|
34
45
|
<slot v-else name="append"></slot>
|
|
35
46
|
</div>
|
|
36
|
-
|
|
37
47
|
</div>
|
|
38
|
-
|
|
48
|
+
|
|
39
49
|
<p v-if="hint || (hasError && typeof hasError === 'string')" class="psui-el-input-hint">
|
|
40
50
|
{{ typeof hasError === 'string' ? hasError : hint }}
|
|
41
51
|
</p>
|
|
@@ -44,8 +54,13 @@
|
|
|
44
54
|
</template>
|
|
45
55
|
|
|
46
56
|
<script>
|
|
57
|
+
import PsRichTooltip from '../tooltip/PsRichTooltip.vue'
|
|
58
|
+
|
|
47
59
|
export default {
|
|
48
60
|
name: 'PsInput',
|
|
61
|
+
components: {
|
|
62
|
+
PsRichTooltip,
|
|
63
|
+
},
|
|
49
64
|
props: {
|
|
50
65
|
/**
|
|
51
66
|
* It set the title and also its tooltip default behavior
|
|
@@ -122,6 +137,14 @@ export default {
|
|
|
122
137
|
},
|
|
123
138
|
step:{
|
|
124
139
|
type: null
|
|
140
|
+
},
|
|
141
|
+
showTooltip: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
default: false,
|
|
144
|
+
},
|
|
145
|
+
tooltipText: {
|
|
146
|
+
type: String,
|
|
147
|
+
default: '',
|
|
125
148
|
},
|
|
126
149
|
},
|
|
127
150
|
data: () => ({
|