UNPKG

@sandlada/vue-mdc

Version:

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

57 lines (56 loc) 1.44 kB
/** * @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"; const SearchBar = /* @__PURE__ */ defineComponent({ name: `${componentNamePrefix}-search-bar`, emits: [], slots: {}, props: { ["supporting-text"]: { type: String, default: "Search" } }, setup(props, {}) { const root = ref(null); const input = ref(null); const _supportingText = ref(props["supporting-text"]); useReflectAttribute(root, { attributes: [{ attribute: "supporting-text", ref: _supportingText, reflect: true, type: "string" }] }); useReflectAttribute(input, { attributes: [{ attribute: "placeholder", ref: _supportingText, reflect: false, type: "string" }] }); const handleInput = () => { }; return () => { return createVNode("span", { "ref": root }, [createVNode("input", { "ref": input, "onInput": handleInput, "type": "text", "inputmode": "search" }, null)]); }; } }); export { SearchBar }; //# sourceMappingURL=search-bar.js.map