uikit 3.14.1-dev.eeb4cd6ae → 3.14.2-dev.35b3deec9
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 -3
- package/build/util.js +8 -2
- package/dist/css/uikit-core-rtl.css +93 -21
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +93 -21
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +99 -33
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +99 -33
- 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 +2 -2
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +111 -15
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +111 -15
- 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 +18 -3
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +2 -2
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +2 -2
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +147 -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 +280 -132
- 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 +298 -135
- package/dist/js/uikit.min.js +1 -1
- package/package.json +11 -11
- package/src/js/api/hooks.js +1 -1
- package/src/js/components/filter.js +1 -1
- package/src/js/components/parallax.js +16 -1
- package/src/js/core/accordion.js +3 -3
- package/src/js/core/alert.js +1 -1
- package/src/js/core/drop.js +47 -18
- package/src/js/core/height-viewport.js +15 -11
- package/src/js/core/margin.js +1 -1
- package/src/js/core/navbar.js +19 -18
- package/src/js/core/scrollspy.js +6 -1
- package/src/js/core/toggle.js +9 -8
- package/src/js/mixin/parallax.js +1 -1
- package/src/js/mixin/position.js +36 -20
- package/src/js/mixin/togglable.js +116 -18
- package/src/js/util/animation.js +1 -0
- package/src/js/util/position.js +24 -22
- package/src/js/util/viewport.js +7 -14
- package/src/less/components/drop.less +19 -4
- package/src/less/components/dropdown.less +21 -4
- package/src/less/components/margin.less +13 -14
- package/src/less/components/modal.less +19 -4
- package/src/less/components/nav.less +1 -1
- package/src/less/components/navbar.less +60 -19
- package/src/less/components/offcanvas.less +21 -21
- package/src/less/components/position.less +1 -1
- package/src/less/components/sticky.less +7 -0
- package/src/less/components/tooltip.less +1 -0
- package/src/less/components/utility.less +1 -2
- package/src/less/theme/dropdown.less +11 -0
- package/src/less/theme/navbar.less +10 -10
- package/src/scss/components/drop.scss +19 -4
- package/src/scss/components/dropdown.scss +21 -4
- package/src/scss/components/margin.scss +13 -14
- package/src/scss/components/modal.scss +19 -4
- package/src/scss/components/nav.scss +1 -1
- package/src/scss/components/navbar.scss +49 -8
- package/src/scss/components/offcanvas.scss +21 -21
- package/src/scss/components/position.scss +1 -1
- package/src/scss/components/sticky.scss +7 -0
- package/src/scss/components/tooltip.scss +1 -0
- package/src/scss/components/utility.scss +1 -2
- package/src/scss/mixins-theme.scss +8 -10
- package/src/scss/mixins.scss +2 -0
- package/src/scss/theme/dropdown.scss +8 -0
- package/src/scss/theme/navbar.scss +7 -0
- package/src/scss/variables-theme.scss +26 -11
- package/src/scss/variables.scss +24 -11
- package/tests/drop.html +165 -4
- package/tests/dropdown.html +234 -13
- package/tests/height-viewport.html +62 -0
- package/tests/navbar.html +333 -64
- package/tests/notification.html +1 -1
- package/tests/offcanvas.html +8 -8
- package/tests/sticky-navbar.html +132 -0
- package/tests/sticky-parallax.html +2 -1
- package/tests/sticky.html +5 -4
|
@@ -5,13 +5,15 @@ import {
|
|
|
5
5
|
css,
|
|
6
6
|
fastdom,
|
|
7
7
|
hasClass,
|
|
8
|
-
height,
|
|
9
8
|
includes,
|
|
10
9
|
isBoolean,
|
|
11
10
|
isFunction,
|
|
12
11
|
isVisible,
|
|
13
12
|
noop,
|
|
13
|
+
offset,
|
|
14
14
|
removeClass,
|
|
15
|
+
scrollParents,
|
|
16
|
+
startsWith,
|
|
15
17
|
toFloat,
|
|
16
18
|
toggleClass,
|
|
17
19
|
toNodes,
|
|
@@ -24,6 +26,7 @@ export default {
|
|
|
24
26
|
cls: Boolean,
|
|
25
27
|
animation: 'list',
|
|
26
28
|
duration: Number,
|
|
29
|
+
velocity: Number,
|
|
27
30
|
origin: String,
|
|
28
31
|
transition: String,
|
|
29
32
|
},
|
|
@@ -32,6 +35,7 @@ export default {
|
|
|
32
35
|
cls: false,
|
|
33
36
|
animation: [false],
|
|
34
37
|
duration: 200,
|
|
38
|
+
velocity: 0.2,
|
|
35
39
|
origin: false,
|
|
36
40
|
transition: 'ease',
|
|
37
41
|
clsEnter: 'uk-togglabe-enter',
|
|
@@ -39,7 +43,7 @@ export default {
|
|
|
39
43
|
|
|
40
44
|
initProps: {
|
|
41
45
|
overflow: '',
|
|
42
|
-
|
|
46
|
+
maxHeight: '',
|
|
43
47
|
paddingTop: '',
|
|
44
48
|
paddingBottom: '',
|
|
45
49
|
marginTop: '',
|
|
@@ -49,7 +53,7 @@ export default {
|
|
|
49
53
|
|
|
50
54
|
hideProps: {
|
|
51
55
|
overflow: 'hidden',
|
|
52
|
-
|
|
56
|
+
maxHeight: 0,
|
|
53
57
|
paddingTop: 0,
|
|
54
58
|
paddingBottom: 0,
|
|
55
59
|
marginTop: 0,
|
|
@@ -64,7 +68,7 @@ export default {
|
|
|
64
68
|
},
|
|
65
69
|
|
|
66
70
|
hasTransition({ animation }) {
|
|
67
|
-
return
|
|
71
|
+
return startsWith(animation[0], 'slide');
|
|
68
72
|
},
|
|
69
73
|
},
|
|
70
74
|
|
|
@@ -83,9 +87,9 @@ export default {
|
|
|
83
87
|
isFunction(animate)
|
|
84
88
|
? animate
|
|
85
89
|
: animate === false || !this.hasAnimation
|
|
86
|
-
? this
|
|
90
|
+
? toggleInstant(this)
|
|
87
91
|
: this.hasTransition
|
|
88
|
-
?
|
|
92
|
+
? toggleTransition(this)
|
|
89
93
|
: toggleAnimation(this)
|
|
90
94
|
)(el, show);
|
|
91
95
|
|
|
@@ -149,14 +153,43 @@ export default {
|
|
|
149
153
|
},
|
|
150
154
|
};
|
|
151
155
|
|
|
152
|
-
|
|
156
|
+
function toggleInstant({ _toggle }) {
|
|
157
|
+
return (el, show) => {
|
|
158
|
+
Animation.cancel(el);
|
|
159
|
+
Transition.cancel(el);
|
|
160
|
+
return _toggle(el, show);
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function toggleTransition(cmp) {
|
|
165
|
+
switch (cmp.animation[0]) {
|
|
166
|
+
case 'slide-left':
|
|
167
|
+
return slideHorizontal(cmp);
|
|
168
|
+
case 'slide-right':
|
|
169
|
+
return slideHorizontal(cmp, true);
|
|
170
|
+
}
|
|
171
|
+
return slide(cmp);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export function slide({
|
|
175
|
+
isToggled,
|
|
176
|
+
duration,
|
|
177
|
+
velocity,
|
|
178
|
+
initProps,
|
|
179
|
+
hideProps,
|
|
180
|
+
transition,
|
|
181
|
+
_toggle,
|
|
182
|
+
}) {
|
|
153
183
|
return (el, show) => {
|
|
154
184
|
const inProgress = Transition.inProgress(el);
|
|
155
|
-
const inner =
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
185
|
+
const inner =
|
|
186
|
+
!inProgress && el.hasChildNodes()
|
|
187
|
+
? toFloat(css(el.firstElementChild, 'marginTop')) +
|
|
188
|
+
toFloat(css(el.lastElementChild, 'marginBottom'))
|
|
189
|
+
: 0;
|
|
190
|
+
const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
|
|
191
|
+
|
|
192
|
+
const props = inProgress ? css(el, Object.keys(initProps)) : show ? hideProps : initProps;
|
|
160
193
|
|
|
161
194
|
Transition.cancel(el);
|
|
162
195
|
|
|
@@ -164,32 +197,97 @@ export function toggleHeight({ isToggled, duration, initProps, hideProps, transi
|
|
|
164
197
|
_toggle(el, true);
|
|
165
198
|
}
|
|
166
199
|
|
|
167
|
-
|
|
200
|
+
css(el, 'maxHeight', '');
|
|
168
201
|
|
|
169
202
|
// Update child components first
|
|
170
203
|
fastdom.flush();
|
|
171
204
|
|
|
172
|
-
const endHeight =
|
|
173
|
-
|
|
205
|
+
const endHeight = toFloat(css(el, 'height')) + inner;
|
|
206
|
+
duration = velocity * endHeight + duration;
|
|
207
|
+
|
|
208
|
+
css(el, { ...props, maxHeight: currentHeight });
|
|
174
209
|
|
|
175
210
|
return (
|
|
176
211
|
show
|
|
177
212
|
? Transition.start(
|
|
178
213
|
el,
|
|
179
|
-
{ ...initProps, overflow: 'hidden',
|
|
180
|
-
|
|
214
|
+
{ ...initProps, overflow: 'hidden', maxHeight: endHeight },
|
|
215
|
+
duration * (1 - currentHeight / endHeight),
|
|
181
216
|
transition
|
|
182
217
|
)
|
|
183
218
|
: Transition.start(
|
|
184
219
|
el,
|
|
185
220
|
hideProps,
|
|
186
|
-
|
|
221
|
+
duration * (currentHeight / endHeight),
|
|
187
222
|
transition
|
|
188
223
|
).then(() => _toggle(el, false))
|
|
189
224
|
).then(() => css(el, initProps));
|
|
190
225
|
};
|
|
191
226
|
}
|
|
192
227
|
|
|
228
|
+
function slideHorizontal({ isToggled, duration, velocity, transition, _toggle }, right) {
|
|
229
|
+
return (el, show) => {
|
|
230
|
+
const visible = isVisible(el);
|
|
231
|
+
const marginLeft = toFloat(css(el, 'marginLeft'));
|
|
232
|
+
|
|
233
|
+
Transition.cancel(el);
|
|
234
|
+
|
|
235
|
+
const [scrollElement] = scrollParents(el);
|
|
236
|
+
css(scrollElement, 'overflowX', 'hidden');
|
|
237
|
+
|
|
238
|
+
if (!isToggled(el)) {
|
|
239
|
+
_toggle(el, true);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const width = toFloat(css(el, 'width'));
|
|
243
|
+
duration = velocity * width + duration;
|
|
244
|
+
|
|
245
|
+
const percent = visible ? ((width + marginLeft * (right ? -1 : 1)) / width) * 100 : 0;
|
|
246
|
+
const offsetEl = offset(el);
|
|
247
|
+
const useClipPath = right
|
|
248
|
+
? offsetEl.right < scrollElement.clientWidth
|
|
249
|
+
: Math.round(offsetEl.left) > 0;
|
|
250
|
+
|
|
251
|
+
css(el, {
|
|
252
|
+
clipPath: useClipPath
|
|
253
|
+
? right
|
|
254
|
+
? `polygon(0 0,${percent}% 0,${percent}% 100%,0 100%)`
|
|
255
|
+
: `polygon(${100 - percent}% 0,100% 0,100% 100%,${100 - percent}% 100%)`
|
|
256
|
+
: '',
|
|
257
|
+
marginLeft: (((100 - percent) * (right ? 1 : -1)) / 100) * width,
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
return (
|
|
261
|
+
show
|
|
262
|
+
? Transition.start(
|
|
263
|
+
el,
|
|
264
|
+
{
|
|
265
|
+
clipPath: useClipPath ? `polygon(0 0,100% 0,100% 100%,0 100%)` : '',
|
|
266
|
+
marginLeft: 0,
|
|
267
|
+
},
|
|
268
|
+
duration * (1 - percent / 100),
|
|
269
|
+
transition
|
|
270
|
+
)
|
|
271
|
+
: Transition.start(
|
|
272
|
+
el,
|
|
273
|
+
{
|
|
274
|
+
clipPath: useClipPath
|
|
275
|
+
? right
|
|
276
|
+
? `polygon(0 0,0 0,0 100%,0 100%)`
|
|
277
|
+
: `polygon(100% 0,100% 0,100% 100%,100% 100%)`
|
|
278
|
+
: '',
|
|
279
|
+
marginLeft: (right ? 1 : -1) * width,
|
|
280
|
+
},
|
|
281
|
+
duration * (percent / 100),
|
|
282
|
+
transition
|
|
283
|
+
).then(() => _toggle(el, false))
|
|
284
|
+
).then(() => {
|
|
285
|
+
css(scrollElement, 'overflowX', '');
|
|
286
|
+
css(el, { clipPath: '', marginLeft: '' });
|
|
287
|
+
});
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
193
291
|
function toggleAnimation(cmp) {
|
|
194
292
|
return (el, show) => {
|
|
195
293
|
Animation.cancel(el);
|
package/src/js/util/animation.js
CHANGED
|
@@ -5,6 +5,7 @@ import { startsWith, toNodes } from './lang';
|
|
|
5
5
|
import { addClass, hasClass, removeClass, removeClasses } from './class';
|
|
6
6
|
|
|
7
7
|
export function transition(element, props, duration = 400, timing = 'linear') {
|
|
8
|
+
duration = Math.round(duration);
|
|
8
9
|
return Promise.all(
|
|
9
10
|
toNodes(element).map(
|
|
10
11
|
(element) =>
|
package/src/js/util/position.js
CHANGED
|
@@ -49,6 +49,10 @@ function attachTo(element, target, options) {
|
|
|
49
49
|
return position;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
function moveBy(start, end, dim) {
|
|
53
|
+
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
52
56
|
function attachToWithFlip(element, target, options) {
|
|
53
57
|
const position = attachTo(element, target, options);
|
|
54
58
|
const targetDim = offset(target);
|
|
@@ -59,7 +63,7 @@ function attachToWithFlip(element, target, options) {
|
|
|
59
63
|
offset: elOffset,
|
|
60
64
|
boundary,
|
|
61
65
|
viewport,
|
|
62
|
-
|
|
66
|
+
viewportOffset,
|
|
63
67
|
} = options;
|
|
64
68
|
|
|
65
69
|
let viewports = scrollParents(element);
|
|
@@ -80,9 +84,9 @@ function attachToWithFlip(element, target, options) {
|
|
|
80
84
|
|
|
81
85
|
viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
|
|
82
86
|
|
|
83
|
-
if (
|
|
84
|
-
viewport[start] +=
|
|
85
|
-
viewport[end] -=
|
|
87
|
+
if (viewportOffset) {
|
|
88
|
+
viewport[start] += viewportOffset;
|
|
89
|
+
viewport[end] -= viewportOffset;
|
|
86
90
|
}
|
|
87
91
|
|
|
88
92
|
if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
|
|
@@ -139,19 +143,21 @@ function attachToWithFlip(element, target, options) {
|
|
|
139
143
|
return false;
|
|
140
144
|
}
|
|
141
145
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
146
|
+
if (flip === true || includes(flip, dirs[1 - i][1])) {
|
|
147
|
+
const newPos = attachToWithFlip(element, target, {
|
|
148
|
+
...options,
|
|
149
|
+
attach: {
|
|
150
|
+
element: elAttach.map(flipDir).reverse(),
|
|
151
|
+
target: targetAttach.map(flipDir).reverse(),
|
|
152
|
+
},
|
|
153
|
+
offset: elOffset.reverse(),
|
|
154
|
+
flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
|
|
155
|
+
recursion: true,
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
|
|
159
|
+
return newPos;
|
|
160
|
+
}
|
|
155
161
|
}
|
|
156
162
|
}
|
|
157
163
|
|
|
@@ -172,10 +178,6 @@ function attachToWithFlip(element, target, options) {
|
|
|
172
178
|
return offsetPosition;
|
|
173
179
|
}
|
|
174
180
|
|
|
175
|
-
function moveBy(start, end, dim) {
|
|
176
|
-
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
181
|
function getIntersectionArea(...rects) {
|
|
180
182
|
let area = {};
|
|
181
183
|
for (const rect of rects) {
|
|
@@ -188,7 +190,7 @@ function getIntersectionArea(...rects) {
|
|
|
188
190
|
}
|
|
189
191
|
|
|
190
192
|
function isInScrollArea(position, scrollElement, dir) {
|
|
191
|
-
const viewport = offsetViewport(scrollElement);
|
|
193
|
+
const viewport = offsetViewport(scrollElement, false);
|
|
192
194
|
const [prop, , start, end] = dirs[dir];
|
|
193
195
|
viewport[start] -= scrollElement[`scroll${ucfirst(start)}`];
|
|
194
196
|
viewport[end] = viewport[start] + scrollElement[`scroll${ucfirst(prop)}`];
|
package/src/js/util/viewport.js
CHANGED
|
@@ -128,7 +128,7 @@ export function scrolledOver(element, startOffset = 0, endOffset = 0) {
|
|
|
128
128
|
return clamp((scrollTop - start) / (end - start));
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
export function scrollParents(element, overflowRe = /auto|scroll|hidden/, scrollable = false) {
|
|
131
|
+
export function scrollParents(element, overflowRe = /auto|scroll|hidden|clip/, scrollable = false) {
|
|
132
132
|
const scrollEl = scrollingElement(element);
|
|
133
133
|
|
|
134
134
|
let ancestors = parents(element).reverse();
|
|
@@ -153,32 +153,25 @@ export function scrollParents(element, overflowRe = /auto|scroll|hidden/, scroll
|
|
|
153
153
|
export function offsetViewport(scrollElement) {
|
|
154
154
|
let viewportElement = getViewport(scrollElement);
|
|
155
155
|
|
|
156
|
-
// iOS 12 returns <body> as scrollingElement
|
|
157
|
-
if (viewportElement === scrollingElement(viewportElement)) {
|
|
158
|
-
viewportElement = document.documentElement;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
156
|
let rect = offset(viewportElement);
|
|
162
157
|
for (let [prop, dir, start, end] of [
|
|
163
158
|
['width', 'x', 'left', 'right'],
|
|
164
159
|
['height', 'y', 'top', 'bottom'],
|
|
165
160
|
]) {
|
|
166
|
-
if (!isWindow(
|
|
161
|
+
if (!isWindow(viewportElement)) {
|
|
167
162
|
rect[start] += toFloat(css(viewportElement, `border${ucfirst(start)}Width`));
|
|
163
|
+
} else {
|
|
164
|
+
// iOS 12 returns <body> as scrollingElement
|
|
165
|
+
viewportElement = viewportElement.document.documentElement;
|
|
168
166
|
}
|
|
169
|
-
rect[prop] = rect[dir] = (
|
|
170
|
-
isWindow(viewportElement) ? scrollingElement(viewportElement) : viewportElement
|
|
171
|
-
)[`client${ucfirst(prop)}`];
|
|
167
|
+
rect[prop] = rect[dir] = viewportElement[`client${ucfirst(prop)}`];
|
|
172
168
|
rect[end] = rect[prop] + rect[start];
|
|
173
169
|
}
|
|
174
170
|
return rect;
|
|
175
171
|
}
|
|
176
172
|
|
|
177
173
|
function scrollingElement(element) {
|
|
178
|
-
|
|
179
|
-
document: { scrollingElement },
|
|
180
|
-
} = toWindow(element);
|
|
181
|
-
return scrollingElement;
|
|
174
|
+
return toWindow(element).document.scrollingElement;
|
|
182
175
|
}
|
|
183
176
|
|
|
184
177
|
function getViewport(scrollElement) {
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
// Component: `uk-drop`
|
|
5
5
|
//
|
|
6
|
-
// Modifiers: `uk-drop-
|
|
7
|
-
// `uk-drop-bottom-*`
|
|
8
|
-
// `uk-drop-left-*`
|
|
9
|
-
// `uk-drop-right-*`
|
|
6
|
+
// Modifiers: `uk-drop-stretch`
|
|
10
7
|
// `uk-drop-stack`
|
|
11
8
|
// `uk-drop-grid`
|
|
12
9
|
//
|
|
@@ -22,6 +19,7 @@
|
|
|
22
19
|
|
|
23
20
|
@drop-z-index: @global-z-index + 20;
|
|
24
21
|
@drop-margin: @global-margin;
|
|
22
|
+
@drop-viewport-margin: 15px;
|
|
25
23
|
@drop-width: 300px;
|
|
26
24
|
|
|
27
25
|
|
|
@@ -42,6 +40,7 @@
|
|
|
42
40
|
position: absolute;
|
|
43
41
|
z-index: @drop-z-index;
|
|
44
42
|
--uk-position-offset: @drop-margin;
|
|
43
|
+
--uk-position-viewport-offset: @drop-viewport-margin;
|
|
45
44
|
/* 3 */
|
|
46
45
|
box-sizing: border-box;
|
|
47
46
|
width: @drop-width;
|
|
@@ -51,6 +50,22 @@
|
|
|
51
50
|
.uk-drop.uk-open { display: block; }
|
|
52
51
|
|
|
53
52
|
|
|
53
|
+
/* Stretch modifier
|
|
54
|
+
========================================================================== */
|
|
55
|
+
|
|
56
|
+
/*
|
|
57
|
+
* 1. Allow scrolling
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
.uk-drop-stretch {
|
|
61
|
+
--uk-position-offset: 0;
|
|
62
|
+
--uk-position-viewport-offset: 0;
|
|
63
|
+
/* 1 */
|
|
64
|
+
overflow-y: auto;
|
|
65
|
+
-webkit-overflow-scrolling: touch;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
54
69
|
/* Grid modifiers
|
|
55
70
|
========================================================================== */
|
|
56
71
|
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
//
|
|
6
6
|
// Adopted: `uk-dropdown-nav`
|
|
7
7
|
//
|
|
8
|
-
// Modifiers: `uk-dropdown-
|
|
9
|
-
// `uk-dropdown-bottom-*`
|
|
10
|
-
// `uk-dropdown-left-*`
|
|
11
|
-
// `uk-dropdown-right-*`
|
|
8
|
+
// Modifiers: `uk-dropdown-stretch`
|
|
12
9
|
// `uk-dropdown-stack`
|
|
13
10
|
// `uk-dropdown-grid`
|
|
14
11
|
//
|
|
@@ -22,6 +19,7 @@
|
|
|
22
19
|
|
|
23
20
|
@dropdown-z-index: @global-z-index + 20;
|
|
24
21
|
@dropdown-margin: @global-small-margin;
|
|
22
|
+
@dropdown-viewport-margin: 15px;
|
|
25
23
|
@dropdown-min-width: 200px;
|
|
26
24
|
@dropdown-padding: 15px;
|
|
27
25
|
@dropdown-background: @global-muted-background;
|
|
@@ -55,6 +53,7 @@
|
|
|
55
53
|
position: absolute;
|
|
56
54
|
z-index: @dropdown-z-index;
|
|
57
55
|
--uk-position-offset: @dropdown-margin;
|
|
56
|
+
--uk-position-viewport-offset: @dropdown-viewport-margin;
|
|
58
57
|
/* 3 */
|
|
59
58
|
box-sizing: border-box;
|
|
60
59
|
min-width: @dropdown-min-width;
|
|
@@ -70,6 +69,23 @@
|
|
|
70
69
|
.uk-dropdown.uk-open { display: block; }
|
|
71
70
|
|
|
72
71
|
|
|
72
|
+
/* Stretch modifier
|
|
73
|
+
========================================================================== */
|
|
74
|
+
|
|
75
|
+
/*
|
|
76
|
+
* 1. Allow scrolling
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
.uk-dropdown-stretch {
|
|
80
|
+
--uk-position-offset: 0;
|
|
81
|
+
--uk-position-viewport-offset: 0;
|
|
82
|
+
/* 1 */
|
|
83
|
+
overflow-y: auto;
|
|
84
|
+
-webkit-overflow-scrolling: touch;
|
|
85
|
+
.hook-dropdown-stretch();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
73
89
|
/* Nav
|
|
74
90
|
* Adopts `uk-nav`
|
|
75
91
|
========================================================================== */
|
|
@@ -144,6 +160,7 @@
|
|
|
144
160
|
.hook-dropdown-misc();
|
|
145
161
|
|
|
146
162
|
.hook-dropdown() {}
|
|
163
|
+
.hook-dropdown-stretch() {}
|
|
147
164
|
.hook-dropdown-nav() {}
|
|
148
165
|
.hook-dropdown-nav-item() {}
|
|
149
166
|
.hook-dropdown-nav-item-hover() {}
|
|
@@ -193,20 +193,20 @@
|
|
|
193
193
|
/* Remove
|
|
194
194
|
========================================================================== */
|
|
195
195
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
196
|
+
.uk-margin-remove { margin: 0 !important; }
|
|
197
|
+
.uk-margin-remove-top { margin-top: 0 !important; }
|
|
198
|
+
.uk-margin-remove-bottom { margin-bottom: 0 !important; }
|
|
199
|
+
.uk-margin-remove-left { margin-left: 0 !important; }
|
|
200
|
+
.uk-margin-remove-right { margin-right: 0 !important; }
|
|
201
|
+
|
|
202
|
+
.uk-margin-remove-vertical {
|
|
203
|
+
margin-top: 0 !important;
|
|
204
|
+
margin-bottom: 0 !important;
|
|
205
|
+
}
|
|
206
206
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
.uk-margin-remove-adjacent + *,
|
|
208
|
+
.uk-margin-remove-first-child > :first-child { margin-top: 0 !important; }
|
|
209
|
+
.uk-margin-remove-last-child > :last-child { margin-bottom: 0 !important; }
|
|
210
210
|
|
|
211
211
|
/* Phone landscape and bigger */
|
|
212
212
|
@media (min-width: @breakpoint-small) {
|
|
@@ -241,7 +241,6 @@
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
|
|
244
|
-
|
|
245
244
|
// Hooks
|
|
246
245
|
// ========================================================================
|
|
247
246
|
|
|
@@ -40,15 +40,21 @@
|
|
|
40
40
|
|
|
41
41
|
@modal-container-width: 1200px;
|
|
42
42
|
|
|
43
|
-
@modal-body-padding-horizontal:
|
|
44
|
-
@modal-body-padding-vertical:
|
|
43
|
+
@modal-body-padding-horizontal: 20px;
|
|
44
|
+
@modal-body-padding-vertical: 20px;
|
|
45
|
+
@modal-body-padding-horizontal-s: @global-gutter;
|
|
46
|
+
@modal-body-padding-vertical-s: @global-gutter;
|
|
45
47
|
|
|
46
|
-
@modal-header-padding-horizontal:
|
|
48
|
+
@modal-header-padding-horizontal: 20px;
|
|
47
49
|
@modal-header-padding-vertical: (@modal-header-padding-horizontal / 2);
|
|
50
|
+
@modal-header-padding-horizontal-s: @global-gutter;
|
|
51
|
+
@modal-header-padding-vertical-s: (@modal-header-padding-horizontal-s / 2);
|
|
48
52
|
@modal-header-background: @global-muted-background;
|
|
49
53
|
|
|
50
|
-
@modal-footer-padding-horizontal:
|
|
54
|
+
@modal-footer-padding-horizontal: 20px;
|
|
51
55
|
@modal-footer-padding-vertical: (@modal-footer-padding-horizontal / 2);
|
|
56
|
+
@modal-footer-padding-horizontal-s: @global-gutter;
|
|
57
|
+
@modal-footer-padding-vertical-s: (@modal-footer-padding-horizontal-s / 2);
|
|
52
58
|
@modal-footer-background: @global-muted-background;
|
|
53
59
|
|
|
54
60
|
@modal-title-font-size: @global-xlarge-font-size;
|
|
@@ -228,6 +234,15 @@
|
|
|
228
234
|
.hook-modal-footer();
|
|
229
235
|
}
|
|
230
236
|
|
|
237
|
+
/* Phone landscape and bigger */
|
|
238
|
+
@media (min-width: @breakpoint-small) {
|
|
239
|
+
|
|
240
|
+
.uk-modal-body { padding: @modal-body-padding-vertical-s @modal-body-padding-horizontal-s; }
|
|
241
|
+
.uk-modal-header { padding: @modal-header-padding-vertical-s @modal-header-padding-horizontal-s; }
|
|
242
|
+
.uk-modal-footer { padding: @modal-footer-padding-vertical-s @modal-footer-padding-horizontal-s; }
|
|
243
|
+
|
|
244
|
+
}
|
|
245
|
+
|
|
231
246
|
/*
|
|
232
247
|
* Remove margin from the last-child
|
|
233
248
|
*/
|