uikit 3.25.31 → 3.25.32-dev.42f8857
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/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +2 -2
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/tests/overflow-fade.test.mjs +0 -69
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.25.
|
|
5
|
+
"version": "3.25.32-dev.42f8857",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import assert from 'node:assert/strict';
|
|
2
|
-
import { readFile } from 'node:fs/promises';
|
|
3
|
-
import test from 'node:test';
|
|
4
|
-
import vm from 'node:vm';
|
|
5
|
-
|
|
6
|
-
const source = await readFile(new URL('../src/js/core/overflow-fade.js', import.meta.url), 'utf8');
|
|
7
|
-
function loadComponent(direction) {
|
|
8
|
-
return vm.runInNewContext(
|
|
9
|
-
source.replace(/^import[\s\S]*?from '[^']+';\s*/gm, '').replace('export default', 'component ='),
|
|
10
|
-
{
|
|
11
|
-
clamp: (value) => Math.min(1, Math.max(0, value)),
|
|
12
|
-
isRtl: direction === 'rtl',
|
|
13
|
-
css: (el, value) => (typeof value === 'string' ? el[value] : Object.assign(el.style, value)),
|
|
14
|
-
mutation: () => ({}),
|
|
15
|
-
resize: () => ({}),
|
|
16
|
-
toggleClass: () => {},
|
|
17
|
-
pointerDown: 'pointerdown',
|
|
18
|
-
},
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function getOpacities(direction, scrollLeft, scrollTop = 0, horizontal = 200, vertical = 0) {
|
|
23
|
-
const component = loadComponent(direction);
|
|
24
|
-
const context = {
|
|
25
|
-
$el: {
|
|
26
|
-
direction,
|
|
27
|
-
scrollLeft,
|
|
28
|
-
scrollTop,
|
|
29
|
-
scrollWidth: 100 + horizontal,
|
|
30
|
-
clientWidth: 100,
|
|
31
|
-
scrollHeight: 100 + vertical,
|
|
32
|
-
clientHeight: 100,
|
|
33
|
-
style: {},
|
|
34
|
-
},
|
|
35
|
-
$options: { id: 'uk-overflow-fade' },
|
|
36
|
-
...component.data,
|
|
37
|
-
};
|
|
38
|
-
component.update.write.call(context, component.update.read.call(context));
|
|
39
|
-
return [
|
|
40
|
-
context.$el.style['--uk-overflow-fade-start-opacity'],
|
|
41
|
-
context.$el.style['--uk-overflow-fade-end-opacity'],
|
|
42
|
-
];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
test('RTL horizontal fades follow physical left and right edges', () => {
|
|
46
|
-
assert.deepEqual(getOpacities('rtl', 0), [0, 1]);
|
|
47
|
-
assert.deepEqual(getOpacities('rtl', -100), [0, 0]);
|
|
48
|
-
assert.deepEqual(getOpacities('rtl', -200), [1, 0]);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
test('LTR horizontal fades are unchanged', () => {
|
|
52
|
-
assert.deepEqual(getOpacities('ltr', 0), [1, 0]);
|
|
53
|
-
assert.deepEqual(getOpacities('ltr', 100), [0, 0]);
|
|
54
|
-
assert.deepEqual(getOpacities('ltr', 200), [0, 1]);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
test('vertical fades are independent of direction', () => {
|
|
58
|
-
for (const direction of ['ltr', 'rtl']) {
|
|
59
|
-
assert.deepEqual(getOpacities(direction, 0, 0, 0, 200), [1, 0]);
|
|
60
|
-
assert.deepEqual(getOpacities(direction, 0, 100, 0, 200), [0, 0]);
|
|
61
|
-
assert.deepEqual(getOpacities(direction, 0, 200, 0, 200), [0, 1]);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
test('elements without overflow remain opaque', () => {
|
|
66
|
-
for (const direction of ['ltr', 'rtl']) {
|
|
67
|
-
assert.deepEqual(getOpacities(direction, 0, 0, 0), [1, 1]);
|
|
68
|
-
}
|
|
69
|
-
});
|