uikit 3.25.27-dev.9e97c1f → 3.25.27
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/CHANGELOG.md +2 -34
- package/build/prefix.js +1 -1
- package/build/publishDev.js +1 -1
- package/build/scope.js +1 -1
- package/build/scss.js +1 -1
- package/dist/css/uikit-core-rtl.css +1569 -1692
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1569 -1692
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1210 -1326
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1210 -1326
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +135 -134
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +136 -135
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +6 -8
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +12 -8
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +12 -8
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +25 -51
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +12 -8
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +102 -81
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +17 -15
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +313 -856
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +377 -711
- package/dist/js/uikit.min.js +1 -1
- package/package.json +2 -2
- package/src/js/api/component.js +3 -2
- package/src/js/api/observables.js +4 -16
- package/src/js/api/options.js +3 -6
- package/src/js/api/props.js +3 -1
- package/src/js/api/state.js +8 -7
- package/src/js/components/index.js +0 -1
- package/src/js/components/internal/lightbox-animations.js +26 -7
- package/src/js/components/internal/slider-preload.js +0 -1
- package/src/js/components/internal/slideshow-animations.js +62 -15
- package/src/js/components/lightbox-panel.js +96 -121
- package/src/js/components/lightbox.js +8 -5
- package/src/js/components/notification.js +5 -7
- package/src/js/core/accordion.js +31 -62
- package/src/js/core/drop.js +3 -4
- package/src/js/core/dropnav.js +3 -3
- package/src/js/core/grid.js +19 -5
- package/src/js/core/margin.js +0 -3
- package/src/js/core/scroll.js +11 -0
- package/src/js/core/sticky.js +1 -1
- package/src/js/core/switcher.js +49 -12
- package/src/js/core/video.js +21 -236
- package/src/js/mixin/internal/slideshow-animations.js +13 -5
- package/src/js/mixin/internal/slideshow-transitioner.js +2 -2
- package/src/js/mixin/parallax.js +4 -1
- package/src/js/mixin/position.js +1 -1
- package/src/js/mixin/slider-parallax.js +38 -9
- package/src/js/mixin/togglable.js +14 -13
- package/src/js/util/attr.js +7 -7
- package/src/js/util/dom.js +4 -3
- package/src/js/util/lang.js +2 -2
- package/src/js/util/player.js +2 -4
- package/src/js/util/style.js +13 -12
- package/src/js/util/viewport.js +25 -22
- package/src/less/components/_import.less +3 -8
- package/src/less/components/animation.less +1 -1
- package/src/less/components/base.less +1 -1
- package/src/less/components/button.less +1 -1
- package/src/less/components/card.less +8 -8
- package/src/less/components/form.less +15 -15
- package/src/less/components/grid.less +65 -58
- package/src/less/components/lightbox.less +8 -2
- package/src/less/components/margin.less +124 -155
- package/src/less/components/modal.less +4 -1
- package/src/less/components/nav.less +1 -1
- package/src/less/components/navbar.less +1 -1
- package/src/less/components/padding.less +9 -9
- package/src/less/components/position.less +4 -9
- package/src/less/components/search.less +1 -1
- package/src/less/components/slideshow.less +4 -1
- package/src/less/components/switcher.less +2 -5
- package/src/less/components/table.less +4 -4
- package/src/less/components/text.less +4 -10
- package/src/less/components/utility.less +163 -0
- package/src/less/components/visibility.less +4 -4
- package/src/less/theme/_import.less +2 -6
- package/src/less/theme/alert.less +5 -0
- package/src/less/theme/thumbnav.less +4 -1
- package/src/less/theme/utility.less +32 -0
- package/src/scss/components/_import.scss +3 -8
- package/src/scss/components/animation.scss +1 -1
- package/src/scss/components/base.scss +1 -1
- package/src/scss/components/button.scss +1 -1
- package/src/scss/components/card.scss +8 -8
- package/src/scss/components/form.scss +14 -14
- package/src/scss/components/grid.scss +64 -57
- package/src/scss/components/lightbox.scss +8 -2
- package/src/scss/components/margin.scss +124 -155
- package/src/scss/components/modal.scss +4 -1
- package/src/scss/components/nav.scss +1 -1
- package/src/scss/components/navbar.scss +1 -1
- package/src/scss/components/padding.scss +9 -9
- package/src/scss/components/position.scss +4 -9
- package/src/scss/components/search.scss +1 -1
- package/src/scss/components/slideshow.scss +4 -1
- package/src/scss/components/switcher.scss +2 -5
- package/src/scss/components/table.scss +4 -4
- package/src/scss/components/text.scss +4 -10
- package/src/scss/components/utility.scss +129 -0
- package/src/scss/components/visibility.scss +4 -4
- package/src/scss/mixins-theme.scss +43 -44
- package/src/scss/mixins.scss +31 -40
- package/src/scss/variables-theme.scss +14 -14
- package/src/scss/variables.scss +14 -14
- package/tests/accordion.html +10 -77
- package/tests/alert.html +1 -1
- package/tests/align.html +5 -5
- package/tests/animation.html +4 -4
- package/tests/article.html +7 -7
- package/tests/background.html +2 -2
- package/tests/badge.html +1 -1
- package/tests/base.html +2 -2
- package/tests/button.html +1 -1
- package/tests/card.html +15 -15
- package/tests/close.html +2 -2
- package/tests/comment.html +9 -9
- package/tests/container.html +2 -2
- package/tests/countdown.html +21 -21
- package/tests/cover.html +3 -3
- package/tests/description-list.html +1 -1
- package/tests/divider.html +3 -3
- package/tests/dotnav.html +1 -1
- package/tests/drop.html +7 -7
- package/tests/dropbar.html +5 -5
- package/tests/dropdown.html +1 -1
- package/tests/dropnav.html +18 -18
- package/tests/filter.html +3 -3
- package/tests/form.html +14 -14
- package/tests/grid.html +47 -41
- package/tests/heading.html +2 -2
- package/tests/height-viewport.html +4 -4
- package/tests/height.html +5 -5
- package/tests/icon.html +8 -8
- package/tests/image.html +6 -6
- package/tests/index.html +13 -13
- package/tests/js/index.js +1 -1
- package/tests/leader.html +5 -5
- package/tests/lightbox.html +6 -6
- package/tests/link.html +1 -1
- package/tests/list.html +4 -4
- package/tests/margin.html +7 -59
- package/tests/marker.html +3 -3
- package/tests/modal.html +3 -3
- package/tests/nav.html +5 -5
- package/tests/navbar.html +27 -27
- package/tests/notification.html +2 -8
- package/tests/offcanvas.html +12 -12
- package/tests/overlay.html +3 -3
- package/tests/padding.html +1 -1
- package/tests/pagination.html +3 -3
- package/tests/parallax.html +1 -1
- package/tests/position.html +6 -6
- package/tests/scrollspy.html +13 -13
- package/tests/search.html +5 -5
- package/tests/section.html +17 -17
- package/tests/slidenav.html +3 -3
- package/tests/slider.html +5 -5
- package/tests/slideshow.html +3 -33
- package/tests/sortable.html +15 -15
- package/tests/sticky-navbar.html +4 -4
- package/tests/sticky-parallax.html +3 -3
- package/tests/sticky.html +3 -3
- package/tests/svg.html +2 -3
- package/tests/switcher.html +7 -7
- package/tests/tab.html +5 -5
- package/tests/text.html +3 -9
- package/tests/tile.html +4 -4
- package/tests/toggle.html +1 -1
- package/tests/tooltip.html +3 -3
- package/tests/totop.html +2 -2
- package/tests/transition.html +1 -1
- package/tests/upload.html +5 -5
- package/tests/utility.html +116 -16
- package/tests/video.html +24 -224
- package/tests/visibility.html +4 -4
- package/tests/width.html +12 -12
- package/dist/js/components/marquee.js +0 -215
- package/dist/js/components/marquee.min.js +0 -1
- package/src/js/components/marquee.js +0 -156
- package/src/js/mixin/connect.js +0 -90
- package/src/js/mixin/scroll-driven.js +0 -57
- package/src/less/components/dropcap.less +0 -71
- package/src/less/components/floating-shadow.less +0 -66
- package/src/less/components/logo.less +0 -94
- package/src/less/components/marquee.less +0 -133
- package/src/less/theme/dropcap.less +0 -29
- package/src/less/theme/floating-shadow.less +0 -20
- package/src/less/theme/logo.less +0 -29
- package/src/less/theme/marquee.less +0 -14
- package/src/scss/components/dropcap.scss +0 -63
- package/src/scss/components/floating-shadow.scss +0 -63
- package/src/scss/components/logo.scss +0 -75
- package/src/scss/components/marquee.scss +0 -136
- package/tests/dropcap.html +0 -26
- package/tests/floating-shadow.html +0 -44
- package/tests/logo.html +0 -84
- package/tests/marquee.html +0 -617
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
/*! UIkit 3.25.27-dev.9e97c1f | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
|
|
2
|
-
|
|
3
|
-
(function (global, factory) {
|
|
4
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
5
|
-
typeof define === 'function' && define.amd ? define('uikitmarquee', ['uikit-util'], factory) :
|
|
6
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.UIkitMarquee = factory(global.UIkit.util));
|
|
7
|
-
})(this, (function (uikitUtil) { 'use strict';
|
|
8
|
-
|
|
9
|
-
function callUpdate(instance, e = "update") {
|
|
10
|
-
if (!instance._connected) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
if (!instance._updates.length) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
if (!instance._updateCount) {
|
|
17
|
-
instance._updateCount = 0;
|
|
18
|
-
requestAnimationFrame(() => instance._updateCount = 0);
|
|
19
|
-
}
|
|
20
|
-
if (!instance._queued) {
|
|
21
|
-
instance._queued = /* @__PURE__ */ new Set();
|
|
22
|
-
uikitUtil.fastdom.read(() => {
|
|
23
|
-
if (instance._connected) {
|
|
24
|
-
runUpdates(instance, instance._queued);
|
|
25
|
-
}
|
|
26
|
-
instance._queued = null;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
if (instance._updateCount++ < 20) {
|
|
30
|
-
instance._queued.add(e.type || e);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function runUpdates(instance, types) {
|
|
34
|
-
for (const { read, write, events = [] } of instance._updates) {
|
|
35
|
-
if (!types.has("update") && !events.some((type) => types.has(type))) {
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
let result;
|
|
39
|
-
if (read) {
|
|
40
|
-
result = read.call(instance, instance._data, types);
|
|
41
|
-
if (result && uikitUtil.isPlainObject(result)) {
|
|
42
|
-
uikitUtil.assign(instance._data, result);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
if (write && result !== false) {
|
|
46
|
-
uikitUtil.fastdom.write(() => {
|
|
47
|
-
if (instance._connected) {
|
|
48
|
-
write.call(instance, instance._data, types);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function resize(options) {
|
|
56
|
-
return observe(uikitUtil.observeResize, options, "resize");
|
|
57
|
-
}
|
|
58
|
-
function intersection(options) {
|
|
59
|
-
return observe(uikitUtil.observeIntersection, options);
|
|
60
|
-
}
|
|
61
|
-
function preloadMedia(el, preload = 5) {
|
|
62
|
-
loadLazyElements(el, preload);
|
|
63
|
-
for (const video of uikitUtil.$$('video[preload="none"]', el)) {
|
|
64
|
-
video.preload = "";
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
function loadLazyElements(el, preload) {
|
|
68
|
-
uikitUtil.$$('[loading="lazy"]', el).slice(0, preload - 1).forEach((el2) => uikitUtil.removeAttr(el2, "loading"));
|
|
69
|
-
}
|
|
70
|
-
function observe(observe2, options, emit) {
|
|
71
|
-
return {
|
|
72
|
-
observe: observe2,
|
|
73
|
-
handler() {
|
|
74
|
-
callUpdate(this, emit);
|
|
75
|
-
},
|
|
76
|
-
...options
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
var Class = {
|
|
81
|
-
connected() {
|
|
82
|
-
this._cmpCls = uikitUtil.hasClass(this.$el, this.$options.id);
|
|
83
|
-
uikitUtil.addClass(this.$el, this.$options.id);
|
|
84
|
-
},
|
|
85
|
-
disconnected() {
|
|
86
|
-
if (!this._cmpCls) {
|
|
87
|
-
uikitUtil.removeClass(this.$el, this.$options.id);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
const hasAnimationApi = uikitUtil.inBrowser && window.Animation;
|
|
93
|
-
var Component = {
|
|
94
|
-
mixins: [Class],
|
|
95
|
-
props: {
|
|
96
|
-
velocity: Number,
|
|
97
|
-
start: Number,
|
|
98
|
-
reverse: Boolean,
|
|
99
|
-
pause: Boolean,
|
|
100
|
-
pauseVelocity: Number,
|
|
101
|
-
fadeSize: null
|
|
102
|
-
},
|
|
103
|
-
data: {
|
|
104
|
-
velocity: 25,
|
|
105
|
-
start: 0,
|
|
106
|
-
reverse: false,
|
|
107
|
-
pause: false,
|
|
108
|
-
pauseVelocity: 10,
|
|
109
|
-
selList: ".uk-marquee-items",
|
|
110
|
-
fadeSize: 0
|
|
111
|
-
},
|
|
112
|
-
computed: {
|
|
113
|
-
list: ({ selList }, $el) => uikitUtil.$(selList, $el),
|
|
114
|
-
items() {
|
|
115
|
-
return uikitUtil.children(this.list);
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
watch: {
|
|
119
|
-
items() {
|
|
120
|
-
this.$emit();
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
observe: [
|
|
124
|
-
resize({
|
|
125
|
-
target: ({ $el, items }) => [$el, ...items]
|
|
126
|
-
}),
|
|
127
|
-
intersection({
|
|
128
|
-
handler(entries) {
|
|
129
|
-
let active;
|
|
130
|
-
for (const entry of entries) {
|
|
131
|
-
entry.target.inert = !entry.isIntersecting;
|
|
132
|
-
active || (active = entry.isIntersecting && entry.target);
|
|
133
|
-
}
|
|
134
|
-
if (!active) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
const { items } = this;
|
|
138
|
-
const index = items.indexOf(active);
|
|
139
|
-
if (!~index) {
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
const direction = this.reverse ? 1 : -1;
|
|
143
|
-
for (let offset = 1; offset < items.length; offset++) {
|
|
144
|
-
const item = items[uikitUtil.getIndex(index + direction * offset, items)];
|
|
145
|
-
if (item.inert) {
|
|
146
|
-
preloadMedia(item);
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
target: ({ items }) => items,
|
|
152
|
-
args: { intersecting: false },
|
|
153
|
-
options: ({ $el }) => ({ root: $el })
|
|
154
|
-
})
|
|
155
|
-
],
|
|
156
|
-
methods: {
|
|
157
|
-
vertical() {
|
|
158
|
-
return uikitUtil.hasClass(this.$el, `${this.$options.id}-vertical`);
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
events: {
|
|
162
|
-
name: [uikitUtil.pointerEnter, uikitUtil.pointerLeave],
|
|
163
|
-
el: ({ $el }) => $el,
|
|
164
|
-
self: true,
|
|
165
|
-
filter: ({ pause }) => hasAnimationApi && pause,
|
|
166
|
-
handler(e) {
|
|
167
|
-
for (const el of this.items) {
|
|
168
|
-
for (const animation of el.getAnimations()) {
|
|
169
|
-
animation.playbackRate = e.type === uikitUtil.pointerEnter ? this.pauseVelocity / this.velocity : 1;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
update: {
|
|
175
|
-
write() {
|
|
176
|
-
const prefix = this.$options.id;
|
|
177
|
-
const items = this.items;
|
|
178
|
-
const vertical = this.vertical();
|
|
179
|
-
uikitUtil.css(items, "offset", "none");
|
|
180
|
-
const dir = vertical ? ["top", "bottom"] : ["left", "right"];
|
|
181
|
-
if (!vertical && uikitUtil.isRtl) {
|
|
182
|
-
dir.reverse();
|
|
183
|
-
}
|
|
184
|
-
const listStart = uikitUtil.dimensions(this.list)[dir[0]];
|
|
185
|
-
const itemEnds = items.map((el) => uikitUtil.dimensions(el)[dir[1]]);
|
|
186
|
-
const listEnd = Math[!vertical && uikitUtil.isRtl ? "min" : "max"](...itemEnds);
|
|
187
|
-
for (const [index, el] of items.entries()) {
|
|
188
|
-
const elEnd = itemEnds[index];
|
|
189
|
-
const line1 = listEnd - elEnd;
|
|
190
|
-
const line2 = elEnd - listStart;
|
|
191
|
-
const path = vertical ? `"M0 0 v${line1}M0 ${-line2} v${line2}"` : `"M0 0 h${line1}M${-line2} 0 h${line2}"`;
|
|
192
|
-
uikitUtil.css(el, `--${prefix}-path`, path);
|
|
193
|
-
}
|
|
194
|
-
uikitUtil.css(this.$el, {
|
|
195
|
-
[`--${prefix}-duration`]: `${Math.abs(listStart - listEnd) / this.velocity}s`,
|
|
196
|
-
[`--${prefix}-start`]: this.start,
|
|
197
|
-
[`--${prefix}-direction`]: this.reverse ? "reverse" : "normal",
|
|
198
|
-
"--uk-overflow-fade-size": this.fadeSize ? `${uikitUtil.toPx(this.fadeSize, vertical ? "height" : "width", this.$el, true)}px` : ""
|
|
199
|
-
});
|
|
200
|
-
uikitUtil.toggleClass(this.$el, `${prefix}-fade`, this.fadeSize);
|
|
201
|
-
uikitUtil.css(items, "offset", "");
|
|
202
|
-
},
|
|
203
|
-
events: ["resize"]
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
var name = 'marquee';
|
|
208
|
-
|
|
209
|
-
if (typeof window !== "undefined" && window.UIkit) {
|
|
210
|
-
window.UIkit.component(name, Component);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
return Component;
|
|
214
|
-
|
|
215
|
-
}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! UIkit 3.25.27-dev.9e97c1f | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */(function(t,d){typeof exports=="object"&&typeof module<"u"?module.exports=d(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitmarquee",["uikit-util"],d):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitMarquee=d(t.UIkit.util))})(this,(function(t){"use strict";function d(e,s="update"){e._connected&&e._updates.length&&(e._updateCount||(e._updateCount=0,requestAnimationFrame(()=>e._updateCount=0)),e._queued||(e._queued=new Set,t.fastdom.read(()=>{e._connected&&m(e,e._queued),e._queued=null})),e._updateCount++<20&&e._queued.add(s.type||s))}function m(e,s){for(const{read:o,write:r,events:i=[]}of e._updates){if(!s.has("update")&&!i.some(a=>s.has(a)))continue;let n;o&&(n=o.call(e,e._data,s),n&&t.isPlainObject(n)&&t.assign(e._data,n)),r&&n!==!1&&t.fastdom.write(()=>{e._connected&&r.call(e,e._data,s)})}}function v(e){return h(t.observeResize,e,"resize")}function $(e){return h(t.observeIntersection,e)}function _(e,s=5){g(e,s);for(const o of t.$$('video[preload="none"]',e))o.preload=""}function g(e,s){t.$$('[loading="lazy"]',e).slice(0,s-1).forEach(o=>t.removeAttr(o,"loading"))}function h(e,s,o){return{observe:e,handler(){d(this,o)},...s}}var w={connected(){this._cmpCls=t.hasClass(this.$el,this.$options.id),t.addClass(this.$el,this.$options.id)},disconnected(){this._cmpCls||t.removeClass(this.$el,this.$options.id)}};const b=t.inBrowser&&window.Animation;var l={mixins:[w],props:{velocity:Number,start:Number,reverse:Boolean,pause:Boolean,pauseVelocity:Number,fadeSize:null},data:{velocity:25,start:0,reverse:!1,pause:!1,pauseVelocity:10,selList:".uk-marquee-items",fadeSize:0},computed:{list:({selList:e},s)=>t.$(e,s),items(){return t.children(this.list)}},watch:{items(){this.$emit()}},observe:[v({target:({$el:e,items:s})=>[e,...s]}),$({handler(e){let s;for(const n of e)n.target.inert=!n.isIntersecting,s||(s=n.isIntersecting&&n.target);if(!s)return;const{items:o}=this,r=o.indexOf(s);if(!~r)return;const i=this.reverse?1:-1;for(let n=1;n<o.length;n++){const a=o[t.getIndex(r+i*n,o)];if(a.inert){_(a);break}}},target:({items:e})=>e,args:{intersecting:!1},options:({$el:e})=>({root:e})})],methods:{vertical(){return t.hasClass(this.$el,`${this.$options.id}-vertical`)}},events:{name:[t.pointerEnter,t.pointerLeave],el:({$el:e})=>e,self:!0,filter:({pause:e})=>b&&e,handler(e){for(const s of this.items)for(const o of s.getAnimations())o.playbackRate=e.type===t.pointerEnter?this.pauseVelocity/this.velocity:1}},update:{write(){const e=this.$options.id,s=this.items,o=this.vertical();t.css(s,"offset","none");const r=o?["top","bottom"]:["left","right"];!o&&t.isRtl&&r.reverse();const i=t.dimensions(this.list)[r[0]],n=s.map(c=>t.dimensions(c)[r[1]]),a=Math[!o&&t.isRtl?"min":"max"](...n);for(const[c,C]of s.entries()){const u=n[c],p=a-u,f=u-i,z=o?`"M0 0 v${p}M0 ${-f} v${f}"`:`"M0 0 h${p}M${-f} 0 h${f}"`;t.css(C,`--${e}-path`,z)}t.css(this.$el,{[`--${e}-duration`]:`${Math.abs(i-a)/this.velocity}s`,[`--${e}-start`]:this.start,[`--${e}-direction`]:this.reverse?"reverse":"normal","--uk-overflow-fade-size":this.fadeSize?`${t.toPx(this.fadeSize,o?"height":"width",this.$el,!0)}px`:""}),t.toggleClass(this.$el,`${e}-fade`,this.fadeSize),t.css(s,"offset","")},events:["resize"]}},y="marquee";return typeof window<"u"&&window.UIkit&&window.UIkit.component(y,l),l}));
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
$,
|
|
3
|
-
children,
|
|
4
|
-
css,
|
|
5
|
-
dimensions,
|
|
6
|
-
getIndex,
|
|
7
|
-
hasClass,
|
|
8
|
-
inBrowser,
|
|
9
|
-
isRtl,
|
|
10
|
-
pointerEnter,
|
|
11
|
-
pointerLeave,
|
|
12
|
-
toggleClass,
|
|
13
|
-
toPx,
|
|
14
|
-
} from 'uikit-util';
|
|
15
|
-
import { intersection, preloadMedia, resize } from '../api/observables';
|
|
16
|
-
import Class from '../mixin/class';
|
|
17
|
-
|
|
18
|
-
const hasAnimationApi = inBrowser && window.Animation;
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
mixins: [Class],
|
|
22
|
-
|
|
23
|
-
props: {
|
|
24
|
-
velocity: Number,
|
|
25
|
-
start: Number,
|
|
26
|
-
reverse: Boolean,
|
|
27
|
-
pause: Boolean,
|
|
28
|
-
pauseVelocity: Number,
|
|
29
|
-
fadeSize: null,
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
data: {
|
|
33
|
-
velocity: 25,
|
|
34
|
-
start: 0,
|
|
35
|
-
reverse: false,
|
|
36
|
-
pause: false,
|
|
37
|
-
pauseVelocity: 10,
|
|
38
|
-
selList: '.uk-marquee-items',
|
|
39
|
-
fadeSize: 0,
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
computed: {
|
|
43
|
-
list: ({ selList }, $el) => $(selList, $el),
|
|
44
|
-
items() {
|
|
45
|
-
return children(this.list);
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
watch: {
|
|
50
|
-
items() {
|
|
51
|
-
this.$emit();
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
observe: [
|
|
56
|
-
resize({
|
|
57
|
-
target: ({ $el, items }) => [$el, ...items],
|
|
58
|
-
}),
|
|
59
|
-
intersection({
|
|
60
|
-
handler(entries) {
|
|
61
|
-
let active;
|
|
62
|
-
for (const entry of entries) {
|
|
63
|
-
entry.target.inert = !entry.isIntersecting;
|
|
64
|
-
active ||= entry.isIntersecting && entry.target;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (!active) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const { items } = this;
|
|
72
|
-
const index = items.indexOf(active);
|
|
73
|
-
if (!~index) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const direction = this.reverse ? 1 : -1;
|
|
78
|
-
for (let offset = 1; offset < items.length; offset++) {
|
|
79
|
-
const item = items[getIndex(index + direction * offset, items)];
|
|
80
|
-
if (item.inert) {
|
|
81
|
-
preloadMedia(item);
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
target: ({ items }) => items,
|
|
87
|
-
args: { intersecting: false },
|
|
88
|
-
options: ({ $el }) => ({ root: $el }),
|
|
89
|
-
}),
|
|
90
|
-
],
|
|
91
|
-
|
|
92
|
-
methods: {
|
|
93
|
-
vertical() {
|
|
94
|
-
return hasClass(this.$el, `${this.$options.id}-vertical`);
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
events: {
|
|
99
|
-
name: [pointerEnter, pointerLeave],
|
|
100
|
-
el: ({ $el }) => $el,
|
|
101
|
-
self: true,
|
|
102
|
-
filter: ({ pause }) => hasAnimationApi && pause,
|
|
103
|
-
handler(e) {
|
|
104
|
-
for (const el of this.items) {
|
|
105
|
-
for (const animation of el.getAnimations()) {
|
|
106
|
-
animation.playbackRate =
|
|
107
|
-
e.type === pointerEnter ? this.pauseVelocity / this.velocity : 1;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
update: {
|
|
114
|
-
write() {
|
|
115
|
-
const prefix = this.$options.id;
|
|
116
|
-
const items = this.items;
|
|
117
|
-
const vertical = this.vertical();
|
|
118
|
-
|
|
119
|
-
css(items, 'offset', 'none');
|
|
120
|
-
|
|
121
|
-
const dir = vertical ? ['top', 'bottom'] : ['left', 'right'];
|
|
122
|
-
if (!vertical && isRtl) {
|
|
123
|
-
dir.reverse();
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const listStart = dimensions(this.list)[dir[0]];
|
|
127
|
-
const itemEnds = items.map((el) => dimensions(el)[dir[1]]);
|
|
128
|
-
const listEnd = Math[!vertical && isRtl ? 'min' : 'max'](...itemEnds);
|
|
129
|
-
|
|
130
|
-
for (const [index, el] of items.entries()) {
|
|
131
|
-
const elEnd = itemEnds[index];
|
|
132
|
-
const line1 = listEnd - elEnd;
|
|
133
|
-
const line2 = elEnd - listStart;
|
|
134
|
-
const path = vertical
|
|
135
|
-
? `"M0 0 v${line1}M0 ${-line2} v${line2}"`
|
|
136
|
-
: `"M0 0 h${line1}M${-line2} 0 h${line2}"`;
|
|
137
|
-
css(el, `--${prefix}-path`, path);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
css(this.$el, {
|
|
141
|
-
[`--${prefix}-duration`]: `${Math.abs(listStart - listEnd) / this.velocity}s`,
|
|
142
|
-
[`--${prefix}-start`]: this.start,
|
|
143
|
-
[`--${prefix}-direction`]: this.reverse ? 'reverse' : 'normal',
|
|
144
|
-
'--uk-overflow-fade-size': this.fadeSize
|
|
145
|
-
? `${toPx(this.fadeSize, vertical ? 'height' : 'width', this.$el, true)}px`
|
|
146
|
-
: '',
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
toggleClass(this.$el, `${prefix}-fade`, this.fadeSize);
|
|
150
|
-
|
|
151
|
-
css(items, 'offset', '');
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
events: ['resize'],
|
|
155
|
-
},
|
|
156
|
-
};
|
package/src/js/mixin/connect.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { attr, children, data, hasClass, isTag, queryAll, toArray } from 'uikit-util';
|
|
2
|
-
import App from '../api';
|
|
3
|
-
import { generateId } from '../api/instance';
|
|
4
|
-
import { lazyload } from '../api/observables';
|
|
5
|
-
import Togglable from '../mixin/togglable';
|
|
6
|
-
|
|
7
|
-
const TogglableComponent = App.extend(Togglable);
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
mixins: [Togglable],
|
|
11
|
-
|
|
12
|
-
props: {
|
|
13
|
-
connect: String,
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
data: {
|
|
17
|
-
connect: '',
|
|
18
|
-
cls: 'uk-active',
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
computed: {
|
|
22
|
-
connects: {
|
|
23
|
-
get: ({ connect }, $el) => (connect ? queryAll(connect, $el) : []),
|
|
24
|
-
observe: ({ connect }) => connect,
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
connectChildren() {
|
|
28
|
-
return this.connects.flatMap((el) => children(el));
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
watch: {
|
|
33
|
-
connects(connects) {
|
|
34
|
-
for (const el of connects) {
|
|
35
|
-
if (isTag(el, 'ul')) {
|
|
36
|
-
el.role = 'presentation';
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
observe: lazyload({ targets: ({ connectChildren }) => connectChildren }),
|
|
43
|
-
|
|
44
|
-
update() {
|
|
45
|
-
for (const index in this.toggles) {
|
|
46
|
-
const toggle = this.toggles[index];
|
|
47
|
-
if (!toggle) {
|
|
48
|
-
continue;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
toggle.id = generateId(this, toggle);
|
|
52
|
-
|
|
53
|
-
for (const { children } of this.connects) {
|
|
54
|
-
const item = children[index];
|
|
55
|
-
|
|
56
|
-
if (item) {
|
|
57
|
-
attr(item, {
|
|
58
|
-
id: generateId(this, item),
|
|
59
|
-
role: 'tabpanel',
|
|
60
|
-
'aria-labelledby': toggle.id,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
methods: {
|
|
68
|
-
showConnects(index, animate) {
|
|
69
|
-
const toggle = async (el) => {
|
|
70
|
-
const { children } = el;
|
|
71
|
-
|
|
72
|
-
const animation = data(el, 'uk-switcher-animation');
|
|
73
|
-
|
|
74
|
-
let togglable = animation
|
|
75
|
-
? new TogglableComponent({ data: { ...this.$props, animation } })
|
|
76
|
-
: this;
|
|
77
|
-
|
|
78
|
-
const actives = toArray(children).filter(
|
|
79
|
-
(child, i) => i !== index && hasClass(child, this.cls),
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
if (await togglable.toggleElement(actives, false, animate)) {
|
|
83
|
-
await togglable.toggleElement(children[index], true, animate);
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
return Promise.all(this.connects.map(toggle));
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { query, scrolledOver, toPx } from 'uikit-util';
|
|
2
|
-
import { resize, scroll } from '../api/observables';
|
|
3
|
-
import { ease } from './parallax';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
props: {
|
|
7
|
-
parallaxTarget: Boolean,
|
|
8
|
-
parallaxStart: String,
|
|
9
|
-
parallaxEnd: String,
|
|
10
|
-
parallaxEasing: Number,
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
data: {
|
|
14
|
-
parallaxTarget: false,
|
|
15
|
-
parallaxStart: 0,
|
|
16
|
-
parallaxEnd: 0,
|
|
17
|
-
parallaxEasing: 0,
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
observe: [
|
|
21
|
-
resize({
|
|
22
|
-
target: ({ $el, parallaxTarget }) => [$el, parallaxTarget],
|
|
23
|
-
filter: ({ parallax }) => parallax,
|
|
24
|
-
}),
|
|
25
|
-
scroll({ filter: ({ parallax }) => parallax }),
|
|
26
|
-
],
|
|
27
|
-
|
|
28
|
-
computed: {
|
|
29
|
-
parallaxTargetFallback: ($props, $el) => $el,
|
|
30
|
-
|
|
31
|
-
parallaxTarget({ parallaxTarget }, $el) {
|
|
32
|
-
return (parallaxTarget && query(parallaxTarget, $el)) || this.parallaxTargetFallback;
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
update: {
|
|
37
|
-
read() {
|
|
38
|
-
if (!this.parallax) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const target = this.parallaxTarget;
|
|
43
|
-
|
|
44
|
-
if (!target) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const start = toPx(this.parallaxStart, 'height', target, true);
|
|
49
|
-
const end = toPx(this.parallaxEnd, 'height', target, true);
|
|
50
|
-
const percent = ease(scrolledOver(target, start, end), this.parallaxEasing);
|
|
51
|
-
|
|
52
|
-
return { percent };
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
events: ['scroll', 'resize'],
|
|
56
|
-
},
|
|
57
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// Name: Dropcap
|
|
2
|
-
// Description: Style for the drop cap
|
|
3
|
-
//
|
|
4
|
-
// Component: `uk-dropcap`
|
|
5
|
-
//
|
|
6
|
-
// ========================================================================
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// Variables
|
|
10
|
-
// ========================================================================
|
|
11
|
-
@dropcap-margin-right: 10px;
|
|
12
|
-
@dropcap-font-size: ((@global-line-height * 3) * 1em);
|
|
13
|
-
@dropcap-line-height: 1;
|
|
14
|
-
|
|
15
|
-
/* ========================================================================
|
|
16
|
-
Component: Dropcap
|
|
17
|
-
========================================================================== */
|
|
18
|
-
|
|
19
|
-
/*
|
|
20
|
-
* 1. Firefox doesn't apply `::first-letter` if the first letter is inside child elements
|
|
21
|
-
* https://bugzilla.mozilla.org/show_bug.cgi?id=214004
|
|
22
|
-
* 2. In Firefox, a floating `::first-letter` doesn't have a line box and there for no `line-height`
|
|
23
|
-
* https://bugzilla.mozilla.org/show_bug.cgi?id=317933
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
.uk-dropcap::first-letter,
|
|
27
|
-
/* 1 */
|
|
28
|
-
.uk-dropcap > p:first-of-type::first-letter {
|
|
29
|
-
display: block;
|
|
30
|
-
margin-right: @dropcap-margin-right;
|
|
31
|
-
float: left;
|
|
32
|
-
font-size: @dropcap-font-size;
|
|
33
|
-
line-height: @dropcap-line-height;
|
|
34
|
-
.hook-dropcap();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/* 2 */
|
|
38
|
-
@-moz-document url-prefix() {
|
|
39
|
-
|
|
40
|
-
.uk-dropcap::first-letter,
|
|
41
|
-
.uk-dropcap > p:first-of-type::first-letter { margin-top: 1.1%; }
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// Misc
|
|
47
|
-
// ========================================================================
|
|
48
|
-
|
|
49
|
-
.hook-dropcap-misc();
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
// Hooks
|
|
53
|
-
// ========================================================================
|
|
54
|
-
|
|
55
|
-
.hook-dropcap() {}
|
|
56
|
-
.hook-dropcap-misc() {}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
// Inverse
|
|
60
|
-
// ========================================================================
|
|
61
|
-
|
|
62
|
-
.hook-inverse () {
|
|
63
|
-
|
|
64
|
-
.uk-dropcap::first-letter,
|
|
65
|
-
.uk-dropcap p:first-of-type::first-letter {
|
|
66
|
-
.hook-inverse-dropcap();
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.hook-inverse-dropcap() {}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// Name: Floating Shadow
|
|
2
|
-
// Description: Component to create floating shadows
|
|
3
|
-
//
|
|
4
|
-
// Component: `uk-floating-shadow`
|
|
5
|
-
//
|
|
6
|
-
// ========================================================================
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// Variables
|
|
10
|
-
// ========================================================================
|
|
11
|
-
|
|
12
|
-
@floating-shadow-height: 30px;
|
|
13
|
-
@floating-shadow-bottom: -@floating-shadow-height;
|
|
14
|
-
@floating-shadow-border-radius: 100%;
|
|
15
|
-
@floating-shadow-background: #444;
|
|
16
|
-
@floating-shadow-blur: 20px;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/* ========================================================================
|
|
20
|
-
Component: Floating Shadow
|
|
21
|
-
========================================================================== */
|
|
22
|
-
|
|
23
|
-
/*
|
|
24
|
-
* 1. Set position.
|
|
25
|
-
* 2. Set style
|
|
26
|
-
* 3. Fix shadow being clipped in Safari if container is animated
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
.uk-floating-shadow {
|
|
30
|
-
display: inline-block;
|
|
31
|
-
position: relative;
|
|
32
|
-
z-index: 0;
|
|
33
|
-
max-width: 100%;
|
|
34
|
-
vertical-align: middle;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.uk-floating-shadow::after {
|
|
38
|
-
content: "";
|
|
39
|
-
/* 1 */
|
|
40
|
-
position: absolute;
|
|
41
|
-
bottom: @floating-shadow-bottom;
|
|
42
|
-
left: 0;
|
|
43
|
-
right: 0;
|
|
44
|
-
z-index: -1;
|
|
45
|
-
/* 2 */
|
|
46
|
-
height: @floating-shadow-height;
|
|
47
|
-
border-radius: @floating-shadow-border-radius;
|
|
48
|
-
background: @floating-shadow-background;
|
|
49
|
-
filter: blur(@floating-shadow-blur);
|
|
50
|
-
/* 3 */
|
|
51
|
-
will-change: filter;
|
|
52
|
-
.hook-floating-shadow();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
// Misc
|
|
57
|
-
// ========================================================================
|
|
58
|
-
|
|
59
|
-
.hook-floating-shadow-misc();
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
// Hooks
|
|
63
|
-
// ========================================================================
|
|
64
|
-
|
|
65
|
-
.hook-floating-shadow() {}
|
|
66
|
-
.hook-floating-shadow-misc() {}
|