first commit

This commit is contained in:
DanielRamirezGe
2020-01-14 20:43:08 -06:00
parent 3557894f7f
commit 5eecfbf6cd
26326 changed files with 2434803 additions and 0 deletions
+71
View File
@@ -0,0 +1,71 @@
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
import Vue from '../../utils/vue';
import { mergeData } from 'vue-functional-data-merge';
import prefixPropName from '../../utils/prefix-prop-name';
import copyProps from '../../utils/copy-props';
import pluckProps from '../../utils/pluck-props';
import cardMixin from '../../mixins/card';
import { BCardTitle, props as titleProps } from './card-title';
import { BCardSubTitle, props as subTitleProps } from './card-sub-title';
export var props = _objectSpread({}, copyProps(cardMixin.props, prefixPropName.bind(null, 'body')), {
bodyClass: {
type: [String, Object, Array],
default: null
}
}, titleProps, {}, subTitleProps, {
overlay: {
type: Boolean,
default: false
}
}); // @vue/component
export var BCardBody =
/*#__PURE__*/
Vue.extend({
name: 'BCardBody',
functional: true,
props: props,
render: function render(h, _ref) {
var _ref2;
var props = _ref.props,
data = _ref.data,
children = _ref.children;
var cardTitle = h();
var cardSubTitle = h();
var cardContent = children || [h()];
if (props.title) {
cardTitle = h(BCardTitle, {
props: pluckProps(titleProps, props)
});
}
if (props.subTitle) {
cardSubTitle = h(BCardSubTitle, {
props: pluckProps(subTitleProps, props),
class: ['mb-2']
});
}
return h(props.bodyTag, mergeData(data, {
staticClass: 'card-body',
class: [(_ref2 = {
'card-img-overlay': props.overlay
}, _defineProperty(_ref2, "bg-".concat(props.bodyBgVariant), Boolean(props.bodyBgVariant)), _defineProperty(_ref2, "border-".concat(props.bodyBorderVariant), Boolean(props.bodyBorderVariant)), _defineProperty(_ref2, "text-".concat(props.bodyTextVariant), Boolean(props.bodyTextVariant)), _ref2), props.bodyClass || {}]
}), [cardTitle, cardSubTitle].concat(_toConsumableArray(cardContent)));
}
});
+47
View File
@@ -0,0 +1,47 @@
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
import Vue from '../../utils/vue';
import { mergeData } from 'vue-functional-data-merge';
import prefixPropName from '../../utils/prefix-prop-name';
import copyProps from '../../utils/copy-props';
import { htmlOrText } from '../../utils/html';
import cardMixin from '../../mixins/card';
export var props = _objectSpread({}, copyProps(cardMixin.props, prefixPropName.bind(null, 'footer')), {
footer: {
type: String,
default: null
},
footerHtml: {
type: String,
default: null
},
footerClass: {
type: [String, Object, Array],
default: null
}
}); // @vue/component
export var BCardFooter =
/*#__PURE__*/
Vue.extend({
name: 'BCardFooter',
functional: true,
props: props,
render: function render(h, _ref) {
var _ref2;
var props = _ref.props,
data = _ref.data,
children = _ref.children;
return h(props.footerTag, mergeData(data, {
staticClass: 'card-footer',
class: [props.footerClass, (_ref2 = {}, _defineProperty(_ref2, "bg-".concat(props.footerBgVariant), Boolean(props.footerBgVariant)), _defineProperty(_ref2, "border-".concat(props.footerBorderVariant), Boolean(props.footerBorderVariant)), _defineProperty(_ref2, "text-".concat(props.footerTextVariant), Boolean(props.footerTextVariant)), _ref2)]
}), children || [h('div', {
domProps: htmlOrText(props.footerHtml, props.footer)
})]);
}
});
+40
View File
@@ -0,0 +1,40 @@
import Vue from '../../utils/vue';
import { mergeData } from 'vue-functional-data-merge';
export var props = {
tag: {
type: String,
default: 'div'
},
deck: {
type: Boolean,
default: false
},
columns: {
type: Boolean,
default: false
}
}; // @vue/component
export var BCardGroup =
/*#__PURE__*/
Vue.extend({
name: 'BCardGroup',
functional: true,
props: props,
render: function render(h, _ref) {
var props = _ref.props,
data = _ref.data,
children = _ref.children;
var baseClass = 'card-group';
if (props.deck) {
baseClass = 'card-deck';
} else if (props.columns) {
baseClass = 'card-columns';
}
return h(props.tag, mergeData(data, {
class: baseClass
}), children);
}
});
+47
View File
@@ -0,0 +1,47 @@
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
import Vue from '../../utils/vue';
import { mergeData } from 'vue-functional-data-merge';
import prefixPropName from '../../utils/prefix-prop-name';
import copyProps from '../../utils/copy-props';
import { htmlOrText } from '../../utils/html';
import cardMixin from '../../mixins/card';
export var props = _objectSpread({}, copyProps(cardMixin.props, prefixPropName.bind(null, 'header')), {
header: {
type: String,
default: null
},
headerHtml: {
type: String,
default: null
},
headerClass: {
type: [String, Object, Array],
default: null
}
}); // @vue/component
export var BCardHeader =
/*#__PURE__*/
Vue.extend({
name: 'BCardHeader',
functional: true,
props: props,
render: function render(h, _ref) {
var _ref2;
var props = _ref.props,
data = _ref.data,
children = _ref.children;
return h(props.headerTag, mergeData(data, {
staticClass: 'card-header',
class: [props.headerClass, (_ref2 = {}, _defineProperty(_ref2, "bg-".concat(props.headerBgVariant), Boolean(props.headerBgVariant)), _defineProperty(_ref2, "border-".concat(props.headerBorderVariant), Boolean(props.headerBorderVariant)), _defineProperty(_ref2, "text-".concat(props.headerTextVariant), Boolean(props.headerTextVariant)), _ref2)]
}), children || [h('div', {
domProps: htmlOrText(props.headerHtml, props.header)
})]);
}
});
+76
View File
@@ -0,0 +1,76 @@
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
import Vue from '../../utils/vue';
import { omit } from '../../utils/object';
import { mergeData } from 'vue-functional-data-merge';
import { BImgLazy, props as imgLazyProps } from '../image/img-lazy'; // Copy of `<b-img-lazy>` props, and remove conflicting/non-applicable props
// The `omit()` util creates a new object, so we can just pass the original props
var lazyProps = omit(imgLazyProps, ['left', 'right', 'center', 'block', 'rounded', 'thumbnail', 'fluid', 'fluidGrow']);
export var props = _objectSpread({}, lazyProps, {
top: {
type: Boolean,
default: false
},
bottom: {
type: Boolean,
default: false
},
start: {
type: Boolean,
default: false
},
left: {
// alias of 'start'
type: Boolean,
default: false
},
end: {
type: Boolean,
default: false
},
right: {
// alias of 'end'
type: Boolean,
default: false
}
}); // @vue/component
export var BCardImgLazy =
/*#__PURE__*/
Vue.extend({
name: 'BCardImgLazy',
functional: true,
props: props,
render: function render(h, _ref) {
var props = _ref.props,
data = _ref.data;
var baseClass = 'card-img';
if (props.top) {
baseClass += '-top';
} else if (props.right || props.end) {
baseClass += '-right';
} else if (props.bottom) {
baseClass += '-bottom';
} else if (props.left || props.start) {
baseClass += '-left';
} // False out the left/center/right props before passing to b-img-lazy
var lazyProps = _objectSpread({}, props, {
left: false,
right: false,
center: false
});
return h(BImgLazy, mergeData(data, {
class: [baseClass],
props: lazyProps
}));
}
});
+80
View File
@@ -0,0 +1,80 @@
import Vue from '../../utils/vue';
import { mergeData } from 'vue-functional-data-merge';
export var props = {
src: {
type: String,
default: null,
required: true
},
alt: {
type: String,
default: null
},
top: {
type: Boolean,
default: false
},
bottom: {
type: Boolean,
default: false
},
start: {
type: Boolean,
default: false
},
left: {
// alias of 'start'
type: Boolean,
default: false
},
end: {
type: Boolean,
default: false
},
right: {
// alias of 'end'
type: Boolean,
default: false
},
height: {
type: [Number, String],
default: null
},
width: {
type: [Number, String],
default: null
}
}; // @vue/component
export var BCardImg =
/*#__PURE__*/
Vue.extend({
name: 'BCardImg',
functional: true,
props: props,
render: function render(h, _ref) {
var props = _ref.props,
data = _ref.data;
var baseClass = 'card-img';
if (props.top) {
baseClass += '-top';
} else if (props.right || props.end) {
baseClass += '-right';
} else if (props.bottom) {
baseClass += '-bottom';
} else if (props.left || props.start) {
baseClass += '-left';
}
return h('img', mergeData(data, {
class: [baseClass],
attrs: {
src: props.src,
alt: props.alt,
height: props.height,
width: props.width
}
}));
}
});
+37
View File
@@ -0,0 +1,37 @@
import Vue from '../../utils/vue';
import { mergeData } from 'vue-functional-data-merge';
import { getComponentConfig } from '../../utils/config';
var NAME = 'BCardSubTitle';
export var props = {
subTitle: {
type: String,
default: ''
},
subTitleTag: {
type: String,
default: 'h6'
},
subTitleTextVariant: {
type: String,
default: function _default() {
return getComponentConfig(NAME, 'subTitleTextVariant');
}
}
}; // @vue/component
export var BCardSubTitle =
/*#__PURE__*/
Vue.extend({
name: NAME,
functional: true,
props: props,
render: function render(h, _ref) {
var props = _ref.props,
data = _ref.data,
children = _ref.children;
return h(props.subTitleTag, mergeData(data, {
staticClass: 'card-subtitle',
class: [props.subTitleTextVariant ? "text-".concat(props.subTitleTextVariant) : null]
}), children || props.subTitle);
}
});
+24
View File
@@ -0,0 +1,24 @@
import Vue from '../../utils/vue';
import { mergeData } from 'vue-functional-data-merge';
export var props = {
textTag: {
type: String,
default: 'p'
}
}; // @vue/component
export var BCardText =
/*#__PURE__*/
Vue.extend({
name: 'BCardText',
functional: true,
props: props,
render: function render(h, _ref) {
var props = _ref.props,
data = _ref.data,
children = _ref.children;
return h(props.textTag, mergeData(data, {
staticClass: 'card-text'
}), children);
}
});
+28
View File
@@ -0,0 +1,28 @@
import Vue from '../../utils/vue';
import { mergeData } from 'vue-functional-data-merge';
export var props = {
title: {
type: String,
default: ''
},
titleTag: {
type: String,
default: 'h4'
}
}; // @vue/component
export var BCardTitle =
/*#__PURE__*/
Vue.extend({
name: 'BCardTitle',
functional: true,
props: props,
render: function render(h, _ref) {
var props = _ref.props,
data = _ref.data,
children = _ref.children;
return h(props.titleTag, mergeData(data, {
staticClass: 'card-title'
}), children || props.title);
}
});
+104
View File
@@ -0,0 +1,104 @@
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
import Vue from '../../utils/vue';
import { mergeData } from 'vue-functional-data-merge';
import prefixPropName from '../../utils/prefix-prop-name';
import unPrefixPropName from '../../utils/unprefix-prop-name';
import copyProps from '../../utils/copy-props';
import pluckProps from '../../utils/pluck-props';
import { hasNormalizedSlot, normalizeSlot } from '../../utils/normalize-slot';
import cardMixin from '../../mixins/card';
import { BCardBody, props as bodyProps } from './card-body';
import { BCardHeader, props as headerProps } from './card-header';
import { BCardFooter, props as footerProps } from './card-footer';
import { BCardImg, props as imgProps } from './card-img';
var cardImgProps = copyProps(imgProps, prefixPropName.bind(null, 'img'));
cardImgProps.imgSrc.required = false;
export var props = _objectSpread({}, bodyProps, {}, headerProps, {}, footerProps, {}, cardImgProps, {}, copyProps(cardMixin.props), {
align: {
type: String,
default: null
},
noBody: {
type: Boolean,
default: false
}
}); // @vue/component
export var BCard =
/*#__PURE__*/
Vue.extend({
name: 'BCard',
functional: true,
props: props,
render: function render(h, _ref) {
var _class;
var props = _ref.props,
data = _ref.data,
slots = _ref.slots,
scopedSlots = _ref.scopedSlots;
var $slots = slots(); // Vue < 2.6.x may return undefined for scopedSlots
var $scopedSlots = scopedSlots || {}; // Create placeholder elements for each section
var imgFirst = h();
var header = h();
var content = h();
var footer = h();
var imgLast = h();
if (props.imgSrc) {
var img = h(BCardImg, {
props: pluckProps(cardImgProps, props, unPrefixPropName.bind(null, 'img'))
});
if (props.imgBottom) {
imgLast = img;
} else {
imgFirst = img;
}
}
if (props.header || hasNormalizedSlot('header', $scopedSlots, $slots)) {
header = h(BCardHeader, {
props: pluckProps(headerProps, props)
}, normalizeSlot('header', {}, $scopedSlots, $slots));
}
content = normalizeSlot('default', {}, $scopedSlots, $slots) || [];
if (!props.noBody) {
// Wrap content in card-body
content = [h(BCardBody, {
props: pluckProps(bodyProps, props)
}, _toConsumableArray(content))];
}
if (props.footer || hasNormalizedSlot('footer', $scopedSlots, $slots)) {
footer = h(BCardFooter, {
props: pluckProps(footerProps, props)
}, normalizeSlot('footer', {}, $scopedSlots, $slots));
}
return h(props.tag, mergeData(data, {
staticClass: 'card',
class: (_class = {
'flex-row': props.imgLeft || props.imgStart,
'flex-row-reverse': (props.imgRight || props.imgEnd) && !(props.imgLeft || props.imgStart)
}, _defineProperty(_class, "text-".concat(props.align), Boolean(props.align)), _defineProperty(_class, "bg-".concat(props.bgVariant), Boolean(props.bgVariant)), _defineProperty(_class, "border-".concat(props.borderVariant), Boolean(props.borderVariant)), _defineProperty(_class, "text-".concat(props.textVariant), Boolean(props.textVariant)), _class)
}), [imgFirst, header].concat(_toConsumableArray(content), [footer, imgLast]));
}
});
+38
View File
@@ -0,0 +1,38 @@
//
// Card
//
import Vue from 'vue'
import { BvPlugin, BvComponent } from '../../'
// Plugin
export declare const CardPlugin: BvPlugin
// Component: b-card
export declare class BCard extends BvComponent {}
// Component: b-card-header
export declare class BCardHeader extends BvComponent {}
// Component: b-card-footer
export declare class BCardFooter extends BvComponent {}
// Component: b-card-body
export declare class BCardBody extends BvComponent {}
// Component: b-card-title
export declare class BCardTitle extends BvComponent {}
// Component: b-card-sub-title
export declare class BCardSubTitle extends BvComponent {}
// Component: b-card-img
export declare class BCardImg extends BvComponent {}
// Component: b-card-img-lazy
export declare class BCardImgLazy extends BvComponent {}
// Component: b-card-text
export declare class BCardText extends BvComponent {}
// Component: b-card-group
export declare class BCardGroup extends BvComponent {}
+28
View File
@@ -0,0 +1,28 @@
import { BCard } from './card';
import { BCardHeader } from './card-header';
import { BCardBody } from './card-body';
import { BCardTitle } from './card-title';
import { BCardSubTitle } from './card-sub-title';
import { BCardFooter } from './card-footer';
import { BCardImg } from './card-img';
import { BCardImgLazy } from './card-img-lazy';
import { BCardText } from './card-text';
import { BCardGroup } from './card-group';
import { pluginFactory } from '../../utils/plugins';
var CardPlugin =
/*#__PURE__*/
pluginFactory({
components: {
BCard: BCard,
BCardHeader: BCardHeader,
BCardBody: BCardBody,
BCardTitle: BCardTitle,
BCardSubTitle: BCardSubTitle,
BCardFooter: BCardFooter,
BCardImg: BCardImg,
BCardImgLazy: BCardImgLazy,
BCardText: BCardText,
BCardGroup: BCardGroup
}
});
export { CardPlugin, BCard, BCardHeader, BCardBody, BCardTitle, BCardSubTitle, BCardFooter, BCardImg, BCardImgLazy, BCardText, BCardGroup };