@uyghurcommunity/keyboard 0.0.0-stage → 0.2.0
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/CHANGELOG.md +9 -0
- package/LICENSE +21 -0
- package/README.md +206 -2
- package/dist/uyghur-keyboard.js +644 -0
- package/docs/layouts.md +43 -0
- package/package.json +26 -4
- package/src/element.d.ts +1 -0
- package/src/element.js +3 -0
- package/src/index.d.ts +56 -0
- package/src/index.js +411 -0
- package/src/layouts.js +103 -0
- package/src/navigation.js +45 -0
- package/src/style.js +83 -0
package/src/style.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export const alkatipFontFace = `@font-face {
|
|
2
|
+
font-family: "ALKATIP Basma";
|
|
3
|
+
src: url("https://db.onlinewebfonts.com/t/3c16518f40da2fc2901f37666c0556a7.woff2") format("woff2"),
|
|
4
|
+
url("https://db.onlinewebfonts.com/t/3c16518f40da2fc2901f37666c0556a7.woff") format("woff"),
|
|
5
|
+
url("https://db.onlinewebfonts.com/t/3c16518f40da2fc2901f37666c0556a7.ttf") format("truetype");
|
|
6
|
+
font-weight: normal;
|
|
7
|
+
font-style: normal;
|
|
8
|
+
font-display: swap;
|
|
9
|
+
}`;
|
|
10
|
+
export const alkatipHelperStyles = `.alkatip-basma {
|
|
11
|
+
font-family: "ALKATIP Basma", serif;
|
|
12
|
+
direction: rtl;
|
|
13
|
+
unicode-bidi: embed;
|
|
14
|
+
line-height: 2.2;
|
|
15
|
+
}`;
|
|
16
|
+
export const keyboardStyles = `
|
|
17
|
+
${alkatipHelperStyles}
|
|
18
|
+
.ug-keyboard {
|
|
19
|
+
--_bg:#f1f3ef; --_key:#fff; --_ink:#17362f; --_line:#ccd7cf; --_hover:#e3ede5; --_focus:#087866;
|
|
20
|
+
box-sizing:border-box;
|
|
21
|
+
width:100%;
|
|
22
|
+
padding:12px;
|
|
23
|
+
border:1px solid var(--ug-line,var(--_line));
|
|
24
|
+
border-radius:16px;
|
|
25
|
+
background:var(--ug-bg,var(--_bg));
|
|
26
|
+
color:var(--ug-ink,var(--_ink));
|
|
27
|
+
color-scheme:light;
|
|
28
|
+
font-family:"ALKATIP Basma",Tahoma,Arial,sans-serif;
|
|
29
|
+
line-height:1.5;
|
|
30
|
+
}
|
|
31
|
+
.ug-keyboard[dir="ltr"] { direction:ltr; }
|
|
32
|
+
.ug-keyboard[data-theme="dark"] {
|
|
33
|
+
--_bg:#182722; --_key:#263c33; --_ink:#eef7f2; --_line:#527367; --_hover:#37564a; --_focus:#89e6ca;
|
|
34
|
+
color-scheme:dark;
|
|
35
|
+
}
|
|
36
|
+
.ug-keyboard * { box-sizing:border-box; }
|
|
37
|
+
.ug-keyboard__row {
|
|
38
|
+
display:flex;
|
|
39
|
+
flex-wrap:wrap;
|
|
40
|
+
justify-content:center;
|
|
41
|
+
gap:6px;
|
|
42
|
+
margin-block:6px;
|
|
43
|
+
}
|
|
44
|
+
.ug-keyboard__layout, .ug-keyboard__key {
|
|
45
|
+
min-width:44px;
|
|
46
|
+
min-height:44px;
|
|
47
|
+
border:1px solid var(--ug-line,var(--_line));
|
|
48
|
+
border-radius:8px;
|
|
49
|
+
background:var(--ug-key,var(--_key));
|
|
50
|
+
color:inherit;
|
|
51
|
+
cursor:pointer;
|
|
52
|
+
touch-action:manipulation;
|
|
53
|
+
}
|
|
54
|
+
.ug-keyboard__layout {
|
|
55
|
+
max-width:100%;
|
|
56
|
+
padding:4px 8px;
|
|
57
|
+
font:16px/1.5 "ALKATIP Basma",Tahoma,Arial,sans-serif;
|
|
58
|
+
}
|
|
59
|
+
.ug-keyboard__key {
|
|
60
|
+
display:inline-flex;
|
|
61
|
+
align-items:center;
|
|
62
|
+
justify-content:center;
|
|
63
|
+
flex:1 0 44px;
|
|
64
|
+
padding:4px 2px;
|
|
65
|
+
font:22px/1.5 "ALKATIP Basma",Tahoma,Arial,sans-serif;
|
|
66
|
+
}
|
|
67
|
+
.ug-keyboard__key:hover, .ug-keyboard__key[aria-pressed="true"] { background:var(--ug-hover,var(--_hover)); }
|
|
68
|
+
.ug-keyboard__key:focus-visible, .ug-keyboard__layout:focus-visible {
|
|
69
|
+
outline:2px solid var(--ug-focus,var(--_focus));
|
|
70
|
+
outline-offset:1px;
|
|
71
|
+
z-index:1;
|
|
72
|
+
}
|
|
73
|
+
.ug-keyboard__key[data-action] { font-size:16px; }
|
|
74
|
+
.ug-keyboard__key[data-action="space"] { flex-grow:4; }
|
|
75
|
+
.ug-keyboard[data-compact="true"] { padding:6px; }
|
|
76
|
+
.ug-keyboard[data-compact="true"] .ug-keyboard__row { gap:3px; margin-block:3px; }
|
|
77
|
+
.ug-keyboard[data-compact="true"] .ug-keyboard__key { padding:2px; font-size:18px; }
|
|
78
|
+
.ug-keyboard[hidden] { display:none; }
|
|
79
|
+
@media (max-width:420px) {
|
|
80
|
+
.ug-keyboard { padding:6px; }
|
|
81
|
+
.ug-keyboard__row { gap:4px; }
|
|
82
|
+
}
|
|
83
|
+
`;
|