@douyinfe/semi-foundation 2.19.0-beta.0 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/anchor/anchor.scss +1 -8
- package/anchor/rtl.scss +0 -1
- package/anchor/variables.scss +1 -0
- package/calendar/eventUtil.ts +8 -7
- package/calendar/foundation.ts +14 -14
- package/datePicker/monthsGridFoundation.ts +10 -3
- package/dropdown/foundation.ts +2 -1
- package/dropdown/menuFoundation.ts +2 -1
- package/getBabelConfig.js +0 -12
- package/lib/cjs/anchor/anchor.css +1 -10
- package/lib/cjs/anchor/anchor.scss +1 -8
- package/lib/cjs/anchor/constants.js +1 -4
- package/lib/cjs/anchor/foundation.js +5 -12
- package/lib/cjs/anchor/linkFoundation.js +4 -9
- package/lib/cjs/anchor/rtl.scss +0 -1
- package/lib/cjs/anchor/variables.scss +1 -0
- package/lib/cjs/autoComplete/constants.js +1 -4
- package/lib/cjs/autoComplete/foundation.js +14 -33
- package/lib/cjs/autoComplete/optionFoundation.js +4 -9
- package/lib/cjs/avatar/constants.js +1 -4
- package/lib/cjs/avatar/foundation.js +4 -9
- package/lib/cjs/backtop/constants.js +1 -4
- package/lib/cjs/backtop/foundation.js +4 -9
- package/lib/cjs/badge/constants.js +1 -4
- package/lib/cjs/banner/constants.js +1 -4
- package/lib/cjs/banner/foundation.js +4 -9
- package/lib/cjs/base/constants.js +2 -6
- package/lib/cjs/base/env.js +1 -4
- package/lib/cjs/base/foundation.js +5 -10
- package/lib/cjs/base/index.js +3 -6
- package/lib/cjs/breadcrumb/constants.js +1 -4
- package/lib/cjs/breadcrumb/foundation.js +6 -13
- package/lib/cjs/breadcrumb/itemFoundation.js +4 -9
- package/lib/cjs/button/constants.js +1 -4
- package/lib/cjs/calendar/constants.js +1 -4
- package/lib/cjs/calendar/eventUtil.d.ts +3 -3
- package/lib/cjs/calendar/eventUtil.js +28 -53
- package/lib/cjs/calendar/foundation.js +63 -85
- package/lib/cjs/card/constants.js +1 -4
- package/lib/cjs/carousel/constants.js +1 -4
- package/lib/cjs/carousel/foundation.js +5 -12
- package/lib/cjs/cascader/constants.js +1 -4
- package/lib/cjs/cascader/foundation.js +55 -100
- package/lib/cjs/cascader/util.js +9 -30
- package/lib/cjs/checkbox/checkboxFoundation.js +6 -13
- package/lib/cjs/checkbox/checkboxGroupFoundation.js +9 -18
- package/lib/cjs/checkbox/constants.js +1 -4
- package/lib/cjs/collapse/constants.js +1 -4
- package/lib/cjs/collapse/foundation.js +9 -20
- package/lib/cjs/collapsible/constants.js +1 -4
- package/lib/cjs/datePicker/_utils/formatter.js +3 -12
- package/lib/cjs/datePicker/_utils/getDayOfWeek.js +1 -4
- package/lib/cjs/datePicker/_utils/getDefaultFormatToken.js +1 -4
- package/lib/cjs/datePicker/_utils/getDefaultPickerDate.js +5 -10
- package/lib/cjs/datePicker/_utils/getFullDateOffset.js +3 -6
- package/lib/cjs/datePicker/_utils/getInsetInputFormatToken.js +2 -11
- package/lib/cjs/datePicker/_utils/getInsetInputValueFromInsetInputStr.js +1 -4
- package/lib/cjs/datePicker/_utils/getMonthTable.js +2 -11
- package/lib/cjs/datePicker/_utils/getMonthsInYear.js +3 -16
- package/lib/cjs/datePicker/_utils/getYears.js +2 -9
- package/lib/cjs/datePicker/_utils/index.js +16 -30
- package/lib/cjs/datePicker/_utils/isAfter.js +3 -6
- package/lib/cjs/datePicker/_utils/isBefore.js +3 -6
- package/lib/cjs/datePicker/_utils/isBetween.js +3 -6
- package/lib/cjs/datePicker/_utils/isDate.js +1 -4
- package/lib/cjs/datePicker/_utils/isSameDay.js +3 -6
- package/lib/cjs/datePicker/_utils/isTimestamp.js +3 -6
- package/lib/cjs/datePicker/_utils/isUnixTimestamp.js +3 -6
- package/lib/cjs/datePicker/_utils/isValidDate.js +1 -4
- package/lib/cjs/datePicker/_utils/isWithinInterval.js +3 -6
- package/lib/cjs/datePicker/_utils/parser.js +1 -4
- package/lib/cjs/datePicker/constants.js +3 -10
- package/lib/cjs/datePicker/foundation.js +42 -85
- package/lib/cjs/datePicker/inputFoundation.js +7 -20
- package/lib/cjs/datePicker/monthFoundation.js +5 -12
- package/lib/cjs/datePicker/monthsGridFoundation.js +47 -68
- package/lib/cjs/datePicker/yearAndMonthFoundation.js +4 -9
- package/lib/cjs/descriptions/constants.js +1 -4
- package/lib/cjs/divider/constants.js +1 -4
- package/lib/cjs/dropdown/constants.js +1 -4
- package/lib/cjs/dropdown/foundation.js +7 -15
- package/lib/cjs/dropdown/menuFoundation.js +11 -31
- package/lib/cjs/empty/constants.js +1 -4
- package/lib/cjs/form/constants.js +1 -4
- package/lib/cjs/form/foundation.js +64 -104
- package/lib/cjs/form/interface.js +1 -3
- package/lib/cjs/form/utils.js +14 -29
- package/lib/cjs/grid/constants.js +1 -4
- package/lib/cjs/icons/constants.js +1 -4
- package/lib/cjs/input/constants.js +1 -4
- package/lib/cjs/input/foundation.js +7 -18
- package/lib/cjs/input/textareaFoundation.js +6 -13
- package/lib/cjs/input/util/calculateNodeHeight.js +3 -17
- package/lib/cjs/input/util/getSizingData.js +5 -10
- package/lib/cjs/inputNumber/constants.js +4 -11
- package/lib/cjs/inputNumber/foundation.js +11 -30
- package/lib/cjs/layout/constants.js +1 -4
- package/lib/cjs/list/constants.js +1 -4
- package/lib/cjs/modal/constants.js +1 -4
- package/lib/cjs/modal/modalContentFoundation.js +4 -9
- package/lib/cjs/modal/modalFoundation.js +4 -9
- package/lib/cjs/navigation/NavItem.js +6 -21
- package/lib/cjs/navigation/constants.js +1 -4
- package/lib/cjs/navigation/foundation.js +22 -37
- package/lib/cjs/navigation/itemFoundation.js +4 -9
- package/lib/cjs/navigation/subNavFoundation.js +10 -21
- package/lib/cjs/notification/constants.js +1 -4
- package/lib/cjs/notification/notificationFoundation.js +5 -12
- package/lib/cjs/notification/notificationListFoundation.js +4 -9
- package/lib/cjs/overflowList/constants.js +3 -10
- package/lib/cjs/overflowList/foundation.js +12 -29
- package/lib/cjs/pagination/constants.js +1 -4
- package/lib/cjs/pagination/foundation.js +18 -37
- package/lib/cjs/popconfirm/constants.js +1 -4
- package/lib/cjs/popconfirm/popconfirmFoundation.js +3 -6
- package/lib/cjs/popover/constants.js +2 -9
- package/lib/cjs/progress/constants.js +1 -4
- package/lib/cjs/radio/constants.js +1 -4
- package/lib/cjs/radio/radioFoundation.js +3 -6
- package/lib/cjs/radio/radioGroupFoundation.js +6 -11
- package/lib/cjs/radio/radioInnerFoundation.js +5 -10
- package/lib/cjs/rating/constants.js +1 -4
- package/lib/cjs/rating/foundation.js +7 -20
- package/lib/cjs/scrollList/constants.js +1 -4
- package/lib/cjs/scrollList/foundation.js +3 -6
- package/lib/cjs/scrollList/itemFoundation.js +8 -21
- package/lib/cjs/scrollList/scrollTo.js +1 -4
- package/lib/cjs/select/constants.js +1 -4
- package/lib/cjs/select/foundation.js +56 -98
- package/lib/cjs/select/optionFoundation.js +4 -9
- package/lib/cjs/sideSheet/constants.js +1 -4
- package/lib/cjs/sideSheet/sideSheetFoundation.js +6 -15
- package/lib/cjs/skeleton/constants.js +1 -4
- package/lib/cjs/slider/constants.js +1 -4
- package/lib/cjs/slider/foundation.js +13 -24
- package/lib/cjs/space/constants.js +1 -4
- package/lib/cjs/spin/constants.js +1 -4
- package/lib/cjs/spin/foundation.js +5 -12
- package/lib/cjs/steps/constants.js +1 -4
- package/lib/cjs/switch/constants.js +1 -4
- package/lib/cjs/switch/foundation.js +4 -9
- package/lib/cjs/table/bodyFoundation.js +9 -22
- package/lib/cjs/table/cellFoundation.js +3 -6
- package/lib/cjs/table/constants.js +1 -4
- package/lib/cjs/table/foundation.js +76 -117
- package/lib/cjs/table/tableRowFoundation.js +3 -6
- package/lib/cjs/table/tableSelectionCellFoundation.js +3 -6
- package/lib/cjs/table/utils.js +42 -71
- package/lib/cjs/tabs/constants.js +1 -4
- package/lib/cjs/tabs/foundation.js +8 -23
- package/lib/cjs/tag/constants.js +1 -4
- package/lib/cjs/tagInput/constants.js +1 -4
- package/lib/cjs/tagInput/foundation.js +12 -31
- package/lib/cjs/tagInput/utils/getSplitedArray.js +3 -6
- package/lib/cjs/timePicker/ComboxFoundation.js +10 -29
- package/lib/cjs/timePicker/constants.js +1 -4
- package/lib/cjs/timePicker/foundation.js +26 -45
- package/lib/cjs/timePicker/inputFoundation.js +4 -9
- package/lib/cjs/timePicker/utils/index.js +7 -14
- package/lib/cjs/timePicker/utils/localeDate.js +2 -9
- package/lib/cjs/timeline/constants.js +1 -4
- package/lib/cjs/toast/constants.js +1 -4
- package/lib/cjs/toast/toastFoundation.js +5 -12
- package/lib/cjs/toast/toastListFoundation.js +5 -12
- package/lib/cjs/tooltip/constants.js +1 -4
- package/lib/cjs/tooltip/foundation.js +29 -56
- package/lib/cjs/transfer/constants.js +1 -4
- package/lib/cjs/transfer/foundation.js +24 -47
- package/lib/cjs/transfer/transferUtils.js +16 -45
- package/lib/cjs/tree/constants.js +1 -4
- package/lib/cjs/tree/foundation.js +41 -76
- package/lib/cjs/tree/treeUtil.js +60 -107
- package/lib/cjs/treeSelect/constants.js +1 -4
- package/lib/cjs/treeSelect/foundation.js +49 -82
- package/lib/cjs/typography/constants.js +1 -4
- package/lib/cjs/upload/constants.js +1 -4
- package/lib/cjs/upload/foundation.js +56 -112
- package/lib/cjs/upload/utils.js +13 -32
- package/lib/cjs/utils/Event.js +9 -23
- package/lib/cjs/utils/FocusHandle.js +6 -15
- package/lib/cjs/utils/Logger.js +1 -4
- package/lib/cjs/utils/Store.js +5 -20
- package/lib/cjs/utils/a11y.js +8 -13
- package/lib/cjs/utils/array.js +6 -15
- package/lib/cjs/utils/arrayMove.js +3 -12
- package/lib/cjs/utils/classnames.js +6 -15
- package/lib/cjs/utils/date-fns-extra.js +7 -18
- package/lib/cjs/utils/dom.js +5 -12
- package/lib/cjs/utils/function.js +1 -4
- package/lib/cjs/utils/getDataAttr.js +2 -13
- package/lib/cjs/utils/getHighlight.js +7 -22
- package/lib/cjs/utils/getMotionObjFromProps.js +4 -9
- package/lib/cjs/utils/index.js +5 -15
- package/lib/cjs/utils/isBothNaN.js +1 -4
- package/lib/cjs/utils/isElement.js +1 -4
- package/lib/cjs/utils/isEnterPress.js +3 -6
- package/lib/cjs/utils/isEscPress.js +3 -6
- package/lib/cjs/utils/isNullOrUndefined.js +1 -4
- package/lib/cjs/utils/isNumber.js +1 -4
- package/lib/cjs/utils/isObject.js +1 -4
- package/lib/cjs/utils/isPromise.js +3 -6
- package/lib/cjs/utils/isString.js +1 -4
- package/lib/cjs/utils/keyCode.js +1 -4
- package/lib/cjs/utils/log.js +3 -6
- package/lib/cjs/utils/number.js +1 -4
- package/lib/cjs/utils/object.js +10 -27
- package/lib/cjs/utils/set.js +4 -9
- package/lib/cjs/utils/shallowEqualObjects.js +3 -10
- package/lib/cjs/utils/touchPolyfill.js +5 -12
- package/lib/cjs/utils/type.js +1 -3
- package/lib/cjs/utils/uuid.js +3 -14
- package/lib/cjs/utils/warning.js +1 -4
- package/lib/es/anchor/anchor.css +1 -10
- package/lib/es/anchor/anchor.scss +1 -8
- package/lib/es/anchor/foundation.js +2 -4
- package/lib/es/anchor/linkFoundation.js +1 -2
- package/lib/es/anchor/rtl.scss +0 -1
- package/lib/es/anchor/variables.scss +1 -0
- package/lib/es/autoComplete/foundation.js +11 -26
- package/lib/es/autoComplete/optionFoundation.js +1 -2
- package/lib/es/avatar/foundation.js +1 -2
- package/lib/es/backtop/foundation.js +1 -2
- package/lib/es/banner/foundation.js +1 -2
- package/lib/es/base/foundation.js +2 -3
- package/lib/es/breadcrumb/foundation.js +3 -6
- package/lib/es/breadcrumb/itemFoundation.js +1 -2
- package/lib/es/calendar/eventUtil.d.ts +3 -3
- package/lib/es/calendar/eventUtil.js +27 -56
- package/lib/es/calendar/foundation.js +60 -90
- package/lib/es/carousel/foundation.js +2 -4
- package/lib/es/cascader/foundation.js +49 -94
- package/lib/es/cascader/util.js +6 -21
- package/lib/es/checkbox/checkboxFoundation.js +3 -6
- package/lib/es/checkbox/checkboxGroupFoundation.js +6 -9
- package/lib/es/collapse/foundation.js +6 -10
- package/lib/es/datePicker/_utils/formatter.js +2 -5
- package/lib/es/datePicker/_utils/getDefaultPickerDate.js +2 -3
- package/lib/es/datePicker/_utils/getInsetInputFormatToken.js +1 -4
- package/lib/es/datePicker/_utils/getMonthTable.js +1 -5
- package/lib/es/datePicker/_utils/getMonthsInYear.js +2 -9
- package/lib/es/datePicker/_utils/getYears.js +1 -3
- package/lib/es/datePicker/constants.js +2 -7
- package/lib/es/datePicker/foundation.js +39 -70
- package/lib/es/datePicker/inputFoundation.js +4 -11
- package/lib/es/datePicker/monthFoundation.js +2 -4
- package/lib/es/datePicker/monthsGridFoundation.js +40 -55
- package/lib/es/datePicker/yearAndMonthFoundation.js +1 -2
- package/lib/es/dropdown/foundation.js +4 -7
- package/lib/es/dropdown/menuFoundation.js +8 -21
- package/lib/es/form/foundation.js +59 -91
- package/lib/es/form/utils.js +11 -19
- package/lib/es/input/foundation.js +4 -9
- package/lib/es/input/textareaFoundation.js +3 -5
- package/lib/es/input/util/calculateNodeHeight.js +2 -10
- package/lib/es/input/util/getSizingData.js +2 -5
- package/lib/es/inputNumber/constants.js +3 -8
- package/lib/es/inputNumber/foundation.js +8 -18
- package/lib/es/modal/modalContentFoundation.js +1 -2
- package/lib/es/modal/modalFoundation.js +1 -2
- package/lib/es/navigation/NavItem.js +5 -11
- package/lib/es/navigation/foundation.js +19 -25
- package/lib/es/navigation/itemFoundation.js +1 -3
- package/lib/es/navigation/subNavFoundation.js +7 -13
- package/lib/es/notification/notificationFoundation.js +2 -4
- package/lib/es/notification/notificationListFoundation.js +1 -3
- package/lib/es/overflowList/constants.js +2 -3
- package/lib/es/overflowList/foundation.js +9 -23
- package/lib/es/pagination/foundation.js +15 -28
- package/lib/es/popover/constants.js +1 -2
- package/lib/es/radio/radioGroupFoundation.js +3 -4
- package/lib/es/radio/radioInnerFoundation.js +2 -3
- package/lib/es/rating/foundation.js +4 -13
- package/lib/es/scrollList/itemFoundation.js +5 -13
- package/lib/es/select/foundation.js +50 -88
- package/lib/es/select/optionFoundation.js +1 -2
- package/lib/es/sideSheet/sideSheetFoundation.js +3 -7
- package/lib/es/slider/foundation.js +10 -16
- package/lib/es/spin/foundation.js +2 -4
- package/lib/es/switch/foundation.js +1 -2
- package/lib/es/table/bodyFoundation.js +6 -11
- package/lib/es/table/foundation.js +67 -93
- package/lib/es/table/utils.js +33 -51
- package/lib/es/tabs/foundation.js +5 -18
- package/lib/es/tagInput/foundation.js +9 -21
- package/lib/es/timePicker/ComboxFoundation.js +7 -16
- package/lib/es/timePicker/foundation.js +23 -37
- package/lib/es/timePicker/inputFoundation.js +1 -2
- package/lib/es/timePicker/utils/index.js +4 -6
- package/lib/es/timePicker/utils/localeDate.js +1 -2
- package/lib/es/toast/toastFoundation.js +2 -4
- package/lib/es/toast/toastListFoundation.js +2 -4
- package/lib/es/tooltip/foundation.js +26 -46
- package/lib/es/transfer/foundation.js +21 -43
- package/lib/es/transfer/transferUtils.js +13 -33
- package/lib/es/tree/foundation.js +38 -70
- package/lib/es/tree/treeUtil.js +57 -109
- package/lib/es/treeSelect/foundation.js +45 -73
- package/lib/es/upload/foundation.js +52 -118
- package/lib/es/upload/utils.js +12 -25
- package/lib/es/utils/Event.js +5 -12
- package/lib/es/utils/FocusHandle.js +3 -7
- package/lib/es/utils/Store.js +4 -12
- package/lib/es/utils/a11y.js +5 -6
- package/lib/es/utils/array.js +3 -5
- package/lib/es/utils/arrayMove.js +2 -6
- package/lib/es/utils/classnames.js +3 -6
- package/lib/es/utils/date-fns-extra.js +6 -14
- package/lib/es/utils/dom.js +1 -2
- package/lib/es/utils/getDataAttr.js +1 -5
- package/lib/es/utils/getHighlight.js +4 -14
- package/lib/es/utils/getMotionObjFromProps.js +1 -2
- package/lib/es/utils/object.js +7 -15
- package/lib/es/utils/set.js +1 -2
- package/lib/es/utils/shallowEqualObjects.js +2 -5
- package/lib/es/utils/touchPolyfill.js +2 -6
- package/lib/es/utils/uuid.js +2 -7
- package/package.json +2 -4
- package/select/foundation.ts +2 -2
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
11
6
|
exports.default = void 0;
|
|
12
7
|
|
|
13
|
-
var _freeze = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/freeze"));
|
|
14
|
-
|
|
15
|
-
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
16
|
-
|
|
17
|
-
var _from = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/from"));
|
|
18
|
-
|
|
19
8
|
var _without2 = _interopRequireDefault(require("lodash/without"));
|
|
20
9
|
|
|
21
10
|
var _dom = require("./dom");
|
|
22
11
|
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
23
14
|
/*
|
|
24
15
|
* Usage:
|
|
25
16
|
* // Eg1: Pass a dom as the tab tarp container.
|
|
@@ -119,7 +110,7 @@ class FocusTrapHandle {
|
|
|
119
110
|
}
|
|
120
111
|
};
|
|
121
112
|
|
|
122
|
-
|
|
113
|
+
Object.freeze(options); // prevent user to change options after init;
|
|
123
114
|
|
|
124
115
|
this.container = container;
|
|
125
116
|
this.options = options;
|
|
@@ -127,7 +118,7 @@ class FocusTrapHandle {
|
|
|
127
118
|
|
|
128
119
|
this.focusRedirectListenerList = (() => {
|
|
129
120
|
if (options === null || options === void 0 ? void 0 : options.onFocusRedirectListener) {
|
|
130
|
-
return
|
|
121
|
+
return Array.isArray(options.onFocusRedirectListener) ? [...options.onFocusRedirectListener] : [options.onFocusRedirectListener];
|
|
131
122
|
} else {
|
|
132
123
|
return [];
|
|
133
124
|
}
|
|
@@ -153,7 +144,7 @@ class FocusTrapHandle {
|
|
|
153
144
|
const focusableSelectorsList = ["input:not([disabled]):not([tabindex='-1'])", "textarea:not([disabled]):not([tabindex='-1'])", "button:not([disabled]):not([tabindex='-1'])", "a[href]:not([tabindex='-1'])", "select:not([disabled]):not([tabindex='-1'])", "area[href]:not([tabindex='-1'])", "iframe:not([tabindex='-1'])", "object:not([tabindex='-1'])", "*[tabindex]:not([tabindex='-1'])", "*[contenteditable]:not([tabindex='-1'])"];
|
|
154
145
|
const focusableSelectorsStr = focusableSelectorsList.join(','); // we are not filtered elements which are invisible
|
|
155
146
|
|
|
156
|
-
return
|
|
147
|
+
return Array.from(node.querySelectorAll(focusableSelectorsStr));
|
|
157
148
|
}
|
|
158
149
|
|
|
159
150
|
static getActiveElement() {
|
package/lib/cjs/utils/Logger.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
|
|
9
6
|
exports.default = void 0;
|
|
10
7
|
|
|
11
8
|
class Logger {
|
package/lib/cjs/utils/Store.js
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
11
6
|
exports.default = void 0;
|
|
12
7
|
|
|
13
|
-
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
|
|
14
|
-
|
|
15
|
-
var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
16
|
-
|
|
17
|
-
var _splice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/splice"));
|
|
18
|
-
|
|
19
8
|
/* istanbul ignore next */
|
|
20
9
|
class Store {
|
|
21
10
|
constructor(initialState) {
|
|
22
|
-
this._state =
|
|
11
|
+
this._state = Object.assign({}, initialState);
|
|
23
12
|
this._listeners = [];
|
|
24
13
|
}
|
|
25
14
|
|
|
@@ -27,14 +16,10 @@ class Store {
|
|
|
27
16
|
this._listeners.push(listener);
|
|
28
17
|
|
|
29
18
|
const unsubscribe = () => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const index = (0, _indexOf.default)(_context = this._listeners).call(_context, listener);
|
|
19
|
+
const index = this._listeners.indexOf(listener);
|
|
33
20
|
|
|
34
21
|
if (index > -1) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
(0, _splice.default)(_context2 = this._listeners).call(_context2, index, 1);
|
|
22
|
+
this._listeners.splice(index, 1);
|
|
38
23
|
}
|
|
39
24
|
};
|
|
40
25
|
|
|
@@ -42,7 +27,7 @@ class Store {
|
|
|
42
27
|
}
|
|
43
28
|
|
|
44
29
|
setState(state) {
|
|
45
|
-
|
|
30
|
+
Object.assign(this._state, Object.assign({}, state));
|
|
46
31
|
|
|
47
32
|
for (const listener of this._listeners) {
|
|
48
33
|
if (typeof listener === 'function') {
|
package/lib/cjs/utils/a11y.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
11
6
|
exports.findIndexByCharacter = findIndexByCharacter;
|
|
12
7
|
exports.getAncestorNodeByRole = getAncestorNodeByRole;
|
|
13
8
|
exports.getMenuButton = getMenuButton;
|
|
@@ -19,10 +14,10 @@ exports.setFocusToLastItem = setFocusToLastItem;
|
|
|
19
14
|
exports.setFocusToNextMenuitem = setFocusToNextMenuitem;
|
|
20
15
|
exports.setFocusToPreviousMenuItem = setFocusToPreviousMenuItem;
|
|
21
16
|
|
|
22
|
-
var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
23
|
-
|
|
24
17
|
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
25
18
|
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
|
|
26
21
|
function handlePrevent(event) {
|
|
27
22
|
event.stopPropagation();
|
|
28
23
|
event.preventDefault();
|
|
@@ -62,7 +57,7 @@ function setFocusToPreviousMenuItem(itemNodes, currentItem) {
|
|
|
62
57
|
if (currentItem === itemNodes[0]) {
|
|
63
58
|
newMenuItem = itemNodes[itemNodes.length - 1];
|
|
64
59
|
} else {
|
|
65
|
-
index =
|
|
60
|
+
index = itemNodes.indexOf(currentItem);
|
|
66
61
|
newMenuItem = itemNodes[index - 1];
|
|
67
62
|
}
|
|
68
63
|
|
|
@@ -78,7 +73,7 @@ function setFocusToNextMenuitem(itemNodes, currentItem) {
|
|
|
78
73
|
if (currentItem === itemNodes[itemNodes.length - 1]) {
|
|
79
74
|
newMenuItem = itemNodes[0];
|
|
80
75
|
} else {
|
|
81
|
-
index =
|
|
76
|
+
index = itemNodes.indexOf(currentItem);
|
|
82
77
|
newMenuItem = itemNodes[index + 1];
|
|
83
78
|
}
|
|
84
79
|
|
|
@@ -95,17 +90,17 @@ function findIndexByCharacter(itemList, curItem, firstCharList, char) {
|
|
|
95
90
|
|
|
96
91
|
char = char.toLowerCase(); // Get start index for search based on position of currentItem
|
|
97
92
|
|
|
98
|
-
start =
|
|
93
|
+
start = itemList.indexOf(curItem) + 1;
|
|
99
94
|
|
|
100
95
|
if (start >= itemList.length) {
|
|
101
96
|
start = 0;
|
|
102
97
|
} // Check remaining menu items in the menu
|
|
103
98
|
|
|
104
99
|
|
|
105
|
-
index =
|
|
100
|
+
index = firstCharList.indexOf(char, start); // If not found in remaining menu items, check from beginning
|
|
106
101
|
|
|
107
102
|
if (index === -1) {
|
|
108
|
-
index =
|
|
103
|
+
index = firstCharList.indexOf(char, 0);
|
|
109
104
|
}
|
|
110
105
|
|
|
111
106
|
return index >= 0 ? index : -1;
|
package/lib/cjs/utils/array.js
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
11
6
|
exports.pullAll = pullAll;
|
|
12
7
|
exports.withOrderSort = withOrderSort;
|
|
13
8
|
|
|
14
|
-
var _set =
|
|
15
|
-
|
|
16
|
-
var _from = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/from"));
|
|
17
|
-
|
|
18
|
-
var _set2 = require("./set");
|
|
9
|
+
var _set = require("./set");
|
|
19
10
|
|
|
20
11
|
/**
|
|
21
12
|
* arrayA remove arrayB
|
|
@@ -31,10 +22,10 @@ var _set2 = require("./set");
|
|
|
31
22
|
*/
|
|
32
23
|
function pullAll(arrayA, arrayB) {
|
|
33
24
|
if (arrayA !== null && arrayA.length && arrayB !== null && arrayB.length) {
|
|
34
|
-
const setA = new
|
|
35
|
-
const setB = new
|
|
36
|
-
const resultSet = (0,
|
|
37
|
-
return
|
|
25
|
+
const setA = new Set(arrayA);
|
|
26
|
+
const setB = new Set(arrayB);
|
|
27
|
+
const resultSet = (0, _set.pullAll)(setA, setB);
|
|
28
|
+
return Array.from(resultSet);
|
|
38
29
|
}
|
|
39
30
|
|
|
40
31
|
return arrayA;
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
11
6
|
exports.default = arrayMove;
|
|
12
7
|
|
|
13
|
-
var _slice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/slice"));
|
|
14
|
-
|
|
15
|
-
var _splice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/splice"));
|
|
16
|
-
|
|
17
8
|
function arrayMove(array, from, to) {
|
|
18
|
-
const newArray =
|
|
19
|
-
|
|
9
|
+
const newArray = array.slice();
|
|
10
|
+
newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);
|
|
20
11
|
return newArray;
|
|
21
12
|
}
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
11
6
|
exports.addClass = addClass;
|
|
12
7
|
exports.removeClass = removeClass;
|
|
13
8
|
|
|
14
|
-
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
15
|
-
|
|
16
|
-
var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
17
|
-
|
|
18
|
-
var _splice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/splice"));
|
|
19
|
-
|
|
20
9
|
var _map2 = _interopRequireDefault(require("lodash/map"));
|
|
21
10
|
|
|
22
11
|
var _filter2 = _interopRequireDefault(require("lodash/filter"));
|
|
@@ -25,6 +14,8 @@ var _split2 = _interopRequireDefault(require("lodash/split"));
|
|
|
25
14
|
|
|
26
15
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
27
16
|
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
|
|
28
19
|
function addClass(rawCls) {
|
|
29
20
|
const clss = (0, _split2.default)(rawCls, /\s+/);
|
|
30
21
|
|
|
@@ -32,7 +23,7 @@ function addClass(rawCls) {
|
|
|
32
23
|
srcClss[_key - 1] = arguments[_key];
|
|
33
24
|
}
|
|
34
25
|
|
|
35
|
-
const validClss = (0, _filter2.default)(srcClss, cls => !
|
|
26
|
+
const validClss = (0, _filter2.default)(srcClss, cls => !clss.includes(cls));
|
|
36
27
|
return (0, _classnames.default)(rawCls, ...validClss);
|
|
37
28
|
}
|
|
38
29
|
|
|
@@ -44,10 +35,10 @@ function removeClass(rawCls) {
|
|
|
44
35
|
}
|
|
45
36
|
|
|
46
37
|
(0, _map2.default)(srcClss, cls => {
|
|
47
|
-
const index =
|
|
38
|
+
const index = clss.indexOf(cls);
|
|
48
39
|
|
|
49
40
|
if (index > -1) {
|
|
50
|
-
|
|
41
|
+
clss.splice(index, 1);
|
|
51
42
|
}
|
|
52
43
|
});
|
|
53
44
|
return (0, _classnames.default)(...clss);
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
11
6
|
exports.zonedTimeToUtc = exports.utcToZonedTime = exports.toIANA = exports.parse = exports.getCurrentTimeZone = exports.format = exports.IANAOffsetMap = void 0;
|
|
12
7
|
|
|
13
|
-
var _parseInt2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/parse-int"));
|
|
14
|
-
|
|
15
|
-
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
16
|
-
|
|
17
|
-
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
|
|
18
|
-
|
|
19
8
|
var _dateFnsTz = require("date-fns-tz");
|
|
20
9
|
|
|
21
10
|
var _dateFns = require("date-fns");
|
|
@@ -46,15 +35,15 @@ const toIANA = tz => {
|
|
|
46
35
|
return tz;
|
|
47
36
|
}
|
|
48
37
|
|
|
49
|
-
const symbol = (
|
|
38
|
+
const symbol = parseInt(matches[1] + 1, 10); // => -1 or 1
|
|
50
39
|
|
|
51
|
-
const hourOffset = (
|
|
52
|
-
const minuteOffset = (
|
|
40
|
+
const hourOffset = parseInt(matches[2], 10);
|
|
41
|
+
const minuteOffset = parseInt(matches[3], 10);
|
|
53
42
|
tz = symbol * (hourOffset + minuteOffset / 60);
|
|
54
43
|
}
|
|
55
44
|
|
|
56
45
|
if (typeof tz === 'number') {
|
|
57
|
-
const found =
|
|
46
|
+
const found = IANAOffsetMap.find(item => item[0] === tz);
|
|
58
47
|
return found && found[1][0];
|
|
59
48
|
}
|
|
60
49
|
};
|
|
@@ -79,7 +68,7 @@ const parse = (date, formatToken, options) => {
|
|
|
79
68
|
|
|
80
69
|
if (options && options.timeZone != null && options.timeZone !== '') {
|
|
81
70
|
const timeZone = toIANA(options.timeZone);
|
|
82
|
-
options =
|
|
71
|
+
options = Object.assign(Object.assign({}, options), {
|
|
83
72
|
timeZone
|
|
84
73
|
});
|
|
85
74
|
}
|
|
@@ -102,7 +91,7 @@ exports.parse = parse;
|
|
|
102
91
|
const format = (date, formatToken, options) => {
|
|
103
92
|
if (options && options.timeZone != null && options.timeZone !== '') {
|
|
104
93
|
const timeZone = toIANA(options.timeZone);
|
|
105
|
-
options =
|
|
94
|
+
options = Object.assign(Object.assign({}, options), {
|
|
106
95
|
timeZone
|
|
107
96
|
});
|
|
108
97
|
date = (0, _dateFnsTz.utcToZonedTime)(date, timeZone, options);
|
package/lib/cjs/utils/dom.js
CHANGED
|
@@ -1,29 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
11
6
|
exports.append = append;
|
|
12
7
|
exports.convertDOMRectToObject = convertDOMRectToObject;
|
|
13
|
-
|
|
14
|
-
_Object$defineProperty(exports, "isHTMLElement", {
|
|
8
|
+
Object.defineProperty(exports, "isHTMLElement", {
|
|
15
9
|
enumerable: true,
|
|
16
10
|
get: function () {
|
|
17
11
|
return _isElement.default;
|
|
18
12
|
}
|
|
19
13
|
});
|
|
20
|
-
|
|
21
14
|
exports.prepend = prepend;
|
|
22
15
|
|
|
23
|
-
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
24
|
-
|
|
25
16
|
var _isElement = _interopRequireDefault(require("./isElement"));
|
|
26
17
|
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
27
20
|
/**
|
|
28
21
|
*
|
|
29
22
|
* @param {HTMLElement} parentNode
|
|
@@ -81,7 +74,7 @@ function convertDOMRectToObject(domRect) {
|
|
|
81
74
|
return domRect.toJSON();
|
|
82
75
|
} else {
|
|
83
76
|
const keys = ['left', 'top', 'right', 'bottom', 'width', 'height'];
|
|
84
|
-
return
|
|
77
|
+
return keys.reduce((obj, key) => {
|
|
85
78
|
obj[key] = domRect[key];
|
|
86
79
|
return obj;
|
|
87
80
|
}, {});
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
|
|
9
6
|
exports.noop = noop;
|
|
10
7
|
|
|
11
8
|
/**
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
11
6
|
exports.default = getDataAttr;
|
|
12
7
|
|
|
13
|
-
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
14
|
-
|
|
15
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
|
16
|
-
|
|
17
8
|
function getDataAttr(props) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return (0, _reduce.default)(_context = (0, _keys.default)(props)).call(_context, (prev, key) => {
|
|
9
|
+
return Object.keys(props).reduce((prev, key) => {
|
|
21
10
|
if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
|
|
22
11
|
prev[key] = props[key];
|
|
23
12
|
}
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
11
6
|
exports.findAll = void 0;
|
|
12
7
|
|
|
13
|
-
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
14
|
-
|
|
15
|
-
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
16
|
-
|
|
17
|
-
var _sort = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/sort"));
|
|
18
|
-
|
|
19
|
-
var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
|
20
|
-
|
|
21
8
|
var _isString2 = _interopRequireDefault(require("lodash/isString"));
|
|
22
9
|
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
23
12
|
const escapeRegExpFn = string => string.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
|
24
13
|
/**
|
|
25
14
|
* Examine text for any matches.
|
|
@@ -29,16 +18,14 @@ const escapeRegExpFn = string => string.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$
|
|
|
29
18
|
|
|
30
19
|
|
|
31
20
|
const findChunks = _ref => {
|
|
32
|
-
var _context;
|
|
33
|
-
|
|
34
21
|
let {
|
|
35
22
|
autoEscape,
|
|
36
23
|
caseSensitive,
|
|
37
24
|
searchWords,
|
|
38
25
|
sourceString
|
|
39
26
|
} = _ref;
|
|
40
|
-
return
|
|
41
|
-
|
|
27
|
+
return searchWords.filter(searchWord => searchWord) // Remove empty words
|
|
28
|
+
.reduce((chunks, searchWord) => {
|
|
42
29
|
if (autoEscape) {
|
|
43
30
|
searchWord = escapeRegExpFn(searchWord);
|
|
44
31
|
}
|
|
@@ -75,12 +62,10 @@ const findChunks = _ref => {
|
|
|
75
62
|
|
|
76
63
|
|
|
77
64
|
const combineChunks = _ref2 => {
|
|
78
|
-
var _context2;
|
|
79
|
-
|
|
80
65
|
let {
|
|
81
66
|
chunks
|
|
82
67
|
} = _ref2;
|
|
83
|
-
chunks =
|
|
68
|
+
chunks = chunks.sort((first, second) => first.start - second.start).reduce((processedChunks, nextChunk) => {
|
|
84
69
|
// First chunk just goes straight in the array...
|
|
85
70
|
if (processedChunks.length === 0) {
|
|
86
71
|
return [nextChunk];
|
|
@@ -136,7 +121,7 @@ const fillInChunks = _ref3 => {
|
|
|
136
121
|
append(0, totalLength, false);
|
|
137
122
|
} else {
|
|
138
123
|
let lastIndex = 0;
|
|
139
|
-
|
|
124
|
+
chunksToHighlight.forEach(chunk => {
|
|
140
125
|
append(lastIndex, chunk.start, false);
|
|
141
126
|
append(chunk.start, chunk.end, true);
|
|
142
127
|
lastIndex = chunk.end;
|
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
11
6
|
exports.default = getMotionObjFromProps;
|
|
12
7
|
|
|
13
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
|
14
|
-
|
|
15
8
|
var _isObject2 = _interopRequireDefault(require("lodash/isObject"));
|
|
16
9
|
|
|
17
10
|
var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
18
11
|
|
|
19
12
|
var _warning = _interopRequireDefault(require("./warning"));
|
|
20
13
|
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
21
16
|
/**
|
|
22
17
|
* get motion object from props
|
|
23
18
|
*
|
|
@@ -45,7 +40,7 @@ function getMotionObjFromProps(props) {
|
|
|
45
40
|
if ((0, _isObject2.default)(motionProp)) {
|
|
46
41
|
motion = (0, _cloneDeep2.default)(motionProp);
|
|
47
42
|
|
|
48
|
-
for (const key of
|
|
43
|
+
for (const key of Object.keys(motionProp)) {
|
|
49
44
|
const handler = motionProp[key];
|
|
50
45
|
|
|
51
46
|
if (typeof handler === 'function') {
|
package/lib/cjs/utils/index.js
CHANGED
|
@@ -1,24 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
6
|
-
|
|
7
|
-
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
|
8
|
-
|
|
9
|
-
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
10
|
-
|
|
11
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
4
|
value: true
|
|
13
5
|
});
|
|
14
6
|
|
|
15
7
|
var _classnames = require("./classnames");
|
|
16
8
|
|
|
17
|
-
|
|
9
|
+
Object.keys(_classnames).forEach(function (key) {
|
|
18
10
|
if (key === "default" || key === "__esModule") return;
|
|
19
11
|
if (key in exports && exports[key] === _classnames[key]) return;
|
|
20
|
-
|
|
21
|
-
_Object$defineProperty(exports, key, {
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
22
13
|
enumerable: true,
|
|
23
14
|
get: function () {
|
|
24
15
|
return _classnames[key];
|
|
@@ -28,11 +19,10 @@ _forEachInstanceProperty(_context = _Object$keys(_classnames)).call(_context, fu
|
|
|
28
19
|
|
|
29
20
|
var _function = require("./function");
|
|
30
21
|
|
|
31
|
-
|
|
22
|
+
Object.keys(_function).forEach(function (key) {
|
|
32
23
|
if (key === "default" || key === "__esModule") return;
|
|
33
24
|
if (key in exports && exports[key] === _function[key]) return;
|
|
34
|
-
|
|
35
|
-
_Object$defineProperty(exports, key, {
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
36
26
|
enumerable: true,
|
|
37
27
|
get: function () {
|
|
38
28
|
return _function[key];
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
|
|
9
6
|
exports.default = void 0;
|
|
10
7
|
|
|
11
8
|
/**
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
|
|
9
6
|
exports.default = isElement;
|
|
10
7
|
|
|
11
8
|
/* istanbul ignore next */
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
11
6
|
exports.default = void 0;
|
|
12
7
|
|
|
13
8
|
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
14
9
|
|
|
15
10
|
var _keyCode = require("./keyCode");
|
|
16
11
|
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
17
14
|
function isEnterPress(e) {
|
|
18
15
|
return (0, _get2.default)(e, 'key') === _keyCode.ENTER_KEY ? true : false;
|
|
19
16
|
}
|