rc-trigger
Advanced tools
Comparing version 4.0.2 to 4.1.0
@@ -1,6 +0,6 @@ | ||
function _typeof(obj) { 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); } | ||
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); } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -15,11 +15,15 @@ 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; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
@@ -54,7 +58,7 @@ import React from 'react'; | ||
export function generateTrigger(PortalComponent) { | ||
var Trigger = | ||
/*#__PURE__*/ | ||
function (_React$Component) { | ||
var Trigger = /*#__PURE__*/function (_React$Component) { | ||
_inherits(Trigger, _React$Component); | ||
var _super = _createSuper(Trigger); | ||
function Trigger(props) { | ||
@@ -65,3 +69,3 @@ var _this; | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Trigger).call(this, props)); | ||
_this = _super.call(this, props); | ||
_this.popupRef = React.createRef(); | ||
@@ -68,0 +72,0 @@ _this.triggerRef = React.createRef(); |
@@ -79,11 +79,11 @@ import React, { Component } from 'react'; | ||
leavedClassName?: string; | ||
onAppearStart?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearActive?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearEnd?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterStart?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterActive?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterEnd?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveStart?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveActive?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveEnd?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearStart?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearActive?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearEnd?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterStart?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterActive?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterEnd?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveStart?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveActive?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveEnd?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
}; | ||
@@ -90,0 +90,0 @@ getAlignTarget: () => Point | (() => HTMLElement); |
@@ -1,2 +0,2 @@ | ||
function _typeof(obj) { 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); } | ||
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); } | ||
@@ -9,3 +9,3 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -20,2 +20,8 @@ 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; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
@@ -25,8 +31,6 @@ | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
/* eslint-disable no-param-reassign */ | ||
@@ -47,7 +51,7 @@ import React, { Component } from 'react'; | ||
var Popup = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
var Popup = /*#__PURE__*/function (_Component) { | ||
_inherits(Popup, _Component); | ||
var _super = _createSuper(Popup); | ||
function Popup() { | ||
@@ -58,3 +62,3 @@ var _this; | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Popup).apply(this, arguments)); | ||
_this = _super.apply(this, arguments); | ||
_this.state = { | ||
@@ -111,3 +115,3 @@ targetWidth: undefined, | ||
_this.nextFrameState = _objectSpread({}, _this.nextFrameState, {}, state); | ||
_this.nextFrameState = _objectSpread(_objectSpread({}, _this.nextFrameState), state); | ||
_this.nextFrameId = raf(function () { | ||
@@ -183,3 +187,3 @@ var submitState = _objectSpread({}, _this.nextFrameState); | ||
var mergedStyle = _objectSpread({}, sizeStyle, {}, _this.getZIndexStyle(), {}, style, { | ||
var mergedStyle = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, sizeStyle), _this.getZIndexStyle()), style), {}, { | ||
opacity: status === 'stable' || !visible ? undefined : 0 | ||
@@ -244,3 +248,3 @@ }); // ================= Motions ================= | ||
onTouchStart: onTouchStart, | ||
style: _objectSpread({}, mergedStyle, {}, motionStyle) | ||
style: _objectSpread(_objectSpread({}, mergedStyle), motionStyle) | ||
}, children)); | ||
@@ -247,0 +251,0 @@ }); |
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -17,3 +17,3 @@ 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 baseAlign = builtinPlacements[placementStr] || {}; | ||
return _objectSpread({}, baseAlign, {}, align); | ||
return _objectSpread(_objectSpread({}, baseAlign), align); | ||
} | ||
@@ -20,0 +20,0 @@ export function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) { |
# History | ||
---- | ||
## 4.1.0 / 2020-05-08 | ||
- upgrade rc-animate to `3.x` | ||
## 2.5.0 / 2018-06-05 | ||
@@ -5,0 +9,0 @@ |
@@ -33,7 +33,7 @@ "use strict"; | ||
function _typeof(obj) { 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); } | ||
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); } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -48,11 +48,15 @@ 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; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
@@ -75,7 +79,7 @@ function noop() {} | ||
function generateTrigger(PortalComponent) { | ||
var Trigger = | ||
/*#__PURE__*/ | ||
function (_React$Component) { | ||
var Trigger = /*#__PURE__*/function (_React$Component) { | ||
_inherits(Trigger, _React$Component); | ||
var _super = _createSuper(Trigger); | ||
function Trigger(props) { | ||
@@ -86,3 +90,3 @@ var _this; | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Trigger).call(this, props)); | ||
_this = _super.call(this, props); | ||
_this.popupRef = _react.default.createRef(); | ||
@@ -89,0 +93,0 @@ _this.triggerRef = _react.default.createRef(); |
@@ -79,11 +79,11 @@ import React, { Component } from 'react'; | ||
leavedClassName?: string; | ||
onAppearStart?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearActive?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearEnd?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterStart?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterActive?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterEnd?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveStart?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveActive?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveEnd?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearStart?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearActive?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearEnd?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterStart?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterActive?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterEnd?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveStart?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveActive?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveEnd?: (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
}; | ||
@@ -90,0 +90,0 @@ getAlignTarget: () => Point | (() => HTMLElement); |
@@ -28,5 +28,5 @@ "use strict"; | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { 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 _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 _typeof(obj) { 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); } | ||
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); } | ||
@@ -39,3 +39,3 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -50,2 +50,8 @@ 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; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
@@ -55,8 +61,6 @@ | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
var CSSMotion = _CSSMotion.default; | ||
@@ -68,7 +72,7 @@ | ||
var Popup = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
var Popup = /*#__PURE__*/function (_Component) { | ||
_inherits(Popup, _Component); | ||
var _super = _createSuper(Popup); | ||
function Popup() { | ||
@@ -79,3 +83,3 @@ var _this; | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Popup).apply(this, arguments)); | ||
_this = _super.apply(this, arguments); | ||
_this.state = { | ||
@@ -132,3 +136,3 @@ targetWidth: undefined, | ||
_this.nextFrameState = _objectSpread({}, _this.nextFrameState, {}, state); | ||
_this.nextFrameState = _objectSpread(_objectSpread({}, _this.nextFrameState), state); | ||
_this.nextFrameId = (0, _raf.default)(function () { | ||
@@ -204,3 +208,3 @@ var submitState = _objectSpread({}, _this.nextFrameState); | ||
var mergedStyle = _objectSpread({}, sizeStyle, {}, _this.getZIndexStyle(), {}, style, { | ||
var mergedStyle = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, sizeStyle), _this.getZIndexStyle()), style), {}, { | ||
opacity: status === 'stable' || !visible ? undefined : 0 | ||
@@ -265,3 +269,3 @@ }); // ================= Motions ================= | ||
onTouchStart: onTouchStart, | ||
style: _objectSpread({}, mergedStyle, {}, motionStyle) | ||
style: _objectSpread(_objectSpread({}, mergedStyle), motionStyle) | ||
}, children)); | ||
@@ -268,0 +272,0 @@ }); |
@@ -11,3 +11,3 @@ "use strict"; | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -26,3 +26,3 @@ 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 baseAlign = builtinPlacements[placementStr] || {}; | ||
return _objectSpread({}, baseAlign, {}, align); | ||
return _objectSpread(_objectSpread({}, baseAlign), align); | ||
} | ||
@@ -29,0 +29,0 @@ |
{ | ||
"name": "rc-trigger", | ||
"version": "4.0.2", | ||
"version": "4.1.0", | ||
"description": "base abstract trigger component for react", | ||
@@ -54,2 +54,3 @@ "engines": { | ||
"enzyme-to-json": "^3.4.0", | ||
"eslint": "^6.8.0", | ||
"father": "^2.13.2", | ||
@@ -63,8 +64,7 @@ "np": "^6.2.0", | ||
"classnames": "^2.2.6", | ||
"prop-types": "15.x", | ||
"raf": "^3.4.1", | ||
"rc-align": "^3.0.0-rc.0", | ||
"rc-animate": "^2.10.2", | ||
"rc-animate": "^3.0.0", | ||
"rc-util": "^4.20.0" | ||
} | ||
} |
@@ -6,49 +6,29 @@ # rc-trigger | ||
[![NPM version][npm-image]][npm-url] | ||
[![build status][travis-image]][travis-url] | ||
[![Test coverage][coveralls-image]][coveralls-url] | ||
[![gemnasium deps][gemnasium-image]][gemnasium-url] | ||
[![Dependencies][david-image]][david-url] | ||
[![DevDependencies][david-dev-image]][david-dev-url] | ||
[![npm download][download-image]][download-url] | ||
[![bundle size][bundlephobia-image]][bundlephobia-url] | ||
[npm-image]: http://img.shields.io/npm/v/rc-trigger.svg?style=flat-square | ||
[npm-url]: http://npmjs.org/package/rc-trigger | ||
[travis-image]: https://img.shields.io/travis/react-component/trigger.svg?style=flat-square | ||
[travis-image]: https://img.shields.io/travis/react-component/trigger/master?style=flat-square | ||
[travis-url]: https://travis-ci.org/react-component/trigger | ||
[circleci-image]: https://img.shields.io/circleci/react-component/trigger/master?style=flat-square | ||
[circleci-url]: https://circleci.com/gh/react-component/trigger | ||
[coveralls-image]: https://img.shields.io/coveralls/react-component/trigger.svg?style=flat-square | ||
[coveralls-url]: https://coveralls.io/r/react-component/trigger?branch=master | ||
[gemnasium-image]: http://img.shields.io/gemnasium/react-component/trigger.svg?style=flat-square | ||
[gemnasium-url]: https://gemnasium.com/react-component/trigger | ||
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square | ||
[node-url]: http://nodejs.org/download/ | ||
[david-url]: https://david-dm.org/react-component/trigger | ||
[david-image]: https://david-dm.org/react-component/trigger/status.svg?style=flat-square | ||
[david-dev-url]: https://david-dm.org/react-component/trigger?type=dev | ||
[david-dev-image]: https://david-dm.org/react-component/trigger/dev-status.svg?style=flat-square | ||
[download-image]: https://img.shields.io/npm/dm/rc-trigger.svg?style=flat-square | ||
[download-url]: https://npmjs.org/package/rc-trigger | ||
[bundlephobia-url]: https://bundlephobia.com/result?p=rc-trigger | ||
[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-trigger | ||
## Install | ||
## Browser Support | ||
|![IE](https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Opera](https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Safari](https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png)| | ||
| --- | --- | --- | --- | --- | | ||
| Edge / IE 8+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ | | ||
## Development | ||
``` | ||
npm install | ||
npm start | ||
``` | ||
## Example | ||
http://localhost:8200/examples/ | ||
online example: http://react-component.github.io/trigger/examples/ | ||
## Feature | ||
* supported on IE 8+, Chrome, Firefox, and Safari | ||
## install | ||
[![rc-trigger](https://nodei.co/npm/rc-trigger.png)](https://npmjs.org/package/rc-trigger) | ||
@@ -79,2 +59,21 @@ | ||
## Compatibility | ||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Electron | | ||
| --- | --- | --- | --- | --- | | ||
| IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | | ||
## Example | ||
http://localhost:9001 | ||
online example: http://react-component.github.io/trigger/ | ||
## Development | ||
``` | ||
npm install | ||
npm start | ||
``` | ||
## API | ||
@@ -81,0 +80,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137981
7
2718
13
327
+ Added@ant-design/css-animation@1.7.3(transitive)
+ Addedrc-animate@3.1.1(transitive)
- Removedprop-types@15.x
- Removedbabel-runtime@6.26.0(transitive)
- Removedcomponent-classes@1.2.6(transitive)
- Removedcomponent-indexof@0.0.3(transitive)
- Removedcore-js@2.6.12(transitive)
- Removedcss-animation@1.6.1(transitive)
- Removedrc-animate@2.11.1(transitive)
- Removedregenerator-runtime@0.11.1(transitive)
Updatedrc-animate@^3.0.0