uikit 3.13.11-dev.d3de726ee → 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.
Files changed (60) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/css/uikit-core-rtl.css +4 -1
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +4 -1
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +4 -1
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +4 -1
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  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 +19 -5
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +19 -5
  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 +63 -61
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +63 -61
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +1 -1
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +63 -61
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +1 -1
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +19 -5
  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 +121 -60
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +183 -120
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/accordion.js +21 -5
  44. package/src/js/core/cover.js +27 -14
  45. package/src/js/core/drop.js +22 -2
  46. package/src/js/core/height-match.js +1 -1
  47. package/src/js/core/margin.js +9 -2
  48. package/src/js/mixin/parallax.js +62 -61
  49. package/src/js/mixin/togglable.js +16 -2
  50. package/src/js/util/lang.js +34 -38
  51. package/src/js/util/position.js +6 -3
  52. package/src/less/components/nav.less +1 -0
  53. package/src/less/components/utility.less +1 -0
  54. package/src/scss/components/nav.scss +1 -0
  55. package/src/scss/components/utility.scss +1 -0
  56. package/tests/alert.html +1 -1
  57. package/tests/drop.html +154 -80
  58. package/tests/navbar.html +1 -1
  59. package/tests/parallax.html +8 -8
  60. package/tests/sticky-parallax.html +8 -8
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.11-dev.d3de726ee | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
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() :
@@ -208,48 +208,44 @@
208
208
 
209
209
  }
210
210
 
211
- const Dimensions = {
212
- ratio(dimensions, prop, value) {
213
- const aProp = prop === 'width' ? 'height' : 'width';
211
+ function ratio(dimensions, prop, value) {
212
+ const aProp = prop === 'width' ? 'height' : 'width';
214
213
 
215
- return {
216
- [aProp]: dimensions[prop] ?
217
- Math.round(value * dimensions[aProp] / dimensions[prop]) :
218
- dimensions[aProp],
219
- [prop]: value };
214
+ return {
215
+ [aProp]: dimensions[prop] ?
216
+ Math.round(value * dimensions[aProp] / dimensions[prop]) :
217
+ dimensions[aProp],
218
+ [prop]: value };
220
219
 
221
- },
220
+ }
222
221
 
223
- contain(dimensions, maxDimensions) {
224
- dimensions = { ...dimensions };
222
+ function contain(dimensions, maxDimensions) {
223
+ dimensions = { ...dimensions };
225
224
 
226
- each(
227
- dimensions,
228
- (_, prop) =>
225
+ for (const prop in dimensions) {
229
226
  dimensions =
230
227
  dimensions[prop] > maxDimensions[prop] ?
231
- this.ratio(dimensions, prop, maxDimensions[prop]) :
232
- dimensions);
233
-
228
+ ratio(dimensions, prop, maxDimensions[prop]) :
229
+ dimensions;
230
+ }
234
231
 
235
- return dimensions;
236
- },
232
+ return dimensions;
233
+ }
237
234
 
238
- cover(dimensions, maxDimensions) {
239
- dimensions = this.contain(dimensions, maxDimensions);
235
+ function cover$1(dimensions, maxDimensions) {
236
+ dimensions = contain(dimensions, maxDimensions);
240
237
 
241
- each(
242
- dimensions,
243
- (_, prop) =>
238
+ for (const prop in dimensions) {
244
239
  dimensions =
245
240
  dimensions[prop] < maxDimensions[prop] ?
246
- this.ratio(dimensions, prop, maxDimensions[prop]) :
247
- dimensions);
248
-
241
+ ratio(dimensions, prop, maxDimensions[prop]) :
242
+ dimensions;
243
+ }
249
244
 
250
- return dimensions;
251
- } };
245
+ return dimensions;
246
+ }
252
247
 
248
+ const Dimensions = { ratio, contain, cover: cover$1 };
253
249
 
