Files
ETB/ETB-FrontEnd/node_modules/.cache/babel-loader/b9bd53f0f14c5283c83cae73d97ad4a4561b8819b738884590340998e35f25e6.json
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

1 line
4.3 KiB
JSON

{"ast":null,"code":"import { pipe } from 'motion-utils';\nimport { addDomEvent } from '../events/add-dom-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n } catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState) return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState) return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() {}\n}\nexport { FocusGesture };","map":{"version":3,"names":["pipe","addDomEvent","Feature","FocusGesture","constructor","arguments","isActive","onFocus","isFocusVisible","node","current","matches","e","animationState","setActive","onBlur","mount","unmount"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/framer-motion/dist/es/gestures/focus.mjs"],"sourcesContent":["import { pipe } from 'motion-utils';\nimport { addDomEvent } from '../events/add-dom-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\n"],"mappings":"AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,SAASC,WAAW,QAAQ,6BAA6B;AACzD,SAASC,OAAO,QAAQ,gCAAgC;AAExD,MAAMC,YAAY,SAASD,OAAO,CAAC;EAC/BE,WAAWA,CAAA,EAAG;IACV,KAAK,CAAC,GAAGC,SAAS,CAAC;IACnB,IAAI,CAACC,QAAQ,GAAG,KAAK;EACzB;EACAC,OAAOA,CAAA,EAAG;IACN,IAAIC,cAAc,GAAG,KAAK;IAC1B;AACR;AACA;AACA;AACA;AACA;IACQ,IAAI;MACAA,cAAc,GAAG,IAAI,CAACC,IAAI,CAACC,OAAO,CAACC,OAAO,CAAC,gBAAgB,CAAC;IAChE,CAAC,CACD,OAAOC,CAAC,EAAE;MACNJ,cAAc,GAAG,IAAI;IACzB;IACA,IAAI,CAACA,cAAc,IAAI,CAAC,IAAI,CAACC,IAAI,CAACI,cAAc,EAC5C;IACJ,IAAI,CAACJ,IAAI,CAACI,cAAc,CAACC,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC;IACtD,IAAI,CAACR,QAAQ,GAAG,IAAI;EACxB;EACAS,MAAMA,CAAA,EAAG;IACL,IAAI,CAAC,IAAI,CAACT,QAAQ,IAAI,CAAC,IAAI,CAACG,IAAI,CAACI,cAAc,EAC3C;IACJ,IAAI,CAACJ,IAAI,CAACI,c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