@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.
- package/README.md +48 -24
- package/dist/index.css +552 -560
- package/dist/index.js +228 -192
- package/dist/index.js.map +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.min.js +954 -1
- package/dist/index.min.js.map +1 -0
- package/es/.dts-output-manifest.json +1 -0
- package/es/.dts.tsbuildinfo +1 -0
- package/es/components/KeyboardKey.js +1 -1
- package/es/components/KeyboardKey.js.map +1 -1
- package/es/components/KeyboardKey.vue_vue_type_script_setup_true_lang.js +16 -7
- package/es/components/KeyboardKey.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/es/components/KeyboardPopup.js +1 -1
- package/es/components/KeyboardPopup.js.map +1 -1
- package/es/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.js +8 -5
- package/es/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/es/components/LicensePlateKeyboard.js +1 -1
- package/es/components/LicensePlateKeyboard.js.map +1 -1
- package/es/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/es/components/VirtualKeyboard.js +1 -1
- package/es/components/VirtualKeyboard.js.map +1 -1
- package/es/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/es/components/index.d.ts +1 -2
- package/es/components/index.d.ts.map +1 -1
- package/es/components/index.js +1 -1
- package/es/composables/index.d.ts +0 -1
- package/es/composables/index.js +1 -1
- package/es/composables/useKeyboard.d.ts +1 -2
- package/es/composables/useKeyboard.d.ts.map +1 -1
- package/es/composables/useKeyboard.js +8 -15
- package/es/composables/useKeyboard.js.map +1 -1
- package/es/composables/useKeyboardPopup.d.ts +2 -51
- package/es/composables/useKeyboardPopup.d.ts.map +1 -1
- package/es/composables/useKeyboardPopup.js +66 -49
- package/es/composables/useKeyboardPopup.js.map +1 -1
- package/es/directives/index.d.ts +0 -1
- package/es/directives/index.js +1 -1
- package/es/directives/v-keyboard.d.ts +0 -1
- package/es/directives/v-keyboard.d.ts.map +1 -1
- package/es/directives/v-keyboard.js +10 -11
- package/es/directives/v-keyboard.js.map +1 -1
- package/es/index.d.ts +3 -4
- package/es/index.d.ts.map +1 -1
- package/es/index.js +2 -5
- package/es/index.js.map +1 -1
- package/es/plugins/engine-plugin.d.ts +0 -1
- package/es/plugins/engine-plugin.d.ts.map +1 -1
- package/es/plugins/engine-plugin.js +19 -4
- package/es/plugins/engine-plugin.js.map +1 -1
- package/es/plugins/index.d.ts +0 -1
- package/es/plugins/index.js +1 -1
- package/es/style/css.js +1 -1
- package/es/style/index.css +2 -0
- package/es/style/index.js +1 -1
- package/es/styles/index.css +391 -0
- package/es/styles/keyboard.css +252 -0
- package/es/styles/themes.css +137 -0
- package/esm/components/KeyboardKey.js +17 -0
- package/esm/components/KeyboardKey.js.map +1 -0
- package/esm/components/KeyboardKey.vue_vue_type_script_setup_true_lang.js +140 -0
- package/esm/components/KeyboardKey.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/esm/components/KeyboardPopup.js +17 -0
- package/esm/components/KeyboardPopup.js.map +1 -0
- package/esm/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.js +167 -0
- package/esm/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/esm/components/LicensePlateKeyboard.js +17 -0
- package/esm/components/LicensePlateKeyboard.js.map +1 -0
- package/esm/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.js +97 -0
- package/esm/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/esm/components/VirtualKeyboard.js +17 -0
- package/esm/components/VirtualKeyboard.js.map +1 -0
- package/esm/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.js +127 -0
- package/esm/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/{lib → esm}/components/index.d.ts +1 -1
- package/esm/components/index.d.ts.map +1 -0
- package/esm/components/index.js +15 -0
- package/esm/composables/index.d.ts.map +1 -0
- package/esm/composables/index.js +13 -0
- package/{lib → esm}/composables/useKeyboard.d.ts +1 -1
- package/esm/composables/useKeyboard.d.ts.map +1 -0
- package/esm/composables/useKeyboard.js +68 -0
- package/esm/composables/useKeyboard.js.map +1 -0
- package/esm/composables/useKeyboardPopup.d.ts +25 -0
- package/esm/composables/useKeyboardPopup.d.ts.map +1 -0
- package/esm/composables/useKeyboardPopup.js +136 -0
- package/esm/composables/useKeyboardPopup.js.map +1 -0
- package/esm/directives/index.d.ts.map +1 -0
- package/esm/directives/index.js +12 -0
- package/esm/directives/v-keyboard.d.ts.map +1 -0
- package/esm/directives/v-keyboard.js +64 -0
- package/esm/directives/v-keyboard.js.map +1 -0
- package/esm/index.d.ts +42 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +34 -0
- package/esm/index.js.map +1 -0
- package/esm/plugins/engine-plugin.d.ts.map +1 -0
- package/esm/plugins/engine-plugin.js +53 -0
- package/esm/plugins/engine-plugin.js.map +1 -0
- package/esm/plugins/index.d.ts.map +1 -0
- package/esm/plugins/index.js +12 -0
- package/esm/style/css.js +1 -0
- package/esm/style/index.js +1 -0
- package/{es → esm}/style/index.less +1 -1
- package/esm/styles/index.less +5 -0
- package/esm/styles/keyboard.less +286 -0
- package/esm/styles/themes.less +164 -0
- package/lib/components/KeyboardKey.cjs +1 -1
- package/lib/components/KeyboardKey.cjs.map +1 -1
- package/lib/components/KeyboardKey.vue_vue_type_script_setup_true_lang.cjs +16 -7
- package/lib/components/KeyboardKey.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/lib/components/KeyboardPopup.cjs +1 -1
- package/lib/components/KeyboardPopup.cjs.map +1 -1
- package/lib/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.cjs +8 -5
- package/lib/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/lib/components/LicensePlateKeyboard.cjs +1 -1
- package/lib/components/LicensePlateKeyboard.cjs.map +1 -1
- package/lib/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.cjs +2 -2
- package/lib/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/lib/components/VirtualKeyboard.cjs +1 -1
- package/lib/components/VirtualKeyboard.cjs.map +1 -1
- package/lib/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.cjs +4 -4
- package/lib/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.cts +8 -0
- package/lib/components/index.d.cts.map +1 -0
- package/lib/composables/index.cjs +1 -1
- package/lib/composables/index.d.cts +6 -0
- package/lib/composables/index.d.cts.map +1 -0
- package/lib/composables/useKeyboard.cjs +8 -15
- package/lib/composables/useKeyboard.cjs.map +1 -1
- package/lib/composables/useKeyboard.d.cts +112 -0
- package/lib/composables/useKeyboard.d.cts.map +1 -0
- package/lib/composables/useKeyboardPopup.cjs +66 -49
- package/lib/composables/useKeyboardPopup.cjs.map +1 -1
- package/lib/composables/useKeyboardPopup.d.cts +24 -0
- package/lib/composables/useKeyboardPopup.d.cts.map +1 -0
- package/lib/directives/index.cjs +1 -1
- package/lib/directives/index.d.cts +5 -0
- package/lib/directives/index.d.cts.map +1 -0
- package/lib/directives/v-keyboard.cjs +10 -11
- package/lib/directives/v-keyboard.cjs.map +1 -1
- package/lib/directives/v-keyboard.d.cts +35 -0
- package/lib/directives/v-keyboard.d.cts.map +1 -0
- package/lib/index.cjs +2 -2
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +41 -0
- package/lib/index.d.cts.map +1 -0
- package/lib/plugins/engine-plugin.cjs +19 -3
- package/lib/plugins/engine-plugin.cjs.map +1 -1
- package/lib/plugins/engine-plugin.d.cts +36 -0
- package/lib/plugins/engine-plugin.d.cts.map +1 -0
- package/lib/plugins/index.cjs +1 -1
- package/lib/plugins/index.d.cts +5 -0
- package/lib/plugins/index.d.cts.map +1 -0
- package/lib/style/index.css +1 -1
- package/lib/styles/index.css +357 -195
- package/lib/styles/keyboard.css +92 -186
- package/lib/styles/themes.css +102 -178
- package/package.json +43 -34
- package/es/styles/index.less +0 -267
- package/es/styles/keyboard.less +0 -399
- package/es/styles/themes.less +0 -233
- package/lib/composables/useKeyboardPopup.d.ts +0 -73
- package/lib/index.d.ts +0 -42
- /package/{lib → esm}/composables/index.d.ts +0 -0
- /package/{lib → esm}/directives/index.d.ts +0 -0
- /package/{lib → esm}/directives/v-keyboard.d.ts +0 -0
- /package/{lib → esm}/plugins/engine-plugin.d.ts +0 -0
- /package/{lib → esm}/plugins/index.d.ts +0 -0
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * @composy/keyboard-vue\n * LDesign 虚拟键盘 - Vue 3 适配器\n * @packageDocumentation\n */\n\nimport type { App, Plugin } from 'vue'\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\r\n * @composy/keyboard-vue\r\n * LDesign 虚拟键盘 - Vue 3 适配器\r\n * @packageDocumentation\r\n */\r\n\r\nimport type { App, Plugin } from 'vue'\r\nimport {\r\n KeyboardPopup,\r\n LicensePlateKeyboard,\r\n VirtualKeyboard,\r\n} from './components'\r\nimport { vKeyboard } from './directives/v-keyboard'\r\n\r\n// 导出组件\r\nexport * from './components'\r\n\r\n// 导出 Composables\r\nexport * from './composables'\r\n\r\n// 导出指令\r\nexport * from './directives'\r\n\r\n// 导出插件\r\nexport * from './plugins'\r\n\r\n// 从核心包重新导出\r\nexport {\r\n amountLayout,\r\n amountSimpleLayout,\r\n applyFormatter,\r\n applyTheme,\r\n bankcardLayout,\r\n // 管理器\r\n createKeyboardManager,\r\n createKeyboardRenderer,\r\n createPositionManager,\r\n createRandomLetterLayout,\r\n createRandomMixedLayout,\r\n createRandomNumberLayout,\r\n createRandomPinLayout,\r\n createTheme,\r\n darkTheme,\r\n defaultTheme,\r\n deleteCharBeforeCursor,\r\n EMAIL_SUFFIXES,\r\n emailLayout,\r\n // 工具函数\r\n EventEmitter,\r\n formatAmount,\r\n formatBankCard,\r\n formatIdCard,\r\n formatLicensePlate,\r\n // 格式化工具\r\n formatPhone,\r\n formatVerifyCode,\r\n generateThemeStyle,\r\n getAllThemes,\r\n getAvailableLayouts,\r\n getAvailableThemes,\r\n getBoundingRect,\r\n getCurrentTheme,\r\n getDeviceType,\r\n getFormatter,\r\n // 布局\r\n getLayout,\r\n getRandomAlphanumeric,\r\n getRandomLetters,\r\n getRandomNumbers,\r\n // 主题系统\r\n getTheme,\r\n getViewportInfo,\r\n hasLayout,\r\n // 场景化键盘\r\n idcardLayout,\r\n insertTextAtCursor,\r\n integerLayout,\r\n iosTheme,\r\n isMobile,\r\n isTouchDevice,\r\n KeyboardManager,\r\n KeyboardRenderer,\r\n licensePlateAlphanumericLayout,\r\n licensePlateLayout,\r\n licensePlateLetterLayout,\r\n licensePlateProvinceLayout,\r\n materialTheme,\r\n mergeTheme,\r\n minimalTheme,\r\n miuiTheme,\r\n numberLayout,\r\n onClickOutside,\r\n onViewportChange,\r\n phoneLayout,\r\n phoneSimpleLayout,\r\n PLATE_LETTERS,\r\n PositionManager,\r\n presetThemes,\r\n PROVINCES,\r\n punctLayout,\r\n qwertyLayout,\r\n refreshRandomLayout,\r\n registerFormatter,\r\n registerLayout,\r\n registerLayouts,\r\n registerTheme,\r\n searchLayout,\r\n setCurrentTheme,\r\n // 随机键盘\r\n shuffleArray,\r\n symbolLayout,\r\n symbolLayout2,\r\n themeToCSS,\r\n unregisterLayout,\r\n urlLayout,\r\n verifycodeLayout,\r\n vibrate,\r\n} from '@composy/keyboard-core'\r\n\r\n// 导出类型\r\nexport type {\r\n BoundingRect,\r\n DeviceType,\r\n // 格式化类型\r\n FormatterFunction,\r\n KeyboardConfig,\r\n KeyboardEventMap,\r\n KeyboardOptions,\r\n // 渲染器类型\r\n KeyboardRendererOptions,\r\n KeyboardRow,\r\n KeyboardState,\r\n KeyboardType,\r\n KeyDefinition,\r\n KeyType,\r\n PopupPlacement,\r\n PopupPositionConfig,\r\n PopupPositionResult,\r\n Position,\r\n Size,\r\n ThemeColors,\r\n ThemeConfig,\r\n ThemeCSSVariables,\r\n ThemeEffects,\r\n // 主题类型\r\n ThemeName,\r\n ThemeSizes,\r\n ViewportInfo,\r\n} from '@composy/keyboard-core'\r\n\r\n/**\r\n * 键盘插件配置\r\n */\r\nexport interface KeyboardPluginOptions {\r\n /**\r\n * 组件前缀\r\n * @default 'L'\r\n */\r\n prefix?: string\r\n}\r\n\r\n/**\r\n * 原生 Vue 项目键盘插件\r\n * 用于全局注册键盘组件和指令\r\n *\r\n * @example\r\n * ```typescript\r\n * import { createApp } from 'vue'\r\n * import { KeyboardVuePlugin } from '@composy/keyboard-vue'\r\n *\r\n * const app = createApp(App)\r\n * app.use(KeyboardVuePlugin, { prefix: 'L' })\r\n * ```\r\n */\r\nexport const KeyboardVuePlugin: Plugin = {\r\n install(app: App, options: KeyboardPluginOptions = {}) {\r\n const prefix = options.prefix ?? 'L'\r\n\r\n // 注册组件\r\n app.component(`${prefix}Keyboard`, VirtualKeyboard)\r\n app.component(`${prefix}KeyboardPopup`, KeyboardPopup)\r\n app.component(`${prefix}LicensePlateKeyboard`, LicensePlateKeyboard)\r\n\r\n // 注册指令\r\n app.directive('keyboard', vKeyboard)\r\n },\r\n}\r\n\r\n/**\r\n * @deprecated 使用 KeyboardVuePlugin 代替\r\n */\r\nexport const KeyboardPlugin = KeyboardVuePlugin\r\n\r\n// 默认导出插件\r\nexport default KeyboardVuePlugin\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8KO,MAAM,oBAA4B,EACvC,QAAQ,KAAU,UAAiC,CAAC,GAAG;CACrD,MAAM,SAAS,QAAQ,UAAU;CAGjC,IAAI,UAAU,GAAG,OAAM,WAAY,uBAAe;CAClD,IAAI,UAAU,GAAG,OAAM,gBAAiB,qBAAa;CACrD,IAAI,UAAU,GAAG,OAAM,uBAAwB,4BAAoB;CAGnE,IAAI,UAAU,YAAY,SAAS;AACrC,EACF;AAKO,MAAM,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/engine-plugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"engine-plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/engine-plugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiDH;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB;;;qBAIR,OAAO,YAAY,2BAA2B;CAyBtE,CAAA"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ***********************************
|
|
3
3
|
* @composy/keyboard-vue v0.0.1 *
|
|
4
4
|
* Built with rollup *
|
|
5
|
-
* Build time: 2024-
|
|
5
|
+
* Build time: 2024-10-12 17:44:15 *
|
|
6
6
|
* Build mode: production *
|
|
7
7
|
* Minified: No *
|
|
8
8
|
* ***********************************
|
|
@@ -10,22 +10,37 @@
|
|
|
10
10
|
import VirtualKeyboard_default from "../components/VirtualKeyboard.js";
|
|
11
11
|
import KeyboardPopup_default from "../components/KeyboardPopup.js";
|
|
12
12
|
import LicensePlateKeyboard_default from "../components/LicensePlateKeyboard.js";
|
|
13
|
-
import "../components/index.js";
|
|
14
13
|
import { vKeyboard } from "../directives/v-keyboard.js";
|
|
15
14
|
//#region src/plugins/engine-plugin.ts
|
|
15
|
+
function isRecord(value) {
|
|
16
|
+
return typeof value === "object" && value !== null;
|
|
17
|
+
}
|
|
18
|
+
function isVueApp(value) {
|
|
19
|
+
return isRecord(value) && typeof value.component === "function" && typeof value.directive === "function";
|
|
20
|
+
}
|
|
21
|
+
function getEngineContext(value) {
|
|
22
|
+
if (!isRecord(value)) return {};
|
|
23
|
+
const framework = isRecord(value.framework) ? value.framework : void 0;
|
|
24
|
+
const container = isRecord(value.container) ? value.container : void 0;
|
|
25
|
+
return {
|
|
26
|
+
framework: isVueApp(framework?.app) ? { app: framework.app } : void 0,
|
|
27
|
+
container: typeof container?.singleton === "function" ? { singleton: container.singleton } : void 0
|
|
28
|
+
};
|
|
29
|
+
}
|
|
16
30
|
const KeyboardEnginePlugin = {
|
|
17
31
|
name: "keyboard",
|
|
18
32
|
version: "0.1.0",
|
|
19
33
|
async install(context, options) {
|
|
20
34
|
const prefix = options?.prefix ?? "L";
|
|
21
|
-
const
|
|
35
|
+
const engineContext = getEngineContext(context);
|
|
36
|
+
const app = engineContext.framework?.app;
|
|
22
37
|
if (app) {
|
|
23
38
|
app.component(`${prefix}Keyboard`, VirtualKeyboard_default);
|
|
24
39
|
app.component(`${prefix}KeyboardPopup`, KeyboardPopup_default);
|
|
25
40
|
app.component(`${prefix}LicensePlateKeyboard`, LicensePlateKeyboard_default);
|
|
26
41
|
app.directive("keyboard", vKeyboard);
|
|
27
42
|
}
|
|
28
|
-
if (
|
|
43
|
+
if (engineContext.container?.singleton) engineContext.container.singleton("keyboard", {
|
|
29
44
|
name: "keyboard",
|
|
30
45
|
version: "0.1.0"
|
|
31
46
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-plugin.js","names":[],"sources":["../../src/plugins/engine-plugin.ts"],"sourcesContent":["/**\n * 键盘 Engine 插件\n * 适配 @composy/engine-vue 的插件\n * @module plugins/engine-plugin\n */\n\nimport type { App } from 'vue'\nimport {
|
|
1
|
+
{"version":3,"file":"engine-plugin.js","names":[],"sources":["../../src/plugins/engine-plugin.ts"],"sourcesContent":["/**\r\n * 键盘 Engine 插件\r\n * 适配 @composy/engine-vue 的插件\r\n * @module plugins/engine-plugin\r\n */\r\n\r\nimport type { App } from 'vue'\r\nimport {\r\n KeyboardPopup,\r\n LicensePlateKeyboard,\r\n VirtualKeyboard,\r\n} from '../components'\r\nimport { vKeyboard } from '../directives/v-keyboard'\r\n\r\ninterface KeyboardEngineContext {\r\n framework?: {\r\n app?: App\r\n }\r\n container?: {\r\n singleton?: (name: string, value: { name: string; version: string }) => void\r\n }\r\n}\r\n\r\nfunction isRecord(value: unknown): value is Record<string, unknown> {\r\n return typeof value === 'object' && value !== null\r\n}\r\n\r\nfunction isVueApp(value: unknown): value is App {\r\n return (\r\n isRecord(value) &&\r\n typeof value.component === 'function' &&\r\n typeof value.directive === 'function'\r\n )\r\n}\r\n\r\nfunction getEngineContext(value: unknown): KeyboardEngineContext {\r\n if (!isRecord(value)) return {}\r\n\r\n const framework = isRecord(value.framework) ? value.framework : undefined\r\n const container = isRecord(value.container) ? value.container : undefined\r\n\r\n return {\r\n framework: isVueApp(framework?.app) ? { app: framework.app } : undefined,\r\n container:\r\n typeof container?.singleton === 'function'\r\n ? {\r\n singleton:\r\n container.singleton as KeyboardEngineContext['container']['singleton'],\r\n }\r\n : undefined,\r\n }\r\n}\r\n\r\n/**\r\n * Engine 插件接口(兼容 @composy/engine-core Plugin)\r\n */\r\nexport interface KeyboardEnginePluginOptions {\r\n /**\r\n * 组件前缀\r\n * @default 'L'\r\n */\r\n prefix?: string\r\n}\r\n\r\n/**\r\n * 键盘 Engine 插件\r\n *\r\n * 符合 @composy/engine-core Plugin 接口规范\r\n * 通过 engine.use(KeyboardEnginePlugin) 安装\r\n *\r\n * @example\r\n * ```typescript\r\n * import { createVueEngine } from '@composy/engine-vue'\r\n * import { KeyboardEnginePlugin } from '@composy/keyboard-vue'\r\n *\r\n * const engine = createVueEngine({\r\n * plugins: [KeyboardEnginePlugin],\r\n * })\r\n * ```\r\n */\r\nexport const KeyboardEnginePlugin = {\r\n name: 'keyboard',\r\n version: '0.1.0',\r\n\r\n async install(context: unknown, options?: KeyboardEnginePluginOptions) {\r\n const prefix = options?.prefix ?? 'L'\r\n const engineContext = getEngineContext(context)\r\n\r\n // 获取 Vue 应用实例(从 engine 上下文)\r\n const app = engineContext.framework?.app\r\n\r\n if (app) {\r\n // 注册全局组件\r\n app.component(`${prefix}Keyboard`, VirtualKeyboard)\r\n app.component(`${prefix}KeyboardPopup`, KeyboardPopup)\r\n app.component(`${prefix}LicensePlateKeyboard`, LicensePlateKeyboard)\r\n\r\n // 注册指令\r\n app.directive('keyboard', vKeyboard)\r\n }\r\n\r\n // 注册到服务容器(如果有)\r\n if (engineContext.container?.singleton) {\r\n engineContext.container.singleton('keyboard', {\r\n name: 'keyboard',\r\n version: '0.1.0',\r\n })\r\n }\r\n },\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;AAuBA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU;AAChD;AAEA,SAAS,SAAS,OAA8B;CAC9C,OACE,SAAS,KAAK,KACd,OAAO,MAAM,cAAc,cAC3B,OAAO,MAAM,cAAc;AAE/B;AAEA,SAAS,iBAAiB,OAAuC;CAC/D,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO,CAAC;CAE9B,MAAM,YAAY,SAAS,MAAM,SAAS,IAAI,MAAM,YAAY,KAAA;CAChE,MAAM,YAAY,SAAS,MAAM,SAAS,IAAI,MAAM,YAAY,KAAA;CAEhE,OAAO;EACL,WAAW,SAAS,WAAW,GAAG,IAAI,EAAE,KAAK,UAAU,IAAI,IAAI,KAAA;EAC/D,WACE,OAAO,WAAW,cAAc,aAC5B,EACE,WACE,UAAU,UACd,IACA,KAAA;CACR;AACF;AA6BO,MAAM,uBAAuB;CAClC,MAAM;CACN,SAAS;CAET,MAAM,QAAQ,SAAkB,SAAuC;EACrE,MAAM,SAAS,SAAS,UAAU;EAClC,MAAM,gBAAgB,iBAAiB,OAAO;EAG9C,MAAM,MAAM,cAAc,WAAW;EAErC,IAAI,KAAK;GAEP,IAAI,UAAU,GAAG,OAAM,WAAY,uBAAe;GAClD,IAAI,UAAU,GAAG,OAAM,gBAAiB,qBAAa;GACrD,IAAI,UAAU,GAAG,OAAM,uBAAwB,4BAAoB;GAGnE,IAAI,UAAU,YAAY,SAAS;EACrC;EAGA,IAAI,cAAc,WAAW,WAC3B,cAAc,UAAU,UAAU,YAAY;GAC5C,MAAM;GACN,SAAS;EACX,CAAC;CAEL;AACF"}
|
package/es/plugins/index.d.ts
CHANGED
package/es/plugins/index.js
CHANGED
package/es/style/css.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import './index.
|
|
1
|
+
import './index.css';
|
package/es/style/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import './index.
|
|
1
|
+
import './index.css';
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LDesign Keyboard styles
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* LDesign Keyboard shared styles.
|
|
6
|
+
*/
|
|
7
|
+
:root {
|
|
8
|
+
--keyboard-bg: var(--ld-bg-surface);
|
|
9
|
+
--keyboard-key-bg: var(--ld-bg-container);
|
|
10
|
+
--keyboard-key-color: var(--ld-text-primary);
|
|
11
|
+
--keyboard-key-active-bg: var(--ld-primary-50);
|
|
12
|
+
--keyboard-key-border: var(--ld-border);
|
|
13
|
+
--keyboard-fn-key-bg: var(--ld-bg-elevated);
|
|
14
|
+
--keyboard-fn-key-color: var(--ld-text-secondary);
|
|
15
|
+
--keyboard-fn-key-active-bg: var(--ld-primary-100);
|
|
16
|
+
--keyboard-primary-bg: var(--ld-primary-500);
|
|
17
|
+
--keyboard-primary-active-bg: var(--ld-primary-600);
|
|
18
|
+
--keyboard-primary-color: var(--ld-text-inverse);
|
|
19
|
+
--keyboard-mask-bg: color-mix(in srgb, var(--ld-black) 40%, var(--ld-transparent));
|
|
20
|
+
--keyboard-key-height: var(--ld-px-48);
|
|
21
|
+
--keyboard-key-radius: var(--ld-radius-md);
|
|
22
|
+
--keyboard-key-gap: var(--ld-spacing-sm);
|
|
23
|
+
--keyboard-font-size: var(--ld-font-lg);
|
|
24
|
+
--keyboard-fn-font-size: var(--ld-font-sm);
|
|
25
|
+
--keyboard-padding: var(--ld-spacing-sm);
|
|
26
|
+
--keyboard-key-shadow: var(--ld-shadow-sm, none);
|
|
27
|
+
}
|
|
28
|
+
.virtual-keyboard,
|
|
29
|
+
.virtual-keyboard *,
|
|
30
|
+
.keyboard-popup,
|
|
31
|
+
.keyboard-popup * {
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
margin: 0;
|
|
34
|
+
padding: 0;
|
|
35
|
+
}
|
|
36
|
+
.virtual-keyboard {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
width: 100%;
|
|
40
|
+
padding: var(--keyboard-padding);
|
|
41
|
+
background-color: var(--keyboard-bg);
|
|
42
|
+
font-family: var(--ld-font-family);
|
|
43
|
+
-webkit-font-smoothing: antialiased;
|
|
44
|
+
-moz-osx-font-smoothing: grayscale;
|
|
45
|
+
-webkit-touch-callout: none;
|
|
46
|
+
-webkit-user-select: none;
|
|
47
|
+
-moz-user-select: none;
|
|
48
|
+
user-select: none;
|
|
49
|
+
}
|
|
50
|
+
.virtual-keyboard__row,
|
|
51
|
+
.numpad-row {
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
width: 100%;
|
|
55
|
+
gap: var(--keyboard-key-gap);
|
|
56
|
+
margin-bottom: var(--keyboard-key-gap);
|
|
57
|
+
}
|
|
58
|
+
.virtual-keyboard__row:last-child {
|
|
59
|
+
margin-bottom: 0;
|
|
60
|
+
}
|
|
61
|
+
.keyboard-key {
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
flex: 1;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
min-width: 0;
|
|
67
|
+
height: var(--keyboard-key-height);
|
|
68
|
+
padding: 0 var(--ld-spacing-xs);
|
|
69
|
+
border: 0;
|
|
70
|
+
border-radius: var(--keyboard-key-radius);
|
|
71
|
+
background-color: var(--keyboard-key-bg);
|
|
72
|
+
color: var(--keyboard-key-color);
|
|
73
|
+
font-size: var(--keyboard-font-size);
|
|
74
|
+
font-weight: 500;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
touch-action: manipulation;
|
|
77
|
+
transition: background-color var(--ld-duration-fast), transform var(--ld-duration-fast);
|
|
78
|
+
-webkit-tap-highlight-color: transparent;
|
|
79
|
+
box-shadow: var(--keyboard-key-shadow);
|
|
80
|
+
}
|
|
81
|
+
.keyboard-key:active {
|
|
82
|
+
background-color: var(--keyboard-key-active-bg);
|
|
83
|
+
transform: scale(0.98);
|
|
84
|
+
}
|
|
85
|
+
.keyboard-key--disabled {
|
|
86
|
+
opacity: 0;
|
|
87
|
+
cursor: default;
|
|
88
|
+
pointer-events: none;
|
|
89
|
+
}
|
|
90
|
+
.keyboard-key--backspace,
|
|
91
|
+
.keyboard-key--shift,
|
|
92
|
+
.keyboard-key--tab,
|
|
93
|
+
.keyboard-key--clear,
|
|
94
|
+
.keyboard-key--close {
|
|
95
|
+
background-color: var(--keyboard-fn-key-bg);
|
|
96
|
+
color: var(--keyboard-fn-key-color);
|
|
97
|
+
font-size: var(--keyboard-fn-font-size);
|
|
98
|
+
font-weight: 400;
|
|
99
|
+
}
|
|
100
|
+
.keyboard-key--backspace:active,
|
|
101
|
+
.keyboard-key--shift:active,
|
|
102
|
+
.keyboard-key--tab:active,
|
|
103
|
+
.keyboard-key--clear:active,
|
|
104
|
+
.keyboard-key--close:active {
|
|
105
|
+
background-color: var(--keyboard-fn-key-active-bg);
|
|
106
|
+
}
|
|
107
|
+
.keyboard-key--shift.keyboard-key--active,
|
|
108
|
+
.keyboard-key--done,
|
|
109
|
+
.keyboard-key--enter {
|
|
110
|
+
background-color: var(--keyboard-primary-bg);
|
|
111
|
+
color: var(--keyboard-primary-color);
|
|
112
|
+
}
|
|
113
|
+
.keyboard-key--done:active,
|
|
114
|
+
.keyboard-key--enter:active {
|
|
115
|
+
background-color: var(--keyboard-primary-active-bg);
|
|
116
|
+
}
|
|
117
|
+
.keyboard-key--space {
|
|
118
|
+
flex: 4;
|
|
119
|
+
}
|
|
120
|
+
.key-placeholder {
|
|
121
|
+
background-color: transparent;
|
|
122
|
+
box-shadow: none;
|
|
123
|
+
cursor: default;
|
|
124
|
+
pointer-events: none;
|
|
125
|
+
}
|
|
126
|
+
.numpad-row .keyboard-key {
|
|
127
|
+
height: var(--ld-px-56);
|
|
128
|
+
font-size: var(--ld-font-xl);
|
|
129
|
+
}
|
|
130
|
+
.key-num,
|
|
131
|
+
.key-plate-province,
|
|
132
|
+
.key-plate-letter,
|
|
133
|
+
.key-plate-number {
|
|
134
|
+
background-color: var(--keyboard-key-bg);
|
|
135
|
+
color: var(--keyboard-key-color);
|
|
136
|
+
}
|
|
137
|
+
.key-numpad-fn,
|
|
138
|
+
.key-plate-fn,
|
|
139
|
+
.key-plate-switch {
|
|
140
|
+
background-color: var(--keyboard-fn-key-bg);
|
|
141
|
+
color: var(--keyboard-fn-key-color);
|
|
142
|
+
font-size: var(--keyboard-fn-font-size);
|
|
143
|
+
}
|
|
144
|
+
.key-numpad-done,
|
|
145
|
+
.key-plate-done {
|
|
146
|
+
background-color: var(--keyboard-primary-bg);
|
|
147
|
+
color: var(--keyboard-primary-color);
|
|
148
|
+
font-size: var(--keyboard-fn-font-size);
|
|
149
|
+
box-shadow: none;
|
|
150
|
+
}
|
|
151
|
+
.key-numpad-done:active,
|
|
152
|
+
.key-plate-done:active {
|
|
153
|
+
background-color: var(--keyboard-primary-active-bg);
|
|
154
|
+
}
|
|
155
|
+
.virtual-keyboard:has(.plate-keyboard-row) {
|
|
156
|
+
min-width: var(--ld-px-280);
|
|
157
|
+
}
|
|
158
|
+
.plate-keyboard-row {
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-wrap: nowrap;
|
|
161
|
+
width: 100%;
|
|
162
|
+
gap: var(--ld-spacing-xs);
|
|
163
|
+
}
|
|
164
|
+
.plate-keyboard-row .keyboard-key {
|
|
165
|
+
flex: 1 1 0;
|
|
166
|
+
min-width: var(--ld-px-28);
|
|
167
|
+
height: var(--ld-px-42);
|
|
168
|
+
padding: 0 var(--ld-px-2);
|
|
169
|
+
font-size: var(--ld-font-sm);
|
|
170
|
+
border-radius: var(--ld-radius-sm);
|
|
171
|
+
}
|
|
172
|
+
.key-plate-fn {
|
|
173
|
+
flex: 1.2 1 0 !important;
|
|
174
|
+
}
|
|
175
|
+
.key-plate-done {
|
|
176
|
+
flex: 1.5 1 0 !important;
|
|
177
|
+
}
|
|
178
|
+
.key-plate-switch {
|
|
179
|
+
flex: 1.3 1 0 !important;
|
|
180
|
+
}
|
|
181
|
+
.key-plate-special {
|
|
182
|
+
background-color: var(--ld-warning-50);
|
|
183
|
+
color: var(--ld-warning-700);
|
|
184
|
+
}
|
|
185
|
+
.keyboard-popup {
|
|
186
|
+
position: fixed;
|
|
187
|
+
z-index: 1000;
|
|
188
|
+
overflow: hidden;
|
|
189
|
+
background-color: var(--keyboard-bg);
|
|
190
|
+
}
|
|
191
|
+
.keyboard-popup--desktop {
|
|
192
|
+
min-width: var(--ld-px-280);
|
|
193
|
+
border-radius: var(--ld-radius-lg);
|
|
194
|
+
box-shadow: var(--ld-shadow-lg, none);
|
|
195
|
+
}
|
|
196
|
+
.keyboard-popup--mobile {
|
|
197
|
+
right: 0;
|
|
198
|
+
bottom: 0;
|
|
199
|
+
left: 0;
|
|
200
|
+
border-radius: 0;
|
|
201
|
+
border-top-left-radius: var(--ld-radius-lg);
|
|
202
|
+
border-top-right-radius: var(--ld-radius-lg);
|
|
203
|
+
box-shadow: var(--ld-shadow-md, none);
|
|
204
|
+
}
|
|
205
|
+
.keyboard-mask {
|
|
206
|
+
position: fixed;
|
|
207
|
+
inset: 0;
|
|
208
|
+
z-index: 999;
|
|
209
|
+
background-color: var(--keyboard-mask-bg);
|
|
210
|
+
}
|
|
211
|
+
.keyboard-mask-enter-active,
|
|
212
|
+
.keyboard-mask-leave-active {
|
|
213
|
+
transition: opacity var(--ld-duration-fast);
|
|
214
|
+
}
|
|
215
|
+
.keyboard-mask-enter-from,
|
|
216
|
+
.keyboard-mask-leave-to {
|
|
217
|
+
opacity: 0;
|
|
218
|
+
}
|
|
219
|
+
.keyboard-fade-enter-active,
|
|
220
|
+
.keyboard-fade-leave-active {
|
|
221
|
+
transition: opacity var(--ld-duration-fast), transform var(--ld-duration-fast);
|
|
222
|
+
}
|
|
223
|
+
.keyboard-fade-enter-from,
|
|
224
|
+
.keyboard-fade-leave-to {
|
|
225
|
+
opacity: 0;
|
|
226
|
+
transform: translateY(calc(-1 * var(--ld-px-4))) scale(0.98);
|
|
227
|
+
}
|
|
228
|
+
.keyboard-slide-enter-active,
|
|
229
|
+
.keyboard-slide-leave-active {
|
|
230
|
+
transition: transform var(--ld-duration-normal);
|
|
231
|
+
}
|
|
232
|
+
.keyboard-slide-enter-from,
|
|
233
|
+
.keyboard-slide-leave-to {
|
|
234
|
+
transform: translateY(100%);
|
|
235
|
+
}
|
|
236
|
+
@media (max-width: 48em) {
|
|
237
|
+
.virtual-keyboard {
|
|
238
|
+
padding: var(--ld-spacing-xs);
|
|
239
|
+
}
|
|
240
|
+
.keyboard-key {
|
|
241
|
+
height: var(--ld-px-48);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
@media (orientation: landscape) and (max-height: 32em) {
|
|
245
|
+
.keyboard-key {
|
|
246
|
+
height: var(--ld-px-36);
|
|
247
|
+
font-size: var(--ld-font-base);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
@supports (padding-bottom: env(safe-area-inset-bottom)) {
|
|
251
|
+
.keyboard-popup--mobile {
|
|
252
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Keyboard theme tokens.
|
|
257
|
+
* Theme values intentionally reference the shared LDesign color and size runtime.
|
|
258
|
+
*/
|
|
259
|
+
[data-theme="miui"],
|
|
260
|
+
.keyboard-theme-miui {
|
|
261
|
+
--keyboard-bg: var(--ld-bg-surface);
|
|
262
|
+
--keyboard-key-bg: var(--ld-bg-container);
|
|
263
|
+
--keyboard-key-color: var(--ld-text-primary);
|
|
264
|
+
--keyboard-key-active-bg: var(--ld-warning-50);
|
|
265
|
+
--keyboard-fn-key-bg: var(--ld-bg-elevated);
|
|
266
|
+
--keyboard-fn-key-color: var(--ld-text-secondary);
|
|
267
|
+
--keyboard-fn-key-active-bg: var(--ld-warning-100);
|
|
268
|
+
--keyboard-primary-bg: var(--ld-warning-500);
|
|
269
|
+
--keyboard-primary-active-bg: var(--ld-warning-600);
|
|
270
|
+
--keyboard-primary-color: var(--ld-text-inverse);
|
|
271
|
+
--keyboard-mask-bg: color-mix(in srgb, var(--ld-black) 40%, var(--ld-transparent));
|
|
272
|
+
--keyboard-key-border: var(--ld-border);
|
|
273
|
+
--keyboard-key-radius: var(--ld-radius-md);
|
|
274
|
+
--keyboard-key-gap: var(--ld-spacing-sm);
|
|
275
|
+
--keyboard-key-height: var(--ld-px-48);
|
|
276
|
+
--keyboard-font-size: var(--ld-font-lg);
|
|
277
|
+
--keyboard-fn-font-size: var(--ld-font-sm);
|
|
278
|
+
--keyboard-padding: var(--ld-spacing-sm);
|
|
279
|
+
--keyboard-key-shadow: var(--ld-shadow-sm, none);
|
|
280
|
+
}
|
|
281
|
+
[data-theme="ios"],
|
|
282
|
+
.keyboard-theme-ios {
|
|
283
|
+
--keyboard-bg: var(--ld-bg-surface);
|
|
284
|
+
--keyboard-key-bg: var(--ld-bg-container);
|
|
285
|
+
--keyboard-key-color: var(--ld-text-primary);
|
|
286
|
+
--keyboard-key-active-bg: var(--ld-primary-50);
|
|
287
|
+
--keyboard-fn-key-bg: var(--ld-bg-elevated);
|
|
288
|
+
--keyboard-fn-key-color: var(--ld-text-primary);
|
|
289
|
+
--keyboard-fn-key-active-bg: var(--ld-primary-100);
|
|
290
|
+
--keyboard-primary-bg: var(--ld-primary-500);
|
|
291
|
+
--keyboard-primary-active-bg: var(--ld-primary-600);
|
|
292
|
+
--keyboard-primary-color: var(--ld-text-inverse);
|
|
293
|
+
--keyboard-mask-bg: color-mix(in srgb, var(--ld-black) 40%, var(--ld-transparent));
|
|
294
|
+
--keyboard-key-border: var(--ld-border);
|
|
295
|
+
--keyboard-key-radius: var(--ld-radius-sm);
|
|
296
|
+
--keyboard-key-gap: var(--ld-spacing-sm);
|
|
297
|
+
--keyboard-key-height: var(--ld-px-42);
|
|
298
|
+
--keyboard-font-size: var(--ld-font-xl);
|
|
299
|
+
--keyboard-fn-font-size: var(--ld-font-base);
|
|
300
|
+
--keyboard-padding: var(--ld-spacing-xs);
|
|
301
|
+
--keyboard-key-shadow: var(--ld-shadow-sm, none);
|
|
302
|
+
}
|
|
303
|
+
[data-theme="material"],
|
|
304
|
+
.keyboard-theme-material {
|
|
305
|
+
--keyboard-bg: var(--ld-bg-elevated);
|
|
306
|
+
--keyboard-key-bg: var(--ld-bg-container);
|
|
307
|
+
--keyboard-key-color: var(--ld-text-primary);
|
|
308
|
+
--keyboard-key-active-bg: var(--ld-success-50);
|
|
309
|
+
--keyboard-fn-key-bg: var(--ld-bg-surface);
|
|
310
|
+
--keyboard-fn-key-color: var(--ld-text-secondary);
|
|
311
|
+
--keyboard-fn-key-active-bg: var(--ld-success-100);
|
|
312
|
+
--keyboard-primary-bg: var(--ld-success-500);
|
|
313
|
+
--keyboard-primary-active-bg: var(--ld-success-600);
|
|
314
|
+
--keyboard-primary-color: var(--ld-text-inverse);
|
|
315
|
+
--keyboard-mask-bg: color-mix(in srgb, var(--ld-black) 40%, var(--ld-transparent));
|
|
316
|
+
--keyboard-key-border: var(--ld-border);
|
|
317
|
+
--keyboard-key-radius: var(--ld-radius-sm);
|
|
318
|
+
--keyboard-key-gap: var(--ld-spacing-xs);
|
|
319
|
+
--keyboard-key-height: var(--ld-px-48);
|
|
320
|
+
--keyboard-font-size: var(--ld-font-lg);
|
|
321
|
+
--keyboard-fn-font-size: var(--ld-font-sm);
|
|
322
|
+
--keyboard-padding: var(--ld-spacing-sm);
|
|
323
|
+
--keyboard-key-shadow: var(--ld-shadow-sm, none);
|
|
324
|
+
}
|
|
325
|
+
[data-theme="minimal"],
|
|
326
|
+
.keyboard-theme-minimal {
|
|
327
|
+
--keyboard-bg: var(--ld-bg-surface);
|
|
328
|
+
--keyboard-key-bg: var(--ld-bg-container);
|
|
329
|
+
--keyboard-key-color: var(--ld-text-primary);
|
|
330
|
+
--keyboard-key-active-bg: var(--ld-primary-50);
|
|
331
|
+
--keyboard-fn-key-bg: var(--ld-bg-surface);
|
|
332
|
+
--keyboard-fn-key-color: var(--ld-text-secondary);
|
|
333
|
+
--keyboard-fn-key-active-bg: var(--ld-primary-100);
|
|
334
|
+
--keyboard-primary-bg: var(--ld-text-primary);
|
|
335
|
+
--keyboard-primary-active-bg: var(--ld-text-secondary);
|
|
336
|
+
--keyboard-primary-color: var(--ld-bg-container);
|
|
337
|
+
--keyboard-key-border: var(--ld-border-subtle);
|
|
338
|
+
--keyboard-key-radius: var(--ld-radius-lg);
|
|
339
|
+
--keyboard-key-gap: var(--ld-spacing-sm);
|
|
340
|
+
--keyboard-key-height: var(--ld-px-48);
|
|
341
|
+
--keyboard-font-size: var(--ld-font-base);
|
|
342
|
+
--keyboard-fn-font-size: var(--ld-font-sm);
|
|
343
|
+
--keyboard-padding: var(--ld-spacing-md);
|
|
344
|
+
--keyboard-key-shadow: none;
|
|
345
|
+
}
|
|
346
|
+
[data-theme="dark"],
|
|
347
|
+
.keyboard-theme-dark {
|
|
348
|
+
--keyboard-bg: var(--ld-bg-surface);
|
|
349
|
+
--keyboard-key-bg: var(--ld-bg-elevated);
|
|
350
|
+
--keyboard-key-color: var(--ld-text-primary);
|
|
351
|
+
--keyboard-key-active-bg: var(--ld-primary-100);
|
|
352
|
+
--keyboard-fn-key-bg: var(--ld-bg-container);
|
|
353
|
+
--keyboard-fn-key-color: var(--ld-text-secondary);
|
|
354
|
+
--keyboard-fn-key-active-bg: var(--ld-primary-200);
|
|
355
|
+
--keyboard-primary-bg: var(--ld-primary-500);
|
|
356
|
+
--keyboard-primary-active-bg: var(--ld-primary-600);
|
|
357
|
+
--keyboard-primary-color: var(--ld-text-inverse);
|
|
358
|
+
--keyboard-mask-bg: color-mix(in srgb, var(--ld-black) 40%, var(--ld-transparent));
|
|
359
|
+
--keyboard-key-border: var(--ld-border);
|
|
360
|
+
--keyboard-key-radius: var(--ld-radius-md);
|
|
361
|
+
--keyboard-key-gap: var(--ld-spacing-sm);
|
|
362
|
+
--keyboard-key-height: var(--ld-px-48);
|
|
363
|
+
--keyboard-font-size: var(--ld-font-lg);
|
|
364
|
+
--keyboard-fn-font-size: var(--ld-font-sm);
|
|
365
|
+
--keyboard-padding: var(--ld-spacing-sm);
|
|
366
|
+
--keyboard-key-shadow: var(--ld-shadow-sm, none);
|
|
367
|
+
}
|
|
368
|
+
[data-theme="green"],
|
|
369
|
+
.keyboard-theme-green {
|
|
370
|
+
--keyboard-primary-bg: var(--ld-success-500);
|
|
371
|
+
--keyboard-primary-active-bg: var(--ld-success-600);
|
|
372
|
+
}
|
|
373
|
+
[data-theme="blue"],
|
|
374
|
+
.keyboard-theme-blue {
|
|
375
|
+
--keyboard-primary-bg: var(--ld-info-500);
|
|
376
|
+
--keyboard-primary-active-bg: var(--ld-info-600);
|
|
377
|
+
}
|
|
378
|
+
.keyboard-theme-light {
|
|
379
|
+
color-scheme: light;
|
|
380
|
+
}
|
|
381
|
+
.keyboard-theme-dark {
|
|
382
|
+
color-scheme: dark;
|
|
383
|
+
}
|
|
384
|
+
.keyboard-popup,
|
|
385
|
+
.virtual-keyboard {
|
|
386
|
+
transition: background-color var(--ld-duration-fast);
|
|
387
|
+
}
|
|
388
|
+
.keyboard-key {
|
|
389
|
+
transition: background-color var(--ld-duration-fast), transform var(--ld-duration-fast);
|
|
390
|
+
}
|
|
391
|
+
/*# sourceMappingURL=src\styles\index.less.map */
|