@ebscn/ui 1.0.3-beta.3 → 1.0.3-beta.30
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 -2
- 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 +101 -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/picker.css +3 -0
- package/cjs/components/picker-view/picker-view.css +11 -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/popup/popup.css +4 -16
- 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 +42 -10
- package/cjs/components/switch/switch.css +2 -3
- package/cjs/components/tabs/tabs.css +6 -4
- 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 -0
- package/cjs/index.js +33 -1
- 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 -2
- 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 +101 -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/picker.css +3 -0
- package/es/components/picker-view/picker-view.css +11 -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/popup/popup.css +4 -16
- 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 +44 -13
- package/es/components/switch/switch.css +2 -3
- package/es/components/tabs/tabs.css +6 -4
- 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 -0
- package/es/index.js +8 -4
- package/package.json +6 -12
|
@@ -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.ebscn-radio-icon-right {
|
|
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 {
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
--width: 100%;
|
|
3
3
|
--height: 0;
|
|
4
4
|
--border-radius: 3px;
|
|
5
|
-
background-color:
|
|
5
|
+
background-color: #f8f9fc;
|
|
6
6
|
border-radius: var(--border-radius);
|
|
7
7
|
width: var(--width);
|
|
8
8
|
height: var(--height);
|
|
9
9
|
display: block;
|
|
10
10
|
}
|
|
11
11
|
.ebscn-skeleton.ebscn-skeleton-animated {
|
|
12
|
-
background: linear-gradient(90deg, rgba(
|
|
12
|
+
background: linear-gradient(90deg, rgba(248, 249, 245) 25%, rgba(248, 249, 245, 0.3) 37%, rgba(248, 249, 245) 63%);
|
|
13
13
|
background-size: 400% 100%;
|
|
14
14
|
animation: ebscn-skeleton-loading 1.3s ease infinite;
|
|
15
15
|
}
|
|
16
16
|
.ebscn-skeleton.ebscn-skeleton-primary {
|
|
17
|
-
background-color: rgba(
|
|
17
|
+
background-color: rgba(255, 66, 37, 0.2);
|
|
18
18
|
}
|
|
19
19
|
.ebscn-skeleton.ebscn-skeleton-primary.ebscn-skeleton.ebscn-skeleton-primary-animated {
|
|
20
|
-
background: linear-gradient(90deg, rgba(
|
|
20
|
+
background: linear-gradient(90deg, rgba(255, 216, 214) 25%, rgba(255, 216, 214, 0.3) 37%, rgba(255, 216, 214) 63%);
|
|
21
21
|
background-size: 400% 100%;
|
|
22
22
|
animation: ebscn-skeleton-loading 1.3s ease infinite;
|
|
23
23
|
}
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
.ebscn-squared-grid-item {
|
|
13
13
|
flex: 0 0 var(--flex-basic);
|
|
14
14
|
display: flex;
|
|
15
|
-
justify-content: center;
|
|
16
15
|
align-items: center;
|
|
17
16
|
flex-direction: var(--item-flex-direction);
|
|
18
17
|
}
|
|
@@ -20,7 +19,7 @@
|
|
|
20
19
|
width: var(--icon-size);
|
|
21
20
|
height: var(--icon-size);
|
|
22
21
|
font-size: var(--icon-size);
|
|
23
|
-
|
|
22
|
+
padding: 6px;
|
|
24
23
|
}
|
|
25
24
|
.ebscn-squared-grid-item-label {
|
|
26
25
|
font-size: var(--ebscn-font-size-5);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { FC, ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, FC, ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { NativeProps } from '../../utils/native-props';
|
|
4
4
|
import { PageIndicatorProps } from '../page-indicator';
|
|
5
5
|
export type SquaredGridProps = {
|
|
6
6
|
maxColumns?: number;
|
|
7
7
|
maxRow?: number;
|
|
8
|
+
justifyContent?: CSSProperties['justifyContent'];
|
|
8
9
|
children?: ReactNode;
|
|
9
10
|
indicatorProps?: Pick<PageIndicatorProps, 'color' | 'style' | 'className'>;
|
|
10
11
|
} & NativeProps<'--row-gap' | '--icon-size'>;
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SquaredGridItem = exports.SquaredGrid = void 0;
|
|
7
|
-
var _ = require("../..");
|
|
8
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _ = require("../..");
|
|
10
10
|
var _nativeProps = require("../../utils/native-props");
|
|
11
11
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -38,8 +38,17 @@ var SquaredGrid = function (p) {
|
|
|
38
38
|
var children = _react.default.Children.toArray(props === null || props === void 0 ? void 0 : props.children);
|
|
39
39
|
var pageSize = maxColumns * maxRow;
|
|
40
40
|
var overPage = pageSize < children.length;
|
|
41
|
+
var justifyContent = props.justifyContent;
|
|
42
|
+
if (!justifyContent) {
|
|
43
|
+
if (children.length > maxColumns) {
|
|
44
|
+
justifyContent = 'flex-start';
|
|
45
|
+
} else {
|
|
46
|
+
justifyContent = 'space-around';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
41
49
|
var style = {
|
|
42
|
-
'--flex': "".concat(100 / maxColumns, "%")
|
|
50
|
+
'--flex': "".concat(100 / maxColumns, "%"),
|
|
51
|
+
justifyContent: justifyContent
|
|
43
52
|
};
|
|
44
53
|
var renderSwiperItems = function () {
|
|
45
54
|
var pages = chunkArray(children, pageSize);
|
|
@@ -1,74 +1,81 @@
|
|
|
1
|
+
html[data-prefers-color-scheme='dark'] .ebscn-stock-count-keyboard-delete {
|
|
2
|
+
background: url(../../assets/images/delete_dark.png) var(--ebscn-color-keyboard-fckey-bg) no-repeat center;
|
|
3
|
+
background-size: 24px 24px;
|
|
4
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg);
|
|
5
|
+
}
|
|
6
|
+
html[data-prefers-color-scheme='dark'] .ebscn-stock-count-keyboard-delete:active {
|
|
7
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg-active);
|
|
8
|
+
}
|
|
1
9
|
.ebscn-stock-count-keyboard {
|
|
2
10
|
display: none;
|
|
11
|
+
box-sizing: border-box;
|
|
3
12
|
position: fixed;
|
|
13
|
+
z-index: 999;
|
|
4
14
|
bottom: 0;
|
|
5
15
|
transform: translateY(101%);
|
|
6
16
|
display: flex;
|
|
7
17
|
flex-wrap: wrap;
|
|
8
18
|
width: 100%;
|
|
9
|
-
height:
|
|
19
|
+
height: 223px;
|
|
20
|
+
background-color: var(--ebscn-color-keyboard-bg);
|
|
21
|
+
padding: 3px;
|
|
10
22
|
transition: all 0.5s;
|
|
11
23
|
align-content: flex-start;
|
|
12
24
|
}
|
|
13
|
-
.ebscn-stock-count-keyboard
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
.ebscn-stock-count-keyboard-key,
|
|
26
|
+
.ebscn-stock-count-keyboard-confirmKey {
|
|
27
|
+
border-radius: 4.17px;
|
|
28
|
+
width: calc(20% - 8px);
|
|
29
|
+
margin: 3px;
|
|
30
|
+
height: 46px;
|
|
31
|
+
text-align: center;
|
|
32
|
+
line-height: 48px;
|
|
33
|
+
font-weight: 400;
|
|
34
|
+
border: 0.5px solid #888;
|
|
35
|
+
border-color: var(--ebscn-color-keyboard-key-border);
|
|
16
36
|
}
|
|
17
37
|
.ebscn-stock-count-keyboard-key {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
line-height: 54px;
|
|
22
|
-
font-size: 24px;
|
|
23
|
-
color: var(--ebscn-color-text-dark-solid);
|
|
24
|
-
font-weight: 300;
|
|
25
|
-
box-shadow: 0 0 0 1px #cccccc;
|
|
26
|
-
background: var(--ebscn-color-background);
|
|
38
|
+
font-size: 23px;
|
|
39
|
+
color: var(--ebscn-color-text);
|
|
40
|
+
background: var(--ebscn-color-keyboard-key-bg);
|
|
27
41
|
}
|
|
28
42
|
.ebscn-stock-count-keyboard-key:active {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
text-align: center;
|
|
32
|
-
font-size: 24px;
|
|
33
|
-
color: var(--ebscn-color-text-dark-solid);
|
|
34
|
-
font-weight: 300;
|
|
35
|
-
box-shadow: 0 0 0 1px #cccccc;
|
|
36
|
-
background: var(--ebscn-color-border);
|
|
43
|
+
background-color: #e5e5e5;
|
|
44
|
+
background-color: var(--ebscn-color-keyboard-key-bg-active);
|
|
37
45
|
}
|
|
38
46
|
.ebscn-stock-count-keyboard-option {
|
|
39
|
-
font-size:
|
|
40
|
-
|
|
47
|
+
font-size: 18px;
|
|
48
|
+
font-size: var(--ebscn-font-size-10);
|
|
49
|
+
color: var(--ebscn-color-text);
|
|
50
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg);
|
|
51
|
+
border: 0.5px solid #888;
|
|
52
|
+
border-color: var(--ebscn-color-keyboard-fckey-border);
|
|
41
53
|
}
|
|
42
54
|
.ebscn-stock-count-keyboard-option:active {
|
|
43
|
-
|
|
44
|
-
background:
|
|
55
|
+
background-color: #252525;
|
|
56
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg-active);
|
|
45
57
|
}
|
|
46
58
|
.ebscn-stock-count-keyboard-delete {
|
|
47
|
-
background: url(../../assets/images/delete.png)
|
|
48
|
-
background-size:
|
|
59
|
+
background: url(../../assets/images/delete.png) var(--ebscn-color-keyboard-fckey-bg) no-repeat center;
|
|
60
|
+
background-size: 25px 25px;
|
|
49
61
|
}
|
|
50
62
|
.ebscn-stock-count-keyboard-delete:active {
|
|
51
|
-
background: url(../../assets/images/delete.png)
|
|
52
|
-
background-size:
|
|
63
|
+
background: url(../../assets/images/delete.png) var(--ebscn-color-keyboard-key-bg-active) no-repeat center;
|
|
64
|
+
background-size: 25px 25px;
|
|
65
|
+
background-color: #252525;
|
|
66
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg-active);
|
|
53
67
|
}
|
|
54
68
|
.ebscn-stock-count-keyboard-confirmKey {
|
|
55
69
|
background-color: var(--ebscn-color-primary);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
line-height: 54px;
|
|
59
|
-
text-align: center;
|
|
60
|
-
font-size: var(--ebscn-font-size-11);
|
|
61
|
-
color: var(--ebscn-color-text-dark-solid);
|
|
62
|
-
font-weight: 300;
|
|
63
|
-
box-shadow: 0 0 0 1px #cccccc;
|
|
70
|
+
font-size: var(--ebscn-font-size-10);
|
|
71
|
+
color: var(--ebscn-color-white);
|
|
64
72
|
}
|
|
65
73
|
.ebscn-stock-count-keyboard-confirmKey:active {
|
|
66
|
-
background-color: #
|
|
67
|
-
color: var(--ebscn-color-background);
|
|
74
|
+
background-color: #d13c21;
|
|
68
75
|
}
|
|
69
76
|
@supports (bottom: env(safe-area-inset-bottom)) or (constant(safe-area-inset-bottom)) {
|
|
70
77
|
.ebscn-stock-count-keyboard {
|
|
71
|
-
height: calc(
|
|
72
|
-
height: calc(
|
|
78
|
+
height: calc(223px + env(safe-area-inset-bottom));
|
|
79
|
+
height: calc(223px + constant(safe-area-inset-bottom));
|
|
73
80
|
}
|
|
74
81
|
}
|
|
@@ -71,7 +71,7 @@ function StockCountKeyboard(p) {
|
|
|
71
71
|
}, keys.map(function (item, index) {
|
|
72
72
|
return _react.default.createElement("div", {
|
|
73
73
|
key: item || index,
|
|
74
|
-
className: (0, _classnames.default)(item !== '确定' ? "".concat(classPrefix, "-key") : "".concat(classPrefix, "-confirmKey"), typeof item !== 'number' && item.length && item !== '.' && item !== '确定' ? "".concat(classPrefix, "-option") : item == '确定' ? "".concat(classPrefix, "-confirmKey") : "".concat(classPrefix, "-number-key"), item === 'X' && "".concat(classPrefix, "-delete")),
|
|
74
|
+
className: (0, _classnames.default)(item !== '确定' ? "".concat(classPrefix, "-key") : "".concat(classPrefix, "-confirmKey"), typeof item !== 'number' && item !== '00' && item.length && item !== '.' && item !== '确定' ? "".concat(classPrefix, "-option") : item == '确定' ? "".concat(classPrefix, "-confirmKey") : "".concat(classPrefix, "-number-key"), item === 'X' && "".concat(classPrefix, "-delete")),
|
|
75
75
|
onClick: function () {
|
|
76
76
|
if (visible) {
|
|
77
77
|
onKeyPress(item);
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
html[data-prefers-color-scheme='dark'] .ebscn-alphabet-keyboard-extra-keybord {
|
|
2
|
+
background: url(../../assets/images/keybord_keybord_dark.png) no-repeat center;
|
|
3
|
+
background-size: 25px 25px;
|
|
4
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg);
|
|
5
|
+
}
|
|
6
|
+
html[data-prefers-color-scheme='dark'] .ebscn-alphabet-keyboard-extra-keybord:active {
|
|
7
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg-active);
|
|
8
|
+
}
|
|
9
|
+
html[data-prefers-color-scheme='dark'] .ebscn-alphabet-keyboard-extra-delete {
|
|
10
|
+
background: url(../../assets/images/delete_dark.png) no-repeat center;
|
|
11
|
+
background-size: 25px 25px;
|
|
12
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg);
|
|
13
|
+
}
|
|
14
|
+
html[data-prefers-color-scheme='dark'] .ebscn-alphabet-keyboard-extra-delete:active {
|
|
15
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg-active);
|
|
16
|
+
}
|
|
17
|
+
html[data-prefers-color-scheme='dark'] .ebscn-alphabet-keyboard-extra-shift {
|
|
18
|
+
background: url(../../assets/images/keybord_shift_dark.png) no-repeat center;
|
|
19
|
+
background-size: 25px 25px;
|
|
20
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg);
|
|
21
|
+
}
|
|
22
|
+
html[data-prefers-color-scheme='dark'] .ebscn-alphabet-keyboard-extra-shift:active {
|
|
23
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg-active);
|
|
24
|
+
}
|
|
25
|
+
html[data-prefers-color-scheme='dark'] .ebscn-alphabet-keyboard-extra-shift-big {
|
|
26
|
+
background: url(../../assets/images/keybord_shift2_dark.png) no-repeat center;
|
|
27
|
+
background-color: #adb3bd;
|
|
28
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg);
|
|
29
|
+
background-size: 25px 25px;
|
|
30
|
+
}
|
|
31
|
+
.ebscn-alphabet-keyboard-extra {
|
|
32
|
+
position: relative;
|
|
33
|
+
transform: translateY(0);
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-wrap: wrap;
|
|
36
|
+
width: 100%;
|
|
37
|
+
align-content: flex-start;
|
|
38
|
+
background-color: #fff;
|
|
39
|
+
background-color: var(--ebscn-color-keyboard-bg);
|
|
40
|
+
}
|
|
41
|
+
.ebscn-alphabet-keyboard-extra-shift {
|
|
42
|
+
margin-right: 3.73%;
|
|
43
|
+
background: url(../../assets/images/keybord_shift.png) no-repeat center;
|
|
44
|
+
background-color: #adb3bd;
|
|
45
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg);
|
|
46
|
+
background-size: 17px 17px;
|
|
47
|
+
border: 0.5px solid #888;
|
|
48
|
+
border-color: var(--ebscn-color-keyboard-key-border);
|
|
49
|
+
}
|
|
50
|
+
.ebscn-alphabet-keyboard-extra-shift-big {
|
|
51
|
+
background: url(../../assets/images/keybord_shift2.png) no-repeat center;
|
|
52
|
+
background-color: #adb3bd;
|
|
53
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg);
|
|
54
|
+
background-size: 25px 25px;
|
|
55
|
+
}
|
|
56
|
+
.ebscn-alphabet-keyboard-extra-delete {
|
|
57
|
+
margin-left: 2.26%;
|
|
58
|
+
background: url(../../assets/images/delete.png) no-repeat center;
|
|
59
|
+
background-color: #adb3bd;
|
|
60
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg);
|
|
61
|
+
background-size: 25px 25px;
|
|
62
|
+
border: 0.5px solid #888;
|
|
63
|
+
border-color: var(--ebscn-color-keyboard-key-border);
|
|
64
|
+
}
|
|
65
|
+
.ebscn-alphabet-keyboard-extra-keybord {
|
|
66
|
+
background: url(../../assets/images/keybord_keybord.png) no-repeat center;
|
|
67
|
+
background-color: #adb3bd;
|
|
68
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg);
|
|
69
|
+
background-size: 25px 18px;
|
|
70
|
+
border: 0.5px solid #888;
|
|
71
|
+
border-color: var(--ebscn-color-keyboard-key-border);
|
|
72
|
+
}
|
|
73
|
+
.ebscn-alphabet-keyboard-extra-space {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
width: 48.4%;
|
|
78
|
+
height: 42px;
|
|
79
|
+
border-radius: 5px;
|
|
80
|
+
font-size: 16px;
|
|
81
|
+
background-color: #fff;
|
|
82
|
+
background: var(--ebscn-color-keyboard-key-bg);
|
|
83
|
+
border: 0.5px solid #888;
|
|
84
|
+
border-color: var(--ebscn-color-keyboard-key-border);
|
|
85
|
+
}
|
|
86
|
+
.ebscn-alphabet-keyboard-extra-space:active {
|
|
87
|
+
background-color: #e5e5e5;
|
|
88
|
+
background-color: var(--ebscn-color-keyboard-key-bg-active);
|
|
89
|
+
}
|
|
90
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-firstline,
|
|
91
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-secondline,
|
|
92
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-thirdline,
|
|
93
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-firthline {
|
|
94
|
+
display: flex;
|
|
95
|
+
justify-content: space-between;
|
|
96
|
+
width: 100%;
|
|
97
|
+
padding-top: calc(3% - 1px);
|
|
98
|
+
}
|
|
99
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-firstline-key,
|
|
100
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-secondline-key,
|
|
101
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-thirdline-key,
|
|
102
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-firthline-key {
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
flex: 1;
|
|
107
|
+
width: 8.4%;
|
|
108
|
+
height: 40px;
|
|
109
|
+
background-color: #fff;
|
|
110
|
+
background: var(--ebscn-color-keyboard-key-bg);
|
|
111
|
+
border-radius: 5px;
|
|
112
|
+
font-size: 23px;
|
|
113
|
+
font-weight: 400;
|
|
114
|
+
text-align: center;
|
|
115
|
+
color: #333;
|
|
116
|
+
color: var(--ebscn-color-text);
|
|
117
|
+
margin: 0 3px;
|
|
118
|
+
border: 0.5px solid #888;
|
|
119
|
+
border-color: var(--ebscn-color-keyboard-key-border);
|
|
120
|
+
}
|
|
121
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-firstline-key:active,
|
|
122
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-secondline-key:active,
|
|
123
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-thirdline-key:active,
|
|
124
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-firthline-key:active {
|
|
125
|
+
background-color: #e5e5e5;
|
|
126
|
+
background-color: var(--ebscn-color-keyboard-key-bg-active);
|
|
127
|
+
}
|
|
128
|
+
.ebscn-alphabet-keyboard-extra-darkkey {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
justify-content: center;
|
|
132
|
+
width: 11.2%;
|
|
133
|
+
height: 42px;
|
|
134
|
+
border-radius: 5px;
|
|
135
|
+
background-color: #adb3bd;
|
|
136
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg);
|
|
137
|
+
font-size: var(--ebscn-font-size-9);
|
|
138
|
+
border: 0.5px solid #888;
|
|
139
|
+
border-color: var(--ebscn-color-keyboard-fckey-border);
|
|
140
|
+
}
|
|
141
|
+
.ebscn-alphabet-keyboard-extra-darkkey:active {
|
|
142
|
+
background-color: #252525;
|
|
143
|
+
background-color: var(--ebscn-color-keyboard-fckey-bg-active);
|
|
144
|
+
}
|
|
145
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-secondline {
|
|
146
|
+
padding-left: 5.73%;
|
|
147
|
+
padding-right: 5.73%;
|
|
148
|
+
}
|
|
149
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-thirdline {
|
|
150
|
+
padding-left: 3px;
|
|
151
|
+
padding-right: 3px;
|
|
152
|
+
}
|
|
153
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-firthline {
|
|
154
|
+
padding-left: 3px;
|
|
155
|
+
padding-right: 3px;
|
|
156
|
+
padding-bottom: 6px;
|
|
157
|
+
}
|
|
158
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-firthline-confirm {
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
justify-content: center;
|
|
162
|
+
width: 23.46%;
|
|
163
|
+
height: 42px;
|
|
164
|
+
background-color: #e84225;
|
|
165
|
+
background: var(--ebscn-color-primary);
|
|
166
|
+
border-radius: 5px;
|
|
167
|
+
font-size: 16px;
|
|
168
|
+
font-weight: 400;
|
|
169
|
+
text-align: center;
|
|
170
|
+
color: #fff;
|
|
171
|
+
line-height: 22.5px;
|
|
172
|
+
border: 0.5px solid #888;
|
|
173
|
+
border-color: var(--ebscn-color-keyboard-key-border);
|
|
174
|
+
}
|
|
175
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-firthline-confirm:active {
|
|
176
|
+
background-color: #d13c21;
|
|
177
|
+
}
|
|
178
|
+
.ebscn-alphabet-keyboard-extra .ebscn-alphabet-keyboard-extra-firthline img {
|
|
179
|
+
height: 20%;
|
|
180
|
+
}
|
|
181
|
+
@supports (bottom: env(safe-area-inset-bottom)) or (constant(safe-area-inset-bottom)) {
|
|
182
|
+
.ebscn-alphabet-keyboard-extra {
|
|
183
|
+
height: calc(223px + env(safe-area-inset-bottom));
|
|
184
|
+
height: calc(223px + constant(safe-area-inset-bottom));
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { NativeProps } from '../../utils/native-props';
|
|
3
|
+
export type AlphabetKeyboardProps = {
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
onInput: Function;
|
|
6
|
+
onDelete: Function;
|
|
7
|
+
onClose: Function;
|
|
8
|
+
onChangeKeyBoard?: Function;
|
|
9
|
+
onConfirm: Function;
|
|
10
|
+
} & NativeProps;
|
|
11
|
+
export declare function AlphabetKeyboard(p: AlphabetKeyboardProps): JSX.Element;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AlphabetKeyboard = AlphabetKeyboard;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _nativeProps = require("../../utils/native-props");
|
|
9
|
+
var _withDefaultProps = require("../../utils/with-default-props");
|
|
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); }
|
|
11
|
+
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; }
|
|
12
|
+
var classPrefix = 'ebscn-alphabet-keyboard-extra';
|
|
13
|
+
var defaultProps = {
|
|
14
|
+
visible: false
|
|
15
|
+
};
|
|
16
|
+
function AlphabetKeyboard(p) {
|
|
17
|
+
var keyboardRef = (0, _react.useRef)(null);
|
|
18
|
+
var props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
19
|
+
var visible = props.visible,
|
|
20
|
+
onInput = props.onInput,
|
|
21
|
+
onDelete = props.onDelete,
|
|
22
|
+
onClose = props.onClose,
|
|
23
|
+
onChangeKeyBoard = props.onChangeKeyBoard,
|
|
24
|
+
onConfirm = props.onConfirm;
|
|
25
|
+
var firstKeys = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'];
|
|
26
|
+
var firstKeysBig = ['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'];
|
|
27
|
+
var secondKeys = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'];
|
|
28
|
+
var secondKeysBig = ['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'];
|
|
29
|
+
var thirdKeys = ['↑', 'z', 'x', 'c', 'v', 'b', 'n', 'm', '×'];
|
|
30
|
+
var thirdKeysBig = ['↑', 'Z', 'X', 'C', 'V', 'B', 'N', 'M', '×'];
|
|
31
|
+
var firthKeys = ['123', '⌨', '空格', '确定'];
|
|
32
|
+
var _a = (0, _react.useState)(false),
|
|
33
|
+
isBig = _a[0],
|
|
34
|
+
setIsBIG = _a[1];
|
|
35
|
+
var imgKeys = ['×', '↑', '⌨'];
|
|
36
|
+
function onKeyPress(key) {
|
|
37
|
+
switch (key) {
|
|
38
|
+
case '×':
|
|
39
|
+
return onDelete === null || onDelete === void 0 ? void 0 : onDelete();
|
|
40
|
+
case '123':
|
|
41
|
+
return onChangeKeyBoard === null || onChangeKeyBoard === void 0 ? void 0 : onChangeKeyBoard();
|
|
42
|
+
case '⌨':
|
|
43
|
+
return onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
44
|
+
case '确定':
|
|
45
|
+
return onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
|
|
46
|
+
case '空格':
|
|
47
|
+
return onInput === null || onInput === void 0 ? void 0 : onInput(' ');
|
|
48
|
+
case '↑':
|
|
49
|
+
return setIsBIG(!isBig);
|
|
50
|
+
default:
|
|
51
|
+
return onInput === null || onInput === void 0 ? void 0 : onInput(key);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
55
|
+
ref: keyboardRef,
|
|
56
|
+
className: "".concat(classPrefix)
|
|
57
|
+
}, _react.default.createElement("div", {
|
|
58
|
+
className: "".concat(classPrefix, "-firstline")
|
|
59
|
+
}, (isBig == false ? firstKeys : firstKeysBig).map(function (item, index) {
|
|
60
|
+
return _react.default.createElement("div", {
|
|
61
|
+
key: item || index,
|
|
62
|
+
className: "".concat(classPrefix, "-firstline-key"),
|
|
63
|
+
onTouchStart: function () {
|
|
64
|
+
if (visible) {
|
|
65
|
+
onKeyPress(item);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}, item);
|
|
69
|
+
})), _react.default.createElement("div", {
|
|
70
|
+
className: "".concat(classPrefix, "-secondline")
|
|
71
|
+
}, (isBig == false ? secondKeys : secondKeysBig).map(function (item, index) {
|
|
72
|
+
return _react.default.createElement("div", {
|
|
73
|
+
key: item || index,
|
|
74
|
+
className: "".concat(classPrefix, "-secondline-key"),
|
|
75
|
+
onTouchStart: function () {
|
|
76
|
+
if (visible) {
|
|
77
|
+
onKeyPress(item);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}, item);
|
|
81
|
+
})), _react.default.createElement("div", {
|
|
82
|
+
className: "".concat(classPrefix, "-thirdline")
|
|
83
|
+
}, (isBig == false ? thirdKeys : thirdKeysBig).map(function (item, index) {
|
|
84
|
+
return _react.default.createElement("div", {
|
|
85
|
+
key: item || index,
|
|
86
|
+
className: item == '↑' && isBig ? "".concat(classPrefix, "-darkkey ").concat(classPrefix, "-shift ").concat(classPrefix, "-shift-big") : item == '↑' ? "".concat(classPrefix, "-darkkey ").concat(classPrefix, "-shift") : item == '×' ? "".concat(classPrefix, "-darkkey ").concat(classPrefix, "-delete") : "".concat(classPrefix, "-thirdline-key"),
|
|
87
|
+
onTouchStart: function () {
|
|
88
|
+
if (visible) {
|
|
89
|
+
onKeyPress(item);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}, imgKeys.includes(item) ? '' : item);
|
|
93
|
+
})), _react.default.createElement("div", {
|
|
94
|
+
className: "".concat(classPrefix, "-firthline")
|
|
95
|
+
}, firthKeys.map(function (item, index) {
|
|
96
|
+
return _react.default.createElement("div", {
|
|
97
|
+
key: item || index,
|
|
98
|
+
className: item == '123' ? "".concat(classPrefix, "-darkkey") : item == '⌨' ? " ".concat(classPrefix, "-darkkey ").concat(classPrefix, "-keybord") : item == '空格' ? "".concat(classPrefix, "-space") : "".concat(classPrefix, "-firthline-confirm"),
|
|
99
|
+
onTouchStart: function () {
|
|
100
|
+
if (visible) {
|
|
101
|
+
onKeyPress(item);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}, imgKeys.includes(item) ? '' : item);
|
|
105
|
+
}))));
|
|
106
|
+
}
|
|
@@ -5,5 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
require("./stock-keyboard.css");
|
|
8
|
+
require("./alphabet-keyboard.css");
|
|
8
9
|
var _stockKeyboard2 = require("./stock-keyboard");
|
|
9
10
|
var _default = exports.default = _stockKeyboard2.StockKeyboard;
|