@vonage/vivid 3.48.0 → 3.49.0-preview.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/accordion/index.cjs +21 -0
- package/accordion-item/index.cjs +18 -0
- package/action-group/index.cjs +7 -0
- package/alert/index.cjs +30 -0
- package/appearance-ui/index.cjs +96 -0
- package/audio-player/index.cjs +34 -0
- package/avatar/index.cjs +11 -0
- package/badge/index.cjs +14 -0
- package/banner/index.cjs +29 -0
- package/breadcrumb/index.cjs +13 -0
- package/breadcrumb-item/index.cjs +22 -0
- package/button/index.cjs +25 -0
- package/calendar/index.cjs +9 -0
- package/calendar-event/index.cjs +9 -0
- package/card/index.cjs +14 -0
- package/checkbox/index.cjs +21 -0
- package/combobox/index.cjs +39 -0
- package/data-grid/index.cjs +18 -0
- package/date-picker/index.cjs +40 -0
- package/date-range-picker/index.cjs +40 -0
- package/dialog/index.cjs +31 -0
- package/divider/index.cjs +8 -0
- package/elevation/index.cjs +7 -0
- package/empty-state/index.cjs +12 -0
- package/fab/index.cjs +22 -0
- package/file-picker/index.cjs +30 -0
- package/focus/index.cjs +7 -0
- package/header/index.cjs +8 -0
- package/icon/index.cjs +10 -0
- package/index.cjs +296 -0
- package/layout/index.cjs +7 -0
- package/listbox/index.cjs +77 -0
- package/locales/en-GB.cjs +106 -0
- package/locales/en-US.cjs +106 -0
- package/locales/ja-JP.cjs +106 -0
- package/locales/zh-CN.cjs +106 -0
- package/menu/index.cjs +32 -0
- package/menu-item/index.cjs +22 -0
- package/nav/index.cjs +6 -0
- package/nav-disclosure/index.cjs +17 -0
- package/nav-item/index.cjs +22 -0
- package/note/index.cjs +16 -0
- package/number-field/index.cjs +33 -0
- package/option/index.cjs +23 -0
- package/package.json +20 -2
- package/pagination/index.cjs +28 -0
- package/popup/index.cjs +27 -0
- package/progress/index.cjs +9 -0
- package/progress-ring/index.cjs +9 -0
- package/radio/index.cjs +14 -0
- package/radio-group/index.cjs +14 -0
- package/select/index.cjs +38 -0
- package/selectable-box/index.cjs +25 -0
- package/shared/Reflector.cjs +67 -0
- package/shared/_has.cjs +62 -0
- package/shared/affix.cjs +64 -0
- package/shared/affix.js +8 -4
- package/shared/anchor.cjs +90 -0
- package/shared/anchored.cjs +78 -0
- package/shared/apply-mixins.cjs +25 -0
- package/shared/aria-global.cjs +74 -0
- package/shared/aria.cjs +11 -0
- package/shared/aria2.cjs +11 -0
- package/shared/base-progress.cjs +72 -0
- package/shared/breadcrumb-item.cjs +27 -0
- package/shared/button.cjs +202 -0
- package/shared/calendar-event.cjs +41 -0
- package/shared/children.cjs +61 -0
- package/shared/class-names.cjs +17 -0
- package/shared/definition.cjs +165 -0
- package/shared/definition10.cjs +102 -0
- package/shared/definition11.cjs +164 -0
- package/shared/definition11.js +38 -36
- package/shared/definition12.cjs +50 -0
- package/shared/definition13.cjs +779 -0
- package/shared/definition14.cjs +157 -0
- package/shared/definition15.cjs +249 -0
- package/shared/definition16.cjs +746 -0
- package/shared/definition17.cjs +1372 -0
- package/shared/definition18.cjs +175 -0
- package/shared/definition19.cjs +416 -0
- package/shared/definition2.cjs +232 -0
- package/shared/definition20.cjs +278 -0
- package/shared/definition21.cjs +83 -0
- package/shared/definition22.cjs +74 -0
- package/shared/definition23.cjs +106 -0
- package/shared/definition24.cjs +2392 -0
- package/shared/definition25.cjs +75 -0
- package/shared/definition26.cjs +39 -0
- package/shared/definition27.cjs +66 -0
- package/shared/definition28.cjs +849 -0
- package/shared/definition29.cjs +72 -0
- package/shared/definition3.cjs +72 -0
- package/shared/definition30.cjs +98 -0
- package/shared/definition31.cjs +37 -0
- package/shared/definition32.cjs +24 -0
- package/shared/definition33.cjs +64 -0
- package/shared/definition34.cjs +533 -0
- package/shared/definition35.cjs +295 -0
- package/shared/definition36.cjs +219 -0
- package/shared/definition37.cjs +109 -0
- package/shared/definition38.cjs +92 -0
- package/shared/definition39.cjs +448 -0
- package/shared/definition4.cjs +198 -0
- package/shared/definition40.cjs +49 -0
- package/shared/definition41.cjs +694 -0
- package/shared/definition42.cjs +152 -0
- package/shared/definition43.cjs +113 -0
- package/shared/definition44.cjs +607 -0
- package/shared/definition45.cjs +152 -0
- package/shared/definition46.cjs +166 -0
- package/shared/definition47.cjs +35 -0
- package/shared/definition48.cjs +98 -0
- package/shared/definition49.cjs +543 -0
- package/shared/definition5.cjs +199 -0
- package/shared/definition50.cjs +52 -0
- package/shared/definition51.cjs +150 -0
- package/shared/definition52.cjs +304 -0
- package/shared/definition53.cjs +309 -0
- package/shared/definition54.cjs +146 -0
- package/shared/definition55.cjs +128 -0
- package/shared/definition56.cjs +99 -0
- package/shared/definition57.cjs +310 -0
- package/shared/definition58.cjs +20 -0
- package/shared/definition59.cjs +51 -0
- package/shared/definition6.cjs +83 -0
- package/shared/definition60.cjs +1810 -0
- package/shared/definition7.cjs +72 -0
- package/shared/definition8.cjs +152 -0
- package/shared/definition9.cjs +69 -0
- package/shared/dialog-polyfill.esm.cjs +862 -0
- package/shared/direction.cjs +22 -0
- package/shared/dom.cjs +23 -0
- package/shared/enums.cjs +87 -0
- package/shared/focus.cjs +8 -0
- package/shared/focus2.cjs +11 -0
- package/shared/form-associated.cjs +470 -0
- package/shared/icon.cjs +237 -0
- package/shared/index.cjs +5061 -0
- package/shared/index2.cjs +231 -0
- package/shared/key-codes.cjs +115 -0
- package/shared/key-codes2.cjs +14 -0
- package/shared/listbox.cjs +1072 -0
- package/shared/localized.cjs +11 -0
- package/shared/numbers.cjs +38 -0
- package/shared/patterns/affix.d.ts +5 -1
- package/shared/presentationDate.cjs +6192 -0
- package/shared/radio.cjs +153 -0
- package/shared/ref.cjs +43 -0
- package/shared/repeat.cjs +767 -0
- package/shared/select.options.cjs +12 -0
- package/shared/slotted.cjs +123 -0
- package/shared/start-end.cjs +52 -0
- package/shared/strings.cjs +11 -0
- package/shared/text-anchor.cjs +33 -0
- package/shared/text-anchor.template.cjs +48 -0
- package/shared/text-field.cjs +5 -0
- package/shared/text-field2.cjs +228 -0
- package/shared/tree-item.cjs +154 -0
- package/shared/when.cjs +31 -0
- package/side-drawer/index.cjs +8 -0
- package/slider/index.cjs +16 -0
- package/split-button/index.cjs +20 -0
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.cjs +15 -0
- package/tab/index.cjs +17 -0
- package/tab-panel/index.cjs +6 -0
- package/tabs/index.cjs +24 -0
- package/tag/index.cjs +17 -0
- package/tag-group/index.cjs +7 -0
- package/text-anchor/index.cjs +24 -0
- package/text-area/index.cjs +25 -0
- package/text-field/index.cjs +27 -0
- package/toggletip/index.cjs +29 -0
- package/tooltip/index.cjs +29 -0
- package/tree-item/index.cjs +22 -0
- package/tree-view/index.cjs +14 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const icon = require('./icon.cjs');
|
|
4
|
+
const index = require('./index.cjs');
|
|
5
|
+
const when = require('./when.cjs');
|
|
6
|
+
const locales_enUS = require('../locales/en-US.cjs');
|
|
7
|
+
|
|
8
|
+
const messageStyles = ".message{display:flex;contain:inline-size;font:var(--vvd-typography-base-condensed);gap:4px;grid-column:1/-1}.message-text{color:var(--vvd-color-canvas-text)}.helper-message .message-text{color:var(--_low-ink-color)}.message-icon{font-size:16px}.success-message .message-icon{color:var(--vvd-color-success-500)}.error-message .message-icon{color:var(--vvd-color-alert-500)}\n";
|
|
9
|
+
|
|
10
|
+
var __defProp$1 = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
13
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
|
|
14
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
15
|
+
if (decorator = decorators[i])
|
|
16
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
17
|
+
if (kind && result)
|
|
18
|
+
__defProp$1(target, key, result);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
class FormElementHelperText {
|
|
22
|
+
}
|
|
23
|
+
__decorateClass$1([
|
|
24
|
+
index.attr({ attribute: "helper-text" })
|
|
25
|
+
], FormElementHelperText.prototype, "helperText", 2);
|
|
26
|
+
class FormElementSuccessText {
|
|
27
|
+
}
|
|
28
|
+
__decorateClass$1([
|
|
29
|
+
index.attr({ attribute: "success-text" })
|
|
30
|
+
], FormElementSuccessText.prototype, "successText", 2);
|
|
31
|
+
class FormElementCharCount {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.charCount = false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
__decorateClass$1([
|
|
37
|
+
index.attr({
|
|
38
|
+
attribute: "char-count",
|
|
39
|
+
mode: "boolean"
|
|
40
|
+
})
|
|
41
|
+
], FormElementCharCount.prototype, "charCount", 2);
|
|
42
|
+
function formElements(constructor) {
|
|
43
|
+
let currentPrototype = constructor.prototype;
|
|
44
|
+
while (currentPrototype) {
|
|
45
|
+
const parentPrototype = Object.getPrototypeOf(currentPrototype);
|
|
46
|
+
if (currentPrototype.validate && !parentPrototype.validate) {
|
|
47
|
+
currentPrototype.validate = function(anchor) {
|
|
48
|
+
if (this.proxy instanceof HTMLElement) {
|
|
49
|
+
const isValid = this.proxy.validity.valid;
|
|
50
|
+
const controlIsInvalidDueToMinOrMaxLength = this.control && this.control.validity && !this.control.validity.valid && (this.control.validity.tooShort || this.control.validity.tooLong);
|
|
51
|
+
if (isValid && controlIsInvalidDueToMinOrMaxLength) {
|
|
52
|
+
this.setValidity(
|
|
53
|
+
this.control.validity,
|
|
54
|
+
this.control.validationMessage,
|
|
55
|
+
anchor
|
|
56
|
+
);
|
|
57
|
+
} else {
|
|
58
|
+
this.setValidity(
|
|
59
|
+
this.proxy.validity,
|
|
60
|
+
this.proxy.validationMessage,
|
|
61
|
+
anchor
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
currentPrototype = parentPrototype;
|
|
69
|
+
}
|
|
70
|
+
class Decorated extends constructor {
|
|
71
|
+
constructor(...args) {
|
|
72
|
+
super(...args);
|
|
73
|
+
this.errorValidationMessage = "";
|
|
74
|
+
this.#forceErrorDisplay = false;
|
|
75
|
+
this.#hasBeenTouched = false;
|
|
76
|
+
this.#handleInvalidEvent = () => {
|
|
77
|
+
this.#forceErrorDisplay = true;
|
|
78
|
+
this.validate();
|
|
79
|
+
};
|
|
80
|
+
this.validate = () => {
|
|
81
|
+
super.validate();
|
|
82
|
+
const shouldShowValidationError = this.#forceErrorDisplay || this.#hasBeenTouched && this.dirtyValue;
|
|
83
|
+
this.errorValidationMessage = shouldShowValidationError ? this.validationMessage : "";
|
|
84
|
+
};
|
|
85
|
+
this.addEventListener("blur", () => {
|
|
86
|
+
this.#hasBeenTouched = true;
|
|
87
|
+
this.#forceErrorDisplay = false;
|
|
88
|
+
this.validate();
|
|
89
|
+
});
|
|
90
|
+
this.addEventListener("focus", () => {
|
|
91
|
+
this.#hasBeenTouched = false;
|
|
92
|
+
});
|
|
93
|
+
this.addEventListener("invalid", () => {
|
|
94
|
+
this.proxy.dispatchEvent(new Event("invalid"));
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
#forceErrorDisplay;
|
|
98
|
+
#hasBeenTouched;
|
|
99
|
+
connectedCallback() {
|
|
100
|
+
super.connectedCallback();
|
|
101
|
+
this.proxy.addEventListener("invalid", this.#handleInvalidEvent);
|
|
102
|
+
}
|
|
103
|
+
#handleInvalidEvent;
|
|
104
|
+
disconnectedCallback() {
|
|
105
|
+
super.disconnectedCallback();
|
|
106
|
+
this.proxy.removeEventListener("invalid", this.#handleInvalidEvent);
|
|
107
|
+
}
|
|
108
|
+
formResetCallback() {
|
|
109
|
+
this.#forceErrorDisplay = false;
|
|
110
|
+
super.formResetCallback();
|
|
111
|
+
this.validate();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
__decorateClass$1([
|
|
115
|
+
index.attr
|
|
116
|
+
], Decorated.prototype, "label", 2);
|
|
117
|
+
__decorateClass$1([
|
|
118
|
+
index.observable
|
|
119
|
+
], Decorated.prototype, "errorValidationMessage", 2);
|
|
120
|
+
return Decorated;
|
|
121
|
+
}
|
|
122
|
+
function getFeedbackTemplate(messageType, context) {
|
|
123
|
+
const MessageTypeMap = {
|
|
124
|
+
helper: {
|
|
125
|
+
messageProperty: "helperText",
|
|
126
|
+
className: "helper",
|
|
127
|
+
iconType: ""
|
|
128
|
+
},
|
|
129
|
+
error: {
|
|
130
|
+
messageProperty: "errorValidationMessage",
|
|
131
|
+
className: "error",
|
|
132
|
+
iconType: "info-line"
|
|
133
|
+
},
|
|
134
|
+
success: {
|
|
135
|
+
messageProperty: "successText",
|
|
136
|
+
className: "success",
|
|
137
|
+
iconType: "check-circle-line"
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
const iconTag = context.tagFor(icon.Icon);
|
|
141
|
+
const messageTypeConfig = MessageTypeMap[messageType];
|
|
142
|
+
const iconType = messageTypeConfig.iconType;
|
|
143
|
+
return index.html` <style>
|
|
144
|
+
${messageStyles}
|
|
145
|
+
</style>
|
|
146
|
+
<div class="message ${MessageTypeMap[messageType].className}-message">
|
|
147
|
+
${when.when(
|
|
148
|
+
() => iconType,
|
|
149
|
+
index.html`
|
|
150
|
+
<${iconTag} class="message-icon" name="${iconType}"></${iconTag}>`
|
|
151
|
+
)}
|
|
152
|
+
${feedbackMessage({
|
|
153
|
+
messageProperty: MessageTypeMap[messageType].messageProperty
|
|
154
|
+
})}
|
|
155
|
+
</div>`;
|
|
156
|
+
}
|
|
157
|
+
function feedbackMessage({
|
|
158
|
+
messageProperty
|
|
159
|
+
}) {
|
|
160
|
+
return index.html`
|
|
161
|
+
<span class="message-text">${(x) => x[messageProperty]}</span>
|
|
162
|
+
`;
|
|
163
|
+
}
|
|
164
|
+
function errorText(constructor) {
|
|
165
|
+
class Decorated extends constructor {
|
|
166
|
+
constructor(...args) {
|
|
167
|
+
super(...args);
|
|
168
|
+
this.#blockValidateCalls = false;
|
|
169
|
+
this._validate = this.validate;
|
|
170
|
+
this.validate = () => {
|
|
171
|
+
if (!this.#blockValidateCalls)
|
|
172
|
+
this._validate();
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
#blockValidateCalls;
|
|
176
|
+
errorTextChanged(_, newErrorText) {
|
|
177
|
+
if (newErrorText) {
|
|
178
|
+
this.#forceCustomError(newErrorText);
|
|
179
|
+
} else {
|
|
180
|
+
this.#clearCustomErrorAndRevalidate();
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
#forceCustomError(errorMessage) {
|
|
184
|
+
this.setValidity({ customError: true }, errorMessage, this.control);
|
|
185
|
+
this.errorValidationMessage = errorMessage;
|
|
186
|
+
this.#blockValidateCalls = true;
|
|
187
|
+
}
|
|
188
|
+
#clearCustomErrorAndRevalidate() {
|
|
189
|
+
this.setValidity({ customError: false }, "", this.control);
|
|
190
|
+
this.#blockValidateCalls = false;
|
|
191
|
+
this.validate();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
__decorateClass$1([
|
|
195
|
+
index.attr({ attribute: "error-text" })
|
|
196
|
+
], Decorated.prototype, "errorText", 2);
|
|
197
|
+
return Decorated;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
var __defProp = Object.defineProperty;
|
|
201
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
202
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
203
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
204
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
205
|
+
if (decorator = decorators[i])
|
|
206
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
207
|
+
if (kind && result)
|
|
208
|
+
__defProp(target, key, result);
|
|
209
|
+
return result;
|
|
210
|
+
};
|
|
211
|
+
class CurrentLocale {
|
|
212
|
+
constructor() {
|
|
213
|
+
this.locale = locales_enUS;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
__decorateClass([
|
|
217
|
+
index.observable
|
|
218
|
+
], CurrentLocale.prototype, "locale", 2);
|
|
219
|
+
const currentLocale = new CurrentLocale();
|
|
220
|
+
const setLocale = (locale) => {
|
|
221
|
+
currentLocale.locale = locale;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
exports.FormElementCharCount = FormElementCharCount;
|
|
225
|
+
exports.FormElementHelperText = FormElementHelperText;
|
|
226
|
+
exports.FormElementSuccessText = FormElementSuccessText;
|
|
227
|
+
exports.currentLocale = currentLocale;
|
|
228
|
+
exports.errorText = errorText;
|
|
229
|
+
exports.formElements = formElements;
|
|
230
|
+
exports.getFeedbackTemplate = getFeedbackTemplate;
|
|
231
|
+
exports.setLocale = setLocale;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Key Code values
|
|
5
|
+
* @deprecated - KeyCodes are deprecated, use individual string key exports
|
|
6
|
+
*/
|
|
7
|
+
var KeyCodes;
|
|
8
|
+
(function (KeyCodes) {
|
|
9
|
+
KeyCodes[KeyCodes["alt"] = 18] = "alt";
|
|
10
|
+
KeyCodes[KeyCodes["arrowDown"] = 40] = "arrowDown";
|
|
11
|
+
KeyCodes[KeyCodes["arrowLeft"] = 37] = "arrowLeft";
|
|
12
|
+
KeyCodes[KeyCodes["arrowRight"] = 39] = "arrowRight";
|
|
13
|
+
KeyCodes[KeyCodes["arrowUp"] = 38] = "arrowUp";
|
|
14
|
+
KeyCodes[KeyCodes["back"] = 8] = "back";
|
|
15
|
+
KeyCodes[KeyCodes["backSlash"] = 220] = "backSlash";
|
|
16
|
+
KeyCodes[KeyCodes["break"] = 19] = "break";
|
|
17
|
+
KeyCodes[KeyCodes["capsLock"] = 20] = "capsLock";
|
|
18
|
+
KeyCodes[KeyCodes["closeBracket"] = 221] = "closeBracket";
|
|
19
|
+
KeyCodes[KeyCodes["colon"] = 186] = "colon";
|
|
20
|
+
KeyCodes[KeyCodes["colon2"] = 59] = "colon2";
|
|
21
|
+
KeyCodes[KeyCodes["comma"] = 188] = "comma";
|
|
22
|
+
KeyCodes[KeyCodes["ctrl"] = 17] = "ctrl";
|
|
23
|
+
KeyCodes[KeyCodes["delete"] = 46] = "delete";
|
|
24
|
+
KeyCodes[KeyCodes["end"] = 35] = "end";
|
|
25
|
+
KeyCodes[KeyCodes["enter"] = 13] = "enter";
|
|
26
|
+
KeyCodes[KeyCodes["equals"] = 187] = "equals";
|
|
27
|
+
KeyCodes[KeyCodes["equals2"] = 61] = "equals2";
|
|
28
|
+
KeyCodes[KeyCodes["equals3"] = 107] = "equals3";
|
|
29
|
+
KeyCodes[KeyCodes["escape"] = 27] = "escape";
|
|
30
|
+
KeyCodes[KeyCodes["forwardSlash"] = 191] = "forwardSlash";
|
|
31
|
+
KeyCodes[KeyCodes["function1"] = 112] = "function1";
|
|
32
|
+
KeyCodes[KeyCodes["function10"] = 121] = "function10";
|
|
33
|
+
KeyCodes[KeyCodes["function11"] = 122] = "function11";
|
|
34
|
+
KeyCodes[KeyCodes["function12"] = 123] = "function12";
|
|
35
|
+
KeyCodes[KeyCodes["function2"] = 113] = "function2";
|
|
36
|
+
KeyCodes[KeyCodes["function3"] = 114] = "function3";
|
|
37
|
+
KeyCodes[KeyCodes["function4"] = 115] = "function4";
|
|
38
|
+
KeyCodes[KeyCodes["function5"] = 116] = "function5";
|
|
39
|
+
KeyCodes[KeyCodes["function6"] = 117] = "function6";
|
|
40
|
+
KeyCodes[KeyCodes["function7"] = 118] = "function7";
|
|
41
|
+
KeyCodes[KeyCodes["function8"] = 119] = "function8";
|
|
42
|
+
KeyCodes[KeyCodes["function9"] = 120] = "function9";
|
|
43
|
+
KeyCodes[KeyCodes["home"] = 36] = "home";
|
|
44
|
+
KeyCodes[KeyCodes["insert"] = 45] = "insert";
|
|
45
|
+
KeyCodes[KeyCodes["menu"] = 93] = "menu";
|
|
46
|
+
KeyCodes[KeyCodes["minus"] = 189] = "minus";
|
|
47
|
+
KeyCodes[KeyCodes["minus2"] = 109] = "minus2";
|
|
48
|
+
KeyCodes[KeyCodes["numLock"] = 144] = "numLock";
|
|
49
|
+
KeyCodes[KeyCodes["numPad0"] = 96] = "numPad0";
|
|
50
|
+
KeyCodes[KeyCodes["numPad1"] = 97] = "numPad1";
|
|
51
|
+
KeyCodes[KeyCodes["numPad2"] = 98] = "numPad2";
|
|
52
|
+
KeyCodes[KeyCodes["numPad3"] = 99] = "numPad3";
|
|
53
|
+
KeyCodes[KeyCodes["numPad4"] = 100] = "numPad4";
|
|
54
|
+
KeyCodes[KeyCodes["numPad5"] = 101] = "numPad5";
|
|
55
|
+
KeyCodes[KeyCodes["numPad6"] = 102] = "numPad6";
|
|
56
|
+
KeyCodes[KeyCodes["numPad7"] = 103] = "numPad7";
|
|
57
|
+
KeyCodes[KeyCodes["numPad8"] = 104] = "numPad8";
|
|
58
|
+
KeyCodes[KeyCodes["numPad9"] = 105] = "numPad9";
|
|
59
|
+
KeyCodes[KeyCodes["numPadDivide"] = 111] = "numPadDivide";
|
|
60
|
+
KeyCodes[KeyCodes["numPadDot"] = 110] = "numPadDot";
|
|
61
|
+
KeyCodes[KeyCodes["numPadMinus"] = 109] = "numPadMinus";
|
|
62
|
+
KeyCodes[KeyCodes["numPadMultiply"] = 106] = "numPadMultiply";
|
|
63
|
+
KeyCodes[KeyCodes["numPadPlus"] = 107] = "numPadPlus";
|
|
64
|
+
KeyCodes[KeyCodes["openBracket"] = 219] = "openBracket";
|
|
65
|
+
KeyCodes[KeyCodes["pageDown"] = 34] = "pageDown";
|
|
66
|
+
KeyCodes[KeyCodes["pageUp"] = 33] = "pageUp";
|
|
67
|
+
KeyCodes[KeyCodes["period"] = 190] = "period";
|
|
68
|
+
KeyCodes[KeyCodes["print"] = 44] = "print";
|
|
69
|
+
KeyCodes[KeyCodes["quote"] = 222] = "quote";
|
|
70
|
+
KeyCodes[KeyCodes["scrollLock"] = 145] = "scrollLock";
|
|
71
|
+
KeyCodes[KeyCodes["shift"] = 16] = "shift";
|
|
72
|
+
KeyCodes[KeyCodes["space"] = 32] = "space";
|
|
73
|
+
KeyCodes[KeyCodes["tab"] = 9] = "tab";
|
|
74
|
+
KeyCodes[KeyCodes["tilde"] = 192] = "tilde";
|
|
75
|
+
KeyCodes[KeyCodes["windowsLeft"] = 91] = "windowsLeft";
|
|
76
|
+
KeyCodes[KeyCodes["windowsOpera"] = 219] = "windowsOpera";
|
|
77
|
+
KeyCodes[KeyCodes["windowsRight"] = 92] = "windowsRight";
|
|
78
|
+
})(KeyCodes || (KeyCodes = {}));
|
|
79
|
+
/**
|
|
80
|
+
* String values for use with KeyboardEvent.key
|
|
81
|
+
*/
|
|
82
|
+
const keyArrowDown = "ArrowDown";
|
|
83
|
+
const keyArrowLeft = "ArrowLeft";
|
|
84
|
+
const keyArrowRight = "ArrowRight";
|
|
85
|
+
const keyArrowUp = "ArrowUp";
|
|
86
|
+
const keyEnter = "Enter";
|
|
87
|
+
const keyEscape = "Escape";
|
|
88
|
+
const keyHome = "Home";
|
|
89
|
+
const keyEnd = "End";
|
|
90
|
+
const keyFunction2 = "F2";
|
|
91
|
+
const keyPageDown = "PageDown";
|
|
92
|
+
const keyPageUp = "PageUp";
|
|
93
|
+
const keySpace = " ";
|
|
94
|
+
const keyTab = "Tab";
|
|
95
|
+
const ArrowKeys = {
|
|
96
|
+
ArrowDown: keyArrowDown,
|
|
97
|
+
ArrowLeft: keyArrowLeft,
|
|
98
|
+
ArrowRight: keyArrowRight,
|
|
99
|
+
ArrowUp: keyArrowUp,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
exports.ArrowKeys = ArrowKeys;
|
|
103
|
+
exports.keyArrowDown = keyArrowDown;
|
|
104
|
+
exports.keyArrowLeft = keyArrowLeft;
|
|
105
|
+
exports.keyArrowRight = keyArrowRight;
|
|
106
|
+
exports.keyArrowUp = keyArrowUp;
|
|
107
|
+
exports.keyEnd = keyEnd;
|
|
108
|
+
exports.keyEnter = keyEnter;
|
|
109
|
+
exports.keyEscape = keyEscape;
|
|
110
|
+
exports.keyFunction2 = keyFunction2;
|
|
111
|
+
exports.keyHome = keyHome;
|
|
112
|
+
exports.keyPageDown = keyPageDown;
|
|
113
|
+
exports.keyPageUp = keyPageUp;
|
|
114
|
+
exports.keySpace = keySpace;
|
|
115
|
+
exports.keyTab = keyTab;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* String values for use with KeyboardEvent.key
|
|
5
|
+
*/
|
|
6
|
+
const keyArrowLeft = "ArrowLeft";
|
|
7
|
+
const keyArrowRight = "ArrowRight";
|
|
8
|
+
const keyEnter = "Enter";
|
|
9
|
+
const keySpace = " ";
|
|
10
|
+
|
|
11
|
+
exports.keyArrowLeft = keyArrowLeft;
|
|
12
|
+
exports.keyArrowRight = keyArrowRight;
|
|
13
|
+
exports.keyEnter = keyEnter;
|
|
14
|
+
exports.keySpace = keySpace;
|