vuetify
Version:
Vue.js 2 Semantic Component Framework
1,173 lines (1,068 loc) • 956 kB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("vue"));
else if(typeof define === 'function' && define.amd)
define(["vue"], factory);
else if(typeof exports === 'object')
exports["Vuetify"] = factory(require("vue"));
else
root["Vuetify"] = factory(root["Vue"]);
})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_vue__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/dist/";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./src/index.ts");
/******/ })
/************************************************************************/
/******/ ({
/***/ "./src/components/VAlert/VAlert.ts":
/*!*****************************************!*\
!*** ./src/components/VAlert/VAlert.ts ***!
\*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _stylus_components_alerts_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_alerts.styl */ "./src/stylus/components/_alerts.styl");
/* harmony import */ var _stylus_components_alerts_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_alerts_styl__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts");
/* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts");
/* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts");
/* harmony import */ var _mixins_transitionable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/transitionable */ "./src/mixins/transitionable.ts");
/* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
// Styles
// Components
// Mixins
/* @vue/component */
/* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_5__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_transitionable__WEBPACK_IMPORTED_MODULE_4__["default"]).extend({
name: 'v-alert',
props: {
dismissible: Boolean,
icon: String,
outline: Boolean,
type: {
type: String,
validator: function validator(val) {
return ['info', 'error', 'success', 'warning'].includes(val);
}
}
},
computed: {
computedColor: function computedColor() {
return this.type && !this.color ? this.type : this.color || 'error';
},
computedIcon: function computedIcon() {
if (this.icon || !this.type) return this.icon;
switch (this.type) {
case 'info':
return '$vuetify.icons.info';
case 'error':
return '$vuetify.icons.error';
case 'success':
return '$vuetify.icons.success';
case 'warning':
return '$vuetify.icons.warning';
}
}
},
methods: {
genIcon: function genIcon() {
if (!this.computedIcon) return null;
return this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], {
'class': 'v-alert__icon'
}, this.computedIcon);
},
genDismissible: function genDismissible() {
var _this = this;
if (!this.dismissible) return null;
return this.$createElement('a', {
'class': 'v-alert__dismissible',
on: { click: function click() {
_this.isActive = false;
} }
}, [this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], {
props: {
right: true
}
}, '$vuetify.icons.cancel')]);
}
},
render: function render(h) {
var children = [this.genIcon(), h('div', this.$slots.default), this.genDismissible()];
var setColor = this.outline ? this.setTextColor : this.setBackgroundColor;
var alert = h('div', setColor(this.computedColor, {
staticClass: 'v-alert',
'class': {
'v-alert--outline': this.outline
},
directives: [{
name: 'show',
value: this.isActive
}],
on: this.$listeners
}), children);
if (!this.transition) return alert;
return h('transition', {
props: {
name: this.transition,
origin: this.origin,
mode: this.mode
}
}, [alert]);
}
}));
/***/ }),
/***/ "./src/components/VAlert/index.ts":
/*!****************************************!*\
!*** ./src/components/VAlert/index.ts ***!
\****************************************/
/*! exports provided: VAlert, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _VAlert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VAlert */ "./src/components/VAlert/VAlert.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VAlert", function() { return _VAlert__WEBPACK_IMPORTED_MODULE_0__["default"]; });
/* harmony default export */ __webpack_exports__["default"] = (_VAlert__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./src/components/VApp/VApp.js":
/*!*************************************!*\
!*** ./src/components/VApp/VApp.js ***!
\*************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _stylus_components_app_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_app.styl */ "./src/stylus/components/_app.styl");
/* harmony import */ var _stylus_components_app_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_app_styl__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _mixins_app_theme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mixins/app-theme */ "./src/components/VApp/mixins/app-theme.js");
/* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts");
/* harmony import */ var _directives_resize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../directives/resize */ "./src/directives/resize.ts");
var __assign = undefined && undefined.__assign || function () {
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
}
return t;
};
return __assign.apply(this, arguments);
};
// Component level mixins
// Directives
/* @vue/component */
/* harmony default export */ __webpack_exports__["default"] = ({
name: 'v-app',
directives: {
Resize: _directives_resize__WEBPACK_IMPORTED_MODULE_3__["default"]
},
mixins: [_mixins_app_theme__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__["default"]],
props: {
id: {
type: String,
default: 'app'
},
dark: Boolean
},
computed: {
classes: function classes() {
return __assign({ 'application--is-rtl': this.$vuetify.rtl }, this.themeClasses);
}
},
watch: {
dark: function dark() {
this.$vuetify.dark = this.dark;
}
},
mounted: function mounted() {
this.$vuetify.dark = this.dark;
},
render: function render(h) {
var data = {
staticClass: 'application',
'class': this.classes,
attrs: { 'data-app': true },
domProps: { id: this.id }
};
var wrapper = h('div', { staticClass: 'application--wrap' }, this.$slots.default);
return h('div', data, [wrapper]);
}
});
/***/ }),
/***/ "./src/components/VApp/index.js":
/*!**************************************!*\
!*** ./src/components/VApp/index.js ***!
\**************************************/
/*! exports provided: VApp, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _VApp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VApp */ "./src/components/VApp/VApp.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VApp", function() { return _VApp__WEBPACK_IMPORTED_MODULE_0__["default"]; });
/* harmony default export */ __webpack_exports__["default"] = (_VApp__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./src/components/VApp/mixins/app-theme.js":
/*!*************************************************!*\
!*** ./src/components/VApp/mixins/app-theme.js ***!
\*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/theme */ "./src/util/theme.ts");
/* harmony default export */ __webpack_exports__["default"] = ({
data: function data() {
return {
style: null
};
},
computed: {
parsedTheme: function parsedTheme() {
return _util_theme__WEBPACK_IMPORTED_MODULE_0__["parse"](this.$vuetify.theme);
},
/** @return string */
generatedStyles: function generatedStyles() {
var theme = this.parsedTheme;
var css;
if (this.$vuetify.options.themeCache != null) {
css = this.$vuetify.options.themeCache.get(theme);
if (css != null) return css;
}
css = _util_theme__WEBPACK_IMPORTED_MODULE_0__["genStyles"](theme, this.$vuetify.options.customProperties);
if (this.$vuetify.options.minifyTheme != null) {
css = this.$vuetify.options.minifyTheme(css);
}
if (this.$vuetify.options.themeCache != null) {
this.$vuetify.options.themeCache.set(theme, css);
}
return css;
},
vueMeta: function vueMeta() {
if (this.$vuetify.theme === false) return {};
var options = {
cssText: this.generatedStyles,
id: 'vuetify-theme-stylesheet',
type: 'text/css'
};
if (this.$vuetify.options.cspNonce) {
options.nonce = this.$vuetify.options.cspNonce;
}
return {
style: [options]
};
}
},
// Regular vue-meta
metaInfo: function metaInfo() {
return this.vueMeta;
},
// Nuxt
head: function head() {
return this.vueMeta;
},
watch: {
generatedStyles: function generatedStyles() {
!this.meta && this.applyTheme();
}
},
created: function created() {
if (this.$vuetify.theme === false) return;
if (this.$meta) {
// Vue-meta
// Handled by metaInfo()/nuxt()
} else if (typeof document === 'undefined' && this.$ssrContext) {
// SSR
var nonce = this.$vuetify.options.cspNonce ? " nonce=\"" + this.$vuetify.options.cspNonce + "\"" : '';
this.$ssrContext.head = this.$ssrContext.head || '';
this.$ssrContext.head += "<style type=\"text/css\" id=\"vuetify-theme-stylesheet\"" + nonce + ">" + this.generatedStyles + "</style>";
} else if (typeof document !== 'undefined') {
// Client-side
this.genStyle();
this.applyTheme();
}
},
methods: {
applyTheme: function applyTheme() {
if (this.style) this.style.innerHTML = this.generatedStyles;
},
genStyle: function genStyle() {
var style = document.getElementById('vuetify-theme-stylesheet');
if (!style) {
style = document.createElement('style');
style.type = 'text/css';
style.id = 'vuetify-theme-stylesheet';
if (this.$vuetify.options.cspNonce) {
style.setAttribute('nonce', this.$vuetify.options.cspNonce);
}
document.head.appendChild(style);
}
this.style = style;
}
}
});
/***/ }),
/***/ "./src/components/VAutocomplete/VAutocomplete.js":
/*!*******************************************************!*\
!*** ./src/components/VAutocomplete/VAutocomplete.js ***!
\*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _stylus_components_autocompletes_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_autocompletes.styl */ "./src/stylus/components/_autocompletes.styl");
/* harmony import */ var _stylus_components_autocompletes_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_autocompletes_styl__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VSelect/VSelect */ "./src/components/VSelect/VSelect.js");
/* harmony import */ var _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VTextField/VTextField */ "./src/components/VTextField/VTextField.js");
/* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts");
var __assign = undefined && undefined.__assign || function () {
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
}
return t;
};
return __assign.apply(this, arguments);
};
// Styles
// Extensions
// Utils
var defaultMenuProps = __assign({}, _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["defaultMenuProps"], { offsetY: true, offsetOverflow: true, transition: false });
/* @vue/component */
/* harmony default export */ __webpack_exports__["default"] = ({
name: 'v-autocomplete',
extends: _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"],
props: {
allowOverflow: {
type: Boolean,
default: true
},
browserAutocomplete: {
type: String,
default: 'off'
},
filter: {
type: Function,
default: function _default(item, queryText, itemText) {
var hasValue = function hasValue(val) {
return val != null ? val : '';
};
var text = hasValue(itemText);
var query = hasValue(queryText);
return text.toString().toLowerCase().indexOf(query.toString().toLowerCase()) > -1;
}
},
hideNoData: Boolean,
noFilter: Boolean,
searchInput: {
default: undefined
},
menuProps: {
type: _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].props.menuProps.type,
default: function _default() {
return defaultMenuProps;
}
}
},
data: function data(vm) {
return {
attrsInput: null,
lazySearch: vm.searchInput
};
},
computed: {
classes: function classes() {
return Object.assign({}, _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].computed.classes.call(this), {
'v-autocomplete': true,
'v-autocomplete--is-selecting-index': this.selectedIndex > -1
});
},
computedItems: function computedItems() {
return this.filteredItems;
},
displayedItemsCount: function displayedItemsCount() {
return this.hideSelected ? this.filteredItems.length - this.selectedItems.length : this.filteredItems.length;
},
/**
* The range of the current input text
*
* @return {Number}
*/
currentRange: function currentRange() {
if (this.selectedItem == null) return 0;
return this.getText(this.selectedItem).toString().length;
},
filteredItems: function filteredItems() {
var _this = this;
if (!this.isSearching || this.noFilter) return this.allItems;
return this.allItems.filter(function (i) {
return _this.filter(i, _this.internalSearch, _this.getText(i));
});
},
internalSearch: {
get: function get() {
return this.lazySearch;
},
set: function set(val) {
this.lazySearch = val;
this.$emit('update:searchInput', val);
}
},
isAnyValueAllowed: function isAnyValueAllowed() {
return false;
},
isDirty: function isDirty() {
return this.searchIsDirty || this.selectedItems.length > 0;
},
isSearching: function isSearching() {
if (this.multiple) return this.searchIsDirty;
return this.searchIsDirty && this.internalSearch !== this.getText(this.selectedItem);
},
menuCanShow: function menuCanShow() {
if (!this.isFocused) return false;
return this.displayedItemsCount > 0 || !this.hideNoData;
},
$_menuProps: function $_menuProps() {
var props = _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].computed.$_menuProps.call(this);
props.contentClass = ("v-autocomplete__content " + (props.contentClass || '')).trim();
return __assign({}, defaultMenuProps, props);
},
searchIsDirty: function searchIsDirty() {
return this.internalSearch != null && this.internalSearch !== '';
},
selectedItem: function selectedItem() {
var _this = this;
if (this.multiple) return null;
return this.selectedItems.find(function (i) {
return _this.valueComparator(_this.getValue(i), _this.getValue(_this.internalValue));
});
},
listData: function listData() {
var data = _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].computed.listData.call(this);
Object.assign(data.props, {
items: this.virtualizedItems,
noFilter: this.noFilter || !this.isSearching || !this.filteredItems.length,
searchInput: this.internalSearch
});
return data;
}
},
watch: {
filteredItems: function filteredItems(val) {
this.onFilteredItemsChanged(val);
},
internalValue: function internalValue() {
this.setSearch();
},
isFocused: function isFocused(val) {
if (val) {
this.$refs.input && this.$refs.input.select();
} else {
this.updateSelf();
}
},
isMenuActive: function isMenuActive(val) {
if (val || !this.hasSlot) return;
this.lazySearch = null;
},
items: function items(val, oldVal) {
// If we are focused, the menu
// is not active, hide no data is enabled,
// and items change
// User is probably async loading
// items, try to activate the menu
if (!(oldVal && oldVal.length) && this.hideNoData && this.isFocused && !this.isMenuActive && val.length) this.activateMenu();
},
searchInput: function searchInput(val) {
this.lazySearch = val;
},
internalSearch: function internalSearch(val) {
this.onInternalSearchChanged(val);
}
},
created: function created() {
this.setSearch();
},
methods: {
onFilteredItemsChanged: function onFilteredItemsChanged(val) {
var _this = this;
this.setMenuIndex(-1);
this.$nextTick(function () {
_this.setMenuIndex(val.length === 1 ? 0 : -1);
});
},
onInternalSearchChanged: function onInternalSearchChanged(val) {
this.updateMenuDimensions();
},
updateMenuDimensions: function updateMenuDimensions() {
if (this.isMenuActive && this.$refs.menu) {
this.$refs.menu.updateDimensions();
}
},
changeSelectedIndex: function changeSelectedIndex(keyCode) {
// Do not allow changing of selectedIndex
// when search is dirty
if (this.searchIsDirty) return;
if (![_util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].backspace, _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].left, _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].right, _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].delete].includes(keyCode)) return;
var indexes = this.selectedItems.length - 1;
if (keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].left) {
this.selectedIndex = this.selectedIndex === -1 ? indexes : this.selectedIndex - 1;
} else if (keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].right) {
this.selectedIndex = this.selectedIndex >= indexes ? -1 : this.selectedIndex + 1;
} else if (this.selectedIndex === -1) {
this.selectedIndex = indexes;
return;
}
var currentItem = this.selectedItems[this.selectedIndex];
if ([_util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].backspace, _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].delete].includes(keyCode) && !this.getDisabled(currentItem)) {
var newIndex = this.selectedIndex === indexes ? this.selectedIndex - 1 : this.selectedItems[this.selectedIndex + 1] ? this.selectedIndex : -1;
if (newIndex === -1) {
this.setValue(this.multiple ? [] : undefined);
} else {
this.selectItem(currentItem);
}
this.selectedIndex = newIndex;
}
},
clearableCallback: function clearableCallback() {
this.internalSearch = undefined;
_VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.clearableCallback.call(this);
},
genInput: function genInput() {
var input = _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_2__["default"].methods.genInput.call(this);
input.data.attrs.role = 'combobox';
input.data.domProps.value = this.internalSearch;
return input;
},
genSelections: function genSelections() {
return this.hasSlot || this.multiple ? _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.genSelections.call(this) : [];
},
onClick: function onClick() {
if (this.isDisabled) return;
this.selectedIndex > -1 ? this.selectedIndex = -1 : this.onFocus();
this.activateMenu();
},
onEnterDown: function onEnterDown() {
// Avoid invoking this method
// will cause updateSelf to
// be called emptying search
},
onInput: function onInput(e) {
if (this.selectedIndex > -1) return;
// If typing and menu is not currently active
if (e.target.value) {
this.activateMenu();
if (!this.isAnyValueAllowed) this.setMenuIndex(0);
}
this.mask && this.resetSelections(e.target);
this.internalSearch = e.target.value;
this.badInput = e.target.validity && e.target.validity.badInput;
},
onKeyDown: function onKeyDown(e) {
var keyCode = e.keyCode;
_VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.onKeyDown.call(this, e);
// The ordering is important here
// allows new value to be updated
// and then moves the index to the
// proper location
this.changeSelectedIndex(keyCode);
},
onTabDown: function onTabDown(e) {
_VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.onTabDown.call(this, e);
this.updateSelf();
},
setSelectedItems: function setSelectedItems() {
_VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.setSelectedItems.call(this);
// #4273 Don't replace if searching
// #4403 Don't replace if focused
if (!this.isFocused) this.setSearch();
},
setSearch: function setSearch() {
var _this = this;
// Wait for nextTick so selectedItem
// has had time to update
this.$nextTick(function () {
_this.internalSearch = !_this.selectedItems.length || _this.multiple || _this.hasSlot ? null : _this.getText(_this.selectedItem);
});
},
updateSelf: function updateSelf() {
this.updateAutocomplete();
},
updateAutocomplete: function updateAutocomplete() {
if (!this.searchIsDirty && !this.internalValue) return;
if (!this.valueComparator(this.internalSearch, this.getValue(this.internalValue))) {
this.setSearch();
}
}
}
});
/***/ }),
/***/ "./src/components/VAutocomplete/index.js":
/*!***********************************************!*\
!*** ./src/components/VAutocomplete/index.js ***!
\***********************************************/
/*! exports provided: VAutocomplete, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _VAutocomplete__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VAutocomplete */ "./src/components/VAutocomplete/VAutocomplete.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VAutocomplete", function() { return _VAutocomplete__WEBPACK_IMPORTED_MODULE_0__["default"]; });
/* harmony default export */ __webpack_exports__["default"] = (_VAutocomplete__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./src/components/VAvatar/VAvatar.ts":
/*!*******************************************!*\
!*** ./src/components/VAvatar/VAvatar.ts ***!
\*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _stylus_components_avatars_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_avatars.styl */ "./src/stylus/components/_avatars.styl");
/* harmony import */ var _stylus_components_avatars_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_avatars_styl__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts");
/* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts");
/* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
var __assign = undefined && undefined.__assign || function () {
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
}
return t;
};
return __assign.apply(this, arguments);
};
// Mixins
/* @vue/component */
/* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_3__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"]).extend({
name: 'v-avatar',
functional: true,
props: {
// TODO: inherit these
color: String,
size: {
type: [Number, String],
default: 48
},
tile: Boolean
},
render: function render(h, _a) {
var data = _a.data,
props = _a.props,
children = _a.children;
data.staticClass = ("v-avatar " + (data.staticClass || '')).trim();
if (props.tile) data.staticClass += ' v-avatar--tile';
var size = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["convertToUnit"])(props.size);
data.style = __assign({ height: size, width: size }, data.style);
return h('div', _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"].options.methods.setBackgroundColor(props.color, data), children);
}
}));
/***/ }),
/***/ "./src/components/VAvatar/index.ts":
/*!*****************************************!*\
!*** ./src/components/VAvatar/index.ts ***!
\*****************************************/
/*! exports provided: VAvatar, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _VAvatar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VAvatar */ "./src/components/VAvatar/VAvatar.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VAvatar", function() { return _VAvatar__WEBPACK_IMPORTED_MODULE_0__["default"]; });
/* harmony default export */ __webpack_exports__["default"] = (_VAvatar__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./src/components/VBadge/VBadge.ts":
/*!*****************************************!*\
!*** ./src/components/VBadge/VBadge.ts ***!
\*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _stylus_components_badges_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_badges.styl */ "./src/stylus/components/_badges.styl");
/* harmony import */ var _stylus_components_badges_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_badges_styl__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts");
/* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts");
/* harmony import */ var _mixins_positionable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/positionable */ "./src/mixins/positionable.ts");
/* harmony import */ var _mixins_transitionable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/transitionable */ "./src/mixins/transitionable.ts");
/* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
// Styles
// Mixins
/* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_5__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_2__["default"], Object(_mixins_positionable__WEBPACK_IMPORTED_MODULE_3__["factory"])(['left', 'bottom']), _mixins_transitionable__WEBPACK_IMPORTED_MODULE_4__["default"]
/* @vue/component */
).extend({
name: 'v-badge',
props: {
color: {
type: String,
default: 'primary'
},
overlap: Boolean,
transition: {
type: String,
default: 'fab-transition'
},
value: {
default: true
}
},
computed: {
classes: function classes() {
return {
'v-badge--bottom': this.bottom,
'v-badge--left': this.left,
'v-badge--overlap': this.overlap
};
}
},
render: function render(h) {
var badge = this.$slots.badge ? [h('span', this.setBackgroundColor(this.color, {
staticClass: 'v-badge__badge',
attrs: this.$attrs,
directives: [{
name: 'show',
value: this.isActive
}]
}), this.$slots.badge)] : null;
return h('span', {
staticClass: 'v-badge',
'class': this.classes
}, [this.$slots.default, h('transition', {
props: {
name: this.transition,
origin: this.origin,
mode: this.mode
}
}, badge)]);
}
}));
/***/ }),
/***/ "./src/components/VBadge/index.ts":
/*!****************************************!*\
!*** ./src/components/VBadge/index.ts ***!
\****************************************/
/*! exports provided: VBadge, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _VBadge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VBadge */ "./src/components/VBadge/VBadge.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBadge", function() { return _VBadge__WEBPACK_IMPORTED_MODULE_0__["default"]; });
/* harmony default export */ __webpack_exports__["default"] = (_VBadge__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./src/components/VBottomNav/VBottomNav.ts":
/*!*************************************************!*\
!*** ./src/components/VBottomNav/VBottomNav.ts ***!
\*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _stylus_components_bottom_navs_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_bottom-navs.styl */ "./src/stylus/components/_bottom-navs.styl");
/* harmony import */ var _stylus_components_bottom_navs_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_bottom_navs_styl__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _mixins_applicationable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/applicationable */ "./src/mixins/applicationable.ts");
/* harmony import */ var _mixins_button_group__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/button-group */ "./src/mixins/button-group.ts");
/* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts");
/* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
// Styles
// Mixins
// Util
/* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_4__["default"])(Object(_mixins_applicationable__WEBPACK_IMPORTED_MODULE_1__["default"])('bottom', ['height', 'value']), _mixins_colorable__WEBPACK_IMPORTED_MODULE_3__["default"]
/* @vue/component */
).extend({
name: 'v-bottom-nav',
props: {
active: [Number, String],
mandatory: Boolean,
height: {
default: 56,
type: [Number, String],
validator: function validator(v) {
return !isNaN(parseInt(v));
}
},
shift: Boolean,
value: null
},
computed: {
classes: function classes() {
return {
'v-bottom-nav--absolute': this.absolute,
'v-bottom-nav--fixed': !this.absolute && (this.app || this.fixed),
'v-bottom-nav--shift': this.shift,
'v-bottom-nav--active': this.value
};
},
computedHeight: function computedHeight() {
return parseInt(this.height);
}
},
methods: {
updateApplication: function updateApplication() {
return !this.value ? 0 : this.computedHeight;
},
updateValue: function updateValue(val) {
this.$emit('update:active', val);
}
},
render: function render(h) {
return h(_mixins_button_group__WEBPACK_IMPORTED_MODULE_2__["default"], this.setBackgroundColor(this.color, {
staticClass: 'v-bottom-nav',
class: this.classes,
style: {
height: parseInt(this.computedHeight) + "px"
},
props: {
mandatory: Boolean(this.mandatory || this.active !== undefined),
value: this.active
},
on: { change: this.updateValue }
}), this.$slots.default);
}
}));
/***/ }),
/***/ "./src/components/VBottomNav/index.ts":
/*!********************************************!*\
!*** ./src/components/VBottomNav/index.ts ***!
\********************************************/
/*! exports provided: VBottomNav, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _VBottomNav__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VBottomNav */ "./src/components/VBottomNav/VBottomNav.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBottomNav", function() { return _VBottomNav__WEBPACK_IMPORTED_MODULE_0__["default"]; });
/* harmony default export */ __webpack_exports__["default"] = (_VBottomNav__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./src/components/VBottomSheet/VBottomSheet.js":
/*!*****************************************************!*\
!*** ./src/components/VBottomSheet/VBottomSheet.js ***!
\*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _stylus_components_bottom_sheets_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_bottom-sheets.styl */ "./src/stylus/components/_bottom-sheets.styl");
/* harmony import */ var _stylus_components_bottom_sheets_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_bottom_sheets_styl__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _VDialog_VDialog__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VDialog/VDialog */ "./src/components/VDialog/VDialog.js");
var __assign = undefined && undefined.__assign || function () {
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
}
return t;
};
return __assign.apply(this, arguments);
};
/* @vue/component */
/* harmony default export */ __webpack_exports__["default"] = ({
name: 'v-bottom-sheet',
props: {
disabled: Boolean,
fullWidth: Boolean,
hideOverlay: Boolean,
inset: Boolean,
lazy: Boolean,
maxWidth: {
type: [String, Number],
default: 'auto'
},
persistent: Boolean,
value: null
},
render: function render(h) {
var activator = h('template', {
slot: 'activator'
}, this.$slots.activator);
var contentClass = ['v-bottom-sheet', this.inset ? 'v-bottom-sheet--inset' : ''].join(' ');
return h(_VDialog_VDialog__WEBPACK_IMPORTED_MODULE_1__["default"], {
attrs: __assign({}, this.$props),
on: __assign({}, this.$listeners),
props: {
contentClass: contentClass,
noClickAnimation: true,
transition: 'bottom-sheet-transition',
value: this.value
}
}, [activator, this.$slots.default]);
}
});
/***/ }),
/***/ "./src/components/VBottomSheet/index.js":
/*!**********************************************!*\
!*** ./src/components/VBottomSheet/index.js ***!
\**********************************************/
/*! exports provided: VBottomSheet, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _VBottomSheet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VBottomSheet */ "./src/components/VBottomSheet/VBottomSheet.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBottomSheet", function() { return _VBottomSheet__WEBPACK_IMPORTED_MODULE_0__["default"]; });
/* harmony default export */ __webpack_exports__["default"] = (_VBottomSheet__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./src/components/VBreadcrumbs/VBreadcrumbs.ts":
/*!*****************************************************!*\
!*** ./src/components/VBreadcrumbs/VBreadcrumbs.ts ***!
\*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _stylus_components_breadcrumbs_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_breadcrumbs.styl */ "./src/stylus/components/_breadcrumbs.styl");
/* harmony import */ var _stylus_components_breadcrumbs_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_breadcrumbs_styl__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! . */ "./src/components/VBreadcrumbs/index.ts");
/* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts");
/* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts");
/* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
var __assign = undefined && undefined.__assign || function () {
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
}
return t;
};
return __assign.apply(this, arguments);
};
// Styles
// Components
// Mixins
// Utils
/* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_4__["default"])(_mixins_themeable__WEBPACK_IMPORTED_MODULE_2__["default"]
/* @vue/component */
).extend({
name: 'v-breadcrumbs',
props: {
divider: {
type: String,
default: '/'
},
items: {
type: Array,
default: function _default() {
return [];
}
},
large: Boolean,
justifyCenter: Boolean,
justifyEnd: Boolean
},
computed: {
classes: function classes() {
return __assign({ 'v-breadcrumbs--large': this.large, 'justify-center': this.justifyCenter, 'justify-end': this.justifyEnd }, this.themeClasses);
}
},
mounted: function mounted() {
if (this.justifyCenter) Object(_util_console__WEBPACK_IMPORTED_MODULE_3__["deprecate"])('justify-center', 'class="justify-center"', this);
if (this.justifyEnd) Object(_util_console__WEBPACK_IMPORTED_MODULE_3__["deprecate"])('justify-end', 'class="justify-end"', this);
if (this.$slots.default) Object(_util_console__WEBPACK_IMPORTED_MODULE_3__["deprecate"])('default slot', ':items and scoped slot "item"', this);
},
methods: {
/* @deprecated */
genChildren /* istanbul ignore next */: function genChildren() {
if (!this.$slots.default) return undefined;
var children = [];
var createDividers = false;
for (var i = 0; i < this.$slots.default.length; i++) {
var elm = this.$slots.default[i];
if (!elm.componentOptions || elm.componentOptions.Ctor.options.name !== 'v-breadcrumbs-item') {
children.push(elm);
} else {
if (createDividers) {
children.push(this.genDivider());
}
children.push(elm);
createDividers = true;
}
}
return children;
},
genDivider: function genDivider() {
return