@finqu/cool 1.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/README.md +1 -0
- package/build/.eslintrc.json +10 -0
- package/build/banner.js +14 -0
- package/build/build-plugins.js +92 -0
- package/build/rollup.config.js +78 -0
- package/dist/css/cool-grid.css +3672 -0
- package/dist/css/cool-grid.css.map +30 -0
- package/dist/css/cool-grid.min.css +7 -0
- package/dist/css/cool-grid.min.css.map +1 -0
- package/dist/css/cool-reboot.css +281 -0
- package/dist/css/cool-reboot.css.map +58 -0
- package/dist/css/cool-reboot.min.css +7 -0
- package/dist/css/cool-reboot.min.css.map +1 -0
- package/dist/css/cool.css +14841 -0
- package/dist/css/cool.css.map +144 -0
- package/dist/css/cool.min.css +7 -0
- package/dist/css/cool.min.css.map +1 -0
- package/dist/js/cool.bundle.js +15304 -0
- package/dist/js/cool.bundle.js.map +1 -0
- package/dist/js/cool.bundle.min.js +45 -0
- package/dist/js/cool.bundle.min.js.map +1 -0
- package/dist/js/cool.esm.js +4766 -0
- package/dist/js/cool.esm.js.map +1 -0
- package/dist/js/cool.esm.min.js +7 -0
- package/dist/js/cool.esm.min.js.map +1 -0
- package/dist/js/cool.js +4948 -0
- package/dist/js/cool.js.map +1 -0
- package/dist/js/cool.min.js +7 -0
- package/dist/js/cool.min.js.map +1 -0
- package/html/index.html +892 -0
- package/js/dist/collapse.js +321 -0
- package/js/dist/collapse.js.map +1 -0
- package/js/dist/common.js +1474 -0
- package/js/dist/common.js.map +1 -0
- package/js/dist/cooldropdown.js +467 -0
- package/js/dist/cooldropdown.js.map +1 -0
- package/js/dist/coolpopover.js +391 -0
- package/js/dist/coolpopover.js.map +1 -0
- package/js/dist/coolsectiontabs.js +256 -0
- package/js/dist/coolsectiontabs.js.map +1 -0
- package/js/dist/coolselect.js +796 -0
- package/js/dist/coolselect.js.map +1 -0
- package/js/dist/cooltooltip.js +360 -0
- package/js/dist/cooltooltip.js.map +1 -0
- package/js/dist/coolui.js +73 -0
- package/js/dist/coolui.js.map +1 -0
- package/js/dist/dropdown.js +1716 -0
- package/js/dist/dropdown.js.map +1 -0
- package/js/dist/popover.js +587 -0
- package/js/dist/popover.js.map +1 -0
- package/js/dist/sectiontabs.js +263 -0
- package/js/dist/sectiontabs.js.map +1 -0
- package/js/dist/select.js +2029 -0
- package/js/dist/select.js.map +1 -0
- package/js/dist/tooltip.js +555 -0
- package/js/dist/tooltip.js.map +1 -0
- package/js/index.esm.js +21 -0
- package/js/index.umd.js +21 -0
- package/js/src/abstract-ui-component.js +70 -0
- package/js/src/collapse.js +258 -0
- package/js/src/common.js +280 -0
- package/js/src/dialog.js +570 -0
- package/js/src/dropdown.js +443 -0
- package/js/src/popover.js +615 -0
- package/js/src/section-tabs.js +204 -0
- package/js/src/select.js +832 -0
- package/js/src/toast.js +581 -0
- package/js/src/tooltip.js +575 -0
- package/js/src/util/animate-css.js +22 -0
- package/js/src/util/index.js +112 -0
- package/js/src/util/perfect-scrollbar.js +1316 -0
- package/less/alert.less +345 -0
- package/less/badge.less +38 -0
- package/less/bootstrap-noconflict.less +23 -0
- package/less/bootstrap.less +23 -0
- package/less/button-group.less +153 -0
- package/less/buttons.less +287 -0
- package/less/dialog-noconflict.less +174 -0
- package/less/dialog.less +203 -0
- package/less/dropdown.less +209 -0
- package/less/forms.less +770 -0
- package/less/images.less +242 -0
- package/less/input-group.less +163 -0
- package/less/list-group.less +73 -0
- package/less/mixins/aspect-ratio.less +23 -0
- package/less/mixins/border-radius.less +24 -0
- package/less/mixins/box-shadow.less +4 -0
- package/less/mixins/buttons.less +17 -0
- package/less/mixins/caret.less +51 -0
- package/less/mixins/clearfix.less +10 -0
- package/less/mixins/gradients.less +34 -0
- package/less/mixins/nav-divider.less +7 -0
- package/less/mixins/object-fit.less +13 -0
- package/less/mixins/reset-text.less +16 -0
- package/less/mixins.less +11 -0
- package/less/package.json +11 -0
- package/less/pagination.less +69 -0
- package/less/popover.less +143 -0
- package/less/project.sublime-workspace +774 -0
- package/less/reboot.less +235 -0
- package/less/section.less +793 -0
- package/less/select.less +150 -0
- package/less/tables.less +737 -0
- package/less/tabs.less +162 -0
- package/less/tooltip.less +87 -0
- package/less/type.less +71 -0
- package/less/utilities/align.less +27 -0
- package/less/utilities/animate.less +3512 -0
- package/less/utilities/background.less +70 -0
- package/less/utilities/borders.less +16 -0
- package/less/utilities/color.less +70 -0
- package/less/utilities/cursor.less +8 -0
- package/less/utilities/display.less +38 -0
- package/less/utilities/embed.less +61 -0
- package/less/utilities/flex.less +76 -0
- package/less/utilities/jquery-ui.less +116 -0
- package/less/utilities/lazyload.less +29 -0
- package/less/utilities/overflow.less +11 -0
- package/less/utilities/pace.less +25 -0
- package/less/utilities/placeholder.less +60 -0
- package/less/utilities/position.less +42 -0
- package/less/utilities/scrollbar.less +152 -0
- package/less/utilities/spacing.less +197 -0
- package/less/utilities/text.less +68 -0
- package/less/utilities/transform.less +7 -0
- package/less/utilities.less +21 -0
- package/less/variables.less +343 -0
- package/package.json +71 -0
- package/scss/LISENCE +15 -0
- package/scss/_alert.scss +125 -0
- package/scss/_badge.scss +58 -0
- package/scss/_button-group.scss +124 -0
- package/scss/_buttons.scss +206 -0
- package/scss/_custom-forms.scss +423 -0
- package/scss/_dialog.scss +149 -0
- package/scss/_dropdown.scss +234 -0
- package/scss/_forms.scss +257 -0
- package/scss/_frame.scss +523 -0
- package/scss/_functions.scss +114 -0
- package/scss/_grid.scss +35 -0
- package/scss/_images.scss +312 -0
- package/scss/_input-group.scss +245 -0
- package/scss/_list-group.scss +82 -0
- package/scss/_mixins.scss +32 -0
- package/scss/_navbar.scss +214 -0
- package/scss/_pagination.scss +79 -0
- package/scss/_popover.scss +165 -0
- package/scss/_reboot.scss +279 -0
- package/scss/_root.scss +15 -0
- package/scss/_section.scss +851 -0
- package/scss/_select.scss +166 -0
- package/scss/_tables.scss +707 -0
- package/scss/_tabs.scss +175 -0
- package/scss/_toast.scss +182 -0
- package/scss/_tooltip.scss +101 -0
- package/scss/_type.scss +90 -0
- package/scss/_utilities.scss +21 -0
- package/scss/_variables.scss +697 -0
- package/scss/cool-grid.scss +29 -0
- package/scss/cool-reboot.scss +11 -0
- package/scss/cool.scss +36 -0
- package/scss/mixins/_alert-variant.scss +40 -0
- package/scss/mixins/_aspect-ratio.scss +29 -0
- package/scss/mixins/_background-variant.scss +25 -0
- package/scss/mixins/_badge-variant.scss +13 -0
- package/scss/mixins/_breakpoints.scss +102 -0
- package/scss/mixins/_buttons.scss +104 -0
- package/scss/mixins/_caret.scss +80 -0
- package/scss/mixins/_clearfix.scss +10 -0
- package/scss/mixins/_float.scss +14 -0
- package/scss/mixins/_forms.scss +51 -0
- package/scss/mixins/_gradients.scss +40 -0
- package/scss/mixins/_grid-framework.scss +72 -0
- package/scss/mixins/_grid.scss +60 -0
- package/scss/mixins/_nav-divider.scss +9 -0
- package/scss/mixins/_object-fit.scss +16 -0
- package/scss/mixins/_reset-text.scss +19 -0
- package/scss/mixins/_text-emphasis.scss +21 -0
- package/scss/mixins/_text-hide.scss +10 -0
- package/scss/mixins/_text-truncate.scss +8 -0
- package/scss/project.sublime-workspace +491 -0
- package/scss/utilities/_align.scss +41 -0
- package/scss/utilities/_animate.scss +3512 -0
- package/scss/utilities/_background.scss +14 -0
- package/scss/utilities/_borders.scss +146 -0
- package/scss/utilities/_clearfix.scss +6 -0
- package/scss/utilities/_collapse.scss +33 -0
- package/scss/utilities/_cursor.scss +10 -0
- package/scss/utilities/_display.scss +16 -0
- package/scss/utilities/_embed.scss +78 -0
- package/scss/utilities/_flex.scss +50 -0
- package/scss/utilities/_lazyload.scss +31 -0
- package/scss/utilities/_overflow.scss +6 -0
- package/scss/utilities/_perfect-scrollbar.scss +154 -0
- package/scss/utilities/_placeholder.scss +76 -0
- package/scss/utilities/_position.scss +30 -0
- package/scss/utilities/_sizing.scss +32 -0
- package/scss/utilities/_spacing.scss +92 -0
- package/scss/utilities/_text.scss +97 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Cool UI coolpopover.js v1.0.0 (https://finqu.fi)
|
|
3
|
+
* Copyright 2011-2019 Finqu Oy
|
|
4
|
+
* Licensed under the ISC license - (http://opensource.org/licenses/ISC)
|
|
5
|
+
*/
|
|
6
|
+
(function (global, factory) {
|
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
8
|
+
typeof define === 'function' && define.amd ? define(factory) :
|
|
9
|
+
(global = global || self, global.CoolPopover = factory());
|
|
10
|
+
}(this, function () { 'use strict';
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
jQuery
|
|
14
|
+
} = window;
|
|
15
|
+
|
|
16
|
+
const debounce = function (func, wait, immediate) {
|
|
17
|
+
var timeout;
|
|
18
|
+
return function () {
|
|
19
|
+
var context = this,
|
|
20
|
+
args = arguments;
|
|
21
|
+
|
|
22
|
+
var later = function () {
|
|
23
|
+
timeout = null;
|
|
24
|
+
if (!immediate) func.apply(context, args);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var callNow = immediate && !timeout;
|
|
28
|
+
clearTimeout(timeout);
|
|
29
|
+
timeout = setTimeout(later, wait);
|
|
30
|
+
if (callNow) func.apply(context, args);
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
class AbstractUIComponent {
|
|
35
|
+
// Create callback
|
|
36
|
+
onCreate() {
|
|
37
|
+
var onCreate = this.opts.onCreate;
|
|
38
|
+
|
|
39
|
+
if (typeof onCreate === 'function') {
|
|
40
|
+
onCreate.call(this.el);
|
|
41
|
+
}
|
|
42
|
+
} // Update callback
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
onUpdate() {
|
|
46
|
+
var onUpdate = this.opts.onUpdate;
|
|
47
|
+
|
|
48
|
+
if (typeof onUpdate === 'function') {
|
|
49
|
+
onUpdate.call(this.el);
|
|
50
|
+
}
|
|
51
|
+
} // Destroy callback
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
onDestroy() {
|
|
55
|
+
var onDestroy = this.opts.onDestroy;
|
|
56
|
+
|
|
57
|
+
if (typeof onDestroy === 'function') {
|
|
58
|
+
onDestroy.call(this.el);
|
|
59
|
+
}
|
|
60
|
+
} // Show callback
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
onShow() {
|
|
64
|
+
var onShow = this.opts.onShow;
|
|
65
|
+
|
|
66
|
+
if (typeof onShow === 'function') {
|
|
67
|
+
onShow.call(this.el);
|
|
68
|
+
}
|
|
69
|
+
} // Close callback
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
onClose() {
|
|
73
|
+
var onClose = this.opts.onClose;
|
|
74
|
+
|
|
75
|
+
if (typeof onClose === 'function') {
|
|
76
|
+
onClose.call(this.el);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
debug(...args) {
|
|
81
|
+
if (this.opts.debug) {
|
|
82
|
+
if (typeof this.opts.debug === 'function') {
|
|
83
|
+
this.opts.debug(...args);
|
|
84
|
+
} else {
|
|
85
|
+
console.log(...args);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const NAME = 'coolPopover';
|
|
93
|
+
const DATA_KEY = 'plugin_coolPopover';
|
|
94
|
+
|
|
95
|
+
class CoolPopover extends AbstractUIComponent {
|
|
96
|
+
constructor(element, config) {
|
|
97
|
+
super();
|
|
98
|
+
this.el = element;
|
|
99
|
+
this.opts = jQuery.extend({}, jQuery.fn[NAME].defaults, config);
|
|
100
|
+
this.init();
|
|
101
|
+
} // Init plugin
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
init() {
|
|
105
|
+
this.buildCache();
|
|
106
|
+
this.bindEvents();
|
|
107
|
+
this.onCreate();
|
|
108
|
+
} // Remove plugin instance completely
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
destroy() {
|
|
112
|
+
this.unbindEvents();
|
|
113
|
+
this.$el.removeData();
|
|
114
|
+
this.onDestroy();
|
|
115
|
+
} // Update plugin data
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
update() {
|
|
119
|
+
this.buildCache();
|
|
120
|
+
this.onUpdate();
|
|
121
|
+
} // Cache DOM nodes for performance
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
buildCache() {
|
|
125
|
+
this.$el = jQuery(this.el);
|
|
126
|
+
this.$container = this.$el.data('container') ? jQuery(this.$el.data('container')) : jQuery(this.opts.container);
|
|
127
|
+
this.id = 'popover-' + this.generateUUID();
|
|
128
|
+
this.trigger = this.$el.data('trigger') ? this.$el.data('trigger') : this.opts.trigger;
|
|
129
|
+
this.placement = this.$el.data('placement') ? this.$el.data('placement') : this.opts.placement;
|
|
130
|
+
this.animation = this.$el.data('animation') ? this.$el.data('animation') : this.opts.animation;
|
|
131
|
+
this.animationIn = this.$el.data('animationIn') ? this.$el.data('animationIn') : this.opts.animationIn;
|
|
132
|
+
this.animationOut = this.$el.data('animationOut') ? this.$el.data('animationOut') : this.opts.animationOut;
|
|
133
|
+
this.animationSpeed = this.$el.data('animationSpeed') ? this.$el.data('animationSpeed') : this.opts.animationSpeed;
|
|
134
|
+
this.title = this.$el.data('title') ? this.$el.data('title') : this.opts.title;
|
|
135
|
+
this.content = this.$el.data('content') ? this.$el.data('content') : this.opts.content;
|
|
136
|
+
this.template = this.$el.data('template') ? this.$el.data('template') : this.opts.template;
|
|
137
|
+
this.templateAttrs = this.$el.data('templateAttrs') ? this.$el.data('templateAttrs') : this.opts.templateAttrs;
|
|
138
|
+
} // Bind events that trigger methods
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
bindEvents() {
|
|
142
|
+
if (this.trigger === 'click') {
|
|
143
|
+
this.$el.on('click' + '.' + NAME, () => {
|
|
144
|
+
if (this.$popover) {
|
|
145
|
+
this.close();
|
|
146
|
+
} else {
|
|
147
|
+
this.show();
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
} else if (this.trigger === 'hover') {
|
|
151
|
+
this.$el.on('mouseenter' + '.' + NAME, () => {
|
|
152
|
+
this.show();
|
|
153
|
+
});
|
|
154
|
+
this.$el.on('mouseleave' + '.' + NAME, () => {
|
|
155
|
+
this.close();
|
|
156
|
+
});
|
|
157
|
+
} else if (this.trigger === 'focus') {
|
|
158
|
+
this.$el.on('focusin' + '.' + NAME, () => {
|
|
159
|
+
this.show();
|
|
160
|
+
});
|
|
161
|
+
this.$el.on('focusout' + '.' + NAME, () => {
|
|
162
|
+
this.close();
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
jQuery(window).on('resize', debounce(() => {
|
|
167
|
+
if (this.$popover) {
|
|
168
|
+
this.setPosition();
|
|
169
|
+
this.onUpdate();
|
|
170
|
+
}
|
|
171
|
+
}, 250));
|
|
172
|
+
} // Unbind events that trigger methods
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
unbindEvents() {
|
|
176
|
+
this.$el.off('.' + NAME);
|
|
177
|
+
} // Generate UUID
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
generateUUID() {
|
|
181
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
182
|
+
var r = Math.random() * 16 | 0,
|
|
183
|
+
v = c == 'x' ? r : r & 0x3 | 0x8;
|
|
184
|
+
return v.toString(16);
|
|
185
|
+
});
|
|
186
|
+
} // Build popover
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
buildPopover() {
|
|
190
|
+
let content = this.content;
|
|
191
|
+
|
|
192
|
+
if (typeof this.opts.template === 'function') {
|
|
193
|
+
content = this.opts.template();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
this.$popover = jQuery(`
|
|
197
|
+
<div class="popover popover-${this.placement}" role="tooltip" id="${this.id}">
|
|
198
|
+
|
|
199
|
+
<div class="arrow"></div>
|
|
200
|
+
|
|
201
|
+
<h3 class="popover-header">${this.title}</h3>
|
|
202
|
+
|
|
203
|
+
<div class="popover-body">${content}</div>
|
|
204
|
+
|
|
205
|
+
</div>
|
|
206
|
+
`);
|
|
207
|
+
this.$container.append(this.$popover);
|
|
208
|
+
this.$arrow = this.$popover.find('.arrow') ? this.$popover.find('.arrow') : false;
|
|
209
|
+
this.debug(this.$el);
|
|
210
|
+
this.debug(this.$container);
|
|
211
|
+
this.debug(this.$popover);
|
|
212
|
+
this.debug(this.$arrow);
|
|
213
|
+
this.debug('Id: ' + this.id);
|
|
214
|
+
this.debug('Trigger: ' + this.trigger);
|
|
215
|
+
this.debug('Placement: ' + this.placement);
|
|
216
|
+
this.debug('Animation: ' + this.animation);
|
|
217
|
+
this.debug('Animation in: ' + this.animationIn);
|
|
218
|
+
this.debug('Animation out: ' + this.animationOut);
|
|
219
|
+
this.debug('Animation speed: ' + this.animationSpeed);
|
|
220
|
+
this.debug('Title: ' + this.title);
|
|
221
|
+
this.debug('Content: ' + this.content);
|
|
222
|
+
this.debug('Template: ' + this.template);
|
|
223
|
+
this.debug(this.templateAttrs);
|
|
224
|
+
} // Set positions
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
setPosition(placement) {
|
|
228
|
+
if (typeof str === 'undefined' || str === null) {
|
|
229
|
+
placement = this.placement;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
var popoverWidth = this.$popover.outerWidth(true);
|
|
233
|
+
var popoverHeight = this.$popover.outerHeight(true);
|
|
234
|
+
var popoverTriggerWidth = this.$el.outerWidth();
|
|
235
|
+
var popoverTriggerHeight = this.$el.outerHeight();
|
|
236
|
+
var popoverTriggerPosX = this.$el.position().left;
|
|
237
|
+
var popoverTriggerPosY = this.$el.position().top;
|
|
238
|
+
var arrowWidth = this.$arrow.outerWidth(true);
|
|
239
|
+
var arrowHeight = this.$arrow.outerHeight(true);
|
|
240
|
+
|
|
241
|
+
if (placement === 'top') {
|
|
242
|
+
var popoverPosX = popoverTriggerPosX - (popoverWidth - popoverTriggerWidth) / 2;
|
|
243
|
+
var popoverPosY = popoverTriggerPosY - popoverHeight;
|
|
244
|
+
var arrowPos = popoverWidth / 2 - arrowWidth / 2;
|
|
245
|
+
this.$arrow.css({
|
|
246
|
+
left: arrowPos + 'px'
|
|
247
|
+
});
|
|
248
|
+
} else if (placement === 'right') {
|
|
249
|
+
var popoverPosX = popoverTriggerPosX + popoverTriggerWidth;
|
|
250
|
+
var popoverPosY = popoverTriggerPosY - (popoverHeight - popoverTriggerHeight) / 2;
|
|
251
|
+
var arrowPos = popoverHeight / 2 - arrowHeight / 2;
|
|
252
|
+
this.$arrow.css({
|
|
253
|
+
top: arrowPos + 'px'
|
|
254
|
+
});
|
|
255
|
+
} else if (placement === 'bottom') {
|
|
256
|
+
var popoverPosX = popoverTriggerPosX - (popoverWidth - popoverTriggerWidth) / 2;
|
|
257
|
+
var popoverPosY = popoverTriggerPosY + popoverTriggerHeight;
|
|
258
|
+
var arrowPos = popoverWidth / 2 - arrowWidth / 2;
|
|
259
|
+
this.$arrow.css({
|
|
260
|
+
left: arrowPos + 'px'
|
|
261
|
+
});
|
|
262
|
+
} else if (placement === 'left') {
|
|
263
|
+
var popoverPosX = popoverTriggerPosX - popoverWidth;
|
|
264
|
+
var popoverPosY = popoverTriggerPosY - (popoverHeight - popoverTriggerHeight) / 2;
|
|
265
|
+
var arrowPos = popoverHeight / 2 - arrowHeight / 2;
|
|
266
|
+
this.$arrow.css({
|
|
267
|
+
top: arrowPos + 'px'
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
this.$popover.css({
|
|
272
|
+
position: 'absolute',
|
|
273
|
+
top: '0px',
|
|
274
|
+
left: '0px',
|
|
275
|
+
transform: 'translate3d(' + popoverPosX + 'px, ' + popoverPosY + 'px, 0px)',
|
|
276
|
+
'will-change': 'transform'
|
|
277
|
+
});
|
|
278
|
+
this.debug('Popover trigger width: ' + popoverTriggerWidth + 'px');
|
|
279
|
+
this.debug('Popover trigger height: ' + popoverTriggerHeight + 'px');
|
|
280
|
+
this.debug('popover trigger position x: ' + popoverTriggerPosX + 'px');
|
|
281
|
+
this.debug('Popover trigger position Y: ' + popoverTriggerPosY + 'px');
|
|
282
|
+
this.debug('Popover width: ' + popoverWidth + 'px');
|
|
283
|
+
this.debug('Popover height: ' + popoverHeight + 'px');
|
|
284
|
+
this.debug('Popover position x: ' + popoverPosX + 'px');
|
|
285
|
+
this.debug('Popover position y: ' + popoverPosY + 'px');
|
|
286
|
+
} // Show
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
show() {
|
|
290
|
+
if (this.$popover) {
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
this.buildPopover();
|
|
295
|
+
this.setPosition();
|
|
296
|
+
|
|
297
|
+
if (this.animation) {
|
|
298
|
+
this.$popover.addClass(this.animationSpeed);
|
|
299
|
+
this.$popover.animateCss(this.animationIn);
|
|
300
|
+
this.$popover.addClass('show');
|
|
301
|
+
this.$popover.attr('id', this.id);
|
|
302
|
+
this.$el.attr('data-popover', this.id);
|
|
303
|
+
} else {
|
|
304
|
+
this.$popover.addClass('show');
|
|
305
|
+
this.$popover.attr('id', this.id);
|
|
306
|
+
this.$el.attr('data-popover', this.id);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
this.onShow();
|
|
310
|
+
} // Close
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
close() {
|
|
314
|
+
if (!this.$popover) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
if (this.animation && !this.$popover.hasClass('animated')) {
|
|
319
|
+
this.$popover.animateCss(this.animationOut, () => {
|
|
320
|
+
this.$popover.remove();
|
|
321
|
+
this.$el.removeAttr('data-popover');
|
|
322
|
+
this.$popover = false;
|
|
323
|
+
this.onClose();
|
|
324
|
+
});
|
|
325
|
+
} else {
|
|
326
|
+
this.$popover.remove();
|
|
327
|
+
this.$el.removeAttr('data-popover');
|
|
328
|
+
this.$popover = false;
|
|
329
|
+
this.onClose();
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
static _jQueryInterface(config) {
|
|
334
|
+
return this.each(function () {
|
|
335
|
+
let data = jQuery(this).data(DATA_KEY);
|
|
336
|
+
|
|
337
|
+
const _config = typeof config === 'object' && config;
|
|
338
|
+
|
|
339
|
+
if (!data) {
|
|
340
|
+
data = new CoolPopover(this, _config);
|
|
341
|
+
jQuery(this).data(DATA_KEY, data);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
if (typeof config === 'string') {
|
|
345
|
+
if (typeof data[config] === 'undefined') {
|
|
346
|
+
throw new TypeError(`No method named "${config}"`);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
data[config]();
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
if (typeof jQuery !== 'undefined') {
|
|
357
|
+
// jQuery
|
|
358
|
+
const JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
|
359
|
+
jQuery.fn[NAME] = CoolPopover._jQueryInterface;
|
|
360
|
+
jQuery.fn[NAME].Constructor = CoolPopover;
|
|
361
|
+
|
|
362
|
+
jQuery.fn[NAME].noConflict = () => {
|
|
363
|
+
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
364
|
+
return CoolPopover._jQueryInterface;
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
jQuery.fn[NAME].defaults = {
|
|
368
|
+
container: 'body',
|
|
369
|
+
trigger: 'focus',
|
|
370
|
+
placement: 'bottom',
|
|
371
|
+
animation: true,
|
|
372
|
+
animationIn: 'fadeIn',
|
|
373
|
+
animationOut: 'fadeOut',
|
|
374
|
+
animationSpeed: 'fastest',
|
|
375
|
+
title: '',
|
|
376
|
+
content: '',
|
|
377
|
+
template: false,
|
|
378
|
+
templateAttrs: {},
|
|
379
|
+
onCreate: null,
|
|
380
|
+
onUpdate: null,
|
|
381
|
+
onDestroy: null,
|
|
382
|
+
onShow: null,
|
|
383
|
+
onClose: null,
|
|
384
|
+
debug: false
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
return CoolPopover;
|
|
389
|
+
|
|
390
|
+
}));
|
|
391
|
+
//# sourceMappingURL=coolpopover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coolpopover.js","sources":["../src/util/index.js","../src/abstract-ui-component.js","../src/popover.js"],"sourcesContent":["const { jQuery } = window;\n\nconst debounce = function (func, wait, immediate) {\n\tvar timeout;\n\treturn function() {\n\t\tvar context = this, args = arguments;\n\t\tvar later = function() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t};\n\t\tvar callNow = immediate && !timeout;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(later, wait);\n\t\tif (callNow) func.apply(context, args);\n\t};\n};\n\nconst isArrayLike = function(collection) {\n\tvar length = getLength(collection);\n\treturn typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n};\n\nconst optimizeCb = function(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n // The 2-argument case is omitted because we’re not using it.\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n};\n\nconst each = function(obj, iteratee, context) {\n\titeratee = optimizeCb(iteratee, context);\n\tvar i, length;\n\tif (isArrayLike(obj)) {\n\t\tfor (i = 0, length = obj.length; i < length; i++) {\n\t\t\titeratee(obj[i], i, obj);\n\t\t}\n\t} else {\n\t\tvar keys = _.keys(obj);\n\t\tfor (i = 0, length = keys.length; i < length; i++) {\n\t\t\titeratee(obj[keys[i]], keys[i], obj);\n\t\t}\n\t}\n\treturn obj;\n};\n\nconst touchEvents = function () {\n\tif (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {\n\t\treturn true;\n\t}\n};\n\nexport {\n\tjQuery,\n\tdebounce,\n\ttouchEvents,\n\teach\n}","export default class AbstractUIComponent {\n\t// Create callback\n onCreate() {\n\n var onCreate = this.opts.onCreate;\n\n if (typeof onCreate === 'function') {\n\n onCreate.call(this.el);\n }\n }\n\n // Update callback\n onUpdate() {\n\n var onUpdate = this.opts.onUpdate;\n\n if (typeof onUpdate === 'function') {\n\n onUpdate.call(this.el);\n }\n }\n\n // Destroy callback\n onDestroy() {\n\n var onDestroy = this.opts.onDestroy;\n\n if (typeof onDestroy === 'function') {\n\n onDestroy.call(this.el);\n }\n }\n\n // Show callback\n onShow() {\n\n var onShow = this.opts.onShow;\n\n if (typeof onShow === 'function') {\n\n onShow.call(this.el);\n }\n }\n\n // Close callback\n onClose() {\n\n var onClose = this.opts.onClose;\n\n if (typeof onClose === 'function') {\n\n onClose.call(this.el);\n }\n }\n\n debug(...args) {\n \tif (this.opts.debug) {\n if (typeof this.opts.debug === 'function') {\n this.opts.debug(...args);\n } else {\n \t \tconsole.log(...args);\n }\n \t}\n }\n}","import { jQuery as $, debounce } from './util/index';\nimport AbstractUIComponent from './abstract-ui-component';\n\nconst NAME = 'coolPopover';\nconst DATA_KEY = 'plugin_coolPopover';\n\nclass CoolPopover extends AbstractUIComponent {\n\n constructor(element, config) {\n super();\n\n this.el = element;\n this.opts = $.extend({}, $.fn[NAME].defaults, config);\n this.init();\n }\n\n // Init plugin\n init() {\n this.buildCache();\n this.bindEvents();\n this.onCreate();\n }\n\n // Remove plugin instance completely\n destroy() {\n\n this.unbindEvents();\n this.$el.removeData();\n this.onDestroy();\n }\n\n // Update plugin data\n update() {\n\n this.buildCache();\n this.onUpdate();\n }\n\n // Cache DOM nodes for performance\n buildCache() {\n this.$el = $(this.el);\n this.$container = this.$el.data('container') ? $(this.$el.data('container')) : $(this.opts.container);\n this.id = 'popover-'+this.generateUUID();\n this.trigger = this.$el.data('trigger') ? this.$el.data('trigger') : this.opts.trigger;\n this.placement = this.$el.data('placement') ? this.$el.data('placement') : this.opts.placement;\n this.animation = this.$el.data('animation') ? this.$el.data('animation') : this.opts.animation;\n this.animationIn = this.$el.data('animationIn') ? this.$el.data('animationIn') : this.opts.animationIn;\n this.animationOut = this.$el.data('animationOut') ? this.$el.data('animationOut') : this.opts.animationOut;\n this.animationSpeed = this.$el.data('animationSpeed') ? this.$el.data('animationSpeed') : this.opts.animationSpeed;\n this.title = this.$el.data('title') ? this.$el.data('title') : this.opts.title;\n this.content = this.$el.data('content') ? this.$el.data('content') : this.opts.content;\n this.template = this.$el.data('template') ? this.$el.data('template') : this.opts.template;\n this.templateAttrs = this.$el.data('templateAttrs') ? this.$el.data('templateAttrs') : this.opts.templateAttrs;\n }\n\n // Bind events that trigger methods\n bindEvents() {\n if (this.trigger === 'click') {\n\n this.$el.on('click'+'.'+NAME, () => {\n\n if (this.$popover) {\n this.close();\n } else {\n this.show();\n }\n });\n\n } else if (this.trigger === 'hover') {\n\n this.$el.on('mouseenter'+'.'+NAME, () => {\n\n this.show();\n });\n\n this.$el.on('mouseleave'+'.'+NAME, () => {\n\n this.close();\n });\n\n } else if (this.trigger === 'focus') {\n\n this.$el.on('focusin'+'.'+NAME, () => {\n\n this.show();\n });\n\n this.$el.on('focusout'+'.'+NAME, () => {\n\n this.close();\n });\n }\n\n $(window).on('resize', debounce(() => {\n\n if (this.$popover) {\n this.setPosition();\n this.onUpdate();\n }\n }, 250));\n }\n\n // Unbind events that trigger methods\n unbindEvents() {\n\n this.$el.off('.'+NAME);\n }\n\n // Generate UUID\n generateUUID() {\n\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n }\n\n // Build popover\n buildPopover() {\n \tlet content = this.content;\n\n \tif (typeof this.opts.template === 'function') {\n \t\tcontent = this.opts.template();\n \t}\n\n \tthis.$popover = $(`\n \t\t<div class=\"popover popover-${this.placement}\" role=\"tooltip\" id=\"${this.id}\">\n\n\t\t\t <div class=\"arrow\"></div>\n\n\t\t\t <h3 class=\"popover-header\">${this.title}</h3>\n\n\t\t\t <div class=\"popover-body\">${content}</div>\n\n\t\t\t</div>\n \t`);\n\n this.$container.append(this.$popover);\n this.$arrow = this.$popover.find('.arrow') ? this.$popover.find('.arrow') : false;\n\n this.debug(this.$el);\n this.debug(this.$container);\n this.debug(this.$popover);\n this.debug(this.$arrow);\n this.debug('Id: '+this.id);\n this.debug('Trigger: '+this.trigger);\n this.debug('Placement: '+this.placement);\n this.debug('Animation: '+this.animation);\n this.debug('Animation in: '+this.animationIn);\n this.debug('Animation out: '+this.animationOut);\n this.debug('Animation speed: '+this.animationSpeed);\n this.debug('Title: '+this.title);\n this.debug('Content: '+this.content);\n this.debug('Template: '+this.template);\n this.debug(this.templateAttrs);\n }\n\n // Set positions\n setPosition(placement) {\n\n if (typeof str === 'undefined' || str === null) {\n placement = this.placement;\n }\n\n var popoverWidth = this.$popover.outerWidth(true);\n var popoverHeight = this.$popover.outerHeight(true);\n var popoverTriggerWidth = this.$el.outerWidth();\n var popoverTriggerHeight = this.$el.outerHeight();\n var popoverTriggerPosX = this.$el.position().left;\n var popoverTriggerPosY = this.$el.position().top;\n var arrowWidth = this.$arrow.outerWidth(true);\n var arrowHeight = this.$arrow.outerHeight(true);\n\n if (placement === 'top') {\n\n var popoverPosX = popoverTriggerPosX - (popoverWidth - popoverTriggerWidth) / 2;\n var popoverPosY = popoverTriggerPosY - popoverHeight;\n var arrowPos = popoverWidth / 2 - arrowWidth / 2;\n\n this.$arrow.css({\n left: arrowPos+'px'\n });\n\n } else if (placement === 'right') {\n\n var popoverPosX = popoverTriggerPosX + popoverTriggerWidth;\n var popoverPosY = popoverTriggerPosY - (popoverHeight - popoverTriggerHeight) / 2;\n var arrowPos = popoverHeight / 2 - arrowHeight / 2;\n\n this.$arrow.css({\n top: arrowPos+'px'\n });\n\n } else if (placement === 'bottom') {\n\n var popoverPosX = popoverTriggerPosX - (popoverWidth - popoverTriggerWidth) / 2;\n var popoverPosY = popoverTriggerPosY + popoverTriggerHeight;\n var arrowPos = popoverWidth / 2 - arrowWidth / 2;\n\n this.$arrow.css({\n left: arrowPos+'px'\n });\n\n } else if (placement === 'left') {\n\n var popoverPosX = popoverTriggerPosX - popoverWidth;\n var popoverPosY = popoverTriggerPosY - (popoverHeight - popoverTriggerHeight) / 2;\n var arrowPos = popoverHeight / 2 - arrowHeight / 2;\n\n this.$arrow.css({\n top: arrowPos+'px'\n });\n }\n\n this.$popover.css({\n position: 'absolute',\n top: '0px',\n left: '0px',\n transform: 'translate3d('+popoverPosX+'px, '+popoverPosY+'px, 0px)',\n 'will-change': 'transform'\n });\n\n this.debug('Popover trigger width: '+popoverTriggerWidth+'px');\n this.debug('Popover trigger height: '+popoverTriggerHeight+'px');\n this.debug('popover trigger position x: '+popoverTriggerPosX+'px');\n this.debug('Popover trigger position Y: '+popoverTriggerPosY+'px');\n this.debug('Popover width: '+popoverWidth+'px');\n this.debug('Popover height: '+popoverHeight+'px');\n this.debug('Popover position x: '+popoverPosX+'px');\n this.debug('Popover position y: '+popoverPosY+'px');\n }\n\n // Show\n show() {\n\n if (this.$popover) {\n return;\n }\n\n this.buildPopover();\n this.setPosition();\n\n if (this.animation) {\n\n this.$popover.addClass(this.animationSpeed);\n this.$popover.animateCss(this.animationIn);\n this.$popover.addClass('show');\n this.$popover.attr('id', this.id);\n this.$el.attr('data-popover', this.id);\n\n } else {\n\n this.$popover.addClass('show');\n this.$popover.attr('id', this.id);\n this.$el.attr('data-popover', this.id);\n }\n\n this.onShow();\n }\n\n // Close\n close() {\n if (!this.$popover) {\n return;\n }\n\n if (this.animation && !this.$popover.hasClass('animated')) {\n\n this.$popover.animateCss(this.animationOut, () => {\n\n this.$popover.remove();\n this.$el.removeAttr('data-popover');\n this.$popover = false;\n\n this.onClose();\n });\n\n } else {\n\n this.$popover.remove();\n this.$el.removeAttr('data-popover');\n this.$popover = false;\n\n this.onClose();\n }\n }\n\n static _jQueryInterface(config) {\n \treturn this.each(function() {\n \t\tlet data = $(this).data(DATA_KEY);\n \t\tconst _config = typeof config === 'object' && config;\n\n \t\tif (!data) {\n \t\t\tdata = new CoolPopover(this, _config);\n \t\t\t$(this).data(DATA_KEY, data);\n \t\t}\n\n \t\tif (typeof config === 'string') {\n \t\t\tif (typeof data[config] === 'undefined') {\n\t\t \tthrow new TypeError(`No method named \"${config}\"`)\n\t\t }\n\n\t\t data[config]()\n \t\t}\n\t });\n }\n}\n\nif (typeof $ !== 'undefined') {\n // jQuery\n const JQUERY_NO_CONFLICT = $.fn[NAME];\n $.fn[NAME] = CoolPopover._jQueryInterface;\n $.fn[NAME].Constructor = CoolPopover;\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return CoolPopover._jQueryInterface\n }\n\n $.fn[NAME].defaults = {\n container: 'body',\n trigger: 'focus',\n placement: 'bottom',\n animation: true,\n animationIn: 'fadeIn',\n animationOut: 'fadeOut',\n animationSpeed: 'fastest',\n title: '',\n content: '',\n template: false,\n templateAttrs: {},\n onCreate: null,\n onUpdate: null,\n onDestroy: null,\n onShow: null,\n onClose: null,\n debug: false\n };\n\n}\n\nexport default CoolPopover;"],"names":["jQuery","window","debounce","func","wait","immediate","timeout","context","args","arguments","later","apply","callNow","clearTimeout","setTimeout","AbstractUIComponent","onCreate","opts","call","el","onUpdate","onDestroy","onShow","onClose","debug","console","log","NAME","DATA_KEY","CoolPopover","constructor","element","config","$","extend","fn","defaults","init","buildCache","bindEvents","destroy","unbindEvents","$el","removeData","update","$container","data","container","id","generateUUID","trigger","placement","animation","animationIn","animationOut","animationSpeed","title","content","template","templateAttrs","on","$popover","close","show","setPosition","off","replace","c","r","Math","random","v","toString","buildPopover","append","$arrow","find","str","popoverWidth","outerWidth","popoverHeight","outerHeight","popoverTriggerWidth","popoverTriggerHeight","popoverTriggerPosX","position","left","popoverTriggerPosY","top","arrowWidth","arrowHeight","popoverPosX","popoverPosY","arrowPos","css","transform","addClass","animateCss","attr","hasClass","remove","removeAttr","_jQueryInterface","each","_config","TypeError","JQUERY_NO_CONFLICT","Constructor","noConflict"],"mappings":";;;;;;;;;;;CAAA,MAAM;CAAEA,EAAAA;CAAF,IAAaC,MAAnB;;CAEA,MAAMC,QAAQ,GAAG,UAAUC,IAAV,EAAgBC,IAAhB,EAAsBC,SAAtB,EAAiC;CACjD,MAAIC,OAAJ;CACA,SAAO,YAAW;CACjB,QAAIC,OAAO,GAAG,IAAd;CAAA,QAAoBC,IAAI,GAAGC,SAA3B;;CACA,QAAIC,KAAK,GAAG,YAAW;CACtBJ,MAAAA,OAAO,GAAG,IAAV;CACA,UAAI,CAACD,SAAL,EAAgBF,IAAI,CAACQ,KAAL,CAAWJ,OAAX,EAAoBC,IAApB;CAChB,KAHD;;CAIA,QAAII,OAAO,GAAGP,SAAS,IAAI,CAACC,OAA5B;CACAO,IAAAA,YAAY,CAACP,OAAD,CAAZ;CACAA,IAAAA,OAAO,GAAGQ,UAAU,CAACJ,KAAD,EAAQN,IAAR,CAApB;CACA,QAAIQ,OAAJ,EAAaT,IAAI,CAACQ,KAAL,CAAWJ,OAAX,EAAoBC,IAApB;CACb,GAVD;CAWA,CAbD;;CCFe,MAAMO,mBAAN,CAA0B;CACxC;CACGC,EAAAA,QAAQ,GAAG;CAEP,QAAIA,QAAQ,GAAG,KAAKC,IAAL,CAAUD,QAAzB;;CAEA,QAAI,OAAOA,QAAP,KAAoB,UAAxB,EAAoC;CAEhCA,MAAAA,QAAQ,CAACE,IAAT,CAAc,KAAKC,EAAnB;CACH;CACJ,GAVoC;;;CAarCC,EAAAA,QAAQ,GAAG;CAEP,QAAIA,QAAQ,GAAG,KAAKH,IAAL,CAAUG,QAAzB;;CAEA,QAAI,OAAOA,QAAP,KAAoB,UAAxB,EAAoC;CAEhCA,MAAAA,QAAQ,CAACF,IAAT,CAAc,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