@mythpe/quasar-ui-qui 0.2.17 → 0.2.19
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
CHANGED
|
@@ -6,15 +6,19 @@
|
|
|
6
6
|
* Github: https://github.com/mythpe
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { useMyth } from '../../composable'
|
|
10
|
-
|
|
11
9
|
export function useTransition (props: any) {
|
|
12
|
-
const { theme } = useMyth()
|
|
13
10
|
const getClasses = (mode: 'in' | 'out') => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
if (mode === 'in' && props.enterActiveClass) {
|
|
12
|
+
return `animated ${props.enterActiveClass}`
|
|
13
|
+
}
|
|
14
|
+
if (mode === 'out' && props.leaveActiveClass) {
|
|
15
|
+
return `animated ${props.leaveActiveClass}`
|
|
16
|
+
}
|
|
17
|
+
const activeClass = props[mode]
|
|
18
|
+
if (!activeClass) {
|
|
19
|
+
return undefined
|
|
20
|
+
}
|
|
21
|
+
const classes: string[] = ['animated', activeClass]
|
|
18
22
|
const keys = [
|
|
19
23
|
`${mode}Slower`,
|
|
20
24
|
`${mode}Slow`,
|
|
@@ -109,14 +109,14 @@ export type TransitionDelay = boolean | string | number;
|
|
|
109
109
|
export type TransitionRepeat = boolean | string | number;
|
|
110
110
|
|
|
111
111
|
interface BaseTransitionProps {
|
|
112
|
-
in?: TransitionClass;
|
|
112
|
+
in?: TransitionClass | null;
|
|
113
113
|
inSlower?: boolean;
|
|
114
114
|
inSlow?: boolean;
|
|
115
115
|
inFast?: boolean;
|
|
116
116
|
inFaster?: boolean;
|
|
117
117
|
inDelay?: TransitionDelay;
|
|
118
118
|
inRepeat?: TransitionRepeat;
|
|
119
|
-
out?: TransitionClass;
|
|
119
|
+
out?: TransitionClass | null;
|
|
120
120
|
outSlower?: boolean;
|
|
121
121
|
outSlow?: boolean;
|
|
122
122
|
outFast?: boolean;
|