@luanlu/mk-motion 1.1.0 → 1.2.1
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 +14 -2
- package/src/a11y/focus-trap.ts +64 -0
- package/src/a11y/keyboard.ts +43 -0
- package/src/components/alert/alert.css +111 -0
- package/src/components/alert/alert.ts +107 -0
- package/src/components/avatar/avatar.css +112 -0
- package/src/components/avatar/avatar.ts +175 -0
- package/src/components/breadcrumb/breadcrumb.css +31 -0
- package/src/components/breadcrumb/breadcrumb.ts +71 -0
- package/src/components/button/button.css +108 -0
- package/src/components/button/button.ts +140 -0
- package/src/components/card/card.css +52 -0
- package/src/components/card/card.ts +87 -0
- package/src/components/collapse/collapse.css +76 -0
- package/src/components/collapse/collapse.ts +168 -0
- package/src/components/dialog/dialog.css +78 -0
- package/src/components/dialog/dialog.ts +164 -0
- package/src/components/drawer/drawer.css +73 -0
- package/src/components/drawer/drawer.ts +131 -0
- package/src/components/empty/empty.css +36 -0
- package/src/components/empty/empty.ts +85 -0
- package/src/components/form/checkbox.css +56 -0
- package/src/components/form/checkbox.ts +119 -0
- package/src/components/form/radio.css +57 -0
- package/src/components/form/radio.ts +153 -0
- package/src/components/form/select.css +91 -0
- package/src/components/form/select.ts +174 -0
- package/src/components/form/slider.css +56 -0
- package/src/components/form/slider.ts +148 -0
- package/src/components/input/input.css +92 -0
- package/src/components/input/input.ts +162 -0
- package/src/components/layout/divider.css +32 -0
- package/src/components/layout/divider.ts +42 -0
- package/src/components/layout/row.css +64 -0
- package/src/components/layout/row.ts +57 -0
- package/src/components/layout/space.css +14 -0
- package/src/components/layout/space.ts +48 -0
- package/src/components/loading/loading.css +37 -0
- package/src/components/loading/loading.ts +46 -0
- package/src/components/menu/menu.css +121 -0
- package/src/components/menu/menu.ts +187 -0
- package/src/components/message/message.css +64 -0
- package/src/components/message/message.ts +96 -0
- package/src/components/popover/popover.css +73 -0
- package/src/components/popover/popover.ts +279 -0
- package/src/components/progress/progress.css +112 -0
- package/src/components/progress/progress.ts +171 -0
- package/src/components/steps/steps.css +127 -0
- package/src/components/steps/steps.ts +102 -0
- package/src/components/styles/components.css +28 -0
- package/src/components/styles/reset.css +24 -0
- package/src/components/styles/tokens.css +248 -0
- package/src/components/styles/variables.css +24 -0
- package/src/components/switch/switch.css +53 -0
- package/src/components/switch/switch.ts +103 -0
- package/src/components/table/table.css +192 -0
- package/src/components/table/table.ts +370 -0
- package/src/components/tabs/tabs.css +138 -0
- package/src/components/tabs/tabs.ts +211 -0
- package/src/components/tag/tag.css +123 -0
- package/src/components/tag/tag.ts +112 -0
- package/src/components/tooltip/tooltip.css +66 -0
- package/src/components/tooltip/tooltip.ts +185 -0
- package/src/core/animator.ts +124 -0
- package/src/core/timeline.ts +128 -0
- package/src/core/utils.ts +47 -0
- package/src/effects/glitch.ts +99 -0
- package/src/effects/particle.ts +134 -0
- package/src/effects/text-split.ts +95 -0
- package/src/effects/wave-text.ts +88 -0
- package/src/gesture/draggable.ts +130 -0
- package/src/gesture/spring.ts +152 -0
- package/src/index.ts +162 -0
- package/src/interactive/coverflow.ts +100 -0
- package/src/interactive/cursor-trail.ts +113 -0
- package/src/interactive/flip-card.ts +114 -0
- package/src/interactive/magnetic.ts +121 -0
- package/src/micro/hover-lift.ts +94 -0
- package/src/micro/ripple.ts +130 -0
- package/src/motion/component-motion.ts +177 -0
- package/src/nuxt/module.ts +46 -0
- package/src/presets/index.ts +69 -0
- package/src/scroll/scroll-trigger.ts +104 -0
- package/src/styles/animations.css +135 -0
- package/src/styles/element-plus.css +174 -0
- package/src/text/count-up.ts +108 -0
- package/src/text/typewriter.ts +109 -0
- package/src/theme/dark.css +19 -0
- package/src/theme/light.css +19 -0
- package/src/theme/theme.ts +65 -0
- package/src/transitions/blur-reveal.ts +92 -0
- package/src/transitions/collapse.ts +112 -0
- package/src/transitions/lazy-image.ts +87 -0
- package/src/transitions/list.ts +75 -0
- package/src/transitions/loading.ts +95 -0
- package/src/transitions/parallax.ts +60 -0
- package/src/transitions/shimmer.ts +105 -0
- package/src/transitions/toast.ts +151 -0
- package/src/types.d.ts +4 -0
- package/src/vite/plugin.ts +45 -0
- package/src/vue/button.ts +28 -9
- package/src/vue/card.ts +28 -8
- package/src/vue/composables/index.ts +4 -0
- package/src/vue/composables/useLoading.ts +12 -0
- package/src/vue/composables/useMessage.ts +16 -0
- package/src/vue/composables/useMotion.ts +19 -0
- package/src/vue/composables/useTheme.ts +12 -0
- package/src/vue/dialog.ts +69 -17
- package/src/vue/index.ts +4 -21
- package/src/vue/input.ts +35 -11
- package/src/vue/slider.ts +22 -4
- package/src/vue/switch.ts +16 -9
- package/src/vue/alert.ts +0 -32
- package/src/vue/avatar.ts +0 -34
- package/src/vue/breadcrumb.ts +0 -32
- package/src/vue/checkbox.ts +0 -32
- package/src/vue/collapse.ts +0 -33
- package/src/vue/divider.ts +0 -32
- package/src/vue/drawer.ts +0 -33
- package/src/vue/empty.ts +0 -33
- package/src/vue/menu.ts +0 -33
- package/src/vue/popover.ts +0 -34
- package/src/vue/progress.ts +0 -33
- package/src/vue/row.ts +0 -32
- package/src/vue/select.ts +0 -33
- package/src/vue/space.ts +0 -32
- package/src/vue/steps.ts +0 -33
- package/src/vue/table.ts +0 -33
- package/src/vue/tabs.ts +0 -33
- package/src/vue/tag.ts +0 -33
- package/src/vue/tooltip.ts +0 -34
package/src/vue/row.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { defineComponent, h, ref, onMounted, onUnmounted, watch } from 'vue'
|
|
2
|
-
import { createRow } from '../components/layout/row.js'
|
|
3
|
-
import type { RowOptions } from '../components/layout/row.js'
|
|
4
|
-
|
|
5
|
-
export const MkRow = defineComponent({
|
|
6
|
-
name: 'MkRow',
|
|
7
|
-
props: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
setup(props, { emit, slots }) {
|
|
13
|
-
const container = ref<HTMLDivElement>()
|
|
14
|
-
let instance: ReturnType<typeof createRow> | null = null
|
|
15
|
-
|
|
16
|
-
const create = () => {
|
|
17
|
-
if (!container.value) return
|
|
18
|
-
instance?.destroy()
|
|
19
|
-
instance = createRow(container.value, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
onMounted(create)
|
|
27
|
-
|
|
28
|
-
onUnmounted(() => instance?.destroy())
|
|
29
|
-
|
|
30
|
-
return () => h('div', { ref: container })
|
|
31
|
-
},
|
|
32
|
-
})
|
package/src/vue/select.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { defineComponent, h, ref, onMounted, onUnmounted, watch } from 'vue'
|
|
2
|
-
import { createSelect } from '../components/form/select.js'
|
|
3
|
-
import type { SelectOptions } from '../components/form/select.js'
|
|
4
|
-
|
|
5
|
-
export const MkSelect = defineComponent({
|
|
6
|
-
name: 'MkSelect',
|
|
7
|
-
props: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
setup(props, { emit, slots }) {
|
|
13
|
-
const container = ref<HTMLDivElement>()
|
|
14
|
-
let instance: ReturnType<typeof createSelect> | null = null
|
|
15
|
-
|
|
16
|
-
const create = () => {
|
|
17
|
-
if (!container.value) return
|
|
18
|
-
instance?.destroy()
|
|
19
|
-
instance = createSelect(container.value, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
onMounted(create)
|
|
27
|
-
|
|
28
|
-
watch(() => props.value, (v) => instance?.setValue(v))
|
|
29
|
-
onUnmounted(() => instance?.destroy())
|
|
30
|
-
|
|
31
|
-
return () => h('div', { ref: container })
|
|
32
|
-
},
|
|
33
|
-
})
|
package/src/vue/space.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { defineComponent, h, ref, onMounted, onUnmounted, watch } from 'vue'
|
|
2
|
-
import { createSpace } from '../components/layout/space.js'
|
|
3
|
-
import type { SpaceOptions } from '../components/layout/space.js'
|
|
4
|
-
|
|
5
|
-
export const MkSpace = defineComponent({
|
|
6
|
-
name: 'MkSpace',
|
|
7
|
-
props: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
setup(props, { emit, slots }) {
|
|
13
|
-
const container = ref<HTMLDivElement>()
|
|
14
|
-
let instance: ReturnType<typeof createSpace> | null = null
|
|
15
|
-
|
|
16
|
-
const create = () => {
|
|
17
|
-
if (!container.value) return
|
|
18
|
-
instance?.destroy()
|
|
19
|
-
instance = createSpace(container.value, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
onMounted(create)
|
|
27
|
-
|
|
28
|
-
onUnmounted(() => instance?.destroy())
|
|
29
|
-
|
|
30
|
-
return () => h('div', { ref: container })
|
|
31
|
-
},
|
|
32
|
-
})
|
package/src/vue/steps.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { defineComponent, h, ref, onMounted, onUnmounted, watch } from 'vue'
|
|
2
|
-
import { createSteps } from '../components/steps/steps.js'
|
|
3
|
-
import type { StepsOptions } from '../components/steps/steps.js'
|
|
4
|
-
|
|
5
|
-
export const MkSteps = defineComponent({
|
|
6
|
-
name: 'MkSteps',
|
|
7
|
-
props: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
setup(props, { emit, slots }) {
|
|
13
|
-
const container = ref<HTMLDivElement>()
|
|
14
|
-
let instance: ReturnType<typeof createSteps> | null = null
|
|
15
|
-
|
|
16
|
-
const create = () => {
|
|
17
|
-
if (!container.value) return
|
|
18
|
-
instance?.destroy()
|
|
19
|
-
instance = createSteps(container.value, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
onMounted(create)
|
|
27
|
-
|
|
28
|
-
watch(() => props.current, (v) => instance?.setCurrent(v))
|
|
29
|
-
onUnmounted(() => instance?.destroy())
|
|
30
|
-
|
|
31
|
-
return () => h('div', { ref: container })
|
|
32
|
-
},
|
|
33
|
-
})
|
package/src/vue/table.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { defineComponent, h, ref, onMounted, onUnmounted, watch } from 'vue'
|
|
2
|
-
import { createTable } from '../components/table/table.js'
|
|
3
|
-
import type { TableOptions } from '../components/table/table.js'
|
|
4
|
-
|
|
5
|
-
export const MkTable = defineComponent({
|
|
6
|
-
name: 'MkTable',
|
|
7
|
-
props: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
setup(props, { emit, slots }) {
|
|
13
|
-
const container = ref<HTMLDivElement>()
|
|
14
|
-
let instance: ReturnType<typeof createTable> | null = null
|
|
15
|
-
|
|
16
|
-
const create = () => {
|
|
17
|
-
if (!container.value) return
|
|
18
|
-
instance?.destroy()
|
|
19
|
-
instance = createTable(container.value, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
onMounted(create)
|
|
27
|
-
|
|
28
|
-
watch(() => props.data, (v) => instance?.setData(v))
|
|
29
|
-
onUnmounted(() => instance?.destroy())
|
|
30
|
-
|
|
31
|
-
return () => h('div', { ref: container })
|
|
32
|
-
},
|
|
33
|
-
})
|
package/src/vue/tabs.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { defineComponent, h, ref, onMounted, onUnmounted, watch } from 'vue'
|
|
2
|
-
import { createTabs } from '../components/tabs/tabs.js'
|
|
3
|
-
import type { TabsOptions } from '../components/tabs/tabs.js'
|
|
4
|
-
|
|
5
|
-
export const MkTabs = defineComponent({
|
|
6
|
-
name: 'MkTabs',
|
|
7
|
-
props: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
setup(props, { emit, slots }) {
|
|
13
|
-
const container = ref<HTMLDivElement>()
|
|
14
|
-
let instance: ReturnType<typeof createTabs> | null = null
|
|
15
|
-
|
|
16
|
-
const create = () => {
|
|
17
|
-
if (!container.value) return
|
|
18
|
-
instance?.destroy()
|
|
19
|
-
instance = createTabs(container.value, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
onMounted(create)
|
|
27
|
-
|
|
28
|
-
watch(() => props.active, (v) => instance?.setActive(v))
|
|
29
|
-
onUnmounted(() => instance?.destroy())
|
|
30
|
-
|
|
31
|
-
return () => h('div', { ref: container })
|
|
32
|
-
},
|
|
33
|
-
})
|
package/src/vue/tag.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { defineComponent, h, ref, onMounted, onUnmounted, watch } from 'vue'
|
|
2
|
-
import { createTag } from '../components/tag/tag.js'
|
|
3
|
-
import type { TagOptions } from '../components/tag/tag.js'
|
|
4
|
-
|
|
5
|
-
export const MkTag = defineComponent({
|
|
6
|
-
name: 'MkTag',
|
|
7
|
-
props: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
setup(props, { emit, slots }) {
|
|
13
|
-
const container = ref<HTMLDivElement>()
|
|
14
|
-
let instance: ReturnType<typeof createTag> | null = null
|
|
15
|
-
|
|
16
|
-
const create = () => {
|
|
17
|
-
if (!container.value) return
|
|
18
|
-
instance?.destroy()
|
|
19
|
-
instance = createTag(container.value, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
onMounted(create)
|
|
27
|
-
|
|
28
|
-
watch(() => props.text, (v) => instance?.setText(v))
|
|
29
|
-
onUnmounted(() => instance?.destroy())
|
|
30
|
-
|
|
31
|
-
return () => h('div', { ref: container })
|
|
32
|
-
},
|
|
33
|
-
})
|
package/src/vue/tooltip.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { defineComponent, h, ref, onMounted, onUnmounted, watch } from 'vue'
|
|
2
|
-
import { createTooltip } from '../components/tooltip/tooltip.js'
|
|
3
|
-
import type { TooltipOptions } from '../components/tooltip/tooltip.js'
|
|
4
|
-
|
|
5
|
-
export const MkTooltip = defineComponent({
|
|
6
|
-
name: 'MkTooltip',
|
|
7
|
-
props: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
setup(props, { emit, slots }) {
|
|
13
|
-
const container = ref<HTMLDivElement>()
|
|
14
|
-
let instance: ReturnType<typeof createTooltip> | null = null
|
|
15
|
-
|
|
16
|
-
const create = () => {
|
|
17
|
-
if (!container.value) return
|
|
18
|
-
instance?.destroy()
|
|
19
|
-
instance = createTooltip(container.value, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
onMounted(create)
|
|
27
|
-
|
|
28
|
-
watch(() => props.tooltipContent, (v) => instance?.setTooltipContent(v))
|
|
29
|
-
watch(() => props.timeout, (v) => instance?.setTimeout(v))
|
|
30
|
-
onUnmounted(() => instance?.destroy())
|
|
31
|
-
|
|
32
|
-
return () => h('div', { ref: container })
|
|
33
|
-
},
|
|
34
|
-
})
|