uikit 3.13.2-dev.13a8eb3ff → 3.13.2-dev.696f00752
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/.eslintrc.json +9 -0
- package/CHANGELOG.md +11 -0
- package/dist/css/uikit-core-rtl.css +15 -63
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +15 -63
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +15 -63
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +15 -63
- 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 +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- 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 +1 -1
- 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 +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 +60 -31
- 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 +207 -185
- 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 +209 -188
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/tooltip.js +2 -3
- package/src/js/core/drop.js +7 -10
- package/src/js/core/navbar.js +10 -5
- package/src/js/core/sticky.js +1 -1
- package/src/js/mixin/media.js +4 -4
- package/src/js/mixin/position.js +53 -24
- package/src/js/util/dimensions.js +2 -2
- package/src/js/util/position.js +125 -129
- package/src/js/util/style.js +13 -19
- package/src/less/components/drop.less +3 -11
- package/src/less/components/dropdown.less +3 -11
- package/src/less/components/navbar.less +11 -12
- package/src/less/components/tooltip.less +2 -11
- package/src/scss/components/drop.scss +3 -11
- package/src/scss/components/dropdown.scss +3 -11
- package/src/scss/components/navbar.scss +11 -12
- package/src/scss/components/tooltip.scss +2 -11
- package/src/scss/variables-theme.scss +5 -4
- package/src/scss/variables.scss +5 -4
- package/tests/drop.html +1 -1
- package/tests/position.html +38 -39
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
// ========================================================================
|
|
22
22
|
|
|
23
23
|
@drop-z-index: @global-z-index + 20;
|
|
24
|
-
@drop-width: 300px;
|
|
25
24
|
@drop-margin: @global-margin;
|
|
25
|
+
@drop-width: 300px;
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
/* ========================================================================
|
|
@@ -41,25 +41,17 @@
|
|
|
41
41
|
/* 2 */
|
|
42
42
|
position: absolute;
|
|
43
43
|
z-index: @drop-z-index;
|
|
44
|
+
--uk-position-margin-offset: @drop-margin;
|
|
44
45
|
/* 3 */
|
|
45
46
|
box-sizing: border-box;
|
|
46
47
|
width: @drop-width;
|
|
48
|
+
max-width: 100vw;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
/* Show */
|
|
50
52
|
.uk-drop.uk-open { display: block; }
|
|
51
53
|
|
|
52
54
|
|
|
53
|
-
/* Direction / Alignment modifiers
|
|
54
|
-
========================================================================== */
|
|
55
|
-
|
|
56
|
-
/* Direction */
|
|
57
|
-
[class*='uk-drop-top'] { margin-top: -@drop-margin; }
|
|
58
|
-
[class*='uk-drop-bottom'] { margin-top: @drop-margin; }
|
|
59
|
-
[class*='uk-drop-left'] { margin-left: -@drop-margin; }
|
|
60
|
-
[class*='uk-drop-right'] { margin-left: @drop-margin; }
|
|
61
|
-
|
|
62
|
-
|
|
63
55
|
/* Grid modifiers
|
|
64
56
|
========================================================================== */
|
|
65
57
|
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
// ========================================================================
|
|
22
22
|
|
|
23
23
|
@dropdown-z-index: @global-z-index + 20;
|
|
24
|
+
@dropdown-margin: @global-small-margin;
|
|
24
25
|
@dropdown-min-width: 200px;
|
|
25
26
|
@dropdown-padding: 15px;
|
|
26
27
|
@dropdown-background: @global-muted-background;
|
|
27
28
|
@dropdown-color: @global-color;
|
|
28
|
-
@dropdown-margin: @global-small-margin;
|
|
29
29
|
|
|
30
30
|
@dropdown-nav-item-color: @global-muted-color;
|
|
31
31
|
@dropdown-nav-item-hover-color: @global-color;
|
|
@@ -53,9 +53,11 @@
|
|
|
53
53
|
/* 2 */
|
|
54
54
|
position: absolute;
|
|
55
55
|
z-index: @dropdown-z-index;
|
|
56
|
+
--uk-position-margin-offset: @dropdown-margin;
|
|
56
57
|
/* 3 */
|
|
57
58
|
box-sizing: border-box;
|
|
58
59
|
min-width: @dropdown-min-width;
|
|
60
|
+
max-width: 100vw;
|
|
59
61
|
/* 4 */
|
|
60
62
|
padding: @dropdown-padding;
|
|
61
63
|
background: @dropdown-background;
|
|
@@ -120,16 +122,6 @@
|
|
|
120
122
|
.uk-dropdown-nav .uk-nav-sub li.uk-active > a { color: @dropdown-nav-sublist-item-hover-color; }
|
|
121
123
|
|
|
122
124
|
|
|
123
|
-
/* Direction / Alignment modifiers
|
|
124
|
-
========================================================================== */
|
|
125
|
-
|
|
126
|
-
/* Direction */
|
|
127
|
-
[class*='uk-dropdown-top'] { margin-top: -@dropdown-margin; }
|
|
128
|
-
[class*='uk-dropdown-bottom'] { margin-top: @dropdown-margin; }
|
|
129
|
-
[class*='uk-dropdown-left'] { margin-left: -@dropdown-margin; }
|
|
130
|
-
[class*='uk-dropdown-right'] { margin-left: @dropdown-margin; }
|
|
131
|
-
|
|
132
|
-
|
|
133
125
|
/* Grid modifiers
|
|
134
126
|
========================================================================== */
|
|
135
127
|
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
@navbar-subtitle-font-size: @global-small-font-size;
|
|
57
57
|
|
|
58
58
|
@navbar-dropdown-z-index: @global-z-index + 20;
|
|
59
|
-
@navbar-dropdown-width: 200px;
|
|
60
59
|
@navbar-dropdown-margin: 0;
|
|
60
|
+
@navbar-dropdown-width: 200px;
|
|
61
61
|
@navbar-dropdown-padding: 15px;
|
|
62
62
|
@navbar-dropdown-background: @global-muted-background;
|
|
63
63
|
@navbar-dropdown-color: @global-color;
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
|
|
67
67
|
@navbar-dropdown-dropbar-margin-top: 0;
|
|
68
68
|
@navbar-dropdown-dropbar-margin-bottom: @navbar-dropdown-dropbar-margin-top;
|
|
69
|
+
@navbar-dropdown-dropbar-padding: @navbar-nav-item-padding-horizontal;
|
|
69
70
|
|
|
70
71
|
@navbar-dropdown-nav-item-color: @global-muted-color;
|
|
71
72
|
@navbar-dropdown-nav-item-hover-color: @global-color;
|
|
@@ -348,9 +349,11 @@
|
|
|
348
349
|
/* 2 */
|
|
349
350
|
position: absolute;
|
|
350
351
|
z-index: @navbar-dropdown-z-index;
|
|
352
|
+
--uk-position-margin-offset: @navbar-dropdown-margin;
|
|
351
353
|
/* 3 */
|
|
352
354
|
box-sizing: border-box;
|
|
353
355
|
width: @navbar-dropdown-width;
|
|
356
|
+
max-width: 100vw;
|
|
354
357
|
/* 4 */
|
|
355
358
|
padding: @navbar-dropdown-padding;
|
|
356
359
|
background: @navbar-dropdown-background;
|
|
@@ -361,16 +364,6 @@
|
|
|
361
364
|
/* Show */
|
|
362
365
|
.uk-navbar-dropdown.uk-open { display: block; }
|
|
363
366
|
|
|
364
|
-
/*
|
|
365
|
-
* Direction / Alignment modifiers
|
|
366
|
-
*/
|
|
367
|
-
|
|
368
|
-
/* Direction */
|
|
369
|
-
[class*='uk-navbar-dropdown-top'] { margin-top: -@navbar-dropdown-margin; }
|
|
370
|
-
[class*='uk-navbar-dropdown-bottom'] { margin-top: @navbar-dropdown-margin; }
|
|
371
|
-
[class*='uk-navbar-dropdown-left'] { margin-left: -@navbar-dropdown-margin; }
|
|
372
|
-
[class*='uk-navbar-dropdown-right'] { margin-left: @navbar-dropdown-margin; }
|
|
373
|
-
|
|
374
367
|
/*
|
|
375
368
|
* Grid
|
|
376
369
|
* Adopts `uk-grid`
|
|
@@ -397,11 +390,17 @@
|
|
|
397
390
|
|
|
398
391
|
/*
|
|
399
392
|
* Dropbar modifier
|
|
393
|
+
* 1. Set position
|
|
394
|
+
* 2. Bottom padding for dropbar
|
|
395
|
+
* 3. Horizontal padding
|
|
400
396
|
*/
|
|
401
397
|
|
|
402
398
|
.uk-navbar-dropdown-dropbar {
|
|
403
|
-
|
|
399
|
+
/* 1 */
|
|
400
|
+
--uk-position-margin-offset: @navbar-dropdown-dropbar-margin-top;
|
|
401
|
+
/* 2 */
|
|
404
402
|
margin-bottom: @navbar-dropdown-dropbar-margin-bottom;
|
|
403
|
+
padding: @navbar-dropdown-dropbar-padding;
|
|
405
404
|
.hook-navbar-dropdown-dropbar();
|
|
406
405
|
}
|
|
407
406
|
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
// ========================================================================
|
|
22
22
|
|
|
23
23
|
@tooltip-z-index: @global-z-index + 30;
|
|
24
|
+
@tooltip-margin: 10px;
|
|
24
25
|
@tooltip-max-width: 200px;
|
|
25
26
|
@tooltip-padding-vertical: 3px;
|
|
26
27
|
@tooltip-padding-horizontal: 6px;
|
|
@@ -29,7 +30,6 @@
|
|
|
29
30
|
@tooltip-color: @global-inverse-color;
|
|
30
31
|
@tooltip-font-size: 12px;
|
|
31
32
|
|
|
32
|
-
@tooltip-margin: 10px;
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
/* ========================================================================
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
/* 2 */
|
|
51
51
|
position: absolute;
|
|
52
52
|
z-index: @tooltip-z-index;
|
|
53
|
+
--uk-position-margin-offset: @dropdown-margin;
|
|
53
54
|
/* 3 */
|
|
54
55
|
top: 0;
|
|
55
56
|
/* 4 */
|
|
@@ -68,16 +69,6 @@
|
|
|
68
69
|
.uk-tooltip.uk-active { display: block; }
|
|
69
70
|
|
|
70
71
|
|
|
71
|
-
/* Direction / Alignment modifiers
|
|
72
|
-
========================================================================== */
|
|
73
|
-
|
|
74
|
-
/* Direction */
|
|
75
|
-
[class*='uk-tooltip-top'] { margin-top: -@tooltip-margin; }
|
|
76
|
-
[class*='uk-tooltip-bottom'] { margin-top: @tooltip-margin; }
|
|
77
|
-
[class*='uk-tooltip-left'] { margin-left: -@tooltip-margin; }
|
|
78
|
-
[class*='uk-tooltip-right'] { margin-left: @tooltip-margin; }
|
|
79
|
-
|
|
80
|
-
|
|
81
72
|
// Hooks
|
|
82
73
|
// ========================================================================
|
|
83
74
|
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
// ========================================================================
|
|
22
22
|
|
|
23
23
|
$drop-z-index: $global-z-index + 20 !default;
|
|
24
|
-
$drop-width: 300px !default;
|
|
25
24
|
$drop-margin: $global-margin !default;
|
|
25
|
+
$drop-width: 300px !default;
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
/* ========================================================================
|
|
@@ -41,25 +41,17 @@ $drop-margin: $global-margin !default;
|
|
|
41
41
|
/* 2 */
|
|
42
42
|
position: absolute;
|
|
43
43
|
z-index: $drop-z-index;
|
|
44
|
+
--uk-position-margin-offset: #{$drop-margin};
|
|
44
45
|
/* 3 */
|
|
45
46
|
box-sizing: border-box;
|
|
46
47
|
width: $drop-width;
|
|
48
|
+
max-width: 100vw;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
/* Show */
|
|
50
52
|
.uk-drop.uk-open { display: block; }
|
|
51
53
|
|
|
52
54
|
|
|
53
|
-
/* Direction / Alignment modifiers
|
|
54
|
-
========================================================================== */
|
|
55
|
-
|
|
56
|
-
/* Direction */
|
|
57
|
-
[class*='uk-drop-top'] { margin-top: (-$drop-margin); }
|
|
58
|
-
[class*='uk-drop-bottom'] { margin-top: $drop-margin; }
|
|
59
|
-
[class*='uk-drop-left'] { margin-left: (-$drop-margin); }
|
|
60
|
-
[class*='uk-drop-right'] { margin-left: $drop-margin; }
|
|
61
|
-
|
|
62
|
-
|
|
63
55
|
/* Grid modifiers
|
|
64
56
|
========================================================================== */
|
|
65
57
|
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
// ========================================================================
|
|
22
22
|
|
|
23
23
|
$dropdown-z-index: $global-z-index + 20 !default;
|
|
24
|
+
$dropdown-margin: $global-small-margin !default;
|
|
24
25
|
$dropdown-min-width: 200px !default;
|
|
25
26
|
$dropdown-padding: 15px !default;
|
|
26
27
|
$dropdown-background: $global-muted-background !default;
|
|
27
28
|
$dropdown-color: $global-color !default;
|
|
28
|
-
$dropdown-margin: $global-small-margin !default;
|
|
29
29
|
|
|
30
30
|
$dropdown-nav-item-color: $global-muted-color !default;
|
|
31
31
|
$dropdown-nav-item-hover-color: $global-color !default;
|
|
@@ -53,9 +53,11 @@ $dropdown-nav-sublist-item-hover-color: $global-color !default;
|
|
|
53
53
|
/* 2 */
|
|
54
54
|
position: absolute;
|
|
55
55
|
z-index: $dropdown-z-index;
|
|
56
|
+
--uk-position-margin-offset: #{$dropdown-margin};
|
|
56
57
|
/* 3 */
|
|
57
58
|
box-sizing: border-box;
|
|
58
59
|
min-width: $dropdown-min-width;
|
|
60
|
+
max-width: 100vw;
|
|
59
61
|
/* 4 */
|
|
60
62
|
padding: $dropdown-padding;
|
|
61
63
|
background: $dropdown-background;
|
|
@@ -120,16 +122,6 @@ $dropdown-nav-sublist-item-hover-color: $global-color !default;
|
|
|
120
122
|
.uk-dropdown-nav .uk-nav-sub li.uk-active > a { color: $dropdown-nav-sublist-item-hover-color; }
|
|
121
123
|
|
|
122
124
|
|
|
123
|
-
/* Direction / Alignment modifiers
|
|
124
|
-
========================================================================== */
|
|
125
|
-
|
|
126
|
-
/* Direction */
|
|
127
|
-
[class*='uk-dropdown-top'] { margin-top: (-$dropdown-margin); }
|
|
128
|
-
[class*='uk-dropdown-bottom'] { margin-top: $dropdown-margin; }
|
|
129
|
-
[class*='uk-dropdown-left'] { margin-left: (-$dropdown-margin); }
|
|
130
|
-
[class*='uk-dropdown-right'] { margin-left: $dropdown-margin; }
|
|
131
|
-
|
|
132
|
-
|
|
133
125
|
/* Grid modifiers
|
|
134
126
|
========================================================================== */
|
|
135
127
|
|
|
@@ -56,8 +56,8 @@ $navbar-toggle-hover-color: $global-color !default;
|
|
|
56
56
|
$navbar-subtitle-font-size: $global-small-font-size !default;
|
|
57
57
|
|
|
58
58
|
$navbar-dropdown-z-index: $global-z-index + 20 !default;
|
|
59
|
-
$navbar-dropdown-width: 200px !default;
|
|
60
59
|
$navbar-dropdown-margin: 0 !default;
|
|
60
|
+
$navbar-dropdown-width: 200px !default;
|
|
61
61
|
$navbar-dropdown-padding: 15px !default;
|
|
62
62
|
$navbar-dropdown-background: $global-muted-background !default;
|
|
63
63
|
$navbar-dropdown-color: $global-color !default;
|
|
@@ -66,6 +66,7 @@ $navbar-dropdown-grid-gutter-vertical: $navbar-dropdown-grid-gutter-ho
|
|
|
66
66
|
|
|
67
67
|
$navbar-dropdown-dropbar-margin-top: 0 !default;
|
|
68
68
|
$navbar-dropdown-dropbar-margin-bottom: $navbar-dropdown-dropbar-margin-top !default;
|
|
69
|
+
$navbar-dropdown-dropbar-padding: $navbar-nav-item-padding-horizontal !default;
|
|
69
70
|
|
|
70
71
|
$navbar-dropdown-nav-item-color: $global-muted-color !default;
|
|
71
72
|
$navbar-dropdown-nav-item-hover-color: $global-color !default;
|
|
@@ -348,9 +349,11 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
|
|
|
348
349
|
/* 2 */
|
|
349
350
|
position: absolute;
|
|
350
351
|
z-index: $navbar-dropdown-z-index;
|
|
352
|
+
--uk-position-margin-offset: #{$navbar-dropdown-margin};
|
|
351
353
|
/* 3 */
|
|
352
354
|
box-sizing: border-box;
|
|
353
355
|
width: $navbar-dropdown-width;
|
|
356
|
+
max-width: 100vw;
|
|
354
357
|
/* 4 */
|
|
355
358
|
padding: $navbar-dropdown-padding;
|
|
356
359
|
background: $navbar-dropdown-background;
|
|
@@ -361,16 +364,6 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
|
|
|
361
364
|
/* Show */
|
|
362
365
|
.uk-navbar-dropdown.uk-open { display: block; }
|
|
363
366
|
|
|
364
|
-
/*
|
|
365
|
-
* Direction / Alignment modifiers
|
|
366
|
-
*/
|
|
367
|
-
|
|
368
|
-
/* Direction */
|
|
369
|
-
[class*='uk-navbar-dropdown-top'] { margin-top: (-$navbar-dropdown-margin); }
|
|
370
|
-
[class*='uk-navbar-dropdown-bottom'] { margin-top: $navbar-dropdown-margin; }
|
|
371
|
-
[class*='uk-navbar-dropdown-left'] { margin-left: (-$navbar-dropdown-margin); }
|
|
372
|
-
[class*='uk-navbar-dropdown-right'] { margin-left: $navbar-dropdown-margin; }
|
|
373
|
-
|
|
374
367
|
/*
|
|
375
368
|
* Grid
|
|
376
369
|
* Adopts `uk-grid`
|
|
@@ -397,11 +390,17 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
|
|
|
397
390
|
|
|
398
391
|
/*
|
|
399
392
|
* Dropbar modifier
|
|
393
|
+
* 1. Set position
|
|
394
|
+
* 2. Bottom padding for dropbar
|
|
395
|
+
* 3. Horizontal padding
|
|
400
396
|
*/
|
|
401
397
|
|
|
402
398
|
.uk-navbar-dropdown-dropbar {
|
|
403
|
-
|
|
399
|
+
/* 1 */
|
|
400
|
+
--uk-position-margin-offset: #{$navbar-dropdown-dropbar-margin-top};
|
|
401
|
+
/* 2 */
|
|
404
402
|
margin-bottom: $navbar-dropdown-dropbar-margin-bottom;
|
|
403
|
+
padding: $navbar-dropdown-dropbar-padding;
|
|
405
404
|
@if(mixin-exists(hook-navbar-dropdown-dropbar)) {@include hook-navbar-dropdown-dropbar();}
|
|
406
405
|
}
|
|
407
406
|
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
// ========================================================================
|
|
22
22
|
|
|
23
23
|
$tooltip-z-index: $global-z-index + 30 !default;
|
|
24
|
+
$tooltip-margin: 10px !default;
|
|
24
25
|
$tooltip-max-width: 200px !default;
|
|
25
26
|
$tooltip-padding-vertical: 3px !default;
|
|
26
27
|
$tooltip-padding-horizontal: 6px !default;
|
|
@@ -29,7 +30,6 @@ $tooltip-border-radius: 2px !default;
|
|
|
29
30
|
$tooltip-color: $global-inverse-color !default;
|
|
30
31
|
$tooltip-font-size: 12px !default;
|
|
31
32
|
|
|
32
|
-
$tooltip-margin: 10px !default;
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
/* ========================================================================
|
|
@@ -50,6 +50,7 @@ $tooltip-margin: 10px !default;
|
|
|
50
50
|
/* 2 */
|
|
51
51
|
position: absolute;
|
|
52
52
|
z-index: $tooltip-z-index;
|
|
53
|
+
--uk-position-margin-offset: #{$dropdown-margin};
|
|
53
54
|
/* 3 */
|
|
54
55
|
top: 0;
|
|
55
56
|
/* 4 */
|
|
@@ -68,16 +69,6 @@ $tooltip-margin: 10px !default;
|
|
|
68
69
|
.uk-tooltip.uk-active { display: block; }
|
|
69
70
|
|
|
70
71
|
|
|
71
|
-
/* Direction / Alignment modifiers
|
|
72
|
-
========================================================================== */
|
|
73
|
-
|
|
74
|
-
/* Direction */
|
|
75
|
-
[class*='uk-tooltip-top'] { margin-top: (-$tooltip-margin); }
|
|
76
|
-
[class*='uk-tooltip-bottom'] { margin-top: $tooltip-margin; }
|
|
77
|
-
[class*='uk-tooltip-left'] { margin-left: (-$tooltip-margin); }
|
|
78
|
-
[class*='uk-tooltip-right'] { margin-left: $tooltip-margin; }
|
|
79
|
-
|
|
80
|
-
|
|
81
72
|
// Hooks
|
|
82
73
|
// ========================================================================
|
|
83
74
|
|
|
@@ -366,14 +366,14 @@ $inverse-dotnav-item-onclick-background: rgba($inverse-global-color, 0.5) !defau
|
|
|
366
366
|
$inverse-dotnav-item-active-background: rgba($inverse-global-color, 0.9) !default;
|
|
367
367
|
$global-z-index: 1000 !default;
|
|
368
368
|
$drop-z-index: $global-z-index + 20 !default;
|
|
369
|
-
$drop-width: 300px !default;
|
|
370
369
|
$drop-margin: $global-margin !default;
|
|
370
|
+
$drop-width: 300px !default;
|
|
371
371
|
$dropdown-z-index: $global-z-index + 20 !default;
|
|
372
|
+
$dropdown-margin: $global-small-margin !default;
|
|
372
373
|
$dropdown-min-width: 200px !default;
|
|
373
374
|
$dropdown-padding: 25px !default;
|
|
374
375
|
$dropdown-background: $global-background !default;
|
|
375
376
|
$dropdown-color: $global-color !default;
|
|
376
|
-
$dropdown-margin: $global-small-margin !default;
|
|
377
377
|
$dropdown-nav-item-color: $global-muted-color !default;
|
|
378
378
|
$dropdown-nav-item-hover-color: $global-color !default;
|
|
379
379
|
$dropdown-nav-header-color: $global-emphasis-color !default;
|
|
@@ -739,8 +739,8 @@ $navbar-toggle-color: $global-muted-color !default;
|
|
|
739
739
|
$navbar-toggle-hover-color: $global-color !default;
|
|
740
740
|
$navbar-subtitle-font-size: $global-small-font-size !default;
|
|
741
741
|
$navbar-dropdown-z-index: $global-z-index + 20 !default;
|
|
742
|
-
$navbar-dropdown-width: 200px !default;
|
|
743
742
|
$navbar-dropdown-margin: 15px !default;
|
|
743
|
+
$navbar-dropdown-width: 200px !default;
|
|
744
744
|
$navbar-dropdown-padding: 25px !default;
|
|
745
745
|
$navbar-dropdown-background: $global-background !default;
|
|
746
746
|
$navbar-dropdown-color: $global-color !default;
|
|
@@ -748,6 +748,7 @@ $navbar-dropdown-grid-gutter-horizontal: ($navbar-dropdown-padding * 2) !default
|
|
|
748
748
|
$navbar-dropdown-grid-gutter-vertical: $navbar-dropdown-grid-gutter-horizontal !default;
|
|
749
749
|
$navbar-dropdown-dropbar-margin-top: 0 !default;
|
|
750
750
|
$navbar-dropdown-dropbar-margin-bottom: $navbar-dropdown-dropbar-margin-top !default;
|
|
751
|
+
$navbar-dropdown-dropbar-padding: $navbar-nav-item-padding-horizontal !default;
|
|
751
752
|
$navbar-dropdown-nav-item-color: $global-muted-color !default;
|
|
752
753
|
$navbar-dropdown-nav-item-hover-color: $global-color !default;
|
|
753
754
|
$navbar-dropdown-nav-item-active-color: $global-emphasis-color !default;
|
|
@@ -1014,6 +1015,7 @@ $tile-primary-color-mode: light !default;
|
|
|
1014
1015
|
$tile-secondary-background: $global-secondary-background !default;
|
|
1015
1016
|
$tile-secondary-color-mode: light !default;
|
|
1016
1017
|
$tooltip-z-index: $global-z-index + 30 !default;
|
|
1018
|
+
$tooltip-margin: 10px !default;
|
|
1017
1019
|
$tooltip-max-width: 200px !default;
|
|
1018
1020
|
$tooltip-padding-vertical: 3px !default;
|
|
1019
1021
|
$tooltip-padding-horizontal: 6px !default;
|
|
@@ -1021,7 +1023,6 @@ $tooltip-background: #666 !default;
|
|
|
1021
1023
|
$tooltip-border-radius: 2px !default;
|
|
1022
1024
|
$tooltip-color: $global-inverse-color !default;
|
|
1023
1025
|
$tooltip-font-size: 12px !default;
|
|
1024
|
-
$tooltip-margin: 10px !default;
|
|
1025
1026
|
$totop-padding: 5px !default;
|
|
1026
1027
|
$totop-color: $global-muted-color !default;
|
|
1027
1028
|
$totop-hover-color: $global-color !default;
|
package/src/scss/variables.scss
CHANGED
|
@@ -365,14 +365,14 @@ $inverse-dotnav-item-onclick-background: rgba($inverse-global-color, 0.5) !defau
|
|
|
365
365
|
$inverse-dotnav-item-active-background: rgba($inverse-global-color, 0.9) !default;
|
|
366
366
|
$global-z-index: 1000 !default;
|
|
367
367
|
$drop-z-index: $global-z-index + 20 !default;
|
|
368
|
-
$drop-width: 300px !default;
|
|
369
368
|
$drop-margin: $global-margin !default;
|
|
369
|
+
$drop-width: 300px !default;
|
|
370
370
|
$dropdown-z-index: $global-z-index + 20 !default;
|
|
371
|
+
$dropdown-margin: $global-small-margin !default;
|
|
371
372
|
$dropdown-min-width: 200px !default;
|
|
372
373
|
$dropdown-padding: 15px !default;
|
|
373
374
|
$dropdown-background: $global-muted-background !default;
|
|
374
375
|
$dropdown-color: $global-color !default;
|
|
375
|
-
$dropdown-margin: $global-small-margin !default;
|
|
376
376
|
$dropdown-nav-item-color: $global-muted-color !default;
|
|
377
377
|
$dropdown-nav-item-hover-color: $global-color !default;
|
|
378
378
|
$dropdown-nav-header-color: $global-emphasis-color !default;
|
|
@@ -737,8 +737,8 @@ $navbar-toggle-color: $global-muted-color !default;
|
|
|
737
737
|
$navbar-toggle-hover-color: $global-color !default;
|
|
738
738
|
$navbar-subtitle-font-size: $global-small-font-size !default;
|
|
739
739
|
$navbar-dropdown-z-index: $global-z-index + 20 !default;
|
|
740
|
-
$navbar-dropdown-width: 200px !default;
|
|
741
740
|
$navbar-dropdown-margin: 0 !default;
|
|
741
|
+
$navbar-dropdown-width: 200px !default;
|
|
742
742
|
$navbar-dropdown-padding: 15px !default;
|
|
743
743
|
$navbar-dropdown-background: $global-muted-background !default;
|
|
744
744
|
$navbar-dropdown-color: $global-color !default;
|
|
@@ -746,6 +746,7 @@ $navbar-dropdown-grid-gutter-horizontal: $global-gutter !default;
|
|
|
746
746
|
$navbar-dropdown-grid-gutter-vertical: $navbar-dropdown-grid-gutter-horizontal !default;
|
|
747
747
|
$navbar-dropdown-dropbar-margin-top: 0 !default;
|
|
748
748
|
$navbar-dropdown-dropbar-margin-bottom: $navbar-dropdown-dropbar-margin-top !default;
|
|
749
|
+
$navbar-dropdown-dropbar-padding: $navbar-nav-item-padding-horizontal !default;
|
|
749
750
|
$navbar-dropdown-nav-item-color: $global-muted-color !default;
|
|
750
751
|
$navbar-dropdown-nav-item-hover-color: $global-color !default;
|
|
751
752
|
$navbar-dropdown-nav-item-active-color: $global-emphasis-color !default;
|
|
@@ -1012,6 +1013,7 @@ $tile-primary-color-mode: light !default;
|
|
|
1012
1013
|
$tile-secondary-background: $global-secondary-background !default;
|
|
1013
1014
|
$tile-secondary-color-mode: light !default;
|
|
1014
1015
|
$tooltip-z-index: $global-z-index + 30 !default;
|
|
1016
|
+
$tooltip-margin: 10px !default;
|
|
1015
1017
|
$tooltip-max-width: 200px !default;
|
|
1016
1018
|
$tooltip-padding-vertical: 3px !default;
|
|
1017
1019
|
$tooltip-padding-horizontal: 6px !default;
|
|
@@ -1019,7 +1021,6 @@ $tooltip-background: #666 !default;
|
|
|
1019
1021
|
$tooltip-border-radius: 2px !default;
|
|
1020
1022
|
$tooltip-color: $global-inverse-color !default;
|
|
1021
1023
|
$tooltip-font-size: 12px !default;
|
|
1022
|
-
$tooltip-margin: 10px !default;
|
|
1023
1024
|
$totop-padding: 5px !default;
|
|
1024
1025
|
$totop-color: $global-muted-color !default;
|
|
1025
1026
|
$totop-hover-color: $global-color !default;
|
package/tests/drop.html
CHANGED
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
<td><code>boundary</code></td>
|
|
382
382
|
<td>CSS selector</td>
|
|
383
383
|
<td>true</td>
|
|
384
|
-
<td>
|
|
384
|
+
<td>The area that the element will be checked for overflow, causing the Drop to flip. By default, it's the scrolling containers of the Drop's element.</td>
|
|
385
385
|
</tr>
|
|
386
386
|
<tr>
|
|
387
387
|
<td><code>boundary-align</code></td>
|
package/tests/position.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<style>
|
|
10
10
|
|
|
11
11
|
/* JavaScript */
|
|
12
|
-
#js-
|
|
12
|
+
#js-viewport {
|
|
13
13
|
height: 300px;
|
|
14
14
|
outline: 1px solid rgba(0,0,0,0.1);
|
|
15
15
|
position: relative;
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
|
|
27
27
|
#js-element {
|
|
28
28
|
position: absolute;
|
|
29
|
-
display: none;
|
|
30
29
|
width: 75px;
|
|
31
30
|
height: 75px;
|
|
32
31
|
background: rgba(0,0,0,0.1);
|
|
@@ -238,13 +237,13 @@
|
|
|
238
237
|
|
|
239
238
|
<h2>JavaScript</h2>
|
|
240
239
|
|
|
241
|
-
<div id="js-
|
|
240
|
+
<div id="js-viewport" class="uk-margin">
|
|
242
241
|
<div id="js-target" class="uk-flex uk-flex-center uk-flex-middle" draggable="true">Drag me!</div>
|
|
243
242
|
</div>
|
|
244
243
|
|
|
245
244
|
<div id="js-element"></div>
|
|
246
245
|
|
|
247
|
-
<div class="uk-grid uk-child-width-auto uk-form-stacked">
|
|
246
|
+
<div class="uk-grid uk-child-width-auto uk-form-stacked" style="margin-bottom: 100vh">
|
|
248
247
|
<div>
|
|
249
248
|
|
|
250
249
|
<div class="uk-margin">
|
|
@@ -327,27 +326,26 @@
|
|
|
327
326
|
|
|
328
327
|
<script>
|
|
329
328
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
boundary = $('#js-boundary'),
|
|
337
|
-
target = $('#js-target'),
|
|
338
|
-
offsetX,
|
|
339
|
-
offsetY;
|
|
329
|
+
const {$, $$, css, getEventPos, on, offset, positionAt} = UIkit.util;
|
|
330
|
+
let viewport = $('#js-viewport');
|
|
331
|
+
let element = $('#js-element');
|
|
332
|
+
let target = $('#js-target');
|
|
333
|
+
let offsetX;
|
|
334
|
+
let offsetY;
|
|
340
335
|
|
|
341
336
|
function position() {
|
|
342
|
-
|
|
337
|
+
positionAt(
|
|
343
338
|
element,
|
|
344
339
|
target,
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
340
|
+
{
|
|
341
|
+
viewport,
|
|
342
|
+
attach:{
|
|
343
|
+
element: [$('#js-element_x').value, $('#js-element_y').value],
|
|
344
|
+
target: [$('#js-target_x').value, $('#js-target_y').value]
|
|
345
|
+
},
|
|
346
|
+
offset: [$('#js-offset_x').value, $('#js-offset_y').value],
|
|
347
|
+
flip: [$('#js-flip_x').value, $('#js-flip_y').value]
|
|
348
|
+
}
|
|
351
349
|
);
|
|
352
350
|
}
|
|
353
351
|
|
|
@@ -359,33 +357,34 @@
|
|
|
359
357
|
|
|
360
358
|
});
|
|
361
359
|
|
|
360
|
+
let lastPos;
|
|
362
361
|
on(window, 'dragover', function (e) {
|
|
363
362
|
|
|
364
|
-
e
|
|
365
|
-
|
|
366
|
-
if (!ticking) {
|
|
367
|
-
requestAnimationFrame(function () {
|
|
363
|
+
const pos = getEventPos(e);
|
|
368
364
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
'left top',
|
|
374
|
-
(e.pageX - offset(boundary).left - offsetX) + ' ' + (e.pageY - offset(boundary).top - offsetY)
|
|
375
|
-
);
|
|
365
|
+
if (lastPos?.x === pos.x && lastPos?.y === pos.y) {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
lastPos = pos;
|
|
376
369
|
|
|
377
|
-
|
|
370
|
+
e.preventDefault();
|
|
378
371
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
372
|
+
// positions target at mouse cursor
|
|
373
|
+
positionAt(
|
|
374
|
+
target,
|
|
375
|
+
viewport,
|
|
376
|
+
{
|
|
377
|
+
offset: [e.pageX - offset(viewport).left - offsetX, e.pageY - offset(viewport).top - offsetY]
|
|
378
|
+
}
|
|
379
|
+
);
|
|
383
380
|
|
|
381
|
+
// positions element at target
|
|
382
|
+
position();
|
|
384
383
|
});
|
|
385
384
|
|
|
386
|
-
|
|
385
|
+
on($$('select,input'), 'change', position);
|
|
386
|
+
on(window, 'scroll', position);
|
|
387
387
|
|
|
388
|
-
util.css(element, 'display', 'block');
|
|
389
388
|
position();
|
|
390
389
|
|
|
391
390
|
</script>
|