@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.
Files changed (213) 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 -3
  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 +102 -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-view/picker-view.css +3 -2
  59. package/cjs/components/popover/arrow.d.ts +3 -0
  60. package/cjs/components/popover/arrow.js +19 -0
  61. package/cjs/components/popover/index.d.ts +31 -0
  62. package/cjs/components/popover/index.js +14 -0
  63. package/cjs/components/popover/normalize-placement.d.ts +2 -0
  64. package/cjs/components/popover/normalize-placement.js +20 -0
  65. package/cjs/components/popover/popover-menu.css +65 -0
  66. package/cjs/components/popover/popover-menu.d.ts +20 -0
  67. package/cjs/components/popover/popover-menu.js +74 -0
  68. package/cjs/components/popover/popover.css +68 -0
  69. package/cjs/components/popover/popover.d.ts +41 -0
  70. package/cjs/components/popover/popover.js +280 -0
  71. package/cjs/components/popover/wrapper.d.ts +10 -0
  72. package/cjs/components/popover/wrapper.js +53 -0
  73. package/cjs/components/protocol/protocol.js +1 -2
  74. package/cjs/components/pull-to-refresh/pull-to-refresh.css +10 -1
  75. package/cjs/components/pull-to-refresh/pull-to-refresh.d.ts +1 -1
  76. package/cjs/components/pull-to-refresh/pull-to-refresh.js +5 -5
  77. package/cjs/components/radio/radio.css +5 -0
  78. package/cjs/components/selector/selector.css +1 -1
  79. package/cjs/components/skeleton/skeleton.css +4 -4
  80. package/cjs/components/squared-grid/squared-grid.css +1 -2
  81. package/cjs/components/squared-grid/squared-grid.d.ts +2 -1
  82. package/cjs/components/squared-grid/squared-grid.js +11 -2
  83. package/cjs/components/stock-count-keyboard/stock-count-keyboard.css +48 -41
  84. package/cjs/components/stock-count-keyboard/stock-count-keyboard.js +1 -1
  85. package/cjs/components/stock-keyboard/alphabet-keyboard.css +186 -0
  86. package/cjs/components/stock-keyboard/alphabet-keyboard.d.ts +11 -0
  87. package/cjs/components/stock-keyboard/alphabet-keyboard.js +106 -0
  88. package/cjs/components/stock-keyboard/index.d.ts +1 -0
  89. package/cjs/components/stock-keyboard/index.js +1 -0
  90. package/cjs/components/stock-keyboard/stock-keyboard.css +135 -76
  91. package/cjs/components/stock-keyboard/stock-keyboard.d.ts +2 -2
  92. package/cjs/components/stock-keyboard/stock-keyboard.js +40 -8
  93. package/cjs/components/switch/switch.css +2 -3
  94. package/cjs/components/tabs/tabs.css +5 -3
  95. package/cjs/components/tabs/tabs.js +5 -5
  96. package/cjs/components/tabs/tabs.patch.css +1 -0
  97. package/cjs/components/toast/index.d.ts +9 -0
  98. package/cjs/components/toast/index.js +14 -0
  99. package/cjs/components/toast/methods.d.ts +8 -0
  100. package/cjs/components/toast/methods.js +72 -0
  101. package/cjs/components/toast/toast.css +45 -0
  102. package/cjs/components/toast/toast.d.ts +18 -0
  103. package/cjs/components/toast/toast.js +85 -0
  104. package/cjs/components/toast/toast.patch.css +11 -0
  105. package/cjs/global/global.css +20 -5
  106. package/cjs/global/theme-dark.css +11 -3
  107. package/cjs/global/theme-default.css +9 -2
  108. package/cjs/index.d.ts +4 -4
  109. package/cjs/index.js +32 -32
  110. package/es/assets/images/delete_dark.png +0 -0
  111. package/es/assets/images/keybord_keybord_dark.png +0 -0
  112. package/es/assets/images/keybord_shift2.png +0 -0
  113. package/es/assets/images/keybord_shift2_dark.png +0 -0
  114. package/es/assets/images/keybord_shift_dark.png +0 -0
  115. package/es/assets/images/loading.gif +0 -0
  116. package/es/components/alphabet-keyboard/alphabet-keyboard.css +108 -43
  117. package/es/components/alphabet-keyboard/alphabet-keyboard.js +2 -4
  118. package/es/components/button/selectorButton.css +2 -0
  119. package/es/components/button/selectorButton.js +1 -5
  120. package/es/components/card/card.css +1 -1
  121. package/es/components/card/card.js +2 -2
  122. package/es/components/checkbox/checkbox.css +8 -3
  123. package/es/components/date-range-picker/date-range-picker.css +31 -7
  124. package/es/components/date-range-picker/date-range-picker.d.ts +1 -0
  125. package/es/components/date-range-picker/date-range-picker.js +17 -9
  126. package/es/components/divider/divider.css +4 -3
  127. package/es/components/header/header.css +7 -1
  128. package/es/components/header/header.js +4 -2
  129. package/es/components/icons/back-icon.js +1 -0
  130. package/es/components/icons/clear-icon.js +1 -0
  131. package/es/components/icons/close-icon.js +2 -1
  132. package/es/components/icons/down-icon.d.ts +4 -0
  133. package/es/components/icons/down-icon.js +18 -0
  134. package/es/components/icons/dustbin-icon.d.ts +4 -0
  135. package/es/components/icons/dustbin-icon.js +18 -0
  136. package/es/components/icons/index.d.ts +3 -0
  137. package/es/components/icons/index.js +3 -0
  138. package/es/components/icons/notice-icon.js +2 -2
  139. package/es/components/icons/right-icon.js +1 -0
  140. package/es/components/icons/search-icon.js +2 -1
  141. package/es/components/icons/up-icon.d.ts +4 -0
  142. package/es/components/icons/up-icon.js +18 -0
  143. package/es/components/icons/warning-icon.js +2 -1
  144. package/es/components/infinite-scroll/index.d.ts +4 -0
  145. package/es/components/infinite-scroll/index.js +3 -0
  146. package/es/components/infinite-scroll/infinite-scroll.css +27 -0
  147. package/es/components/infinite-scroll/infinite-scroll.d.ts +11 -0
  148. package/es/components/infinite-scroll/infinite-scroll.js +268 -0
  149. package/es/components/input/input.css +27 -27
  150. package/es/components/input/input.js +1 -1
  151. package/es/components/list/index.d.ts +16 -0
  152. package/es/components/list/index.js +7 -0
  153. package/es/components/list/list-item.d.ts +15 -0
  154. package/es/components/list/list-item.js +30 -0
  155. package/es/components/list/list.css +102 -0
  156. package/es/components/list/list.d.ts +20 -0
  157. package/es/components/list/list.js +29 -0
  158. package/es/components/number-keyboard/number-keyboard.css +55 -42
  159. package/es/components/number-keyboard/number-keyboard.d.ts +1 -0
  160. package/es/components/number-keyboard/number-keyboard.js +2 -1
  161. package/es/components/picker-view/picker-view.css +3 -2
  162. package/es/components/popover/arrow.d.ts +3 -0
  163. package/es/components/popover/arrow.js +11 -0
  164. package/es/components/popover/index.d.ts +31 -0
  165. package/es/components/popover/index.js +8 -0
  166. package/es/components/popover/normalize-placement.d.ts +2 -0
  167. package/es/components/popover/normalize-placement.js +14 -0
  168. package/es/components/popover/popover-menu.css +65 -0
  169. package/es/components/popover/popover-menu.d.ts +20 -0
  170. package/es/components/popover/popover-menu.js +65 -0
  171. package/es/components/popover/popover.css +68 -0
  172. package/es/components/popover/popover.d.ts +41 -0
  173. package/es/components/popover/popover.js +271 -0
  174. package/es/components/popover/wrapper.d.ts +10 -0
  175. package/es/components/popover/wrapper.js +47 -0
  176. package/es/components/protocol/protocol.js +1 -2
  177. package/es/components/pull-to-refresh/pull-to-refresh.css +10 -1
  178. package/es/components/pull-to-refresh/pull-to-refresh.d.ts +1 -1
  179. package/es/components/pull-to-refresh/pull-to-refresh.js +5 -5
  180. package/es/components/radio/radio.css +5 -0
  181. package/es/components/selector/selector.css +1 -1
  182. package/es/components/skeleton/skeleton.css +4 -4
  183. package/es/components/squared-grid/squared-grid.css +1 -2
  184. package/es/components/squared-grid/squared-grid.d.ts +2 -1
  185. package/es/components/squared-grid/squared-grid.js +11 -2
  186. package/es/components/stock-count-keyboard/stock-count-keyboard.css +48 -41
  187. package/es/components/stock-count-keyboard/stock-count-keyboard.js +1 -1
  188. package/es/components/stock-keyboard/alphabet-keyboard.css +186 -0
  189. package/es/components/stock-keyboard/alphabet-keyboard.d.ts +11 -0
  190. package/es/components/stock-keyboard/alphabet-keyboard.js +98 -0
  191. package/es/components/stock-keyboard/index.d.ts +1 -0
  192. package/es/components/stock-keyboard/index.js +1 -0
  193. package/es/components/stock-keyboard/stock-keyboard.css +135 -76
  194. package/es/components/stock-keyboard/stock-keyboard.d.ts +2 -2
  195. package/es/components/stock-keyboard/stock-keyboard.js +42 -11
  196. package/es/components/switch/switch.css +2 -3
  197. package/es/components/tabs/tabs.css +5 -3
  198. package/es/components/tabs/tabs.js +5 -5
  199. package/es/components/tabs/tabs.patch.css +1 -0
  200. package/es/components/toast/index.d.ts +9 -0
  201. package/es/components/toast/index.js +8 -0
  202. package/es/components/toast/methods.d.ts +8 -0
  203. package/es/components/toast/methods.js +63 -0
  204. package/es/components/toast/toast.css +45 -0
  205. package/es/components/toast/toast.d.ts +18 -0
  206. package/es/components/toast/toast.js +75 -0
  207. package/es/components/toast/toast.patch.css +11 -0
  208. package/es/global/global.css +20 -5
  209. package/es/global/theme-dark.css +11 -3
  210. package/es/global/theme-default.css +9 -2
  211. package/es/index.d.ts +4 -4
  212. package/es/index.js +8 -4
  213. package/package.json +2 -11
