uikit 3.17.12-dev.f1425d280 → 3.18.1-dev.0856bd8a6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/css/uikit-core-rtl.css +577 -504
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +577 -504
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +600 -527
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +600 -527
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +2 -4
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +96 -60
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +96 -60
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +11 -6
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +8 -3
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +735 -37
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +8 -3
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +792 -129
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +7 -7
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +2 -8
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +299 -273
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +9 -4
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +505 -365
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +3 -3
  43. package/src/images/components/navbar-toggle-icon.svg +1 -1
  44. package/src/images/icons/arrow-up-right.svg +4 -0
  45. package/src/images/icons/git-branch.svg +4 -4
  46. package/src/images/icons/git-fork.svg +4 -4
  47. package/src/images/icons/link-external.svg +5 -0
  48. package/src/images/icons/signal.svg +3 -0
  49. package/src/images/icons/telegram.svg +3 -0
  50. package/src/images/icons/threads.svg +3 -0
  51. package/src/images/icons/x.svg +3 -0
  52. package/src/js/components/countdown.js +1 -3
  53. package/src/js/components/internal/slider-preload.js +6 -0
  54. package/src/js/components/lightbox-panel.js +2 -6
  55. package/src/js/components/parallax.js +1 -20
  56. package/src/js/components/slider.js +38 -18
  57. package/src/js/components/slideshow.js +14 -46
  58. package/src/js/components/sortable.js +7 -6
  59. package/src/js/components/tooltip.js +1 -7
  60. package/src/js/core/accordion.js +1 -1
  61. package/src/js/core/drop.js +3 -5
  62. package/src/js/core/dropnav.js +24 -20
  63. package/src/js/core/height-match.js +7 -3
  64. package/src/js/core/height-placeholder.js +32 -0
  65. package/src/js/core/icon.js +12 -5
  66. package/src/js/core/index.js +2 -0
  67. package/src/js/core/inverse.js +103 -0
  68. package/src/js/core/modal.js +13 -0
  69. package/src/js/core/navbar.js +32 -172
  70. package/src/js/core/responsive.js +2 -29
  71. package/src/js/core/sticky.js +45 -29
  72. package/src/js/core/video.js +5 -1
  73. package/src/js/mixin/modal.js +1 -1
  74. package/src/js/mixin/parallax.js +19 -0
  75. package/src/js/mixin/slider-autoplay.js +1 -3
  76. package/src/js/mixin/slider-drag.js +22 -19
  77. package/src/js/mixin/slider-nav.js +10 -1
  78. package/src/js/mixin/slider-parallax.js +138 -0
  79. package/src/js/mixin/slider-reactive.js +1 -1
  80. package/src/js/mixin/slider.js +25 -3
  81. package/src/js/util/animation.js +14 -14
  82. package/src/js/util/dom.js +2 -2
  83. package/src/js/util/mouse.js +8 -11
  84. package/src/js/util/scroll.js +58 -0
  85. package/src/js/util/selector.js +4 -2
  86. package/src/js/util/style.js +3 -3
  87. package/src/js/util/viewport.js +8 -4
  88. package/src/less/components/align.less +2 -2
  89. package/src/less/components/animation.less +2 -2
  90. package/src/less/components/article.less +2 -2
  91. package/src/less/components/base.less +3 -3
  92. package/src/less/components/card.less +13 -6
  93. package/src/less/components/column.less +3 -3
  94. package/src/less/components/container.less +3 -3
  95. package/src/less/components/divider.less +2 -2
  96. package/src/less/components/dropbar.less +1 -1
  97. package/src/less/components/dropdown.less +1 -1
  98. package/src/less/components/dropnav.less +1 -1
  99. package/src/less/components/form.less +1 -1
  100. package/src/less/components/grid.less +3 -3
  101. package/src/less/components/height.less +1 -1
  102. package/src/less/components/icon.less +3 -3
  103. package/src/less/components/inverse.less +12 -0
  104. package/src/less/components/link.less +1 -1
  105. package/src/less/components/modal.less +3 -3
  106. package/src/less/components/nav.less +66 -0
  107. package/src/less/components/navbar.less +7 -11
  108. package/src/less/components/overlay.less +5 -0
  109. package/src/less/components/position.less +7 -7
  110. package/src/less/components/section.less +6 -5
  111. package/src/less/components/sticky.less +1 -1
  112. package/src/less/components/svg.less +3 -3
  113. package/src/less/components/tile.less +10 -0
  114. package/src/less/components/transition.less +9 -9
  115. package/src/less/components/utility.less +4 -4
  116. package/src/less/components/width.less +7 -7
  117. package/src/less/theme/alert.less +1 -1
  118. package/src/less/theme/align.less +1 -1
  119. package/src/less/theme/animation.less +1 -1
  120. package/src/less/theme/article.less +1 -1
  121. package/src/less/theme/background.less +1 -1
  122. package/src/less/theme/badge.less +1 -1
  123. package/src/less/theme/base.less +1 -1
  124. package/src/less/theme/breadcrumb.less +1 -1
  125. package/src/less/theme/button.less +1 -1
  126. package/src/less/theme/card.less +1 -1
  127. package/src/less/theme/close.less +1 -1
  128. package/src/less/theme/column.less +1 -1
  129. package/src/less/theme/comment.less +1 -1
  130. package/src/less/theme/container.less +1 -1
  131. package/src/less/theme/description-list.less +1 -1
  132. package/src/less/theme/divider.less +1 -1
  133. package/src/less/theme/dotnav.less +1 -1
  134. package/src/less/theme/drop.less +1 -1
  135. package/src/less/theme/dropbar.less +1 -1
  136. package/src/less/theme/dropdown.less +1 -1
  137. package/src/less/theme/form-range.less +1 -1
  138. package/src/less/theme/height.less +1 -1
  139. package/src/less/theme/icon.less +1 -1
  140. package/src/less/theme/iconnav.less +1 -1
  141. package/src/less/theme/inverse.less +1 -1
  142. package/src/less/theme/label.less +1 -1
  143. package/src/less/theme/leader.less +1 -1
  144. package/src/less/theme/lightbox.less +1 -1
  145. package/src/less/theme/margin.less +1 -1
  146. package/src/less/theme/modal.less +1 -1
  147. package/src/less/theme/nav.less +1 -1
  148. package/src/less/theme/navbar.less +3 -3
  149. package/src/less/theme/notification.less +1 -1
  150. package/src/less/theme/offcanvas.less +1 -1
  151. package/src/less/theme/overlay.less +1 -1
  152. package/src/less/theme/padding.less +1 -1
  153. package/src/less/theme/pagination.less +1 -1
  154. package/src/less/theme/position.less +1 -1
  155. package/src/less/theme/search.less +1 -1
  156. package/src/less/theme/spinner.less +1 -1
  157. package/src/less/theme/sticky.less +1 -1
  158. package/src/less/theme/tab.less +2 -2
  159. package/src/less/theme/table.less +1 -1
  160. package/src/less/theme/thumbnav.less +1 -1
  161. package/src/less/theme/tile.less +1 -1
  162. package/src/less/theme/tooltip.less +1 -1
  163. package/src/less/theme/totop.less +1 -1
  164. package/src/less/theme/transition.less +1 -1
  165. package/src/less/theme/utility.less +1 -1
  166. package/src/less/theme/variables.less +1 -1
  167. package/src/less/theme/width.less +1 -1
  168. package/src/less/uikit.less +1 -1
  169. package/src/scss/components/align.scss +2 -2
  170. package/src/scss/components/animation.scss +2 -2
  171. package/src/scss/components/base.scss +2 -2
  172. package/src/scss/components/card.scss +12 -6
  173. package/src/scss/components/column.scss +3 -3
  174. package/src/scss/components/container.scss +3 -3
  175. package/src/scss/components/divider.scss +2 -2
  176. package/src/scss/components/dropnav.scss +1 -1
  177. package/src/scss/components/form.scss +1 -1
  178. package/src/scss/components/grid.scss +3 -3
  179. package/src/scss/components/height.scss +1 -1
  180. package/src/scss/components/icon.scss +3 -3
  181. package/src/scss/components/inverse.scss +12 -0
  182. package/src/scss/components/modal.scss +3 -3
  183. package/src/scss/components/nav.scss +63 -0
  184. package/src/scss/components/navbar.scss +5 -8
  185. package/src/scss/components/overlay.scss +4 -0
  186. package/src/scss/components/position.scss +7 -7
  187. package/src/scss/components/section.scss +6 -5
  188. package/src/scss/components/sticky.scss +1 -1
  189. package/src/scss/components/svg.scss +3 -3
  190. package/src/scss/components/tile.scss +8 -0
  191. package/src/scss/components/transition.scss +9 -9
  192. package/src/scss/components/utility.scss +4 -4
  193. package/src/scss/components/width.scss +7 -7
  194. package/src/scss/mixins-theme.scss +10 -7
  195. package/src/scss/mixins.scss +7 -4
  196. package/src/scss/theme/alert.scss +1 -0
  197. package/src/scss/theme/align.scss +1 -1
  198. package/src/scss/theme/animation.scss +1 -1
  199. package/src/scss/theme/article.scss +1 -1
  200. package/src/scss/theme/background.scss +1 -1
  201. package/src/scss/theme/badge.scss +1 -1
  202. package/src/scss/theme/base.scss +1 -1
  203. package/src/scss/theme/breadcrumb.scss +1 -1
  204. package/src/scss/theme/button.scss +1 -1
  205. package/src/scss/theme/card.scss +1 -0
  206. package/src/scss/theme/close.scss +1 -1
  207. package/src/scss/theme/column.scss +1 -1
  208. package/src/scss/theme/comment.scss +1 -1
  209. package/src/scss/theme/container.scss +1 -1
  210. package/src/scss/theme/description-list.scss +1 -1
  211. package/src/scss/theme/divider.scss +1 -1
  212. package/src/scss/theme/dotnav.scss +1 -0
  213. package/src/scss/theme/drop.scss +1 -1
  214. package/src/scss/theme/dropbar.scss +1 -1
  215. package/src/scss/theme/dropdown.scss +1 -1
  216. package/src/scss/theme/form-range.scss +1 -1
  217. package/src/scss/theme/height.scss +1 -1
  218. package/src/scss/theme/icon.scss +1 -1
  219. package/src/scss/theme/iconnav.scss +1 -1
  220. package/src/scss/theme/inverse.scss +1 -1
  221. package/src/scss/theme/label.scss +1 -1
  222. package/src/scss/theme/leader.scss +1 -1
  223. package/src/scss/theme/lightbox.scss +1 -1
  224. package/src/scss/theme/margin.scss +1 -1
  225. package/src/scss/theme/modal.scss +1 -0
  226. package/src/scss/theme/nav.scss +1 -1
  227. package/src/scss/theme/navbar.scss +1 -1
  228. package/src/scss/theme/notification.scss +1 -1
  229. package/src/scss/theme/offcanvas.scss +1 -1
  230. package/src/scss/theme/overlay.scss +1 -1
  231. package/src/scss/theme/padding.scss +1 -1
  232. package/src/scss/theme/pagination.scss +1 -1
  233. package/src/scss/theme/position.scss +1 -1
  234. package/src/scss/theme/search.scss +1 -1
  235. package/src/scss/theme/spinner.scss +1 -1
  236. package/src/scss/theme/sticky.scss +1 -1
  237. package/src/scss/theme/tab.scss +1 -1
  238. package/src/scss/theme/table.scss +1 -0
  239. package/src/scss/theme/thumbnav.scss +1 -1
  240. package/src/scss/theme/tile.scss +1 -1
  241. package/src/scss/theme/tooltip.scss +1 -1
  242. package/src/scss/theme/totop.scss +1 -1
  243. package/src/scss/theme/transition.scss +1 -1
  244. package/src/scss/theme/utility.scss +1 -1
  245. package/src/scss/theme/variables.scss +1 -1
  246. package/src/scss/theme/width.scss +1 -1
  247. package/src/scss/uikit.scss +1 -1
  248. package/src/scss/variables-theme.scss +20 -5
  249. package/src/scss/variables.scss +20 -5
  250. package/tests/height.html +58 -1
  251. package/tests/icon.html +38 -10
  252. package/tests/nav.html +42 -0
  253. package/tests/navbar.html +1 -1
  254. package/tests/offcanvas.html +8 -8
  255. package/tests/search.html +300 -202
  256. package/tests/slider.html +58 -0
  257. package/tests/slideshow.html +66 -0
  258. package/tests/sticky-navbar.html +381 -23
  259. package/src/images/icons/pagekit.svg +0 -3
  260. package/src/js/mixin/internal/scroll.js +0 -39
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.17.12-dev.f1425d280 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
1
+ /*! UIkit 3.18.1-dev.0856bd8a6 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -12,10 +12,736 @@
12
12
  }
13
13
  };
14
14
 
15
+ function callUpdate(instance, e = "update") {
16
+ if (!instance._connected) {
17
+ return;
18
+ }
19
+ if (!instance._updates.length) {
20
+ return;
21
+ }
22
+ if (!instance._queued) {
23
+ instance._queued = /* @__PURE__ */ new Set();
24
+ util.fastdom.read(() => {
25
+ if (instance._connected) {
26
+ runUpdates(instance, instance._queued);
27
+ }
28
+ delete instance._queued;
29
+ });
30
+ }
31
+ instance._queued.add(e.type || e);
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 && util.isPlainObject(result)) {
42
+ util.assign(instance._data, result);
43
+ }
44
+ }
45
+ if (write && result !== false) {
46
+ util.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(util.observeResize, options, "resize");
57
+ }
58
+ function intersection(options) {
59
+ return observe(util.observeIntersection, options);
60
+ }
61
+ function lazyload(options = {}) {
62
+ return intersection({
63
+ handler: function(entries, observer) {
64
+ const { targets = this.$el, preload = 5 } = options;
65
+ for (const el of util.toNodes(util.isFunction(targets) ? targets(this) : targets)) {
66
+ util.$$('[loading="lazy"]', el).slice(0, preload - 1).forEach((el2) => util.removeAttr(el2, "loading"));
67
+ }
68
+ for (const el of entries.filter(({ isIntersecting }) => isIntersecting).map(({ target }) => target)) {
69
+ observer.unobserve(el);
70
+ }
71
+ },
72
+ ...options
73
+ });
74
+ }
75
+ function scroll(options) {
76
+ return observe(
77
+ (target, handler) => ({
78
+ disconnect: util.on(toScrollTargets(target), "scroll", handler, { passive: true })
79
+ }),
80
+ options,
81
+ "scroll"
82
+ );
83
+ }
84
+ function observe(observe2, options, emit) {
85
+ return {
86
+ observe: observe2,
87
+ handler() {
88
+ callUpdate(this, emit);
89
+ },
90
+ ...options
91
+ };
92
+ }
93
+ function toScrollTargets(elements) {
94
+ return util.toNodes(elements).map((node) => {
95
+ const { ownerDocument } = node;
96
+ const parent2 = util.scrollParent(node, true);
97
+ return parent2 === ownerDocument.scrollingElement ? ownerDocument : parent2;
98
+ });
99
+ }
100
+
101
+ var Media = {
102
+ props: {
103
+ media: Boolean
104
+ },
105
+ data: {
106
+ media: false
107
+ },
108
+ connected() {
109
+ const media = toMedia(this.media, this.$el);
110
+ this.matchMedia = true;
111
+ if (media) {
112
+ this.mediaObj = window.matchMedia(media);
113
+ const handler = () => {
114
+ this.matchMedia = this.mediaObj.matches;
115
+ util.trigger(this.$el, util.createEvent("mediachange", false, true, [this.mediaObj]));
116
+ };
117
+ this.offMediaObj = util.on(this.mediaObj, "change", () => {
118
+ handler();
119
+ this.$emit("resize");
120
+ });
121
+ handler();
122
+ }
123
+ },
124
+ disconnected() {
125
+ var _a;
126
+ (_a = this.offMediaObj) == null ? void 0 : _a.call(this);
127
+ }
128
+ };
129
+ function toMedia(value, element) {
130
+ if (util.isString(value)) {
131
+ if (util.startsWith(value, "@")) {
132
+ value = util.toFloat(util.css(element, `--uk-breakpoint-${value.substr(1)}`));
133
+ } else if (isNaN(value)) {
134
+ return value;
135
+ }
136
+ }
137
+ return value && util.isNumeric(value) ? `(min-width: ${value}px)` : "";
138
+ }
139
+
140
+ function startsWith(str, search) {
141
+ var _a;
142
+ return (_a = str == null ? void 0 : str.startsWith) == null ? void 0 : _a.call(str, search);
143
+ }
144
+ const { isArray, from: toArray } = Array;
145
+ function isFunction(obj) {
146
+ return typeof obj === "function";
147
+ }
148
+ function isObject(obj) {
149
+ return obj !== null && typeof obj === "object";
150
+ }
151
+ function isWindow(obj) {
152
+ return isObject(obj) && obj === obj.window;
153
+ }
154
+ function isDocument(obj) {
155
+ return nodeType(obj) === 9;
156
+ }
157
+ function isNode(obj) {
158
+ return nodeType(obj) >= 1;
159
+ }
160
+ function nodeType(obj) {
161
+ return !isWindow(obj) && isObject(obj) && obj.nodeType;
162
+ }
163
+ function isString(value) {
164
+ return typeof value === "string";
165
+ }
166
+ function isUndefined(value) {
167
+ return value === void 0;
168
+ }
169
+ function toNode(element) {
170
+ return toNodes(element)[0];
171
+ }
172
+ function toNodes(element) {
173
+ return isNode(element) ? [element] : Array.from(element || []).filter(isNode);
174
+ }
175
+ function memoize(fn) {
176
+ const cache = /* @__PURE__ */ Object.create(null);
177
+ return (key, ...args) => cache[key] || (cache[key] = fn(key, ...args));
178
+ }
179
+
180
+ function attr(element, name, value) {
181
+ var _a;
182
+ if (isObject(name)) {
183
+ for (const key in name) {
184
+ attr(element, key, name[key]);
185
+ }
186
+ return;
187
+ }
188
+ if (isUndefined(value)) {
189
+ return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
190
+ } else {
191
+ for (const el of toNodes(element)) {
192
+ if (isFunction(value)) {
193
+ value = value.call(el, attr(el, name));
194
+ }
195
+ if (value === null) {
196
+ removeAttr(el, name);
197
+ } else {
198
+ el.setAttribute(name, value);
199
+ }
200
+ }
201
+ }
202
+ }
203
+ function removeAttr(element, name) {
204
+ toNodes(element).forEach((element2) => element2.removeAttribute(name));
205
+ }
206
+
207
+ function parent(element) {
208
+ var _a;
209
+ return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
210
+ }
211
+ function filter(element, selector) {
212
+ return toNodes(element).filter((element2) => matches(element2, selector));
213
+ }
214
+ function matches(element, selector) {
215
+ return toNodes(element).some((element2) => element2.matches(selector));
216
+ }
217
+ function children(element, selector) {
218
+ element = toNode(element);
219
+ const children2 = element ? toArray(element.children) : [];
220
+ return selector ? filter(children2, selector) : children2;
221
+ }
222
+ function index(element, ref) {
223
+ return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);
224
+ }
225
+
226
+ function findAll(selector, context) {
227
+ return toNodes(_query(selector, toNode(context), "querySelectorAll"));
228
+ }
229
+ const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
230
+ const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
231
+ const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
232
+ const sanatize = memoize((selector) => selector.replace(contextSanitizeRe, "$1 *"));
233
+ function _query(selector, context = document, queryFn) {
234
+ if (!selector || !isString(selector)) {
235
+ return selector;
236
+ }
237
+ selector = sanatize(selector);
238
+ if (isContextSelector(selector)) {
239
+ const split = splitSelector(selector);
240
+ selector = "";
241
+ for (let sel of split) {
242
+ let ctx = context;
243
+ if (sel[0] === "!") {
244
+ const selectors = sel.substr(1).trim().split(" ");
245
+ ctx = parent(context).closest(selectors[0]);
246
+ sel = selectors.slice(1).join(" ").trim();
247
+ if (!sel.length && split.length === 1) {
248
+ return ctx;
249
+ }
250
+ }
251
+ if (sel[0] === "-") {
252
+ const selectors = sel.substr(1).trim().split(" ");
253
+ const prev = (ctx || context).previousElementSibling;
254
+ ctx = matches(prev, sel.substr(1)) ? prev : null;
255
+ sel = selectors.slice(1).join(" ");
256
+ }
257
+ if (ctx) {
258
+ selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
259
+ }
260
+ }
261
+ if (!isDocument(context)) {
262
+ context = context.ownerDocument;
263
+ }
264
+ }
265
+ try {
266
+ return context[queryFn](selector);
267
+ } catch (e) {
268
+ return null;
269
+ }
270
+ }
271
+ const selectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
272
+ const splitSelector = memoize(
273
+ (selector) => selector.match(selectorRe).map((selector2) => selector2.replace(/,$/, "").trim())
274
+ );
275
+ function domPath(element) {
276
+ const names = [];
277
+ while (element.parentNode) {
278
+ const id = attr(element, "id");
279
+ if (id) {
280
+ names.unshift(`#${escape(id)}`);
281
+ break;
282
+ } else {
283
+ let { tagName } = element;
284
+ if (tagName !== "HTML") {
285
+ tagName += `:nth-child(${index(element) + 1})`;
286
+ }
287
+ names.unshift(tagName);
288
+ element = element.parentNode;
289
+ }
290
+ }
291
+ return names.join(" > ");
292
+ }
293
+ function escape(css) {
294
+ return isString(css) ? CSS.escape(css) : "";
295
+ }
296
+
297
+ const singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/;
298
+ function fragment(html2) {
299
+ const matches = singleTagRe.exec(html2);
300
+ if (matches) {
301
+ return document.createElement(matches[1]);
302
+ }
303
+ const container = document.createElement("template");
304
+ container.innerHTML = html2.trim();
305
+ return unwrapSingle(container.content.childNodes);
306
+ }
307
+ function unwrapSingle(nodes) {
308
+ return nodes.length > 1 ? nodes : nodes[0];
309
+ }
310
+ function $$(selector, context) {
311
+ return isHtml(selector) ? toNodes(fragment(selector)) : findAll(selector, context);
312
+ }
313
+ function isHtml(str) {
314
+ return isString(str) && startsWith(str.trim(), "<");
315
+ }
316
+
317
+ function getMaxPathLength(el) {
318
+ return Math.ceil(
319
+ Math.max(
320
+ 0,
321
+ ...$$("[stroke]", el).map((stroke) => {
322
+ try {
323
+ return stroke.getTotalLength();
324
+ } catch (e) {
325
+ return 0;
326
+ }
327
+ })
328
+ )
329
+ );
330
+ }
331
+
332
+ const props = {
333
+ x: transformFn,
334
+ y: transformFn,
335
+ rotate: transformFn,
336
+ scale: transformFn,
337
+ color: colorFn,
338
+ backgroundColor: colorFn,
339
+ borderColor: colorFn,
340
+ blur: filterFn,
341
+ hue: filterFn,
342
+ fopacity: filterFn,
343
+ grayscale: filterFn,
344
+ invert: filterFn,
345
+ saturate: filterFn,
346
+ sepia: filterFn,
347
+ opacity: cssPropFn,
348
+ stroke: strokeFn,
349
+ bgx: backgroundFn,
350
+ bgy: backgroundFn
351
+ };
352
+ const { keys } = Object;
353
+ ({
354
+ mixins: [Media],
355
+ props: fillObject(keys(props), "list"),
356
+ data: fillObject(keys(props), void 0),
357
+ computed: {
358
+ props(properties, $el) {
359
+ const stops = {};
360
+ for (const prop in properties) {
361
+ if (prop in props && !util.isUndefined(properties[prop])) {
362
+ stops[prop] = properties[prop].slice();
363
+ }
364
+ }
365
+ const result = {};
366
+ for (const prop in stops) {
367
+ result[prop] = props[prop](prop, $el, stops[prop], stops);
368
+ }
369
+ return result;
370
+ }
371
+ },
372
+ events: {
373
+ load() {
374
+ this.$emit();
375
+ }
376
+ },
377
+ methods: {
378
+ reset() {
379
+ for (const prop in this.getCss(0)) {
380
+ util.css(this.$el, prop, "");
381
+ }
382
+ },
383
+ getCss(percent) {
384
+ const css2 = {};
385
+ for (const prop in this.props) {
386
+ this.props[prop](css2, util.clamp(percent));
387
+ }
388
+ css2.willChange = Object.keys(css2).map(util.propName).join(",");
389
+ return css2;
390
+ }
391
+ }
392
+ });
393
+ function transformFn(prop, el, stops) {
394
+ let unit = getUnit(stops) || { x: "px", y: "px", rotate: "deg" }[prop] || "";
395
+ let transformFn2;
396
+ if (prop === "x" || prop === "y") {
397
+ prop = `translate${util.ucfirst(prop)}`;
398
+ transformFn2 = (stop) => util.toFloat(util.toFloat(stop).toFixed(unit === "px" ? 0 : 6));
399
+ } else if (prop === "scale") {
400
+ unit = "";
401
+ transformFn2 = (stop) => {
402
+ var _a;
403
+ return getUnit([stop]) ? util.toPx(stop, "width", el, true) / el[`offset${((_a = stop.endsWith) == null ? void 0 : _a.call(stop, "vh")) ? "Height" : "Width"}`] : util.toFloat(stop);
404
+ };
405
+ }
406
+ if (stops.length === 1) {
407
+ stops.unshift(prop === "scale" ? 1 : 0);
408
+ }
409
+ stops = parseStops(stops, transformFn2);
410
+ return (css2, percent) => {
411
+ css2.transform = `${css2.transform || ""} ${prop}(${getValue(stops, percent)}${unit})`;
412
+ };
413
+ }
414
+ function colorFn(prop, el, stops) {
415
+ if (stops.length === 1) {
416
+ stops.unshift(getCssValue(el, prop, ""));
417
+ }
418
+ stops = parseStops(stops, (stop) => parseColor(el, stop));
419
+ return (css2, percent) => {
420
+ const [start, end, p] = getStop(stops, percent);
421
+ const value = start.map((value2, i) => {
422
+ value2 += p * (end[i] - value2);
423
+ return i === 3 ? util.toFloat(value2) : parseInt(value2, 10);
424
+ }).join(",");
425
+ css2[prop] = `rgba(${value})`;
426
+ };
427
+ }
428
+ function parseColor(el, color) {
429
+ return getCssValue(el, "color", color).split(/[(),]/g).slice(1, -1).concat(1).slice(0, 4).map(util.toFloat);
430
+ }
431
+ function filterFn(prop, el, stops) {
432
+ if (stops.length === 1) {
433
+ stops.unshift(0);
434
+ }
435
+ const unit = getUnit(stops) || { blur: "px", hue: "deg" }[prop] || "%";
436
+ prop = { fopacity: "opacity", hue: "hue-rotate" }[prop] || prop;
437
+ stops = parseStops(stops);
438
+ return (css2, percent) => {
439
+ const value = getValue(stops, percent);
440
+ css2.filter = `${css2.filter || ""} ${prop}(${value + unit})`;
441
+ };
442
+ }
443
+ function cssPropFn(prop, el, stops) {
444
+ if (stops.length === 1) {
445
+ stops.unshift(getCssValue(el, prop, ""));
446
+ }
447
+ stops = parseStops(stops);
448
+ return (css2, percent) => {
449
+ css2[prop] = getValue(stops, percent);
450
+ };
451
+ }
452
+ function strokeFn(prop, el, stops) {
453
+ if (stops.length === 1) {
454
+ stops.unshift(0);
455
+ }
456
+ const unit = getUnit(stops);
457
+ const length = getMaxPathLength(el);
458
+ stops = parseStops(stops.reverse(), (stop) => {
459
+ stop = util.toFloat(stop);
460
+ return unit === "%" ? stop * length / 100 : stop;
461
+ });
462
+ if (!stops.some(([value]) => value)) {
463
+ return util.noop;
464
+ }
465
+ util.css(el, "strokeDasharray", length);
466
+ return (css2, percent) => {
467
+ css2.strokeDashoffset = getValue(stops, percent);
468
+ };
469
+ }
470
+ function backgroundFn(prop, el, stops, props2) {
471
+ if (stops.length === 1) {
472
+ stops.unshift(0);
473
+ }
474
+ const attr = prop === "bgy" ? "height" : "width";
475
+ props2[prop] = parseStops(stops, (stop) => util.toPx(stop, attr, el));
476
+ const bgProps = ["bgx", "bgy"].filter((prop2) => prop2 in props2);
477
+ if (bgProps.length === 2 && prop === "bgx") {
478
+ return util.noop;
479
+ }
480
+ if (getCssValue(el, "backgroundSize", "") === "cover") {
481
+ return backgroundCoverFn(prop, el, stops, props2);
482
+ }
483
+ const positions = {};
484
+ for (const prop2 of bgProps) {
485
+ positions[prop2] = getBackgroundPos(el, prop2);
486
+ }
487
+ return setBackgroundPosFn(bgProps, positions, props2);
488
+ }
489
+ function backgroundCoverFn(prop, el, stops, props2) {
490
+ const dimImage = getBackgroundImageDimensions(el);
491
+ if (!dimImage.width) {
492
+ return util.noop;
493
+ }
494
+ const dimEl = {
495
+ width: el.offsetWidth,
496
+ height: el.offsetHeight
497
+ };
498
+ const bgProps = ["bgx", "bgy"].filter((prop2) => prop2 in props2);
499
+ const positions = {};
500
+ for (const prop2 of bgProps) {
501
+ const values = props2[prop2].map(([value]) => value);
502
+ const min = Math.min(...values);
503
+ const max = Math.max(...values);
504
+ const down = values.indexOf(min) < values.indexOf(max);
505
+ const diff = max - min;
506
+ positions[prop2] = `${(down ? -diff : 0) - (down ? min : max)}px`;
507
+ dimEl[prop2 === "bgy" ? "height" : "width"] += diff;
508
+ }
509
+ const dim = util.Dimensions.cover(dimImage, dimEl);
510
+ for (const prop2 of bgProps) {
511
+ const attr = prop2 === "bgy" ? "height" : "width";
512
+ const overflow = dim[attr] - dimEl[attr];
513
+ positions[prop2] = `max(${getBackgroundPos(el, prop2)},-${overflow}px) + ${positions[prop2]}`;
514
+ }
515
+ const fn = setBackgroundPosFn(bgProps, positions, props2);
516
+ return (css2, percent) => {
517
+ fn(css2, percent);
518
+ css2.backgroundSize = `${dim.width}px ${dim.height}px`;
519
+ css2.backgroundRepeat = "no-repeat";
520
+ };
521
+ }
522
+ function getBackgroundPos(el, prop) {
523
+ return getCssValue(el, `background-position-${prop.substr(-1)}`, "");
524
+ }
525
+ function setBackgroundPosFn(bgProps, positions, props2) {
526
+ return function(css2, percent) {
527
+ for (const prop of bgProps) {
528
+ const value = getValue(props2[prop], percent);
529
+ css2[`background-position-${prop.substr(-1)}`] = `calc(${positions[prop]} + ${value}px)`;
530
+ }
531
+ };
532
+ }
533
+ const dimensions = {};
534
+ function getBackgroundImageDimensions(el) {
535
+ const src = util.css(el, "backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/, "$1");
536
+ if (dimensions[src]) {
537
+ return dimensions[src];
538
+ }
539
+ const image = new Image();
540
+ if (src) {
541
+ image.src = src;
542
+ if (!image.naturalWidth) {
543
+ image.onload = () => {
544
+ dimensions[src] = toDimensions(image);
545
+ util.trigger(el, util.createEvent("load", false));
546
+ };
547
+ return toDimensions(image);
548
+ }
549
+ }
550
+ return dimensions[src] = toDimensions(image);
551
+ }
552
+ function toDimensions(image) {
553
+ return {
554
+ width: image.naturalWidth,
555
+ height: image.naturalHeight
556
+ };
557
+ }
558
+ function parseStops(stops, fn = util.toFloat) {
559
+ const result = [];
560
+ const { length } = stops;
561
+ let nullIndex = 0;
562
+ for (let i = 0; i < length; i++) {
563
+ let [value, percent] = util.isString(stops[i]) ? stops[i].trim().split(/ (?![^(]*\))/) : [stops[i]];
564
+ value = fn(value);
565
+ percent = percent ? util.toFloat(percent) / 100 : null;
566
+ if (i === 0) {
567
+ if (percent === null) {
568
+ percent = 0;
569
+ } else if (percent) {
570
+ result.push([value, 0]);
571
+ }
572
+ } else if (i === length - 1) {
573
+ if (percent === null) {
574
+ percent = 1;
575
+ } else if (percent !== 1) {
576
+ result.push([value, percent]);
577
+ percent = 1;
578
+ }
579
+ }
580
+ result.push([value, percent]);
581
+ if (percent === null) {
582
+ nullIndex++;
583
+ } else if (nullIndex) {
584
+ const leftPercent = result[i - nullIndex - 1][1];
585
+ const p = (percent - leftPercent) / (nullIndex + 1);
586
+ for (let j = nullIndex; j > 0; j--) {
587
+ result[i - j][1] = leftPercent + p * (nullIndex - j + 1);
588
+ }
589
+ nullIndex = 0;
590
+ }
591
+ }
592
+ return result;
593
+ }
594
+ function getStop(stops, percent) {
595
+ const index = util.findIndex(stops.slice(1), ([, targetPercent]) => percent <= targetPercent) + 1;
596
+ return [
597
+ stops[index - 1][0],
598
+ stops[index][0],
599
+ (percent - stops[index - 1][1]) / (stops[index][1] - stops[index - 1][1])
600
+ ];
601
+ }
602
+ function getValue(stops, percent) {
603
+ const [start, end, p] = getStop(stops, percent);
604
+ return start + Math.abs(start - end) * p * (start < end ? 1 : -1);
605
+ }
606
+ const unitRe = /^-?\d+(?:\.\d+)?(\S+)?/;
607
+ function getUnit(stops, defaultUnit) {
608
+ var _a;
609
+ for (const stop of stops) {
610
+ const match = (_a = stop.match) == null ? void 0 : _a.call(stop, unitRe);
611
+ if (match) {
612
+ return match[1];
613
+ }
614
+ }
615
+ return defaultUnit;
616
+ }
617
+ function getCssValue(el, prop, value) {
618
+ const prev = el.style[prop];
619
+ const val = util.css(util.css(el, prop, value), prop);
620
+ el.style[prop] = prev;
621
+ return val;
622
+ }
623
+ function fillObject(keys2, value) {
624
+ return keys2.reduce((data, prop) => {
625
+ data[prop] = value;
626
+ return data;
627
+ }, {});
628
+ }
629
+ function ease(percent, easing) {
630
+ return easing >= 0 ? Math.pow(percent, easing + 1) : 1 - Math.pow(1 - percent, 1 - easing);
631
+ }
632
+
633
+ var SliderParallax = {
634
+ props: {
635
+ parallax: Boolean,
636
+ parallaxTarget: Boolean,
637
+ parallaxStart: String,
638
+ parallaxEnd: String,
639
+ parallaxEasing: Number
640
+ },
641
+ data: {
642
+ parallax: false,
643
+ parallaxTarget: false,
644
+ parallaxStart: 0,
645
+ parallaxEnd: 0,
646
+ parallaxEasing: 0
647
+ },
648
+ observe: [
649
+ resize({
650
+ target: ({ $el, parallaxTarget }) => [$el, parallaxTarget],
651
+ filter: ({ parallax }) => parallax
652
+ }),
653
+ scroll({ filter: ({ parallax }) => parallax })
654
+ ],
655
+ computed: {
656
+ parallaxTarget({ parallaxTarget }, $el) {
657
+ return parallaxTarget && util.query(parallaxTarget, $el) || this.list;
658
+ }
659
+ },
660
+ update: {
661
+ write() {
662
+ if (!this.parallax) {
663
+ return;
664
+ }
665
+ const target = this.parallaxTarget;
666
+ const start = util.toPx(this.parallaxStart, "height", target, true);
667
+ const end = util.toPx(this.parallaxEnd, "height", target, true);
668
+ const percent = ease(util.scrolledOver(target, start, end), this.parallaxEasing);
669
+ const [prevIndex, slidePercent] = this.getIndexAt(percent);
670
+ const nextIndex = this.getValidIndex(prevIndex + Math.ceil(slidePercent));
671
+ const prev = this.slides[prevIndex];
672
+ const next = this.slides[nextIndex];
673
+ const { triggerShow, triggerShown, triggerHide, triggerHidden } = useTriggers(this);
674
+ if (~this.prevIndex) {
675
+ for (const i of /* @__PURE__ */ new Set([this.index, this.prevIndex])) {
676
+ if (!util.includes([nextIndex, prevIndex], i)) {
677
+ triggerHide(this.slides[i]);
678
+ triggerHidden(this.slides[i]);
679
+ }
680
+ }
681
+ }
682
+ const changed = this.prevIndex !== prevIndex || this.index !== nextIndex;
683
+ this.dir = 1;
684
+ this.prevIndex = prevIndex;
685
+ this.index = nextIndex;
686
+ if (prev !== next) {
687
+ triggerHide(prev);
688
+ }
689
+ triggerShow(next);
690
+ if (changed) {
691
+ triggerShown(prev);
692
+ }
693
+ this._translate(prev === next ? 1 : slidePercent, prev, next);
694
+ },
695
+ events: ["scroll", "resize"]
696
+ },
697
+ methods: {
698
+ getIndexAt(percent) {
699
+ const index = percent * (this.length - 1);
700
+ return [Math.floor(index), index % 1];
701
+ }
702
+ }
703
+ };
704
+ function useTriggers(cmp) {
705
+ const { clsSlideActive, clsEnter, clsLeave } = cmp;
706
+ return { triggerShow, triggerShown, triggerHide, triggerHidden };
707
+ function triggerShow(el) {
708
+ if (util.hasClass(el, clsLeave)) {
709
+ triggerHide(el);
710
+ triggerHidden(el);
711
+ }
712
+ if (!util.hasClass(el, clsSlideActive)) {
713
+ util.trigger(el, "beforeitemshow", [cmp]);
714
+ util.trigger(el, "itemshow", [cmp]);
715
+ }
716
+ }
717
+ function triggerShown(el) {
718
+ if (util.hasClass(el, clsEnter)) {
719
+ util.trigger(el, "itemshown", [cmp]);
720
+ }
721
+ }
722
+ function triggerHide(el) {
723
+ if (!util.hasClass(el, clsSlideActive)) {
724
+ triggerShow(el);
725
+ }
726
+ if (util.hasClass(el, clsEnter)) {
727
+ triggerShown(el);
728
+ }
729
+ if (!util.hasClass(el, clsLeave)) {
730
+ util.trigger(el, "beforeitemhide", [cmp]);
731
+ util.trigger(el, "itemhide", [cmp]);
732
+ }
733
+ }
734
+ function triggerHidden(el) {
735
+ if (util.hasClass(el, clsLeave)) {
736
+ util.trigger(el, "itemhidden", [cmp]);
737
+ }
738
+ }
739
+ }
740
+
15
741
  var SliderReactive = {
16
742
  update: {
17
743
  write() {
18
- if (this.stack.length || this.dragging) {
744
+ if (this.stack.length || this.dragging || this.parallax) {
19
745
  return;
20
746
  }
21
747
  const index = this.getValidIndex();
@@ -111,76 +837,6 @@
111
837
  util.trigger(el, util.createEvent(type, false, false, data));
112
838
  }
113
839
 
114
- function callUpdate(instance, e = "update") {
115
- if (!instance._connected) {
116
- return;
117
- }
118
- if (!instance._updates.length) {
119
- return;
120
- }
121
- if (!instance._queued) {
122
- instance._queued = /* @__PURE__ */ new Set();
123
- util.fastdom.read(() => {
124
- if (instance._connected) {
125
- runUpdates(instance, instance._queued);
126
- }
127
- delete instance._queued;
128
- });
129
- }
130
- instance._queued.add(e.type || e);
131
- }
132
- function runUpdates(instance, types) {
133
- for (const { read, write, events = [] } of instance._updates) {
134
- if (!types.has("update") && !events.some((type) => types.has(type))) {
135
- continue;
136
- }
137
- let result;
138
- if (read) {
139
- result = read.call(instance, instance._data, types);
140
- if (result && util.isPlainObject(result)) {
141
- util.assign(instance._data, result);
142
- }
143
- }
144
- if (write && result !== false) {
145
- util.fastdom.write(() => {
146
- if (instance._connected) {
147
- write.call(instance, instance._data, types);
148
- }
149
- });
150
- }
151
- }
152
- }
153
-
154
- function resize(options) {
155
- return observe(util.observeResize, options, "resize");
156
- }
157
- function intersection(options) {
158
- return observe(util.observeIntersection, options);
159
- }
160
- function lazyload(options = {}) {
161
- return intersection({
162
- handler: function(entries, observer) {
163
- const { targets = this.$el, preload = 5 } = options;
164
- for (const el of util.toNodes(util.isFunction(targets) ? targets(this) : targets)) {
165
- util.$$('[loading="lazy"]', el).slice(0, preload - 1).forEach((el2) => util.removeAttr(el2, "loading"));
166
- }
167
- for (const el of entries.filter(({ isIntersecting }) => isIntersecting).map(({ target }) => target)) {
168
- observer.unobserve(el);
169
- }
170
- },
171
- ...options
172
- });
173
- }
174
- function observe(observe2, options, emit) {
175
- return {
176
- observe: observe2,
177
- handler() {
178
- callUpdate(this, emit);
179
- },
180
- ...options
181
- };
182
- }
183
-
184
840
  var I18n = {
185
841
  props: {
186
842
  i18n: Object
@@ -224,9 +880,7 @@
224
880
  events: [
225
881
  {
226
882
  name: "visibilitychange",
227
- el() {
228
- return document;
229
- },
883
+ el: () => document,
230
884
  filter() {
231
885
  return this.autoplay;
232
886
  },
@@ -259,6 +913,7 @@
259
913
  const pointerDown = "touchstart mousedown";
260
914
  const pointerMove = "touchmove mousemove";
261
915
  const pointerUp = "touchend touchcancel mouseup click input scroll";
916
+ const preventClick = (e) => e.preventDefault();
262
917
  var SliderDrag = {
263
918
  props: {
264
919
  draggable: Boolean
@@ -286,7 +941,7 @@
286
941
  return `${this.selList} > *`;
287
942
  },
288
943
  handler(e) {
289
- if (!this.draggable || !util.isTouch(e) && hasSelectableText(e.target) || e.target.closest(util.selInput) || e.button > 0 || this.length < 2) {
944
+ if (!this.draggable || this.parallax || !util.isTouch(e) && hasSelectableText(e.target) || e.target.closest(util.selInput) || e.button > 0 || this.length < 2) {
290
945
  return;
291
946
  }
292
947
  this.start(e);
@@ -330,20 +985,22 @@
330
985
  if (distance === 0 || this.prevPos === this.pos || !this.dragging && Math.abs(distance) < this.threshold) {
331
986
  return;
332
987
  }
333
- util.css(this.list, "pointerEvents", "none");
988
+ if (!this.dragging) {
989
+ util.on(this.list, "click", preventClick, pointerOptions);
990
+ }
334
991
  e.cancelable && e.preventDefault();
335
992
  this.dragging = true;
336
993
  this.dir = distance < 0 ? 1 : -1;
337
994
  let { slides, prevIndex } = this;
338
995
  let dis = Math.abs(distance);
339
996
  let nextIndex = this.getIndex(prevIndex + this.dir);
340
- let width = this._getDistance(prevIndex, nextIndex);
997
+ let width = getDistance.call(this, prevIndex, nextIndex);
341
998
  while (nextIndex !== prevIndex && dis > width) {
342
999
  this.drag -= width * this.dir;
343
1000
  prevIndex = nextIndex;
344
1001
  dis -= width;
345
1002
  nextIndex = this.getIndex(prevIndex + this.dir);
346
- width = this._getDistance(prevIndex, nextIndex);
1003
+ width = getDistance.call(this, prevIndex, nextIndex);
347
1004
  }
348
1005
  this.percent = dis / width;
349
1006
  const prev = slides[prevIndex];
@@ -366,14 +1023,14 @@
366
1023
  if (changed) {
367
1024
  this.prevIndex = prevIndex;
368
1025
  this.index = nextIndex;
369
- !edge && util.trigger(prev, "beforeitemhide", [this]);
1026
+ if (!edge) {
1027
+ util.trigger(prev, "beforeitemhide", [this]);
1028
+ util.trigger(prev, "itemhide", [this]);
1029
+ }
370
1030
  util.trigger(next, "beforeitemshow", [this]);
371
- }
372
- this._transitioner = this._translate(Math.abs(this.percent), prev, !edge && next);
373
- if (changed) {
374
- !edge && util.trigger(prev, "itemhide", [this]);
375
1031
  util.trigger(next, "itemshow", [this]);
376
1032
  }
1033
+ this._transitioner = this._translate(Math.abs(this.percent), prev, !edge && next);
377
1034
  },
378
1035
  end() {
379
1036
  util.off(document, pointerMove, this.move, pointerOptions);
@@ -397,14 +1054,15 @@
397
1054
  );
398
1055
  }
399
1056
  }
400
- util.css(this.list, { userSelect: "", pointerEvents: "" });
1057
+ setTimeout(() => util.off(this.list, "click", preventClick, pointerOptions));
1058
+ util.css(this.list, { userSelect: "" });
401
1059
  this.drag = this.percent = null;
402
- },
403
- _getDistance(prev, next) {
404
- return this._getTransitioner(prev, prev !== next && next).getDistance() || this.slides[prev].offsetWidth;
405
1060
  }
406
1061
  }
407
1062
  };
1063
+ function getDistance(prev, next) {
1064
+ return this._getTransitioner(prev, prev !== next && next).getDistance() || this.slides[prev].offsetWidth;
1065
+ }
408
1066
  function hasSelectableText(el) {
409
1067
  return util.css(el, "userSelect") !== "none" && util.toArray(el.childNodes).some((el2) => el2.nodeType === 3 && el2.textContent.trim());
410
1068
  }
@@ -539,6 +1197,9 @@
539
1197
  delegate() {
540
1198
  return this.selNavItem;
541
1199
  },
1200
+ filter() {
1201
+ return !this.parallax;
1202
+ },
542
1203
  handler(e) {
543
1204
  if (e.target.closest("a,button") && (e.type === "click" || e.keyCode === keyMap.SPACE)) {
544
1205
  e.preventDefault();
@@ -555,6 +1216,9 @@
555
1216
  delegate() {
556
1217
  return this.selNavItem;
557
1218
  },
1219
+ filter() {
1220
+ return !this.parallax;
1221
+ },
558
1222
  handler(e) {
559
1223
  const { current, keyCode } = e;
560
1224
  const cmd = util.data(current, this.attrItem);
@@ -579,9 +1243,10 @@
579
1243
  const item = util.toNumber(cmd);
580
1244
  const active = item === index;
581
1245
  util.toggleClass(el, this.clsActive, active);
1246
+ util.toggleClass(button, "uk-disabled", this.parallax);
582
1247
  util.attr(button, {
583
1248
  "aria-selected": active,
584
- tabindex: active ? null : -1
1249
+ tabindex: active && !this.parallax ? null : -1
585
1250
  });
586
1251
  if (active && button && util.matches(util.parent(el), ":focus-within")) {
587
1252
  button.focus();
@@ -601,7 +1266,7 @@
601
1266
  var Slider = {
602
1267
  mixins: [SliderAutoplay, SliderDrag, SliderNav, I18n],
603
1268
  props: {
604
- clsActivated: Boolean,
1269
+ clsActivated: String,
605
1270
  easing: String,
606
1271
  index: Number,
607
1272
  finite: Boolean,
@@ -616,7 +1281,10 @@
616
1281
  stack: [],
617
1282
  percent: 0,
618
1283
  clsActive: "uk-active",
619
- clsActivated: false,
1284
+ clsActivated: "",
1285
+ clsEnter: "uk-slide-enter",
1286
+ clsLeave: "uk-slide-leave",
1287
+ clsSlideActive: "uk-slide-active",
620
1288
  Transitioner: false,
621
1289
  transitionOptions: {}
622
1290
  }),
@@ -649,10 +1317,24 @@
649
1317
  }
650
1318
  },
651
1319
  observe: resize(),
1320
+ events: {
1321
+ itemshow({ target }) {
1322
+ util.addClass(target, this.clsEnter, this.clsSlideActive);
1323
+ },
1324
+ itemshown({ target }) {
1325
+ util.removeClass(target, this.clsEnter);
1326
+ },
1327
+ itemhide({ target }) {
1328
+ util.addClass(target, this.clsLeave);
1329
+ },
1330
+ itemhidden({ target }) {
1331
+ util.removeClass(target, this.clsLeave, this.clsSlideActive);
1332
+ }
1333
+ },
652
1334
  methods: {
653
1335
  show(index, force = false) {
654
1336
  var _a;
655
- if (this.dragging || !this.length) {
1337
+ if (this.dragging || !this.length || this.parallax) {
656
1338
  return;
657
1339
  }
658
1340
  const { stack } = this;
@@ -780,7 +1462,12 @@
780
1462
  observe: lazyload({
781
1463
  target: ({ slides }) => slides,
782
1464
  targets: (instance) => instance.getAdjacentSlides()
783
- })
1465
+ }),
1466
+ methods: {
1467
+ getAdjacentSlides() {
1468
+ return [1, -1].map((i) => this.slides[this.getIndex(this.index + i)]);
1469
+ }
1470
+ }
784
1471
  };
785
1472
 
786
1473
  var Animations = {
@@ -858,18 +1545,17 @@
858
1545
  }
859
1546
  };
860
1547
 
861
- const supportsAspectRatio = util.inBrowser && CSS.supports("aspect-ratio", "1/1");
862
1548
  var Component = {
863
- mixins: [Class, Slideshow, SliderReactive, SliderPreload],
1549
+ mixins: [Class, Slideshow, SliderReactive, SliderParallax, SliderPreload],
864
1550
  props: {
865
1551
  ratio: String,
866
- minHeight: Number,
867
- maxHeight: Number
1552
+ minHeight: String,
1553
+ maxHeight: String
868
1554
  },
869
1555
  data: {
870
1556
  ratio: "16:9",
871
- minHeight: false,
872
- maxHeight: false,
1557
+ minHeight: void 0,
1558
+ maxHeight: void 0,
873
1559
  selList: ".uk-slideshow-items",
874
1560
  attrItem: "uk-slideshow-item",
875
1561
  selNav: ".uk-slideshow-nav",
@@ -877,38 +1563,15 @@
877
1563
  },
878
1564
  watch: {
879
1565
  list(list) {
880
- if (list && supportsAspectRatio) {
881
- util.css(list, {
882
- aspectRatio: this.ratio.replace(":", "/"),
883
- minHeight: this.minHeight || "",
884
- maxHeight: this.maxHeight || "",
885
- minWidth: "100%",
886
- maxWidth: "100%"
887
- });
888
- }
1566
+ util.css(list, {
1567
+ aspectRatio: this.ratio ? this.ratio.replace(":", "/") : void 0,
1568
+ minHeight: this.minHeight,
1569
+ maxHeight: this.maxHeight,
1570
+ minWidth: "100%",
1571
+ maxWidth: "100%"
1572
+ });
889
1573
  }
890
1574
  },
891
- update: {
892
- // deprecated: Remove with iOS 17
893
- read() {
894
- if (!this.list || supportsAspectRatio) {
895
- return false;
896
- }
897
- let [width, height] = this.ratio.split(":").map(Number);
898
- height = height * this.list.offsetWidth / width || 0;
899
- if (this.minHeight) {
900
- height = Math.max(this.minHeight, height);
901
- }
902
- if (this.maxHeight) {
903
- height = Math.min(this.maxHeight, height);
904
- }
905
- return { height: height - util.boxModelAdjust(this.list, "height", "content-box") };
906
- },
907
- write({ height }) {
908
- height > 0 && util.css(this.list, "minHeight", height);
909
- },
910
- events: ["resize"]
911
- },
912
1575
  methods: {
913
1576
  getAdjacentSlides() {
914
1577
  return [1, -1].map((i) => this.slides[this.getIndex(this.index + i)]);