@composy/keyboard-vue 0.0.1 → 0.0.2

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 (172) hide show
  1. package/README.md +48 -24
  2. package/dist/index.css +552 -560
  3. package/dist/index.js +228 -192
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.css +1 -1
  6. package/dist/index.min.js +954 -1
  7. package/dist/index.min.js.map +1 -0
  8. package/es/.dts-output-manifest.json +1 -0
  9. package/es/.dts.tsbuildinfo +1 -0
  10. package/es/components/KeyboardKey.js +1 -1
  11. package/es/components/KeyboardKey.js.map +1 -1
  12. package/es/components/KeyboardKey.vue_vue_type_script_setup_true_lang.js +16 -7
  13. package/es/components/KeyboardKey.vue_vue_type_script_setup_true_lang.js.map +1 -1
  14. package/es/components/KeyboardPopup.js +1 -1
  15. package/es/components/KeyboardPopup.js.map +1 -1
  16. package/es/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.js +8 -5
  17. package/es/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  18. package/es/components/LicensePlateKeyboard.js +1 -1
  19. package/es/components/LicensePlateKeyboard.js.map +1 -1
  20. package/es/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.js +2 -2
  21. package/es/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.js.map +1 -1
  22. package/es/components/VirtualKeyboard.js +1 -1
  23. package/es/components/VirtualKeyboard.js.map +1 -1
  24. package/es/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.js +4 -4
  25. package/es/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.js.map +1 -1
  26. package/es/components/index.d.ts +1 -2
  27. package/es/components/index.d.ts.map +1 -1
  28. package/es/components/index.js +1 -1
  29. package/es/composables/index.d.ts +0 -1
  30. package/es/composables/index.js +1 -1
  31. package/es/composables/useKeyboard.d.ts +1 -2
  32. package/es/composables/useKeyboard.d.ts.map +1 -1
  33. package/es/composables/useKeyboard.js +8 -15
  34. package/es/composables/useKeyboard.js.map +1 -1
  35. package/es/composables/useKeyboardPopup.d.ts +2 -51
  36. package/es/composables/useKeyboardPopup.d.ts.map +1 -1
  37. package/es/composables/useKeyboardPopup.js +66 -49
  38. package/es/composables/useKeyboardPopup.js.map +1 -1
  39. package/es/directives/index.d.ts +0 -1
  40. package/es/directives/index.js +1 -1
  41. package/es/directives/v-keyboard.d.ts +0 -1
  42. package/es/directives/v-keyboard.d.ts.map +1 -1
  43. package/es/directives/v-keyboard.js +10 -11
  44. package/es/directives/v-keyboard.js.map +1 -1
  45. package/es/index.d.ts +3 -4
  46. package/es/index.d.ts.map +1 -1
  47. package/es/index.js +2 -5
  48. package/es/index.js.map +1 -1
  49. package/es/plugins/engine-plugin.d.ts +0 -1
  50. package/es/plugins/engine-plugin.d.ts.map +1 -1
  51. package/es/plugins/engine-plugin.js +19 -4
  52. package/es/plugins/engine-plugin.js.map +1 -1
  53. package/es/plugins/index.d.ts +0 -1
  54. package/es/plugins/index.js +1 -1
  55. package/es/style/css.js +1 -1
  56. package/es/style/index.css +2 -0
  57. package/es/style/index.js +1 -1
  58. package/es/styles/index.css +391 -0
  59. package/es/styles/keyboard.css +252 -0
  60. package/es/styles/themes.css +137 -0
  61. package/esm/components/KeyboardKey.js +17 -0
  62. package/esm/components/KeyboardKey.js.map +1 -0
  63. package/esm/components/KeyboardKey.vue_vue_type_script_setup_true_lang.js +140 -0
  64. package/esm/components/KeyboardKey.vue_vue_type_script_setup_true_lang.js.map +1 -0
  65. package/esm/components/KeyboardPopup.js +17 -0
  66. package/esm/components/KeyboardPopup.js.map +1 -0
  67. package/esm/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.js +167 -0
  68. package/esm/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  69. package/esm/components/LicensePlateKeyboard.js +17 -0
  70. package/esm/components/LicensePlateKeyboard.js.map +1 -0
  71. package/esm/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.js +97 -0
  72. package/esm/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  73. package/esm/components/VirtualKeyboard.js +17 -0
  74. package/esm/components/VirtualKeyboard.js.map +1 -0
  75. package/esm/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.js +127 -0
  76. package/esm/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  77. package/{lib → esm}/components/index.d.ts +1 -1
  78. package/esm/components/index.d.ts.map +1 -0
  79. package/esm/components/index.js +15 -0
  80. package/esm/composables/index.d.ts.map +1 -0
  81. package/esm/composables/index.js +13 -0
  82. package/{lib → esm}/composables/useKeyboard.d.ts +1 -1
  83. package/esm/composables/useKeyboard.d.ts.map +1 -0
  84. package/esm/composables/useKeyboard.js +68 -0
  85. package/esm/composables/useKeyboard.js.map +1 -0
  86. package/esm/composables/useKeyboardPopup.d.ts +25 -0
  87. package/esm/composables/useKeyboardPopup.d.ts.map +1 -0
  88. package/esm/composables/useKeyboardPopup.js +136 -0
  89. package/esm/composables/useKeyboardPopup.js.map +1 -0
  90. package/esm/directives/index.d.ts.map +1 -0
  91. package/esm/directives/index.js +12 -0
  92. package/esm/directives/v-keyboard.d.ts.map +1 -0
  93. package/esm/directives/v-keyboard.js +64 -0
  94. package/esm/directives/v-keyboard.js.map +1 -0
  95. package/esm/index.d.ts +42 -0
  96. package/esm/index.d.ts.map +1 -0
  97. package/esm/index.js +34 -0
  98. package/esm/index.js.map +1 -0
  99. package/esm/plugins/engine-plugin.d.ts.map +1 -0
  100. package/esm/plugins/engine-plugin.js +53 -0
  101. package/esm/plugins/engine-plugin.js.map +1 -0
  102. package/esm/plugins/index.d.ts.map +1 -0
  103. package/esm/plugins/index.js +12 -0
  104. package/esm/style/css.js +1 -0
  105. package/esm/style/index.js +1 -0
  106. package/{es → esm}/style/index.less +1 -1
  107. package/esm/styles/index.less +5 -0
  108. package/esm/styles/keyboard.less +286 -0
  109. package/esm/styles/themes.less +164 -0
  110. package/lib/components/KeyboardKey.cjs +1 -1
  111. package/lib/components/KeyboardKey.cjs.map +1 -1
  112. package/lib/components/KeyboardKey.vue_vue_type_script_setup_true_lang.cjs +16 -7
  113. package/lib/components/KeyboardKey.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  114. package/lib/components/KeyboardPopup.cjs +1 -1
  115. package/lib/components/KeyboardPopup.cjs.map +1 -1
  116. package/lib/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.cjs +8 -5
  117. package/lib/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  118. package/lib/components/LicensePlateKeyboard.cjs +1 -1
  119. package/lib/components/LicensePlateKeyboard.cjs.map +1 -1
  120. package/lib/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.cjs +2 -2
  121. package/lib/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  122. package/lib/components/VirtualKeyboard.cjs +1 -1
  123. package/lib/components/VirtualKeyboard.cjs.map +1 -1
  124. package/lib/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.cjs +4 -4
  125. package/lib/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  126. package/lib/components/index.cjs +1 -1
  127. package/lib/components/index.d.cts +8 -0
  128. package/lib/components/index.d.cts.map +1 -0
  129. package/lib/composables/index.cjs +1 -1
  130. package/lib/composables/index.d.cts +6 -0
  131. package/lib/composables/index.d.cts.map +1 -0
  132. package/lib/composables/useKeyboard.cjs +8 -15
  133. package/lib/composables/useKeyboard.cjs.map +1 -1
  134. package/lib/composables/useKeyboard.d.cts +112 -0
  135. package/lib/composables/useKeyboard.d.cts.map +1 -0
  136. package/lib/composables/useKeyboardPopup.cjs +66 -49
  137. package/lib/composables/useKeyboardPopup.cjs.map +1 -1
  138. package/lib/composables/useKeyboardPopup.d.cts +24 -0
  139. package/lib/composables/useKeyboardPopup.d.cts.map +1 -0
  140. package/lib/directives/index.cjs +1 -1
  141. package/lib/directives/index.d.cts +5 -0
  142. package/lib/directives/index.d.cts.map +1 -0
  143. package/lib/directives/v-keyboard.cjs +10 -11
  144. package/lib/directives/v-keyboard.cjs.map +1 -1
  145. package/lib/directives/v-keyboard.d.cts +35 -0
  146. package/lib/directives/v-keyboard.d.cts.map +1 -0
  147. package/lib/index.cjs +2 -2
  148. package/lib/index.cjs.map +1 -1
  149. package/lib/index.d.cts +41 -0
  150. package/lib/index.d.cts.map +1 -0
  151. package/lib/plugins/engine-plugin.cjs +19 -3
  152. package/lib/plugins/engine-plugin.cjs.map +1 -1
  153. package/lib/plugins/engine-plugin.d.cts +36 -0
  154. package/lib/plugins/engine-plugin.d.cts.map +1 -0
  155. package/lib/plugins/index.cjs +1 -1
  156. package/lib/plugins/index.d.cts +5 -0
  157. package/lib/plugins/index.d.cts.map +1 -0
  158. package/lib/style/index.css +1 -1
  159. package/lib/styles/index.css +357 -195
  160. package/lib/styles/keyboard.css +92 -186
  161. package/lib/styles/themes.css +102 -178
  162. package/package.json +43 -34
  163. package/es/styles/index.less +0 -267
  164. package/es/styles/keyboard.less +0 -399
  165. package/es/styles/themes.less +0 -233
  166. package/lib/composables/useKeyboardPopup.d.ts +0 -73
  167. package/lib/index.d.ts +0 -42
  168. /package/{lib → esm}/composables/index.d.ts +0 -0
  169. /package/{lib → esm}/directives/index.d.ts +0 -0
  170. /package/{lib → esm}/directives/v-keyboard.d.ts +0 -0
  171. /package/{lib → esm}/plugins/engine-plugin.d.ts +0 -0
  172. /package/{lib → esm}/plugins/index.d.ts +0 -0
