UNPKG

vuetify

Version:

Vue Material Component Framework

1,318 lines (1,160 loc) 1.61 MB
(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.sass": /*!*******************************************!*\ !*** ./src/components/VAlert/VAlert.sass ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./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 _VAlert_sass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VAlert.sass */ "./src/components/VAlert/VAlert.sass"); /* harmony import */ var _VAlert_sass__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_VAlert_sass__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VSheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VSheet */ "./src/components/VSheet/index.ts"); /* harmony import */ var _VBtn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VBtn */ "./src/components/VBtn/index.ts"); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable/index.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable/index.ts"); /* harmony import */ var _mixins_transitionable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/transitionable */ "./src/mixins/transitionable/index.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.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 // Components // Mixins // Utilities /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_7__["default"])(_VSheet__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_4__["default"], _mixins_transitionable__WEBPACK_IMPORTED_MODULE_6__["default"]).extend({ name: 'v-alert', props: { border: { type: String, validator: function validator(val) { return ['top', 'right', 'bottom', 'left'].includes(val); } }, closeLabel: { type: String, default: '$vuetify.close' }, coloredBorder: Boolean, dense: Boolean, dismissible: Boolean, closeIcon: { type: String, default: '$cancel' }, icon: { default: '', type: [Boolean, String], validator: function validator(val) { return typeof val === 'string' || val === false; } }, outlined: Boolean, prominent: Boolean, text: Boolean, type: { type: String, validator: function validator(val) { return ['info', 'error', 'success', 'warning'].includes(val); } }, value: { type: Boolean, default: true } }, computed: { __cachedBorder: function __cachedBorder() { var _a; if (!this.border) return null; var data = { staticClass: 'v-alert__border', class: (_a = {}, _a["v-alert__border--" + this.border] = true, _a) }; if (this.coloredBorder) { data = this.setBackgroundColor(this.computedColor, data); data.class['v-alert__border--has-color'] = true; } return this.$createElement('div', data); }, __cachedDismissible: function __cachedDismissible() { var _this = this; if (!this.dismissible) return null; var color = this.iconColor; return this.$createElement(_VBtn__WEBPACK_IMPORTED_MODULE_2__["default"], { staticClass: 'v-alert__dismissible', props: { color: color, icon: true, small: true }, attrs: { 'aria-label': this.$vuetify.lang.t(this.closeLabel) }, on: { click: function click() { return _this.isActive = false; } } }, [this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_3__["default"], { props: { color: color } }, this.closeIcon)]); }, __cachedIcon: function __cachedIcon() { if (!this.computedIcon) return null; return this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_3__["default"], { staticClass: 'v-alert__icon', props: { color: this.iconColor } }, this.computedIcon); }, classes: function classes() { var classes = __assign(__assign({}, _VSheet__WEBPACK_IMPORTED_MODULE_1__["default"].options.computed.classes.call(this)), { 'v-alert--border': Boolean(this.border), 'v-alert--dense': this.dense, 'v-alert--outlined': this.outlined, 'v-alert--prominent': this.prominent, 'v-alert--text': this.text }); if (this.border) { classes["v-alert--border-" + this.border] = true; } return classes; }, computedColor: function computedColor() { return this.color || this.type; }, computedIcon: function computedIcon() { if (this.icon === false) return false; if (typeof this.icon === 'string' && this.icon) return this.icon; if (!['error', 'info', 'success', 'warning'].includes(this.type)) return false; return "$" + this.type; }, hasColoredIcon: function hasColoredIcon() { return this.hasText || Boolean(this.border) && this.coloredBorder; }, hasText: function hasText() { return this.text || this.outlined; }, iconColor: function iconColor() { return this.hasColoredIcon ? this.computedColor : undefined; }, isDark: function isDark() { if (this.type && !this.coloredBorder && !this.outlined) return true; return _mixins_themeable__WEBPACK_IMPORTED_MODULE_5__["default"].options.computed.isDark.call(this); } }, created: function created() { /* istanbul ignore next */ if (this.$attrs.hasOwnProperty('outline')) { Object(_util_console__WEBPACK_IMPORTED_MODULE_8__["breaking"])('outline', 'outlined', this); } }, methods: { genWrapper: function genWrapper() { var children = [this.$slots.prepend || this.__cachedIcon, this.genContent(), this.__cachedBorder, this.$slots.append, this.$scopedSlots.close ? this.$scopedSlots.close({ toggle: this.toggle }) : this.__cachedDismissible]; var data = { staticClass: 'v-alert__wrapper' }; return this.$createElement('div', data, children); }, genContent: function genContent() { return this.$createElement('div', { staticClass: 'v-alert__content' }, this.$slots.default); }, genAlert: function genAlert() { var data = { staticClass: 'v-alert', attrs: { role: 'alert' }, on: this.listeners$, class: this.classes, style: this.styles, directives: [{ name: 'show', value: this.isActive }] }; if (!this.coloredBorder) { var setColor = this.hasText ? this.setTextColor : this.setBackgroundColor; data = setColor(this.computedColor, data); } return this.$createElement('div', data, [this.genWrapper()]); }, /** @public */ toggle: function toggle() { this.isActive = !this.isActive; } }, render: function render(h) { var render = this.genAlert(); if (!this.transition) return render; return h('transition', { props: { name: this.transition, origin: this.origin, mode: this.mode } }, [render]); } })); /***/ }), /***/ "./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.sass": /*!***************************************!*\ !*** ./src/components/VApp/VApp.sass ***! \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/components/VApp/VApp.ts": /*!*************************************!*\ !*** ./src/components/VApp/VApp.ts ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VApp_sass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VApp.sass */ "./src/components/VApp/VApp.sass"); /* harmony import */ var _VApp_sass__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_VApp_sass__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable/index.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_2__ = __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 // Mixins // Utilities /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_2__["default"])(_mixins_themeable__WEBPACK_IMPORTED_MODULE_1__["default"]).extend({ name: 'v-app', props: { dark: { type: Boolean, default: undefined }, id: { type: String, default: 'app' }, light: { type: Boolean, default: undefined } }, computed: { isDark: function isDark() { return this.$vuetify.theme.dark; } }, beforeCreate: function beforeCreate() { if (!this.$vuetify || this.$vuetify === this.$root) { throw new Error('Vuetify is not properly initialized, see https://vuetifyjs.com/getting-started/quick-start#bootstrapping-the-vuetify-object'); } }, render: function render(h) { var wrapper = h('div', { staticClass: 'v-application--wrap' }, this.$slots.default); return h('div', { staticClass: 'v-application', class: __assign({ 'v-application--is-rtl': this.$vuetify.rtl, 'v-application--is-ltr': !this.$vuetify.rtl }, this.themeClasses), attrs: { 'data-app': true }, domProps: { id: this.id } }, [wrapper]); } })); /***/ }), /***/ "./src/components/VApp/index.ts": /*!**************************************!*\ !*** ./src/components/VApp/index.ts ***! \**************************************/ /*! 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.ts"); /* 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/VAppBar/VAppBar.sass": /*!*********************************************!*\ !*** ./src/components/VAppBar/VAppBar.sass ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/components/VAppBar/VAppBar.ts": /*!*******************************************!*\ !*** ./src/components/VAppBar/VAppBar.ts ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VAppBar_sass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VAppBar.sass */ "./src/components/VAppBar/VAppBar.sass"); /* harmony import */ var _VAppBar_sass__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_VAppBar_sass__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VToolbar_VToolbar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VToolbar/VToolbar */ "./src/components/VToolbar/VToolbar.ts"); /* harmony import */ var _directives_scroll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../directives/scroll */ "./src/directives/scroll/index.ts"); /* harmony import */ var _mixins_applicationable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/applicationable */ "./src/mixins/applicationable/index.ts"); /* harmony import */ var _mixins_scrollable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/scrollable */ "./src/mixins/scrollable/index.ts"); /* harmony import */ var _mixins_ssr_bootable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/ssr-bootable */ "./src/mixins/ssr-bootable/index.ts"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable/index.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_8__ = __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 // Extensions // Directives // Mixins // Utilities var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_8__["default"])(_VToolbar_VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_scrollable__WEBPACK_IMPORTED_MODULE_4__["default"], _mixins_ssr_bootable__WEBPACK_IMPORTED_MODULE_5__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_mixins_applicationable__WEBPACK_IMPORTED_MODULE_3__["default"])('top', ['clippedLeft', 'clippedRight', 'computedHeight', 'invertedScroll', 'isExtended', 'isProminent', 'value'])); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (baseMixins.extend({ name: 'v-app-bar', directives: { Scroll: _directives_scroll__WEBPACK_IMPORTED_MODULE_2__["default"] }, provide: function provide() { return { VAppBar: this }; }, props: { clippedLeft: Boolean, clippedRight: Boolean, collapseOnScroll: Boolean, elevateOnScroll: Boolean, fadeImgOnScroll: Boolean, hideOnScroll: Boolean, invertedScroll: Boolean, scrollOffScreen: Boolean, shrinkOnScroll: Boolean, value: { type: Boolean, default: true } }, data: function data() { return { isActive: this.value }; }, computed: { applicationProperty: function applicationProperty() { return !this.bottom ? 'top' : 'bottom'; }, canScroll: function canScroll() { return _mixins_scrollable__WEBPACK_IMPORTED_MODULE_4__["default"].options.computed.canScroll.call(this) && (this.invertedScroll || this.elevateOnScroll || this.hideOnScroll || this.collapseOnScroll || this.isBooted || // If falsy, user has provided an // explicit value which should // overwrite anything we do !this.value); }, classes: function classes() { return __assign(__assign({}, _VToolbar_VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"].options.computed.classes.call(this)), { 'v-toolbar--collapse': this.collapse || this.collapseOnScroll, 'v-app-bar': true, 'v-app-bar--clipped': this.clippedLeft || this.clippedRight, 'v-app-bar--fade-img-on-scroll': this.fadeImgOnScroll, 'v-app-bar--elevate-on-scroll': this.elevateOnScroll, 'v-app-bar--fixed': !this.absolute && (this.app || this.fixed), 'v-app-bar--hide-shadow': this.hideShadow, 'v-app-bar--is-scrolled': this.currentScroll > 0, 'v-app-bar--shrink-on-scroll': this.shrinkOnScroll }); }, scrollRatio: function scrollRatio() { var threshold = this.computedScrollThreshold; return Math.max((threshold - this.currentScroll) / threshold, 0); }, computedContentHeight: function computedContentHeight() { if (!this.shrinkOnScroll) return _VToolbar_VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"].options.computed.computedContentHeight.call(this); var min = this.dense ? 48 : 56; var max = this.computedOriginalHeight; return min + (max - min) * this.scrollRatio; }, computedFontSize: function computedFontSize() { if (!this.isProminent) return undefined; var min = 1.25; var max = 1.5; return min + (max - min) * this.scrollRatio; }, computedLeft: function computedLeft() { if (!this.app || this.clippedLeft) return 0; return this.$vuetify.application.left; }, computedMarginTop: function computedMarginTop() { if (!this.app) return 0; return this.$vuetify.application.bar; }, computedOpacity: function computedOpacity() { if (!this.fadeImgOnScroll) return undefined; return this.scrollRatio; }, computedOriginalHeight: function computedOriginalHeight() { var height = _VToolbar_VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"].options.computed.computedContentHeight.call(this); if (this.isExtended) height += parseInt(this.extensionHeight); return height; }, computedRight: function computedRight() { if (!this.app || this.clippedRight) return 0; return this.$vuetify.application.right; }, computedScrollThreshold: function computedScrollThreshold() { if (this.scrollThreshold) return Number(this.scrollThreshold); return this.computedOriginalHeight - (this.dense ? 48 : 56); }, computedTransform: function computedTransform() { if (!this.canScroll || this.elevateOnScroll && this.currentScroll === 0 && this.isActive) return 0; if (this.isActive) return 0; var scrollOffScreen = this.scrollOffScreen ? this.computedHeight : this.computedContentHeight; return this.bottom ? scrollOffScreen : -scrollOffScreen; }, hideShadow: function hideShadow() { if (this.elevateOnScroll && this.isExtended) { return this.currentScroll < this.computedScrollThreshold; } if (this.elevateOnScroll) { return this.currentScroll === 0 || this.computedTransform < 0; } return (!this.isExtended || this.scrollOffScreen) && this.computedTransform !== 0; }, isCollapsed: function isCollapsed() { if (!this.collapseOnScroll) { return _VToolbar_VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"].options.computed.isCollapsed.call(this); } return this.currentScroll > 0; }, isProminent: function isProminent() { return _VToolbar_VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"].options.computed.isProminent.call(this) || this.shrinkOnScroll; }, styles: function styles() { return __assign(__assign({}, _VToolbar_VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"].options.computed.styles.call(this)), { fontSize: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["convertToUnit"])(this.computedFontSize, 'rem'), marginTop: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["convertToUnit"])(this.computedMarginTop), transform: "translateY(" + Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["convertToUnit"])(this.computedTransform) + ")", left: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["convertToUnit"])(this.computedLeft), right: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["convertToUnit"])(this.computedRight) }); } }, watch: { canScroll: 'onScroll', computedTransform: function computedTransform() { // Normally we do not want the v-app-bar // to update the application top value // to avoid screen jump. However, in // this situation, we must so that // the clipped drawer can update // its top value when scrolled if (!this.canScroll || !this.clippedLeft && !this.clippedRight) return; this.callUpdate(); }, invertedScroll: function invertedScroll(val) { this.isActive = !val || this.currentScroll !== 0; } }, created: function created() { if (this.invertedScroll) this.isActive = false; }, methods: { genBackground: function genBackground() { var render = _VToolbar_VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"].options.methods.genBackground.call(this); render.data = this._b(render.data || {}, render.tag, { style: { opacity: this.computedOpacity } }); return render; }, updateApplication: function updateApplication() { return this.invertedScroll ? 0 : this.computedHeight + this.computedTransform; }, thresholdMet: function thresholdMet() { if (this.invertedScroll) { this.isActive = this.currentScroll > this.computedScrollThreshold; return; } if (this.hideOnScroll) { this.isActive = this.isScrollingUp || this.currentScroll < this.computedScrollThreshold; } if (this.currentThreshold < this.computedScrollThreshold) return; this.savedScroll = this.currentScroll; } }, render: function render(h) { var render = _VToolbar_VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"].options.render.call(this, h); render.data = render.data || {}; if (this.canScroll) { render.data.directives = render.data.directives || []; render.data.directives.push({ arg: this.scrollTarget, name: 'scroll', value: this.onScroll }); } return render; } })); /***/ }), /***/ "./src/components/VAppBar/VAppBarNavIcon.ts": /*!**************************************************!*\ !*** ./src/components/VAppBar/VAppBarNavIcon.ts ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _VBtn_VBtn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VBtn/VBtn */ "./src/components/VBtn/VBtn.ts"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_2__); 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); }; // Components // Types /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_2___default.a.extend({ name: 'v-app-bar-nav-icon', functional: true, render: function render(h, _a) { var slots = _a.slots, listeners = _a.listeners, props = _a.props, data = _a.data; var d = Object.assign(data, { staticClass: ("v-app-bar__nav-icon " + (data.staticClass || '')).trim(), props: __assign(__assign({}, props), { icon: true }), on: listeners }); var defaultSlot = slots().default; return h(_VBtn_VBtn__WEBPACK_IMPORTED_MODULE_1__["default"], d, defaultSlot || [h(_VIcon__WEBPACK_IMPORTED_MODULE_0__["default"], '$menu')]); } })); /***/ }), /***/ "./src/components/VAppBar/VAppBarTitle.ts": /*!************************************************!*\ !*** ./src/components/VAppBar/VAppBarTitle.ts ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable/index.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _services_goto_easing_patterns__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../services/goto/easing-patterns */ "./src/services/goto/easing-patterns.ts"); // Mixins // Utilities var base = Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_0__["inject"])('VAppBar', 'v-app-bar-title', 'v-app-bar'); /* harmony default export */ __webpack_exports__["default"] = (base.extend().extend({ name: 'v-app-bar-title', data: function data() { return { contentWidth: 0, left: 0, width: 0 }; }, watch: { '$vuetify.breakpoint.width': 'updateDimensions' }, computed: { styles: function styles() { if (!this.contentWidth) return {}; var min = this.width; var max = this.contentWidth; var ratio = Object(_services_goto_easing_patterns__WEBPACK_IMPORTED_MODULE_2__["easeInOutCubic"])(Math.min(1, this.VAppBar.scrollRatio * 1.5)); return { width: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_1__["convertToUnit"])(min + (max - min) * ratio), visibility: this.VAppBar.scrollRatio ? 'visible' : 'hidden' }; } }, mounted: function mounted() { this.updateDimensions(); }, methods: { updateDimensions: function updateDimensions() { var dimensions = this.$refs.placeholder.getBoundingClientRect(); this.width = dimensions.width; this.left = dimensions.left; this.contentWidth = this.$refs.content.scrollWidth; } }, render: function render(h) { return h('div', { class: 'v-toolbar__title v-app-bar-title' }, [h('div', { class: 'v-app-bar-title__content', style: this.styles, ref: 'content' }, [this.$slots.default]), h('div', { class: 'v-app-bar-title__placeholder', style: { visibility: this.VAppBar.scrollRatio ? 'hidden' : 'visible' }, ref: 'placeholder' }, [this.$slots.default])]); } })); /***/ }), /***/ "./src/components/VAppBar/index.ts": /*!*****************************************!*\ !*** ./src/components/VAppBar/index.ts ***! \*****************************************/ /*! exports provided: VAppBar, VAppBarNavIcon, VAppBarTitle, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VAppBar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VAppBar */ "./src/components/VAppBar/VAppBar.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VAppBar", function() { return _VAppBar__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _VAppBarNavIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VAppBarNavIcon */ "./src/components/VAppBar/VAppBarNavIcon.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VAppBarNavIcon", function() { return _VAppBarNavIcon__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _VAppBarTitle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VAppBarTitle */ "./src/components/VAppBar/VAppBarTitle.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VAppBarTitle", function() { return _VAppBarTitle__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony default export */ __webpack_exports__["default"] = ({ $_vuetify_subcomponents: { VAppBar: _VAppBar__WEBPACK_IMPORTED_MODULE_0__["default"], VAppBarNavIcon: _VAppBarNavIcon__WEBPACK_IMPORTED_MODULE_1__["default"], VAppBarTitle: _VAppBarTitle__WEBPACK_IMPORTED_MODULE_2__["default"] } }); /***/ }), /***/ "./src/components/VAutocomplete/VAutocomplete.sass": /*!*********************************************************!*\ !*** ./src/components/VAutocomplete/VAutocomplete.sass ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/components/VAutocomplete/VAutocomplete.ts": /*!*******************************************************!*\ !*** ./src/components/VAutocomplete/VAutocomplete.ts ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VAutocomplete_sass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VAutocomplete.sass */ "./src/components/VAutocomplete/VAutocomplete.sass"); /* harmony import */ var _VAutocomplete_sass__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_VAutocomplete_sass__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VSelect/VSelect */ "./src/components/VSelect/VSelect.ts"); /* harmony import */ var _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VTextField/VTextField */ "./src/components/VTextField/VTextField.ts"); /* harmony import */ var _util_mergeData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/mergeData */ "./src/util/mergeData.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_4__ = __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 // Utilities var defaultMenuProps = __assign(__assign({}, _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["defaultMenuProps"]), { offsetY: true, offsetOverflow: true, transition: false }); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (_VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].extend({ name: 'v-autocomplete', props: { allowOverflow: { type: Boolean, default: true }, autoSelectFirst: { type: Boolean, default: false }, filter: { type: Function, default: function _default(item, queryText, itemText) { return itemText.toLocaleLowerCase().indexOf(queryText.toLocaleLowerCase()) > -1; } }, hideNoData: Boolean, menuProps: { type: _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].options.props.menuProps.type, default: function _default() { return defaultMenuProps; } }, noFilter: Boolean, searchInput: { type: String } }, data: function data() { return { lazySearch: this.searchInput }; }, computed: { classes: function classes() { return __assign(__assign({}, _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].options.computed.classes.call(this)), { 'v-autocomplete': true, 'v-autocomplete--is-selecting-index': this.selectedIndex > -1 }); }, computedItems: function computedItems() { return this.filteredItems; }, selectedValues: function selectedValues() { var _this = this; return this.selectedItems.map(function (item) { return _this.getValue(item); }); }, hasDisplayedItems: function hasDisplayedItems() { var _this = this; return this.hideSelected ? this.filteredItems.some(function (item) { return !_this.hasItem(item); }) : this.filteredItems.length > 0; }, currentRange: function currentRange() { if (this.selectedItem == null) return 0; return String(this.getText(this.selectedItem)).length; }, filteredItems: function filteredItems() { var _this = this; if (!this.isSearching || this.noFilter || this.internalSearch == null) return this.allItems; return this.allItems.filter(function (item) { var value = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["getPropertyFromItem"])(item, _this.itemText); var text = value != null ? String(value) : ''; return _this.filter(item, String(_this.internalSearch), text); }); }, internalSearch: { get: function get() { return this.lazySearch; }, set: function set(val) { // emit update event only when the new // search value is different from previous if (this.lazySearch !== val) { this.lazySearch = val; this.$emit('update:search-input', val); } } }, isAnyValueAllowed: function isAnyValueAllowed() { return false; }, isDirty: function isDirty() { return this.searchIsDirty || this.selectedItems.length > 0; }, isSearching: function isSearching() { return this.multiple && this.searchIsDirty || this.searchIsDirty && this.internalSearch !== this.getText(this.selectedItem); }, menuCanShow: function menuCanShow() { if (!this.isFocused) return false; return this.hasDisplayedItems || !this.hideNoData; }, $_menuProps: function $_menuProps() { var props = _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].options.computed.$_menuProps.call(this); props.contentClass = ("v-autocomplete__content " + (props.contentClass || '')).trim(); return __assign(__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"].options.computed.listData.call(this); data.props = __assign(__assign({}, data.props), { items: this.virtualizedItems, noFilter: this.noFilter || !this.isSearching || !this.filteredItems.length, searchInput: this.internalSearch }); return data; } }, watch: { filteredItems: 'onFilteredItemsChanged', internalValue: 'setSearch', isFocused: function isFocused(val) { if (val) { document.addEventListener('copy', this.onCopy); this.$refs.input && this.$refs.input.select(); } else { document.removeEventListener('copy', this.onCopy); this.$refs.input && this.$refs.input.blur(); 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: 'onInternalSearchChanged', itemText: 'updateSelf' }, created: function created() { this.setSearch(); }, destroyed: function destroyed() { document.removeEventListener('copy', this.onCopy); }, methods: { onFilteredItemsChanged: function onFilteredItemsChanged(val, oldVal) { var _this = this; // TODO: How is the watcher triggered // for duplicate items? no idea if (val === oldVal) return; this.setMenuIndex(-1); this.$nextTick(function () { if (!_this.internalSearch || val.length !== 1 && !_this.autoSelectFirst) return; _this.$refs.menu.getTiles(); _this.setMenuIndex(0); }); }, onInternalSearchChanged: function onInternalSearchChanged() { this.updateMenuDimensions(); }, updateMenuDimensions: function updateMenuDimensions() { // Type from menuable is not making it through 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 (this.multiple && keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].left) { if (this.selectedIndex === -1) { this.selectedIndex = this.selectedItems.length - 1; } else { this.selectedIndex--; } } else if (this.multiple && keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].right) { if (this.selectedIndex >= this.selectedItems.length - 1) { this.selectedIndex = -1; } else { this.selectedIndex++; } } else if (keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].backspace || keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].delete) { this.deleteCurrentItem(); } }, deleteCurrentItem: function deleteCurrentItem() { var curIndex = this.selectedIndex; var curItem = this.selectedItems[curIndex]; // Do nothing if input or item is disabled if (!this.isInteractive || this.getDisabled(curItem)) return; var lastIndex = this.selectedItems.length - 1; // Select the last item if // there is no selection if (this.selectedIndex === -1 && lastIndex !== 0) { this.selectedIndex = lastIndex; return; } var length = this.selectedItems.length; var nextIndex = curIndex !== length - 1 ? curIndex : curIndex - 1; var nextItem = this.selectedItems[nextIndex]; if (!nextItem) { this.setValue(this.multiple ? [] : null); } else { this.selectItem(curItem); } this.selectedIndex = nextIndex; }, clearableCallback: function clearableCallback() { this.internalSearch = null; _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].options.methods.clearableCallback.call(this); }, genInput: function genInput() { var input = _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_2__["default"].options.methods.genInput.call(this); input.data = Object(_util_mergeData__WEBPACK_IMPORTED_MODULE_3__["default"])(input.data, { attrs: { 'aria-activedescendant': Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["getObjectValueByPath"])(this.$refs.menu, 'activeTile.id'), autocomplete: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["getObjectValueByPath"])(input.data, 'attrs.autocomplete', 'off') }, domProps: { value: this.internalSearch } }); return input; }, genInputSlot: function genInputSlot() { var slot = _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].options.methods.genInputSlot.call(this); slot.data.attrs.role = 'combobox'; return slot; }, genSelections: function genSelections() { return this.hasSlot || this.multiple ? _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].options.methods.genSelections.call(this) : []; }, onClick: function onClick(e) { if (!this.isInteractive) return; this.selectedIndex > -1 ? this.selectedIndex = -1 : this.onFocus(); if (!this.isAppendInner(e.target)) this.activateMenu(); }, onInput: function onInput(e) { if (this.selectedIndex > -1 || !e.target) return; var target = e.target; var value = target.value; // If typing and menu is not currently active if (target.value) this.activateMenu(); this.internalSearch = value; this.badInput = target.validity && target.validity.badInput; }, onKeyDown: function onKeyDown(e) { var keyCode = e.keyCode; if (e.ctrlKey || ![_util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].home, _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].end].includes(keyCode)) { _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].options.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); }, onSpaceDown: function onSpaceDown(e) {}, onTabDown: function onTabDown(e) { _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].options.methods.onTabDown.call(this, e); this.updateSelf(); }, onUpDown: function onUpDown(e) { // Prevent screen from scrolling e.preventDefault(); // For autocomplete / combobox, cycling // interfers with native up/down behavior // instead activate the menu this.activateMenu(); }, selectItem: function selectItem(item) { _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].options.methods.selectItem.call(this, item); this.setSearch(); }, setSelectedItems: function setSelectedItems() { _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].options.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 () { if (!_this.multiple || !_this.internalSearch || !_this.isMenuActive) { _this.internalSearch = !_this.selectedItems.length || _this.multiple || _this.hasSlot ? null : _this.getText(_this.selectedItem); } }); }, updateSelf: function updateSelf() { if (!this.searchIsDirty && !this.internalValue) return; if (!this.valueComparator(this.internalSearch, this.getValue(this.internalValue))) { this.setSearch(); } }, hasItem: function hasItem(item) { return this.selectedValues.indexOf(this.getValue(item)) > -1; }, onCopy: function onCopy(event) { var _a, _b; if (this.selectedIndex === -1) return; var currentItem = this.selectedItems[this.selectedIndex]; var currentItemText = this.getText(currentItem); (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.setData('text/plain', currentItemText); (_b = event.clipboardData) === null || _b === void 0 ? void 0 : _b.setData('text/vnd.vuetify.autocomplete.item+plain', currentItemText); event.preventDefault(); } } })); /***/ }), /***/ "./src/components/VAutocomplete/index.ts": /*!***********************************************!*\ !*** ./src/components/VAutocomplete/index.ts ***! \***********************************************/ /*! 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__(/*! ./VAutoc