kitzo 2.0.24 → 2.0.25

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/README.md CHANGED
@@ -25,7 +25,7 @@ npm i kitzo
25
25
  or
26
26
 
27
27
  ```javascript
28
- <script src="https://cdn.jsdelivr.net/npm/kitzo@2.0.24/dist/kitzo.umd.min.js"></script>
28
+ <script src="https://cdn.jsdelivr.net/npm/kitzo@2.0.25/dist/kitzo.umd.min.js"></script>
29
29
  ```
30
30
 
31
31
  > Attach this script tag in the html head tag and you are good to go.
package/dist/kitzo.esm.js CHANGED
@@ -455,7 +455,7 @@ function clippath(element, config = {}) {
455
455
  class: '',
456
456
  style: {},
457
457
  },
458
- config
458
+ config,
459
459
  );
460
460
 
461
461
  const allButtons = getButtons(element);
@@ -503,6 +503,7 @@ function clippath(element, config = {}) {
503
503
  color: 'white',
504
504
  fontFamily: getComputedStyle(btn).fontFamily || 'inherit',
505
505
  ...style,
506
+ margin: 0,
506
507
  });
507
508
 
508
509
  if (textOption && textOption instanceof Object) {
@@ -532,7 +533,7 @@ function clippath(element, config = {}) {
532
533
  () => {
533
534
  clippathDiv.querySelectorAll('[data-temp-clippath-el]').forEach((el) => el.remove());
534
535
  },
535
- smooth ? 150 : 150
536
+ smooth ? 150 : 150,
536
537
  );
537
538
  }
538
539
  });
@@ -546,8 +547,10 @@ function clippath(element, config = {}) {
546
547
  const x = e.clientX - left;
547
548
  const y = e.clientY - top;
548
549
 
549
- clippathDiv.style.setProperty('--kitzo-clippath-pos-x', `${x}px`);
550
- clippathDiv.style.setProperty('--kitzo-clippath-pos-y', `${y}px`);
550
+ requestAnimationFrame(() => {
551
+ clippathDiv.style.setProperty('--kitzo-clippath-pos-x', `${x}px`);
552
+ clippathDiv.style.setProperty('--kitzo-clippath-pos-y', `${y}px`);
553
+ });
551
554
  }
552
555
  });
553
556
 
package/dist/kitzo.umd.js CHANGED
@@ -461,7 +461,7 @@
461
461
  class: '',
462
462
  style: {},
463
463
  },
464
- config
464
+ config,
465
465
  );
466
466
 
467
467
  const allButtons = getButtons(element);
@@ -509,6 +509,7 @@
509
509
  color: 'white',
510
510
  fontFamily: getComputedStyle(btn).fontFamily || 'inherit',
511
511
  ...style,
512
+ margin: 0,
512
513
  });
513
514
 
514
515
  if (textOption && textOption instanceof Object) {
@@ -538,7 +539,7 @@
538
539
  () => {
539
540
  clippathDiv.querySelectorAll('[data-temp-clippath-el]').forEach((el) => el.remove());
540
541
  },
541
- smooth ? 150 : 150
542
+ smooth ? 150 : 150,
542
543
  );
543
544
  }
544
545
  });
@@ -552,8 +553,10 @@
552
553
  const x = e.clientX - left;
553
554
  const y = e.clientY - top;
554
555
 
555
- clippathDiv.style.setProperty('--kitzo-clippath-pos-x', `${x}px`);
556
- clippathDiv.style.setProperty('--kitzo-clippath-pos-y', `${y}px`);
556
+ requestAnimationFrame(() => {
557
+ clippathDiv.style.setProperty('--kitzo-clippath-pos-x', `${x}px`);
558
+ clippathDiv.style.setProperty('--kitzo-clippath-pos-y', `${y}px`);
559
+ });
557
560
  }
558
561
  });
559
562
 
