@kimdw-rtk/ui 0.1.12 → 0.1.13
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/components/Card/Card.css.d.ts.map +1 -1
- package/dist/components/Card/Card.css.ts.vanilla.css +1 -0
- package/dist/components/Card/CardInteraction.css.d.ts.map +1 -1
- package/dist/components/Card/CardInteraction.css.ts.vanilla.css +0 -1
- package/dist/components/ScrollArea/ScrollArea.cjs +2 -2
- package/dist/components/ScrollArea/ScrollArea.js +2 -2
- package/dist/hooks/useMouseScroll/index.cjs +1 -1
- package/dist/hooks/useMouseScroll/index.d.ts.map +1 -1
- package/dist/hooks/useMouseScroll/index.js +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.css.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.css.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,UAAU,oBAAc,CAAC;AAsBtC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Card.css.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.css.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,UAAU,oBAAc,CAAC;AAsBtC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAuEP,CAAC,UAAU,CAAC,WAAY;;;;;gBAMxB,CAAC,UAAU,CAAC,UAAY;;;;;gBAMxB,CAAC,UAAU,CAAC,WAAY;;;;;gBAMxB,CAAC,UAAU,CAAC,QAAY;;;;;gBAMxB,CAAC,UAAU,CAAC,UAAgB;;;;EAKpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardInteraction.css.d.ts","sourceRoot":"","sources":["../../../src/components/Card/CardInteraction.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"CardInteraction.css.d.ts","sourceRoot":"","sources":["../../../src/components/Card/CardInteraction.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,QAO1B,CAAC"}
|
|
@@ -30,8 +30,8 @@ const ScrollArea = react.forwardRef(({ children, className, sx: propSx, ...props
|
|
|
30
30
|
};
|
|
31
31
|
const handleScroll = () => {
|
|
32
32
|
setHasLeftSpace(element.scrollLeft !== 0);
|
|
33
|
-
setHasRightSpace(Math.
|
|
34
|
-
element.scrollWidth);
|
|
33
|
+
setHasRightSpace(Math.ceil(element.scrollLeft + element.clientWidth) <
|
|
34
|
+
Math.floor(element.scrollWidth));
|
|
35
35
|
};
|
|
36
36
|
handleScroll();
|
|
37
37
|
element.addEventListener('scroll', handleScroll);
|
|
@@ -30,8 +30,8 @@ const ScrollArea = forwardRef(({ children, className, sx: propSx, ...props }, re
|
|
|
30
30
|
};
|
|
31
31
|
const handleScroll = () => {
|
|
32
32
|
setHasLeftSpace(element.scrollLeft !== 0);
|
|
33
|
-
setHasRightSpace(Math.
|
|
34
|
-
element.scrollWidth);
|
|
33
|
+
setHasRightSpace(Math.ceil(element.scrollLeft + element.clientWidth) <
|
|
34
|
+
Math.floor(element.scrollWidth));
|
|
35
35
|
};
|
|
36
36
|
handleScroll();
|
|
37
37
|
element.addEventListener('scroll', handleScroll);
|
|
@@ -32,7 +32,7 @@ const useMouseScroll = (ref) => {
|
|
|
32
32
|
isDown = false;
|
|
33
33
|
};
|
|
34
34
|
const handleWheel = (e) => {
|
|
35
|
-
currentLeft = Math.min(Math.max(0, currentLeft + e.deltaY), element.scrollWidth);
|
|
35
|
+
currentLeft = Math.min(Math.max(0, currentLeft + e.deltaY), element.scrollWidth - element.clientWidth);
|
|
36
36
|
element.scrollTo({
|
|
37
37
|
left: currentLeft,
|
|
38
38
|
behavior: 'smooth',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useMouseScroll/index.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAC1E,KAAK,CAAC,KACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useMouseScroll/index.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAC1E,KAAK,CAAC,KACL,IA4DF,CAAC"}
|
|
@@ -30,7 +30,7 @@ const useMouseScroll = (ref) => {
|
|
|
30
30
|
isDown = false;
|
|
31
31
|
};
|
|
32
32
|
const handleWheel = (e) => {
|
|
33
|
-
currentLeft = Math.min(Math.max(0, currentLeft + e.deltaY), element.scrollWidth);
|
|
33
|
+
currentLeft = Math.min(Math.max(0, currentLeft + e.deltaY), element.scrollWidth - element.clientWidth);
|
|
34
34
|
element.scrollTo({
|
|
35
35
|
left: currentLeft,
|
|
36
36
|
behavior: 'smooth',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kimdw-rtk/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"imports": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": "^18.0.0 || ^19.0.0",
|
|
41
41
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
42
|
-
"@kimdw-rtk/animation": "^0.1.
|
|
43
|
-
"@kimdw-rtk/utils": "0.1.
|
|
42
|
+
"@kimdw-rtk/animation": "^0.1.5",
|
|
43
|
+
"@kimdw-rtk/utils": "0.1.6"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@babel/preset-env": "^7.26.9",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
66
66
|
"ts-jest": "^29.3.4",
|
|
67
67
|
"typescript": "5.8.2",
|
|
68
|
-
"@repo/
|
|
69
|
-
"@repo/
|
|
68
|
+
"@repo/typescript-config": "0.0.0",
|
|
69
|
+
"@repo/eslint-config": "0.0.1"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|