uikit 3.15.4-dev.c21737f52 → 3.15.5-dev.9a62efcdc
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 +9 -0
- package/build/less.js +1 -1
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- 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 +14 -13
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +105 -108
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +105 -108
- 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 +1 -1
- 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 +1 -1
- 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 +101 -103
- 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 +172 -145
- 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 +178 -150
- package/dist/js/uikit.min.js +2 -2
- package/package.json +6 -6
- package/src/js/components/filter.js +14 -12
- package/src/js/core/accordion.js +51 -16
- package/src/js/core/alert.js +19 -21
- package/src/js/core/scrollspy.js +3 -0
- package/src/js/mixin/modal.js +28 -29
- package/src/js/mixin/togglable.js +109 -111
- package/tests/accordion.html +1 -1
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.5-dev.9a62efcdc | 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() :
|
|
@@ -855,7 +855,7 @@
|
|
|
855
855
|
return String(str).split(/\s|,/).filter(Boolean);
|
|
856
856
|
}
|
|
857
857
|
|
|
858
|
-
function transition(element, props, duration, timing) {if (duration === void 0) {duration = 400;}if (timing === void 0) {timing = 'linear';}
|
|
858
|
+
function transition$1(element, props, duration, timing) {if (duration === void 0) {duration = 400;}if (timing === void 0) {timing = 'linear';}
|
|
859
859
|
duration = Math.round(duration);
|
|
860
860
|
return Promise.all(
|
|
861
861
|
toNodes(element).map(
|
|
@@ -899,7 +899,7 @@
|
|
|
899
899
|
}
|
|
900
900
|
|
|
901
901
|
const Transition = {
|
|
902
|
-
start: transition,
|
|
902
|
+
start: transition$1,
|
|
903
903
|
|
|
904
904
|
async stop(element) {
|
|
905
905
|
trigger(element, 'transitionend');
|
|
@@ -2945,7 +2945,7 @@
|
|
|
2945
2945
|
UIkit.data = '__uikit__';
|
|
2946
2946
|
UIkit.prefix = 'uk-';
|
|
2947
2947
|
UIkit.options = {};
|
|
2948
|
-
UIkit.version = '3.15.
|
|
2948
|
+
UIkit.version = '3.15.5-dev.9a62efcdc';
|
|
2949
2949
|
|
|
2950
2950
|
globalAPI(UIkit);
|
|
2951
2951
|
hooksAPI(UIkit);
|
|
@@ -3085,11 +3085,11 @@
|
|
|
3085
3085
|
isFunction(animate) ?
|
|
3086
3086
|
animate :
|
|
3087
3087
|
animate === false || !this.hasAnimation ?
|
|
3088
|
-
toggleInstant
|
|
3088
|
+
toggleInstant :
|
|
3089
3089
|
this.hasTransition ?
|
|
3090
|
-
toggleTransition
|
|
3091
|
-
toggleAnimation
|
|
3092
|
-
el, show);
|
|
3090
|
+
toggleTransition :
|
|
3091
|
+
toggleAnimation)(
|
|
3092
|
+
el, show, this);
|
|
3093
3093
|
|
|
3094
3094
|
const cls = show ? this.clsEnter : this.clsLeave;
|
|
3095
3095
|
|
|
@@ -3149,16 +3149,18 @@
|
|
|
3149
3149
|
|
|
3150
3150
|
|
|
3151
3151
|
|
|
3152
|
-
function toggleInstant(_ref3) {let { _toggle } = _ref3;
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
return _toggle(el, show);
|
|
3157
|
-
};
|
|
3152
|
+
function toggleInstant(el, show, _ref3) {let { _toggle } = _ref3;
|
|
3153
|
+
Animation.cancel(el);
|
|
3154
|
+
Transition.cancel(el);
|
|
3155
|
+
return _toggle(el, show);
|
|
3158
3156
|
}
|
|
3159
3157
|
|
|
3160
|
-
function toggleTransition(
|
|
3161
|
-
|
|
3158
|
+
async function toggleTransition(
|
|
3159
|
+
el,
|
|
3160
|
+
show, _ref4)
|
|
3161
|
+
|
|
3162
|
+
{var _animation$;let { animation, duration, velocity, transition, _toggle } = _ref4;
|
|
3163
|
+
const [mode = 'reveal', startProp = 'top'] = ((_animation$ = animation[0]) == null ? void 0 : _animation$.split('-')) || [];
|
|
3162
3164
|
|
|
3163
3165
|
const dirs = [
|
|
3164
3166
|
['left', 'right'],
|
|
@@ -3171,111 +3173,107 @@
|
|
|
3171
3173
|
const marginProp = "margin-" + dir[0];
|
|
3172
3174
|
const marginStartProp = "margin-" + startProp;
|
|
3173
3175
|
|
|
3174
|
-
|
|
3175
|
-
let { duration, velocity, transition, _toggle } = cmp;
|
|
3176
|
+
let currentDim = dimensions(el)[dimProp];
|
|
3176
3177
|
|
|
3177
|
-
|
|
3178
|
+
const inProgress = Transition.inProgress(el);
|
|
3179
|
+
await Transition.cancel(el);
|
|
3178
3180
|
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
+
if (show) {
|
|
3182
|
+
_toggle(el, true);
|
|
3183
|
+
}
|
|
3181
3184
|
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
+
const prevProps = Object.fromEntries(
|
|
3186
|
+
[
|
|
3187
|
+
'padding',
|
|
3188
|
+
'border',
|
|
3189
|
+
'width',
|
|
3190
|
+
'height',
|
|
3191
|
+
'minWidth',
|
|
3192
|
+
'minHeight',
|
|
3193
|
+
'overflowY',
|
|
3194
|
+
'overflowX',
|
|
3195
|
+
marginProp,
|
|
3196
|
+
marginStartProp].
|
|
3197
|
+
map((key) => [key, el.style[key]]));
|
|
3185
3198
|
|
|
3186
|
-
|
|
3187
|
-
|
|
3199
|
+
|
|
3200
|
+
const dim = dimensions(el);
|
|
3201
|
+
const currentMargin = toFloat(css(el, marginProp));
|
|
3202
|
+
const marginStart = toFloat(css(el, marginStartProp));
|
|
3203
|
+
const endDim = dim[dimProp] + marginStart;
|
|
3204
|
+
|
|
3205
|
+
if (!inProgress && !show) {
|
|
3206
|
+
currentDim += marginStart;
|
|
3207
|
+
}
|
|
3208
|
+
|
|
3209
|
+
const [wrapper] = wrapInner(el, '<div>');
|
|
3210
|
+
css(wrapper, {
|
|
3211
|
+
boxSizing: 'border-box',
|
|
3212
|
+
height: dim.height,
|
|
3213
|
+
width: dim.width,
|
|
3214
|
+
...css(el, [
|
|
3215
|
+
'overflow',
|
|
3188
3216
|
'padding',
|
|
3189
|
-
'
|
|
3190
|
-
'
|
|
3191
|
-
'
|
|
3192
|
-
'
|
|
3193
|
-
'
|
|
3194
|
-
|
|
3195
|
-
marginStartProp].
|
|
3196
|
-
map((key) => [key, el.style[key]]));
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
const dim = dimensions(el);
|
|
3200
|
-
const currentMargin = toFloat(css(el, marginProp));
|
|
3201
|
-
const marginStart = toFloat(css(el, marginStartProp));
|
|
3202
|
-
const endDim = dim[dimProp] + marginStart;
|
|
3203
|
-
|
|
3204
|
-
if (!inProgress && !show) {
|
|
3205
|
-
currentDim += marginStart;
|
|
3206
|
-
}
|
|
3217
|
+
'borderTop',
|
|
3218
|
+
'borderRight',
|
|
3219
|
+
'borderBottom',
|
|
3220
|
+
'borderLeft',
|
|
3221
|
+
'borderImage',
|
|
3222
|
+
marginStartProp]) });
|
|
3207
3223
|
|
|
3208
|
-
const [wrapper] = wrapInner(el, '<div>');
|
|
3209
|
-
css(wrapper, {
|
|
3210
|
-
boxSizing: 'border-box',
|
|
3211
|
-
height: dim.height,
|
|
3212
|
-
width: dim.width,
|
|
3213
|
-
...css(el, [
|
|
3214
|
-
'overflow',
|
|
3215
|
-
'padding',
|
|
3216
|
-
'borderTop',
|
|
3217
|
-
'borderRight',
|
|
3218
|
-
'borderBottom',
|
|
3219
|
-
'borderLeft',
|
|
3220
|
-
'borderImage',
|
|
3221
|
-
marginStartProp]) });
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
css(el, {
|
|
3226
|
-
padding: 0,
|
|
3227
|
-
border: 0,
|
|
3228
|
-
minWidth: 0,
|
|
3229
|
-
minHeight: 0,
|
|
3230
|
-
[marginStartProp]: 0,
|
|
3231
|
-
width: dim.width,
|
|
3232
|
-
height: dim.height,
|
|
3233
|
-
overflow: 'hidden',
|
|
3234
|
-
[dimProp]: currentDim });
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
const percent = currentDim / endDim;
|
|
3238
|
-
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3239
|
-
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3240
|
-
|
|
3241
|
-
if (end) {
|
|
3242
|
-
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3243
|
-
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3244
|
-
}
|
|
3245
3224
|
|
|
3246
|
-
if (!end ^ mode === 'reveal') {
|
|
3247
|
-
css(wrapper, marginProp, -endDim + currentDim);
|
|
3248
|
-
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3249
|
-
}
|
|
3250
3225
|
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3226
|
+
css(el, {
|
|
3227
|
+
padding: 0,
|
|
3228
|
+
border: 0,
|
|
3229
|
+
minWidth: 0,
|
|
3230
|
+
minHeight: 0,
|
|
3231
|
+
[marginStartProp]: 0,
|
|
3232
|
+
width: dim.width,
|
|
3233
|
+
height: dim.height,
|
|
3234
|
+
overflow: 'hidden',
|
|
3235
|
+
[dimProp]: currentDim });
|
|
3256
3236
|
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3237
|
+
|
|
3238
|
+
const percent = currentDim / endDim;
|
|
3239
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3240
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3241
|
+
|
|
3242
|
+
if (end) {
|
|
3243
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3244
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
if (!end ^ mode === 'reveal') {
|
|
3248
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3249
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3250
|
+
}
|
|
3251
|
+
|
|
3252
|
+
try {
|
|
3253
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3254
|
+
} finally {
|
|
3255
|
+
css(el, prevProps);
|
|
3256
|
+
unwrap(wrapper.firstChild);
|
|
3257
|
+
|
|
3258
|
+
if (!show) {
|
|
3259
|
+
_toggle(el, false);
|
|
3260
3260
|
}
|
|
3261
|
-
}
|
|
3261
|
+
}
|
|
3262
3262
|
}
|
|
3263
3263
|
|
|
3264
|
-
function toggleAnimation(cmp) {
|
|
3265
|
-
|
|
3266
|
-
Animation.cancel(el);
|
|
3264
|
+
function toggleAnimation(el, show, cmp) {
|
|
3265
|
+
Animation.cancel(el);
|
|
3267
3266
|
|
|
3268
|
-
|
|
3267
|
+
const { animation, duration, _toggle } = cmp;
|
|
3269
3268
|
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3269
|
+
if (show) {
|
|
3270
|
+
_toggle(el, true);
|
|
3271
|
+
return Animation.in(el, animation[0], duration, cmp.origin);
|
|
3272
|
+
}
|
|
3274
3273
|
|
|
3275
|
-
|
|
3276
|
-
|
|
3274
|
+
return Animation.out(el, animation[1] || animation[0], duration, cmp.origin).then(() =>
|
|
3275
|
+
_toggle(el, false));
|
|
3277
3276
|
|
|
3278
|
-
};
|
|
3279
3277
|
}
|
|
3280
3278
|
|
|
3281
3279
|
var Accordion = {
|
|
@@ -3389,28 +3387,25 @@
|
|
|
3389
3387
|
}
|
|
3390
3388
|
|
|
3391
3389
|
for (const el of items) {
|
|
3392
|
-
this.toggleElement(el, !hasClass(el, this.clsOpen),
|
|
3390
|
+
this.toggleElement(el, !hasClass(el, this.clsOpen), (el, show) => {
|
|
3393
3391
|
toggleClass(el, this.clsOpen, show);
|
|
3394
3392
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3395
3393
|
|
|
3396
|
-
const content = $(this.content, el);
|
|
3397
|
-
|
|
3398
3394
|
if (animate === false || !this.animation) {
|
|
3399
|
-
content
|
|
3400
|
-
hide(content, !show);
|
|
3395
|
+
hide($(this.content, el), !show);
|
|
3401
3396
|
return;
|
|
3402
3397
|
}
|
|
3403
3398
|
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
}
|
|
3412
|
-
}
|
|
3413
|
-
}
|
|
3399
|
+
return transition(el, show, this).then(() => {
|
|
3400
|
+
if (show) {
|
|
3401
|
+
const toggle = $(this.$props.toggle, el);
|
|
3402
|
+
requestAnimationFrame(() => {
|
|
3403
|
+
if (!isInView(toggle)) {
|
|
3404
|
+
scrollIntoView(toggle, { offset: this.offset });
|
|
3405
|
+
}
|
|
3406
|
+
});
|
|
3407
|
+
}
|
|
3408
|
+
}, noop);
|
|
3414
3409
|
});
|
|
3415
3410
|
}
|
|
3416
3411
|
} } };
|
|
@@ -3421,6 +3416,38 @@
|
|
|
3421
3416
|
el && (el.hidden = hide);
|
|
3422
3417
|
}
|
|
3423
3418
|
|
|
3419
|
+
async function transition(el, show, _ref4) {var _el$_wrapper;let { content, duration, velocity, transition } = _ref4;
|
|
3420
|
+
content = ((_el$_wrapper = el._wrapper) == null ? void 0 : _el$_wrapper.firstElementChild) || $(content, el);
|
|
3421
|
+
|
|
3422
|
+
if (!el._wrapper) {
|
|
3423
|
+
el._wrapper = wrapAll(content, '<div>');
|
|
3424
|
+
}
|
|
3425
|
+
|
|
3426
|
+
const wrapper = el._wrapper;
|
|
3427
|
+
css(wrapper, 'overflow', 'hidden');
|
|
3428
|
+
const currentHeight = toFloat(css(wrapper, 'height'));
|
|
3429
|
+
|
|
3430
|
+
await Transition.cancel(wrapper);
|
|
3431
|
+
hide(content, false);
|
|
3432
|
+
|
|
3433
|
+
const endHeight =
|
|
3434
|
+
toFloat(css(content, 'height')) +
|
|
3435
|
+
toFloat(css(content, 'marginTop')) +
|
|
3436
|
+
toFloat(css(content, 'marginBottom'));
|
|
3437
|
+
const percent = currentHeight / endHeight;
|
|
3438
|
+
duration = (velocity * endHeight + duration) * (show ? 1 - percent : percent);
|
|
3439
|
+
css(wrapper, 'height', currentHeight);
|
|
3440
|
+
|
|
3441
|
+
await Transition.start(wrapper, { height: show ? endHeight : 0 }, duration, transition);
|
|
3442
|
+
|
|
3443
|
+
unwrap(content);
|
|
3444
|
+
delete el._wrapper;
|
|
3445
|
+
|
|
3446
|
+
if (!show) {
|
|
3447
|
+
hide(content, true);
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
|
|
3424
3451
|
var alert = {
|
|
3425
3452
|
mixins: [Class, Togglable],
|
|
3426
3453
|
|
|
@@ -3452,32 +3479,30 @@
|
|
|
3452
3479
|
|
|
3453
3480
|
methods: {
|
|
3454
3481
|
async close() {
|
|
3455
|
-
await this.toggleElement(this.$el, false, animate$1
|
|
3482
|
+
await this.toggleElement(this.$el, false, animate$1);
|
|
3456
3483
|
this.$destroy(true);
|
|
3457
3484
|
} } };
|
|
3458
3485
|
|
|
3459
3486
|
|
|
3460
3487
|
|
|
3461
|
-
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
transition);
|
|
3488
|
+
function animate$1(el, show, _ref) {let { duration, transition, velocity } = _ref;
|
|
3489
|
+
const height = toFloat(css(el, 'height'));
|
|
3490
|
+
css(el, 'height', height);
|
|
3491
|
+
return Transition.start(
|
|
3492
|
+
el,
|
|
3493
|
+
{
|
|
3494
|
+
height: 0,
|
|
3495
|
+
marginTop: 0,
|
|
3496
|
+
marginBottom: 0,
|
|
3497
|
+
paddingTop: 0,
|
|
3498
|
+
paddingBottom: 0,
|
|
3499
|
+
borderTop: 0,
|
|
3500
|
+
borderBottom: 0,
|
|
3501
|
+
opacity: 0 },
|
|
3502
|
+
|
|
3503
|
+
velocity * height + duration,
|
|
3504
|
+
transition);
|
|
3479
3505
|
|
|
3480
|
-
};
|
|
3481
3506
|
}
|
|
3482
3507
|
|
|
3483
3508
|
var Video = {
|
|
@@ -3938,18 +3963,17 @@
|
|
|
3938
3963
|
|
|
3939
3964
|
}
|
|
3940
3965
|
|
|
3941
|
-
return this.toggleElement(this.$el, true, animate
|
|
3966
|
+
return this.toggleElement(this.$el, true, animate);
|
|
3942
3967
|
},
|
|
3943
3968
|
|
|
3944
3969
|
hide() {
|
|
3945
|
-
return this.toggleElement(this.$el, false, animate
|
|
3970
|
+
return this.toggleElement(this.$el, false, animate);
|
|
3946
3971
|
} } };
|
|
3947
3972
|
|
|
3948
3973
|
|
|
3949
3974
|
|
|
3950
|
-
function animate(_ref5) {let { transitionElement, _toggle } = _ref5;
|
|
3951
|
-
return (
|
|
3952
|
-
new Promise((resolve, reject) =>
|
|
3975
|
+
function animate(el, show, _ref5) {let { transitionElement, _toggle } = _ref5;
|
|
3976
|
+
return new Promise((resolve, reject) =>
|
|
3953
3977
|
once(el, 'show hide', () => {
|
|
3954
3978
|
el._reject == null ? void 0 : el._reject();
|
|
3955
3979
|
el._reject = reject;
|
|
@@ -6829,6 +6853,9 @@
|
|
|
6829
6853
|
trigger(el, inview ? 'inview' : 'outview');
|
|
6830
6854
|
|
|
6831
6855
|
state.inview = inview;
|
|
6856
|
+
|
|
6857
|
+
// change to `visibility: hidden` does not trigger observers
|
|
6858
|
+
this.$update(el);
|
|
6832
6859
|
} } };
|
|
6833
6860
|
|
|
6834
6861
|
var scrollspyNav = {
|