@canlooks/can-ui 0.0.119 → 0.0.121
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/cjs/components/dateTimePicker/dateTimePicker.style.js +1 -0
- package/dist/cjs/components/divider/divider.style.js +2 -0
- package/dist/cjs/components/gallery/gallery.js +4 -4
- package/dist/cjs/components/gallery/index.d.ts +1 -0
- package/dist/cjs/components/gallery/index.js +1 -0
- package/dist/cjs/components/pinchable/pinchable.js +1 -1
- package/dist/esm/components/dateTimePicker/dateTimePicker.style.js +1 -0
- package/dist/esm/components/divider/divider.style.js +2 -0
- package/dist/esm/components/gallery/gallery.js +4 -4
- package/dist/esm/components/gallery/index.d.ts +1 -0
- package/dist/esm/components/gallery/index.js +1 -0
- package/dist/esm/components/pinchable/pinchable.js +1 -1
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ exports.style = (0, utils_1.defineCss)(({ spacing, divider }) => (0, react_1.css
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
&[data-orientation=horizontal] {
|
|
22
|
+
width: 100%;
|
|
22
23
|
display: flex;
|
|
23
24
|
|
|
24
25
|
.${exports.classes.line} {
|
|
@@ -27,6 +28,7 @@ exports.style = (0, utils_1.defineCss)(({ spacing, divider }) => (0, react_1.css
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
&[data-orientation=vertical] {
|
|
31
|
+
height: 100%;
|
|
30
32
|
display: inline-flex;
|
|
31
33
|
flex-direction: column;
|
|
32
34
|
|
|
@@ -70,7 +70,7 @@ exports.Gallery = (0, react_1.memo)(({ src, defaultIndex = 0, index, onIndexChan
|
|
|
70
70
|
if ((!left && dx > 0) || (!right && dx < 0)) {
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
allowSlideTransition();
|
|
74
74
|
const reset = () => {
|
|
75
75
|
wrapperRef.current.style.left = -innerIndex.current * wrapperRef.current.offsetWidth + 'px';
|
|
76
76
|
};
|
|
@@ -110,18 +110,18 @@ exports.Gallery = (0, react_1.memo)(({ src, defaultIndex = 0, index, onIndexChan
|
|
|
110
110
|
const doubleClickHandler = () => {
|
|
111
111
|
doubleClicked.current = true;
|
|
112
112
|
};
|
|
113
|
-
const
|
|
113
|
+
const allowSlideTransition = () => {
|
|
114
114
|
wrapperRef.current && (wrapperRef.current.dataset.transition = 'set');
|
|
115
115
|
};
|
|
116
116
|
const goPrevLoop = () => {
|
|
117
|
-
|
|
117
|
+
allowSlideTransition();
|
|
118
118
|
setInnerIndex(o => {
|
|
119
119
|
imageItemRefs.current[o].reset();
|
|
120
120
|
return (o + srcArr.current.length - 1) % srcArr.current.length;
|
|
121
121
|
});
|
|
122
122
|
};
|
|
123
123
|
const goNextLoop = () => {
|
|
124
|
-
|
|
124
|
+
allowSlideTransition();
|
|
125
125
|
setInnerIndex(o => {
|
|
126
126
|
imageItemRefs.current[o].reset();
|
|
127
127
|
return (o + 1) % srcArr.current.length;
|
|
@@ -20,7 +20,7 @@ exports.Pinchable = (({ component: Component = 'div', ref, gestureOptions, defau
|
|
|
20
20
|
rotateFn(innerRotate.current - 90);
|
|
21
21
|
};
|
|
22
22
|
wrapperRef.current.rotateRight = () => {
|
|
23
|
-
rotateFn(innerRotate.current
|
|
23
|
+
rotateFn(innerRotate.current + 90);
|
|
24
24
|
};
|
|
25
25
|
wrapperRef.current.reset = resetAll;
|
|
26
26
|
}
|
|
@@ -16,6 +16,7 @@ export const style = defineCss(({ spacing, divider }) => css `
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
&[data-orientation=horizontal] {
|
|
19
|
+
width: 100%;
|
|
19
20
|
display: flex;
|
|
20
21
|
|
|
21
22
|
.${classes.line} {
|
|
@@ -24,6 +25,7 @@ export const style = defineCss(({ spacing, divider }) => css `
|
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
&[data-orientation=vertical] {
|
|
28
|
+
height: 100%;
|
|
27
29
|
display: inline-flex;
|
|
28
30
|
flex-direction: column;
|
|
29
31
|
|
|
@@ -67,7 +67,7 @@ export const Gallery = memo(({ src, defaultIndex = 0, index, onIndexChange, defa
|
|
|
67
67
|
if ((!left && dx > 0) || (!right && dx < 0)) {
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
allowSlideTransition();
|
|
71
71
|
const reset = () => {
|
|
72
72
|
wrapperRef.current.style.left = -innerIndex.current * wrapperRef.current.offsetWidth + 'px';
|
|
73
73
|
};
|
|
@@ -107,18 +107,18 @@ export const Gallery = memo(({ src, defaultIndex = 0, index, onIndexChange, defa
|
|
|
107
107
|
const doubleClickHandler = () => {
|
|
108
108
|
doubleClicked.current = true;
|
|
109
109
|
};
|
|
110
|
-
const
|
|
110
|
+
const allowSlideTransition = () => {
|
|
111
111
|
wrapperRef.current && (wrapperRef.current.dataset.transition = 'set');
|
|
112
112
|
};
|
|
113
113
|
const goPrevLoop = () => {
|
|
114
|
-
|
|
114
|
+
allowSlideTransition();
|
|
115
115
|
setInnerIndex(o => {
|
|
116
116
|
imageItemRefs.current[o].reset();
|
|
117
117
|
return (o + srcArr.current.length - 1) % srcArr.current.length;
|
|
118
118
|
});
|
|
119
119
|
};
|
|
120
120
|
const goNextLoop = () => {
|
|
121
|
-
|
|
121
|
+
allowSlideTransition();
|
|
122
122
|
setInnerIndex(o => {
|
|
123
123
|
imageItemRefs.current[o].reset();
|
|
124
124
|
return (o + 1) % srcArr.current.length;
|
|
@@ -17,7 +17,7 @@ export const Pinchable = (({ component: Component = 'div', ref, gestureOptions,
|
|
|
17
17
|
rotateFn(innerRotate.current - 90);
|
|
18
18
|
};
|
|
19
19
|
wrapperRef.current.rotateRight = () => {
|
|
20
|
-
rotateFn(innerRotate.current
|
|
20
|
+
rotateFn(innerRotate.current + 90);
|
|
21
21
|
};
|
|
22
22
|
wrapperRef.current.reset = resetAll;
|
|
23
23
|
}
|