quasar-ui-sellmate-ui-kit 3.14.26 → 3.14.27
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/index.common.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.min.css +1 -1
- package/dist/index.rtl.css +1 -1
- package/dist/index.rtl.min.css +1 -1
- package/dist/index.umd.js +12 -7
- package/dist/index.umd.min.js +2 -2
- package/package.json +1 -1
- package/src/components/STooltip.vue +109 -8
package/package.json
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
:modelValue="isToggled"
|
|
20
20
|
no-parent-event
|
|
21
21
|
persistent
|
|
22
|
-
:class="menuClass"
|
|
23
|
-
class="
|
|
22
|
+
:class="`${menuClass} bg-${COLOR_OF_TYPE[type].background} text-${COLOR_OF_TYPE[type].text}`"
|
|
23
|
+
class="s-tooltip"
|
|
24
24
|
>
|
|
25
25
|
<div class="tooltip-close-icon cursor-pointer">
|
|
26
26
|
<q-icon :name="closeIcon" size="16px" @click="() => (isToggled = false)" />
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
:anchor="$props.arrowAnchor"
|
|
32
32
|
:self="$props.arrowSelf"
|
|
33
33
|
:offset="$props.arrowOffset"
|
|
34
|
-
:class="$props.arrowStyle"
|
|
34
|
+
:class="`${$props.arrowStyle} tooltip-triangle--${type}`"
|
|
35
35
|
class="tooltip-triangle"
|
|
36
36
|
:model-value="isToggled"
|
|
37
37
|
@update:model-value="
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
:anchor="$props.boxAnchor"
|
|
50
50
|
:self="$props.boxSelf"
|
|
51
51
|
:offset="$props.boxOffset"
|
|
52
|
-
class="
|
|
52
|
+
class="s-tooltip"
|
|
53
|
+
:class="`bg-${COLOR_OF_TYPE[type].background} text-${COLOR_OF_TYPE[type].text}`"
|
|
53
54
|
:modelValue="modelValue"
|
|
54
55
|
@hide="$emit('update:modelValue', false)"
|
|
55
56
|
@show="$emit('update:modelValue', true)"
|
|
@@ -73,6 +74,13 @@
|
|
|
73
74
|
import { QTooltip, QBtn, QMenu, QIcon } from 'quasar';
|
|
74
75
|
import { closeIcon } from '../assets/icons';
|
|
75
76
|
|
|
77
|
+
const COLOR_OF_TYPE = {
|
|
78
|
+
default: { background: 'oceanblue_85', text: 'white' },
|
|
79
|
+
caution: { background: 'red_20', text: 'red_70' },
|
|
80
|
+
notice: { background: 'orange_10', text: 'orange_65' },
|
|
81
|
+
accent: { background: 'brilliantblue_20', text: 'brilliantblue_75' },
|
|
82
|
+
};
|
|
83
|
+
|
|
76
84
|
export default defineComponent({
|
|
77
85
|
name: 'STooltip',
|
|
78
86
|
components: {
|
|
@@ -83,6 +91,11 @@
|
|
|
83
91
|
},
|
|
84
92
|
props: {
|
|
85
93
|
modelValue: Boolean,
|
|
94
|
+
type: {
|
|
95
|
+
type: String,
|
|
96
|
+
default: 'default',
|
|
97
|
+
validator: value => ['default', 'caution', 'notice', 'accent'].includes(value),
|
|
98
|
+
},
|
|
86
99
|
textColor: {
|
|
87
100
|
type: String,
|
|
88
101
|
default: '',
|
|
@@ -180,14 +193,12 @@
|
|
|
180
193
|
&.bottom {
|
|
181
194
|
border: {
|
|
182
195
|
top: 0px solid transparent;
|
|
183
|
-
bottom: 12px solid $oceanblue_85;
|
|
184
196
|
left: 8px solid transparent;
|
|
185
197
|
right: 8px solid transparent;
|
|
186
198
|
}
|
|
187
199
|
}
|
|
188
200
|
&.top {
|
|
189
201
|
border: {
|
|
190
|
-
top: 12px solid $oceanblue_85;
|
|
191
202
|
bottom: 0px solid transparent;
|
|
192
203
|
left: 8px solid transparent;
|
|
193
204
|
right: 8px solid transparent;
|
|
@@ -197,7 +208,6 @@
|
|
|
197
208
|
border: {
|
|
198
209
|
top: 8px solid transparent;
|
|
199
210
|
bottom: 8px solid transparent;
|
|
200
|
-
left: 12px solid $oceanblue_85;
|
|
201
211
|
right: 0px solid transparent;
|
|
202
212
|
}
|
|
203
213
|
}
|
|
@@ -206,7 +216,98 @@
|
|
|
206
216
|
top: 8px solid transparent;
|
|
207
217
|
bottom: 8px solid transparent;
|
|
208
218
|
left: 0px solid transparent;
|
|
209
|
-
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&--default {
|
|
223
|
+
&.bottom {
|
|
224
|
+
border: {
|
|
225
|
+
bottom: 12px solid $oceanblue_85;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
&.top {
|
|
229
|
+
border: {
|
|
230
|
+
top: 12px solid $oceanblue_85;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
&.left {
|
|
234
|
+
border: {
|
|
235
|
+
left: 12px solid $oceanblue_85;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
&.right {
|
|
239
|
+
border: {
|
|
240
|
+
right: 12px solid $oceanblue_85;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&--caution {
|
|
246
|
+
&.bottom {
|
|
247
|
+
border: {
|
|
248
|
+
bottom: 12px solid $red_20;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
&.top {
|
|
252
|
+
border: {
|
|
253
|
+
top: 12px solid $red_20;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
&.left {
|
|
257
|
+
border: {
|
|
258
|
+
left: 12px solid $red_20;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
&.right {
|
|
262
|
+
border: {
|
|
263
|
+
right: 12px solid $red_20;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
&--notice {
|
|
269
|
+
&.bottom {
|
|
270
|
+
border: {
|
|
271
|
+
bottom: 12px solid $orange_10;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
&.top {
|
|
275
|
+
border: {
|
|
276
|
+
top: 12px solid $orange_10;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
&.left {
|
|
280
|
+
border: {
|
|
281
|
+
left: 12px solid $orange_10;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
&.right {
|
|
285
|
+
border: {
|
|
286
|
+
right: 12px solid $orange_10;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
&--accent {
|
|
292
|
+
&.bottom {
|
|
293
|
+
border: {
|
|
294
|
+
bottom: 12px solid $brilliantblue_20;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
&.top {
|
|
298
|
+
border: {
|
|
299
|
+
top: 12px solid $brilliantblue_20;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
&.left {
|
|
303
|
+
border: {
|
|
304
|
+
left: 12px solid $brilliantblue_20;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
&.right {
|
|
308
|
+
border: {
|
|
309
|
+
right: 12px solid $brilliantblue_20;
|
|
310
|
+
}
|
|
210
311
|
}
|
|
211
312
|
}
|
|
212
313
|
}
|