uikit 3.21.17 → 3.21.18-dev.993e34374

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.
Files changed (120) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/css/uikit-core-rtl.css +237 -69
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +237 -69
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +241 -65
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +241 -65
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +334 -103
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +351 -108
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +1 -1
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +1 -1
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +3 -7
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +1 -1
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +3 -7
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +7 -2
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +92 -93
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +20 -17
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +367 -255
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +3 -3
  43. package/src/images/icons/arrow-down-arrow-up.svg +6 -0
  44. package/src/images/icons/arrow-down.svg +3 -3
  45. package/src/images/icons/arrow-left.svg +3 -3
  46. package/src/images/icons/arrow-right.svg +3 -3
  47. package/src/images/icons/arrow-up-right.svg +3 -3
  48. package/src/images/icons/arrow-up.svg +3 -3
  49. package/src/images/icons/close-circle.svg +5 -0
  50. package/src/images/icons/cloud-download.svg +4 -4
  51. package/src/images/icons/cloud-upload.svg +4 -4
  52. package/src/images/icons/download.svg +4 -4
  53. package/src/images/icons/expand.svg +5 -5
  54. package/src/images/icons/link-external.svg +4 -4
  55. package/src/images/icons/pull.svg +4 -4
  56. package/src/images/icons/push.svg +3 -3
  57. package/src/images/icons/shrink.svg +5 -5
  58. package/src/images/icons/sign-in.svg +4 -3
  59. package/src/images/icons/sign-out.svg +4 -3
  60. package/src/images/icons/sorting.svg +6 -0
  61. package/src/images/icons/upload.svg +4 -4
  62. package/src/js/components/lightbox-panel.js +181 -45
  63. package/src/js/components/lightbox.js +59 -6
  64. package/src/js/core/img.js +3 -5
  65. package/src/js/core/navbar.js +3 -6
  66. package/src/js/mixin/modal.js +1 -4
  67. package/src/js/mixin/slider-drag.js +3 -6
  68. package/src/js/mixin/slider-nav.js +1 -1
  69. package/src/js/mixin/togglable.js +7 -2
  70. package/src/js/util/dom.js +3 -1
  71. package/src/less/components/breadcrumb.less +6 -2
  72. package/src/less/components/button.less +1 -1
  73. package/src/less/components/form-range.less +52 -0
  74. package/src/less/components/form.less +1 -1
  75. package/src/less/components/lightbox.less +57 -89
  76. package/src/less/components/margin.less +14 -0
  77. package/src/less/components/search.less +49 -23
  78. package/src/less/components/subnav.less +8 -0
  79. package/src/less/components/totop.less +1 -1
  80. package/src/less/components/utility.less +2 -1
  81. package/src/less/components/visibility.less +2 -1
  82. package/src/less/theme/form-range.less +20 -8
  83. package/src/less/theme/lightbox.less +2 -20
  84. package/src/less/theme/search.less +24 -10
  85. package/src/scss/components/breadcrumb.scss +6 -2
  86. package/src/scss/components/button.scss +1 -1
  87. package/src/scss/components/form-range.scss +12 -0
  88. package/src/scss/components/form.scss +1 -1
  89. package/src/scss/components/lightbox.scss +50 -77
  90. package/src/scss/components/margin.scss +13 -0
  91. package/src/scss/components/search.scss +30 -12
  92. package/src/scss/components/subnav.scss +7 -0
  93. package/src/scss/components/totop.scss +1 -1
  94. package/src/scss/components/utility.scss +1 -1
  95. package/src/scss/components/visibility.scss +2 -1
  96. package/src/scss/mixins-theme.scss +51 -12
  97. package/src/scss/mixins.scss +45 -6
  98. package/src/scss/theme/form-range.scss +14 -4
  99. package/src/scss/theme/lightbox.scss +2 -20
  100. package/src/scss/theme/search.scss +10 -6
  101. package/src/scss/variables-theme.scss +35 -21
  102. package/src/scss/variables.scss +31 -24
  103. package/tests/badge.html +2 -2
  104. package/tests/base.html +1 -1
  105. package/tests/breadcrumb.html +23 -5
  106. package/tests/card.html +24 -24
  107. package/tests/dropbar.html +15 -15
  108. package/tests/dropdown.html +6 -6
  109. package/tests/dropnav.html +100 -100
  110. package/tests/icon.html +8 -0
  111. package/tests/index.html +15 -15
  112. package/tests/lightbox.html +379 -28
  113. package/tests/margin.html +19 -0
  114. package/tests/nav.html +21 -21
  115. package/tests/navbar.html +273 -273
  116. package/tests/offcanvas.html +27 -27
  117. package/tests/placeholder.html +2 -2
  118. package/tests/sortable.html +5 -5
  119. package/tests/sticky-navbar.html +114 -114
  120. package/tests/sticky.html +1 -1
