@composy/keyboard-vue 0.0.1

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 (107) hide show
  1. package/README.md +46 -0
  2. package/dist/index.css +797 -0
  3. package/dist/index.js +1250 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.min.css +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/es/components/KeyboardKey.js +17 -0
  8. package/es/components/KeyboardKey.js.map +1 -0
  9. package/es/components/KeyboardKey.vue_vue_type_script_setup_true_lang.js +131 -0
  10. package/es/components/KeyboardKey.vue_vue_type_script_setup_true_lang.js.map +1 -0
  11. package/es/components/KeyboardPopup.js +17 -0
  12. package/es/components/KeyboardPopup.js.map +1 -0
  13. package/es/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.js +164 -0
  14. package/es/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  15. package/es/components/LicensePlateKeyboard.js +17 -0
  16. package/es/components/LicensePlateKeyboard.js.map +1 -0
  17. package/es/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.js +97 -0
  18. package/es/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  19. package/es/components/VirtualKeyboard.js +17 -0
  20. package/es/components/VirtualKeyboard.js.map +1 -0
  21. package/es/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.js +127 -0
  22. package/es/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  23. package/es/components/index.d.ts +9 -0
  24. package/es/components/index.d.ts.map +1 -0
  25. package/es/components/index.js +15 -0
  26. package/es/composables/index.d.ts +7 -0
  27. package/es/composables/index.d.ts.map +1 -0
  28. package/es/composables/index.js +13 -0
  29. package/es/composables/useKeyboard.d.ts +113 -0
  30. package/es/composables/useKeyboard.d.ts.map +1 -0
  31. package/es/composables/useKeyboard.js +75 -0
  32. package/es/composables/useKeyboard.js.map +1 -0
  33. package/es/composables/useKeyboardPopup.d.ts +73 -0
  34. package/es/composables/useKeyboardPopup.d.ts.map +1 -0
  35. package/es/composables/useKeyboardPopup.js +119 -0
  36. package/es/composables/useKeyboardPopup.js.map +1 -0
  37. package/es/directives/index.d.ts +6 -0
  38. package/es/directives/index.d.ts.map +1 -0
  39. package/es/directives/index.js +12 -0
  40. package/es/directives/v-keyboard.d.ts +36 -0
  41. package/es/directives/v-keyboard.d.ts.map +1 -0
  42. package/es/directives/v-keyboard.js +65 -0
  43. package/es/directives/v-keyboard.js.map +1 -0
  44. package/es/index.d.ts +42 -0
  45. package/es/index.d.ts.map +1 -0
  46. package/es/index.js +34 -0
  47. package/es/index.js.map +1 -0
  48. package/es/plugins/engine-plugin.d.ts +37 -0
  49. package/es/plugins/engine-plugin.d.ts.map +1 -0
  50. package/es/plugins/engine-plugin.js +37 -0
  51. package/es/plugins/engine-plugin.js.map +1 -0
  52. package/es/plugins/index.d.ts +6 -0
  53. package/es/plugins/index.d.ts.map +1 -0
  54. package/es/plugins/index.js +12 -0
  55. package/es/style/css.js +1 -0
  56. package/es/style/index.js +1 -0
  57. package/es/style/index.less +1 -0
  58. package/es/styles/index.less +267 -0
  59. package/es/styles/keyboard.less +399 -0
  60. package/es/styles/themes.less +233 -0
  61. package/lib/components/KeyboardKey.cjs +21 -0
  62. package/lib/components/KeyboardKey.cjs.map +1 -0
  63. package/lib/components/KeyboardKey.vue_vue_type_script_setup_true_lang.cjs +131 -0
  64. package/lib/components/KeyboardKey.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
  65. package/lib/components/KeyboardPopup.cjs +21 -0
  66. package/lib/components/KeyboardPopup.cjs.map +1 -0
  67. package/lib/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.cjs +164 -0
  68. package/lib/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
  69. package/lib/components/LicensePlateKeyboard.cjs +21 -0
  70. package/lib/components/LicensePlateKeyboard.cjs.map +1 -0
  71. package/lib/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.cjs +97 -0
  72. package/lib/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
  73. package/lib/components/VirtualKeyboard.cjs +21 -0
  74. package/lib/components/VirtualKeyboard.cjs.map +1 -0
  75. package/lib/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.cjs +127 -0
  76. package/lib/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
  77. package/lib/components/index.cjs +19 -0
  78. package/lib/components/index.d.ts +9 -0
  79. package/lib/composables/index.cjs +15 -0
  80. package/lib/composables/index.d.ts +7 -0
  81. package/lib/composables/useKeyboard.cjs +76 -0
  82. package/lib/composables/useKeyboard.cjs.map +1 -0
  83. package/lib/composables/useKeyboard.d.ts +113 -0
  84. package/lib/composables/useKeyboardPopup.cjs +120 -0
  85. package/lib/composables/useKeyboardPopup.cjs.map +1 -0
  86. package/lib/composables/useKeyboardPopup.d.ts +73 -0
  87. package/lib/directives/index.cjs +13 -0
  88. package/lib/directives/index.d.ts +6 -0
  89. package/lib/directives/v-keyboard.cjs +66 -0
  90. package/lib/directives/v-keyboard.cjs.map +1 -0
  91. package/lib/directives/v-keyboard.d.ts +36 -0
  92. package/lib/index.cjs +537 -0
  93. package/lib/index.cjs.map +1 -0
  94. package/lib/index.d.ts +42 -0
  95. package/lib/package.json +3 -0
  96. package/lib/plugins/engine-plugin.cjs +37 -0
  97. package/lib/plugins/engine-plugin.cjs.map +1 -0
  98. package/lib/plugins/engine-plugin.d.ts +37 -0
  99. package/lib/plugins/index.cjs +13 -0
  100. package/lib/plugins/index.d.ts +6 -0
  101. package/lib/style/css.js +1 -0
  102. package/lib/style/index.css +2 -0
  103. package/lib/style/index.js +1 -0
  104. package/lib/styles/index.css +229 -0
  105. package/lib/styles/keyboard.css +346 -0
  106. package/lib/styles/themes.css +213 -0
  107. package/package.json +141 -0
