@varlet/ui 2.13.1-alpha.1689663779667 → 2.13.2
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/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/menu/menu.css +1 -1
- package/es/menu/usePopover.mjs +47 -1
- package/es/select/Select.mjs +1 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/style.css +1 -1
- package/es/swipe-item/index.mjs +0 -3
- package/es/tooltip/tooltip.css +1 -1
- package/es/utils/elements.mjs +1 -1
- package/es/varlet.esm.js +2492 -2450
- package/highlight/web-types.en-US.json +2 -2
- package/highlight/web-types.zh-CN.json +3 -3
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +51 -8
- package/package.json +6 -6
- package/types/snackbar.d.ts +9 -10
- package/umd/varlet.js +5 -5
package/es/index.bundle.mjs
CHANGED
|
@@ -244,7 +244,7 @@ import './time-picker/style/index.mjs'
|
|
|
244
244
|
import './tooltip/style/index.mjs'
|
|
245
245
|
import './uploader/style/index.mjs'
|
|
246
246
|
|
|
247
|
-
const version = '2.13.
|
|
247
|
+
const version = '2.13.2'
|
|
248
248
|
|
|
249
249
|
function install(app) {
|
|
250
250
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -162,7 +162,7 @@ export * from './time-picker/index.mjs'
|
|
|
162
162
|
export * from './tooltip/index.mjs'
|
|
163
163
|
export * from './uploader/index.mjs'
|
|
164
164
|
|
|
165
|
-
const version = '2.13.
|
|
165
|
+
const version = '2.13.2'
|
|
166
166
|
|
|
167
167
|
function install(app) {
|
|
168
168
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/menu/menu.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --menu-background-color: #fff;}.var-menu-enter-from,.var-menu-leave-to { opacity: 0;}.var-menu-enter-active,.var-menu-leave-active { transition-property: opacity; transition-duration: 0.
|
|
1
|
+
:root { --menu-background-color: #fff;}.var-menu { display: inline-block;}.var-menu-enter-from,.var-menu-leave-to { opacity: 0; transform: scale(0.8);}.var-menu-enter-active,.var-menu-leave-active { transition-property: opacity, transform; transition-duration: 0.2s;}.var-menu--menu-background-color { background: var(--menu-background-color);}
|
package/es/menu/usePopover.mjs
CHANGED
|
@@ -45,6 +45,38 @@ export function usePopover(options) {
|
|
|
45
45
|
height: toPxNum(height)
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
+
var getTransformOrigin = () => {
|
|
49
|
+
switch (options.placement) {
|
|
50
|
+
case 'top':
|
|
51
|
+
case 'cover-bottom':
|
|
52
|
+
return 'bottom';
|
|
53
|
+
case 'top-start':
|
|
54
|
+
case 'right-end':
|
|
55
|
+
case 'cover-bottom-start':
|
|
56
|
+
return 'bottom left';
|
|
57
|
+
case 'top-end':
|
|
58
|
+
case 'left-end':
|
|
59
|
+
case 'cover-bottom-end':
|
|
60
|
+
return 'bottom right';
|
|
61
|
+
case 'bottom':
|
|
62
|
+
case 'cover-top':
|
|
63
|
+
return 'top';
|
|
64
|
+
case 'bottom-start':
|
|
65
|
+
case 'right-start':
|
|
66
|
+
case 'cover-top-start':
|
|
67
|
+
return 'top left';
|
|
68
|
+
case 'bottom-end':
|
|
69
|
+
case 'left-start':
|
|
70
|
+
case 'cover-top-end':
|
|
71
|
+
return 'top right';
|
|
72
|
+
case 'left':
|
|
73
|
+
case 'cover-right':
|
|
74
|
+
return 'right';
|
|
75
|
+
case 'right':
|
|
76
|
+
case 'cover-left':
|
|
77
|
+
return 'left';
|
|
78
|
+
}
|
|
79
|
+
};
|
|
48
80
|
var handleHostMouseenter = () => {
|
|
49
81
|
if (options.trigger !== 'hover') {
|
|
50
82
|
return;
|
|
@@ -213,8 +245,22 @@ export function usePopover(options) {
|
|
|
213
245
|
offset: [skidding, distance]
|
|
214
246
|
}
|
|
215
247
|
}), _extends({}, computeStyles, {
|
|
248
|
+
options: {
|
|
249
|
+
adaptive: false,
|
|
250
|
+
gpuAcceleration: false
|
|
251
|
+
},
|
|
216
252
|
enabled: show.value
|
|
217
|
-
})
|
|
253
|
+
}), {
|
|
254
|
+
name: 'applyTransformOrigin',
|
|
255
|
+
enabled: show.value,
|
|
256
|
+
phase: 'beforeWrite',
|
|
257
|
+
fn(_ref3) {
|
|
258
|
+
var {
|
|
259
|
+
state
|
|
260
|
+
} = _ref3;
|
|
261
|
+
state.styles.popper.transformOrigin = getTransformOrigin();
|
|
262
|
+
}
|
|
263
|
+
}];
|
|
218
264
|
return {
|
|
219
265
|
placement,
|
|
220
266
|
modifiers
|
package/es/select/Select.mjs
CHANGED
|
@@ -169,7 +169,7 @@ var __sfc__ = defineComponent({
|
|
|
169
169
|
resetValidation
|
|
170
170
|
} = useValidation();
|
|
171
171
|
var menuEl = ref(null);
|
|
172
|
-
var placement = computed(() => props.variant === 'outlined' ? 'bottom
|
|
172
|
+
var placement = computed(() => props.variant === 'outlined' ? 'bottom' : 'cover-top');
|
|
173
173
|
var placeholderColor = computed(() => {
|
|
174
174
|
var {
|
|
175
175
|
hint,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../styles/common.css'
|
|
2
|
+
import '../SnackbarSfc.css'
|
|
2
3
|
import '../../styles/elevation.css'
|
|
3
4
|
import '../../loading/loading.css'
|
|
4
5
|
import '../../button/button.css'
|
|
5
6
|
import '../../icon/icon.css'
|
|
6
7
|
import '../snackbar.css'
|
|
7
8
|
import '../coreSfc.css'
|
|
8
|
-
import '../SnackbarSfc.css'
|