nav tabs on admin dashboard
This commit is contained in:
121
node_modules/autoprefixer/lib/hacks/grid-template.js
generated
vendored
121
node_modules/autoprefixer/lib/hacks/grid-template.js
generated
vendored
@@ -1,75 +1,92 @@
|
||||
'use strict';
|
||||
"use strict";
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
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; }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
var shorthand = require('./grid-shorthand');
|
||||
|
||||
var GridTemplate = function (_Declaration) {
|
||||
_inherits(GridTemplate, _Declaration);
|
||||
var _require = require('./grid-utils'),
|
||||
parseTemplate = _require.parseTemplate,
|
||||
warnMissedAreas = _require.warnMissedAreas,
|
||||
getGridGap = _require.getGridGap,
|
||||
warnGridGap = _require.warnGridGap,
|
||||
inheritGridGap = _require.inheritGridGap;
|
||||
|
||||
function GridTemplate() {
|
||||
_classCallCheck(this, GridTemplate);
|
||||
var GridTemplate =
|
||||
/*#__PURE__*/
|
||||
function (_Declaration) {
|
||||
_inheritsLoose(GridTemplate, _Declaration);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
function GridTemplate() {
|
||||
return _Declaration.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
var _proto = GridTemplate.prototype;
|
||||
|
||||
/**
|
||||
* Translate grid-template to separate -ms- prefixed properties
|
||||
*/
|
||||
_proto.insert = function insert(decl, prefix, prefixes, result) {
|
||||
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
|
||||
if (decl.parent.some(function (i) {
|
||||
return i.prop === '-ms-grid-rows';
|
||||
})) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var gap = getGridGap(decl);
|
||||
/**
|
||||
* Do not add prefix for unsupported value in IE
|
||||
*/
|
||||
GridTemplate.prototype.check = function check(decl) {
|
||||
return decl.value.includes('/') && !decl.value.includes('[') && !decl.value.includes('"') && !decl.value.includes('\'');
|
||||
};
|
||||
* we must insert inherited gap values in some cases:
|
||||
* if we are inside media query && if we have no grid-gap value
|
||||
*/
|
||||
|
||||
/**
|
||||
* Translate grid-template to separate -ms- prefixed properties
|
||||
*/
|
||||
var inheritedGap = inheritGridGap(decl, gap);
|
||||
|
||||
var _parseTemplate = parseTemplate({
|
||||
decl: decl,
|
||||
gap: inheritedGap || gap
|
||||
}),
|
||||
rows = _parseTemplate.rows,
|
||||
columns = _parseTemplate.columns,
|
||||
areas = _parseTemplate.areas;
|
||||
|
||||
GridTemplate.prototype.insert = function insert(decl, prefix, prefixes) {
|
||||
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
var hasAreas = Object.keys(areas).length > 0;
|
||||
var hasRows = Boolean(rows);
|
||||
var hasColumns = Boolean(columns);
|
||||
warnGridGap({
|
||||
gap: gap,
|
||||
hasColumns: hasColumns,
|
||||
decl: decl,
|
||||
result: result
|
||||
});
|
||||
warnMissedAreas(areas, decl, result);
|
||||
|
||||
if (decl.parent.some(function (i) {
|
||||
return i.prop === '-ms-grid-rows';
|
||||
})) {
|
||||
return undefined;
|
||||
}
|
||||
if (hasRows && hasColumns || hasAreas) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-grid-rows',
|
||||
value: rows,
|
||||
raws: {}
|
||||
});
|
||||
}
|
||||
|
||||
var _shorthand$parseTempl = shorthand.parseTemplateShortcut(decl),
|
||||
templateRows = _shorthand$parseTempl[0],
|
||||
templateColumns = _shorthand$parseTempl[1];
|
||||
if (hasColumns) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-grid-columns',
|
||||
value: columns,
|
||||
raws: {}
|
||||
});
|
||||
}
|
||||
|
||||
if (templateRows) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-grid-rows',
|
||||
value: shorthand.changeRepeat(templateRows.join(''))
|
||||
});
|
||||
}
|
||||
return decl;
|
||||
};
|
||||
|
||||
if (templateColumns) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-grid-columns',
|
||||
value: shorthand.changeRepeat(templateColumns.join(''))
|
||||
});
|
||||
}
|
||||
|
||||
return decl;
|
||||
};
|
||||
|
||||
return GridTemplate;
|
||||
return GridTemplate;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(GridTemplate, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['grid-template']
|
||||
});
|
||||
|
||||
_defineProperty(GridTemplate, "names", ['grid-template']);
|
||||
|
||||
module.exports = GridTemplate;
|
||||
Reference in New Issue
Block a user