UNPKG

vuetify-wcag

Version:

VuetifyJS but then WCAG/A11Y compatible

86 lines (66 loc) 3.95 kB
"use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _install = require("./install"); var services = _interopRequireWildcard(require("./services")); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var Vuetify = /*#__PURE__*/function () { function Vuetify() { var userPreset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; _classCallCheck(this, Vuetify); this.framework = { isHydrating: false }; this.installed = []; this.preset = {}; this.userPreset = {}; this.userPreset = userPreset; this.use(services.Presets); this.use(services.Application); this.use(services.Breakpoint); this.use(services.Goto); this.use(services.Icons); this.use(services.Lang); this.use(services.Theme); } // Called on the new vuetify instance // bootstrap in install beforeCreate // Exposes ssrContext if available _createClass(Vuetify, [{ key: "init", value: function init(root, ssrContext) { var _this = this; this.installed.forEach(function (property) { var service = _this.framework[property]; service.framework = _this.framework; service.init(root, ssrContext); }); // rtl is not installed and // will never be called by // the init process this.framework.rtl = Boolean(this.preset.rtl); } // Instantiate a VuetifyService }, { key: "use", value: function use(Service) { var property = Service.property; if (this.installed.includes(property)) return; // TODO maybe a specific type for arg 2? this.framework[property] = new Service(this.preset, this); this.installed.push(property); } }]); return Vuetify; }(); exports.default = Vuetify; Vuetify.install = _install.install; Vuetify.installed = false; Vuetify.version = "1.0.32"; Vuetify.config = { silent: false }; //# sourceMappingURL=framework.js.map