kitzo 2.0.23 → 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 +1 -1
- package/dist/kitzo.esm.js +8 -4
- package/dist/kitzo.umd.js +8 -4
- package/package.json +61 -60
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.
|
|
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
|
@@ -404,6 +404,7 @@ function clippathStyles() {
|
|
|
404
404
|
clip-path: circle(0 at var(--kitzo-clippath-pos-x) var(--kitzo-clippath-pos-y));
|
|
405
405
|
transition: var(--kitzo-clippath-transition);
|
|
406
406
|
font-family: inherit;
|
|
407
|
+
overflow: hidden;
|
|
407
408
|
}
|
|
408
409
|
.kitzo-clippath-div.show {
|
|
409
410
|
opacity: 1;
|
|
@@ -454,7 +455,7 @@ function clippath(element, config = {}) {
|
|
|
454
455
|
class: '',
|
|
455
456
|
style: {},
|
|
456
457
|
},
|
|
457
|
-
config
|
|
458
|
+
config,
|
|
458
459
|
);
|
|
459
460
|
|
|
460
461
|
const allButtons = getButtons(element);
|
|
@@ -502,6 +503,7 @@ function clippath(element, config = {}) {
|
|
|
502
503
|
color: 'white',
|
|
503
504
|
fontFamily: getComputedStyle(btn).fontFamily || 'inherit',
|
|
504
505
|
...style,
|
|
506
|
+
margin: 0,
|
|
505
507
|
});
|
|
506
508
|
|
|
507
509
|
if (textOption && textOption instanceof Object) {
|
|
@@ -531,7 +533,7 @@ function clippath(element, config = {}) {
|
|
|
531
533
|
() => {
|
|
532
534
|
clippathDiv.querySelectorAll('[data-temp-clippath-el]').forEach((el) => el.remove());
|
|
533
535
|
},
|
|
534
|
-
smooth ? 150 : 150
|
|
536
|
+
smooth ? 150 : 150,
|
|
535
537
|
);
|
|
536
538
|
}
|
|
537
539
|
});
|
|
@@ -545,8 +547,10 @@ function clippath(element, config = {}) {
|
|
|
545
547
|
const x = e.clientX - left;
|
|
546
548
|
const y = e.clientY - top;
|
|
547
549
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
+
requestAnimationFrame(() => {
|
|
551
|
+
clippathDiv.style.setProperty('--kitzo-clippath-pos-x', `${x}px`);
|
|
552
|
+
clippathDiv.style.setProperty('--kitzo-clippath-pos-y', `${y}px`);
|
|
553
|
+
});
|
|
550
554
|
}
|
|
551
555
|
});
|
|
552
556
|
|
package/dist/kitzo.umd.js
CHANGED
|
@@ -410,6 +410,7 @@
|
|
|
410
410
|
clip-path: circle(0 at var(--kitzo-clippath-pos-x) var(--kitzo-clippath-pos-y));
|
|
411
411
|
transition: var(--kitzo-clippath-transition);
|
|
412
412
|
font-family: inherit;
|
|
413
|
+
overflow: hidden;
|
|
413
414
|
}
|
|
414
415
|
.kitzo-clippath-div.show {
|
|
415
416
|
opacity: 1;
|
|
@@ -460,7 +461,7 @@
|
|
|
460
461
|
class: '',
|
|
461
462
|
style: {},
|
|
462
463
|
},
|
|
463
|
-
config
|
|
464
|
+
config,
|
|
464
465
|
);
|
|
465
466
|
|
|
466
467
|
const allButtons = getButtons(element);
|
|
@@ -508,6 +509,7 @@
|
|
|
508
509
|
color: 'white',
|
|
509
510
|
fontFamily: getComputedStyle(btn).fontFamily || 'inherit',
|
|
510
511
|
...style,
|
|
512
|
+
margin: 0,
|
|
511
513
|
});
|
|
512
514
|
|
|
513
515
|
if (textOption && textOption instanceof Object) {
|
|
@@ -537,7 +539,7 @@
|
|
|
537
539
|
() => {
|
|
538
540
|
clippathDiv.querySelectorAll('[data-temp-clippath-el]').forEach((el) => el.remove());
|
|
539
541
|
},
|
|
540
|
-
smooth ? 150 : 150
|
|
542
|
+
smooth ? 150 : 150,
|
|
541
543
|
);
|
|
542
544
|
}
|
|
543
545
|
});
|
|
@@ -551,8 +553,10 @@
|
|
|
551
553
|
const x = e.clientX - left;
|
|
552
554
|
const y = e.clientY - top;
|
|
553
555
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
+
requestAnimationFrame(() => {
|
|
557
|
+
clippathDiv.style.setProperty('--kitzo-clippath-pos-x', `${x}px`);
|
|
558
|
+
clippathDiv.style.setProperty('--kitzo-clippath-pos-y', `${y}px`);
|
|
559
|
+
});
|
|
556
560
|
}
|
|
557
561
|
});
|
|
558
562
|
|
package/package.json
CHANGED
|
@@ -1,60 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "kitzo",
|
|
3
|
-
"version": "2.0.
|
|
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
|
-
"@
|
|
46
|
-
"@
|
|
47
|
-
"@babel
|
|
48
|
-
"@
|
|
49
|
-
"@rollup/plugin-
|
|
50
|
-
"@vitejs/plugin-react": "^5.0.4",
|
|
51
|
-
"
|
|
52
|
-
"react
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"react
|
|
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
|
+
}
|