254
250
  function getIndex(i, elements, current, finite) {if (current === void 0) {current = 0;}if (finite === void 0) {finite = false;}
255
251
  elements = toNodes(elements);
@@ -1997,8 +1993,6 @@
1997
1993
  function attachToWithFlip(element, target, options) {
1998
1994
  const position = attachTo(element, target, options);
1999
1995
  const targetDim = offset(target);
2000
- const viewports = scrollParents(element, /auto|scroll/);
2001
- const [scrollElement] = viewports;
2002
1996
 
2003
1997
  let {
2004
1998
  flip,
@@ -2009,6 +2003,11 @@
2009
2003
  viewportPadding } =
2010
2004
  options;
2011
2005
 
2006
+ let viewports = scrollParents(element);
2007
+ if (boundary === target) {
2008
+ viewports = viewports.filter((viewport) => viewport !== boundary);
2009
+ }
2010
+ const [scrollElement] = viewports;
2012
2011
  viewports.push(viewport);
2013
2012
 
2014
2013
  const offsetPosition = { ...position };
@@ -2027,7 +2026,7 @@
2027
2026
  viewport[end] -= viewportPadding;
2028
2027
  }
2029
2028
 
2030
- if (boundary && !(willFlip || position[prop] > offset(boundary)[prop])) {
2029
+ if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
2031
2030
  viewport = getIntersectionArea(viewport, offset(boundary));
2032
2031
  }
2033
2032
 
@@ -2955,7 +2954,7 @@
2955
2954
  UIkit.data = '__uikit__';
2956
2955
  UIkit.prefix = 'uk-';
2957
2956
  UIkit.options = {};
2958
- UIkit.version = '3.13.11-dev.d3de726ee';
2957
+ UIkit.version = '3.14.1-dev.b7e81c46b';
2959
2958
 
2960
2959
  globalAPI(UIkit);
2961
2960
  hooksAPI(UIkit);
@@ -3047,6 +3046,7 @@
3047
3046
  cls: Boolean,
3048
3047
  animation: 'list',
3049
3048
  duration: Number,
3049
+ velocity: Number,
3050
3050
  origin: String,
3051
3051
  transition: String },
3052
3052
 
@@ -3055,8 +3055,9 @@
3055
3055
  cls: false,
3056
3056
  animation: [false],
3057
3057
  duration: 200,
3058
+ velocity: 0.2,
3058
3059
  origin: false,
3059
- transition: 'linear',
3060
+ transition: 'ease',
3060
3061
  clsEnter: 'uk-togglabe-enter',
3061
3062
  clsLeave: 'uk-togglabe-leave',
3062
3063
 
@@ -3066,7 +3067,8 @@
3066
3067
  paddingTop: '',
3067
3068
  paddingBottom: '',
3068
3069
  marginTop: '',
3069
- marginBottom: '' },
3070
+ marginBottom: '',
3071
+ boxShadow: '' },
3070
3072
 
3071
3073
 
3072
3074
  hideProps: {
@@ -3075,7 +3077,8 @@
3075
3077
  paddingTop: 0,
3076
3078
  paddingBottom: 0,
3077
3079
  marginTop: 0,
3078
- marginBottom: 0 } },
3080
+ marginBottom: 0,
3081
+ boxShadow: 'none' } },
3079
3082
 
3080
3083
 
3081
3084
 
@@ -3170,7 +3173,15 @@
3170
3173
 
3171
3174
 
3172
3175
 
