UNPKG

@sandlada/vue-mdc

Version:

![Vue MDC Logo](https://raw.githubusercontent.com/sandlada/vue-mdc/refs/heads/main/docs/vue-mdc-cover.png)

62 lines (61 loc) 1.76 kB
/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 * * [Modified by Sandlada & Kai Orion] * * @license * Copyright 2025 Sandlada & Kai Orion * SPDX-License-Identifier: MIT */ import { defineComponent, ref, createVNode } from "vue"; import { useReflectAttribute } from "../../node_modules/@glare-labs/vue-reflect-attribute/build/vue-reflect-attribute.js"; import { componentNamePrefix } from "../../internals/component-name-prefix/component-name-prefix.js"; import { FocusRingController } from "./focus-ring-controller.js"; import { props } from "./focus-ring.definition.js"; import css from "./styles/focus-ring.module.scss.js"; const FocusRing = /* @__PURE__ */ defineComponent({ name: `${componentNamePrefix}-focus-ring`, props, slots: {}, emits: [], setup(props2) { const root = ref(null); const focusRingController = ref(null); const _for = ref(props2.for); const _inward = ref(props2.inward); const _shapeInherit = ref(props2.shapeInherit); useReflectAttribute(root, { attributes: [{ attribute: "for", ref: _for, reflect: true, type: "string" }, { attribute: "inward", ref: _inward, reflect: true, type: "boolean" }, { attribute: "shape-inherit", ref: _shapeInherit, reflect: true, type: "boolean" }], tick: "before" }); focusRingController.value = new FocusRingController(root); return () => createVNode("div", { "class": css["focus-ring"], "aria-hidden": "true", "data-component": "focus-ring", "ref": root }, null); }, inheritAttrs: true }); export { FocusRing }; //# sourceMappingURL=focus-ring.js.map