@appbaseio/reactivesearch-vue
Version:
A Vue UI components library for building search experiences
109 lines (100 loc) • 3.39 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-1a877b17.js');
var vue = require('vue');
var VueTypes = _interopDefault(require('vue-types'));
require('@appbaseio/vue-emotion');
require('@emotion/css');
require('polished');
var vueTypes = require('./vueTypes-adf43075.js');
var Title = require('./Title-d513ac26.js');
var Card = require('./Card-abff695e.js');
function _isSlot(s) {
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
}
var ResultCardTitle = {
name: 'ResultCardTitle',
render: function render() {
var _slot;
var children = this.$slots["default"];
return vue.createVNode(Title.Title, this.$props, _isSlot(_slot = children()) ? _slot : {
"default": function _default() {
return [_slot];
}
});
}
};
ResultCardTitle.install = function (Vue) {
Vue.component(ResultCardTitle.name, ResultCardTitle);
};
var _excluded = ["src"];
var ResultCardImage = {
name: 'ResultCardImage',
props: {
src: VueTypes.string.isRequired
},
render: function render() {
var _this$$props = this.$props,
src = _this$$props.src,
props = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$$props, _excluded);
return vue.createVNode(Card.Image, vue.mergeProps({
"style": {
backgroundImage: "url(" + src + ")"
}
}, props), null);
}
};
ResultCardImage.install = function (Vue) {
Vue.component(ResultCardImage.name, ResultCardImage);
};
var ResultCardDescription = {
name: 'ResultCardDescription',
functional: true,
render: function render(context) {
return vue.createVNode("article", context.$props, [context.$slots["default"]()]);
}
};
ResultCardDescription.install = function (Vue) {
Vue.component(ResultCardDescription.name, ResultCardDescription);
};
var _excluded$1 = ["href", "target"];
function _isSlot$1(s) {
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
}
var ResultCard = {
name: 'ResultCard',
components: {
ResultCardTitle: ResultCardTitle,
ResultCardImage: ResultCardImage,
ResultCardDescription: ResultCardDescription
},
props: {
target: VueTypes.string.def('_blank'),
href: vueTypes.types.string
},
render: function render() {
var _slot;
var children = this.$slots["default"];
var _this$$props = this.$props,
href = _this$$props.href,
target = _this$$props.target,
rest = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$$props, _excluded$1);
return vue.createVNode(Card.Card, vue.mergeProps({
"href": href,
"target": target,
"rel": target === '_blank' ? 'noopener noreferrer' : null
}, rest), _isSlot$1(_slot = children()) ? _slot : {
"default": function _default() {
return [_slot];
}
});
}
};
ResultCard.install = function (Vue) {
Vue.component(ResultCard.name, ResultCard);
Vue.component(ResultCardTitle.name, ResultCardTitle);
Vue.component(ResultCardImage.name, ResultCardImage);
Vue.component(ResultCardDescription.name, ResultCardDescription);
};
exports.default = ResultCard;