quasar-ui-sellmate-ui-kit 3.14.26 → 3.14.28
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 +22 -9
- package/dist/index.umd.min.js +2 -2
- package/package.json +1 -1
- package/src/components/STooltip.vue +96 -28
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)"
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
:anchor="$props.arrowAnchor"
|
|
61
62
|
:self="$props.arrowSelf"
|
|
62
63
|
:offset="$props.arrowOffset"
|
|
63
|
-
:class="$props.arrowStyle"
|
|
64
|
+
:class="`${$props.arrowStyle} tooltip-triangle--${type}`"
|
|
64
65
|
class="tooltip-triangle"
|
|
65
66
|
:modelValue="modelValue"
|
|
66
67
|
></q-tooltip>
|
|
@@ -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: '',
|
|
@@ -148,6 +161,7 @@
|
|
|
148
161
|
return {
|
|
149
162
|
isToggled,
|
|
150
163
|
closeIcon,
|
|
164
|
+
COLOR_OF_TYPE,
|
|
151
165
|
};
|
|
152
166
|
},
|
|
153
167
|
});
|
|
@@ -175,38 +189,92 @@
|
|
|
175
189
|
box-shadow: none !important;
|
|
176
190
|
background: none !important;
|
|
177
191
|
padding: 0;
|
|
192
|
+
margin: 0;
|
|
178
193
|
width: 0;
|
|
179
194
|
height: 0;
|
|
195
|
+
|
|
196
|
+
// 툴팁이 아래쪽에 있을 때 (위쪽을 향하는 삼각형)
|
|
180
197
|
&.bottom {
|
|
181
|
-
border:
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
left: 8px solid transparent;
|
|
185
|
-
right: 8px solid transparent;
|
|
186
|
-
}
|
|
198
|
+
border-left: 8px solid transparent;
|
|
199
|
+
border-right: 8px solid transparent;
|
|
200
|
+
border-bottom: 12px solid transparent; // 기본은 투명
|
|
187
201
|
}
|
|
202
|
+
// 툴팁이 위쪽에 있을 때 (아래쪽을 향하는 삼각형)
|
|
188
203
|
&.top {
|
|
189
|
-
border:
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
left: 8px solid transparent;
|
|
193
|
-
right: 8px solid transparent;
|
|
194
|
-
}
|
|
204
|
+
border-left: 8px solid transparent;
|
|
205
|
+
border-right: 8px solid transparent;
|
|
206
|
+
border-top: 12px solid transparent; // 기본은 투명
|
|
195
207
|
}
|
|
208
|
+
// 툴팁이 왼쪽에 있을 때 (오른쪽을 향하는 삼각형)
|
|
196
209
|
&.left {
|
|
197
|
-
border:
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
left: 12px solid $oceanblue_85;
|
|
201
|
-
right: 0px solid transparent;
|
|
202
|
-
}
|
|
210
|
+
border-top: 8px solid transparent;
|
|
211
|
+
border-bottom: 8px solid transparent;
|
|
212
|
+
border-left: 12px solid transparent; // 기본은 투명
|
|
203
213
|
}
|
|
214
|
+
// 툴팁이 오른쪽에 있을 때 (왼쪽을 향하는 삼각형)
|
|
204
215
|
&.right {
|
|
205
|
-
border:
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
216
|
+
border-top: 8px solid transparent;
|
|
217
|
+
border-bottom: 8px solid transparent;
|
|
218
|
+
border-right: 12px solid transparent; // 기본은 투명
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&--default {
|
|
222
|
+
&.bottom {
|
|
223
|
+
border-bottom-color: $oceanblue_85;
|
|
224
|
+
}
|
|
225
|
+
&.top {
|
|
226
|
+
border-top-color: $oceanblue_85;
|
|
227
|
+
}
|
|
228
|
+
&.left {
|
|
229
|
+
border-left-color: $oceanblue_85;
|
|
230
|
+
}
|
|
231
|
+
&.right {
|
|
232
|
+
border-right-color: $oceanblue_85;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&--caution {
|
|
237
|
+
&.bottom {
|
|
238
|
+
border-bottom-color: $red_20;
|
|
239
|
+
}
|
|
240
|
+
&.top {
|
|
241
|
+
border-top-color: $red_20;
|
|
242
|
+
}
|
|
243
|
+
&.left {
|
|
244
|
+
border-left-color: $red_20;
|
|
245
|
+
}
|
|
246
|
+
&.right {
|
|
247
|
+
border-right-color: $red_20;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&--notice {
|
|
252
|
+
&.bottom {
|
|
253
|
+
border-bottom-color: $orange_10;
|
|
254
|
+
}
|
|
255
|
+
&.top {
|
|
256
|
+
border-top-color: $orange_10;
|
|
257
|
+
}
|
|
258
|
+
&.left {
|
|
259
|
+
border-left-color: $orange_10;
|
|
260
|
+
}
|
|
261
|
+
&.right {
|
|
262
|
+
border-right-color: $orange_10;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
&--accent {
|
|
267
|
+
&.bottom {
|
|
268
|
+
border-bottom-color: $brilliantblue_20;
|
|
269
|
+
}
|
|
270
|
+
&.top {
|
|
271
|
+
border-top-color: $brilliantblue_20;
|
|
272
|
+
}
|
|
273
|
+
&.left {
|
|
274
|
+
border-left-color: $brilliantblue_20;
|
|
275
|
+
}
|
|
276
|
+
&.right {
|
|
277
|
+
border-right-color: $brilliantblue_20;
|
|
210
278
|
}
|
|
211
279
|
}
|
|
212
280
|
}
|