3173
- function toggleHeight(_ref3) {let { isToggled, duration, initProps, hideProps, transition, _toggle } = _ref3;
3176
+ function toggleHeight(_ref3)
3177
+
3178
+
3179
+
3180
+
3181
+
3182
+
3183
+
3184
+ {let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref3;
3174
3185
  return (el, show) => {
3175
3186
  const inProgress = Transition.inProgress(el);
3176
3187
  const inner = el.hasChildNodes() ?
@@ -3191,6 +3202,8 @@
3191
3202
  fastdom.flush();
3192
3203
 
3193
3204
  const endHeight = height(el) + (inProgress ? 0 : inner);
3205
+ duration = velocity * el.offsetHeight + duration;
3206
+
3194
3207
  height(el, currentHeight);
3195
3208
 
3196
3209
  return (
@@ -3238,7 +3251,6 @@
3238
3251
  multiple: Boolean,
3239
3252
  toggle: String,
3240
3253
  content: String,
3241
- transition: String,
3242
3254
  offset: Number },
3243
3255
 
3244
3256
 
@@ -3251,19 +3263,16 @@
3251
3263
  clsOpen: 'uk-open',
3252
3264
  toggle: '> .uk-accordion-title',
3253
3265
  content: '> .uk-accordion-content',
3254
- transition: 'ease',
3255
3266
  offset: 0 },
3256
3267
 
3257
3268
 
3258
3269
  computed: {
3259
3270
  items: {
3260
3271
  get(_ref, $el) {let { targets } = _ref;
3261
- return $$(targets, $el).filter((el) => $(this.content, el));
3272
+ return $$(targets, $el);
3262
3273
  },
3263
3274
 
3264
3275
  watch(items, prev) {
3265
- items.forEach((el) => hide($(this.content, el), !hasClass(el, this.clsOpen)));
3266
-
3267
3276
  if (prev || hasClass(items, this.clsOpen)) {
3268
3277
  return;
3269
3278
  }
@@ -3282,7 +3291,27 @@
3282
3291
 
3283
3292
  toggles(_ref2) {let { toggle } = _ref2;
3284
3293
  return this.items.map((item) => $(toggle, item));
3285
- } },
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
+
3286
3315
 
3287
3316
 
3288
3317
  connected() {
@@ -3479,25 +3508,38 @@
3479
3508
 
3480
3509
  update: {
3481
3510
  read() {
3482
- const el = this.$el;
3483
- const { offsetHeight: height, offsetWidth: width } =
3484
- getPositionedParent(el) || parent(el);
3485
- const dim = Dimensions.cover(
3486
- {
3487
- width: this.width || el.naturalWidth || el.videoWidth || el.clientWidth,
3488
- height: this.height || el.naturalHeight || el.videoHeight || el.clientHeight },
3511
+ const { ratio, cover } = Dimensions;
3512
+ const { $el, width, height } = this;
3489
3513
 
3490
- {
3491
- width: width + (width % 2 ? 1 : 0),
3492
- height: height + (height % 2 ? 1 : 0) });
3514
+ let dim = { width, height };
3493
3515
 
3516
+ if (!dim.width || !dim.height) {
3517
+ const intrinsic = {
3518
+ width: $el.naturalWidth || $el.videoWidth || $el.clientWidth,
3519
+ height: $el.naturalHeight || $el.videoHeight || $el.clientHeight };
3494
3520
 
3495
3521
 
3496
- if (!dim.width || !dim.height) {
3522
+ if (dim.width) {
3523
+ dim = ratio(intrinsic, 'width', dim.width);
3524
+ } else if (height) {
3525
+ dim = ratio(intrinsic, 'height', dim.height);
3526
+ } else {
3527
+ dim = intrinsic;
3528
+ }
3529
+ }
3530
+
3531
+ const { offsetHeight: coverHeight, offsetWidth: coverWidth } =
3532
+ getPositionedParent($el) || parent($el);
3533
+ const coverDim = cover(dim, {
3534
+ width: coverWidth + (coverWidth % 2 ? 1 : 0),
3535
+ height: coverHeight + (coverHeight % 2 ? 1 : 0) });
3536
+
3537
+
3538
+ if (!coverDim.width || !coverDim.height) {
3497
3539
  return false;
3498
3540
  }
3499
3541
 
3500
- return dim;
3542
+ return coverDim;
3501
3543
  },
3502
3544
 
3503
3545
  write(_ref) {let { height, width } = _ref;
@@ -3599,6 +3641,7 @@
3599
3641
  boundaryAlign: Boolean,
3600
3642
  delayShow: Number,
3601
3643
  delayHide: Number,
3644
+ display: String,
3602
3645
  clsDrop: String },
3603
3646
 
3604
3647
 
@@ -3609,6 +3652,7 @@
3609
3652
  boundaryAlign: false,
3610
3653
  delayShow: 0,
3611
3654
  delayHide: 800,
3655
+ display: null,
3612
3656
  clsDrop: false,
3613
3657
  animation: ['uk-animation-fade'],
3614
3658
  cls: 'uk-open',
@@ -3799,7 +3843,23 @@
3799
3843
  this.hide(false);
3800
3844
  }
3801
3845
  }),
3802
- on(window, 'resize', () => this.$emit())])
3846
+
3847
+ ...(this.display === 'static' ?
3848
+ [] :
3849
+ (() => {
3850
+ const handler = () => this.$emit();
3851
+ return [
3852
+ on(window, 'resize', handler),
3853
+ on(document, 'scroll', handler, true),
3854
+ (() => {
3855
+ const observer = observeResize(
3856
+ scrollParents(this.$el),
3857
+ handler);
3858
+
3859
+ return () => observer.disconnect();
3860
+ })()];
3861
+
3862
+ })())])
3803
3863
  {
3804
3864
  once(this.$el, 'hide', handler, { self: true });
3805
3865
  }
