uikit 3.14.3 → 3.14.4-dev.008162cc3
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 +28 -0
- package/dist/css/uikit-core-rtl.css +111 -35
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +111 -35
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +114 -50
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +114 -50
- 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 +210 -32
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +210 -32
- 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 +22 -7
- 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 +22 -7
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +3 -3
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +142 -34
- 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 +818 -636
- 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 +1632 -1435
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/sortable.js +2 -3
- package/src/js/core/accordion.js +3 -3
- package/src/js/core/alert.js +1 -1
- package/src/js/core/drop.js +47 -20
- package/src/js/core/height-viewport.js +18 -9
- package/src/js/core/navbar.js +11 -9
- package/src/js/core/offcanvas.js +1 -47
- package/src/js/core/sticky.js +8 -9
- package/src/js/core/switcher.js +1 -1
- package/src/js/mixin/modal.js +90 -4
- package/src/js/mixin/position.js +52 -13
- package/src/js/mixin/slider-drag.js +20 -8
- package/src/js/mixin/togglable.js +105 -24
- package/src/js/util/animation.js +1 -0
- package/src/js/util/dimensions.js +6 -6
- package/src/js/util/position.js +2 -0
- package/src/js/util/viewport.js +23 -37
- package/src/less/components/drop.less +19 -5
- package/src/less/components/dropdown.less +21 -5
- package/src/less/components/margin.less +13 -14
- package/src/less/components/modal.less +19 -4
- package/src/less/components/nav.less +23 -5
- package/src/less/components/navbar.less +56 -26
- package/src/less/components/offcanvas.less +21 -21
- package/src/less/components/position.less +1 -1
- package/src/less/components/utility.less +12 -4
- package/src/less/theme/dropdown.less +11 -0
- package/src/less/theme/nav.less +3 -7
- package/src/less/theme/navbar.less +12 -12
- package/src/scss/components/drop.scss +19 -5
- package/src/scss/components/dropdown.scss +21 -5
- package/src/scss/components/margin.scss +13 -14
- package/src/scss/components/modal.scss +19 -4
- package/src/scss/components/nav.scss +23 -5
- package/src/scss/components/navbar.scss +45 -15
- package/src/scss/components/offcanvas.scss +21 -21
- package/src/scss/components/position.scss +1 -1
- package/src/scss/components/utility.scss +12 -4
- package/src/scss/mixins-theme.scss +9 -13
- package/src/scss/mixins.scss +2 -0
- package/src/scss/theme/dropdown.scss +8 -0
- package/src/scss/theme/nav.scss +3 -7
- package/src/scss/theme/navbar.scss +9 -0
- package/src/scss/variables-theme.scss +35 -14
- package/src/scss/variables.scss +33 -13
- package/tests/drop.html +151 -2
- package/tests/dropdown.html +228 -13
- package/tests/height-viewport.html +62 -0
- package/tests/navbar.html +2166 -1085
- package/tests/offcanvas.html +8 -8
- package/tests/sticky-navbar.html +132 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.
|
|
1
|
+
/*! UIkit 3.14.4-dev.008162cc3 | 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(require('uikit-util')) :
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
initProps: {
|
|
44
44
|
overflow: '',
|
|
45
|
-
|
|
45
|
+
maxHeight: '',
|
|
46
46
|
paddingTop: '',
|
|
47
47
|
paddingBottom: '',
|
|
48
48
|
marginTop: '',
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
hideProps: {
|
|
54
54
|
overflow: 'hidden',
|
|
55
|
-
|
|
55
|
+
maxHeight: 0,
|
|
56
56
|
paddingTop: 0,
|
|
57
57
|
paddingBottom: 0,
|
|
58
58
|
marginTop: 0,
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
|
|
69
69
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
70
|
-
return
|
|
70
|
+
return uikitUtil.startsWith(animation[0], 'slide');
|
|
71
71
|
} },
|
|
72
72
|
|
|
73
73
|
|
|
@@ -82,18 +82,13 @@
|
|
|
82
82
|
return Promise.reject();
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
if (!animate) {
|
|
86
|
-
uikitUtil.Animation.cancel(el);
|
|
87
|
-
uikitUtil.Transition.cancel(el);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
85
|
const promise = (
|
|
91
86
|
uikitUtil.isFunction(animate) ?
|
|
92
87
|
animate :
|
|
93
88
|
animate === false || !this.hasAnimation ?
|
|
94
|
-
this
|
|
89
|
+
toggleInstant(this) :
|
|
95
90
|
this.hasTransition ?
|
|
96
|
-
|
|
91
|
+
toggleTransition(this) :
|
|
97
92
|
toggleAnimation(this))(
|
|
98
93
|
el, show);
|
|
99
94
|
|
|
@@ -157,7 +152,25 @@
|
|
|
157
152
|
|
|
158
153
|
|
|
159
154
|
|
|
160
|
-
function
|
|
155
|
+
function toggleInstant(_ref3) {let { _toggle } = _ref3;
|
|
156
|
+
return (el, show) => {
|
|
157
|
+
uikitUtil.Animation.cancel(el);
|
|
158
|
+
uikitUtil.Transition.cancel(el);
|
|
159
|
+
return _toggle(el, show);
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function toggleTransition(cmp) {
|
|
164
|
+
switch (cmp.animation[0]) {
|
|
165
|
+
case 'slide-left':
|
|
166
|
+
return slideHorizontal(cmp);
|
|
167
|
+
case 'slide-right':
|
|
168
|
+
return slideHorizontal(cmp, true);}
|
|
169
|
+
|
|
170
|
+
return slide(cmp);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function slide(_ref4)
|
|
161
174
|
|
|
162
175
|
|
|
163
176
|
|
|
@@ -165,14 +178,17 @@
|
|
|
165
178
|
|
|
166
179
|
|
|
167
180
|
|
|
168
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } =
|
|
181
|
+
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
169
182
|
return (el, show) => {
|
|
170
183
|
const inProgress = uikitUtil.Transition.inProgress(el);
|
|
171
|
-
const inner =
|
|
184
|
+
const inner =
|
|
185
|
+
!inProgress && el.hasChildNodes() ?
|
|
172
186
|
uikitUtil.toFloat(uikitUtil.css(el.firstElementChild, 'marginTop')) +
|
|
173
187
|
uikitUtil.toFloat(uikitUtil.css(el.lastElementChild, 'marginBottom')) :
|
|
174
188
|
0;
|
|
175
|
-
const currentHeight = uikitUtil.isVisible(el) ? uikitUtil.
|
|
189
|
+
const currentHeight = uikitUtil.isVisible(el) ? uikitUtil.toFloat(uikitUtil.css(el, 'height')) + inner : 0;
|
|
190
|
+
|
|
191
|
+
const props = inProgress ? uikitUtil.css(el, Object.keys(initProps)) : show ? hideProps : initProps;
|
|
176
192
|
|
|
177
193
|
uikitUtil.Transition.cancel(el);
|
|
178
194
|
|
|
@@ -180,34 +196,97 @@
|
|
|
180
196
|
_toggle(el, true);
|
|
181
197
|
}
|
|
182
198
|
|
|
183
|
-
uikitUtil.
|
|
199
|
+
uikitUtil.css(el, 'maxHeight', '');
|
|
184
200
|
|
|
185
201
|
// Update child components first
|
|
186
202
|
uikitUtil.fastdom.flush();
|
|
187
203
|
|
|
188
|
-
const endHeight = uikitUtil.
|
|
189
|
-
duration = velocity *
|
|
204
|
+
const endHeight = uikitUtil.toFloat(uikitUtil.css(el, 'height')) + inner;
|
|
205
|
+
duration = velocity * endHeight + duration;
|
|
190
206
|
|
|
191
|
-
uikitUtil.
|
|
207
|
+
uikitUtil.css(el, { ...props, maxHeight: currentHeight });
|
|
192
208
|
|
|
193
209
|
return (
|
|
194
210
|
show ?
|
|
195
211
|
uikitUtil.Transition.start(
|
|
196
212
|
el,
|
|
197
|
-
{ ...initProps, overflow: 'hidden',
|
|
198
|
-
|
|
213
|
+
{ ...initProps, overflow: 'hidden', maxHeight: endHeight },
|
|
214
|
+
duration * (1 - currentHeight / endHeight),
|
|
199
215
|
transition) :
|
|
200
216
|
|
|
201
217
|
uikitUtil.Transition.start(
|
|
202
218
|
el,
|
|
203
219
|
hideProps,
|
|
204
|
-
|
|
220
|
+
duration * (currentHeight / endHeight),
|
|
205
221
|
transition).
|
|
206
222
|
then(() => _toggle(el, false))).
|
|
207
223
|
then(() => uikitUtil.css(el, initProps));
|
|
208
224
|
};
|
|
209
225
|
}
|
|
210
226
|
|
|
227
|
+
function slideHorizontal(_ref5, right) {let { isToggled, duration, velocity, transition, _toggle } = _ref5;
|
|
228
|
+
return (el, show) => {
|
|
229
|
+
const visible = uikitUtil.isVisible(el);
|
|
230
|
+
const marginLeft = uikitUtil.toFloat(uikitUtil.css(el, 'marginLeft'));
|
|
231
|
+
|
|
232
|
+
uikitUtil.Transition.cancel(el);
|
|
233
|
+
|
|
234
|
+
const [scrollElement] = uikitUtil.scrollParents(el);
|
|
235
|
+
uikitUtil.css(scrollElement, 'overflowX', 'hidden');
|
|
236
|
+
|
|
237
|
+
if (!isToggled(el)) {
|
|
238
|
+
_toggle(el, true);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const width = uikitUtil.toFloat(uikitUtil.css(el, 'width'));
|
|
242
|
+
duration = velocity * width + duration;
|
|
243
|
+
|
|
244
|
+
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
245
|
+
const offsetEl = uikitUtil.offset(el);
|
|
246
|
+
const useClipPath = right ?
|
|
247
|
+
offsetEl.right < scrollElement.clientWidth :
|
|
248
|
+
Math.round(offsetEl.left) > 0;
|
|
249
|
+
|
|
250
|
+
uikitUtil.css(el, {
|
|
251
|
+
clipPath: useClipPath ?
|
|
252
|
+
right ? "polygon(0 0," +
|
|
253
|
+
percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
|
|
254
|
+
100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)" :
|
|
255
|
+
'',
|
|
256
|
+
marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
return (
|
|
260
|
+
show ?
|
|
261
|
+
uikitUtil.Transition.start(
|
|
262
|
+
el,
|
|
263
|
+
{
|
|
264
|
+
clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
|
|
265
|
+
marginLeft: 0 },
|
|
266
|
+
|
|
267
|
+
duration * (1 - percent / 100),
|
|
268
|
+
transition) :
|
|
269
|
+
|
|
270
|
+
uikitUtil.Transition.start(
|
|
271
|
+
el,
|
|
272
|
+
{
|
|
273
|
+
clipPath: useClipPath ?
|
|
274
|
+
right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
'',
|
|
278
|
+
marginLeft: (right ? 1 : -1) * width },
|
|
279
|
+
|
|
280
|
+
duration * (percent / 100),
|
|
281
|
+
transition).
|
|
282
|
+
then(() => _toggle(el, false))).
|
|
283
|
+
then(() => {
|
|
284
|
+
uikitUtil.css(scrollElement, 'overflowX', '');
|
|
285
|
+
uikitUtil.css(el, { clipPath: '', marginLeft: '' });
|
|
286
|
+
});
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
|
|
211
290
|
function toggleAnimation(cmp) {
|
|
212
291
|
return (el, show) => {
|
|
213
292
|
uikitUtil.Animation.cancel(el);
|
|
@@ -240,23 +319,17 @@
|
|
|
240
319
|
|
|
241
320
|
connected() {
|
|
242
321
|
this.pos = this.$props.pos.split('-').concat('center').slice(0, 2);
|
|
243
|
-
this.
|
|
322
|
+
[this.dir, this.align] = this.pos;
|
|
323
|
+
this.axis = uikitUtil.includes(['top', 'bottom'], this.dir) ? 'y' : 'x';
|
|
244
324
|
},
|
|
245
325
|
|
|
246
326
|
methods: {
|
|
247
327
|
positionAt(element, target, boundary) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
let offset = uikitUtil.toPx(
|
|
251
|
-
this.offset === false ? uikitUtil.getCssVar('position-offset', element) : this.offset,
|
|
252
|
-
this.axis === 'x' ? 'width' : 'height',
|
|
253
|
-
element);
|
|
254
|
-
|
|
255
|
-
offset = [uikitUtil.includes(['left', 'top'], dir) ? -offset : +offset, 0];
|
|
328
|
+
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
256
329
|
|
|
257
330
|
const attach = {
|
|
258
|
-
element: [uikitUtil.flipPosition(dir), align],
|
|
259
|
-
target: [dir, align] };
|
|
331
|
+
element: [uikitUtil.flipPosition(this.dir), this.align],
|
|
332
|
+
target: [this.dir, this.align] };
|
|
260
333
|
|
|
261
334
|
|
|
262
335
|
if (this.axis === 'y') {
|
|
@@ -266,13 +339,48 @@
|
|
|
266
339
|
offset = offset.reverse();
|
|
267
340
|
}
|
|
268
341
|
|
|
342
|
+
const [scrollElement] = uikitUtil.scrollParents(element, /auto|scroll/);
|
|
343
|
+
const { scrollTop, scrollLeft } = scrollElement;
|
|
344
|
+
|
|
345
|
+
// Ensure none positioned element does not generate scrollbars
|
|
346
|
+
const elDim = uikitUtil.dimensions(element);
|
|
347
|
+
uikitUtil.css(element, { top: -elDim.height, left: -elDim.width });
|
|
348
|
+
|
|
269
349
|
uikitUtil.positionAt(element, target, {
|
|
270
350
|
attach,
|
|
271
351
|
offset,
|
|
272
352
|
boundary,
|
|
273
353
|
flip: this.flip,
|
|
274
|
-
viewportOffset:
|
|
354
|
+
viewportOffset: this.getViewportOffset(element) });
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
// Restore scroll position
|
|
358
|
+
scrollElement.scrollTop = scrollTop;
|
|
359
|
+
scrollElement.scrollLeft = scrollLeft;
|
|
360
|
+
},
|
|
361
|
+
|
|
362
|
+
getPositionOffset(element) {
|
|
363
|
+
return (
|
|
364
|
+
uikitUtil.toPx(
|
|
365
|
+
this.offset === false ? uikitUtil.getCssVar('position-offset', element) : this.offset,
|
|
366
|
+
this.axis === 'x' ? 'width' : 'height',
|
|
367
|
+
element) * (
|
|
368
|
+
uikitUtil.includes(['left', 'top'], this.dir) ? -1 : 1));
|
|
369
|
+
|
|
370
|
+
},
|
|
371
|
+
|
|
372
|
+
getShiftOffset(element) {
|
|
373
|
+
return uikitUtil.includes(['center', 'justify', 'stretch'], this.align) ?
|
|
374
|
+
0 :
|
|
375
|
+
uikitUtil.toPx(
|
|
376
|
+
uikitUtil.getCssVar('position-shift-offset', element),
|
|
377
|
+
this.axis === 'y' ? 'width' : 'height',
|
|
378
|
+
element) * (
|
|
379
|
+
uikitUtil.includes(['left', 'top'], this.align) ? 1 : -1);
|
|
380
|
+
},
|
|
275
381
|
|
|
382
|
+
getViewportOffset(element) {
|
|
383
|
+
return uikitUtil.toPx(uikitUtil.getCssVar('position-viewport-offset', element));
|
|
276
384
|
} } };
|
|
277
385
|
|
|
278
386
|
var Component = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.
|
|
1
|
+
/*! UIkit 3.14.4-dev.008162cc3 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],m):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitTooltip=m(s.UIkit.util))})(this,function(s){"use strict";var m={props:{container:Boolean},data:{container:!0},computed:{container(o){let{container:t}=o;return t===!0&&this.$container||t&&s.$(t)}}},b={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",maxHeight:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:"",boxShadow:""},hideProps:{overflow:"hidden",maxHeight:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0,boxShadow:"none"}},computed:{hasAnimation(o){let{animation:t}=o;return!!t[0]},hasTransition(o){let{animation:t}=o;return s.startsWith(t[0],"slide")}},methods:{toggleElement(o,t,r){return new Promise(n=>Promise.all(s.toNodes(o).map(a=>{const i=s.isBoolean(t)?t:!this.isToggled(a);if(!s.trigger(a,"before"+(i?"show":"hide"),[this]))return Promise.reject();const c=(s.isFunction(r)?r:r===!1||!this.hasAnimation?P(this):this.hasTransition?u(this):$(this))(a,i),h=i?this.clsEnter:this.clsLeave;s.addClass(a,h),s.trigger(a,i?"show":"hide",[this]);const e=()=>{s.removeClass(a,h),s.trigger(a,i?"shown":"hidden",[this]),this.$update(a)};return c?c.then(e,()=>(s.removeClass(a,h),Promise.reject())):e()})).then(n,s.noop))},isToggled(o){return o===void 0&&(o=this.$el),[o]=s.toNodes(o),s.hasClass(o,this.clsEnter)?!0:s.hasClass(o,this.clsLeave)?!1:this.cls?s.hasClass(o,this.cls.split(" ")[0]):s.isVisible(o)},_toggle(o,t){if(!o)return;t=Boolean(t);let r;this.cls?(r=s.includes(this.cls," ")||t!==s.hasClass(o,this.cls),r&&s.toggleClass(o,this.cls,s.includes(this.cls," ")?void 0:t)):(r=t===o.hidden,r&&(o.hidden=!t)),s.$$("[autofocus]",o).some(n=>s.isVisible(n)?n.focus()||!0:n.blur()),r&&(s.trigger(o,"toggled",[t,this]),this.$update(o))}}};function P(o){let{_toggle:t}=o;return(r,n)=>(s.Animation.cancel(r),s.Transition.cancel(r),t(r,n))}function u(o){switch(o.animation[0]){case"slide-left":return v(o);case"slide-right":return v(o,!0)}return x(o)}function x(o){let{isToggled:t,duration:r,velocity:n,initProps:a,hideProps:i,transition:c,_toggle:h}=o;return(e,f)=>{const w=s.Transition.inProgress(e),l=!w&&e.hasChildNodes()?s.toFloat(s.css(e.firstElementChild,"marginTop"))+s.toFloat(s.css(e.lastElementChild,"marginBottom")):0,d=s.isVisible(e)?s.toFloat(s.css(e,"height"))+l:0,p=w?s.css(e,Object.keys(a)):f?i:a;s.Transition.cancel(e),t(e)||h(e,!0),s.css(e,"maxHeight",""),s.fastdom.flush();const g=s.toFloat(s.css(e,"height"))+l;return r=n*g+r,s.css(e,{...p,maxHeight:d}),(f?s.Transition.start(e,{...a,overflow:"hidden",maxHeight:g},r*(1-d/g),c):s.Transition.start(e,i,r*(d/g),c).then(()=>h(e,!1))).then(()=>s.css(e,a))}}function v(o,t){let{isToggled:r,duration:n,velocity:a,transition:i,_toggle:c}=o;return(h,e)=>{const f=s.isVisible(h),w=s.toFloat(s.css(h,"marginLeft"));s.Transition.cancel(h);const[l]=s.scrollParents(h);s.css(l,"overflowX","hidden"),r(h)||c(h,!0);const d=s.toFloat(s.css(h,"width"));n=a*d+n;const p=f?(d+w*(t?-1:1))/d*100:0,g=s.offset(h),T=t?g.right<l.clientWidth:Math.round(g.left)>0;return s.css(h,{clipPath:T?t?"polygon(0 0,"+p+"% 0,"+p+"% 100%,0 100%)":"polygon("+(100-p)+"% 0,100% 0,100% 100%,"+(100-p)+"% 100%)":"",marginLeft:(100-p)*(t?1:-1)/100*d}),(e?s.Transition.start(h,{clipPath:T?"polygon(0 0,100% 0,100% 100%,0 100%)":"",marginLeft:0},n*(1-p/100),i):s.Transition.start(h,{clipPath:T?t?"polygon(0 0,0 0,0 100%,0 100%)":"polygon(100% 0,100% 0,100% 100%,100% 100%)":"",marginLeft:(t?1:-1)*d},n*(p/100),i).then(()=>c(h,!1))).then(()=>{s.css(l,"overflowX",""),s.css(h,{clipPath:"",marginLeft:""})})}}function $(o){return(t,r)=>{s.Animation.cancel(t);const{animation:n,duration:a,_toggle:i}=o;return r?(i(t,!0),s.Animation.in(t,n[0],a,o.origin)):s.Animation.out(t,n[1]||n[0],a,o.origin).then(()=>i(t,!1))}}var C={props:{pos:String,offset:null,flip:Boolean},data:{pos:"bottom-"+(s.isRtl?"right":"left"),flip:!0,offset:!1},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),[this.dir,this.align]=this.pos,this.axis=s.includes(["top","bottom"],this.dir)?"y":"x"},methods:{positionAt(o,t,r){let n=[this.getPositionOffset(o),this.getShiftOffset(o)];const a={element:[s.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const f in a)a[f]=a[f].reverse();n=n.reverse()}const[i]=s.scrollParents(o,/auto|scroll/),{scrollTop:c,scrollLeft:h}=i,e=s.dimensions(o);s.css(o,{top:-e.height,left:-e.width}),s.positionAt(o,t,{attach:a,offset:n,boundary:r,flip:this.flip,viewportOffset:this.getViewportOffset(o)}),i.scrollTop=c,i.scrollLeft=h},getPositionOffset(o){return s.toPx(this.offset===!1?s.getCssVar("position-offset",o):this.offset,this.axis==="x"?"width":"height",o)*(s.includes(["left","top"],this.dir)?-1:1)},getShiftOffset(o){return s.includes(["center","justify","stretch"],this.align)?0:s.toPx(s.getCssVar("position-shift-offset",o),this.axis==="y"?"width":"height",o)*(s.includes(["left","top"],this.align)?1:-1)},getViewportOffset(o){return s.toPx(s.getCssVar("position-viewport-offset",o))}}},y={mixins:[m,b,C],args:"title",props:{delay:Number,title:String},data:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},beforeConnect(){this._hasTitle=s.hasAttr(this.$el,"title"),s.attr(this.$el,"title",""),this.updateAria(!1),A(this.$el)},disconnected(){this.hide(),s.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){this.isToggled(this.tooltip||null)||!this.title||(this._unbind=s.once(document,"show keydown "+s.pointerDown,this.hide,!1,o=>o.type===s.pointerDown&&!s.within(o.target,this.$el)||o.type==="keydown"&&o.keyCode===27||o.type==="show"&&o.detail[0]!==this&&o.detail[0].$name===this.$name),clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,this.delay))},async hide(){s.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&(await this.toggleElement(this.tooltip,!1,!1),s.remove(this.tooltip),this.tooltip=null,this._unbind()))},_show(){this.tooltip=s.append(this.container,'<div class="uk-'+this.$options.name+'"> <div class="uk-'+this.$options.name+'-inner">'+this.title+"</div> </div>"),s.on(this.tooltip,"toggled",(o,t)=>{if(this.updateAria(t),!t)return;this.positionAt(this.tooltip,this.$el);const[r,n]=E(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?s.flipPosition(r)+"-"+n:n+"-"+s.flipPosition(r)}),this.toggleElement(this.tooltip,!0)},updateAria(o){s.attr(this.$el,"aria-expanded",o)}},events:{focus:"show",blur:"hide",[s.pointerEnter+" "+s.pointerLeave](o){s.isTouch(o)||this[o.type===s.pointerEnter?"show":"hide"]()},[s.pointerDown](o){s.isTouch(o)&&this.show()}}};function A(o){s.isFocusable(o)||s.attr(o,"tabindex","0")}function E(o,t,r){let[n,a]=r;const i=s.offset(o),c=s.offset(t),h=[["left","right"],["top","bottom"]];for(const f of h){if(i[f[0]]>=c[f[1]]){n=f[1];break}if(i[f[1]]<=c[f[0]]){n=f[0];break}}const e=s.includes(h[0],n)?h[1]:h[0];return i[e[0]]===c[e[0]]?a=e[0]:i[e[1]]===c[e[1]]?a=e[1]:a="center",[n,a]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",y),y});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.
|
|
1
|
+
/*! UIkit 3.14.4-dev.008162cc3 | 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(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.
|
|
1
|
+
/*! UIkit 3.14.4-dev.008162cc3 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(o,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitupload",["uikit-util"],n):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitUpload=n(o.UIkit.util))})(this,function(o){"use strict";var n={props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,msgInvalidMime:String,msgInvalidName:String,msgInvalidSize:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,msgInvalidMime:"Invalid File Type: %s",msgInvalidName:"Invalid File Name: %s",msgInvalidSize:"Invalid File Size: %s Kilobytes Max",multiple:!1,name:"files[]",params:{},type:"",url:"",abort:o.noop,beforeAll:o.noop,beforeSend:o.noop,complete:o.noop,completeAll:o.noop,error:o.noop,fail:o.noop,load:o.noop,loadEnd:o.noop,loadStart:o.noop,progress:o.noop},events:{change(e){!o.matches(e.target,'input[type="file"]')||(e.preventDefault(),e.target.files&&this.upload(e.target.files),e.target.value="")},drop(e){i(e);const t=e.dataTransfer;!(t!=null&&t.files)||(o.removeClass(this.$el,this.clsDragover),this.upload(t.files))},dragenter(e){i(e)},dragover(e){i(e),o.addClass(this.$el,this.clsDragover)},dragleave(e){i(e),o.removeClass(this.$el,this.clsDragover)}},methods:{async upload(e){if(e=o.toArray(e),!e.length)return;o.trigger(this.$el,"upload",[e]);for(const a of e){if(this.maxSize&&this.maxSize*1e3<a.size){this.fail(this.msgInvalidSize.replace("%s",this.maxSize));return}if(this.allow&&!d(this.allow,a.name)){this.fail(this.msgInvalidName.replace("%s",this.allow));return}if(this.mime&&!d(this.mime,a.type)){this.fail(this.msgInvalidMime.replace("%s",this.mime));return}}this.multiple||(e=e.slice(0,1)),this.beforeAll(this,e);const t=c(e,this.concurrent),s=async a=>{const l=new FormData;a.forEach(r=>l.append(this.name,r));for(const r in this.params)l.append(r,this.params[r]);try{const r=await o.ajax(this.url,{data:l,method:this.method,responseType:this.type,beforeSend:h=>{const{xhr:p}=h;p.upload&&o.on(p.upload,"progress",this.progress);for(const m of["loadStart","load","loadEnd","abort"])o.on(p,m.toLowerCase(),this[m]);return this.beforeSend(h)}});this.complete(r),t.length?await s(t.shift()):this.completeAll(r)}catch(r){this.error(r)}};await s(t.shift())}}};function d(e,t){return t.match(new RegExp("^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$","i"))}function c(e,t){const s=[];for(let a=0;a<e.length;a+=t)s.push(e.slice(a,a+t));return s}function i(e){e.preventDefault(),e.stopPropagation()}return typeof window<"u"&&window.UIkit&&window.UIkit.component("upload",n),n});
|