package/package.json CHANGED
@@ -1,60 +1,61 @@
1
- {
2
- "name": "kitzo",
3
- "version": "2.0.24",
4
- "description": "A lightweight JavaScript UI micro-library.",
5
- "type": "module",
6
- "main": "./dist/kitzo.umd.js",
7
- "exports": {
8
- ".": {
9
- "import": "./dist/kitzo.esm.js",
10
- "require": "./dist/kitzo.umd.js",
11
- "types": "./dist/kitzo.d.ts"
12
- },
13
- "./react": {
14
- "import": "./dist/react.esm.js",
15
- "types": "./dist/react.d.ts"
16
- }
17
- },
18
- "files": [
19
- "dist"
20
- ],
21
- "scripts": {
22
- "dev": "vite",
23
- "build": "rollup -c",
24
- "preview": "vite preview"
25
- },
26
- "keywords": [
27
- "tooltip",
28
- "ripple",
29
- "copy-button",
30
- "micro-library",
31
- "modular",
32
- "ui",
33
- "javascript",
34
- "react",
35
- "kitzo"
36
- ],
37
- "author": "Riyad",
38
- "license": "MIT",
39
- "repository": {
40
- "type": "git",
41
- "url": "https://github.com/riyad-96/kitzo"
42
- },
43
- "homepage": "https://github.com/riyad-96/kitzo#readme",
44
- "devDependencies": {
45
- "@rollup/plugin-commonjs": "^28.0.6",
46
- "@rollup/plugin-node-resolve": "^16.0.1",
47
- "@babel/core": "^7.28.4",
48
- "@babel/preset-react": "^7.27.1",
49
- "@rollup/plugin-babel": "^6.0.4",
50
- "@vitejs/plugin-react": "^5.0.4",
51
- "react": "^19.1.1",
52
- "react-dom": "^19.1.1",
53
- "rollup": "^4.46.2",
54
- "vite": "^7.0.4"
55
- },
56
- "peerDependencies": {
57
- "react": ">=17",
58
- "react-dom": ">=17"
59
- }
60
- }
1
+ {
2
+ "name": "kitzo",
3
+ "version": "2.0.25",
4
+ "description": "A lightweight JavaScript UI micro-library.",
5
+ "type": "module",
6
+ "main": "./dist/kitzo.umd.js",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/kitzo.esm.js",
10
+ "require": "./dist/kitzo.umd.js",
11
+ "types": "./dist/kitzo.d.ts"
12
+ },
13
+ "./react": {
14
+ "import": "./dist/react.esm.js",
15
+ "types": "./dist/react.d.ts"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "scripts": {
22
+ "dev": "vite",
23
+ "build": "rollup -c",
24
+ "preview": "vite preview"
25
+ },
26
+ "keywords": [
27
+ "tooltip",
28
+ "ripple",
29
+ "copy-button",
30
+ "micro-library",
31
+ "modular",
32
+ "ui",
33
+ "javascript",
34
+ "react",
35
+ "kitzo"
36
+ ],
37
+ "author": "Riyad",
38
+ "license": "MIT",
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "https://github.com/riyad-96/kitzo"
42
+ },
43
+ "homepage": "https://github.com/riyad-96/kitzo#readme",
44
+ "devDependencies": {
45
+ "@babel/core": "^7.28.4",
46
+ "@babel/preset-react": "^7.27.1",
47
+ "@rollup/plugin-babel": "^6.0.4",
48
+ "@rollup/plugin-commonjs": "^28.0.6",
49
+ "@rollup/plugin-node-resolve": "^16.0.1",
50
+ "@vitejs/plugin-react": "^5.0.4",
51
+ "prettier": "^3.6.2",
52
+ "react": "^19.1.1",
53
+ "react-dom": "^19.1.1",
54
+ "rollup": "^4.46.2",
55
+ "vite": "^7.0.4"
56
+ },
57
+ "peerDependencies": {
58
+ "react": ">=17",
59
+ "react-dom": ">=17"
60
+ }
61
+ }