made-refine 0.2.2 → 0.2.3
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/index.d.mts +24 -6
- package/dist/index.d.ts +24 -6
- package/dist/index.js +1686 -865
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1687 -866
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{utils-BHGlXxF7.d.mts → utils-C7RBdUAE.d.mts} +8 -1
- package/dist/{utils-BHGlXxF7.d.ts → utils-C7RBdUAE.d.ts} +8 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +9 -0
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs +8 -0
- package/dist/utils.mjs.map +1 -1
- package/package.json +1 -1
package/dist/utils.mjs
CHANGED
|
@@ -28,6 +28,13 @@ function clamp(value, min, max) {
|
|
|
28
28
|
if (max < min) return min;
|
|
29
29
|
return Math.max(min, Math.min(max, value));
|
|
30
30
|
}
|
|
31
|
+
function isInputFocused() {
|
|
32
|
+
let active = document.activeElement;
|
|
33
|
+
while (active?.shadowRoot?.activeElement) {
|
|
34
|
+
active = active.shadowRoot.activeElement;
|
|
35
|
+
}
|
|
36
|
+
return active instanceof HTMLInputElement || active instanceof HTMLTextAreaElement || active instanceof HTMLElement && active.isContentEditable;
|
|
37
|
+
}
|
|
31
38
|
function getComputedStyles(element) {
|
|
32
39
|
const computed = window.getComputedStyle(element);
|
|
33
40
|
return {
|
|
@@ -2277,6 +2284,7 @@ export {
|
|
|
2277
2284
|
getOriginalInlineStyles,
|
|
2278
2285
|
getSizingValue,
|
|
2279
2286
|
isFlexContainer,
|
|
2287
|
+
isInputFocused,
|
|
2280
2288
|
isTextElement,
|
|
2281
2289
|
parseColorValue,
|
|
2282
2290
|
parsePropertyValue,
|