@@ -1,7 +1,21 @@
1
- import { $$, assign, attr, data, findIndex, isElement, isTag, on, uniqueBy } from 'uikit-util';
1
+ import {
2
+ $,
3
+ $$,
4
+ assign,
5
+ attr,
6
+ findIndex,
7
+ isElement,
8
+ isTag,
9
+ matches,
10
+ on,
11
+ parents,
12
+ uniqueBy,
13
+ } from 'uikit-util';
2
14
  import { parseOptions } from '../api/options';
3
15
  import LightboxPanel from './lightbox-panel';
4
16
 
17
+ const selDisabled = '.uk-disabled *, .uk-disabled, [disabled]';
18
+
5
19
  export default {
6
20
  install,
7
21
 
@@ -31,19 +45,27 @@ export default {
31
45
  events: {
32
46
  name: 'click',
33
47
 
34
- delegate: ({ toggle }) => `${toggle}:not(.uk-disabled)`,
48
+ delegate: ({ toggle }) => toggle,
35
49
 
36
50
  handler(e) {
37
51
  if (!e.defaultPrevented) {
38
52
  e.preventDefault();
39
- this.show(e.current);
53
+ if (!matches(e.current, selDisabled)) {
54
+ this.show(e.current);
55
+ }
40
56
  }
41
57
  },
42
58
  },
43
59
 
44
60
  methods: {
45
61
  show(index) {
46
- const items = uniqueBy(this.toggles.map(toItem), 'source');
62
+ let items = this.toggles.map(toItem);
63
+
64
+ if (this.nav === 'thumbnav') {
65
+ ensureThumb.call(this, this.toggles, items);
66
+ }
67
+
68
+ items = uniqueBy(items, 'source');
47
69
 
48
70
  if (isElement(index)) {
49
71
  const { source } = toItem(index);
@@ -71,11 +93,42 @@ function install(UIkit, Lightbox) {
71
93
  assign(Lightbox.props, UIkit.component('lightboxPanel').options.props);
72
94
  }
73
95
 
96
+ function ensureThumb(toggles, items) {
97
+ for (const [i, toggle] of Object.entries(toggles)) {
98
+ if (items[i].thumb) {
99
+ continue;
100
+ }
101
+
102
+ const parent = parents(toggle)
103
+ .reverse()
104
+ .concat(toggle)
105
+ .find(
106
+ (parent) =>
107
+ this.$el.contains(parent) &&
108
+ (parent === toggle || $$(this.toggle, parent).length === 1),
109
+ );
110
+
111
+ if (!parent) {
112
+ continue;
113
+ }
114
+
115
+ const media = $('img,video', parent);
116
+
117
+ if (media) {
118
+ items[i].thumb = media.currentSrc || media.poster || media.src;
119
+ items[i].thumbRatio =
120
+ (media.naturalWidth || media.videoWidth) /
121
+ (media.naturalHeight || media.videoHeight);
122
+ }
123
+ }
124
+ }
125
+
74
126
  function toItem(el) {
75
127
  const item = {};
76
128
 
77
- for (const attr of ['href', 'caption', 'type', 'poster', 'alt', 'attrs']) {
78
- item[attr === 'href' ? 'source' : attr] = data(el, attr);
129
+ for (const attribute of el.getAttributeNames()) {
130
+ const key = attribute.replace(/^data-/, '');
131
+ item[key === 'href' ? 'source' : key] = el.getAttribute(attribute);
79
132
  }
80
133
 
81
134
  item.attrs = parseOptions(item.attrs);
@@ -101,7 +101,7 @@ function setSourceProps(sourceEl, targetEl) {
101
101
  for (const prop of srcProps) {
102
102
  const value = data(sourceEl, prop);
103
103
  if (value) {
104
- attr(targetEl, prop.replace(/^(data-)+/, ''), value);
104
+ attr(targetEl, prop.replace(/data-/g, ''), value);
105
105
  }
106
106
  }
107
107
  }
@@ -111,14 +111,12 @@ function getImageFromElement(el, src, sources) {
111
111
 
112
112
  wrapInPicture(img, sources);
113
113
  setSourceProps(el, img);
114
- img.onload = () => {
115
- setSrcAttrs(el, img.currentSrc);
116
- };
114
+ img.onload = () => setSrcAttrs(el, img.currentSrc);
117
115
  attr(img, 'src', src);
118
116
  return img;
119
117
  }
120
118
 
121
- function wrapInPicture(img, sources) {
119
+ export function wrapInPicture(img, sources) {
122
120
  sources = parseSources(sources);
123
121
 
124
122
  if (sources.length) {
@@ -1,4 +1,5 @@
1
1
  import { $$, addClass, css, hasClass, offset, removeClass } from 'uikit-util';
2
+ import { active } from './drop';
2
3
  import Dropnav from './dropnav';
3
4
 
4
5
  const clsNavbarTransparent = 'uk-navbar-transparent';
@@ -56,14 +57,10 @@ export default {
56
57
 
57
58
  el: ({ dropContainer }) => dropContainer,
58
59
 
59
- async handler(e) {
60
- if (!this.getDropdown(e.target)) {
61
- return;
62
- }
63
-
60
+ async handler() {
64
61
  await awaitMacroTask();
65
62
 
66
- if (!this.getActive() && this._transparent) {
63
+ if (this._transparent && (!active || !this.dropContainer.contains(active.$el))) {
67
64
  addClass(this.navbarContainer, clsNavbarTransparent);
68
65
  this._transparent = null;
69
66
  }
@@ -53,10 +53,6 @@ export default {
53
53
  transitionElement() {
54
54
  return this.panel;
55
55
  },
56
-
57
- bgClose({ bgClose }) {
58
- return bgClose && this.panel;
59
- },
60
56
  },
61
57
 
62
58
  connected() {
@@ -266,6 +262,7 @@ function listenForBackgroundClose(modal) {
266
262
  if (
267
263
  last(active) !== modal ||
268
264
  (modal.overlay && !modal.$el.contains(target)) ||
265
+ !modal.panel ||
269
266
  modal.panel.contains(target)
270
267
  ) {
271
268
  return;
@@ -17,7 +17,7 @@ const pointerUpOptions = { passive: true, capture: true };
17
17
  const pointerDown = 'touchstart mousedown';
18
18
  const pointerMove = 'touchmove mousemove';
19
19
  const pointerUp = 'touchend touchcancel mouseup click input scroll';
20
- const preventClick = (e) => e.preventDefault();
20
+
21
21
  export default {
22
22
  props: {
23
23
  draggable: Boolean,
@@ -120,10 +120,6 @@ export default {
120
120
  return;
121
121
  }
122
122
 
123
- if (!this.dragging) {
124
- on(this.list, 'click', preventClick, pointerOptions);
125
- }
126
-
127
123
  e.cancelable && e.preventDefault();
128
124
 
129
125
  this.dragging = true;
@@ -188,6 +184,8 @@ export default {
188
184
  off(document, pointerUp, this.end, pointerUpOptions);
189
185
 
190
186
  if (this.dragging) {
187
+ setTimeout(on(this.list, 'click', (e) => e.preventDefault(), pointerOptions));
188
+
191
189
  this.dragging = null;
192
190
 
193
191
  if (this.index === this.prevIndex) {
@@ -216,7 +214,6 @@ export default {
216
214
  }
217
215
  }
218
216
 
219
- setTimeout(() => off(this.list, 'click', preventClick, pointerOptions));
220
217
  css(this.list, { userSelect: '' });
221
218
 
222
219
  this.drag = this.percent = null;
@@ -211,7 +211,7 @@ export default {
211
211
  const active = item === index;
212
212
 
213
213
  toggleClass(el, this.clsActive, active);
214
- toggleClass(button, 'uk-disabled', this.parallax);
214
+ toggleClass(button, 'uk-disabled', !!this.parallax);
215
215
 
216
216
  attr(button, {
217
217
  'aria-selected': active,
@@ -20,6 +20,7 @@ import {
20
20
  unwrap,
21
21
  wrapInner,
22
22
  } from 'uikit-util';
23
+ import { storeScrollPosition } from './position';
23
24
 
24
25
  export default {
25
26
  props: {
@@ -79,6 +80,12 @@ export default {
79
80
  const done = () => {
80
81
  removeClass(el, cls);
81
82
  trigger(el, show ? 'shown' : 'hidden', [this]);
83
+
84
+ if (show) {
85
+ const restoreScrollPosition = storeScrollPosition(el);
86
+ $$('[autofocus]', el).find(isVisible)?.focus();
87
+ restoreScrollPosition();
88
+ }
82
89
  };
83
90
 
84
91
  return promise
@@ -125,8 +132,6 @@ export default {
125
132
  if (changed) {
126
133
  trigger(el, 'toggled', [toggled, this]);
127
134
  }
128
-
129
- $$('[autofocus]', el).some((el) => (isVisible(el) ? el.focus() || true : el.blur()));
130
135
  },
131
136
  },
132
137
  };
@@ -18,7 +18,9 @@ export function isTag(element, ...tagNames) {
18
18
 
19
19
  export function empty(element) {
20
20
  element = $(element);
21
- element.innerHTML = '';
21
+ if (element) {
22
+ element.innerHTML = '';
23
+ }
22
24
  return element;
23
25
  }
24
26
 
@@ -28,12 +28,16 @@
28
28
  ========================================================================== */
29
29
 
30
30
  /*
31
- * Reset list
31
+ * 1. Reset list
32
+ * 2. Remove space between elements
32
33
  */
33
34
 
34
35
  .uk-breadcrumb {
36
+ /* 1 */
35
37
  padding: 0;
36
38
  list-style: none;
39
+ /* 2 */
40
+ font-size: 0;
37
41
  .hook-breadcrumb();
38
42
  }
39
43
 
@@ -83,7 +87,7 @@
83
87
  content: @breadcrumb-divider;
84
88
  display: inline-block;
85
89
  /* 1 */
86
- margin: 0 @breadcrumb-divider-margin-horizontal 0 ~'calc(@{breadcrumb-divider-margin-horizontal} - 4px)';
90
+ margin: 0 @breadcrumb-divider-margin-horizontal;
87
91
  /* 2 */
88
92
  font-size: @breadcrumb-divider-font-size;
89
93
  color: @breadcrumb-divider-color;
@@ -350,7 +350,7 @@
350
350
  ========================================================================== */
351
351
 
352
352
  /*
353
- * 1. Using `flex` instead of `inline-block` to prevent whitespace betweent child elements
353
+ * 1. Using `flex` instead of `inline-block` to prevent whitespace between child elements
354
354
  * 2. Behave like button
355
355
  * 3. Create position context
356
356
  */
@@ -137,3 +137,55 @@
137
137
  .hook-form-range-track-focus() {}
138
138
  .hook-form-range-thumb() {}
139
139
  .hook-form-range-misc() {}
140
+
141
+
142
+ // Inverse
143
+ // ========================================================================
144
+
145
+ @inverse-form-range-track-background: darken(@inverse-global-muted-background, 5%);
146
+ @inverse-form-range-track-focus-background: fadein(@inverse-form-range-track-background, 5%);
147
+
148
+ @inverse-form-range-thumb-background: fadein(@inverse-global-color, 100%);
149
+
150
+ .hook-inverse() {
151
+
152
+ /* Webkit */
153
+ .uk-range::-webkit-slider-runnable-track {
154
+ background: @inverse-form-range-track-background;
155
+ .hook-inverse-form-range-track();
156
+ }
157
+
158
+ .uk-range:focus::-webkit-slider-runnable-track,
159
+ .uk-range:active::-webkit-slider-runnable-track {
160
+ background: @inverse-form-range-track-focus-background;
161
+ .hook-inverse-form-range-track-focus();
162
+ }
163
+
164
+ /* Firefox */
165
+ .uk-range::-moz-range-track {
166
+ background: @inverse-form-range-track-background;
167
+ .hook-inverse-form-range-track();
168
+ }
169
+
170
+ .uk-range:focus::-moz-range-track {
171
+ background: @inverse-form-range-track-focus-background;
172
+ .hook-inverse-form-range-track-focus();
173
+ }
174
+
175
+ /* Webkit */
176
+ .uk-range::-webkit-slider-thumb {
177
+ background: @inverse-form-range-thumb-background;
178
+ .hook-inverse-form-range-thumb();
179
+ }
180
+
181
+ /* Firefox */
182
+ .uk-range::-moz-range-thumb {
183
+ background: @inverse-form-range-thumb-background;
184
+ .hook-inverse-form-range-thumb();
185
+ }
186
+
187
+ }
188
+
189
+ .hook-inverse-form-range-track() {}
190
+ .hook-inverse-form-range-track-focus() {}
191
+ .hook-inverse-form-range-thumb() {}
@@ -604,7 +604,7 @@ select.uk-form-width-xsmall { width: (@form-width-xsmall + 25px); }
604
604
  * 1. Position and resize the form control to always cover its container
605
605
  * 2. Required for Firefox for positioning to the left
606
606
  * 3. Required for Webkit to make `height` work
607
- * 4. Hide controle and show cursor
607
+ * 4. Hide controls and show cursor
608
608
  * 5. Needed for the cursor
609
609
  * 6. Clip height caused by 5. Needed for Webkit only
610
610
  */
@@ -5,11 +5,14 @@
5
5
  //
6
6
  // Sub-objects: `uk-lightbox-page`
7
7
  // `uk-lightbox-items`
8
- // `uk-lightbox-toolbar`
9
- // `uk-lightbox-toolbar-icon`
10
- // `uk-lightbox-button`
8
+ // `uk-lightbox-items-fit`
9
+ // `uk-lightbox-thumbnav`
10
+ // `uk-lightbox-thumbnav-vertical`
11
+ // `uk-lightbox-dotnav`
11
12
  // `uk-lightbox-caption`
13
+ // `uk-lightbox-counter`
12
14
  // `uk-lightbox-iframe`
15
+ // `uk-lightbox-zoom`
13
16
  //
14
17
  // States: `uk-open`
15
18
  //
@@ -21,28 +24,20 @@
21
24
 
22
25
  @lightbox-z-index: @global-z-index + 10;
23
26
  @lightbox-background: #000;
27
+ @lightbox-color-mode: light;
24
28
 
25
29
  @lightbox-focus-outline: rgba(255,255,255,0.7);
26
30
 
27
- @lightbox-item-color: rgba(255,255,255,0.7);
28
31
  @lightbox-item-max-width: 100vw;
29
32
  @lightbox-item-max-height: 100vh;
30
33
 
31
- @lightbox-toolbar-padding-vertical: 10px;
32
- @lightbox-toolbar-padding-horizontal: 10px;
33
- @lightbox-toolbar-background: rgba(0,0,0,0.3);
34
- @lightbox-toolbar-color: rgba(255,255,255,0.7);
34
+ @lightbox-thumbnav-vertical-width: 100px;
35
+ @lightbox-thumbnav-height: 100px;
35
36
 
36
- @lightbox-toolbar-icon-padding: 5px;
37
- @lightbox-toolbar-icon-color: rgba(255,255,255,0.7);
38
-
39
- @lightbox-toolbar-icon-hover-color: #fff;
40
-
41
- @lightbox-button-size: 50px;
42
- @lightbox-button-background: @lightbox-toolbar-background;
43
- @lightbox-button-color: rgba(255,255,255,0.7);
44
-
45
- @lightbox-button-hover-color: #fff;
37
+ @lightbox-caption-padding-vertical: 10px;
38
+ @lightbox-caption-padding-horizontal: 10px;
39
+ @lightbox-caption-background: rgba(0,0,0,0.3);
40
+ @lightbox-caption-color: rgba(255,255,255,0.7);
46
41
 
47
42
 
48
43
  /* ========================================================================
@@ -60,6 +55,7 @@
60
55
  */
61
56
 
62
57
  .uk-lightbox {
58
+ --uk-inverse: @lightbox-color-mode;
63
59
  /* 1 */
64
60
  display: none;
65
61
  /* 2 */
@@ -108,15 +104,24 @@
108
104
  .uk-lightbox-page { overflow: hidden; }
109
105
 
110
106
 
111
- /* Item
107
+ /* Items
112
108
  ========================================================================== */
113
109
 
110
+ /*
111
+ * Reset list
112
+ */
113
+
114
+ .uk-lightbox-items {
115
+ margin: 0;
116
+ padding: 0;
117
+ list-style: none;
118
+ }
119
+
114
120
  /*
115
121
  * 1. Center child within the viewport
116
122
  * 2. Not visible by default
117
- * 3. Color needed for spinner icon
118
- * 4. Optimize animation
119
- * 5. Responsiveness
123
+ * 3. Optimize animation
124
+ * 4. Responsiveness
120
125
  * Using `vh` for `max-height` to fix image proportions after resize in Safari and Opera
121
126
  */
122
127
 
@@ -130,96 +135,64 @@
130
135
  /* 2 */
131
136
  display: none;
132
137
  justify-content: center;
133
- align-items: center;
138
+ align-items: flex-start;
134
139
  /* 3 */
135
- color: @lightbox-item-color;
136
- /* 4 */
137
140
  will-change: transform, opacity;
141
+ /* 4 */
142
+ overflow: auto;
138
143
  .hook-lightbox-item();
139
144
  }
140
145
 
141
- /* 5 */
142
- .uk-lightbox-items > * > * {
146
+ /* 2 */
147
+ .uk-lightbox-items > .uk-active { display: flex; }
148
+
149
+ .uk-lightbox-items-fit > * { align-items: center; }
150
+
151
+ /* 4 */
152
+ .uk-lightbox-items-fit > * > * {
143
153
  max-width: @lightbox-item-max-width;
144
154
  max-height: @lightbox-item-max-height;
145
155
  }
146
156
 
147
- .uk-lightbox-items > * > :not(iframe) {
157
+ .uk-lightbox-items-fit > * > :not(iframe) {
148
158
  width: auto;
149
159
  height: auto;
150
160
  }
151
161
 
152
- .uk-lightbox-items > .uk-active { display: flex; }
153
-
154
- /* Toolbar
155
- ========================================================================== */
156
-
157
- .uk-lightbox-toolbar {
158
- padding: @lightbox-toolbar-padding-vertical @lightbox-toolbar-padding-horizontal;
159
- background: @lightbox-toolbar-background;
160
- color: @lightbox-toolbar-color;
161
- .hook-lightbox-toolbar();
162
- }
163
-
164
- .uk-lightbox-toolbar > * { color: @lightbox-toolbar-color; }
162
+ /* Zoom Cursor */
163
+ .uk-lightbox-items.uk-lightbox-items-fit .uk-lightbox-zoom:hover { cursor: zoom-in; }
164
+ .uk-lightbox-items:not(.uk-lightbox-items-fit) .uk-lightbox-zoom:hover { cursor: zoom-out; }
165
165
 
166
166
 
167
- /* Toolbar Icon (Close)
167
+ /* Navs
168
168
  ========================================================================== */
169
169
 
170
- .uk-lightbox-toolbar-icon {
171
- padding: @lightbox-toolbar-icon-padding;
172
- color: @lightbox-toolbar-icon-color;
173
- .hook-lightbox-toolbar-icon();
174
- }
170
+ .uk-lightbox-thumbnav-vertical :where(img, video) { max-width: @lightbox-thumbnav-vertical-width; }
171
+ .uk-lightbox-thumbnav:not(.uk-lightbox-thumbnav-vertical) :where(img, video) { max-height: @lightbox-thumbnav-height; }
175
172
 
176
- /*
177
- * Hover
178
- */
173
+ .uk-lightbox-thumbnav:empty,
174
+ .uk-lightbox-dotnav:empty { display: none; }
179
175
 
180
- .uk-lightbox-toolbar-icon:hover {
181
- color: @lightbox-toolbar-icon-hover-color;
182
- .hook-lightbox-toolbar-icon-hover();
183
- }
184
176
 
185
-
186
-
187
- /* Button (Slidenav)
177
+ /* Caption
188
178
  ========================================================================== */
189
179
 
190
- /*
191
- * 1. Center icon vertically and horizontally
192
- */
193
-
194
- .uk-lightbox-button {
195
- box-sizing: border-box;
196
- width: @lightbox-button-size;
197
- height: @lightbox-button-size;
198
- background: @lightbox-button-background;
199
- color: @lightbox-button-color;
200
- /* 1 */
201
- display: inline-flex;
202
- justify-content: center;
203
- align-items: center;
204
- .hook-lightbox-button();
205
- }
180
+ .uk-lightbox-caption:empty { display: none; }
206
181
 
207
- /* Hover */
208
- .uk-lightbox-button:hover {
209
- color: @lightbox-button-hover-color;
210
- .hook-lightbox-button-hover();
182
+ .uk-lightbox-caption {
183
+ padding: @lightbox-caption-padding-vertical @lightbox-caption-padding-horizontal;
184
+ background: @lightbox-caption-background;
185
+ color: @lightbox-caption-color;
186
+ .hook-lightbox-caption();
211
187
  }
212
188
 
213
- /* OnClick */
214
- .uk-lightbox-button:active {
215
- .hook-lightbox-button-active();
216
- }
189
+ .uk-lightbox-caption > * { color: @lightbox-caption-color; }
217
190
 
218
191
 
219
- /* Caption
192
+ /* Counter
220
193
  ========================================================================== */
221
194
 
222
- .uk-lightbox-caption:empty { display: none; }
195
+ .uk-lightbox-counter:empty { display: none; }
223
196
 
224
197
 
225
198
  /* Iframe
@@ -238,10 +211,5 @@
238
211
 
239
212
  .hook-lightbox() {}
240
213
  .hook-lightbox-item() {}
241
- .hook-lightbox-toolbar() {}
242
- .hook-lightbox-toolbar-icon() {}
243
- .hook-lightbox-toolbar-icon-hover() {}
244
- .hook-lightbox-button() {}
245
- .hook-lightbox-button-hover() {}
246
- .hook-lightbox-button-active() {}
214
+ .hook-lightbox-caption() {}
247
215
  .hook-lightbox-misc() {}
@@ -17,6 +17,8 @@
17
17
 
18
18
  @margin-margin: @global-margin;
19
19
 
20
+ @margin-xsmall-margin: 5px;
21
+
20
22
  @margin-small-margin: @global-small-margin;
21
23
 
22
24
  @margin-medium-margin: @global-medium-margin;
@@ -45,6 +47,18 @@
45
47
  .uk-margin-right { margin-right: @margin-margin !important; }
46
48
 
47
49
 
50
+ /* XSmall
51
+ ========================================================================== */
52
+
53
+ .uk-margin-xsmall { margin-bottom: @margin-xsmall-margin; }
54
+ * + .uk-margin-xsmall { margin-top: @margin-xsmall-margin !important; }
55
+
56
+ .uk-margin-xsmall-top { margin-top: @margin-xsmall-margin !important; }
57
+ .uk-margin-xsmall-bottom { margin-bottom: @margin-xsmall-margin !important; }
58
+ .uk-margin-xsmall-left { margin-left: @margin-xsmall-margin !important; }
59
+ .uk-margin-xsmall-right { margin-right: @margin-xsmall-margin !important; }
60
+
61
+
48
62
  /* Small
49
63
  ========================================================================== */
50
64