uikit 3.15.7-dev.05c3b3f6c → 3.15.7-dev.3ec9925a1
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 +4 -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 +2 -2
- 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 +2 -2
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +2 -2
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +3 -4
- 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 +82 -82
- 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 +84 -85
- package/dist/js/uikit.min.js +2 -2
- package/package.json +1 -1
- package/src/js/api/boot.js +6 -8
- package/src/js/api/component.js +18 -21
- package/src/js/api/instance.js +6 -11
- package/src/js/api/state.js +11 -11
- package/src/js/components/tooltip.js +2 -3
- package/src/js/core/accordion.js +41 -33
- package/src/js/core/icon.js +1 -1
- package/src/js/mixin/class.js +2 -2
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.7-dev.
|
|
1
|
+
/*! UIkit 3.15.7-dev.3ec9925a1 | 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() :
|
|
@@ -2536,7 +2536,7 @@
|
|
|
2536
2536
|
UIkit.prototype._initProps = function (props) {
|
|
2537
2537
|
let key;
|
|
2538
2538
|
|
|
2539
|
-
props = props || getProps$1(this.$options
|
|
2539
|
+
props = props || getProps$1(this.$options);
|
|
2540
2540
|
|
|
2541
2541
|
for (key in props) {
|
|
2542
2542
|
if (!isUndefined(props[key])) {
|
|
@@ -2587,9 +2587,9 @@
|
|
|
2587
2587
|
};
|
|
2588
2588
|
}
|
|
2589
2589
|
|
|
2590
|
-
function getProps$1(opts
|
|
2590
|
+
function getProps$1(opts) {
|
|
2591
2591
|
const data$1 = {};
|
|
2592
|
-
const { args = [], props = {}, el } = opts;
|
|
2592
|
+
const { args = [], props = {}, el, id } = opts;
|
|
2593
2593
|
|
|
2594
2594
|
if (!props) {
|
|
2595
2595
|
return data$1;
|
|
@@ -2612,7 +2612,7 @@
|
|
|
2612
2612
|
data$1[key] = value;
|
|
2613
2613
|
}
|
|
2614
2614
|
|
|
2615
|
-
const options = parseOptions(data(el,
|
|
2615
|
+
const options = parseOptions(data(el, id), args);
|
|
2616
2616
|
|
|
2617
2617
|
for (const key in options) {
|
|
2618
2618
|
const prop = camelize(key);
|
|
@@ -2740,24 +2740,24 @@
|
|
|
2740
2740
|
}
|
|
2741
2741
|
|
|
2742
2742
|
function initPropsObserver(component) {
|
|
2743
|
-
const { $
|
|
2744
|
-
const { attrs, props, el } = $options;
|
|
2743
|
+
const { $options, $props } = component;
|
|
2744
|
+
const { id, attrs, props, el } = $options;
|
|
2745
2745
|
|
|
2746
2746
|
if (!props || attrs === false) {
|
|
2747
2747
|
return;
|
|
2748
2748
|
}
|
|
2749
2749
|
|
|
2750
2750
|
const attributes = isArray(attrs) ? attrs : Object.keys(props);
|
|
2751
|
-
const filter = attributes.map((key) => hyphenate(key)).concat(
|
|
2751
|
+
const filter = attributes.map((key) => hyphenate(key)).concat(id);
|
|
2752
2752
|
|
|
2753
2753
|
const observer = new MutationObserver((records) => {
|
|
2754
|
-
const data = getProps$1($options
|
|
2754
|
+
const data = getProps$1($options);
|
|
2755
2755
|
if (
|
|
2756
2756
|
records.some((_ref3) => {let { attributeName } = _ref3;
|
|
2757
2757
|
const prop = attributeName.replace('data-', '');
|
|
2758
|
-
return (
|
|
2759
|
-
prop
|
|
2760
|
-
|
|
2758
|
+
return (prop === id ? attributes : [camelize(prop), camelize(attributeName)]).some(
|
|
2759
|
+
(prop) => !isUndefined(data[prop]) && data[prop] !== $props[prop]);
|
|
2760
|
+
|
|
2761
2761
|
}))
|
|
2762
2762
|
{
|
|
2763
2763
|
component.$reset();
|
|
@@ -2838,36 +2838,31 @@
|
|
|
2838
2838
|
|
|
2839
2839
|
UIkit.prototype.$getComponent = UIkit.getComponent;
|
|
2840
2840
|
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
$name: {
|
|
2846
|
-
get() {
|
|
2847
|
-
return componentName(this.$options.name);
|
|
2848
|
-
} } });
|
|
2849
|
-
|
|
2841
|
+
Object.defineProperty(
|
|
2842
|
+
UIkit.prototype,
|
|
2843
|
+
'$container',
|
|
2844
|
+
Object.getOwnPropertyDescriptor(UIkit, 'container'));
|
|
2850
2845
|
|
|
2851
2846
|
}
|
|
2852
2847
|
|
|
2848
|
+
const components$3 = {};
|
|
2853
2849
|
function componentAPI (UIkit) {
|
|
2854
|
-
const DATA = UIkit
|
|
2855
|
-
|
|
2856
|
-
const components = {};
|
|
2850
|
+
const { data: DATA, prefix: PREFIX } = UIkit;
|
|
2857
2851
|
|
|
2858
2852
|
UIkit.component = function (name, options) {
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
name = camelize(id);
|
|
2853
|
+
name = hyphenate(name);
|
|
2854
|
+
const id = PREFIX + name;
|
|
2862
2855
|
|
|
2863
2856
|
if (!options) {
|
|
2864
|
-
if (isPlainObject(components[
|
|
2865
|
-
components[
|
|
2857
|
+
if (isPlainObject(components$3[id])) {
|
|
2858
|
+
components$3[id] = components$3["data-" + id] = UIkit.extend(components$3[id]);
|
|
2866
2859
|
}
|
|
2867
2860
|
|
|
2868
|
-
return components[
|
|
2861
|
+
return components$3[id];
|
|
2869
2862
|
}
|
|
2870
2863
|
|
|
2864
|
+
name = camelize(name);
|
|
2865
|
+
|
|
2871
2866
|
UIkit[name] = function (element, data) {
|
|
2872
2867
|
const component = UIkit.component(name);
|
|
2873
2868
|
|
|
@@ -2894,15 +2889,16 @@
|
|
|
2894
2889
|
|
|
2895
2890
|
const opt = isPlainObject(options) ? { ...options } : options.options;
|
|
2896
2891
|
|
|
2892
|
+
opt.id = id;
|
|
2897
2893
|
opt.name = name;
|
|
2898
2894
|
|
|
2899
2895
|
opt.install == null ? void 0 : opt.install(UIkit, opt, name);
|
|
2900
2896
|
|
|
2901
2897
|
if (UIkit._initialized && !opt.functional) {
|
|
2902
|
-
requestAnimationFrame(() => UIkit[name]("[
|
|
2898
|
+
requestAnimationFrame(() => UIkit[name]("[" + id + "],[data-" + id + "]"));
|
|
2903
2899
|
}
|
|
2904
2900
|
|
|
2905
|
-
return components[
|
|
2901
|
+
return components$3[id] = components$3["data-" + id] = isPlainObject(options) ? opt : options;
|
|
2906
2902
|
};
|
|
2907
2903
|
|
|
2908
2904
|
UIkit.getComponents = (element) => (element == null ? void 0 : element[DATA]) || {};
|
|
@@ -2917,10 +2913,7 @@
|
|
|
2917
2913
|
|
|
2918
2914
|
for (const attribute of node.attributes) {
|
|
2919
2915
|
const name = getComponentName(attribute.name);
|
|
2920
|
-
|
|
2921
|
-
if (name && name in components) {
|
|
2922
|
-
UIkit[name](node);
|
|
2923
|
-
}
|
|
2916
|
+
name && UIkit[name](node);
|
|
2924
2917
|
}
|
|
2925
2918
|
};
|
|
2926
2919
|
|
|
@@ -2931,11 +2924,10 @@
|
|
|
2931
2924
|
};
|
|
2932
2925
|
}
|
|
2933
2926
|
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
});
|
|
2927
|
+
function getComponentName(attribute) {
|
|
2928
|
+
const cmp = components$3[attribute];
|
|
2929
|
+
return cmp && (isPlainObject(cmp) ? cmp : cmp.options).name;
|
|
2930
|
+
}
|
|
2939
2931
|
|
|
2940
2932
|
const UIkit = function (options) {
|
|
2941
2933
|
this._init(options);
|
|
@@ -2945,7 +2937,7 @@
|
|
|
2945
2937
|
UIkit.data = '__uikit__';
|
|
2946
2938
|
UIkit.prefix = 'uk-';
|
|
2947
2939
|
UIkit.options = {};
|
|
2948
|
-
UIkit.version = '3.15.7-dev.
|
|
2940
|
+
UIkit.version = '3.15.7-dev.3ec9925a1';
|
|
2949
2941
|
|
|
2950
2942
|
globalAPI(UIkit);
|
|
2951
2943
|
hooksAPI(UIkit);
|
|
@@ -2994,25 +2986,23 @@
|
|
|
2994
2986
|
}
|
|
2995
2987
|
}
|
|
2996
2988
|
|
|
2997
|
-
function applyAttributeMutation(_ref2) {
|
|
2989
|
+
function applyAttributeMutation(_ref2) {let { target, attributeName } = _ref2;
|
|
2998
2990
|
const name = getComponentName(attributeName);
|
|
2999
2991
|
|
|
3000
|
-
if (
|
|
3001
|
-
|
|
3002
|
-
|
|
2992
|
+
if (name) {var _UIkit$getComponent;
|
|
2993
|
+
if (hasAttr(target, attributeName)) {
|
|
2994
|
+
UIkit[name](target);
|
|
2995
|
+
return;
|
|
2996
|
+
}
|
|
3003
2997
|
|
|
3004
|
-
|
|
3005
|
-
UIkit[name](target);
|
|
3006
|
-
return;
|
|
2998
|
+
(_UIkit$getComponent = UIkit.getComponent(target, name)) == null ? void 0 : _UIkit$getComponent.$destroy();
|
|
3007
2999
|
}
|
|
3008
|
-
|
|
3009
|
-
(_UIkit$getComponent = UIkit.getComponent(target, name)) == null ? void 0 : _UIkit$getComponent.$destroy();
|
|
3010
3000
|
}
|
|
3011
3001
|
}
|
|
3012
3002
|
|
|
3013
3003
|
var Class = {
|
|
3014
3004
|
connected() {
|
|
3015
|
-
|
|
3005
|
+
addClass(this.$el, this.$options.id);
|
|
3016
3006
|
} };
|
|
3017
3007
|
|
|
3018
3008
|
var Lazyload = {
|
|
@@ -3362,52 +3352,46 @@
|
|
|
3362
3352
|
return this.targets + " " + this.$props.toggle;
|
|
3363
3353
|
},
|
|
3364
3354
|
|
|
3365
|
-
handler(e) {
|
|
3355
|
+
async handler(e) {var _this$_off;
|
|
3366
3356
|
e.preventDefault();
|
|
3367
|
-
|
|
3357
|
+
|
|
3358
|
+
(_this$_off = this._off) == null ? void 0 : _this$_off.call(this);
|
|
3359
|
+
this._off = keepScrollPosition(e.target);
|
|
3360
|
+
await this.toggle(index(this.toggles, e.current));
|
|
3361
|
+
this._off();
|
|
3368
3362
|
} }],
|
|
3369
3363
|
|
|
3370
3364
|
|
|
3371
3365
|
|
|
3372
3366
|
methods: {
|
|
3373
|
-
toggle(item, animate) {
|
|
3374
|
-
|
|
3367
|
+
async toggle(item, animate) {
|
|
3368
|
+
item = this.items[getIndex(item, this.items)];
|
|
3369
|
+
let items = [item];
|
|
3375
3370
|
const activeItems = filter$1(this.items, "." + this.clsOpen);
|
|
3376
3371
|
|
|
3377
3372
|
if (!this.multiple && !includes(activeItems, items[0])) {
|
|
3378
3373
|
items = items.concat(activeItems);
|
|
3379
3374
|
}
|
|
3380
3375
|
|
|
3381
|
-
if (
|
|
3382
|
-
!this.collapsible &&
|
|
3383
|
-
activeItems.length < 2 &&
|
|
3384
|
-
!filter$1(items, ":not(." + this.clsOpen + ")").length)
|
|
3385
|
-
{
|
|
3376
|
+
if (!this.collapsible && activeItems.length < 2 && includes(activeItems, item)) {
|
|
3386
3377
|
return;
|
|
3387
3378
|
}
|
|
3388
3379
|
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3380
|
+
await Promise.all(
|
|
3381
|
+
items.map((el) =>
|
|
3382
|
+
this.toggleElement(el, !includes(activeItems, el), (el, show) => {
|
|
3383
|
+
toggleClass(el, this.clsOpen, show);
|
|
3384
|
+
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3385
|
+
|
|
3386
|
+
if (animate === false || !this.animation) {
|
|
3387
|
+
hide($(this.content, el), !show);
|
|
3388
|
+
return;
|
|
3389
|
+
}
|
|
3390
|
+
|
|
3391
|
+
return transition(el, show, this);
|
|
3392
|
+
})));
|
|
3393
3393
|
|
|
3394
|
-
if (animate === false || !this.animation) {
|
|
3395
|
-
hide($(this.content, el), !show);
|
|
3396
|
-
return;
|
|
3397
|
-
}
|
|
3398
3394
|
|
|
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);
|
|
3409
|
-
});
|
|
3410
|
-
}
|
|
3411
3395
|
} } };
|
|
3412
3396
|
|
|
3413
3397
|
|
|
@@ -3448,6 +3432,22 @@
|
|
|
3448
3432
|
}
|
|
3449
3433
|
}
|
|
3450
3434
|
|
|
3435
|
+
function keepScrollPosition(el) {
|
|
3436
|
+
const scrollParent = scrollParents(el)[0];
|
|
3437
|
+
let frame;
|
|
3438
|
+
(function scroll() {
|
|
3439
|
+
frame = requestAnimationFrame(() => {
|
|
3440
|
+
const { top } = el.getBoundingClientRect();
|
|
3441
|
+
if (top < 0) {
|
|
3442
|
+
scrollParent.scrollTop += top;
|
|
3443
|
+
}
|
|
3444
|
+
scroll();
|
|
3445
|
+
});
|
|
3446
|
+
})();
|
|
3447
|
+
|
|
3448
|
+
return () => requestAnimationFrame(() => cancelAnimationFrame(frame));
|
|
3449
|
+
}
|
|
3450
|
+
|
|
3451
3451
|
var alert = {
|
|
3452
3452
|
mixins: [Class, Togglable],
|
|
3453
3453
|
|
|
@@ -5427,7 +5427,7 @@
|
|
|
5427
5427
|
|
|
5428
5428
|
|
|
5429
5429
|
beforeConnect() {
|
|
5430
|
-
addClass(this.$el, this.$
|
|
5430
|
+
addClass(this.$el, this.$options.id);
|
|
5431
5431
|
} };
|
|
5432
5432
|
|
|
5433
5433
|
|
|
@@ -11247,14 +11247,13 @@
|
|
|
11247
11247
|
}
|
|
11248
11248
|
|
|
11249
11249
|
this._unbind = once(
|
|
11250
|
-
document, "
|
|
11250
|
+
document, "keydown " +
|
|
11251
11251
|
pointerDown$1,
|
|
11252
11252
|
this.hide,
|
|
11253
11253
|
false,
|
|
11254
11254
|
(e) =>
|
|
11255
11255
|
e.type === pointerDown$1 && !within(e.target, this.$el) ||
|
|
11256
|
-
e.type === 'keydown' && e.keyCode === 27
|
|
11257
|
-
e.type === 'show' && e.detail[0] !== this && e.detail[0].$name === this.$name);
|
|
11256
|
+
e.type === 'keydown' && e.keyCode === 27);
|
|
11258
11257
|
|
|
11259
11258
|
|
|
11260
11259
|
clearTimeout(this.showTimer);
|