UNPKG

@shopware-ag/meteor-component-library

Version:

The meteor component library is a Vue component library developed by Shopware. It is based on the [Meteor Design System](https://shopware.design/).

55 lines (54 loc) 1.99 kB
import '../mt-search.css'; import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, unref, createVNode } from "vue"; import { useI18n } from "vue-i18n"; import { _ as _sfc_main$1 } from "../mt-icon.vue_vue_type_style_index_0_lang-2cc5f73e.mjs"; import { _ as _export_sfc } from "../_plugin-vue_export-helper-cc2b3d55.mjs"; const _hoisted_1 = ["value", "disabled", "placeholder"]; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "mt-search", props: { modelValue: {}, placeholder: {}, size: { default: "default" }, disabled: { type: Boolean } }, emits: ["change", "update:modelValue"], setup(__props) { const { t } = useI18n({ messages: { en: { placeholder: "Search" }, de: { placeholder: "Suchen" } } }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass(["mt-search", `mt-search--size-${_ctx.size}`, { "mt-search--disabled": _ctx.disabled }]) }, [ createElementVNode("input", { value: _ctx.modelValue, onInput: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.value)), onChange: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("change", $event.target.value)), class: "mt-search__input", disabled: _ctx.disabled, type: "search", placeholder: _ctx.placeholder || unref(t)("placeholder") }, null, 40, _hoisted_1), createVNode(_sfc_main$1, { name: "regular-search-s", size: "var(--scale-size-16)", color: "var(--color-icon-primary-default)" }) ], 2); }; } }); const mtSearch_vue_vue_type_style_index_0_scoped_7a3a41ec_lang = ""; const MtSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7a3a41ec"]]); export { MtSearch as default }; //# sourceMappingURL=MtSearch.js.map