uikit 3.15.2-dev.c376993b7 → 3.15.3-dev.8c13c92d9
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 +15 -1
- package/README.md +1 -1
- package/dist/css/uikit-core-rtl.css +2 -2
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +2 -2
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +2 -2
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +2 -2
- 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 +102 -109
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +3 -5
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +3 -5
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +5 -3
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +5 -3
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +90 -96
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -3
- 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 +33 -25
- package/dist/js/uikit-core.min.js +2 -2
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +139 -136
- package/dist/js/uikit.min.js +2 -2
- package/package.json +7 -7
- package/src/js/api/boot.js +2 -2
- package/src/js/api/component.js +2 -2
- package/src/js/api/state.js +1 -1
- package/src/js/components/filter.js +12 -14
- package/src/js/core/accordion.js +1 -2
- package/src/js/core/cover.js +1 -1
- package/src/js/core/drop.js +16 -7
- package/src/js/core/scrollspy.js +0 -2
- package/src/js/mixin/internal/animate-fade.js +50 -51
- package/src/js/mixin/internal/animate-slide.js +52 -57
- package/src/js/mixin/slider-reactive.js +2 -0
- package/src/js/mixin/slider.js +2 -3
- package/src/js/mixin/togglable.js +0 -2
- package/src/js/util/observer.js +1 -2
- package/src/js/util/position.js +4 -1
- package/src/less/components/nav.less +1 -1
- package/src/less/components/navbar.less +2 -1
- package/src/scss/components/nav.scss +1 -1
- package/src/scss/components/navbar.scss +2 -1
- package/src/scss/variables-theme.scss +1 -0
- package/src/scss/variables.scss +1 -0
- package/tests/drop.html +36 -3
- package/tests/js/index.js +2 -2
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.3-dev.8c13c92d9 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -1492,7 +1492,7 @@
|
|
|
1492
1492
|
return;
|
|
1493
1493
|
}
|
|
1494
1494
|
pendingResize = true;
|
|
1495
|
-
|
|
1495
|
+
requestAnimationFrame(() => pendingResize = false);
|
|
1496
1496
|
for (const listener of listeners) {
|
|
1497
1497
|
listener();
|
|
1498
1498
|
}
|
|
@@ -2062,7 +2062,10 @@
|
|
|
2062
2062
|
}
|
|
2063
2063
|
|
|
2064
2064
|
if (boundary) {
|
|
2065
|
-
viewport = getIntersectionArea(
|
|
2065
|
+
viewport = getIntersectionArea(
|
|
2066
|
+
viewport,
|
|
2067
|
+
offset(isArray(boundary) ? boundary[i] : boundary));
|
|
2068
|
+
|
|
2066
2069
|
}
|
|
2067
2070
|
|
|
2068
2071
|
return viewport;
|
|
@@ -2727,7 +2730,7 @@
|
|
|
2727
2730
|
function initChildListObserver(component) {
|
|
2728
2731
|
const { el } = component.$options;
|
|
2729
2732
|
|
|
2730
|
-
const observer = new MutationObserver(() => component
|
|
2733
|
+
const observer = new MutationObserver(() => component._callWatches());
|
|
2731
2734
|
observer.observe(el, {
|
|
2732
2735
|
childList: true,
|
|
2733
2736
|
subtree: true });
|
|
@@ -2896,7 +2899,7 @@
|
|
|
2896
2899
|
opt.install == null ? void 0 : opt.install(UIkit, opt, name);
|
|
2897
2900
|
|
|
2898
2901
|
if (UIkit._initialized && !opt.functional) {
|
|
2899
|
-
|
|
2902
|
+
requestAnimationFrame(() => UIkit[name]("[uk-" + id + "],[data-uk-" + id + "]"));
|
|
2900
2903
|
}
|
|
2901
2904
|
|
|
2902
2905
|
return components[name] = isPlainObject(options) ? opt : options;
|
|
@@ -2942,7 +2945,7 @@
|
|
|
2942
2945
|
UIkit.data = '__uikit__';
|
|
2943
2946
|
UIkit.prefix = 'uk-';
|
|
2944
2947
|
UIkit.options = {};
|
|
2945
|
-
UIkit.version = '3.15.
|
|
2948
|
+
UIkit.version = '3.15.3-dev.8c13c92d9';
|
|
2946
2949
|
|
|
2947
2950
|
globalAPI(UIkit);
|
|
2948
2951
|
hooksAPI(UIkit);
|
|
@@ -2957,7 +2960,7 @@
|
|
|
2957
2960
|
return;
|
|
2958
2961
|
}
|
|
2959
2962
|
|
|
2960
|
-
|
|
2963
|
+
requestAnimationFrame(function () {
|
|
2961
2964
|
if (document.body) {
|
|
2962
2965
|
apply(document.body, connect);
|
|
2963
2966
|
}
|
|
@@ -3097,7 +3100,6 @@
|
|
|
3097
3100
|
const done = () => {
|
|
3098
3101
|
removeClass(el, cls);
|
|
3099
3102
|
trigger(el, show ? 'shown' : 'hidden', [this]);
|
|
3100
|
-
this.$update(el);
|
|
3101
3103
|
};
|
|
3102
3104
|
|
|
3103
3105
|
return promise ?
|
|
@@ -3142,7 +3144,6 @@
|
|
|
3142
3144
|
|
|
3143
3145
|
if (changed) {
|
|
3144
3146
|
trigger(el, 'toggled', [toggled, this]);
|
|
3145
|
-
this.$update(el);
|
|
3146
3147
|
}
|
|
3147
3148
|
} } };
|
|
3148
3149
|
|
|
@@ -3404,7 +3405,7 @@
|
|
|
3404
3405
|
|
|
3405
3406
|
if (show) {
|
|
3406
3407
|
const toggle = $(this.$props.toggle, el);
|
|
3407
|
-
|
|
3408
|
+
requestAnimationFrame(() => {
|
|
3408
3409
|
if (!isInView(toggle)) {
|
|
3409
3410
|
scrollIntoView(toggle, { offset: this.offset });
|
|
3410
3411
|
}
|
|
@@ -3558,7 +3559,7 @@
|
|
|
3558
3559
|
|
|
3559
3560
|
|
|
3560
3561
|
resizeTargets() {
|
|
3561
|
-
return [this.$el, parent(this.$el)];
|
|
3562
|
+
return [this.$el, getPositionedParent(this.$el) || parent(this.$el)];
|
|
3562
3563
|
},
|
|
3563
3564
|
|
|
3564
3565
|
update: {
|
|
@@ -4071,6 +4072,8 @@
|
|
|
4071
4072
|
mode: 'list',
|
|
4072
4073
|
toggle: Boolean,
|
|
4073
4074
|
boundary: Boolean,
|
|
4075
|
+
boundaryX: Boolean,
|
|
4076
|
+
boundaryY: Boolean,
|
|
4074
4077
|
target: Boolean,
|
|
4075
4078
|
targetX: Boolean,
|
|
4076
4079
|
targetY: Boolean,
|
|
@@ -4087,6 +4090,8 @@
|
|
|
4087
4090
|
mode: ['click', 'hover'],
|
|
4088
4091
|
toggle: '- *',
|
|
4089
4092
|
boundary: false,
|
|
4093
|
+
boundaryX: false,
|
|
4094
|
+
boundaryY: false,
|
|
4090
4095
|
target: false,
|
|
4091
4096
|
targetX: false,
|
|
4092
4097
|
targetY: false,
|
|
@@ -4103,7 +4108,14 @@
|
|
|
4103
4108
|
|
|
4104
4109
|
|
|
4105
4110
|
computed: {
|
|
4106
|
-
|
|
4111
|
+
boundary(_ref, $el) {let { boundary, boundaryX, boundaryY } = _ref;
|
|
4112
|
+
return [
|
|
4113
|
+
query(boundaryX || boundary, $el) || window,
|
|
4114
|
+
query(boundaryY || boundary, $el) || window];
|
|
4115
|
+
|
|
4116
|
+
},
|
|
4117
|
+
|
|
4118
|
+
target(_ref2, $el) {let { target, targetX, targetY } = _ref2;
|
|
4107
4119
|
targetX = targetX || target || this.targetEl;
|
|
4108
4120
|
targetY = targetY || target || this.targetEl;
|
|
4109
4121
|
|
|
@@ -4163,7 +4175,7 @@
|
|
|
4163
4175
|
return 'a[href^="#"]';
|
|
4164
4176
|
},
|
|
4165
4177
|
|
|
4166
|
-
handler(
|
|
4178
|
+
handler(_ref3) {let { defaultPrevented, current: { hash } } = _ref3;
|
|
4167
4179
|
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4168
4180
|
this.hide(false);
|
|
4169
4181
|
}
|
|
@@ -4276,12 +4288,12 @@
|
|
|
4276
4288
|
on(
|
|
4277
4289
|
document,
|
|
4278
4290
|
pointerDown$1,
|
|
4279
|
-
(
|
|
4291
|
+
(_ref4) => {let { target } = _ref4;return (
|
|
4280
4292
|
!within(target, this.$el) &&
|
|
4281
4293
|
once(
|
|
4282
4294
|
document,
|
|
4283
4295
|
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
4284
|
-
(
|
|
4296
|
+
(_ref5) => {let { defaultPrevented, type, target: newTarget } = _ref5;
|
|
4285
4297
|
if (
|
|
4286
4298
|
!defaultPrevented &&
|
|
4287
4299
|
type === pointerUp$1 &&
|
|
@@ -4343,7 +4355,7 @@
|
|
|
4343
4355
|
{
|
|
4344
4356
|
name: 'hide',
|
|
4345
4357
|
|
|
4346
|
-
handler(
|
|
4358
|
+
handler(_ref6) {let { target } = _ref6;
|
|
4347
4359
|
if (this.$el !== target) {
|
|
4348
4360
|
active =
|
|
4349
4361
|
active === null && within(target, this.$el) && this.isToggled() ?
|
|
@@ -4440,8 +4452,6 @@
|
|
|
4440
4452
|
// Ensure none positioned element does not generate scrollbars
|
|
4441
4453
|
this.$el.hidden = true;
|
|
4442
4454
|
|
|
4443
|
-
const boundary = query(this.boundary, this.$el);
|
|
4444
|
-
const boundaryOffset = offset(boundary || window);
|
|
4445
4455
|
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4446
4456
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4447
4457
|
|
|
@@ -4454,7 +4464,7 @@
|
|
|
4454
4464
|
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4455
4465
|
css(this.$el, {
|
|
4456
4466
|
[prop]: Math.min(
|
|
4457
|
-
|
|
4467
|
+
offset(this.boundary[i])[prop],
|
|
4458
4468
|
viewports[i][prop] - 2 * viewportOffset),
|
|
4459
4469
|
|
|
4460
4470
|
["overflow-" + axis]: 'auto' });
|
|
@@ -4472,7 +4482,7 @@
|
|
|
4472
4482
|
|
|
4473
4483
|
this.$el.hidden = false;
|
|
4474
4484
|
|
|
4475
|
-
this.positionAt(this.$el, this.target, boundary);
|
|
4485
|
+
this.positionAt(this.$el, this.target, this.boundary);
|
|
4476
4486
|
|
|
4477
4487
|
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4478
4488
|
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
@@ -4485,17 +4495,17 @@
|
|
|
4485
4495
|
(targetOffset[start] > elOffset[start] ?
|
|
4486
4496
|
targetOffset[start] -
|
|
4487
4497
|
Math.max(
|
|
4488
|
-
|
|
4498
|
+
offset(this.boundary[i])[start],
|
|
4489
4499
|
viewports[i][start] + viewportOffset) :
|
|
4490
4500
|
|
|
4491
4501
|
Math.min(
|
|
4492
|
-
|
|
4502
|
+
offset(this.boundary[i])[end],
|
|
4493
4503
|
viewports[i][end] - viewportOffset) -
|
|
4494
4504
|
targetOffset[end]) - positionOffset,
|
|
4495
4505
|
["overflow-" + axis]: 'auto' });
|
|
4496
4506
|
|
|
4497
4507
|
|
|
4498
|
-
this.positionAt(this.$el, this.target, boundary);
|
|
4508
|
+
this.positionAt(this.$el, this.target, this.boundary);
|
|
4499
4509
|
}
|
|
4500
4510
|
}
|
|
4501
4511
|
} } };
|
|
@@ -6814,8 +6824,6 @@
|
|
|
6814
6824
|
trigger(el, inview ? 'inview' : 'outview');
|
|
6815
6825
|
|
|
6816
6826
|
state.inview = inview;
|
|
6817
|
-
|
|
6818
|
-
this.$update(el);
|
|
6819
6827
|
} } };
|
|
6820
6828
|
|
|
6821
6829
|
var scrollspyNav = {
|
|
@@ -7863,10 +7871,10 @@
|
|
|
7863
7871
|
|
|
7864
7872
|
const wrapIndexFn = (fn) => () => index === transitionIndex(target) ? fn() : Promise.reject();
|
|
7865
7873
|
|
|
7866
|
-
const leaveFn = wrapIndexFn(() => {
|
|
7874
|
+
const leaveFn = wrapIndexFn(async () => {
|
|
7867
7875
|
addClass(target, clsLeave);
|
|
7868
7876
|
|
|
7869
|
-
|
|
7877
|
+
await Promise.all(
|
|
7870
7878
|
getTransitionNodes(target).map(
|
|
7871
7879
|
(child, i) =>
|
|
7872
7880
|
new Promise((resolve) =>
|
|
@@ -7875,14 +7883,16 @@
|
|
|
7875
7883
|
Transition.start(child, propsOut, duration / 2, 'ease').then(
|
|
7876
7884
|
resolve),
|
|
7877
7885
|
|
|
7878
|
-
i * stagger))))
|
|
7886
|
+
i * stagger))));
|
|
7887
|
+
|
|
7879
7888
|
|
|
7880
7889
|
|
|
7881
7890
|
|
|
7882
|
-
|
|
7891
|
+
|
|
7892
|
+
removeClass(target, clsLeave);
|
|
7883
7893
|
});
|
|
7884
7894
|
|
|
7885
|
-
const enterFn = wrapIndexFn(() => {
|
|
7895
|
+
const enterFn = wrapIndexFn(async () => {
|
|
7886
7896
|
const oldHeight = height(target);
|
|
7887
7897
|
|
|
7888
7898
|
addClass(target, clsEnter);
|
|
@@ -7891,53 +7901,42 @@
|
|
|
7891
7901
|
css(children(target), { opacity: 0 });
|
|
7892
7902
|
|
|
7893
7903
|
// Ensure UIkit updates have propagated
|
|
7894
|
-
|
|
7895
|
-
requestAnimationFrame(() => {
|
|
7896
|
-
const nodes = children(target);
|
|
7897
|
-
const newHeight = height(target);
|
|
7898
|
-
|
|
7899
|
-
// Ensure Grid cells do not stretch when height is applied
|
|
7900
|
-
css(target, 'alignContent', 'flex-start');
|
|
7901
|
-
height(target, oldHeight);
|
|
7902
|
-
|
|
7903
|
-
const transitionNodes = getTransitionNodes(target);
|
|
7904
|
-
css(nodes, propsOut);
|
|
7905
|
-
|
|
7906
|
-
const transitions = transitionNodes.map(
|
|
7907
|
-
(child, i) =>
|
|
7908
|
-
new Promise((resolve) =>
|
|
7909
|
-
setTimeout(
|
|
7910
|
-
() =>
|
|
7911
|
-
Transition.start(child, propsIn, duration / 2, 'ease').then(
|
|
7912
|
-
resolve),
|
|
7904
|
+
await awaitFrame$1();
|
|
7913
7905
|
|
|
7914
|
-
|
|
7906
|
+
const nodes = children(target);
|
|
7907
|
+
const newHeight = height(target);
|
|
7915
7908
|
|
|
7909
|
+
// Ensure Grid cells do not stretch when height is applied
|
|
7910
|
+
css(target, 'alignContent', 'flex-start');
|
|
7911
|
+
height(target, oldHeight);
|
|
7916
7912
|
|
|
7913
|
+
const transitionNodes = getTransitionNodes(target);
|
|
7914
|
+
css(nodes, propsOut);
|
|
7917
7915
|
|
|
7916
|
+
const transitions = transitionNodes.map(async (child, i) => {
|
|
7917
|
+
await awaitTimeout(i * stagger);
|
|
7918
|
+
await Transition.start(child, propsIn, duration / 2, 'ease');
|
|
7919
|
+
});
|
|
7918
7920
|
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7921
|
+
if (oldHeight !== newHeight) {
|
|
7922
|
+
transitions.push(
|
|
7923
|
+
Transition.start(
|
|
7924
|
+
target,
|
|
7925
|
+
{ height: newHeight },
|
|
7926
|
+
duration / 2 + transitionNodes.length * stagger,
|
|
7927
|
+
'ease'));
|
|
7927
7928
|
|
|
7928
|
-
}
|
|
7929
7929
|
|
|
7930
|
-
|
|
7931
|
-
removeClass(target, clsEnter);
|
|
7932
|
-
if (index === transitionIndex(target)) {
|
|
7933
|
-
css(target, { height: '', alignContent: '' });
|
|
7934
|
-
css(nodes, { opacity: '' });
|
|
7935
|
-
delete target.dataset.transition;
|
|
7936
|
-
}
|
|
7937
|
-
resolve();
|
|
7938
|
-
});
|
|
7939
|
-
}));
|
|
7930
|
+
}
|
|
7940
7931
|
|
|
7932
|
+
await Promise.all(transitions).then(() => {
|
|
7933
|
+
removeClass(target, clsEnter);
|
|
7934
|
+
if (index === transitionIndex(target)) {
|
|
7935
|
+
css(target, { height: '', alignContent: '' });
|
|
7936
|
+
css(nodes, { opacity: '' });
|
|
7937
|
+
delete target.dataset.transition;
|
|
7938
|
+
}
|
|
7939
|
+
});
|
|
7941
7940
|
});
|
|
7942
7941
|
|
|
7943
7942
|
return hasClass(target, clsLeave) ?
|
|
@@ -7979,63 +7978,62 @@
|
|
|
7979
7978
|
|
|
7980
7979
|
}
|
|
7981
7980
|
|
|
7982
|
-
function
|
|
7983
|
-
return new Promise((resolve) =>
|
|
7984
|
-
|
|
7985
|
-
let nodes = children(target);
|
|
7981
|
+
function awaitFrame$1() {
|
|
7982
|
+
return new Promise((resolve) => requestAnimationFrame(resolve));
|
|
7983
|
+
}
|
|
7986
7984
|
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
|
|
7985
|
+
function awaitTimeout(timeout) {
|
|
7986
|
+
return new Promise((resolve) => setTimeout(resolve, timeout));
|
|
7987
|
+
}
|
|
7990
7988
|
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
nodes.forEach(Transition.cancel);
|
|
7994
|
-
reset(target);
|
|
7989
|
+
async function slide (action, target, duration) {
|
|
7990
|
+
await awaitFrame();
|
|
7995
7991
|
|
|
7996
|
-
|
|
7997
|
-
action();
|
|
7992
|
+
let nodes = children(target);
|
|
7998
7993
|
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
// Wait for update to propagate
|
|
8003
|
-
Promise.resolve().then(() => {
|
|
8004
|
-
// Force update
|
|
8005
|
-
fastdom.flush();
|
|
8006
|
-
|
|
8007
|
-
// Get new state
|
|
8008
|
-
const targetPropsTo = css(target, ['height', 'padding']);
|
|
8009
|
-
const [propsTo, propsFrom] = getTransitionProps(target, nodes, currentProps);
|
|
8010
|
-
|
|
8011
|
-
// Reset to previous state
|
|
8012
|
-
nodes.forEach((el, i) => propsFrom[i] && css(el, propsFrom[i]));
|
|
8013
|
-
css(target, { display: 'block', ...targetProps });
|
|
8014
|
-
|
|
8015
|
-
// Start transitions on next frame
|
|
8016
|
-
requestAnimationFrame(() => {
|
|
8017
|
-
const transitions = nodes.
|
|
8018
|
-
map(
|
|
8019
|
-
(el, i) =>
|
|
8020
|
-
parent(el) === target &&
|
|
8021
|
-
Transition.start(el, propsTo[i], duration, 'ease')).
|
|
8022
|
-
|
|
8023
|
-
concat(Transition.start(target, targetPropsTo, duration, 'ease'));
|
|
8024
|
-
|
|
8025
|
-
Promise.all(transitions).
|
|
8026
|
-
then(() => {
|
|
8027
|
-
nodes.forEach(
|
|
8028
|
-
(el, i) =>
|
|
8029
|
-
parent(el) === target &&
|
|
8030
|
-
css(el, 'display', propsTo[i].opacity === 0 ? 'none' : ''));
|
|
8031
|
-
|
|
8032
|
-
reset(target);
|
|
8033
|
-
}, noop).
|
|
8034
|
-
then(resolve);
|
|
8035
|
-
});
|
|
8036
|
-
});
|
|
8037
|
-
}));
|
|
7994
|
+
// Get current state
|
|
7995
|
+
const currentProps = nodes.map((el) => getProps(el, true));
|
|
7996
|
+
const targetProps = css(target, ['height', 'padding']);
|
|
8038
7997
|
|
|
7998
|
+
// Cancel previous animations
|
|
7999
|
+
Transition.cancel(target);
|
|
8000
|
+
nodes.forEach(Transition.cancel);
|
|
8001
|
+
reset(target);
|
|
8002
|
+
|
|
8003
|
+
// Adding, sorting, removing nodes
|
|
8004
|
+
action();
|
|
8005
|
+
|
|
8006
|
+
// Find new nodes
|
|
8007
|
+
nodes = nodes.concat(children(target).filter((el) => !includes(nodes, el)));
|
|
8008
|
+
|
|
8009
|
+
// Wait for update to propagate
|
|
8010
|
+
await Promise.resolve();
|
|
8011
|
+
|
|
8012
|
+
// Force update
|
|
8013
|
+
fastdom.flush();
|
|
8014
|
+
|
|
8015
|
+
// Get new state
|
|
8016
|
+
const targetPropsTo = css(target, ['height', 'padding']);
|
|
8017
|
+
const [propsTo, propsFrom] = getTransitionProps(target, nodes, currentProps);
|
|
8018
|
+
|
|
8019
|
+
// Reset to previous state
|
|
8020
|
+
nodes.forEach((el, i) => propsFrom[i] && css(el, propsFrom[i]));
|
|
8021
|
+
css(target, { display: 'block', ...targetProps });
|
|
8022
|
+
|
|
8023
|
+
// Start transitions on next frame
|
|
8024
|
+
await awaitFrame();
|
|
8025
|
+
|
|
8026
|
+
const transitions = nodes.
|
|
8027
|
+
map((el, i) => parent(el) === target && Transition.start(el, propsTo[i], duration, 'ease')).
|
|
8028
|
+
concat(Transition.start(target, targetPropsTo, duration, 'ease'));
|
|
8029
|
+
|
|
8030
|
+
await Promise.all(transitions).then(() => {
|
|
8031
|
+
nodes.forEach(
|
|
8032
|
+
(el, i) =>
|
|
8033
|
+
parent(el) === target && css(el, 'display', propsTo[i].opacity === 0 ? 'none' : ''));
|
|
8034
|
+
|
|
8035
|
+
reset(target);
|
|
8036
|
+
}, noop);
|
|
8039
8037
|
}
|
|
8040
8038
|
|
|
8041
8039
|
function getProps(el, opacity) {
|
|
@@ -8114,6 +8112,10 @@
|
|
|
8114
8112
|
return { top, left, height, width, marginLeft, marginTop, transform: '' };
|
|
8115
8113
|
}
|
|
8116
8114
|
|
|
8115
|
+
function awaitFrame() {
|
|
8116
|
+
return new Promise((resolve) => requestAnimationFrame(resolve));
|
|
8117
|
+
}
|
|
8118
|
+
|
|
8117
8119
|
var Animate = {
|
|
8118
8120
|
props: {
|
|
8119
8121
|
duration: Number,
|
|
@@ -8171,7 +8173,7 @@
|
|
|
8171
8173
|
},
|
|
8172
8174
|
|
|
8173
8175
|
watch() {
|
|
8174
|
-
this
|
|
8176
|
+
this.$emit();
|
|
8175
8177
|
|
|
8176
8178
|
if (this.selActive !== false) {
|
|
8177
8179
|
const actives = $$(this.selActive, this.$el);
|
|
@@ -8189,7 +8191,7 @@
|
|
|
8189
8191
|
|
|
8190
8192
|
watch(list, old) {
|
|
8191
8193
|
if (old && !isEqualList(list, old)) {
|
|
8192
|
-
this
|
|
8194
|
+
this.$emit();
|
|
8193
8195
|
}
|
|
8194
8196
|
},
|
|
8195
8197
|
|
|
@@ -8197,6 +8199,12 @@
|
|
|
8197
8199
|
|
|
8198
8200
|
|
|
8199
8201
|
|
|
8202
|
+
update: {
|
|
8203
|
+
write() {
|
|
8204
|
+
this.setState(this.getState(), false);
|
|
8205
|
+
} },
|
|
8206
|
+
|
|
8207
|
+
|
|
8200
8208
|
events: [
|
|
8201
8209
|
{
|
|
8202
8210
|
name: 'click',
|
|
@@ -8236,25 +8244,18 @@
|
|
|
8236
8244
|
|
|
8237
8245
|
trigger(this.$el, 'beforeFilter', [this, state]);
|
|
8238
8246
|
|
|
8239
|
-
this.toggles
|
|
8240
|
-
|
|
8241
|
-
|
|
8247
|
+
for (const el of this.toggles) {
|
|
8248
|
+
toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state));
|
|
8249
|
+
}
|
|
8242
8250
|
|
|
8243
8251
|
await Promise.all(
|
|
8244
8252
|
$$(this.target, this.$el).map((target) => {
|
|
8245
|
-
const filterFn = () =>
|
|
8246
|
-
applyState(state, target, children(target));
|
|
8247
|
-
this.$update(this.$el);
|
|
8248
|
-
};
|
|
8253
|
+
const filterFn = () => applyState(state, target, children(target));
|
|
8249
8254
|
return animate ? this.animate(filterFn, target) : filterFn();
|
|
8250
8255
|
}));
|
|
8251
8256
|
|
|
8252
8257
|
|
|
8253
8258
|
trigger(this.$el, 'afterFilter', [this]);
|
|
8254
|
-
},
|
|
8255
|
-
|
|
8256
|
-
updateState() {
|
|
8257
|
-
fastdom.write(() => this.setState(this.getState(), false));
|
|
8258
8259
|
} } };
|
|
8259
8260
|
|
|
8260
8261
|
|
|
@@ -8886,7 +8887,7 @@
|
|
|
8886
8887
|
},
|
|
8887
8888
|
|
|
8888
8889
|
watch() {
|
|
8889
|
-
this.$
|
|
8890
|
+
this.$emit('resize');
|
|
8890
8891
|
} },
|
|
8891
8892
|
|
|
8892
8893
|
|
|
@@ -8949,7 +8950,7 @@
|
|
|
8949
8950
|
trigger(next, 'itemshown', [this]);
|
|
8950
8951
|
|
|
8951
8952
|
return new Promise((resolve) => {
|
|
8952
|
-
|
|
8953
|
+
requestAnimationFrame(() => {
|
|
8953
8954
|
stack.shift();
|
|
8954
8955
|
if (stack.length) {
|
|
8955
8956
|
this.show(stack.shift(), true);
|
|
@@ -10069,6 +10070,8 @@
|
|
|
10069
10070
|
|
|
10070
10071
|
if (!~this.prevIndex || this.index !== index) {
|
|
10071
10072
|
this.show(index);
|
|
10073
|
+
} else {
|
|
10074
|
+
this._translate(1, this.prevIndex, this.index);
|
|
10072
10075
|
}
|
|
10073
10076
|
},
|
|
10074
10077
|
|