uikit 3.14.4-dev.871ba3c05 → 3.14.4-dev.ae765cd84
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 +45 -11
- package/build/util.js +1 -0
- package/dist/css/uikit-core-rtl.css +385 -110
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +385 -110
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +402 -115
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +402 -115
- 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 +7 -5
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +185 -137
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +185 -137
- 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 +4 -5
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +4 -5
- 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 +4 -5
- 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 +97 -135
- 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 +1803 -1709
- package/dist/js/uikit-core.min.js +14 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +1051 -940
- package/dist/js/uikit.min.js +14 -1
- package/package.json +1 -1
- package/src/images/{backgrounds/nav-parent-open.svg → components/nav-parent-icon-large.svg} +0 -0
- package/src/images/components/nav-parent-icon.svg +3 -0
- package/src/images/components/navbar-parent-icon.svg +3 -0
- package/src/images/components/navbar-toggle-icon.svg +22 -3
- package/src/js/api/state.js +2 -2
- package/src/js/components/filter.js +5 -3
- package/src/js/components/sortable.js +2 -3
- package/src/js/core/accordion.js +9 -17
- package/src/js/core/alert.js +35 -14
- package/src/js/core/drop.js +95 -61
- package/src/js/core/height-viewport.js +14 -6
- package/src/js/core/icon.js +16 -0
- package/src/js/core/index.js +2 -0
- package/src/js/core/leader.js +2 -2
- package/src/js/core/navbar.js +44 -30
- package/src/js/core/offcanvas.js +1 -47
- package/src/js/core/scroll.js +37 -10
- package/src/js/core/sticky.js +8 -9
- package/src/js/core/toggle.js +3 -5
- package/src/js/mixin/media.js +4 -5
- package/src/js/mixin/modal.js +97 -8
- package/src/js/mixin/position.js +26 -11
- package/src/js/mixin/slider-drag.js +20 -8
- package/src/js/mixin/style.js +11 -0
- package/src/js/mixin/togglable.js +80 -133
- package/src/js/util/animation.js +4 -3
- package/src/js/util/dimensions.js +6 -6
- package/src/js/util/filter.js +3 -7
- package/src/js/util/position.js +108 -107
- package/src/js/util/style.js +4 -13
- package/src/js/util/viewport.js +5 -32
- package/src/less/components/_import.less +1 -0
- package/src/less/components/drop.less +1 -18
- package/src/less/components/dropbar.less +115 -0
- package/src/less/components/dropdown.less +16 -16
- package/src/less/components/leader.less +1 -1
- package/src/less/components/nav.less +240 -63
- package/src/less/components/navbar.less +81 -38
- package/src/less/components/utility.less +21 -4
- package/src/less/theme/_import.less +1 -0
- package/src/less/theme/dropbar.less +44 -0
- package/src/less/theme/dropdown.less +0 -11
- package/src/less/theme/nav.less +43 -9
- package/src/less/theme/navbar.less +7 -11
- package/src/scss/components/_import.scss +1 -0
- package/src/scss/components/drop.scss +1 -18
- package/src/scss/components/dropbar.scss +115 -0
- package/src/scss/components/dropdown.scss +16 -16
- package/src/scss/components/leader.scss +1 -1
- package/src/scss/components/nav.scss +189 -51
- package/src/scss/components/navbar.scss +69 -38
- package/src/scss/components/utility.scss +19 -3
- package/src/scss/mixins-theme.scss +93 -25
- package/src/scss/mixins.scss +89 -17
- package/src/scss/theme/_import.scss +1 -0
- package/src/scss/theme/dropbar.scss +44 -0
- package/src/scss/theme/dropdown.scss +0 -8
- package/src/scss/theme/nav.scss +41 -9
- package/src/scss/theme/navbar.scss +7 -8
- package/src/scss/variables-theme.scss +71 -18
- package/src/scss/variables.scss +60 -14
- package/tests/accordion.html +2 -2
- package/tests/alert.html +2 -2
- package/tests/countdown.html +1 -1
- package/tests/drop.html +457 -371
- package/tests/dropbar.html +456 -0
- package/tests/dropdown.html +26 -401
- package/tests/filter.html +9 -12
- package/tests/form.html +1 -1
- package/tests/index.html +126 -107
- package/tests/js/index.js +1 -4
- package/tests/lightbox.html +5 -5
- package/tests/list.html +8 -8
- package/tests/modal.html +13 -13
- package/tests/nav.html +117 -75
- package/tests/navbar.html +2002 -1131
- package/tests/offcanvas.html +17 -21
- package/tests/parallax.html +1 -1
- package/tests/position.html +18 -16
- package/tests/progress.html +9 -9
- package/tests/scroll.html +7 -10
- package/tests/search.html +5 -5
- package/tests/slider.html +6 -5
- package/tests/slideshow.html +8 -8
- package/tests/sortable.html +6 -8
- package/tests/sticky-navbar.html +6 -6
- package/tests/sticky.html +8 -8
- package/tests/switcher.html +1 -1
- package/tests/tab.html +1 -1
- package/tests/table.html +7 -7
- package/tests/toggle.html +2 -2
- package/tests/tooltip.html +1 -1
- package/tests/upload.html +11 -11
- package/tests/utility.html +19 -0
- package/src/images/backgrounds/nav-parent-close.svg +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.ae765cd84 | 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')) :
|
|
@@ -38,27 +38,7 @@
|
|
|
38
38
|
origin: false,
|
|
39
39
|
transition: 'ease',
|
|
40
40
|
clsEnter: 'uk-togglabe-enter',
|
|
41
|
-
clsLeave: 'uk-togglabe-leave',
|
|
42
|
-
|
|
43
|
-
initProps: {
|
|
44
|
-
overflow: '',
|
|
45
|
-
maxHeight: '',
|
|
46
|
-
paddingTop: '',
|
|
47
|
-
paddingBottom: '',
|
|
48
|
-
marginTop: '',
|
|
49
|
-
marginBottom: '',
|
|
50
|
-
boxShadow: '' },
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
hideProps: {
|
|
54
|
-
overflow: 'hidden',
|
|
55
|
-
maxHeight: 0,
|
|
56
|
-
paddingTop: 0,
|
|
57
|
-
paddingBottom: 0,
|
|
58
|
-
marginTop: 0,
|
|
59
|
-
marginBottom: 0,
|
|
60
|
-
boxShadow: 'none' } },
|
|
61
|
-
|
|
41
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
62
42
|
|
|
63
43
|
|
|
64
44
|
computed: {
|
|
@@ -67,7 +47,7 @@
|
|
|
67
47
|
},
|
|
68
48
|
|
|
69
49
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
70
|
-
return uikitUtil.startsWith(animation[0],
|
|
50
|
+
return ['slide', 'reveal'].some((transition) => uikitUtil.startsWith(animation[0], transition));
|
|
71
51
|
} },
|
|
72
52
|
|
|
73
53
|
|
|
@@ -160,130 +140,97 @@
|
|
|
160
140
|
};
|
|
161
141
|
}
|
|
162
142
|
|
|
163
|
-
function toggleTransition(cmp) {
|
|
164
|
-
|
|
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)
|
|
174
|
-
|
|
175
|
-
|
|
143
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
144
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
176
145
|
|
|
146
|
+
const dirs = [
|
|
147
|
+
['left', 'right'],
|
|
148
|
+
['top', 'bottom']];
|
|
177
149
|
|
|
150
|
+
const dir = dirs[uikitUtil.includes(dirs[0], startProp) ? 0 : 1];
|
|
151
|
+
const end = dir[1] === startProp;
|
|
152
|
+
const props = ['width', 'height'];
|
|
153
|
+
const dimProp = props[dirs.indexOf(dir)];
|
|
154
|
+
const marginProp = "margin-" + dir[0];
|
|
155
|
+
const marginStartProp = "margin-" + startProp;
|
|
178
156
|
|
|
157
|
+
return async (el, show) => {
|
|
158
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
179
159
|
|
|
160
|
+
let currentDim = uikitUtil.dimensions(el)[dimProp];
|
|
180
161
|
|
|
181
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
182
|
-
return (el, show) => {
|
|
183
162
|
const inProgress = uikitUtil.Transition.inProgress(el);
|
|
184
|
-
|
|
185
|
-
!inProgress && el.hasChildNodes() ?
|
|
186
|
-
uikitUtil.toFloat(uikitUtil.css(el.firstElementChild, 'marginTop')) +
|
|
187
|
-
uikitUtil.toFloat(uikitUtil.css(el.lastElementChild, 'marginBottom')) :
|
|
188
|
-
0;
|
|
189
|
-
const currentHeight = uikitUtil.isVisible(el) ? uikitUtil.toFloat(uikitUtil.css(el, 'height')) + inner : 0;
|
|
163
|
+
await uikitUtil.Transition.cancel(el);
|
|
190
164
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
uikitUtil.Transition.cancel(el);
|
|
194
|
-
|
|
195
|
-
if (!isToggled(el)) {
|
|
165
|
+
if (show) {
|
|
196
166
|
_toggle(el, true);
|
|
197
167
|
}
|
|
198
168
|
|
|
199
|
-
|
|
169
|
+
const prevProps = Object.fromEntries(
|
|
170
|
+
['padding', 'border', 'width', 'height', 'overflow', marginProp, marginStartProp].map(
|
|
171
|
+
(key) => [key, el.style[key]]));
|
|
200
172
|
|
|
201
|
-
// Update child components first
|
|
202
|
-
uikitUtil.fastdom.flush();
|
|
203
173
|
|
|
204
|
-
const endHeight = uikitUtil.toFloat(uikitUtil.css(el, 'height')) + inner;
|
|
205
|
-
duration = velocity * endHeight + duration;
|
|
206
174
|
|
|
207
|
-
uikitUtil.
|
|
175
|
+
const dim = uikitUtil.dimensions(el);
|
|
176
|
+
const currentMargin = uikitUtil.toFloat(uikitUtil.css(el, marginProp));
|
|
177
|
+
const marginStart = uikitUtil.toFloat(uikitUtil.css(el, marginStartProp));
|
|
178
|
+
const endDim = dim[dimProp] + marginStart;
|
|
208
179
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
el,
|
|
213
|
-
{ ...initProps, overflow: 'hidden', maxHeight: endHeight },
|
|
214
|
-
duration * (1 - currentHeight / endHeight),
|
|
215
|
-
transition) :
|
|
180
|
+
if (!inProgress && !show) {
|
|
181
|
+
currentDim += marginStart;
|
|
182
|
+
}
|
|
216
183
|
|
|
217
|
-
uikitUtil.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
184
|
+
const [wrapper] = uikitUtil.wrapInner(el, '<div>');
|
|
185
|
+
uikitUtil.css(wrapper, {
|
|
186
|
+
boxSizing: 'border-box',
|
|
187
|
+
height: dim.height,
|
|
188
|
+
width: dim.width,
|
|
189
|
+
...uikitUtil.css(el, [
|
|
190
|
+
'padding',
|
|
191
|
+
'borderTop',
|
|
192
|
+
'borderRight',
|
|
193
|
+
'borderBottom',
|
|
194
|
+
'borderLeft',
|
|
195
|
+
'borderImage',
|
|
196
|
+
marginStartProp]) });
|
|
226
197
|
|
|
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
198
|
|
|
232
|
-
uikitUtil.Transition.cancel(el);
|
|
233
199
|
|
|
234
|
-
|
|
235
|
-
|
|
200
|
+
uikitUtil.css(el, {
|
|
201
|
+
padding: 0,
|
|
202
|
+
border: 0,
|
|
203
|
+
[marginStartProp]: 0,
|
|
204
|
+
width: dim.width,
|
|
205
|
+
height: dim.height,
|
|
206
|
+
overflow: 'hidden',
|
|
207
|
+
[dimProp]: currentDim });
|
|
236
208
|
|
|
237
|
-
|
|
238
|
-
|
|
209
|
+
|
|
210
|
+
const percent = currentDim / endDim;
|
|
211
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
212
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
213
|
+
|
|
214
|
+
if (end) {
|
|
215
|
+
uikitUtil.css(el, marginProp, endDim - currentDim + currentMargin);
|
|
216
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
239
217
|
}
|
|
240
218
|
|
|
241
|
-
|
|
242
|
-
|
|
219
|
+
if (!end ^ mode === 'reveal') {
|
|
220
|
+
uikitUtil.css(wrapper, marginProp, -endDim + currentDim);
|
|
221
|
+
uikitUtil.Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
222
|
+
}
|
|
243
223
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
224
|
+
try {
|
|
225
|
+
await uikitUtil.Transition.start(el, endProps, duration, transition);
|
|
226
|
+
} finally {
|
|
227
|
+
uikitUtil.css(el, prevProps);
|
|
228
|
+
uikitUtil.unwrap(wrapper.firstChild);
|
|
249
229
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
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
|
-
});
|
|
230
|
+
if (!show) {
|
|
231
|
+
_toggle(el, false);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
287
234
|
};
|
|
288
235
|
}
|
|
289
236
|
|
|
@@ -308,13 +255,17 @@
|
|
|
308
255
|
props: {
|
|
309
256
|
pos: String,
|
|
310
257
|
offset: null,
|
|
311
|
-
flip: Boolean
|
|
258
|
+
flip: Boolean,
|
|
259
|
+
shift: Boolean,
|
|
260
|
+
inset: Boolean },
|
|
312
261
|
|
|
313
262
|
|
|
314
263
|
data: {
|
|
315
264
|
pos: "bottom-" + (uikitUtil.isRtl ? 'right' : 'left'),
|
|
265
|
+
offset: false,
|
|
316
266
|
flip: true,
|
|
317
|
-
|
|
267
|
+
shift: true,
|
|
268
|
+
inset: false },
|
|
318
269
|
|
|
319
270
|
|
|
320
271
|
connected() {
|
|
@@ -326,19 +277,24 @@
|
|
|
326
277
|
methods: {
|
|
327
278
|
positionAt(element, target, boundary) {
|
|
328
279
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
280
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
329
281
|
|
|
330
282
|
const attach = {
|
|
331
|
-
element: [uikitUtil.flipPosition(this.dir), this.align],
|
|
283
|
+
element: [this.inset ? this.dir : uikitUtil.flipPosition(this.dir), this.align],
|
|
332
284
|
target: [this.dir, this.align] };
|
|
333
285
|
|
|
334
286
|
|
|
335
287
|
if (this.axis === 'y') {
|
|
336
288
|
for (const prop in attach) {
|
|
337
|
-
attach[prop]
|
|
289
|
+
attach[prop].reverse();
|
|
338
290
|
}
|
|
339
|
-
offset
|
|
291
|
+
offset.reverse();
|
|
292
|
+
placement.reverse();
|
|
340
293
|
}
|
|
341
294
|
|
|
295
|
+
const [scrollElement] = uikitUtil.scrollParents(element, /auto|scroll/);
|
|
296
|
+
const { scrollTop, scrollLeft } = scrollElement;
|
|
297
|
+
|
|
342
298
|
// Ensure none positioned element does not generate scrollbars
|
|
343
299
|
const elDim = uikitUtil.dimensions(element);
|
|
344
300
|
uikitUtil.css(element, { top: -elDim.height, left: -elDim.width });
|
|
@@ -347,33 +303,39 @@
|
|
|
347
303
|
attach,
|
|
348
304
|
offset,
|
|
349
305
|
boundary,
|
|
350
|
-
|
|
306
|
+
placement,
|
|
351
307
|
viewportOffset: this.getViewportOffset(element) });
|
|
352
308
|
|
|
309
|
+
|
|
310
|
+
// Restore scroll position
|
|
311
|
+
scrollElement.scrollTop = scrollTop;
|
|
312
|
+
scrollElement.scrollLeft = scrollLeft;
|
|
353
313
|
},
|
|
354
314
|
|
|
355
315
|
getPositionOffset(element) {
|
|
356
316
|
return (
|
|
357
317
|
uikitUtil.toPx(
|
|
358
|
-
this.offset === false ? uikitUtil.
|
|
318
|
+
this.offset === false ? uikitUtil.css(element, '--uk-position-offset') : this.offset,
|
|
359
319
|
this.axis === 'x' ? 'width' : 'height',
|
|
360
320
|
element) * (
|
|
361
|
-
|
|
321
|
+
|
|
322
|
+
uikitUtil.includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
323
|
+
this.inset ? -1 : 1));
|
|
362
324
|
|
|
363
325
|
},
|
|
364
326
|
|
|
365
327
|
getShiftOffset(element) {
|
|
366
|
-
return
|
|
328
|
+
return this.align === 'center' ?
|
|
367
329
|
0 :
|
|
368
330
|
uikitUtil.toPx(
|
|
369
|
-
uikitUtil.
|
|
331
|
+
uikitUtil.css(element, '--uk-position-shift-offset'),
|
|
370
332
|
this.axis === 'y' ? 'width' : 'height',
|
|
371
333
|
element) * (
|
|
372
334
|
uikitUtil.includes(['left', 'top'], this.align) ? 1 : -1);
|
|
373
335
|
},
|
|
374
336
|
|
|
375
337
|
getViewportOffset(element) {
|
|
376
|
-
return uikitUtil.toPx(uikitUtil.
|
|
338
|
+
return uikitUtil.toPx(uikitUtil.css(element, '--uk-position-viewport-offset'));
|
|
377
339
|
} } };
|
|
378
340
|
|
|
379
341
|
var Component = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.ae765cd84 | 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(t){let{container:o}=t;return o===!0&&this.$container||o&&s.$(o)}}},_={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"},computed:{hasAnimation(t){let{animation:o}=t;return!!o[0]},hasTransition(t){let{animation:o}=t;return["slide","reveal"].some(e=>s.startsWith(o[0],e))}},methods:{toggleElement(t,o,e){return new Promise(n=>Promise.all(s.toNodes(t).map(r=>{const i=s.isBoolean(o)?o:!this.isToggled(r);if(!s.trigger(r,"before"+(i?"show":"hide"),[this]))return Promise.reject();const d=(s.isFunction(e)?e:e===!1||!this.hasAnimation?E(this):this.hasTransition?S(this):B(this))(r,i),f=i?this.clsEnter:this.clsLeave;s.addClass(r,f),s.trigger(r,i?"show":"hide",[this]);const a=()=>{s.removeClass(r,f),s.trigger(r,i?"shown":"hidden",[this]),this.$update(r)};return d?d.then(a,()=>(s.removeClass(r,f),Promise.reject())):a()})).then(n,s.noop))},isToggled(t){return t===void 0&&(t=this.$el),[t]=s.toNodes(t),s.hasClass(t,this.clsEnter)?!0:s.hasClass(t,this.clsLeave)?!1:this.cls?s.hasClass(t,this.cls.split(" ")[0]):s.isVisible(t)},_toggle(t,o){if(!t)return;o=Boolean(o);let e;this.cls?(e=s.includes(this.cls," ")||o!==s.hasClass(t,this.cls),e&&s.toggleClass(t,this.cls,s.includes(this.cls," ")?void 0:o)):(e=o===t.hidden,e&&(t.hidden=!o)),s.$$("[autofocus]",t).some(n=>s.isVisible(n)?n.focus()||!0:n.blur()),e&&(s.trigger(t,"toggled",[o,this]),this.$update(t))}}};function E(t){let{_toggle:o}=t;return(e,n)=>(s.Animation.cancel(e),s.Transition.cancel(e),o(e,n))}function S(t){var o;const[e="reveal",n="top"]=((o=t.animation[0])==null?void 0:o.split("-"))||[],r=[["left","right"],["top","bottom"]],i=r[s.includes(r[0],n)?0:1],d=i[1]===n,a=["width","height"][r.indexOf(i)],h="margin-"+i[0],l="margin-"+n;return async(c,p)=>{let{duration:b,velocity:F,transition:$,_toggle:P}=t,w=s.dimensions(c)[a];const N=s.Transition.inProgress(c);await s.Transition.cancel(c),p&&P(c,!0);const j=Object.fromEntries(["padding","border","width","height","overflow",h,l].map(O=>[O,c.style[O]])),v=s.dimensions(c),T=s.toFloat(s.css(c,h)),x=s.toFloat(s.css(c,l)),g=v[a]+x;!N&&!p&&(w+=x);const[u]=s.wrapInner(c,"<div>");s.css(u,{boxSizing:"border-box",height:v.height,width:v.width,...s.css(c,["padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",l])}),s.css(c,{padding:0,border:0,[l]:0,width:v.width,height:v.height,overflow:"hidden",[a]:w});const A=w/g;b=(F*g+b)*(p?1-A:A);const C={[a]:p?g:0};d&&(s.css(c,h,g-w+T),C[h]=p?T:g+T),!d^e==="reveal"&&(s.css(u,h,-g+w),s.Transition.start(u,{[h]:p?0:-g},b,$));try{await s.Transition.start(c,C,b,$)}finally{s.css(c,j),s.unwrap(u.firstChild),p||P(c,!1)}}}function B(t){return(o,e)=>{s.Animation.cancel(o);const{animation:n,duration:r,_toggle:i}=t;return e?(i(o,!0),s.Animation.in(o,n[0],r,t.origin)):s.Animation.out(o,n[1]||n[0],r,t.origin).then(()=>i(o,!1))}}var I={props:{pos:String,offset:null,flip:Boolean,shift:Boolean,inset:Boolean},data:{pos:"bottom-"+(s.isRtl?"right":"left"),offset:!1,flip:!0,shift:!0,inset:!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(t,o,e){let n=[this.getPositionOffset(t),this.getShiftOffset(t)];const r=[this.flip&&"flip",this.shift&&"shift"],i={element:[this.inset?this.dir:s.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const l in i)i[l].reverse();n.reverse(),r.reverse()}const[d]=s.scrollParents(t,/auto|scroll/),{scrollTop:f,scrollLeft:a}=d,h=s.dimensions(t);s.css(t,{top:-h.height,left:-h.width}),s.positionAt(t,o,{attach:i,offset:n,boundary:e,placement:r,viewportOffset:this.getViewportOffset(t)}),d.scrollTop=f,d.scrollLeft=a},getPositionOffset(t){return s.toPx(this.offset===!1?s.css(t,"--uk-position-offset"):this.offset,this.axis==="x"?"width":"height",t)*(s.includes(["left","top"],this.dir)?-1:1)*(this.inset?-1:1)},getShiftOffset(t){return this.align==="center"?0:s.toPx(s.css(t,"--uk-position-shift-offset"),this.axis==="y"?"width":"height",t)*(s.includes(["left","top"],this.align)?1:-1)},getViewportOffset(t){return s.toPx(s.css(t,"--uk-position-viewport-offset"))}}},y={mixins:[m,_,I],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),L(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,t=>t.type===s.pointerDown&&!s.within(t.target,this.$el)||t.type==="keydown"&&t.keyCode===27||t.type==="show"&&t.detail[0]!==this&&t.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",(t,o)=>{if(this.updateAria(o),!o)return;this.positionAt(this.tooltip,this.$el);const[e,n]=D(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?s.flipPosition(e)+"-"+n:n+"-"+s.flipPosition(e)}),this.toggleElement(this.tooltip,!0)},updateAria(t){s.attr(this.$el,"aria-expanded",t)}},events:{focus:"show",blur:"hide",[s.pointerEnter+" "+s.pointerLeave](t){s.isTouch(t)||this[t.type===s.pointerEnter?"show":"hide"]()},[s.pointerDown](t){s.isTouch(t)&&this.show()}}};function L(t){s.isFocusable(t)||s.attr(t,"tabindex","0")}function D(t,o,e){let[n,r]=e;const i=s.offset(t),d=s.offset(o),f=[["left","right"],["top","bottom"]];for(const h of f){if(i[h[0]]>=d[h[1]]){n=h[1];break}if(i[h[1]]<=d[h[0]]){n=h[0];break}}const a=s.includes(f[0],n)?f[1]:f[0];return i[a[0]]===d[a[0]]?r=a[0]:i[a[1]]===d[a[1]]?r=a[1]:r="center",[n,r]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",y),y});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.ae765cd84 | 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.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.ae765cd84 | 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});
|