renusify 2.5.1 → 3.0.0
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/components/app/index.vue +74 -22
- package/components/app/toast/index.vue +76 -71
- package/components/app/toast/toast.vue +62 -44
- package/components/avatar/index.vue +208 -84
- package/components/button/buttonConfirm.vue +53 -26
- package/components/button/buttonGroup.js +0 -2
- package/components/button/buttonGroup.vue +310 -62
- package/components/button/index.vue +584 -100
- package/components/calendar/index.js +0 -2
- package/components/calendar/index.vue +326 -262
- package/components/calendar/month.vue +64 -55
- package/components/calendar/year.vue +30 -25
- package/components/card/index.vue +139 -59
- package/components/codeEditor/highlightCss.vue +38 -39
- package/components/codeEditor/highlightHtml.vue +64 -64
- package/components/codeEditor/highlightJs.vue +37 -38
- package/components/codeEditor/index.vue +129 -79
- package/components/codeEditor/run.vue +225 -39
- package/components/codeEditor/useCodeFormatter.js +150 -0
- package/components/confirm/index.vue +140 -81
- package/components/container/col.vue +5 -4
- package/components/container/divider.vue +28 -19
- package/components/container/index.vue +34 -15
- package/components/container/row.vue +26 -9
- package/components/container/spacer.vue +2 -4
- package/components/container/style.scss +3 -0
- package/components/content/index.vue +49 -32
- package/components/cropper/index.vue +401 -244
- package/components/float/index.vue +542 -415
- package/components/form/addressInput/index.vue +184 -109
- package/components/form/camInput/index.vue +370 -244
- package/components/form/checkInput/index.vue +138 -71
- package/components/form/checkboxInput/index.vue +87 -47
- package/components/form/colorInput/Alpha.vue +81 -83
- package/components/form/colorInput/Hue.vue +91 -68
- package/components/form/colorInput/Preview.vue +43 -47
- package/components/form/colorInput/Saturation.vue +101 -86
- package/components/form/colorInput/index.vue +72 -40
- package/components/form/colorInput/picker.vue +111 -106
- package/components/form/colorInput/useColor.js +153 -0
- package/components/form/dateInput/index.vue +691 -356
- package/components/form/dateInput/month.vue +63 -54
- package/components/form/dateInput/year.vue +35 -25
- package/components/form/fileInput/index.js +0 -1
- package/components/form/fileInput/index.vue +263 -106
- package/components/form/fileInput/single.vue +323 -164
- package/components/form/groupInput/index.vue +199 -101
- package/components/form/index.vue +189 -83
- package/components/form/input/index.vue +416 -377
- package/components/form/jsonInput/JsonView.vue +54 -56
- package/components/form/jsonInput/index.vue +247 -165
- package/components/form/maskInput/index.vue +252 -132
- package/components/form/numberInput/index.js +0 -1
- package/components/form/numberInput/index.vue +226 -117
- package/components/form/passwordInput/index.js +2 -1
- package/components/form/passwordInput/index.vue +269 -102
- package/components/form/radioInput/index.vue +143 -72
- package/components/form/rangeInput/index.vue +280 -167
- package/components/form/ratingInput/index.vue +57 -57
- package/components/form/selectInput/index.js +1 -3
- package/components/form/selectInput/index.vue +584 -296
- package/components/form/switchInput/index.vue +73 -59
- package/components/form/telInput/index.js +0 -1
- package/components/form/telInput/index.vue +238 -135
- package/components/form/textArea/index.vue +72 -35
- package/components/form/textEditor/index.vue +739 -0
- package/components/form/{text-editor → textEditor}/style.scss +8 -16
- package/components/form/textInput/index.vue +54 -32
- package/components/form/timeInput/index.vue +83 -56
- package/components/form/timeInput/range.vue +116 -95
- package/components/form/timeInput/timepicker.vue +382 -449
- package/components/form/uniqueInput/index.vue +105 -48
- package/components/form/unitInput/index.vue +139 -84
- package/components/formCreator/index.js +0 -1
- package/components/formCreator/index.vue +314 -148
- package/components/highlight/index.vue +41 -25
- package/components/highlight/style.scss +2 -2
- package/components/highlight/{mixin.js → useHighlight.js} +181 -160
- package/components/icon/index.vue +79 -33
- package/components/img/index.vue +249 -147
- package/components/img/preview.vue +180 -198
- package/components/img/svgImg.vue +42 -39
- package/components/index.js +5 -20
- package/components/infinite/index.js +1 -2
- package/components/infinite/index.vue +248 -66
- package/components/map/index.vue +428 -261
- package/components/map/route.vue +794 -487
- package/components/map/select.vue +118 -58
- package/components/menu/index.vue +201 -91
- package/components/meta/meta.js +26 -3
- package/components/modal/index.vue +383 -158
- package/components/notify/index.vue +204 -86
- package/components/notify/notification.vue +38 -55
- package/components/progress/circle.vue +189 -70
- package/components/progress/line.vue +266 -46
- package/components/searchBox/index.js +1 -3
- package/components/searchBox/index.vue +194 -101
- package/components/skeleton/index.vue +45 -20
- package/components/slider/index.vue +318 -156
- package/components/swiper/index.vue +254 -106
- package/components/table/crud/footer.vue +77 -53
- package/components/table/crud/header.vue +71 -72
- package/components/table/crud/index.vue +631 -401
- package/components/table/index.vue +721 -278
- package/components/timeAgo/index.vue +145 -96
- package/components/tour/index.vue +338 -235
- package/components/tree/index.vue +235 -89
- package/components/tree/tree-element.vue +107 -106
- package/directive/animate/index.js +77 -0
- package/directive/clickOutSide/index.js +98 -0
- package/directive/drag/index.js +153 -0
- package/directive/index.js +11 -13
- package/directive/intersect/index.js +263 -0
- package/directive/mask/index.js +67 -0
- package/directive/parallax/index.js +78 -0
- package/directive/ripple/index.js +14 -0
- package/directive/scroll/index.js +244 -0
- package/directive/sortable/index.js +274 -0
- package/directive/title/index.js +75 -0
- package/directive/touch/index.js +268 -0
- package/index.js +10 -8
- package/package.json +5 -2
- package/plugins/validation/Validate.js +88 -79
- package/scripts/generate-docs.mjs +226 -0
- package/scripts/menu.mjs +240 -0
- package/scripts/parser.mjs +1086 -0
- package/style/_index.scss +7 -0
- package/style/app.scss +13 -65
- package/style/colors.scss +5 -22
- package/style/functions/index.scss +8 -0
- package/style/mixins/index.scss +17 -5
- package/style/variables/base.scss +154 -175
- package/style/variables/color.scss +0 -12
- package/style/variables/utilities.scss +0 -180
- package/tools/helper.js +0 -8
- package/tools/icons.js +6 -1
- package/tools/root.js +71 -0
- package/components/app/style.scss +0 -41
- package/components/app/toast/style.scss +0 -20
- package/components/avatar/style.scss +0 -32
- package/components/bar/bottomNav.js +0 -1
- package/components/bar/bottomNav.vue +0 -28
- package/components/bar/bottomNavigationCircle.js +0 -2
- package/components/bar/bottomNavigationCircle.vue +0 -99
- package/components/bar/scss/bottomNav.scss +0 -67
- package/components/bar/scss/toolbar.scss +0 -174
- package/components/bar/toolbar/index.js +0 -8
- package/components/bar/toolbar/index.vue +0 -35
- package/components/bar/toolbar/laptop.vue +0 -33
- package/components/bar/toolbar/menuChilds.vue +0 -41
- package/components/bar/toolbar/menuLaptop.vue +0 -41
- package/components/bar/toolbar/menuMob.vue +0 -39
- package/components/bar/toolbar/mixin.js +0 -43
- package/components/bar/toolbar/mobile.vue +0 -34
- package/components/breadcrumb/bredcrumbItem.vue +0 -39
- package/components/breadcrumb/index.js +0 -3
- package/components/breadcrumb/index.vue +0 -71
- package/components/breadcrumb/style.scss +0 -51
- package/components/button/style.scss +0 -411
- package/components/card/style.scss +0 -86
- package/components/chart/chart.js +0 -1
- package/components/chart/chart.vue +0 -69
- package/components/chart/worldMap.js +0 -2
- package/components/chart/worldMap.vue +0 -1112
- package/components/chat/MessageList.vue +0 -163
- package/components/chat/chatInput.vue +0 -150
- package/components/chat/chatMsg.vue +0 -276
- package/components/chat/index.js +0 -11
- package/components/chat/index.vue +0 -113
- package/components/chip/index.js +0 -3
- package/components/chip/index.vue +0 -77
- package/components/chip/style.scss +0 -199
- package/components/codeEditor/mixin.js +0 -145
- package/components/countdown/index.js +0 -1
- package/components/countdown/index.vue +0 -105
- package/components/form/colorInput/mixin.js +0 -132
- package/components/form/fileInput/file.js +0 -148
- package/components/form/telInput/assets/flags.png +0 -0
- package/components/form/telInput/assets/flags@2x.png +0 -0
- package/components/form/text-editor/index.vue +0 -710
- package/components/icon/style.scss +0 -17
- package/components/infinite/div.js +0 -6
- package/components/infinite/div.vue +0 -193
- package/components/infinite/page.js +0 -3
- package/components/infinite/page.vue +0 -105
- package/components/list/index.js +0 -3
- package/components/list/index.vue +0 -122
- package/components/list/style.scss +0 -66
- package/components/message/index.js +0 -4
- package/components/message/index.vue +0 -40
- package/components/modal/style.scss +0 -146
- package/components/nestable/NestableItem.vue +0 -307
- package/components/nestable/editable.js +0 -44
- package/components/nestable/index.js +0 -1
- package/components/nestable/index.vue +0 -226
- package/components/nestable/methods.js +0 -416
- package/components/progress/style.scss +0 -229
- package/components/table/style.scss +0 -338
- package/components/tabs/index.js +0 -3
- package/components/tabs/index.vue +0 -151
- package/components/timeline/index.js +0 -6
- package/components/timeline/index.vue +0 -76
- package/directive/resize/index.js +0 -30
- package/directive/skeleton/index.js +0 -27
- package/directive/skeleton/style.scss +0 -37
- package/plugins/request/Request.js +0 -68
- package/style/animation.scss +0 -94
- package/style/style.scss +0 -8
- package/tools/rootable.js +0 -75
- /package/components/form/{text-editor → textEditor}/index.js +0 -0
- /package/components/form/{text-editor → textEditor}/preview.js +0 -0
- /package/components/form/{text-editor → textEditor}/preview.vue +0 -0
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
import 'renusify/directive/animate/style.scss'
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @example // v-animate usage
|
|
5
|
+
* <template>
|
|
6
|
+
* <div class="container">
|
|
7
|
+
* <h1>Scroll to see animations</h1>
|
|
8
|
+
*
|
|
9
|
+
* <div v-animate="{ name: 'fade-up', duration: 0.5 }" class="box">
|
|
10
|
+
* Fade Up
|
|
11
|
+
* </div>
|
|
12
|
+
*
|
|
13
|
+
* <div v-animate="{ name: 'scaleIn', duration: 0.7, delay: 100 }" class="box">
|
|
14
|
+
* Scale In
|
|
15
|
+
* </div>
|
|
16
|
+
*
|
|
17
|
+
* <div v-animate.once="{ name: 'right', duration: 0.6, threshold: 0.2 }" class="box">
|
|
18
|
+
* Right (once)
|
|
19
|
+
* </div>
|
|
20
|
+
*
|
|
21
|
+
* <div v-animate="{ name: 'flipLeft', duration: 1, timing: 'ease-in-out' }" class="box">
|
|
22
|
+
* Flip Left
|
|
23
|
+
* </div>
|
|
24
|
+
*
|
|
25
|
+
* <div v-animate="{ name: 'down', duration: 0.4 }" class="box">
|
|
26
|
+
* Down
|
|
27
|
+
* </div>
|
|
28
|
+
*
|
|
29
|
+
* <div v-animate="{ name: 'left-fade', duration: 0.8 }" class="box">
|
|
30
|
+
* Left Fade
|
|
31
|
+
* </div>
|
|
32
|
+
*
|
|
33
|
+
* <div v-animate="{ name: 'scaleOut', duration: 0.9, delay: 200 }" class="box">
|
|
34
|
+
* Scale Out
|
|
35
|
+
* </div>
|
|
36
|
+
*
|
|
37
|
+
* <div v-animate.once="{ name: 'flipUp', duration: 1.2, threshold: 0.3 }" class="box">
|
|
38
|
+
* Flip Up (once)
|
|
39
|
+
* </div>
|
|
40
|
+
*
|
|
41
|
+
* <div v-animate="{ name: 'up', duration: 0.5 }" class="box">
|
|
42
|
+
* Up
|
|
43
|
+
* </div>
|
|
44
|
+
*
|
|
45
|
+
* <div v-animate="{ name: 'flipRight', duration: 1 }" class="box">
|
|
46
|
+
* Flip Right
|
|
47
|
+
* </div>
|
|
48
|
+
* </div>
|
|
49
|
+
* </template>
|
|
50
|
+
*
|
|
51
|
+
*
|
|
52
|
+
* <style>
|
|
53
|
+
* .container {
|
|
54
|
+
* padding: 2rem;
|
|
55
|
+
* min-height: 200vh;
|
|
56
|
+
* }
|
|
57
|
+
*
|
|
58
|
+
* h1 {
|
|
59
|
+
* text-align: center;
|
|
60
|
+
* margin-bottom: 3rem;
|
|
61
|
+
* font-size: 2.5rem;
|
|
62
|
+
* }
|
|
63
|
+
*
|
|
64
|
+
* .box {
|
|
65
|
+
* width: 300px;
|
|
66
|
+
* height: 150px;
|
|
67
|
+
* margin: 2rem auto;
|
|
68
|
+
* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
69
|
+
* color: white;
|
|
70
|
+
* display: flex;
|
|
71
|
+
* align-items: center;
|
|
72
|
+
* justify-content: center;
|
|
73
|
+
* font-size: 1.5rem;
|
|
74
|
+
* font-weight: bold;
|
|
75
|
+
* border-radius: 12px;
|
|
76
|
+
* box-shadow: 0 10px 20px rgba(0,0,0,0.1);
|
|
77
|
+
* }
|
|
78
|
+
* </style>
|
|
79
|
+
* */
|
|
3
80
|
function mounted(el, binding) {
|
|
4
81
|
const modifiers = binding.modifiers || {}
|
|
5
82
|
const value = binding.value
|
|
@@ -1,3 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example // v-click-outside usage
|
|
3
|
+
* <template>
|
|
4
|
+
* <div>
|
|
5
|
+
* <div class="dropdown-container">
|
|
6
|
+
* <button @click="toggleDropdown">
|
|
7
|
+
* {{ selectedOption || 'Select an option' }}
|
|
8
|
+
* </button>
|
|
9
|
+
*
|
|
10
|
+
* <div v-if="isOpen" v-click-outside="closeDropdown" class="dropdown-menu">
|
|
11
|
+
* <div
|
|
12
|
+
* v-for="option in options"
|
|
13
|
+
* :key="option"
|
|
14
|
+
* @click="selectOption(option)"
|
|
15
|
+
* class="dropdown-item"
|
|
16
|
+
* >
|
|
17
|
+
* {{ option }}
|
|
18
|
+
* </div>
|
|
19
|
+
* </div>
|
|
20
|
+
* </div>
|
|
21
|
+
* </div>
|
|
22
|
+
* </template>
|
|
23
|
+
*
|
|
24
|
+
* <script>
|
|
25
|
+
* import { ref } from 'vue'
|
|
26
|
+
*
|
|
27
|
+
* const isOpen = ref(false)
|
|
28
|
+
* const selectedOption = ref('')
|
|
29
|
+
* const isModalOpen = ref(false)
|
|
30
|
+
*
|
|
31
|
+
* const options = ['Option 1', 'Option 2', 'Option 3', 'Option 4']
|
|
32
|
+
*
|
|
33
|
+
* const toggleDropdown = () => {
|
|
34
|
+
* isOpen.value = !isOpen.value
|
|
35
|
+
* }
|
|
36
|
+
*
|
|
37
|
+
* const closeDropdown = () => {
|
|
38
|
+
* isOpen.value = false
|
|
39
|
+
* }
|
|
40
|
+
*
|
|
41
|
+
* const selectOption = (option) => {
|
|
42
|
+
* selectedOption.value = option
|
|
43
|
+
* isOpen.value = false
|
|
44
|
+
* }
|
|
45
|
+
*
|
|
46
|
+
* const onClickOutside = () => {
|
|
47
|
+
* console.log('Clicked outside the box')
|
|
48
|
+
* }
|
|
49
|
+
*
|
|
50
|
+
* const handleOutsideClick = () => {
|
|
51
|
+
* isModalOpen.value = false
|
|
52
|
+
* }
|
|
53
|
+
*
|
|
54
|
+
* const toggleModal = () => {
|
|
55
|
+
* isModalOpen.value = !isModalOpen.value
|
|
56
|
+
* }
|
|
57
|
+
* <//script>
|
|
58
|
+
*
|
|
59
|
+
* <style>
|
|
60
|
+
* .dropdown-container {
|
|
61
|
+
* position: relative;
|
|
62
|
+
* display: inline-block;
|
|
63
|
+
* margin: 2rem;
|
|
64
|
+
* }
|
|
65
|
+
*
|
|
66
|
+
* .dropdown-container button {
|
|
67
|
+
* padding: 0.5rem 1rem;
|
|
68
|
+
* background: #007bff;
|
|
69
|
+
* color: white;
|
|
70
|
+
* border: none;
|
|
71
|
+
* border-radius: 4px;
|
|
72
|
+
* cursor: pointer;
|
|
73
|
+
* }
|
|
74
|
+
*
|
|
75
|
+
* .dropdown-menu {
|
|
76
|
+
* position: absolute;
|
|
77
|
+
* top: 100%;
|
|
78
|
+
* left: 0;
|
|
79
|
+
* background: white;
|
|
80
|
+
* border: 1px solid #ddd;
|
|
81
|
+
* border-radius: 4px;
|
|
82
|
+
* box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
83
|
+
* z-index: 1000;
|
|
84
|
+
* margin-top: 0.5rem;
|
|
85
|
+
* min-width: 200px;
|
|
86
|
+
* }
|
|
87
|
+
*
|
|
88
|
+
* .dropdown-item {
|
|
89
|
+
* padding: 0.75rem 1rem;
|
|
90
|
+
* cursor: pointer;
|
|
91
|
+
* }
|
|
92
|
+
*
|
|
93
|
+
* .dropdown-item:hover {
|
|
94
|
+
* background: #f5f5f5;
|
|
95
|
+
* }
|
|
96
|
+
*
|
|
97
|
+
* </style>
|
|
98
|
+
* */
|
|
1
99
|
const IS_TOUCH =
|
|
2
100
|
typeof window !== 'undefined' &&
|
|
3
101
|
('ontouchstart' in window ||
|
package/directive/drag/index.js
CHANGED
|
@@ -1,5 +1,158 @@
|
|
|
1
1
|
import {ifHas} from '../../tools/helper.js'
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @example // v-drag usage
|
|
5
|
+
* <template>
|
|
6
|
+
* <div class="drag-container">
|
|
7
|
+
* <h2>Draggable Elements</h2>
|
|
8
|
+
*
|
|
9
|
+
* <div
|
|
10
|
+
* v-drag="{
|
|
11
|
+
* start: onDragStart,
|
|
12
|
+
* move: onDragMove,
|
|
13
|
+
* end: onDragEnd
|
|
14
|
+
* }"
|
|
15
|
+
* class="draggable-box box1"
|
|
16
|
+
* :style="{ top: box1Top + 'px', left: box1Left + 'px' }"
|
|
17
|
+
* >
|
|
18
|
+
* Box 1<br>
|
|
19
|
+
* X: {{ box1Left }}<br>
|
|
20
|
+
* Y: {{ box1Top }}
|
|
21
|
+
* </div>
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* <div class="info-panel">
|
|
25
|
+
* <div class="info-item">
|
|
26
|
+
* <strong>Active Box:</strong> {{ activeBox }}
|
|
27
|
+
* </div>
|
|
28
|
+
* <div class="info-item">
|
|
29
|
+
* <strong>Total Distance:</strong> {{ totalDistance }}px
|
|
30
|
+
* </div>
|
|
31
|
+
* <button @click="resetPositions" class="reset-btn">
|
|
32
|
+
* Reset Positions
|
|
33
|
+
* </button>
|
|
34
|
+
* </div>
|
|
35
|
+
* </div>
|
|
36
|
+
* </template>
|
|
37
|
+
*
|
|
38
|
+
* <script>
|
|
39
|
+
* import { ref } from 'vue'
|
|
40
|
+
*
|
|
41
|
+
* const box1Top = ref(50)
|
|
42
|
+
* const box1Left = ref(50)
|
|
43
|
+
*
|
|
44
|
+
* const activeBox = ref('None')
|
|
45
|
+
* const totalDistance = ref(0)
|
|
46
|
+
*
|
|
47
|
+
* const onDragStart = (data) => {
|
|
48
|
+
* activeBox.value = 'Box 1'
|
|
49
|
+
* console.log('Box 1 drag started:', data)
|
|
50
|
+
* }
|
|
51
|
+
*
|
|
52
|
+
* const onDragMove = (data) => {
|
|
53
|
+
* box1Top.value = data.top
|
|
54
|
+
* box1Left.value = data.left
|
|
55
|
+
*
|
|
56
|
+
* const dx = data.endX - data.startX
|
|
57
|
+
* const dy = data.endY - data.startY
|
|
58
|
+
* totalDistance.value = Math.sqrt(dx * dx + dy * dy).toFixed(2)
|
|
59
|
+
* }
|
|
60
|
+
*
|
|
61
|
+
* const onDragEnd = (data) => {
|
|
62
|
+
* console.log('Box 1 drag ended:', data)
|
|
63
|
+
* activeBox.value = 'None'
|
|
64
|
+
* }
|
|
65
|
+
*
|
|
66
|
+
*
|
|
67
|
+
*
|
|
68
|
+
* const resetPositions = () => {
|
|
69
|
+
* box1Top.value = 50
|
|
70
|
+
* box1Left.value = 50
|
|
71
|
+
* totalDistance.value = 0
|
|
72
|
+
* activeBox.value = 'None'
|
|
73
|
+
* }
|
|
74
|
+
* <//script>
|
|
75
|
+
*
|
|
76
|
+
* <style>
|
|
77
|
+
* .drag-container {
|
|
78
|
+
* position: relative;
|
|
79
|
+
* width: 100%;
|
|
80
|
+
* height: 600px;
|
|
81
|
+
* border: 2px solid #333;
|
|
82
|
+
* border-radius: 8px;
|
|
83
|
+
* padding: 20px;
|
|
84
|
+
* background: #f8f9fa;
|
|
85
|
+
* }
|
|
86
|
+
*
|
|
87
|
+
* h2 {
|
|
88
|
+
* text-align: center;
|
|
89
|
+
* margin-bottom: 30px;
|
|
90
|
+
* color: #333;
|
|
91
|
+
* }
|
|
92
|
+
*
|
|
93
|
+
* .draggable-box {
|
|
94
|
+
* position: absolute;
|
|
95
|
+
* width: 120px;
|
|
96
|
+
* height: 120px;
|
|
97
|
+
* border-radius: 8px;
|
|
98
|
+
* cursor: move;
|
|
99
|
+
* user-select: none;
|
|
100
|
+
* display: flex;
|
|
101
|
+
* align-items: center;
|
|
102
|
+
* justify-content: center;
|
|
103
|
+
* text-align: center;
|
|
104
|
+
* font-size: 14px;
|
|
105
|
+
* font-weight: bold;
|
|
106
|
+
* box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
107
|
+
* transition: box-shadow 0.3s;
|
|
108
|
+
* }
|
|
109
|
+
*
|
|
110
|
+
* .draggable-box:hover {
|
|
111
|
+
* box-shadow: 0 6px 16px rgba(0,0,0,0.2);
|
|
112
|
+
* }
|
|
113
|
+
*
|
|
114
|
+
* .box1 {
|
|
115
|
+
* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
116
|
+
* color: white;
|
|
117
|
+
* }
|
|
118
|
+
*
|
|
119
|
+
*
|
|
120
|
+
* .info-panel {
|
|
121
|
+
* position: absolute;
|
|
122
|
+
* bottom: 20px;
|
|
123
|
+
* left: 20px;
|
|
124
|
+
* background: white;
|
|
125
|
+
* padding: 15px;
|
|
126
|
+
* border-radius: 8px;
|
|
127
|
+
* box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
128
|
+
* min-width: 200px;
|
|
129
|
+
* }
|
|
130
|
+
*
|
|
131
|
+
* .info-item {
|
|
132
|
+
* margin-bottom: 10px;
|
|
133
|
+
* padding: 8px;
|
|
134
|
+
* background: #f8f9fa;
|
|
135
|
+
* border-radius: 4px;
|
|
136
|
+
* }
|
|
137
|
+
*
|
|
138
|
+
* .reset-btn {
|
|
139
|
+
* width: 100%;
|
|
140
|
+
* padding: 10px;
|
|
141
|
+
* background: #dc3545;
|
|
142
|
+
* color: white;
|
|
143
|
+
* border: none;
|
|
144
|
+
* border-radius: 4px;
|
|
145
|
+
* cursor: pointer;
|
|
146
|
+
* font-weight: bold;
|
|
147
|
+
* transition: background 0.3s;
|
|
148
|
+
* }
|
|
149
|
+
*
|
|
150
|
+
* .reset-btn:hover {
|
|
151
|
+
* background: #c82333;
|
|
152
|
+
* }
|
|
153
|
+
* </style>
|
|
154
|
+
* */
|
|
155
|
+
|
|
3
156
|
let wrapper = {}
|
|
4
157
|
let current=null
|
|
5
158
|
function mousestart(e,uid) {
|
package/directive/index.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
export * as animate from './animate/index'
|
|
2
|
-
export * as clickOutside from './clickOutSide/index'
|
|
3
|
-
export * as drag from './drag/index'
|
|
4
|
-
export * as intersect from './intersect/index'
|
|
5
|
-
export * as mask from './mask/index'
|
|
6
|
-
export * as parallax from './parallax/index'
|
|
7
|
-
export * as
|
|
8
|
-
export * as
|
|
9
|
-
export * as
|
|
10
|
-
export * as
|
|
11
|
-
export * as
|
|
12
|
-
export * as title from './title/index'
|
|
13
|
-
export * as skeleton from './skeleton/index'
|
|
1
|
+
export * as animate from './animate/index.js'
|
|
2
|
+
export * as clickOutside from './clickOutSide/index.js'
|
|
3
|
+
export * as drag from './drag/index.js'
|
|
4
|
+
export * as intersect from './intersect/index.js'
|
|
5
|
+
export * as mask from './mask/index.js'
|
|
6
|
+
export * as parallax from './parallax/index.js'
|
|
7
|
+
export * as ripple from './ripple/index.js'
|
|
8
|
+
export * as scroll from './scroll/index.js'
|
|
9
|
+
export * as sortable from './sortable/index.js'
|
|
10
|
+
export * as touch from './touch/index.js'
|
|
11
|
+
export * as title from './title/index.js'
|
|
14
12
|
|
|
15
13
|
export const _registers = (app, directives) => {
|
|
16
14
|
for (const arrayKey in directives) {
|
|
@@ -1,3 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example // v-intersect usage
|
|
3
|
+
* <template>
|
|
4
|
+
* <div class="intersection-container">
|
|
5
|
+
* <h1>Intersection Observer Examples</h1>
|
|
6
|
+
*
|
|
7
|
+
* <div class="scroll-area">
|
|
8
|
+
* <div class="placeholder" style="height: 300px"></div>
|
|
9
|
+
*
|
|
10
|
+
* <div
|
|
11
|
+
* v-intersect="handleIntersection"
|
|
12
|
+
* class="observed-box box1"
|
|
13
|
+
* :class="{ visible: box1Visible }"
|
|
14
|
+
* >
|
|
15
|
+
* Box 1 - Default
|
|
16
|
+
* <div v-if="box1Visible" class="status">IN VIEWPORT</div>
|
|
17
|
+
* </div>
|
|
18
|
+
*
|
|
19
|
+
* <div class="placeholder" style="height: 400px"></div>
|
|
20
|
+
*
|
|
21
|
+
* <div
|
|
22
|
+
* v-intersect.once="handleIntersectionOnce"
|
|
23
|
+
* class="observed-box box2"
|
|
24
|
+
* :class="{ visible: box2Visible }"
|
|
25
|
+
* >
|
|
26
|
+
* Box 2 - Once
|
|
27
|
+
* <div v-if="box2Visible" class="status">TRIGGERED ONCE</div>
|
|
28
|
+
* </div>
|
|
29
|
+
*
|
|
30
|
+
* <div class="placeholder" style="height: 500px"></div>
|
|
31
|
+
*
|
|
32
|
+
* <div
|
|
33
|
+
* v-intersect.silent="handleIntersectionSilent"
|
|
34
|
+
* class="observed-box box3"
|
|
35
|
+
* :class="{ visible: box3Visible }"
|
|
36
|
+
* >
|
|
37
|
+
* Box 3 - Silent
|
|
38
|
+
* <div v-if="box3Visible" class="status">SILENT MODE</div>
|
|
39
|
+
* </div>
|
|
40
|
+
*
|
|
41
|
+
* <div class="placeholder" style="height: 400px"></div>
|
|
42
|
+
*
|
|
43
|
+
* <div
|
|
44
|
+
* v-intersect.pre=""
|
|
45
|
+
* class="observed-box box4"
|
|
46
|
+
* :class="{ visible: box4Visible }"
|
|
47
|
+
* >
|
|
48
|
+
* Box 4 - Pre (No Callback)
|
|
49
|
+
* <div v-if="box4Visible" class="status">PRE MODIFIED</div>
|
|
50
|
+
* </div>
|
|
51
|
+
*
|
|
52
|
+
* <div class="placeholder" style="height: 300px"></div>
|
|
53
|
+
*
|
|
54
|
+
* <div
|
|
55
|
+
* v-intersect="{
|
|
56
|
+
* handler: handleIntersectionWithOptions,
|
|
57
|
+
* options: { threshold: 0.5, rootMargin: '50px' }
|
|
58
|
+
* }"
|
|
59
|
+
* class="observed-box box5"
|
|
60
|
+
* :class="{ visible: box5Visible }"
|
|
61
|
+
* >
|
|
62
|
+
* Box 5 - Custom Options
|
|
63
|
+
* <div v-if="box5Visible" class="status">50% THRESHOLD</div>
|
|
64
|
+
* </div>
|
|
65
|
+
*
|
|
66
|
+
* <div class="placeholder" style="height: 600px"></div>
|
|
67
|
+
* </div>
|
|
68
|
+
*
|
|
69
|
+
* <div class="info-panel">
|
|
70
|
+
* <div class="info-row">
|
|
71
|
+
* <span>Box 1 Visible:</span>
|
|
72
|
+
* <span :class="{ active: box1Visible }">{{ box1Visible ? 'YES' : 'NO' }}</span>
|
|
73
|
+
* </div>
|
|
74
|
+
* <div class="info-row">
|
|
75
|
+
* <span>Box 2 Visible:</span>
|
|
76
|
+
* <span :class="{ active: box2Visible }">{{ box2Visible ? 'YES' : 'NO' }}</span>
|
|
77
|
+
* </div>
|
|
78
|
+
* <div class="info-row">
|
|
79
|
+
* <span>Box 3 Visible:</span>
|
|
80
|
+
* <span :class="{ active: box3Visible }">{{ box3Visible ? 'YES' : 'NO' }}</span>
|
|
81
|
+
* </div>
|
|
82
|
+
* <div class="info-row">
|
|
83
|
+
* <span>Box 4 Visible:</span>
|
|
84
|
+
* <span :class="{ active: box4Visible }">{{ box4Visible ? 'YES' : 'NO' }}</span>
|
|
85
|
+
* </div>
|
|
86
|
+
* <div class="info-row">
|
|
87
|
+
* <span>Box 5 Visible:</span>
|
|
88
|
+
* <span :class="{ active: box5Visible }">{{ box5Visible ? 'YES' : 'NO' }}</span>
|
|
89
|
+
* </div>
|
|
90
|
+
* <div class="info-row">
|
|
91
|
+
* <span>Total Entries:</span>
|
|
92
|
+
* <span class="counter">{{ entryCount }}</span>
|
|
93
|
+
* </div>
|
|
94
|
+
* </div>
|
|
95
|
+
* </div>
|
|
96
|
+
* </template>
|
|
97
|
+
*
|
|
98
|
+
* <script>
|
|
99
|
+
* import { ref } from 'vue'
|
|
100
|
+
*
|
|
101
|
+
* const box1Visible = ref(false)
|
|
102
|
+
* const box2Visible = ref(false)
|
|
103
|
+
* const box3Visible = ref(false)
|
|
104
|
+
* const box4Visible = ref(false)
|
|
105
|
+
* const box5Visible = ref(false)
|
|
106
|
+
* const entryCount = ref(0)
|
|
107
|
+
*
|
|
108
|
+
* const handleIntersection = (isIntersecting, entries, observer) => {
|
|
109
|
+
* box1Visible.value = isIntersecting
|
|
110
|
+
* entryCount.value++
|
|
111
|
+
* console.log('Default intersection:', isIntersecting, entries)
|
|
112
|
+
* }
|
|
113
|
+
*
|
|
114
|
+
* const handleIntersectionOnce = (isIntersecting, entries, observer) => {
|
|
115
|
+
* box2Visible.value = isIntersecting
|
|
116
|
+
* entryCount.value++
|
|
117
|
+
* console.log('Once intersection:', isIntersecting, entries)
|
|
118
|
+
* }
|
|
119
|
+
*
|
|
120
|
+
* const handleIntersectionSilent = (isIntersecting, entries, observer) => {
|
|
121
|
+
* box3Visible.value = isIntersecting
|
|
122
|
+
* entryCount.value++
|
|
123
|
+
* console.log('Silent intersection:', isIntersecting, entries)
|
|
124
|
+
* }
|
|
125
|
+
*
|
|
126
|
+
* const handleIntersectionWithOptions = (isIntersecting, entries, observer) => {
|
|
127
|
+
* box5Visible.value = isIntersecting
|
|
128
|
+
* entryCount.value++
|
|
129
|
+
* console.log('Custom options intersection:', isIntersecting, entries)
|
|
130
|
+
* }
|
|
131
|
+
* <//script>
|
|
132
|
+
*
|
|
133
|
+
* <style>
|
|
134
|
+
* .intersection-container {
|
|
135
|
+
* font-family: Arial, sans-serif;
|
|
136
|
+
* }
|
|
137
|
+
*
|
|
138
|
+
* h1 {
|
|
139
|
+
* text-align: center;
|
|
140
|
+
* margin-bottom: 30px;
|
|
141
|
+
* color: #333;
|
|
142
|
+
* }
|
|
143
|
+
*
|
|
144
|
+
* .scroll-area {
|
|
145
|
+
* height: 80vh;
|
|
146
|
+
* overflow-y: auto;
|
|
147
|
+
* border: 2px solid #ddd;
|
|
148
|
+
* border-radius: 8px;
|
|
149
|
+
* padding: 20px;
|
|
150
|
+
* background: #f9f9f9;
|
|
151
|
+
* }
|
|
152
|
+
*
|
|
153
|
+
* .placeholder {
|
|
154
|
+
* background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
|
|
155
|
+
* background-size: 200% 100%;
|
|
156
|
+
* animation: loading 1.5s infinite;
|
|
157
|
+
* border-radius: 4px;
|
|
158
|
+
* margin: 10px 0;
|
|
159
|
+
* }
|
|
160
|
+
*
|
|
161
|
+
* @keyframes loading {
|
|
162
|
+
* 0% { background-position: 200% 0; }
|
|
163
|
+
* 100% { background-position: -200% 0; }
|
|
164
|
+
* }
|
|
165
|
+
*
|
|
166
|
+
* .observed-box {
|
|
167
|
+
* height: 200px;
|
|
168
|
+
* display: flex;
|
|
169
|
+
* align-items: center;
|
|
170
|
+
* justify-content: center;
|
|
171
|
+
* font-size: 1.2rem;
|
|
172
|
+
* font-weight: bold;
|
|
173
|
+
* border-radius: 8px;
|
|
174
|
+
* margin: 20px 0;
|
|
175
|
+
* opacity: 0.3;
|
|
176
|
+
* transition: all 0.5s ease;
|
|
177
|
+
* position: relative;
|
|
178
|
+
* overflow: hidden;
|
|
179
|
+
* }
|
|
180
|
+
*
|
|
181
|
+
* .observed-box.visible {
|
|
182
|
+
* opacity: 1;
|
|
183
|
+
* transform: scale(1.05);
|
|
184
|
+
* box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
|
185
|
+
* }
|
|
186
|
+
*
|
|
187
|
+
* .box1 {
|
|
188
|
+
* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
189
|
+
* color: white;
|
|
190
|
+
* }
|
|
191
|
+
*
|
|
192
|
+
* .box2 {
|
|
193
|
+
* background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
|
194
|
+
* color: white;
|
|
195
|
+
* }
|
|
196
|
+
*
|
|
197
|
+
* .box3 {
|
|
198
|
+
* background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
|
|
199
|
+
* color: white;
|
|
200
|
+
* }
|
|
201
|
+
*
|
|
202
|
+
* .box4 {
|
|
203
|
+
* background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
|
|
204
|
+
* color: white;
|
|
205
|
+
* }
|
|
206
|
+
*
|
|
207
|
+
* .box5 {
|
|
208
|
+
* background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
|
|
209
|
+
* color: white;
|
|
210
|
+
* }
|
|
211
|
+
*
|
|
212
|
+
* .status {
|
|
213
|
+
* position: absolute;
|
|
214
|
+
* bottom: 10px;
|
|
215
|
+
* right: 10px;
|
|
216
|
+
* background: rgba(0,0,0,0.8);
|
|
217
|
+
* color: white;
|
|
218
|
+
* padding: 5px 10px;
|
|
219
|
+
* border-radius: 4px;
|
|
220
|
+
* font-size: 0.8rem;
|
|
221
|
+
* }
|
|
222
|
+
*
|
|
223
|
+
* .info-panel {
|
|
224
|
+
* position: fixed;
|
|
225
|
+
* bottom: 20px;
|
|
226
|
+
* right: 20px;
|
|
227
|
+
* background: white;
|
|
228
|
+
* padding: 20px;
|
|
229
|
+
* border-radius: 8px;
|
|
230
|
+
* box-shadow: 0 4px 20px rgba(0,0,0,0.15);
|
|
231
|
+
* min-width: 250px;
|
|
232
|
+
* }
|
|
233
|
+
*
|
|
234
|
+
* .info-row {
|
|
235
|
+
* display: flex;
|
|
236
|
+
* justify-content: space-between;
|
|
237
|
+
* align-items: center;
|
|
238
|
+
* padding: 8px 0;
|
|
239
|
+
* border-bottom: 1px solid #eee;
|
|
240
|
+
* }
|
|
241
|
+
*
|
|
242
|
+
* .info-row:last-child {
|
|
243
|
+
* border-bottom: none;
|
|
244
|
+
* }
|
|
245
|
+
*
|
|
246
|
+
* .info-row span:last-child {
|
|
247
|
+
* font-weight: bold;
|
|
248
|
+
* padding: 4px 12px;
|
|
249
|
+
* border-radius: 4px;
|
|
250
|
+
* background: #f0f0f0;
|
|
251
|
+
* }
|
|
252
|
+
*
|
|
253
|
+
* .info-row span.active {
|
|
254
|
+
* background: #4CAF50;
|
|
255
|
+
* color: white;
|
|
256
|
+
* }
|
|
257
|
+
*
|
|
258
|
+
* .counter {
|
|
259
|
+
* background: #2196F3 !important;
|
|
260
|
+
* color: white !important;
|
|
261
|
+
* }
|
|
262
|
+
* </style>
|
|
263
|
+
* */
|
|
1
264
|
function mounted (el, binding) {
|
|
2
265
|
const modifiers = binding.modifiers || {}
|
|
3
266
|
if (modifiers.pre) {
|
package/directive/mask/index.js
CHANGED
|
@@ -1,3 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example // v-mask usage
|
|
3
|
+
* <template>
|
|
4
|
+
* <div class="title-1 my-3">Number input (N)</div>
|
|
5
|
+
* <input
|
|
6
|
+
* class="input-mask"
|
|
7
|
+
* v-model="lazy1"
|
|
8
|
+
* placeholder="2020/04/01"
|
|
9
|
+
* @complete="log('complete',$event)"
|
|
10
|
+
* @accept="log('accept',$event)"
|
|
11
|
+
* @backspace="log('backspace',$event)"
|
|
12
|
+
* @paste.prevent="log('paste',$event)"
|
|
13
|
+
* v-mask="'NNNN/NN/NN'"
|
|
14
|
+
* />
|
|
15
|
+
* <div class="title-1 my-3">[a-z] input (A)</div>
|
|
16
|
+
* <input
|
|
17
|
+
* class="input-mask"
|
|
18
|
+
* v-model="lazy2"
|
|
19
|
+
* placeholder="aaaa - bbbb"
|
|
20
|
+
* @complete="log('complete',$event)"
|
|
21
|
+
* @accept="log('accept',$event)"
|
|
22
|
+
* @backspace="log('backspace',$event)"
|
|
23
|
+
* @paste.prevent="log('paste',$event)"
|
|
24
|
+
* v-mask="'AAAA - AAAA'"
|
|
25
|
+
* />
|
|
26
|
+
* <div class="title-1 my-3">[a-z0-9] input (B)</div>
|
|
27
|
+
* <input
|
|
28
|
+
* class="input-mask"
|
|
29
|
+
* v-model="lazy3"
|
|
30
|
+
* placeholder="aaaa - 22"
|
|
31
|
+
* @complete="log('complete',$event)"
|
|
32
|
+
* @accept="log('accept',$event)"
|
|
33
|
+
* @backspace="log('backspace',$event)"
|
|
34
|
+
* @paste.prevent="log('paste',$event)"
|
|
35
|
+
* v-mask="'BBBB - BB'"
|
|
36
|
+
* />
|
|
37
|
+
* <div class="title-1 my-3">Any input (X)</div>
|
|
38
|
+
* <input
|
|
39
|
+
* class="input-mask"
|
|
40
|
+
* v-model="lazy4"
|
|
41
|
+
* placeholder="aa - 22 - #@"
|
|
42
|
+
* @complete="log('complete',$event)"
|
|
43
|
+
* @accept="log('accept',$event)"
|
|
44
|
+
* @backspace="log('backspace',$event)"
|
|
45
|
+
* @paste.prevent="log('paste',$event)"
|
|
46
|
+
* v-mask="'XX XX XX'"
|
|
47
|
+
* />
|
|
48
|
+
*
|
|
49
|
+
* </template>
|
|
50
|
+
* <script>
|
|
51
|
+
* import {ref} from 'vue'
|
|
52
|
+
* const lazy1=ref(null)
|
|
53
|
+
* const lazy2=ref(null)
|
|
54
|
+
* const lazy3=ref(null)
|
|
55
|
+
* const lazy4=ref(null)
|
|
56
|
+
* const log=(name,e)=>{
|
|
57
|
+
* console.log(name,e)
|
|
58
|
+
* }
|
|
59
|
+
* <//script>
|
|
60
|
+
* <style>
|
|
61
|
+
* .input-mask{
|
|
62
|
+
* width:100%;
|
|
63
|
+
* border:1px solid;
|
|
64
|
+
* padding:8px
|
|
65
|
+
* }
|
|
66
|
+
* </style>
|
|
67
|
+
* */
|
|
1
68
|
function fireEvent(el, eventName, data) {
|
|
2
69
|
var e = document.createEvent('CustomEvent');
|
|
3
70
|
e.initCustomEvent(eventName, true, true, data);
|