@frankenstyle/uikit 0.0.1 → 0.0.3
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/.prettierignore +0 -1
- package/CHANGELOG.md +62 -0
- package/README.md +0 -1
- package/build/publishDev.js +2 -3
- package/build/release.js +12 -7
- package/build/util.js +6 -6
- package/dist/css/uikit-rtl.css +105 -92
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +105 -92
- 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 +35 -30
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +35 -30
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +2 -2
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -7
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -7
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +41 -42
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -7
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +34 -35
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +5 -6
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +2 -2
- 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 +123 -70
- 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 +131 -74
- package/dist/js/uikit.min.js +1 -1
- package/package.json +23 -24
- package/src/images/components/accordion-icon.svg +20 -0
- package/src/js/components/internal/slider-transitioner.js +1 -1
- package/src/js/components/slider.js +6 -7
- package/src/js/components/sortable.js +5 -6
- package/src/js/core/accordion.js +14 -10
- package/src/js/core/drop.js +8 -1
- package/src/js/core/height-viewport.js +12 -1
- package/src/js/core/icon.js +4 -2
- package/src/js/core/index.js +1 -0
- package/src/js/core/modal.js +5 -5
- package/src/js/core/overflow-fade.js +83 -8
- package/src/js/mixin/slider-drag.js +21 -14
- package/src/js/mixin/slider-nav.js +16 -18
- package/src/js/util/attr.js +1 -5
- package/src/less/components/accordion.less +110 -46
- package/src/less/components/card.less +1 -1
- package/src/less/components/form.less +10 -7
- package/src/less/components/lightbox.less +0 -5
- package/src/less/components/nav.less +1 -1
- package/src/less/components/overlay.less +2 -2
- package/src/less/components/utility.less +7 -4
- package/src/less/theme/accordion.less +31 -38
- package/src/scss/components/accordion.scss +77 -30
- package/src/scss/components/form.scss +4 -4
- package/src/scss/components/lightbox.scss +0 -5
- package/src/scss/components/nav.scss +1 -1
- package/src/scss/components/utility.scss +7 -4
- package/src/scss/mixins-theme.scss +39 -23
- package/src/scss/mixins.scss +38 -15
- package/src/scss/variables-theme.scss +20 -18
- package/src/scss/variables.scss +18 -14
- package/tests/accordion.html +76 -17
- package/tests/card.html +87 -1
- package/tests/height-viewport.html +12 -3
- package/tests/index.html +7 -7
- package/tests/navbar.html +1 -1
- package/tests/overlay.html +181 -13
- package/tests/parallax.html +1 -1
- package/tests/position.html +16 -16
- package/tests/sticky.html +2 -2
- package/tests/tab.html +1 -1
- package/tests/thumbnav.html +2 -2
- package/tests/toggle.html +2 -2
- package/tests/transition.html +19 -19
- package/tests/upload.html +2 -2
- package/src/images/backgrounds/accordion-close.svg +0 -4
- package/src/images/backgrounds/accordion-open.svg +0 -3
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit
|
|
1
|
+
/*! UIkit 0.0.3 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -245,9 +245,6 @@
|
|
|
245
245
|
return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
|
|
246
246
|
} else {
|
|
247
247
|
for (const el of toNodes(element)) {
|
|
248
|
-
if (isFunction(value)) {
|
|
249
|
-
value = value.call(el, attr(el, name));
|
|
250
|
-
}
|
|
251
248
|
if (value === null) {
|
|
252
249
|
removeAttr(el, name);
|
|
253
250
|
} else {
|
|
@@ -3313,7 +3310,6 @@
|
|
|
3313
3310
|
};
|
|
3314
3311
|
|
|
3315
3312
|
const pointerOptions = { passive: false, capture: true };
|
|
3316
|
-
const pointerUpOptions = { passive: true, capture: true };
|
|
3317
3313
|
const pointerDown = "touchstart mousedown";
|
|
3318
3314
|
const pointerMove = "touchmove mousemove";
|
|
3319
3315
|
const pointerUp = "touchend touchcancel mouseup click input scroll";
|
|
@@ -3323,14 +3319,18 @@
|
|
|
3323
3319
|
},
|
|
3324
3320
|
data: {
|
|
3325
3321
|
draggable: true,
|
|
3326
|
-
threshold: 10
|
|
3322
|
+
threshold: 10,
|
|
3323
|
+
angleThreshold: 45
|
|
3327
3324
|
},
|
|
3328
3325
|
created() {
|
|
3329
3326
|
for (const key of ["start", "move", "end"]) {
|
|
3330
3327
|
const fn = this[key];
|
|
3331
3328
|
this[key] = (e) => {
|
|
3332
|
-
const pos = getEventPos(e)
|
|
3333
|
-
|
|
3329
|
+
const pos = getEventPos(e);
|
|
3330
|
+
if (isRtl) {
|
|
3331
|
+
pos.x = -pos.x;
|
|
3332
|
+
}
|
|
3333
|
+
this.prevPos = isEqual(pos, this.pos) ? this.prevPos : this.pos;
|
|
3334
3334
|
this.pos = pos;
|
|
3335
3335
|
fn(e);
|
|
3336
3336
|
};
|
|
@@ -3367,7 +3367,7 @@
|
|
|
3367
3367
|
this.drag = this.pos;
|
|
3368
3368
|
if (this._transitioner) {
|
|
3369
3369
|
this.percent = this._transitioner.percent();
|
|
3370
|
-
this.drag += this._transitioner.getDistance() * this.percent * this.dir;
|
|
3370
|
+
this.drag.x += this._transitioner.getDistance() * this.percent * this.dir;
|
|
3371
3371
|
this._transitioner.cancel();
|
|
3372
3372
|
this._transitioner.translate(this.percent);
|
|
3373
3373
|
this.dragging = true;
|
|
@@ -3376,12 +3376,12 @@
|
|
|
3376
3376
|
this.prevIndex = this.index;
|
|
3377
3377
|
}
|
|
3378
3378
|
on(document, pointerMove, this.move, pointerOptions);
|
|
3379
|
-
on(document, pointerUp, this.end,
|
|
3379
|
+
on(document, pointerUp, this.end, { passive: true, capture: true, once: true });
|
|
3380
3380
|
css(this.list, "userSelect", "none");
|
|
3381
3381
|
},
|
|
3382
3382
|
move(e) {
|
|
3383
|
-
const distance = this.pos - this.drag;
|
|
3384
|
-
if (distance === 0 || this.prevPos === this.pos || !this.dragging && Math.abs(distance) < this.threshold) {
|
|
3383
|
+
const distance = this.pos.x - this.drag.x;
|
|
3384
|
+
if (distance === 0 || !this.dragging && getAngle(this.pos, this.drag) > this.angleThreshold || this.prevPos.x === this.pos.x || !this.dragging && Math.abs(distance) < this.threshold) {
|
|
3385
3385
|
return;
|
|
3386
3386
|
}
|
|
3387
3387
|
e.cancelable && e.preventDefault();
|
|
@@ -3392,7 +3392,7 @@
|
|
|
3392
3392
|
let nextIndex = this.getIndex(prevIndex + this.dir);
|
|
3393
3393
|
let width = getDistance.call(this, prevIndex, nextIndex);
|
|
3394
3394
|
while (nextIndex !== prevIndex && dis > width) {
|
|
3395
|
-
this.drag -= width * this.dir;
|
|
3395
|
+
this.drag.x -= width * this.dir;
|
|
3396
3396
|
prevIndex = nextIndex;
|
|
3397
3397
|
dis -= width;
|
|
3398
3398
|
nextIndex = this.getIndex(prevIndex + this.dir);
|
|
@@ -3430,7 +3430,6 @@
|
|
|
3430
3430
|
},
|
|
3431
3431
|
end() {
|
|
3432
3432
|
off(document, pointerMove, this.move, pointerOptions);
|
|
3433
|
-
off(document, pointerUp, this.end, pointerUpOptions);
|
|
3434
3433
|
if (this.dragging) {
|
|
3435
3434
|
setTimeout(on(this.list, "click", (e) => e.preventDefault(), pointerOptions));
|
|
3436
3435
|
this.dragging = null;
|
|
@@ -3440,12 +3439,13 @@
|
|
|
3440
3439
|
this._show(false, this.index, true);
|
|
3441
3440
|
this._transitioner = null;
|
|
3442
3441
|
} else {
|
|
3443
|
-
const dirChange =
|
|
3444
|
-
this.index = dirChange ? this.index : this.prevIndex;
|
|
3442
|
+
const dirChange = this.dir < 0 === this.prevPos.x > this.pos.x;
|
|
3445
3443
|
if (dirChange) {
|
|
3446
3444
|
trigger(this.slides[this.prevIndex], "itemhidden", [this]);
|
|
3447
3445
|
trigger(this.slides[this.index], "itemshown", [this]);
|
|
3448
3446
|
this.percent = 1 - this.percent;
|
|
3447
|
+
} else {
|
|
3448
|
+
this.index = this.prevIndex;
|
|
3449
3449
|
}
|
|
3450
3450
|
this.show(
|
|
3451
3451
|
this.dir > 0 && !dirChange || this.dir < 0 && dirChange ? "next" : "previous",
|
|
@@ -3464,6 +3464,9 @@
|
|
|
3464
3464
|
function hasSelectableText(el) {
|
|
3465
3465
|
return css(el, "userSelect") !== "none" && toArray(el.childNodes).some((el2) => el2.nodeType === 3 && el2.textContent.trim());
|
|
3466
3466
|
}
|
|
3467
|
+
function getAngle(pos1, pos2) {
|
|
3468
|
+
return Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180 / Math.PI;
|
|
3469
|
+
}
|
|
3467
3470
|
|
|
3468
3471
|
function initWatches(instance) {
|
|
3469
3472
|
instance._watches = [];
|
|
@@ -3786,7 +3789,7 @@
|
|
|
3786
3789
|
};
|
|
3787
3790
|
App.util = util;
|
|
3788
3791
|
App.options = {};
|
|
3789
|
-
App.version = "
|
|
3792
|
+
App.version = "0.0.3";
|
|
3790
3793
|
|
|
3791
3794
|
const PREFIX = "uk-";
|
|
3792
3795
|
const DATA = "__uikit__";
|
|
@@ -3952,17 +3955,16 @@
|
|
|
3952
3955
|
next: "Next slide",
|
|
3953
3956
|
previous: "Previous slide",
|
|
3954
3957
|
slideX: "Slide %s",
|
|
3955
|
-
slideLabel: "%s of %s"
|
|
3956
|
-
role: "String"
|
|
3958
|
+
slideLabel: "%s of %s"
|
|
3957
3959
|
},
|
|
3958
3960
|
data: {
|
|
3959
3961
|
selNav: false,
|
|
3960
3962
|
role: "region"
|
|
3961
3963
|
},
|
|
3962
3964
|
computed: {
|
|
3963
|
-
nav: ({ selNav }, $el) =>
|
|
3965
|
+
nav: ({ selNav }, $el) => $$(selNav, $el),
|
|
3964
3966
|
navChildren() {
|
|
3965
|
-
return
|
|
3967
|
+
return this.nav.map((nav) => children(nav)).flat();
|
|
3966
3968
|
},
|
|
3967
3969
|
selNavItem: ({ attrItem }) => `[${attrItem}],[data-${attrItem}]`,
|
|
3968
3970
|
navItems(_, $el) {
|
|
@@ -4020,9 +4022,9 @@
|
|
|
4020
4022
|
slides(slides) {
|
|
4021
4023
|
slides.forEach(
|
|
4022
4024
|
(slide, i) => attr(slide, {
|
|
4023
|
-
role: this.nav ? "tabpanel" : "group",
|
|
4025
|
+
role: this.nav.length ? "tabpanel" : "group",
|
|
4024
4026
|
"aria-label": this.t("slideLabel", i + 1, this.length),
|
|
4025
|
-
"aria-roledescription": this.nav ? null : "slide"
|
|
4027
|
+
"aria-roledescription": this.nav.length ? null : "slide"
|
|
4026
4028
|
})
|
|
4027
4029
|
);
|
|
4028
4030
|
this.padNavitems();
|
|
@@ -4103,16 +4105,16 @@
|
|
|
4103
4105
|
}
|
|
4104
4106
|
},
|
|
4105
4107
|
padNavitems() {
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4108
|
+
for (const nav of this.nav) {
|
|
4109
|
+
const navChildren = children(nav);
|
|
4110
|
+
const navItems = [];
|
|
4111
|
+
for (let i = 0; i < this.length; i++) {
|
|
4112
|
+
const attr2 = `${this.attrItem}="${i}"`;
|
|
4113
|
+
navItems[i] = navChildren.findLast((el) => el.matches(`[${attr2}]`)) || $(`<li ${attr2}><a href></a></li>`);
|
|
4114
|
+
}
|
|
4115
|
+
if (!isEqual(navItems, navChildren)) {
|
|
4116
|
+
html(this.nav, navItems);
|
|
4117
|
+
}
|
|
4116
4118
|
}
|
|
4117
4119
|
}
|
|
4118
4120
|
}
|
|
@@ -4462,7 +4464,7 @@
|
|
|
4462
4464
|
pauseOnHover: false,
|
|
4463
4465
|
velocity: 2,
|
|
4464
4466
|
Animations,
|
|
4465
|
-
template: `<div class="uk-lightbox uk-overflow-hidden">
|
|
4467
|
+
template: `<div class="uk-lightbox uk-overflow-hidden"> <div class="uk-lightbox-items"></div> <div class="uk-position-top-right uk-position-small uk-transition-fade" uk-inverse> <button class="uk-lightbox-close uk-close-large" type="button" uk-close></button> </div> <div class="uk-lightbox-slidenav uk-position-center-left uk-position-medium uk-transition-fade" uk-inverse> <a href uk-slidenav-previous uk-lightbox-item="previous"></a> </div> <div class="uk-lightbox-slidenav uk-position-center-right uk-position-medium uk-transition-fade" uk-inverse> <a href uk-slidenav-next uk-lightbox-item="next"></a> </div> <div class="uk-position-center-right uk-position-medium uk-transition-fade" uk-inverse style="max-height: 90vh; overflow: auto;"> <ul class="uk-lightbox-thumbnav uk-lightbox-thumbnav-vertical uk-thumbnav uk-thumbnav-vertical"></ul> <ul class="uk-lightbox-dotnav uk-dotnav uk-dotnav-vertical"></ul> </div> <div class="uk-lightbox-counter uk-text-large uk-position-top-left uk-position-small uk-transition-fade" uk-inverse></div> <div class="uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>`
|
|
4466
4468
|
}),
|
|
4467
4469
|
created() {
|
|
4468
4470
|
let $el = $(this.template);
|
|
@@ -4878,7 +4880,7 @@
|
|
|
4878
4880
|
this.$mount(
|
|
4879
4881
|
append(
|
|
4880
4882
|
container,
|
|
4881
|
-
`<div class="${this.clsMsg}${this.status ? ` ${this.clsMsg}-${this.status}` : ""}" role="alert">
|
|
4883
|
+
`<div class="${this.clsMsg}${this.status ? ` ${this.clsMsg}-${this.status}` : ""}" role="alert"> <a href class="${this.clsClose}" data-uk-close></a> <div>${this.message}</div> </div>`
|
|
4882
4884
|
)
|
|
4883
4885
|
);
|
|
4884
4886
|
},
|
|
@@ -5603,7 +5605,7 @@
|
|
|
5603
5605
|
return sumBy(children(list).slice(0, index), (el) => dimensions$1(el).width);
|
|
5604
5606
|
}
|
|
5605
5607
|
function centerEl(el, list) {
|
|
5606
|
-
return dimensions$1(list).width
|
|
5608
|
+
return (dimensions$1(list).width - dimensions$1(el).width) / 2;
|
|
5607
5609
|
}
|
|
5608
5610
|
function getElLeft(el, list) {
|
|
5609
5611
|
return el && (position(el).left + (isRtl ? dimensions$1(el).width - dimensions$1(list).width : 0)) * (isRtl ? -1 : 1) || 0;
|
|
@@ -5672,7 +5674,7 @@
|
|
|
5672
5674
|
if (this.center) {
|
|
5673
5675
|
if (left < width / 2 && left + slideWidth + dimensions$1(this.slides[getIndex(i + 1, this.slides)]).width / 2 > width / 2) {
|
|
5674
5676
|
sets.push(i);
|
|
5675
|
-
left = width
|
|
5677
|
+
left = (width - slideWidth) / 2;
|
|
5676
5678
|
}
|
|
5677
5679
|
} else if (left === 0) {
|
|
5678
5680
|
sets.push(Math.min(i, this.maxIndex));
|
|
@@ -5763,7 +5765,7 @@
|
|
|
5763
5765
|
return;
|
|
5764
5766
|
}
|
|
5765
5767
|
const next = this.slides[index];
|
|
5766
|
-
let width = dimensions$1(this.list).width
|
|
5768
|
+
let width = (dimensions$1(this.list).width - dimensions$1(next).width) / 2;
|
|
5767
5769
|
let j = 0;
|
|
5768
5770
|
while (width > 0) {
|
|
5769
5771
|
const slideIndex = this.getIndex(--j + index, index);
|
|
@@ -5813,7 +5815,7 @@
|
|
|
5813
5815
|
const left = -width;
|
|
5814
5816
|
const right = width * 2;
|
|
5815
5817
|
const slideWidth = dimensions$1(this.slides[this.index]).width;
|
|
5816
|
-
const slideLeft = this.center ? width
|
|
5818
|
+
const slideLeft = this.center ? (width - slideWidth) / 2 : 0;
|
|
5817
5819
|
const slides = /* @__PURE__ */ new Set();
|
|
5818
5820
|
for (const i of [-1, 1]) {
|
|
5819
5821
|
let currentLeft = slideLeft + (i > 0 ? slideWidth : 0);
|
|
@@ -5828,12 +5830,12 @@
|
|
|
5828
5830
|
},
|
|
5829
5831
|
getIndexAt(percent) {
|
|
5830
5832
|
let index = -1;
|
|
5831
|
-
const scrollDist = this.center ? getWidth(this.list) - (dimensions$1(this.slides[0]).width
|
|
5833
|
+
const scrollDist = this.center ? getWidth(this.list) - (dimensions$1(this.slides[0]).width + dimensions$1(last(this.slides)).width) / 2 : getWidth(this.list, this.maxIndex);
|
|
5832
5834
|
let dist = percent * scrollDist;
|
|
5833
5835
|
let slidePercent = 0;
|
|
5834
5836
|
do {
|
|
5835
5837
|
const slideWidth = dimensions$1(this.slides[++index]).width;
|
|
5836
|
-
const slideDist = this.center ? slideWidth
|
|
5838
|
+
const slideDist = this.center ? (slideWidth + dimensions$1(this.slides[index + 1]).width) / 2 : slideWidth;
|
|
5837
5839
|
slidePercent = dist / slideDist % 1;
|
|
5838
5840
|
dist -= slideDist;
|
|
5839
5841
|
} while (dist >= 0 && index < this.maxIndex);
|
|
@@ -5869,7 +5871,7 @@
|
|
|
5869
5871
|
}
|
|
5870
5872
|
diff = Math.max(
|
|
5871
5873
|
diff,
|
|
5872
|
-
slideWidth
|
|
5874
|
+
(slideWidth + dimensions$1(slides[getIndex(+index + i, slides)]).width) / 2 - (left - listHalf)
|
|
5873
5875
|
);
|
|
5874
5876
|
}
|
|
5875
5877
|
if (Math.trunc(diff) > sumBy(
|
|
@@ -6067,8 +6069,7 @@
|
|
|
6067
6069
|
sortable.target,
|
|
6068
6070
|
target,
|
|
6069
6071
|
placeholder,
|
|
6070
|
-
x,
|
|
6071
|
-
y,
|
|
6072
|
+
{ x, y },
|
|
6072
6073
|
sortable === previous && data.moved !== target
|
|
6073
6074
|
);
|
|
6074
6075
|
if (insertTarget === false) {
|
|
@@ -6228,14 +6229,14 @@
|
|
|
6228
6229
|
function findTarget(items, point) {
|
|
6229
6230
|
return items[findIndex(items, (item) => pointInRect(point, dimensions$1(item)))];
|
|
6230
6231
|
}
|
|
6231
|
-
function findInsertTarget(list, target, placeholder,
|
|
6232
|
+
function findInsertTarget(list, target, placeholder, point, sameList) {
|
|
6232
6233
|
if (!children(list).length) {
|
|
6233
6234
|
return;
|
|
6234
6235
|
}
|
|
6235
6236
|
const rect = dimensions$1(target);
|
|
6236
6237
|
if (!sameList) {
|
|
6237
6238
|
if (!isHorizontal(list, placeholder)) {
|
|
6238
|
-
return y < rect.top + rect.height / 2 ? target : target.nextElementSibling;
|
|
6239
|
+
return point.y < rect.top + rect.height / 2 ? target : target.nextElementSibling;
|
|
6239
6240
|
}
|
|
6240
6241
|
return target;
|
|
6241
6242
|
}
|
|
@@ -6244,7 +6245,7 @@
|
|
|
6244
6245
|
[rect.top, rect.bottom],
|
|
6245
6246
|
[placeholderRect.top, placeholderRect.bottom]
|
|
6246
6247
|
);
|
|
6247
|
-
const [pointerPos, lengthProp, startProp, endProp] = sameRow ? [x, "width", "left", "right"] : [y, "height", "top", "bottom"];
|
|
6248
|
+
const [pointerPos, lengthProp, startProp, endProp] = sameRow ? [point.x, "width", "left", "right"] : [point.y, "height", "top", "bottom"];
|
|
6248
6249
|
const diff = placeholderRect[lengthProp] < rect[lengthProp] ? rect[lengthProp] - placeholderRect[lengthProp] : 0;
|
|
6249
6250
|
if (placeholderRect[startProp] < rect[startProp]) {
|
|
6250
6251
|
if (diff && pointerPos < rect[startProp] + diff) {
|
|
@@ -6339,7 +6340,7 @@
|
|
|
6339
6340
|
async _show(title, id) {
|
|
6340
6341
|
this.tooltip = append(
|
|
6341
6342
|
this.container,
|
|
6342
|
-
`<div id="${id}" class="uk-${this.$options.name}" role="tooltip">
|
|
6343
|
+
`<div id="${id}" class="uk-${this.$options.name}" role="tooltip"> <div class="uk-${this.$options.name}-inner">${title}</div> </div>`
|
|
6343
6344
|
);
|
|
6344
6345
|
on(this.tooltip, "toggled", (e, toggled) => {
|
|
6345
6346
|
if (!toggled) {
|
|
@@ -6723,8 +6724,8 @@
|
|
|
6723
6724
|
collapsible: true,
|
|
6724
6725
|
multiple: false,
|
|
6725
6726
|
clsOpen: "uk-open",
|
|
6726
|
-
toggle: "
|
|
6727
|
-
content: "
|
|
6727
|
+
toggle: ".uk-accordion-title",
|
|
6728
|
+
content: ".uk-accordion-content",
|
|
6728
6729
|
offset: 0
|
|
6729
6730
|
},
|
|
6730
6731
|
computed: {
|
|
@@ -6768,20 +6769,21 @@
|
|
|
6768
6769
|
{
|
|
6769
6770
|
name: "click keydown",
|
|
6770
6771
|
delegate: ({ targets, $props }) => `${targets} ${$props.toggle}`,
|
|
6771
|
-
|
|
6772
|
-
var _a;
|
|
6772
|
+
handler(e) {
|
|
6773
6773
|
if (e.type === "keydown" && e.keyCode !== keyMap.SPACE) {
|
|
6774
6774
|
return;
|
|
6775
6775
|
}
|
|
6776
|
+
const item = index(this.toggles, e.current);
|
|
6777
|
+
if (item === -1) {
|
|
6778
|
+
return;
|
|
6779
|
+
}
|
|
6776
6780
|
maybeDefaultPreventClick(e);
|
|
6777
|
-
|
|
6778
|
-
this.
|
|
6779
|
-
await this.toggle(index(this.toggles, e.current));
|
|
6780
|
-
this._off();
|
|
6781
|
+
const off = keepScrollPosition(e.target);
|
|
6782
|
+
this.toggle(item).finally(off);
|
|
6781
6783
|
}
|
|
6782
6784
|
},
|
|
6783
6785
|
{
|
|
6784
|
-
name: "shown hidden",
|
|
6786
|
+
name: "show hide shown hidden",
|
|
6785
6787
|
self: true,
|
|
6786
6788
|
delegate: ({ targets }) => targets,
|
|
6787
6789
|
handler() {
|
|
@@ -6821,7 +6823,7 @@
|
|
|
6821
6823
|
items = items.concat(activeItems);
|
|
6822
6824
|
}
|
|
6823
6825
|
if (!this.collapsible && activeItems.length < 2 && includes(activeItems, item)) {
|
|
6824
|
-
|
|
6826
|
+
items = [];
|
|
6825
6827
|
}
|
|
6826
6828
|
return Promise.all(
|
|
6827
6829
|
items.map(
|
|
@@ -6854,7 +6856,7 @@
|
|
|
6854
6856
|
hide(content, false);
|
|
6855
6857
|
const endHeight = sumBy(["marginTop", "marginBottom"], (prop) => css(content, prop)) + dimensions$1(content).height;
|
|
6856
6858
|
const percent = currentHeight / endHeight;
|
|
6857
|
-
duration = (velocity * endHeight + duration) * (show ? 1 - percent : percent);
|
|
6859
|
+
duration = endHeight ? (velocity * endHeight + duration) * (show ? 1 - percent : percent) : 0;
|
|
6858
6860
|
css(wrapper, "height", currentHeight);
|
|
6859
6861
|
await Transition.start(wrapper, { height: show ? endHeight : 0 }, duration, transition2);
|
|
6860
6862
|
unwrap(content);
|
|
@@ -7296,13 +7298,17 @@
|
|
|
7296
7298
|
if (this.container && parent(this.$el) !== this.container) {
|
|
7297
7299
|
append(this.container, this.$el);
|
|
7298
7300
|
}
|
|
7301
|
+
addClass(this.$el, this.clsEnter);
|
|
7299
7302
|
this.showTimer = setTimeout(
|
|
7300
7303
|
() => this.toggleElement(this.$el, true),
|
|
7301
7304
|
delay && this.delayShow || 0
|
|
7302
7305
|
);
|
|
7303
7306
|
},
|
|
7304
7307
|
hide(delay = true, animate = true) {
|
|
7305
|
-
const hide = () =>
|
|
7308
|
+
const hide = () => {
|
|
7309
|
+
removeClass(this.$el, this.clsEnter);
|
|
7310
|
+
this.toggleElement(this.$el, false, this.animateOut && animate);
|
|
7311
|
+
};
|
|
7306
7312
|
this.clearTimers();
|
|
7307
7313
|
this.isDelayedHide = delay;
|
|
7308
7314
|
if (delay && this.isDelaying()) {
|
|
@@ -8048,6 +8054,7 @@
|
|
|
8048
8054
|
};
|
|
8049
8055
|
|
|
8050
8056
|
var heightViewport = {
|
|
8057
|
+
mixins: [Media],
|
|
8051
8058
|
props: {
|
|
8052
8059
|
expand: Boolean,
|
|
8053
8060
|
offsetTop: Boolean,
|
|
@@ -8072,6 +8079,9 @@
|
|
|
8072
8079
|
if (!isVisible(this.$el)) {
|
|
8073
8080
|
return false;
|
|
8074
8081
|
}
|
|
8082
|
+
if (!this.matchMedia) {
|
|
8083
|
+
return { minHeight: false };
|
|
8084
|
+
}
|
|
8075
8085
|
let minHeight = "";
|
|
8076
8086
|
const box = boxModelAdjust(this.$el, "height", "content-box");
|
|
8077
8087
|
const { body, scrollingElement } = document;
|
|
@@ -8108,12 +8118,18 @@
|
|
|
8108
8118
|
return { minHeight };
|
|
8109
8119
|
},
|
|
8110
8120
|
write({ minHeight }) {
|
|
8111
|
-
css(
|
|
8121
|
+
css(
|
|
8122
|
+
this.$el,
|
|
8123
|
+
this.property,
|
|
8124
|
+
minHeight === false ? "" : `max(${this.min || 0}px, ${minHeight})`
|
|
8125
|
+
);
|
|
8112
8126
|
},
|
|
8113
8127
|
events: ["resize"]
|
|
8114
8128
|
}
|
|
8115
8129
|
};
|
|
8116
8130
|
|
|
8131
|
+
var accordionIcon = "<svg width=\"13\" height=\"13\"><style>.uk-accordion-icon svg>[class*="line-"]{transition:0.2s ease-out;transition-property:transform, opacity;transform-origin:center}[aria-expanded="true"] .uk-accordion-icon svg>.line-1{transform:rotate(-45deg);opacity:0}[aria-expanded="true"] .uk-accordion-icon svg>.line-2{transform:rotate(90deg)}</style><rect width=\"13\" height=\"1\" fill=\"#000\" x=\"0\" y=\"6\" class=\"line-1\"/><rect width=\"1\" height=\"13\" fill=\"#000\" x=\"6\" y=\"0\" class=\"line-2\"/></svg>";
|
|
8132
|
+
|
|
8117
8133
|
var closeIcon = "<svg width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" class=\"lucide lucide-x\" viewBox=\"0 0 24 24\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>";
|
|
8118
8134
|
|
|
8119
8135
|
var closeLarge = "<svg width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" class=\"lucide lucide-x\" viewBox=\"0 0 24 24\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>";
|
|
@@ -8150,8 +8166,6 @@
|
|
|
8150
8166
|
|
|
8151
8167
|
var slidenavPrevious = "<svg width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" class=\"lucide lucide-arrow-left\" viewBox=\"0 0 24 24\"><path d=\"m12 19-7-7 7-7\"/><path d=\"M19 12H5\"/></svg>";
|
|
8152
8168
|
|
|
8153
|
-
var spinner = "<svg width=\"30\" height=\"30\"><circle fill=\"none\" stroke=\"#000\" cx=\"15\" cy=\"15\" r=\"14\"/></svg>";
|
|
8154
|
-
|
|
8155
8169
|
var totop = "<svg width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" class=\"lucide lucide-circle-chevron-up\" viewBox=\"0 0 24 24\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m8 14 4-4 4 4\"/></svg>";
|
|
8156
8170
|
|
|
8157
8171
|
var Svg = {
|
|
@@ -8236,9 +8250,10 @@
|
|
|
8236
8250
|
});
|
|
8237
8251
|
|
|
8238
8252
|
const icons = {
|
|
8239
|
-
spinner,
|
|
8253
|
+
spinner: '<svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#000" cx="15" cy="15" r="14" /></svg>',
|
|
8240
8254
|
totop,
|
|
8241
8255
|
marker,
|
|
8256
|
+
"accordion-icon": accordionIcon,
|
|
8242
8257
|
"close-icon": closeIcon,
|
|
8243
8258
|
"close-large": closeLarge,
|
|
8244
8259
|
"drop-parent-icon": dropParentIcon,
|
|
@@ -8652,20 +8667,20 @@
|
|
|
8652
8667
|
};
|
|
8653
8668
|
modal.alert = function(message, options) {
|
|
8654
8669
|
return openDialog(
|
|
8655
|
-
({ i18n }) => `<div class="uk-modal-body">${isString(message) ? message : html(message)}</div>
|
|
8670
|
+
({ i18n }) => `<div class="uk-modal-body">${isString(message) ? message : html(message)}</div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-primary uk-modal-close" type="button" autofocus>${i18n.ok}</button> </div>`,
|
|
8656
8671
|
options
|
|
8657
8672
|
);
|
|
8658
8673
|
};
|
|
8659
8674
|
modal.confirm = function(message, options) {
|
|
8660
8675
|
return openDialog(
|
|
8661
|
-
({ i18n }) => `<form>
|
|
8676
|
+
({ i18n }) => `<form> <div class="uk-modal-body">${isString(message) ? message : html(message)}</div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-default uk-modal-close" type="button">${i18n.cancel}</button> <button class="uk-button uk-button-primary" autofocus>${i18n.ok}</button> </div> </form>`,
|
|
8662
8677
|
options,
|
|
8663
8678
|
() => Promise.reject()
|
|
8664
8679
|
);
|
|
8665
8680
|
};
|
|
8666
8681
|
modal.prompt = function(message, value, options) {
|
|
8667
8682
|
const promise = openDialog(
|
|
8668
|
-
({ i18n }) => `<form class="uk-form-stacked">
|
|
8683
|
+
({ i18n }) => `<form class="uk-form-stacked"> <div class="uk-modal-body"> <label>${isString(message) ? message : html(message)}</label> <input class="uk-input" autofocus> </div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-default uk-modal-close" type="button">${i18n.cancel}</button> <button class="uk-button uk-button-primary">${i18n.ok}</button> </div> </form>`,
|
|
8669
8684
|
options,
|
|
8670
8685
|
() => null,
|
|
8671
8686
|
() => input.value
|
|
@@ -8943,16 +8958,23 @@
|
|
|
8943
8958
|
|
|
8944
8959
|
var overflowFade = {
|
|
8945
8960
|
data: {
|
|
8961
|
+
threshold: 5,
|
|
8946
8962
|
fadeDuration: 0.05
|
|
8947
8963
|
},
|
|
8948
|
-
events:
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8964
|
+
events: [
|
|
8965
|
+
{
|
|
8966
|
+
name: "scroll",
|
|
8967
|
+
self: true,
|
|
8968
|
+
passive: true,
|
|
8969
|
+
handler() {
|
|
8970
|
+
this.$emit();
|
|
8971
|
+
}
|
|
8972
|
+
},
|
|
8973
|
+
{
|
|
8974
|
+
name: pointerDown$1,
|
|
8975
|
+
handler: handleMouseDrag
|
|
8954
8976
|
}
|
|
8955
|
-
|
|
8977
|
+
],
|
|
8956
8978
|
observe: [
|
|
8957
8979
|
mutation({
|
|
8958
8980
|
options: {
|
|
@@ -8993,6 +9015,40 @@
|
|
|
8993
9015
|
events: ["resize"]
|
|
8994
9016
|
}
|
|
8995
9017
|
};
|
|
9018
|
+
function handleMouseDrag(e) {
|
|
9019
|
+
const { target, button, defaultPrevented } = e;
|
|
9020
|
+
if (defaultPrevented || button > 0 || isTouch(e) || target.closest(selInput) || isInput(target)) {
|
|
9021
|
+
return;
|
|
9022
|
+
}
|
|
9023
|
+
e.preventDefault();
|
|
9024
|
+
const pointerOptions = { passive: false, capture: true };
|
|
9025
|
+
const { $el: el, threshold, $options } = this;
|
|
9026
|
+
let started;
|
|
9027
|
+
const off = on(document, pointerMove$1, move(e), pointerOptions);
|
|
9028
|
+
on(document, [pointerUp$1, pointerCancel], end, { capture: true, once: true });
|
|
9029
|
+
function move(e2) {
|
|
9030
|
+
let origin = getEventPos(e2);
|
|
9031
|
+
let pos = origin;
|
|
9032
|
+
let lastPos = pos;
|
|
9033
|
+
return function(e3) {
|
|
9034
|
+
lastPos = pos;
|
|
9035
|
+
pos = getEventPos(e3);
|
|
9036
|
+
const isVertical = hasClass(el, `${$options.id}-vertical`);
|
|
9037
|
+
const prop = isVertical ? "y" : "x";
|
|
9038
|
+
started || (started = Math.abs(pos[prop] - origin[prop]) > threshold);
|
|
9039
|
+
if (started) {
|
|
9040
|
+
const delta = lastPos[prop] - pos[prop];
|
|
9041
|
+
el[isVertical ? "scrollTop" : "scrollLeft"] += delta;
|
|
9042
|
+
}
|
|
9043
|
+
};
|
|
9044
|
+
}
|
|
9045
|
+
function end() {
|
|
9046
|
+
off();
|
|
9047
|
+
if (started) {
|
|
9048
|
+
setTimeout(on(el, "click", (e2) => e2.preventDefault(), pointerOptions));
|
|
9049
|
+
}
|
|
9050
|
+
}
|
|
9051
|
+
}
|
|
8996
9052
|
|
|
8997
9053
|
var responsive = {
|
|
8998
9054
|
props: ["width", "height"],
|
|
@@ -10020,6 +10076,7 @@
|
|
|
10020
10076
|
var components = /*#__PURE__*/Object.freeze({
|
|
10021
10077
|
__proto__: null,
|
|
10022
10078
|
Accordion: Accordion,
|
|
10079
|
+
AccordionIcon: IconComponent,
|
|
10023
10080
|
Alert: alert,
|
|
10024
10081
|
Close: Close,
|
|
10025
10082
|
Cover: cover,
|