@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.
Files changed (217) hide show
  1. package/assets/images/delete_dark.png +0 -0
  2. package/assets/images/keybord_keybord_dark.png +0 -0
  3. package/assets/images/keybord_shift2.png +0 -0
  4. package/assets/images/keybord_shift2_dark.png +0 -0
  5. package/assets/images/keybord_shift_dark.png +0 -0
  6. package/assets/images/loading.gif +0 -0
  7. package/cjs/assets/images/delete_dark.png +0 -0
  8. package/cjs/assets/images/keybord_keybord_dark.png +0 -0
  9. package/cjs/assets/images/keybord_shift2.png +0 -0
  10. package/cjs/assets/images/keybord_shift2_dark.png +0 -0
  11. package/cjs/assets/images/keybord_shift_dark.png +0 -0
  12. package/cjs/assets/images/loading.gif +0 -0
  13. package/cjs/components/alphabet-keyboard/alphabet-keyboard.css +108 -43
  14. package/cjs/components/alphabet-keyboard/alphabet-keyboard.js +1 -2
  15. package/cjs/components/button/selectorButton.css +2 -0
  16. package/cjs/components/button/selectorButton.js +1 -5
  17. package/cjs/components/card/card.css +1 -1
  18. package/cjs/components/card/card.js +2 -2
  19. package/cjs/components/checkbox/checkbox.css +8 -2
  20. package/cjs/components/date-range-picker/date-range-picker.css +31 -7
  21. package/cjs/components/date-range-picker/date-range-picker.d.ts +1 -0
  22. package/cjs/components/date-range-picker/date-range-picker.js +18 -9
  23. package/cjs/components/divider/divider.css +4 -3
  24. package/cjs/components/header/header.css +7 -1
  25. package/cjs/components/header/header.js +4 -2
  26. package/cjs/components/icons/back-icon.js +1 -0
  27. package/cjs/components/icons/clear-icon.js +1 -0
  28. package/cjs/components/icons/close-icon.js +2 -1
  29. package/cjs/components/icons/down-icon.d.ts +4 -0
  30. package/cjs/components/icons/down-icon.js +26 -0
  31. package/cjs/components/icons/dustbin-icon.d.ts +4 -0
  32. package/cjs/components/icons/dustbin-icon.js +26 -0
  33. package/cjs/components/icons/index.d.ts +3 -0
  34. package/cjs/components/icons/index.js +21 -0
  35. package/cjs/components/icons/notice-icon.js +2 -2
  36. package/cjs/components/icons/right-icon.js +1 -0
  37. package/cjs/components/icons/search-icon.js +2 -1
  38. package/cjs/components/icons/up-icon.d.ts +4 -0
  39. package/cjs/components/icons/up-icon.js +26 -0
  40. package/cjs/components/icons/warning-icon.js +2 -1
  41. package/cjs/components/infinite-scroll/index.d.ts +4 -0
  42. package/cjs/components/infinite-scroll/index.js +9 -0
  43. package/cjs/components/infinite-scroll/infinite-scroll.css +27 -0
  44. package/cjs/components/infinite-scroll/infinite-scroll.d.ts +11 -0
  45. package/cjs/components/infinite-scroll/infinite-scroll.js +278 -0
  46. package/cjs/components/input/input.css +27 -27
  47. package/cjs/components/input/input.js +1 -1
  48. package/cjs/components/list/index.d.ts +16 -0
  49. package/cjs/components/list/index.js +13 -0
  50. package/cjs/components/list/list-item.d.ts +15 -0
  51. package/cjs/components/list/list-item.js +38 -0
  52. package/cjs/components/list/list.css +101 -0
  53. package/cjs/components/list/list.d.ts +20 -0
  54. package/cjs/components/list/list.js +38 -0
  55. package/cjs/components/number-keyboard/number-keyboard.css +55 -42
  56. package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -0
  57. package/cjs/components/number-keyboard/number-keyboard.js +2 -1
  58. package/cjs/components/picker/picker.css +3 -0
  59. package/cjs/components/picker-view/picker-view.css +11 -2
  60. package/cjs/components/popover/arrow.d.ts +3 -0
  61. package/cjs/components/popover/arrow.js +19 -0
  62. package/cjs/components/popover/index.d.ts +31 -0
  63. package/cjs/components/popover/index.js +14 -0
  64. package/cjs/components/popover/normalize-placement.d.ts +2 -0
  65. package/cjs/components/popover/normalize-placement.js +20 -0
  66. package/cjs/components/popover/popover-menu.css +65 -0
  67. package/cjs/components/popover/popover-menu.d.ts +20 -0
  68. package/cjs/components/popover/popover-menu.js +74 -0
  69. package/cjs/components/popover/popover.css +68 -0
  70. package/cjs/components/popover/popover.d.ts +41 -0
  71. package/cjs/components/popover/popover.js +280 -0
  72. package/cjs/components/popover/wrapper.d.ts +10 -0
  73. package/cjs/components/popover/wrapper.js +53 -0
  74. package/cjs/components/popup/popup.css +4 -16
  75. package/cjs/components/protocol/protocol.js +1 -2
  76. package/cjs/components/pull-to-refresh/pull-to-refresh.css +10 -1
  77. package/cjs/components/pull-to-refresh/pull-to-refresh.d.ts +1 -1
  78. package/cjs/components/pull-to-refresh/pull-to-refresh.js +5 -5
  79. package/cjs/components/radio/radio.css +5 -0
  80. package/cjs/components/selector/selector.css +1 -1
  81. package/cjs/components/skeleton/skeleton.css +4 -4
  82. package/cjs/components/squared-grid/squared-grid.css +1 -2
  83. package/cjs/components/squared-grid/squared-grid.d.ts +2 -1
  84. package/cjs/components/squared-grid/squared-grid.js +11 -2
  85. package/cjs/components/stock-count-keyboard/stock-count-keyboard.css +48 -41
  86. package/cjs/components/stock-count-keyboard/stock-count-keyboard.js +1 -1
  87. package/cjs/components/stock-keyboard/alphabet-keyboard.css +186 -0
  88. package/cjs/components/stock-keyboard/alphabet-keyboard.d.ts +11 -0
  89. package/cjs/components/stock-keyboard/alphabet-keyboard.js +106 -0
  90. package/cjs/components/stock-keyboard/index.d.ts +1 -0
  91. package/cjs/components/stock-keyboard/index.js +1 -0
  92. package/cjs/components/stock-keyboard/stock-keyboard.css +135 -76
  93. package/cjs/components/stock-keyboard/stock-keyboard.d.ts +2 -2
  94. package/cjs/components/stock-keyboard/stock-keyboard.js +42 -10
  95. package/cjs/components/switch/switch.css +2 -3
  96. package/cjs/components/tabs/tabs.css +6 -4
  97. package/cjs/components/tabs/tabs.js +5 -5
  98. package/cjs/components/tabs/tabs.patch.css +1 -0
  99. package/cjs/components/toast/index.d.ts +9 -0
  100. package/cjs/components/toast/index.js +14 -0
  101. package/cjs/components/toast/methods.d.ts +8 -0
  102. package/cjs/components/toast/methods.js +72 -0
  103. package/cjs/components/toast/toast.css +45 -0
  104. package/cjs/components/toast/toast.d.ts +18 -0
  105. package/cjs/components/toast/toast.js +85 -0
  106. package/cjs/components/toast/toast.patch.css +11 -0
  107. package/cjs/global/global.css +20 -5
  108. package/cjs/global/theme-dark.css +11 -3
  109. package/cjs/global/theme-default.css +9 -2
  110. package/cjs/index.d.ts +4 -0
  111. package/cjs/index.js +33 -1
  112. package/es/assets/images/delete_dark.png +0 -0
  113. package/es/assets/images/keybord_keybord_dark.png +0 -0
  114. package/es/assets/images/keybord_shift2.png +0 -0
  115. package/es/assets/images/keybord_shift2_dark.png +0 -0
  116. package/es/assets/images/keybord_shift_dark.png +0 -0
  117. package/es/assets/images/loading.gif +0 -0
  118. package/es/components/alphabet-keyboard/alphabet-keyboard.css +108 -43
  119. package/es/components/alphabet-keyboard/alphabet-keyboard.js +2 -4
  120. package/es/components/button/selectorButton.css +2 -0
  121. package/es/components/button/selectorButton.js +1 -5
  122. package/es/components/card/card.css +1 -1
  123. package/es/components/card/card.js +2 -2
  124. package/es/components/checkbox/checkbox.css +8 -2
  125. package/es/components/date-range-picker/date-range-picker.css +31 -7
  126. package/es/components/date-range-picker/date-range-picker.d.ts +1 -0
  127. package/es/components/date-range-picker/date-range-picker.js +17 -9
  128. package/es/components/divider/divider.css +4 -3
  129. package/es/components/header/header.css +7 -1
  130. package/es/components/header/header.js +4 -2
  131. package/es/components/icons/back-icon.js +1 -0
  132. package/es/components/icons/clear-icon.js +1 -0
  133. package/es/components/icons/close-icon.js +2 -1
  134. package/es/components/icons/down-icon.d.ts +4 -0
  135. package/es/components/icons/down-icon.js +18 -0
  136. package/es/components/icons/dustbin-icon.d.ts +4 -0
  137. package/es/components/icons/dustbin-icon.js +18 -0
  138. package/es/components/icons/index.d.ts +3 -0
  139. package/es/components/icons/index.js +3 -0
  140. package/es/components/icons/notice-icon.js +2 -2
  141. package/es/components/icons/right-icon.js +1 -0
  142. package/es/components/icons/search-icon.js +2 -1
  143. package/es/components/icons/up-icon.d.ts +4 -0
  144. package/es/components/icons/up-icon.js +18 -0
  145. package/es/components/icons/warning-icon.js +2 -1
  146. package/es/components/infinite-scroll/index.d.ts +4 -0
  147. package/es/components/infinite-scroll/index.js +3 -0
  148. package/es/components/infinite-scroll/infinite-scroll.css +27 -0
  149. package/es/components/infinite-scroll/infinite-scroll.d.ts +11 -0
  150. package/es/components/infinite-scroll/infinite-scroll.js +268 -0
  151. package/es/components/input/input.css +27 -27
  152. package/es/components/input/input.js +1 -1
  153. package/es/components/list/index.d.ts +16 -0
  154. package/es/components/list/index.js +7 -0
  155. package/es/components/list/list-item.d.ts +15 -0
  156. package/es/components/list/list-item.js +30 -0
  157. package/es/components/list/list.css +101 -0
  158. package/es/components/list/list.d.ts +20 -0
  159. package/es/components/list/list.js +29 -0
  160. package/es/components/number-keyboard/number-keyboard.css +55 -42
  161. package/es/components/number-keyboard/number-keyboard.d.ts +1 -0
  162. package/es/components/number-keyboard/number-keyboard.js +2 -1
  163. package/es/components/picker/picker.css +3 -0
  164. package/es/components/picker-view/picker-view.css +11 -2
  165. package/es/components/popover/arrow.d.ts +3 -0
  166. package/es/components/popover/arrow.js +11 -0
  167. package/es/components/popover/index.d.ts +31 -0
  168. package/es/components/popover/index.js +8 -0
  169. package/es/components/popover/normalize-placement.d.ts +2 -0
  170. package/es/components/popover/normalize-placement.js +14 -0
  171. package/es/components/popover/popover-menu.css +65 -0
  172. package/es/components/popover/popover-menu.d.ts +20 -0
  173. package/es/components/popover/popover-menu.js +65 -0
  174. package/es/components/popover/popover.css +68 -0
  175. package/es/components/popover/popover.d.ts +41 -0
  176. package/es/components/popover/popover.js +271 -0
  177. package/es/components/popover/wrapper.d.ts +10 -0
  178. package/es/components/popover/wrapper.js +47 -0
  179. package/es/components/popup/popup.css +4 -16
  180. package/es/components/protocol/protocol.js +1 -2
  181. package/es/components/pull-to-refresh/pull-to-refresh.css +10 -1
  182. package/es/components/pull-to-refresh/pull-to-refresh.d.ts +1 -1
  183. package/es/components/pull-to-refresh/pull-to-refresh.js +5 -5
  184. package/es/components/radio/radio.css +5 -0
  185. package/es/components/selector/selector.css +1 -1
  186. package/es/components/skeleton/skeleton.css +4 -4
  187. package/es/components/squared-grid/squared-grid.css +1 -2
  188. package/es/components/squared-grid/squared-grid.d.ts +2 -1
  189. package/es/components/squared-grid/squared-grid.js +11 -2
  190. package/es/components/stock-count-keyboard/stock-count-keyboard.css +48 -41
  191. package/es/components/stock-count-keyboard/stock-count-keyboard.js +1 -1
  192. package/es/components/stock-keyboard/alphabet-keyboard.css +186 -0
  193. package/es/components/stock-keyboard/alphabet-keyboard.d.ts +11 -0
  194. package/es/components/stock-keyboard/alphabet-keyboard.js +98 -0
  195. package/es/components/stock-keyboard/index.d.ts +1 -0
  196. package/es/components/stock-keyboard/index.js +1 -0
  197. package/es/components/stock-keyboard/stock-keyboard.css +135 -76
  198. package/es/components/stock-keyboard/stock-keyboard.d.ts +2 -2
  199. package/es/components/stock-keyboard/stock-keyboard.js +44 -13
  200. package/es/components/switch/switch.css +2 -3
  201. package/es/components/tabs/tabs.css +6 -4
  202. package/es/components/tabs/tabs.js +5 -5
  203. package/es/components/tabs/tabs.patch.css +1 -0
  204. package/es/components/toast/index.d.ts +9 -0
  205. package/es/components/toast/index.js +8 -0
  206. package/es/components/toast/methods.d.ts +8 -0
  207. package/es/components/toast/methods.js +63 -0
  208. package/es/components/toast/toast.css +45 -0
  209. package/es/components/toast/toast.d.ts +18 -0
  210. package/es/components/toast/toast.js +75 -0
  211. package/es/components/toast/toast.patch.css +11 -0
  212. package/es/global/global.css +20 -5
  213. package/es/global/theme-dark.css +11 -3
  214. package/es/global/theme-default.css +9 -2
  215. package/es/index.d.ts +4 -0
  216. package/es/index.js +8 -4
  217. package/package.json +6 -12
