@pocketprep/ui-kit 3.4.33 → 3.4.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/dist/@pocketprep/ui-kit.js +2391 -2347
- package/dist/@pocketprep/ui-kit.js.map +1 -1
- package/dist/@pocketprep/ui-kit.umd.cjs +7 -7
- package/dist/@pocketprep/ui-kit.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/lib/components/Forms/Textarea.vue +72 -10
- package/lib/components/Tooltips/Tooltip.vue +18 -3
- package/package.json +1 -1
|
@@ -4,22 +4,49 @@
|
|
|
4
4
|
@mouseover="hover = true"
|
|
5
5
|
@mouseout="hover = false"
|
|
6
6
|
>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
<div
|
|
8
|
+
class="uikit-textarea__container"
|
|
9
|
+
>
|
|
10
|
+
<label
|
|
11
|
+
v-if="label"
|
|
12
|
+
v-dark="isDarkMode"
|
|
13
|
+
class="uikit-textarea__label"
|
|
14
|
+
:class="{
|
|
15
|
+
'uikit-textarea__label--hover': hover,
|
|
16
|
+
'uikit-textarea__label--focus': focus
|
|
17
|
+
}"
|
|
18
|
+
>{{ label }}</label>
|
|
19
|
+
<div
|
|
20
|
+
v-if="showIconAndTooltip"
|
|
21
|
+
@mouseenter="showTextAreaTooltip = true"
|
|
22
|
+
@mouseleave="showTextAreaTooltip = false"
|
|
23
|
+
@focus="showTextAreaTooltip = true"
|
|
24
|
+
@blur="showTextAreaTooltip = false"
|
|
25
|
+
>
|
|
26
|
+
<Tooltip
|
|
27
|
+
v-if="showTextAreaTooltip"
|
|
28
|
+
:key="tooltipText"
|
|
29
|
+
theme="offset"
|
|
30
|
+
:is-dark-mode="isDarkMode"
|
|
31
|
+
>
|
|
32
|
+
{{ tooltipText }}
|
|
33
|
+
</Tooltip>
|
|
34
|
+
<Icon
|
|
35
|
+
type="info"
|
|
36
|
+
class="uikit-textarea__icon"
|
|
37
|
+
:class="{
|
|
38
|
+
'uikit-textarea__icon--dark': isDarkMode
|
|
39
|
+
}"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
16
43
|
<textarea
|
|
17
44
|
v-dark="isDarkMode"
|
|
18
45
|
:value="modelValue"
|
|
19
46
|
:disabled="disabled"
|
|
20
47
|
:placeholder="placeholder"
|
|
21
48
|
:autofocus="autoFocus"
|
|
22
|
-
:style="{ height }"
|
|
49
|
+
:style="{ height, width }"
|
|
23
50
|
class="uikit-textarea__textarea"
|
|
24
51
|
:class="{
|
|
25
52
|
'uikit-textarea__textarea--hover': hover,
|
|
@@ -34,9 +61,15 @@
|
|
|
34
61
|
|
|
35
62
|
<script lang="ts">
|
|
36
63
|
import { Component, Vue, Prop, Emit } from 'vue-facing-decorator'
|
|
64
|
+
import Icon from '../Icons/Icon.vue'
|
|
65
|
+
import Tooltip from '../Tooltips/Tooltip.vue'
|
|
37
66
|
import { dark } from '../../directives'
|
|
38
67
|
|
|
39
68
|
@Component({
|
|
69
|
+
components: {
|
|
70
|
+
Icon,
|
|
71
|
+
Tooltip,
|
|
72
|
+
},
|
|
40
73
|
directives: {
|
|
41
74
|
dark,
|
|
42
75
|
},
|
|
@@ -49,10 +82,14 @@ export default class Textarea extends Vue {
|
|
|
49
82
|
@Prop() disabled?: boolean
|
|
50
83
|
@Prop() autoFocus?: boolean
|
|
51
84
|
@Prop({ default: '150px' }) height?: string
|
|
85
|
+
@Prop({ default: '341px' }) width?: string
|
|
52
86
|
@Prop({ default: false }) isDarkMode!: boolean
|
|
87
|
+
@Prop({ default: false }) showIconAndTooltip!: boolean
|
|
88
|
+
@Prop({ default: '' }) tooltipText!: string
|
|
53
89
|
|
|
54
90
|
hover = false
|
|
55
91
|
focus = false
|
|
92
|
+
showTextAreaTooltip = false
|
|
56
93
|
|
|
57
94
|
@Emit('update:modelValue')
|
|
58
95
|
valueChange ($event: Event) {
|
|
@@ -66,6 +103,12 @@ export default class Textarea extends Vue {
|
|
|
66
103
|
@import '../../styles/breakpoints';
|
|
67
104
|
|
|
68
105
|
.uikit-textarea {
|
|
106
|
+
&__container {
|
|
107
|
+
position: relative;
|
|
108
|
+
display: flex;
|
|
109
|
+
outline: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
69
112
|
&__label {
|
|
70
113
|
font-size: 13px;
|
|
71
114
|
font-weight: 600;
|
|
@@ -99,6 +142,25 @@ export default class Textarea extends Vue {
|
|
|
99
142
|
}
|
|
100
143
|
}
|
|
101
144
|
|
|
145
|
+
.uikit-tooltip {
|
|
146
|
+
position: absolute;
|
|
147
|
+
left: 50%;
|
|
148
|
+
top: calc(-100% - 14px);
|
|
149
|
+
|
|
150
|
+
@include breakpoint('black-bear') {
|
|
151
|
+
left: 35%;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&__icon {
|
|
156
|
+
padding: 0 0 2px 5px;
|
|
157
|
+
color: $brand-blue;
|
|
158
|
+
|
|
159
|
+
&--dark {
|
|
160
|
+
color: $banana-bread;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
102
164
|
&__textarea {
|
|
103
165
|
background-color: $white;
|
|
104
166
|
border: 1px solid rgba($pewter, 0.85);
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
class="uikit-tooltip-popup__triangle"
|
|
18
18
|
:class="{
|
|
19
19
|
'uikit-tooltip-popup__triangle--rightalign': theme === 'rightalign',
|
|
20
|
-
'uikit-tooltip-popup__triangle--leftalign': theme === 'leftalign'
|
|
20
|
+
'uikit-tooltip-popup__triangle--leftalign': theme === 'leftalign',
|
|
21
|
+
'uikit-tooltip-popup__triangle--offset': theme === 'offset'
|
|
21
22
|
}"
|
|
22
23
|
/>
|
|
23
24
|
<span>
|
|
@@ -37,7 +38,7 @@ import { dark } from '../../directives'
|
|
|
37
38
|
},
|
|
38
39
|
})
|
|
39
40
|
export default class Tooltip extends Vue {
|
|
40
|
-
@Prop({ default: '' }) theme!: 'leftalign' | 'rightalign'
|
|
41
|
+
@Prop({ default: '' }) theme!: 'leftalign' | 'rightalign' | 'offset'
|
|
41
42
|
@Prop({ default: null }) styles!: null | Record<string, string>
|
|
42
43
|
@Prop({ default: false }) isDarkMode!: boolean
|
|
43
44
|
|
|
@@ -128,8 +129,12 @@ export default class Tooltip extends Vue {
|
|
|
128
129
|
span {
|
|
129
130
|
position: relative;
|
|
130
131
|
z-index: 1;
|
|
131
|
-
max-width:
|
|
132
|
+
max-width: 482px;
|
|
132
133
|
display: block;
|
|
134
|
+
|
|
135
|
+
@include breakpoint('black-bear') {
|
|
136
|
+
max-width: 341px;
|
|
137
|
+
}
|
|
133
138
|
}
|
|
134
139
|
|
|
135
140
|
&__triangle {
|
|
@@ -152,6 +157,16 @@ export default class Tooltip extends Vue {
|
|
|
152
157
|
transform: none;
|
|
153
158
|
}
|
|
154
159
|
|
|
160
|
+
&--offset {
|
|
161
|
+
left: 42%;
|
|
162
|
+
transform: none;
|
|
163
|
+
|
|
164
|
+
@include breakpoint('black-bear') {
|
|
165
|
+
left: 60%;
|
|
166
|
+
transform: none;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
155
170
|
&--dark {
|
|
156
171
|
border-top-color: $white;
|
|
157
172
|
}
|