@@ -1,39 +1,27 @@
1
1
  /**
2
- * LDesign Keyboard - 核心样式
3
- * 简洁现代的默认主题
2
+ * LDesign Keyboard shared styles.
4
3
  */
5
- /* ====================
6
- CSS 变量 - 简洁主题
7
- ==================== */
8
4
  :root {
9
- /* 键盘背景 */
10
- --keyboard-bg: #f7f7f7;
11
- /* 普通按键 */
12
- --keyboard-key-bg: #ffffff;
13
- --keyboard-key-color: #333333;
14
- --keyboard-key-active-bg: #e5e5e5;
15
- --keyboard-key-border: #e0e0e0;
16
- /* 功能键 */
17
- --keyboard-fn-bg: #e8e8e8;
18
- --keyboard-fn-color: #666666;
19
- --keyboard-fn-active-bg: #d8d8d8;
20
- /* 主色调按键 */
21
- --keyboard-primary-bg: #2563eb;
22
- --keyboard-primary-active-bg: #1d4ed8;
23
- --keyboard-primary-color: #ffffff;
24
- /* 按键尺寸 */
25
- --keyboard-key-height: 48px;
26
- --keyboard-key-radius: 8px;
27
- --keyboard-key-gap: 6px;
28
- /* 字体 */
29
- --keyboard-font-size: 20px;
30
- --keyboard-fn-font-size: 14px;
31
- /* 动画 */
32
- --keyboard-transition: 80ms ease-out;
33
- }
34
- /* ====================
35
- 基础重置
36
- ==================== */
5
+ --keyboard-bg: var(--ld-bg-surface);
6
+ --keyboard-key-bg: var(--ld-bg-container);
7
+ --keyboard-key-color: var(--ld-text-primary);
8
+ --keyboard-key-active-bg: var(--ld-primary-50);
9
+ --keyboard-key-border: var(--ld-border);
10
+ --keyboard-fn-key-bg: var(--ld-bg-elevated);
11
+ --keyboard-fn-key-color: var(--ld-text-secondary);
12
+ --keyboard-fn-key-active-bg: var(--ld-primary-100);
13
+ --keyboard-primary-bg: var(--ld-primary-500);
14
+ --keyboard-primary-active-bg: var(--ld-primary-600);
15
+ --keyboard-primary-color: var(--ld-text-inverse);
16
+ --keyboard-mask-bg: color-mix(in srgb, var(--ld-black) 40%, var(--ld-transparent));
17
+ --keyboard-key-height: var(--ld-px-48);
18
+ --keyboard-key-radius: var(--ld-radius-md);
19
+ --keyboard-key-gap: var(--ld-spacing-sm);
20
+ --keyboard-font-size: var(--ld-font-lg);
21
+ --keyboard-fn-font-size: var(--ld-font-sm);
22
+ --keyboard-padding: var(--ld-spacing-sm);
23
+ --keyboard-key-shadow: var(--ld-shadow-sm, none);
24
+ }
37
25
  .virtual-keyboard,