@@ -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: 216px;
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 :last-child {
14
- background: var(--ebscn-color-primary);
15
- color: var(--ebscn-color-background);
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
- width: 20%;
19
- height: 54px;
20
- text-align: center;
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
- width: 20%;
30
- height: 54px;
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: var(--ebscn-font-size-11);
40
- background: #e1e3e8;
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
- font-size: var(--ebscn-font-size-11);
44
- background: #CACBD0;
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) #e1e3e8 no-repeat center;
48
- background-size: 24px 24px;
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) #CACBD0 no-repeat center;
52
- background-size: 24px 24px;
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
- width: 20%;
57
- height: 54px;
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: #D03B21;
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(216px + env(safe-area-inset-bottom));
72
- height: calc(216px + constant(safe-area-inset-bottom));
78
+ height: calc(223px + env(safe-area-inset-bottom));
79
+ height: calc(223px + constant(safe-area-inset-bottom));
73
80
  }
74
81
  }
@@ -63,7 +63,7 @@ export function StockCountKeyboard(p) {
63
63
  }, keys.map(function (item, index) {
64
64
  return React.createElement("div", {
65
65
  key: item || index,
66
- className: cns(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")),
66
+ className: cns(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")),
67
67
  onClick: function () {
68
68
  if (visible) {
69
69
  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,98 @@
1
+ import React, { useRef, useState } from 'react';
2
+ import { withNativeProps } from '../../utils/native-props';
3
+ import { mergeProps } from '../../utils/with-default-props';
4
+ var classPrefix = 'ebscn-alphabet-keyboard-extra';
5
+ var defaultProps = {
6
+ visible: false
7
+ };
8
+ export function AlphabetKeyboard(p) {
9
+ var keyboardRef = useRef(null);
10
+ var props = mergeProps(defaultProps, p);
11
+ var visible = props.visible,
12
+ onInput = props.onInput,
13
+ onDelete = props.onDelete,
14
+ onClose = props.onClose,
15
+ onChangeKeyBoard = props.onChangeKeyBoard,
16
+ onConfirm = props.onConfirm;
17
+ var firstKeys = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'];
18
+ var firstKeysBig = ['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'];
19
+ var secondKeys = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'];
20
+ var secondKeysBig = ['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'];
21
+ var thirdKeys = ['↑', 'z', 'x', 'c', 'v', 'b', 'n', 'm', '×'];
22
+ var thirdKeysBig = ['↑', 'Z', 'X', 'C', 'V', 'B', 'N', 'M', '×'];
23
+ var firthKeys = ['123', '⌨', '空格', '确定'];
24
+ var _a = useState(false),
25
+ isBig = _a[0],
26
+ setIsBIG = _a[1];
27
+ var imgKeys = ['×', '↑', '⌨'];
28
+ function onKeyPress(key) {
29
+ switch (key) {
30
+ case '×':
31
+ return onDelete === null || onDelete === void 0 ? void 0 : onDelete();
32
+ case '123':
33
+ return onChangeKeyBoard === null || onChangeKeyBoard === void 0 ? void 0 : onChangeKeyBoard();
34
+ case '⌨':
35
+ return onClose === null || onClose === void 0 ? void 0 : onClose();
36
+ case '确定':
37
+ return onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
38
+ case '空格':
39
+ return onInput === null || onInput === void 0 ? void 0 : onInput(' ');
40
+ case '↑':
41
+ return setIsBIG(!isBig);
42
+ default:
43
+ return onInput === null || onInput === void 0 ? void 0 : onInput(key);
44
+ }
45
+ }
46
+ return withNativeProps(props, React.createElement("div", {
47
+ ref: keyboardRef,
48
+ className: "".concat(classPrefix)
49
+ }, React.createElement("div", {
50
+ className: "".concat(classPrefix, "-firstline")
51
+ }, (isBig == false ? firstKeys : firstKeysBig).map(function (item, index) {
52
+ return React.createElement("div", {
53
+ key: item || index,
54
+ className: "".concat(classPrefix, "-firstline-key"),
55
+ onTouchStart: function () {
56
+ if (visible) {
57
+ onKeyPress(item);
58
+ }
59
+ }
60
+ }, item);
61
+ })), React.createElement("div", {
62
+ className: "".concat(classPrefix, "-secondline")
63
+ }, (isBig == false ? secondKeys : secondKeysBig).map(function (item, index) {
64
+ return React.createElement("div", {
65
+ key: item || index,
66
+ className: "".concat(classPrefix, "-secondline-key"),
67
+ onTouchStart: function () {
68
+ if (visible) {
69
+ onKeyPress(item);
70
+ }
71
+ }
72
+ }, item);
73
+ })), React.createElement("div", {
74
+ className: "".concat(classPrefix, "-thirdline")
75
+ }, (isBig == false ? thirdKeys : thirdKeysBig).map(function (item, index) {
76
+ return React.createElement("div", {
77
+ key: item || index,
78
+ 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"),
79
+ onTouchStart: function () {
80
+ if (visible) {
81
+ onKeyPress(item);
82
+ }
83
+ }
84
+ }, imgKeys.includes(item) ? '' : item);
85
+ })), React.createElement("div", {
86
+ className: "".concat(classPrefix, "-firthline")
87
+ }, firthKeys.map(function (item, index) {
88
+ return React.createElement("div", {
89
+ key: item || index,
90
+ className: item == '123' ? "".concat(classPrefix, "-darkkey") : item == '⌨' ? " ".concat(classPrefix, "-darkkey ").concat(classPrefix, "-keybord") : item == '空格' ? "".concat(classPrefix, "-space") : "".concat(classPrefix, "-firthline-confirm"),
91
+ onTouchStart: function () {
92
+ if (visible) {
93
+ onKeyPress(item);
94
+ }
95
+ }
96
+ }, imgKeys.includes(item) ? '' : item);
97
+ }))));
98
+ }
@@ -1,4 +1,5 @@
1
1
  import "./stock-keyboard.less";
2
+ import './alphabet-keyboard.less';
2
3
  import { StockKeyboard } from "./stock-keyboard";
3
4
  export type { StockKeyboardProps } from "./stock-keyboard";
4
5
  export default StockKeyboard;
@@ -1,3 +1,4 @@
1
1
  import "./stock-keyboard.css";
2
+ import "./alphabet-keyboard.css";
2
3
  import { StockKeyboard } from "./stock-keyboard";
3
4
  export default StockKeyboard;