uikit 3.14.0 → 3.14.1-dev.b7e81c46b
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 -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 +19 -5
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +19 -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 +60 -60
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +60 -60
- 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 +60 -60
- 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 +19 -5
- 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 +42 -12
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +101 -71
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/accordion.js +21 -5
- package/src/js/mixin/parallax.js +59 -59
- package/src/js/mixin/togglable.js +16 -2
- package/tests/parallax.html +7 -7
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.
|
|
1
|
+
/*! UIkit 3.14.1-dev.b7e81c46b | 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() :
|
|
@@ -2954,7 +2954,7 @@
|
|
|
2954
2954
|
UIkit.data = '__uikit__';
|
|
2955
2955
|
UIkit.prefix = 'uk-';
|
|
2956
2956
|
UIkit.options = {};
|
|
2957
|
-
UIkit.version = '3.14.
|
|
2957
|
+
UIkit.version = '3.14.1-dev.b7e81c46b';
|
|
2958
2958
|
|
|
2959
2959
|
globalAPI(UIkit);
|
|
2960
2960
|
hooksAPI(UIkit);
|
|
@@ -3046,6 +3046,7 @@
|
|
|
3046
3046
|
cls: Boolean,
|
|
3047
3047
|
animation: 'list',
|
|
3048
3048
|
duration: Number,
|
|
3049
|
+
velocity: Number,
|
|
3049
3050
|
origin: String,
|
|
3050
3051
|
transition: String },
|
|
3051
3052
|
|
|
@@ -3054,8 +3055,9 @@
|
|
|
3054
3055
|
cls: false,
|
|
3055
3056
|
animation: [false],
|
|
3056
3057
|
duration: 200,
|
|
3058
|
+
velocity: 0.2,
|
|
3057
3059
|
origin: false,
|
|
3058
|
-
transition: '
|
|
3060
|
+
transition: 'ease',
|
|
3059
3061
|
clsEnter: 'uk-togglabe-enter',
|
|
3060
3062
|
clsLeave: 'uk-togglabe-leave',
|
|
3061
3063
|
|
|
@@ -3065,7 +3067,8 @@
|
|
|
3065
3067
|
paddingTop: '',
|
|
3066
3068
|
paddingBottom: '',
|
|
3067
3069
|
marginTop: '',
|
|
3068
|
-
marginBottom: ''
|
|
3070
|
+
marginBottom: '',
|
|
3071
|
+
boxShadow: '' },
|
|
3069
3072
|
|
|
3070
3073
|
|
|
3071
3074
|
hideProps: {
|
|
@@ -3074,7 +3077,8 @@
|
|
|
3074
3077
|
paddingTop: 0,
|
|
3075
3078
|
paddingBottom: 0,
|
|
3076
3079
|
marginTop: 0,
|
|
3077
|
-
marginBottom: 0
|
|
3080
|
+
marginBottom: 0,
|
|
3081
|
+
boxShadow: 'none' } },
|
|
3078
3082
|
|
|
3079
3083
|
|
|
3080
3084
|
|
|
@@ -3169,7 +3173,15 @@
|
|
|
3169
3173
|
|
|
3170
3174
|
|
|
3171
3175
|
|
|
3172
|
-
function toggleHeight(_ref3)
|
|
3176
|
+
function toggleHeight(_ref3)
|
|
3177
|
+
|
|
3178
|
+
|
|
3179
|
+
|
|
3180
|
+
|
|
3181
|
+
|
|
3182
|
+
|
|
3183
|
+
|
|
3184
|
+
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref3;
|
|
3173
3185
|
return (el, show) => {
|
|
3174
3186
|
const inProgress = Transition.inProgress(el);
|
|
3175
3187
|
const inner = el.hasChildNodes() ?
|
|
@@ -3190,6 +3202,8 @@
|
|
|
3190
3202
|
fastdom.flush();
|
|
3191
3203
|
|
|
3192
3204
|
const endHeight = height(el) + (inProgress ? 0 : inner);
|
|
3205
|
+
duration = velocity * el.offsetHeight + duration;
|
|
3206
|
+
|
|
3193
3207
|
height(el, currentHeight);
|
|
3194
3208
|
|
|
3195
3209
|
return (
|
|
@@ -3237,7 +3251,6 @@
|
|
|
3237
3251
|
multiple: Boolean,
|
|
3238
3252
|
toggle: String,
|
|
3239
3253
|
content: String,
|
|
3240
|
-
transition: String,
|
|
3241
3254
|
offset: Number },
|
|
3242
3255
|
|
|
3243
3256
|
|
|
@@ -3250,19 +3263,16 @@
|
|
|
3250
3263
|
clsOpen: 'uk-open',
|
|
3251
3264
|
toggle: '> .uk-accordion-title',
|
|
3252
3265
|
content: '> .uk-accordion-content',
|
|
3253
|
-
transition: 'ease',
|
|
3254
3266
|
offset: 0 },
|
|
3255
3267
|
|
|
3256
3268
|
|
|
3257
3269
|
computed: {
|
|
3258
3270
|
items: {
|
|
3259
3271
|
get(_ref, $el) {let { targets } = _ref;
|
|
3260
|
-
return $$(targets, $el)
|
|
3272
|
+
return $$(targets, $el);
|
|
3261
3273
|
},
|
|
3262
3274
|
|
|
3263
3275
|
watch(items, prev) {
|
|
3264
|
-
items.forEach((el) => hide($(this.content, el), !hasClass(el, this.clsOpen)));
|
|
3265
|
-
|
|
3266
3276
|
if (prev || hasClass(items, this.clsOpen)) {
|
|
3267
3277
|
return;
|
|
3268
3278
|
}
|
|
@@ -3281,7 +3291,27 @@
|
|
|
3281
3291
|
|
|
3282
3292
|
toggles(_ref2) {let { toggle } = _ref2;
|
|
3283
3293
|
return this.items.map((item) => $(toggle, item));
|
|
3284
|
-
}
|
|
3294
|
+
},
|
|
3295
|
+
|
|
3296
|
+
contents: {
|
|
3297
|
+
get(_ref3) {let { content } = _ref3;
|
|
3298
|
+
return this.items.map((item) => $(content, item));
|
|
3299
|
+
},
|
|
3300
|
+
|
|
3301
|
+
watch(items) {
|
|
3302
|
+
for (const el of items) {
|
|
3303
|
+
hide(
|
|
3304
|
+
el,
|
|
3305
|
+
!hasClass(
|
|
3306
|
+
this.items.find((item) => item.contains(el)),
|
|
3307
|
+
this.clsOpen));
|
|
3308
|
+
|
|
3309
|
+
|
|
3310
|
+
}
|
|
3311
|
+
},
|
|
3312
|
+
|
|
3313
|
+
immediate: true } },
|
|
3314
|
+
|
|
3285
3315
|
|
|
3286
3316
|
|
|
3287
3317
|
connected() {
|
|
@@ -9348,39 +9378,39 @@
|
|
|
9348
9378
|
|
|
9349
9379
|
|
|
9350
9380
|
|
|
9351
|
-
function transformFn(prop, el,
|
|
9352
|
-
let unit = getUnit(
|
|
9381
|
+
function transformFn(prop, el, steps) {
|
|
9382
|
+
let unit = getUnit(steps) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
|
|
9353
9383
|
let transformFn;
|
|
9354
9384
|
|
|
9355
9385
|
if (prop === 'x' || prop === 'y') {
|
|
9356
9386
|
prop = "translate" + ucfirst(prop);
|
|
9357
|
-
transformFn = (
|
|
9387
|
+
transformFn = (step) => toFloat(toFloat(step).toFixed(unit === 'px' ? 0 : 6));
|
|
9358
9388
|
} else if (prop === 'scale') {
|
|
9359
9389
|
unit = '';
|
|
9360
|
-
transformFn = (
|
|
9361
|
-
getUnit([
|
|
9390
|
+
transformFn = (step) =>
|
|
9391
|
+
getUnit([step]) ? toPx(step, 'width', el, true) / el.offsetWidth : step;
|
|
9362
9392
|
}
|
|
9363
9393
|
|
|
9364
|
-
if (
|
|
9365
|
-
|
|
9394
|
+
if (steps.length === 1) {
|
|
9395
|
+
steps.unshift(prop === 'scale' ? 1 : 0);
|
|
9366
9396
|
}
|
|
9367
9397
|
|
|
9368
|
-
|
|
9398
|
+
steps = parseSteps(steps, transformFn);
|
|
9369
9399
|
|
|
9370
9400
|
return (css, percent) => {
|
|
9371
|
-
css.transform += " " + prop + "(" + getValue(
|
|
9401
|
+
css.transform += " " + prop + "(" + getValue(steps, percent) + unit + ")";
|
|
9372
9402
|
};
|
|
9373
9403
|
}
|
|
9374
9404
|
|
|
9375
|
-
function colorFn(prop, el,
|
|
9376
|
-
if (
|
|
9377
|
-
|
|
9405
|
+
function colorFn(prop, el, steps) {
|
|
9406
|
+
if (steps.length === 1) {
|
|
9407
|
+
steps.unshift(getCssValue(el, prop, ''));
|
|
9378
9408
|
}
|
|
9379
9409
|
|
|
9380
|
-
|
|
9410
|
+
steps = parseSteps(steps, (step) => parseColor(el, step));
|
|
9381
9411
|
|
|
9382
9412
|
return (css, percent) => {
|
|
9383
|
-
const [start, end, p] =
|
|
9413
|
+
const [start, end, p] = getStep(steps, percent);
|
|
9384
9414
|
const value = start.
|
|
9385
9415
|
map((value, i) => {
|
|
9386
9416
|
value += p * (end[i] - value);
|
|
@@ -9400,80 +9430,80 @@
|
|
|
9400
9430
|
map(toFloat);
|
|
9401
9431
|
}
|
|
9402
9432
|
|
|
9403
|
-
function filterFn(prop, el,
|
|
9404
|
-
if (
|
|
9405
|
-
|
|
9433
|
+
function filterFn(prop, el, steps) {
|
|
9434
|
+
if (steps.length === 1) {
|
|
9435
|
+
steps.unshift(0);
|
|
9406
9436
|
}
|
|
9407
9437
|
|
|
9408
|
-
const unit = getUnit(
|
|
9438
|
+
const unit = getUnit(steps) || { blur: 'px', hue: 'deg' }[prop] || '%';
|
|
9409
9439
|
prop = { fopacity: 'opacity', hue: 'hue-rotate' }[prop] || prop;
|
|
9410
|
-
|
|
9440
|
+
steps = parseSteps(steps);
|
|
9411
9441
|
|
|
9412
9442
|
return (css, percent) => {
|
|
9413
|
-
const value = getValue(
|
|
9443
|
+
const value = getValue(steps, percent);
|
|
9414
9444
|
css.filter += " " + prop + "(" + (value + unit) + ")";
|
|
9415
9445
|
};
|
|
9416
9446
|
}
|
|
9417
9447
|
|
|
9418
|
-
function cssPropFn(prop, el,
|
|
9419
|
-
if (
|
|
9420
|
-
|
|
9448
|
+
function cssPropFn(prop, el, steps) {
|
|
9449
|
+
if (steps.length === 1) {
|
|
9450
|
+
steps.unshift(getCssValue(el, prop, ''));
|
|
9421
9451
|
}
|
|
9422
9452
|
|
|
9423
|
-
|
|
9453
|
+
steps = parseSteps(steps);
|
|
9424
9454
|
|
|
9425
9455
|
return (css, percent) => {
|
|
9426
|
-
css[prop] = getValue(
|
|
9456
|
+
css[prop] = getValue(steps, percent);
|
|
9427
9457
|
};
|
|
9428
9458
|
}
|
|
9429
9459
|
|
|
9430
|
-
function strokeFn(prop, el,
|
|
9431
|
-
if (
|
|
9432
|
-
|
|
9460
|
+
function strokeFn(prop, el, steps) {
|
|
9461
|
+
if (steps.length === 1) {
|
|
9462
|
+
steps.unshift(0);
|
|
9433
9463
|
}
|
|
9434
9464
|
|
|
9435
|
-
const unit = getUnit(
|
|
9465
|
+
const unit = getUnit(steps);
|
|
9436
9466
|
const length = getMaxPathLength(el);
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
return unit === '%' ?
|
|
9467
|
+
steps = parseSteps(steps.reverse(), (step) => {
|
|
9468
|
+
step = toFloat(step);
|
|
9469
|
+
return unit === '%' ? step * length / 100 : step;
|
|
9440
9470
|
});
|
|
9441
9471
|
|
|
9442
|
-
if (!
|
|
9472
|
+
if (!steps.some((_ref) => {let [value] = _ref;return value;})) {
|
|
9443
9473
|
return noop;
|
|
9444
9474
|
}
|
|
9445
9475
|
|
|
9446
9476
|
css(el, 'strokeDasharray', length);
|
|
9447
9477
|
|
|
9448
9478
|
return (css, percent) => {
|
|
9449
|
-
css.strokeDashoffset = getValue(
|
|
9479
|
+
css.strokeDashoffset = getValue(steps, percent);
|
|
9450
9480
|
};
|
|
9451
9481
|
}
|
|
9452
9482
|
|
|
9453
|
-
function backgroundFn(prop, el,
|
|
9454
|
-
if (
|
|
9455
|
-
|
|
9483
|
+
function backgroundFn(prop, el, steps) {
|
|
9484
|
+
if (steps.length === 1) {
|
|
9485
|
+
steps.unshift(0);
|
|
9456
9486
|
}
|
|
9457
9487
|
|
|
9458
9488
|
prop = prop.substr(-1);
|
|
9459
9489
|
const attr = prop === 'y' ? 'height' : 'width';
|
|
9460
|
-
|
|
9490
|
+
steps = parseSteps(steps, (step) => toPx(step, attr, el));
|
|
9461
9491
|
|
|
9462
9492
|
const bgPos = getCssValue(el, "background-position-" + prop, '');
|
|
9463
9493
|
|
|
9464
9494
|
return getCssValue(el, 'backgroundSize', '') === 'cover' ?
|
|
9465
|
-
backgroundCoverFn(prop, el,
|
|
9466
|
-
setBackgroundPosFn(prop,
|
|
9495
|
+
backgroundCoverFn(prop, el, steps, bgPos, attr) :
|
|
9496
|
+
setBackgroundPosFn(prop, steps, bgPos);
|
|
9467
9497
|
}
|
|
9468
9498
|
|
|
9469
|
-
function backgroundCoverFn(prop, el,
|
|
9499
|
+
function backgroundCoverFn(prop, el, steps, bgPos, attr) {
|
|
9470
9500
|
const dimImage = getBackgroundImageDimensions(el);
|
|
9471
9501
|
|
|
9472
9502
|
if (!dimImage.width) {
|
|
9473
9503
|
return noop;
|
|
9474
9504
|
}
|
|
9475
9505
|
|
|
9476
|
-
const values =
|
|
9506
|
+
const values = steps.map((_ref2) => {let [value] = _ref2;return value;});
|
|
9477
9507
|
const min = Math.min(...values);
|
|
9478
9508
|
const max = Math.max(...values);
|
|
9479
9509
|
const down = values.indexOf(min) < values.indexOf(max);
|
|
@@ -9501,7 +9531,7 @@
|
|
|
9501
9531
|
|
|
9502
9532
|
const dim = Dimensions.cover(dimImage, dimEl);
|
|
9503
9533
|
|
|
9504
|
-
const fn = setBackgroundPosFn(prop,
|
|
9534
|
+
const fn = setBackgroundPosFn(prop, steps, pos + "px");
|
|
9505
9535
|
return (css, percent) => {
|
|
9506
9536
|
fn(css, percent);
|
|
9507
9537
|
css.backgroundSize = dim.width + "px " + dim.height + "px";
|
|
@@ -9509,9 +9539,9 @@
|
|
|
9509
9539
|
};
|
|
9510
9540
|
}
|
|
9511
9541
|
|
|
9512
|
-
function setBackgroundPosFn(prop,
|
|
9542
|
+
function setBackgroundPosFn(prop, steps, pos) {
|
|
9513
9543
|
return function (css, percent) {
|
|
9514
|
-
css["background-position-" + prop] = "calc(" + pos + " + " + getValue(
|
|
9544
|
+
css["background-position-" + prop] = "calc(" + pos + " + " + getValue(steps, percent) + "px)";
|
|
9515
9545
|
};
|
|
9516
9546
|
}
|
|
9517
9547
|
|
|
@@ -9546,12 +9576,12 @@
|
|
|
9546
9576
|
|
|
9547
9577
|
}
|
|
9548
9578
|
|
|
9549
|
-
function
|
|
9579
|
+
function parseSteps(steps, fn) {if (fn === void 0) {fn = toFloat;}
|
|
9550
9580
|
const result = [];
|
|
9551
|
-
const { length } =
|
|
9581
|
+
const { length } = steps;
|
|
9552
9582
|
let nullIndex = 0;
|
|
9553
9583
|
for (let i = 0; i < length; i++) {
|
|
9554
|
-
let [value, percent] = isString(
|
|
9584
|
+
let [value, percent] = isString(steps[i]) ? steps[i].trim().split(' ') : [steps[i]];
|
|
9555
9585
|
value = fn(value);
|
|
9556
9586
|
percent = percent ? toFloat(percent) / 100 : null;
|
|
9557
9587
|
|
|
@@ -9588,24 +9618,24 @@
|
|
|
9588
9618
|
return result;
|
|
9589
9619
|
}
|
|
9590
9620
|
|
|
9591
|
-
function
|
|
9592
|
-
const index = findIndex(
|
|
9621
|
+
function getStep(steps, percent) {
|
|
9622
|
+
const index = findIndex(steps.slice(1), (_ref3) => {let [, targetPercent] = _ref3;return percent <= targetPercent;}) + 1;
|
|
9593
9623
|
return [
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
(percent -
|
|
9624
|
+
steps[index - 1][0],
|
|
9625
|
+
steps[index][0],
|
|
9626
|
+
(percent - steps[index - 1][1]) / (steps[index][1] - steps[index - 1][1])];
|
|
9597
9627
|
|
|
9598
9628
|
}
|
|
9599
9629
|
|
|
9600
|
-
function getValue(
|
|
9601
|
-
const [start, end, p] =
|
|
9630
|
+
function getValue(steps, percent) {
|
|
9631
|
+
const [start, end, p] = getStep(steps, percent);
|
|
9602
9632
|
return isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
|
|
9603
9633
|
}
|
|
9604
9634
|
|
|
9605
|
-
const unitRe = /^-?\d+(
|
|
9606
|
-
function getUnit(
|
|
9607
|
-
for (const
|
|
9608
|
-
const match =
|
|
9635
|
+
const unitRe = /^-?\d+(\S*)/;
|
|
9636
|
+
function getUnit(steps, defaultUnit) {
|
|
9637
|
+
for (const step of steps) {
|
|
9638
|
+
const match = step.match == null ? void 0 : step.match(unitRe);
|
|
9609
9639
|
if (match) {
|
|
9610
9640
|
return match[1];
|
|
9611
9641
|
}
|