cbvirtua 1.0.4 → 1.0.6
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 +1 -1
- package/v2/App.vue +56 -0
- package/v2/components/Dropdown.vue +28 -0
- package/v2/components/Menu.vue +9 -0
- package/v2/components/Popper.js +1011 -0
- package/v2/components/PopperContent.vue +270 -0
- package/v2/components/PopperMethods.js +17 -0
- package/v2/components/PopperWrapper.vue +101 -0
- package/v2/components/ResizeObserver.vue +151 -0
- package/v2/components/ThemeClass.js +9 -0
- package/v2/components/Tooltip.vue +22 -0
- package/v2/components/TooltipDirective.vue +171 -0
- package/v2/config.js +133 -0
- package/v2/directives/v-close-popper.js +67 -0
- package/v2/directives/v-tooltip.js +116 -0
- package/v2/floating-ui/core/computeCoordsFromPlacement.js +39 -0
- package/v2/floating-ui/core/computePosition.js +52 -0
- package/v2/floating-ui/core/detectOverflow.js +36 -0
- package/v2/floating-ui/core/enums.js +7 -0
- package/v2/floating-ui/core/index.js +11 -0
- package/v2/floating-ui/core/middleware/arrow.js +52 -0
- package/v2/floating-ui/core/middleware/autoPlacement.js +84 -0
- package/v2/floating-ui/core/middleware/flip.js +82 -0
- package/v2/floating-ui/core/middleware/hide.js +36 -0
- package/v2/floating-ui/core/middleware/inline.js +100 -0
- package/v2/floating-ui/core/middleware/offset.js +26 -0
- package/v2/floating-ui/core/middleware/shift.js +99 -0
- package/v2/floating-ui/core/middleware/size.js +58 -0
- package/v2/floating-ui/core/types.js +11 -0
- package/v2/floating-ui/core/utils/expandPaddingObject.js +3 -0
- package/v2/floating-ui/core/utils/getAlignment.js +3 -0
- package/v2/floating-ui/core/utils/getAlignmentSides.js +23 -0
- package/v2/floating-ui/core/utils/getBasePlacement.js +3 -0
- package/v2/floating-ui/core/utils/getCrossAxis.js +3 -0
- package/v2/floating-ui/core/utils/getExpandedPlacements.js +10 -0
- package/v2/floating-ui/core/utils/getLengthFromAxis.js +3 -0
- package/v2/floating-ui/core/utils/getMainAxisFromPlacement.js +4 -0
- package/v2/floating-ui/core/utils/getOppositeAlignmentPlacement.js +4 -0
- package/v2/floating-ui/core/utils/getOppositePlacement.js +4 -0
- package/v2/floating-ui/core/utils/getPaddingObject.js +6 -0
- package/v2/floating-ui/core/utils/math.js +2 -0
- package/v2/floating-ui/core/utils/rectToClientRect.js +9 -0
- package/v2/floating-ui/core/utils/within.js +4 -0
- package/v2/floating-ui/dom/index.js +5 -0
- package/v2/floating-ui/dom/platform.js +20 -0
- package/v2/floating-ui/dom/utils/contains.js +22 -0
- package/v2/floating-ui/dom/utils/convertOffsetParentRelativeRectToViewportRelativeRect.js +35 -0
- package/v2/floating-ui/dom/utils/getBoundingClientRect.js +27 -0
- package/v2/floating-ui/dom/utils/getClippingClientRect.js +76 -0
- package/v2/floating-ui/dom/utils/getComputedStyle.js +4 -0
- package/v2/floating-ui/dom/utils/getDimensions.js +6 -0
- package/v2/floating-ui/dom/utils/getDocumentElement.js +4 -0
- package/v2/floating-ui/dom/utils/getDocumentRect.js +21 -0
- package/v2/floating-ui/dom/utils/getNodeName.js +4 -0
- package/v2/floating-ui/dom/utils/getNodeScroll.js +13 -0
- package/v2/floating-ui/dom/utils/getOffsetParent.js +43 -0
- package/v2/floating-ui/dom/utils/getParentNode.js +16 -0
- package/v2/floating-ui/dom/utils/getRectRelativeToOffsetParent.js +40 -0
- package/v2/floating-ui/dom/utils/getScrollParent.js +13 -0
- package/v2/floating-ui/dom/utils/getScrollParents.js +18 -0
- package/v2/floating-ui/dom/utils/getViewportRect.js +25 -0
- package/v2/floating-ui/dom/utils/getWindowScrollBarX.js +9 -0
- package/v2/floating-ui/dom/utils/is.js +38 -0
- package/v2/floating-ui/dom/utils/math.js +3 -0
- package/v2/floating-ui/dom/utils/window.js +13 -0
- package/v2/index.js +75 -0
- package/v2/util/assign-deep.js +12 -0
- package/v2/util/env.js +18 -0
- package/v2/util/events.js +12 -0
- package/v2/util/frame.js +5 -0
- package/v2/util/lang.js +6 -0
- package/v2/util/popper.js +5 -0
- package/vue2/VList.js +55 -55
package/package.json
CHANGED
package/v2/App.vue
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="app">
|
|
3
|
+
<Dropdown :distance="6">
|
|
4
|
+
<button>Click me</button>
|
|
5
|
+
<template #popper>
|
|
6
|
+
<button v-close-popper="myBooleanProp" @click="hide">Close</button>
|
|
7
|
+
</template>
|
|
8
|
+
</Dropdown>
|
|
9
|
+
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import {
|
|
15
|
+
// Directives
|
|
16
|
+
vTooltip,
|
|
17
|
+
VClosePopper,
|
|
18
|
+
// Components
|
|
19
|
+
Dropdown,
|
|
20
|
+
Tooltip,
|
|
21
|
+
Menu
|
|
22
|
+
} from './components/v2'
|
|
23
|
+
console.log(VClosePopper)
|
|
24
|
+
export default {
|
|
25
|
+
name: 'App',
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
myBooleanProp: true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
directives: {
|
|
32
|
+
'close-popper': VClosePopper
|
|
33
|
+
},
|
|
34
|
+
components: {
|
|
35
|
+
Dropdown
|
|
36
|
+
},
|
|
37
|
+
methods: {
|
|
38
|
+
hide() {
|
|
39
|
+
console.log(123)
|
|
40
|
+
this.myBooleanProp = true
|
|
41
|
+
console.log(this.myBooleanProp)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style>
|
|
48
|
+
#app {
|
|
49
|
+
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
50
|
+
-webkit-font-smoothing: antialiased;
|
|
51
|
+
-moz-osx-font-smoothing: grayscale;
|
|
52
|
+
text-align: center;
|
|
53
|
+
color: #2c3e50;
|
|
54
|
+
margin-top: 60px;
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import PopperWrapper from './PopperWrapper.vue'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
...PopperWrapper,
|
|
6
|
+
name: 'VDropdown',
|
|
7
|
+
vPopperTheme: 'dropdown',
|
|
8
|
+
}
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<style>
|
|
12
|
+
.v-popper--theme-dropdown .v-popper__inner {
|
|
13
|
+
background: #fff;
|
|
14
|
+
color: black;
|
|
15
|
+
border-radius: 6px;
|
|
16
|
+
border: 1px solid #ddd;
|
|
17
|
+
box-shadow: 0 6px 30px rgba(0, 0, 0, .1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.v-popper--theme-dropdown .v-popper__arrow-inner {
|
|
21
|
+
visibility: visible;
|
|
22
|
+
border-color: #fff;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.v-popper--theme-dropdown .v-popper__arrow-outer {
|
|
26
|
+
border-color: #ddd;
|
|
27
|
+
}
|
|
28
|
+
</style>
|