@ebscn/ui 1.0.3-beta.2 → 1.0.3-beta.20
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/assets/images/delete_dark.png +0 -0
- package/assets/images/keybord_keybord_dark.png +0 -0
- package/assets/images/keybord_shift2.png +0 -0
- package/assets/images/keybord_shift2_dark.png +0 -0
- package/assets/images/keybord_shift_dark.png +0 -0
- package/assets/images/loading.gif +0 -0
- package/cjs/assets/images/delete_dark.png +0 -0
- package/cjs/assets/images/keybord_keybord_dark.png +0 -0
- package/cjs/assets/images/keybord_shift2.png +0 -0
- package/cjs/assets/images/keybord_shift2_dark.png +0 -0
- package/cjs/assets/images/keybord_shift_dark.png +0 -0
- package/cjs/assets/images/loading.gif +0 -0
- package/cjs/components/alphabet-keyboard/alphabet-keyboard.css +108 -43
- package/cjs/components/alphabet-keyboard/alphabet-keyboard.js +1 -2
- package/cjs/components/button/selectorButton.css +2 -0
- package/cjs/components/button/selectorButton.js +1 -5
- package/cjs/components/card/card.css +1 -1
- package/cjs/components/card/card.js +2 -2
- package/cjs/components/checkbox/checkbox.css +8 -3
- package/cjs/components/date-range-picker/date-range-picker.css +31 -7
- package/cjs/components/date-range-picker/date-range-picker.d.ts +1 -0
- package/cjs/components/date-range-picker/date-range-picker.js +18 -9
- package/cjs/components/divider/divider.css +4 -3
- package/cjs/components/header/header.css +7 -1
- package/cjs/components/header/header.js +4 -2
- package/cjs/components/icons/back-icon.js +1 -0
- package/cjs/components/icons/clear-icon.js +1 -0
- package/cjs/components/icons/close-icon.js +2 -1
- package/cjs/components/icons/down-icon.d.ts +4 -0
- package/cjs/components/icons/down-icon.js +26 -0
- package/cjs/components/icons/dustbin-icon.d.ts +4 -0
- package/cjs/components/icons/dustbin-icon.js +26 -0
- package/cjs/components/icons/index.d.ts +3 -0
- package/cjs/components/icons/index.js +21 -0
- package/cjs/components/icons/notice-icon.js +2 -2
- package/cjs/components/icons/right-icon.js +1 -0
- package/cjs/components/icons/search-icon.js +2 -1
- package/cjs/components/icons/up-icon.d.ts +4 -0
- package/cjs/components/icons/up-icon.js +26 -0
- package/cjs/components/icons/warning-icon.js +2 -1
- package/cjs/components/infinite-scroll/index.d.ts +4 -0
- package/cjs/components/infinite-scroll/index.js +9 -0
- package/cjs/components/infinite-scroll/infinite-scroll.css +27 -0
- package/cjs/components/infinite-scroll/infinite-scroll.d.ts +11 -0
- package/cjs/components/infinite-scroll/infinite-scroll.js +278 -0
- package/cjs/components/input/input.css +27 -27
- package/cjs/components/input/input.js +1 -1
- package/cjs/components/list/index.d.ts +16 -0
- package/cjs/components/list/index.js +13 -0
- package/cjs/components/list/list-item.d.ts +15 -0
- package/cjs/components/list/list-item.js +38 -0
- package/cjs/components/list/list.css +102 -0
- package/cjs/components/list/list.d.ts +20 -0
- package/cjs/components/list/list.js +38 -0
- package/cjs/components/number-keyboard/number-keyboard.css +55 -42
- package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -0
- package/cjs/components/number-keyboard/number-keyboard.js +2 -1
- package/cjs/components/picker-view/picker-view.css +3 -2
- package/cjs/components/popover/arrow.d.ts +3 -0
- package/cjs/components/popover/arrow.js +19 -0
- package/cjs/components/popover/index.d.ts +31 -0
- package/cjs/components/popover/index.js +14 -0
- package/cjs/components/popover/normalize-placement.d.ts +2 -0
- package/cjs/components/popover/normalize-placement.js +20 -0
- package/cjs/components/popover/popover-menu.css +65 -0
- package/cjs/components/popover/popover-menu.d.ts +20 -0
- package/cjs/components/popover/popover-menu.js +74 -0
- package/cjs/components/popover/popover.css +68 -0
- package/cjs/components/popover/popover.d.ts +41 -0
- package/cjs/components/popover/popover.js +280 -0
- package/cjs/components/popover/wrapper.d.ts +10 -0
- package/cjs/components/popover/wrapper.js +53 -0
- package/cjs/components/protocol/protocol.js +1 -2
- package/cjs/components/pull-to-refresh/pull-to-refresh.css +10 -1
- package/cjs/components/pull-to-refresh/pull-to-refresh.d.ts +1 -1
- package/cjs/components/pull-to-refresh/pull-to-refresh.js +5 -5
- package/cjs/components/radio/radio.css +5 -0
- package/cjs/components/selector/selector.css +1 -1
- package/cjs/components/skeleton/skeleton.css +4 -4
- package/cjs/components/squared-grid/squared-grid.css +1 -2
- package/cjs/components/squared-grid/squared-grid.d.ts +2 -1
- package/cjs/components/squared-grid/squared-grid.js +11 -2
- package/cjs/components/stock-count-keyboard/stock-count-keyboard.css +48 -41
- package/cjs/components/stock-count-keyboard/stock-count-keyboard.js +1 -1
- package/cjs/components/stock-keyboard/alphabet-keyboard.css +186 -0
- package/cjs/components/stock-keyboard/alphabet-keyboard.d.ts +11 -0
- package/cjs/components/stock-keyboard/alphabet-keyboard.js +106 -0
- package/cjs/components/stock-keyboard/index.d.ts +1 -0
- package/cjs/components/stock-keyboard/index.js +1 -0
- package/cjs/components/stock-keyboard/stock-keyboard.css +135 -76
- package/cjs/components/stock-keyboard/stock-keyboard.d.ts +2 -2
- package/cjs/components/stock-keyboard/stock-keyboard.js +40 -8
- package/cjs/components/switch/switch.css +2 -3
- package/cjs/components/tabs/tabs.css +5 -3
- package/cjs/components/tabs/tabs.js +5 -5
- package/cjs/components/tabs/tabs.patch.css +1 -0
- package/cjs/components/toast/index.d.ts +9 -0
- package/cjs/components/toast/index.js +14 -0
- package/cjs/components/toast/methods.d.ts +8 -0
- package/cjs/components/toast/methods.js +72 -0
- package/cjs/components/toast/toast.css +45 -0
- package/cjs/components/toast/toast.d.ts +18 -0
- package/cjs/components/toast/toast.js +85 -0
- package/cjs/components/toast/toast.patch.css +11 -0
- package/cjs/global/global.css +20 -5
- package/cjs/global/theme-dark.css +11 -3
- package/cjs/global/theme-default.css +9 -2
- package/cjs/index.d.ts +4 -4
- package/cjs/index.js +32 -32
- package/es/assets/images/delete_dark.png +0 -0
- package/es/assets/images/keybord_keybord_dark.png +0 -0
- package/es/assets/images/keybord_shift2.png +0 -0
- package/es/assets/images/keybord_shift2_dark.png +0 -0
- package/es/assets/images/keybord_shift_dark.png +0 -0
- package/es/assets/images/loading.gif +0 -0
- package/es/components/alphabet-keyboard/alphabet-keyboard.css +108 -43
- package/es/components/alphabet-keyboard/alphabet-keyboard.js +2 -4
- package/es/components/button/selectorButton.css +2 -0
- package/es/components/button/selectorButton.js +1 -5
- package/es/components/card/card.css +1 -1
- package/es/components/card/card.js +2 -2
- package/es/components/checkbox/checkbox.css +8 -3
- package/es/components/date-range-picker/date-range-picker.css +31 -7
- package/es/components/date-range-picker/date-range-picker.d.ts +1 -0
- package/es/components/date-range-picker/date-range-picker.js +17 -9
- package/es/components/divider/divider.css +4 -3
- package/es/components/header/header.css +7 -1
- package/es/components/header/header.js +4 -2
- package/es/components/icons/back-icon.js +1 -0
- package/es/components/icons/clear-icon.js +1 -0
- package/es/components/icons/close-icon.js +2 -1
- package/es/components/icons/down-icon.d.ts +4 -0
- package/es/components/icons/down-icon.js +18 -0
- package/es/components/icons/dustbin-icon.d.ts +4 -0
- package/es/components/icons/dustbin-icon.js +18 -0
- package/es/components/icons/index.d.ts +3 -0
- package/es/components/icons/index.js +3 -0
- package/es/components/icons/notice-icon.js +2 -2
- package/es/components/icons/right-icon.js +1 -0
- package/es/components/icons/search-icon.js +2 -1
- package/es/components/icons/up-icon.d.ts +4 -0
- package/es/components/icons/up-icon.js +18 -0
- package/es/components/icons/warning-icon.js +2 -1
- package/es/components/infinite-scroll/index.d.ts +4 -0
- package/es/components/infinite-scroll/index.js +3 -0
- package/es/components/infinite-scroll/infinite-scroll.css +27 -0
- package/es/components/infinite-scroll/infinite-scroll.d.ts +11 -0
- package/es/components/infinite-scroll/infinite-scroll.js +268 -0
- package/es/components/input/input.css +27 -27
- package/es/components/input/input.js +1 -1
- package/es/components/list/index.d.ts +16 -0
- package/es/components/list/index.js +7 -0
- package/es/components/list/list-item.d.ts +15 -0
- package/es/components/list/list-item.js +30 -0
- package/es/components/list/list.css +102 -0
- package/es/components/list/list.d.ts +20 -0
- package/es/components/list/list.js +29 -0
- package/es/components/number-keyboard/number-keyboard.css +55 -42
- package/es/components/number-keyboard/number-keyboard.d.ts +1 -0
- package/es/components/number-keyboard/number-keyboard.js +2 -1
- package/es/components/picker-view/picker-view.css +3 -2
- package/es/components/popover/arrow.d.ts +3 -0
- package/es/components/popover/arrow.js +11 -0
- package/es/components/popover/index.d.ts +31 -0
- package/es/components/popover/index.js +8 -0
- package/es/components/popover/normalize-placement.d.ts +2 -0
- package/es/components/popover/normalize-placement.js +14 -0
- package/es/components/popover/popover-menu.css +65 -0
- package/es/components/popover/popover-menu.d.ts +20 -0
- package/es/components/popover/popover-menu.js +65 -0
- package/es/components/popover/popover.css +68 -0
- package/es/components/popover/popover.d.ts +41 -0
- package/es/components/popover/popover.js +271 -0
- package/es/components/popover/wrapper.d.ts +10 -0
- package/es/components/popover/wrapper.js +47 -0
- package/es/components/protocol/protocol.js +1 -2
- package/es/components/pull-to-refresh/pull-to-refresh.css +10 -1
- package/es/components/pull-to-refresh/pull-to-refresh.d.ts +1 -1
- package/es/components/pull-to-refresh/pull-to-refresh.js +5 -5
- package/es/components/radio/radio.css +5 -0
- package/es/components/selector/selector.css +1 -1
- package/es/components/skeleton/skeleton.css +4 -4
- package/es/components/squared-grid/squared-grid.css +1 -2
- package/es/components/squared-grid/squared-grid.d.ts +2 -1
- package/es/components/squared-grid/squared-grid.js +11 -2
- package/es/components/stock-count-keyboard/stock-count-keyboard.css +48 -41
- package/es/components/stock-count-keyboard/stock-count-keyboard.js +1 -1
- package/es/components/stock-keyboard/alphabet-keyboard.css +186 -0
- package/es/components/stock-keyboard/alphabet-keyboard.d.ts +11 -0
- package/es/components/stock-keyboard/alphabet-keyboard.js +98 -0
- package/es/components/stock-keyboard/index.d.ts +1 -0
- package/es/components/stock-keyboard/index.js +1 -0
- package/es/components/stock-keyboard/stock-keyboard.css +135 -76
- package/es/components/stock-keyboard/stock-keyboard.d.ts +2 -2
- package/es/components/stock-keyboard/stock-keyboard.js +42 -11
- package/es/components/switch/switch.css +2 -3
- package/es/components/tabs/tabs.css +5 -3
- package/es/components/tabs/tabs.js +5 -5
- package/es/components/tabs/tabs.patch.css +1 -0
- package/es/components/toast/index.d.ts +9 -0
- package/es/components/toast/index.js +8 -0
- package/es/components/toast/methods.d.ts +8 -0
- package/es/components/toast/methods.js +63 -0
- package/es/components/toast/toast.css +45 -0
- package/es/components/toast/toast.d.ts +18 -0
- package/es/components/toast/toast.js +75 -0
- package/es/components/toast/toast.patch.css +11 -0
- package/es/global/global.css +20 -5
- package/es/global/theme-dark.css +11 -3
- package/es/global/theme-default.css +9 -2
- package/es/index.d.ts +4 -4
- package/es/index.js +8 -4
- package/package.json +2 -11
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PopoverMenu = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _popover = require("./popover");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
14
|
+
__assign = Object.assign || function (t) {
|
|
15
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
16
|
+
s = arguments[i];
|
|
17
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
21
|
+
return __assign.apply(this, arguments);
|
|
22
|
+
};
|
|
23
|
+
var classPrefix = "ebscn-popover-menu";
|
|
24
|
+
var PopoverMenu = exports.PopoverMenu = (0, _react.forwardRef)(function (props, ref) {
|
|
25
|
+
var innerRef = (0, _react.useRef)(null);
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
27
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
28
|
+
return innerRef.current;
|
|
29
|
+
}, []);
|
|
30
|
+
var onClick = (0, _react.useCallback)(function (e) {
|
|
31
|
+
var _a;
|
|
32
|
+
var onAction = props.onAction;
|
|
33
|
+
if (onAction) {
|
|
34
|
+
onAction(e);
|
|
35
|
+
}
|
|
36
|
+
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.hide();
|
|
37
|
+
}, [props.onAction]);
|
|
38
|
+
var overlay = (0, _react.useMemo)(function () {
|
|
39
|
+
var _a;
|
|
40
|
+
var whetherScroll = (props === null || props === void 0 ? void 0 : props.maxCount) && props.actions.length > (props === null || props === void 0 ? void 0 : props.maxCount);
|
|
41
|
+
var innerHeight = (props === null || props === void 0 ? void 0 : props.maxCount) && (props === null || props === void 0 ? void 0 : props.maxCount) * 48;
|
|
42
|
+
return _react.default.createElement("div", {
|
|
43
|
+
className: "".concat(classPrefix, "-list")
|
|
44
|
+
}, _react.default.createElement("div", {
|
|
45
|
+
className: (0, _classnames.default)("".concat(classPrefix, "-list-inner"), (_a = {}, _a["".concat(classPrefix, "-list-scroll")] = whetherScroll, _a)),
|
|
46
|
+
style: {
|
|
47
|
+
height: innerHeight
|
|
48
|
+
}
|
|
49
|
+
}, props.actions.map(function (action, index) {
|
|
50
|
+
var _a;
|
|
51
|
+
var _b;
|
|
52
|
+
return _react.default.createElement("a", {
|
|
53
|
+
key: (_b = action.key) !== null && _b !== void 0 ? _b : index,
|
|
54
|
+
className: (0, _classnames.default)("".concat(classPrefix, "-item"), 'ebscn-plain-anchor', (_a = {}, _a["".concat(classPrefix, "-item-disabled")] = action.disabled, _a)),
|
|
55
|
+
onClick: function () {
|
|
56
|
+
var _a;
|
|
57
|
+
if (action.disabled) return;
|
|
58
|
+
onClick(action);
|
|
59
|
+
(_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action);
|
|
60
|
+
}
|
|
61
|
+
}, action.icon && _react.default.createElement("div", {
|
|
62
|
+
className: "".concat(classPrefix, "-item-icon")
|
|
63
|
+
}, action.icon), _react.default.createElement("div", {
|
|
64
|
+
className: "".concat(classPrefix, "-item-text")
|
|
65
|
+
}, action.text));
|
|
66
|
+
})));
|
|
67
|
+
}, [props.actions, onClick]);
|
|
68
|
+
return _react.default.createElement(_popover.Popover, __assign({
|
|
69
|
+
ref: innerRef
|
|
70
|
+
}, props, {
|
|
71
|
+
className: (0, _classnames.default)(classPrefix, props.className),
|
|
72
|
+
content: overlay
|
|
73
|
+
}), props.children);
|
|
74
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.ebscn-popover {
|
|
2
|
+
--z-index: var(--ebscn-popover-z-index, 1030);
|
|
3
|
+
--background: #ffffff;
|
|
4
|
+
--arrow-size: 8px;
|
|
5
|
+
--content-padding: 8px 12px;
|
|
6
|
+
color: var(--ebscn-color-text);
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
z-index: var(--z-index);
|
|
11
|
+
white-space: normal;
|
|
12
|
+
text-align: left;
|
|
13
|
+
cursor: auto;
|
|
14
|
+
-webkit-user-select: text;
|
|
15
|
+
user-select: text;
|
|
16
|
+
animation: none;
|
|
17
|
+
}
|
|
18
|
+
.ebscn-popover.ebscn-popover-dark {
|
|
19
|
+
--background: rgba(0, 0, 0, 0.75);
|
|
20
|
+
--ebscn-color-text: #ffffff;
|
|
21
|
+
color: #ffffff;
|
|
22
|
+
}
|
|
23
|
+
.ebscn-popover.ebscn-popover-dark .ebscn-popover-inner {
|
|
24
|
+
box-shadow: none;
|
|
25
|
+
}
|
|
26
|
+
.ebscn-popover::after {
|
|
27
|
+
position: absolute;
|
|
28
|
+
background: rgba(255, 255, 255, 0.01);
|
|
29
|
+
content: '';
|
|
30
|
+
}
|
|
31
|
+
.ebscn-popover-hidden {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
.ebscn-popover-inner {
|
|
35
|
+
background-color: var(--background);
|
|
36
|
+
background-clip: padding-box;
|
|
37
|
+
border-radius: 8px;
|
|
38
|
+
box-shadow: 0 0 30px 0 rgba(51, 51, 51, 0.2);
|
|
39
|
+
font-size: var(--ebscn-font-size-7);
|
|
40
|
+
width: -webkit-max-content;
|
|
41
|
+
width: max-content;
|
|
42
|
+
min-width: 32px;
|
|
43
|
+
max-width: calc(100vw - 24px);
|
|
44
|
+
overflow-y: hidden;
|
|
45
|
+
}
|
|
46
|
+
.ebscn-popover-inner-content {
|
|
47
|
+
padding: var(--content-padding);
|
|
48
|
+
}
|
|
49
|
+
.ebscn-popover-arrow {
|
|
50
|
+
position: absolute;
|
|
51
|
+
display: block;
|
|
52
|
+
height: var(--arrow-size);
|
|
53
|
+
width: var(--arrow-size);
|
|
54
|
+
overflow: visible;
|
|
55
|
+
background: transparent;
|
|
56
|
+
}
|
|
57
|
+
.ebscn-popover-arrow-icon {
|
|
58
|
+
display: block;
|
|
59
|
+
height: var(--arrow-size);
|
|
60
|
+
width: calc(var(--arrow-size) / 8 * 15);
|
|
61
|
+
position: absolute;
|
|
62
|
+
top: 50%;
|
|
63
|
+
left: 50%;
|
|
64
|
+
transform: translate(-50%, -50%) rotate(var(--arrow-icon-rotate));
|
|
65
|
+
}
|
|
66
|
+
.ebscn-popover .ebscn-popover-arrow {
|
|
67
|
+
color: var(--background);
|
|
68
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode, ReactElement } from 'react';
|
|
3
|
+
import { NativeProps } from '../../utils/native-props';
|
|
4
|
+
import { PropagationEvent } from '../../utils/with-stop-propagation';
|
|
5
|
+
import { GetContainer } from '../../utils/render-to-container';
|
|
6
|
+
import { DeprecatedPlacement, Placement } from './index';
|
|
7
|
+
export type PopoverProps = {
|
|
8
|
+
defaultVisible?: boolean;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
onVisibleChange?: (visible: boolean) => void;
|
|
11
|
+
getContainer?: GetContainer;
|
|
12
|
+
destroyOnHide?: boolean;
|
|
13
|
+
children: ReactElement;
|
|
14
|
+
mode?: 'light' | 'dark';
|
|
15
|
+
trigger?: 'click';
|
|
16
|
+
placement?: Placement | DeprecatedPlacement;
|
|
17
|
+
stopPropagation?: PropagationEvent[];
|
|
18
|
+
content: ReactNode;
|
|
19
|
+
} & NativeProps<'--z-index' | '--arrow-size'>;
|
|
20
|
+
export type PopoverRef = {
|
|
21
|
+
show: () => void;
|
|
22
|
+
hide: () => void;
|
|
23
|
+
visible: boolean;
|
|
24
|
+
};
|
|
25
|
+
export declare const Popover: React.ForwardRefExoticComponent<{
|
|
26
|
+
defaultVisible?: boolean | undefined;
|
|
27
|
+
visible?: boolean | undefined;
|
|
28
|
+
onVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
29
|
+
getContainer?: GetContainer | undefined;
|
|
30
|
+
destroyOnHide?: boolean | undefined;
|
|
31
|
+
children: ReactElement;
|
|
32
|
+
mode?: "dark" | "light" | undefined;
|
|
33
|
+
trigger?: "click" | undefined;
|
|
34
|
+
placement?: Placement | DeprecatedPlacement | undefined;
|
|
35
|
+
stopPropagation?: "click"[] | undefined;
|
|
36
|
+
content: ReactNode;
|
|
37
|
+
} & {
|
|
38
|
+
className?: string | undefined;
|
|
39
|
+
style?: (React.CSSProperties & Partial<Record<"--z-index" | "--arrow-size", string>>) | undefined;
|
|
40
|
+
tabIndex?: number | undefined;
|
|
41
|
+
} & React.AriaAttributes & React.RefAttributes<PopoverRef>>;
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Popover = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _usePropsValue = require("../../utils/use-props-value");
|
|
10
|
+
var _withDefaultProps = require("../../utils/with-default-props");
|
|
11
|
+
var _nativeProps = require("../../utils/native-props");
|
|
12
|
+
var _withStopPropagation = require("../../utils/with-stop-propagation");
|
|
13
|
+
var _arrow = require("./arrow");
|
|
14
|
+
var _renderToContainer = require("../../utils/render-to-container");
|
|
15
|
+
var _dom = require("@floating-ui/dom");
|
|
16
|
+
var _wrapper = require("./wrapper");
|
|
17
|
+
var _shouldRender = require("../../utils/should-render");
|
|
18
|
+
var _ahooks = require("ahooks");
|
|
19
|
+
var _normalizePlacement = require("./normalize-placement");
|
|
20
|
+
var _convertPx = require("../../utils/convert-px");
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
25
|
+
function adopt(value) {
|
|
26
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
27
|
+
resolve(value);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) {
|
|
32
|
+
try {
|
|
33
|
+
step(generator.next(value));
|
|
34
|
+
} catch (e) {
|
|
35
|
+
reject(e);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function rejected(value) {
|
|
39
|
+
try {
|
|
40
|
+
step(generator["throw"](value));
|
|
41
|
+
} catch (e) {
|
|
42
|
+
reject(e);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function step(result) {
|
|
46
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
47
|
+
}
|
|
48
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
52
|
+
var _ = {
|
|
53
|
+
label: 0,
|
|
54
|
+
sent: function () {
|
|
55
|
+
if (t[0] & 1) throw t[1];
|
|
56
|
+
return t[1];
|
|
57
|
+
},
|
|
58
|
+
trys: [],
|
|
59
|
+
ops: []
|
|
60
|
+
},
|
|
61
|
+
f,
|
|
62
|
+
y,
|
|
63
|
+
t,
|
|
64
|
+
g;
|
|
65
|
+
return g = {
|
|
66
|
+
next: verb(0),
|
|
67
|
+
"throw": verb(1),
|
|
68
|
+
"return": verb(2)
|
|
69
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
70
|
+
return this;
|
|
71
|
+
}), g;
|
|
72
|
+
function verb(n) {
|
|
73
|
+
return function (v) {
|
|
74
|
+
return step([n, v]);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function step(op) {
|
|
78
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
79
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
80
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
81
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
82
|
+
switch (op[0]) {
|
|
83
|
+
case 0:
|
|
84
|
+
case 1:
|
|
85
|
+
t = op;
|
|
86
|
+
break;
|
|
87
|
+
case 4:
|
|
88
|
+
_.label++;
|
|
89
|
+
return {
|
|
90
|
+
value: op[1],
|
|
91
|
+
done: false
|
|
92
|
+
};
|
|
93
|
+
case 5:
|
|
94
|
+
_.label++;
|
|
95
|
+
y = op[1];
|
|
96
|
+
op = [0];
|
|
97
|
+
continue;
|
|
98
|
+
case 7:
|
|
99
|
+
op = _.ops.pop();
|
|
100
|
+
_.trys.pop();
|
|
101
|
+
continue;
|
|
102
|
+
default:
|
|
103
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
104
|
+
_ = 0;
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
108
|
+
_.label = op[1];
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
112
|
+
_.label = t[1];
|
|
113
|
+
t = op;
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
if (t && _.label < t[2]) {
|
|
117
|
+
_.label = t[2];
|
|
118
|
+
_.ops.push(op);
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
if (t[2]) _.ops.pop();
|
|
122
|
+
_.trys.pop();
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
op = body.call(thisArg, _);
|
|
126
|
+
} catch (e) {
|
|
127
|
+
op = [6, e];
|
|
128
|
+
y = 0;
|
|
129
|
+
} finally {
|
|
130
|
+
f = t = 0;
|
|
131
|
+
}
|
|
132
|
+
if (op[0] & 5) throw op[1];
|
|
133
|
+
return {
|
|
134
|
+
value: op[0] ? op[1] : void 0,
|
|
135
|
+
done: true
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
var classPrefix = "ebscn-popover";
|
|
140
|
+
var defaultProps = {
|
|
141
|
+
placement: 'top',
|
|
142
|
+
defaultVisible: false,
|
|
143
|
+
stopPropagation: ['click'],
|
|
144
|
+
getContainer: function () {
|
|
145
|
+
return document.body;
|
|
146
|
+
},
|
|
147
|
+
mode: 'light'
|
|
148
|
+
};
|
|
149
|
+
var Popover = exports.Popover = (0, _react.forwardRef)(function (p, ref) {
|
|
150
|
+
var _a;
|
|
151
|
+
var props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
152
|
+
var placement = (0, _normalizePlacement.normalizePlacement)(props.placement);
|
|
153
|
+
var _b = (0, _usePropsValue.usePropsValue)({
|
|
154
|
+
value: props.visible,
|
|
155
|
+
defaultValue: props.defaultVisible,
|
|
156
|
+
onChange: props.onVisibleChange
|
|
157
|
+
}),
|
|
158
|
+
visible = _b[0],
|
|
159
|
+
setVisible = _b[1];
|
|
160
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
161
|
+
return {
|
|
162
|
+
show: function () {
|
|
163
|
+
return setVisible(true);
|
|
164
|
+
},
|
|
165
|
+
hide: function () {
|
|
166
|
+
return setVisible(false);
|
|
167
|
+
},
|
|
168
|
+
visible: visible
|
|
169
|
+
};
|
|
170
|
+
}, [visible]);
|
|
171
|
+
var targetRef = (0, _react.useRef)(null);
|
|
172
|
+
var floatingRef = (0, _react.useRef)(null);
|
|
173
|
+
var arrowRef = (0, _react.useRef)(null);
|
|
174
|
+
var floating = (0, _withStopPropagation.withStopPropagation)(props.stopPropagation, (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
175
|
+
className: (0, _classnames.default)(classPrefix, "".concat(classPrefix, "-").concat(props.mode), (_a = {}, _a["".concat(classPrefix, "-hidden")] = !visible, _a)),
|
|
176
|
+
ref: floatingRef
|
|
177
|
+
}, _react.default.createElement("div", {
|
|
178
|
+
className: "".concat(classPrefix, "-arrow"),
|
|
179
|
+
ref: arrowRef
|
|
180
|
+
}, _react.default.createElement(_arrow.Arrow, {
|
|
181
|
+
className: "".concat(classPrefix, "-arrow-icon")
|
|
182
|
+
})), _react.default.createElement("div", {
|
|
183
|
+
className: "".concat(classPrefix, "-inner")
|
|
184
|
+
}, _react.default.createElement("div", {
|
|
185
|
+
className: "".concat(classPrefix, "-inner-content")
|
|
186
|
+
}, props.content)))));
|
|
187
|
+
var _c = (0, _react.useState)(null),
|
|
188
|
+
targetElement = _c[0],
|
|
189
|
+
setTargetElement = _c[1];
|
|
190
|
+
function update() {
|
|
191
|
+
var _a, _b, _c;
|
|
192
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
193
|
+
var target, floating, arrowElement, _d, x, y, realPlacement, middlewareData, side, arrowSide, _e, arrowX, arrowY, arrowRotate;
|
|
194
|
+
var _f;
|
|
195
|
+
return __generator(this, function (_g) {
|
|
196
|
+
switch (_g.label) {
|
|
197
|
+
case 0:
|
|
198
|
+
target = (_b = (_a = targetRef.current) === null || _a === void 0 ? void 0 : _a.element) !== null && _b !== void 0 ? _b : null;
|
|
199
|
+
floating = floatingRef.current;
|
|
200
|
+
arrowElement = arrowRef.current;
|
|
201
|
+
setTargetElement(target);
|
|
202
|
+
if (!target || !floating || !arrowElement) return [2 /*return*/];
|
|
203
|
+
return [4 /*yield*/, (0, _dom.computePosition)(target, floating, {
|
|
204
|
+
placement: placement,
|
|
205
|
+
middleware: [(0, _dom.offset)((0, _convertPx.convertPx)(12)), (0, _dom.shift)({
|
|
206
|
+
padding: (0, _convertPx.convertPx)(4),
|
|
207
|
+
crossAxis: false,
|
|
208
|
+
limiter: (0, _dom.limitShift)()
|
|
209
|
+
}), (0, _dom.flip)(), (0, _dom.hide)(), (0, _dom.arrow)({
|
|
210
|
+
element: arrowElement,
|
|
211
|
+
padding: (0, _convertPx.convertPx)(12)
|
|
212
|
+
})]
|
|
213
|
+
})];
|
|
214
|
+
case 1:
|
|
215
|
+
_d = _g.sent(), x = _d.x, y = _d.y, realPlacement = _d.placement, middlewareData = _d.middlewareData;
|
|
216
|
+
Object.assign(floating.style, {
|
|
217
|
+
left: "".concat(x, "px"),
|
|
218
|
+
top: "".concat(y, "px")
|
|
219
|
+
});
|
|
220
|
+
side = realPlacement.split('-')[0];
|
|
221
|
+
arrowSide = {
|
|
222
|
+
top: 'bottom',
|
|
223
|
+
right: 'left',
|
|
224
|
+
bottom: 'top',
|
|
225
|
+
left: 'right'
|
|
226
|
+
}[side];
|
|
227
|
+
_e = (_c = middlewareData.arrow) !== null && _c !== void 0 ? _c : {}, arrowX = _e.x, arrowY = _e.y;
|
|
228
|
+
Object.assign(arrowElement.style, (_f = {
|
|
229
|
+
left: arrowX != null ? "".concat(arrowX, "px") : '',
|
|
230
|
+
top: arrowY != null ? "".concat(arrowY, "px") : '',
|
|
231
|
+
right: '',
|
|
232
|
+
bottom: ''
|
|
233
|
+
}, _f[arrowSide] = 'calc(var(--arrow-size) * -1)', _f));
|
|
234
|
+
arrowRotate = {
|
|
235
|
+
top: '0deg',
|
|
236
|
+
bottom: '180deg',
|
|
237
|
+
left: '270deg',
|
|
238
|
+
right: '90deg'
|
|
239
|
+
}[side];
|
|
240
|
+
arrowElement.style.setProperty('--arrow-icon-rotate', arrowRotate);
|
|
241
|
+
return [2 /*return*/];
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
(0, _ahooks.useIsomorphicLayoutEffect)(function () {
|
|
247
|
+
update();
|
|
248
|
+
});
|
|
249
|
+
(0, _react.useEffect)(function () {
|
|
250
|
+
if (!targetElement) return;
|
|
251
|
+
if (!props.trigger) return;
|
|
252
|
+
function handleClick() {
|
|
253
|
+
setVisible(function (v) {
|
|
254
|
+
return !v;
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
targetElement.addEventListener('click', handleClick);
|
|
258
|
+
return function () {
|
|
259
|
+
targetElement.removeEventListener('click', handleClick);
|
|
260
|
+
};
|
|
261
|
+
}, [targetElement, props.trigger]);
|
|
262
|
+
(0, _react.useEffect)(function () {
|
|
263
|
+
var floatingElement = floatingRef.current;
|
|
264
|
+
if (!targetElement || !floatingElement) return;
|
|
265
|
+
return (0, _dom.autoUpdate)(targetElement, floatingElement, update, {
|
|
266
|
+
elementResize: typeof ResizeObserver !== 'undefined'
|
|
267
|
+
});
|
|
268
|
+
}, [targetElement]);
|
|
269
|
+
(0, _ahooks.useClickAway)(function () {
|
|
270
|
+
if (!props.trigger) return;
|
|
271
|
+
setVisible(false);
|
|
272
|
+
}, [function () {
|
|
273
|
+
var _a;
|
|
274
|
+
return (_a = targetRef.current) === null || _a === void 0 ? void 0 : _a.element;
|
|
275
|
+
}, floatingRef], ['click', 'touchmove']);
|
|
276
|
+
var shouldRender = (0, _shouldRender.useShouldRender)(visible, false, props.destroyOnHide);
|
|
277
|
+
return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_wrapper.Wrapper, {
|
|
278
|
+
ref: targetRef
|
|
279
|
+
}, props.children), shouldRender && (0, _renderToContainer.renderToContainer)(props.getContainer, floating));
|
|
280
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export declare class Wrapper extends React.Component<{
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}, {}> {
|
|
6
|
+
element: Element | null;
|
|
7
|
+
componentDidMount(): void;
|
|
8
|
+
componentDidUpdate(): void;
|
|
9
|
+
render(): React.ReactNode;
|
|
10
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Wrapper = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactDom = require("react-dom");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
11
|
+
var extendStatics = function (d, b) {
|
|
12
|
+
extendStatics = Object.setPrototypeOf || {
|
|
13
|
+
__proto__: []
|
|
14
|
+
} instanceof Array && function (d, b) {
|
|
15
|
+
d.__proto__ = b;
|
|
16
|
+
} || function (d, b) {
|
|
17
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
18
|
+
};
|
|
19
|
+
return extendStatics(d, b);
|
|
20
|
+
};
|
|
21
|
+
return function (d, b) {
|
|
22
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
23
|
+
extendStatics(d, b);
|
|
24
|
+
function __() {
|
|
25
|
+
this.constructor = d;
|
|
26
|
+
}
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
}();
|
|
30
|
+
var Wrapper = exports.Wrapper = /** @class */function (_super) {
|
|
31
|
+
__extends(Wrapper, _super);
|
|
32
|
+
function Wrapper() {
|
|
33
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
+
_this.element = null;
|
|
35
|
+
return _this;
|
|
36
|
+
}
|
|
37
|
+
Wrapper.prototype.componentDidMount = function () {
|
|
38
|
+
this.componentDidUpdate();
|
|
39
|
+
};
|
|
40
|
+
Wrapper.prototype.componentDidUpdate = function () {
|
|
41
|
+
// eslint-disable-next-line
|
|
42
|
+
var node = (0, _reactDom.findDOMNode)(this);
|
|
43
|
+
if (node instanceof Element) {
|
|
44
|
+
this.element = node;
|
|
45
|
+
} else {
|
|
46
|
+
this.element = null;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
Wrapper.prototype.render = function () {
|
|
50
|
+
return _react.default.Children.only(this.props.children);
|
|
51
|
+
};
|
|
52
|
+
return Wrapper;
|
|
53
|
+
}(_react.default.Component);
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _ = require("../..");
|
|
8
|
-
var _antdMobile = require("antd-mobile");
|
|
9
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
9
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
11
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -90,7 +89,7 @@ var Protocol = function (p) {
|
|
|
90
89
|
style: {
|
|
91
90
|
maxHeight: props.scrollHeight
|
|
92
91
|
}
|
|
93
|
-
}, _react.default.createElement(
|
|
92
|
+
}, _react.default.createElement(_.Popover, {
|
|
94
93
|
content: props.popoverContent,
|
|
95
94
|
placement: props.popoverPlacement,
|
|
96
95
|
mode: "dark",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
align-items: center;
|
|
15
15
|
}
|
|
16
16
|
.ebscn-pull-to-refresh-head.ebscn-pull-to-refresh-head-grey {
|
|
17
|
-
--background-color: #
|
|
17
|
+
--background-color: #f5f6fa;
|
|
18
18
|
}
|
|
19
19
|
.ebscn-pull-to-refresh-head.ebscn-pull-to-refresh-head-grey .ebscn-pull-to-refresh-complete,
|
|
20
20
|
.ebscn-pull-to-refresh-head.ebscn-pull-to-refresh-head-grey .ebscn-pull-to-refresh-canRelease,
|
|
@@ -22,6 +22,15 @@
|
|
|
22
22
|
.ebscn-pull-to-refresh-head.ebscn-pull-to-refresh-head-grey .ebscn-pull-to-refresh-refreshing {
|
|
23
23
|
color: #666;
|
|
24
24
|
}
|
|
25
|
+
.ebscn-pull-to-refresh-head.ebscn-pull-to-refresh-head-dark {
|
|
26
|
+
--background-color: #111111;
|
|
27
|
+
}
|
|
28
|
+
.ebscn-pull-to-refresh-head.ebscn-pull-to-refresh-head-dark .ebscn-pull-to-refresh-complete,
|
|
29
|
+
.ebscn-pull-to-refresh-head.ebscn-pull-to-refresh-head-dark .ebscn-pull-to-refresh-canRelease,
|
|
30
|
+
.ebscn-pull-to-refresh-head.ebscn-pull-to-refresh-head-dark .ebscn-pull-to-refresh-pulling,
|
|
31
|
+
.ebscn-pull-to-refresh-head.ebscn-pull-to-refresh-head-dark .ebscn-pull-to-refresh-refreshing {
|
|
32
|
+
color: white;
|
|
33
|
+
}
|
|
25
34
|
.ebscn-pull-to-refresh-head.ebscn-pull-to-refresh-head-primary {
|
|
26
35
|
--background-color: var(--ebscn-color-primary);
|
|
27
36
|
}
|
|
@@ -2,7 +2,7 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
export type PullStatus = 'pulling' | 'canRelease' | 'refreshing' | 'complete';
|
|
4
4
|
export type PullToRefreshProps = {
|
|
5
|
-
color?: 'primary' | 'grey';
|
|
5
|
+
color?: 'primary' | 'grey' | 'dark';
|
|
6
6
|
onRefresh?: () => Promise<any>;
|
|
7
7
|
pullingText?: ReactNode;
|
|
8
8
|
canReleaseText?: ReactNode;
|
|
@@ -150,28 +150,28 @@ var PullToRefresh = function (p) {
|
|
|
150
150
|
var props = (0, _withDefaultProps.mergeProps)(defaultProps, {
|
|
151
151
|
refreshingText: _react2.default.createElement("div", {
|
|
152
152
|
className: "".concat(classPrefix, "-refreshing")
|
|
153
|
-
}, _react2.default.createElement(_react2.Suspense, null, _react2.default.createElement("div", null, (p === null || p === void 0 ? void 0 : p.color)
|
|
153
|
+
}, _react2.default.createElement(_react2.Suspense, null, _react2.default.createElement("div", null, (p === null || p === void 0 ? void 0 : p.color) !== 'grey' ? _react2.default.createElement("img", {
|
|
154
154
|
src: _pull_loading_refreshing_white.default
|
|
155
155
|
}) : _react2.default.createElement("img", {
|
|
156
156
|
src: _pull_loading_refreshing_grey.default
|
|
157
157
|
})), _react2.default.createElement("p", null, " "))),
|
|
158
158
|
pullingText: _react2.default.createElement("div", {
|
|
159
159
|
className: "".concat(classPrefix, "-pulling")
|
|
160
|
-
}, _react2.default.createElement("div", null, (p === null || p === void 0 ? void 0 : p.color)
|
|
160
|
+
}, _react2.default.createElement("div", null, (p === null || p === void 0 ? void 0 : p.color) !== 'grey' ? _react2.default.createElement("img", {
|
|
161
161
|
src: _pull_loading_white.default
|
|
162
162
|
}) : _react2.default.createElement("img", {
|
|
163
163
|
src: _pull_loading_grey.default
|
|
164
164
|
})), _react2.default.createElement("p", null, " ")),
|
|
165
165
|
canReleaseText: _react2.default.createElement("div", {
|
|
166
166
|
className: "".concat(classPrefix, "-canRelease")
|
|
167
|
-
}, _react2.default.createElement("div", null, (p === null || p === void 0 ? void 0 : p.color)
|
|
167
|
+
}, _react2.default.createElement("div", null, (p === null || p === void 0 ? void 0 : p.color) !== 'grey' ? _react2.default.createElement("img", {
|
|
168
168
|
src: _pull_loading_white.default
|
|
169
169
|
}) : _react2.default.createElement("img", {
|
|
170
170
|
src: _pull_loading_grey.default
|
|
171
171
|
})), _react2.default.createElement("p", null, "\u677E\u5F00\u5237\u65B0")),
|
|
172
172
|
completeText: _react2.default.createElement("div", {
|
|
173
173
|
className: "".concat(classPrefix, "-complete")
|
|
174
|
-
}, _react2.default.createElement("div", null, (p === null || p === void 0 ? void 0 : p.color)
|
|
174
|
+
}, _react2.default.createElement("div", null, (p === null || p === void 0 ? void 0 : p.color) !== 'grey' ? _react2.default.createElement("img", {
|
|
175
175
|
src: _pull_loading_white.default
|
|
176
176
|
}) : _react2.default.createElement("img", {
|
|
177
177
|
src: _pull_loading_grey.default
|
|
@@ -332,7 +332,7 @@ var PullToRefresh = function (p) {
|
|
|
332
332
|
className: classPrefix
|
|
333
333
|
}, _react2.default.createElement(_web.animated.div, {
|
|
334
334
|
style: springStyles,
|
|
335
|
-
className: (0, _classnames.default)("".concat(classPrefix, "-head"), (_a = {}, _a["".concat(classPrefix, "-head-primary")] = props.color === 'primary', _a["".concat(classPrefix, "-head-grey")] = props.color === 'grey', _a))
|
|
335
|
+
className: (0, _classnames.default)("".concat(classPrefix, "-head"), (_a = {}, _a["".concat(classPrefix, "-head-primary")] = props.color === 'primary', _a["".concat(classPrefix, "-head-grey")] = props.color === 'grey', _a["".concat(classPrefix, "-head-dark")] = props.color === 'dark', _a))
|
|
336
336
|
}, _react2.default.createElement("div", {
|
|
337
337
|
className: "".concat(classPrefix, "-head-content"),
|
|
338
338
|
style: {
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
border-radius: var(--icon-size);
|
|
22
22
|
border: 1px solid var(--ebscn-color-light);
|
|
23
23
|
box-sizing: border-box;
|
|
24
|
+
width: 24px;
|
|
24
25
|
width: var(--icon-size);
|
|
26
|
+
height: 24px;
|
|
25
27
|
height: var(--icon-size);
|
|
26
28
|
color: var(--ebscn-color-text-light-solid);
|
|
27
29
|
}
|
|
@@ -37,6 +39,9 @@
|
|
|
37
39
|
.ebscn-radio.ebscn-radio-block {
|
|
38
40
|
display: flex;
|
|
39
41
|
}
|
|
42
|
+
.ebscn-radio.ebscn-radio-checked {
|
|
43
|
+
color: var(--ebscn-color-primary);
|
|
44
|
+
}
|
|
40
45
|
.ebscn-radio.ebscn-radio-checked .ebscn-radio-icon {
|
|
41
46
|
border-color: var(--ebscn-color-primary);
|
|
42
47
|
background-color: var(--ebscn-color-primary);
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
---gap-horizontal: var(--gap-horizontal, var(--gap));
|
|
13
13
|
---gap-vertical: var(--gap-vertical, var(--gap));
|
|
14
14
|
overflow: hidden;
|
|
15
|
-
font-size: var(--ebscn-font-size-
|
|
15
|
+
font-size: var(--ebscn-font-size-6);
|
|
16
16
|
line-height: 1.4;
|
|
17
17
|
}
|
|
18
18
|
.ebscn-selector .ebscn-space.ebscn-space {
|