@@ -3919,7 +3979,8 @@
3919
3979
  const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
3920
3980
 
3921
3981
  css(this.$el, 'maxWidth', '');
3922
- const maxWidth = scrollParentOffset.width - (boundary ? 0 : 2 * this.viewportPadding);
3982
+ const maxWidth =
3983
+ scrollParentOffset.width - (this.boundaryAlign ? 0 : 2 * this.viewportPadding);
3923
3984
 
3924
3985
  if (this.pos[1] === 'justify') {
3925
3986
  const prop = this.axis === 'y' ? 'width' : 'height';
@@ -4034,7 +4095,7 @@
4034
4095
 
4035
4096
 
4036
4097
  resizeTargets() {
4037
- return [this.$el, this.$el.children];
4098
+ return [this.$el, ...toArray(this.$el.children)];
4038
4099
  },
4039
4100
 
4040
4101
  connected() {
@@ -4351,7 +4412,7 @@
4351
4412
 
4352
4413
 
4353
4414
  resizeTargets() {
4354
- return [this.$el, this.elements];
4415
+ return [this.$el, ...this.elements];
4355
4416
  },
4356
4417
 
4357
4418
  update: {
@@ -9302,7 +9363,9 @@
9302
9363
 
9303
9364
  methods: {
9304
9365
  reset() {
9305
- each(this.getCss(0), (_, prop) => css(this.$el, prop, ''));
9366
+ for (const prop in this.getCss(0)) {
9367
+ css(this.$el, prop, '');
9368
+ }
9306
9369
  },
9307
9370
 
9308
9371
  getCss(percent) {
@@ -9315,39 +9378,39 @@
9315
9378
 
9316
9379
 
9317
9380
 
9318
- function transformFn(prop, el, stops) {
9319
- let unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
9381
+ function transformFn(prop, el, steps) {
9382
+ let unit = getUnit(steps) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
9320
9383
  let transformFn;
9321
9384
 
9322
9385
  if (prop === 'x' || prop === 'y') {
9323
9386
  prop = "translate" + ucfirst(prop);
9324
- transformFn = (stop) => toFloat(toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
9387
+ transformFn = (step) => toFloat(toFloat(step).toFixed(unit === 'px' ? 0 : 6));
9325
9388
  } else if (prop === 'scale') {
9326
9389
  unit = '';
9327
- transformFn = (stop) =>
9328
- getUnit([stop]) ? toPx(stop, 'width', el, true) / el.offsetWidth : stop;
9390
+ transformFn = (step) =>
9391
+ getUnit([step]) ? toPx(step, 'width', el, true) / el.offsetWidth : step;
9329
9392
  }
9330
9393
 
9331
- if (stops.length === 1) {
9332
- stops.unshift(prop === 'scale' ? 1 : 0);
9394
+ if (steps.length === 1) {
9395
+ steps.unshift(prop === 'scale' ? 1 : 0);
9333
9396
  }
9334
9397
 
9335
- stops = parseStops(stops, transformFn);
9398
+ steps = parseSteps(steps, transformFn);
9336
9399
 
9337
9400
  return (css, percent) => {
9338
- css.transform += " " + prop + "(" + getValue(stops, percent) + unit + ")";
9401
+ css.transform += " " + prop + "(" + getValue(steps, percent) + unit + ")";
9339
9402
  };
9340
9403
  }
9341
9404
 
9342
- function colorFn(prop, el, stops) {
9343
- if (stops.length === 1) {
9344
- stops.unshift(getCssValue(el, prop, ''));
9405
+ function colorFn(prop, el, steps) {
9406
+ if (steps.length === 1) {
9407
+ steps.unshift(getCssValue(el, prop, ''));
9345
9408
  }
9346
9409
 
9347
- stops = parseStops(stops, (stop) => parseColor(el, stop));
9410
+ steps = parseSteps(steps, (step) => parseColor(el, step));
9348
9411
 
9349
9412
  return (css, percent) => {
9350
- const [start, end, p] = getStop(stops, percent);
9413
+ const [start, end, p] = getStep(steps, percent);
9351
9414
  const value = start.
9352
9415
  map((value, i) => {
9353
9416
  value += p * (end[i] - value);
@@ -9367,80 +9430,80 @@
9367
9430
  map(toFloat);
9368
9431
  }
9369
9432
 
9370
- function filterFn(prop, el, stops) {
9371
- if (stops.length === 1) {
9372
- stops.unshift(0);
9433
+ function filterFn(prop, el, steps) {
9434
+ if (steps.length === 1) {
9435
+ steps.unshift(0);
9373
9436
  }
9374
9437
 
9375
- const unit = getUnit(stops) || { blur: 'px', hue: 'deg' }[prop] || '%';
9438
+ const unit = getUnit(steps) || { blur: 'px', hue: 'deg' }[prop] || '%';
9376
9439
  prop = { fopacity: 'opacity', hue: 'hue-rotate' }[prop] || prop;
9377
- stops = parseStops(stops);
9440
+ steps = parseSteps(steps);
9378
9441
 
9379
9442
  return (css, percent) => {
9380
- const value = getValue(stops, percent);
9443
+ const value = getValue(steps, percent);
9381
9444
  css.filter += " " + prop + "(" + (value + unit) + ")";
9382
9445
  };
9383
9446
  }
9384
9447
 
9385
- function cssPropFn(prop, el, stops) {
9386
- if (stops.length === 1) {
9387
- stops.unshift(getCssValue(el, prop, ''));
9448
+ function cssPropFn(prop, el, steps) {
9449
+ if (steps.length === 1) {
9450
+ steps.unshift(getCssValue(el, prop, ''));
9388
9451
  }
9389
9452
 
9390
- stops = parseStops(stops);
9453
+ steps = parseSteps(steps);
9391
9454
 
9392
9455
  return (css, percent) => {
9393
- css[prop] = getValue(stops, percent);
9456
+ css[prop] = getValue(steps, percent);
9394
9457
  };
9395
9458
  }
9396
9459
 
9397
- function strokeFn(prop, el, stops) {
9398
- if (stops.length === 1) {
9399
- stops.unshift(0);
9460
+ function strokeFn(prop, el, steps) {
9461
+ if (steps.length === 1) {
9462
+ steps.unshift(0);
9400
9463
  }
9401
9464
 
9402
- const unit = getUnit(stops);
9465
+ const unit = getUnit(steps);
9403
9466
  const length = getMaxPathLength(el);
9404
- stops = parseStops(stops.reverse(), (stop) => {
9405
- stop = toFloat(stop);
9406
- return unit === '%' ? stop * length / 100 : stop;
9467
+ steps = parseSteps(steps.reverse(), (step) => {
9468
+ step = toFloat(step);
9469
+ return unit === '%' ? step * length / 100 : step;
9407
9470
  });
9408
9471
 
9409
- if (!stops.some((_ref) => {let [value] = _ref;return value;})) {
9472
+ if (!steps.some((_ref) => {let [value] = _ref;return value;})) {
9410
9473
  return noop;
9411
9474
  }
9412
9475
 
9413
9476
  css(el, 'strokeDasharray', length);
9414
9477
 
9415
9478
  return (css, percent) => {
9416
- css.strokeDashoffset = getValue(stops, percent);
9479
+ css.strokeDashoffset = getValue(steps, percent);
9417
9480
  };
9418
9481
  }
9419
9482
 
9420
- function backgroundFn(prop, el, stops) {
9421
- if (stops.length === 1) {
9422
- stops.unshift(0);
9483
+ function backgroundFn(prop, el, steps) {
9484
+ if (steps.length === 1) {
9485
+ steps.unshift(0);
9423
9486
  }
9424
9487
 
9425
9488
  prop = prop.substr(-1);
9426
9489
  const attr = prop === 'y' ? 'height' : 'width';
9427
- stops = parseStops(stops, (stop) => toPx(stop, attr, el));
9490
+ steps = parseSteps(steps, (step) => toPx(step, attr, el));
9428
9491
 
9429
9492
  const bgPos = getCssValue(el, "background-position-" + prop, '');
9430
9493
 
9431
9494
  return getCssValue(el, 'backgroundSize', '') === 'cover' ?
9432
- backgroundCoverFn(prop, el, stops, bgPos, attr) :
9433
- setBackgroundPosFn(prop, stops, bgPos);
9495
+ backgroundCoverFn(prop, el, steps, bgPos, attr) :
9496
+ setBackgroundPosFn(prop, steps, bgPos);
9434
9497
  }
9435
9498
 
9436
- function backgroundCoverFn(prop, el, stops, bgPos, attr) {
9499
+ function backgroundCoverFn(prop, el, steps, bgPos, attr) {
9437
9500
  const dimImage = getBackgroundImageDimensions(el);
9438
9501
 
9439
9502
  if (!dimImage.width) {
9440
9503
  return noop;
9441
9504
  }
9442
9505
 
9443
- const values = stops.map((_ref2) => {let [value] = _ref2;return value;});
9506
+ const values = steps.map((_ref2) => {let [value] = _ref2;return value;});
9444
9507
  const min = Math.min(...values);
9445
9508
  const max = Math.max(...values);
9446
9509
  const down = values.indexOf(min) < values.indexOf(max);
@@ -9468,7 +9531,7 @@
9468
9531
 
9469
9532
  const dim = Dimensions.cover(dimImage, dimEl);
9470
9533
 
9471
- const fn = setBackgroundPosFn(prop, stops, pos + "px");
9534
+ const fn = setBackgroundPosFn(prop, steps, pos + "px");
9472
9535
  return (css, percent) => {
9473
9536
  fn(css, percent);
9474
9537
  css.backgroundSize = dim.width + "px " + dim.height + "px";
@@ -9476,9 +9539,9 @@
9476
9539
  };
9477
9540
  }
9478
9541
 
9479
- function setBackgroundPosFn(prop, stops, pos) {
9542
+ function setBackgroundPosFn(prop, steps, pos) {
9480
9543
  return function (css, percent) {
9481
- css["background-position-" + prop] = "calc(" + pos + " + " + getValue(stops, percent) + "px)";
9544
+ css["background-position-" + prop] = "calc(" + pos + " + " + getValue(steps, percent) + "px)";
9482
9545
  };
9483
9546
  }
9484
9547
 
@@ -9513,12 +9576,12 @@
9513
9576
 
9514
9577
  }
9515
9578
 
9516
- function parseStops(stops, fn) {if (fn === void 0) {fn = toFloat;}
9579
+ function parseSteps(steps, fn) {if (fn === void 0) {fn = toFloat;}
9517
9580
  const result = [];
9518
- const { length } = stops;
9581
+ const { length } = steps;
9519
9582
  let nullIndex = 0;
9520
9583
  for (let i = 0; i < length; i++) {
9521
- let [value, percent] = isString(stops[i]) ? stops[i].trim().split(' ') : [stops[i]];
9584
+ let [value, percent] = isString(steps[i]) ? steps[i].trim().split(' ') : [steps[i]];
9522
9585
  value = fn(value);
9523
9586
  percent = percent ? toFloat(percent) / 100 : null;
9524
9587
 
@@ -9555,24 +9618,24 @@
9555
9618
  return result;
9556
9619
  }
9557
9620
 
9558
- function getStop(stops, percent) {
9559
- const index = findIndex(stops.slice(1), (_ref3) => {let [, targetPercent] = _ref3;return percent <= targetPercent;}) + 1;
9621
+ function getStep(steps, percent) {
9622
+ const index = findIndex(steps.slice(1), (_ref3) => {let [, targetPercent] = _ref3;return percent <= targetPercent;}) + 1;
9560
9623
  return [
9561
- stops[index - 1][0],
9562
- stops[index][0],
9563
- (percent - stops[index - 1][1]) / (stops[index][1] - stops[index - 1][1])];
9624
+ steps[index - 1][0],
9625
+ steps[index][0],
9626
+ (percent - steps[index - 1][1]) / (steps[index][1] - steps[index - 1][1])];
9564
9627
 
9565
9628
  }
9566
9629
 
9567
- function getValue(stops, percent) {
9568
- const [start, end, p] = getStop(stops, percent);
9630
+ function getValue(steps, percent) {
9631
+ const [start, end, p] = getStep(steps, percent);
9569
9632
  return isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
9570
9633
  }
9571
9634
 
9572
- const unitRe = /^-?\d+([^\s]*)/;
9573
- function getUnit(stops, defaultUnit) {
9574
- for (const stop of stops) {
9575
- const match = stop.match == null ? void 0 : stop.match(unitRe);
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);
9576
9639
  if (match) {
9577
9640
  return match[1];
9578
9641
  }