@@ -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
+ onClick: 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
+ onClick: 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
+ onClick: 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
+ onClick: 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;
@@ -1,111 +1,170 @@
1
+ html[data-prefers-color-scheme='dark'] .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-right-delete {
2
+ background: url(../../assets/images/delete_dark.png) var(--ebscn-color-keyboard-fckey-bg) 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-stock-keyboard-bottom .ebscn-stock-keyboard-right-delete:active {
7
+ background-color: var(--ebscn-color-keyboard-fckey-bg-active);
8
+ }
1
9
  .ebscn-stock-keyboard {
2
10
  transform: translateY(101%);
3
- display: flex;
4
11
  position: fixed;
5
12
  bottom: 0;
13
+ left: 0;
6
14
  flex-direction: row;
15
+ z-index: 999;
7
16
  width: 100%;
8
- height: 216px;
17
+ height: 262px;
9
18
  transition: all 0.5s;
10
19
  align-content: flex-start;
20
+ background-color: #fff;
21
+ background-color: var(--ebscn-color-keyboard-bg);
22
+ }
23
+ .ebscn-stock-keyboard-top {
24
+ padding: 11px 19px 6px 11px;
25
+ background-color: #fff;
26
+ background-color: var(--ebscn-color-background);
27
+ display: flex;
28
+ align-items: center;
29
+ font-size: 18px;
30
+ font-size: var(--ebscn-font-size-8);
31
+ }
32
+ .ebscn-stock-keyboard-top-item {
33
+ margin-right: 24px;
34
+ padding-bottom: 2px;
35
+ color: #666;
36
+ color: var(--ebscn-color-text-secondary);
37
+ line-height: 21px;
38
+ border-bottom: 2px solid transparent;
39
+ }
40
+ .ebscn-stock-keyboard-top-item-active {
41
+ color: #e84225;
42
+ color: var(--ebscn-color-primary);
43
+ position: relative;
44
+ }
45
+ .ebscn-stock-keyboard-top-item-active::after {
46
+ content: "";
47
+ position: absolute;
48
+ bottom: -2px;
49
+ left: 8px;
50
+ width: 14px;
51
+ /* 固定宽度 */
52
+ height: 2px;
53
+ background: var(--ebscn-color-primary);
54
+ border-radius: 1px;
11
55
  }
12
- .ebscn-stock-keyboard .ebscn-stock-keyboard-right {
56
+ .ebscn-stock-keyboard-bottom {
57
+ display: flex;
58
+ }
59
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-right {
60
+ background-color: #d3d5d8;
61
+ background-color: var(--ebscn-color-keyboard-bg);
13
62
  display: flex;
14
63
  flex-wrap: wrap;
15
64
  width: 80%;
16
- height: 216px;
65
+ height: 223px;
17
66
  transition: all 0.5s;
18
67
  align-content: flex-start;
19
68
  }
20
- .ebscn-stock-keyboard .ebscn-stock-keyboard-right :last-child {
21
- background: var(--ebscn-color-primary);
22
- color: var(--ebscn-color-white);
23
- }
24
- .ebscn-stock-keyboard .ebscn-stock-keyboard-right-key {
25
- width: 25%;
26
- height: 54px;
27
- line-height: 54px;
28
- text-align: center;
29
- font-size: 24px;
30
- color: #000000;
31
- font-weight: 300;
32
- box-shadow: 0 0 0 1px var(--ebscn-color-light);
33
- background: var(--ebscn-color-white);
34
- }
35
- .ebscn-stock-keyboard .ebscn-stock-keyboard-right-key:active {
36
- width: 25%;
37
- height: 54px;
38
- line-height: 54px;
69
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-right :last-child {
70
+ background-color: #e84225;
71
+ background-color: var(--ebscn-color-primary);
72
+ color: #fff;
73
+ }
74
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-right-key {
75
+ width: calc(25% - 8.5px);
76
+ margin: 6px 3px 0 3px;
77
+ border-radius: 4px;
78
+ height: 46px;
79
+ line-height: 46px;
39
80
  text-align: center;
40
- font-size: 24px;
41
- color: #000000;
42
- font-weight: 300;
43
- box-shadow: 0 0 0 1px var(--ebscn-color-light);
44
- background: var(--ebscn-color-border);
45
- }
46
- .ebscn-stock-keyboard .ebscn-stock-keyboard-right-option {
81
+ font-weight: 400;
82
+ border: 0.5px solid #888;
83
+ border-color: var(--ebscn-color-keyboard-key-border);
84
+ color: #333;
85
+ color: var(--ebscn-color-text);
86
+ font-size: 23px;
87
+ background-color: #fff;
88
+ background-color: var(--ebscn-color-keyboard-key-bg);
89
+ }
90
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-right-key:active {
91
+ background-color: #e5e5e5;
92
+ background-color: var(--ebscn-color-keyboard-key-bg-active);
93
+ }
94
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-right-option {
95
+ font-size: 19px;
47
96
  font-size: var(--ebscn-font-size-11);
48
- background: #e1e3e8;
49
- }
50
- .ebscn-stock-keyboard .ebscn-stock-keyboard-right-option:active {
97
+ color: #333;
98
+ color: var(--ebscn-color-text);
99
+ background-color: #adb3bd;
100
+ background-color: var(--ebscn-color-keyboard-fckey-bg);
101
+ border-color: var(--ebscn-color-keyboard-fckey-border);
102
+ }
103
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-right-option:active {
104
+ background-color: #252525;
105
+ background-color: var(--ebscn-color-keyboard-fckey-bg-active);
106
+ }
107
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-right-delete {
108
+ background: url(../../assets/images/delete.png) no-repeat center;
109
+ background-color: #adb3bd;
110
+ background-color: var(--ebscn-color-keyboard-fckey-bg);
111
+ background-size: 25px 25px;
112
+ border-color: var(--ebscn-color-keyboard-fckey-border);
113
+ }
114
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-right-delete:active {
115
+ background: url(../../assets/images/delete.png) no-repeat center;
116
+ background-color: #252525;
117
+ background-color: var(--ebscn-color-keyboard-fckey-bg-active);
118
+ background-size: 25px 25px;
119
+ }
120
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-right-confirmKey {
121
+ font-size: 19px;
51
122
  font-size: var(--ebscn-font-size-11);
52
- background: #CACBD0;
53
- }
54
- .ebscn-stock-keyboard .ebscn-stock-keyboard-right-delete {
55
- background: url(../../assets/images/delete.png) #e1e3e8 no-repeat center;
56
- background-size: 24px 24px;
57
- }
58
- .ebscn-stock-keyboard .ebscn-stock-keyboard-right-delete:active {
59
- background: url(../../assets/images/delete.png) #CACBD0 no-repeat center;
60
- background-size: 24px 24px;
61
- }
62
- .ebscn-stock-keyboard .ebscn-stock-keyboard-right-header {
63
- padding-top: 24px;
64
- padding-bottom: 16px;
65
- font-size: var(--ebscn-font-size-10);
66
- color: #333333;
67
- text-align: center;
68
- font-weight: 500;
69
- }
70
- .ebscn-stock-keyboard .ebscn-stock-keyboard-right-confirmKey {
123
+ width: calc(25% - 7.5px);
124
+ background-color: #e84225;
71
125
  background-color: var(--ebscn-color-primary);
72
- width: 25%;
73
- height: 54px;
74
- line-height: 54px;
75
- text-align: center;
76
- font-size: var(--ebscn-font-size-11);
77
- color: #000000;
78
- font-weight: 300;
79
- box-shadow: 0 0 0 1px var(--ebscn-color-light);
126
+ border-color: var(--ebscn-color-keyboard-fckey-border);
80
127
  }
81
- .ebscn-stock-keyboard .ebscn-stock-keyboard-right-confirmKey:active {
82
- background-color: #D03B21;
128
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-right-confirmKey:active {
129
+ background-color: #d13c21;
130
+ color: #fff;
83
131
  color: var(--ebscn-color-white);
84
132
  }
85
- .ebscn-stock-keyboard .ebscn-stock-keyboard-left {
133
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-right-bottom-option {
134
+ font-size: 19px;
135
+ font-size: var(--ebscn-font-size-11);
136
+ }
137
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-left {
86
138
  width: 20%;
87
- height: 216px;
139
+ background-color: #d3d5d8;
140
+ background-color: var(--ebscn-color-keyboard-bg);
88
141
  }
89
- .ebscn-stock-keyboard .ebscn-stock-keyboard-left-key {
142
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-left-key {
90
143
  display: flex;
91
144
  align-items: center;
92
145
  justify-content: center;
93
- height: 20%;
146
+ border-radius: 4.17px;
147
+ height: 46px;
148
+ margin: 6px 3px 6px 6px;
149
+ font-size: 18px;
94
150
  font-size: var(--ebscn-font-size-10);
95
151
  font-weight: 400;
96
152
  text-align: center;
97
- color: #333333;
98
- line-height: 25px;
99
- box-shadow: 0 0 0 1px var(--ebscn-color-light);
100
- background: #e1e3e8;
101
- }
102
- .ebscn-stock-keyboard .ebscn-stock-keyboard-left-key:active {
103
- font-size: 18px;
104
- background: #CACBD0;
153
+ color: #333;
154
+ color: var(--ebscn-color-text);
155
+ line-height: 46px;
156
+ background-color: #adb3bd;
157
+ background-color: var(--ebscn-color-keyboard-fckey-bg);
158
+ border: 0.5px solid #888;
159
+ border-color: var(--ebscn-color-keyboard-fckey-border);
160
+ }
161
+ .ebscn-stock-keyboard-bottom .ebscn-stock-keyboard-left-key:active {
162
+ background-color: #252525;
163
+ background: var(--ebscn-color-keyboard-fckey-bg-active);
105
164
  }
106
165
  @supports (bottom: env(safe-area-inset-bottom)) or (constant(safe-area-inset-bottom)) {
107
166
  .ebscn-stock-keyboard {
108
- height: calc(216px + env(safe-area-inset-bottom));
109
- height: calc(216px + constant(safe-area-inset-bottom));
167
+ height: calc(262px + env(safe-area-inset-bottom));
168
+ height: calc(262px + constant(safe-area-inset-bottom));
110
169
  }
111
170
  }
@@ -3,10 +3,10 @@ import { NativeProps } from '../../utils/native-props';
3
3
  export type StockKeyboardProps = {
4
4
  visible?: boolean;
5
5
  onInput: Function;
6
- onChangeKeyBoard: Function;
7
6
  onDelete: Function;
8
7
  onClose: Function;
9
8
  onClean: Function;
10
- onConfirm?: Function;
9
+ onConfirm: Function;
10
+ onSelectCN: Function;
11
11
  } & NativeProps;
12
12
  export declare function StockKeyboard(p: StockKeyboardProps): JSX.Element;
@@ -1,8 +1,8 @@
1
- import cns from "classnames";
2
- import { useEffect, useRef } from "react";
3
- import React from "react";
1
+ import cns from 'classnames';
2
+ import React, { useEffect, useRef, useState } from 'react';
4
3
  import { withNativeProps } from '../../utils/native-props';
5
4
  import { mergeProps } from '../../utils/with-default-props';
5
+ import { AlphabetKeyboard } from './alphabet-keyboard';
6
6
  var classPrefix = 'ebscn-stock-keyboard';
7
7
  var defaultProps = {
8
8
  visible: false
@@ -16,13 +16,15 @@ export function StockKeyboard(p) {
16
16
  onClose = props.onClose,
17
17
  onClean = props.onClean,
18
18
  onConfirm = props.onConfirm,
19
- onChangeKeyBoard = props.onChangeKeyBoard;
20
- var keys = [1, 2, 3, 'X', 4, 5, 6, '清除', 7, 8, 9, '隐藏', 'ABC', 0, '', '确定'];
21
- var leftKeys = ['600', '601', '000', '002', '300'];
19
+ onSelectCN = props.onSelectCN;
20
+ var keys = [1, 2, 3, 'X', 4, 5, 6, '清除', 7, 8, 9, '隐藏', 'ABC', 0, '002', '确定'];
21
+ var leftKeys = ['600', '601', '000', '300'];
22
22
  var hideTimer = useRef(null);
23
23
  var appearTimer = useRef(null);
24
24
  var lastVisible = useRef(null);
25
- var keyFlag = useRef(0);
25
+ var _a = useState(1),
26
+ keyboardType = _a[0],
27
+ setKeyboardType = _a[1];
26
28
  useEffect(function () {
27
29
  if (!visible) {
28
30
  if (lastVisible.current) {
@@ -62,7 +64,9 @@ export function StockKeyboard(p) {
62
64
  case '确定':
63
65
  return onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
64
66
  case 'ABC':
65
- return onChangeKeyBoard === null || onChangeKeyBoard === void 0 ? void 0 : onChangeKeyBoard();
67
+ setKeyboardType(2);
68
+ return;
69
+ //return onChangeKeyBoard?.()
66
70
  default:
67
71
  return onInput === null || onInput === void 0 ? void 0 : onInput(key);
68
72
  }
@@ -71,6 +75,25 @@ export function StockKeyboard(p) {
71
75
  ref: keyboardRef,
72
76
  className: "".concat(classPrefix)
73
77
  }, React.createElement("div", {
78
+ className: "".concat(classPrefix, "-top")
79
+ }, React.createElement("div", {
80
+ onClick: function () {
81
+ return setKeyboardType(1);
82
+ },
83
+ className: "".concat(classPrefix, "-top-item ").concat(keyboardType === 1 ? "".concat(classPrefix, "-top-item-active") : '')
84
+ }, "123"), React.createElement("div", {
85
+ onClick: function () {
86
+ return setKeyboardType(2);
87
+ },
88
+ className: "".concat(classPrefix, "-top-item ").concat(keyboardType === 2 ? "".concat(classPrefix, "-top-item-active") : '')
89
+ }, "ABC"), React.createElement("div", {
90
+ onClick: function () {
91
+ return onSelectCN();
92
+ },
93
+ className: "".concat(classPrefix, "-top-item")
94
+ }, "\u4E2D\u6587")), keyboardType === 1 ? React.createElement("div", {
95
+ className: "".concat(classPrefix, "-bottom")
96
+ }, ' ', React.createElement("div", {
74
97
  className: "".concat(classPrefix, "-left")
75
98
  }, leftKeys.map(function (item, index) {
76
99
  return React.createElement("div", {
@@ -83,17 +106,25 @@ export function StockKeyboard(p) {
83
106
  }
84
107
  }, item !== 'X' ? item : '');
85
108
  })), React.createElement("div", {
86
- ref: keyboardRef,
87
109
  className: "".concat(classPrefix, "-right")
88
110
  }, keys.map(function (item, index) {
89
111
  return React.createElement("div", {
90
112
  key: item || index,
91
- className: cns(item !== '确定' ? "".concat(classPrefix, "-right-key") : "".concat(classPrefix, "-right-confirmKey"), typeof item !== 'number' && item.length && item !== '.' && item !== '确定' ? "".concat(classPrefix, "-right-option") : item == '确定' ? "".concat(classPrefix, "-right-confirmKey") : "".concat(classPrefix, "-right-number-key"), item === 'X' && "".concat(classPrefix, "-right-delete")),
113
+ className: cns("".concat(classPrefix, "-right-key"), item !== '确定' ? '' : "".concat(classPrefix, "-right-key ").concat(classPrefix, "-right-confirmKey"), item === 'ABC' || item === '002' ? "".concat(classPrefix, "-right-bottom-option") : '', typeof item !== 'number' && item !== 'ABC' && item !== '002' && item.length && item !== '.' && item !== '确定' ? "".concat(classPrefix, "-right-option") : item == '确定' ? "".concat(classPrefix, "-right-confirmKey") : "".concat(classPrefix, "-right-number-key"), item === 'X' && "".concat(classPrefix, "-right-delete")),
92
114
  onClick: function () {
93
115
  if (visible) {
94
116
  onKeyPress(item);
95
117
  }
96
118
  }
97
119
  }, item !== 'X' ? item : '');
98
- }))));
120
+ }))) : React.createElement(AlphabetKeyboard, {
121
+ visible: true,
122
+ onConfirm: onConfirm,
123
+ onDelete: onDelete,
124
+ onClose: onClose,
125
+ onInput: onInput,
126
+ onChangeKeyBoard: function () {
127
+ return setKeyboardType(1);
128
+ }
129
+ })));
99
130
  }