@ctrliq/quantic-components 1.62.1 → 1.62.2
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/index.js.map +1 -1
- package/dist/meta/index.js.map +1 -1
- package/dist/quantic-components.js +8 -7
- package/dist/quantic-components.js.map +1 -1
- package/dist/quantic-components.min.js +2 -2
- package/dist/quantic-components.min.js.map +1 -1
- package/dist/shared/shared.utils.d.ts +0 -7
- package/dist/shared/shared.utils.js +7 -4
- package/dist/tooltip/tooltip.js +2 -3
- package/dist/types/shared/shared.utils.d.ts +0 -7
- package/package.json +1 -1
|
@@ -52539,15 +52539,18 @@
|
|
|
52539
52539
|
}
|
|
52540
52540
|
/**
|
|
52541
52541
|
* Generates a unique ID with an optional prefix.
|
|
52542
|
-
* Uses crypto.randomUUID() when available, falls back to Math.random().
|
|
52543
52542
|
*
|
|
52544
52543
|
* @param prefix Optional prefix for the generated ID
|
|
52545
52544
|
* @returns A unique ID string
|
|
52546
52545
|
*/
|
|
52546
|
+
function randomUUID() {
|
|
52547
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
52548
|
+
const r = (Math.random() * 16) | 0;
|
|
52549
|
+
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);
|
|
52550
|
+
});
|
|
52551
|
+
}
|
|
52547
52552
|
function generateId(prefix) {
|
|
52548
|
-
const id =
|
|
52549
|
-
? crypto.randomUUID()
|
|
52550
|
-
: Math.random().toString(36).substring(2);
|
|
52553
|
+
const id = randomUUID();
|
|
52551
52554
|
return prefix ? `${prefix}-${id}` : id;
|
|
52552
52555
|
}
|
|
52553
52556
|
/**
|
|
@@ -63973,9 +63976,7 @@
|
|
|
63973
63976
|
this.disabled = false;
|
|
63974
63977
|
this.offset = 8;
|
|
63975
63978
|
this.open = false;
|
|
63976
|
-
this.tooltipId =
|
|
63977
|
-
? crypto.randomUUID()
|
|
63978
|
-
: Math.random().toString(36)}`;
|
|
63979
|
+
this.tooltipId = generateId('tooltip');
|
|
63979
63980
|
this.contentElements = [];
|
|
63980
63981
|
this.handleMouseEnter = () => {
|
|
63981
63982
|
if (this.disabled || this.open)
|