38
26
  .virtual-keyboard *,
39
27
  .keyboard-popup,
@@ -43,7 +31,12 @@
43
31
  padding: 0;
44
32
  }
45
33
  .virtual-keyboard {
46
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
34
+ display: flex;
35
+ flex-direction: column;
36
+ width: 100%;
37
+ padding: var(--keyboard-padding);
38
+ background-color: var(--keyboard-bg);
39
+ font-family: var(--ld-font-family);
47
40
  -webkit-font-smoothing: antialiased;
48
41
  -moz-osx-font-smoothing: grayscale;
49
42
  -webkit-touch-callout: none;
@@ -51,17 +44,8 @@
51
44
  -moz-user-select: none;
52
45
  user-select: none;
53
46
  }
54
- /* ====================
55
- 键盘容器
56
- ==================== */
57
- .virtual-keyboard {
58
- display: flex;
59
- flex-direction: column;
60
- padding: 8px;
61
- background-color: var(--keyboard-bg);
62
- width: 100%;
63
- }
64
- .virtual-keyboard__row {
47
+ .virtual-keyboard__row,
48
+ .numpad-row {
65
49
  display: flex;
66
50
  justify-content: center;
67
51
  width: 100%;
@@ -71,18 +55,15 @@
71
55
  .virtual-keyboard__row:last-child {
72
56
  margin-bottom: 0;
73
57
  }
74
- /* ====================
75
- 按键基础样式
76
- ==================== */
77
58
  .keyboard-key {
78
59
  display: inline-flex;
60
+ flex: 1;
79
61
  align-items: center;
80
62
  justify-content: center;
81
- flex: 1;
82
- height: var(--keyboard-key-height);
83
63
  min-width: 0;
84
- padding: 0 4px;
85
- border: none;
64
+ height: var(--keyboard-key-height);
65
+ padding: 0 var(--ld-spacing-xs);
66
+ border: 0;
86
67
  border-radius: var(--keyboard-key-radius);
87
68
  background-color: var(--keyboard-key-bg);
88
69
  color: var(--keyboard-key-color);
@@ -90,9 +71,9 @@
90
71
  font-weight: 500;
91
72
  cursor: pointer;
92
73
  touch-action: manipulation;
93
- transition: background-color var(--keyboard-transition), transform var(--keyboard-transition);
74
+ transition: background-color var(--ld-duration-fast), transform var(--ld-duration-fast);
94
75
  -webkit-tap-highlight-color: transparent;
95
- box-shadow: 0 1px 0 var(--keyboard-key-border);
76
+ box-shadow: var(--keyboard-key-shadow);
96
77
  }
97
78
  .keyboard-key:active {
98
79
  background-color: var(--keyboard-key-active-bg);
@@ -103,192 +84,130 @@
103
84
  cursor: default;
104
85
  pointer-events: none;
105
86
  }
106
- /* ====================
107
- 功能键样式
108
- ==================== */
109
87
  .keyboard-key--backspace,
110
88
  .keyboard-key--shift,
111
89
  .keyboard-key--tab,
112
90
  .keyboard-key--clear,
113
91
  .keyboard-key--close {
114
- background-color: var(--keyboard-fn-bg);
115
- color: var(--keyboard-fn-color);
92
+ background-color: var(--keyboard-fn-key-bg);
93
+ color: var(--keyboard-fn-key-color);
116
94
  font-size: var(--keyboard-fn-font-size);
117
95
  font-weight: 400;
118
- box-shadow: 0 1px 0 var(--keyboard-key-border);
119
96
  }
120
97
  .keyboard-key--backspace:active,
121
98
  .keyboard-key--shift:active,
122
99
  .keyboard-key--tab:active,
123
100
  .keyboard-key--clear:active,
124
101
  .keyboard-key--close:active {
125
- background-color: var(--keyboard-fn-active-bg);
102
+ background-color: var(--keyboard-fn-key-active-bg);
126
103
  }
127
- /* Shift 激活状态 */
128
- .keyboard-key--shift.keyboard-key--active {
129
- background-color: var(--keyboard-primary-bg);
130
- color: var(--keyboard-primary-color);
131
- }
132
- /* ====================
133
- 主色按键(完成/确认)
134
- ==================== */
104
+ .keyboard-key--shift.keyboard-key--active,
135
105
  .keyboard-key--done,
136
106
  .keyboard-key--enter {
137
107
  background-color: var(--keyboard-primary-bg);
138
108
  color: var(--keyboard-primary-color);
139
- font-size: var(--keyboard-fn-font-size);
140
- font-weight: 500;
141
- box-shadow: none;
142
109
  }
143
110
  .keyboard-key--done:active,
144
111
  .keyboard-key--enter:active {
145
112
  background-color: var(--keyboard-primary-active-bg);
146
113
  }
147
- /* ====================
148
- 空格键
149
- ==================== */
150
114
  .keyboard-key--space {
151
115
  flex: 4;
152
116
  }
153
- /* ====================
154
- 占位键(透明)
155
- ==================== */
156
117
  .key-placeholder {
157
- background-color: transparent !important;
158
- box-shadow: none !important;
118
+ background-color: transparent;
119
+ box-shadow: none;
159
120
  cursor: default;
160
121
  pointer-events: none;
161
122
  }
162
- /* ====================
163
- 数字键盘通用样式
164
- ==================== */
165
- .numpad-row {
166
- display: flex;
167
- gap: var(--keyboard-key-gap);
168
- width: 100%;
169
- }
170
123
  .numpad-row .keyboard-key {
171
- flex: 1;
172
- height: 54px;
173
- font-size: 24px;
174
- font-weight: 500;
124
+ height: var(--ld-px-56);
125
+ font-size: var(--ld-font-xl);
175
126
  }
176
- /* 数字键 */
177
- .key-num {
127
+ .key-num,
128
+ .key-plate-province,
129
+ .key-plate-letter,
130
+ .key-plate-number {
178
131
  background-color: var(--keyboard-key-bg);
179
132
  color: var(--keyboard-key-color);
180
133
  }
181
- /* 功能键 */
182
- .key-numpad-fn {
183
- background-color: var(--keyboard-fn-bg);
184
- color: var(--keyboard-fn-color);
185
- font-size: 14px;
186
- font-weight: 400;
134
+ .key-numpad-fn,
135
+ .key-plate-fn,
136
+ .key-plate-switch {
137
+ background-color: var(--keyboard-fn-key-bg);
138
+ color: var(--keyboard-fn-key-color);
139
+ font-size: var(--keyboard-fn-font-size);
187
140
  }
188
- /* 完成键 */
189
- .key-numpad-done {
141
+ .key-numpad-done,
142
+ .key-plate-done {
190
143
  background-color: var(--keyboard-primary-bg);
191
144
  color: var(--keyboard-primary-color);
192
- font-size: 16px;
193
- font-weight: 500;
145
+ font-size: var(--keyboard-fn-font-size);
194
146
  box-shadow: none;
195
147
  }
196
- .key-numpad-done:active {
148
+ .key-numpad-done:active,
149
+ .key-plate-done:active {
197
150
  background-color: var(--keyboard-primary-active-bg);
198
151
  }
199
- /* ====================
200
- 车牌键盘样式
201
- ==================== */
202
152
  .virtual-keyboard:has(.plate-keyboard-row) {
203
- min-width: 340px;
153
+ min-width: var(--ld-px-280);
204
154
  }
205
155
  .plate-keyboard-row {
206
156
  display: flex;
207
- gap: 3px;
208
- width: 100%;
209
157
  flex-wrap: nowrap;
158
+ width: 100%;
159
+ gap: var(--ld-spacing-xs);
210
160
  }
211
161
  .plate-keyboard-row .keyboard-key {
212
162
  flex: 1 1 0;
213
- height: 42px;
214
- min-width: 28px;
215
- max-width: none;
216
- padding: 0 2px;
217
- font-size: 15px;
218
- font-weight: 500;
219
- border-radius: 5px;
220
- }
221
- .key-plate-province,
222
- .key-plate-letter,
223
- .key-plate-number {
224
- background-color: var(--keyboard-key-bg);
163
+ min-width: var(--ld-px-28);
164
+ height: var(--ld-px-42);
165
+ padding: 0 var(--ld-px-2);
166
+ font-size: var(--ld-font-sm);
167
+ border-radius: var(--ld-radius-sm);
225
168
  }
226
169
  .key-plate-fn {
227
- background-color: var(--keyboard-fn-bg);
228
- font-size: 12px;
229
170
  flex: 1.2 1 0 !important;
230
171
  }
231
172
  .key-plate-done {
232
- background-color: var(--keyboard-primary-bg);
233
- color: var(--keyboard-primary-color);
234
- font-size: 13px;
235
- box-shadow: none;
236
173
  flex: 1.5 1 0 !important;
237
174
  }
238
175
  .key-plate-switch {
239
- background-color: var(--keyboard-fn-bg);
240
- font-size: 12px;
241
176
  flex: 1.3 1 0 !important;
242
177
  }
243
178
  .key-plate-special {
244
- background-color: #fef3c7;
245
- color: #92400e;
179
+ background-color: var(--ld-warning-50);
180
+ color: var(--ld-warning-700);
246
181
  }
247
- /* ====================
248
- 弹出层样式
249
- ==================== */
250
182
  .keyboard-popup {
251
183
  position: fixed;
252
184
  z-index: 1000;
253
- background-color: var(--keyboard-bg);
254
185
  overflow: hidden;
186
+ background-color: var(--keyboard-bg);
255
187
  }
256
188
  .keyboard-popup--desktop {
257
- border-radius: 12px;
258
- box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
259
- min-width: 300px;
189
+ min-width: var(--ld-px-280);
190
+ border-radius: var(--ld-radius-lg);
191
+ box-shadow: var(--ld-shadow-lg, none);
260
192
  }
261
193
  .keyboard-popup--mobile {
262
- position: fixed;
263
- left: 0;
264
194
  right: 0;
265
195
  bottom: 0;
196
+ left: 0;
266
197
  border-radius: 0;
267
- border-top-left-radius: 12px;
268
- border-top-right-radius: 12px;
269
- box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
270
- }
271
- /* 安全区域 */
272
- @supports (padding-bottom: env(safe-area-inset-bottom)) {
273
- .keyboard-popup--mobile {
274
- padding-bottom: env(safe-area-inset-bottom);
275
- }
198
+ border-top-left-radius: var(--ld-radius-lg);
199
+ border-top-right-radius: var(--ld-radius-lg);
200
+ box-shadow: var(--ld-shadow-md, none);
276
201
  }
277
- /* ====================
278
- 遮罩层
279
- ==================== */
280
202
  .keyboard-mask {
281
203
  position: fixed;
282
204
  inset: 0;
283
- background-color: rgba(0, 0, 0, 0.3);
284
205
  z-index: 999;
206
+ background-color: var(--keyboard-mask-bg);
285
207
  }
286
- /* ====================
287
- 动画
288
- ==================== */
289
208
  .keyboard-mask-enter-active,
290
209
  .keyboard-mask-leave-active {
291
- transition: opacity 0.2s ease;
210
+ transition: opacity var(--ld-duration-fast);
292
211
  }
293
212
  .keyboard-mask-enter-from,
294
213
  .keyboard-mask-leave-to {
@@ -296,51 +215,38 @@
296
215
  }
297
216
  .keyboard-fade-enter-active,
298
217
  .keyboard-fade-leave-active {
299
- transition: opacity 0.15s ease, transform 0.15s ease;
218
+ transition: opacity var(--ld-duration-fast), transform var(--ld-duration-fast);
300
219
  }
301
220
  .keyboard-fade-enter-from,
302
221
  .keyboard-fade-leave-to {
303
222
  opacity: 0;
304
- transform: translateY(-4px) scale(0.98);
223
+ transform: translateY(calc(-1 * var(--ld-px-4))) scale(0.98);
305
224
  }
306
225
  .keyboard-slide-enter-active,
307
226
  .keyboard-slide-leave-active {
308
- transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
227
+ transition: transform var(--ld-duration-normal);
309
228
  }
310
229
  .keyboard-slide-enter-from,
311
230
  .keyboard-slide-leave-to {
312
231
  transform: translateY(100%);
313
232
  }
314
- /* ====================
315
- 移动端适配
316
- ==================== */
317
- @media (max-width: 768px) {
233
+ @media (max-width: 48em) {
318
234
  .virtual-keyboard {
319
- padding: 6px;
235
+ padding: var(--ld-spacing-xs);
320
236
  }
321
237
  .keyboard-key {
322
- height: 44px;
323
- }
324
- .numpad-row .keyboard-key {
325
- height: 52px;
326
- font-size: 22px;
327
- }
328
- .plate-keyboard-row .keyboard-key {
329
- height: 40px;
330
- font-size: 15px;
238
+ height: var(--ld-px-48);
331
239
  }
332
240
  }
333
- /* ====================
334
- 横屏适配
335
- ==================== */
336
- @media (orientation: landscape) and (max-height: 500px) {
241
+ @media (orientation: landscape) and (max-height: 32em) {
337
242
  .keyboard-key {
338
- height: 36px;
339
- font-size: 16px;
243
+ height: var(--ld-px-36);
244
+ font-size: var(--ld-font-base);
340
245
  }
341
- .numpad-row .keyboard-key {
342
- height: 42px;
343
- font-size: 18px;
246
+ }
247
+ @supports (padding-bottom: env(safe-area-inset-bottom)) {
248
+ .keyboard-popup--mobile {
249
+ padding-bottom: env(safe-area-inset-bottom);
344
250
  }
345
251
  }
346
- /*# sourceMappingURL=src/styles/keyboard.less.map */
252
+ /*# sourceMappingURL=src\styles\keyboard.less.map */