@@ -0,0 +1,213 @@
1
+ /**
2
+ * LDesign Keyboard - 主题预设
3
+ * 简洁 · 现代 · 优雅
4
+ */
5
+ /* ====================
6
+ MIUI 主题 - 小米风格(默认)
7
+ ==================== */
8
+ [data-theme="miui"],
9
+ .keyboard-theme-miui {
10
+ --keyboard-bg: #f5f5f5;
11
+ --keyboard-key-bg: #ffffff;
12
+ --keyboard-key-color: #1a1a1a;
13
+ --keyboard-key-active-bg: #e8e8e8;
14
+ --keyboard-fn-key-bg: #e0e0e0;
15
+ --keyboard-fn-key-color: #666666;
16
+ --keyboard-fn-key-active-bg: #d0d0d0;
17
+ --keyboard-primary-bg: #ff6700;
18
+ --keyboard-primary-active-bg: #e55d00;
19
+ --keyboard-primary-color: #ffffff;
20
+ --keyboard-key-radius: 8px;
21
+ --keyboard-key-gap: 6px;
22
+ --keyboard-key-height: 46px;
23
+ --keyboard-font-size: 18px;
24
+ --keyboard-fn-font-size: 14px;
25
+ --keyboard-padding: 8px;
26
+ --keyboard-key-shadow: none;
27
+ }
28
+ [data-theme="miui"] .keyboard-key,
29
+ .keyboard-theme-miui .keyboard-key {
30
+ font-weight: 500;
31
+ }
32
+ /* ====================
33
+ iOS 主题 - 苹果风格
34
+ ==================== */
35
+ [data-theme="ios"],
36
+ .keyboard-theme-ios {
37
+ --keyboard-bg: #d1d3d9;
38
+ --keyboard-key-bg: #ffffff;
39
+ --keyboard-key-color: #000000;
40
+ --keyboard-key-active-bg: #c8cad0;
41
+ --keyboard-key-border: #a8aab4;
42
+ --keyboard-fn-key-bg: #adb0b8;
43
+ --keyboard-fn-key-color: #000000;
44
+ --keyboard-fn-key-active-bg: #9ea1a9;
45
+ --keyboard-primary-bg: #007aff;
46
+ --keyboard-primary-active-bg: #0066d6;
47
+ --keyboard-primary-color: #ffffff;
48
+ --keyboard-key-radius: 5px;
49
+ --keyboard-key-gap: 6px;
50
+ --keyboard-key-height: 43px;
51
+ --keyboard-font-size: 23px;
52
+ --keyboard-fn-font-size: 15px;
53
+ --keyboard-padding: 4px;
54
+ --keyboard-key-shadow: 0 1px 0 #a8aab4;
55
+ }
56
+ [data-theme="ios"] .keyboard-key,
57
+ .keyboard-theme-ios .keyboard-key {
58
+ font-weight: 400;
59
+ }
60
+ [data-theme="ios"] .keyboard-key:active,
61
+ .keyboard-theme-ios .keyboard-key:active {
62
+ transform: none;
63
+ }
64
+ /* ====================
65
+ Material 主题 - 质感设计
66
+ ==================== */
67
+ [data-theme="material"],
68
+ .keyboard-theme-material {
69
+ --keyboard-bg: #263238;
70
+ --keyboard-key-bg: #37474f;
71
+ --keyboard-key-color: #ffffff;
72
+ --keyboard-key-active-bg: #455a64;
73
+ --keyboard-fn-key-bg: #455a64;
74
+ --keyboard-fn-key-color: #b0bec5;
75
+ --keyboard-fn-key-active-bg: #546e7a;
76
+ --keyboard-primary-bg: #4caf50;
77
+ --keyboard-primary-active-bg: #43a047;
78
+ --keyboard-primary-color: #ffffff;
79
+ --keyboard-key-radius: 4px;
80
+ --keyboard-key-gap: 4px;
81
+ --keyboard-key-height: 48px;
82
+ --keyboard-font-size: 20px;
83
+ --keyboard-fn-font-size: 14px;
84
+ --keyboard-padding: 6px;
85
+ --keyboard-key-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
86
+ }
87
+ [data-theme="material"] .keyboard-key,
88
+ .keyboard-theme-material .keyboard-key {
89
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
90
+ }
91
+ [data-theme="material"] .keyboard-key:active,
92
+ .keyboard-theme-material .keyboard-key:active {
93
+ transform: none;
94
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
95
+ }
96
+ /* ====================
97
+ Minimal 极简主题 - 无边框
98
+ ==================== */
99
+ [data-theme="minimal"],
100
+ .keyboard-theme-minimal {
101
+ --keyboard-bg: rgba(250, 250, 250, 0.95);
102
+ --keyboard-key-bg: transparent;
103
+ --keyboard-key-color: #333333;
104
+ --keyboard-key-active-bg: rgba(0, 0, 0, 0.08);
105
+ --keyboard-fn-key-bg: transparent;
106
+ --keyboard-fn-key-color: #888888;
107
+ --keyboard-fn-key-active-bg: rgba(0, 0, 0, 0.08);
108
+ --keyboard-primary-bg: #333333;
109
+ --keyboard-primary-active-bg: #1a1a1a;
110
+ --keyboard-primary-color: #ffffff;
111
+ --keyboard-key-radius: 12px;
112
+ --keyboard-key-gap: 8px;
113
+ --keyboard-key-height: 44px;
114
+ --keyboard-font-size: 17px;
115
+ --keyboard-fn-font-size: 13px;
116
+ --keyboard-padding: 12px;
117
+ --keyboard-key-shadow: none;
118
+ }
119
+ [data-theme="minimal"] .keyboard-key,
120
+ .keyboard-theme-minimal .keyboard-key {
121
+ box-shadow: none;
122
+ }
123
+ [data-theme="minimal"] .keyboard-key:active,
124
+ .keyboard-theme-minimal .keyboard-key:active {
125
+ transform: scale(0.95);
126
+ }
127
+ /* ====================
128
+ Dark 深色主题
129
+ ==================== */
130
+ [data-theme="dark"],
131
+ .keyboard-theme-dark {
132
+ --keyboard-bg: #1c1c1e;
133
+ --keyboard-key-bg: #3a3a3c;
134
+ --keyboard-key-color: #ffffff;
135
+ --keyboard-key-active-bg: #4a4a4c;
136
+ --keyboard-fn-key-bg: #2c2c2e;
137
+ --keyboard-fn-key-color: #ebebf5;
138
+ --keyboard-fn-key-active-bg: #3c3c3e;
139
+ --keyboard-primary-bg: #0a84ff;
140
+ --keyboard-primary-active-bg: #0070e0;
141
+ --keyboard-primary-color: #ffffff;
142
+ --keyboard-key-radius: 8px;
143
+ --keyboard-key-gap: 6px;
144
+ --keyboard-key-height: 45px;
145
+ --keyboard-font-size: 18px;
146
+ --keyboard-fn-font-size: 14px;
147
+ --keyboard-padding: 8px;
148
+ --keyboard-key-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
149
+ }
150
+ [data-theme="dark"] .keyboard-key,
151
+ .keyboard-theme-dark .keyboard-key {
152
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
153
+ }
154
+ /* 深色车牌键盘特殊样式 */
155
+ [data-theme="dark"] .key-plate-special,
156
+ .keyboard-theme-dark .key-plate-special {
157
+ background-color: #4a3728;
158
+ color: #fcd34d;
159
+ }
160
+ /* ====================
161
+ Green 护眼主题
162
+ ==================== */
163
+ [data-theme="green"],
164
+ .keyboard-theme-green {
165
+ --keyboard-bg: #e8f5e9;
166
+ --keyboard-key-bg: #ffffff;
167
+ --keyboard-key-color: #2e7d32;
168
+ --keyboard-key-active-bg: #c8e6c9;
169
+ --keyboard-key-border: #a5d6a7;
170
+ --keyboard-fn-bg: #c8e6c9;
171
+ --keyboard-fn-color: #388e3c;
172
+ --keyboard-fn-active-bg: #a5d6a7;
173
+ --keyboard-primary-bg: #43a047;
174
+ --keyboard-primary-active-bg: #388e3c;
175
+ --keyboard-primary-color: #ffffff;
176
+ --keyboard-key-radius: 8px;
177
+ }
178
+ /* ====================
179
+ Blue 蓝色主题
180
+ ==================== */
181
+ [data-theme="blue"],
182
+ .keyboard-theme-blue {
183
+ --keyboard-bg: #e3f2fd;
184
+ --keyboard-key-bg: #ffffff;
185
+ --keyboard-key-color: #1565c0;
186
+ --keyboard-key-active-bg: #bbdefb;
187
+ --keyboard-key-border: #90caf9;
188
+ --keyboard-fn-bg: #bbdefb;
189
+ --keyboard-fn-color: #1976d2;
190
+ --keyboard-fn-active-bg: #90caf9;
191
+ --keyboard-primary-bg: #1976d2;
192
+ --keyboard-primary-active-bg: #1565c0;
193
+ --keyboard-primary-color: #ffffff;
194
+ --keyboard-key-radius: 8px;
195
+ }
196
+ /* ====================
197
+ 主题工具类
198
+ ==================== */
199
+ .keyboard-theme-light {
200
+ color-scheme: light;
201
+ }
202
+ .keyboard-theme-dark {
203
+ color-scheme: dark;
204
+ }
205
+ /* 平滑主题切换 */
206
+ .keyboard-popup,
207
+ .virtual-keyboard {
208
+ transition: background-color 0.2s ease;
209
+ }
210
+ .keyboard-key {
211
+ transition: background-color var(--keyboard-transition) ease, transform var(--keyboard-transition) ease;
212
+ }
213
+ /*# sourceMappingURL=src/styles/themes.less.map */
package/package.json ADDED
@@ -0,0 +1,141 @@
1
+ {
2
+ "name": "@composy/keyboard-vue",
3
+ "version": "0.0.1",
4
+ "description": "LDesign 虚拟键盘 - Vue 3 适配器",
5
+ "keywords": [
6
+ "keyboard",
7
+ "virtual-keyboard",
8
+ "input",
9
+ "license-plate",
10
+ "vue",
11
+ "vue3",
12
+ "composable",
13
+ "ldesign",
14
+ "typescript"
15
+ ],
16
+ "author": "LDesign Team",
17
+ "license": "MIT",
18
+ "type": "module",
19
+ "sideEffects": [
20
+ "*.vue",
21
+ "*.tsx",
22
+ "*.jsx",
23
+ "dist/*",
24
+ "es/**/style/**",
25
+ "esm/**/style/**"
26
+ ],
27
+ "exports": {
28
+ ".": {
29
+ "types": "./es/index.d.ts",
30
+ "import": "./es/index.js",
31
+ "require": "./lib/index.cjs",
32
+ "default": "./es/index.js"
33
+ },
34
+ "./components": {
35
+ "types": "./es/components/index.d.ts",
36
+ "import": "./es/components/index.js",
37
+ "require": "./lib/components/index.cjs",
38
+ "default": "./es/components/index.js"
39
+ },
40
+ "./components/*": {
41
+ "types": "./es/components/*.d.ts",
42
+ "import": "./es/components/*.js",
43
+ "require": "./lib/components/*.cjs",
44
+ "default": "./es/components/*.js"
45
+ },
46
+ "./composables": {
47
+ "types": "./es/composables/index.d.ts",
48
+ "import": "./es/composables/index.js",
49
+ "require": "./lib/composables/index.cjs",
50
+ "default": "./es/composables/index.js"
51
+ },
52
+ "./composables/*": {
53
+ "types": "./es/composables/*.d.ts",
54
+ "import": "./es/composables/*.js",
55
+ "require": "./lib/composables/*.cjs",
56
+ "default": "./es/composables/*.js"
57
+ },
58
+ "./directives": {
59
+ "types": "./es/directives/index.d.ts",
60
+ "import": "./es/directives/index.js",
61
+ "require": "./lib/directives/index.cjs",
62
+ "default": "./es/directives/index.js"
63
+ },
64
+ "./directives/*": {
65
+ "types": "./es/directives/*.d.ts",
66
+ "import": "./es/directives/*.js",
67
+ "require": "./lib/directives/*.cjs",
68
+ "default": "./es/directives/*.js"
69
+ },
70
+ "./plugins": {
71
+ "types": "./es/plugins/index.d.ts",
72
+ "import": "./es/plugins/index.js",
73
+ "require": "./lib/plugins/index.cjs",
74
+ "default": "./es/plugins/index.js"
75
+ },
76
+ "./plugins/*": {
77
+ "types": "./es/plugins/*.d.ts",
78
+ "import": "./es/plugins/*.js",
79
+ "require": "./lib/plugins/*.cjs",
80
+ "default": "./es/plugins/*.js"
81
+ },
82
+ "./index.css": "./dist/index.css",
83
+ "./index.min.css": "./dist/index.min.css",
84
+ "./style/index.css": "./lib/style/index.css",
85
+ "./styles/index.css": "./lib/styles/index.css",
86
+ "./styles/keyboard.css": "./lib/styles/keyboard.css",
87
+ "./styles/themes.css": "./lib/styles/themes.css",
88
+ "./style/index.less": "./es/style/index.less",
89
+ "./styles/index.less": "./es/styles/index.less",
90
+ "./styles/keyboard.less": "./es/styles/keyboard.less",
91
+ "./styles/themes.less": "./es/styles/themes.less",
92
+ "./package.json": "./package.json"
93
+ },
94
+ "main": "./lib/index.cjs",
95
+ "module": "./es/index.js",
96
+ "types": "./es/index.d.ts",
97
+ "unpkg": "./dist/index.min.js",
98
+ "jsdelivr": "./dist/index.min.js",
99
+ "files": [
100
+ "README.md",
101
+ "LICENSE",
102
+ "CHANGELOG.md",
103
+ "es",
104
+ "lib",
105
+ "dist"
106
+ ],
107
+ "scripts": {
108
+ "build": "ldesign-builder build",
109
+ "clean": "rimraf dist es esm cjs lib",
110
+ "dev": "ldesign-builder build --watch",
111
+ "lint": "eslint . --fix",
112
+ "lint:check": "eslint . --max-warnings 0",
113
+ "lint:fix": "eslint . --fix",
114
+ "type-check": "vue-tsc --noEmit",
115
+ "test": "ltesting run:unit",
116
+ "test:run": "ltesting run:unit",
117
+ "test:watch": "ltesting run:unit --watch",
118
+ "test:coverage": "ltesting run:unit --coverage",
119
+ "test:changed": "ltesting run:unit --changed",
120
+ "test:failed": "ltesting run:unit --failed",
121
+ "test:ui": "ltesting dashboard"
122
+ },
123
+ "dependencies": {
124
+ "@composy/keyboard-core": "^0.0.1"
125
+ },
126
+ "peerDependencies": {
127
+ "vue": "^3.5.32"
128
+ },
129
+ "devDependencies": {
130
+ "@antfu/eslint-config": "9.1.0",
131
+ "@composy/builder": "^0.0.1",
132
+ "@composy/testing": "^0.0.1",
133
+ "eslint": "10.7.0",
134
+ "rimraf": "^6.1.3",
135
+ "typescript": "5.9.3",
136
+ "vue": "3.5.39",
137
+ "vue-tsc": "^3.3.7"
138
+ },
139
+ "typings": "./es/index.d.ts",
140
+ "browser": "./dist/index.js"
141
+ }