@aristobyte-ui/utils 2.8.1 → 2.9.0

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.
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  type RippleParamsRef = HTMLButtonElement | HTMLAnchorElement;
2
3
  export type RippleParams<HTMLElementType extends RippleParamsRef> = {
3
4
  ref: React.RefObject<HTMLElementType | null>;
@@ -6,15 +6,15 @@ var renderRipple = function (_a) {
6
6
  var button = ref.current;
7
7
  if (!button)
8
8
  return;
9
- var circle = document.createElement("span");
9
+ var circle = document.createElement('span');
10
10
  var diameter = Math.max(button.clientWidth, button.clientHeight);
11
11
  var radius = diameter / 2;
12
- circle.id = "ripple";
13
- var style = document.createElement("style");
12
+ circle.id = 'ripple';
13
+ var style = document.createElement('style');
14
14
  style.innerHTML = "\n #ripple {\n animation: ripple 300ms linear;\n background-color: rgba(255, 255, 255, 0.3);\n border-radius: 50%;\n height: ".concat(diameter, "px;\n left: ").concat(clientX - button.getBoundingClientRect().left - radius, "px;\n pointer-events: none;\n position: absolute;\n top: ").concat(clientY - button.getBoundingClientRect().top - radius, "px;\n transform: scale(0);\n width: ").concat(diameter, "px;\n z-index: 0;\n }\n \n @keyframes ripple {\n to {\n opacity: 0;\n transform: scale(2);\n }\n }\n ");
15
15
  button.appendChild(style);
16
16
  button.appendChild(circle);
17
- circle.addEventListener("animationend", function () {
17
+ circle.addEventListener('animationend', function () {
18
18
  circle.remove();
19
19
  style.remove();
20
20
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aristobyte-ui/utils",
3
3
  "description": "A collection of shared utility functions for AristoByte projects, designed to provide reusable helpers, streamline common operations, and ensure consistency across applications and packages.",
4
- "version": "2.8.1",
4
+ "version": "2.9.0",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "author": "AristoByte <info@aristobyte.com>",