uikit 3.13.8-dev.62c5f9d37 → 3.13.8-dev.9cb7293e5
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 +10 -1
- package/dist/css/uikit-core-rtl.css +31 -5
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +31 -5
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +31 -3
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +31 -3
- 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 +5 -2
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +5 -2
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +13 -10
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +13 -10
- 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 +13 -10
- 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 +41 -49
- 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 +83 -107
- 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 +123 -111
- package/dist/js/uikit.min.js +1 -1
- package/package.json +5 -5
- package/src/js/api/hooks.js +1 -1
- package/src/js/components/lightbox-panel.js +4 -1
- package/src/js/components/tooltip.js +38 -3
- package/src/js/core/accordion.js +1 -1
- package/src/js/core/drop.js +6 -5
- package/src/js/core/height-match.js +7 -15
- package/src/js/core/navbar.js +1 -1
- package/src/js/core/scrollspy.js +45 -26
- package/src/js/core/sticky.js +2 -2
- package/src/js/mixin/media.js +12 -9
- package/src/js/mixin/position.js +4 -43
- package/src/js/util/position.js +4 -1
- package/src/less/components/dropdown.less +11 -1
- package/src/less/components/icon.less +3 -0
- package/src/less/components/nav.less +22 -0
- package/src/less/components/navbar.less +15 -2
- package/src/less/theme/dropdown.less +4 -0
- package/src/less/theme/nav.less +6 -0
- package/src/less/theme/navbar.less +4 -0
- package/src/scss/components/dropdown.scss +11 -1
- package/src/scss/components/icon.scss +3 -0
- package/src/scss/components/nav.scss +22 -0
- package/src/scss/components/navbar.scss +15 -2
- package/src/scss/mixins-theme.scss +4 -0
- package/src/scss/mixins.scss +4 -0
- package/src/scss/theme/dropdown.scss +4 -0
- package/src/scss/theme/nav.scss +6 -0
- package/src/scss/theme/navbar.scss +4 -0
- package/src/scss/variables-theme.scss +5 -1
- package/src/scss/variables.scss +5 -1
- package/tests/dropdown.html +16 -2
- package/tests/nav.html +27 -0
- package/tests/navbar.html +18 -4
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "uikit",
|
|
3
3
|
"title": "UIkit",
|
|
4
4
|
"description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
|
|
5
|
-
"version": "3.13.8-dev.
|
|
5
|
+
"version": "3.13.8-dev.9cb7293e5",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@rollup/plugin-replace": "^4.0.0",
|
|
42
42
|
"archiver": "^5.3.0",
|
|
43
43
|
"camelcase": "^6.3.0",
|
|
44
|
-
"clean-css": "^5.
|
|
44
|
+
"clean-css": "^5.3.0",
|
|
45
45
|
"dateformat": "^5.0.3",
|
|
46
|
-
"esbuild": "^0.14.
|
|
46
|
+
"esbuild": "^0.14.32",
|
|
47
47
|
"eslint": "^8.12.0",
|
|
48
48
|
"eslint-config-prettier": "^8.5.0",
|
|
49
49
|
"fs-extra": "^10.0.1",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"minimist": "^1.2.6",
|
|
54
54
|
"number-precision": "^1.5.2",
|
|
55
55
|
"p-limit": "^4.0.0",
|
|
56
|
-
"prettier": "^2.6.
|
|
56
|
+
"prettier": "^2.6.2",
|
|
57
57
|
"rollup": "^2.70.1",
|
|
58
|
-
"rollup-plugin-esbuild": "^4.
|
|
58
|
+
"rollup-plugin-esbuild": "^4.9.1",
|
|
59
59
|
"rollup-plugin-html": "^0.2.1",
|
|
60
60
|
"rollup-plugin-modify": "^3.0.0",
|
|
61
61
|
"rtlcss": "^3.5.0",
|
package/src/js/api/hooks.js
CHANGED
|
@@ -215,7 +215,10 @@ export default {
|
|
|
215
215
|
};
|
|
216
216
|
|
|
217
217
|
// Image
|
|
218
|
-
if (
|
|
218
|
+
if (
|
|
219
|
+
type === 'image' ||
|
|
220
|
+
src.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)
|
|
221
|
+
) {
|
|
219
222
|
try {
|
|
220
223
|
const { width, height } = await getImage(src, attrs.srcset, attrs.size);
|
|
221
224
|
this.setItem(item, createEl('img', { src, width, height, alt, ...attrs }));
|
|
@@ -6,9 +6,11 @@ import {
|
|
|
6
6
|
attr,
|
|
7
7
|
flipPosition,
|
|
8
8
|
hasAttr,
|
|
9
|
+
includes,
|
|
9
10
|
isFocusable,
|
|
10
11
|
isTouch,
|
|
11
12
|
matches,
|
|
13
|
+
offset,
|
|
12
14
|
on,
|
|
13
15
|
once,
|
|
14
16
|
pointerDown,
|
|
@@ -104,10 +106,12 @@ export default {
|
|
|
104
106
|
|
|
105
107
|
this.positionAt(this.tooltip, this.$el);
|
|
106
108
|
|
|
109
|
+
const [dir, align] = getAlignment(this.tooltip, this.$el, this.pos);
|
|
110
|
+
|
|
107
111
|
this.origin =
|
|
108
|
-
this.
|
|
109
|
-
? `${flipPosition(
|
|
110
|
-
: `${
|
|
112
|
+
this.axis === 'y'
|
|
113
|
+
? `${flipPosition(dir)}-${align}`
|
|
114
|
+
: `${align}-${flipPosition(dir)}`;
|
|
111
115
|
});
|
|
112
116
|
|
|
113
117
|
this.toggleElement(this.tooltip, true);
|
|
@@ -143,3 +147,34 @@ function makeFocusable(el) {
|
|
|
143
147
|
attr(el, 'tabindex', '0');
|
|
144
148
|
}
|
|
145
149
|
}
|
|
150
|
+
|
|
151
|
+
function getAlignment(el, target, [dir, align]) {
|
|
152
|
+
const elOffset = offset(el);
|
|
153
|
+
const targetOffset = offset(target);
|
|
154
|
+
const properties = [
|
|
155
|
+
['left', 'right'],
|
|
156
|
+
['top', 'bottom'],
|
|
157
|
+
];
|
|
158
|
+
|
|
159
|
+
for (const props of properties) {
|
|
160
|
+
if (elOffset[props[0]] >= targetOffset[props[1]]) {
|
|
161
|
+
dir = props[1];
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
if (elOffset[props[1]] <= targetOffset[props[0]]) {
|
|
165
|
+
dir = props[0];
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const props = includes(properties[0], dir) ? properties[1] : properties[0];
|
|
171
|
+
if (elOffset[props[0]] === targetOffset[props[0]]) {
|
|
172
|
+
align = props[0];
|
|
173
|
+
} else if (elOffset[props[1]] === targetOffset[props[1]]) {
|
|
174
|
+
align = props[1];
|
|
175
|
+
} else {
|
|
176
|
+
align = 'center';
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return [dir, align];
|
|
180
|
+
}
|
package/src/js/core/accordion.js
CHANGED
package/src/js/core/drop.js
CHANGED
|
@@ -362,17 +362,18 @@ export default {
|
|
|
362
362
|
const boundaryOffset = offset(boundary);
|
|
363
363
|
const targetOffset = offset(this.target);
|
|
364
364
|
const alignTo = this.boundaryAlign ? boundaryOffset : targetOffset;
|
|
365
|
+
const prop = this.axis === 'y' ? 'width' : 'height';
|
|
366
|
+
|
|
367
|
+
css(this.$el, `max-${prop}`, '');
|
|
365
368
|
|
|
366
369
|
if (this.pos[1] === 'justify') {
|
|
367
|
-
const prop = this.getAxis() === 'y' ? 'width' : 'height';
|
|
368
370
|
css(this.$el, prop, alignTo[prop]);
|
|
369
|
-
} else if (
|
|
370
|
-
this.$el.offsetWidth >
|
|
371
|
-
Math.max(boundaryOffset.right - alignTo.left, alignTo.right - boundaryOffset.left)
|
|
372
|
-
) {
|
|
371
|
+
} else if (this.$el.offsetWidth > boundaryOffset.width) {
|
|
373
372
|
addClass(this.$el, `${this.clsDrop}-stack`);
|
|
374
373
|
}
|
|
375
374
|
|
|
375
|
+
css(this.$el, `max-${prop}`, boundaryOffset[prop]);
|
|
376
|
+
|
|
376
377
|
this.positionAt(this.$el, this.boundaryAlign ? boundary : this.target, boundary);
|
|
377
378
|
},
|
|
378
379
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Resize from '../mixin/resize';
|
|
2
2
|
import { getRows } from './margin';
|
|
3
|
-
import { $$, boxModelAdjust, css, dimensions, isVisible
|
|
3
|
+
import { $$, boxModelAdjust, css, dimensions, isVisible } from 'uikit-util';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
mixins: [Resize],
|
|
@@ -56,22 +56,14 @@ function match(elements) {
|
|
|
56
56
|
return { heights: [''], elements };
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
css(elements, 'minHeight', '');
|
|
59
60
|
let heights = elements.map(getHeight);
|
|
60
|
-
|
|
61
|
-
const hasMinHeight = elements.some((el) => el.style.minHeight);
|
|
62
|
-
const hasShrunk = elements.some((el, i) => !el.style.minHeight && heights[i] < max);
|
|
63
|
-
|
|
64
|
-
if (hasMinHeight && hasShrunk) {
|
|
65
|
-
css(elements, 'minHeight', '');
|
|
66
|
-
heights = elements.map(getHeight);
|
|
67
|
-
max = Math.max(...heights);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
heights = elements.map((el, i) =>
|
|
71
|
-
heights[i] === max && toFloat(el.style.minHeight).toFixed(2) !== max.toFixed(2) ? '' : max
|
|
72
|
-
);
|
|
61
|
+
const max = Math.max(...heights);
|
|
73
62
|
|
|
74
|
-
return {
|
|
63
|
+
return {
|
|
64
|
+
heights: elements.map((el, i) => (heights[i].toFixed(2) === max.toFixed(2) ? '' : max)),
|
|
65
|
+
elements,
|
|
66
|
+
};
|
|
75
67
|
}
|
|
76
68
|
|
|
77
69
|
function getHeight(element) {
|
package/src/js/core/navbar.js
CHANGED
package/src/js/core/scrollspy.js
CHANGED
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
css,
|
|
5
5
|
filter,
|
|
6
6
|
data as getData,
|
|
7
|
-
|
|
7
|
+
observeIntersection,
|
|
8
8
|
once,
|
|
9
9
|
removeClass,
|
|
10
10
|
removeClasses,
|
|
11
11
|
toggleClass,
|
|
12
|
+
toPx,
|
|
12
13
|
trigger,
|
|
13
14
|
} from 'uikit-util';
|
|
14
15
|
|
|
15
|
-
const stateKey = '_ukScrollspy';
|
|
16
16
|
export default {
|
|
17
17
|
mixins: [Scroll],
|
|
18
18
|
|
|
@@ -45,43 +45,64 @@ export default {
|
|
|
45
45
|
return target ? $$(target, $el) : [$el];
|
|
46
46
|
},
|
|
47
47
|
|
|
48
|
-
watch(elements) {
|
|
48
|
+
watch(elements, prev) {
|
|
49
49
|
if (this.hidden) {
|
|
50
50
|
css(filter(elements, `:not(.${this.inViewClass})`), 'visibility', 'hidden');
|
|
51
51
|
}
|
|
52
|
+
|
|
53
|
+
if (prev) {
|
|
54
|
+
this.$reset();
|
|
55
|
+
}
|
|
52
56
|
},
|
|
53
57
|
|
|
54
58
|
immediate: true,
|
|
55
59
|
},
|
|
56
60
|
},
|
|
57
61
|
|
|
62
|
+
connected() {
|
|
63
|
+
this._data.elements = new Map();
|
|
64
|
+
this.registerObserver(
|
|
65
|
+
observeIntersection(
|
|
66
|
+
this.elements,
|
|
67
|
+
(records) => {
|
|
68
|
+
const elements = this._data.elements;
|
|
69
|
+
for (const { target: el, isIntersecting } of records) {
|
|
70
|
+
if (!elements.has(el)) {
|
|
71
|
+
elements.set(el, {
|
|
72
|
+
cls: getData(el, 'uk-scrollspy-class') || this.cls,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const state = elements.get(el);
|
|
77
|
+
if (!this.repeat && state.show) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
state.show = isIntersecting;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
this.$emit();
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
rootMargin: `${toPx(this.offsetTop, 'height') - 1}px ${
|
|
88
|
+
toPx(this.offsetLeft, 'width') - 1
|
|
89
|
+
}px`,
|
|
90
|
+
},
|
|
91
|
+
false
|
|
92
|
+
)
|
|
93
|
+
);
|
|
94
|
+
},
|
|
95
|
+
|
|
58
96
|
disconnected() {
|
|
59
|
-
for (const el of this.elements) {
|
|
60
|
-
removeClass(el, this.inViewClass,
|
|
61
|
-
delete el[stateKey];
|
|
97
|
+
for (const [el, state] of this._data.elements.entries()) {
|
|
98
|
+
removeClass(el, this.inViewClass, state?.cls || '');
|
|
62
99
|
}
|
|
63
100
|
},
|
|
64
101
|
|
|
65
102
|
update: [
|
|
66
103
|
{
|
|
67
|
-
read() {
|
|
68
|
-
for (const el of this.elements) {
|
|
69
|
-
if (!el[stateKey]) {
|
|
70
|
-
el[stateKey] = { cls: getData(el, 'uk-scrollspy-class') || this.cls };
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (!this.repeat && el[stateKey].show) {
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
el[stateKey].show = isInView(el, this.offsetTop, this.offsetLeft);
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
|
|
81
104
|
write(data) {
|
|
82
|
-
for (const el of
|
|
83
|
-
const state = el[stateKey];
|
|
84
|
-
|
|
105
|
+
for (const [el, state] of data.elements.entries()) {
|
|
85
106
|
if (state.show && !state.inview && !state.queued) {
|
|
86
107
|
state.queued = true;
|
|
87
108
|
|
|
@@ -99,14 +120,12 @@ export default {
|
|
|
99
120
|
}
|
|
100
121
|
}
|
|
101
122
|
},
|
|
102
|
-
|
|
103
|
-
events: ['scroll', 'resize'],
|
|
104
123
|
},
|
|
105
124
|
],
|
|
106
125
|
|
|
107
126
|
methods: {
|
|
108
127
|
toggle(el, inview) {
|
|
109
|
-
const state = el
|
|
128
|
+
const state = this._data.elements.get(el);
|
|
110
129
|
|
|
111
130
|
state.off?.();
|
|
112
131
|
|
package/src/js/core/sticky.js
CHANGED
|
@@ -137,13 +137,13 @@ export default {
|
|
|
137
137
|
return false;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
const hide = this.
|
|
140
|
+
const hide = this.active && types.has('resize');
|
|
141
141
|
if (hide) {
|
|
142
142
|
css(this.selTarget, 'transition', '0s');
|
|
143
143
|
this.hide();
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
if (!this.
|
|
146
|
+
if (!this.active) {
|
|
147
147
|
height = getOffset(this.$el).height;
|
|
148
148
|
margin = css(this.$el, 'margin');
|
|
149
149
|
}
|
package/src/js/mixin/media.js
CHANGED
|
@@ -20,16 +20,19 @@ export default {
|
|
|
20
20
|
|
|
21
21
|
connected() {
|
|
22
22
|
const media = toMedia(this.media);
|
|
23
|
-
this.
|
|
24
|
-
|
|
25
|
-
this.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
this.matchMedia = true;
|
|
24
|
+
if (media) {
|
|
25
|
+
this.mediaObj = window.matchMedia(media);
|
|
26
|
+
const handler = () => {
|
|
27
|
+
this.matchMedia = this.mediaObj.matches;
|
|
28
|
+
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
29
|
+
};
|
|
30
|
+
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
31
|
+
handler();
|
|
32
|
+
this.$emit('resize');
|
|
33
|
+
});
|
|
29
34
|
handler();
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
handler();
|
|
35
|
+
}
|
|
33
36
|
},
|
|
34
37
|
|
|
35
38
|
disconnected() {
|
package/src/js/mixin/position.js
CHANGED
|
@@ -25,21 +25,19 @@ export default {
|
|
|
25
25
|
|
|
26
26
|
connected() {
|
|
27
27
|
this.pos = this.$props.pos.split('-').concat('center').slice(0, 2);
|
|
28
|
-
this.
|
|
29
|
-
this.align = this.pos[1];
|
|
28
|
+
this.axis = includes(['top', 'bottom'], this.pos[0]) ? 'y' : 'x';
|
|
30
29
|
},
|
|
31
30
|
|
|
32
31
|
methods: {
|
|
33
32
|
positionAt(element, target, boundary) {
|
|
34
33
|
const [dir, align] = this.pos;
|
|
35
|
-
const axis = this.getAxis(dir);
|
|
36
34
|
|
|
37
35
|
let { offset } = this;
|
|
38
36
|
if (!isNumeric(offset)) {
|
|
39
37
|
const node = $(offset);
|
|
40
38
|
offset = node
|
|
41
|
-
? getOffset(node)[axis === 'x' ? 'left' : 'top'] -
|
|
42
|
-
getOffset(target)[axis === 'x' ? 'right' : 'bottom']
|
|
39
|
+
? getOffset(node)[this.axis === 'x' ? 'left' : 'top'] -
|
|
40
|
+
getOffset(target)[this.axis === 'x' ? 'right' : 'bottom']
|
|
43
41
|
: 0;
|
|
44
42
|
}
|
|
45
43
|
offset = toPx(offset) + toPx(getCssVar('position-offset', element));
|
|
@@ -50,7 +48,7 @@ export default {
|
|
|
50
48
|
target: [dir, align],
|
|
51
49
|
};
|
|
52
50
|
|
|
53
|
-
if (axis === 'y') {
|
|
51
|
+
if (this.axis === 'y') {
|
|
54
52
|
for (const prop in attach) {
|
|
55
53
|
attach[prop] = attach[prop].reverse();
|
|
56
54
|
}
|
|
@@ -63,43 +61,6 @@ export default {
|
|
|
63
61
|
boundary,
|
|
64
62
|
flip: this.flip,
|
|
65
63
|
});
|
|
66
|
-
|
|
67
|
-
[this.dir, this.align] = getAlignment(element, target, this.pos);
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
getAxis(dir = this.dir) {
|
|
71
|
-
return includes(['top', 'bottom'], dir) ? 'y' : 'x';
|
|
72
64
|
},
|
|
73
65
|
},
|
|
74
66
|
};
|
|
75
|
-
|
|
76
|
-
function getAlignment(el, target, [dir, align]) {
|
|
77
|
-
const elOffset = getOffset(el);
|
|
78
|
-
const targetOffset = getOffset(target);
|
|
79
|
-
const properties = [
|
|
80
|
-
['left', 'right'],
|
|
81
|
-
['top', 'bottom'],
|
|
82
|
-
];
|
|
83
|
-
|
|
84
|
-
for (const props of properties) {
|
|
85
|
-
if (elOffset[props[0]] >= targetOffset[props[1]]) {
|
|
86
|
-
dir = props[1];
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
if (elOffset[props[1]] <= targetOffset[props[0]]) {
|
|
90
|
-
dir = props[0];
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const props = includes(properties[0], dir) ? properties[1] : properties[0];
|
|
96
|
-
if (elOffset[props[0]] === targetOffset[props[0]]) {
|
|
97
|
-
align = props[0];
|
|
98
|
-
} else if (elOffset[props[1]] === targetOffset[props[1]]) {
|
|
99
|
-
align = props[1];
|
|
100
|
-
} else {
|
|
101
|
-
align = 'center';
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return [dir, align];
|
|
105
|
-
}
|
package/src/js/util/position.js
CHANGED
|
@@ -75,7 +75,10 @@ function attachToWithFlip(element, target, options) {
|
|
|
75
75
|
const willFlip =
|
|
76
76
|
!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
|
|
77
77
|
|
|
78
|
-
viewport = getIntersectionArea(
|
|
78
|
+
viewport = getIntersectionArea(
|
|
79
|
+
...viewports,
|
|
80
|
+
willFlip || position[prop] > offset(boundary)[prop] ? null : boundary
|
|
81
|
+
);
|
|
79
82
|
const isInStartBoundary = position[start] >= viewport[start];
|
|
80
83
|
const isInEndBoundary = position[end] <= viewport[end];
|
|
81
84
|
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
@dropdown-nav-item-color: @global-muted-color;
|
|
31
31
|
@dropdown-nav-item-hover-color: @global-color;
|
|
32
|
+
@dropdown-nav-subtitle-font-size: @global-small-font-size;
|
|
32
33
|
@dropdown-nav-header-color: @global-emphasis-color;
|
|
33
34
|
@dropdown-nav-divider-border-width: @global-border-width;
|
|
34
35
|
@dropdown-nav-divider-border: @global-border;
|
|
@@ -74,7 +75,6 @@
|
|
|
74
75
|
========================================================================== */
|
|
75
76
|
|
|
76
77
|
.uk-dropdown-nav {
|
|
77
|
-
white-space: nowrap;
|
|
78
78
|
.hook-dropdown-nav();
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -94,6 +94,15 @@
|
|
|
94
94
|
.hook-dropdown-nav-item-hover();
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
/*
|
|
98
|
+
* Subtitle
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
.uk-dropdown-nav .uk-nav-subtitle {
|
|
102
|
+
font-size: @dropdown-nav-subtitle-font-size;
|
|
103
|
+
.hook-dropdown-nav-subtitle();
|
|
104
|
+
}
|
|
105
|
+
|
|
97
106
|
/*
|
|
98
107
|
* Header
|
|
99
108
|
*/
|
|
@@ -138,6 +147,7 @@
|
|
|
138
147
|
.hook-dropdown-nav() {}
|
|
139
148
|
.hook-dropdown-nav-item() {}
|
|
140
149
|
.hook-dropdown-nav-item-hover() {}
|
|
150
|
+
.hook-dropdown-nav-subtitle() {}
|
|
141
151
|
.hook-dropdown-nav-header() {}
|
|
142
152
|
.hook-dropdown-nav-divider() {}
|
|
143
153
|
.hook-dropdown-misc() {}
|
|
@@ -130,10 +130,13 @@ button.uk-icon:not(:disabled) { cursor: pointer; }
|
|
|
130
130
|
|
|
131
131
|
/*
|
|
132
132
|
* Link
|
|
133
|
+
* 1. Allow text within link
|
|
133
134
|
*/
|
|
134
135
|
|
|
135
136
|
.uk-icon-link {
|
|
136
137
|
color: @icon-link-color;
|
|
138
|
+
/* 1 */
|
|
139
|
+
text-decoration: none !important;
|
|
137
140
|
.hook-icon-link();
|
|
138
141
|
}
|
|
139
142
|
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
@nav-default-item-color: @global-muted-color;
|
|
49
49
|
@nav-default-item-hover-color: @global-color;
|
|
50
50
|
@nav-default-item-active-color: @global-emphasis-color;
|
|
51
|
+
@nav-default-subtitle-font-size: @global-small-font-size;
|
|
51
52
|
@nav-default-header-color: @global-emphasis-color;
|
|
52
53
|
@nav-default-divider-border-width: @global-border-width;
|
|
53
54
|
@nav-default-divider-border: @global-border;
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
@nav-primary-item-color: @global-muted-color;
|
|
61
62
|
@nav-primary-item-hover-color: @global-color;
|
|
62
63
|
@nav-primary-item-active-color: @global-emphasis-color;
|
|
64
|
+
@nav-primary-subtitle-font-size: @global-medium-font-size;
|
|
63
65
|
@nav-primary-header-color: @global-emphasis-color;
|
|
64
66
|
@nav-primary-divider-border-width: @global-border-width;
|
|
65
67
|
@nav-primary-divider-border: @global-border;
|
|
@@ -207,6 +209,15 @@ ul.uk-nav-sub {
|
|
|
207
209
|
.hook-nav-default-item-active();
|
|
208
210
|
}
|
|
209
211
|
|
|
212
|
+
/*
|
|
213
|
+
* Subtitle
|
|
214
|
+
*/
|
|
215
|
+
|
|
216
|
+
.uk-nav-default .uk-nav-subtitle {
|
|
217
|
+
font-size: @nav-default-subtitle-font-size;
|
|
218
|
+
.hook-nav-default-subtitle();
|
|
219
|
+
}
|
|
220
|
+
|
|
210
221
|
/*
|
|
211
222
|
* Header
|
|
212
223
|
*/
|
|
@@ -266,6 +277,15 @@ ul.uk-nav-sub {
|
|
|
266
277
|
.hook-nav-primary-item-active();
|
|
267
278
|
}
|
|
268
279
|
|
|
280
|
+
/*
|
|
281
|
+
* Subtitle
|
|
282
|
+
*/
|
|
283
|
+
|
|
284
|
+
.uk-nav-primary .uk-nav-subtitle {
|
|
285
|
+
font-size: @nav-primary-subtitle-font-size;
|
|
286
|
+
.hook-nav-primary-subtitle();
|
|
287
|
+
}
|
|
288
|
+
|
|
269
289
|
/*
|
|
270
290
|
* Header
|
|
271
291
|
*/
|
|
@@ -340,12 +360,14 @@ ul.uk-nav-sub {
|
|
|
340
360
|
.hook-nav-default-item() {}
|
|
341
361
|
.hook-nav-default-item-hover() {}
|
|
342
362
|
.hook-nav-default-item-active() {}
|
|
363
|
+
.hook-nav-default-subtitle() {}
|
|
343
364
|
.hook-nav-default-header() {}
|
|
344
365
|
.hook-nav-default-divider() {}
|
|
345
366
|
.hook-nav-primary() {}
|
|
346
367
|
.hook-nav-primary-item() {}
|
|
347
368
|
.hook-nav-primary-item-hover() {}
|
|
348
369
|
.hook-nav-primary-item-active() {}
|
|
370
|
+
.hook-nav-primary-subtitle() {}
|
|
349
371
|
.hook-nav-primary-header() {}
|
|
350
372
|
.hook-nav-primary-divider() {}
|
|
351
373
|
.hook-nav-dividers() {}
|
|
@@ -66,11 +66,12 @@
|
|
|
66
66
|
|
|
67
67
|
@navbar-dropdown-dropbar-margin-top: 0px;
|
|
68
68
|
@navbar-dropdown-dropbar-margin-bottom: @navbar-dropdown-dropbar-margin-top;
|
|
69
|
-
@navbar-dropdown-dropbar-padding:
|
|
69
|
+
@navbar-dropdown-dropbar-padding-horizontal: @navbar-nav-item-padding-horizontal;
|
|
70
70
|
|
|
71
71
|
@navbar-dropdown-nav-item-color: @global-muted-color;
|
|
72
72
|
@navbar-dropdown-nav-item-hover-color: @global-color;
|
|
73
73
|
@navbar-dropdown-nav-item-active-color: @global-emphasis-color;
|
|
74
|
+
@navbar-dropdown-nav-subtitle-font-size: @global-small-font-size;
|
|
74
75
|
@navbar-dropdown-nav-header-color: @global-emphasis-color;
|
|
75
76
|
@navbar-dropdown-nav-divider-border-width: @global-border-width;
|
|
76
77
|
@navbar-dropdown-nav-divider-border: @global-border;
|
|
@@ -400,7 +401,9 @@
|
|
|
400
401
|
--uk-position-offset: @navbar-dropdown-dropbar-margin-top;
|
|
401
402
|
/* 2 */
|
|
402
403
|
margin-bottom: @navbar-dropdown-dropbar-margin-bottom;
|
|
403
|
-
|
|
404
|
+
/* 3 */
|
|
405
|
+
padding-left: @navbar-dropdown-dropbar-padding-horizontal;
|
|
406
|
+
padding-right: @navbar-dropdown-dropbar-padding-horizontal;
|
|
404
407
|
.hook-navbar-dropdown-dropbar();
|
|
405
408
|
}
|
|
406
409
|
|
|
@@ -434,6 +437,15 @@
|
|
|
434
437
|
.hook-navbar-dropdown-nav-item-active();
|
|
435
438
|
}
|
|
436
439
|
|
|
440
|
+
/*
|
|
441
|
+
* Subtitle
|
|
442
|
+
*/
|
|
443
|
+
|
|
444
|
+
.uk-navbar-dropdown-nav .uk-nav-subtitle {
|
|
445
|
+
font-size: @navbar-dropdown-nav-subtitle-font-size;
|
|
446
|
+
.hook-navbar-dropdown-nav-subtitle();
|
|
447
|
+
}
|
|
448
|
+
|
|
437
449
|
/*
|
|
438
450
|
* Header
|
|
439
451
|
*/
|
|
@@ -502,6 +514,7 @@
|
|
|
502
514
|
.hook-navbar-dropdown-nav-item() {}
|
|
503
515
|
.hook-navbar-dropdown-nav-item-hover() {}
|
|
504
516
|
.hook-navbar-dropdown-nav-item-active() {}
|
|
517
|
+
.hook-navbar-dropdown-nav-subtitle() {}
|
|
505
518
|
.hook-navbar-dropdown-nav-header() {}
|
|
506
519
|
.hook-navbar-dropdown-nav-divider() {}
|
|
507
520
|
.hook-navbar-dropbar(){}
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
@dropdown-padding: 25px;
|
|
11
11
|
@dropdown-background: @global-background;
|
|
12
12
|
|
|
13
|
+
@dropdown-nav-subtitle-font-size: 12px;
|
|
14
|
+
|
|
13
15
|
//
|
|
14
16
|
// New
|
|
15
17
|
//
|
|
@@ -34,6 +36,8 @@
|
|
|
34
36
|
|
|
35
37
|
.hook-dropdown-nav-item-hover() {}
|
|
36
38
|
|
|
39
|
+
.hook-dropdown-nav-subtitle() {}
|
|
40
|
+
|
|
37
41
|
.hook-dropdown-nav-header() {}
|
|
38
42
|
|
|
39
43
|
.hook-dropdown-nav-divider() {}
|
package/src/less/theme/nav.less
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
// Variables
|
|
8
8
|
// ========================================================================
|
|
9
9
|
|
|
10
|
+
@nav-default-subtitle-font-size: 12px;
|
|
11
|
+
|
|
10
12
|
//
|
|
11
13
|
// New
|
|
12
14
|
//
|
|
@@ -49,6 +51,8 @@
|
|
|
49
51
|
|
|
50
52
|
.hook-nav-default-item-active() {}
|
|
51
53
|
|
|
54
|
+
.hook-nav-default-subtitle() {}
|
|
55
|
+
|
|
52
56
|
.hook-nav-default-header() {}
|
|
53
57
|
|
|
54
58
|
.hook-nav-default-divider() {}
|
|
@@ -65,6 +69,8 @@
|
|
|
65
69
|
|
|
66
70
|
.hook-nav-primary-item-active() {}
|
|
67
71
|
|
|
72
|
+
.hook-nav-primary-subtitle() {}
|
|
73
|
+
|
|
68
74
|
.hook-nav-primary-header() {}
|
|
69
75
|
|
|
70
76
|
.hook-nav-primary-divider() {}
|