uikit 3.15.4 → 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 +7 -0
- 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 +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +105 -110
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +105 -110
- 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 -105
- 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 -147
- 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 +174 -149
- package/dist/js/uikit.min.js +2 -2
- package/package.json +6 -6
- 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 -113
- package/tests/accordion.html +1 -1
package/dist/js/uikit.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,113 +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$1(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$1(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
|
-
'overflowX',
|
|
3196
|
-
marginProp,
|
|
3197
|
-
marginStartProp].
|
|
3198
|
-
map((key) => [key, el.style[key]]));
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
const dim = dimensions$1(el);
|
|
3202
|
-
const currentMargin = toFloat(css(el, marginProp));
|
|
3203
|
-
const marginStart = toFloat(css(el, marginStartProp));
|
|
3204
|
-
const endDim = dim[dimProp] + marginStart;
|
|
3205
|
-
|
|
3206
|
-
if (!inProgress && !show) {
|
|
3207
|
-
currentDim += marginStart;
|
|
3208
|
-
}
|
|
3209
|
-
|
|
3210
|
-
const [wrapper] = wrapInner(el, '<div>');
|
|
3211
|
-
css(wrapper, {
|
|
3212
|
-
boxSizing: 'border-box',
|
|
3213
|
-
height: dim.height,
|
|
3214
|
-
width: dim.width,
|
|
3215
|
-
...css(el, [
|
|
3216
|
-
'overflow',
|
|
3217
|
-
'padding',
|
|
3218
|
-
'borderTop',
|
|
3219
|
-
'borderRight',
|
|
3220
|
-
'borderBottom',
|
|
3221
|
-
'borderLeft',
|
|
3222
|
-
'borderImage',
|
|
3223
|
-
marginStartProp]) });
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
css(el, {
|
|
3228
|
-
padding: 0,
|
|
3229
|
-
border: 0,
|
|
3230
|
-
minWidth: 0,
|
|
3231
|
-
minHeight: 0,
|
|
3232
|
-
[marginStartProp]: 0,
|
|
3233
|
-
width: dim.width,
|
|
3234
|
-
height: dim.height,
|
|
3235
|
-
overflow: 'hidden',
|
|
3236
|
-
[dimProp]: currentDim });
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
const percent = currentDim / endDim;
|
|
3240
|
-
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3241
|
-
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3242
|
-
|
|
3243
|
-
if (end) {
|
|
3244
|
-
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3245
|
-
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3246
|
-
}
|
|
3247
|
-
|
|
3248
|
-
if (!end ^ mode === 'reveal') {
|
|
3249
|
-
css(wrapper, marginProp, -endDim + currentDim);
|
|
3250
|
-
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3251
|
-
}
|
|
3217
|
+
'borderTop',
|
|
3218
|
+
'borderRight',
|
|
3219
|
+
'borderBottom',
|
|
3220
|
+
'borderLeft',
|
|
3221
|
+
'borderImage',
|
|
3222
|
+
marginStartProp]) });
|
|
3252
3223
|
|
|
3253
|
-
try {
|
|
3254
|
-
await Transition.start(el, endProps, duration, transition);
|
|
3255
|
-
} finally {
|
|
3256
|
-
css(el, prevProps);
|
|
3257
|
-
unwrap(wrapper.firstChild);
|
|
3258
3224
|
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3225
|
+
|
|
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 });
|
|
3236
|
+
|
|
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);
|
|
3262
3260
|
}
|
|
3263
|
-
}
|
|
3261
|
+
}
|
|
3264
3262
|
}
|
|
3265
3263
|
|
|
3266
|
-
function toggleAnimation(cmp) {
|
|
3267
|
-
|
|
3268
|
-
Animation.cancel(el);
|
|
3264
|
+
function toggleAnimation(el, show, cmp) {
|
|
3265
|
+
Animation.cancel(el);
|
|
3269
3266
|
|
|
3270
|
-
|
|
3267
|
+
const { animation, duration, _toggle } = cmp;
|
|
3271
3268
|
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3269
|
+
if (show) {
|
|
3270
|
+
_toggle(el, true);
|
|
3271
|
+
return Animation.in(el, animation[0], duration, cmp.origin);
|
|
3272
|
+
}
|
|
3276
3273
|
|
|
3277
|
-
|
|
3278
|
-
|
|
3274
|
+
return Animation.out(el, animation[1] || animation[0], duration, cmp.origin).then(() =>
|
|
3275
|
+
_toggle(el, false));
|
|
3279
3276
|
|
|
3280
|
-
};
|
|
3281
3277
|
}
|
|
3282
3278
|
|
|
3283
3279
|
var Accordion = {
|
|
@@ -3391,28 +3387,25 @@
|
|
|
3391
3387
|
}
|
|
3392
3388
|
|
|
3393
3389
|
for (const el of items) {
|
|
3394
|
-
this.toggleElement(el, !hasClass(el, this.clsOpen),
|
|
3390
|
+
this.toggleElement(el, !hasClass(el, this.clsOpen), (el, show) => {
|
|
3395
3391
|
toggleClass(el, this.clsOpen, show);
|
|
3396
3392
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3397
3393
|
|
|
3398
|
-
const content = $(this.content, el);
|
|
3399
|
-
|
|
3400
3394
|
if (animate === false || !this.animation) {
|
|
3401
|
-
content
|
|
3402
|
-
hide(content, !show);
|
|
3395
|
+
hide($(this.content, el), !show);
|
|
3403
3396
|
return;
|
|
3404
3397
|
}
|
|
3405
3398
|
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
}
|
|
3414
|
-
}
|
|
3415
|
-
}
|
|
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);
|
|
3416
3409
|
});
|
|
3417
3410
|
}
|
|
3418
3411
|
} } };
|
|
@@ -3423,6 +3416,38 @@
|
|
|
3423
3416
|
el && (el.hidden = hide);
|
|
3424
3417
|
}
|
|
3425
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
|
+
|
|
3426
3451
|
var alert = {
|
|
3427
3452
|
mixins: [Class, Togglable],
|
|
3428
3453
|
|
|
@@ -3454,32 +3479,30 @@
|
|
|
3454
3479
|
|
|
3455
3480
|
methods: {
|
|
3456
3481
|
async close() {
|
|
3457
|
-
await this.toggleElement(this.$el, false, animate$1
|
|
3482
|
+
await this.toggleElement(this.$el, false, animate$1);
|
|
3458
3483
|
this.$destroy(true);
|
|
3459
3484
|
} } };
|
|
3460
3485
|
|
|
3461
3486
|
|
|
3462
3487
|
|
|
3463
|
-
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
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);
|
|
3481
3505
|
|
|
3482
|
-
};
|
|
3483
3506
|
}
|
|
3484
3507
|
|
|
3485
3508
|
var Video = {
|
|
@@ -3940,18 +3963,17 @@
|
|
|
3940
3963
|
|
|
3941
3964
|
}
|
|
3942
3965
|
|
|
3943
|
-
return this.toggleElement(this.$el, true, animate
|
|
3966
|
+
return this.toggleElement(this.$el, true, animate);
|
|
3944
3967
|
},
|
|
3945
3968
|
|
|
3946
3969
|
hide() {
|
|
3947
|
-
return this.toggleElement(this.$el, false, animate
|
|
3970
|
+
return this.toggleElement(this.$el, false, animate);
|
|
3948
3971
|
} } };
|
|
3949
3972
|
|
|
3950
3973
|
|
|
3951
3974
|
|
|
3952
|
-
function animate(_ref5) {let { transitionElement, _toggle } = _ref5;
|
|
3953
|
-
return (
|
|
3954
|
-
new Promise((resolve, reject) =>
|
|
3975
|
+
function animate(el, show, _ref5) {let { transitionElement, _toggle } = _ref5;
|
|
3976
|
+
return new Promise((resolve, reject) =>
|
|
3955
3977
|
once(el, 'show hide', () => {
|
|
3956
3978
|
el._reject == null ? void 0 : el._reject();
|
|
3957
3979
|
el._reject = reject;
|
|
@@ -6831,6 +6853,9 @@
|
|
|
6831
6853
|
trigger(el, inview ? 'inview' : 'outview');
|
|
6832
6854
|
|
|
6833
6855
|
state.inview = inview;
|
|
6856
|
+
|
|
6857
|
+
// change to `visibility: hidden` does not trigger observers
|
|
6858
|
+
this.$update(el);
|
|
6834
6859
|
} } };
|
|
6835
6860
|
|
|
6836
6861
|
var scrollspyNav = {
|