wix-style-react
Version:
wix-style-react
359 lines (358 loc) • 9.04 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.expectedVerticalValuesWithReversedDirections = exports.expectedValuesWithDifferentDirections = exports.expectedOneWayValuesByDirection = exports.expectedHorizontalValuesWithReversedDirections = exports.expandDefault = exports.differentVerticalDirections = exports.differentHorizontalDirections = exports.differentDirections = exports.collapseDefault = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var expandDefault = exports.expandDefault = {
duration: 'medium01',
direction: 'bottomToTop'
};
var collapseDefault = exports.collapseDefault = _objectSpread({}, expandDefault);
var expectedOneWayValuesByDirection = exports.expectedOneWayValuesByDirection = {
topToBottom: {
entering: {
bottom: '100%'
},
entered: {
bottom: '0%'
},
exiting: {
bottom: '-100%'
},
exited: {
bottom: '100%'
}
},
bottomToTop: {
entering: {
bottom: '-100%'
},
entered: {
bottom: '0%'
},
exiting: {
bottom: '100%'
},
exited: {
bottom: '-100%'
}
},
leftToRight: {
entering: {
left: '-100%'
},
entered: {
left: '0%'
},
exiting: {
left: '100%'
},
exited: {
left: '-100%'
}
},
rightToLeft: {
entering: {
left: '100%'
},
entered: {
left: '0%'
},
exiting: {
left: '-100%'
},
exited: {
left: '100%'
}
}
};
var expectedVerticalValuesWithReversedDirections = exports.expectedVerticalValuesWithReversedDirections = {
bottomToTopTopToBottom: {
entering: {
bottom: '-100%'
},
entered: {
bottom: '0%'
},
exiting: {
bottom: '-100%'
},
exited: {
bottom: '-100%'
}
},
topToBottomBottomToTop: {
entering: {
bottom: '100%'
},
entered: {
bottom: '0%'
},
exiting: {
bottom: '100%'
},
exited: {
bottom: '100%'
}
}
};
var differentVerticalDirections = exports.differentVerticalDirections = [{
expand: _objectSpread(_objectSpread({}, expandDefault), {}, {
direction: 'bottomToTop'
}),
collapse: _objectSpread(_objectSpread({}, collapseDefault), {}, {
direction: 'topToBottom'
}),
type: 'bottomToTopTopToBottom'
}, {
expand: _objectSpread(_objectSpread({}, expandDefault), {}, {
direction: 'topToBottom'
}),
collapse: _objectSpread(_objectSpread({}, collapseDefault), {}, {
direction: 'bottomToTop'
}),
type: 'topToBottomBottomToTop'
}];
var expectedHorizontalValuesWithReversedDirections = exports.expectedHorizontalValuesWithReversedDirections = {
leftToRightRightToLeft: {
entering: {
left: '-100%'
},
entered: {
left: '0%'
},
exiting: {
left: '-100%'
},
exited: {
left: '-100%'
}
},
rightToLeftLeftToRight: {
entering: {
left: '100%'
},
entered: {
left: '0%'
},
exiting: {
left: '100%'
},
exited: {
left: '100%'
}
}
};
var differentHorizontalDirections = exports.differentHorizontalDirections = [{
expand: _objectSpread(_objectSpread({}, expandDefault), {}, {
direction: 'leftToRight'
}),
collapse: _objectSpread(_objectSpread({}, collapseDefault), {}, {
direction: 'rightToLeft'
}),
type: 'leftToRightRightToLeft'
}, {
expand: _objectSpread(_objectSpread({}, expandDefault), {}, {
direction: 'rightToLeft'
}),
collapse: _objectSpread(_objectSpread({}, collapseDefault), {}, {
direction: 'leftToRight'
}),
type: 'rightToLeftLeftToRight'
}];
var bottomToTopLeftToRight = {
entering: {
bottom: '-100%',
height: '100px',
width: '100%'
},
entered: {
bottom: '0%',
left: '0%',
height: '100%',
width: '100px'
},
exiting: {
left: '100%',
height: '100%',
width: '100px'
},
exited: {
bottom: '-100%',
left: '0%',
height: '100%',
width: '100px'
}
};
var leftToRightBottomToTop = {
entering: {
left: '-100%',
height: '100%',
width: '100px'
},
entered: {
bottom: '0%',
left: '0%',
height: '100px',
width: '100%'
},
exiting: {
bottom: '100%',
height: '100px',
width: '100%'
},
exited: {
bottom: '0%',
left: '-100%',
height: '100px',
width: '100%'
}
};
var expectedValuesWithDifferentDirections = exports.expectedValuesWithDifferentDirections = {
bottomToTopLeftToRight,
bottomToTopRightToLeft: _objectSpread(_objectSpread({}, bottomToTopLeftToRight), {}, {
exiting: {
left: '-100%',
height: '100%',
width: '100px'
}
}),
topToBottomLeftToRight: _objectSpread(_objectSpread({}, bottomToTopLeftToRight), {}, {
entering: {
bottom: '100%',
height: '100px',
width: '100%'
},
exited: {
bottom: '100%',
left: '0%',
height: '100%',
width: '100px'
}
}),
topToBottomRightToLeft: _objectSpread(_objectSpread({}, bottomToTopLeftToRight), {}, {
entering: {
bottom: '100%',
height: '100px',
width: '100%'
},
exiting: {
left: '-100%',
height: '100%',
width: '100px'
},
exited: {
bottom: '100%',
left: '0%',
height: '100%',
width: '100px'
}
}),
leftToRightBottomToTop,
leftToRightTopToBottom: _objectSpread(_objectSpread({}, leftToRightBottomToTop), {}, {
exiting: {
bottom: '-100%',
height: '100px',
width: '100%'
}
}),
rightToLeftbottomToTop: _objectSpread(_objectSpread({}, leftToRightBottomToTop), {}, {
entering: {
left: '100%',
height: '100%',
width: '100px'
},
exited: {
bottom: '0%',
left: '100%',
height: '100px',
width: '100%'
}
}),
rightToLefttopToBottom: _objectSpread(_objectSpread({}, leftToRightBottomToTop), {}, {
entering: {
left: '100%',
height: '100%',
width: '100px'
},
exiting: {
bottom: '-100%',
height: '100px',
width: '100%'
},
exited: {
bottom: '0%',
left: '100%',
height: '100px',
width: '100%'
}
})
};
var differentDirections = exports.differentDirections = [{
expand: _objectSpread(_objectSpread({}, expandDefault), {}, {
direction: 'bottomToTop'
}),
collapse: _objectSpread(_objectSpread({}, collapseDefault), {}, {
direction: 'leftToRight'
}),
type: 'bottomToTopLeftToRight'
}, {
expand: _objectSpread(_objectSpread({}, expandDefault), {}, {
direction: 'bottomToTop'
}),
collapse: _objectSpread(_objectSpread({}, collapseDefault), {}, {
direction: 'rightToLeft'
}),
type: 'bottomToTopRightToLeft'
}, {
expand: _objectSpread(_objectSpread({}, expandDefault), {}, {
direction: 'topToBottom'
}),
collapse: _objectSpread(_objectSpread({}, collapseDefault), {}, {
direction: 'leftToRight'
}),
type: 'topToBottomLeftToRight'
}, {
expand: _objectSpread(_objectSpread({}, expandDefault), {}, {
direction: 'topToBottom'
}),
collapse: _objectSpread(_objectSpread({}, collapseDefault), {}, {
direction: 'rightToLeft'
}),
type: 'topToBottomRightToLeft'
}, {
expand: _objectSpread(_objectSpread({}, expandDefault), {}, {
direction: 'leftToRight'
}),
collapse: _objectSpread(_objectSpread({}, collapseDefault), {}, {
direction: 'bottomToTop'
}),
type: 'leftToRightBottomToTop'
}, {
expand: _objectSpread(_objectSpread({}, expandDefault), {}, {
direction: 'leftToRight'
}),
collapse: _objectSpread(_objectSpread({}, collapseDefault), {}, {
direction: 'topToBottom'
}),
type: 'leftToRightTopToBottom'
}, {
expand: _objectSpread(_objectSpread({}, expandDefault), {}, {
direction: 'rightToLeft'
}),
collapse: _objectSpread(_objectSpread({}, collapseDefault), {}, {
direction: 'bottomToTop'
}),
type: 'rightToLeftbottomToTop'
}, {
expand: _objectSpread(_objectSpread({}, expandDefault), {}, {
direction: 'rightToLeft'
}),
collapse: _objectSpread(_objectSpread({}, collapseDefault), {}, {
direction: 'topToBottom'
}),
type: 'rightToLefttopToBottom'
}];
//# sourceMappingURL=utils.mocks.js.map