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/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,