@yamada-ui/use-focus-visible 1.1.6 → 1.1.7-dev-20240917064938
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
type FocusVisibleCallback = (isFocusVisible: boolean) => void;
|
2
|
-
|
2
|
+
interface TrackFocusVisibleOptions {
|
3
3
|
force?: boolean;
|
4
|
-
}
|
4
|
+
}
|
5
5
|
declare const trackFocusVisible: (func: FocusVisibleCallback, { force }?: TrackFocusVisibleOptions) => () => void;
|
6
6
|
declare const useFocusVisible: (options?: TrackFocusVisibleOptions) => {
|
7
7
|
focusVisible: boolean;
|
package/dist/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
type FocusVisibleCallback = (isFocusVisible: boolean) => void;
|
2
|
-
|
2
|
+
interface TrackFocusVisibleOptions {
|
3
3
|
force?: boolean;
|
4
|
-
}
|
4
|
+
}
|
5
5
|
declare const trackFocusVisible: (func: FocusVisibleCallback, { force }?: TrackFocusVisibleOptions) => () => void;
|
6
6
|
declare const useFocusVisible: (options?: TrackFocusVisibleOptions) => {
|
7
7
|
focusVisible: boolean;
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { isMac } from \"@yamada-ui/utils\"\nimport { useEffect, useState } from \"react\"\n\ntype Modality = \"keyboard\" | \"pointer\" | \"virtual\"\ntype HandlerEvent = PointerEvent | MouseEvent | KeyboardEvent | FocusEvent\ntype Handler = (modality: Modality, e: HandlerEvent | null) => void\ntype FocusVisibleCallback = (isFocusVisible: boolean) => void\n\nlet hasSetup = false\nlet modality: Modality | null = null\nlet hasEventBeforeFocus = false\nlet hasBlurredWindowRecently = false\n\nconst handlers = new Set<Handler>()\n\nconst trigger = (modality: Modality, ev: HandlerEvent | null) =>\n handlers.forEach((handler) => handler(modality, ev))\n\nconst onValid = (e: KeyboardEvent) => {\n return !(\n e.metaKey ||\n (!isMac && e.altKey) ||\n e.ctrlKey ||\n e.key === \"Control\" ||\n e.key === \"Shift\" ||\n e.key === \"Meta\"\n )\n}\n\nconst onKeyboard = (ev: KeyboardEvent) => {\n hasEventBeforeFocus = true\n\n if (onValid(ev)) {\n modality = \"keyboard\"\n\n trigger(\"keyboard\", ev)\n }\n}\n\nconst onPointer = (ev: PointerEvent | MouseEvent) => {\n modality = \"pointer\"\n\n if (\n ev.type === \"mousedown\" ||\n ev.type === \"pointerdown\" ||\n ev.type === \"pointerup\"\n ) {\n hasEventBeforeFocus = true\n\n const target = ev.composedPath ? ev.composedPath()[0] : ev.target\n\n if ((target as HTMLElement).matches(\":focus-visible\")) return\n\n trigger(\"pointer\", ev)\n }\n}\n\nconst isVirtualClick = (ev: MouseEvent | PointerEvent): boolean => {\n if ((ev as any).mozInputSource === 0 && ev.isTrusted) return true\n\n return ev.detail === 0 && !(ev as PointerEvent).pointerType\n}\n\nconst onClick = (ev: MouseEvent) => {\n if (!isVirtualClick(ev)) return\n\n hasEventBeforeFocus = true\n\n modality = \"virtual\"\n}\n\nconst onFocus = (ev: FocusEvent) => {\n if (ev.target === window || ev.target === document) return\n\n if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {\n modality = \"virtual\"\n\n trigger(\"virtual\", ev)\n }\n\n hasEventBeforeFocus = false\n hasBlurredWindowRecently = false\n}\n\nconst onBlur = () => {\n hasEventBeforeFocus = false\n hasBlurredWindowRecently = true\n}\n\nconst isFocusVisible = () => modality !== \"pointer\"\n\nconst setGlobalFocusEvents = () => {\n if (typeof window === \"undefined\" || hasSetup) return\n\n const { focus } = HTMLElement.prototype\n\n HTMLElement.prototype.focus = function customFocus(...args) {\n hasEventBeforeFocus = true\n\n if (this) focus.apply(this, args)\n }\n\n document.addEventListener(\"keydown\", onKeyboard, true)\n document.addEventListener(\"keyup\", onKeyboard, true)\n document.addEventListener(\"click\", onClick, true)\n\n window.addEventListener(\"focus\", onFocus, true)\n window.addEventListener(\"blur\", onBlur, false)\n\n if (typeof PointerEvent !== \"undefined\") {\n document.addEventListener(\"pointerdown\", onPointer, true)\n document.addEventListener(\"pointermove\", onPointer, true)\n document.addEventListener(\"pointerup\", onPointer, true)\n } else {\n document.addEventListener(\"mousedown\", onPointer, true)\n document.addEventListener(\"mousemove\", onPointer, true)\n document.addEventListener(\"mouseup\", onPointer, true)\n }\n\n hasSetup = true\n}\n\
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { isMac } from \"@yamada-ui/utils\"\nimport { useEffect, useState } from \"react\"\n\ntype Modality = \"keyboard\" | \"pointer\" | \"virtual\"\ntype HandlerEvent = PointerEvent | MouseEvent | KeyboardEvent | FocusEvent\ntype Handler = (modality: Modality, e: HandlerEvent | null) => void\ntype FocusVisibleCallback = (isFocusVisible: boolean) => void\n\nlet hasSetup = false\nlet modality: Modality | null = null\nlet hasEventBeforeFocus = false\nlet hasBlurredWindowRecently = false\n\nconst handlers = new Set<Handler>()\n\nconst trigger = (modality: Modality, ev: HandlerEvent | null) =>\n handlers.forEach((handler) => handler(modality, ev))\n\nconst onValid = (e: KeyboardEvent) => {\n return !(\n e.metaKey ||\n (!isMac && e.altKey) ||\n e.ctrlKey ||\n e.key === \"Control\" ||\n e.key === \"Shift\" ||\n e.key === \"Meta\"\n )\n}\n\nconst onKeyboard = (ev: KeyboardEvent) => {\n hasEventBeforeFocus = true\n\n if (onValid(ev)) {\n modality = \"keyboard\"\n\n trigger(\"keyboard\", ev)\n }\n}\n\nconst onPointer = (ev: PointerEvent | MouseEvent) => {\n modality = \"pointer\"\n\n if (\n ev.type === \"mousedown\" ||\n ev.type === \"pointerdown\" ||\n ev.type === \"pointerup\"\n ) {\n hasEventBeforeFocus = true\n\n const target = ev.composedPath ? ev.composedPath()[0] : ev.target\n\n if ((target as HTMLElement).matches(\":focus-visible\")) return\n\n trigger(\"pointer\", ev)\n }\n}\n\nconst isVirtualClick = (ev: MouseEvent | PointerEvent): boolean => {\n if ((ev as any).mozInputSource === 0 && ev.isTrusted) return true\n\n return ev.detail === 0 && !(ev as PointerEvent).pointerType\n}\n\nconst onClick = (ev: MouseEvent) => {\n if (!isVirtualClick(ev)) return\n\n hasEventBeforeFocus = true\n\n modality = \"virtual\"\n}\n\nconst onFocus = (ev: FocusEvent) => {\n if (ev.target === window || ev.target === document) return\n\n if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {\n modality = \"virtual\"\n\n trigger(\"virtual\", ev)\n }\n\n hasEventBeforeFocus = false\n hasBlurredWindowRecently = false\n}\n\nconst onBlur = () => {\n hasEventBeforeFocus = false\n hasBlurredWindowRecently = true\n}\n\nconst isFocusVisible = () => modality !== \"pointer\"\n\nconst setGlobalFocusEvents = () => {\n if (typeof window === \"undefined\" || hasSetup) return\n\n const { focus } = HTMLElement.prototype\n\n HTMLElement.prototype.focus = function customFocus(...args) {\n hasEventBeforeFocus = true\n\n if (this) focus.apply(this, args)\n }\n\n document.addEventListener(\"keydown\", onKeyboard, true)\n document.addEventListener(\"keyup\", onKeyboard, true)\n document.addEventListener(\"click\", onClick, true)\n\n window.addEventListener(\"focus\", onFocus, true)\n window.addEventListener(\"blur\", onBlur, false)\n\n if (typeof PointerEvent !== \"undefined\") {\n document.addEventListener(\"pointerdown\", onPointer, true)\n document.addEventListener(\"pointermove\", onPointer, true)\n document.addEventListener(\"pointerup\", onPointer, true)\n } else {\n document.addEventListener(\"mousedown\", onPointer, true)\n document.addEventListener(\"mousemove\", onPointer, true)\n document.addEventListener(\"mouseup\", onPointer, true)\n }\n\n hasSetup = true\n}\n\ninterface TrackFocusVisibleOptions {\n force?: boolean\n}\n\nexport const trackFocusVisible = (\n func: FocusVisibleCallback,\n { force }: TrackFocusVisibleOptions = {},\n) => {\n if (force) hasSetup = false\n\n setGlobalFocusEvents()\n\n func(isFocusVisible())\n\n const handler = () => func(isFocusVisible())\n\n handlers.add(handler)\n\n return () => {\n handlers.delete(handler)\n }\n}\n\nexport const useFocusVisible = (options?: TrackFocusVisibleOptions) => {\n const [focusVisible, setFocusVisible] = useState(false)\n const [focus, setFocus] = useState(false)\n\n useEffect(() => {\n return trackFocusVisible(setFocusVisible, options)\n }, [options])\n\n return {\n focusVisible: focusVisible && focus,\n onFocus: () => setFocus(true),\n onBlur: () => setFocus(false),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsB;AACtB,mBAAoC;AAOpC,IAAI,WAAW;AACf,IAAI,WAA4B;AAChC,IAAI,sBAAsB;AAC1B,IAAI,2BAA2B;AAE/B,IAAM,WAAW,oBAAI,IAAa;AAElC,IAAM,UAAU,CAACA,WAAoB,OACnC,SAAS,QAAQ,CAAC,YAAY,QAAQA,WAAU,EAAE,CAAC;AAErD,IAAM,UAAU,CAAC,MAAqB;AACpC,SAAO,EACL,EAAE,WACD,CAAC,sBAAS,EAAE,UACb,EAAE,WACF,EAAE,QAAQ,aACV,EAAE,QAAQ,WACV,EAAE,QAAQ;AAEd;AAEA,IAAM,aAAa,CAAC,OAAsB;AACxC,wBAAsB;AAEtB,MAAI,QAAQ,EAAE,GAAG;AACf,eAAW;AAEX,YAAQ,YAAY,EAAE;AAAA,EACxB;AACF;AAEA,IAAM,YAAY,CAAC,OAAkC;AACnD,aAAW;AAEX,MACE,GAAG,SAAS,eACZ,GAAG,SAAS,iBACZ,GAAG,SAAS,aACZ;AACA,0BAAsB;AAEtB,UAAM,SAAS,GAAG,eAAe,GAAG,aAAa,EAAE,CAAC,IAAI,GAAG;AAE3D,QAAK,OAAuB,QAAQ,gBAAgB,EAAG;AAEvD,YAAQ,WAAW,EAAE;AAAA,EACvB;AACF;AAEA,IAAM,iBAAiB,CAAC,OAA2C;AACjE,MAAK,GAAW,mBAAmB,KAAK,GAAG,UAAW,QAAO;AAE7D,SAAO,GAAG,WAAW,KAAK,CAAE,GA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AAqB;AAErB,OAAK,eAAe,CAAC;AAErB,QAAM,UAAU,MAAM,KAAK,eAAe,CAAC;AAE3C,WAAS,IAAI,OAAO;AAEpB,SAAO,MAAM;AACX,aAAS,OAAO,OAAO;AAAA,EACzB;AACF;AAEO,IAAM,kBAAkB,CAAC,YAAuC;AACrE,QAAM,CAAC,cAAc,eAAe,QAAI,uBAAS,KAAK;AACtD,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAS,KAAK;AAExC,8BAAU,MAAM;AACd,WAAO,kBAAkB,iBAAiB,OAAO;AAAA,EACnD,GAAG,CAAC,OAAO,CAAC;AAEZ,SAAO;AAAA,IACL,cAAc,gBAAgB;AAAA,IAC9B,SAAS,MAAM,SAAS,IAAI;AAAA,IAC5B,QAAQ,MAAM,SAAS,KAAK;AAAA,EAC9B;AACF;","names":["modality"]}
|
package/dist/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { isMac } from \"@yamada-ui/utils\"\nimport { useEffect, useState } from \"react\"\n\ntype Modality = \"keyboard\" | \"pointer\" | \"virtual\"\ntype HandlerEvent = PointerEvent | MouseEvent | KeyboardEvent | FocusEvent\ntype Handler = (modality: Modality, e: HandlerEvent | null) => void\ntype FocusVisibleCallback = (isFocusVisible: boolean) => void\n\nlet hasSetup = false\nlet modality: Modality | null = null\nlet hasEventBeforeFocus = false\nlet hasBlurredWindowRecently = false\n\nconst handlers = new Set<Handler>()\n\nconst trigger = (modality: Modality, ev: HandlerEvent | null) =>\n handlers.forEach((handler) => handler(modality, ev))\n\nconst onValid = (e: KeyboardEvent) => {\n return !(\n e.metaKey ||\n (!isMac && e.altKey) ||\n e.ctrlKey ||\n e.key === \"Control\" ||\n e.key === \"Shift\" ||\n e.key === \"Meta\"\n )\n}\n\nconst onKeyboard = (ev: KeyboardEvent) => {\n hasEventBeforeFocus = true\n\n if (onValid(ev)) {\n modality = \"keyboard\"\n\n trigger(\"keyboard\", ev)\n }\n}\n\nconst onPointer = (ev: PointerEvent | MouseEvent) => {\n modality = \"pointer\"\n\n if (\n ev.type === \"mousedown\" ||\n ev.type === \"pointerdown\" ||\n ev.type === \"pointerup\"\n ) {\n hasEventBeforeFocus = true\n\n const target = ev.composedPath ? ev.composedPath()[0] : ev.target\n\n if ((target as HTMLElement).matches(\":focus-visible\")) return\n\n trigger(\"pointer\", ev)\n }\n}\n\nconst isVirtualClick = (ev: MouseEvent | PointerEvent): boolean => {\n if ((ev as any).mozInputSource === 0 && ev.isTrusted) return true\n\n return ev.detail === 0 && !(ev as PointerEvent).pointerType\n}\n\nconst onClick = (ev: MouseEvent) => {\n if (!isVirtualClick(ev)) return\n\n hasEventBeforeFocus = true\n\n modality = \"virtual\"\n}\n\nconst onFocus = (ev: FocusEvent) => {\n if (ev.target === window || ev.target === document) return\n\n if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {\n modality = \"virtual\"\n\n trigger(\"virtual\", ev)\n }\n\n hasEventBeforeFocus = false\n hasBlurredWindowRecently = false\n}\n\nconst onBlur = () => {\n hasEventBeforeFocus = false\n hasBlurredWindowRecently = true\n}\n\nconst isFocusVisible = () => modality !== \"pointer\"\n\nconst setGlobalFocusEvents = () => {\n if (typeof window === \"undefined\" || hasSetup) return\n\n const { focus } = HTMLElement.prototype\n\n HTMLElement.prototype.focus = function customFocus(...args) {\n hasEventBeforeFocus = true\n\n if (this) focus.apply(this, args)\n }\n\n document.addEventListener(\"keydown\", onKeyboard, true)\n document.addEventListener(\"keyup\", onKeyboard, true)\n document.addEventListener(\"click\", onClick, true)\n\n window.addEventListener(\"focus\", onFocus, true)\n window.addEventListener(\"blur\", onBlur, false)\n\n if (typeof PointerEvent !== \"undefined\") {\n document.addEventListener(\"pointerdown\", onPointer, true)\n document.addEventListener(\"pointermove\", onPointer, true)\n document.addEventListener(\"pointerup\", onPointer, true)\n } else {\n document.addEventListener(\"mousedown\", onPointer, true)\n document.addEventListener(\"mousemove\", onPointer, true)\n document.addEventListener(\"mouseup\", onPointer, true)\n }\n\n hasSetup = true\n}\n\
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { isMac } from \"@yamada-ui/utils\"\nimport { useEffect, useState } from \"react\"\n\ntype Modality = \"keyboard\" | \"pointer\" | \"virtual\"\ntype HandlerEvent = PointerEvent | MouseEvent | KeyboardEvent | FocusEvent\ntype Handler = (modality: Modality, e: HandlerEvent | null) => void\ntype FocusVisibleCallback = (isFocusVisible: boolean) => void\n\nlet hasSetup = false\nlet modality: Modality | null = null\nlet hasEventBeforeFocus = false\nlet hasBlurredWindowRecently = false\n\nconst handlers = new Set<Handler>()\n\nconst trigger = (modality: Modality, ev: HandlerEvent | null) =>\n handlers.forEach((handler) => handler(modality, ev))\n\nconst onValid = (e: KeyboardEvent) => {\n return !(\n e.metaKey ||\n (!isMac && e.altKey) ||\n e.ctrlKey ||\n e.key === \"Control\" ||\n e.key === \"Shift\" ||\n e.key === \"Meta\"\n )\n}\n\nconst onKeyboard = (ev: KeyboardEvent) => {\n hasEventBeforeFocus = true\n\n if (onValid(ev)) {\n modality = \"keyboard\"\n\n trigger(\"keyboard\", ev)\n }\n}\n\nconst onPointer = (ev: PointerEvent | MouseEvent) => {\n modality = \"pointer\"\n\n if (\n ev.type === \"mousedown\" ||\n ev.type === \"pointerdown\" ||\n ev.type === \"pointerup\"\n ) {\n hasEventBeforeFocus = true\n\n const target = ev.composedPath ? ev.composedPath()[0] : ev.target\n\n if ((target as HTMLElement).matches(\":focus-visible\")) return\n\n trigger(\"pointer\", ev)\n }\n}\n\nconst isVirtualClick = (ev: MouseEvent | PointerEvent): boolean => {\n if ((ev as any).mozInputSource === 0 && ev.isTrusted) return true\n\n return ev.detail === 0 && !(ev as PointerEvent).pointerType\n}\n\nconst onClick = (ev: MouseEvent) => {\n if (!isVirtualClick(ev)) return\n\n hasEventBeforeFocus = true\n\n modality = \"virtual\"\n}\n\nconst onFocus = (ev: FocusEvent) => {\n if (ev.target === window || ev.target === document) return\n\n if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {\n modality = \"virtual\"\n\n trigger(\"virtual\", ev)\n }\n\n hasEventBeforeFocus = false\n hasBlurredWindowRecently = false\n}\n\nconst onBlur = () => {\n hasEventBeforeFocus = false\n hasBlurredWindowRecently = true\n}\n\nconst isFocusVisible = () => modality !== \"pointer\"\n\nconst setGlobalFocusEvents = () => {\n if (typeof window === \"undefined\" || hasSetup) return\n\n const { focus } = HTMLElement.prototype\n\n HTMLElement.prototype.focus = function customFocus(...args) {\n hasEventBeforeFocus = true\n\n if (this) focus.apply(this, args)\n }\n\n document.addEventListener(\"keydown\", onKeyboard, true)\n document.addEventListener(\"keyup\", onKeyboard, true)\n document.addEventListener(\"click\", onClick, true)\n\n window.addEventListener(\"focus\", onFocus, true)\n window.addEventListener(\"blur\", onBlur, false)\n\n if (typeof PointerEvent !== \"undefined\") {\n document.addEventListener(\"pointerdown\", onPointer, true)\n document.addEventListener(\"pointermove\", onPointer, true)\n document.addEventListener(\"pointerup\", onPointer, true)\n } else {\n document.addEventListener(\"mousedown\", onPointer, true)\n document.addEventListener(\"mousemove\", onPointer, true)\n document.addEventListener(\"mouseup\", onPointer, true)\n }\n\n hasSetup = true\n}\n\ninterface TrackFocusVisibleOptions {\n force?: boolean\n}\n\nexport const trackFocusVisible = (\n func: FocusVisibleCallback,\n { force }: TrackFocusVisibleOptions = {},\n) => {\n if (force) hasSetup = false\n\n setGlobalFocusEvents()\n\n func(isFocusVisible())\n\n const handler = () => func(isFocusVisible())\n\n handlers.add(handler)\n\n return () => {\n handlers.delete(handler)\n }\n}\n\nexport const useFocusVisible = (options?: TrackFocusVisibleOptions) => {\n const [focusVisible, setFocusVisible] = useState(false)\n const [focus, setFocus] = useState(false)\n\n useEffect(() => {\n return trackFocusVisible(setFocusVisible, options)\n }, [options])\n\n return {\n focusVisible: focusVisible && focus,\n onFocus: () => setFocus(true),\n onBlur: () => setFocus(false),\n }\n}\n"],"mappings":";;;AAAA,SAAS,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kB,iBAAiB,OAAO;AAAA,EACnD,GAAG,CAAC,OAAO,CAAC;AAEZ,SAAO;AAAA,IACL,cAAc,gBAAgB;AAAA,IAC9B,SAAS,MAAM,SAAS,IAAI;AAAA,IAC5B,QAAQ,MAAM,SAAS,KAAK;AAAA,EAC9B;AACF;","names":["modality"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@yamada-ui/use-focus-visible",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.7-dev-20240917064938",
|
4
4
|
"description": "Yamada UI useFocusVisible custom hook",
|
5
5
|
"keywords": [
|
6
6
|
"use-focus-visible"
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"url": "https://github.com/yamada-ui/yamada-ui/issues"
|
26
26
|
},
|
27
27
|
"dependencies": {
|
28
|
-
"@yamada-ui/utils": "1.5.
|
28
|
+
"@yamada-ui/utils": "1.5.1-dev-20240917064938"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
31
|
"clean-package": "2.2.0",
|