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.
Files changed (73) hide show
  1. package/package.json +1 -1
  2. package/v2/App.vue +56 -0
  3. package/v2/components/Dropdown.vue +28 -0
  4. package/v2/components/Menu.vue +9 -0
  5. package/v2/components/Popper.js +1011 -0
  6. package/v2/components/PopperContent.vue +270 -0
  7. package/v2/components/PopperMethods.js +17 -0
  8. package/v2/components/PopperWrapper.vue +101 -0
  9. package/v2/components/ResizeObserver.vue +151 -0
  10. package/v2/components/ThemeClass.js +9 -0
  11. package/v2/components/Tooltip.vue +22 -0
  12. package/v2/components/TooltipDirective.vue +171 -0
  13. package/v2/config.js +133 -0
  14. package/v2/directives/v-close-popper.js +67 -0
  15. package/v2/directives/v-tooltip.js +116 -0
  16. package/v2/floating-ui/core/computeCoordsFromPlacement.js +39 -0
  17. package/v2/floating-ui/core/computePosition.js +52 -0
  18. package/v2/floating-ui/core/detectOverflow.js +36 -0
  19. package/v2/floating-ui/core/enums.js +7 -0
  20. package/v2/floating-ui/core/index.js +11 -0
  21. package/v2/floating-ui/core/middleware/arrow.js +52 -0
  22. package/v2/floating-ui/core/middleware/autoPlacement.js +84 -0
  23. package/v2/floating-ui/core/middleware/flip.js +82 -0
  24. package/v2/floating-ui/core/middleware/hide.js +36 -0
  25. package/v2/floating-ui/core/middleware/inline.js +100 -0
  26. package/v2/floating-ui/core/middleware/offset.js +26 -0
  27. package/v2/floating-ui/core/middleware/shift.js +99 -0
  28. package/v2/floating-ui/core/middleware/size.js +58 -0
  29. package/v2/floating-ui/core/types.js +11 -0
  30. package/v2/floating-ui/core/utils/expandPaddingObject.js +3 -0
  31. package/v2/floating-ui/core/utils/getAlignment.js +3 -0
  32. package/v2/floating-ui/core/utils/getAlignmentSides.js +23 -0
  33. package/v2/floating-ui/core/utils/getBasePlacement.js +3 -0
  34. package/v2/floating-ui/core/utils/getCrossAxis.js +3 -0
  35. package/v2/floating-ui/core/utils/getExpandedPlacements.js +10 -0
  36. package/v2/floating-ui/core/utils/getLengthFromAxis.js +3 -0
  37. package/v2/floating-ui/core/utils/getMainAxisFromPlacement.js +4 -0
  38. package/v2/floating-ui/core/utils/getOppositeAlignmentPlacement.js +4 -0
  39. package/v2/floating-ui/core/utils/getOppositePlacement.js +4 -0
  40. package/v2/floating-ui/core/utils/getPaddingObject.js +6 -0
  41. package/v2/floating-ui/core/utils/math.js +2 -0
  42. package/v2/floating-ui/core/utils/rectToClientRect.js +9 -0
  43. package/v2/floating-ui/core/utils/within.js +4 -0
  44. package/v2/floating-ui/dom/index.js +5 -0
  45. package/v2/floating-ui/dom/platform.js +20 -0
  46. package/v2/floating-ui/dom/utils/contains.js +22 -0
  47. package/v2/floating-ui/dom/utils/convertOffsetParentRelativeRectToViewportRelativeRect.js +35 -0
  48. package/v2/floating-ui/dom/utils/getBoundingClientRect.js +27 -0
  49. package/v2/floating-ui/dom/utils/getClippingClientRect.js +76 -0
  50. package/v2/floating-ui/dom/utils/getComputedStyle.js +4 -0
  51. package/v2/floating-ui/dom/utils/getDimensions.js +6 -0
  52. package/v2/floating-ui/dom/utils/getDocumentElement.js +4 -0
  53. package/v2/floating-ui/dom/utils/getDocumentRect.js +21 -0
  54. package/v2/floating-ui/dom/utils/getNodeName.js +4 -0
  55. package/v2/floating-ui/dom/utils/getNodeScroll.js +13 -0
  56. package/v2/floating-ui/dom/utils/getOffsetParent.js +43 -0
  57. package/v2/floating-ui/dom/utils/getParentNode.js +16 -0
  58. package/v2/floating-ui/dom/utils/getRectRelativeToOffsetParent.js +40 -0
  59. package/v2/floating-ui/dom/utils/getScrollParent.js +13 -0
  60. package/v2/floating-ui/dom/utils/getScrollParents.js +18 -0
  61. package/v2/floating-ui/dom/utils/getViewportRect.js +25 -0
  62. package/v2/floating-ui/dom/utils/getWindowScrollBarX.js +9 -0
  63. package/v2/floating-ui/dom/utils/is.js +38 -0
  64. package/v2/floating-ui/dom/utils/math.js +3 -0
  65. package/v2/floating-ui/dom/utils/window.js +13 -0
  66. package/v2/index.js +75 -0
  67. package/v2/util/assign-deep.js +12 -0
  68. package/v2/util/env.js +18 -0
  69. package/v2/util/events.js +12 -0
  70. package/v2/util/frame.js +5 -0
  71. package/v2/util/lang.js +6 -0
  72. package/v2/util/popper.js +5 -0
  73. package/vue2/VList.js +55 -55
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cbvirtua",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
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>
@@ -0,0 +1,9 @@
1
+ <script lang="ts">
2
+ import PopperWrapper from './PopperWrapper.vue'
3
+
4
+ export default {
5
+ ...PopperWrapper,
6
+ name: 'VMenu',
7
+ vPopperTheme: 'menu',
8
+ }
9
+ </script>